Anonymous

ZX Spectrum ULA: Difference between revisions

From Sinclair Wiki
m
→‎Contention: DOES NOT USE !WAIT line!
(→‎ULA Functions: Keyboard Half-rows)
m (→‎Contention: DOES NOT USE !WAIT line!)
Line 34: Line 34:
== Contention ==
== Contention ==
{{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 bringing the /WAIT line low) 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}}