I wrote these programs to test the RAM, ROM and PLA chips with an Arduino Uno because I don't own a second known-working C64 to test them on.
With the help of these sketches I found my CHAROM and PLA were fried. I also was able to find that one of the chips in my International Soccer cartridge was failing to obey the /CS signal. If you are trying to repair your C64, I hope they help you too and wish you good luck!
Some sketches work on an Arduino Uno. Some others require an Arduino MEGA (I actually got a Robotdyn Mega Pro 2560, which is a pin-compatible, smaller factor version of the real Mega). The Arduino MEGA has plenty of pins and makes it easier to test the chips and also provide meaningful information through the serial port.
Check the chips for electrical consistence before wiring, ie: inputs are not shorted, chip obeys /CS, etc.
See test details on each sketch's heading comments.
Commodore 64 hardware test tools
Robert Grasböck