So, next in my long list of computers I wanted but never could afford as a kid is the Commodore 64. I can’t quite remember how much they cost in the early 80s in Australia. Definitely in the $300 or $400 region early on … and this was at a time when I could barely afford my $120 Atari 800XL (heavily discounted I might add … as well everybody probably wanted a C64 at the time).
Anyway, I now have a C64C . It came as a sort of job lot; a 64C with no PSU, five floppy drives including three 1541-II’s and two older 1541’s. Some PSU’s for the 1541-II’s and disk serial cables, a Commodore tape unit, some commercial games on cassette and a few magazines from the 80s.
So this is my first C64, so it wasn’t like I had a spare power supply. That was problem number 1. The C64 PSU is a little unusual in that it is +5V DC and 9VAC . The use of the +5V is pretty obvious, and I have various PSU’s that can do a few amps at 5V, but the 9VAC bit was a problem. Firstly I did not have anything that produced 9VAC. A bit of googling, and found this lemon64 thread of using +5 and +12 DC to run a C64.
So if you have a +5 and +12V DC PSU you can hook the +5V in and basically put the +12V in at a point where the 9VAC has been rectified and filtered a bit to produce something ‘like’ +12V DC. Supposedly the main use of the 9 ish or 12ish volts ripply DC is to feed the 2nd power input on the SID chip. The 9VAC is also used to feed a 50Hz TOD clock on one of the peripheral chips … but supposedly not a lot of software uses the TOD clock .. so you can leave it off supposedly.
So initially I used an ATX power supply to feed +5 and +12 in per the notes in that forum thread. It worked. However, I did get a lot of voltage droop across the board. The C64 board is quite wide and power comes in on the far right. I found that my ATX exact 5.0V was maybe 4.6V on the left hand side of the board … which is not great … but the C64 did power on. Next step was to try the cassette unit. This did not work at all. I thought it may have had something to do with the hack to put +12 in instead of 9VAC … but it was simply that the voltage droop was too much for the cassette to handle (as it gets +5V DC plus another pin is for powering the motor I think). I redid where the +5V fed in to closer to the middle of the board and the cassette now worked. I tried loading ‘Ant Attack’ and it did get to saying ‘LOADING ANT ATTACK’ and seemed to be loading stuff. So it seemed to be working.
It was sometime around now that the ATX PSU would not power on the C64. I had shut it down after running the C64 for a while and it would not power up. It was kind of the classical ‘PSU detects a short circuit and shuts itself down’ behavour. But I’ve had problems using ATX PSU’s in the past when they don’t like the lack of load on the 3.3V lines … so my brain somehow concluded that I did not want to use the ATX PSU anyway (I only intended to use it to ‘test out’ doing +5 and +12).
So the idea now (pretty much like that forum post actually) was to use one of those high efficiency tiny switchmode regulator boards to convert +12V DC from a +12V power brick into +5V. I did a similar mod to my ZX Spectrum, but replacing the entire 7805 and its heatsink. The type I bought off ebay were ‘Mini 3A DC-DC Converter Adjustable Step down Power Supply Module replace LM2596s’. The 3A is probably not to be believed, but I thought I would give it a go. So the basic setup was +12V DC straight from the brick into the C64, and +5V out the other side of my tiny switchmode.
I injected the +12 from the brick on the +ve end of the C63 electrolytic, and +5 on one end of R19. Exactly the same as that lemon64 thread. And it worked. I did notice a bit of a smell from the C64. A sort of ozone-ish smell. I kind of discounted it initially as a lot of these old computers can develop strange smells. For reference I am using a +12V 1.5A adapter off an external 3.5″ USB drive. I would like to use something that delivers a few more amps but the C64 seems happy.
So I now had the C64 going, and I could load the few cassette games that came with it. Next step was to use a disk drive. There wasn’t much point in using the real floppy drives that came with the C64 as I had no diskettes anyway. So I started googling away looking for virtual floppy projects. The most popular seems to be SD2IEC. I am never quite sure what is the ‘master site’ for sd2iec … but I dont have a ATmega644p or Atmega1284p (though I have just ordered one) to try it out. The next thing I found was uno2iec. With it you wire a Arduino Uno into the C64 serial port and then run a program on a PC to mount D64 disk images which are then ‘presented’ to the C64. I didn’t have the right DIN plugs (and did not want to cut up the ones that came with the job lot), so just soldered the 5 or 6 wires underneath the C64 . The other ends of the wires I could plug in on the Uno. I was a bit hesitant about trying uno2iec. The PC client end is a QT based app, so you need to download a Gig or so for a QT dev environment … and then hope that whatever version you downloaded is still able to compile the client code. I downloaded 5.5 and I was able to compile it OK (on linux) and later I was able to get it going on OSX (though 5.5 would not install so I used 5.1.x). I guess I’d much prefer a command line interface … just for pure longevity of ‘getting it working’ in the future. I might have a poke at the source code to see how hard it is.
Anyway, uno2iec works. Must admit the first game I tried; Turrican, did not work … but quite a lot do work. Thing on a Spring works. I have no idea how to play the game, but I have one of those deeply embedded memories from my teenage years of seeing it and hearing that sound track on a friends C64 in my teenage years. Very cool.
So I still wanted to try some ‘real floppies’ with the C64 ,especially for games that did not work with uno2iec. I had a few 5 1/4″ floppies that I didnt mind overwriting. I first tried just formatting one and seeing if I could read the directory (as I was unsure whether these five drives really worked). Some seemed to work (I think some of the newer 1541-II’s do not work). So how to get D64 images onto real floppies? So there seem to be lots of special parallel cables; the X1541 style cables … of which there seem to be many variations which I think is to cope with the variations in parallel ports over the years. I thought the XM1541 cable might work for me, but I did not have any schottky diodes at the time.
So next I thought about using an Amiga connected to a 1541 drive. The Amiga nicely has an old school 5V parallel port … and programs for transferring D64 images do exist. And the cable to make up seemed doable from within my parts bin. So I set out to use Easy1541 and a Frodo IEC cable.
The Frodo IEC cable seemed simple enough to make. Just a 7406 and a few 1K resistors and the 6 pin DIN and DB25. Key thing for me is that I had all the parts. So I hooked it up with a 7406 on a breadboard (Note: I ended up using another 5V supply to power the 7406 as the extra +5v pin on an Amiga parallel port wasn’t good enough). Strangely I kept on making mistakes with the wiring. If you google for the IEC 6 pin pinout you’ll see lots of sites, most of which do not tell you which way around you are looking at the pinout. I seemed to get this repeatedly wrong … and easy1541 never worked for me. I even redid the wiring with the Easy1541 type cable which also did not work (mainly because I ballsed it up). Eventually I pulled out the C64 motherboard, made sure I knew exactly which pin ground was and worked that way. Suffice to say, I really did get the pinout wrong a lot.
And eventually Easy1541 worked. I didnt set up the mountable stuff. I just wanted the IEC commands to work. IECStatus now returned something useful and so then I wrote Impossamole (which did not work properly with uno2iec) to a real floppy. Some 20 mins later or so (I wasn’t prepared for how slow a real C64 drive is 😉 the 35 tracks were written and I attempted to load the game … and hey it worked!!
I did eventually work out the weird smell on my C64. The lemon64 thread that describes the +5, +12 mod inject the +5V on one end of R19. It turned out R19 was the source of my smell. I could also see that it was slightly blackened and was extremely hot when the C64 was running. This got me puzzled about the mod and this resistor. And I was puzzled about the comments in the thread about ‘making sure the power switch is in the off position otherwise you get a short circuit’. Staring at the circuit diagram I could not figure out how you could get a short circuit (I have to admit I am always a ‘junior’ when it comes to reading circuit diagrams). Maybe you get a short circuit if you happen to have a real C64 PSU connected at the same time? Then I worked out that the mod actually only works with the power switch in the off position because when the power switch is OFF, the end of R19 where you feed in +5V is connected to +5V on the motherboard. When the switch is ON, it is disconnected. Kind of like reverse logic. The OFF position now turns it ON. So that means on a normal C64when the power switch is OFF, R19 is connected across +5 an GND, but is disconnected from the +5V line when the power switch is ON. So normally R19 is not in use when the C64 is running … but with this mod it is … and its only 10 ohms and not exactly a high wattage resistor so no wonder it gets hot. Again, I am a ‘junior’ at this stuff, but I assume R19 is there to drain stuff (caps?) faster when you turn the thing off.
Anyway, I removed R19 and ‘no more smell’.
So it’s all working good. However, I can add the C64 to my list of machines that really hate those cheap composite/svideo to vga converters. With one of those it produces the same crappy black and white mess that my Spectrum and 800XL produce. But I generally don’t use the adapters anymore since the Dell 2001FP does the display output pretty good (I am using svideo output). Its interesting though that the svideo output has a sort of carpety interference pattern that I assume is the AEC interence mentioned in this thread. Not sure.