Migrated to supSMSGecko 0.1.0a5; fixed bugs
This commit is contained in:
parent
421dc6591e
commit
18f008c224
13 changed files with 70 additions and 60 deletions
|
@ -2,6 +2,9 @@
|
||||||
Gecko codes for Super Mario Sunshine made by sup39.
|
Gecko codes for Super Mario Sunshine made by sup39.
|
||||||
|
|
||||||
## Prerequisite for compiling the codes
|
## Prerequisite for compiling the codes
|
||||||
- Python
|
- Python >= 3.8
|
||||||
- [devkitPro](https://github.com/devkitPro/installer/releases)
|
- [devkitPro](https://github.com/devkitPro/installer/releases)
|
||||||
- [supSMSGecko](https://github.com/sup39/supSMSGecko)
|
- [supSMSGecko](https://github.com/sup39/supSMSGecko) >= 0.1.0a5
|
||||||
|
```
|
||||||
|
pip install -U "supSMSGecko>=0.1.0a5"
|
||||||
|
```
|
||||||
|
|
|
@ -2,7 +2,7 @@ from supSMSGecko import make_xml, symbols, Button as B
|
||||||
|
|
||||||
def main(g, ver):
|
def main(g, ver):
|
||||||
S = symbols[ver]
|
S = symbols[ver]
|
||||||
addr_inst = 0x26 + S['TMarDirector::direct']
|
addr_inst = 0x26 + S['TMarDirector_direct']
|
||||||
addr_input = S['mPadStatus']
|
addr_input = S['mPadStatus']
|
||||||
# code
|
# code
|
||||||
g.write16(addr_inst, 600)
|
g.write16(addr_inst, 600)
|
||||||
|
|
|
@ -28,7 +28,7 @@
|
||||||
<source version="GMSJ01">
|
<source version="GMSJ01">
|
||||||
C20EAFA0 0000000A
|
C20EAFA0 0000000A
|
||||||
3C608040 A0A30D50
|
3C608040 A0A30D50
|
||||||
28050801 40A20038
|
28050208 40A20038
|
||||||
3C60817F 38A00001
|
3C60817F 38A00001
|
||||||
98A300B3 98A30100
|
98A300B3 98A30100
|
||||||
3C60803E 84A3600E
|
3C60803E 84A3600E
|
||||||
|
@ -41,7 +41,7 @@
|
||||||
<source version="GMSE01">
|
<source version="GMSE01">
|
||||||
C22979E4 0000000A
|
C22979E4 0000000A
|
||||||
3C608040 A0A34454
|
3C608040 A0A34454
|
||||||
28050801 40A20038
|
28050208 40A20038
|
||||||
3C60817F 38A00001
|
3C60817F 38A00001
|
||||||
98A300B3 98A30100
|
98A300B3 98A30100
|
||||||
3C60803F 84A3970E
|
3C60803F 84A3970E
|
||||||
|
@ -54,7 +54,7 @@
|
||||||
<source version="GMSP01">
|
<source version="GMSP01">
|
||||||
C228F87C 0000000A
|
C228F87C 0000000A
|
||||||
3C608040 A0A3BBF4
|
3C608040 A0A3BBF4
|
||||||
28050801 40A20038
|
28050208 40A20038
|
||||||
3C60817F 38A00001
|
3C60817F 38A00001
|
||||||
98A300B3 98A30100
|
98A300B3 98A30100
|
||||||
3C60803E 84A310CE
|
3C60803E 84A310CE
|
||||||
|
@ -67,7 +67,7 @@
|
||||||
<source version="GMSJ0A">
|
<source version="GMSJ0A">
|
||||||
C227768C 0000000A
|
C227768C 0000000A
|
||||||
3C60803F A0A35428
|
3C60803F A0A35428
|
||||||
28050801 40A20038
|
28050208 40A20038
|
||||||
3C60817F 38A00001
|
3C60817F 38A00001
|
||||||
98A300B3 98A30100
|
98A300B3 98A30100
|
||||||
3C60803E 84A3A8EE
|
3C60803E 84A3A8EE
|
||||||
|
|
|
@ -1,11 +1,12 @@
|
||||||
.set aArea, 14 + gpApplication
|
.set aArea, 14 + gpApplication
|
||||||
.set aBL, 1160 + TMarDirector_updateGameMode
|
.set aBL, 1160 + TMarDirector_updateGameMode
|
||||||
|
.set $button, 0x208
|
||||||
|
|
||||||
.L_C2:
|
.L_C2:
|
||||||
# check input
|
# check input
|
||||||
lis r3, mPadStatus@ha
|
lis r3, mPadStatus@ha
|
||||||
lhz r5, mPadStatus@l(r3)
|
lhz r5, mPadStatus@l(r3)
|
||||||
cmplwi r5, 0x801
|
cmplwi r5, $button
|
||||||
bne+ .L_done
|
bne+ .L_done
|
||||||
# reset QFT
|
# reset QFT
|
||||||
lis r3, 0x817F
|
lis r3, 0x817F
|
||||||
|
|
|
@ -2,6 +2,6 @@ from supSMSGecko import make_xml, symbols
|
||||||
|
|
||||||
def main(g, ver):
|
def main(g, ver):
|
||||||
S = symbols[ver]
|
S = symbols[ver]
|
||||||
g.C2(48+S['TMarDirector::updateGameMode'], 'code.s')
|
g.C2(48+S['TMarDirector_updateGameMode'], 'code.s')
|
||||||
|
|
||||||
make_xml(main)
|
make_xml(main)
|
||||||
|
|
|
@ -36,9 +36,9 @@
|
||||||
7D8803A6 4E800020
|
7D8803A6 4E800020
|
||||||
60000000 00000000
|
60000000 00000000
|
||||||
C21945AC 00000009
|
C21945AC 00000009
|
||||||
3C608040 A0630D50
|
3C808040 A0840D50
|
||||||
54600436 2C000800
|
54800436 2C000800
|
||||||
4082002C 54630EFD
|
4082002C 54840EFD
|
||||||
41820024 806D98B8
|
41820024 806D98B8
|
||||||
806303F0 93E300F0
|
806303F0 93E300F0
|
||||||
7FE3FB78 81830000
|
7FE3FB78 81830000
|
||||||
|
@ -59,9 +59,9 @@
|
||||||
7D8803A6 4E800020
|
7D8803A6 4E800020
|
||||||
60000000 00000000
|
60000000 00000000
|
||||||
C21BC5C4 00000009
|
C21BC5C4 00000009
|
||||||
3C608040 A0634454
|
3C808040 A0844454
|
||||||
54600436 2C000800
|
54800436 2C000800
|
||||||
4082002C 54630EFD
|
4082002C 54840EFD
|
||||||
41820024 806D9F28
|
41820024 806D9F28
|
||||||
806303F0 93E300F0
|
806303F0 93E300F0
|
||||||
7FE3FB78 81830000
|
7FE3FB78 81830000
|
||||||
|
@ -82,9 +82,9 @@
|
||||||
7D8803A6 4E800020
|
7D8803A6 4E800020
|
||||||
60000000 00000000
|
60000000 00000000
|
||||||
C21B447C 00000009
|
C21B447C 00000009
|
||||||
3C608040 A063BBF4
|
3C808040 A084BBF4
|
||||||
54600436 2C000800
|
54800436 2C000800
|
||||||
4082002C 54630EFD
|
4082002C 54840EFD
|
||||||
41820024 806D9E50
|
41820024 806D9E50
|
||||||
806303F0 93E300F0
|
806303F0 93E300F0
|
||||||
7FE3FB78 81830000
|
7FE3FB78 81830000
|
||||||
|
@ -105,9 +105,9 @@
|
||||||
7D8803A6 4E800020
|
7D8803A6 4E800020
|
||||||
60000000 00000000
|
60000000 00000000
|
||||||
C219C34C 00000009
|
C219C34C 00000009
|
||||||
3C60803F A0635428
|
3C80803F A0845428
|
||||||
54600436 2C000800
|
54800436 2C000800
|
||||||
4082002C 54630EFD
|
4082002C 54840EFD
|
||||||
41820024 806D9DE8
|
41820024 806D9DE8
|
||||||
806303F0 93E300F0
|
806303F0 93E300F0
|
||||||
7FE3FB78 81830000
|
7FE3FB78 81830000
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/** Kill the Yoshi egg and spawn Yoshi immediately. */
|
/** Kill the Yoshi egg and spawn Yoshi immediately. */
|
||||||
|
|
||||||
.set rInput, 3
|
.set rInput, 4
|
||||||
|
|
||||||
.TEggYoshi.control.killEgg:
|
.TEggYoshi.control.killEgg:
|
||||||
## check input
|
## check input
|
||||||
|
|
|
@ -2,7 +2,7 @@ from supSMSGecko import make_xml, symbols
|
||||||
|
|
||||||
def main(g, ver):
|
def main(g, ver):
|
||||||
S = symbols[ver]
|
S = symbols[ver]
|
||||||
g.C2(0x44 + S['TMario::checkCollision'], 'checkYoshi.s')
|
g.C2(0x44 + S['TMario_checkCollision'], 'checkYoshi.s')
|
||||||
g.C2(0x1c + S['TEggYoshi::control'], 'killEgg.s')
|
g.C2(0x1c + S['TEggYoshi_control'], 'killEgg.s')
|
||||||
|
|
||||||
make_xml(main)
|
make_xml(main)
|
||||||
|
|
|
@ -53,7 +53,7 @@
|
||||||
C2299990 0000000A
|
C2299990 0000000A
|
||||||
899A0064 2C0C0001
|
899A0064 2C0C0001
|
||||||
40A20040 819A0074
|
40A20040 819A0074
|
||||||
818C0094 816C02BC
|
818C0094 816C02B8
|
||||||
2C0B0003 41A1002C
|
2C0B0003 41A1002C
|
||||||
41A00018 3D80803F
|
41A00018 3D80803F
|
||||||
818C9734 39600000
|
818C9734 39600000
|
||||||
|
@ -63,7 +63,7 @@
|
||||||
B01A004C 00000000
|
B01A004C 00000000
|
||||||
C229904C 00000004
|
C229904C 00000004
|
||||||
807F0074 80630094
|
807F0074 80630094
|
||||||
806302BC 2C830000
|
806302B8 2C830000
|
||||||
70000061 4C423102
|
70000061 4C423102
|
||||||
60000000 00000000
|
60000000 00000000
|
||||||
28404455 00000024
|
28404455 00000024
|
||||||
|
@ -76,7 +76,7 @@
|
||||||
C2291828 0000000A
|
C2291828 0000000A
|
||||||
899A0064 2C0C0001
|
899A0064 2C0C0001
|
||||||
40A20040 819A0074
|
40A20040 819A0074
|
||||||
818C0094 816C02BC
|
818C0094 816C08DC
|
||||||
2C0B0003 41A1002C
|
2C0B0003 41A1002C
|
||||||
41A00018 3D80803E
|
41A00018 3D80803E
|
||||||
818C10F4 39600000
|
818C10F4 39600000
|
||||||
|
@ -86,7 +86,7 @@
|
||||||
B01A004C 00000000
|
B01A004C 00000000
|
||||||
C2290EE4 00000004
|
C2290EE4 00000004
|
||||||
807F0074 80630094
|
807F0074 80630094
|
||||||
806302BC 2C830000
|
806308DC 2C830000
|
||||||
70000061 4C423102
|
70000061 4C423102
|
||||||
60000000 00000000
|
60000000 00000000
|
||||||
283FBBF5 00000024
|
283FBBF5 00000024
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
## skip only if gpMarDirector->tgcConsole2->consoleStr->state? == 0
|
## skip only if gpMarDirector->tgcConsole2->consoleStr->state? == 0
|
||||||
lwz r3, 0x74(r31)
|
lwz r3, 0x74(r31)
|
||||||
lwz r3, 0x94(r3)
|
lwz r3, 0x94(r3)
|
||||||
lwz r3, 0x2BC(r3)
|
lwz r3, .offState(r3)
|
||||||
cmpwi cr1, r3, 0
|
cmpwi cr1, r3, 0
|
||||||
## orig
|
## orig
|
||||||
andi. r0, r0, 0x61
|
andi. r0, r0, 0x61
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
### r12 = consoleStr
|
### r12 = consoleStr
|
||||||
lwz r12, 0x94(r12)
|
lwz r12, 0x94(r12)
|
||||||
### r12 = state?
|
### r12 = state?
|
||||||
lwz r11, 0x2BC(r12)
|
lwz r11, .offState(r12)
|
||||||
cmpwi r11, 3
|
cmpwi r11, 3
|
||||||
## return if state > 3
|
## return if state > 3
|
||||||
bgt+ .L.orig
|
bgt+ .L.orig
|
||||||
|
|
|
@ -2,12 +2,18 @@ from supSMSGecko import make_xml, symbols, Button as B
|
||||||
|
|
||||||
def main(g, ver):
|
def main(g, ver):
|
||||||
S = symbols[ver]
|
S = symbols[ver]
|
||||||
a_fast_forward = 0x158 + S['TMarDirector::direct']
|
a_fast_forward = 0x158 + S['TMarDirector_direct']
|
||||||
a_auto_press = 0x1cc + S['TMarDirector::changeState']
|
a_auto_press = 0x1cc + S['TMarDirector_changeState']
|
||||||
|
asm = '.set .offState, %d'%{
|
||||||
|
'GMSJ01': 0x2BC,
|
||||||
|
'GMSJ0A': 0x2BC,
|
||||||
|
'GMSE01': 0x2B8,
|
||||||
|
'GMSP01': 0x8DC,
|
||||||
|
}[ver]
|
||||||
## enable
|
## enable
|
||||||
g.if16(S['mPadStatus'], '==', B.R | B.DU)
|
g.if16(S['mPadStatus'], '==', B.R | B.DU)
|
||||||
g.C2(a_fast_forward, 'fast-forward.s')
|
g.C2(a_fast_forward, 'fast-forward.s', extra_as_input=asm)
|
||||||
g.C2(a_auto_press, 'auto-press.s')
|
g.C2(a_auto_press, 'auto-press.s', extra_as_input=asm)
|
||||||
## disable (restore original instructions)
|
## disable (restore original instructions)
|
||||||
g.if16(S['mPadStatus'], '==', B.R | B.DD, endif=True)
|
g.if16(S['mPadStatus'], '==', B.R | B.DD, endif=True)
|
||||||
g.write32(a_fast_forward, 0xB01A004C) # sth r0, 0x4C(r26)
|
g.write32(a_fast_forward, 0xB01A004C) # sth r0, 0x4C(r26)
|
||||||
|
|
Loading…
Reference in a new issue