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.

Occasionally I get questions about alignment and aligning the drive. There are some differences of opinion how to align a diskdrive, my personal view, and how I do it, is to use a special analogue disk and a dual trace oscilloscope. The analogue disk is a factory produced disk and has patterns written on specific tracks. An analogue alignment disk can not be duplicated.

1541 Diagnostic Cartridge Alignment Check. This program was distributed with a computer magazine and gives a quick drive alignment health instead of hooking up an oscilloscope. The program was completely disassembled, compacted (code and texts) and disk routines rewritten to share I/O routines just to fit onto the cart with the other tools.

The Alignment check program can (I, however, do not recommend doing it this way) be used to adjust the alignment but it will only be as accurate as the drive, or system, the disk was written with.

The two first columns should be identical, otherwise the alignment is off by a whole track(or more), most often this indicates an incorrectly positioned head stop. The third column indicates how well the drive can read data off each track, its alignment, and should be 100%, or atleast very close to. Fourth column is between tracks (or half tracks), this value can fluctuate a bit even on a well aligned drive. The 1541 allows for some tolerance and therefore some values can be within reasonable limits.

It is very seldom when you actually need to align a drive for proper functionality. If the drive works in daily usage and does not make noise or do continious re-reads or searches it is probably ok. If a drive fails to read disks, begin with cleaning the head and lubricate the rails. If this does not help, the R/W head might be damaged, quite often seen on the Mitsumi D500 mechanism. You can verify it by measuring the R/W head using an ohm-meter. Remember that a slightly misaligned drive is probably able to format and read its own formatted disk.

Most important, if it works, don’t fix it 😉

Recommended reading : Commodore Diskette Diagnostic Manual Version 2 (3140451-01) and Commodore 1541 Troubleshooting & Repair Guide (SAMS)


Update 2020.09: C64iSTANBUL designed a PCB, You can find it on pcbway 🙂
Update 2019.12: A few words about alignment.
Update 2019.12: TFW8B is selling their version of the cartridge.
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.



1541 Diagnostic PCB by C64iSTANBUL. Looking great, thanks ! 🙂


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 about the commodore diagnostics reporting errors when using custom kernals. I decided to modify the kernal detection routine to identify good known kernals from a checksum table. Thanks to Jonny Hylander, Fredric QJ Blåholtz and Krister Andersson for ideas and suggestions.

586220+ : Initial version. Disassembly and kernel identification routines by

586220+ v0.4 : Marty/Radwar sent a huge list of kernal checksums. This version 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.

586220++ v0.5 SX-64 Tape Port check removal : KiWi at sent me a version which works correctly on the SX-64. Scroll down for the download and sourcecode. See his page here.

586220++ v0.5 Expanded window for paddle test by Sven Arke. Klick here.

586220* Proper chip number display for SX-64 and C-64 by Ted Saari. Readme.

See Diagnostic Carts and Manuals for information about the harness for this ROM.

2020-06 : giox sent me an updated standalone program which identifies 137 kernals. There is an ID clash (which can be expected at some point) for 901246-01(4064 Kernal) and Armageddon.


Sourcecode for diag586220+ and original disassembly of the 586220 diagnostic. Compare these two files to see how the implementation was made.
Diag586220+ v0.4 by Marty / Radwar. It identifies 49 different kernals.
Standalone ROM Checksum program with diag586220+ v0.4 tables
Standalone ROM Checksum program for 137 kernals, thanks to giox for the work!
Diag586220++ v0.5 by KiWi /
Diag586220++ v0.5 Paddle Update 08/2017
Diag586220* Proper chip number display for SX-64 and C-64 by Ted Saari 07/2018
Sourcecode for Diag586220*




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 due to $FF00-$FF04 belong to the MMU.

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.


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).

This adapter is suitable for C64/128 and 1541 ROM replacement, earlier machines may need another type of adapter.


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.

586220 Harness
Check out Sven’s page for an excellent resource about the harness! He has also remedied a problem where the keyboard dongle falsifying passes the user and control port tests. Otherwise you must run the test a second time without the keyboard dongle, this is not mentioned in the manual.

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

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 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.
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.
2018-12: Added C-64 Diagnostic Rev 4.1.1 and Import Test Diag.
2018-12: Added C-64 Diagnostic Rev 3.7.3. At a meeting held by the Dutch Commodore Club, Jeroen Vlasveld noticed a diagnostic harness not present on this page. He sent over the diagnostic Rev 3.7.3 ROM, a picture and a schematic of the harness. Thanks!
2020-04: Added information about the diagnostic falsifying passing tests due to the keyboard dongle and a link to Sven’s page for the 586220 harness. Thanks to Sinan and Sven for the information.
2020-05: Added download for C128 Diagnostic 588121B which will work as internal (U36) ROM and external function/cart ROM. Thanks to Bart ( for the update.
2020-05: Together with Bart, we patched more C128 diagnostics carts to work as internal (U36) ROM and external function/cart ROM. Added download for C128 Diagnostic Rev 789010JB.
2020-05: Added C64GS Diagnostic Rev 1.1 and Rev 2.0 ROM:s.
2020-09: Added 4 Burn-In ROMs.
2020-10: Added C64 Burn In R2.1. Thanks to Jeroen Vlasveld.


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

Additional credits:
Peter Schepers, Nicolas Welte, DLH’s Commodore Archive, SLC, Zoran, Doc64, Sierohpätsch, Jeroen Vlasveld (, Dutch Commodore Club, Bart (


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 3.7.3, Rev 4.1.0, Rev 4.1.1 and Import Test Diag
C-64 GS Diagnostic Rev 1.0, Rev 2.0

Located at $8000- in memory and use harness 251169-02.

C-64/C-64 GS Diagnostic Rev x ROMs. I dug out all diagnostics visually alike and disassembled them, after aligning code and comparing routines it became obvious these four were from the same code base. Import Test Diag is modified to work without a harness. C-64 GS Diagnostics are also on the same code base, some tests omitted due to the fact it does not have all peripheral ports.



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).

Modified to work as internal (U36) and external (Cart) function ROM.



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).

Modified to work as internal (U36) and external (Cart) function ROM.


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)


C-64 “Burn In”
Burn-in is the process by which components of a system are exercised.

Even though the screenshot says diagnostic, these ROMs come from cartridges labeled “Burn In”. The basecode is the same but there has been a lot of patching/adding/omitting done.

C64 Burn In Cart – Screens 1,2,3. (Keys F1/F3 to loop/continue test).
C64 Burn In “Hot Burn In” – Screens 3,4,5. (F1/F3/F5-keys have been disabled).
C64 Burn In “Rev 7.2” – Screens 3,4,5. (F5 key to skip test).
C64 Burn In “Final Rev 3.0” – Screens 3,4,5,6. (F5 key to skip test). Diagnostic routines in this ROM are identical to the ones in “C-64 Diagnostic Rev 3.7.3”.


C-64 Burn In R2.1



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.