• 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,178
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.
 

_glook

Got a Passion for Smashin'
Joined
Sep 30, 2005
Messages
802
Location
Not UC Berkeley anymore
A couple of more conversions, for Salty Runback in v1.01 and Stage Striking in v1.01:
Code:
A+B for Salty Runback (v1.01) [Dan Salvato, _glook]
C21A3B18 00000008
39C00000 3DE08046
61EFA428 820F0000
5611018D 41820010
561101CF 41820008
38000002 39CE0001
2C0E0004 4080000C
39EF000C 4BFFFFD8
981F0003 00000000

Stage Striking Black (v1.01) [Dan Salvato, _glook]
C2259C7C 00000025
39E00001 3E008046
6210A41C 1E2F000C
7E31802E 5630014B
4182000C 3A200001
48000020 56300109
4182000C 3A200002
48000010 563002D7
418200DC 3A200003
3EA0803E 62B5F9F0
3EC0804D 62D65F8E
3A800000 3A600000
3A400000 2C110001
40820014 8A560000
2C12001C 418100A8
48000050 2C110003
40820010 3A80003F
3A600002 4800003C
1E12001C 7E10AA14
8AF0000A 3E008045
6210B6A8 82100000
7E10BC30 561007FF
41820010 3A600002
3A80003F 4800000C
3A600000 3A800000
1E12001C 7E10A82E
2C120016 41800008
82100010 82100018
82100004 82100008
8210001C 82100008
9A900024 1E12001C
3A100008 7E70A9AE
3A00001E 9A160000
2C110001 41820010
3A520001 2C12001D
41A0FF4C 39EF0001
2C0F0005 41A0FEE8
C022C9E8 00000000
 

_glook

Got a Passion for Smashin'
Joined
Sep 30, 2005
Messages
802
Location
Not UC Berkeley anymore
Here's Jorgasm's Stock Control/Crew Mode code converted to v1.01 and v1.00. These are the raw notes.
Code:
Stock Control/Crew Battle (1.00) [Jorgasms, _glook]

####################
# SET STOCK AMOUNT #
####################
# Sets the stocks equal to the handicap amount when a match starts
@ 80033C44:
lis r14, 0x8045
ori r14,r14, 0x9F4D     # 80459F4D, the handicap setting,
lbz r14,0(r14)
cmpwi r14,2
bne- 0x38
lis r14, 0x8045
addi r14,r14, 0x114E   # 8045114E, Correct
lis r15, 0x8047
ori r15,r15, 0xE860     # 8047E860, Correct
lbz r18,0(r15)
stb r18,0(r14)
lbz r18,36(r15)
stb r18,3728(r14)
lbz r18,72(r15)
stb r18,7456(r14)
lbz r18,108(r15)
stb r18,11184(r14)
b 0x08
stb r5,142(r3)

C2033C44 0000000A
3DC08045 61CE9F4D
89CE0000 2C0E0002
40820038 3DC08045
39CE114E 3DE08047
61EFE860 8A4F0000
9A4E0000 8A4F0024
9A4E0E90 8A4F0048
9A4E1D20 8A4F006C
9A4E2BB0 48000008
98A3008E 00000000

########################
# DISABLE DAMAGE RATIO #
########################
# During a match, all knock back is normal instead of handicap based
@ 801A4A94:
lis r16, 0x8047
ori r16,r16, 0xE718     # 8047E718, Correct
li r17,9
stb r17,0(r16)
stb r17,36(r16)
stb r17,72(r16)
stb r17,108(r16)
subi r5,r30,8

C21A4A94 00000005
3E008047 6210E718
3A200009 9A300000
9A300024 9A300048
9A30006C 38BEFFF8
60000000 00000000

#########################
# DON'T STORE SOMETHING #
#########################
# This makes it so it doesn't store some value. This helps stuff related to auto handicap.
80036B30 60000000

#######################################
# ENABLE HANDICAP CONTROL DURING AUTO #
#######################################
# Normally, handicap can't be controlled when it's set to auto.
# This un-grays the handicap slider so it can be controlled
# There are two addresses, the second one is because of something to do with "DON'T STORE SOMETHING"
@ 8022E474 & 8022E3C4:
lbz r0,4(r28)
lis r14, 0x803F
ori r14,r14, 0x8556     # 803F8556
lis r16, 0x8045
ori r16,r16, 0x9F4D     # 80459F4D, Correct
lbz r17,0(r16)
cmpwi r17,1
bne- 0x14
li r0,2
li r15,255
stb r15,0(r14)
b 0x0C
li r15,0
stb r15,0(r14)

C222E474 00000008
881C0004 3DC0803F
61CE8556 3E008045
62109F4D 8A300000
2C110001 40820014
38000002 39E000FF
99EE0000 4800000C
39E00000 99EE0000
60000000 00000000

C222E3C4 00000008
881C0004 3DC0803F
61CE8556 3E008045
62109F4D 8A300000
2C110001 40820014
38000002 39E000FF
99EE0000 4800000C
39E00000 99EE0000
60000000 00000000

#####################
# SET AUTO HANDICAP #
#####################
# Sets the auto handicap to the number of stocks if entering the CSS
# This is both from menu and from a crew battle
@ 80265360:
lis r14, 0x803F
ori r14,r14, 0x8556     # 803F8556
lbz r14,0(r14)
cmpwi r14,0
beq- 0x8C
lis r14, 0x8045
addi r14,r14, 0x114E   # 8045114E  Correct
lis r15, 0x8047
ori r15,r15, 0xE860     # 8047E860   Correct
lis r16, 0x8045
ori r16,r16, 0x9F4C     # 80459F4C   Correct
lbz r16,0(r16)
cmpwi r16,9
ble- 0x08
li r16,9
lbz r17,0(r14)
cmpwi r17,0
beq- 0x0C
stb r17,0(r15)
b 0x08
stb r16,0(r15)
lbz r17, 0xE90(r14)
cmpwi r17,0
beq- 0x0C
stb r17, 0x24(r15)
b 0x08
stb r16, 0x24(r15)
lbz r17, 0x1D20(r14)
cmpwi r17,0
beq- 0x0C
stb r17, 0x48(r15)
b 0x08
stb r16, 0x48(r15)
lbz r17, 0x2BB0(r14)
cmpwi r17,0
beq- 0x0C
stb r17, 0x6C(r15)
b 0x08
stb r16, 0x6C(r15)
subi r0,r3,1

C2265360 00000015
3DC0803F 61CE8556
89CE0000 2C0E0000
4182008C 3DC08045
39CE114E 3DE08047
61EFE860 3E008045
62109F4C 8A100000
2C100009 40810008
3A000009 8A2E0000
2C110000 4182000C
9A2F0000 48000008
9A0F0000 8A2E0E90
2C110000 4182000C
9A2F0024 48000008
9A0F0024 8A2E1D20
2C110000 4182000C
9A2F0048 48000008
9A0F0048 8A2E2BB0
2C110000 4182000C
9A2F006C 48000008
9A0F006C 3803FFFF
60000000 00000000

##########
# PART 5 #
##########
# No idea what this does, but it might be related to auto handicap stuff
@ 8022FA5C:
lbz r0,5(r3)
lis r14, 0x803F
ori r14,r14, 0x8556     # 803F8556
lis r15, 0x8045
ori r15,r15, 0x9F4D     # 80459F4D
li r16,1
lbz r14,0(r14)
cmpwi r14,255
bne- 0x0C
stb r16,0(r15)
li r0,1

C222FA5C 00000006
88030005 3DC0803F
61CE8556 3DE08045
61EF9F4D 3A000001
89CE0000 2C0E00FF
4082000C 9A0F0000
38000001 00000000



Stock Control/Crew Battle (1.01) [Jorgasms, _glook]

####################
# SET STOCK AMOUNT #
####################
# Sets the stocks equal to the handicap amount when a match starts
@ 80033CC4:
lis r14, 0x8045
ori r14,r14, 0xB235     # 8045B235
lbz r14,0(r14)
cmpwi r14,2
bne- 0x38
lis r14, 0x8045
addi r14,r14, 0x242E   # 8045242E
lis r15, 0x8047
ori r15,r15, 0xFB48     # 8047FB48
lbz r18,0(r15)
stb r18,0(r14)
lbz r18,36(r15)
stb r18,3728(r14)
lbz r18,72(r15)
stb r18,7456(r14)
lbz r18,108(r15)
stb r18,11184(r14)
b 0x08
stb r5,142(r3)

C2033CC4 0000000A
3DC08045 61CEB235
89CE0000 2C0E0002
40820038 3DC08045
39CE242E 3DE08047
61EFFB48 8A4F0000
9A4E0000 8A4F0024
9A4E0E90 8A4F0048
9A4E1D20 8A4F006C
9A4E2BB0 48000008
98A3008E 00000000

########################
# DISABLE DAMAGE RATIO #
########################
# During a match, all knock back is normal instead of handicap based
@ 801A5194:
lis r16, 0x8047
ori r16,r16, 0xFA00     # 8047FA00
li r17,9
stb r17,0(r16)
stb r17,36(r16)
stb r17,72(r16)
stb r17,108(r16)
subi r5,r30,8

C21A5194 00000005
3E008047 6210FA00
3A200009 9A300000
9A300024 9A300048
9A30006C 38BEFFF8
60000000 00000000

#########################
# DON'T STORE SOMETHING #
#########################
# This makes it so it doesn't store some value. This helps stuff related to auto handicap.
80036bb4 60000000

#######################################
# ENABLE HANDICAP CONTROL DURING AUTO #
#######################################
# Normally, handicap can't be controlled when it's set to auto.
# This un-grays the handicap slider so it can be controlled
# There are two addresses, the second one is because of something to do with "DON'T STORE SOMETHING"
@ 8022EFE4 & 8022EF34:
lbz r0,4(r28)
lis r14, 0x803F
ori r14,r14, 0x9706     # 803F9706
lis r16, 0x8045
ori r16,r16, 0xB235     # 8045B235
lbz r17,0(r16)
cmpwi r17,1
bne- 0x14
li r0,2
li r15,255
stb r15,0(r14)
b 0x0C
li r15,0
stb r15,0(r14)

C222EFE4 00000008
881C0004 3DC0803F
61CE9706 3E008045
6210B235 8A300000
2C110001 40820014
38000002 39E000FF
99EE0000 4800000C
39E00000 99EE0000
60000000 00000000

C222EF34 00000008
881C0004 3DC0803F
61CE9706 3E008045
6210B235 8A300000
2C110001 40820014
38000002 39E000FF
99EE0000 4800000C
39E00000 99EE0000
60000000 00000000

#####################
# SET AUTO HANDICAP #
#####################
# Sets the auto handicap to the number of stocks if entering the CSS
# This is both from menu and from a crew battle
@ 80265EDC:
lis r14, 0x803F
ori r14,r14, 0x9706     # 803F9706
lbz r14,0(r14)
cmpwi r14,0
beq- 0x8C
lis r14, 0x8045
addi r14,r14, 0x242E   # 8045242E
lis r15, 0x8047
ori r15,r15, 0xFB48     # 8047FB48
lis r16, 0x8045
ori r16,r16, 0xB234     # 8045B234
lbz r16,0(r16)
cmpwi r16,9
ble- 0x08
li r16,9
lbz r17,0(r14)
cmpwi r17,0
beq- 0x0C
stb r17,0(r15)
b 0x08
stb r16,0(r15)
lbz r17, 0xE90(r14)
cmpwi r17,0
beq- 0x0C
stb r17, 0x24(r15)
b 0x08
stb r16, 0x24(r15)
lbz r17, 0x1D20(r14)
cmpwi r17,0
beq- 0x0C
stb r17, 0x48(r15)
b 0x08
stb r16, 0x48(r15)
lbz r17, 0x2BB0(r14)
cmpwi r17,0
beq- 0x0C
stb r17, 0x6C(r15)
b 0x08
stb r16, 0x6C(r15)
subi r0,r3,1

C2265EDC 00000015
3DC0803F 61CE9706
89CE0000 2C0E0000
4182008C 3DC08045
39CE242E 3DE08047
61EFFB48 3E008045
6210B234 8A100000
2C100009 40810008
3A000009 8A2E0000
2C110000 4182000C
9A2F0000 48000008
9A0F0000 8A2E0E90
2C110000 4182000C
9A2F0024 48000008
9A0F0024 8A2E1D20
2C110000 4182000C
9A2F0048 48000008
9A0F0048 8A2E2BB0
2C110000 4182000C
9A2F006C 48000008
9A0F006C 3803FFFF
60000000 00000000

##########
# PART 5 #
##########
# No idea what this does, but it might be related to auto handicap stuff
@ 802305CC:
lbz r0,5(r3)
lis r14, 0x803F
ori r14,r14, 0x9706     # 803F9706
lis r15, 0x8045
ori r15,r15, 0xB235     # 8045B235
li r16,1
lbz r14,0(r14)
cmpwi r14,255
bne- 0x0C
stb r16,0(r15)
li r0,1

C22305CC 00000006
88030005 3DC0803F
61CE9706 3DE08045
61EFB235 3A000001
89CE0000 2C0E00FF
4082000C 9A0F0000
38000001 00000000
 

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:
Since the Gekko was 1-core (!1!!1!), there's no crazy bull**** done by developers/compilers like in modern consoles, where they just pin threads to the same core to abuse hardware behavior. The only time that's even close to done on a Gamecube/Wii is when the USB Gecko forces the game to freeze by using a while loop.

Dolphin doesn't emulate any cache behavior beyond the occasional icbi/icbz & sync. It will invalidate the icache occasionally, but it doesn't check at each JIT block otherwise it runs magnitudes slower.

As for Nintendont, Fix94 has stated that it's already pushing the Broadway processor, but it's doing kernel emulation, keeping fake MMIO registers, etc.. So, at worst you cause Nintendont to run like ****. Which frankly, it already does for me since I can't even use it with my Shuriken. It'll straight up freeze Nintendont or an emulated game if it's plugged in.
 
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
Atlea
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.

Code:
80188BC4:  3B400000	li	r26,0		# current player ID
80188BC8:  833D0000	lwz	r25,0(r29)	# loads number of training cpus
80188BCC:  2C1A0000	cmpwi	r26,0		# player loop start
80188BD0:  41820020	beq-	0x80188bf0	# skip for P1. -> nop
80188BD4:  2C190000	cmpwi	r25,0		# check remaining players. -> cmpwi  r25,-1
80188BD8:  41820018	beq-	0x80188bf0
80188BDC:  387A0000	addi	r3,r26,0
80188BE0:  389E0000	addi	r4,r30,0
80188BE4:  4BEAB6CD	bl	0x800342b0
80188BE8:  3739FFFF	subic.	r25,r25,1
80188BEC:  41820010	beq-	0x80188bfc	# -> blt-  0x80188bfc
80188BF0:  3B5A0001	addi	r26,r26,1
80188BF4:  2C1A0004	cmpwi	r26,4
80188BF8:  4180FFD4	blt+	0x80188bcc	# loop for next player
80188BFC:  3B200001	li	r25,1		# starting player ID for storing respawn dmg. -> li   r25,0
80188C00:  7F23CB78	mr	r3,r25		# store respawn damage loop start
80188C04:  809B01F0	lwz	r4,496(r27)
80188C08:  4BFE1E65	bl	0x8016aa6c
80188C0C:  3B390001	addi	r25,r25,1
80188C10:  2C190004	cmpwi	r25,4
80188C14:  4180FFEC	blt+	0x80188c00
 
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:
Coins in Stock Mode (most coins wins) (1.02) [flieskiller]
04167f78 60000000
04167f84 60000000
0416B0CC 38600001
044ddc28 41300000
0416597c 480000CC
C2165A64 00000007
3E208045 62313110
7F53D378 2C130000
41820010 3A73FFFF
3A310E90 4BFFFFF0
80110000 3E208016
62315AA4 7E2903A6
4E800420 00000000

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:
show score display in all modes. One checks if Score display is at ON, the other checks if it's time mode (both branches out if any of them are false)
04167f78 60000000
04167f84 60000000

coins always drop
0416B0CC 38600001

height of score display
044ddc28 41300000

Stock mode and Bonus mode uses the same Score Display as Time mode, and the Time mode number uses the coins instead of the score with the C2 below.
0416597c 480000CC

show coins instead of score from the Score Display number
C2165A64 00000007
3E208045 62313110
7F53D378 2C130000
41820010 3A73FFFF
3A310E90 4BFFFFF0
80110000 3E208016
62315AA4 7E2903A6
4E800420 00000000

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