SegaXtreme

I use the following routine to poll pad status

GetPAD:

clr.l d0

clr.l d1

move.b #$40,$A10003

move.b $A10003,d0

andi.b #$3F,d0

move.b #$00,$A10003

move.b $a10003,d1

andi.b #$30,d1

lsl.b #2,d1

or.b d1,d0

not.b d0

move.b d0,PADSTATE

rts

Then, for making things easy, If any button is pressed, I call a routine to wait for all of them to be released...



WaitNoButton:

bsr GetPad

btst.b #PAD_A, PADSTATE

bne WaitNoButton

btst.b #PAD_B, PADSTATE

bne WaitNoButton

btst.b #PAD_C, PADSTATE

bne WaitNoButton

btst.b #PAD_START, PADSTATE

bne WaitNoButton

rts

But this does not work for UP, DOWN, RIGHT, LEFT.

If I do

-

jsr GetPad

btst.b #PAD_LEFT, PADSTATE

bne -

It seems to not wait in the loop...

BUT it works for any button (A,B,C and START)...

Anyone knows about this??

Thank you!
Top