Appendix B
74
It is also possible for a conflict to occur with a device supposedly accessing a different
I/O port. As described in Chapter 5, the Kempston joystick socket uses input port $1F
(binary 00011111, decimal 31), and so it should only be read when address lines A5 to
A7 are all at logic ’0’. However, some interfaces (such as the RAM Turbo) only check
that address line A5 is at logic ’0’ and this causes a problem because the display
mode register I/O port happens to have address line A5 at logic ’0’. Since the
SPECTRA interface filters all display mode register accesses from its rear expansion
bus, connecting such a conflicting device behind it will overcome the problem.
The Snow Effect
When the Z80’s I register is set with a value between $40 and $7F, the TV image
produced by the Spectrum breaks-up, with pixels apparently being randomly set or
reset across the screen. This is referred to as the snow effect. It is caused as a result
of the Spectrum’s ULA failing to recognise a memory refreshes as a contention
condition with the Z80.
The Z80 has built-in refresh circuitry to simplify interfacing to dynamic memory. When
a refresh operation occurs, the contents of the Z80’s I register are placed on the high
order address lines and the contents of the R register are placed on the low order
address lines. Setting the I register with a value between $40 and $7F causes memory
refresh operations to occur within address range $4000 to $7FFF, which is where the
display and attribute files reside. The ULA should detect and prevent such memory
refreshes occurring when it is fetching a display byte by temporarily halting the Z80. Its
failure to do so results in a corrupted address appearing on the address bus and
hence the wrong byte fetched and displayed.
The SPECTRA interface attempts to replicate the snow effect but does not do so
accurately. This is because it contains static RAM and not dynamic RAM as used
inside the Spectrum, and the method of accessing this type of memory is sufficiently
different. Therefore the ‘snow’ produced by the SPECTRA interface is not identical to
that produced in the standard TV picture. Note that ‘snow’ can occur in any of the
attribute modes, and not just the standard one.
The cause of the snow effect is described in detail in The ZX Spectrum ULA book [1].