• 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!

Melee Gecko Codes + Guide and Discussion

Joined
Oct 10, 2011
Messages
1,126
Location
Boise, ID
NNID
dansalvato
I'm currently working on taking a value in one address and putting it into another (programmatically). But I'm wondering, would this be possible using purely a Gecko code? It'd be nice if I could also do some math on it before putting it into the new address.
For what it's worth, this can be nicely done using Gecko instructions rather than relying on ASM. See the "Gecko Register" section of this page: http://geckocodes.org/index.php?arsenal=1
(If their syntax is confusing, anything surrounded by brackets means that it's not using that value itself, but the value stored at that pointer.)

Say we want to load the value stored in 0x805a7d00, multiply it by 3, and store it in 0x805a7d10

Code:
82200000 805a7d00    #load value at 0x805a7d00 into gr0
86100000 00000003    #multiply gr0 by 3
84200000 805a7d10    #store gr0 to 0x805a7d10
By nature of the Gecko codehandler, this will automatically run every frame without any injection point being required.
This can probably be cut down to 2 lines of code by loading gr0 with the pointer and using 86T1 instead of 86T0 for the second line, but I'm not confident enough to be certain that it will work. My point is that oftentimes, Gecko's code system can often save effort when used instead of, or in combination with, ASM injection.
 

Starreaver1

Smash Apprentice
Joined
Oct 12, 2013
Messages
132
Location
Minneapolis, MN/Princeton, NJ
I don't use Smashboards nearly enough to figure out how to use quotes and such, but thanks for the awesome code IE! If someone could convert that to a DOL mod, I'd be forever grateful :) I'm taking a crack at it, but since I only work with DOL and not Gecko it's gonna be slowwww going.

Edit: I actually just converted all of the Gecko into machine code and ASM - problem is, I don't how it all fits together. Particularly, how to inject the converted Gecko into the DOL, and how the branches/endifs work in Gecko, etc.
 
Last edited:

Achilles1515

Smash Master
Joined
Jun 18, 2007
Messages
3,211
Location
Cincinnati / Columbus OH
Upward Kills Incur Death Flash (DeadUp) (1.02) [Achilles]
040D32CC 4BFFFF94
040D32A8 4BFFFFB8


Speaking of name entry, I just finished up my own name entry code, which I'm calling Extended Name Entry. Here's a demo:
http://gfycat.com/AjarNeedyInexpectatumpleco
And the code:
http://pastebin.com/9AcmNxCn


Well, Gecko is technically a full standalone codehandler which does much more than perform ASM injections/operations. Some functions that would take a good chunk of ASM can be done with just a couple Gecko instructions.
But yeah, I would welcome any and all code-related discussion in this thread.
As I've already stated to you, this is phenomenal!
 

Starreaver1

Smash Apprentice
Joined
Oct 12, 2013
Messages
132
Location
Minneapolis, MN/Princeton, NJ
I've converted IE's Gecko code to a DOL mod but uhhh. It's a lot of lines, and it's kind of all over the place, so I dunno how I'd post/share it.

Edit: Will post my notes in the DOL mod topic.
 
Last edited:
Joined
Oct 10, 2011
Messages
1,126
Location
Boise, ID
NNID
dansalvato
Upward Kills Incur Death Flash (DeadUp) (1.02) [Achilles]
040D32CC 4BFFFF94
040D32A8 4BFFFFB8
As much as I absolutely love this code and would also love to see it used in tournaments, it somewhat comically introduces balance change issues involving Jigglypuff's rest, and so it is forever condemned to a non-tournament optional, haha. Sad face.
 

Flossy

Smash Cadet
Joined
Sep 6, 2014
Messages
33
Location
Berea, Ohio
Would someone be able to make a code that permanently displays the action/frame display you get when you press Y+down in the debug menu? I'd like to use it to help with TASing.
 

Todd Bonney

Smash Lord
Joined
Dec 17, 2005
Messages
1,098
As much as I absolutely love this code and would also love to see it used in tournaments, it somewhat comically introduces balance change issues involving Jigglypuff's rest, and so it is forever condemned to a non-tournament optional, haha. Sad face.
I'm all in favor of preventing people from using Jigglypuff.
 

kirox777

Smash Apprentice
Joined
Nov 13, 2008
Messages
84
Location
Your moms house
Anyone have a code that allows me to take off tap-jump?

Is it possible for someone to make a Tap-Jump on/off switch replace the rumble on/off switch in the name tag customization screen?
 

TerryJ

Smash Journeyman
Joined
Apr 12, 2010
Messages
488
Location
BEST COAST, WA
NNID
1337-1337-1337
3DS FC
1337-1337-1337
Anyone have a code that allows me to take off tap-jump?

Is it possible for someone to make a Tap-Jump on/off switch replace the rumble on/off switch in the name tag customization screen?
There's a switch for this in the debug menu that Achilles has made, you can even turn it off per controller.
 
Last edited:

Achilles1515

Smash Master
Joined
Jun 18, 2007
Messages
3,211
Location
Cincinnati / Columbus OH
Anyone have a code that allows me to take off tap-jump?

Is it possible for someone to make a Tap-Jump on/off switch replace the rumble on/off switch in the name tag customization screen?
Disable Tap Jump (1.02) [Achilles]
C20CBBC0 00000003
89FD06BE 2C0F0004
40800008 4E800020
7C0802A6 00000000
C20CB4E0 00000003
2C040001 40820008
4E800020 7C0802A6
60000000 00000000

I think I had this on the main post, but then I reverted to a previous version to fix things and it got removed and I never noticed.
The 20XX pack has toggleable on a per player basis. Changing the name tag rumble to this is possible, just not straightforward.
 

CeLL

Smash Lord
Joined
Jan 26, 2014
Messages
1,026
Location
Washington
Is there a death on any ledge option except ledgedrop code?

Or better yet, a code that kills you on a button press, e.g. dpad down.
 
Last edited:

bb010g

Smash Cadet
Joined
Dec 7, 2014
Messages
25
Could you make a Gerudo Dragon version of Raptor Boost Enters "Fall" Action State Instead of "FallSpecial"?
 

zankyou

Smash Lord
Joined
Sep 12, 2014
Messages
1,055
My knowledge of how gecko codes work is very limited by I wanted to know if it would be possible to change a value inside of for instance a stage. Itd only have to be 1 byte.
 
Last edited:
Joined
Oct 10, 2011
Messages
1,126
Location
Boise, ID
NNID
dansalvato
My knowledge of how gecko codes work is very limited by I wanted to know if it would be possible to change a value inside of for instance a stage. Itd only have to be 1 byte.
Yes, that's very easy to do with a Gecko code.
 

DRGN

Technowizard
Moderator
Joined
Aug 20, 2005
Messages
2,178
Location
Sacramento, CA
My knowledge of how gecko codes work is very limited by I wanted to know if it would be possible to change a value inside of for instance a stage. Itd only have to be 1 byte.
First step is to find where that value exists in memory, using Dolphin. What do you want to change?
 

zankyou

Smash Lord
Joined
Sep 12, 2014
Messages
1,055
First step is to find where that value exists in memory, using Dolphin. What do you want to change?
Itd be to remove targets from the target test stages. I know where it is in the dat, but it'd be nice to have a toggle instead.
 

zankyou

Smash Lord
Joined
Sep 12, 2014
Messages
1,055
Post where it is in the specific dat file, and what you need it to be, and we can try and search for it in the RAM.
So for instance on Roy's stage its in the map header. Changing the offset 7F in GrTfe.dat from 0E to 00 gets rid of the flippers and targets. Its not that big of a deal though. Just playing with some ideas.
 
Last edited:

Achilles1515

Smash Master
Joined
Jun 18, 2007
Messages
3,211
Location
Cincinnati / Columbus OH
Every Character can Walljump (1.02) [Achilles, Geuse]
040816c4 60000000

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)

Geuse previously wrote a code for this, and I looked at the ASM it was pointing to and it seems like it can be done with only one line.
 
Last edited:

Achilles1515

Smash Master
Joined
Jun 18, 2007
Messages
3,211
Location
Cincinnati / Columbus OH
Disable Automatic Start Screen Transitions (1.02) [Achilles]
041A1C58 38000000
  • Start Screen sits at this screen forever until start is pressed.
Capture.PNG


DOL mod

Function: 801a1c18
- gets hit every frame when on the Start Screen

No Automatic Start Screen Transition
041a1c58 38000000

-801a1c5c
-the line that compares r0 to 600 (that likely counts up every frame of the game) and does an automatic screen transition when the criteria is met.

-the above code force loads a value of 0 to the register (r0) that is used in the comparison
-----------------------------------

And I found this function by going to the start screen and setting a breakpoint at 801A4B60, which is the function that flips the "go to next screen" toggle on. Waited for the screen transition....and then it broke --> Followed the blr back to the previous function.
 
Last edited:
Joined
Oct 10, 2011
Messages
1,126
Location
Boise, ID
NNID
dansalvato
Code:
v1.00 Hitlag Behavior (1.02) [Dan Salvato]
040771f0 3b000000


Holy *****, I spent hours looking for this one stupid line of code. If someone has done this already then RIP, lol.

Anyway, this code reverts hitlag behavior back to v1.00. In v1.00, any attack that dealt less than 1% damage had 0 frames of hitlag. Certain characters' attacks were balanced around this consideration, such as Samus' upB and Young Link's grounded upB. In v1.02, one frame of hitlag is applied, which makes these moves easily escapable with SDI.

Because of this, the v1.00 hitlag behavior is often preferred, especially for players who main the affected (often lower-tier) characters.
 

Kou

Smash Apprentice
Joined
Nov 22, 2011
Messages
198
Location
Japan
Code:
v1.00 Hitlag Behavior (1.02) [Dan Salvato]
040771f0 3b000000


Holy ****s, I spent hours looking for this one stupid line of code. If someone has done this already then RIP, lol.

Anyway, this code reverts hitlag behavior back to v1.00. In v1.00, any attack that dealt less than 1% damage had 0 frames of hitlag. Certain characters' attacks were balanced around this consideration, such as Samus' upB and Young Link's grounded upB. In v1.02, one frame of hitlag is applied, which makes these moves easily escapable with SDI.

Because of this, the v1.00 hitlag behavior is often preferred, especially for players who main the affected (often lower-tier) characters.
You're amazing...
Have you known how to realize this cheat with dol mod?
 

Achilles1515

Smash Master
Joined
Jun 18, 2007
Messages
3,211
Location
Cincinnati / Columbus OH
You're amazing...
Have you known how to realize this cheat with dol mod?
Kou,

I’m leaving this one up you.

Instructions:

1) Play SSBM v1.02 in Debug Dolphin.
2) In the “Memory” tab, hit “Dump MRAM” (ram.raw gets dumped to /Dolphin Emulator/Dump/raw.raw ).
3) Open ram.raw and an SSBM v1.02 DOL file in a hex editor.

Looking at Dan’s code, the RAM offset is 0x800771F0. The ram.raw file starts at 0x80000000.

4) In ram.raw opened up in hex editor, go to 0x771F0. This 32-bit word is the value that Dan is overwriting with his code. Copy that line and the next couple lines (like 10 or so).
5) Now look at the DOL file. Open up the search box (ctrl+f) and paste the copied data. It should find the DOL offset for the exact code that was in the RAM. (You might want to do another search down through the DOL to ensure that it doesn’t find anything again – so you know this is the one and only correct spot.)
6) Overwrite the default value with 0x3B000000 to that location.
7) Done. Test. Post results in the DOL Mod Topic.

Code:
v1.00 Hitlag Behavior (1.02) [Dan Salvato]
040771f0 3b000000


Holy ****s, I spent hours looking for this one stupid line of code. If someone has done this already then RIP, lol.

Anyway, this code reverts hitlag behavior back to v1.00. In v1.00, any attack that dealt less than 1% damage had 0 frames of hitlag. Certain characters' attacks were balanced around this consideration, such as Samus' upB and Young Link's grounded upB. In v1.02, one frame of hitlag is applied, which makes these moves easily escapable with SDI.

Because of this, the v1.00 hitlag behavior is often preferred, especially for players who main the affected (often lower-tier) characters.
Btw, great work, Dan! This is such a good one. Props on sticking it out and chasing around ASM for hours. It takes a great deal of patience, focus, and intuition to reverse engineer things like this.
 
Last edited:

undergroundmonorail

Smash Cadet
Joined
Oct 20, 2014
Messages
28
Location
Hamilton, Ontario
Can anyone help me with a code I wrote? It's the first time I've ever done Gecko coding and I ran into an issue.

Code:
CPU 4 defaults to level 9 [monorail]
20480898 40000400
04480898 40000409
The address 80480898 contains the value 4000040X, where X is the CPU level in port 4. However, it's briefly set to 40000400 while the game loads, so I want to take advantage of that and set it to level 9 then.

In Dolphin this works perfectly. On console, not so much. I have no idea where to go from here. Help?

(If there's another code that does this [which there probably is because of how simple it is] that works too, but I'm also curious why this fails on console.)
 
Joined
Oct 10, 2011
Messages
1,126
Location
Boise, ID
NNID
dansalvato
Can anyone help me with a code I wrote? It's the first time I've ever done Gecko coding and I ran into an issue.
You should apply an endif at the end of the code:
e2000001 00000000

Also, for what it's worth, check to see if your console game version and Dolphin game version are the same. Have you succeeded in getting other codes to work on console?
 

undergroundmonorail

Smash Cadet
Joined
Oct 20, 2014
Messages
28
Location
Hamilton, Ontario
You should apply an endif at the end of the code:
e2000001 00000000

Also, for what it's worth, check to see if your console game version and Dolphin game version are the same. Have you succeeded in getting other codes to work on console?
Uhh, actually, I checked again and it doesn't even work in Dolphin. I don't remember changing anything but it doesn't make a difference, with or without the endif. That's bizarre.

I set it to break when 80480898 was written to, and the first time it was 40000400 I set it to 40000409 manually. It worked perfectly. For some reason that code (which afaik does exactly the same thing) doesn't work!

I have no experience with Gecko codes at all (I saw a tutorial on Twitch where some incredibly clever and handsome person wrote codes for Melee, Brawl and Sonic Adventure and that's what got me interested ;)) so honestly I could be doing everything wrong haha........
 

Achilles1515

Smash Master
Joined
Jun 18, 2007
Messages
3,211
Location
Cincinnati / Columbus OH
Uhh, actually, I checked again and it doesn't even work in Dolphin. I don't remember changing anything but it doesn't make a difference, with or without the endif. That's bizarre.

I set it to break when 80480898 was written to, and the first time it was 40000400 I set it to 40000409 manually. It worked perfectly. For some reason that code (which afaik does exactly the same thing) doesn't work!

I have no experience with Gecko codes at all (I saw a tutorial on Twitch where some incredibly clever and handsome person wrote codes for Melee, Brawl and Sonic Adventure and that's what got me interested ;)) so honestly I could be doing everything wrong haha........
When you're sitting at the CSS, that default value is 01. So your code will do this:

(about to load CSS, and every frame of the game your IF statement is being checked)
Your Gecko IF statement presents a true value --> writes 09 to the CPU lvl.
Now, every frame of the game from here on out, your Gecko IF statement will be false and not write anything to that address.
....
And now the regular ASM runs that writes 01, the default value, to that address, overwriting your current value of 09 (and your Gecko IF is still false and not writing anything).



And you can check this by running your code and manually writing 40000400 to that line and it should be immediately changed to
40000409, which tells you that it is working, but your logic is just flawed.
 
Last edited:

undergroundmonorail

Smash Cadet
Joined
Oct 20, 2014
Messages
28
Location
Hamilton, Ontario
When you're sitting at the CSS, that default value is 01. So your code will do this:

(about to load CSS, and every frame of the game your IF statement is being checked)
Your Gecko IF statement presents a true value --> writes 09 to the CPU lvl.
Now, every frame of the game from here on out, your Gecko IF statement will be false and not write anything to that address.
....
And now the regular ASM runs that writes 01, the default value, to that address, overwriting your current value of 09 (and your Gecko IF is still false and not writing anything).



And you can check this by running your code and manually writing 40000400 to that line and it should be immediately changed to
40000409, which tells you that it is working, but your logic is just flawed.
Yeah, that makes sense. I still have no idea why it worked the other day, but I guess something else I was playing with was interfering with it. I'll have to play around some more.

(I mean, if I can't get it working, the worst case scenario is that I have it look for 400004001 since I never play against level 1 CPUs anyway. I feel like I can probably get it working though.)

Thanks :)
 

Capt. Tin

Smash Apprentice
Joined
Jul 25, 2014
Messages
105
Location
Chicago, IL
NNID
Capt.Tin
Every Character can Walljump (1.02) [Achilles, Geuse]
040816c4 60000000

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)

Geuse previously wrote a code for this, and I looked at the ASM it was pointing to and it seems like it can be done with only one line.
Just tested this one out.

Dr. Mario, Marth, and Roy can all Walljump out of Up B like Mario.
 
Last edited:

DRGN

Technowizard
Moderator
Joined
Aug 20, 2005
Messages
2,178
Location
Sacramento, CA
Code:
v1.00 Hitlag Behavior (1.02) [Dan Salvato]
040771f0 3b000000


Holy ****s, I spent hours looking for this one stupid line of code. If someone has done this already then RIP, lol.

Anyway, this code reverts hitlag behavior back to v1.00. In v1.00, any attack that dealt less than 1% damage had 0 frames of hitlag. Certain characters' attacks were balanced around this consideration, such as Samus' upB and Young Link's grounded upB. In v1.02, one frame of hitlag is applied, which makes these moves easily escapable with SDI.

Because of this, the v1.00 hitlag behavior is often preferred, especially for players who main the affected (often lower-tier) characters.
This is awesome! I play both Zelda and Sheik, so I've been using 1.0 for my 'for fun' hack that I bring to tournies just for that behavior! Now I can work on a 1.02 build so I can incorporate all kinds of new fun stuff!
 

Ohsm

Smash Apprentice
Joined
Jul 26, 2011
Messages
175
Location
Germany
Can someone please write me a code so I can access the "Snag the trophy stage" from the stage selection screen.
For example selecting flatzone and it will load the trophy stage (like in achilles' 20XX hack).

I'm unable the find the correct memory adress and write the code by myself.
Are there any guides which explain how to find desired adresses?
 
Last edited:

Achilles1515

Smash Master
Joined
Jun 18, 2007
Messages
3,211
Location
Cincinnati / Columbus OH
Can someone please write me a code so I can access the "Snag the trophy stage" from the stage selection screen.
For example selecting flatzone and it will load the trophy stage (like in achilles' 20XX hack).

I'm unable the find the correct memory adress and write the code by myself.
Are there any guides which explain how to find desired adresses?
writing-a-gecko-code-to-change-what-stage-gets-loaded-in-a-vs-match

That was one of the first Melee Gecko codes I ever made. You need to use Cheat Search to find that address (I'm assuming you're familiar with this and have watched IE's tutorial vide). So you would make a Dolphin save state on the stage select screen, and then go through a process like this.

Choose a stage and pause as its loading à Initial memory scan.
Load state.
Choose the same stage and pause à “equal to” memory scan.
Load state.
Choose a different stage and pause à “not equal to” memory scan.
Load state.
Choose that same different stage and pause à “equal to” memory scan.
Etc…

Just mix it up with different stages and you’ll be able to find it pretty quickly.
 

Ohsm

Smash Apprentice
Joined
Jul 26, 2011
Messages
175
Location
Germany
writing-a-gecko-code-to-change-what-stage-gets-loaded-in-a-vs-match

That was one of the first Melee Gecko codes I ever made. You need to use Cheat Search to find that address (I'm assuming you're familiar with this and have watched IE's tutorial vide). So you would make a Dolphin save state on the stage select screen, and then go through a process like this.

Choose a stage and pause as its loading à Initial memory scan.
Load state.
Choose the same stage and pause à “equal to” memory scan.
Load state.
Choose a different stage and pause à “not equal to” memory scan.
Load state.
Choose that same different stage and pause à “equal to” memory scan.
Etc…

Just mix it up with different stages and you’ll be able to find it pretty quickly.
Achilles with the super quick answers.
Thank you very much.

Edit: Achilles do you have a code at hand that fixes the spawing point problem with the trophy stage?
 
Last edited:
Top Bottom