• 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

Achilles1515

Smash Master
Joined
Jun 18, 2007
Messages
3,211
Location
Cincinnati / Columbus OH
Bought a Gecko SE clone called the Shuriken today, so I'll be able to do debugging with not-so-**** software on a real console!

http://www.staffs2.webspace.virginmedia.com/shuriken_usb.htm

Costs about $30 in the U.S.. Heard back from the creator an hour ago that mine is ready to ship between Thursday and Saturday.
Should I get one of these? What are the pros/cons over Dolphin? Can you somehow do save states on console with these things?
 

flieskiller

Smash Journeyman
Joined
Jan 3, 2013
Messages
426
32 bits (endif, then) If not equal
224d4cac 20000000
044d4cac 20000000

About the name entry 8 letters by Dan, how do I translate the 22xxxxxx code into DOL? Do I have anything to do or simply keeping the 04 will work?
 

SinsOfApathy

Smash Journeyman
Joined
Feb 24, 2015
Messages
474
NNID
Psion312
Should I get one of these? What are the pros/cons over Dolphin? Can you somehow do save states on console with these things?
Pros:
Better memory searching, which includes regex
Testing on actual hardware
Pointer search
Additional breakpoint conditions (You can break on a register.)
Stack trace, even if there's a crash

Cons:
Need to have the console physically located near you
Gecko's source claims some games don't pause, so it'll loop until it does. Don't know if that's actually true of any game though
Money

My reasoning for buying it was more or less because I'd like to see things on actual hardware without going through incredibly convoluted steps of moving an SD card and such. Plus, I'm trying to get access to the MMIO registers, so I can force an EXI or SI device to have different functionality, or as a means to send inputs to the console. Dolphin has no discernible way of doing that, and the Gecko might not either, but it's a step.
 
Last edited:

_glook

Got a Passion for Smashin'
Joined
Sep 30, 2005
Messages
802
Location
Not UC Berkeley anymore
32 bits (endif, then) If not equal
224d4cac 20000000
044d4cac 20000000

About the name entry 8 letters by Dan, how do I translate the 22xxxxxx code into DOL? Do I have anything to do or simply keeping the 04 will work?
If you really wanted to, you can just use cmpwi, but those codes as gecko codes are mostly meant to make sure that you're not constantly writing stuff every frame, which may slow down the game and mess up your frame rate. When I turned that particular code into a DOL mod, I simply just did everything inside of the if block, which I believe is simply a memory override.
The offset into the DOL is different though for some of the name tag stuff. Usually you can get away with subtracting 80003420 for function addresses and 80003000 for data addresses to get the DOL address, but the name tag data is a different offset, for whatever reason.
 

DRGN

Technowizard
Moderator
Joined
Aug 20, 2005
Messages
2,179
Location
Sacramento, CA
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:
View attachment 59391


AFTER:

View attachment 59392


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.
That's pretty cool. Could the byte after the blue FF be alpha, or is that the white body shadow color?

What I've been doing (usually) is to go to Dreamland, and then orient the character by facing left or right so that the light source will make sense with the shadow that I add later for the finished CSP.

If you really wanted to, you can just use cmpwi, but those codes as gecko codes are mostly meant to make sure that you're not constantly writing stuff every frame, which may slow down the game and mess up your frame rate. When I turned that particular code into a DOL mod, I simply just did everything inside of the if block, which I believe is simply a memory override.
The offset into the DOL is different though for some of the name tag stuff. Usually you can get away with subtracting 80003420 for function addresses and 80003000 for data addresses to get the DOL address, but the name tag data is a different offset, for whatever reason.
The variation in the offsets differences is due to the file being broken into different sections as it moves into RAM. Not all of the sections stay in the same order (though most do). There's a table in the beginning of the dol that describes the distribution. I can go into more detail later if you want. But for convenience I already have a function which converts RAM addresses to dol offsets and vice versa (can't remember if I mentioned that to you before already). I hope to release it soon.
 
Last edited:

CeLL

Smash Lord
Joined
Jan 26, 2014
Messages
1,026
Location
Washington
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:
View attachment 59391


AFTER:

View attachment 59392


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.
I'm just playing with this, I love it lol
FoD is really bright though xD
 

Achilles1515

Smash Master
Joined
Jun 18, 2007
Messages
3,211
Location
Cincinnati / Columbus OH
That's pretty cool. Could the byte after the blue FF be alpha?

What I've been doing (usually) is to go to Dreamland, and then orient the character by facing left or right so that the light source will make sense with the shadow that I add later for the finished CSP.


The variation in the offsets differences is due to the file being broken into different sections as it moves into RAM. Not all of the sections stay in the same order (though most do). There's a table in the beginning of the dol that describes the distribution. I can go into more detail later if you want. But for convenience I already have a function which converts RAM addresses to dol offsets and vice versa (can't remember if I mentioned that to you before already). I hope to release it soon.
It should be alpha, but when I tried changing it, nothing happened. Granted, I was trying to change it via a slightly different method than the code above, so changing it within the code might work. Haven't tried yet.
 
Last edited:

SinsOfApathy

Smash Journeyman
Joined
Feb 24, 2015
Messages
474
NNID
Psion312
Got my Shuriken today and it's working perfectly. If only I had time to get anything done lol
 

SinsOfApathy

Smash Journeyman
Joined
Feb 24, 2015
Messages
474
NNID
Psion312
Does this allow save states on console somehow?
Nope.

Edit: Word to the wise, don't use Nintendont's OSReport hook, at least with Melee. I'd enabled it thinking "All those OSReports used by the developer debugs would be nice." But nope, causes a freeze on startup. Then I kept running into issues with Nintendont getting stuck (or just taking forever to boot with it on), so I had to delete the ninconfig file and start it from scratch.
 
Last edited:

zankyou

Smash Lord
Joined
Sep 12, 2014
Messages
1,055
Can anyone give some guidance on how to call and utilize the games functions. Say for instance if I wanted to play a sound effect. The function starts at 8038cff4 but I dont fully understand where to go from there.
 

CeLL

Smash Lord
Joined
Jan 26, 2014
Messages
1,026
Location
Washington
Can anyone give some guidance on how to call and utilize the games functions. Say for instance if I wanted to play a sound effect. The function starts at 8038cff4 but I dont fully understand where to go from there.
lis r12,0x80ab
ori r12,r12,0xcdef
mtctr r12
bctrl

That branches to 0x80abcdef. Change to your desired line, of course.
So you'd set the registers it uses as parameters to whatever you want, then branch to 0x8038cff4. It will blr at the end of the sound effect function and return to your function.
 

zankyou

Smash Lord
Joined
Sep 12, 2014
Messages
1,055
So you'd set the registers it uses as parameters to whatever you want, then branch to 0x8038cff4. It will blr at the end of the sound effect function and return to your function.
Thanks for the super fast response. I really wish I knew about labels before.
 

zankyou

Smash Lord
Joined
Sep 12, 2014
Messages
1,055
Zankyou, so what's up, man? It's been a while. Have you been busy with school recently?
Yeah. My harddrive crashed so I lost a lot of stuff and had to catch up on two major projects. Hard lesson learned in backing up stuff. But Im getting back into smash now.
 

SinsOfApathy

Smash Journeyman
Joined
Feb 24, 2015
Messages
474
NNID
Psion312
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.
Gamecube's 64KB 8-way associative L1 cache serves as a split 32kB instruction cache and a 32kB data cache. The 256KB L2 cache is entirely data cache, I believe. Melee's DOL is ~4.4kB by comparison. There's a little bit of overhead on that because of C pointer passing or C++ vtables (which I'm pretty sure Melee was C-based), and that's used almost entirely by stages and character files that should be loaded into the cache at stage load. That's why if you use a decompiler, you'll see an assload of instructions that don't get tagged, because they're "unused" until runtime.

I'm fairly certain there'd never be 8 associations of all ~5kB of instructions (Meaning the same instruction, 8 different places in the cache resulting in 8x5 kB), or you're doing something that'd have you legally wearing a helmet everywhere. So the reality is, unless you start doing things graphically (Magus's Debug comes to mind), which the Gamecube was sorely lacking on with its 162MHz GPU, you shouldn't run into issues here.

Sidenote:
 
Last edited:

Sooux

Smash Rookie
Joined
Jul 28, 2015
Messages
8
i have follow the steps correctly but when i start the game gecko says "No SD codes found"

any advice?
 

SinsOfApathy

Smash Journeyman
Joined
Feb 24, 2015
Messages
474
NNID
Psion312
Well... im playing ssbm on a wii
You need to have a /codes/GALE01.gct file setup on your SD card. Your loader may just suck, or if you're using GeckoOS itself, I'd try a loader, like Wiiflow. I've had issues with GeckoOS during various things.
 

Sooux

Smash Rookie
Joined
Jul 28, 2015
Messages
8
You need to have a /codes/GALE01.gct file setup on your SD card. Your loader may just suck, or if you're using GeckoOS itself, I'd try a loader, like Wiiflow. I've had issues with GeckoOS during various things.
Im using a iso of the game
 
Last edited:

??Sanic Hedgehog??

Smash Ace
Joined
Aug 18, 2014
Messages
803
Location
Altea
NNID
Sliverboy
3DS FC
5069-4545-8058
Can anyone link or make a Gecko code to auto cancel any move? kind of like Turbo Mode in Project M but you can cancel it anytime.
 

Sham Rock

Smash Apprentice
Joined
Feb 10, 2014
Messages
95
Location
Outside of your grab range
Disable Rumble When Controller is Unplugged (pal) [Dan Salvato,rice]
C2376AB4 00000008
3CC08044 60C6d188
38800000 38A0000A
39000000 7CE518AE
2C0700FF 40820008
7D0431AE 38840001
38A5000C 2C040004
4180FFE4 8081002C
60000000 00000000


Hold L+R+A+Start During Stage Load to Return to the CSS (pal) [Jorgasms,rice]
0425c3e8 887DFFA0

Hitbox Displays Do Not Interpolate (pal) [Magus]
0400A008 80E3004C
0400A00C 80030050
0400A018 80030054
(exactly the same as ntsc)
 

Magus420

Smash Master
Joined
Dec 13, 2003
Messages
4,541
Location
Close to Trenton, NJ Posts: 4,071
Training Damage Setting Applies to Everyone (1.00) [Magus]
04188BD0 60000000
04188BD4 2C19FFFF
04188BEC 41800010
04188BFC 3B200000

Made this simple code to be able to use the training damage menu to test throw combos vs a lower player ID, since training always sets them as player 1 regardless of actual controller port that entered training mode.

Edit: Doesn't apply the damage setting when respawning, just when exiting the training menu. Now it does.

 
Last edited:

marios92

Smash Rookie
Joined
Aug 7, 2015
Messages
10
Hi to all.
Someone can make code like "X button always Tap Jump" and "always wavelanding"?
I see so many expert of code making here... amazing codes!
 

flieskiller

Smash Journeyman
Joined
Jan 3, 2013
Messages
426
Code:
Disable Teams Mode Stock Steal
0416B918 4E800020
Code:
Start Button or A+B for Teams Mode Stock Steal
- Now allows for buffering this command.
0416BA04 7C00DA14
0416BA08 1DE0000C
0416BA0c 7C0FE22E
C216BA10 00000005
540F04E6 2C0F1000
41820018 540005AE
2C000300 40820008
48000008 38000000
60000000 00000000
By buffering I mean that if you hold A+B (or Start, but with this you still run the risk of pausing the game) during death animation, you will steal a stock as soon as possible. Let me know if anything doesn't work as expected.
On Gamecube, this code, if a player is dead and a living player pauses, the game crashes.
 

flieskiller

Smash Journeyman
Joined
Jan 3, 2013
Messages
426
Related to coins:

800d4ea8 = divide per 2, next two hex numbers make it round down
800d4eb0 = number set to give to the player
uses r4 for the function to store new number

Set number of coins back to 0 when dead (r4 = 0):
040d4eb0 3BE00000

do not lose coins when dead (mr r4, r0, which is player's current number of coins):
040d4eb0 7C040378
 

flieskiller

Smash Journeyman
Joined
Jan 3, 2013
Messages
426
Timer is now shown in the bottom of the screen (1.02)
042f4678 3c00C1b6

The last 4 numbers are the coordinates, so change the "b6" into something similar to have different height. Based on Achilles' PAL Stocks post.

 

flieskiller

Smash Journeyman
Joined
Jan 3, 2013
Messages
426
I've finished part 1 of the system I want to place in my custom mode. Here is a bonus thing you can add in your game that will influence nothing, that can be fun to see.

Help by Achilles and inspiration from the Taunt Battle code from Dan Salvato.

Code below has been fixed so that a game is won by highest amount of stocks instead of most coins.

Coins in Stock Mode (1.02) [flieskiller]
04167f78 60000000
04167f84 60000000
0416B0CC 38600001
044ddc28 41300000
0416597c 480000CC
C2165A64 0000000C
3E208046 6231B6A0
8A310000 2C110000
40820014 3E208045
62313110 3A000E90
48000010 3E20804A
623113CC 3A000050
7F53D378 2C130000
41820010 3A73FFFF
7E318214 4BFFFFF0
80110000 3E208016
62315AA4 7E2903A6
4E800420 00000000


(edit: total screen height is different from Dolphin and console, and I didn't know that, so I increased the height a bit, from 41500000 to 41300000 for being able to see it on console with a TV)

(edit 2: Because of not enough testing, when a game was finished, the team with highest amount of coins was winning instead of the player with stocks left. I modified so that it was right for stock mode. Here is in the spoiler the old version with most coins winning the game:

result: The coins are dropped like in Coin Mode, but in any game modes. In addition, the Score Display number appears under the characters logos and shows the amount of coins the player has.

ASM notes:

Video showing this (with no sound and low quality):
 
Last edited:

Laws246Melee

Smash Rookie
Joined
Aug 10, 2015
Messages
1
Can u tell me the site where you got the color codes because i wanna customize all of marths swords colors to white
 

UMR | donmk

RIP PM
Joined
Jan 14, 2008
Messages
138
Location
Australia
Is it possible to use the NTSC codes on NTSC-J? I honestly don't think it is, but I cannot find NTSC-J codes for the life of me, so I'm hoping it works like that.
 
Top Bottom