No special drivers required. Implements a standard USB HID device
Picture Gallery
Adapter construction example using the surface mount circuit and an inline DIN connector:
Schematic
Here is the schematic and some connector pictures
(DINs on the left, MINI-DINs on the right) to help with the pinout: Component list:
Ref
Description
U2
Atmega8 microcontroller. ATMEGA8-16PC, ATMEGA8-16PI, ATMEGA8-16PJ or ATMEGA8-16PU. Don't use an ATMEGA8L-*, the 12Mhz clock would be too high.
R1
1.5k resistor. Ordinary carbon film 1/4 watt resistors will do.
R2, R3
68 ohm resistors. Ordinary carbon film 1/4 watt resistors will do.
D2, D3
3.6 volts zener diodes.
Y1
12 Mhz crystal.
C2, C3
18 pf capacitors. If the crystal datasheet recommends another value, use it instead.
C1
1uf capacitor. Install it near the ATmega8 power pins.
J2
6 pin header, 2.54mm spacing. Needed for programming the ATmega8.
For the USB connection, just strip the USB cable and solder the wires directly
to the board. USB uses standard wire colors:
Color
Description
Red
+5 volts
Black
Ground
Green
D+
White
D-
Programming
A microcontroller is a component which must be programmed in order to do
something useful. So here is the hexfile which must be uploaded to the microcontroller:
Special features added to support the Famicom controller with
microphone. Wire the 'jumpers' in NES mode and short PC0 and PC1
together to use this new mode. Wire the extra input (PC2) for the
microphone digital signal from the controller.
3 button mappings implemented for the abovementionned Famicon mode.
Fixed the device name. (It would be corrupted or would not appear since the last few releases)
Added Sega Paddle support (HPD-200). Auto-detected in DB9 mode. If the
circuit is installed inside the controller, the two buttons can be
wired independently.
Controller polling synchronized with USB polls. Helps maintain an
accurate timing when polling the controllers.
Changed the button IDs. Atari and SMS controllers were
using button 2 and 3. Some emulators require button 1 so....
Added a way to force 6 Button mode for genesis controllers. Just
in case your 6 button controller is not detected. Hold 'start' when connecting
the USB cable to use this feature.
Added support for Genesis 3 and 6 button controllers.
All DB9 controllers (Genesis 3/6, SMS, Atari style 1 or 2 button and
compatible) are auto-detected.
The wiring is now different for DB9 controllers. Easier to wire
to the multiuse PCB.
NES controllers are now detected in SNES mode. This works great with
original Nintendo controllers. If you have trouble with clones, use
NES-only mode.
The project is now released under the GPL v2 license
Fixed a bug which resulted in random button toggling when no
controller was connected to the circuit.
NES mode now has it's own USB product ID.
PD1 is left in input (and no pull-up) since PD1 and PD0 must
be shorted together in PCB rev.C (cleaner workaround than
throwing away a batch of 50 PCBs and easier than cutting a track
and soldering a wire...)
Many microcontrollers have what is called 'Fuse bytes'. In the case of the ATmega8, there
are two bytes: The high byte, and the low byte. Those bytes are used to configure some aspects
of the microcontroller. What type of clock to use? Crystal? Resonator? Internal RC clock? Allow
programming via ISP? It's very important to set the fuses to the right values. Using the wrong
values can render your MCU unusable.
For this project, here are the appropriate fuse values:
high byte = 0xc9, low byte = 0x9f
For details about how to program an AVR,
visit my AVR programming page.
For those who wish to modify the device behaviour or add support
for new type of gamepads, here is the source code. Starting with version
1.5, it is released under the GPL v2 license. Previous version were released under
the Objective Development license, which is basically GPL + extensions to
cover hardware. See License.txt for more information.
Special features added to support the Famicom controller with
microphone. Wire the 'jumpers' in NES mode and short PC0 and PC1
together to use this new mode. Wire the extra input (PC2) for the
microphone digital signal from the controller.
3 button mappings implemented for the abovementionned Famicon mode.
Fixed the device name. (It would be corrupted or would not appear since the last few releases)
Added Sega Paddle support (HPD-200). Auto-detected in DB9 mode. If the
circuit is installed inside the controller, the two buttons can be
wired independently.
Controller polling synchronized with USB polls. Helps maintain an
accurate timing when polling the controllers.
Changed the button IDs. Atari and SMS controllers were
using button 2 and 3. Some emulators require button 1 so....
Added a way to force 6 Button mode for genesis controllers. Just
in case your 6 button controller is not detected. Hold 'start' when connecting
the USB cable to use this feature.
Added support for Genesis 3 and 6 button controllers.
All DB9 controllers (Genesis 3/6, SMS, Atari style 1 or 2 button and
compatible) are auto-detected.
The wiring is now different for DB9 controllers. Easier to wire
to the multiuse PCB.
NES controllers are now detected in SNES mode. This works great with
original Nintendo controllers. If you have trouble with clones, use
NES-only mode.
The project is now released under the GPL v2 license
Fixed a bug which resulted in random button toggling when no
controller was connected to the circuit.
NES mode now has it's own USB product ID.
PD1 is left in input (and no pull-up) since PD1 and PD0 must
be shorted together in PCB rev.C (cleaner workaround than
throwing away a batch of 50 PCBs and easier than cutting a track
and soldering a wire...)
Objective Development driver modifications:
The NES/SNES mode selection jumper changes the HID report descriptor. I had to modify
Objective Development's usb driver to support this. Here is a diff against
the usb driver from HIDKeys.2006-03-14: usbdrv-diff
USB Vendor ID/Product ID pair:
Please do not re-use my VID/PID pair for derived or other projects. Instead, get your own.
I bought my VID/PID pairs from mecanique,
and they are much less expensive than the 2000$ US it cost to get a vendor ID from the usb implementers
forum.
PCB for surface-mount
The surface-mount version uses my Multiuse PCB2 circuit.
Here's what it looks like:
I cannot be held responsible for any damages that could occur to you
or your equipment while following the procedures present on this page.
Also, I GIVE ABSOLUTELY NO WARRANTY on the correctness and usability
of the informations on this page. Please note, however, that the procedures
above have worked in my case without any damages or problems.