Re: Graphic Modes Stuff
On Fri, Aug 27, 1999 at 06:29:08PM +0100, Thomas Harte wrote: First : are there any speed differences between the graphics modes? I understand that Mode 1 is slowed down deliberately to loosely approximate a ZX Spectrum, but are there any other differences in other graphics modes? Not really. Apparently the difference between mode 1 and any other mode is that the memory is contended as if all 312 lines were screen lines instead of there being 120 off-screen lines and 192 on-screen ones. Third : is whichever page of memory which doesn't contain any of the screen still contended? Am I right in thinking that the only effect of contention is to frequently round t-states up to the nearest 4? No. :-) All 32 RAM pages are contended whichever one the screen happens to be in. ROM and external RAM packs are not contended. If the screen is turned off then the CPU has to wait until the next multiple of 4 T-states for any memory access in an affected RAM page. This often has the effect of rounding the instruction timing up to the next multiple of 4. If the screen is on then for 256 out of the 384 pixels on a line for 192 of the 312 lines it works in multiples of 8 instead of 4. This doubles the time for memory-intensive operations; some instructions take less than double. INC HL is a rare example of an instruction that takes the same amount of time (8 cycles) whether or not the screen is active. imc
Re: Graphic Modes Stuff
At 10:58 pm +0100 27/8/99, Thomas Harte wrote: First : are there any speed differences between the graphics modes? I Mode 1 is a special slow case, but modes 2 to 4 should all have the same effect on memory accesses. understand that Mode 1 is slowed down deliberately to loosely approximate a ZX Spectrum, but are there any other differences in other graphics modes? How many t-states do I get per scanline, and are there still 312 of them? There are 312 scanlines of 384 tstates each. (See my answer to your third question). Second : does altering the palette have any effect in Modes 1 2? Yes, exactly as you would expect from having used Mode 4. Does Mode 3 simply only look at the first 4 palette entries, or is it more complex than that? Well, yes it is more complicated but the chances are you'll never really need to worry about that There's a fairly useless feature involving bits 5 and 6 of the HMPR - by setting these bits, the pixels in mode 3 will be displayed using palette entries 4 to 7, 8 to 11, or 12 to 15 instead of 0 to 3. It is also worth noting that screen bits %10 are displayed as palette entry %01, and %01 is displayed as %10. Mode 3 has always been a bit quirky! Third : is whichever page of memory which doesn't contain any of the screen still contended? No, all RAM pages are affected in the exactly same way, regardless of which page is displayed at the paricular time. Am I right in thinking that the only effect of contention is to frequently round t-states up to the nearest 4? Well, no... it also halves the speed of memory accesses during the time that the screen is displayed. In effect nearly all instructions take twice as long to execute during that time, so it is easiest to keep the number of t-states per instruction constant, and consider lines of 256 usable t-states. But a few instructions which don't need to access memory will appear to gain 4 tstates over normal execution timings. Andrew -- -- Andrew Collier ([EMAIL PROTECTED]) --My other -- http://mnemotech.ucam.org -- .sig is a -- Part 3 Materials Science, Cambridge -- PDF file --
Re: Graphic Modes Stuff
Andrew Collier wrote: At 10:58 pm +0100 27/8/99, Thomas Harte wrote: First : are there any speed differences between the graphics modes? I Mode 1 is a special slow case, but modes 2 to 4 should all have the same effect on memory accesses. understand that Mode 1 is slowed down deliberately to loosely approximate a ZX Spectrum... Blimey, I learn something new about the Sam every day (almost). I always assumed Mode 1 was full Sam speed, but that the emulating software was rigged to slow things down. Not that it seemed to work, with all the flickery sprites that turn up in most of the games I've tried... Gord. -- The HEXdidn't... Homepage: -- Featuring The U.K. Policenauts Homepage -- http://www.hexdidnt.clara.net \-- AOL Instant Messenger: 'hexdidnt' --/
Graphic Modes Stuff
I've been writing some simplistic ZX Spectrum programs for a bit now, and feel I am ready to move on to trying to write something for the SAM (one of which I actually own). Of course I understand that there isn't any extra complexity in writing for the SAM (at my level) once the graphics mode has been set up, but there is a lot of extra complexity in being able to quickly write code and try it out. So while I'm here : please can a snapshot file format be added to a SIM Coupé? Only loading would be fine . . . Anyway, I am wondering about graphics modes. Since the drafts for a new technical manual available on the 'net are broken with my current PDF viewer, I was hoping someone here could help. First : are there any speed differences between the graphics modes? I understand that Mode 1 is slowed down deliberately to loosely approximate a ZX Spectrum, but are there any other differences in other graphics modes? How many t-states do I get per scanline, and are there still 312 of them? Second : does altering the palette have any effect in Modes 1 2? Does Mode 3 simply only look at the first 4 palette entries, or is it more complex than that? Third : is whichever page of memory which doesn't contain any of the screen still contended? Am I right in thinking that the only effect of contention is to frequently round t-states up to the nearest 4? Finally : thanks for reading this, and thanks some more for any responses. -Thomas