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

Request Increasing Match Timer

tatatat0

Smash Journeyman
Joined
Jan 28, 2015
Messages
412
Have the timer in matches increase as the match goes on instead of decreasing as a way to tell how long the match has been going on for.
 

Punkline

Dr. Frankenstack
Joined
May 15, 2015
Messages
423
Apparently the game has a flag that reverses the game timer.

Bit 0x01 of byte 8046DB68 can be toggled on to cause the game timer to count up and avoid some complications that come with doing it manually.

The game references it as an offset (0x24c8) from 8046b6a0 (an absolute base address.)

Here's a code that lets you toggle it by selecting 99 minutes in the match settings.
(Works for both Time and Timed Stock matches.)

$Reverse Match Timer [Punkline]
C216DDB4 00000005
801E0010 2C001734
4082001C 881F24C8
60000001 981F24C8
38000001 981E0014
38001770 00000000


Code:
-==-


Reverse Match Timer
Have match timer count up from 0 instead of count down.
Select 99 minutes in match options to enable
[Punkline]
Version -- DOL Offset ------ Hex to Replace ---------- ASM Code
1.02 ----- 0x8016ddb4 --- 801E0010 -> Branch

801E0010 2C001734
4082001C 881F24C8
60000001 981F24C8
38000001 981E0014
38001770 00000000
Code:
#Reverse Match Timer [Punkline]
#@8016ddb4: lwz r0,0x10 (r30)    (Loads starting match timer)
#r0, r3, cr0 are safe
#r30 == BA (?)
#r31 == timer data BA
#--when match initializes with a 99 minute timer,  reverse tick and count up from 0

lwz r0, 0x10 (r30)
cmpwi r0, 0x1734        #0x1734 seconds == 99 minutes
bne return              #if timer != 99 minutes, don't run code

lbz r0, 0x24c8(r31)     #else, modify flag that reverses timer
ori r0, r0, 1
stb r0, 0x24c8(r31)     #store flag
li r0, 1
stb r0, 0x14(r30)       #this corrects the subseconds starting point
li r0, 0x1770           #Rolls over the 99 minute timer to an artificial 0, to start counting at

return:
 
Last edited:

tatatat0

Smash Journeyman
Joined
Jan 28, 2015
Messages
412
So, apparently the game has a flag that reverses the game timer.

Bit 0x01 of byte 8046DB68 can be toggled on to cause the game timer to count up and avoid some complications that come with doing it manually.

The game references it as an offset (0x24c8) from 8046b6a0 (an absolute base address.)

I made the code so that you can toggle it by selecting 99 minutes in the match settings.

When the match starts, the timer starts at 99:59:99 and immediately rolls over to 0 to begin counting up. I'll try and tweak the milliseconds tomorrow and make it a clean 00:00:00.

$Reverse Match Timer [Punkline]
C216DDB4 00000004
801E0010 2C001734
40820014 881F24C8
60000001 981F24C8
3800176F 00000000


Code:
-==-


Reverse Match Timer
Have match timer count up from 0 instead of count down.
Select 99 minutes in match options to enable
[Punkline]
Version -- DOL Offset ------ Hex to Replace ---------- ASM Code
1.02 ----- 0x8016ddb4 --- 801E0010 -> Branch

801E0010 2C001734
40820014 881F24C8
60000001 981F24C8
3800176F 00000000
Code:
#Reverse Match Timer [Punkline]
#@8016ddb4: lwz r0,0x10 (r30)    (Loads starting match timer)
#r0, r3, cr0 are safe
#r30 == BA (?)
#r31 == timer data BA
#--when match initializes with a 99 minute timer, it will reverse and count up from 0 rather than tick down.

lwz r0, 0x10 (r30)
cmpwi r0, 0x1734        #0x1734 seconds == 99 minutes
bne return              #if timer != 99 minutes, don't run code

lbz r0, 0x24c8(r31)     #else, modify flag that reverses timer
ori r0, r0, 1
stb r0, 0x24c8(r31)     #store flag
li r0, 0x176F           #Rolls over the 99 minute timer to an artificial 0, to start counting at

return:
Thanks! I tried working on this for many hours but could never figure it out.
 

Punkline

Dr. Frankenstack
Joined
May 15, 2015
Messages
423
NP. I made a quick update to the code so that the starting timer reads as 00:00:00.

I've edited the post. Let me know if there are any issues~
 
Top Bottom