• 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 Glide toss codes (aerial + retreating grounded)

rmn

Smash Rookie
Joined
Feb 15, 2016
Messages
15
Location
Alabama
In Melee the first 6 frames of a roll can be interrupted with an item throw. However, the item will always be thrown in the direction the roll is moving. This has been referred to as a "glide toss" and is rarely used. (I think this tech or something similar is in Brawl but I'm honestly not sure how it works there.) This code allows you to input either a forward or backward item throw during the roll interrupt window. Note that in Melee rolls can only be interrupted by item throws using the A or Z buttons, not the C-stick.
The first two item throws are enabled by this code. The second two (after I mess up and roll) are possible in unmodified Melee.
$Enable retreating glide toss [rmn]
C20956AC 00000007
C03F0620 3C003E8F
60005C29 9001FFFC
C041FFFC FC000A10
FC001040 40800008
C022A1C4 C05F002C
EC220072 C002A1C4
FC010040 00000000
040956B0 4180000C
Code:
# inject at 800956AC:
# originally: cmpwi r0, 0xE9
# player data pointer = r31

lfs  f1, 0x620(r31) # analog input
lis  r0, 0x3E8F5C29@h
ori  r0, r0, 0x3E8F5C29@l
stw  r0, -4(r1)
lfs  f2, -4(r1)  # dead zone
fabs  f0, f1
fcmpo  cr0, f0, f2
bge  not_deadzone
lfs  f1, -0x5e3c(r2) # if in deadzone set input to 0
not_deadzone:
lfs  f2, 0x2C(r31)  # facing
fmuls  f1, f2, f1
lfs  f0, -0x5e3c(r2) # 0
fcmpo  cr0, f1, f0

# then replace 800956b0:
# originally: bne- 0xC [800956bC]
# replace with: blt 0xC
040956B0 4180000C

Also, the first 3 frames of an airdodge can be interrupted by an item throw (C-stick or A/Z button). When doing so, velocity is reset to what it was before the airdodge began. This second code replaces this behavior such that instead, momentum is partially conserved from the airdodge into the item throw. This is similar to the AGT tech seen in Project M (but in Melee airdodges don't catch items, so I hope you're good at Z-catching!)
$AGT [rmn]
04099c84 C03F0080
04099c88 C05F0084
C2099C8C 00000003
3C00XXXX 9001FFFC
C001FFFC EC210032
60000000 00000000
04099c90 EC420032
04099c94 D03F0080
04099c98 D05F0084

XXXX: Momentum carryover factor (upper half of a 32-bit float). I tested with 3EB3, approx. equal to 35%.
Code:
# r31 = player data pointer
# 6 instructions involved in resetting momentum,
# so save space by overwriting instead of NOPing them

04099c84 C03F0080  # lfs  f1, 0x80(r31) [xvel]
04099c88 C05F0084  # lfs  f2, 0x84(r31) [yvel]

#inject at 80099c8c:
lis  r0, 0x3EB3
stw  r0, -4(r1)
lfs  f0, -4(r1)
fmuls  f1, f1, f0

04099c90 EC420032  # fmuls  f2, f2, f0
04099c94 D03F0080  # stfs  f1, 0x80(r31)
04099c98 D05F0084  # stfs  f2, 0x84(r31)
 
Last edited:

rmn

Smash Rookie
Joined
Feb 15, 2016
Messages
15
Location
Alabama
I hooked into the function after it has already determined that you're throwing an item, and just needs to decide which direction. Enabling the C stick for item throws during rolls would be possible to code but just wasn't part of what I was working on.

As for the Z button that was actually a mistake on my part -- Z actually does work. Edited the original post to reflect this.
 
Top Bottom