Mario Kart Wii Gecko Codes, Cheats, & Hacks
Trying to execute 200cc code when a flag is set - Printable Version

+- Mario Kart Wii Gecko Codes, Cheats, & Hacks (https://mariokartwii.com)
+-- Forum: Hacks/Modding (https://mariokartwii.com/forumdisplay.php?fid=14)
+--- Forum: Code Support / Help / Requests (https://mariokartwii.com/forumdisplay.php?fid=61)
+--- Thread: Trying to execute 200cc code when a flag is set (/showthread.php?tid=1907)



Trying to execute 200cc code when a flag is set - jawa - 11-05-2021

C0000000 0000000A
3D808000 896C5F27
3D40809B 2C0B00EC
6149D728 41820024
2C0B0010 6149C788
41820018 2C0B0054
3D20809A 6129BD68
41820008 61498F68
81290000 2C090000
4D820020 81690B6C
996C01C0 4E800020 # store cc byte at 800001c0

280001C0 00000002 # if 150cc
048A5AB0 42E10000 #execute 200cc code
048A5ABC 43430000
048A5BC4 43C30000
048A5C24 43430000
048A5C34 496A6000
048A5DC0 431D8000
048B5B1C 3EBBBBBC
048B5C78 40900000
048CB550 42D20000
04578558 3D804334
0457855C 919E002C
0457B99C 3C804359
0457B9A0 60848000
0457B9A4 9083002C
0457B9B0 3C804334
0457B9B4 9083002C
C257BBC4 00000003
48000009 43598000
7D8802A6 C00C0000
60000000 00000000
C25858C8 00000003
48000009 43598000
7D8802A6 C00C0000
60000000 00000000
C257BD5C 00000003
48000009 430E8000
7D8802A6 C00C0000
60000000 00000000
C257BD80 00000003
48000009 431D8000
7D8802A6 C00C0000
60000000 00000000
C2592194 00000006
48000009 3FC00000
7D8802A6 C04C0000
C063000C EC6200F2
D063000C EC020032
EC220072 EC01002A
60000000 00000000
045921B4 EC0100BA
045921C4 EC0100BA
045921D4 EC0100BA
045921E4 EC0100BA
C25850C8 00000004
48000009 3F2AAAAB
7D8802A6 C0EC0000
EC070032 D01E0020
60000000 00000000
C251F5F8 00000003
70680240 2C080240
40820008 60C60010
60C60001 00000000
C252029C 00000003
70A40220 2C040220
40820008 61080010
61080001 00000000
C2745CB4 00000003
70660404 2C060404
40820008 63FF0010
63FF0001 00000000
C2745F70 00000003
70830600 2C030600
40820008 60000010
60000001 00000000
C257ADEC 00000009
7C8B2378 5563073E
2C03000F 40820034
7FA3EB78 3C808059
608403F4 7C8903A6
4E800421 A063002C
546306F7 41820014
3C808057 6084AE8C
7C8903A6 4E800420
556307FF 00000000
C26FAFF8 0000000D
7C0A0378 7C6B1B78
7C8C2378 555BF7FE
554506FE 2C05000F
40820040 806C0018
3CA08059 60A503F4
7CA903A6 4E800421
A0A3002C 54A506F7
41820020 55450001
40820018 554502D7
40820010 3B600000
3B800001 3BC00000
7D846378 7D635B78
7D405378 00000000
C2699C98 00000014
807E0118 80630000
80630004 80C30004
54C506FE 2C05000F
40820048 80630018
3CA08059 60A503F4
7CA903A6 4E800421
A0A3002C 54A506F7
41820028 54C50001
40820020 54C502D7
40820018 38A00001
98A30015 3FA0806A
63BD19D8 48000020
88A30015 2C050001
40820030 38A00000
98A30015 3FA0806A
63BD1B68 7FC3F378
809E0614 38A00019
38C0001A 38E00001
7FA903A6 4E800421
396100A0 00000000
C2698F50 00000019
7C1E0378 807F0118
80630000 80630004
80C30004 54C506FE
2C05000F 40820048
80630018 3CA08059
60A503F4 7CA903A6
4E800421 A0A3002C
54A506F7 41820028
54C50001 40820020
54C502D7 40820018
38A00001 98A30015
3FA0806A 63BD19D8
48000020 88A30015
2C050001 4082004C
38A00000 98A30015
3FA0806A 63BD1B68
7FE3FB78 809F0530
38A00022 38C00023
38E00000 7FA903A6
4E800421 7FE3FB78
809F0530 38A00023
38C00024 38E00001
7FA903A6 4E800421
7FC0F378 80010024
60000000 00000000
C259678C 0000000F
4800000D 3E99999A
3F800000 7D8802A6
7C8B2378 C01F004C
807D001C 8083001C
2C040001 40810048
89030096 2C080001
4082000C 2C040012
40810034 80630018
3C808059 608403F4
7C8903A6 4E800421
C0430034 FC601210
EC42182A C06C0000
C08C0004 EC4220FA
EC0000B2 7D645B78
7FC3F378 00000000
C2597390 00000013
4800000D 3E99999A
3F800000 7D8802A6
39000001 807C001C
8083001C 2C040000
40820020 39000000
99030096 81030004
55080631 4182000C
39000001 99030096
2C040001 40810048
89030096 2C080001
4082000C 2C040012
40810034 80630018
3C808059 608403F4
7C8903A6 4E800421
C0430034 FC601210
EC42182A C06C0000
C08C0004 EC4220FA
EC0000B2 7F83E378
60000000 00000000
E0000000 80008000 #final terminator


RE: Trying to execute 200cc code when a flag is set - Cealgair - 11-05-2021

Before the "if", you need to put the default instruction. I'm a beginner myself so I wouldn't know for sure how to do it with C2 codes. You can see this post of mine for a simpler example.


RE: Trying to execute 200cc code when a flag is set - jawa - 11-05-2021

(11-05-2021, 03:09 PM)Cealgair Wrote: Before the "if", you need to put the default instruction. I'm a beginner myself so I wouldn't know for sure how to do it with C2 codes. You can see this post of mine for a simpler example.

so i would need to put the whole 200cc but with default values above the 28?


RE: Trying to execute 200cc code when a flag is set - Cealgair - 11-05-2021

Yes you do


RE: Trying to execute 200cc code when a flag is set - Vega - 11-06-2021

The issue is you have nothing that will execute (by default) if your CC byte isn't equal to 2. The way you have it setup in your original post is once the CC byte is 2, everything under your If Statement (28 line) is written, there's nothing in your code to rewrite everything "back to normal" if the CC byte later on happens to not be 2.

Thus what you need above your If Statement is all the 04 RAM Writes again BUT writing their default instruction values, and you need 04 RAM Writes for all the C2 Hook Addresses that will also write their default instruction values. This will obviously add quite a bit of more length to the code.

This would be annoying as hell to write (finding all the default instruction values).