From 01c12a53ac9e8e06e43e54fba213b4ed67111988 Mon Sep 17 00:00:00 2001 From: sup39 Date: Tue, 14 Feb 2023 14:03:47 +0900 Subject: [PATCH] add ButtonMapping --- src/ButtonMapping.ld | 4 ++++ src/ButtonMapping.s | 16 ++++++++++++++++ 2 files changed, 20 insertions(+) create mode 100644 src/ButtonMapping.ld create mode 100644 src/ButtonMapping.s diff --git a/src/ButtonMapping.ld b/src/ButtonMapping.ld new file mode 100644 index 0000000..8953e55 --- /dev/null +++ b/src/ButtonMapping.ld @@ -0,0 +1,4 @@ +$$ = 0; + +/* 0x80011c18 in GMSJ01 */ +$C2$.postPADClamp = 0x40 + JUTGamePad.read; diff --git a/src/ButtonMapping.s b/src/ButtonMapping.s new file mode 100644 index 0000000..948afa0 --- /dev/null +++ b/src/ButtonMapping.s @@ -0,0 +1,16 @@ +.set rBtn, 11 + +.postPADClamp: +## read button input + lhz rBtn, 0(r31) + +.map.Z.to.DR: + cmplwi rBtn, 0x10 + bne .map.Z.to.DR.done + li rBtn, 0x2 + sth rBtn, 0(r31) +.map.Z.to.DR.done: + +.done: +## orig + li r29, 0