Skip to content


Tag: Repair

Here are scans of my Commodore Service Bulletins by RCA Service Company.





I have repaired a fair amount of drives, and every time I find myself loading a test or a diagnostic software from disk. This is a bit of a contradiction since the drive being tested, or repaired, might not even be able to load a program. I also have a variety of tools for different purposes and wanted to have everything in one place.


This is why i created a 1541 Diagnostic Cartridge.


The challenge was to get all these tools to fit into a 8K cart. I wanted to keep the hardware simple and a 16K cart would have overwritten the Basic interpreter.

Therefor I have optimized both code and visual on the tools to keep the size down. Some tools are old, others were written from scratch and a few I rewrote in machine code instead of basic. A couple of the tools are still in Basic, but optimized.

The cartridge is an 8K ROM at $8000-$9FFF

You can also use RESTORE to return to the menu.

You may need to send a “I0:” or turn the drive off/on before running further tests if an previous error has occurred.


Update 2017.09: The Cartridge is also available at the Protovision shop.
Update 2015.12: Upon request from their customers, The Shareware PLUS Commodore 64 & 128 Blog asked me if they could offer the 1541 diagnostic cartridge in their product sortiment. The 1541 Diagnostic Cartridge is now available in their eBay shop.



I had a broken 1571 on which I located the problem to the powersupply.

The PSU is relatively easy to refurbish with new caps and so forth, but I wanted to try out a switching powersupply i had.

The new powersupply is a MeanWell PT-65A and is rated 5VDC/7A and 12VDC/3,2A. It also has a -5VDC/0.7A output which was not used. This specific model was on a €4 sale at a electronics distributor and the current ratings were good, hence the selection.





1571 with original powersupply.



Mounting plate.




A very tight fit, I had to make a cut on the left side.
The PCB is mounted on spacers and the cables were crimped.


Finished assembly.







This post spawned out of a discussion at a facebook group Thanks to Jonny Hylander, Fredric QJ Blåholtz and Krister Andersson for ideas and suggestions.

Update 2016-07-20 : Thanks to Marty/Radwar for sending me a huge list of different kernal checksums. The diag586220+ v0.4 is able to identify a staggering 49 different kernals, for example Professional Dos, RapiDos, DolphinDos and Speeddos. Download the v0.4 sourcecode for a full list.

Update 2016-11 : KiWi at sent me a version that now works correctly on the SX-64. Scroll down for the download and sourcecode. See his page here.

Update 2017-04 : Added a standalone ROM Checksum program with diag586220+ v0.5 tables.



The diagnostic 586220 does a checksum on the kernal ROM to verify if it is ok. It will only identify the original CBM ROMs. All other (even good, for example JiffyDos) kernals will be marked as “BAD”.

The 586220 was used since i have done an reassembly/disassembly of it earlier.

Code to calculate the checksum.

Depending on $FF80(Kernel revision) the checksum is either $E0 or $E1. This determines if Kernal is marked as “OK” or “BAD” by the diagnostic test.

I remembered that the C128 diagnostic cart displays the checksum. When running the C128 diagnostic(789010) the checksum on the C64 Kernal is reported as $D4. After investigating the code, which is identical to the one above except for the fact that only $1F00 of memory is checked. This is probably a mistake since the kernal is 8K ($2000 bytes).

We shared ideas about how this would be accomplished, but also noticed that some of the different kernals generated the same checksum. This might be deliberate for them to pass a diagnostic test.


All code below is compatible with 64tass (i.e. Turbo Assembler compatible).

The new checksum routine. To make a distinction, the address lowbyte is xor:ed and therefor not resulting in an identical checksum.



…I made a program that can identify the kernal ROM.


A table is used for the checksum and a pointer(.word) to the matching ROM name. You can easily add new checksums and ROMs to the code.




Incorporate the checksum with Diagnostic 586220
The goal is to replace the original checksum routine with the code above.

As we can see in the disassembly, the routine for ROM tests are at $890E. Further investigations reveal that code between $890E and $8A44 can be replaced. This area also has the routines to check BASIC and CHARACTER ROM.


Checksum routine is located a few lines below $8926.

After inserting the code, you can now assemble(compile) the code with c64tass. I won’t go into details about the code itself, but it is presented and downloadable further down on the page.


The output file (.o64) can now be written to an eprom. Skip the two first bytes (0x00, 0x80) which is the loadingadress of the file.

You can also test the cart in vice by converting it to a crt. Cartconv.exe is included with the Vice emulator.


586220+ diagnostic, it is now possible to identify the kernal ROM.



Download package with the sourcecode for diag586220+ and original disassembly of the 586220 diagnostic. Compare these two files to see how the implementation was made.


Download package for diag586220+ v0.4 by Marty / Radwar. It identifies 49 different kernals.


Download package for diag586220+ v0.5 by KiWi / Fixes an issue with SX-64.


Standalone ROM Checksum program with diag586220+ v0.5 tables



The new checksum code.

Checksums for BASIC and CHAR are also displayed.



Replacing a 2364 ROM with a 2764 EPROM requires an adapter. You can use a 2364 to 27128 adapter to be able to switch between two different ROMs (ex: cbm original and a floppy speeder kernal).


2364 to 2764 adapter



2364 to 27128 adapter

2364 to 27128

R1 = 4.7k ohm
J1 = Switch


Diagnostic cartridges for the Commodore 64 / 128.

A bunch of diagnostic carts. Some of the material below is from the web and some of them are from my own collection.

You will probably be fine with the C64 Dead Test (Rev 781220) and C64 Diagnostic Kit 326070-1 (Rev 586220/588220) for the C64. Use the C64 Dead Test if you got a blank(black) screen, it will flash the border according to which RAM circuit is broken.

If you got a C128 with a blank(blank) screen you can use the C64 Dead Test to find faulty (low) memory. When the C64 side is working, use the C128 Diagnostics to verify the upper memory. It is also possible to rewire the high and low memory and then give the C64 Dead Test a second run. C128 Diagnostic Carts use the same harness as the C64 Rev.586220 (326070-01) but with a different keyboard adapter.

Testing in VICE
You can test the carts in vice:
C64: x64.exe -cartcrt [cartname].crt
C128: x128.exe -extfunc -extfrom [romname].bin

Additional credits:
Peter Schepers, Nicolas Welte, DLH’s Commodore Archive, SLC, Zoran

2015-01: Added disassembly of the C-64 Diagnostic Rev 4.1.0. This was a bit tricky to disassemble(reassemble) as it crossreferences code between $8000/$1000.
2014-11: I have now included both C128 and C128D keyboard connector schematics for Rev.785260 to avoid misunderstandings. There are also some notes about the connector at position 1.4.8 in the manual.
2015-01: Added C-64 Diagnostic (Box) (324528-02). Thanks to SLC and Zoran.
2015-01: Added C-128 DCR Integral Diag 1.0 and C-128 Diag Rev.588121. Thanks to Zoran.
2015-01: Thanks to Boulderdash for the info about the C128 Serial Adapter.
2015-10: On request, I made a disassembly of the C64 Diag 781220 deadtest.
2016-11: Added Rossmöller / Roßmöller Doctor64 diagnostic. Thanks to DOC64 and Sierohpätsch.


Don’t miss the updated Diagnostic 586220+ with kernel detection and other fixes.



C-64 Dead Test Kit (CBM 314139-03)

dead test
Rev. 781220. Located at $E000 in memory(ultimax) and boots before kernal ROM.

Cartridge ROM: C64 Dead Test Rev 781220 Diagnostic Cartridge (314139-01)
Manual: C64 Dead Test Diagnostic Manual (314139-02)



C-64 Diagnostic Assembly Kit (CBM 326070-01)


Rev. 586220 (c64)  and 588220 (sx64)

Located at $8000 in memory and requires a harness (some tests work without the harness).
Note: There are atleast 3 variations of the schematic on the net, two of them are missing an interconnected wire in the casetteport.

Cartridge ROM: C64 Diagnostic Rev 586220/588220 Cartridge (314061-01)
Manual: C64 Diagnostic Instruction and Troubleshooting Manual (314061-05)
Harness Schematic: C64 Diagnostic Harness Schematic (314061-02/03/04)

I disassembled the cartridge for studying purposes. It can be compiled(assembled) with 64tass.



C-64 Diagnostic Rev 4.1.0


Located at $8000- in memory and uses same harness as Rev. 586220(326070-01).

Cartridge ROM: C-64 Diagnostic Rev 4.1.0 Cartridge Image

I disassembled the cartridge for studying purposes. It can be compiled(assembled) with 64tass.



C-64 Diagnostic (Box) (CBM 324517-02)

Located at $8000- in memory and uses its own harness. See also Roßmöller Doctor64 below.
Cartridge ROM: Prog. for Diagnostic Box (324528-02)

Roßmöller Doctor64

Located at $8000- in memory and uses same harness as Diagnostic Box (324528-02).
The Roßmöller will give a false “Interrupt BAD” on C64C models. Interesting is that the Diagnostic Box (324528-02), which can be found on a Commodore spare parts list, has identical check routines as Doctor64 except for the Interrupt part.



C-128 Diagnostic Rev. 588121

Rev. 588121
Uses the same harness as the C64 Rev.586220 (326070-01).



C-128 Diagnostic Assembly Kit (314060-01)


Rev. 785260
Uses the same harness as the C64 Rev.586220 (326070-01).

Cartridge ROM: C128/128D Diagnostic Rev 785260 Cartridge (314061-06)
Manual: C128 Diagnostic Instruction and Troubleshooting Manual (314061-09)
C128 Diagnostic Keyboard Adapter (314061-07).
C128D Diagnostic Keyboard Adapter (314987-01).
Note: C128 Serial Port Connector has Pins 1 and 5 connected.



C-128 Diagnostic Rev. 789010


Rev. 789010
Uses the same harness as the C64 Rev.586220 (326070-01).



C-128 Diagnostic Rev 1.1 and 1.4 (325099-01)

C-128 Diagnostic Rev 1.x Uses its own Cart and harness.



C-128 DCR Integral Diag 1.0 (325109-01)

Cartridge ROM: C-128 DCR Integral Diag 1.0 ROM (325109-10)



A machine displaying less than 38911 free bytes or “?Out of memory error in 0” is often an indication of malfunctioning RAM. If several RAM-chips are broken, or shorted, you will be greeted with a blank(black) screen.

Free basic memory is verified when the computer boots up. It starts checking the memory from location 2049($0801) and goes upwards. If you get “3 bytes free”, it indicates a problem at address position 2049+3=2052($0804).

Even if RAM-chips are failing, it does not mean that every byte has a failing bit, this is why you need to test a larger area of memory. In the example above, 3 bytes passed the test.

Many fastload cartridges(The Final Cartridge or Action Replay etc.) skip the RAM-test to speed up the boot sequence. These will always display “38911 Basic Bytes free” regardless of RAM status.

Broken RAM is usually a sign of a bad powersupply. The components inside the PSU deteriorates and therefor delivers higher voltage than it should. RAM circuits are sensitive to overvoltage and are often the first to go.

Failed RAM can get very hot(burn-your-fingers-hot) and is easy to find, but that is not always the case. Some machines can even have broken memory that are a mix of “hot and cold” chips.

Depending on the C64 motherboard revision, you either have 2 or 8 RAM-chips. For the C128 it is 4 or  16 chips.
C64: 2 x 41464 (64kbit x 4) / 8 x 4164 (64kbit x 1)
C128: 4  x 41464 (64kbit x 4) / 16 x 4164 (64kbit x 1)

Replacing two chips is not that much of a work, but with 8 or 16 chips you want to know which one(s) are broken.

C64s with 8 memory chips also have two multiplexers; MOS7708(identical to 74257) located at U13 and U25. It is more seldom these fail but they should not be neglected.


There are a couple of ways finding failing RAM:


1. Piggybacking.
You insert a known working chip on top of a chip on the PCB. All legs must have good contact, bend the legs slightly inwards on the piggyback chip and work your way through all RAM. You can piggyback several IC;s, just make sure your equipment is powered off and that your PSU is working properly(so it won’t burn even more RAM). If the amount of free RAM changes when turning on the computer, replace that RAM-chip.



2. Calculating BITS

Each BIT on every BYTE is handled by a RAM-chip. Depending on which BIT is malfunctioning, you can determine which RAM-chip is broken.

Test every memoryposition with the byte combinations in TABLE 1. After that use TABLE 2 to determine which chip has failed. Remember that bit 0 is the rightmost and bit 7 is the leftmost bit.

The behavior of the “wrong bits” are because the broken RAM-chip either keep a data line high or low when it shouldn’t.

A couple of ways to figure out which bit is failing:

Visually check bytes on the screen
Inspect the start-up screen(or whats left of it). It is normally mostly filled with “space”-character (hex 0x20). If there are other chars than space, for example “!”-character (hex 0x21) you can determine that there is a failing RAM that handles bit 0, another example is a “%”-character (hex 0x25) indicating that bits 0 and 2 are failing in that specific memory location.

Action Replay monitor (or any other cart)
Use a machine code monitor to fill the memory and find the differing bytes.

Use basic routines POKE and PEEK
In the first example, with problems at address 2052($0804), use the following command: “POKE 2052,x : PRINT PEEK (2052)” where x is from TABLE 1. The result in and out should be the same, if not, take the differing bits and check with TABLE 2.

TABLE 1 – test bytes

binary hex dec binary hex dec
00000000 $00 000 11111111 $FF 255
00000001 $01 001 11111110 $FE 254
00000010 $02 002 11111101 $FD 253
00000100 $04 004 11111011 $FB 251
00001000 $08 008 11110111 $F7 247
00010000 $10 016 11101111 $EF 239
00100000 $20 032 11011111 $DF 223
01000000 $40 064 10111111 $BF 191
10000000 $80 128 01111111 $7F 127
10101010 $AA 170 01010101 $55 085

TABLE 2 – bits vs chips

BIT C64A,B C64B3 C64E C128,C128D C128DCR
0 U21 U10 U10 U38/U46 U38/U40
1 U9 U10 U10 U39/U47 U38/U40
2 U22 U10 U10 U40/U48 U38/U40
3 U10 U10 U10 U41/D49 U38/U40
4 U23 U9 U11 U42/U50 U39/U41
5 U11 U9 U11 U43/U51 U39/U41
6 U24 U9 U11 U44/U52 U39/U41
7 U12 U9 U11 U45/U53 U39/U41



3. Use a diagnostic program or cart
There are several diagnostic programs that test the memory for you. The Commodore diagnostic cartridges “C64 Dead Test Rev.781220” and “Diagnostic Rev.586220” are both good for this.

The “C64 Dead Test Rev.781220” cartridge is able to find broken RAM even with a blank(black) screen. It flashes the screen according to which bit fails. This one will save you a lot of time and work 🙂

Both cartridges are available at the Diagnostic Carts and Manuals page.
If you are interested to see how the memory is verified, there is also a disassembly of the Diagnostic Rev.586220 cartridge.