raspberry pi

Building a PDP-8 Kit

A bit ago I picked up a PDP-8 replica kit, the PiDP-8. A kit can be picked up here http://obsolescence.wixsite.com/obsolescence/pidp-8-get-one . They are under $200, and I always found older computers interesting so I thought I would give it a shot. I also find The Digital Equipment Corporation and interesting tale of a far gone computing era. (There were t-shirts with the DEC logo on Amazon, but they are gone now)

IMG_4855.JPG

The kit itself is a little smaller than the original control panel; photo from the creators blog above. This is not a real PDP-8, it is a front panel with a Raspberry Pi on the back of it. The Raspberry Pi has an image that is on the user forums (which are incredibly helpful as well as a nice community) which boots very quickly and dives right into the modified emulator. The design is wonderful and just uses the pinout on the Pi.

I got the kit, then ended up moving across the country and did not setup the kit for several months. When I got to building the kit (2015 version, pictured above) it was 2016 and instructions were up for both version. Not many differences except the switches, and how they are mounted. My version needed me to remove pins from each switch then mount each on a rod to keep them aligned. The 2016 version also has more authentic looking switches. I got the switch rod put together with no difficulties.

Then it was down to soldering the trillions, well it felt that way, LEDS to the PCB that came on the kit. Small soldering is not my favorite thing, so this took a bit; but in the end it was done and I was happy with it.

I wanted to test my soldering skills, or lack there of. I plugged the Pi in, and started the image. A few of the lights dimly came up, the rest of them just were dead. Darn this means somewhere it’s broken. I did some traces with a multi-meter, and couldn’t find the fault. Then I realized while it was plugged in the one integrated circuit that handles the LEDs were was getting very hot. I emailed Oscar who made the project and he quickly responded and said it sounded like the integrated circuit was dead and he would mail one the next day or so.

He was extremely helpful and kind, and I got the new chip a few days later. I had to go to Radioshack, (I was surprised I could find one! And its no longer there a few months later) to get a desoldering wick. I haven’t used this before, but it helped me remove the old chip. I soldered the new chip in, and powered it up. Instantly it all came online! I wanted to check all the LEDs, to verify if the OS was keeping some off, or if the circuit was bad, I got a diagnostic program that was written for this system. It did indeed show there was a error, and after resolding a small point then everything was working!

Now that the system works, and I sized it in the box; it was time to paint the switches! I covered half of them with painters tape and painted some brown. Then later did another coat. Then did the white ones so they were not off white or having the red dots on them.

After it dried, I cut a hole in the side of the case so that I could access the USB ports of the Pi. I just had a tiny hobby hack saw and a drill, these were not the best tools to cut the hole but it worked out. I also put electrical tape over the edges of the hole to cover up my handiwork. Then I mounted the PCB with wooden blocks for support into the box. I got some velcro with tape on the back so attach the front panel; that way I can remove it whenever I want for service and easily reattach it.

I got a power switch that is inline with a USB cable. That way I can have a switch to power on and off the device. Then I thought the blinky lights were neat, so I mounted it on my wall for now. It boots directly into OS/8 and in idling does a little light show.

20160525_150912714_ios

The project came out well, and I am excited for Oscar to release his PDP-11 clone he has been working on in the background. I haven’t spent that much time programming it, but it is nice to have a piece of computer history above my desk. A big part of this project has been the awesome community over at the forum https://groups.google.com/forum/#!forum/pidp-8 and the kindness of the project owner and his willingness to help. Oscar’s blog has some cool stuff as well, http://obsolescenceguaranteed.blogspot.com/ .

Next I want to do an Altair 8800 kit, while I wait for the PDP11 version! https://www.altairduino.com.

Update: The Altair-Duino! Altair 8800 Kit

Mini Mac on Twitter

I was very excited to see Susan Kare borrow of of the mini Macs from a friend and give it a shout out on Twitter! These kind words from someone responsible for a lot of the original Macintosh design are quite humbling. 🙂

Mini Mac

Building a Tiny Classic Mac Part 3 – OS and Software

In building the project I wanted the computer to have the closest to the original feel as I could get. There were a few difficulties in the project, from the TFT screen, to the OS configuration. Yet in the end, I got a cute little replica running on top of a Raspberry Pi. I am not trying to break copyright, or profit from this. I simply do it as a fan of good hardware and past operating systems.

To start I want to mention that there are areas of this “guide” where I have been short, if you are unfamiliar with Linux, some of the parts in this config may give you problems. This project includes compiling code, adding scripts to boot, and configuring systems like VNC.

I loaded the standard Debian install onto a SD card to start (which at the time was Debian 6 or 7), then I started investigating the different original Motorola Mac emulators. The two main ones I found were Basilisk II and Mini vMac. Basilisk offers features such as Color, networking, and advanced features over Mini vMac. A very useful feature that Basilisk has is supporting a shared drive. You can tell the emulator that a folder on your Pi or any PC should show up as a hard drive in Mac OS 7. That way you can easily download games/software from archive.org or other locations, then load it onto the virtual system!

Mini vMac did offer greater compatibility for apps, while only being black and white, it seems to do a much deeper level of emulation; this makes it slower, but some apps that wont work on Basilisk will work on it. My solution in the end was to put both of the emulators on the box, pointing to the same virtual hard drive.

A script wraps the system, by default it auto boots into Basilisk, but if you “shutdown” the Mac in the emulator, you get a options screen that will allow you to switch modes the emulator is running in, the emulator itself, or some other settings. Some of the other settings including pairing Bluetooth, shutting down, or dropping to the console.

These files are available under https://github.com/daberkow/minimacparts. There is a SYSINIT script that starts the script, aka the wrapper, and gets the session started under the “pi” user, this goes in the /etc/init.d folder. Then there are folders for the different emulators in the /opt/mac folder.

Note: I used the current Raspberry Pi Debian build when I did this project, which at the time was using SYSINIT over the newer SystemD. If you want to use a newer build (which you probably should) you will have to translate my crummy SYSINIT script into a SystemD script. Feel free to pull request the repo! 🙂

One of the larger issues that had to be overcome was screen scaling. The screen I used is 480×320, but the original Macintosh resolution was 512 × 342. This had some of the emulators either cut off, or scrolling around the screen when the mouse got to a corner, which was not great. I could run the emulators at a smaller resolution, but some software was designed with that screen in mind and applications were cut off!

My solution was to use VNC, the system starts the emulator in a VNC session running at the native resolution, then the Pi screen connects to that session and enables scaling mode, shrinking it to the proper size. This way VNC worries about all the scaling, at a minor speed loss. I looked at different X configs to try to do the scaling that way, but the way this screen works, it gets upset and has problems very easily. The screen does not have a scaler of any sort, so you HAVE to send that resolution of 480×320 to it. The VNC solution works well. The different emulators have VNC config files that are copied to the running config right before its run depending on the emulators properties.

At this point we should discuss dependencies; TightVNC server was used for VNC. A quick minor note about VNC, you need to config the VNC users password, and then setup the script to auto-login with that password for the above script to work. Bluez Bluetooth stack and utils were used to be able so use Bluetooth peripherals. Basilisk and Mini vMac were compiled from source on the Pi 2 so that I could squeeze the most performance out of the little PC. Also its hard to find the latest versions ARM compiled online.

Basilisk II:

Basilisk has a good make file that you can use on the Pi as long as you have standard development environment setup, https://github.com/cebix/macemu/tree/master/BasiliskII.

Mini vMac:

The authors website offers a nice little service to have the website compile to code for you, or you can compile it yourself. Depending on your screen and how you want the app to start (a lot of those settings are hard coded in at compile time) http://www.gryphel.com/c/var/index.html.

I made one virtual hard drive, that both emulators used. Luckily they use a compatible hard drive image format. I set the first image up on my desktop just because it was easier. Then copied it over once I got the image in a good state. For years Apple gave out for free on their website Mac OS 7.5.3, then after a website update it seem to break a lot of the links. A few still worked but most over the years have stopped working. A lot of different sites have mirrors of those disks available though, if you search “System_7.5.3_01of19.smi.bin”, that should bring you to one of the mirrors. The one other thing you need is a ROM for a original Macintosh. I have some classic Macs at home, and you can dump the ROM from those. Or there are sites out there that have them hosted, I would guess that would not be to hard to find.

I put the virtual hard drive, and the ROM in a folder called “Shared” in the /opt/mac directory. You may have to tweak some of the configs/scripts to get everything working your way.

Once you get it working, there are a ton of games and pieces of software on archive.org for the old Macintosh, just make sure you get the 680*0 versions not the PowerPC versions. There are also a ton of abandonware sites, since half the companies that made this software are out of business, I doubt they will mind you taking a look, though legally its a grey area.

Those are the basics for how I got the system setup. One item that gave me a bunch of problems was the TFT screen. At the time you needed to load separate kernel modules and configure boot parameters for it. I think newer kernel images have added this, so that should be a simpler task for everyone.

 

Building a Tiny Classic Mac Part 2 – Hardware and Wiring

The units themselves are laser cut acrylic. The front face that was put on the painted units was 3D printed. The designs for those pieces are on my GitHub page, https://github.com/daberkow/minimacparts . The original design was a tad bit smaller than the final unit. I ended up making it exactly about 1/3 scale, then realizing that there was not a screen on the market to do what I wanted to do. When I moved up to the 4″ screen, the resolution went up to a incredible 480×320. There were a bunch of issues around that resolution that I will get into in a later article.

For the Raspberry Pi I used a Raspberry Pi 2. The first version I made had a Pi 1 in it, and I ended up upgrading to the 2 just for the speed and added cores. With the system running a emulator, core 1 can get used up by that; having more available made sure things like SSH didnt lock up.

I designed two brackets, one set that holds the screen in place, and another that mounts the Pi to the inside of the case. The screen mounts are just two bars that are the exact with of the screen and help mount it inside, while leaving the port available for the IDE cable. The mount for the Raspberry Pi made it easier to take the Pi in and out of the case when building the unit. And a nice list so the Pi doesn’t get glued or screwed right into the side of the case.

IMG_2385

For the front USB port, I got a USB 3.0, 6 inch cable. The most important part of this cable is finding one with a 90 turn at the end that does not stick out a lot. The Raspberry Pi is mounted in the end to the side wall of the case, and there is not much clearance. A USB cable that comes out from the top of the Pi is better as well. I ordered the wrong one for this last build, and then had to bend it a bit so it wouldn’t push against the side of the case.

IMG_6358

A simple micro-usb extension cable was used for powering the Pi. The female jack goes to the back of the case, so that the unit can be powered. Again, the 90 degree male plug was important because that side sits right next to the screen. Audio was a random 90 degree 3.5mm extension cable off amazon. The first unit, the clear one, had a different make than ones i got later. Some of the later units had a splitter instead of a single extension. The original idea was to have a speaker inside for the start up sound. That quickly added to the complexity and was cut from the final project.

The networking port was important so that I could easily add new programs to it. The systems also had a tiny wifi receiver, but I figured hard wiring was also easy. That was a custom keystone jack to a RJ45 port.

I mentioned in Part 1 that the screen was connected to the Pi via a IDE extension cable. After looking around for other solutions that worked cleanly, this was the best one. The cable can handle the frequencies, and was easy to find. It also doesn’t do any flipping of pins or roll-over shenanigans.

To bring it all together, super glue was used, not the most glamorous, but strong and holds. I made a few little tools to help me try to put better right angles together when gluing the cases. Those didnt always work out great.

IMG_6349

To wrap up, I will go over my build order, just in case anyone decides to try to make one of their own. I would first get the front piece, and glue that to the side walls. Let that dry for a few hours at least, superglue likes to dry fairly fast, but I wanted it to be solid through and through. Then I would add the bottom front panel area, and the sliver that goes between the front bottom, and that bottom panel. After I put the bottom of the unit on, I would stop working on the main body. Now its time to get the screen, with it powered on and working with the Pi, line it up to where it looks good in the cut out.

After I have found the spot the screen should go, put the brackets on it, and glue it into place. This has to be a little carefully done, any spare glue that drips into the screen can make it look bad. Once the screen has dried, getting the mounting arms for the Pi bracket, and gluing them in place was done. There is not a real science to where it went, I would put the whole Pi sled in, then see where it seemed to work well with all the cables attached. Then sharpie those spots and glue the arms down, watching them long enough to make sure they didnt fall over. Once that was done, and I felt good about where the Pi was, I would glue two tiny blocks I 3D printed to hold the Pi sled in place.

Gluing the front USB isnt too bad, its putting it in position then gluing the edge of the extender into the place it should sit. The hardest part is not getting glue in the connector, and doing multiple layers so that it doesnt move with normal user use.

Getting the back to stay in place was my least favorite part. There are little L brackets I 3D printed that the back could screw into. They work well but lining them up and gluing them into place, and not the back itself was tiring. I would tighten the brackets a fair amount to the back plate, then get the plate into position and glue the bottom two brackets into place. Then I would do the top two. At this point gluing the different connectors into the back ports isn’t too bad. I also made brackets for them, the brackets are bigger than the whole so that it covers the whole port when the piece is in it. These brackets weren’t held with little arms like the Pi, just glued into place.

Finally the top was glued in, and then the last little top slant area. The screen I mentioned getting before may not be available from Amazon, but there are a ton of others that are all seem to be made by the same place, then had another brand stamped on them. For the last build I did, I grabbed another brand (link) and it worked with the same drivers out of the box.