gbdk-2020 | GameBoy Development Kit |
| download: https://git.y1.nz/archives/gbdk.tar.gz | |
| README | Files | Log | Refs | LICENSE |
commit 7c08346a6d55446fa75999dba5dc5994fa3038fb parent 13160071dc6ef7c52177dd98a06759a01b628c10 Author: Toxa <untoxa@mail.ru> Date: Thu, 9 May 2024 12:11:10 +0300 SMS: fix waitpadup()/waitpad() Diffstat:
| M | gbdk-lib/libc/targets/z80/gg/pad.s | 8 | ++++---- |
| M | gbdk-lib/libc/targets/z80/sms/pad.s | 8 | ++++---- |
2 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/gbdk-lib/libc/targets/z80/gg/pad.s b/gbdk-lib/libc/targets/z80/gg/pad.s @@ -28,13 +28,13 @@ _joypad:: .padup:: _waitpadup:: 1$: - ld h, #0x7f ; wait for .jpad return zero 127 times in a row + ld c, #0x7f ; wait for .jpad return zero 127 times in a row 2$: call .jpad or a ; have all buttons been released? jr nz, 1$ ; not yet - dec h + dec c jr nz, 2$ ret @@ -42,9 +42,9 @@ _waitpadup:: ;; Wait for the key to be pressed _waitpad:: .wait_pad:: - ld h, l + ld c, l 1$: call .jpad ; read pad - and h ; compare with mask? + and c ; compare with mask? jr z, 1$ ; loop if no intersection ret diff --git a/gbdk-lib/libc/targets/z80/sms/pad.s b/gbdk-lib/libc/targets/z80/sms/pad.s @@ -58,13 +58,13 @@ _joypad:: .padup:: _waitpadup:: 1$: - ld h, #0x7f ; wait for .jpad return zero 127 times in a row + ld c, #0x7f ; wait for .jpad return zero 127 times in a row 2$: call .jpad or a ; have all buttons been released? jr nz, 1$ ; not yet - dec h + dec c jr nz, 2$ ret @@ -72,9 +72,9 @@ _waitpadup:: ;; Wait for the key to be pressed _waitpad:: .wait_pad:: - ld h, l + ld c, l 1$: call .jpad ; read pad - and h ; compare with mask? + and c ; compare with mask? jr z, 1$ ; loop if no intersection ret
This webpage is intended to be an accessible preview of this repository. To get a fuller picture, clone it and use the git CLI.