• 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 Color flash at the soonest point you can fast fall

L.O.S.T.30-3

Smash Cadet
Joined
May 5, 2016
Messages
32
Location
U.S.A.
A visual cue such as a color change at the point in the jump arc a player can buffer a fast fall.
 
Last edited:

Acryte

Smash Ace
Joined
Mar 30, 2005
Messages
986
It might be a specific action state. Not sure, if that's the case you can already use the color overlays in 20XX in the meantime at least.
 

L.O.S.T.30-3

Smash Cadet
Joined
May 5, 2016
Messages
32
Location
U.S.A.
It might be a specific action state. Not sure, if that's the case you can already use the color overlays in 20XX in the meantime at least.
I checked the color overlays in 20XX, but it looks like the point where you can start your fast fall is not a separate action state from jump or fall.
 

Punkline

Dr. Frankenstack
Joined
May 15, 2015
Messages
423
Saw this request earlier this morning and wrote a quick code based off of a hook at 8007d550

It executes every frame that a player has a fastfall input available, but that means it also lasts for the entire duration of a normal fall.

I thought it looked a little janky... so I rewrote it with a second hook, and included a yVelocity window that effectively makes the flash only last a bit longer than the peak of your jump.

Also, would you prefer a specific color? I just went for CYAN because it’s an easy primary, but I can change it if it conflicts with any other colored “flash” codes.

$Flash when Fastfall is Available [Punkline]
C207D554 0000000C
C0230084 C042E870
FC011040 4181000C
38000000 48000040
88030504 2C000091
41A20038 3C00C200
900304BC 900304C0
900304C4 38000000
900304B8 900304C8
900304CC 900304D0
3C00C280 900304D4
38000091 98030504
C0230624 00000000
C207D538 00000003
54A0EFFF 41A2000C
38000000 98030504
60000000 00000000

Code:
    -==-


Flash Cyan when Fastfall is Available
Flash cyan when fastfall input can be buffered
[Punkline]

Version -- DOL Offset ------ Hex to Replace ---------- ASM Code
1.02 ----- 0x8007d554 --- C0230624 -> Branch

C0230084 C042E870
FC011040 4181000C
38000000 48000040
88030504 2C000091
41A20038 3C00C200
900304BC 900304C0
900304C4 38000000
900304B8 900304C8
900304CC 900304D0
3C00C280 900304D4
38000091 98030504
C0230624 00000000


1.02 ----- 0x8007d538 --- 54A0EFFF -> Branch

54A0EFFF 41A2000C
38000000 98030504
00000000
Code:
#Flash Cyan when Fastfall is Available [Punkline]
#@8007d554: lfs    f1, 0x0624 (r3)       (after checking Yvelocity for fastfall check)
#r0,r4,r5, f1, f2, cr0, lr are safe
#--hook context runs only when fastfall input is available

lfs f1, 0x84(r3)               #yVelocity
lfs f2,-0x1790(rtoc)            #-1.0
fcmpo cr0, f1, f2
bgt checkColor
li r0, 0                        #if player has fallen significantly past peak, stop color overlay
b toggleColor

checkColor:
lbz r0, 0x504(r3)
cmpwi r0, 0x91                  #check if there's already a color overlay
beq+ return                     #prevents from reasigning color every frame

setColor:
lis r0, 0xC200
stw r0, 0x4BC(r3)              #blue
stw r0, 0x4C0(r3)              #green
stw r0, 0x4C4(r3)              #alpha
li r0, 0
stw r0, 0x4B8(r3)              #red
stw r0, 0x4C8(r3)              #redBlink
stw r0, 0x4CC(r3)              #blueBlink
stw r0, 0x4D0(r3)              #greenBlink
lis r0, 0xC280
stw r0, 0x4D4(r3)              #alphaBlink
li r0, 0x91

toggleColor:
stb r0, 0x504(r3)              #color toggle on

return:
lfs f1, 0x0624 (r3)

#@8007d538: rlwinm. r0, r5, 29, 31, 31        (flag check)
#r0,r3, cr0, lr are safe
#--hook context runs every frame of fastfall check, whether fastfalling or not
rlwinm. r0, r5, 29, 31, 31      #checking flag
beq+ return
li r0, 0
stb r0, 0x504(r3)              #color toggle off

return:

Edit: updated code with fixes
 
Last edited:

L.O.S.T.30-3

Smash Cadet
Joined
May 5, 2016
Messages
32
Location
U.S.A.
Thank you for working on this code! It's giving me a warning in dolphin "IntCPU: Unknown instruction 00000000 at PC = 8000292c last_PC = 80001f18 LR = 8084dd4" after that first one there is a new warning for every frame of fall then it plays fine till the character enters fall again.
 

Punkline

Dr. Frankenstack
Joined
May 15, 2015
Messages
423
Thank you for working on this code! It's giving me a warning in dolphin "IntCPU: Unknown instruction 00000000 at PC = 8000292c last_PC = 80001f18 LR = 8084dd4" after that first one there is a new warning for every frame of fall then it plays fine till the character enters fall again.
Yikes. Are you using the C2 code or the injection mod with MCM? Also what version of Melee?

I’m not able to reproduce your error messages, but it sounds like the code is either being cut off or the branches at the end of the injections aren’t compiling correctly...

While testing it though, I did find that the code seems to be subtly unstable for some reason on landing/respawning, which may or may not be related to what you’re describing. In my case, the instability only shows up after a few minutes of seemingly working as intended.

After reverting to this simpler code, the problem still persists


Edit: updated with fixes

$Flash when Fastfall is Available (simple) [Punkline]
C207D554 00000009
88030504 2C000091
41A20038 3C00C200
900304BC 900304C0
900304C4 38000000
900304B8 900304C8
900304CC 900304D0
3C00C280 900304D4
38000091 98030504
C0230624 00000000


Code:
#Flash Cyan when Fastfall is Available [Punkline]
#@8007d554: lfs    f1, 0x0624 (r3)       (after checking Yvelocity for fastfall check)
#r0,r4,r5, f1, f2, cr0, lr are safe
#--hook context runs only when fastfall input is available

checkColor:
lbz r0, 0x504(r3)
cmpwi r0, 0x91                  #check if there's already a color overlay
beq+ return                     #prevents from reasigning color every frame

setColor:
lis r0, 0xC200
stw r0, 0x4BC(r3)              #blue
stw r0, 0x4C0(r3)              #green
stw r0, 0x4C4(r3)              #alpha
li r0, 0
stw r0, 0x4B8(r3)              #red
stw r0, 0x4C8(r3)              #redBlink
stw r0, 0x4CC(r3)              #blueBlink
stw r0, 0x4D0(r3)              #greenBlink
lis r0, 0xC280
stw r0, 0x4D4(r3)              #alphaBlink
li r0, 0x91

toggleColor:
stb r0, 0x504(r3)              #color toggle on

return:
lfs f1, 0x0624 (r3)
 
Last edited:

L.O.S.T.30-3

Smash Cadet
Joined
May 5, 2016
Messages
32
Location
U.S.A.
I'm sorry I don't know what the C2 code is but I am not using MCM. Melee version 1.02 NTSC & 20XX 4.05 on Dolphin 5.0 I disabled all other codes but it did not seem to have an effect. The new simple code works until my character has entered the special fall animation & then I input a jump at which point a slew of warnings pop up.

The color looks fine to me & it doesn't need to flash if that makes it any less stable. I just gotta say thanks again for the help.
 

Punkline

Dr. Frankenstack
Joined
May 15, 2015
Messages
423
I'm sorry I don't know what the C2 code is but I am not using MCM. Melee version 1.02 NTSC & 20XX 4.05 on Dolphin 5.0 I disabled all other codes but it did not seem to have an effect. The new simple code works until my character has entered the special fall animation & then I input a jump at which point a slew of warnings pop up.

The color looks fine to me & it doesn't need to flash if that makes it any less stable. I just gotta say thanks again for the help.
Took a look with 20XX and started getting the same errors. It must have been something odd... it kinda looked like an interrupt was catching the call somehow. After moving the hook a nudge it seems to have stopped.

Also figured out that the instability I mentioned with landing/respawning was caused by my carelessness. Was working on different codes at the same time and I confused the register holding the player value with a different hook context. It was a coincidence that the saved variables held the correct value most of the time, so I didn't notice it at first.

I've edited the codes in my posts above with fixes. L.O.S.T.30-3 L.O.S.T.30-3 Can you let me know if it works?
 
Last edited:

L.O.S.T.30-3

Smash Cadet
Joined
May 5, 2016
Messages
32
Location
U.S.A.
Hell yeah!! It's working great as far as I can tell. Thank you very much for your time and effort Mr. Line. :colorful:
 

oscat

Smash Journeyman
Joined
Apr 29, 2014
Messages
240
Location
So Cal
NNID
drlnklngmars
3DS FC
0318-9801-6641
I
Yikes. Are you using the C2 code or the injection mod with MCM? Also what version of Melee?

I’m not able to reproduce your error messages, but it sounds like the code is either being cut off or the branches at the end of the injections aren’t compiling correctly...

While testing it though, I did find that the code seems to be subtly unstable for some reason on landing/respawning, which may or may not be related to what you’re describing. In my case, the instability only shows up after a few minutes of seemingly working as intended.

After reverting to this simpler code, the problem still persists


Edit: updated with fixes

$Flash when Fastfall is Available (simple) [Punkline]
C207D554 00000009
88030504 2C000091
41A20038 3C00C200
900304BC 900304C0
900304C4 38000000
900304B8 900304C8
900304CC 900304D0
3C00C280 900304D4
38000091 98030504
C0230624 00000000


Code:
#Flash Cyan when Fastfall is Available [Punkline]
#@8007d554: lfs    f1, 0x0624 (r3)       (after checking Yvelocity for fastfall check)
#r0,r4,r5, f1, f2, cr0, lr are safe
#--hook context runs only when fastfall input is available

checkColor:
lbz r0, 0x504(r3)
cmpwi r0, 0x91                  #check if there's already a color overlay
beq+ return                     #prevents from reasigning color every frame

setColor:
lis r0, 0xC200
stw r0, 0x4BC(r3)              #blue
stw r0, 0x4C0(r3)              #green
stw r0, 0x4C4(r3)              #alpha
li r0, 0
stw r0, 0x4B8(r3)              #red
stw r0, 0x4C8(r3)              #redBlink
stw r0, 0x4CC(r3)              #blueBlink
stw r0, 0x4D0(r3)              #greenBlink
lis r0, 0xC280
stw r0, 0x4D4(r3)              #alphaBlink
li r0, 0x91

toggleColor:
stb r0, 0x504(r3)              #color toggle on

return:
lfs f1, 0x0624 (r3)
Is there a way to make it where the color goes away after you press down?
 
Top Bottom