Commodore 64 USB Controller Adapter For Your PC

commodore_64_controller_usb_interface

[Frank], like many people, has a soft spot in his heart for the Commodore 64. He prefers to play his C64 games on his computer nowadays, but likes using his old school Competition Pro rather than some modern controller with remapped buttons. The only problem with using the controller is that his new computer doesn’t have any ports that accommodate its 9-pin D-sub connector.

The VICE emulator maps keyboard inputs to controller actions, so he decided to build himself a D-sub to USB adapter that implements a virtual USB keyboard. He wrote a firmware package for the Freescale MC9S08JS16L microcontroller that allows him to send keypresses to his emulator whenever he performs an action with his Competition Pro joystick.

The circuit looks easier to duplicate than some other C64 interfaces we have seen before, and as you can see in the video below, it works quite well. We imagine that this setup can be used to connect all sorts of old input devices to modern PCs with little to no tweaking.

[youtube=http://www.youtube.com/watch?v=SkqbnitMFDk&w=470]

11 thoughts on “Commodore 64 USB Controller Adapter For Your PC

    1. Or, you could just buy cheap chinese USB gamepad for $1-$2, take its electronics out and connect it to 9-pin D-SUB connector (you’ll probably need a few resistors and transistors to convert digital signals to analog 0-5V). You’ll get a real USB joystick interface for your retro joysticks, not just a keypress emulation…

  1. ^LOL!!! That’s bad ass! I bet Speedlink gets hammered in the next few days…

    And cool hack, but I’m pretty sure I have seen keyboard emulating HID adapters available for sale before. Make it work with paddles, too, and you got a winner. Also cool that it would work with controllers from other systems that used the same pinout, like the Atari 2600…

    1. Thanks. The nice WaitingForFriday project mentioned in the description has paddle support, and I’m sure there are lots of other USB keyboard emulators, because it’s a standard demo for most USB microcontrollers. I didn’t know the other before hackaday mentioned it, but at least I’m a better International Karate player :-)

      But the Freescale microcontroller is really inexpensive compared to e.g. a PIC with USB, and the V-USB with ATTiny2313, which could work for keyboard emulation, is only low-speed USB, which is too limited for some other USB experiments I’m planning.

  2. I’m preparing a similar thing but able to use Genesis, Nes, Gamecube and PSX pads on a single chip.

    I just begin the project and for now, it works for Genesis pad. Tomorrow, I should start with the NES pad.

    I’ll keep you informed but you can follow the progress on everythingbutpic.blogspot.com (in french for now)

    1. I guess you don’t like PICs? :-)

      Sounds cool, and the Teensy looks like a nice USB development board for it. I’ve subscribed your blog stream. English would be nice, but Google translator is really good.

      Did you tested the LaunchPad, which you’ve written about in your blog? It is nice for beginners, I’ve tested it, too: http://www.frank-buss.de/LaunchPad/

      1. Thanks for subscribing and happy to know that translation works correctly lol.

        The site name has a double meaning, the one you understood, and the other one (explained in the fisrt post) saying that the blog will talk of various micros except PICs as there are enough sites about it yet.

        Teensy is really great. I know a lot of haters will love that, but it’s even greater with Arduino software. I had more problems with my old Genesis pad (one button out of order and cable broken) than with the code to use it on PC…

        Think I’ll post today the Genesis pad part….
        Regardin Launchpad, I never took time to play with it. It’s still brand new in the box, and I don’t really need it, playing with AVRs and ARMs yet.

  3. Not much new here – this kind of thing been done hundreds of times before, so the uniqueness of this project is down the fact that he used a Freescale MCU (when everyone else woulda just used a ATtiny, or similar PIC).
    BTW, just to clarify something here, this project has little to do with a C64, apart from the fact that he’s using a C64 emulator, that 9-pin DSUB digital joystick is a standard that was used on most home computers of the time, Sinclair, Atari, et al. So, once you build one, it’s good for whatever emulator you want to run that requires a single digital stick. Frankly, I’d put some kind of interconnect on there so that different kinds of pads/sticks can be swapped in when needed.

    1. Right, just a quick hack, I’ve even used the keyboard example from the Freescale USB stack as a base, which would be as easy with most other USB microcontrollers, too, because this is a standard example in most USB libraries.

      Good idea with the interconnect. I was planning to do some configuration anyway, but with another HID USB endpoint in the same microcontroller and some small configuration program on PC, with which you can configure it as an USB keyboard or as USB joystick, and which input pins generated which keys or joystick positions.

      I’ll keep you informed at http://twitter.com/#!/frank_buss , if you like and maybe a new Hack A Day article for the full featured project.

Leave a Reply to Frank BussCancel reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.