Spectrum 48K RAM Tester
This ROM is designed to be dropped into a 48K Spectrum in place of the
Sinclair ROM, or into a Multiface 128 in place of the standard ROM, and
will run a simple test of the RAM. If it discovers any faulty memory,
it will report the address at which the fault was detected, then test
each bit at that address. This
information can then be used to determine which physical RAM chip needs
replacing.
The advantage of this ROM over Ian Gledhill's "TestSpec" ROM is that it
presents human-readable output.
There is only one version of the code, but I have made various sized
ROM images for blowing directly into suitably-sized EPROMs:
8K ROM image for the Multiface
16K ROM image for 48K/16K Spectra
32K ROM image for 128K Spectra.
Source Assembler
Note that it only really works properly on a 48K computer. It will work
on a 128K Speccy, but it will not test the additional RAM pages. On a
16K Speccy, it will probably report a memory fault at 8000h on the
first pass, so will not properly test all the 16K of RAM.
What it Does
It has three phases:
Phase 1: a brief test of the
screen memory (the first 6912 bytes of RAM). If it finds a fault in
this part
of the memory, it will set the border red and stop. If your eyes a
sharp, you may be able to spot where the error is by looking at the bit
patterns on the screen, or if an attribute is wrong.
Phase 2: if the screen memory
tests OK, then it moves the stack into this area,
initialises the display and begins testing the remainder of the memory.
It does this by writing a byte to each memory location in turn, then
reading it back. If the read byte is different from that written, this
indicates a fault: the address is reported on the screen, and the
program moves on to Phase 3. On the first pass, the byte 10101010 in
binary is
written to every location. The second pass uses byte 01010101 binary,
the third pass uses 10101010 again and so on. A total of ten passes are
made, so each bit is toggled at least nine times. If after ten passes
no faults were found, the program tells you this,
and halts.
Phase 3: if a faulty memory
location is found, then a "walking bit" test is performed at the faulty
address. Each bit is set to 1 in turn, with all the other bits set to
0, and the byte is read back. So, first the byte 00000001 is written
and read back, then 00000010 is written, then 00000100 and so on. Both
the written and read byte are reported on the screen. Using this
information, it should be possible to establish which IC needs
replacing.
Only the first fault found is reported. The idea being that you change
that chip, and re-run the test to find any remaining faulty chips.
Example Screenshot
Here is what you would see if one of the upper 32k RAM chips were
faulty (.scr file):
As you can see, the fault was detected at address 32768, the first
address of the upper 32k RAM, and the second bit is "stuck" on 1,
regardless of the value written. If this were a 48K spectrum, then this
would probably mean IC21 is broken.
Last Updated 11th September 2006
Tim Fardell