diff options
author | luckytyphlosion <alan.rj.huang@gmail.com> | 2015-05-10 15:46:49 -0400 |
---|---|---|
committer | luckytyphlosion <alan.rj.huang@gmail.com> | 2015-05-10 15:46:49 -0400 |
commit | ff3eec920a463fbc8854edf73371dee377dff054 (patch) | |
tree | 904344a006b369dd795d41dc647fc763c97667b7 | |
parent | a5cb0cbc3633f90bdf054f80cf9551809c90a5f1 (diff) |
Delete joypad.asm
-rw-r--r-- | home/joypad.asm | 39 |
1 files changed, 0 insertions, 39 deletions
diff --git a/home/joypad.asm b/home/joypad.asm deleted file mode 100644 index 2002bb29..00000000 --- a/home/joypad.asm +++ /dev/null @@ -1,39 +0,0 @@ -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 - - ld [rJOYP], a - rept 6 - ld a, [rJOYP] - endr - cpl - and %1111 - swap a - ld b, a - - ld a, 1 << 4 ; select button keys - ld [rJOYP], a - rept 10 - ld a, [rJOYP] - endr - cpl - and %1111 - or b - - ld [hJoyInput], a - - ld a, 1 << 4 + 1 << 5 ; deselect keys - ld [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 |