hosted by

PET/CBM Diagnostic Clip
Some time ago, I have found out, that there was a diagnostic clip for the PET and CBM computers. Since diagnostics is actually my favorite Commodore topic, I have searched the internet about what I could find out about it.

The clip is a little box, which contains some test software and address decoding for the EPROM, that is holding the software. It connects to a test clip, which then fits on the 6502 CPU of the PET/CBM.

As I have mentioned in the page about the
2332 EPROM adapter, there is this signal "/NOROM". When this gets low, all ROMs (except the character generator ROM) are switched of. The test software can be found at address $Fxxx (that is, where usually the kernal is located) and it is executed on startup.

The /NOROM signal switches off all ROMs, in case it is LOW.

The /NOROM signal is connected to the CPU, Pin 5, wich is an "n.c." (usually unused) pin. It is internally not connected to the CPU chip. It can be switched by the diagnostic clip, though! And that does the trick of executing the code on the diagnostic EPROM instead of the kernal on start-up. (Note: It is further connected to Pin 20 of the memory expansion connector J4.)

/NOROM at Pin5 of the CPU

There are two different clips for the PET and the CBM that I have found schematics for.

I have tried to combine both version to my own schematics.
The EPROM is a 27C512 (or 27C64, 27C128, 27C512). I did not use a 74LS138 for the chip selects, but two NAND gates with four inputs each, because I did not use two EPROMs, it only requires one chip select signal. The diagnostic software can be selected with a DIP-Switch. The switch no. 5 is activating/deactivating the clip.

The resulting PCBs: User port dongle, keyboard dongle, CPU ribbon cable adapter, test clip PCB (all board Rev. 0)

Of course, a 3D-printed case is helpful to prevent any short circuit, when placing the clip PCB inside the computer.

The diagnostic PCBs with cases and labels. The diagnostic clip is Rev. 1

The diagnostic clip and the CPU adapter installed in a CBM8032

The test clip for a DIP40 IC is pretty expensive (around US$50), so I have also made an adapter boartd for the CPU. This fits between the IC and teh socket on teh main board. It allows to connect a ribbon cable, which is a way cheaper solution. Also, the CPU is usually on a socket.

Test Results - Page 1

After switching on and the CRT warming up, the first test results are visible. This is the test of the character ROM, the video RAM, the zero page and the stack page. Not very spectacular. And that was all I could get. Was ist worth the hassle to develop the clip? I was not sure and thought of dumping the project or writing my own test software.

I went through the disassembly of the EPROM content and saw, that the programming is pretty special. No subroutines were used, because that would require a healthy stack, which is not proved in the beginning. Also the dispalyed texts were stores as screen codes (not ASCII), because it does not use any kernal subroutines (there is no real kernal at this moment of the test, it is switched off with /NORAM = LOW).

The other day, I have then done, what is requested. I have "removed" the clip. It cannot physically be removed, because it is no clip, but it can be switched off with the DIP-switch. And wow! Something happened. It said "no irq". Ok... but I didn't have the user port dongle and the keyboard dongle installed,. yet. Which I then did. And...

Test Results - Page 2

The 2nd page appeared. All in a sudden, the development made sense to me. Switching off the clip is even easier than pulling off a test clip.

There is still a test failed (SRQ bad). I need to find out more. My IEEE port work (I am pretty sure). Must be something on the user port dongle or the user port (which contains the tested IEEE signals).

Meanwhile, the user port is tested good. The IEEE-488 interface is aparently working with a FDD or printer. There might be something bad on the interconnect or the user port dongle.

After this, I have also found hints in "
Testing the PET Computer" and especially in the "Commodore Training_40xx_80xx_Service Manual" on Carsten's great website (where you can find high quality scans of manuals and tech docs.

Page 33ff:

Die Diagnostic-Box ist ein Testgerät, mit dem die wichtigsten Komponenten auf der Logic-Platine der Zentraleinheiten getestet und ein hoher Prozentsatz der Fehler gefunden werden kann.

Die Tastatur selbst und das Video-Board wird nicht überprüft. Für jede Zentraleinheit gibt es eine spezielle Diagnostic-Box

Anschluß und Starten des Testprogramms:
Zur Diagnostic-Box gehören zwei Diagnostic-Stecker, einer für den User-Port und einer für die Tastatur. An der Box befindet sich ein 40-poliges Flachbandkabel mit einem IC-Clip.

Dieser Clip wird auf den Prozessor gesteckt und die beiden Diagnostic-Stecker kommen an die entsprechenden Positionen.

Wenn die rote LED leuchtet, kann das Diagnose-Programm durch drücken der roten Taste (Reset) gestartet werden.

Auf dem Bildschirm wird nun angezeigt welcher Test gerade läuft, ob er fehlerfrei durchläuft, oder was für Fehler erkannt wurden. Wird ein Fehler erkannt, stoppt das Testprogramm. Treten keine Fehler auf, werden die Tests laufend wiederholt."

Translated to English:
The Diagnostic-Box is a test device with which the most important components on the logic board of the central units are tested and a high percentage of errors can be found.

The keyboard itself and the video board are not checked. There is a special diagnostic box for each computer.

Connection and start of the test program:
The Diagnostic Box includes two diagnostic plugs, one for the User port and one for the keyboard. There is a 40-pin ribbon cable with an IC clip attached to the box
This clip is put on the processor and the two diagnostic plugs are connected to the appropriate positions/connectors.

When the red LED lights up, the diagnostic program can be started by pressing the red button (Reset). The screen now shows which test is currently running and whether it is passed or failed, or what kind of errors were detected. If an error is detected, the test program stops. if there are no fails, the tests are repeated continuously."

Nach Betätigung der Reset-Taste wird der CRT-Controller initialisiert und der CBM-Zeichensatz in den oberen Teil des Bildschirms geschrieben womit festgestellt wird ob es überhaupt möglich ist Daten auf den Bildschirm zu schreiben.

Nun wird Zero-Page und Stack getestet. Treten hier Fehler auf wird entweder ein RAM als defekt angezeigt oder eine Adressleitung.

Eine genaue Erkennung des Fehlers ist aber in manchen Fällen nicht möglich, sodaß zum Teil unrichtige Fehlermeldungen ausgegeben werden. Um den Fehler zu lokalisieren kann man die CAS-Leitungen an den RAM's vertauschen und den Test neu starten. Wird wieder eine Fehlermeldung ausgegeben, so liegt der Fehler wahrscheinlich nicht an den RAM', sondern an der Ansteuerung(Adressleitungen, Refresh, RAS, CAS,RAM R/W, MUX A).

Ist Zero-Page und Stack in Ordnung wird ein Testprogramm in den RAM-Bereich geschrieben und die Aufforderung REMOVE CLIP erscheint auf
dem Bildschirm.

Wird nun die Diagnostic-Box vom Prozessor entfernt, werden von dem in der Zero-Page befindlichen Testprogramm die weiteren Teile des Systens getestet. Die ausgegebenen Fehlermeldungen sind im allgemeinen zuverlässig."

"Test description
After pressing the reset button, the CRT controller is initialized and the CBM character set is displayed on the upper part of the screen, which determines whether it is even possible to write data on the screen.

Now the zero-page and stack are tested. If errors occur here, either a RAM is displayed as defective or an address line.

In some cases, however, an exact detection of the error is not possible, so that in some cases incorrect error messages are output. To localize the error, you can swap the CAS lines on the RAM's and restart the test. If an error message is output again, the error is probably not due to the RAM, but to the control (address lines, refresh, RAS, CAS, RAM R / W, MUX A).

If the zero page and stack are OK, a test program is written to the RAM area and the REMOVE CLIP request appears the screen.

If the diagnostic box is now removed from the processor, the other parts of the system are tested by the test program in the zero page. The error messages issued are generally reliable. "

Ok, now it is obviouzs, that removing (or deactibvating) the clip is requires to complete the test. Now, the 2nd page of the test results appears. It also says, that the etst software was written to the zero page previously.

CHKSM TEST: Um zu überprüfen, ob das Testprogramm richtig in die Zero-Page geladen wurde, wird eine Prüfsumme gebildet die 00 ergeben muß.

VIDEO RAM TEST: Es werden in jede Bildschirmadresse Daten geschrieben wieder gelesen und verglichen

32K RAM TEST: Es wird der gesamte RAM-Speicher ausser Zero-Page und Stack getestet

ROM TEST: Es werden Prüfsummen von jedem ROM gebildet (siehe Liste der Prüfsummen)

RFRSH TEST: Es werden Daten in die RAM's geschrieben, eine zeitlang gewartet und die Daten wieder ausgelesen. So wird überprüft, ob der Refresh in Ordnung ist.

KEYBOARD TEST: Es wird die Funktion des Decoders und des PIA überprüft

50 HZ IRQ TEST:Es wird getestet, ob von dem Signal Vert Drive über den PIA Interrupts erzeugt werden.

TMR1/2 TEST: Es werden die beiden TIMER des VIA getestet

CASS1/2 TEST: Es werden die beiden Cassetten-Ports getestet Beim Lesen werden Interrupts erzeugt COTA_PIR)

IEEE Tests:
Es werden Daten und Steuersignale getestet. Die IEEE-Buffer werden mitgetestet

CHKSM TEST: In order to check whether the test program has been loaded correctly into the zero page, a checksum is formed which must result 00.

VIDEO RAM TEST: Data is written to each screen address, read back and compared

32K RAM TEST: The entire RAM memory except for the zero page and stack is tested

ROM TEST: Checksums are generated from each ROM (see list of checksums)

RFRSH TEST: Data is written to the RAMs, waited for a while and the data is read out again. This checks whether the refresh is OK.

KEYBOARD TEST: The function of the decoder and the PIA is checked

50 HZ IRQ TEST: It is tested whether interrupts are generated by the signal Vert Drive via the PIA.

TMR1 / 2 TEST: The two TIMERS of the VIA are tested

CASS1 / 2 TEST: The two cassette ports are tested When reading, interrupts are generated COTA_PIR)

IEEE Tests: Data and control signals are tested. The IEEE buffers are also tested

I have made a redesign of the clip PCB (which is now Rev. 1). The reasons:
1. There was a short circuit on the PCB, which did not show up at my first tests, but when I wanted to use different EPROM types
2. The activation and removal (switching off) of the clip is more important than I thought, so I added a dedicated switch on the PCB. For operating it in the case, the external switch is most practical.

Diagnostic clip Rev. 1 with external switch - open.

Further, I have tested different software versions, that I have found. One is v1.1 for the 80 column computers (8032 and 80col 40xx). The other is v2.0 for the 40 column (40xx, 30xx) computers. I have tested those on VICE (only the first half, since I don't know, hot to mimic the dongles in VICE).

I suppose, this is as far as I can test it. I don't own any other PET/CBM computers than the 8032.