• 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!

Completed Brawl-Style B Reverse 1.1

UnclePunch

Smash Ace
Joined
Nov 9, 2014
Messages
673


Code:
$Brawl-style B Reverse 1.1 [UnclePunch]
C2068690 00000002
3800FFFE 90062294
887F000C 00000000
C2069B58 00000002
901A2294 90010050
60000000 00000000
C206B8AC 00000023
89DF2073 280E0011
41A00108 280E0014
41A10100 89DF2073
89FF2297 7C0E7800
418200F0 7C0802A6
480000D5 7DC802A6
7C0803A6 81FF0004
3A000000 2C0F0008
4180002C 39EFFFF8
3A100004 2C0F0008
4180001C 39EFFFF8
3A100004 2C0F0008
4180000C 39EFFFF8
3A100004 7E10702E
5610203E 280F0000
39EFFFFF 4181FFF4
7210000F 89FF2073
39EFFFEF 560E07FE
5610F87E 280F0000
39EFFFFF 4181FFF0
2C0E0001 4082006C
81DF0894 3DE040A0
7C0E7800 4181005C
C1DF0080 89DF065D
81FF002C 3E000000
7C0F8000 41800010
2C0E0004 41820014
48000038 2C0E0008
41820008 4800002C
FDC07050 D1DF0080
38000001 901F18F4
48000018 4E800021
33B3B333 B3BBBB92
B3B3333B 3BF00000
4E800021 00000000
C2068690 00000002
3800FFFE 90062294
887F000C 00000000
C2069B58 00000002
901A2294 90010050
60000000 00000000
C206B8AC 00000023
89DF2073 280E0011
41A00108 280E0014
41A10100 89DF2073
89FF2297 7C0E7800
418200F0 7C0802A6
480000D5 7DC802A6
7C0803A6 81FF0004
3A000000 2C0F0008
4180002C 39EFFFF8
3A100004 2C0F0008
4180001C 39EFFFF8
3A100004 2C0F0008
4180000C 39EFFFF8
3A100004 7E10702E
5610203E 280F0000
39EFFFFF 4181FFF4
7210000F 89FF2073
39EFFFEF 560E07FE
5610F87E 280F0000
39EFFFFF 4181FFF0
2C0E0001 4082006C
81DF0894 3DE040A0
7C0E7800 4181005C
C1DF0080 89DF065D
81FF002C 3E000000
7C0F8000 41800010
2C0E0004 41820014
48000038 2C0E0008
41820008 4800002C
FDC07050 D1DF0080
38000001 901F18F4
48000018 4E800021
33B3B333 B3BBBB92
B3B3333B 3BF00000
4E800021 00000000

Code:
inject @ 80068690 (init playerblock variables)
.set player,6

#initialize variable to 0xFFFFFFFE
li r0,-2
stw r0,0x2294(player)

exit:
lbz    r3, 0x000C (r31)


____________________________________________________________________________


inject @ 80069b58 (action state change when previous move logic)

#store old move logic to 0x2294
stw r0,0x2294(r26)

exit:
stw    r0, 0x0050 (sp)


___________________________________________________________________________



inject @ 8006B8AC (physics blrl)

.set player,31


checkIfSpecialMove:
lbz r14, 0x2073(player)
cmplwi r14, 0x11
blt+ done
cmplwi r14, 0x14         #if move ID is between 0x11 and 0x14, it's a special move
bgt+ done

checkIfNewAS:
lbz    r14, 0x2073 (player)            #current move logic
lbz    r15, 0x2297 (player)            #previous move logic
cmpw r14,r15                #if equal, considered the same move
beq done

checkIfMoveIsBReversible:
mflr r0                #backup LR for a sec
bl reverseFlags                #get table addres in LR
mflr r14                #get table address in r14
mtlr r0                #put LR back


getBReverseBit:             
lwz r15,0x4(player)
li r16,0
cmpwi r15,0x8
blt getWord
subi r15,r15,0x8
addi r16,r16,4
cmpwi r15,0x8
blt getWord
subi r15,r15,0x8
addi r16,r16,4
cmpwi r15,0x8
blt getWord
subi r15,r15,0x8
addi r16,r16,4

getWord:
lwzx r16,r16,r14 #gets byte at table start + byte counter
#rlwinm r16,r16,24,0,31

LOOP:            #rotate to get bit in the highest spot in the register
rlwinm r16,r16,4,0,31
cmplwi r15,0
subi r15,r15,1
bgt LOOP

andi. r16,r16,0x000f            #once bit is in the far right, nuke the rest

lbz r15, 0x2073(player)            #get current move type
subi r15,r15,0x11            #0 index the special move

LOOP2:            #rotate through the player's 4 bits to get the one corresponding to the special move used
rlwinm r14,r16,0,31,31         
srwi r16,r16,1
cmplwi r15,0
subi r15,r15,1
bgt LOOP2

cmpwi r14,0x1            #check if move is reversible
bne done


checkifBeforeFrame5:
lwz r14,0x894(player) #get frame number
lis r15,0x40a0
cmpw r14,r15
bgt done

startDirectionSwapCheck:
lfs f14,0x80(player)        #get velocity
lbz r14,0x65d(player) #get direction input
lwz r15,0x2c(player)        #get facing direction

checkifFacingRight:
lis r16,0x0
cmpw r15,r16
blt facingLeft

facingRight:
cmpwi r14,0x4
beq changeDirectionAndReverseXVelocity
b done

facingLeft:
cmpwi r14,0x8
beq changeDirectionAndReverseXVelocity
b done

changeDirectionAndReverseXVelocity:
fneg    f14,f14
stfs f14,0x80(player)            #store reversed velocity

li r0,1
stw r0,0x18f4(player)            #store turn flag
b done


####TABLE####

#bit 0 = neutral B
#bit 1 = side B
#bit 2 = up B
#bit 3 = down B

reverseFlags:         #each character is assinged 4 bits in this "table"
blrl
.long 0x33B3B333
.long 0xB3BBBB92
.long 0xB3B3333B
.long 0x3BF00000

#############


done:
blrl
 
Last edited:

Gehis514

Smash Apprentice
Joined
Jul 25, 2015
Messages
119
Switch FC
SW 4004 9260 8249
The codes you've been making have been amazing, it makes the game fresh and new when playing at home :p do you have a set list of codes that you try to make or are you open to suggestions for more brawl/project m esque qualities?
 

UnclePunch

Smash Ace
Joined
Nov 9, 2014
Messages
673
The codes you've been making have been amazing, it makes the game fresh and new when playing at home :p do you have a set list of codes that you try to make or are you open to suggestions for more brawl/project m esque qualities?
It probably seems like I like making Melee play like Brawl but I actually just enjoy the challenge of porting the newer stuff back to Melee. You can send whatever suggestions you have and if I think it seems like fun/challenging I'll most likely make it.
 

Gehis514

Smash Apprentice
Joined
Jul 25, 2015
Messages
119
Switch FC
SW 4004 9260 8249
It probably seems like I like making Melee play like Brawl but I actually just enjoy the challenge of porting the newer stuff back to Melee. You can send whatever suggestions you have and if I think it seems like fun/challenging I'll most likely make it.
Hey if you're having a good time doing it then I'm all for it. Two suggestions that immediately come to mind are the ability to Reverse Aerial Rush (the ability to cancel the turnaround animation during a dash with a jump so you keep the momentum of that dash while facing the other direction, good for approaching with back airs), and have it so the volume of the background music lowers itself after some time of inactivity. If these seem interesting to you, then it'd be great to see if you can accomplish it
 
Last edited:

Mr Snak3_

Smash Apprentice
Joined
Mar 29, 2016
Messages
75
Hey if you're having a good time doing it then I'm all for it. Two suggestions that immediately come to mind are the ability to Reverse Aerial Rush (the ability to cancel the turnaround animation during a dash with a jump so you keep the momentum of that dash while facing the other direction, good for approaching with back airs), and have it so the volume of the background music lowers itself after some time of inactivity. If these seem interesting to you, then it'd be great to see if you can accomplish it
RAR already has a gecko code. dunno about the other one
 

UnclePunch

Smash Ace
Joined
Nov 9, 2014
Messages
673
Apparently I never uploaded the update for this I made a while back. Just updated the OP with an updated code that includes a check to more accurately detect a special move even when it has multiple action states associated with it.
 

rockandroll805

Smash Rookie
Joined
Mar 14, 2017
Messages
7
It looks like when you updated your post and edited it, you added on the new code on top of the old code. If you want to see what I mean just ctrl + F "C2068690" and it comes up twice. This tripped me up because I wanted to try this mod and was getting an error when I was trying to add it as a DOL mod saying I was overwriting the same location
 
Top Bottom