• Welcome to Smashboards, the world's largest Super Smash Brothers community! Over 250,000 Smash Bros. fans from around the world have come to discuss these great games in over 19 million posts!

    You are currently viewing our boards as a visitor. Click here to sign up right now and start on your path in the Smash community!

The DOL mod topic

leomar ibanez

Smash Rookie
Joined
Feb 26, 2015
Messages
3
I wrote a simple guide literally 6 posts above this.
I was talking about the tournament. Dol post above that, I downloaed the file and it gave me a .dol so I was wondering if I like I rename it to start.dol or I use the hex to do that
 

Ripple

ᗣᗣᗣᗣ ᗧ·····•·····
Joined
Sep 4, 2006
Messages
9,632
you replace the dol and inject it back into the ISO... like it said in the post if you would have just read it
 
Last edited:

Wooggle

Smash Apprentice
Joined
Jul 7, 2014
Messages
83
Location
NJ, USA
Here's a DOL mod of a code I just made (here)

Disable Tree Blow on Dreamland if P1's nametag is !WND (1.02) [Wooggle]
@0x33950
3BE00000 -> 4BFCC6B4

@0x424
3E208021 62311444
3E404800 6252059C
92510000 3DC0EC0B
61CE2020 3DE080BD
61EF5D60 820F0000
7C0E8000 40820034
3DC00B20 61CE170B
820F0004 7C0E8000
40820020 3DC0200D
61CE0F0D 820F0008
7C0E8000 4082000C
3E406000 92510000
3BE00000 480338EC
 

SinsOfApathy

Smash Journeyman
Joined
Feb 24, 2015
Messages
474
NNID
Psion312
Last edited:

Wooggle

Smash Apprentice
Joined
Jul 7, 2014
Messages
83
Location
NJ, USA
http://smashboards.com/threads/melee-gecko-codes-guide-and-discussion.327311/page-26#post-18195014

Would it be difficult to have/find the DOL for the "music menu is last song played in sound test"?
Here, I did the DOL mod for you:

Set Menu Music in Sound Test [Dan Salvato] (1.02)
@0x2480B8
7C7C002E -> 481DFF0C

@0x4283E4
7C7C002E 2C030000
40820008 3860FFFF
808D8840 98641851
3C808046 60849D40
9064005C 2C030000
40800008 38600000
4BE200C8

@0x22B514
4BDF55F5 -> 481FCAE4

@0x428418
3C808046 60849D40
8084005C 2C040000
41820018 41810008
38800000 80AD8840
98851851 7C832378
3D808002 618C3F28
7D8903A6 4E800421
4BE034E8
Let me know if there are any problems
 

Shane Lee Shin

Smash Apprentice
Joined
Mar 31, 2014
Messages
104
Does anyone know what to do about the blocks in Green Greens? I basically just want no blocks what-so-ever. I'm using 1.02. I did find codes for them not falling and not being at the start position, but for some reason they still exist off-screen.
 

CeLL

Smash Lord
Joined
Jan 26, 2014
Messages
1,026
Location
Washington
I'm working on making my own cool iso to use offline that incorporates many features by many people, and realized there is no good way to keep track of what changes there are in a DOL, except keeping a text file with it, and that manually hex editing gets pretty tedious. With HxD anyway...

So I took like 15 minutes and made this to make it a lot simpler for me. Putting it here in case someone else finds it useful.
[collapse="Instructions"]Just put your DOL (or any file you want to hex edit, really) and a text file containing all the changes you want to make in the directory after you extract it and run the program.
[collapse="Text File Format"]There is an example in the download that should make it pretty clear, but the format is :
Title [author]
change1 offset -- change1
change2 offset -- change2
[line break required]
Title [author]
change1 offset -- change1
change2 offset -- change2
[No line break at end of file, will probably give an error if there is a line break at the end.]
The title line is required, as are line breaks between the mods. Author is optional. Also make sure you don't have spaces at the ends of lines, that might mess stuff up too.
For large paste overwrites, just put the entire hex as a change, no spaces/linebreaks, e.g. :
Code:
Change rumble settings from CSS + visual representation [Sham Rock]
0x25fc2c -- 4BDA16B4
0x1700 -- 8803000E3DC0804561CEC3803DE0804661EFB0FC3A800000860F000C56110319418200103A2000019A2E0000480000145611035B4182000C3A2000009A2E00003A94000139CE00012C14000441A0FFCC39CEFFFB3E401919625219003E00804C2C14000440820008621024EC2C14000540820008621024582C14000640820008621025582C14000740820008621024C42C140005418100088210000082100000821000008210000882100018821000088210001C82100004821000088E2E00012C110001408200103E20EEEE6231EE004800000C3E2055556231550092300000925000043A9400012C14000841A0FF70600000004825E85C

Disable Trophy Spawn on Snag the Trophies Stage [Achilles]
0x2165dc -- 60000000
[/collapse][/collapse]
Update :
Made it create a copy of the file and edit that instead (I was tired of copying a vanilla dol myself)
Fixed random issues with the file selection
Added the ability to comment out mods by putting // or # at the beginning of the title​
 
Last edited:

DRGN

Technowizard
Moderator
Joined
Aug 20, 2005
Messages
2,178
Location
Sacramento, CA
I'm working on making my own cool iso to use offline that incorporates many features by many people, and realized there is no good way to keep track of what changes there are in a DOL, except keeping a text file with it, and that manually hex editing gets pretty tedious. With HxD anyway...

So I took like 15 minutes and made this to make it a lot simpler for me. Putting it here in case someone else finds it useful.
[collapse="Instructions"]Just put your DOL (or any file you want to hex edit, really) and a text file containing all the changes you want to make in the directory after you extract it and run the program.
[collapse="Text File Format"]There is an example in the download that should make it pretty clear, but the format is :
Title [author]
change1 offset -- change1
change2 offset -- change2
[line break required]
Title [author]
change1 offset -- change1
change2 offset -- change2
[No line break at end of file, will probably give an error if there is a line break at the end.]
The title line is required, as are line breaks between the mods. Author is optional. Also make sure you don't have spaces at the ends of lines, that might mess stuff up too.
For large paste overwrites, just put the entire hex as a change, no spaces/linebreaks, e.g. :
Code:
Change rumble settings from CSS + visual representation [Sham Rock]
0x25fc2c -- 4BDA16B4
0x1700 -- 8803000E3DC0804561CEC3803DE0804661EFB0FC3A800000860F000C56110319418200103A2000019A2E0000480000145611035B4182000C3A2000009A2E00003A94000139CE00012C14000441A0FFCC39CEFFFB3E401919625219003E00804C2C14000440820008621024EC2C14000540820008621024582C14000640820008621025582C14000740820008621024C42C140005418100088210000082100000821000008210000882100018821000088210001C82100004821000088E2E00012C110001408200103E20EEEE6231EE004800000C3E2055556231550092300000925000043A9400012C14000841A0FF70600000004825E85C

Disable Trophy Spawn on Snag the Trophies Stage [Achilles]
0x2165dc -- 60000000
[/collapse][/collapse]
Nice. I've been wanting to do something like this for a while, but haven't gotten to it yet. Basically I was thinking an interface that lists all available mods with checkboxes (and description), and you could check the ones you want installed (which of course means you could uncheck them to revert it back). I was thinking about including it in DTW3.0, but it would probably make more sense to release it stand-alone. At least at first. So maybe I should take a break from DTW to do a dol modder. Would make sense to finish/release small programs first after all. So maybe this is a silly question, but what do you guys think, do we still really need one? (Don't worry, either way I'll finish the Melee Hacks and You thread first. :p)
 
Last edited:

CeLL

Smash Lord
Joined
Jan 26, 2014
Messages
1,026
Location
Washington
Nice. I've been wanting to do something like this for a while, but haven't gotten to it yet. Basically I was thinking an interface that lists all available mods with checkboxes (and description), and you could check the ones you want installed (which of course means you could uncheck them to revert it back). I told you before I was thinking about including it in DTW3.0, but it would probably make more sense to release it stand-alone. At least at first. So maybe I should take a break from DTW to do a dol modder. Would make sense to finish/release small programs first after all. What do you guys think, do we still really need one?
Actually I made something like that a while back but it was horribly designed (I had been coding for like 2 weeks) and kind of buggy so I never posted it anywhere xD

The multiple debug menu mods is not a glitch, I was just lazy and put several in the file so I could test the scrollbar xD
 
Last edited:

CeLL

Smash Lord
Joined
Jan 26, 2014
Messages
1,026
Location
Washington
Disable Trophy Messages, Unlock All-Star Mode, Random Select, Sound Test, Score Display, and Every Special Message, and Boot to CSS
Unlocks stuff and removes special messages while booting to CSS. Credit goes to Achilles.
Version ── DOL Offset ────── Hex to Replace ──────────
1.02 ────── 0x0015A564 ──── 7C0802A6 -> 4E800020
────── 0X0015A52C ──── 808d8840 -> 4E800020​

Boot to CSS & Branch to "Unlock Feature" Function
ASM branch and injection:
@ DOL 0x001BC600 replace 887F0004 -> 4BE44860
@ DOL 0x00001280 paste overwrite:
3DE08017 61EF2898
7DE903A6 4E800421
38600002 481BB794

I'll be writing/converting more codes later, currently down with a fever so that's it for now. Hopefully didn't mess up the branches.
@The PikMan I believe this is what you were looking for.
I can't get this to work. It never loads past a black screen. What am I doing wrong? (I haven't tried on console, just Dolphin)
 

Myougi

My posts are gluten free.
Joined
Mar 14, 2014
Messages
484
Location
WEST COAST BEST COAST
I can't get this to work. It never loads past a black screen. What am I doing wrong? (I haven't tried on console, just Dolphin)
I tested those and they work fine for me. You're probably doing something silly. Make sure you paste the right things in the right areas.
I'm going to take a guess and say you pasted code rather than overwrote (paste write) it. Lemme explain: When using a program like HxD make sure you use Ctrl+B to paste than Ctrl+V. Pasting with Ctrl+V will not overwrite code and will simply push it to the side - DESTROYING the .dol. Don't do that.
 
Last edited:

CeLL

Smash Lord
Joined
Jan 26, 2014
Messages
1,026
Location
Washington
I tested those and they work fine for me. You're probably doing something silly. Make sure you paste the right things in the right areas.
I'm going to take a guess and say you pasted code rather than overwrote (paste write) it. Lemme explain: When using a program like HxD make sure you use Ctrl+B to paste than Ctrl+V. Pasting with Ctrl+V will not overwrite code and will simply push it to the side - DESTROYING the .dol. Don't do that.
Yeah I know to paste overwrite. Re-doing it several times by hand it now just keeps me in an endless loop at There is no Memory Card in Slot A. (A) Continue without saving or loading Game Data?
 

Cyjorg

tiny.cc/19XXTE
Joined
Nov 18, 2013
Messages
686
Location
Purdue University
Yeah I know to paste overwrite. Re-doing it several times by hand it now just keeps me in an endless loop at There is no Memory Card in Slot A. (A) Continue without saving or loading Game Data?
The injection was wrong. It should look like this.

@ DOL 0x00001280 paste overwrite:
3DE08017 61EF2898
7DE903A6 4E800421
38600002 481BB790
 
Last edited:

Cyjorg

tiny.cc/19XXTE
Joined
Nov 18, 2013
Messages
686
Location
Purdue University
[collapse="All Players Can Control the Debug Menu (1.02) [wParam]"]
Code:
Paste Overwrite @ DOL 0x300584

39400000 39000000
38E00008 3C80804C
608420BC 1CAA0044
7D242A14 80690008
70631F10 7D081B78
80690000 70600020
41820008 38E00000
5460C8C6 5060D884
5060F002 7D080378
54606006 7D080378
54604007 4182000C
38E00000 7D080378
394A0001 2C0A0004
4180FFA4 7500F000
41820028 886DB7AC
2C030000 41820014
3863FFFF 986DB7AC
5508013E 48000014
98EDB7AC 4800000C
38600000 986DB7AC
7D034378 4E800020
[/collapse]
 
Last edited:

Myougi

My posts are gluten free.
Joined
Mar 14, 2014
Messages
484
Location
WEST COAST BEST COAST
[collapse="All Players Can Control the Debug Menu (1.02) [wParam]"]
Code:
Paste Overwrite @ DOL 0x300584

39400000 39000000
38E00008 3C80804C
608420BC 1CAA0044
7D242A14 80690008
70631F10 7D081B78
80690000 70600020
41820008 38E00000
5460C8C6 5060D884
5060F002 7D080378
54606006 7D080378
54604007 4182000C
38E00000 7D080378
394A0001 2C0A0004
4180FFA4 7500F000
41820028 886DB7AC
2C030000 41820014
3863FFFF 986DB7AC
5508013E 48000014
98EDB7AC 4800000C
38600000 986DB7AC
7D034378 4E800020
[/collapse]
What gives? Smashboards won't let me like this twice.
Anyways, this is amazing! This takes a lot of hassle off players having to replug their controllers into the right port. Nice stuff!

Edit: ...make sure your [/collapse] is before your [/code] tag. :p
 
Last edited:

Chris_Skorniak

Smash Apprentice
Joined
Nov 24, 2014
Messages
145
Location
Salem Oregon
NNID
hyperknux333
3DS FC
5301-0082-9828
Actually I made something like that a while back but it was horribly designed (I had been coding for like 2 weeks) and kind of buggy so I never posted it anywhere xD

The multiple debug menu mods is not a glitch, I was just lazy and put several in the file so I could test the scrollbar xD
Would you ever consider making/releasing this easy DOL creator? And does it have the capability to change default settings like 4 stocks 8 min no items and everything unlocked?
 

DRGN

Technowizard
Moderator
Joined
Aug 20, 2005
Messages
2,178
Location
Sacramento, CA
Nice. I've been wanting to do something like this for a while, but haven't gotten to it yet. Basically I was thinking an interface that lists all available mods with checkboxes (and description), and you could check the ones you want installed (which of course means you could uncheck them to revert it back). I was thinking about including it in DTW3.0, but it would probably make more sense to release it stand-alone. At least at first. So maybe I should take a break from DTW to do a dol modder. Would make sense to finish/release small programs first after all. So maybe this is a silly question, but what do you guys think, do we still really need one? (Don't worry, either way I'll finish the Melee Hacks and You thread first. :p)
Actually I made something like that a while back but it was horribly designed (I had been coding for like 2 weeks) and kind of buggy so I never posted it anywhere xD

The multiple debug menu mods is not a glitch, I was just lazy and put several in the file so I could test the scrollbar xD
Would you ever consider making/releasing this easy DOL creator? And does it have the capability to change default settings like 4 stocks 8 min no items and everything unlocked?

OK, so I have good news, and good news. Which do you guys want first?

The good news is, after looking into this more I realized it should actually be pretty easy, so I'm going to make it. And it should be able to work directly with the ISO, so no need to also extract/import the dol. Easy peasy.


The other good news is that I think I can write a parser to read mods in this form (the mods in the OP are all pretty consistently written like this):

Fountain of Dreams - Remove Side Platforms
-Remove (Disable) Side Platforms
-Disable Water Jets
[Zauron]

Version ── DOL Offset ────── Hex to Replace ────────── ASM Code
1.00 ────── 0x1C84C4 ──── 801B0014 -> 4800013C ──── (lwz r0,20(r27) -> b 0x13C)
─────────── 0x1C84BC ──── EC0007FA -> FC000028 ──── (fmadds f0,f0,f31,f0 -> fsub f0,f0,f0)


1.01 ────── 0x1CDABC ──── 801B0014 -> 4800013C ──── (lwz r0,20(r27) -> b 0x13C)
─────────── 0x1C8E20 ──── EC0007FA -> FC000028 ──── (fmadds f0,f0,f31,f0 -> fsub f0,f0,f0)


1.02 ────── 0x1C9494 ──── 801B0014 -> 4800013C ──── (lwz r0,20(r27) -> b 0x13C)
─────────── 0x1C948C ──── EC0007FA -> FC000028 ──── (fmadds f0,f0,f31,f0 -> fsub f0,f0,f0)


PAL ─────── 0x1CB0B8 ──── 801B0014 -> 4800013C ──── (lwz r0,20(r27) -> b 0x13C)
─────────── 0x1CB0B0 ──── EC0007FA -> FC000028 ──── (fmadds f0,f0,f31,f0 -> fsub f0,f0,f0)


So the program can read from a text file "library" of all the mods. As new mods come out, they can easily be copy-paste incorporated into the library (we could keep the latest copy of this library in an OP somewhere, so even that wouldn't be left to user error). For the game settings, I'll just manually code those in. And for longer paste-overwrites we could probably use a modified version of the most common format that people have been posting them in.

And since I amazingly have drag-and-drop functionality working in Python 2.7, the whole program usage would be like this:

Open program,
Drag ISO onto program,
Click check-boxes for the mods you want,
Hit Save.

A process so simple it could almost be a haiku.

Edit: Not to say that the above is almost a haiku, just that you COULD almost make a haiku out of the process. lol
 
Last edited:

CeLL

Smash Lord
Joined
Jan 26, 2014
Messages
1,026
Location
Washington
OK, so I have good news, and good news. Which do you guys want first?

The good news is, after looking into this more I realized it should actually be pretty easy, so I'm going to make it. And it should be able to work directly with the ISO, so no need to also extract/import the dol. Easy peasy.


The other good news is that I think I can write a parser to read mods in this form (the mods in the OP are all pretty consistently written like this):

Fountain of Dreams - Remove Side Platforms
-Remove (Disable) Side Platforms
-Disable Water Jets
[Zauron]
Version ── DOL Offset ────── Hex to Replace ────────── ASM Code
1.00 ────── 0x1C84C4 ──── 801B0014 -> 4800013C ──── (lwz r0,20(r27) -> b 0x13C)
─────────── 0x1C84BC ──── EC0007FA -> FC000028 ──── (fmadds f0,f0,f31,f0 -> fsub f0,f0,f0)

1.01 ────── 0x1CDABC ──── 801B0014 -> 4800013C ──── (lwz r0,20(r27) -> b 0x13C)
─────────── 0x1C8E20 ──── EC0007FA -> FC000028 ──── (fmadds f0,f0,f31,f0 -> fsub f0,f0,f0)

1.02 ────── 0x1C9494 ──── 801B0014 -> 4800013C ──── (lwz r0,20(r27) -> b 0x13C)
─────────── 0x1C948C ──── EC0007FA -> FC000028 ──── (fmadds f0,f0,f31,f0 -> fsub f0,f0,f0)

PAL ─────── 0x1CB0B8 ──── 801B0014 -> 4800013C ──── (lwz r0,20(r27) -> b 0x13C)
─────────── 0x1CB0B0 ──── EC0007FA -> FC000028 ──── (fmadds f0,f0,f31,f0 -> fsub f0,f0,f0)

So the program can read from a text file "library" of all the mods. As new mods come out, they can easily be copy-paste incorporated into the library (we could keep the latest copy of this library in an OP somewhere, so even that wouldn't be left to user error). For the game settings, I'll just manually code those in. And for longer paste-overwrites we could probably use a modified version of the most common format that people have been posting them in.

And since I amazingly have drag-and-drop functionality working in Python 2.7, the whole program usage would be like this:

Open program,
Drag ISO onto program,
Click check-boxes for the mods you want,
Hit Save.

A process so simple it could almost be a haiku.
It would be super duper cool if it automatically adjusted the branches of the ASM injection mods so that none of them conflicted, though I know that would be really difficult.
 

Achilles1515

Smash Master
Joined
Jun 18, 2007
Messages
3,211
Location
Cincinnati / Columbus OH
OK, so I have good news, and good news. Which do you guys want first?

The good news is, after looking into this more I realized it should actually be pretty easy, so I'm going to make it. And it should be able to work directly with the ISO, so no need to also extract/import the dol. Easy peasy.


The other good news is that I think I can write a parser to read mods in this form (the mods in the OP are all pretty consistently written like this):

Fountain of Dreams - Remove Side Platforms
-Remove (Disable) Side Platforms
-Disable Water Jets
[Zauron]
Version ── DOL Offset ────── Hex to Replace ────────── ASM Code
1.00 ────── 0x1C84C4 ──── 801B0014 -> 4800013C ──── (lwz r0,20(r27) -> b 0x13C)
─────────── 0x1C84BC ──── EC0007FA -> FC000028 ──── (fmadds f0,f0,f31,f0 -> fsub f0,f0,f0)

1.01 ────── 0x1CDABC ──── 801B0014 -> 4800013C ──── (lwz r0,20(r27) -> b 0x13C)
─────────── 0x1C8E20 ──── EC0007FA -> FC000028 ──── (fmadds f0,f0,f31,f0 -> fsub f0,f0,f0)

1.02 ────── 0x1C9494 ──── 801B0014 -> 4800013C ──── (lwz r0,20(r27) -> b 0x13C)
─────────── 0x1C948C ──── EC0007FA -> FC000028 ──── (fmadds f0,f0,f31,f0 -> fsub f0,f0,f0)

PAL ─────── 0x1CB0B8 ──── 801B0014 -> 4800013C ──── (lwz r0,20(r27) -> b 0x13C)
─────────── 0x1CB0B0 ──── EC0007FA -> FC000028 ──── (fmadds f0,f0,f31,f0 -> fsub f0,f0,f0)

So the program can read from a text file "library" of all the mods. As new mods come out, they can easily be copy-paste incorporated into the library (we could keep the latest copy of this library in an OP somewhere, so even that wouldn't be left to user error). For the game settings, I'll just manually code those in. And for longer paste-overwrites we could probably use a modified version of the most common format that people have been posting them in.

And since I amazingly have drag-and-drop functionality working in Python 2.7, the whole program usage would be like this:

Open program,
Drag ISO onto program,
Click check-boxes for the mods you want,
Hit Save.

A process so simple it could almost be a haiku.
Yes, 32/16/8-bit overwrites would be super easy. But you cannot cut corners with ASM injection codes. I can’t stress enough that there is no one-size-fits-all way to do them.

ASM injection codes can be placed anywhere you want in the DOL. It needs the following parameters:

1) The DOL offset for the equivalent RAM line where you code inject “starts”. Basically, what function you are tapping into.
a. See below for the “RAM offset to DOL offset” idea. This would be nice because you always make codes in the RAM first. And then have to find DOL offets.​
2) The location of where to place your custom code in the DOL. You need to know the RAM address for this as well.

Then what it should automatically do:
3) Add the instruction for a branch from injection to the start of custom code.
4) Then give you the option to include a branch back at the end of your custom code to the injection line +0x4. But this would ideally be optional because you could have your code branch to some other function and have it resume there, instead of specifically going back to (injection line + 0x4).
*all these branches are relative to RAM offsets,

When you tell people specific DOL offsets for an ASM inject code, you’re basically forcing structure into their DOL (project?) that you know nothing about and that “hopefully” lines up efficiently with codes that everyone has written and will write in the future. This practice kind of makes me cringe.

Other thoughts:
- There needs to be a “backup” function of some sort, or, just having it point to a DOL file instead of the whole ISO. If you messed up a placement offset in one of your lines in the text file that causes your game to crash, do you just plan on leaving it up to the user to be able to view the RAM or have access to a RAM dump and go to that accidental offset, find the original hex line and then copy that over to their messed up DOL to “fix” the problem.
o With your current thought for the program, would there still be functionality for dragging a DOL itself into the program for editing or would you have to have an ISO and the whole nine yards in order to use it?
o I personally think it would be best to have it be able to work with both and then if you have a lone DOL open, there can be a button for “Import into ISO”, where you can just select a target ISO and it immediately does the overwrite.​

- A Gecko code to DOL mod function (really just a RAM offset to DOL offset finder). Have a trimmed vanilla RAM dump built into the program, copy the gecko code RAM offset value + some adjacent lines and then switch back to the same offset in the DOL and search upwards for a match.

- What about just a general DOL Manager? Ex. A tab for “Character Move Modifications” where you can add/change interrupts to special moves. Changing the default names of characters….just **** like that. Like built-in little mini functions that involve the DOL. Frame speed mods? Because those are DOL changes.

Lol. Actually, if you just made a Gecko code (overwrites and injections) to RAM program, then we almost wouldn’t even need this thread anymore…

I also would not worry about coding a parser to find DOL mods. Just spend that time manually making a text file with the current ones and giving people instructions on how to add more to the text file. You know that future DOL mod posts are not going to always be in some special format anyway and that the majority of people will just add them in as text anyhow.
  • A "new DOL mod" function that uses the main program window to enter info and have it automatically save to your text file.

I’m just trying to look at the program from a larger perspective. Having only the simple functionality you listed above would still be helpful for people. Sorry this post is cluttered. I was just typing anything that came to mind. I basically live in the DOL, so I've got a lot to say about it.
 
Last edited:

DRGN

Technowizard
Moderator
Joined
Aug 20, 2005
Messages
2,178
Location
Sacramento, CA
Yes, 32/16/8-bit overwrites would be super easy. But you cannot cut corners with ASM injection codes. I can’t stress enough that there is no one-size-fits-all way to do them.

ASM injection codes can be placed anywhere you want in the DOL. It needs the following parameters:

1) The DOL offset for the equivalent RAM line where you code inject “starts”. Basically, what function you are tapping into.
a. See below for the “RAM offset to DOL offset” idea. This would be nice because you always make codes in the RAM first. And then have to find DOL offets.​
2) The location of where to place your custom code in the DOL. You need to know the RAM address for this as well.
How much area in the dol have you mapped out that's safe to use? For injection codes, perhaps the program could know (via a config file) the safe areas, and then automatically start using those places for the codes you select. Every time you enable a code, the program would just overwrite the injection site for the custom function pointer (the injection/branch), and then add the actual custom code to the next available space in the next available safe area. I think this is possible, but possibly also fairly complex (since any time you open the dol, it would have to have a way to know whether a safe area already contains code. Actually I guess it could just compare to an unmodified dol. Hm.). Maybe the program could just let the user set both of these (but have the program help them do so) at first.

Then what it should automatically do:
3) Add the instruction for a branch from injection to the start of custom code.
4) Then give you the option to include a branch back at the end of your custom code to the injection line +0x4. But this would ideally be optional because you could have your code branch to some other function and have it resume there, instead of specifically going back to (injection line + 0x4).
*all these branches are relative to RAM offsets,
So, basically it seems like the program should have two functions:
1) an implementer, that takes existing DOL mods (again, existing in the mods text file(s)) and allows you to turn them on/off in your build. Very simple for the typical end user.
2) a mod creator, that helps people create new mods from Gecko codes, which would automatically do the above and place it into a mods text file.

When you tell people specific DOL offsets for an ASM inject code, you’re basically forcing structure into their DOL (project?) that you know nothing about and that “hopefully” lines up efficiently with codes that everyone has written and will write in the future. This practice kind of makes me cringe.
When you say "efficiently", do you just mean that they don't overlap? Or is there something else here I should know about? As long as they don't write on top of any part of another, they're good, right?

Other thoughts:
- There needs to be a “backup” function of some sort, or, just having it point to a DOL file instead of the whole ISO. If you messed up a placement offset in one of your lines in the text file that causes your game to crash, do you just plan on leaving it up to the user to be able to view the RAM or have access to a RAM dump and go to that accidental offset, find the original hex line and then copy that over to their messed up DOL to “fix” the problem.
o With your current thought for the program, would there still be functionality for dragging a DOL itself into the program for editing or would you have to have an ISO and the whole nine yards in order to use it?
o I personally think it would be best to have it be able to work with both and then if you have a lone DOL open, there can be a button for “Import into ISO”, where you can just select a target ISO and it immediately does the overwrite.​
I definitely want it to have back-up functionality so that anything can be undone. And yeah, I intend to have it be able to work with an ISO or a DOL, with the ability to extract/import the dol from/to an ISO as well. The "Import into ISO" is a good idea too.

- A Gecko code to DOL mod function (really just a RAM offset to DOL offset finder). Have a trimmed vanilla RAM dump built into the program, copy the gecko code RAM offset value + some adjacent lines and then switch back to the same offset in the DOL and search upwards for a match.
Ah, I see. Is there a reason for not searching downwards instead? And I assume the RAM dumps would be different for each game version, so I'd need a cashe for each, right?

- What about just a general DOL Manager? Ex. A tab for “Character Move Modifications” where you can add/change interrupts to special moves. Changing the default names of characters….just **** like that. Like built-in little mini functions that involve the DOL. Frame speed mods? Because those are DOL changes.
Sure, I could probably add that stuff down the line.

I also would not worry about coding a parser to find DOL mods. Just spend that time manually making a text file with the current ones and giving people instructions on how to add more to the text file. You know that future DOL mod posts are not going to always be in some special format anyway and that the majority of people will just add them in as text anyhow.
Well, actually I started writing one at lunchtime on Friday at work, and then finished it later on Friday. So I already don't need to rewrite what currently exists (at least most of the ones in the post following the OP from the looks of it). And it makes things easy going forward for people who do follow that format. So, essentially, that format I posted IS the instructions on how to add more to the text file. (I wonder, who created that format btw? Maybe @SypherPhoenix?)

A "new DOL mod" function that uses the main program window to enter info and have it automatically save to your text file.
Haha, yup. Came to the same conclusion above.

I’m just trying to look at the program from a larger perspective. Having only the simple functionality you listed above would still be helpful for people. Sorry this post is cluttered. I was just typing anything that came to mind. I basically live in the DOL, so I've got a lot to say about it.
Haha, no problem, man. I definitely appreciate the input! And I'd be hard-pressed to find someone better to hear it from.
 

Achilles1515

Smash Master
Joined
Jun 18, 2007
Messages
3,211
Location
Cincinnati / Columbus OH
How much area in the dol have you mapped out that's safe to use? For injection codes, perhaps the program could know (via a config file) the safe areas, and then automatically start using those places for the codes you select. Every time you enable a code, the program would just overwrite the injection site for the custom function pointer (the injection/branch), and then add the actual custom code to the next available space in the next available safe area. I think this is possible, but possibly also fairly complex (since any time you open the dol, it would have to have a way to know whether a safe area already contains code. Actually I guess it could just compare to an unmodified dol. Hm.). Maybe the program could just let the user set both of these (but have the program help them do so) at first.
There are three main places I have used.
1) The beginning (before 0x2900). Every area of 00's here is free.
2) The default debug menu locations. Since I am creating my own menu system, I basically just wiped the entire default debug menu data to make it "free space" for myself. This is from about 0x3f7124 down to 0x3fac20 or so. But there are other bits and piece of the menu system scattered in other places in the DOL.
3) The third, and super awesome, location that I found is from 0x407950 to 408f50. I've mentioned this here before, but this location seems to contain some info for debugging the game, which I thought was weird and probably unneccessary. So I decided to zero it all out and see what happens and I have yet to experience any issues with doing so (at least that I know of). So that's a real nice chunk of extra space. My most supporting evidence towards this being safe to do is that it was done in 20XX 3.02 and people have been playing it fine for months now...

4) As we are all aware of by now, I previously included code in the 0x426____ / 0x427____ area that I thought was free space, but was actually image data for the fonts used in the game. I'd say the general consensus is to not use this area for code, but if it came down to it, I'd say having important and helpful codes and features coded into the game is more important than having some blank space in a letter texture be a little garbled. But again, this is last case scenario.

Like you said, I think it would be a pretty complex thing to have the program automatically know where to place a code.

When you say "efficiently", do you just mean that they don't overlap? Or is there something else here I should know about? As long as they don't write on top of any part of another, they're good, right?
Ideally, you fit as many codes as you can into the least amount of space possible. This would mean having Code 2 start IMMEDIATELY after the last line of Code 1. What I meant was When people post ASM inject DOL mods, I doubt they are looking at every other ASM inject mod that has been posted in the forum and figuring out exactly where each of them end, and how much space is between codes to see if theres can fit, etc. This is why I foresee problems arising when people don't know how to DOL inject ASM codes themselves and just use offsets and copy and paste things from others. If you actually understand the branches in the code that are happening, then you can move the code around to anywhere you want (just change the branch to/from in accordance to the new position) and can keep things ordered as you please and get the most out of the free space.

Ah, I see. Is there a reason for not searching downwards instead? And I assume the RAM dumps would be different for each game version, so I'd need a cashe for each, right?
In my experience, DOL equivalent code lines for a RAM address are "in the area close to" -0x3000 from the RAM address. Just a rule of thumb (for 1.02 at least). That's why I said search upwards. So if you take the RAM address and go to that in the DOL and search upwards, it should find a match *roughly* -0x3000 from the start.

Examples:
DOL offset (RAM offset)

"Random" is default selected on SSS
0x2575f0 (25AA10 in RAM)
Difference: 0x3420

Debug Menu Replaces Tournament Mode
0x22A218 (22d638 in RAM)
Difference: 0x3420

Lol...so maybe 0x3420 is a special number. I just don't know if things are always consistent.

Yes, the RAM dumps are different for each version.

--------------


Honestly, I think experienced DOL modders would find that injecting codes manually might just be the best way to go, because of the subjectivity that comes with doing so. Like maybe I want to "plan for the future" and leave a litte space between CODE 1 and Code 2 because I could see myself adding to Code 1. Rather than having the modified Code 1 overlap Code 2 (and maybe more codes), it might be better to just leave the space to keep the modified code in the same place rather than having to shift it around after modification to find a large enough area of free space.

I believe the ideal "DOL manager" would be some sort of add on to a hex editor. So you can view the DOL contents while making any sort of programmatic changes. But this is probably just not really feasible or would just take an entire new hex editing software.
 

Cyjorg

tiny.cc/19XXTE
Joined
Nov 18, 2013
Messages
686
Location
Purdue University
I'll add my little tid bit as well. Achilles has sad most of this however I'd like to reiterate/add my own take. Posting injections of asm codes is bad because...

1. There is no way that you can take into all the other potential/precious injections.

2. It clogs this form with unnecessary posts that are already in the Melee Gecko Code Guides and Discussion thread.

3. It discourages thinking and innovating by users. To elaborate, recently, a code was posted with a branch that was incorrect. Instead of trouble shooting the code, whoever came back here and asked why it wasn't working. I'm not saying this is a bad thing, but I'd prefer to have a thinking community with te ability to troubleshoot. For this reason, I'm going to release a tutorial in he very near future (tonight or tomorrow) that explains branching through code and these injections.
 

DRGN

Technowizard
Moderator
Joined
Aug 20, 2005
Messages
2,178
Location
Sacramento, CA
There are three main places I have used.
1) The beginning (before 0x2900). Every area of 00's here is free.
2) The default debug menu locations. Since I am creating my own menu system, I basically just wiped the entire default debug menu data to make it "free space" for myself. This is from about 0x3f7124 down to 0x3fac20 or so. But there are other bits and piece of the menu system scattered in other places in the DOL.
3) The third, and super awesome, location that I found is from 0x407950 to 408f50. I've mentioned this here before, but this location seems to contain some info for debugging the game, which I thought was weird and probably unneccessary. So I decided to zero it all out and see what happens and I have yet to experience any issues with doing so (at least that I know of). So that's a real nice chunk of extra space. My most supporting evidence towards this being safe to do is that it was done in 20XX 3.02 and people have been playing it fine for months now...

4) As we are all aware of by now, I previously included code in the 0x426____ / 0x427____ area that I thought was free space, but was actually image data for the fonts used in the game. I'd say the general consensus is to not use this area for code, but if it came down to it, I'd say having important and helpful codes and features coded into the game is more important than having some blank space in a letter texture be a little garbled. But again, this is last case scenario.

Like you said, I think it would be a pretty complex thing to have the program automatically know where to place a code.
The dol doesn't have a header that needs to be preserved? I've noticed before that it doesn't have a file size for some reason, but I figured the first few lines of 0x10 or so were important for some other reason at least. Thanks for this though, I didn't know these areas.

Also, I almost forgot to ask: do you know how big the dol can be? Assuming it's rebuilt with GCRebuilder. If you extended the natural size of the dol, couldn't you safely add code at the end of the file?

Ideally, you fit as many codes as you can into the least amount of space possible. This would mean having Code 2 start IMMEDIATELY after the last line of Code 1. What I meant was When people post ASM inject DOL mods, I doubt they are looking at every other ASM inject mod that has been posted in the forum and figuring out exactly where each of them end, and how much space is between codes to see if theres can fit, etc. This is why I foresee problems arising when people don't know how to DOL inject ASM codes themselves and just use offsets and copy and paste things from others. If you actually understand the branches in the code that are happening, then you can move the code around to anywhere you want (just change the branch to/from in accordance to the new position) and can keep things ordered as you please and get the most out of the free space.
Oh, ok. I understand what you mean. Regarding this, and Jorgasm's first point, I think if I look at the issue more, I could probably figure out a way for a program to determine what area has custom code and what doesn't. Assuming I do that, the program could then arrange each code to be directly after one another, with no extra space in-between. Making things easy for the user as well as making the most of the space.

In my experience, DOL equivalent code lines for a RAM address are "in the area close to" -0x3000 from the RAM address. Just a rule of thumb (for 1.02 at least). That's why I said search upwards. So if you take the RAM address and go to that in the DOL and search upwards, it should find a match *roughly* -0x3000 from the start.

Examples:
DOL offset (RAM offset)

"Random" is default selected on SSS
0x2575f0 (25AA10 in RAM)
Difference: 0x3420

Debug Menu Replaces Tournament Mode
0x22A218 (22d638 in RAM)
Difference: 0x3420

Lol...so maybe 0x3420 is a special number. I just don't know if things are always consistent.
Ah. I initially thought of searching from one end of the file or the other rather than from a point in-between, so I thought you meant from the end of the file.

Could it be that a large offset range of the dol is stored directly, exactly to memory as-is? If that's true, then anything within that range could have 0x3420 subtracted from it to find the equivalent DOL offset. Much simpler than searching, if true. But until that's confirmed, a search it shall be.

Honestly, I think experienced DOL modders would find that injecting codes manually might just be the best way to go, because of the subjectivity that comes with doing so. Like maybe I want to "plan for the future" and leave a litte space between CODE 1 and Code 2 because I could see myself adding to Code 1. Rather than having the modified Code 1 overlap Code 2 (and maybe more codes), it might be better to just leave the space to keep the modified code in the same place rather than having to shift it around after modification to find a large enough area of free space.
1. There is no way that you can take into all the other potential/precious injections.

2. It clogs this form with unnecessary posts that are already in the Melee Gecko Code Guides and Discussion thread.

3. It discourages thinking and innovating by users. To elaborate, recently, a code was posted with a branch that was incorrect. Instead of trouble shooting the code, whoever came back here and asked why it wasn't working. I'm not saying this is a bad thing, but I'd prefer to have a thinking community with te ability to troubleshoot. For this reason, I'm going to release a tutorial in he very near future (tonight or tomorrow) that explains branching through code and these injections.
I agree; it would probably be best to advise people to NOT post an offset for where to store the code. Maybe it would still be OK to post injection codes, along with the injection site for the branch, but just not the actual offset that the branch would point to. Because, correct me if I'm wrong, but the Gecko codehandler runs its entire set of codes every frame, right? Meaning they can't be "triggered" by events within the game like an injection code. So injection codes are still pretty valuable and worth sharing, but ideally they would come with the extra effort of figuring out your own branch offset. Otherwise people will be coming here to ask why their old codes don't work after they've overwrote them with new ones, leading us to troubleshoot code that works fine.
 

Myougi

My posts are gluten free.
Joined
Mar 14, 2014
Messages
484
Location
WEST COAST BEST COAST
I'm going to release a tutorial in he very near future (tonight or tomorrow) that explains branching through code and these injections.
Here's a tutorial on how to convert 04XXXXXX codes to DOL mods. Not exactly everything you're going to type up I'm sure but to save you the trouble here's what I have:

I'll be using the "Remove all MKII Stage Hazards" by Jorgasms as an example.
Here is the code:
041fcd84 60000000

1) First, open up Dolphin in debug mode
This is done by creating a new shortcut to dolphin, then adding a -d at the end of the target location in "properties". You can also create a batch file and open dolphin in debug mode, but this is simpler in my opinion.



When you open it up, you should see your game list on the right, except you'll also find a bunch of tabs on the left. If you can't see your games list, size up Dolphin's window and pull the margin to the left.



2) Run Super Smash Bros. Melee. You might notice the game hangs at a black screen - this is normal. When Dolphin is in debug mode games start paused by default. Hit the "Play" button and you're good to go.

3) Go over to the "Memory" tab on the left side. If you don't see it, add it by checking it off under "view".



4) In the top text box in the memory tab, type the left half of the code (the 04XXXXXX part) except replace "04" with "80".



5) Open up your Start.dol in a hex editor. I recommend HxD since it's free, but any hex editor should work.

6) Search for the string of blue numbers and letters that appear after 801FCD84. I recommend that you search for up to four or five lines after the initial line so you make sure you find it.



If there's more than one match, keep adding more lines until there is only one match.

If there are 0 matches, double check that you type in everything correctly.
If there are still 0 matches, it means that what you're looking for is not in the start.dol. At that point, it becomes muuuuuch more difficult.

7) Copy down the address and the original eight digits. For this example, it is 0x1F9964 and 48192FD1. This is where you replace those eight digits with the eight digits in the code. In this case, I would replace 48192FD1 with 60000000. Now, you're all done!



So the DOL mod would be:
@0x1F9964
48192FD1 -> 60000000

In the case of a multiple line codes (ex: Lagless Fountain of Dreams by IE), you have to do each line separately. Hope this helps everyone.
 
Last edited:

CeLL

Smash Lord
Joined
Jan 26, 2014
Messages
1,026
Location
Washington
[collapse="All Players Can Control the Debug Menu (1.02) [wParam]"]
Code:
Paste Overwrite @ DOL 0x300584

39400000 39000000
38E00008 3C80804C
608420BC 1CAA0044
7D242A14 80690008
70631F10 7D081B78
80690000 70600020
41820008 38E00000
5460C8C6 5060D884
5060F002 7D080378
54606006 7D080378
54604007 4182000C
38E00000 7D080378
394A0001 2C0A0004
4180FFA4 7500F000
41820028 886DB7AC
2C030000 41820014
3863FFFF 986DB7AC
5508013E 48000014
98EDB7AC 4800000C
38600000 986DB7AC
7D034378 4E800020
[/collapse]
Is there a Gecko code for this? I can't find it if there is one. I also tried writing a gecko code to write those to the equivalent RAM offsets but that didn't work (or I messed up) lol.
 
Last edited:

Cyjorg

tiny.cc/19XXTE
Joined
Nov 18, 2013
Messages
686
Location
Purdue University
Is there a Gecko code for this? I can't find it if there is one. I also tried writing a gecko code to write those to the equivalent RAM offsets but that didn't work (or I messed up) lol.
I don't have access to my computer but it should be as simple as writing several 04XXXXXX YYYYYYYY codes at the function. Just use the search bar in dolphin or wait and I'll get it in like 6 hours
 

Quillion

Smash Hero
Joined
Sep 17, 2014
Messages
5,608
Is there a DOL mod that unlocks all of the alt music? I'm playing with SDR and I can't change any of the music by holding R.

Also, I have no sound test.
 

Myougi

My posts are gluten free.
Joined
Mar 14, 2014
Messages
484
Location
WEST COAST BEST COAST
Is there a DOL mod that unlocks all of the alt music? I'm playing with SDR and I can't change any of the music by holding R.

Also, I have no sound test.
For sound test use Achilles' DOL injection that branches to the unlock point. It's a few pages back. Unlocking it does not unlock alt music however.
Edit: Just going to paste it here:

Disable Trophy Messages, Unlock All-Star Mode, Random Select, Sound Test, Score Display, and Every Special Message, and Boot to CSS
Unlocks stuff and removes special messages while booting to CSS.

Version ── DOL Offset ────── Hex to Replace ──────────
1.02 ────── 0x0015A564 ──── 7C0802A6 -> 4E800020
────── 0x0015A52C ──── 808d8840 -> 4E800020

Boot to CSS & Branch to "Unlock Feature" Function
ASM branch and injection:
@ DOL 0x001BC600 replace 887F0004 -> 4BE44860
@ DOL 0x00001280 paste overwrite:
3DE08017 61EF2898
7DE903A6 4E800421
38600002 481BB790


I have a gecko code that force unlocks stages which is required to unlock alt music, but, for whatever reason I can't convert it into a .DOL mod (The ). I think the game might be checking memory card data for this, so I'm not sure if there is a way to convert this into a .DOL mod.

0445BF28 FFFFFFFF

@ Achilles1515 Achilles1515 @ Cyjorg Cyjorg
Any ideas?
 
Last edited:

Achilles1515

Smash Master
Joined
Jun 18, 2007
Messages
3,211
Location
Cincinnati / Columbus OH
For sound test use Achilles' DOL injection that branches to the unlock point. It's a few pages back. Unlocking it does not unlock alt music however.
Edit: Just going to paste it here:

Disable Trophy Messages, Unlock All-Star Mode, Random Select, Sound Test, Score Display, and Every Special Message, and Boot to CSS
Unlocks stuff and removes special messages while booting to CSS.

Version ── DOL Offset ────── Hex to Replace ──────────
1.02 ────── 0x0015A564 ──── 7C0802A6 -> 4E800020
────── 0x0015A52C ──── 808d8840 -> 4E800020

Boot to CSS & Branch to "Unlock Feature" Function
ASM branch and injection:
@ DOL 0x001BC600 replace 887F0004 -> 4BE44860
@ DOL 0x00001280 paste overwrite:
3DE08017 61EF2898
7DE903A6 4E800421
38600002 481BB790


I have a gecko code that force unlocks stages which is required to unlock alt music, but, for whatever reason I can't convert it into a .DOL mod (The ). I think the game might be checking memory card data for this, so I'm not sure if there is a way to convert this into a .DOL mod.

0445BF28 FFFFFFFF

@ Achilles1515 Achilles1515 @ Cyjorg Cyjorg
Any ideas?
Yeah, that's in the memory card area which is not in the DOL. Use these codes as well for alt music.

041644E8 38600001
041648F4 38600001
04164B14 38600001

I'll let you convert them into DOL mods. I think they have other effects of unlocking all characters and stages, I kind of forget. They report back a boolean true for having these things unlocked to allow for alternate music to be an option.
 

Myougi

My posts are gluten free.
Joined
Mar 14, 2014
Messages
484
Location
WEST COAST BEST COAST
Yeah, that's in the memory card area which is not in the DOL. Use these codes as well for alt music.

041644E8 38600001
041648F4 38600001
04164B14 38600001

I'll let you convert them into DOL mods. I think they have other effects of unlocking all characters and stages, I kind of forget. They report back a boolean true for having these things unlocked to allow for alternate music to be an option.
My god this is frustrating. I can't find the upper two in the dol either. I find can only find one thing and which changed doesn't seem to do anything. The upper two are so similar to each other i've tried to type out everything but to no avail.
Code:
386000008001001c83e1001483c10010382100187c0802a63c80803b900100049421ffe093e100183bc475f893a100143ba300004bffa87d
 
Last edited:

Achilles1515

Smash Master
Joined
Jun 18, 2007
Messages
3,211
Location
Cincinnati / Columbus OH
My god this is frustrating. I can't find the upper two in the dol either. I find can only find one thing and which changed doesn't seem to do anything. The upper two are so similar to each other i've tried to type out everything but to no avail.
Code:
I can find this for both of the top ones:
38600000480000143BBD00012C1D000B4180FFC0

But not this for 041644E8:
386000008001001c83e1001483c10010382100187c0802a63c80803b900100049421ffe093e100183bc475f893a100143ba300004bffa87d
Don't type them out. Just dump the RAM, open it up in a hex editor, highlight and copy, then search the DOL.
 

Myougi

My posts are gluten free.
Joined
Mar 14, 2014
Messages
484
Location
WEST COAST BEST COAST
Yeah, that's in the memory card area which is not in the DOL. Use these codes as well for alt music.

041644E8 38600001
041648F4 38600001
04164B14 38600001

I'll let you convert them into DOL mods. I think they have other effects of unlocking all characters and stages, I kind of forget. They report back a boolean true for having these things unlocked to allow for alternate music to be an option.
FINALLY:

Unlock Alternate Music Toggle (All Human Players hold L for Alt music on acceptable stages during loading) [1.02]:
@ DOL 0x1610C8 replace 38600000 -> 38600001
@ DOL 0x1614D4 replace 38600000 -> 38600001
@ DOL 0x164B14 replace 38600000 -> 38600001
 
Last edited:

Quillion

Smash Hero
Joined
Sep 17, 2014
Messages
5,608
FINALLY:

Unlock Alternate Music Toggle (All Human Players hold L for Alt music on acceptable stages during loading):
@ DOL 0x1610C8 replace 38600000 -> 38600001
@ DOL 0x1614D4 replace 38600000 -> 38600001
@ DOL 0x164B14 replace 38600000 -> 38600001
Will that unlock Menu 2 as well as the alt musics for Adventure Mode?
 
Top Bottom