1
0
Fork 0

add ButtonMapping

This commit is contained in:
sup39 2023-02-14 14:03:47 +09:00
parent a2ce8c1414
commit 01c12a53ac
2 changed files with 20 additions and 0 deletions

4
src/ButtonMapping.ld Normal file
View file

@ -0,0 +1,4 @@
$$ = 0;
/* 0x80011c18 in GMSJ01 */
$C2$.postPADClamp = 0x40 + JUTGamePad.read;

16
src/ButtonMapping.s Normal file
View file

@ -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