Repository navigation
Tape Tests
By Brendan Alford (brendan.alford@gmail.com)
Original version by Dylan Smith.
These tests are based on the ROM based diagnostics and are intended to assist in diagnosing memory problems that may manifest themselves but where the Spectrum itself is partially working (for example, minor screen corruption, ability to run 16K games only etc), and where a device allowing the Spectrum ROM to be replaced or paged out is not available.
They are provided in .TAP file format to be loaded directly via an app like TapDancer, Speccy Tape, Tapir etc., or for use with a DivMMC or similar device. The TAP image can be found in the release package, in the TestTape folder.
Load the provided 'testram.tap' tape image to the machine via whatever means available (audio from PC/Phone, real tape, DivMMC etc).
The first thing the program does is to perform a checksum on the test image. This is to verify that any faulty RAM in the memory region between 25000-32767 that the test program occupies cannot affect the results of the testing.
If this checksum does not match, then the program will immediately return to BASIC with a '4 Out of memory' error. This indicates an unspecified failure in Lower RAM, further guidance should be sought at this point as the diagnostics cannot run to isolate the faulty memory IC's.
Assuming the checksum passes, the firmware will then execute some limited memory tests on the lower 16K of RAM not occupied by the tester before proceesing further.
As the lower RAM of a Spectrum is used for display, we cannot assume that the machine can produce a correct display nor rely on it for output. Therefore lower RAM testing will produce some test patterns on the display that exercise the RAM in various ways, and if a failure is found, will report the result by way of a series of stripes in the border.
There will be eight of these stripes, representing bits 0 to 7 in downward order. These correspond to memory IC's IC6 to IC13 (which are 4116 IC's) in that order. A green stripe indicates a healthy IC, and a red one that a fault was encountered. The computer will then halt.

NOTE 1: If testing a 128K machine, these tests will by default exercise page 5 of RAM. In this case, the memory IC's corresponding to bits 0-7 are as follows:
| Bit | IC (128K) | IC (+2) | IC (+2A/+3) |
|---|---|---|---|
| 0 | IC6 | IC32 | IC3 |
| 1 | IC7 | IC31 | IC3 |
| 2 | IC8 | IC30 | IC3 |
| 3 | IC9 | IC29 | IC3 |
| 4 | IC10 | IC28 | IC4 |
| 5 | IC11 | IC27 | IC4 |
| 6 | IC12 | IC26 | IC4 |
| 7 | IC13 | IC25 | IC4 |
NOTE 2: If testing an Issue 1 Spectrum, the lower RAM IC's do not have IC designations on the PCB, nor are they in the same layout as in later issues. The layout is as follows:

If the lower RAM tests pass, then we have usable RAM in which to produce a display and store some workspace. The machine will then clear to a white screen where results of further tests will be displayed.
At this point the user will be prompted as to whether or not they wish to run in soak test more (more in the appropriate section).
If the ROM is corrupt in some way, then this test will fail with the message 'Unknown or corrupt ROM' and the user will be prompted to select the type of machine being tested.
The upper 32K of memory is then tested using the same test routines that were used for the lower 16K. Any failures for a particular test are noted, and the IC's responsible for the failure are displayed.
If the machine has been identified via the ROM check as a clone, then the failing bit positions are displayed instead.
If all 8 upper RAM IC's are found to be faulty, the machine is either a 16K model or has a problem with the upper RAM multiplexer IC's. Information to this effect will be displayed if this occurs.

Note: If testing an Issue 1 with Sinclair 32K daughterboard, this board again has no IC designations. The diagnostics will identify IC15-IC22 as being faulty, representing bits 0-7 in the same order. These bits map to the physical IC's on the daughterboard as marked below:

All memory banks are tested in turn by paging them in to the C000-FFFF address range, except bank 5 which represents the lower 16K of memory on 128K machines. Failures are noted against each bank, and again the IC's responsible for failure are displayed when testing is concluded.
Memory paging is also tested and is flagged if a failure is detected. This is almost always due to a misdetection of a 48K machine as a 128K, or an issue with the PAL/HAL/ULA IC's, depending on model.
When testing is complete, the program will then display the results of the tests then will halt.
If a failure is detected, pressing H if a ZX Printer or compatible unit is connected will produce a hard copy of the screen contents. A warning tone will be emitted if such a device is not connected or working.
Returning to BASIC is not possible as the BASIC system variables will have been overwritten by the various test patterns - bear this in mind before arbitrarily loading the test program while in the middle of other work!
As stated earlier, when the lower RAM tests pass the user is prompted as to whether or not to run in soak test mode. Should this be selected (by pressing 'Y'), this will perform repeated memory testing, looping back to the start after each successful test. This is intended to shake out intermittent memory problems.
Soak test mode is indicated by a message 'Soak test running, iteration xxxxx'. This may be used as a guide to how long soak testing has been running for.
All tests are executed identically and in the same order as in normal test mode.
Following each successful test iteration, the test program commences the next test iteration after a short delay.

A failure detected during soak testing will halt testing (except where no upper memory is found working; this will be the case if testing a 16K Spectrum).
If the ROM checksum test fails (and therefore the machine type cannot be determined), the firmware assumes 48K hardware and continues testing as such.
The memory tests are identical to those executed by the ROM based tests, and are more thoroughly described in the appropriate section here.
Due to space limitations and the desire to test as much of the lower 16K as available, only the Random fill test is performed on the available lower 16K between 16384 and 24999.
Firmware | Tape Tests | Spectranet | Flash Utility | ROM Check | How to Build | Hardware | FAQ | Home