• 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

TerryJ

Smash Journeyman
Joined
Apr 12, 2010
Messages
488
Location
BEST COAST, WA
NNID
1337-1337-1337
3DS FC
1337-1337-1337
If a projectile hitbox is making contact with one of the gray trigger collisions it's prevented from being able to hit that player's hurtboxes (probably a quirk in the way the gray collisions are coded as they also need to be flagged to hit vs air targets to negate them). They're only fully protected if it hits above their head (the upper arm basically). Between the top of the head and lower shoulder they stick out a bit in front of them and can be hit depending on the speed and spacing. Any lower than that and the lower arm being far in front and legs sticking out in back have them always get hit.

If you put a hitbox with that element on any move it has the same effect on projectile hitboxes.
Wut? He's going right through it and even when it passes all the way through the gray trigger bubbles it his his legs and still doesn't get hit by it.
 

TerryJ

Smash Journeyman
Joined
Apr 12, 2010
Messages
488
Location
BEST COAST, WA
NNID
1337-1337-1337
3DS FC
1337-1337-1337
I remember seeing a video guide that IE made before that taught how to search for addresses in the game and make edits. I can't seem to find it.

The main thing I want to do is disable the trophy spawn on the FIGUREGET stage so it's playable. I've read there's supposed to be a code already made for this but I've searched high and low and can't find it.
 

Todd Bonney

Smash Lord
Joined
Dec 17, 2005
Messages
1,098
Melee just has the one main.dol, correct?

Is there a way to get my hex editor to display the Assembly code? Seems like I ought to be able to add a custom library so it shows assembly instructions instead of ASCII.
 

Geuse

Smash Rookie
Joined
Jan 11, 2014
Messages
13
Here's IE's salty runbacks code for 1.02 DOL


Hold A+B For a Salty Runback:

@0x1A0D40:

981F0003 -------> 4BE603C0

@0x1520 to 0x155F:
39C00000 3DE08046
61EFB108 820F0000
5611018D 41820010
561101CF 41820008
38000002 39CE0001
2C0E0004 4080000C
39EF0008 4BFFFFD8
981F0003 4819FC08


or the new Project M style...


Hold L+R+Y For a Salty Runback:

@0x1A0D40:
981F0003 -------> 4BE603C0

@0x1520 to 0x1567:
39C00000 3DE08046
61EFB108 820F0000
56110253 41820018
56110295 41820010
56110109 41820008
38000002 39CE0001
2C0E0004 4080000C
39EF0008 4BFFFFD0
981F0003 4819FC00


Hold A+B for a Salty Runback (1.02) [IE]:
C21A4160 00000008
39C00000 3DE08046
61EFB108 820F0000
5611018D 41820010
561101CF 41820008
38000002 39CE0001
2C0E0004 4080000C
39EF0008 4BFFFFD8
981F0003 00000000

Hold L+R+Y for a Salty Runback (1.02) [Geuse]:
C21A4160 00000009
39C00000 3DE08046
61EFB108 820F0000
56110109 41820018
56110253 41820010
56110295 41820008
38000002 39CE0001
2C0E0004 4080000C
39EF0008 4BFFFFD8
981F0003 00000000
 
Last edited:

Geuse

Smash Rookie
Joined
Jan 11, 2014
Messages
13
Every Character Can Wall Jump
-Note: Peach can wall jump out of up-B infinitely (any character with a wall jump and the parasol item can do this, even in vanilla Melee)
[Y.S.]
Version ── DOL Offset ────── Hex to Replace ────────── ASM Code
1.02 ────── 0x07E2A0 ──── 540007FF -> 60000001 ──── ()
─────────── 0x07E2A4 ──── 41820254 -> 981F2224 ──── ()



Every Character Can Wall Jump (1.00) [Y.S.]:
04081418 60000001
0408141C 981F2224

Every Character Can Wall Jump (1.02) [Geuse]:
040816c0 60000001
040816c4 981F2224
 
Last edited:

Sham Rock

Smash Apprentice
Joined
Feb 10, 2014
Messages
95
Location
Outside of your grab range
Now also available for Pal


Hold A+B For a Salty Runback:
Version -- DOL Offset ------ Hex to Replace -------

PAL ------- 0x1A18C4 ---- 981F0003 -> 4BE5F83C ----

0x1520 to @0x155F:
39C00000 3DE08045
61EFBF10 820F0000
5611018D 41820010
561101CF 41820008
38000002 39CE0001
2C0E0004 4080000C
39EF000C 4BFFFFD8
981F0003 481A078C

1.02 ------ 0x1A0D40 ---- 981F0003 -> 4BE603C0 ---- (fixed and working for all 4 players now)

0x1520 to 0x155F:
39C00000 3DE08046
61EFB108 820F0000
5611018D 41820010
561101CF 41820008
38000002 39CE0001
2C0E0004 4080000C
39EF000C 4BFFFFD8
981F0003 4819FC08

1.00 ------ 0x19FFf8 ---- 981F0003 -> 4BE61108 ----

0x1520 to 0x155F:
39C00000 3DE08046
61EF9140 820F0000
5611018D 41820010
561101CF 41820008
38000002 39CE0001
2C0E0004 4080000C
39EF000C 4BFFFFD8
981F0003 4819EEC0
 
Last edited:

Kou

Smash Apprentice
Joined
Nov 22, 2011
Messages
198
Location
Japan
Now also available for Pal


Hold A+B For a Salty Runback:
Version -- DOL Offset ------ Hex to Replace -------

PAL ------- 0x1A18C4 ---- 981F0003 -> 4BE5F83C ----

0x1520 to @0x155F:
39C00000 3DE08045
61EFBF10 820F0000
5611018D 41820010
561101CF 41820008
38000002 39CE0001
2C0E0004 4080000C
39EF000C 4BFFFFD8
981F0003 481A078C

1.02 ------ 0x1A0D40 ---- 981F0003 -> 4BE603C0 ---- (fixed and working for all 4 players now)

0x1520 to 0x155F:
39C00000 3DE08046
61EFB108 820F0000
5611018D 41820010
561101CF 41820008
38000002 39CE0001
2C0E0004 4080000C
39EF000C 4BFFFFD8
981F0003 4819FC08
 Could you also make for v1.00?
 
Last edited:

shuall

Smash Apprentice
Joined
Jun 26, 2013
Messages
155
Location
Philly
Melee just has the one main.dol, correct?

Is there a way to get my hex editor to display the Assembly code? Seems like I ought to be able to add a custom library so it shows assembly instructions instead of ASCII.
Maybe, if your hex editor can disassemble ppc-750 machine code, that's basically ppc-gekko code (the stuff in gamecube dols).
 

Geuse

Smash Rookie
Joined
Jan 11, 2014
Messages
13
Thanks Sham Rock for fixing my 1.02 conversion. I noticed it was pointing to the wrong places for player 2-4's inputs, but I was hospitalized kind of recently/too lazy to change it.
 
Last edited:

Kou

Smash Apprentice
Joined
Nov 22, 2011
Messages
198
Location
Japan
Could someone make dol mod which make "stars*" show us the number of winning sets?

*star: under the tag name in the character select screen, and it shows us the number of taking opponents' stocks
 

Sham Rock

Smash Apprentice
Joined
Feb 10, 2014
Messages
95
Location
Outside of your grab range
How did you guys figure out which DOL offsets to edit with whatever values? I want to use InternetExplorer's code:

Code:
Boot to Character Select Screen (v1.02) [InternetExplorer]:
041a45a0 3c000202
041a45a4 901e0000

along with a few of the other codes to make a tournament-ready Melee ISO.



okay, i have no idea how far you understand how machine code/dolphin/etc goes, but what the hell,
here goes my try at explaining how to inject a code into the main.dol


FIRST: WHAT DOES THE CODE ACTUALLY DO?

Boot to Character Select Screen (v1.02) [InternetExplorer]:
041a45a0 3c000202
041a45a4 901e0000

this code simply overwrites a word in memory with something custom

04yy yyyy XXXX XXXX : 32bits ram write (ba) writes XXXXXXXX at ba+address(yy yyyy)

(you should know that from IE´s tutorial)

(for other/more complex codes you could also use
http://gamehacking.org/faqs/wiicodetypes.html
to be able to fathom the syntax and function of it)

in a nutshell:
--> replace what is saved in 801a 45a0 with "3c00 0202"
--> replace what is saved in 801a 45a4 with "901e 0000"





SECOND: HOW IS IT POSSIBLE TO INJECT THIS CODE?

For this you should know how the main.dol works in general.
(All this is based on assumptions i´ve got from reverse engineering codes and
stuff from other people, so some stuff may not be 100% correct. If that´s the case
i would appreciate it if someone would correct me)

When the game is loaded dolphin/your wii/your cube copies the content of the main.dol
into its ram and just continuously executes it until either you turn it of, it crashes
or some other end condition is met.

So when we use the code above this happens:
->system loads main.dol in ram
->before the game starts it replaces the content of 0x801a 45a0 && 0x801a 45a4
with "3c00 0202" and "901e 0000"

So, according to simple logic all we have to do is find the position (offset) of
0x801a 45a0 in the main and replace
the word there with "3c00 0202".
(theoretically you would have to search for the second offset as well but they are both
executed right after each other)

If the code was more complex you would need to find
free space in the main.dol, inject the code there and then branch to it, but that´s a
different topic and would create more questions right now than it would answer.




THIRD: FINDING THE OFFSETS THAT NEED TO BE EDITED

Let us take a look at those 2 and the surrounding lines in debug dolphin:

-------------------------------------------------------------------------------
WITHOUT the code (Vanilla):

mem-address instruction (code line) instruction(hex)
801a4598 stb r0, 0 (r30) 981e0000
801a459c b ->0x801A45A8 4800000c
801a45a0 li r0, 40 38000028
801a45a4 stb r0, 0 (r30) 981e0000
801a45a8 li r0, 45 3800002d


WITH the code:
mem-address instruction (code line) instruction(hex)
801a4598 stb r0, 0 (r30) 981e0000
801a459c b ->0x801A45A8 4800000c
801a45a0 lis r0, 0x0202 3c000202
801a45a4 stw r0, 0 (r30) 901e0000
801a45a8 li r0, 45 3800002d
-------------------------------------------------------------------------------

The second table is optional, but it helps in terms of visual representation to understand how
codes work.


Now if you want to know what the instructions do you have to set a break point and look at both cycles
(one with code, the other without) step by step.

li r0,40 --> r0 has 0000 0040 stored
lis 0x0202 --> r0 has 0202 0000 stored

(then later the game looks at the content of r0 and based on that decides what to load,
just that it will now load the CSS instead of the first screen)

But to get back on track we need to find "38000028" (instruction that is then going to be
loaded into memory address 801a45a0) in the main.dol and replace it with "3c000202".
That is easily done with a hex editor and the search function.
Again, if there is a simpler way to just convert mem-addresses to .dol-offsets it would be
really nice for someone to tell me.
So, i opened up the main.dol and searched for

"38000028" --> 55+ results,

at this point we could just try every single one until it works but that is way to tedious,
so we are going to search for multiple lines following each other i.e:

"981e0000 4800000c 38000028 981e0000 3800002d" --> 1 result found @0x1A1178

Why? Because any simple instruction like "li r0, 40" is very, VERY likely to be all over
the place, because sadly that´s just the way Assembler is (why can´t this be c++ -.-).
However, the chances of the 5 instructions above happening in that order multiple times is incredibly small.
Maybe it could happen that you will find 2 or 3 results, but trail-and-error with a single digit number of
attempts is way less time consuming and way less cumbersome that trying every single one.

So now that we know where to inject we give it a test run.

"38000028" @0x1A1180 replaced with "3c000202" & "981e0000" @0x1A1184 replaced with "901e0000"
---> WORKS
= DONE!!!


FORTH(IMPORTANT!): SHARE THE KNOWLEDGE YOU´VE JUST EARNED WITH THE REST OF THE COMMUNITY

Boot to Character Select Screen (v1.02)
-Game boots to the CSS instead of the main menu
[InternetExplorer]
Version -- DOL Offset ------ Hex to Replace ---------- ASM Code
1.02 ------ 0x1A1180 ---- 38000028 -> 3c000202 ---- (li r0, 40 -> lis r0, 0x0202)
------- 0x1A1184 ---- 981e0000 -> 901e0000 ---- (stb r0, 0 (r30) -> stw r0, 0 (r30))


FIFTH(OPTIONAL): BRING THE MODIFIED ISO TO YOUR NEXT SMASH GATHERING AND BRAG ABOUT YOUR SUPERIOR HACKING SKILLS
 
Last edited:

DRGN

Technowizard
Moderator
Joined
Aug 20, 2005
Messages
2,178
Location
Sacramento, CA
When modifying Game & Watch's aerials, I found that the 4th code for his Nair in my dol was different than what was listed. Instead of "4BF42095", it was "4BF3A5CD". My game version is a 1.01 (converted from a 1.00 disc). But that doesn't match what it should be even if it was 1.00, 1.02, or PAL.

Is this a mistake in the OP, something that just expectedly happens every once in a while, or something just really strange? lol
 

Sham Rock

Smash Apprentice
Joined
Feb 10, 2014
Messages
95
Location
Outside of your grab range
Always skip the result screen + stock count = placement
-game skips the result screen after a match and changes
the amount of stocks taken to the placement of the player in the last match
[Sham Rock]
Version -- DOL Offset ------ Hex to Replace -------

1.00 ------ 0x19FFf4 ---- 3803FFFF -> 4BE6100C ----

@ 0x1420 onward

3803FFFF 2C000004
40820060 2C0B0020
41820058 3A400000
3E808047 62947D90
3EA0804D 62B545AF
8E1400A8 8A340001
2C10004E 4080000C
9E350001 4800000C
3A310001 9E350001
3A520001 2C120004
41A0FFD8 3A000000
3A200000 3A800000
3AA00000 38000000
60000000 4819EF8C

1.02 ------ 0x1a0d3c ---- 3803ffff -> 4BE602C4 ----

@ 0x1420 onward

3803FFFF 2C000004
40820060 2C0B0020
41820058 3A400000
3E808047 62949D58
3EA0804D 62B5672F
8E1400A8 8A340001
2C10004E 4080000C
9E350001 4800000C
3A310001 9E350001
3A520001 2C120004
41A0FFD8 3A000000
3A200000 3A800000
3AA00000 38000000
60000000 4819FCD4

PAL ------- 0x1A18C0 ---- 3803FFFF -> 4BE5F740 ----

@ 0x1420 onward

3803FFFF 2C000004
40820060 2C0B0020
41820058 3A400000
3E808046 6294AB60
3EA0804C 62B579EF
8E1400A8 8A340001
2C10004E 4080000C
9E350001 4800000C
3A310001 9E350001
3A520001 2C120004
41A0FFD8 3A000000
3A200000 3A800000
3AA00000 38000000
60000000 481A0858




Don´t know if that is what you´ve meant Kou, but this is something i´ve made for my smash crew the other day.

Edit: There´s a small glitch in this code that only appears when using it on a console (NOT dolphin). For the first match, only player 1s placement will be shown in the stock count, but after the second rep everythings acting the way it should. I have NO IDEA why that only happens on console at the moment. I´m going to test this one further tomorrow.

2nd edit: Registers don´t get set to 0 when you boot up the console -.-
Fixed that, everything works now right from the beginning.

3rd edit: will no longer affect the debug menu
 
Last edited:

TerryJ

Smash Journeyman
Joined
Apr 12, 2010
Messages
488
Location
BEST COAST, WA
NNID
1337-1337-1337
3DS FC
1337-1337-1337
This probably isn't the perfect place for this but I'll post here anways.
I've been playing with the Gobal Data Edit menu a bit and it seems you can rewrite just about any hex address in the game. I haven't found a whole lot of documentation on the menu of anyone actually using it.

Do you think I could use this to edit on the fly the weight/gravity values of the Sandbag with that of Peaches? How would I find the address? I'd probably be better off just editing the ISO files to replace the Sandbag's weight in his .dat file with a Hex Editor but that would require making modifications to the ISO and it wouldn't be on-the-fly.

Even better yet, from reading the glorious post that is Sham Rock's explanation of a code, I could just modify the address that Homerun mode uses to load up Sandbag to Peach. Real question is how do I find that address without an emulator. Been playing around with the Master Hand program and trying to figure out which address I want to change but this is a bit over my head.
 

Sham Rock

Smash Apprentice
Joined
Feb 10, 2014
Messages
95
Location
Outside of your grab range
This probably isn't the perfect place for this but I'll post here anways.
I've been playing with the Gobal Data Edit menu a bit and it seems you can rewrite just about any hex address in the game. I haven't found a whole lot of documentation on the menu of anyone actually using it.

Do you think I could use this to edit on the fly the weight/gravity values of the Sandbag with that of Peaches? How would I find the address? I'd probably be better off just editing the ISO files to replace the Sandbag's weight in his .dat file with a Hex Editor but that would require making modifications to the ISO and it wouldn't be on-the-fly.

Even better yet, from reading the glorious post that is Sham Rock's explanation of a code, I could just modify the address that Homerun mode uses to load up Sandbag to Peach. Real question is how do I find that address without an emulator. Been playing around with the Master Hand program and trying to figure out which address I want to change but this is a bit over my head.
I don´t know anything about the Gobal Data Edit menu or what it even is, since i pretty much only focus mods injected directly into the iso, but in case you want additional information, here´s my advice.
1. Changing the value of the sandbags weight in the file itself

The raw data about weight attributes etc is saved in the file PlSb.dat , the others (PlSbNr.dat for instance) contain the visual textures and whatnot.

Judging by Geuse work on http://smashboards.com/threads/cross-version-characters.344977/#post-16222978 and 30 seconds of intense testing by myself ,
all characters weight is written in a "42XX0000" format.
XX = weight of the character x2 in hex format

example:
Bowser NTSC
42EA0000

EA = 234 --> /2 = 117

Bowser PAL
42EC0000

Ec = 236 --> /2 = 118



according to http://www.gamefaqs.com/boards/516492-super-smash-bros-melee/51498832/566186289 it has a weight of 100

so lets use out hex editor and simply search for 42C80000
pal & ntsc both @ 14EC

note: sometimes it can happen that that word appears multiple times in the file (Bowsers pal file contains "42EC0000" twice), then you´ll have to simple go by trial and error

lets give it a test

im taking the pal version here, just because i really dislike the ft measurement

testing it out with "42FF0000" (MAX weight i assume)
load up HRC with jiggs and simply rest at 0%
42C80000 -> exactly 47,0m
42FF0000 -> 41,7m


Sandbag: Weight 100 ─> WHATEVER YOUR HEART DESIRES
Filename ──── .dat Offset ──── Hex to Replace ─────
PlSb.dat ──── 0x0014EC ─────── 42C80000 -> 42XX0000

XX = weight x2 (in hex of course)


2. Modifying the code to load peach instead of the sandbag

Theoretically, there´s nothing wrong with the idea but it is tedious.

ALSO KEEP IN MIND:
the sandbag cannot be KO´d, no matter what mode he is in (he will not die in debug mode on FD iirc), while on the other hand peach CAN be.
That could cause all of the work you put in it to be ruined at your first try after immediately killing peach of the top.

But if you really wanted to try that you would most likely need an emulator ( device that can access the GCs memory ).
First you would have to find out where data is stored in memory which then the game then uses to determine what characters to load in which player slot.
To make this paragraph as short as possible, it is pretty much the same as IE´s beginners tutorial for the char select code with sonic/shadow.
However, this is usually not SO easy because the modifier does know know which char has which id.
It could be that Mario has 0000 0001, Luigi has 0000 0007, Peach has 0000 000C just because that´s the order in which they were programmed into the game.
It could also be Mario has 0000 0001, green Mario has 0000 0002 and so on......
It could be that they are linear to their appearance on the CSS (Doc 01 Mario 02 Luigi 03 etc)................
It could be they are in reverse linear order to their appearance on the CSS (Doc FF Mario FE LUIGI FD etc).........
(found this style of selection once in a program at work, nearly punched the guy who wrote that and forgot to mention it in the comments -.- )
It could be ANY of the above + an offset since the first xx slots were used for testing during the programming of the game (Doc 02 Mario 03 Luigi 04 etc)..............
You see, things like this can really easy end in a fustercluck of trial and error, and this is why it COULD end up being a LOT of work for something so simple

But, if you could find out the responsible memory addresses you could make your idea come true. You would STILL need a emulator to let the game break at the point it accesses the memory responsible for which char to load.

Then you would know at which memory address to inject you code.

Then you won´t need a debug device anymore and can write a simple 4-liner to change that to Peach. But up until that point you WILL need something to debug, either a emulator or a usb gecko or something else, otherwise you won´t be able to find that line of memory.
 
Last edited:

TerryJ

Smash Journeyman
Joined
Apr 12, 2010
Messages
488
Location
BEST COAST, WA
NNID
1337-1337-1337
3DS FC
1337-1337-1337
I don´t know anything about the Gobal Data Edit menu or what it even is, since i pretty much only focus mods injected directly into the iso, but in case you want additional information, here´s my advice.
1. Changing the value of the sandbags weight in the file itself

The raw data about weight attributes etc is saved in the file PlSb.dat , the others (PlSbNr.dat for instance) contain the visual textures and whatnot.

Judging by Geuse work on http://smashboards.com/threads/cross-version-characters.344977/#post-16222978 and 30 seconds of intense testing by myself ,
all characters weight is written in a "42XX0000" format.
XX = weight of the character x2 in hex format

example:
Bowser NTSC
42EA0000

EA = 234 --> /2 = 117

Bowser PAL
42EC0000

Ec = 236 --> /2 = 118



according to http://www.gamefaqs.com/boards/516492-super-smash-bros-melee/51498832/566186289 it has a weight of 100

so lets use out hex editor and simply search for 42C80000
pal & ntsc both @ 14EC

note: sometimes it can happen that that word appears multiple times in the file (Bowsers pal file contains "42EC0000" twice), then you´ll have to simple go by trial and error

lets give it a test

im taking the pal version here, just because i really dislike the ft measurement

testing it out with "42FF0000" (MAX weight i assume)
load up HRC with jiggs and simply rest at 0%
42C80000 -> exactly 47,0m
42FF0000 -> 41,7m


Sandbag: Weight 100 ─> WHATEVER YOUR HEART DESIRES
Filename ──── .dat Offset ──── Hex to Replace ─────
PlSb.dat ──── 0x0014EC ─────── 42C80000 -> 42XX0000

XX = weight x2 (in hex of course)


2. Modifying the code to load peach instead of the sandbag

Theoretically, there´s nothing wrong with the idea but it is tedious.

ALSO KEEP IN MIND:
the sandbag cannot be KO´d, no matter what mode he is in (he will not die in debug mode on FD iirc), while on the other hand peach CAN be.
That could cause all of the work you put in it to be ruined at your first try after immediately killing peach of the top.

But if you really wanted to try that you would most likely need an emulator ( device that can access the GCs memory ).
First you would have to find out where data is stored in memory which then the game then uses to determine what characters to load in which player slot.
To make this paragraph as short as possible, it is pretty much the same as IE´s beginners tutorial for the char select code with sonic/shadow.
However, this is usually not SO easy because the modifier does know know which char has which id.
It could be that Mario has 0000 0001, Luigi has 0000 0007, Peach has 0000 000C just because that´s the order in which they were programmed into the game.
It could also be Mario has 0000 0001, green Mario has 0000 0002 and so on......
It could be that they are linear to their appearance on the CSS (Doc 01 Mario 02 Luigi 03 etc)................
It could be they are in reverse linear order to their appearance on the CSS (Doc FF Mario FE LUIGI FD etc).........
(found this style of selection once in a program at work, nearly punched the guy who wrote that and forgot to mention it in the comments -.- )
It could be ANY of the above + an offset since the first xx slots were used for testing during the programming of the game (Doc 02 Mario 03 Luigi 04 etc)..............
You see, things like this can really easy end in a fustercluck of trial and error, and this is why it COULD end up being a LOT of work for something so simple

But, if you could find out the responsible memory addresses you could make your idea come true. You would STILL need a emulator to let the game break at the point it accesses the memory responsible for which char to load.

Then you would know at which memory address to inject you code.

Then you won´t need a debug device anymore and can write a simple 4-liner to change that to Peach. But up until that point you WILL need something to debug, either a emulator or a usb gecko or something else, otherwise you won´t be able to find that line of memory.
Alright so I went and re-watched IE's Stream again and downloaded Dolphin again and have gotten the count of possible addresses of the second port's character to 78, and I can't seem to filter it any more than this.

For the character ID's I found this site which hosts a lot of other data too but I'm going to assume the internal ID is the one for the characters in-game. (I also want to use this info later to change which stages load from stage select if possible but that's later. (also disable trophy spawn on FigureGet :D))
Even if I were to find the address, I'm still not quite sure how to find the line the calls which character is loaded into the game.

By the way, thank you very much for your detailed post it's crazy helpful.
 

DRGN

Technowizard
Moderator
Joined
Aug 20, 2005
Messages
2,178
Location
Sacramento, CA
I'm further confused by MasterHand. For DK it lists the value "Weight" "@88". Those on the left are supposed to be hex offsets, right? But that doesn't correspond to the above 0x3A39 offset for DK.

Also, how would we go about changing Gravity, so that characters do not fall? I attempted it yesterday. Looking in the file "PlDk.dat", at offset 05C (shown in MasterHand for Gravity), I see 66 69 67 61 [end of line]. It didn't seem right but I tried changing the 66 to 00 anyway. Didn't work; DK was still affected by gravity. I also tried changing all 4 of those variables, all the way up to but not including offset 060 (supposed to be Terminal Velocity?), to 00, but that didn't work either. I see in the "Overview" tab of MasterHand it says "AttributesOffset @0x00003990". So am I supposed to begin at that offset, and then move forward 05C? So then for the total offset I'd have 0x3990 + 0x05C = 0x39EC. But that doesn't look right either; at that location I see "3F 80 00 00". (Then again I don't know how to convert a number with a decimal mark to hex, so I don't know what the hex value would be (apparently DK's gravity is supposed to be .1).) I just realized this same logic doesn't apply to DK's weight though, because 0x3990 + 0x88 = 3A18 =/= 0x3A39. -_-

halp. lol

Also, would Gravity AND Terminal Velocity (or any other values) need to be changed to 0?

Another side question: I've noticed that along with the files for different color variations (e.g. PIDrBk.dat, PIDrBu.dat, etc.) many characters have a PI**AJ.dat file and a PI**DViWaitAJ.dat file. What are those for? Other textures or data for that character that are standard across all of the different costumes? If so what data? I know all of the "standard" physical attributes are in the PI**.dat files.
 

Sham Rock

Smash Apprentice
Joined
Feb 10, 2014
Messages
95
Location
Outside of your grab range
Alright so I went and re-watched IE's Stream again and downloaded Dolphin again and have gotten the count of possible addresses of the second port's character to 78, and I can't seem to filter it any more than this.

For the character ID's I found this site which hosts a lot of other data too but I'm going to assume the internal ID is the one for the characters in-game. (I also want to use this info later to change which stages load from stage select if possible but that's later. (also disable trophy spawn on FigureGet :D))
Even if I were to find the address, I'm still not quite sure how to find the line the calls which character is loaded into the game.

By the way, thank you very much for your detailed post it's crazy helpful.
I wish i could spend some time on this topic (if i had the time for it I would try to making a code that no matter what you choose, the game only loads FD with fox. would be a great april fools prank.), but unfortunately i´ve got finals coming up soon -.- .

Anyway, a few things you should keep in mind that popped in my head while thinking about this:

-You are looking for 8-bit data, right? looking for 32 bit doesn´t seem logical to me to since using a full word to store a value that´s somewhere between 0 and 35ish seems not very sophisticated

-I think some youtube video mentions that when using the name entry glitch to pay as master hand it happens because you don´t have a value for a char stored in memory, meaning the game automatically loads up the first char, which happens to be master hand. Don´t know if the person knew what he was talking about, just wanted to mention that here in case it helps with something
(however, if one of those lists is actually true please tell me immediately)

-Does the debug menu work on dolphin? (have never used it on a emulator before) If it does, use it and only change the char for 1 player and do a "not equal" followed by a bunch of "equal" searches during the match

-some ideas of the format char values etc could be saved

11223344 11223344 11223344 11223344...........
first word has the id of all 4 players characters
second word has their colors
third word has their scale

fourth word has cpu level or something (where FF equal human player)
and so on for all the option you can set in debug menu ( cpu behavior, handicap and everything)

could be something like this since the games main aspect are the 4 player multiplayer battles, but it gets me to think about player 5 & 6.
Since both of them never use any special color, can´t be accessed by the player and usually just need char and cpu level setting (maybe sandbag has a cpu level setting of 0 for "never do anything")
it would be plausible to have their settings somewhere completely incorehent,

but things could also be stored like this


xxyyzzww ppqqiiuu .............. xxyyzzww ppqqiiuu .............. xxyyzzww ppqqiiuu .............. xxyyzzww ppqqiiuu .............. xxyyzzww ppqqiiuu .............. xxyyzzww ppqqiiuu ..............

where all data about a player is stored linear and after everything of a player is loaded, the next player is loaded and so on

for instance
xx = id of char
yy = color
zz = team
ww = handicap
pp = scale
qq = cpu setting
ii = etc

p1 ...... p2 ..... p3 ...... p4 ..... p5 ...... p6

Those are just random assumptions on how it could be, or more likely how any sane programmer would put it, so take it with a grain of salt if it isn´t so linear and nice as you may hope.
Or maybe i´m completely wrong and Hal laboratories said "**** it, we got memory to waste, no need for efficient programming, just waste 32 bits for a 2-digit value"
But on the other hand, if you hit a dead end with your search for char-id-values, maybe you can find the value for something else (cpu level, a simple flag if there is a player present (saw that while working on the result screen skip, where a byte was either stored as 78 or 00 to indicate if a player had partaken in the match or not), color values/team values or anything else you can change in the debug menu) and look in the memory around it and find the char-id by luck

-When you start the HRC as second player your percentage still gets shown i the position of player 1, my guess would be that the game puts the sandbag in position 5 OR 6 and places the player (whatever slot he´s in) in first and the sandbag in second slot on the HUD, meaning instead of looking for the damage of player 2, you should first determine the mem-addresses for the damage of all 6 players ( IE´s tutorial includes exactly that) via debug menu and then look at them when you´re in the HRC (keep in mind that damage is saved to the 5th or 6th digit after decimal, so don´t do a simple "equal to"-search)



Anyway, that´s what came to mind when I gave the topic some thought. Please be so kind to share any results you have (doesn´t matter if positive or negative, posting negative information is going to protect the next hacker from wasting time on something you´ve already proven wrong) with us.
 
Last edited:

sdremix_troubleshooter

Smash Journeyman
Joined
Oct 27, 2013
Messages
202
Masterhand doesn't consider the first 0x20 header data when it makes offset calculations. To use the "AttributeOffsets" data meaningfully, add 20 hex from its output: that is the start of the Attributes table.

0x3990 + 0x20 = 39B0

To get to his weight, add 0x39B0 + 0x88 = 3A38

Almost all values in the Attributes table are written in 32-bit floating point: Use this convert for decimal <-> floating point conversions: http://www.h-schmidt.net/FloatConverter/
 

Achilles1515

Smash Master
Joined
Jun 18, 2007
Messages
3,211
Location
Cincinnati / Columbus OH
Sham Rock, you are amazing! Thank you so much for spending the time to explain how to do this stuff and also following up on requests.

The idea of skipping the results screen is fantastic. I haven't tried the code out yet, but what part of it (1.02 specifically) will need to be changed if I do not want any changes made to how the stars work?

I know Kou can speak for himself, but I don't believe that is what he was asking for. I think he wanted a player to get a star after they win 2 out of 3 or 3 out of 5 games (hence, a set) and for those stars to keep adding up - not just the winner of the previous game being shown.

I have a request of my own, if it's not too hard, that would be great for friendlies. Along the same idea of the salty run back ~ what about after holding some button combination after a match (so when "GAME!" Shows up), it automatically starts another match on a random stage (those available on the random select, mimicking pressing the random button on the stage select screen). So it's essentially the salty run back but on a random competitive stage. And I haven't tried the salty run back code, or the salty run back in combination with the no results screen code, but I imagine there to be no results screen in between the end of the last match and the start of the new match. "Hold ___ After Match for Endless Friendlies"??? Let me know what you think.

I haven't been to this topic in awhile and am so pumped that there's awesome, new content to be injected into the smash ISO.
 

Sham Rock

Smash Apprentice
Joined
Feb 10, 2014
Messages
95
Location
Outside of your grab range
Sham Rock, you are amazing! Thank you so much for spending the time to explain how to do this stuff and also following up on requests.

The idea of skipping the results screen is fantastic. I haven't tried the code out yet, but what part of it (1.02 specifically) will need to be changed if I do not want any changes made to how the stars work?

I know Kou can speak for himself, but I don't believe that is what he was asking for. I think he wanted a player to get a star after they win 2 out of 3 or 3 out of 5 games (hence, a set) and for those stars to keep adding up - not just the winner of the previous game being shown.

I have a request of my own, if it's not too hard, that would be great for friendlies. Along the same idea of the salty run back ~ what about after holding some button combination after a match (so when "GAME!" Shows up), it automatically starts another match on a random stage (those available on the random select, mimicking pressing the random button on the stage select screen). So it's essentially the salty run back but on a random competitive stage. And I haven't tried the salty run back code, or the salty run back in combination with the no results screen code, but I imagine there to be no results screen in between the end of the last match and the start of the new match. "Hold ___ After Match for Endless Friendlies"??? Let me know what you think.

I haven't been to this topic in awhile and am so pumped that there's awesome, new content to be injected into the smash ISO.
About requests:
Actually, i don´t do requests. The code i made was in progress before Kou suggested/requested something similar to it. I write codes for me and my smash crew to improve the flow/experience of SFs, or to fix what i deem necessary to fix. It was a mere coincidence that my timing with it was so great.
Doing requests very often results in doing something you either have no personal interest in or something that´s just absurd and wont help a lot of people.
For instance, writing a code that "expands the time window you can power shield falco´s laser by 2 frames, but you get 5% if you powershield in that extended time" may be useful for some specific people, but in general the time spend making it VS the time it is going to be useful isn´t such a good ration. On the other hand the "skip result screen" took some hours to make (mostly documenting/porting to other versions+inject, the actual code was written in 20 minutes after i found out the memory addresses of interest and the inject place) but every single time it´s used it saves the user 7 seconds + it is usefull to anybody of any skill level for pretty much as long as wii´s / gc´s exist. Now that´s the best "time spend VS gain of the community"-ratio you could possibly ask for.

But if you have suggestions/ideas/thoughts, share them with us. If I find them interesting and useful I´m gonna spend some time with them.

The "skipRS" code
The code was designed the way it is for the following reasons
1. The amount of stocks taken gets updated in the result screen itself after each player has pressed Start, and since the result screen is no more, i had a free graphic i could use to my hearts desire and felt that was the best way to use it
2. I wanted it to keep its tournament viability, meaning if someone would falsely claim victory after a match there was definitive prove that you have won
(if both only have 1 stock and someone quits both are listed as first place, but if you would quit in the same situation on a normal game you could not tell which one won either)
Not that I have ever seen anybody who would have the audacity to do such a thing, but as a programmer you think a lot about worst case scenarios when your code could be used against you in case of a error.

If you wanted to change to the code so the stars function normally you would have to find the memory that has the amount of "kills" stored when the result screen is being loaded and change the the stock count accordingly. In case you want to do that, there is a file attached in the sticky topic of gecko cheat codes of my notes on making the code, maybe it´s going to help you.


"Hold ___ After Match for Endless Friendlies"
Actually, I have thought about exactly that, but put it aside/on the bottom of the list since the main method of playing in my group is on gamecube fusions (gamecube with wiikey fusion inside), meaning that loading times never exceed 0.2 seconds. So the priority on that one got jammed down quite a bit.
I have some bigger/currently more important codes I want to try out first, but as time goes by I am likely to look into something like that.

Just give things some time, this is still my first month here.
 
Last edited:

Achilles1515

Smash Master
Joined
Jun 18, 2007
Messages
3,211
Location
Cincinnati / Columbus OH
I understand about the request thing. And yeah...I'm not into the weird requests like the example you stated - I'm only interested in ones that are tournament friendly / keep the game normal.

I tried out the skip results screen and salty runback codes this morning and they work great. I did find one bug/unintended consequence of the skip results code:

If you try to start a match in the debug menu, pressing start will no longer initiate the match, it will instead just bring you back to the main debug menu (it doesn't look like it even tries to boot the match). This renders the debug menu essentially useless.
 

Sham Rock

Smash Apprentice
Joined
Feb 10, 2014
Messages
95
Location
Outside of your grab range
fixed that

+salty runback code modified
1.02 ------ 0x1A0D40 ---- 981F0003 -> 4BE603C0 ----

0x1520 to 0x155F:
39C00000 3DE08046
61EFB108 820F0000
5611018D 41820010
561101CF 41820008
38000002 39CE0001 (replace this line with 38000001 39CE0001)
2C0E0004 4080000C
39EF000C 4BFFFFD8
981F0003 4819FC08

replacing that line will cause the game to go to the stage selection screen instead of the salty runback when you press A+B. If you set stage to random it will immediately load the next game
 
Last edited:

Achilles1515

Smash Master
Joined
Jun 18, 2007
Messages
3,211
Location
Cincinnati / Columbus OH
Simply fantastic, thanks Sham Rock. This code is so amazing for playing friendlies.

I found a bug with it, though, that causes the game to freeze. I don't feel like typing it out so I made a video explaining the issue.

http://www.youtube.com/watch?v=OcKcmJ1euVY

(BTW, sorry about the intro with my face cutoff, which I thought I was filming - I was using the rear camera on my iPad so I couldn't see myself. I didn't feel like redoing it though, because its 2:30 in the morning....)

To give more details about what I said at the end, I am running the game off of an sd card using dios mios lite. In doing such, I realize this brings many new variables into play, that you probably can't test and what not. Just thought I'd let you know about it in case the reason for this bug is apparent and does make sense to you. I have a feeling it's a weirder one though since I can't replicate it on Dolphin....

and idk if i made this clear, but if I start a match from bootup with random like I was doing, and just keep doing salty over and over again, it seemed to never freeze when doing so. It was just when going back to the CSS and then starting a match and doing a salty right after.

Thanks again for figuring this code out in the first place. It is exactly what I was looking for!
 
Last edited:

Sham Rock

Smash Apprentice
Joined
Feb 10, 2014
Messages
95
Location
Outside of your grab range
Weird......

Gave it 15 min of my time today and wasn´t able to replicate it on dolphin as well -.-

Since this code is just a temporary thing anyway (having either salty runback or endless friendlys is not acceptable, we need to have both, but I´m stuck in final weeks till april + other codes are still higher on the list at the moment)
you´ll have to deal with it for now, maybe some time soon i´ll come around to make a proper code for that.

And frankly, I was just messing around with IE´s code when I came across this

Some suggestions on my side:
-different sd card?
-can you try loading it from usb via dios mios? or does that require a different installation of wad´s?
-if you have a spare dvd flying around, try burning your iso and give it a try
-take notes when it happens again about the parameters
-->last 2 stages played
-->when was the CSS accessed for the last time
-take out the "skip result screen" code and test again (you can hold A+B either when it says "GAME"
or when everybody has pressed start on the result screen, in both cases it is going to initiate the next match)


If you find anything interesting, feel free to share it here.

But thanks for giving me details on this error, most people just say "game freezes" without any reasons or anything.

Edit: 1st of I would take a good look at the stages, judging by the video it could just be a FoD problem
 
Last edited:

Achilles1515

Smash Master
Joined
Jun 18, 2007
Messages
3,211
Location
Cincinnati / Columbus OH
I was testing earlier to see if it was an FoD only problem but then it happened to me on FD also. If I have time tomorrow I'm going to try the original salty runback and maybe also taking out the skip results code.
 

Sham Rock

Smash Apprentice
Joined
Feb 10, 2014
Messages
95
Location
Outside of your grab range
if you want to test more take a different stage out of random selection each friendly session or each time the game crashes, it´s not just limited to trouble when you are coming from one stage, it could also be when you are going to a certain stage
 

Achilles1515

Smash Master
Joined
Jun 18, 2007
Messages
3,211
Location
Cincinnati / Columbus OH
Normal C-Stick Functionality in Develop Mode [Updated]
-C-Stick additionally provides Master mode functionality while in Develop Mode
[Magus]
-C-Stick no longer also toggles fixed camera mode
[Achilles]

Version ── DOL Offset ────── Hex to Replace ────────── ASM Code
1.00 ────── 0x067918 ──── 800D9368 -> 38000000 ──── (lwz r0,-27800(r13) -> li r0,0)
1.00 ────── 0x2CC04 ──── 38000008 -> 38000000 ──── (li r0,8 -> li r0,0)

1.01 ────── 0x067A28 ──── 800D9368 -> 38000000 ────
1.01 ────── 0x2CC84 ──── 38000008 -> 38000000 ────

1.02 ────── 0x067A70 ──── 800D9368 -> 38000000 ────
1.02 ────── 0x2CC84 ──── 38000008 -> 38000000 ────

PAL ────── 0x068154 ──── 800D9388 -> 38000000 ──── (lwz r0,-27768(r13) -> li r0,0)
PAL ────── 0x2D1B0 ──── 38000008 -> 38000000 ──── (li r0,8 -> li r0,0)

*Note*
For whatever reason, these DOL edits do not work on Nana. Popo will do C-Stick attacks as normal but Nana will do nothing.

With these DOL edits, complete normal C-Stick functionality is restored in Develop Mode. This will allow regular [competitive] versus matches to be played with hitboxes and hurtboxes overlayed on characters, among other things. Do note, though, that damage staling is still not applied while in Develop mode. Look at a debug menu guide for more details.

Magus provided the first lines of these codes, and I authored the second lines concerning the fixed camera.
 
Last edited:

Goatlink

Smash Apprentice
Joined
Jul 14, 2013
Messages
146
Location
Portland, OR
Normal C-Stick Functionality in Develop Mode [Updated]
-C-Stick additionally provides Master mode functionality while in Develop Mode
[Magus]
-C-Stick no longer also toggles fixed camera mode
[Achilles]

Version ── DOL Offset ────── Hex to Replace ────────── ASM Code
1.00 ────── 0x067918 ──── 800D9368 -> 38000000 ──── (lwz r0,-27800(r13) -> li r0,0)
1.00 ────── 0x2CC04 ──── 38000008 -> 38000000 ──── (li r0,8 -> li r0,0)

1.01 ────── 0x067A28 ──── 800D9368 -> 38000000 ────
1.01 ────── 0x2CC84 ──── 38000008 -> 38000000 ────

1.02 ────── 0x067A70 ──── 800D9368 -> 38000000 ────
1.02 ────── 0x2CC84 ──── 38000008 -> 38000000 ────

PAL ────── 0x068154 ──── 800D9388 -> 38000000 ──── (lwz r0,-27768(r13) -> li r0,0)
PAL ────── 0x2D1B0 ──── 38000008 -> 38000000 ──── (li r0,8 -> li r0,0)

*Note*
For whatever reason, these DOL edits do not work on Nana. Popo will do C-Stick attacks as normal but Nana will and do nothing.

With these DOL edits, complete normal C-Stick functionality is restored in Develop Mode. This will allow regular [competitive] versus matches to be played with hitboxes and hurtboxes overlayed on characters, among other things. Look at a debug menu guide for more details.

Magus provided the first lines of these codes, and I authored the second lines concerning the fixed camera.
A lot of people have wanted this for a long time. Thank you
 

FlamingForce

Smash Journeyman
Joined
Jun 5, 2013
Messages
390
Do these work in Dolphin? I replaced the Dol I got from the reddit thread and used my netplay ISO, the ISO works but not hitboxes show up, I checked the MD5 value (The copied ISO I used GC-Tool on VS the original one I use for Netplay) and the values do NOT match.

GC-Tool does seem to crash after I close it or something, when I open the new Dol the program says "Done" but after I close it and exit it seems to close just fine but windows then proceeds to tell me that it has stopped working.

Does anyone have the MD5 of a modded ISO? Or does this just not work in dolphin?
 

Achilles1515

Smash Master
Joined
Jun 18, 2007
Messages
3,211
Location
Cincinnati / Columbus OH
It works in Dolphin. Did you follow the correct steps to enter debug menu, change the dblevel to Develop, and then input the correct button combination (R+d pad right or up) to turn them on?
 
Top Bottom