February 11, 2018

Commodore 128 to 64 Power Supply Adapter



A couple of months ago I picked up a boxed C64 breadbin on Craigslist. Got it home and it wouldn't fire up. The LED was dim and it was giving me a black screen. I checked the voltage output on the power supply and it looked ok, so I started looking into possible fixes for this issue and during my tests had the power supply eventually stop giving any voltage at all. It just died. I opened the power supply to find it was one of the resin covered bricks, so basically, it's a goner. I have a few Commodore 128 supplies and learned that they output the correct voltages for a C64 as well. I considered butchering one and making a dedicated C64 supply, but hated to do that, especially if the C64 had enough wrong with it, that it'd be shelved anyway. So... I looked for some ideas online and found a person who actually made an adapter with a C128 female plug on one end and a 7 Pin DIN on the other end that would plug into the power supply and then into the C64. I liked this idea and wrote to the person, but they informed me that they no longer had any of the C128 plugs to use and would need to pull some off dead C128's.

THE IDEA:

So, my quest continued to bring this old C64 to life and I got the idea to wire some sort of connector such as a Female VGA connector to the end of the C128 power supply that could connect to two separate connectors I'd make, one being a Male VGA to 7 Pin DIN (for C64) and the other a Male VGA to 5 Pin C128 plug. This way I could connect either adapter cable to the Female VGA for whichever system I wanted to power. 

I threw the idea past Dale from Dungeon Dwellers Inc during a conversation we were having and he thought it sounded good, but suggested I didn't even need to use 3 connectors and that I could just use a Male & Female 7 Pin DIN connector. This method would allow me to plug the C128 supply directly into the C64 or plug the short Female 7 Pin DIN to 5 Pin adapter in for C128. It was perfect! As they say, two heads are better than one!

GETTING STARTED:

The idea behind this was to cut about a foot long chunk from the end of the C128 power supply, wire a Male 7 Pin DIN connector to the output end of the supply to plug directly into the C64.

Then, taking the chunk I chopped off with the C128 5 Pin plug, wiring on a Female 7 Pin DIN connector that could then be plugged back into the Male end, bringing back my option of powering my C128.

Well, this works fantastic and I'll show you how I did this...

MODDING STEPS:

1. First, I studied over the pinouts for both C64 and C128 connectors to make sure I knew exactly how I was going to wire it all up without blowing anything up.


2. I opened the C128 power supply and double checked continuity from the AC/DC lines to the corresponding pins on my pinout diagram. You only have yourself to blame if you do it incorrectly, right?


Luckily, the C128 supply isn't covered in resin!

You can use these points to double check continuity to the appropriate pins

3. Cut off the C128 plug, leaving about 6-12 inches of wire to work with and separate the wires.

Cutting about a foot from the plug and separating the wires. Make sure you peel back the grounding shield and connect it with the shielding of the new DIN plugs.

4. Peel back the grounding shield and tin each of the 4 wire tips with a bit of solder and solder on the Male 7 Pin DIN in this fashion...

C128 POWER SUPPLY TO 7 PIN DIN (C64):

9VAC (Brown) to Pin 6
9VAC (White) to Pin 7
5VDC (Red) to Pin 5
GND (Black) to Pin 2

Here I show how I had to slice along the seam of the shell to allow for the C128 cable to fit (wasn't pretty, but it worked!)

5. When soldering on the Female 7 Pin DIN, just keep in mind, it's backwards from the Male. As long as you use the pinout above, this shouldn't be a problem.

All finished!

6. After you have both plugs soldered. I'd suggest double checking all your wiring using a multimeter from back inside the power supply and from both the 7 Pin DIN and the 5 Pin C128 end. If testing from the C128 plug, it should be the same as when you started. You only have one shot at doing it correctly without possibly frying your computer! I can't be responsible for any mistakes you might make here.


7. If you did everything correctly, you now have a nifty C128 power supply capable of powering either a C64 or C128! Pretty cool, I'd say!


FINAL THOUGHTS:

After I finished making this adapter, I plugged it directly into the C64 and voila! I was greeted with a bright power LED and lovely blue screen! I must admit, I was shocked it worked without needing a PLA chip, as I had read it's a very common symptom of the Commodore 64 Black Screen.

Not sure how many people are in the same situation as I, wanting to power a C64 using a C128 power supply, but if you are and you'd like to have the option of powering both, this was a $1.59 solution that works great for me!

I'd like to give a special Thank You to Dale from DDI for refining my idea and helping this come to fruition.

Cheers!

January 31, 2018

DOSPIx86: A Raspberry Pi Zero powered DOS computer inside a keyboard


Welcome to the future. Or the past. I've never been able to figure that out, which is why last fall I became obsessed with putting a Raspberry Pi Zero inside of an old keyboard. Once I first read about how small the RPi0's were going to be, I immediately thought how cool it would be to have one inside a keyboard. Sort of an all-in-one type of computer similar to the home computers of the 80's. Being me, I have most of the home computers of that era already that interest me, but I thought it'd be cool to try emulating DOS, so that became my mission for this project. I decided to call it DOSPIx86.

TRIALS AND TRIBULATIONS:

First I began looking to see what DOS emulators were available for the Raspberry Pi's. I found two available online. One is called Rpix86 and the other is a port of the well known DOSBox. The author for Rpix86 was very helpful in answering a couple of questions I had. I was curious to know if I could boot directly into the DOS prompt upon power up and also if it would work on a Zero. He wasn't sure about performance on the Zero and said he didn't know of a way to boot directly into the DOS prompt. So... going with that, I decided to go ahead and try my luck anyway. You don't know unless you try, right?

I only found 1 or maybe 2 people who had used Pi's inside keyboards who posted online and although super cool(check this out!), that was a bit much for me price wise and also described using a full sized Pi, not a Zero model. I wanted an older gray/beige type keyboard and I also thought I should try to find one with USB to avoid added trouble during the building process.

This lead me to the Keytronic E03601U1 USB Keyboard, which strangely, as of this writing, is still available on Newegg for under $20! I couldn't find any internal photos, but studying the shape and specs, it looked as though there might be room for a Pi Zero inside.

I took a chance and ordered one on eBay for maybe around $15. When I got it, I opened it up(which btw, is super easy and only uses clips to lock the shell together) and was pleasantly surprised to see a nicely organized and spacious case for modding.


I ordered the remaining parts I thought I'd need and when I received the RPi0 began checking out how I'd make it all fit. I knew I'd need a USB Hub, so that took some time figuring that out. Initially, I thought the Hubpixed would be perfect for what I was doing, but that turned into a bunk deal.

***BUYER BEWARE!*** The creator of  Hubpixed "Vikas Shukla" (http://referencedesigner.com) offers to sell these at his site and on Amazon, but after a few weeks of never receiving mine or responding to multiple emails, I had to file a claim on PayPal(for which I was successful!). Total BS and a waste of time for $15. Screw you man! ***BUYER BEWARE!***

I instead went with the Zero4U USB Hub available through Adafruit. Has the same form factor as the RPi0, since it's designed to stack back-to-back, so it fit nicely inside this case. I also tried the CJMCU-204, which I thought could be sorta cool, but it was too big.

While I was laying everything out, trying to decide how to fit everything inside the confines of the Keytronic keyboard, I looked at my options...

For USB the Raspberry Pi Zero has 1 Micro USB port for power and 1 Micro USB OTG port for external peripherals. I wanted to keep all the wiring inside the keyboard other than the power cable and HDMI cable. But I also wanted extra USB ports for a Mouse, Gamepad, etc., so I started looking into running wire from the test pads on the underside of the RPi0 to the USB Hub.

Underside of the Raspberry Pi Zero: Voltage and USB Test Pads

My thoughts on this were... I'll run the keyboard over to the USB Hub and the power the Hub via the test pads on the underside of the RPi0. Well, the theory of this is sound, but this set me back another month in fact.

I started reading about people who were having USB input dropouts and such with these stacking hubs that use the test pads for connection. I guess the wireless signal from the Zero W's(which is the model of Pi I was using) can interfere with the pogo pins that connect the Pi's test pads to the Hub. As a workaround, they include small Ferrite rings with each Zero4U Hub that wrap around the pogo pins, which didn't help me in my case. Since I wasn't using this as a stackable hub and since I was running almost a foot of wire from the Pi to the Hub, there was a big chance of getting dropouts.

Sure enough, after I had already spaced everything out in my head where the Hub, Pi and wiring needed to be and pretty much putting it all together, my keyboard input would drop out from the Hub. I tried disabling the wireless signals in the Zero W, which seemed to work at first, then started giving me problems again. Then I ordered an older Pi0 without Wireless/Bluetooth... Same issues!!!

At this point I was pretty bummed out. I got an awesome keyboard, fit everything inside, did all my wiring and still had issues running from the soldered test pads.

I did some tests and learned that I didn't have dropouts when I ran a direct USB cable from the USB OTG port on the Pi over to the Hub(with or without wireless enabled). So my next challenge became finding a way to keep my design, but keeping the wires behind the shell of the keyboard.

Sheesh. Writing this sounds like a nightmare. I'll be surprised if this keeps anyone's interest by this point! Lol!

So... Since the placement of the USB OTG Port on the Pi was so tight inside the keyboard, I needed to find a super small Micro USB Connector. The smallest profile Male Micro USB Connector I could find was the USB3150 available from Newark.

The super low profile USB3150 Male Micro USB Connector

I had never ordered anything from Newark, but was very happy with their CSR rep Leslie's help. I ordered some other things from them, such as a Pi3 and some soldering accessories and somehow the order got lost/damaged in the mail during transit(I know, what else can go wrong with this project at this point!). But Leslie was super friendly and had my item replacements sent out immediately and I got them the following day!

Once I had the super small USB3150's, I wired it up and... wait for it... it worked! No dropouts!

So... Now that all that long-windedness is out of the way... Here are some photos of how the project looks, was put together and turned out!

THE BUILDING PROCESS:

Figuring out how to fit the Pi inside

Mounting the Zero4U USB Hub with screws

Here I am testing LED's and Resistors for brightness and activity. I used 2K for the Power and 330ohm for Activity

Prepping my LED's and Power Button for easy installation/Removal

Installed and ready to plug into the RPi0

I cut the keyboard USB cable down to about a foot to run inside and under the circuit board to the USB hub

I replaced the Ferrite ring before installation

Making sure I know which wires connect to which solder point before removing

After trimming the USB cable down to size, I ran it under the circuit board and re-soldered

Trimmed down USB cable re-soldered and running over and under to the USB hub

Marking notches for HDMI and USB Power before using my Dremel

I used a Dremel tool to cut these notches out before smoothing them down with a small hand file

Testing to see if my updated plan will work: Running a USB directly from the USB OTG port to Zero4U hub

This wasn't my first choice, but after having input dropout, using the low profile USB3150 connector saved my design!

I added some 2-pin headers for the LED's and Power Switch: This allows me to open my case if I need to

Zero4U USB hub all in place with the notch cut out and Keyboard/Pi connected

While I was at it, I shaved off a bit of plastic here to allow removal of the SD Card

Everything in place: Notice both the Pi USB and Keyboard USB wiring is under the circuit board

Almost there!

Underside of the keyboard: Notice the small silver screws? Those are mounting the Pi and Hub in place

The Power LED stays on while it's powered up and the Activity LED flickers when the SD card is accessed

All put together!

An old Sierra classic!

BUILD NOTES:

DOS emulation on the Pi's isn't perfect and you can feel that with the RPi0's. They aren't as powerful as their larger counterparts. I was only aiming to run a computer ~286 era, so for me, it works out pretty well. Rpix86 is my choice for this setup. I can run it directly from the Raspbian console and it feels on time with the games I tested. DOSBox didn't perform too well for me with the different configurations I attempted.

For Rpix86 I had to add permissions, so that games could be saved/restored and it also helped load some games I couldn't get working after the initial install. Patrick Aalto the author of Rpix86 covers some of this in his helpful FAQ here. Also, in order for the audio to output to HDMI, I needed to use an -a0 command when loading the emulator.

The LED's are really handy for this setup and I am happy I spent the time installing them. I tend to use the Raspbian desktop for transferring the DOS files. The 3 available USB ports work great for flash drive/mouse and the power switch works great too. I looked into running a custom shutdown/startup script for the power button, but it didn't feel like I really needed it. If the unit is shutdown with a Sudo Halt command, I can simply press the power switch to turn it back on.

To use the Activity LED, I had to add a couple lines of code into the config.txt file in Raspbian:

dtparam=act_led_gpio=23
enable_uart=1

PARTS:

Keytronic E03601U1 USB Keyboard 
Raspberry Pi Zero W
Zero4U USB Hub
3 x 2-Pin Header Sockets/Plugs
1 Green, 1 Blue 3MM LED's
1 Pushbutton Switch



FINAL THOUGHTS:

Well, I hope this post can help someone out there that might be interested in doing something similar with an RPi0 and keyboard. I think this is pretty cool and I'm proud of what I was able to put together with a bit of work. It goes to show that with perseverance you can overcome a lot of obstacles.

I chose to focus on running DOS, but this setup could be used for all sorts of things you can dream up. I think it'd be great for running an Atari 8-Bit Computer, Commodore 64, ZX Spectrum, etc.

One idea out there are keyboard stickers that you can stick onto keys to mimic the keys of older systems. You could use this design with some stickers and have a dedicated Commodore 64 emulator running, etc.

I've seen stickers like these available for different systems
HELPFUL LINKS:

Adafruit: My main source for Raspberry Pi parts
Rpix86 Emulator
Rpix86 - Forum
Raspberry Pi Power LED guide


April 26, 2017

A new Speccy is coming! The "ZX Spectrum Next" is live on Kickstarter


The ZX Spectrum reborn: a new machine, fully compatible with the original computer, and packed with improvements and expansions.

That's right folks! A brand new ZX Spectrum called the "Next" is coming in early 2018. I would assume most people that are interested in this system are already aware of this project and the Kickstarter, but I'm excited to be getting one and thought I'd share the links to help promote this awesome new Speccy.

Keyboard/Case design by the legendary Rick Dickinson

The project goal was successfully funded in less than 48 hours(which is amazing and awesome!), so it's a go from this point forward. I have been keeping my eye on the project the past year and am very excited to see it coming along so nicely.

"And it also does extra good: part of all revenue generated by the project, in perpetuity, will go straight to the Royal National Institute of the Blind. We owe big thanks to the Amstrad / Sinclair brand holders who granted us the right to use their IP in exchange to this donation for one of the greatest charities around."

 I think that's great too! If you're interested, please check out the links and read up on this amazing new system.

Cheers!

LINKS:

Project Website
Facebook Group
Kickstarter