I first heard about the Pi1541 created by Steve White on Chicken Lips Radio. There had been other solutions in the past for hooking up an SD card to a C64/128 but nothing for the average hacker that would fully emulate a 1541 or daisy chain to another real 1541.
Discovering that this project ran bare metal on the Raspberry Pi without any underlying OS was impressive to say the least, exactly what I was hoping someone would eventually produce.
I figured I could build this on perf board easily enough. Later, I was delighted to discover that CG had kindly created a Raspberry Pi daughterboard PCB on PCBWay. So that was it. I ordered 5 of the PCBs, some of the BOM and waited.
First, I had to set up my workshop again. I'd been wanting to do this for some time. This was the perfect opportunity to use this project as a way of organising my parts and tools again. I won't go into great detail about this part of the process. But many of the parts I ordered were part of sorted packs.
Most of the parts I ordered via Aliexpress to make it as cheap to make as possible. However on many occasions, I ordered some parts from other vendors. This was mainly due to not being organised or forgetting to order certain items from the Pi1541 BOM list. Rather than order from Aliexpress again and wait another few weeks for delivery, I just shelled out a little more to speed things along.
The first item to arrive was the Raspberry PI 3 and power supply. It made sense to test that first. I plugged it into my TV's HDMI and powered it up. Nothing. Dead.
Turns out, without an SD card inserted, you get no life from the PI. “Duhh”, some might say, but when you've only ever owned a PI 2, which *will* show a rainbow splash screen without an SD Card, it's natural to assume you'll get some picture or output from it on a naked boot.
I couldn't find any online documentation on this to confirm or deny. So to test, you will need to make a bootable sd card (at least partially) so you can test that the PI is good. So start on the SD card instructions for the Pi1541 here.
First was configuring the PCB. I went with option B because I wanted all the bells and whistles like daisy chaining to a real 1541. You can see how to configure for this here: https://www.hackup.net/2018/07/pi1541io-revision-4
I chose the 3.3V and Bus 0. The I2C oLED screen I chose was the GND, Vcc (rather than Vcc, GND) so I configured the solder point for that.
Next, was placing the four resistors and single capacitor.
Then I configured the 7406 chip solder points.
I add the 14-pin socket to the board which will house the 7406 IC. I noted the orientation of the socket, placing the notch to the left. For safety, as there were more components and points to solder, I didn't place the 7406 chip into the socket yet.
Next placed were the two 5mm leds. I used green for the power indicator and orange for the drive activity indicator. The bill of materials asks for 3mm leds, but I opted for 5mm. This is totally fine and they fit without any issues.
The PCB LED symbols indicate that the negative side is on the square pad, not the round pad. That's the usual way, but to check, I did a ground test first.
The negative (cathode) does go into the square pad. Or another way to put it, the flat side of the LED points to the title text on the PCB.
I then fitted the speaker enable header pins.
Then, the 4-pin header. This is the header that will hold the removable oLED screen.
The next thing was the 40-way header that connects the daughter board onto the Raspberry Pi board. I was careful to get this around the right way. The header is connected to the underside of the board. That is, the opposite side of the PCB to all the other connected components.
Then I fitted the reset switch.
Next was the piezo buzzer. The buzzer I chose was a bit of a tight fit. The legs were slightly narrower than the holes on the PCB. So the legs had to be bent outwards ever so slighlty. This took a little bit to push through. But it worked ok. Again, I did a ground test to ensure that the negative marking on the PCB was correct. The buzzer is polarised, so note the orientation.
Attaching the Level Shifter Module was next. It arrives as a tiny board with all the surface mount components populated. Also packed with the shifter module is a strip of 12 header pins. These had to be snapped in the middle to make two sets of 6 header pins. Both sets were then soldered to each side of the module.
Then the Level Shifter Module was soldered to the PCB taking careful note of the orientation.
Next, the two DIN sockets were soldered into place. These two sockets sit very nicely together.
Finally at this point, I added the 7406 IC into the 14-pin socket, noting the orientation, notch to the left.
At this point, I was keen to give it a try, even though I didn't have the optional 5 switches in place. This is because I forgot to order some. I unsoldered a bunch of right angled button switches from various junk boards but they all varied in button depth. I wanted this to be a pretty nice build, so I ordered some from RS Electronics.
I added the Pi1541 daughterboard to the Raspberry Pi, the oLed screen into the 4 pin header, attached the power, the DIN cable to the IEC socket and the other end into my Commodore 128.
I turned on the C128 and then the Pi1541.
The power light on the Pi1541 came on, and a quick tinkle on the Raspberry Pi activity lights. But not much else. The oLED showed nothing.
That's fine. The board still had flux all over it, and I didn't really check it over before trying it.
However, I pressed F3 in C128 mode to get a directory of the disk. To my great delight and surprise, the contents of the SD card's 1541 folder started to list on the Commmodore monitor. This was a raw dump of the contents of the SD card rather than the contents of any Commodore disk (d64 file).
It froze after about a screen or so. But something had worked. There was communication at least!
I turned the Pi1541 off. I noticed that I hadn't jumpered the buzzer to enable sound. Perhaps when listing the contents of the disk, I might hear some activity? I fitted the jumper and reconnected the power. I listed the contents of the drive again, but no sound, oLED, or drive activity light.
I edited the option.txt and tried to add I2C setting for the screen. Then I specified a default D64 file to mount on bootup.
Tried the Pi again, but my settings were making it worse. Still no oLED, and now, no directory anymore. Just complaints of no device found. Loading “*” did nothing.
Time to check the soldering.
Checked all points. Pleased to say I'd done a pretty good job. However, I did spot that somehow the voltage pads for 3.3 volts on I2C configuration section were not joined. Nor was one of the GND / Vcc pad joiners.
I could have sworn I soldered these up. A quick check of the earlier photo confirms I was right. Could soldering the nearby components have transferred enough heat to have melted the joiners? I would doubt it. But it seemed to explain why my oLED screen wasn't working.
I rejoined the pads correctly and reassembled.
No difference. You have to be kidding me!
I don't have an HDMI screen in my workshop, just a small VGA screen mounted to the wall. I had left my HDMI→VGA converter at work. And it was the weekend. So I couldn't get a screen display until Monday night. There's always something!
I brought the Pi1541 inside and connected it to the TV to see what it outputs. I was pleased to see that a menu screen appeared and all the D64 images were listed. So something was working.
More fiddle-diddling with the options.txt but there was no change. At this point I started reading around. You know… reading the manual? I went back to the original instructions, and also read through the unofficial FAQ and forum post on Lemon64.
As much as I read about “browser mode” or the file browser disk that was available, the less I understood of it.
At this point, you'd be fairly certain I had less of a technical problem, and more of a problem that I didn't actually know how to use the Pi1541.
Checking the unit again on the TV, I connected a USB keyboard and realised after a cold boot time of around 7 seconds, the menu would be ready. I could hit enter and the first .D64 image from the list would mount. Ok good. This means I could test it on the C128 without a screen.
I hooked everything back up in the workshop, started the Pi1541, and after a few seconds, pressed
Enter on the USB keyboard to mount the first disk: 1985.d64 from Mastertronic.
LOAD “*”,8,1 and lo and behold the game loaded! Complete with activity indicator led and buzzer sound! Can you believe it? This project actually works!
My eight year old daughter then spent quite a while playing 1985, then onto 720 degrees which she loved. She found 8-bit skateboarders falling into water hilarious.
So it WAS working. Didn't answer the issue of my oLED not working though.
Hooking it back up to the TV and I noticed the menu stated that
no I2C scan found. Checking my bill of materials order list, to my horror, I realise that I actually bought an
SSD1315, not an
SSD1306 as stated in the Pi1541 materials list.
But then researching the
SSD1315 it is supposed to be compatible with the
SSD1306. So is it? And how do I test if I have a dud? Youtube was a dead end, any video showing “SSD1306 test” showed oLEDs already hooked up to Arduino boards and displaying something. I just wanted to get a simple multimeter test on the voltage pins.
No-one demoed that. Perhaps I am the first person in the history of mankind to want to do the most basic of test. Anyway, I popped it onto a breadboard with a 3.6V lithum battery. Nothing. And no voltage on the Vcc.
I could assume from this, that the unit is dead. However it might need a capacitor hooked up to it. At any point, I placed an order for an SSD1306 and had to leave it out for now. Perhaps I should have checked the datasheet :)
The weekend came and went, and I brought my HMDI→VGA converter home.
I was able to hook the Pi's output to my workshop screen. I could select any D64 image and load it into the C128/64.
A few days later my new right angle switches arrived. I soldered them into place and tested them out. They worked great. I could navigate the menu for my disk image, and select with the press of a few buttons. I bought two blacks, one salmon and two whites. This was so I could have the buttons reconfigured into the following order:
Down : Up : Enter : Back : Insert
That made more sense for me, and I easily changed this in the options.txt.
To finish off the unit, I added the spacers, nuts and bolts to clamp the daughter-board to the Raspberry Pi.
I since ordered another SSD1306, but it hasn't arrived in time for this article.
And that's the end of the journey so far. I've always hoped someone would turn a Raspberry Pi into a 1541. It's such an excellent project. I would like to thank both Steve White for creating the Pi1541 and to CG for sharing his Pi1541 daughter-board design.
When you consider you're dropping money for all the parts required, it's a nice idea to drop a few extra dollars to Steve and CG.