Wang 600 Diagnosis
Next Log Entry
Custom Microcode breaks down the problem of diagnosis
With the ROM repaired so far as possible and a 2K microcode image loaded into the the ROM emulator, it was easy to try Power On - PRIME. Unfortunately, nothing, completely blank display, no flashes or flickers and no other signs of life.
All machine function is mediated by microcode execution, so any and all faults that stop complete and correct microcode execution will most likely have the same symptom of dead machine. This makes fault-finding difficult because after checking basics like power supply and ROM, the next step is to fully instrument the machine and trace microcode execution, instruction by instruction, to find the point at which failure occurs. A long, slow process that requires every instruction to be fully understood and the correctness of its execution to be judged.
Custom Diagnostic Microcode
The ROM emulator transforms this problem by allowing the use of small carefully-crafted microcode routines that exercise and/or test well-defined parts of the machine in ways that are easier to monitor and verify. My collaborator Doug Miller appled his microcode wizardry to produce a series of codes to help diagnose this dead machine, and indeed any other.
The first codes were two types of RAM test. The calculator microcode holds most machine state and internal variables in RAM, so RAM faults will cause the calculator microcode to fail.
RAM Read Test
This 8-instruction code reads 4-bit values from RAM addresses FF0-FFF and sends the 16 values to the 16 columns of the display. This is done in a never-ending loop so as to provide a visible, constantly refreshing display. Columns 0 and 13 can show only +,- and blank while column 12 is hardwired as blank. Nevertheless, this code provides a simple way to demonstrate some RAM and display function.
The all-zero display shows that the microcode engine is executing the never-ending loop and generating the timing loops required for the display to function. The all-zero display is possible if the RAM contains all-zeros. It is however a bit suspicious as one would expect that after power-up the RAM would contain random values. Perhaps the all-zero data is the result of dead RAM or other hardware failure.
RAM Write-Read Test
This much more sophisticated 45-instruction code writes a test pattern to the entire RAM and then reads it back, comparing the returned data to the expected pattern and displaying an error indication if the data does not match.
Running the test as indended, by pressing PRIME to execute from location zero, caused an immediate display of error code 1 display at location zero.
This suggests that location zero returned an incorrect value of 1 when 0 was expected
As an experiment, this code was launched with the Set PC, Verify Prog and Record Prog keys. These keys launch the code from incorrect starting addresses of 2,1 and 3 respectively.
Set PC and Verify Prog produced different non-zero displays with every press. The display is generated from data stored in RAM so the display of non-zero values suggests that the RAM is able to store and return data, at least from the addresses used for display.
Record Prog produced no response at all. This key (together with Prime, Set PC and Verify Prog) works by forcing a hardware restart from a dedicated address. The lack of response suggests that the key or its associated logic may be broken.
RAM Keycode Test
The tests above are not conclusive regarding RAM function. To test further, an 11-instruction code was used that displayed RAM locations FF0-FFF while monitoring the keyboard. When a key was pressed the 8-bit keycode was placed into the two 4-bit locations FF0 and FF1, causing the keycode to be displayed in the two leftmost digits of the display.
The display was all-zero, with no response to the keyboard. This is consistent with bad RAM, or a keyboard/keyboard processing failure.
Testing Set PC and Verify Prog gave the same result as above, consistent with this small code being able to run adequately from these inappropriate entry points.
Record Prog produced no response at all, suggesting again that the key or its associated logic may be broken.
Keyboard Test
The Keycode test above is extended to count the number of keypresses and also monitor and return the status of most of the function select switches. Interestingly, this considerable increase in function only increased the instruction count to 16, from 11 in the basic test above.
The extended test showed that the basic function of the execution engine was OK, since it was able to generate a display are correctly report certain key actions. The results were:
- no keycode display
- no increment of keypress count
- Run, Learn, Learn and Print, List Program and Fl/Sci are reported correctly
- Deg/Rad and Printer On are not reported
- Record Prog not generating any response
Referring to the schematics, the keys that are reported by this code are all connected with direct input to the hardware. The keys that are not reported are all part of the main keyboard matrix and this suggested that the enabling or reading of that matrix may be at fault
Summary of Microcode Diagnosis
The keyboard is likely faulty in respect of Record Prog and the main key matrix
RAM is OK in at least some parts, but some suspicion remains
Previous Log Entry Back to Log Index Next Log Entry