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.

No comments:

Post a Comment