C64 Keyboard Emulation Over Serial

There’s a lot of reasons you might want to emulate the keyboard on your Commodore 64. The ravages of time and dust may have put the original keyboard out of order, or perhaps you need to type in a long program and don’t fancy pecking away with the less-than-stellar feedback of the standard keys. [podstawek] has come up with the solution: a Commodore 64 keyboard emulator that works over serial.

It’s a simple concept, but one that works well. A Python script accepts incoming keypresses or pre-typed text, then converts them into a 6-bit binary code, which is sent to an Arduino over the serial connection. The Arduino uses the 6-bit code as addresses for an MT8808 crosspoint switch.

MT8808 Functional Diagram from Datasheet

The MT8808 is essentially an 8×8 matrix of controllable switches, which acts as the perfect tool to interface with the C64’s 8×8 keyboard matrix. Hardware wise, this behaves as if someone were actually pressing the keys on the real keyboard. It’s just replacing the original key switches with an electronic version controlled by the Arduino.

[podstawek] already has the setup working on Mac, and it should work on Linux and Windows too. There’s a little more to do yet – modifying the script to allow complex macros and to enable keys to be held – so check out the Github if you want to poke around in the source. Overall it’s a tidy, useful hack to replace the stock keyboard.

The C64 remains a popular platform for hacking — it’s even had a Twitter client since 2009.

Atari Now Runs Java, Thankfully Doesn’t Require Constant Updates

Java Grinder is a tool that compiles Java programs to run on platforms like microcontrollers and consoles, by outputting native assembly code and using APIs to work with custom hardware like bespoke graphics and sound chips. Amongst other hardware, Java Grinder supports the Commodore 64, which uses a variant of the 6502 CPU. [Michael Kohn] realized the Atari 2600 shares this processor, and figured he’d get started on making Java Grinder work with the Atari by expanding on the C64 work done by [Joe Davisson]. Together, they brought Java to the Atari 2600 and made a game along the way.

According to [Michael], parts of the project were easy, as some Java routines compile down into as little as 1 or 2 instructions on the 6502. Other parts were harder, like dealing with the graphics subsystem, and modifying Java Grinder to output 8-bit bytecode to fit into the Atari’s tiny 4K ROM limit. Even with this tweak, they still couldn’t fit in a game and title screen. In the end they relied on bank switching to get the job done. [Joe]’s game is pretty solid fare for the Atari 2600 — blocky graphics and bleepy sounds — and they’ve uploaded it to the page so you can try it yourself in an emulator.

At the end of the day, porting Java code to a system with 128 bytes of RAM probably isn’t going to be particularly useful. However, as a coding exercise and learning experience, there’s a lot of value here in terms of building your skills as a coder. Other such experiments have shown us Java running on other unexpected devices, like the Sega Genesis or the MSP430. Video after the break.

Continue reading “Atari Now Runs Java, Thankfully Doesn’t Require Constant Updates”

Slack, Backwards Compatible With 1982

Slack is great, but there are a few small problems with the current implementations. There isn’t a client for Palm, there isn’t a client for the Newton, and there isn’t a client for the Commodore 64. The last of these severe oversights was recently fixed by [Jeff Harris]. He built a native Slack client in 6502 assembly for the Commodore 64.

When dealing with network applications and the C64, the first question that comes to mind is how to talk to the outside world. There are C64 NICs, and ESP dongles, but for this build [Jeff] turned to the C64 Userport. This card edge combination of a serial and parallel port allows the C64 to talk to anything with RS-232, and with a simple adapter, [Jeff] got his old computer talking to a Raspberry Pi connected to the Internet.

The C64 Slack client itself is written in 6502 assembly, and features everything you would expect. The Pi is required to talk to the Slack API, though, and uses a NodeJS app to translate the bits from the C64 to something the API can understand.

Does it work? Of course it does. Slack is just text, after all, and there doesn’t seem to be any PETSCII weirdness here. You can check out a video of the build in action below.

Continue reading “Slack, Backwards Compatible With 1982”

Refurbishing Six Commodore 64s in Parallel

[Drygol] found himself with six Commodore 64’s in various states of disrepair. Because batch work is often more efficient, he detailed the process of restoring all of them in parallel in this one-, two-, three-part series.

The first step was to whiten the cases. Old cases turn yellow from the degradation of the fire retardant additives in the plastic. The proven method to fix this is with a paste called Retr0bright. [Drygol] used hair bleaching paste which is very similar. The cases came out nicely whitened from their treatment.

Next he repaired the keyboard PCB and whitened the keys as well. Drinking was involved, but it all came out okay. The circuit boards were cleaned and inspected. There were a few corroded spots, broken chips, and bad solder joints to be repaired. A few common mods were also installed.

In the final part of the series two of the C64s have SD cards installed into them. A few interesting fixes were done to repair broken plastics. Lastly the two worst cases were painted. In the end [Drygol] found himself with six perfectly working and attractive C64s. Who know’s what he’ll do with them, but we all know that was not the point.

The Immersive, VR, Internet of Things Unicycle

Want something that you’ll try for fifteen minutes before realizing it’s extremely stupid and has limited utility before throwing it in the back of a closet to eventually sell at a yard sale? No, it’s not the Internet of Things, but good guess. I’m speaking, of course, about unicycles.

[retro.moe] is a unicycle and Commodore 64 enthusiast, and being the enterprising hacker he is, decided to combine his two interests. This led to the creation of the Uni-Joysti-Cle, the world’s first unicycle controller for the Commodore 64, and the first video game to use this truly immersive, better-than-an-Oculus unicycle controller.

The build began with the creation of Uni Games, the unicycle-enabled video game for the Commodore 64. This game was coded purely in 6502 assembly and features realistic physics, cutting edge graphics, and two game modes. It’s available on [retro.moe]’s site for the C64 and C128 jin PAL and NTSC formats.

Every game needs a controller, and for this [retro.moe] turned to his smartphone. A simple Android app with a few buttons to send up, down, left, and right commands to an ESP8266 chip attached to the C64’s joystick connector.

While a smartphone transmitting controller commands may seem like a vastly over-engineered joystick, there’s at least one thing a smartphone can do that a joystick cannot: poll an accelerometer. When the joystick senses movement, it transmits movement commands to the video game. Strap this phone to the pedal of a unicycle, and it’s the world’s first unicycle controller for a video game. Brilliant, and [retro.moe] can ride that thing pretty well, too.

Thanks [nfk] for sending this one in.

Continue reading “The Immersive, VR, Internet of Things Unicycle”

Giving the C64 A WiFi Modem

If there’s any indication of the Commodore 64’s longevity, it’s the number of peripherals and add-ons that are still being designed and built. Right now, you can add an SD card to a C64, a technology that was introduced sixteen years after the release of the Commodore 64. Thanks to [Leif Bloomquist], you can also add WiFi to the most cherished of the home computers.

[Leif]’s WiFi modem for the C64 is made of two major components. The first is a Microview OLED display that allows the user to add SSIDs, passwords, and configure the network over USB. The second large module is the a Roving Networks ‘WiFly’ adapter. It’s a WiFi adapter that uses the familiar Xbee pinout, making this not just a WiFi adapter for the C64, but an adapter for just about every wireless networking protocol out there.

[Leif] introduced this WiFi modem for the C64 at the World of Commodore earlier this month in Toronto. There, it garnered a lot of attention from the Commodore aficionados and one was able to do a video review of the hardware. You can check out [Alterus] loading up a BBS over Wifi in the video below.

Continue reading “Giving the C64 A WiFi Modem”

Adding A Second Drive To A Forgotten Commodore

Commodore would never release a laptop, or really much of anything resembling the chunky luggable portable computers of the 1980s. This doesn’t mean a ‘Commodore LCD’ wasn’t designed – it’s sitting in [Bil Herd]’s basement. Of the entire Commodore lineup, the only computer that could remotely be called ‘portable’ is the SX-64, the ‘executive’ version that came with a built-in 5″ monitor, the usual C64 circuitry, one floppy drive, and an empty hole that could obviously hold a second floppy drive. Something must be done about that missing floppy drive, and it only took thirty years for someone to do something about it.

While the conversion requires mucking around in an already tight enclosure, the parts for this conversion are readily available thanks to a few people trying to repair an SX-64, giving up, and parting the whole thing out on eBay. These parts include the 1541 controller relabeled as the ‘FDD’ board in the SX-64, and of course the floppy drive itself. With the right teardown guide, putting the new drive in this old computer isn’t that hard; just remember to cut a jumper to assign the new drive a number other than 8.

The missing floppy drive of the SX-64 is what happens when marketing is put in charge of engineering. There were a few of these dual drive Commodore luggables back in ’83, and we have the computer magazine clippings to prove it. The official story is the power supply wasn’t beefy enough to handle the second drive. This mod, though, seems to work well enough, albeit with a distinct lack of somewhere to store a few floppies.

Find yourself getting sentimental while reading about this great hardware? Keep those feelings going by listening to [Bil] recount some stories from his time at Commodore.