• 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 Everyone Can Float v1.1

UnclePunch

Smash Ace
Joined
Nov 9, 2014
Messages
673

Pretty much what the title says. A rewrite of Peach's float code made to work for all characters. All float tech should be faithfully recreated including:

-float cancels
-down+XY / hold up/XY at peak of jump to initiate float
-touching ground/respawning refreshes float
-float physics
-float aerials have float physics until the timer runs out

Code:
$Everyone Can Float v1.1 [UnclePunch]
0406992c 60000000
04069934 981A2217
C211BA54 00000012
9421FF00 BE810008
7C0802A6 900100FC                                   
38A00000 808DAEB4
80C3002C C0040088
C0260624 FC000050
FC010040 4C401382
40820014 8006065C
5400052B 41820008
38A00001 88062217
2C000000 41820028
2C050000 41820020
38800001 3D808000
618C5504 7D8903A6
4E800421 38600001
48000008 38600000
800100FC 7C0803A6
BA810008 38210100
4E800020 00000000
C211BAD8 00000014
9421FF00 BE810008
7C0802A6 900100FC
80C3002C C0260084
C0029DE0 FC010040
4C401382 40820060
88062217 2C000000
41820054 808DAEB4
38A00001 C0040070
C0260624 FC010040
4C411382 41820014
8006065C 5400052B
40820008 38A00000
2C050000 41820020
38800001 3D808000
618C5504 7D8903A6
4E800421 38600001
48000008 38600000
800100FC 7C0803A6
BA810008 38210100
4E800020 00000000
C206867C 00000002
38600001 987F2217
387E0000 00000000
C2005504 00000085
9421FF00 BE810008
7C0802A6 900100FC
7C7F1B78 83DF002C
7C9D2378 7FE3FB78
38800020 38A00000
38C00000 C0229510
C0429514 FC600890
3D808006 618C93AC
7D8903A6 4E800421
480000BD 7C6802A6
907E219C 480001FD
7C6802A6 907E21A0
3C608011 6063BD18
907E21A4 3C608011
6063BD3C 907E21A8
38600000 907E0084
7FC3F378 38800001
3D808007 618C500C
7D8903A6 4E800421
809E05E8 54602036
7CE4002E 7FE3FB78
389E060C 38A00000
38C004D4 4CC63182
3D808006 618C76F0
7D8903A6 4E800421
38800001 887E2219
50833E30 987E2219
38600000 987E2217
2C1D0000 4182000C
38800096 909E2348
800100FC 7C0803A6
BA810008 38210100
4E800020 4E800021
9421FF00 BE810008
7C0802A6 900100FC
7C7F1B78 83DF002C
7FE3FB78 3D808009
618C665C 7D8903A6
4E800421 2C030000
4082009C 7FE3FB78
3D808008 618CCD68
7D8903A6 4E800421
2C030000 41820048
48000261 7C6802A6
907E21A4 48000209
7C6802A6 907E21A8
4800013D 7C6802A6
907E21A0 4800006D
7C6802A6 907E219C
38600000 907E21C0
38600000 907E2344
4800003C 806DAEB4
C0030070 C03E0624
FC010040 4C411382
41820024 801E065C
5400052B 40820018
7FE3FB78 3D80800C
618CCDA8 7D8903A6
4E800421 800100FC
7C0803A6 BA810008
38210100 4E800020
4E800021 9421FF00
BE810008 7C0802A6
900100FC 7C7F1B78
83DF002C 807E2344
2C030000 40820030
806DAEB4 C0030070
C03E0624 FC010040
4C411382 41820018
801E065C 5400052B
4082000C 38600001
907E2344 800100FC
7C0803A6 BA810008
38210100 4E800020
4E800021 9421FF00
BE810008 7C0802A6
900100FC 7C7F1B78
83DF002C 807E2348
3863FFFF 907E2348
2C030000 4082001C
7FE3FB78 3D80800C
618CC730 7D8903A6
4E800421 48000004
800100FC 7C0803A6
BA810008 38210100
4E800020 4E800021
9421FF00 BE810008
7C0802A6 900100FC
7C7F1B78 83DF002C
807E2348 3863FFFF
907E2348 887E2210
5460E7FF 4182001C
38000000 500326F6
987E2210 C01E002C
FC000050 D01E002C
807E2348 2C030000
4181000C 38600001
907E2344 7FE3FB78
3D808006 618CF238
7D8903A6 4E800421
2C030000 40820034
807E2344 2C030000
4182001C 7FE3FB78
3D80800C 618CCDA8
7D8903A6 4E800421
48000010 7FE3FB78
38800000 4BFFFCAD
800100FC 7C0803A6
BA810008 38210100
4E800020 4E800021
9421FF00 BE810008
7C0802A6 900100FC
7C7F1B78 83DF002C
7FE3FB78 3C80800D
60845BF8 3D808008
618C2C74 7D8903A6
4E800421 800100FC
7C0803A6 BA810008
38210100 4E800020
4E800021 9421FF00
BE810008 7C0802A6
900100FC 7C7F1B78
83DF002C 807E2344
2C030000 4182001C
7FE3FB78 3D808008
618C4DB0 7D8903A6
4E800421 48000018
7FE3FB78 3D808011
618CBD18 7D8903A6
4E800421 800100FC
7C0803A6 BA810008
38210100 4E800020
60000000 00000000
This is the main float function, it contains all the interrupt, collision, animation, and physics functions. Calling the function at 80005504 will enter the player in this faux float state. Uses the animation for FallAerial.

Code:
.macro branchl reg, address
lis \reg, \address @h
ori \reg,\reg,\address @l
mtctr \reg
bctrl
.endm

.macro backup
stwu    r1,-0x100(r1)    # make space for 12 registers
stmw    r20,8(r1)    # push r20-r31 onto the stack
mflr r0
stw r0,0xFC(sp)
mr    player,r3
lwz    playerdata,0x2c(player)
.endm

.macro restore
lwz r0,0xFC(sp)
mtlr r0
lmw    r20,8(r1)    # pop r20-r31 off the stack
addi    r1,r1,0x100    # release the space
.endm

.set entity,31
.set player,31
.set playerdata,30


#0x2340 = Float Timer
#0x2344 = DroppedFloat Bool


#//////////////////////////////////////////////

AS_Float:
backup

mr    r29,r4

AS_FloatStart_EnterParasolFall:
#Enter FallAerial
mr    r3,player
li    r4, 32
li    r5,0
li    r6,0
lfs    f1, -0x6AF0 (rtoc)
lfs    f2, -0x6AEC (rtoc)
fmr    f3, f1
branchl    r12,0x800693ac

#Overwrite Interrupts
bl    Interrupt_Float
mflr    r3
stw    r3,0x219C(playerdata)
bl    Animation_Float
mflr    r3
stw    r3,0x21A0(playerdata)
load    r3,0x8011bd18            #Float Physics
stw    r3,0x21A4(playerdata)
load    r3,0x8011bd3c            #Float Collision
stw    r3,0x21A8(playerdata)

#Zero Y Velocity
li    r3,0x0
stw    r3,0x84(playerdata)

#Create GFX
mr    r3,playerdata
li    r4,0x1
branchl    r12,0x8007500c
lwz    r4, 0x05E8 (playerdata)
rlwinm    r0, r3, 4, 0, 27
lwzx    r7, r4, r0
mr    r3,player
addi    r4,playerdata,1548
li    r5,0x0
li    r6,1236
crclr    6
branchl    r12,0x800676f0

#Set GFX Flag
li    r4,0x1
lbz    r3,0x2219(playerdata)
rlwimi    r3,r4,7,24,24
stb    r3,0x2219(playerdata)

#Set Float as Used
li    r3,0x0
stb    r3,0x2217(playerdata)

#Check If Start of Float
cmpwi    r29,0x0
beq    AS_FloatStart_Exit
#Init Float Variable
li    r4,150
stw    r4,0x2348(playerdata)

AS_FloatStart_Exit:
restore
blr





#//////////////////////////////////////////////






Interrupt_Float:
blrl
backup

#Check For B Buttons
mr    r3,player
branchl    r12,0x8009665c
cmpwi    r3,0x0
bne    Interrupt_FloatEnd

#Check For Aerials
mr    r3,player
branchl    r12,0x8008cd68
cmpwi    r3,0x0
beq    Interrupt_Float_CheckStick

#Replace Aerial Physics Function
bl    Physics_FloatAerial            #FloatAerial Physics
mflr    r3
stw    r3,0x21A4(playerdata)
bl    Collision_FloatAerial            #FloatAerial Collision
mflr    r3
stw    r3,0x21A8(playerdata)
bl    Animation_FloatAerial            #FloatAerial Animation
mflr    r3
stw    r3,0x21A0(playerdata)
bl    Interrupt_FloatAerial            #FloatAerial Interrupt
mflr    r3
stw    r3,0x219C(playerdata)
li    r3,0x0
stw    r3,0x21C0(playerdata)            #No On-Hit Function (Link Dair)
#Init Float Flag
li    r3,0x0
stw    r3,0x2344(playerdata)
b    Interrupt_FloatEnd

Interrupt_Float_CheckStick:
#Check if Stick is Up
lwz    r3, -0x514C (r13)
lfs    f0, 0x0070 (r3)
lfs    f1, 0x0624 (playerdata)
fcmpo    cr0,f1,f0
cror    2, 1, 2
beq    Interrupt_FloatEnd

#Check For Dropped Float Button
lwz    r0, 0x065C (playerdata)
rlwinm.    r0, r0, 0, 20, 21 
bne    Interrupt_FloatEnd

#Enter FallAerial
mr    r3,player
branchl    r12,0x800ccda8

Interrupt_FloatEnd:
restore
blr






#//////////////////////////////////////////////






Interrupt_FloatAerial:
blrl
backup

#Check If Still Floating
lwz    r3,0x2344(playerdata)
cmpwi    r3,0x0
bne    Interrupt_FloatAerialEnd

Interrupt_FloatAerial_CheckStick:
#Check if Stick is Up
lwz    r3, -0x514C (r13)
lfs    f0, 0x0070 (r3)
lfs    f1, 0x0624 (playerdata)
fcmpo    cr0,f1,f0
cror    2, 1, 2
beq    Interrupt_FloatAerialEnd

#Check For Dropped Float Button
lwz    r0, 0x065C (playerdata)
rlwinm.    r0, r0, 0, 20, 21 
bne    Interrupt_FloatAerialEnd

#Set No Float Flag
li    r3,0x1
stw    r3,0x2344(playerdata)

Interrupt_FloatAerialEnd:
restore
blr

#//////////////////////////////////////////////

Animation_Float:
blrl
backup

#Dec Counter
lwz    r3,0x2348(playerdata)
subi    r3,r3,0x1
stw    r3,0x2348(playerdata)

#Check to Enter Fall
cmpwi    r3,0x0
bne    Animation_FloatEnd

#Enter Fall
mr    r3,player
branchl r12,0x800cc730
b    Animation_FloatEnd

Animation_FloatEnd:
restore
blr

#//////////////////////////////////////////////

Animation_FloatAerial:
blrl
backup

#Dec Counter
lwz    r3,0x2348(playerdata)
subi    r3,r3,0x1
stw    r3,0x2348(playerdata)

#Check For Aerial Turnaround (Marth Bair)
lbz    r3, 0x2210 (playerdata)                    #Check Turnaround Flag
rlwinm.    r0, r3, 28, 31, 31           
beq    Animation_FloatAerial_NoTurnaround
li    r0, 0
rlwimi    r3, r0, 4, 27, 27
stb    r3, 0x2210 (playerdata)                    #Uncheck Turnaround Flag
lfs    f0, 0x002C (playerdata)
fneg    f0,f0
stfs    f0, 0x002C (playerdata)
Animation_FloatAerial_NoTurnaround:

#Check to Start Falling
lwz    r3,0x2348(playerdata)
cmpwi    r3,0x0
bgt    Animation_FloatAerial_ReturnToFloatCheck

#Set No Float Flag
li    r3,0x1
stw    r3,0x2344(playerdata)

Animation_FloatAerial_ReturnToFloatCheck:
mr    r3,player
branchl    r12,0x8006f238
cmpwi    r3,0x0
bne    Animation_FloatAerialEnd

#Check To Return To Float or Fall
lwz    r3,0x2344(playerdata)
cmpwi    r3,0x0
beq    Animation_FloatAerial_EnterFloat

Animation_FloatAerial_Enterall:
#Enter FallAerial
mr    r3,player
branchl    r12,0x800ccda8
b    Animation_FloatAerialEnd

Animation_FloatAerial_EnterFloat:
#Enter Float
mr    r3,player
li    r4,0x0
bl    AS_Float

Animation_FloatAerialEnd:
restore
blr

#///////////////////////////////////////////////

Collision_FloatAerial:
blrl
backup

mr    r3,player
load    r4,0x800d5bf8            #Land When Hitting the Ground
branchl    r12,0x80082c74            #EnvironmentCollision_Attack+Airdodge

Collision_FloatAerialEnd:
restore
blr

#//////////////////////////////////////////////

Physics_FloatAerial:
blrl
backup

lwz    r3,0x2344(playerdata)
cmpwi    r3,0x0
beq    Physics_FloatAerial_Float

Physics_FloatAerial_Fall:
mr    r3,player
branchl    r12,0x80084db0
b    Physics_FloatAerialEnd

Physics_FloatAerial_Float:
mr    r3,player
branchl    r12,0x8011bd18

Physics_FloatAerialEnd:
restore
blr
 
Last edited:

Stormghetti

Smash Journeyman
Joined
Aug 23, 2015
Messages
400
Location
Europe
Slippi.gg
STRM#798
NNID
Stormghetti
LOL, how convenient, I was just thinking of how Melee would be like with a DBZ-esque combat style. This is the closest thing I can think of.

Edit: holy **** what caused this? (sorry for the atrocious quality):

No other codes were used. The glitchiness on Yoshi's body reminds me of his death animation in Sunshine.

Also, charging Mewtwo's Shadow Ball and trying to cancel it seems to freeze the game. In fact, the move overall is just very glitchy... Link and Y. Link fall off of their float if they use D-Air. Not sure if that's intentional.
 
Last edited:

UnclePunch

Smash Ace
Joined
Nov 9, 2014
Messages
673
LOL, how convenient, I was just thinking of how Melee would be like with a DBZ-esque combat style. This is the closest thing I can think of.

Edit: holy **** what caused this? (sorry for the atrocious quality):

No other codes were used. The glitchiness on Yoshi's body reminds me of his death animation in Sunshine.

Also, charging Mewtwo's Shadow Ball and trying to cancel it seems to freeze the game. In fact, the move overall is just very glitchy... Link and Y. Link fall off of their float if they use D-Air. Not sure if that's intentional.
Yoshis side-b apparently uses (Peach's) float bool (0x2230) tor topN y-scaling.
I was using offset 0x2230 as a persistent float bool (Peach's float bool is 0x222C, which is most characters unique persistent bool). Unfortunately 0x2230 is also used as a persistent variable for other characters. I noticed it happen with Bowsers flame but didn't bother. Will adjust the variable now.

*Edit
Fixed it. Also fixed a bug where the float timer was overwritten when returning to float from a float aerial + Link Dair bug + Marth Bair turnaround bug.
 
Last edited:
Top Bottom