Shop OBEX P1 Docs P2 Docs Learn Events
Thud, Thud, - Help with N64 controller. — Parallax Forums

Thud, Thud, - Help with N64 controller.

Oldbitcollector (Jeff)Oldbitcollector (Jeff) Posts: 8,091
edited 2008-01-30 03:27 in Propeller 1
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
Got an SD card? - PropDOS
A Living Propeller FAQ - The Propeller Wiki
(Got the Knowledge? Got a Moment? Add something today!)

Comments

  • CJCJ Posts: 470
    edited 2008-01-30 02:06
    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)Oldbitcollector (Jeff) Posts: 8,091
    edited 2008-01-30 03:27
    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
    Got an SD card? - PropDOS
    A Living Propeller FAQ - The Propeller Wiki
    (Got the Knowledge? Got a Moment? Add something today!)

Sign In or Register to comment.