• 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

Ripple

ᗣᗣᗣᗣ ᗧ·····•·····
Joined
Sep 4, 2006
Messages
9,633
@ Achilles1515 Achilles1515 I don't remember, it was over a year ago that I found them. but knowing how I used to mod stuff it was probably search for a known value then changing it and values around it and starting up melee to see what happened.

I also got

A288 .75 power shield size ratio

A28C .5 reflected projectiles damage multiplier


and whatever the first .75 value is in the plco seems to be reverse momentum on dash because if it becomes too high you start dashing backwards


I don't have anything else mapped
 
Last edited:

mooki

Smash Apprentice
Joined
Apr 13, 2013
Messages
157
Location
Cali
My dream of long time came true.....
You're amazing!

Did someone make the dol mod?
I might just try to learn how to do so soon because I can't get any gecko codes to work for some reason :/
 

Wooggle

Smash Apprentice
Joined
Jul 7, 2014
Messages
83
Location
NJ, USA
My dream of long time came true.....
You're amazing!

Did someone make the dol mod?
I might just try to learn how to do so soon because I can't get any gecko codes to work for some reason :/
Here's the dol mod for you two (any possibly others):

Single Player Battlefield Background in Vs. Melee (Achilles)
------- Version 1.02 -------
@0x2168E8
40820010 -> 60000000

I have my own question about something unrelated though.
I have been experimenting with ASM codes, and I was wondering if there was a way to store some kind of variable, which can be recalled later on, but won't be affected by normal game play.
Also, I was wondering if there was a way to overwrite and recall specific offsets of memory through ASM.
Thanks for any help
 
Last edited:

standardtoaster

Tubacabra
Joined
Nov 26, 2009
Messages
9,253
Location
Eau Claire, Wisconsin
The way I store a variable for use from some other function that won't have the same values in registers is to store the variable at some memory address that won't change. Let's say you had a value of 0x1E in r5 and r3 was completely safe to use and the address for storing something to was 805B4E80. The address I chose was completely random and off the top of my head

You would do:

lis r3, 0x805B
ori r3, r3, 0x4E80
stw r5, 0x0(r3)
 
Last edited:

Itaru

MasterGanon
Joined
Jun 25, 2014
Messages
279
Location
日本 茨城県
plco offsets

A174 20 Max number of frames of hitlag

A178 .333 damage multiplier for frames of hitlag

A17C 3 Base hitlag

A180 .667 hitlag multiplier on crouching?

A184 1.5 Electric Element Hitlag multiplier
Awesome!!

Thank you very very much!!
 

Achilles1515

Smash Master
Joined
Jun 18, 2007
Messages
3,211
Location
Cincinnati / Columbus OH
3D Mr. Game and Watch (1.02) [Achilles]
0414A410 C005048C

- Changes Mr. Game and Watch's model width from 0.01 to 1.



Mr. Game and Watch's default width value is 0.01 = 0x3C23D70A

When Mr. Game and Watch is loaded into a match, this width value is loaded from offset 0x3798 in PlGw.dat and it is completely modifiable.

Idk much about MasterHand's "AttributesOffset2" information but this location for GnW's width value is the start of this offset. MasterHand the program, that is.

@WindozeNT

Note: The code is not thoroughly tested (unintended side effects), but it does change Mr. Game and Watch's width to 1. As I was loading different characters, I noticed that code line only got executed when I played with GnW so I think it's good.
 
Last edited:

Wooggle

Smash Apprentice
Joined
Jul 7, 2014
Messages
83
Location
NJ, USA
The way I store a variable for use from some other function that won't have the same values in registers is to store the variable at some memory address that won't change. Let's say you had a value of 0x1E in r5 and r3 was completely safe to use and the address for storing something to was 805B4E80. The address I chose was completely random and off the top of my head

You would do:

lis r3, 0x805B
ori r3, r3, 0x4E80
stw r5, 0x0(r3)
I tried doing something with this, and I couldn't get it to work out. I'm probably doing something wrong, but I don't know what it is
Just to test it out, I wanted to set a value a value of "10" to offset 0x800045DC
I came up with this:
li r5,10
lis r3, 0x8000
ori r3, r3, 0x45DC
stw r5, 0x0(r3)

What I expected this to do was to set the value of "10" to r5, then I basically copied and pasted your code, except I replaced 805B4E80 with 800045DC, so I expected it to read what was at r5, do something with r3, then set "10" to offset 0x800045DC.
I converted by new ASM code to Gecko, and because I already have IEs "Flash on L Cancel" code in my DOL, I moved the whole "flash on l cancel" code down five offsets and I inserted by ASM code where the "flash on l cancel" code previously began. I went into dolphin and I made sure that the ASM was correctly inserted and I did some successful L cancels and some failed L cancels so that it would read what I had added. After I was done, I checked offset 800045DC, and it was still 00000000.
Here's what the changes looked like in Dolphin:


Based on reading what my thought process was and what I did, can you figure out what went wrong? or was I totally off with what I should be doing?
 

Achilles1515

Smash Master
Joined
Jun 18, 2007
Messages
3,211
Location
Cincinnati / Columbus OH
I tried doing something with this, and I couldn't get it to work out. I'm probably doing something wrong, but I don't know what it is
Just to test it out, I wanted to set a value a value of "10" to offset 0x800045DC
I came up with this:
li r5,10
lis r3, 0x8000
ori r3, r3, 0x45DC
stw r5, 0x0(r3)

What I expected this to do was to set the value of "10" to r5, then I basically copied and pasted your code, except I replaced 805B4E80 with 800045DC, so I expected it to read what was at r5, do something with r3, then set "10" to offset 0x800045DC.
I converted by new ASM code to Gecko, and because I already have IEs "Flash on L Cancel" code in my DOL, I moved the whole "flash on l cancel" code down five offsets and I inserted by ASM code where the "flash on l cancel" code previously began. I went into dolphin and I made sure that the ASM was correctly inserted and I did some successful L cancels and some failed L cancels so that it would read what I had added. After I was done, I checked offset 800045DC, and it was still 00000000.
Here's what the changes looked like in Dolphin:


Based on reading what my thought process was and what I did, can you figure out what went wrong? or was I totally off with what I should be doing?
It doesn't look like you have anything actually making your code run. You need an injection point.

So the game's code is running like normal until it hit's your injection point. It then branches to your custom code, executes it, and then branches back to the regular code.

I can see your code is never actually being ran through because after "stw r5,0(r3)", there is no "b 0x___" (branch [back] somewhere).

Edit: Oh, I guess I see what you mean by "moving it down". Well the flash on L-cancel is a ASM injection code. If you want to know exactly what is happening with your code, put a breakpoint at your injection point and then start stepping through it line by line.

And never have the game's code run through a function that has a blank line (0x00000000). It will probably make it freeze. Use the "nop" instruction to make it do nothing for a code line.
 
Last edited:

Kou

Smash Apprentice
Joined
Nov 22, 2011
Messages
198
Location
Japan
Here's the dol mod for you two (any possibly others):

Single Player Battlefield Background in Vs. Melee (Achilles)
------- Version 1.02 -------
@0x2168E8
40820010 -> 60000000

I have my own question about something unrelated though.
I have been experimenting with ASM codes, and I was wondering if there was a way to store some kind of variable, which can be recalled later on, but won't be affected by normal game play.
Also, I was wondering if there was a way to overwrite and recall specific offsets of memory through ASM.
Thanks for any help
Thank youuuuuu <3
 

Achilles1515

Smash Master
Joined
Jun 18, 2007
Messages
3,211
Location
Cincinnati / Columbus OH
Debug Menu Exits to Character Select Screen (1.02) [Achilles]
041b0a14 38600002

*Don't use this with 20XX 3.02

[COLLAPSE="Other Screen Values"]
From SypherPhoenix:

Tested for a bunch of different menu IDs on 1.00, idk if this lists exists elsewhere but I couldn't find it.


00 - Title Screen (Press Start)
01 - Reloads menu from language change? (brings to language change selection and saves)
02 - VS mode character select
03 - Classic Mode
04 - Adventure Mode
05 - All-Star Mode
06 - Debug Menu
07 - Master Sound Test
08 - Looks like regular VS mode, but actually cycles through many different character select screens
09 - Black Screen...?
0A - Camera Mode
0B - Trophy Gallery
0C - Trophy Lottery
0D - Trophy Collection
0E - Starts a match (with the debug menu configurations?)
0F - Target Test
10 - Super Sudden Death
11 - Invisible Melee
12 - Slo-Mo Melee
13 - Lightning Melee
14 - "A new foe has appeared!" (Ganon with sword, freezes if you try to progress, ID from debug?)
15 - Classic Mode trophy acquisition & credits (C.Falcon, ID from debug?)
16 - Adventure Mode trophy acquisition & credits (C.Falcon, ID from debug?)
17 - All-Star Mode trophy acquisition & credits (C.Falcon, ID from debug?)
18 - Intro video
19 - Cycles through Adventure Mode cinematics
1A - Character trophy acquisition (no credits) (uses All-Star trophy) (C.Falcon, ID from debug?)
1B - Tournament Menu
1C - Training Mode
1D - Tiny Melee
1E - Giant Melee
1F - Stamina Mode
20 - Home-Run Contest
21 - 10-Man Melee
22 - 100-Man Melee
23 - 3-Minute Melee
24 - 15-Minute Melee
25 - Endless Melee
26 - Cruel Melee
27 - "Enable Progressive Scan Display?"
28 - Plays Intro Video
29 - Memory Card Overwrite Confirmation
2A - Fixed-Camera Mode
2B - Loads Event Match 1 (Match ID from the debug menu?)
2C - Single-Button Mode

2D and the next few crashed so I didn't bother testing past that.
[/COLLAPSE]
 
Last edited:

zankyou

Smash Lord
Joined
Sep 12, 2014
Messages
1,055
3D Mr. Game and Watch (1.02) [Achilles]
0414A410 C005048C

- Changes Mr. Game and Watch's model width from 0.01 to 1.



Mr. Game and Watch's default width value is 0.01 = 0x3C23D70A

When Mr. Game and Watch is loaded into a match, this width value is loaded from offset 0x3798 in PlGw.dat and it is completely modifiable.

Idk much about MasterHand's "AttributesOffset2" information but this location for GnW's width value is the start of this offset. MasterHand the program...

@WindozeNT

Note: The code is not thoroughly tested (unintended side effects), but it does change Mr. Game and Watch's width to 1. As I was loading different characters, I noticed that code line only got executed when I played with GnW so I think it's good.
Such wizardry.
 

mooki

Smash Apprentice
Joined
Apr 13, 2013
Messages
157
Location
Cali
3D Mr. Game and Watch (1.02) [Achilles]
0414A410 C005048C

- Changes Mr. Game and Watch's model width from 0.01 to 1.



Mr. Game and Watch's default width value is 0.01 = 0x3C23D70A

When Mr. Game and Watch is loaded into a match, this width value is loaded from offset 0x3798 in PlGw.dat and it is completely modifiable.

Idk much about MasterHand's "AttributesOffset2" information but this location for GnW's width value is the start of this offset. MasterHand the program...

@WindozeNT

Note: The code is not thoroughly tested (unintended side effects), but it does change Mr. Game and Watch's width to 1. As I was loading different characters, I noticed that code line only got executed when I played with GnW so I think it's good.
I wonder if you can make 3D character 2D then. :O
 

Wooggle

Smash Apprentice
Joined
Jul 7, 2014
Messages
83
Location
NJ, USA
Okay guys, here my first ever gecko code. Dan Salvato deserves a lot of credit for answering each and every one of my at least a dozen questions. Also, thanks Achilles for answering some of my questions in different threads

L Cancel % in Results Screen (version 1.02)
C208D600 0000000A
8A830678 3DC08000
39CE45D4 3AA00008
7EB5A1D6 7DCEAA14
81EE0000 39EF0001
91EE0000 3A0EFFFC
82300000 7E717BD6
3E408045 3A523DA4
3AA00E90 7EB5A1D6
7E52AA14 92720000
3880FFFF 00000000
C208D6A4 0000000A
8A830678 3DC08000
39CE45D4 3AA00008
7EB5A1D6 7DCEAA14
81EE0000 3A0EFFFC
82300000 3A310064
92300000 7E717BD6
3E408045 3A523DA4
3AA00E90 7EB5A1D6
7E52AA14 92720000
EC010024 00000000
20C61DB8 16200D20
04C61DB8 1620151A
04C61DBC 200C2024
04C61DC0 20312026
04C61DC4 2028202F
04C61DC8 1A210300
040045D0 00000000
040045D4 00000000
040045D8 00000000
040045DC 00000000
040045E0 00000000
040045E4 00000000
040045E8 00000000
040045EC 00000000

Here's a screen shot of what it looks like:

I even went out of the way to make sure that it is fully compatible with Dan's "Flash White on L Cancel" code so you can use both!

If anyone's wondering, I removed "Damage Recovered" from the results screen to make room because damage recovered is always going to be 0 unless you're playing with items or you're Ness and you heal with psy magnet, and probably no one cares about it

Try out the code and let me know if you have any questions or if you find a problem with it.
 

CeLL

Smash Lord
Joined
Jan 26, 2014
Messages
1,026
Location
Washington
Okay guys, here my first ever gecko code. Dan Salvato deserves a lot of credit for answering each and every one of my at least a dozen questions. Also, thanks Achilles for answering some of my questions in different threads

L Cancel % in Results Screen (version 1.02)
C208D600 0000000A
8A830678 3DC08000
39CE45D4 3AA00008
7EB5A1D6 7DCEAA14
81EE0000 39EF0001
91EE0000 3A0EFFFC
82300000 7E717BD6
3E408045 3A523DA4
3AA00E90 7EB5A1D6
7E52AA14 92720000
3880FFFF 00000000
C208D6A4 0000000A
8A830678 3DC08000
39CE45D4 3AA00008
7EB5A1D6 7DCEAA14
81EE0000 3A0EFFFC
82300000 3A310064
92300000 7E717BD6
3E408045 3A523DA4
3AA00E90 7EB5A1D6
7E52AA14 92720000
EC010024 00000000
20C61DB8 16200D20
04C61DB8 1620151A
04C61DBC 200C2024
04C61DC0 20312026
04C61DC4 2028202F
04C61DC8 1A210300
040045D0 00000000
040045D4 00000000
040045D8 00000000
040045DC 00000000
040045E0 00000000
040045E4 00000000
040045E8 00000000
040045EC 00000000

Here's a screen shot of what it looks like:

I even went out of the way to make sure that it is fully compatible with Dan's "Flash White on L Cancel" code so you can use both!

If anyone's wondering, I removed "Damage Recovered" from the results screen to make room because damage recovered is always going to be 0 unless you're playing with items or you're Ness and you heal with psy magnet, and probably no one cares about it

Try out the code and let me know if you have any questions or if you find a problem with it.
Definitely going in my iso. :D
 

Ripple

ᗣᗣᗣᗣ ᗧ·····•·····
Joined
Sep 4, 2006
Messages
9,633
did you test what happens when ness actually does absorb a projectile? if achilles includes it it could affect SDR when ness is played
 

Wooggle

Smash Apprentice
Joined
Jul 7, 2014
Messages
83
Location
NJ, USA
did you test what happens when ness actually does absorb a projectile? if achilles includes it it could affect SDR when ness is played
I just did, and Psy Magnet works perfectly.
It doesn't actually affect healing, it just affects the games counter for damage recovered.
 

Myougi

My posts are gluten free.
Joined
Mar 14, 2014
Messages
484
Location
WEST COAST BEST COAST
Text about awesome stuff. :3
Works awesomely, but will break and stick to Zero if a player picks Ness and uses his PSI Magnet at any point during a match - even if it does't suck up anything. It's not too too big of an issue I guess.

Edit: Addressed above.
 
Last edited:

Ripple

ᗣᗣᗣᗣ ᗧ·····•·····
Joined
Sep 4, 2006
Messages
9,633
I wasn't worried about psy magnet, I was worried about it crashing at the results screen or messing with the value. but I guess you would have noticed that
 

Wooggle

Smash Apprentice
Joined
Jul 7, 2014
Messages
83
Location
NJ, USA
Works awesomely, but will break and stick to Zero if a player picks Ness and uses his PSI Magnet at any point during a match - even if it does't suck up anything. It's not too too big of an issue I guess.

Edit: Addressed above.
For every 1% that ness heals, his L cancel % will increase by 1 until he does another aerial. When he does another aerial and lands on the ground, his L cancel % is recalculated and is set to the correct value, so it should not (and has not so far) cause game crashes at all.

It will only display the incorrect value for ness, and even then will only be off by a few percent, if ness uses psy magnet to heal before he last does an aerial and lands on the ground (L cancelled or not) before the end of the game.
 
Last edited:

zankyou

Smash Lord
Joined
Sep 12, 2014
Messages
1,055
Okay guys, here my first ever gecko code. Dan Salvato deserves a lot of credit for answering each and every one of my at least a dozen questions. Also, thanks Achilles for answering some of my questions in different threads

L Cancel % in Results Screen (version 1.02)
C208D600 0000000A
8A830678 3DC08000
39CE45D4 3AA00008
7EB5A1D6 7DCEAA14
81EE0000 39EF0001
91EE0000 3A0EFFFC
82300000 7E717BD6
3E408045 3A523DA4
3AA00E90 7EB5A1D6
7E52AA14 92720000
3880FFFF 00000000
C208D6A4 0000000A
8A830678 3DC08000
39CE45D4 3AA00008
7EB5A1D6 7DCEAA14
81EE0000 3A0EFFFC
82300000 3A310064
92300000 7E717BD6
3E408045 3A523DA4
3AA00E90 7EB5A1D6
7E52AA14 92720000
EC010024 00000000
20C61DB8 16200D20
04C61DB8 1620151A
04C61DBC 200C2024
04C61DC0 20312026
04C61DC4 2028202F
04C61DC8 1A210300
040045D0 00000000
040045D4 00000000
040045D8 00000000
040045DC 00000000
040045E0 00000000
040045E4 00000000
040045E8 00000000
040045EC 00000000

Here's a screen shot of what it looks like:

I even went out of the way to make sure that it is fully compatible with Dan's "Flash White on L Cancel" code so you can use both!

If anyone's wondering, I removed "Damage Recovered" from the results screen to make room because damage recovered is always going to be 0 unless you're playing with items or you're Ness and you heal with psy magnet, and probably no one cares about it

Try out the code and let me know if you have any questions or if you find a problem with it.
This is really brilliant. Theres some real potential here.
 

DRGN

Technowizard
Moderator
Joined
Aug 20, 2005
Messages
2,179
Location
Sacramento, CA
Some cool stuff goin' on in here when I wasn't looking.

That L Cancel % code is really cool. So is the 3D GaW (I knew that was just a matter of time after someone posted about his model a few weeks ago ;)). Awesome work, you guys.

Have you tried making like a fat Ganondorf or something, achilles? lol
 
Last edited:

zankyou

Smash Lord
Joined
Sep 12, 2014
Messages
1,055
So as far as button presses go. Is there a way to make the game distinguish between pressing a button and holding a button or would I have to create some sort of toggle for that.
 

Achilles1515

Smash Master
Joined
Jun 18, 2007
Messages
3,211
Location
Cincinnati / Columbus OH
Okay guys, here my first ever gecko code. Dan Salvato deserves a lot of credit for answering each and every one of my at least a dozen questions. Also, thanks Achilles for answering some of my questions in different threads

L Cancel % in Results Screen (version 1.02)
C208D600 0000000A
8A830678 3DC08000
39CE45D4 3AA00008
7EB5A1D6 7DCEAA14
81EE0000 39EF0001
91EE0000 3A0EFFFC
82300000 7E717BD6
3E408045 3A523DA4
3AA00E90 7EB5A1D6
7E52AA14 92720000
3880FFFF 00000000
C208D6A4 0000000A
8A830678 3DC08000
39CE45D4 3AA00008
7EB5A1D6 7DCEAA14
81EE0000 3A0EFFFC
82300000 3A310064
92300000 7E717BD6
3E408045 3A523DA4
3AA00E90 7EB5A1D6
7E52AA14 92720000
EC010024 00000000
20C61DB8 16200D20
04C61DB8 1620151A
04C61DBC 200C2024
04C61DC0 20312026
04C61DC4 2028202F
04C61DC8 1A210300
040045D0 00000000
040045D4 00000000
040045D8 00000000
040045DC 00000000
040045E0 00000000
040045E4 00000000
040045E8 00000000
040045EC 00000000

Here's a screen shot of what it looks like:

I even went out of the way to make sure that it is fully compatible with Dan's "Flash White on L Cancel" code so you can use both!

If anyone's wondering, I removed "Damage Recovered" from the results screen to make room because damage recovered is always going to be 0 unless you're playing with items or you're Ness and you heal with psy magnet, and probably no one cares about it

Try out the code and let me know if you have any questions or if you find a problem with it.
Ha, so this is what Dan was asking me about earlier. Very, nice! It makes me happy to see new ASM programmers in the Melee Workshop. I think I'll try and put this in 20XX. That feel when you successfully make your first "real" code...

I was looking over some of your ASM - Here's some tips for the future to make your life easier.

Instead of doing this:
lis r14,0x8000
addi r14,r14,0x45d4

Do this:
lis r14,0x8000
ori r14,r14,0x45d4

Reason: Good habit. If the second half of the address you are trying to put into a register is greater than 0x7fff, then doing the "addi" instruction will produce an error. With "ori", you can do any value from 0x0000 - 0xffff.



Instead of doing this:
lbz r20,0x678(r3)
li r21,8
mullw r21,r21,r20

Do this:
lbz r20,0x678(r3)
mulli r21,r20,0x8

Reason: Saves a code line. The 0x8 doesn't need to be put in it's own register if you are multiplying once and not using it again. That's when you just use a "mulli - multiply immediate". Similar to how you wouldn't put 0x8 into register A and then add it to register B. You would just do an "addi" and immediately add 8 to register B.




Instead of this:
add r14,r14,r21
lwz r15,0(r14)

Use this powerful instruction:
lwzx r15,r14,r21

Reason: Saves a code line and keeps registers intact with original values. This one is great.
lwzx rC,rB,rA
- adds the contents of rB and rA and then loads the word at that address and places the value into rC.

stwx rC,rB,rA
- adds the contents of rB and rA and stores rC into that address.

variants include:
lbzx, lhzx, stbx, sthx
(same thing but for bytes and half-words)


also.....

PSI Magnet and Healing Items Do Not Modify the "Damage Recovered" Stat
04040BBC 60000000

[Text Only] DamageRecovered Changed to L Cancel % (ASM version)
C2178224 00000009
3DE080C6 3A00151A
B20F1DBA 3E00200C
62102024 920F1DBC
3E002031 62102026
920F1DC0 3E002028
6210202F 920F1DC4
3E001A21 62100300
920F1DC8 80030008
60000000 00000000


More later, I guess. I need to go to sleep. Good work, everyone.
 
Last edited:
Joined
Oct 10, 2011
Messages
1,126
Location
Boise, ID
NNID
dansalvato
Like Achilles, I just sent Wooggle a message on some efficiency tips. I'll paste the message here in case people would like to learn from it.


There are a few things we can do more efficiently, which I'll explain to you. Specifically, the bottom of the code after the end of the C2 code.
Code:
20C61DB8 16200D20
04C61DB8 1620151A
04C61DBC 200C2024
04C61DC0 20312026
04C61DC4 2028202F
04C61DC8 1A210300
040045D0 00000000
040045D4 00000000
040045D8 00000000
040045DC 00000000
040045E0 00000000
040045E4 00000000
040045E8 00000000
040045EC 00000000
The first thing I'd like to point out is that you should include an Endif at the end of the code, because otherwise the if condition can overflow into other codes that come after this one. This is an Endif:
e2000001 00000000

For the next bunch of 04 codes, we're going to use a "string write" instead, which is used to write longer strings to consecutive memory addresses. That looks like this:
Code:
06C61DB8 00000014
1620151A 200C2024
20312026 2028202F
1A210300 00000000
For the next bunch where you just need to write 0, instead of using 04 we'll use the opcode 00 or 02, which allows us to write the value to X consecutive addresses:
Code:
020045D0 000F0000
This writes '0000' to 0x800045D0, and then 0xF consecutive half-words after that.

Here are the results of our edit:
Code:
20C61DB8 16200D20
06C61DB8 00000014
1620151A 200C2024
20312026 2028202F
1A210300 00000000
020045D0 000F0000
E2000001 00000000
Even with the Endif, we cut the number of lines required in half. :)
I haven't tested this, but please feel free to do so. Also, here's the Gecko codetype documentation:
http://geckocodes.org/index.php?arsenal=1

edit: Hey, can we assemble a Skype group with all the ASM bros? It would be easier to answer questions and share useful stuff among each other, I think.
 
Last edited:

Wooggle

Smash Apprentice
Joined
Jul 7, 2014
Messages
83
Location
NJ, USA
Ha, so this is what Dan was asking me about earlier. Very, nice! It makes me happy to see new ASM programmers in the Melee Workshop. I think I'll try and put this in 20XX. That feel when you successfully make your first "real" code...

I was looking over some of your ASM - Here's some tips for the future to make your life easier.

Instead of doing this:
lis r14,0x8000
addi r14,r14,0x45d4

Do this:
lis r14,0x8000
ori r14,r14,0x45d4

Reason: Good habit. If the second half of the address you are trying to put into a register is greater than 0x7fff, then doing the "addi" instruction will produce an error. With "ori", you can do any value from 0x0000 - 0xffff.



Instead of doing this:
lbz r20,0x678(r3)
li r21,8
mullw r21,r21,r20

Do this:
lbz r20,0x678(r3)
mulli r21,r20,0x8

Reason: Saves a code line. The 0x8 doesn't need to be put in it's own register if you are multiplying once and not using it again. That's when you just use a "mulli - multiply immediate". Similar to how you wouldn't put 0x8 into register A and then add it to register B. You would just do an "addi" and immediately add 8 to register B.




Instead of this:
add r14,r14,r21
lwz r15,0(r14)

Use this powerful instruction:
lwzx r15,r14,r21

Reason: Saves a code line and keeps registers intact with original values. This one is great.
lwzx rC,rB,rA
- adds the contents of rB and rA and then loads the word at that address and places the value into rC.

stwx rC,rB,rA
- adds the contents of rB and rA and stores rC into that address.

variants include:
lbzx, lhzx, stbx, sthx
(same thing but for bytes and half-words)


also.....

PSI Magnet and Healing Items Do Not Modify the "Damage Recovered" Stat
04040BBC 60000000

[Text Only] DamageRecovered Changed to L Cancel % (ASM version)
C2178224 00000009
3DE080C6 3A00151A
B20F1DBA 3E00200C
62102024 920F1DBC
3E002031 62102026
920F1DC0 3E002028
6210202F 920F1DC4
3E001A21 62100300
920F1DC8 80030008
60000000 00000000


More later, I guess. I need to go to sleep. Good work, everyone.
Like Achilles, I just sent Wooggle a message on some efficiency tips. I'll paste the message here in case people would like to learn from it.


There are a few things we can do more efficiently, which I'll explain to you. Specifically, the bottom of the code after the end of the C2 code.
Code:
20C61DB8 16200D20
04C61DB8 1620151A
04C61DBC 200C2024
04C61DC0 20312026
04C61DC4 2028202F
04C61DC8 1A210300
040045D0 00000000
040045D4 00000000
040045D8 00000000
040045DC 00000000
040045E0 00000000
040045E4 00000000
040045E8 00000000
040045EC 00000000
The first thing I'd like to point out is that you should include an Endif at the end of the code, because otherwise the if condition can overflow into other codes that come after this one. This is an Endif:
e2000001 00000000

For the next bunch of 04 codes, we're going to use a "string write" instead, which is used to write longer strings to consecutive memory addresses. That looks like this:
Code:
06C61DB8 00000014
1620151A 200C2024
20312026 2028202F
1A210300 00000000
For the next bunch where you just need to write 0, instead of using 04 we'll use the opcode 00 or 02, which allows us to write the value to X consecutive addresses:
Code:
020045D0 000F0000
This writes '0000' to 0x800045D0, and then 0xF consecutive half-words after that.

Here are the results of our edit:
Code:
20C61DB8 16200D20
06C61DB8 00000014
1620151A 200C2024
20312026 2028202F
1A210300 00000000
020045D0 000F0000
E2000001 00000000
Even with the Endif, we cut the number of lines required in half. :)
I haven't tested this, but please feel free to do so. Also, here's the Gecko codetype documentation:
http://geckocodes.org/index.php?arsenal=1

edit: Hey, can we assemble a Skype group with all the ASM bros? It would be easier to answer questions and share useful stuff among each other, I think.
Thanks guys for your help. I tried to include both of your feedback as much as possible. I even included Achilles' new code that makes psy magnet not affect damage recovered, and I retested EVERYTHING to make sure that it still works fine. As for using lwzx and stwx, I realized that using those wouldn't save any space and it might even over-complicate things because the offset at r16 comes from the offset at r14, so I would have to add r21 to r14 anyway.
Here is the newly revised code:

L Cancel % in Results Screen (v 1.02) [revised 2/11/15]
C208D600 00000009
8A830678 3DC08000
61CE45D4 1EB40008
7DCEAA14 81EE0000
39EF0001 91EE0000
3A0EFFFC 82300000
7E717BD6 3E408045
62523DA4 1EB40E90
7E52AA14 92720000
3880FFFF 00000000
C208D6A4 00000009
8A830678 3DC08000
61CE45D4 1EB40008
7DCEAA14 81EE0000
3A0EFFFC 82300000
3A310064 92300000
7E717BD6 3E408045
62523DA4 1EB40E90
7E52AA14 92720000
EC010024 00000000
04040BBC 60000000
20C61DB8 16200D20
06C61DB8 00000014
1620151A 200C2024
20312026 2028202F
1A210300 00000000
020045D0 000F0000
E2000001 00000000

Again, let me know if you have any questions or problems

Edit: DOL mod available: http://smashboards.com/posts/18582669
 
Last edited:

zankyou

Smash Lord
Joined
Sep 12, 2014
Messages
1,055
Like Achilles, I just sent Wooggle a message on some efficiency tips. I'll paste the message here in case people would like to learn from it.


There are a few things we can do more efficiently, which I'll explain to you. Specifically, the bottom of the code after the end of the C2 code.
Code:
20C61DB8 16200D20
04C61DB8 1620151A
04C61DBC 200C2024
04C61DC0 20312026
04C61DC4 2028202F
04C61DC8 1A210300
040045D0 00000000
040045D4 00000000
040045D8 00000000
040045DC 00000000
040045E0 00000000
040045E4 00000000
040045E8 00000000
040045EC 00000000
The first thing I'd like to point out is that you should include an Endif at the end of the code, because otherwise the if condition can overflow into other codes that come after this one. This is an Endif:
e2000001 00000000

For the next bunch of 04 codes, we're going to use a "string write" instead, which is used to write longer strings to consecutive memory addresses. That looks like this:
Code:
06C61DB8 00000014
1620151A 200C2024
20312026 2028202F
1A210300 00000000
For the next bunch where you just need to write 0, instead of using 04 we'll use the opcode 00 or 02, which allows us to write the value to X consecutive addresses:
Code:
020045D0 000F0000
This writes '0000' to 0x800045D0, and then 0xF consecutive half-words after that.

Here are the results of our edit:
Code:
20C61DB8 16200D20
06C61DB8 00000014
1620151A 200C2024
20312026 2028202F
1A210300 00000000
020045D0 000F0000
E2000001 00000000
Even with the Endif, we cut the number of lines required in half. :)
I haven't tested this, but please feel free to do so. Also, here's the Gecko codetype documentation:
http://geckocodes.org/index.php?arsenal=1

edit: Hey, can we assemble a Skype group with all the ASM bros? It would be easier to answer questions and share useful stuff among each other, I think.
I always thought it would be cool if we had a melee hacking team kinda like PM. Maybe this could spark something like that.
 

Achilles1515

Smash Master
Joined
Jun 18, 2007
Messages
3,211
Location
Cincinnati / Columbus OH
I like how we have a pretty good blend of talents and interests right now.

ASM coding, external programs to help the general hacking process, textures, character mods.

I think we're in the golden age.

And I've got a small, but cool code for you guys later that you've all been wanting for awhile. Finally got around to actually attempting it. I've got meetings and **** at work all day, but I'll document it and post it later.
 
Last edited:
Joined
Oct 10, 2011
Messages
1,126
Location
Boise, ID
NNID
dansalvato
Disable Rumble When Controller is Unplugged
Code:
C2376BB0 00000008
3CC08045 60C6C380
38800000 38A0000A
39000000 7CE518AE
2C0700FF 40820008
7D0431AE 38840001
38A5000C 2C040004
4180FFE4 8081002C
60000000 00000000
In today's edition of "codes you didn't you know you wanted"... :)
 
Last edited:

Achilles1515

Smash Master
Joined
Jun 18, 2007
Messages
3,211
Location
Cincinnati / Columbus OH
Disable Rumble When Controller is Unplugged
Code:
C2376BB0 00000008
3CC08045 60C6C380
38800000 38A0000A
39000000 7CE518AE
2C0700FF 40820008
7D0431AE 38840001
38A5000C 2C040004
4180FFE4 8081002C
60000000 00000000
In today's edition of "codes you didn't you know you wanted"... :)
Very nice. Something I've never thought of.
 

DRGN

Technowizard
Moderator
Joined
Aug 20, 2005
Messages
2,179
Location
Sacramento, CA
Like Achilles, I just sent Wooggle a message on some efficiency tips. I'll paste the message here in case people would like to learn from it.


There are a few things we can do more efficiently, which I'll explain to you. Specifically, the bottom of the code after the end of the C2 code.
Code:
20C61DB8 16200D20
04C61DB8 1620151A
04C61DBC 200C2024
04C61DC0 20312026
04C61DC4 2028202F
04C61DC8 1A210300
040045D0 00000000
040045D4 00000000
040045D8 00000000
040045DC 00000000
040045E0 00000000
040045E4 00000000
040045E8 00000000
040045EC 00000000
The first thing I'd like to point out is that you should include an Endif at the end of the code, because otherwise the if condition can overflow into other codes that come after this one. This is an Endif:
e2000001 00000000

For the next bunch of 04 codes, we're going to use a "string write" instead, which is used to write longer strings to consecutive memory addresses. That looks like this:
Code:
06C61DB8 00000014
1620151A 200C2024
20312026 2028202F
1A210300 00000000
For the next bunch where you just need to write 0, instead of using 04 we'll use the opcode 00 or 02, which allows us to write the value to X consecutive addresses:
Code:
020045D0 000F0000
This writes '0000' to 0x800045D0, and then 0xF consecutive half-words after that.

Here are the results of our edit:
Code:
20C61DB8 16200D20
06C61DB8 00000014
1620151A 200C2024
20312026 2028202F
1A210300 00000000
020045D0 000F0000
E2000001 00000000
Even with the Endif, we cut the number of lines required in half. :)
I haven't tested this, but please feel free to do so. Also, here's the Gecko codetype documentation:
http://geckocodes.org/index.php?arsenal=1

edit: Hey, can we assemble a Skype group with all the ASM bros? It would be easier to answer questions and share useful stuff among each other, I think.
I'd be down to join a Skype group if you guys create one.
 

Cyjorg

tiny.cc/19XXTE
Joined
Nov 18, 2013
Messages
686
Location
Purdue University
Honest
Debug Menu Exits to Character Select Screen (1.02) [Achilles]
041b0a14 38600002

*Don't use this with 20XX 3.02

[COLLAPSE="Other Screen Values"]
From SypherPhoenix:

Tested for a bunch of different menu IDs on 1.00, idk if this lists exists elsewhere but I couldn't find it.


00 - Title Screen (Press Start)
01 - Reloads menu from language change? (brings to language change selection and saves)
02 - VS mode character select
03 - Classic Mode
04 - Adventure Mode
05 - All-Star Mode
06 - Debug Menu
07 - Master Sound Test
08 - Looks like regular VS mode, but actually cycles through many different character select screens
09 - Black Screen...?
0A - Camera Mode
0B - Trophy Gallery
0C - Trophy Lottery
0D - Trophy Collection
0E - Starts a match (with the debug menu configurations?)
0F - Target Test
10 - Super Sudden Death
11 - Invisible Melee
12 - Slo-Mo Melee
13 - Lightning Melee
14 - "A new foe has appeared!" (Ganon with sword, freezes if you try to progress, ID from debug?)
15 - Classic Mode trophy acquisition & credits (C.Falcon, ID from debug?)
16 - Adventure Mode trophy acquisition & credits (C.Falcon, ID from debug?)
17 - All-Star Mode trophy acquisition & credits (C.Falcon, ID from debug?)
18 - Intro video
19 - Cycles through Adventure Mode cinematics
1A - Character trophy acquisition (no credits) (uses All-Star trophy) (C.Falcon, ID from debug?)
1B - Tournament Menu
1C - Training Mode
1D - Tiny Melee
1E - Giant Melee
1F - Stamina Mode
20 - Home-Run Contest
21 - 10-Man Melee
22 - 100-Man Melee
23 - 3-Minute Melee
24 - 15-Minute Melee
25 - Endless Melee
26 - Cruel Melee
27 - "Enable Progressive Scan Display?"
28 - Plays Intro Video
29 - Memory Card Overwrite Confirmation
2A - Fixed-Camera Mode
2B - Loads Event Match 1 (Match ID from the debug menu?)
2C - Single-Button Mode

2D and the next few crashed so I didn't bother testing past that.
[/COLLAPSE]
Just in case you guys didn't catch on, you can alter the "Boot to CSS" code to boot wherever you want. Just change the last byte/last two numbers.
 

Achilles1515

Smash Master
Joined
Jun 18, 2007
Messages
3,211
Location
Cincinnati / Columbus OH
X/Y Axis Pause Camera Translation w/ C-Stick
Code:
C202CD9C 00000008
C0028434 89FD0001
3E00804C 62101FD4
1DEF0044 7E107A14
C1F00000 C21D0050
FE0F802A D21D0050
C1F00004 C21D0054
FE0F802A D21D0054
60000000 00000000
---> gif <---
(20XX hide H.U.D. toggle used as well)

ASM Notes:
Code:
************************************************
* X/Y Axis Pause Screen Translation w/ C-Stick *
************************************************

PAUSE Camera Offsets:
80452f2c - [8bit] player the pause camera is focused on
80452f2d - [8bit] player who paused the game.

80452f7c = x axis pause camera translation
80452f80 = y axis pause camera translation
80452f84 = z axis pause camera translation

(p1)
4c1fd4 = x c-stick axis
4c1fd8 = y c-stick axis
Axis values go from -1 to 1 [32-bit floats]

(p3)
4c2060 = y axis

...so each player's c-stick axis is 0x44 away from one another!

inject @ 8002cd9c
- function for storing pause camera offsets
-r29 = 80452f2c at this time

#default code line
lfs f0,-0x7BCC(rtoc)

#load player who paused game
lbz r15,1(r29)
lis r16,0x804c
ori r16,r16,0x1fd4
mulli r15,r15,0x44
add r16,r16,r15

#load c-stick x axis for this player
lfs f15,0(r16)
#load current x translation
lfs f16,0x50(r29)
#add c-stick value to x translation
fadd f16,f15,f16
stfs f16,0x50(r29)

#load c-stick y axis
lfs f15,0x4(r16)
#load current y translation
lfs f16,0x54(r29)
#add c-stick y value to y translation
fadd f16,f15,f16
stfs f16,0x54(r29)
EDIT: Apparently this code freezes on console.
 
Last edited:
Top Bottom