LE-CODE Code List Extender [JoshuaMK]
A tutorial for how to use this code can be found here: https://mkwii.com/showthread.php?tid=1406
This code is designed to be injected into the main.dol using wstrt PATCH main.dol --add-section NAME.gct --add-lecode --DEST ./lecode/main.dol -o, although it can be properly run in the dolphin codehandler (Not Riivolution's nor Gecko OS's due to differing instructions).
When run, this code constantly checks for the file header of the lecode.bin file (LECT), and when found, it grabs the file's size from the file header, adds it to the base address of 0x808DD400 to reach the end of the file. It then does a check for the existence of the F0000000 00000000 found at the end of a gct, and if found, loops backwards in the file until it finds 00DEC0DE 00DEC0DE, in which it stores the new pointer address at 0x80002FFC. Then it finally modifies the codehandler to load the pointer address as the start of the code list instead of the static styled (lis, ori) method it normally uses.
(Region Free)
C0000000 0000000F
3D80808D 618CD400
3D604C45 616B4354
814C0000 7C0A5800
4CA20020 3D604E80
616B0020 916F0000
816C0014 7D4C5A14
3D20F000 856AFFF8
7C0B4800 4C820020
3D2000D0 6129C0DE
856AFFFC 7C0B4800
4082FFF8 3D808000
394AFFFC 914C2FFC
3D4081EF 614A2FFC
914C1908 7C0004AC
4E800020 00000000
Code Creator: JoshuaMK
A tutorial for how to use this code can be found here: https://mkwii.com/showthread.php?tid=1406
This code is designed to be injected into the main.dol using wstrt PATCH main.dol --add-section NAME.gct --add-lecode --DEST ./lecode/main.dol -o, although it can be properly run in the dolphin codehandler (Not Riivolution's nor Gecko OS's due to differing instructions).
When run, this code constantly checks for the file header of the lecode.bin file (LECT), and when found, it grabs the file's size from the file header, adds it to the base address of 0x808DD400 to reach the end of the file. It then does a check for the existence of the F0000000 00000000 found at the end of a gct, and if found, loops backwards in the file until it finds 00DEC0DE 00DEC0DE, in which it stores the new pointer address at 0x80002FFC. Then it finally modifies the codehandler to load the pointer address as the start of the code list instead of the static styled (lis, ori) method it normally uses.
(Region Free)
C0000000 0000000F
3D80808D 618CD400
3D604C45 616B4354
814C0000 7C0A5800
4CA20020 3D604E80
616B0020 916F0000
816C0014 7D4C5A14
3D20F000 856AFFF8
7C0B4800 4C820020
3D2000D0 6129C0DE
856AFFFC 7C0B4800
4082FFF8 3D808000
394AFFFC 914C2FFC
3D4081EF 614A2FFC
914C1908 7C0004AC
4E800020 00000000
Code Creator: JoshuaMK
Super Mario Eclipse, what Super Mario Sunshine could've been.