diff options
Diffstat (limited to 'home/joypad.asm')
-rw-r--r-- | home/joypad.asm | 42 |
1 files changed, 4 insertions, 38 deletions
diff --git a/home/joypad.asm b/home/joypad.asm index 51a77fcc..15f10fe2 100644 --- a/home/joypad.asm +++ b/home/joypad.asm @@ -1,39 +1,5 @@ -ReadJoypad:: -; Poll joypad input. -; Unlike the hardware register, button -; presses are indicated by a set bit. - - ld a, 1 << 5 ; select direction keys - ld c, 0 - - ldh [rJOYP], a - REPT 6 - ldh a, [rJOYP] - ENDR - cpl - and %1111 - swap a - ld b, a - - ld a, 1 << 4 ; select button keys - ldh [rJOYP], a - REPT 10 - ldh a, [rJOYP] - ENDR - cpl - and %1111 - or b - - ldh [hJoyInput], a - - ld a, 1 << 4 + 1 << 5 ; deselect keys - ldh [rJOYP], a - ret - Joypad:: -; Update the joypad state variables: -; [hJoyReleased] keys released since last time -; [hJoyPressed] keys pressed since last time -; [hJoyHeld] currently pressed keys - homecall _Joypad - ret + homecall_jump _Joypad + +ReadJoypad:: + homecall_jump ReadJoypad_ |