“Pi1541” in 30min with (almost) no soldering.

I need to test my Commodore 64 but I have no floppy drive, cassette deck or cartridge…

This was the dilemma I had one evening after repairing my newly acquired Commodore 64 machine – yes I will write a blog entry about it and link it here later. I really wanted to load a game and test the famous SID chip for it’s sound quality. So off to Google looking for quick solution. There are plenty of those floating around, most are semi-commercial, and pretty complicated and/or expensive, not something you can implement “tonight”. Than I came across the Pi1541 by Steve White. According to his post “Pi1541 is a real-time, cycle exact, Commodore 1541 disk drive emulator that can run on a Raspberry Pi 3B (or 3B+). The software is free and I have endeavored to make the hardware as simple and inexpensive as possible“. Wow, amazing work Steve! Plus he released it all to public for free, including schematic diagram of the “cable” and the source code of his software.

If you follow his post, in his setup instructions you will get to step six where you need to create the cable. There are two versions, simple and more complex. Most of us need the simple version, if fact when you read the instructions you will soon realize the that you can make a “super simple” version of the simple one as there are quite a few “optional” components. So to make the task easy I’ve created a new modified diagram of the “super simple Pi1541 cable”:

mypi1541_v1.0

Full size image here

Yep, that’s it, one component – the 4 channel logic level converter, Steve suggests the Sparkfun part number, but places like eBay, Amazon, Banggood are full of alternatives. All you need is one based on MOS-FET transistors (you will see 4 of the 3 legged tiny transistors on the board) and you’re good to go.

If you want to know what the logic converter does, it’s simple: you can connect to each other 4 digital lines of signals that are not compatible from the logic level point of view – the raspberry pi uses 0V/3.3V voltage to it’s logic “0” and “1” and the Commodore uses 0V/5V voltage. Each pair of HV1/LV1, HV2/LV2, HV3/LV3, HV4/LV4 handles one line, you can imagine that for each pair HV1 pin and the LV1 are “connected” to each other, so if we send a 3.3V “signal” into LV1, it will come out of HV1 as 5V “signal” (note: this conversion works in both directions). The remaining connections are related to power, so you feed “ground” to the GND pins (note: GND pin on the LV side is directly connected to GND on the HV side), you feed the low supply voltage to “LV” pin and the high supply voltage to “HV” pin.

I had one of the Sparkfun parts in my drawer so I decided to go ahead and build the simplified version of the cable, here is what I’ve done:

Step 1.

You need to somehow get the signals out of the Commodore and into the logic converter:

Option A: Get a DIN 6 plug and solder 5 wires onto it, this is what I’ve done:

pi1

“But you promised no soldering”, okay….

Option B: you could “sacrifice” a spare serial cable that you use to connect the original 1541 drive to your Commodore 64, cut it half use one half for your cable and give the there half to one of your friends so they can create a cable for themselves 🙂

Step 2.

You need to somehow connect the cable to the logic level converter, again many options, I soldered a pin header to the logic converter, “crimped” the connectors and used a 6 way plastic plug like this:

pi2

pi3

“But you promised no soldering”, okay….

Option B. You could simply twist the cable into the holes of the logic converter, here is an example of how I would do it if I didn’t know how to solder (example shows different logic converter as I don’t have the 4 channel one handy that doesn’t have pins soldered already):

pi4
First strip a wire about 1cm (0.4inch) and twist it.
pi5
Feed the cable through the hole and twist on the outside of the converter board
pi6
Once you got all 6 wires done, push the pins through (you may have to experiment with different size of wire to get a tight fit)

 

Step 3.

Option A. Now we need to deal with the connections from the logic converter to the raspberry pi. In my case I had the pins already soldered on my logic converter so I crimped another 7 connections between the logic converter and raspberry pi:

pi9

But, but….

Option B. Since raspberry pi comes with pin headers soldered in already you have no choice you need to “source” the raspberry pi side connectors from somewhere – a good source would be and old computer case that has cables for DISK LED, POWER LED, RESET, BUZZER etc. This will give you the “plug” on the raspberry pi side, on the logic level converter side use the “twist” method mentioned above. Wire everything as per the simplified diagram.

Step 4.

Tidy up. I secured my headers and the converter PCB with some paper tape

pi10

And finally I placed the pi and the converter cable in a raspberry pi case:

pi11

Now the only other thing left is to prepare the SD card.

Step 5.

To prepare the SD card, just follow Steve’s instructions. You should end up with SD card structured like this:

/
/bootcode.bin
/config.txt
/dos1541
/fixup.dat
/kernel.img
/options.txt
/start.elf
/1541/
/1541/fb64
/1541/Games/mygamefile1.d64

The first file in the 1541 folder should the the “file browser” file compatible with your platform, in my case I’m using Commodore 64 so I only left the “fb64” file in that folder. This file needs to be the first file in that folder so that when you boot your Commdore and issue the famous <LOAD “*”,8> command the file browser will start and let you “browse” the content of your virtual 1541 disk. To keep the file first I added the Games folder and placed all my games files inside it.

Step 6.

Donate or support Steve via PayPal/Patreon to reward his hard work 🙂

Advertisements

One thought on ““Pi1541” in 30min with (almost) no soldering.”

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s