Sunday, 15 December 2013

Commodore 64 Diagnostics Cartridge

I've finally got a replacement for my desoldering station, after giving up on my original supplier and going elsewhere. Now I can catch up on all the jobs which are likely to need a lot of desoldering, and have been old hold whilst I've been waiting. Here we have another Commodore 64 to repair. The initial fault was a black screen.
I went straight to the usual culprit and, yes, it was the PLA. Desoldering station working well, removed, socked and replaced that. The PLA was verified as faulty in another machine, and a working PLA brought this back to life (well, sort of).
This is actually the later CSG 251064-01 which seems to be more reliable than the original MOS 906114-01. There was now something to show on the screen, but it was random garbage
Just to side track for a moment, on the subject of random garbage. I remembered years ago finding a good demonstration that the random number generation on this sort of computers wasn't as random as you might think. There is an example in one of the Spectrum + user guides which shows some 'random' coloured blocks.
If you type it in, you also get random coloured blocks, but exactly the same random coloured blocks as shown in the book!
This is due to the Spectrum's psuedo random number generator being seeded in exactly the same default way. Always remember to choose a suitable seed your random number generators - a trap for young players as Dave Jones might say.
Anyway, back to the Commodore 64. At some time in the past, two of the DRAM chips have been replaced. This always starts the alarm bells ringing, particularly when they are different speeds. I thought it might be a good time to use the Commodore 64 Diagnostic Cartridge and see if it could pick out the faulty chip. I had been using a bit of a hack using a 2764 EPROM, but I thought it might be time to make a neater one. I got a couple of game cartridges and had a look inside.
The Omega Race one on the right looked the best bet as that was a simple 8K chip.
Desoldering station on call again, nice clean removal of the original Omega Race chip.
These 24 pin chips are not compatible with the standard 27 series EPROMs (like the 2764 I had used which is 28 pin, 8K), so I used the same type of MCM68766 24 pin 8K EPROM I had used to replace a VIC20 Kernal ROM.
The Diagnostics program ran, and highlighted problems with 4 of the DRAM chips, the mess on the rest of the screen is due to the memory fault.
Time to change the DRAM. More desoldering, at least it's a good test.
I installed sockets for the DRAM chips and tried various combinations. It seemed there was actually only one chip at fault, but when that was present, it caused another three to report failure. I'm not sure if this is a deficiency in test program, or something to do with the mixed timings and manufacturers (which I normally try to avoid).
After further testing, I decided the best option was a fresh set of DRAM chips.
Retesting with the new DRAM, all was well.
I've made up a suitable label for the cartridge, stuck over the original, so if I ever feel the urge to go back to Omega Race, I can.
That's now part of the testing toolkit, ready to test the next one.
The new desoldering station has passed with flying colours, time will tell if I get the same issues with tip deterioration as I did with it's predecessor.

Monday, 2 December 2013

USB Keyboard PCBs

I've been making a lot of USB Keyboards recently, and have been using a variety of controller boards. The older ones used ATmega328P microcontrollers on matrix board (as seen here as a ZX Spectrum Plus USB Keyboard)
The later ones used modified Arduino Leonardo boards with ATmega32U4 microcontrollers (as seen here as a ZX81 USB Keyboard).
This is fine for ZX81 and ZX Spectrum USB Keyboards, where the 8 pin and 5 pin connectors for the ZX81 fit perfectly, and the ZX Spectrum ones be can be added by extending one...
... or both of the connections.
However, it is a bit of a problem for Commodore 64 USB Keyboards 
and Acorn Electron USB Keyboards,
which have a single longer connector. I have been using Arduino shield prototyping boards plugged into the Leonardo to wire up the 22/24 pin keyboard connectors.
I thought it was about time I came up with a better solution, so I've designed a PCB for my USB keyboards.
It's not a particularly complex board, basically it has the ATmega32U4, a selection of USB connectors, an ICSP connector and the rest of the ATmega32U4 pins are taken out to a 22 pin header for connecting various keyboards. My surface mount soldering isn't the best, so I took the easy option of using through hole for the rest (although some of the package size choices could have been better).
I've also added a three pin LED connector for Commodore cases (using SCK from the ICSP header so it will flash during upload and testing.
These can now support Commodore 64, Commodore 16 and Commodore Vic20 USB Keyboards,
as well as the Acorn Electron.
They seem to have turned out very well, so based on these, I'm now putting together a ZX81 / ZX Spectrum version which should be available soon.
So, if you fancy a vintage computer upcycled into a USB keyboard to use with your PC / Mac / Laptop / Tablet / Raspberry Pi / whatever, then Contact Me, or buy one direct from my Etsy Store.