
Sega Mega Drive (Genesis) to PC converter using an Arduino Uno
on May 17, 2012 at 7:25 pm
So I’ve been thinking about doing an electronics project for awhile, but I’ve never been too sure what to do. So when a friend suggested a retro gaming night I thought why not make a Sega Mega Drive to USB converter using one of these Arduino Unos I’ve been hearing so much about.
I bought one and was reading up about using the Uno as a USB HID device. All websites seemed to suggest that I’d have to reprogram the Uno board’s USB->Serial converter which I didn’t want to touch and one of the goals was to have the ATMega328 chip on a little board powered via the USB. So I searched the web some more and I stumbled across this little gem Practical Arduino Virtual USB Keyboard project.
With haste I bought the components required to make the USB circuit and wired the whole thing up using the breadboards in my starter kit, wires everywhere; I plugged it in ……. “Windows does not recognise this USB device” …… bah!
I searched the internet again and found one person having the same trouble, he said that the electronics store he had bought his from gave him 1W zener diodes and it just didn’t work. I checked mine they were 0.5W which is apparently the border line but they were all I could find. I then stumbled across 0.3W 3.6V Zener diodes but they were really small surface mounted packages which would make soldering fun! I ordered these (I now have 50!) and soldered them onto my project board and they worked a treat! yaaaay!
I followed the wiring diagram on the Practical Arduino webiste but instead of putting the 2k2 Ohm resistor into DIO5 I put it into the +5V line and it works just as well.
Then I added the chip mount onto the board and also the 16MHz crystal just wiring it straight into the ATMega328 chip seems to work fine but sites suggest putting capacitors to stop various electrical oddities.
Finally, I added the DB9 connector onto the board, I did have alittle trouble with this and that is the reason for all the brown wires. I did originally have it placed closer to the chip but my dodgy newbie soldering or something caused nothing to be read correctly from the controller.
Eventually, I got it working ![]()
The software side of things is alittle bit more interesting. With the VUSB library the ATMega328p pretends to be a USB keyboard so each button press pretends to be a keyboard press. I could’ve and probably should make it an actual USB Gamepad but since I had code that already worked as an input that 99.9999% of emulators could read I decided to just go with that.
The VUSB library I used however sends the key event then immediately clears the input so it looks like a quick key down then key up event to the OS which in turn looks kind of like Rapid fire mode while playing the game. To fix this I Added KeyDown and KeyUp functions which filled in the USB Descriptor with the current buttons down then if any are released they are cleared from the USB Descriptor.
*phew* an interesting and nice starter project. I am starting to think what my next project will be
I have put more pictures below.
Thanks for reading!










