Forced and Fixed Neutral Spawn Hack (Singles and Doubles)

Cyjorg

tiny.cc/19XXTE
Joined
Nov 18, 2013
Messages
686
Location
Purdue University
#1

The Neutral Spawn code now works in Singles and Doubles. I also modified the spawns for more neutralness.
[collapse="Doubles Spawn Point Change"]ORIGINAL
. . . . --S3--
--S1-- . . . --S2--
______S4_____

NEW
. . . . .----
--S1-- . . --S2--
_S3_____S4__
[/collapse]
[COLLAPSE="20XX Neutral Spawn for Singles and Doubles"]
Code:
20XX Neutral Spawn for Singles and Doubles (1.02) [Achilles, Jorgasms]

C2263058 00000030
39E00000 3A000000
3E408048 625307FD
91F206D8 91F206DC
8A3207C8 625206D7
2C110001 4182004C
39EF0001 8E930024
2C140003 4182000C
9A130004 3A100001
2C0F0004 41A0FFE4
48000130 39E00000
3A0000FF 3E408048
62520801 39EF0001
9E120024 2C0F0004
41A0FFF4 4800010C
3E208048 623106DC
39EF0001 3A520001
8E930024 89D30008
2C140003 41A2FFC0
2C0E0000 40820010
3A000000 8A910000
48000024 2C0E0001
40820010 3A000001
8E910001 48000010
3A000002 8E910002
48000004 3A940001
2C140003 40A0FF80
9A910000 9A120000
2C0F0004 41A0FF94
39E00000 3E208048
623106DB 3AA00000
39EF0001 8E910001
2C140001 40800008
48000010 3AB50001
2C150003 40A0FF40
2C0F0003 41A0FFDC
39E00000 3A310127
39C000FF 3A8000FF
39EF0001 8E110024
2C0E00FF 40820010
7E128378 39C00000
4800002C 7C109000
4082000C 39C00003
4800001C 2C1400FF
40820010 39C00001
3A800000 48000008
39C00002 99D1FFFC
2C0F0004 41A0FFB4
38840001 00000000
C21C0A48 0000001A
3DE0801B 61EFFFA8
7C0F6000 418200BC
3DC08048 A1CE0686
3DE08049 61EFED70
81EF0000 2C0E001F
4082001C 3E00C242
3E204242 3E404230
3A600000 960F0598
4800002C 2C0E001C
40820040 3E00C23A
62106666 3E20423D
62318E70 3E404214
3A600000 960F0854
48000004 924F0004
962F0040 924F0004
962F0040 926F0004
960F0040 926F0004
2C0E0020 40820014
3A000041 9E0F0650
3A0000C1 9A0F0040
2C0E0008 40820024
3E004270 3E20C270
3A400000 39EF4748
960F4748 924F0004
962F0040 924F0004
7D8803A6 00000000
[/COLLAPSE]

[collapse="Neutral Spawn Gecko Code - OBSOLETE"]
Code:
C21A5684 00000035
3E408048 3A5207C8
8A720000 3E408048
3A520821 3A800000
3AA00000 3AC00001
3AE00002 3B000003
2C130000 418200A0
8A720008 1E731000
7E93A214 8A72002C
1E730100 7E93A214
8A720050 1E730010
7E93A214 8A720074
7E93A214 3A520004
2C141100 4182000C
2C140011 40820018
9AB20000 9B120024
9AD20048 9AF2006C
4800011C 2C141010
4182000C 2C140101
40820018 9AB20000
9AD20024 9B120048
9AF2006C 480000F8
2C141001 4182000C
2C140110 408200D4
9AB20000 9AD20024
9AF20048 9B12006C
480000D4 8A720000
2C130003 41820008
3A801000 8A720024
2C130003 41820008
3A940100 8A720048
2C130003 41820008
3A940010 8A72006C
2C130003 41820008
3A940001 3A520004
2C141010 40820010
9AB20000 9AD20048
4800007C 2C141001
40820010 9AB20000
9AD2006C 48000068
2C140110 40820010
9AB20024 9AD20048
48000054 2C140101
40820010 9AB20024
9AD2006C 48000040
2C140011 40820010
9AB20048 9AD2006C
4800002C 2C141100
40820010 9AB20000
9AD20024 48000018
3AA000FF 9AB20000
9AB20024 9AB20048
9AB2006C 90010004
60000000 00000000
[/collapse]
I do have a couple of things I'd like to mention.

1. For this code to be of any use, you will need edited versions of the maps. You can find those here. If you're not familiar with replacing files, you can find a nice tutorial here. For the 20XX pack, but it's the same idea.

2. If you want to apply these "new spawns" to a stage with a custom texture, I've included the changed values in the spoiler bellow. You'll need a hex editor for this. Message me if you have any problems with this, this is taken from quick notes I made.
[collapse="Stage Spawns Offsets - OBSOLETE"]
Code:
At (offset in hex)
Original value/value to replace >> new value
At (offset in hex)
Original value/value to replace >> new value
At (offset in hex)
Original value/value to replace >> new value
Code:
At 0x13b78
00 00 00 00 40 E3 0C BB >> C2 3A 66 66 42 14 E2 D1
At 0x13bb8
C2 3A 66 66 42 14 E2 D1 >> 42 3D 8E 70 42 15 49 38
At 0x13bf8
00 00 00 00 42 6A 16 04 >> 42 3D 8E 70 00 00 00 00
At 0x13c38
42 3D 8E 70 42 15 49 38 >>  C2 3A 66 66 00 00 00 00
Code:
At 0x3463c
00 00 00 00 41 20 00 00 >> C2 42 00 00 42 30 00 00
At 0x3467c
00 00 00 00 42 9C 00 00 >> 42 42 00 00 42 30 00 00
At 0x346bc
C2 42 00 00 42 30 00 00 >> 42 42 00 00 00 00 00 00
At  0x346fc
42 42 00 00 42 30 00 00 >> C2 42 00 00 00 00 00 00
Code:
At 0x3332c
00 00 00 00 42 86 00 00 >> 42 70 00 00 00 00 00 00
At 0x3336c
00 00 00 00 40 E0 00 00 >> C2 70 00 00 00 00 00 00
Code:
At 0x522a0
C1 >> 41
At 0x5222e0
41 >> C1
Code:
At 0x9e84
C1 A8 00 00 00 00 00 00 >> 42 68 00 00 40 E0 00 00
At 0x9e04
42 68 00 00 40 E0 00 00 >> C1 A8 00 00 00 00 00 00
[/collapse]

3. Only meant for tournament legal stages (Battlefield, FD, Dreamland, Yoshi's Story, Kong Jungle 64 Pokemon Stadium, and Fountain of Dreams (singles only)). However, because of the way the code works, the spawns are "swapped" but not moved.

4. In order to keep the code shorter, the logic for Red Team vs Green Team and Blue Team vs. Green Team was not included. This means the game will load FFA spawns whenever green team. I do NOT plan on changing this. In order to prevent people from playing with Green Team, I wrote a code that disables green team. It is completely optional.
[collapse="Disable Green Team Gecko Code"]
Code:
C2261BE0 00000003
2C040002 40820008
3884FFFE 9899000A
60000000 00000000
[/collapse]

5. FFA spawns will also be loaded for any 1v3s.

6. Fountain of Dreams was not edited to fit the new neutral spawn system solely because it's not a legal tournament stage for doubles (and I'm lazy).

7. This should totally be part of the 20xx hack pack. Just saying.
 
Last edited by a moderator:

TerryJ

Smash Journeyman
Joined
Apr 12, 2010
Messages
481
Location
BEST COAST, WA
3DS FC
1337-1337-1337
NNID
1337-1337-1337
#2
This is some seriously good work! I can't wait for memory card hacking to be a thing, this will eventually be used at every tournament! I can feeeel it.
 

Kou

Smash Apprentice
Joined
Nov 22, 2011
Messages
198
Location
Japan
#3
so awesome!!

Do you know the difference of vertical position right after game's start among P1, P2, P3 and P4?
This is because of bigger port's spawing is later than smaller.
So for example, P3 and P4 is in the air right after game's start.

It would be more awesome if it can be fixed this inequality.
 

Cyjorg

tiny.cc/19XXTE
Joined
Nov 18, 2013
Messages
686
Location
Purdue University
#4
so awesome!!

Do you know the difference of vertical position right after game's start among P1, P2, P3 and P4?
This is because of bigger port's spawing is later than smaller.
So for example, P3 and P4 is in the air right after game's start.

It would be more awesome if it can be fixed this inequality.
I was aware they spawned at different times but I did not tamper with it just because certain characters fall faster anyways.

Edit: Looked into some more and gave, fortunately, P1 and P4 (fist and last) are same team while P2 and P3 (second and third) are on the same team.
 
Last edited:

Achilles1515

Smash Master
Joined
Jun 18, 2007
Messages
3,211
Location
Cincinnati / Columbus OH
#6
Okay, I think I've done it.
This is some seriously good work! I can't wait for memory card hacking to be a thing, this will eventually be used at every tournament! I can feeeel it.
You bring up a good point. Not only should this be in 20XX, but if we ever do the memory card hack then it needs to be compliant with the limitations set by doing so. One of which is not having the ability to overwrite internal files [stage files - specifically relating to this code].

So...throughout the week I spent some time investigating the necessary details for making this code 20XX memory card compatible. More specifically, finding out how the game loads/reads spawn points, finding an injection point to modify spawn point values that was after they had been loaded into RAM but before the match started, and then writing code to change spawn locations to neutral values for specific stages and also code for the CSS to give players the correct spawn locations for singles/doubles.

It ended up being quite a little project, but I learned some important things and was tested quite a bit with the logic relating to designating neutral doubles spawn points. And everyone loves a good challenge, right?.....

Gecko Code:
[COLLAPSE="20XX Neutral Spawn for Singles and Doubles"]
Code:
20XX Neutral Spawn for Singles and Doubles (1.02) [Achilles, Jorgasms]

C2263058 00000030
39E00000 3A000000
3E408048 625307FD
91F206D8 91F206DC
8A3207C8 625206D7
2C110001 4182004C
39EF0001 8E930024
2C140003 4182000C
9A130004 3A100001
2C0F0004 41A0FFE4
48000130 39E00000
3A0000FF 3E408048
62520801 39EF0001
9E120024 2C0F0004
41A0FFF4 4800010C
3E208048 623106DC
39EF0001 3A520001
8E930024 89D30008
2C140003 41A2FFC0
2C0E0000 40820010
3A000000 8A910000
48000024 2C0E0001
40820010 3A000001
8E910001 48000010
3A000002 8E910002
48000004 3A940001
2C140003 40A0FF80
9A910000 9A120000
2C0F0004 41A0FF94
39E00000 3E208048
623106DB 3AA00000
39EF0001 8E910001
2C140001 40800008
48000010 3AB50001
2C150003 40A0FF40
2C0F0003 41A0FFDC
39E00000 3A310127
39C000FF 3A8000FF
39EF0001 8E110024
2C0E00FF 40820010
7E128378 39C00000
4800002C 7C109000
4082000C 39C00003
4800001C 2C1400FF
40820010 39C00001
3A800000 48000008
39C00002 99D1FFFC
2C0F0004 41A0FFB4
38840001 00000000
C21C0A48 00000018
3DC08048 A1CE0686
3DE08049 61EFED70
81EF0000 2C0E001F
4082001C 3E00C242
3E204242 3E404230
3A600000 960F0598
4800002C 2C0E001C
40820040 3E00C23A
62106666 3E20423D
62318E70 3E404214
3A600000 960F0854
48000004 924F0004
962F0040 924F0004
962F0040 926F0004
960F0040 926F0004
2C0E0020 40820014
3A000041 9E0F0650
3A0000C1 9A0F0040
2C0E0008 40820024
3E004270 3E20C270
3A400000 39EF4748
960F4748 924F0004
962F0040 924F0004
7D8803A6 00000000
[/COLLAPSE]
  • Neutral spawn locations for all tournament legal stages.
    • Except DK 64....for some reason it seems to load stage spawn point locations in a different manner than the other stages...so I said f**k this stage. It's just not played on enough to warrant the work to figure that stuff out.
  • No stage file modifications necessary!
  • Any team color combination will work for 2v2.
All the code is authored by me, but I used Jorgasms' 32-bit floating point hex values that he used for creating neutral spawn points in the stage DAT files.

Please test. If it checks out as working properly, all that is left to do is add a check for a Debug Menu toggle at the beginning of the code (and find space in the DOL to insert this long code....). When disabled from the Debug Menu, the spawn locations will be the same as in vanilla Melee.

I never said this earlier, but I'm very impressed with the work you have done so far, Jorgasms. I know you've only just started Melee hacking as well. The codes you've made provide fantastic little touches to make the game more polished, pristine, and competitive. Delving into some stage hacking is also impressive. I'm looking forward to whatever is next!
 
Last edited:

Cyjorg

tiny.cc/19XXTE
Joined
Nov 18, 2013
Messages
686
Location
Purdue University
#7
Okay, I think I've done it.

You bring up a good point. Not only should this be in 20XX, but if we ever do the memory card hack then it needs to be compliant with the limitations set by doing so. One of which is not having the ability to overwrite internal files [stage files - specifically relating to this code].

So...throughout the week I spent some time investigating the necessary details for making this code 20XX memory card compatible. More specifically, finding out how the game loads/reads spawn points, finding an injection point to modify spawn point values that was after they had been loaded into RAM but before the match started, and then writing code to change spawn locations to neutral values for specific stages and also code for the CSS to give players the correct spawn locations for singles/doubles.

It ended up being quite a little project, but I learned some important things and was tested quite a bit with the logic relating to designating neutral doubles spawn points. And everyone loves a good challenge, right?.....

Gecko Code:
[COLLAPSE="20XX Neutral Spawn for Singles and Doubles"]
Code:
20XX Neutral Spawn for Singles and Doubles (1.02) [Achilles, Jorgasms]

C2263058 00000030
39E00000 3A000000
3E408048 625307FD
91F206D8 91F206DC
8A3207C8 625206D7
2C110001 4182004C
39EF0001 8E930024
2C140003 4182000C
9A130004 3A100001
2C0F0004 41A0FFE4
48000130 39E00000
3A0000FF 3E408048
62520801 39EF0001
9E120024 2C0F0004
41A0FFF4 4800010C
3E208048 623106DC
39EF0001 3A520001
8E930024 89D30008
2C140003 41A2FFC0
2C0E0000 40820010
3A000000 8A910000
48000024 2C0E0001
40820010 3A000001
8E910001 48000010
3A000002 8E910002
48000004 3A940001
2C140003 40A0FF80
9A910000 9A120000
2C0F0004 41A0FF94
39E00000 3E208048
623106DB 3AA00000
39EF0001 8E910001
2C140001 40800008
48000010 3AB50001
2C150003 40A0FF40
2C0F0003 41A0FFDC
39E00000 3A310127
39C000FF 3A8000FF
39EF0001 8E110024
2C0E00FF 40820010
7E128378 39C00000
4800002C 7C109000
4082000C 39C00003
4800001C 2C1400FF
40820010 39C00001
3A800000 48000008
39C00002 99D1FFFC
2C0F0004 41A0FFB4
38840001 00000000
C21C0A48 00000018
3DC08048 A1CE0686
3DE08049 61EFED70
81EF0000 2C0E001F
4082001C 3E00C242
3E204242 3E404230
3A600000 960F0598
4800002C 2C0E001C
40820040 3E00C23A
62106666 3E20423D
62318E70 3E404214
3A600000 960F0854
48000004 924F0004
962F0040 924F0004
962F0040 926F0004
960F0040 926F0004
2C0E0020 40820014
3A000041 9E0F0650
3A0000C1 9A0F0040
2C0E0008 40820024
3E004270 3E20C270
3A400000 39EF4748
960F4748 924F0004
962F0040 924F0004
7D8803A6 00000000
[/COLLAPSE]
  • Neutral spawn locations for all tournament legal stages.
    • Except DK 64....for some reason it seems to load stage spawn point locations in a different manner than the other stages...so I said f**k this stage. It's just not played on enough to warrant the work to figure that stuff out.
  • No stage file modifications necessary!
  • Any team color combination will work for 2v2.
All the code is authored by me, but I used Jorgasms' 32-bit floating point hex values that he used for creating neutral spawn points in the stage DAT files.

Please test. If it checks out as working properly, all that is left to do is add a check for a Debug Menu toggle at the beginning of the code (and find space in the DOL to insert this long code....). When disabled from the Debug Menu, the spawn locations will be the same as in vanilla Melee.

I never said this earlier, but I'm very impressed with the work you have done so far, Jorgasms. I know you've only just started Melee hacking as well. The codes you've made provide fantastic little touches to make the game more polished, pristine, and competitive. Delving into some stage hacking is also impressive. I'm looking forward to whatever is next!
Amazing work, you did exactly what I was finding myself to lazy to do. Updated the post.

Also, does this mean the memory card hack will not be able to load custom textures? I'd hate to see your extra costume code and custom stage selection screen go to waste.
 

TerryJ

Smash Journeyman
Joined
Apr 12, 2010
Messages
481
Location
BEST COAST, WA
3DS FC
1337-1337-1337
NNID
1337-1337-1337
#8
Amazing work, you did exactly what I was finding myself to lazy to do. Updated the post.

Also, does this mean the memory card hack will not be able to load custom textures? I'd hate to see your extra costume code and custom stage selection screen go to waste.
It's still possible to do (assuming it happens in the first place) it's just that he's going to have to go about it a different way. Currently files are replaced in the ISO allowing for them to be used in the first place, but for the memory card hack we won't have access to that so he's going to have to figure out how to call upon each replaced stage, texture etc without modifying the original ISO. Considering almost everything done up until this point has been either a Gecko code or .dol code injections it's going to take some rewriting of most of his work.

At least, that's what I understand of it. Correct me if I'm wrong.
 
Joined
Aug 20, 2006
Messages
800
Location
Brooklyn, NY
#12
Are you using achilles' 20xx pack version or mine?
achilles 20XX version. i actually just thought that it was probably freezing on the result screen, and found the result screen skip code fixed it. then i found achilles post.

@ Achilles1515 Achilles1515 im about to install a codeset on a bunch of wiis. do you have the revised version of the code, or should i just install skip results as well.

edit: don't worry about it. ill just use the skip results since theres a variant that displays results, i see no reason not to use it in tourney
 
Last edited:

Achilles1515

Smash Master
Joined
Jun 18, 2007
Messages
3,211
Location
Cincinnati / Columbus OH
#14
achilles 20XX version. i actually just thought that it was probably freezing on the result screen, and found the result screen skip code fixed it. then i found achilles post.

@ Achilles1515 Achilles1515 im about to install a codeset on a bunch of wiis. do you have the revised version of the code, or should i just install skip results as well.

edit: don't worry about it. ill just use the skip results since theres a variant that displays results, i see no reason not to use it in tourney
Hold on
 

Achilles1515

Smash Master
Joined
Jun 18, 2007
Messages
3,211
Location
Cincinnati / Columbus OH
#15
achilles 20XX version. i actually just thought that it was probably freezing on the result screen, and found the result screen skip code fixed it. then i found achilles post.

@ Achilles1515 Achilles1515 im about to install a codeset on a bunch of wiis. do you have the revised version of the code, or should i just install skip results as well.

edit: don't worry about it. ill just use the skip results since theres a variant that displays results, i see no reason not to use it in tourney
It should be fixed on the main post now. Test and make sure and let me know.
 

Anutim

Smash Apprentice
Joined
Oct 22, 2013
Messages
175
#17
Yo, I converted this code to PAL some time ago, but it has been pointed out to me that when in teams, it doesn't automatically use the right ports spawns (only p1/p4 vs p2/p3 work correctly), the rest of the code works fine. I have looked through the code however, and not sure what I did wrong, could anyone help me out? Achilles1515 Achilles1515 Cyjorg Cyjorg
What parts in the code chooses what port combination has which spawns?

C2263804 00000030
39E00000 3A000000
3E408047 62531605
91F206D8 91F206DC
8A3207C8 625206D7
2C110001 4182004C
39EF0001 8E930024
2C140003 4182000C
9A130004 3A100001
2C0F0004 41A0FFE4
48000130 39E00000
3A0000FF 3E408047
62521609 39EF0001
9E120024 2C0F0004
41A0FFF4 4800010C
3E208047 623114E3
39EF0001 3A520001
8E930024 89D30008
2C140003 41A2FFC0
2C0E0000 40820010
3A000000 8A910000
48000024 2C0E0001
40820010 3A000001
8E910001 48000010
3A000002 8E910002
48000004 3A940001
2C140003 40A0FF80
9A910000 9A120000
2C0F0004 41A0FF94
39E00000 3E208047
623114E3 3AA00000
39EF0001 8E910001
2C140001 40800008
48000010 3AB50001
2C150003 40A0FF40
2C0F0003 41A0FFDC
39E00000 3A310127
39C000FF 3A8000FF
39EF0001 8E110024
2C0E00FF 40820010
7E128378 39C00000
4800002C 7C109000
4082000C 39C00003
4800001C 2C1400FF
40820010 39C00001
3A800000 48000008
39C00002 99D1FFFC
2C0F0004 41A0FFB4
38840001 00000000

C21C266C 0000001A
3DE0801C 61EF1BCC
7C0F6000 418200BC
3DC08047 A1CE148E
3DE08048 61EFFDF8
81EF0000 2C0E001F
4082001C 3E00C242
3E204242 3E404230
3A600000 960F0598
4800002C 2C0E001C
40820040 3E00C23A
62106666 3E20423D
62318E70 3E404214
3A600000 960F0854
48000004 924F0004
962F0040 924F0004
962F0040 926F0004
960F0040 926F0004
2C0E0020 40820014
3A000041 9E0F0650
3A0000C1 9A0F0040
2C0E0008 40820024
3E004270 3E20C270
3A400000 39EF4748
960F4748 924F0004
962F0040 924F0004
7D8803A6 00000000
 

Cyjorg

tiny.cc/19XXTE
Joined
Nov 18, 2013
Messages
686
Location
Purdue University
#18
Yo, I converted this code to PAL some time ago, but it has been pointed out to me that when in teams, it doesn't automatically use the right ports spawns (only p1/p4 vs p2/p3 work correctly), the rest of the code works fine. I have looked through the code however, and not sure what I did wrong, could anyone help me out? Achilles1515 Achilles1515 Cyjorg Cyjorg
What parts in the code chooses what port combination has which spawns?

C2263804 00000030
39E00000 3A000000
3E408047 62531605
91F206D8 91F206DC
8A3207C8 625206D7
2C110001 4182004C
39EF0001 8E930024
2C140003 4182000C
9A130004 3A100001
2C0F0004 41A0FFE4
48000130 39E00000
3A0000FF 3E408047
62521609 39EF0001
9E120024 2C0F0004
41A0FFF4 4800010C
3E208047 623114E3
39EF0001 3A520001
8E930024 89D30008
2C140003 41A2FFC0
2C0E0000 40820010
3A000000 8A910000
48000024 2C0E0001
40820010 3A000001
8E910001 48000010
3A000002 8E910002
48000004 3A940001
2C140003 40A0FF80
9A910000 9A120000
2C0F0004 41A0FF94
39E00000 3E208047
623114E3 3AA00000
39EF0001 8E910001
2C140001 40800008
48000010 3AB50001
2C150003 40A0FF40
2C0F0003 41A0FFDC
39E00000 3A310127
39C000FF 3A8000FF
39EF0001 8E110024
2C0E00FF 40820010
7E128378 39C00000
4800002C 7C109000
4082000C 39C00003
4800001C 2C1400FF
40820010 39C00001
3A800000 48000008
39C00002 99D1FFFC
2C0F0004 41A0FFB4
38840001 00000000

C21C266C 0000001A
3DE0801C 61EF1BCC
7C0F6000 418200BC
3DC08047 A1CE148E
3DE08048 61EFFDF8
81EF0000 2C0E001F
4082001C 3E00C242
3E204242 3E404230
3A600000 960F0598
4800002C 2C0E001C
40820040 3E00C23A
62106666 3E20423D
62318E70 3E404214
3A600000 960F0854
48000004 924F0004
962F0040 924F0004
962F0040 926F0004
960F0040 926F0004
2C0E0020 40820014
3A000041 9E0F0650
3A0000C1 9A0F0040
2C0E0008 40820024
3E004270 3E20C270
3A400000 39EF4748
960F4748 924F0004
962F0040 924F0004
7D8803A6 00000000
I wrote that code like 2 years ago and it required stage edits. Achilles probably has a better idea of the functions
 
Top