From c1c7ac6826a5033fb06bc1b551bdd7bf4f806e50 Mon Sep 17 00:00:00 2001 From: luckytyphlosion Date: Sat, 1 Aug 2015 16:58:30 -0400 Subject: Attempt to make Yellow buildable, part 2. --- engine/joypad.asm | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'engine/joypad.asm') diff --git a/engine/joypad.asm b/engine/joypad.asm index 791056ca..bca84b33 100644 --- a/engine/joypad.asm +++ b/engine/joypad.asm @@ -2,14 +2,16 @@ ReadJoypad_:: ; c000 (3:4000) ; Poll joypad input. ; Unlike the hardware register, button ; presses are indicated by a set bit. - + ld a, [hReadJoypad] + and a + ret nz + ld a, 1 << 5 ; select direction keys - ld c, 0 + ;ld c, 0 ld [rJOYP], a - rept 6 ld a, [rJOYP] - endr + ld a, [rJOYP] cpl and %1111 swap a @@ -17,7 +19,7 @@ ReadJoypad_:: ; c000 (3:4000) ld a, 1 << 4 ; select button keys ld [rJOYP], a - rept 10 + rept 6 ld a, [rJOYP] endr cpl -- cgit v1.3.1-sl0p