Anonymous

ZX Spectrum ULA: Difference between revisions

From Sinclair Wiki
Spacing
(Use {{overline}})
(Spacing)
Line 69: Line 69:
{{Main|Contended memory}}
{{Main|Contended memory}}
The ULA has priority for reading from RAM, since it needs to be able to generate the display promptly.  Thus if the Z80 attempts to read/write memory from the range 0x4000 to 0x7FFF (ie. A15 =0, A14 =1) while the display is being generated, the ULA will stop the Z80 (by disabling the CPU clock) until it has finished reading VRAM.  This is known as "RAM contention" and the range 0x4000 to 0x7FFF is the "contended RAM".  While the TV scan is within the display area, contention is applied for 6 T-states out of every 8.
The ULA has priority for reading from RAM, since it needs to be able to generate the display promptly.  Thus if the Z80 attempts to read/write memory from the range 0x4000 to 0x7FFF (ie. A15 =0, A14 =1) while the display is being generated, the ULA will stop the Z80 (by disabling the CPU clock) until it has finished reading VRAM.  This is known as "RAM contention" and the range 0x4000 to 0x7FFF is the "contended RAM".  While the TV scan is within the display area, contention is applied for 6 T-states out of every 8.
=== IO Contention ===
=== IO Contention ===
{{Main|Contended IO}}
{{Main|Contended IO}}
Weirdly, the ULA also applies contention to IO port reads/writes if A15 =0 and A14 =1.  ''(details should go here; IO contention is more complicated somehow)''
Weirdly, the ULA also applies contention to IO port reads/writes if A15 =0 and A14 =1.  ''(details should go here; IO contention is more complicated somehow)''
=== The Snow Effect ===
=== The Snow Effect ===
{{Copyedit}}
{{Copyedit}}