PDA

View Full Version : Thud, Thud, - Help with N64 controller.



Oldbitcollector (Jeff)
01-30-2008, 09:25 AM
That was the sound my my head banging against the desk..

I'm attempting to read the N64 controller using the driver in OBEX.
It has a nice demo which displays in the text driver, but for the life
of me I can't seem to read it with an if statement.

I've tried variations on a theme without success...





if num.dec(N64.R)> 0 'Nintendo64 R = Start
joy_bits := %00010000

if num.bin(N64.ST,1) ==1 'Nintendo64 Start = Start
joy_bits := %00010000





Has anyone here worked with this?

Thanks
OBC

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
New to the Propeller?

Getting started with the Protoboard? - Propeller Cookbook (http://ucontroller.com/Propeller%20Protoboard%20Designs%20for%20the%20Beg inner.pdf)
Got an SD card? - PropDOS (http://www.orrtech.net/propdos/)
A Living Propeller FAQ - The Propeller Wiki (http://propeller.wikispaces.com/)
(Got the Knowledge? Got a Moment? Add something today!)

CJ
01-30-2008, 10:06 AM
I wrote that driver and the buttons return 1 for pressed and 0 for unpressed, it looks like you are using the return value from num.bin() rather than the N64.st for your if statements

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Parallax Forums - If you're ready to learn, we're ready to help.

Oldbitcollector (Jeff)
01-30-2008, 11:27 AM
Duh! Thanks, that got my head screwed on straight!

I've submitted a gamepad_drv_001 which uses your driver to obex.
Thanks for the help!

OBC

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
New to the Propeller?

Getting started with the Protoboard? - Propeller Cookbook (http://ucontroller.com/Propeller%20Protoboard%20Designs%20for%20the%20Beg inner.pdf)
Got an SD card? - PropDOS (http://www.orrtech.net/propdos/)
A Living Propeller FAQ - The Propeller Wiki (http://propeller.wikispaces.com/)
(Got the Knowledge? Got a Moment? Add something today!)