[dorkbotpdx-blabber] Simplifying the NES controller
Paul Stoffregen
paul at pjrc.com
Thu Sep 11 18:11:10 EDT 2008
> Hi party people.
> Could I possibly get this:
> http://www.zero-soft.com/HW/USB_NES/index.php
> to use a Benito instead?
>
You most certainly could, with quite a bit of programming effort.
Reading the shift register from the old NES controller is easy. You
could even use the SPI port to do it, rather than manipulating the pins
directly. That Konami code door lock project I made a while back used
port pins, not SPI. It was very easy.
The USB HID, and generic USB stuff is where almost all the coding will
be. There is an example HID implementation on Atmel's website, using
the proprietary (expensive) windows-only compilers. There's also a
small matter of getting the HID and USB descriptors correct, which are
the bytes your computer reads to auto-detect (or "enumerate" in USB
lingo). Fortunately, this is about the simplest possible HID config,
where you have only one "report" that is just a single byte representing
8 buttons (still, it's absolutely . You could even just read the shift
register when you get the interrupt "IN" packet, put that byte in the
USB fifo and then set the 2 bits that case the AVR chip to send the
response. Very simple.
If you wanted to learn a lot of the gory details of how USB really works
by doing about the simplest possible USB project, this would definitely
be it!
-Paul
More information about the dorkbotpdx-blabber
mailing list