Wednesday 19 February 2014

C64 Autoboot kludge, Arduino and AVI

Just a little fooling around with Arduino: an autobooting Commodore 64.

Not visible: The SD2IEC drive to the left.
I've taken 5V for the Arduino from the C64 user port. As the C64/Arduino powers up, the Arduino will wait for a few seconds and send out three digital output signals in succession. These are used to "press" the keys F7, F1 and RETURN in order. With Action Replay VI connected, these keypresses enter the fastload mode and load the first file on the disk.

This basically follows Marq's Joyduino, and uses the same logic chip (CD4066) to control the key presses. The 4066 has been nice for learning about logic in electronics so I may return to the topic later.

Well, it's a bit trivial. The applications for a system that ties down a C64, an Arduino and an AVI must be fairly narrow...! For cross-development, it might be funny to have the C64 run your code automagically. But way I feel it's not like pressing a couple of keys is that problematic.

All the three keys connect to the same matrix row, hence only 4 cables to the keyboard connector. (Also note the SwinSID Nano to the left!)
The setup currently only works when the computer is properly powered up. The Action replay reset does not reset the Arduino. That behaviour might not be desirable, though.

Getting rid of the keyboard is maybe the more interesting thing here. I'm using SD2IEC as a drive here, which is currently the affordable solution for mounting disk images from an SD card on a C64. The bootup can basically load an SD2IEC filebrowser which also works with joysticks. Currently I've repurposed (=messed) my filebrowser so I could not show that as an example. (Also note the keypresses could be faster, but the SD2IEC needs to wait a while to get its act together)

Can I use the Arduino to type in all kinds of interesting things, like LOAD "*",8,1[RETURN] ? Well, no, not at the moment. The approach for fully hijacking the keyboard matrix is quite different, and I'm still pretty clueless about that. This solution is only good for a few keypresses. Also, the presses need to be clearly separated, otherwise unwanted connections may happen.

One more thing to consider:  The poor old C64 Power Supply. I'm not too sure about burdening it with both the cartridge and the Arduino.

Saturday 8 February 2014

Commodore 64 "six-by-four"

I happened to have some wood pieces around suitable for this experiment. The joke is that a less-used nickname for the C64 in Finland was "kuuslankku", literally "fir board". (Fir/six are homonyms in Finnish) ...calling the C64 a "two-by-four" -> "six-by-four" might somewhat explain it. 

The other motive was to reduce the footprint of the C64, which is clearly possible with the short motherboard. A vertical positioning might offer a more radical solution, but I want to have the keyboard and case integrated. Rest assured, collectors! I have not ruined anything. I'm aiming for a reversible solution. 

The ultimate aim is to create a casing that is more overall wooden in appearance, but with this model I've merely begun to study the possibilities. These tend to take long time to materialize, so I felt some WIP images might be in order. 

(Oh, C64 is so widespread that somebody has probably done all this before. I'm not going to look because it would be de-motivating at this early stage. Maybe later!)

From the side, it's currently even taller than the breadbox. This may change. For me, the keyboard does not need to be effective for typing/coding, just as long as the computer can be operated. It is more important to connect the keyboard unit in a way that permits easy access to the board inside. (For changing the SID, for example). This is the more challenging part not addressed here. I'm currently toying with the idea of making a groove into the front panel, to which the keyboard unit "slides in". This would also lower the keyboard.

The image above shows something of how the board lies on two "rails", which are connected together with a thin chipboard plate screwed in. The rails are unnecessarily tall but then again this made it possible to clamp-glue the front panel.

The piece of plywood on the right is not screwed in into the metal, it just rests on it. (Basically it also shows the limit for lowering they keyboard.) The motherboard is screwed onto the two rails. There are metal nuts between the board and the rails so that the circuit board does not touch the rails.

Here is an idea of how much footprint has been won. Of course, the cartridge protrudes a bit uncomfortably from the back. I think one centimeter could still be won by using thinner wood, but it might not be worth the trouble.