UnclePunch
Smash Ace
- Joined
- Nov 9, 2014
- Messages
- 673
Code:
$Hold A+B for Salty Runback + Hold A+X for Random Stage + Skip Result Screen [UnclePunch]
C21B15E4 00000016
3BC30000 9421FFBC
BE810008 7C0802A6
90010040 7CBC2B78
3CA08046 60A5B108
38800000 80650000
5460018D 41820014
546001CF 4182000C
38800002 48000058
5460014B 4182003C
3DC08025 61CE99EC
7DC903A6 4E800421
3C80803F 608406D0
1C63001C 7C841A14
8864000B 3C808045
6084AC64 B0640002
38800002 48000018
38840001 38A5000C
2C040004 4180FF98
38800000 7FC3F378
7F85E378 80010040
7C0803A6 BA810008
38210044 00000000
-classic mode CSS -> match (holding AB causes you to jump to stage 2)
-adventure mode CSS -> match (holding AB causes you to jump to stage 2)
-all star CSS -> match (holding AB crashes)
-any special melee match -> CSS (holding AB causes ganon challenger screen to appear, crashes after pressing start)
-VS SSS -> CSS (cannot replicate with only 1 controller, holding AB on another controller while returning to CSS from another controller causes the game to crash)
These issues are very minor and hard to come by but I decided to make a code that injects into the "SceneLeave_Melee" @ 801b15c8. This function runs only when leaving a VS match and stores the result screen minor scene ID with a li codeline. This code checks for player's inputs and decides the next scene based on what they are.
Code:
.macro branchl reg, address
lis \reg, \address @h
ori \reg,\reg,\address @l
mtctr \reg
bctrl
.endm
.macro load reg, address
lis \reg, \address @h
ori \reg, \reg, \address @l
.endm
.macro backup
stwu r1,-68(r1) # make space for 12 registers
stmw r20,8(r1) # push r20-r31 onto the stack
mflr r0
stw r0,64(sp)
.endm
.macro restore
lwz r0,64(sp)
mtlr r0
lmw r20,8(r1) # pop r20-r31 off the stack
addi r1,r1,68 # release the space
.endm
addi r30, r3, 0
backup
mr r28,r5
#START INPUT LOOP CHECK
load r5,0x8046B108
li r4,0x0
loop:
lwz r3,0x0(r5) #get inputs
rlwinm. r0, r3, 0, 6, 6 #check A
beq- checkZ
rlwinm. r0, r3, 0, 7, 7 #check B
beq- checkZ
runback:
li r4,0x2 #reload match scene
b exit
checkZ:
rlwinm. r0, r3, 0, 5, 5 #check X
beq increment
randomStage:
branchl r14,0x802599ec #get random stage ID
#convert SSS ID to internal stage ID
load r4,0x803f06d0 #load stage ID table
mulli r3, r3, 28 #stage ID to offset
add r4,r4,r3 #add to start of table
lbz r3,0xB(r4) #get internal stage ID
load r4,0x8045ac64 #load VS match struct
sth r3,0x2(r4) #store stage half to struct
li r4,0x2 #reload match scene
b exit
increment:
addi r4,r4,1
cmpwi r4,0x4
blt loop
li r4,0x0 #load CSS
exit:
mr r3,r30
mr r5,r28
restore
Last edited: