summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorluckytyphlosion <alan.rj.huang@gmail.com>2015-05-10 15:45:20 -0400
committerluckytyphlosion <alan.rj.huang@gmail.com>2015-05-10 15:45:20 -0400
commitdae43e450716915c583f64da7a43ef8f501ba9a3 (patch)
tree20b1a600a2a61e278e8506ac1399073d1ca05f4f
parentce4afb494e2ce5d53f2c9afbf12f5ebe98f9e483 (diff)
Merge readjoypad.asm with joypad.asm
-rw-r--r--engine/readjoypad.asm31
1 files changed, 0 insertions, 31 deletions
diff --git a/engine/readjoypad.asm b/engine/readjoypad.asm
deleted file mode 100644
index 96897455..00000000
--- a/engine/readjoypad.asm
+++ /dev/null
@@ -1,31 +0,0 @@
-ReadJoypad_:: ; c000 (3:4000)
-; 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