• 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

TerryJ

Smash Journeyman
Joined
Apr 12, 2010
Messages
488
Location
BEST COAST, WA
NNID
1337-1337-1337
3DS FC
1337-1337-1337
Captain Falcon Raptor Boost Enters "Fall" Action State Instead of "FallSpecial" (1.02) [Achilles]
  • For aerial hit and miss, and grounded Raptor Boost that travels offstage.
Code:
040E39D0 4BFE8D61
040E3AEC 4BFE8C45
040E3CD0 4BFE8A61
This is a lot of fun to play with!
 

Achilles1515

Smash Master
Joined
Jun 18, 2007
Messages
3,211
Location
Cincinnati / Columbus OH
:samusmelee: Samus - Always Full Charge Shot (1.02) [Achilles]
04128660 81E4009C
04128664 91E32230

  • Full charge shot blink is always on.
  • Samus never enters "Charging" action state.
    • The other available code put Samus in charging animation during the first use of the match.
EDIT: Optimized.


:dkmelee: DK - Always Full Giant Punch (1.02) [Achilles]
0410D98C 90A4002C
 
Last edited:

DRM4R10

Smash Apprentice
Joined
Jun 16, 2013
Messages
124
Location
UK
If anyone wants this:
P.S. This took me a while to get this working. It turns out that after using GCNcrypt and AR to WiiRD, all I had to do was delete the first line of the code and it worked!
Sorry if this is already posted, I didn't feel like looking through all twenty-four pages :p

IK DEBUG FLAG Six-player mode
0430009C 38000003
043001B4 4839FE9C
046A0050 7C0902A6
046A0054 807F002C
046A0058 7C030214
046A005C 2C000003
046A0060 4182002C
046A0064 2C000002
046A0068 40820020
046A006C 801F0164
046A0070 98060061
046A0074 98060085
046A0078 801F0150
046A007C 98060060
046A0080 801F0134
046A0084 98060084
046A0088 38A50008
046A008C 4BC6012C
04179188 2C1B0004
0416EA2C 38000007
04167A84 38600006
043FA56C 803FB538
043FA578 42080000
043FA564 00000000
043FA5B0 803FA154
 

darkside1222

Smash Cadet
Joined
Apr 22, 2010
Messages
31
Is it possible to make a code where you make Player 3 for an example, have lightning speed attacks while everyone else's attacks are at normal speed?

Similar to lightning mode in special, except this only affects one player while every other player is unaffected

or just increase the moveset's animation for a certain character
 
Last edited:

tidus457

Smash Rookie
Joined
Oct 30, 2014
Messages
4
The Geccko Code to enable C-stick in 1P for PAL version doesn't seem to work for me with Dolphin, can anyone confirm please?
 

tidus457

Smash Rookie
Joined
Oct 30, 2014
Messages
4
EDIT: Ok, I should slap myself: There is an "activate cheats" option in the options menu :D
Thanks again Achilles for providing me the code, it now works perfectly!
 
Last edited:

Achilles1515

Smash Master
Joined
Jun 18, 2007
Messages
3,211
Location
Cincinnati / Columbus OH
@ likiji123 likiji123 , this is the thread to post general questions/discussion of AR/Gecko codes.

"Is there a code that removes items for classic mode?"

No, I am not aware of one at the moment. It should certainly be possible but I haven't really looked into any item codes yet.
 
Last edited:

Achilles1515

Smash Master
Joined
Jun 18, 2007
Messages
3,211
Location
Cincinnati / Columbus OH
@ likiji123 likiji123 , I may have figured it out. @beanwolf


No Items in Classic Mode (1.02) [Achilles]
0417eb5c 386000ff

This is basically 100% untested, but I think it will work. I’m on my lunch break at work right now, so I can’t do a full run through on Classic Mode at the moment. If someone gets to this before later tonight and tests it, please give feedback.

May as well try this one as well.

Item Rain in Classic Mode (1.02) [Achilles]
0417eb5c 38600007

EDIT: Yeah...they work. Nice.
 
Last edited:

likiji123

Smash Journeyman
Joined
Sep 2, 2014
Messages
319
Location
Australia
NNID
Likiji123
3DS FC
2964-9225-5942
@ likiji123 likiji123 , I may have figured it out. @beanwolf


No Items in Classic Mode (1.02) [Achilles]
0417eb5c 386000ff

This is basically 100% untested, but I think it will work. I’m on my lunch break at work right now, so I can’t do a full run through on Classic Mode at the moment. If someone gets to this before later tonight and tests it, please give feedback.

May as well try this one as well.

Item Rain in Classic Mode (1.02) [Achilles]
0417eb5c 38600007

EDIT: Yeah...they work. Nice.
Thank you so much for the code :)
 
Last edited:

Achilles1515

Smash Master
Joined
Jun 18, 2007
Messages
3,211
Location
Cincinnati / Columbus OH
Players Can Choose the Same Costume Color for One Character (1.02) [Achilles]
0426024c 4800000C
0425db14 4800000C


First line ignores the result of the costume comparison when hitting X/Y to change costumes.
Second line ignores the result of the costume comparison when returning to the CSS which would normally make sure no characters are the same color.
 
Last edited:

DRGN

Technowizard
Moderator
Joined
Aug 20, 2005
Messages
2,178
Location
Sacramento, CA
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.
 

Achilles1515

Smash Master
Joined
Jun 18, 2007
Messages
3,211
Location
Cincinnati / Columbus OH
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.
You need to use registers for this.
1) Load a value into a register.
2) Store the value saved in this new register somewhere.

You could use the Gecko Registers, but they're limited in math functions and kind of finicky to use. The easier option is to use a Gecko ASM code.

Say you wanted to take a value at 0x80487000 and store it at 0x8038F700.
Code:
lis r14,0x8048            //r14 now equals 0x80480000
lwz r14,0x7000(r14)  //r14 now equals the 32-bit word at the effective address of (0x80480000 + 0x7000) = 0x80487000
lis r15,0x8038           //r15 equals 0x0x80380000
ori r15,r15,0xF700    //r15 equals 0x8038F700
stw r14,0(r15)           //store the value in register 14 (the loaded word from above) into the effecive address of (0x0 + r15) = 0x8038f700
Note: I needed to do, ori r15,r15,0xF700 , because doing, stw r14,0xF700(r15) , is not an acceptable instruction. The 16-bit addition in the the lwz/stw address (in this case 0xF700) must be lower than 0x8000.

Then all you need is an injection point - a line of code that gets executed whenever you want this code to run. Maybe it's a line of code that gets executed every frame of the game in a match, or every frame while on the CSS, or a function that only gets executed when landing on the ground, whenever.

It usually takes experimentation to find the proper injection point for a code. Say you wanted to have the code execute only when a player lands on the ground. We know theres a RAM address that is the character's ground/air state (0 = on ground, 1 = in air). You would then jump in the air, pause, and using the DebugFast version of Dolphin, do a memory write breakpoint at the ground/air state address, unpause, and then the game will freeze at the line of code that writes 0 to the ground/air state memory address. Then you can stop using the memory write breakpoint and use regular breakpoints to experiment with the function that you found and make sure it gets executed every time when hitting the ground. Any line of code in that function that gets executed every time you hit the ground could be your injection point.
 
Last edited:

DRGN

Technowizard
Moderator
Joined
Aug 20, 2005
Messages
2,178
Location
Sacramento, CA
I see. How many registers does Dolphin use? And which are safe to use (aside 14 & 15 apparently)? And by lis, did you mean lsi? And finally, once I create my list of commands, how do I put them into the game? I know how to add Gecko codes (using Dolphin at least), but I haven't used Gecko ASM before. Thanks a lot btw, this is good stuff.
 

Achilles1515

Smash Master
Joined
Jun 18, 2007
Messages
3,211
Location
Cincinnati / Columbus OH
I see. How many registers does Dolphin use? And which are safe to use (aside 14 & 15 apparently)? And by lis, did you mean lsi? And finally, once I create my list of commands, how do I put them into the game? I know how to add Gecko codes (using Dolphin at least), but I haven't used Gecko ASM before. Thanks a lot btw, this is good stuff.
Gamecube has 31 general purpose registers. For Melee, I've noticed that registers r14-r22 are free for use at almost all moments that I have tried.

No, I mean lis (load immediate shift). See page 23 in this document.

You just use your custom ASM code and your injection point with ASM --> WiiRD Converter and it spits out a code in Gecko format. I believe IE goes over this in his tutorial video.
 
Last edited:

DRGN

Technowizard
Moderator
Joined
Aug 20, 2005
Messages
2,178
Location
Sacramento, CA
Awesome! Thanks. I don't know if I mentioned this before, but basically I have enough bookmarks for resources on Melee hacking that it's tough to watch and read all of the content (or even find stuff sometimes if it's too specific). So my apologies if I ask a question that is answered in a resource I've come across before. Like IE's video tutorial, haha. I've only ever watched like half of it before, because it had already answered my questions at the time, and I usually have somewhat limited time to spend working on these projects. I just went back to it though, skipped ahead, and found the section on ASM, so I'm checking that out now. And that link above looks like a pretty good one that I haven't seen before.


Edit: Unfortunately I'm having trouble getting the ASM --> Wiird Converter to work. When I run it, it complains about not finding the required components. I downloaded the installer/updater for DevKitPro from here, and installed both the ARM and PPC portions. But I'm not finding any of the required files in there. Perhaps they've been renamed or removed from the latest Devkit? Does anyone using the converter have these files?

I also tried pyiiasmh, but that doesn't work with python v3+, which is what I have on my system.
 
Last edited:

Doq

Smash Lord
Joined
Dec 28, 2012
Messages
1,037
Location
The Lab, Sweet Home, OR
Awesome! Thanks. I don't know if I mentioned this before, but basically I have enough bookmarks for resources on Melee hacking that it's tough to watch and read all of the content (or even find stuff sometimes if it's too specific). So my apologies if I ask a question that is answered in a resource I've come across before. Like IE's video tutorial, haha. I've only ever watched like half of it before, because it had already answered my questions at the time, and I usually have somewhat limited time to spend working on these projects. I just went back to it though, skipped ahead, and found the section on ASM, so I'm checking that out now. And that link above looks like a pretty good one that I haven't seen before.


Edit: Unfortunately I'm having trouble getting the ASM --> Wiird Converter to work. When I run it, it complains about not finding the required components. I downloaded the installer/updater for DevKitPro from here, and installed both the ARM and PPC portions. But I'm not finding any of the required files in there. Perhaps they've been renamed or removed from the latest Devkit? Does anyone using the converter have these files?

I also tried pyiiasmh, but that doesn't work with python v3+, which is what I have on my system.
Use Gecko.NET. It's got the ASM <> WiiRD converter.
 

DRGN

Technowizard
Moderator
Joined
Aug 20, 2005
Messages
2,178
Location
Sacramento, CA
You just need an ASM -> WiiRD converter? Use this. It's the same converter I use.
Yeah, that's the first one I tried, which was complaining about needing the required components.

I found Gecko.NET as DoctorKirby suggested, which included the same converter as he said, but the download also came with the required components. :) So it's working.

Thanks you guys.
 

DRGN

Technowizard
Moderator
Joined
Aug 20, 2005
Messages
2,178
Location
Sacramento, CA
Lol, I don't see why not. I've just barely started on this stuff, but I'm thinking maybe clear the value where the button input is stored before the functions for calculating trajectory start. Or maybe the inputs could be prevented from being written to that address in the first place.

Btw, achilles (or whoever else), under the Registers tab in Debug Dolphin, and to the right of the registers, I see f0-f31. I assume those are floating-point registers? What are then to the right of those? Also, I noticed r19 and r22 being used now and then, and sometimes (less frequently) r20 & r21, so it seems r14-18 are the better candidates, so I'll stick to those if I can.
 

DRGN

Technowizard
Moderator
Joined
Aug 20, 2005
Messages
2,178
Location
Sacramento, CA
Do you guys know of some good injection points for per-frame execution? I tried adding some breakpoints, but I've yet to find anything that results in the game advancing exactly one frame before stopping. I'm betting you guys know a few spots.

Edit: Nvm. Looking through the OP I think I found one in the Input Delay Tester code: 80390CFC.

Edit 2: Aw man, this stuff is so cool.
 
Last edited:

DRGN

Technowizard
Moderator
Joined
Aug 20, 2005
Messages
2,178
Location
Sacramento, CA
Ok, HERE's a toughie. You know how if you press R + D-pad down a few times in Melee's debug mode, you can view a diamond that shows the character's base position? How could I get the height and width of that diamond? I'm going to experiment with Dolphin's Cheat Search me tomorrow night (I did tonight a bit, but had no luck), but I don't know if a noob such as myself is going to be able to track this down very easily. If anybody could find such a thing, that would be AMAZING (mostly just need height). Otherwise, finding what exactly it's based off of might help a lot. I promise this is for a good cause.

Edit: Sorry for the double-post.

Edit 2: I figured out a rough way to estimate it. One of the camera modes tracks the center of the character (or at least a bone near their center?). I can get the y-axis offset of the point that the camera is tracking. Then, I get the difference between that and the character's y-axis offset relative to the top of the stage (I don't use 0 so that this still works when the character is airborne). Multiply that by two and you get the approximate height of the diamond. Though the diamond doesn't seem to be attached to a point on the character, at least while standing. Does anyone have an idea of how the diamond is attached? It'd be nice if I could get its position or dimensions more accurately.
 
Last edited:

Starreaver1

Smash Apprentice
Joined
Oct 12, 2013
Messages
132
Location
Minneapolis, MN/Princeton, NJ
Is there a way to have a button (say, dpad up or down) send you from CSS to the title screen, and have the title screen send you directly to the CSS? I'm asking this because I've been trying to write a code that toggles custom music with original music, but since music can only be changed during loading cycles, I can't get the menu music to change so far, only the multiplayer music. I'd need force the game to go through a loading cycle, like going from the title screen to the CSS or menu or whatever.

Edit: Second topic. I wrote a code that sets the random select back to the default for friendlies, after a match ends, and it works but it has the strangest side effect of causing the new challenger is approaching screen (in this case, it's always for Ganon), to pop up. Does anyone know why this may be happening?
 
Last edited:

Achilles1515

Smash Master
Joined
Jun 18, 2007
Messages
3,211
Location
Cincinnati / Columbus OH
Is there a way to have a button (say, dpad up or down) send you from CSS to the title screen, and have the title screen send you directly to the CSS? I'm asking this because I've been trying to write a code that toggles custom music with original music, but since music can only be changed during loading cycles, I can't get the menu music to change so far, only the multiplayer music. I'd need force the game to go through a loading cycle, like going from the title screen to the CSS or menu or whatever.

Edit: Second topic. I wrote a code that sets the random select back to the default for friendlies, after a match ends, and it works but it has the strangest side effect of causing the new challenger is approaching screen (in this case, it's always for Ganon), to pop up. Does anyone know why this may be happening?
This is a manual toggle for changing music that you already have? At what screen does this current toggle occur?

For the second item, you are referring to the vanilla menu option of changing stage select to "Random" (or On, Loser, Ordered, etc.)?

I'm just a little confused.

Ok, HERE's a toughie. You know how if you press R + D-pad down a few times in Melee's debug mode, you can view a diamond that shows the character's base position? How could I get the height and width of that diamond? I'm going to experiment with Dolphin's Cheat Search me tomorrow night (I did tonight a bit, but had no luck), but I don't know if a noob such as myself is going to be able to track this down very easily. If anybody could find such a thing, that would be AMAZING (mostly just need height). Otherwise, finding what exactly it's based off of might help a lot. I promise this is for a good cause.

Edit: Sorry for the double-post.

Edit 2: I figured out a rough way to estimate it. One of the camera modes tracks the center of the character (or at least a bone near their center?). I can get the y-axis offset of the point that the camera is tracking. Then, I get the difference between that and the character's y-axis offset relative to the top of the stage (I don't use 0 so that this still works when the character is airborne). Multiply that by two and you get the approximate height of the diamond. Though the diamond doesn't seem to be attached to a point on the character, at least while standing. Does anyone have an idea of how the diamond is attached? It'd be nice if I could get its position or dimensions more accurately.
Sorry. I don't know anything about the diamond at the moment.
 
Last edited:

Starreaver1

Smash Apprentice
Joined
Oct 12, 2013
Messages
132
Location
Minneapolis, MN/Princeton, NJ
It is a manual toggle at the CSS, the branch is at 80262f48 in the RAM. Dpad up/down turns custom music on/off and returns you to the VS Menu. I'm using the return to VS menu part to indicate to the player that a change has been made. However the music is only different during matches, the menu music is unaffected since the game would have to run through a loading cycle first to change that, and in my code it doesn't.

Er, ignore the second item for now. There's a flaw in the code I need to fix first before I ask anything else anyway. Sorry.

PS. I wasn't thinking about it earlier, but all of my codes are actually ASM converted into machine code and hard coded into the DOL. I don't actually use Gecko codes. Should I move my topic to the DOL mod thread?

Thanks in advance

Edit again: I don't actually know in technical terms what a "loading cycle" is, I just know generally when they occur in the game (like going from Title Screen>Menus). I just got the term from Shamrock's music code post lol.
 
Last edited:

DRGN

Technowizard
Moderator
Joined
Aug 20, 2005
Messages
2,178
Location
Sacramento, CA
I've thought of Gecko as being just ASM when compiled into hex. So since you have to convert your ASM to hex in order to add it into the DOL, you're technically using Gecko. Just their implementation is a little different of course. But otherwise this would mean that this thread would be a good place to talk about these sorts of things, since they're basically two sides of the same coin.
 

Achilles1515

Smash Master
Joined
Jun 18, 2007
Messages
3,211
Location
Cincinnati / Columbus OH
No Rapid Jabs - All Applicable Characters (1.02) [Achilles]
040D6AEC 60000000

No Rapid Jabs - Captain Falcon Only (1.02) [Achilles]
C20D6B8C 00000003
81DE0064 2C0E0002
40820008 4E800020
7C0802A6 00000000

No Rapid Jabs - CPU Captain Falcon Only (CPU Always Performs Gentleman) (1.02) [Achilles]
C20D6B8C 00000007
89DE0678 1DCE0E90
3DE08045 61EF3088
7DEF702E 2C0F0001
40820014 81DE0064
2C0E0002 40820008
4E800020 7C0802A6
60000000 00000000
 
Last edited:

Achilles1515

Smash Master
Joined
Jun 18, 2007
Messages
3,211
Location
Cincinnati / Columbus OH
From the 20XX Pack,
Code:
(Z Button) While Selecting an Alphabet Character to Force Lowercase (1.02) [Achilles]

C223C28C 0000000B
3E608046 6273B0FD
3A200000 3A310001
8E93000C 2C140010
4082002C 8AA40000
2C150082 40820028
8AA40001 2C150060
4180001C 2C15007A
40800014 3AB50021
9AA30001 2C110004
41A0FFC4 4E800020
60000000 00000000
 
Joined
Oct 10, 2011
Messages
1,126
Location
Boise, ID
NNID
dansalvato
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

I've thought of Gecko as being just ASM when compiled into hex. So since you have to convert your ASM to hex in order to add it into the DOL, you're technically using Gecko. Just their implementation is a little different of course. But otherwise this would mean that this thread would be a good place to talk about these sorts of things, since they're basically two sides of the same coin.
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.
 
Last edited:
Top Bottom