Sunday 26 October 2014

Commodore 128 Repair - Part 4 Commodore 128 Modes

This is an old post, preserved for reference.
The products and services mentioned within are no longer available.

Having completed testing the Commodore 128, it's time to run through a few of it's features.
It's a bit of a strange beast the Commodore 128, two CPUs, two video processors, four types of memory, three operating systems and two versions of BASIC. Not bad for a single computer.
The default mode on power on is Commodore 128 mode. This has 128K RAM and BASIC V7.0 and uses the 8502 processor, based on the same 6502 as the Commodore 64's 6510 and the 264 series 7501. The default is 40 column mode, it can also work in 80 column mode, but you need to connect the monitor to the 9 pin D connector, rather than the normal 7 pin DIN.
If you type GO64, or hold down the C= key on startup, it goes into C64 mode.
This is limited to 40 columns, and 64K of RAM and runs BASIC 2.0, as did the Commodore 64, again using the 8502 processor.
The third mode, uses the Z80 processor to run CP/M. To use this, you need a CP/M system disk in a 1570 or 1571 disk drive. I don't have one of those at the moment (watch this space), so I'm loading the disk image from an SD2IEC.
This loads up (after a while) into CP/M version 3.0.
It also works in 80 column mode.
That's quite a lot of options.

  • 40 Column Commodore 128 mode
  • 80 Column Commodore 128 mode
  • 40 Column Commodore 64 mode
  • 40 Column CP/M mode
  • 80 Column CP/M mode

I wonder how many C128 owners used all the modes?

It seemed compulsory in the Commodore PET repair articles to show space invaders, so why not continue that, here in an 80 column Commodore 128 version.

Saturday 25 October 2014

Commodore 128 Repair - Part 3 Testing

This is an old post, preserved for reference.
The products and services mentioned within are no longer available.

This is the third part in the Commodore 128 repair. Initially, the whole system was dead, but now, the power supply has been fixed. After that. some keys were not working, which was resolved when the keyboard was refurbished. The mainboard has been cleaned and checked over, and there doesn't seem to be anything wrong with it.
Nice to start off with a working board for a change. One of the things the C128 offers is 'full' C64 compatibility, so I tested it with the Commodore 64 Diagnostic Cartridge and Test Harness.
This shows an error on the user port, even after swaping over the two 6526 PIA chips the error stays on the user port. I also tried two known working chips with the same results.
I've seen this problem on a couple of Commodore 64's as well, I think it may just be an issue with the test algorithm or the loopback, but I've seen it pass on enough machines to know it is wired up correctly and the PIA chips do work.
I've cleaned the contacts and checked for loopback continuity. I think I'll build something with LED's on and a simple BASIC test program to be sure.
This is only testing the lower 64K of memory, all that is visible in Commodore 64 mode. There are Commodore 128 Diagnostics, but I haven't had much success with those. I've found three versions, all 8K cartridge images, so I programmed the latest one in the same way as I had for the other carts, onto an MCM68766 EPROM.
No luck. I tried again with a different EPROM. Still nothing, so I tried the other two versions, and also with a 2764 EPROM in an adapter. I even tried a new C64 cart which takes 2764 EPROMS. All did the same. With the jumpers set for normal mode, I get the C64 screen, with them set for ultimax mode, I get a blank screen?
When it did load up to the C64 BASIC screen (the C128 goes into C64 mdoe when it detects a cartridge), it showed less available memory. 30719 bytes free, rather than the normal 38911 (slightly more than 8K difference).The reduction in memory seemed to imply it's address space was reserved, so I tried executing the code at 0x8000, using 'SYS 32768', I also tried 'SYS 32778', which should have been the start of the code.
That sort of worked, but not particularly well. All the external tests failed? I'll come back to this at a later date.
So there is the Commodore 128. Time to give it a bit of a run through and try out all the modes.

Thursday 16 October 2014

Commodore 128 Repair - Part 2 Keyboard

This is an old post, preserved for reference.
The products and services mentioned within are no longer available.

The Commodore 128 repair is coming on well, but some of the keys are not working.
The keyboard is not in too bad condition, it needs a good clean, and there is some yellowing to the keys (apart from Run Stop for some reason). Sometimes if the odd key is not working, repeatedly pressing it can bring it back to life, but the best option is to clean it properly. The procedure is the same as the Commodore Vic 20 / 64 keyboards, a few steps less than the cleaning the keyboard on the Commodore Pet.
The first step is to remove it from the case, the LED board is held in place under the keyboard with a small back spacer (although with this one, it came in a separate bag with the rest of the screws). The keyboard can then be removed.
The keys are removed using a key puller, trying to avoid the springs going everywhere. The keyboard has two additional smaller springs, so keep these separate. The box of keys can then go off to be washed in hot soapy water.
Shift Lock, Caps Lock and 40/80 Column are mechanical latching switches, and are wired separately to the back of the keyboard.
Theses need to be desoldered before the PCB can be removed.
The PCB is held on with dozens of tiny screws, remove those, but keep the frame down of all the plungers will fall out.
The contacts on the plungers and the PCB can then be cleaned with contact cleaner.
The principal of the keyboard is fairly simple, the PCB has two carbon covered pads for each switch.
The plunger is held up by a spring, and when pressed down, the pads on the bottom of the plunger connect the two pads on the PCB together and the computer registers the switch pressed.
Whilst the principle is the same as the standard C64/VIC20 keyboard, the C128 keys are about half the height.
With the PCB cleaned and reinstalled and the switches soldered back on, the base is cleaned up.
Once the keys have dried, put all the keys and springs back on.
Be careful with the screws when reinstalling in the case. Some of them have spacers in place to stop the screw going through the front plastic. The original screws were a bit tarnished and the spacers a bit fiddly, so I just went for some shorter screws.
Back in the Commodore 128, all keys are now working. Still a bit yellow though.

Monday 13 October 2014

Commodore 64 Diagnostics Test Harness

This is an old post, preserved for reference.
The products and services mentioned within are no longer available.

This is something I've been meaning to get around to for a while, and testing the Commodore 128 has brought it to the front. Last year I built up a couple of Commodore 64 Diagnostic cartridges, the C64 Dead Test and the standard C64 Diag.
They both test RAM, VIC and SID functions, the standard diagnostic cartridge can also test the external ports of the C64. With just the cartridge, these test fail, the keyboard is reported as open, and the cassette, control, serial, user ports and interrupt tests are marked as bad. The chip list shows the two 6526 CIA's are shown as bad these drive the ports. The 6581 SID is also shown as bad even if you can hear it playing the sound test, as it provides two analogue inputs for the control ports.
To test these, most of the ports need loopback adapters, basically sending a single to one pin and reading it back via a loopback connection to another pin. There are a couple of schematics on the net. The first appears to be reverse engineered from an original test harness. This is slightly difficult to follow as all the wiring goes back to a 26 pin connector on the user port adapter, so you have to trace it through that. The second source also includes ROM images and manuals for the diagnostic cartridges. contains a slightly different schematic and also the ROM image. Credit to all those guys for providing the schematics.
I've been adding bits as required over time. The first was the serial loopback, The red button on the top is wired as a reset switch.
The next was the user port. The Commodore original had a cartridge sized box as part of the user port, which housed the circuitry for the control ports, but that meant a lot of wires going from there to the control ports, The user port tests is just a series of loopback connections, all it got from there was power, which can also be got from the control ports, so I just made this as a loopback.
The cassette port is also looped back, but provides a switching signal to the control port tests, derived from three outputs via two resistors. There is some discrepancy between the two schematics I referred to, the resistors values are exchanges and there is no loopback. I built mine according to the first and it seems to work fine.
These two were given D shell covers (37 way for the user port and 15 way for the cassette port) which fit reasonably well.
I made the keyboard connector loopback form on old keyboard cable. I've also added an LED and resistor to form a power indicator.
The joystick tester uses two 4066 switches to switch the fire button and four direction signals between the two ports. Theses are controlled by the signal from the cassette port. I built these up on a small board. Also on there are the four 120K resistors used to test the X and Y analogue inputs on each port.
This was all housed in a small box to hopefully plug directly into the side of the case. It didn't quite work out as it obstructs the power switch, and also the sloped side of the C64C case.
To get around this, I made a set of extenders for the joystick connections. Just a plug soldered to a socket with some tape wrapped around.
With these extenders, it fits fine, just looks a bit odd.
And that completes the loopback test setup.
Without opening the case, the keyboard tests shows 'open', but all the others now pass.
This board has been removed from it's case, and the keyboard loopback installed. All tests now pass.
I had a productive day going through a small backlog of faulty C64 boards, All but a few were repaired, or at least the faulty chips marked up for replacements. At the end of the day, I tracked down a couple of faulty 6526 CIA's, a couple of 6569 VICs, and a faulty 6510 CPU. There were more 6581 SID's than I usually find (several partial failures), and the usual pile of 906114-01 PLAs. Also fixed but not shown, a couple of 7406's, some 4264 DRAM's and a 74LS257 - most of the memory faults had previously been fixed.
The same cable set can be used on the C64C.
And also on the C128, which is where all this started.

Thursday 9 October 2014

Commodore 128 Repair - Part 1 PSU

This is an old post, preserved for reference.
The products and services mentioned within are no longer available.

Here we go again, it's not long since I finishing the repair / rebuild of one of Commodore's first 8-bit computers, the Commodore PET. Now I'm tackling their last 8-bit computer, the Commodore 128.
This one doesn't look too bad, a bit of yellowing on the keys and some marks on the case, but otherwise intact. The power supply has a few issues, so before I began, I gave it an initial checkout, and a short run with an Amiga 500 power supply. The Amiga supply uses the same connector, and two of the pins are the same, 0V and 5V. The Amiga PSU's 5V is rated at 4.3A, the C128 was only 2.5A, so it should be fine. The other two pins are 9V AC at 1A on the C128, and +/- 12V on the Amiga. It works well enough to get the welcome screen, but not recommended for normal use.
The PSU that came with this C128 was taped together, the plastic pillars having snapped. The mains plug was European, that would need to be changed, but since the mains cable was also damaged at the input, I'll just go for a replacement cable.
Inside there were a few more problems. With that replaced, there was no output on either the 5V DC or the 9V AC side. Checking further, the 1.4A fuse on the AC side was blown, and the large inductor in the centre was loose.
Although held in place with a cable tie, both solder joints had cracked, and it was wobbling around. This is the main output inductor on the 5V supply, hence no output. With the fuse and mains cable replaced and the inductor re-soldered, I fired it up and found the 9V supply was there, but the 5V was about 4.5V. There was an adjustment, so I trimmed that for 5V again.
I was hoping I'd be able to replace half or all of the case with one from an Amiga 500 PSU. There were a number of models, all the same shape and size. The original 'heavy' linear one is on the left, the 'light' switch mode one in the centre and the C128 on the right.
It looks like the screw holes are in different places on each one, so I won't be able to do that. I'm not happy with the case of the C128 PSU, so I may put that to one side and look at making a new PSU by adapting one of the A500 ones. All I need to do is disconnect the +/- 12V and install a small 9V 1A transformer. That way I'll get a solid case and a mains switch. The original C128 supply will do for the moment, now onto the main unit....