Give your Commodore 64 new life with an SD card reader
This August marks the 30th anniversary of the most successful computer model in history. One company put personal computers into the people's homes, and launched an entire industry overnight. For an entire decade, despite attempts at marketing improvements, the original platform stood the test of time, virtually unchanged. Even today, the Commodore 64 is celebrated by a community of hobbyists.
In honour of the anniversary month, here are some up to date instructions on how to read old data from the disks. Floppy disks only have a usable lifespan of 10 years, and most of them in my collection are over 25 already. At this point, the chemical binder between the magnetic particles and the plastic substrate is degrading, and the data can literally fall out of the disks. Fortunately, up to date software from the opencbm project tries very hard to read the data and can often succeed when a disk appears to be unusable when connected to a C64.
Here's what you need to read your floppy disk into your PC:
- A commodore 1541 disk drive, in good condition, and power supply.
- The drive cable.
- This ZoomFloppy adapter
- a USB cable.
In addition, if you want to read disk images from an SD card hooked into the real Commodore 64, you will need the uIEC adapter, which can be substituted for a real floppy drive.
Transferring floppy disks to the PC
I want to scan in my copy of Jumpman so its digital bits are preserved.
You have to download the special build of the opencbm software from here. I am using the windows version. Read the manual very carefully to install the driver, before you can use the command line tools.
This copy is totally genuine EPYX product. At least that's what they guy at the swap meet told me, behind the K-mart.
Then, plug the ZoomFloppy into the Commodore drive using the commodore cable (make sure the drive is off!), and into your PC using a USB cable.
Now we turn on the drive, put in the disk and cross our fingers. From a command line, I type:
Confusingly there's some empty ports. If you want, you can hook other things into it for decoration, I guess.
d64copy -r 16 8 "jumpman.d64"
- Retry bad blocks up to 16 times before giving up.
- Copy from device #8. Remember, on Commodore, the first floppy drive was always device 8.
- Copy the contents of the disk to the file called jumpman.d64
A minute later, and it is done. Unfortunately, we have a bad sector. Hopefully it is in an unused part of the disk, or in some graphics that won't cause a crash.
Running games from SD cardsNo serious commodore enthusiast is without his or her SD card reader. I happen to have the uIEC which Jim Brain soldered together right in front of me at the World of Commodore 2011 in Toronto.
It has to plug into the back of the Commodore, presumably for power, and then the drive cable goes into it as well. Then, it is ready to act exactly like a floppy drive.
But how do folders work?
You can just about fit all the Commodore software in existence onto one card, so how do you access it? You can switch disk images by sending special drive commands to it in BASIC. I've placed the jumpman.d64 file on the SD card. Here is the command to switch to it:
There are many other commands for the uIEC. It has some buttons on the circuit board that let you swap disks on the fly without typing commands, but these have to be set up by listing them in a special file. All the other commands are described here.
A major drawback of the uIEC is that while it emulates the standard Commodore drive operation, the commodore 1541 drive was actually another computer that you could load programs on and run. Some programs did this for copy protection or to implement custom fast-loaders. More recently the retro demo-scene uses it for extra storage and computing power. I was disappointed when the Second Reality demo didn't work.
Well, I have Jumpman loaded anyway, so off to an evening of retro fun.
The cheater methodOf course, if you don't want to go to all this trouble, you could obtain just about any software you can think of using pokefinder. Just Bing it.
Free, Raw Stock DataScraping financial information is easy with my friend, python.
Throw away the keys: Easy, Minimal Perfect HashingPerfect hashing is a technique for building a hash table with no collisions in the minimum possible space. They are a easy to build with this simple python function.
How a programmer reads your resume (comic)People thought it was a comic, so I never corrected them.
The strange man reading a novel in the meeting roomWhy is a visitor reading a novel all week in the meeting room?
Test Driven Development without TearsEvery company that I worked for has its own method of testing, and I've gained a lot of experience in what works and what doesn't. At last, that stack of conflicting confidentiality agreements that I got as a coop student have now all expired, so I can talk about it. (I never signed them anyway.)
cairo blur image surfaceThis really should have been included in cairo. Instead, everyone that wants to have shadows has to roll their own blur function. Here's my take on it. I'll even release this into the public domain.
Why don't web browsers do this?Why don't web pages start as fast as this computer from 1984?
Minimal usable Ubuntu with one commandIf you install the default "ubuntu-desktop" you also get with it a gigabyte of crap that you will never use. But if you don't install the ubuntu desktop, you get a system with a text-only login: prompt, and it's not clear what to install to get it to a usable state.
I have an irrational need to optimize my Ubuntu installation. I did some investigating and came up with this method, which gives a minimal graphical 1.2 GB install, with gnome, networking, and no applications.