Jump to content



0

7800 joystick input


2 replies to this topic

#1 Happy_Dude OFFLINE  

Happy_Dude

    River Patroller

  • 4,208 posts
  • Forum Slacker
  • Location:Sydney, Australia

Posted Sun Nov 21, 2004 8:24 AM

I must be missing somthing

I set the ports to input

lda #0
sta CTLSWA

Then it should be a simple matter of loading SWCHA and checking for zeros
But thats not working for me.
Do I need to read the stick at a certain point (like in vblank) or somthing :?

#2 Mitch OFFLINE  

Mitch

    Quadrunner

  • 5,769 posts
  • 7800 Guy
  • Location:Southern California, USA

Posted Sun Nov 21, 2004 6:11 PM

Here's some info form the 7800 dev kit.

How to use the right and left joystick buttons (7800 games only):

Initialize SWCHB with the following 4 instructions:



LDA  #$14

STA  CTLSWB

LDA  #0

STA  SWCHB





Read the fire buttons from:



INPT0   -  player 0, right button (d7=1 if pushed)

INPT1   -  player 0, left button  (d7=1 if pushed)

INPT2   -  player 1, right button (d7=1 if pushed)

INPT3   -  player 1, left button  (d7=1 if pushed)

Hope that helps.

Mitch

#3 Happy_Dude OFFLINE  

Happy_Dude

    River Patroller

  • 4,208 posts
  • Forum Slacker
  • Location:Sydney, Australia

Posted Mon Nov 22, 2004 4:31 AM

Thanks :) I only need 2 inputs at the moment so that helps a lot
But how on earth do you read the stick :?
All the source I have either AND's SWCHA or checks the bits.
And neither method works for me.




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users