Wednesday, April 11, 2012

Custom Case Build Part 2

The second part of the build I have not yet finished.   Well I finished it once then decided it was unfinished so there is still more to do.

As there is no mother board in my C64x case I needed to come up with a way to still use the keyboard.   I went with the simplest solution I could think of.   I bought a cheap USB hub at my local computer store, ripped it apart, soldered pin headers to it, and mounted it in my case.   I didn't want to modify the C64x case as it was rather spendy and I thought some day I may put a motherboard in it.   So to mount the USB hub I cut a piece of metal about the size of a mother board and mounted it in the case using the existing motherboard mounting points.    After that anything I added to the case was just mounted to the metal plate.
Once the keyboard was working I was pretty happy, but still planed to use the power light and button on the keyboard.  I built a board using an FTDI breakout board from Sparkfun, and a Parallax propeller.  The board has two headers for the power LED and power switch connectors.   I latter added two 9 pin connectors for commodore style joysticks.  I've been working on an application to control the LED on the keyboard and accept input from the power button and joysticks.
I'm still working on the app but it is coming along.   Most of the major features are in place and right now I am mostly working on getting it to look nice.   I tried to roughly follow the look of the commodore breadboard.
The sliders and radio buttons control the behavior of the LED.   It has 4 different modes: On, Off, Dimmed, Flashing, and Glowing.   The sliders adjust the absolute dim and rate of dimming, as well as amount of time the LED spends fully on and fully off. The board is capable of storing two profiles.   One for when the computer is sleeping and one for when it is awake.   Once you have saved these profiles to the board it will automatically change to those profiles when the USB buss is  asked to go to low power mode (this happens when the computer is sleeping) and when it comes out (when the computer wakes up).
The power button can preform several operations.   When the computer is sleeping it will wake it from sleep. When the computer is awake a quick tap will eject the CD/DVD/Blu-Ray from the drive.   This is handy since there is no physical eject button I have access in the 1541.   Holding it slightly longer will cause the computer to got to sleep.   And if you hold it for a few seconds it will shut the computer down.
The board also displays several pieces of information.   What Com port the board was detected on.   What firmware version the board is reporting, link indicators that include sending and reviving data, as well as indicators for joystick activity.
The two joysticks are mapped to keyboard presses.   They are configured to the default keyboard shortcut for the VICE keyboard joystick mapping.   The keys can all be changed by clicking the remap joystick button.
I will be releasing all the source code and schematics for this board and application soon.   I had packaged the boards firmware but am not releasing it as I added joystick support and that is not in the schematic. I do not believe I will be making any changes to the software on the board so as soon as I get the schematics done I will release the code.  The windows application still needs a few tweaks before I release it but it is essentially done.   I'm not much of a windows application developer so please don't laugh to much at my code.   Once I mount the the 9 pin joystick connectors in the case I'll make a video of the final product.   
This video shows an earlier version of the board (no joystick support) and an earlier version of the application.


Custom Case Build

I've been working on a new project for about a month.  Things are really coming along nicely but I haven't taken the opportunity to document much of it yet.    I'm trying to rectify that now.
The project is about 95% complete so I better get on with it before I forget how it all works.

This project originated from the news that the rights to the Commodore name had been purchased and there was a product being released (the Commodore 64x) that looked just like the original Commodore 64 with a modern keyboard layout and hardware.    After investigating these (http://www.commodoreusa.net/) I was amazed but found them too expensive.

I eventually did purchase the bare bones case planing on building my own system.    However I ran into a snag.  The slope of the case to accommodate the keyboard really limits the space for your motherboard.   Depending were components were located on the board they may not fit in the case.   I bought a board that will not fit.    Here is were my project began.

With several options in front of me I finally settled on building my own case out of a 1541 drive I had laying around for parts, and converting the case into a keyboard.  The final product is pretty nice.  
  • Slot Load Blu-Ray player that slides out of the original floppy drive slot
  • Full use of Commodore keyboard case via internal hub (only USB cable to run it all)
  • Custom board (ruining on a Parallax Propeller) to control the power light and button
  • Custom software to interface with the board
  • Commodore style joystick ports.
My plan is to document the steps I've taken so far and to release all the code for the firmware and software.  Be warned my embedded programming is much better than my application programming.

Before I begin I must mention that I collect vintage computers, primaraly Commodore so I would ask that if you do make one your self, be kind to the collectors and try to find a broken drive and not sacrifice a working drive.

To build this I used parts from an old computer case, and a mostly striped Commodore 1541 drive.   To begin I stripped the floppy drive down to the plastic components, trimmed the tabs of the floppy drive face plate so it could sit flush against the Blu-Ray drive, and hot glued it in place.
The next step was to cut down the internal metal chassis to allow a motherboard to fit in the back of the case, and the front to mount the drives to.

At this point I built a mount for the laptop Blu-Ray drive using a the 3.5 mounting hardware from a sacrificial computer case. After cleaning up all the edges and surfaces so that
 the bracket could sit flat I mounted it temporarily in the case to measure for the Optical drive.
Once this is in place you can mark the proper height to cut for the optical drive to mount.  When you cut the bracket you'll leave the other side long to mount the hard drive.   The mounting points for the optical drives are disturbingly small.   I believe they are 3mm screws so you have to measure very carefully to drill the holes to mount the drive.

I mounted the hard drive using a 3.5 to 2.5 mounting bracket.   This was simply attached to the 3.5 bracket on the side that was left long.
This can now be loaded into the 1541 case.
This first part of the build was the most difficult portion.  The optical drive must be very carefully mounted to allow the disc to slide through the slot.  Mounting the motherboard was accomplished by cutting the two rear posts down to allow the board to fit, cutting a whole in the back for the parts, and dry fitting the board in the case.   I used an auto punch to mark where to mount the standoffs.  There were a few alignment issues with the feet on the bottom of the drive, but a small notch fixed this.
I drilled two holes in the top of the case for the power connector and power switch.
The last step was to solder on the power led, and hard drive led connectors from the other case to the LEDs on the floppy drive. 
To fix the posts I had to cut for the motherboard to fit I used some plastic spacers to mount the rear screws.
This is  a video I shot when I first got it up an running.   I'm working a better on for the complete project.
That covers the 1541 portion of the build.  I'll cover the keyboard next.