• 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

_glook

Got a Passion for Smashin'
Joined
Sep 30, 2005
Messages
802
Location
Not UC Berkeley anymore
I am slightly surprised almost nobody is using the newfangled Melee Codes subforum located conveniently at the top of the Workshop.

Is there a preference to this thread?
I didn't know about it until two days ago, actually, which is why I've only recently starting putting things on that forum.

That being said, I didn't feel like creating a whole thread for Unlock Score Display, as it's a small thing, and I mostly posted it to just share information. I should maybe consider bunching up my smaller codes to post in a thread, though.
 

Noc

Smash Journeyman
Joined
Dec 30, 2008
Messages
225
Location
Galveston, TX
I have a couple questions for Melee Gecko code creators. I couldn't find a Gecko code for infinite shields similar to the 20XX feature "D-pad down for infinite shields". So, I converted AR codes for P1 & P2 infinite shields to WiiRD format and inserted into another Gecko button activator code (X+D-pad down toggles HUD), generating the code below which apparently works. The code seems to work without the "E2000001 80008000" lines as well, is there any reason to leave them in? Is there a simpler code for infinite shields for all players?

D-Pad Down for Infinite Shield P1 & P2
2846B108 00000004
48000000 80453130*
DE000000 80008180*
120019F8 00004270*
E2000001 80008000*
48000000 80453FC0**
DE000000 80008180**
120019F8 00004270**
E2000001 80008000**
CC000000 00000000
E2100000 00000000
48000000 80453130*
DE000000 80008180*
120019F8 00004270*
E2000001 80008000*
48000000 80453FC0**
DE000000 80008180**
120019F8 00004270**
E2000001 80008000**
E2000001 00000000

* = Infinite Shield P1
** = Infinite Shield P2

Maybe the following can be used to make any code toggle-able?
General Toggle On/Off Code
2846B108 0000????
XXXXXXXX XXXXXXXX
CC000000 00000000
E2100000 00000000
XXXXXXXX XXXXXXXX
E2000001 00000000

Replace XXXXXXXX XXXXXXXX with line(s) of code that you want to be able to toggle on/off.

Replace ???? with desired button to toggle on/off:
0001 D-Pad Left
0002 D-Pad Right
0004 D-Pad Down
0008 D-Pad Up
0010 Z
0020 R (Digital Click)
0040 L (Digital Click)
0100 A
0200 B
0400 X
0800 Y
1000 Start

Add values together if you want to toggle with a combination of buttons, e.g. L+D-pad right = 0040 +0002 = 0042.
 
Last edited:

DRGN

Technowizard
Moderator
Joined
Aug 20, 2005
Messages
2,178
Location
Sacramento, CA
For my DOL code manager, I'm working on adding support for adding/managing Gecko codes in the DOL, à la Dan's new code injection method. I think this'll make things real nice & easy. If you think so too, read on.

As I've mentioned before, codes for the program's library are in .txt files, so any user can add new ones. Right now I'm considering how the format should be for Gecko codes.

For a moment I thought I would just have the program use the Gecko .ini file that Dolphin uses. And I could do that, but it has a big drawback in that the file would only work for one game version. There could be several ini files, one for each game version, but then that would be annoying when you wanted to add a code that's available for multiple versions, so I don't think I like that.

achilles' format in the OP is like this (which of course is pretty similar to how most people share them):

Code:
Unlock All 293 Trophies (1.02) [Datel]
0245C390 00000125
0245C395 01266363

Unlock All 293 Trophies (1.01) [Datel]
0245B6B0 00000125
0245B6B5 01266363

Unlock All 293 Trophies (1.00) [Datel]
0245A3C8 00000125
0245A3CD 01266363
Code:
Disable Name Tag Reset After Closing Character Port (1.02) [Ato]
04261B1C 60000000
04261B30 60000000

Disable Name Tag Reset After Closing Character Port (1.01) [Ato]
04261380 60000000
04261394 60000000

Disable Name Tag Reset After Closing Character Port (1.00) [Ato]
04260810 60000000
04260824 60000000

Disable Name Tag Reset After Closing Character Port (PAL) [Ato]
042622C8 60000000
042622DC 60000000
The reason I'm asking is because I'm hoping people would then consistently share them in the same format. That way, codes can easily be copy/pasted for use with the program when new codes come out. (I think I know what I want to do, so I'm kinda just thinking out loud here, but also I wanted to see if anyone had any opinions or other ideas.)

Couple issues I have with the above though:

Sometimes a description is a really good thing to include.
A little redundant to have the name and author described for every version, isn't it? Seems like it'd be simpler to just have it once at the start.

So it could be just like above, but with an optional description:

Code:
Unlock All 293 Trophies (1.02) [Datel]
- Example description
0245C390 00000125
0245C395 01266363

Unlock All 293 Trophies (1.01) [Datel]
0245B6B0 00000125
0245B6B5 01266363

Unlock All 293 Trophies (1.00) [Datel]
0245A3C8 00000125
0245A3CD 01266363
or changed up a bit (IMO better):

Code:
Unlock All 293 Trophies
- Example description
[Datel]

(1.02)
0245C390 00000125
0245C395 01266363

(1.01)
0245B6B0 00000125
0245B6B5 01266363

(1.00)
0245A3C8 00000125
0245A3CD 01266363

What do you guys think? This would also be easier to parse. But I'm open to suggestions.
 

Achilles1515

Smash Master
Joined
Jun 18, 2007
Messages
3,211
Location
Cincinnati / Columbus OH
Code:
Name of Code A
00000000 00000000
00000000 00000000
00000000 00000000
00000000 00000000
Code A does this, and this, and this. And this description is optional.

Name of Code B
00000000 00000000
00000000 00000000
00000000 00000000
00000000 00000000
Code B does this, and this, and this. And this description is optional.
Empty line separates codes.

If the goal is to inject a Gecko codehandler into the ISO, I don't see any reason to put it in the DOL.

1) Extend the length of the Apploader.ldr file with the Gecko codehandler and code list of [basically] any length.

2) Inject a super simple DOL mod into the DOL Entry Point function [8000522C] to copy the contents from the Apploader file, which will be late in the RAM at this point, to anywhere you please (a.k.a put the Gecko code handler in it's default location, and the code list at 0x81700000 or wherever Dan puts his codes for TE).

3) In the same DOL mod, initialize the hook and any code list pointers within the handler.

4) Rebuild ISO.

This would give the exact functionality of 20XX TE, just without the memory card exploit.
 
Last edited:

DRGN

Technowizard
Moderator
Joined
Aug 20, 2005
Messages
2,178
Location
Sacramento, CA
Would like to include the author. Also, so far everything else in the program supports all game versions (I even converted all of the free space regions to their equivalent regions for each version), so I'd like to keep that support for these too. So if for some reason people want to create Gecko codes for all game versions, they can.

I think the last example I had was pretty good. The only "problem" I guess is it doesn't match the format you've been using in the OP. Not a big deal, it'd just be nice if everything was consistent.

Placing the codehandler somewhere else is a really interesting idea. Sounds like it might be the best option. But what about placing it at the end of the DOL (or at the end of the last region that is copied into RAM) instead of the Apploader? (And then redefine the size of that region.) I like this idea because it keeps the DOL as a standalone, easily share-able hack. Otherwise, in the case of the DOL manager anyway, you couldn't get away with doing everything by loading the DOL file alone. Btw, what is the "default location" you're referring to?

And speaking of all of this, at what point would the processor have spacial locality issues, as described by shuall below? I wonder how much of a difference in RAM is acceptable before it causes a cache miss. And could this be something that would already be happening with where the codehandler is proposed to go now (0x407950)?

... if we add a text section to the end of the dol, the text section's offset would have to be after the last data section, or (offset + size) 0x4306E0 + 0x7220 = 0x437900. The address would have to be loaded somewhere there is free memory (after data7 looks good) 0x804D6CC0 + 0x7220 = 0x804DDEE0.

The problem with adding text sections at the end of memory, is when the processor fetches code to run, it expects the next code will be fairly close in memory. This is called spatial locality. When you put text1 at 0x80005940 and your new text2 at 0x804DDEE0, there will be a slowdown whenever the compiler goes to fetch your special code to run it, because of a cache miss. This is fine for changes that are loaded once in a while, but if you're trying to run custom code every frame, breaking the processor's assumption of spatial locality is just asking for a cache miss and a slowdown.

EDIT: while it's asking for a cache miss, I want to note that it doesn't *necessarily* mean it will result in one, or even whether it will be a noticable slow down. Don't let my last paragraph stop you from trying it.
Along a different line of thought, I was also wondering if the gecko codehandler could be split into parts and put into smaller regions within the DOL. Then you could use the 0x1600 sapce for the Gecko Codes and keep the Debug Menu. There are a bunch of branches internal to the codehandler that would need to be changed, as well as branches added to link the sections. But assuming that's done, is there anything else stopping this from working?
 

_glook

Got a Passion for Smashin'
Joined
Sep 30, 2005
Messages
802
Location
Not UC Berkeley anymore
If you want to use the gecko code handler without losing the debug menu, you can try replacing the Tournament Mode code. From the SSBM Data sheet for 1.02:
x801910e0 - 0x80192933: Size 0x1854 (Probably Tournament Mode code, needs more testing but classic mode and versus mode work fine with this zero'd)
Like the comment on the sheet says, I haven't tested every code path, but it seems to work okay for me.
 

Sham Rock

Smash Apprentice
Joined
Feb 10, 2014
Messages
95
Location
Outside of your grab range
:bowsermelee: Giga Bowser Can Be Grabbed (1.02) [Achilles]
0414f704 60000000

I´m gonna call it right here, 2018 when 20XXTE version 5.5 hits the shelves Giga Bowser is going to be completely tournament viable with a 7-3 matchup against everybody (except puff with a 1-9 for obvious reasons)


Also achilles, please add the codes from last page to the op as requested. Don´t need to cluster up the melee codes section with simple ports.
 

Achilles1515

Smash Master
Joined
Jun 18, 2007
Messages
3,211
Location
Cincinnati / Columbus OH
I did not know he even possessed those animations!
Master Hand sure doesn't!

I´m gonna call it right here, 2018 when 20XXTE version 5.5 hits the shelves Giga Bowser is going to be completely tournament viable with a 7-3 matchup against everybody (except puff with a 1-9 for obvious reasons)


Also achilles, please add the codes from last page to the op as requested. Don´t need to cluster up the melee codes section with simple ports.
I'll spend some time right now updating the OP.
 

shuall

Smash Apprentice
Joined
Jun 26, 2013
Messages
155
Location
Philly
And speaking of all of this, at what point would the processor have spacial locality issues, as described by shuall below? I wonder how much of a difference in RAM is acceptable before it causes a cache miss. And could this be something that would already be happening with where the codehandler is proposed to go now (0x407950)?
Without knowing how the gamecube loads data/instructions into cache, it's hard to tell. Similarly, without any profiling tools, it's hard to tell how much the placement of code causes cache misses or slowdown.

It's possible there could be cache misses and there's no noticable slowdowns. I more commented on it so when we get to the point when there are noticable slowdowns, moving the code to a closer spot in the dol is something you could try to fix it.
 

flieskiller

Smash Journeyman
Joined
Jan 3, 2013
Messages
426
@ Magus420 Magus420 Your code about the 1.00 hitlag behavior in 1.02 doesn't work when the game is in Develop Mode, do you know the reason or why it behaves like that?
 

s0teric

Smash Rookie
Joined
Oct 3, 2013
Messages
22
Location
Missouri
Is there any reason why encrypting the original gecko codes as AR codes using GCNcrypt and using with an actual AR should not work? For instance, Zauron's stage hazard removal code works and I tested using a short code (roll = death) which also works. However, when I convert flash red on no l cancel and input the whole thing (rather tediously), it does not work. Is there a reason why? I'm also interested if more 20xx codes could be inputted this way through AR such as standardtoaster's random tech and di code. Can someone help me out?
 
Last edited:

DRGN

Technowizard
Moderator
Joined
Aug 20, 2005
Messages
2,178
Location
Sacramento, CA
If you want to use the gecko code handler without losing the debug menu, you can try replacing the Tournament Mode code. From the SSBM Data sheet for 1.02:
x801910e0 - 0x80192933: Size 0x1854 (Probably Tournament Mode code, needs more testing but classic mode and versus mode work fine with this zero'd)
Like the comment on the sheet says, I haven't tested every code path, but it seems to work okay for me.
If someone would like to test this more, I could include it as an option for extra code space in the DOL manager program.
 

flieskiller

Smash Journeyman
Joined
Jan 3, 2013
Messages
426
Shy Guys drop food even if items are at off (1.02)[flieskiller]
0428fb1c 4800000c

I've discovered today that this is a check for anything that drops food, so with this code, G&W hammer 7 now drops food as well, even if the food item is at off.
 

Goxplex

Smash Apprentice
Joined
May 16, 2013
Messages
139
Location
Panamá
Is it possible to add (not replace) the results screen animations as alternate taunts? I mean, something like:

Up Dpad: Original taunt.
Down Dpad: Alt Taunt 1
Left Dpad: Alt taunt 2
Right Dpad: Alt taunt

I have no idea how animations and moveset edits work, so I'm just asking.
 

Noc

Smash Journeyman
Joined
Dec 30, 2008
Messages
225
Location
Galveston, TX
I prepared Melee Gecko codesets for different settings (1-player practice, smashfests, and tournaments) and tools to help make your own. You can download them here:
https://www.dropbox.com/s/t9tk1g6nejdhfd0/Melee Gecko codesets by Noc.rar?dl=0

The "codes" and "txtcodes" folders should go in the root of your SD card. To use one of the codesets as is: copy the GCT file in the "SSBM codesets" folder to "codes" folder, rename it to GALE01.gct, then boot Melee v1.2 with Neogamma or other GC loader, Ocarina enabled. You can also select some codes in a codeset by opening the corresponding text file in Cheat Manager on Wii or Ocarina Code Manager on PC and convert to GCT, which goes in "codes" folder. A list of all the codes in each codeset is in the "SSBMv1.2 all codeset lists + instructions" Word file.

To add or remove codes from a codeset and customize it to your liking, I recommend you use the "SSBMv1.2 all codeset lists" and "Calculate number of lines of code in Gecko codeset" Excel files to help make sure your codeset does not exceed the limit for your GC loader. For Neogamma, the GCT file cannot exceed 3416 bytes, equal to 425 lines of code. Delete unwanted codes from the text code file, copy & paste new codes (e.g. from this forum) into the text file, then convert to GCT and boot Melee as above.

From my testing, the codesets I made work without noticeable glitches or freezing with Neogamma, but let me know if you encounter any. Hopefully this makes it easier for people to compile all the great Melee Gecko codes available into working custom codesets.
 

Achilles1515

Smash Master
Joined
Jun 18, 2007
Messages
3,211
Location
Cincinnati / Columbus OH
L+R+Start During Stage Load Returns to Last CSS (1.02) [Achilles]
0425B8BC 887DFFA0

Ex.
If pressed during Vs. Melee, it returns to the Vs. Melee CSS.
If pressed during Tiny Melee, it returns to the Tiny Melee CSS.
etc.
 

Achilles1515

Smash Master
Joined
Jun 18, 2007
Messages
3,211
Location
Cincinnati / Columbus OH
What does this do?
When your character is moving with a hitbox out, the effective area does not stay as a single circle, and actually moves with the character. I've never looked at the specifics, but I assume it's a one frame interpolation.

The code only affects the display and not the actually gameplay.

 
Last edited:

s0teric

Smash Rookie
Joined
Oct 3, 2013
Messages
22
Location
Missouri
So I have this idea for a code that would truly change the way people practice if it can be implemented.
I don't have the experience writing gecko codes to implement it, but I'd like to know if it could be done, and if one of you would like to pursue it.

Basically, it would take advantage of the recording functionality of the action state code. Some button press would initiate the recording and the user would hold the stick in a direction. By pressing another button (say A) this would put the position of the stick in a queue. This process would have the option of being repeated several times. There would likely be a max size of the queue, but the recording process is deliminated by pressing a different button (say the start button). This queue represents putting premeditated DI inputs, and each time the CPU is hit, it reads the corresponding DI coordinate position from the queue.

I realize this is very complicated, but if it can be implemented, reading DI can be practiced well, enabling players to recognize the entire range DI can send an opponent. Let me know what you guys think.
 
Last edited:

Achilles1515

Smash Master
Joined
Jun 18, 2007
Messages
3,211
Location
Cincinnati / Columbus OH
So I have this idea for a code that would truly change the way people practice if it can be implemented.
I don't have the experience writing gecko codes to implement it, but I'd like to know if it could be done, and if one of you would like to pursue it.

Basically, it would take advantage of the recording functionality of the action state code. Some button press would initiate the recording and the user would hold the stick in a direction. By pressing another button (say A) this would put the position of the stick in a queue. This process would have the option of being repeated several times. There would likely be a max size of the queue, but the recording process is deliminated by pressing a different button (say the start button). This queue represents putting premeditated DI inputs, and each time the CPU is hit, it reads the corresponding DI coordinate position from the queue.

I realize this is very complicated, but if it can be implemented, reading DI can be practiced well, enabling players to recognize the entire range DI can send an opponent. Let me know what you guys think.
Funny that you mention this because I’ve almost begun writing this exact code for the next 20XX. I’ve been thinking about it for the past month or so, and was talking about it with a couple people at a small tourney about a month ago. Over the past couple days, I have developed the knowledge to make it happen in the way I envision it…at least for now. So we’ll see how it goes. It will be challenging, but I want to make sure I do it right from the get-go.

I need to finish updating and adding to Magus' physics hack first, before I start on it.
 
Last edited:

_glook

Got a Passion for Smashin'
Joined
Sep 30, 2005
Messages
802
Location
Not UC Berkeley anymore
I've ported some of the codes to v1.00:

Code:
L+R+A+Start during stage load returns to CSS (v1.00) [Jorgasm, _glook]:
0425A5B0 38600002

Unbounded Camera (v1.00) [Achilles, _glook]
0402F50C 91ff02e8
0402F514 91ff02ec
0402F51C 91ff02f0
0402F524 91ff02f4
0402F530 91FF02F8
0402F53C 91ff02fc
04223914 39E00000
04223934 3de04700
0422394C 3de04700
04223964 3de04700
0422397C 3de04700
04223994 3de04700

Exit Debug Menu to CSS (v1.00) [Jorgasms, _glook]
041AFCAC 38600002

Let any player control Debug Menu (v1.00) [wParam, _glook]
C2302108 00000016
39400000 39000000
38E00008 3c80804c
3884ff3c 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
60000000 00000000
 

_glook

Got a Passion for Smashin'
Joined
Sep 30, 2005
Messages
802
Location
Not UC Berkeley anymore
Here's some more codes ported to v1.00
Code:
Capped (Tennis) Mode (v1.00) [_glook]
C216C3A8 00000023
88030005 3C808045
60849F50 88840000
2C040000 418200FC
3CA08045 60A59F4A
88A50000 2C050002
40A2000C 1C840064
48000018 2C050000
40A200D8 3CE08045
60E79F54 88E70000
38A00000 3CC08045
60C610C0 81060008
2C080003 41820070
2C040064 41A00014
81060090 7C082000
40800070 48000058
39000000 81260070
7D084A14 81260074
7D084A14 81260078
7D084A14 8126007C
7D084A14 81260068
7D094050 A126008C
2C070001 4182000C
41810010 48000010
7D084A14 48000008
7D094050 7C082000
40800018 38A50001
38C60E90 2C050004
4082FF7C 48000034
38800032 3CA08046
60A5BBA0 98850000
38800000 3CA08046
60A59700 90850000
3880003A 3CA08046
60A59704 B0850000
60000000 00000000

Wall Bracing (v1.00) [_glook]
C208DD04 00000007
2C1C0003 41820030
887D0724 70630004
2C030004 40A20020
807D0620 2C030000
4082000C 38600001
48000008 38600000
2C030000 00000000

Ledge Invincibility (v1.00) [_glook]
C209A600 0000000A
7C671B78 8063002C
8084049C 80A31068
7CA62B78 38A50020
2C050140 40A10008
38A00140 90A31068
7CC631D6 54C6A33E
7C062000 41A0000C
38800000 48000008
7C862050 7CE33B78
60000000 00000000
C206A2BC 00000006
807F198C 809F1988
7C632378 2C030000
40820018 807F1068
2C030000 41A2000C
3863FFFF 907F1068
807F1990 00000000
 

_glook

Got a Passion for Smashin'
Joined
Sep 30, 2005
Messages
802
Location
Not UC Berkeley anymore
By the way, to fix ShamRock's portrait color change code when it's in Japanese mode, just subtract the background color initial address location (before all the lwz's) by 0x34. Something like this:

Code:
# r16 is already the initial location of the portrait background colors
CHECK_JAPANESE:
lwz r17, -0x77C0(r13)
addi r17, r17, 0x1CB0
lbz r17, 0x16(r17)
cmpwi r17, 1
beq CHECK_TEAM  # If 1, then we're usd
subi r16, r16, 0x34
 

Achilles1515

Smash Master
Joined
Jun 18, 2007
Messages
3,211
Location
Cincinnati / Columbus OH
Vibrant Melee (1.02) [Achilles]
C237A7E4 00000002
3C00FFFF 6000FFFF
90050000 00000000

  • Body shadow color set to white (no shadow)
  • Colored bytes above can be set to any color RRGGBB

BEFORE:
Capturedark.PNG



AFTER:

Capture.PNG



You should probably use this for CSPs and what not, @ DRGN DRGN and anyone else!

EDIT:
Also affects some stage shadows which is cool. So it's the all-encompassing "camera shadow color", it seems.
 
Last edited:
Top Bottom