Punkline
Dr. Frankenstack
- Joined
- May 15, 2015
- Messages
- 423
The GOTO and SUBROUTINE subaction events (14 and 1C) written in Plxx.dat files use the relocation table to convert .dat offsets into absolute pointers once loaded into RAM.
So if one of these events is written anew and NOT added to the relocation table; it will attempt to read the “offset” input as an absolute pointer that can theoretically reach anything written in start.dol.
The tournament mode menu (as an example) can be 0’d out and paired with a code like “Debug Menu replaces Tournament Mode” to safely net a total of 0x9E6C bytes of free space that can be used by whatever you want (from a vanilla copy of Melee.)
So here’s how to use it to write huge subactions to the DOL and access them from any other subaction in Crazy Hand that has at least 2 lines of event data to overwrite. (These edits can be shared as multi-line static overwrites in MCM) DRGN
---
Step 1: Find a place to put lots of events
In this example I’m using a portion of the tournament mode menu region. The bytes start at dol offset 0x18DCC0 (RAM address 0x801910E0) and end at 0x197B2C (RAM address 0x8019AF4C)
Melee Code Manager has a handy feature that lets you make these DOL <> RAM conversions easily:
I’ll be putting my example at offset 0x190000, which converts to RAM address 0x80193420.
---
Step 2: Write lots of events
Check out Itaru’s Melee Syntax School for some great notes on how to write subactions from scratch.
These are optional, but I’ve made extensive use of Achilles’ custom character data modification subaction event and custom projectile subaction event along with my custom action state logic subaction event in my example to make a ridiculous modification to Luigi’s taunt (Appeal)
Try fitting THAT over Luigi’s taunt hitbox~
---
Step 3: Put lots of events in the DOL
If you prefer, you can just copy over the events to the DOL with a hex editor as if it were a .dat file; but it’s possible to use MCM to make this step pretty easy. The bonus of using MCM is that character modifications like this can then be toggled as if they were codes~
When you have all the events you want to add to a subaction, open up MCM and click the “Add New Mod to Library” button. From there, create a “static overwrite” and set the offset to the DOL offset (0x190000) or the equivalent RAM address (80193420) and simply paste in your subaction events in the “new hex” field.
Now that you’ve got the events in MCM, you can toggle them on/off as a static overwrite.
Convenient!
---
Step 4: Tell Crazy Hand where all this new data is located
Write a GOTO (or SUBROUTINE) event in the subaction you want to have read this new data. Instead of using an offset in the second line, simply put the RAM address of the new event data you just added to the DOL. So long as the event you write isn’t added to the relocation table, the RAM address will be read as intended.
---
And that’s it! You’ve extended the space available for writing subactions!
Here’s that silly taunt example. The custom events allow for character data edits, spawning projectiles, and chaining multiple action states with custom event data to a single lengthy subaction. With all that space, it's pretty easy to go nuts:
So if one of these events is written anew and NOT added to the relocation table; it will attempt to read the “offset” input as an absolute pointer that can theoretically reach anything written in start.dol.
The tournament mode menu (as an example) can be 0’d out and paired with a code like “Debug Menu replaces Tournament Mode” to safely net a total of 0x9E6C bytes of free space that can be used by whatever you want (from a vanilla copy of Melee.)
So here’s how to use it to write huge subactions to the DOL and access them from any other subaction in Crazy Hand that has at least 2 lines of event data to overwrite. (These edits can be shared as multi-line static overwrites in MCM) DRGN
---
Step 1: Find a place to put lots of events
In this example I’m using a portion of the tournament mode menu region. The bytes start at dol offset 0x18DCC0 (RAM address 0x801910E0) and end at 0x197B2C (RAM address 0x8019AF4C)
Melee Code Manager has a handy feature that lets you make these DOL <> RAM conversions easily:
I’ll be putting my example at offset 0x190000, which converts to RAM address 0x80193420.
---
Step 2: Write lots of events
Check out Itaru’s Melee Syntax School for some great notes on how to write subactions from scratch.
These are optional, but I’ve made extensive use of Achilles’ custom character data modification subaction event and custom projectile subaction event along with my custom action state logic subaction event in my example to make a ridiculous modification to Luigi’s taunt (Appeal)
Code:
04 00 00 08 A2 00 08 01 04 00 00 26 F4 FF 00 2F 41 00 40 00 3F 80 40 20 3F 80 42 00 04 00 00 06 5F 80 81 65 04 00 00 08 2C 00 50 01 03 84 00 00 00 00 00 00 2D 00 00 13 00 9C 00 8B 0C 00 00 06 28 80 00 00 00 27 00 00 00 00 00 00 00 00 00 00 05 00 05 00 B8 50 00 04 04 00 00 06 10 00 00 00 F8 FF 00 0C 03 80 00 2C BF 80 00 00 5F 80 81 08 04 00 00 08 A2 00 08 01 04 00 00 26 F8 FF 00 0C 02 00 21 BC 80 14 29 5C 60 00 00 00 04 00 00 06 5F 80 81 65 04 00 00 08 2C 00 50 08 03 84 00 00 00 00 00 00 2D 14 00 13 19 04 00 8B 0C 00 00 06 28 80 00 00 00 37 00 00 00 00 00 00 00 00 00 00 05 00 05 00 B8 30 00 04 04 00 00 06 10 00 00 00 F8 FF 00 0C 03 80 00 2C BF 80 00 00 5F 80 81 08 04 00 00 08 A2 00 08 01 04 00 00 26 0C 00 00 04 F4 FF 00 CC 41 00 40 00 3F 80 00 00 3F 80 42 00 04 00 00 02 10 00 00 00 5F 80 80 C8 04 00 00 16 F8 FF 00 14 02 00 00 E0 00 00 00 01 02 00 00 84 40 20 00 00 5F 80 81 66 04 00 00 02 0C 00 00 0A 28 00 00 00 00 1E 00 00 00 00 00 00 00 00 00 00 05 00 05 00 F4 FF 00 C7 00 00 00 00 00 00 40 40 40 80 42 00 04 00 00 05 10 00 00 00 04 00 00 05 5F 00 00 5B
---
Step 3: Put lots of events in the DOL
If you prefer, you can just copy over the events to the DOL with a hex editor as if it were a .dat file; but it’s possible to use MCM to make this step pretty easy. The bonus of using MCM is that character modifications like this can then be toggled as if they were codes~
When you have all the events you want to add to a subaction, open up MCM and click the “Add New Mod to Library” button. From there, create a “static overwrite” and set the offset to the DOL offset (0x190000) or the equivalent RAM address (80193420) and simply paste in your subaction events in the “new hex” field.
Now that you’ve got the events in MCM, you can toggle them on/off as a static overwrite.
Convenient!
---
Step 4: Tell Crazy Hand where all this new data is located
Write a GOTO (or SUBROUTINE) event in the subaction you want to have read this new data. Instead of using an offset in the second line, simply put the RAM address of the new event data you just added to the DOL. So long as the event you write isn’t added to the relocation table, the RAM address will be read as intended.
---
And that’s it! You’ve extended the space available for writing subactions!
Here’s that silly taunt example. The custom events allow for character data edits, spawning projectiles, and chaining multiple action states with custom event data to a single lengthy subaction. With all that space, it's pretty easy to go nuts:
Code:
-==-
Event Data -- Stupid Luigi Taunt
Use event 14000000 80193420 to run this string of event data
[Punkline]
Version -- DOL Offset ------ Hex to Replace ---------- ASM Code
1.02 ----- 0x80193420 ---
D3E30008 807C04E8
9BC3004D 807C04E8
48212F39 808DAF9C
38600000 C022ADD0
C042ADD4 C062AD08
C082ADC8 C0A2ADCC
4821267D 907C0500
38800053 807C0500
D3C30000 D3230004
D3E30008 807C0500
9BC3004D 807C0500
48212EF1 3B7B0001
2C1B0006 3B9C0004
4180FF48 38600000
808DAF9C 482132C1
907F0518 3B800000
3B600001 807F0518
C002ADE8 D0030024
D0030028 807F0518
9BC30049 C3E2ADEC
C3C2ADF0 38600000
808DAF9C 48213289
5764103A 38840518
7C9F2214 90640000
2C1C0000 80640000
D3E30024 D3C30028
80640000 9BC30049
41820010 80640000
80010030 90030030
3B9C0001 2C1C0002
3B600002 4180FFB0
C3C2ADF4 3B800000
C3E2ADF8 3BA00003
3BC00001 38600000
808DAF9C 48213221
57A4103A 38840518
7C9F2214 90640000
2C1C0000 80640000
D3C30024 D3E30028
80640000 9BC30049
80640000 9BC3004A
41820010 80640000
80010030 90030030
3B9C0001 2C1C0002
3BA00004
->
04 00 00 08 A2 00 08 01 04 00 00 26 F4 FF 00 2F 41 00 40 00 3F 80 40 20 3F 80 42 00 04 00 00 06 5F 80 81 65 04 00 00 08 2C 00 50 01 03 84 00 00 00 00 00 00 2D 00 00 13 00 9C 00 8B 0C 00 00 06 28 80 00 00 00 27 00 00 00 00 00 00 00 00 00 00 05 00 05 00 B8 50 00 04 04 00 00 06 10 00 00 00 F8 FF 00 0C 03 80 00 2C BF 80 00 00 5F 80 81 08 04 00 00 08 A2 00 08 01 04 00 00 26 F8 FF 00 0C 02 00 21 BC 80 14 29 5C 60 00 00 00 04 00 00 06 5F 80 81 65 04 00 00 08 2C 00 50 08 03 84 00 00 00 00 00 00 2D 14 00 13 19 04 00 8B 0C 00 00 06 28 80 00 00 00 37 00 00 00 00 00 00 00 00 00 00 05 00 05 00 B8 30 00 04 04 00 00 06 10 00 00 00 F8 FF 00 0C 03 80 00 2C BF 80 00 00 5F 80 81 08 04 00 00 08 A2 00 08 01 04 00 00 26 0C 00 00 04 F4 FF 00 CC 41 00 40 00 3F 80 00 00 3F 80 42 00 04 00 00 02 10 00 00 00 5F 80 80 C8 04 00 00 16 F8 FF 00 14 02 00 00 E0 00 00 00 01 02 00 00 84 40 20 00 00 5F 80 81 66 04 00 00 02 0C 00 00 0A 28 00 00 00 00 1E 00 00 00 00 00 00 00 00 00 00 05 00 05 00 F4 FF 00 C7 00 00 00 00 00 00 40 40 40 80 42 00 04 00 00 05 10 00 00 00 04 00 00 05 5F 00 00 5B
Last edited: