Propeller-based NES Gamepad
Hi,
I just turned my $80 Propstick USB into a ($5?) NES Controller![smile.gif](http://forums.parallax.com/images/smilies/smile.gif)
- 8 Buttons to inputs 0 to 7 as described in the Education Labs
- 5V and Ground from my almost-a-demoboard-protoboard
- 3 Datlines with pulldown resistors connected between the props on both boards
- some lines of spin:
·This is what it looks like, chaotic wiring, I know...
![nes.jpg](http://www.secondpage.de/images/external/nes.jpg)
I tested it with Dodgy Kong and it works!
However·I had·to uncomment the "Delay(1)" lines in the NES_Read_Gamepad section of the sw_dkong_020.spin and add a delay function:
I know, this is bad coding, but I just need a tiny delay and hope I'll manage to write an asm driver, so the delay will not be necessary at all.
I realize that this is another one of my foolish projects, and a prop is total overkill for this task, but think of the possibilities:
- One could replace the buttons with sensors and play hydra-games with acceleration or ir sensors
- One could build a wii-controller-to-NES-converter and play NES games with wii-controllers
Cheers,
Clemens
Oh and thank you Steve and Eric for Dodgy Kong!!!
I just turned my $80 Propstick USB into a ($5?) NES Controller
![smile.gif](http://forums.parallax.com/images/smilies/smile.gif)
- 8 Buttons to inputs 0 to 7 as described in the Education Labs
- 5V and Ground from my almost-a-demoboard-protoboard
- 3 Datlines with pulldown resistors connected between the props on both boards
- some lines of spin:
CON _CLKMODE = xtal1 + pll16x _XINFREQ = 5_000_000 + 0000 PUB start |i DIRA[noparse][[/noparse]0..7]:=0 DIRA[noparse][[/noparse]18]:=0 DIRA[noparse][[/noparse]17]:=0 DIRA[noparse][[/noparse]16]:=1 repeat repeat while INA[noparse][[/noparse]17]==0 OUTA[noparse][[/noparse]16]:=!INA[noparse][[/noparse]7] repeat while INA[noparse][[/noparse]17]==1 repeat i from 7 to 0 repeat while INA[noparse][[/noparse]18]==1 OUTA[noparse][[/noparse]16]:=!INA[noparse][[/noparse]i] repeat while INA[noparse][[/noparse]18]==0 OUTA[noparse][[/noparse]16]:=1
·This is what it looks like, chaotic wiring, I know...
![nes.jpg](http://www.secondpage.de/images/external/nes.jpg)
I tested it with Dodgy Kong and it works!
However·I had·to uncomment the "Delay(1)" lines in the NES_Read_Gamepad section of the sw_dkong_020.spin and add a delay function:
PUB Delay(length) repeat length
I know, this is bad coding, but I just need a tiny delay and hope I'll manage to write an asm driver, so the delay will not be necessary at all.
I realize that this is another one of my foolish projects, and a prop is total overkill for this task, but think of the possibilities:
- One could replace the buttons with sensors and play hydra-games with acceleration or ir sensors
- One could build a wii-controller-to-NES-converter and play NES games with wii-controllers
Cheers,
Clemens
Oh and thank you Steve and Eric for Dodgy Kong!!!
Comments
I think there was an article in Nuts & Volts a few months ago about using an accelerometer as an input to the Hyrdra, my mind is fuzzy though.
A WII to NES converter would be cool!
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Timothy D. Swieter
www.brilldea.com·- uOLED-IOC, RGB LEDs, TLC5940 driver PCB
www.tdswieter.com
One little spark of imagination is all it takes for an idea to explode
BTW, Nice demoboard.. [noparse]:)[/noparse]
OBC
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
New to the Propeller?
Getting started with the Protoboard? - Propeller Cookbook 1.4
Updates to the Cookbook are now posted to: Propeller.warrantyvoid.us
Got an SD card? - PropDOS
Need a part? Got spare electronics? - The Electronics Exchange