• 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 Display Time at Top Right of CSS 1.1

UnclePunch

Smash Ace
Joined
Nov 9, 2014
Messages
673


Code:
$Display Time at Top Right of CSS 1.1 [UnclePunch]
C225C00C 00000004
2C05004C 4082000C
3863FFDE 48000008
38600000 9062FDB0
80010014 00000000
C226339C 00000032
8062FDB0 2C030000
4182017C 3DC08000
61CEAFBC 7DC903A6
4E800421 38810014
3DC08016 61CE92E8
7DC903A6 4E800421
38810014 48000125
7CC802A6 88640004
2C03000C 4080000C
38A00000 4800000C
3863FFF4 38A00001
2C03000A 41800010
3863FFF6 38E02001
48000024 2C030000
40820018 2C050000
40820010 38E02001
38600002 48000008
38E02000 B0E60018
38E00020 98E6001A
9866001B 88640005
2C030009 4081002C
2C030013 4081002C
2C03001D 40810030
2C030027 40810034
2C030031 40810038
2C03003B 4081003C
38E02000 4800003C
38E02001 3863FFF6
48000030 38E02002
3863FFEC 48000024
38E02003 3863FFE2
48000018 38E02004
3863FFD8 4800000C
38E02005 3863FFCE
B0E6001E 38E00020
98E60020 98660021
2C050000 4082000C
38E0200A 48000008
38E02019 B0E60022
8062FDB0 7CC43378
38A00028 3DC08000
61CE31F4 7DC903A6
4E800421 48000030
4E800021 201C2037
20322026 202E2036
20EC1A1A 1A1A1A1A
1A1A1A1A 20002008
20E92004 20052019
20160000 8001001C
60000000 00000000
Code:
inject @ 8026339c (end of CSS_LoadButtonInputs)

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

#TIME STRUCT:
#    0x0 = year (half)
#    0x2 = month (byte)
#    0x3 = day (byte)
#    0x4 = hour (byte)
#    0x5 = minute (byte)
#    0x6 = seconds (byte)
#    0x7 = 0x00

#r3 = current time parameter
#r4 = time struct
#r5 = if AM or PM
#r6 = text struct

#checkIfStockMatch
lwz r3,-0x250(rtoc)
cmpwi r3,0x0
beq exit

branchl r14,0x8000afbc #get SysTime

addi r4,sp,20
branchl r14,0x801692e8 #get seconds,minutes,hours

addi r4,sp,20 #get time struct
bl TEXT
mflr r6 #get text struct

    #CHECK FOR AM/PM
    lbz r3,0x4(r4) #get hour
    cmpwi r3,0xC    #check if AM or PM
    bge PM

    AM:
    li r5,0x0
    b checkHourDigits

    PM:
    subi r3,r3,0xc
    li r5,0x1

#CHECK HOUR DIGIT AMOUNT
checkHourDigits:
cmpwi r3,0xa    #check if single or double digit
blt singleDigit

doubleDigit:
subi r3,r3,0xa
li r7,0x2001
b hourStore

singleDigit:
cmpwi r3,0x0
bne not12AM
cmpwi r5,0x0
bne not12AM
li r7,0x2001
li r3,0x2
b hourStore
not12AM:
li r7,0x2000

hourStore:
sth r7,0x18(r6) #store left hour digit

li r7,0x20
stb r7,0x1A(r6) #store right minute 0x20
stb r3,0x1B(r6) #store right hour digit

#CHECK MINUTE DIGIT AMOUNT
checkMinuteDigits:
lbz r3,0x5(r4) #get minute byte

cmpwi r3,0x9
ble ZeroToNine
cmpwi r3,0x13
ble TenToNineteen
cmpwi r3,0x1D
ble TwentyToTwentyNine
cmpwi r3,0x27
ble ThirtyToThirtyNine
cmpwi r3,0x31
ble FortyToFortyNine
cmpwi r3,0x3B
ble FiftyToFiftyNine

ZeroToNine:
li r7,0x2000
b storeMinutes

TenToNineteen:
li r7,0x2001
subi r3,r3,0xA
b storeMinutes

TwentyToTwentyNine:
li r7,0x2002
subi r3,r3,0x14
b storeMinutes

ThirtyToThirtyNine:
li r7,0x2003
subi r3,r3,0x1E
b storeMinutes

FortyToFortyNine:
li r7,0x2004
subi r3,r3,0x28
b storeMinutes

FiftyToFiftyNine:
li r7,0x2005
subi r3,r3,0x32

storeMinutes:
sth r7,0x1E(r6) #store left minute digit

li r7,0x20
stb r7,0x20(r6) #store right minute 0x20
stb r3,0x21(r6) #store right minute digit

storeAMorPM:
cmpwi r5,0x0
bne loadPM

loadAM:
li r7,0x200A
b storeAMPM

loadPM:
li r7,0x2019

storeAMPM:
sth r7,0x22(r6) #store A/P

copyToRulesFrame:
lwz r3,-0x250(rtoc)            #destination
mr r4,r6            #source
li r5,0x28
branchl r14,0x800031f4  #branch to memcpy

b exit

TEXT:
blrl
#Stocks!
.long 0x201c2037
.long 0x20322026
.long 0x202e2036
.long 0x20ec1A1A
.long 0x1a1a1a1a
.long 0x1a1a1a1a
TIME:
#Time
.long 0x20002008 #08
.long 0x20e92004 #:1
.long 0x20052019 #4(A/P) |||| 2019 = P // 200A = A
.long 0x20160000 #M


exit:
lwz    r0, 0x001C (sp)
Code:
inject @ 8025c00c (end of CSS_LoadRules)

checkGameMode:
cmpwi r5,0x4c
bne notStockMode

isStockMode:
subi r3,r3,0x22
b store

notStockMode:
li r3,0x0

store:
stw r3,-0x250(rtoc)

exit:
lwz    r0, 0x0014 (sp)
 
Last edited:

Stephen Dorch

Smash Rookie
Joined
Oct 4, 2015
Messages
10
Wow, and i thought only Animal crossing only utilized the gamecube clock. lol
What is that background you are using on the CSS? It looks awesome.
 

0Frames

Smash Cadet
Joined
Mar 25, 2017
Messages
33


Code:
$Display Time at Top Right of CSS 1.1 [UnclePunch]
C225C00C 00000004
2C05004C 4082000C
3863FFDE 48000008
38600000 9062FDB0
80010014 00000000
C226339C 00000032
8062FDB0 2C030000
4182017C 3DC08000
61CEAFBC 7DC903A6
4E800421 38810014
3DC08016 61CE92E8
7DC903A6 4E800421
38810014 48000125
7CC802A6 88640004
2C03000C 4080000C
38A00000 4800000C
3863FFF4 38A00001
2C03000A 41800010
3863FFF6 38E02001
48000024 2C030000
40820018 2C050000
40820010 38E02001
38600002 48000008
38E02000 B0E60018
38E00020 98E6001A
9866001B 88640005
2C030009 4081002C
2C030013 4081002C
2C03001D 40810030
2C030027 40810034
2C030031 40810038
2C03003B 4081003C
38E02000 4800003C
38E02001 3863FFF6
48000030 38E02002
3863FFEC 48000024
38E02003 3863FFE2
48000018 38E02004
3863FFD8 4800000C
38E02005 3863FFCE
B0E6001E 38E00020
98E60020 98660021
2C050000 4082000C
38E0200A 48000008
38E02019 B0E60022
8062FDB0 7CC43378
38A00028 3DC08000
61CE31F4 7DC903A6
4E800421 48000030
4E800021 201C2037
20322026 202E2036
20EC1A1A 1A1A1A1A
1A1A1A1A 20002008
20E92004 20052019
20160000 8001001C
60000000 00000000
Code:
inject @ 8026339c (end of CSS_LoadButtonInputs)

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

#TIME STRUCT:
#    0x0 = year (half)
#    0x2 = month (byte)
#    0x3 = day (byte)
#    0x4 = hour (byte)
#    0x5 = minute (byte)
#    0x6 = seconds (byte)
#    0x7 = 0x00

#r3 = current time parameter
#r4 = time struct
#r5 = if AM or PM
#r6 = text struct

#checkIfStockMatch
lwz r3,-0x250(rtoc)
cmpwi r3,0x0
beq exit

branchl r14,0x8000afbc #get SysTime

addi r4,sp,20
branchl r14,0x801692e8 #get seconds,minutes,hours

addi r4,sp,20 #get time struct
bl TEXT
mflr r6 #get text struct

    #CHECK FOR AM/PM
    lbz r3,0x4(r4) #get hour
    cmpwi r3,0xC    #check if AM or PM
    bge PM

    AM:
    li r5,0x0
    b checkHourDigits

    PM:
    subi r3,r3,0xc
    li r5,0x1

#CHECK HOUR DIGIT AMOUNT
checkHourDigits:
cmpwi r3,0xa    #check if single or double digit
blt singleDigit

doubleDigit:
subi r3,r3,0xa
li r7,0x2001
b hourStore

singleDigit:
cmpwi r3,0x0
bne not12AM
cmpwi r5,0x0
bne not12AM
li r7,0x2001
li r3,0x2
b hourStore
not12AM:
li r7,0x2000

hourStore:
sth r7,0x18(r6) #store left hour digit

li r7,0x20
stb r7,0x1A(r6) #store right minute 0x20
stb r3,0x1B(r6) #store right hour digit

#CHECK MINUTE DIGIT AMOUNT
checkMinuteDigits:
lbz r3,0x5(r4) #get minute byte

cmpwi r3,0x9
ble ZeroToNine
cmpwi r3,0x13
ble TenToNineteen
cmpwi r3,0x1D
ble TwentyToTwentyNine
cmpwi r3,0x27
ble ThirtyToThirtyNine
cmpwi r3,0x31
ble FortyToFortyNine
cmpwi r3,0x3B
ble FiftyToFiftyNine

ZeroToNine:
li r7,0x2000
b storeMinutes

TenToNineteen:
li r7,0x2001
subi r3,r3,0xA
b storeMinutes

TwentyToTwentyNine:
li r7,0x2002
subi r3,r3,0x14
b storeMinutes

ThirtyToThirtyNine:
li r7,0x2003
subi r3,r3,0x1E
b storeMinutes

FortyToFortyNine:
li r7,0x2004
subi r3,r3,0x28
b storeMinutes

FiftyToFiftyNine:
li r7,0x2005
subi r3,r3,0x32

storeMinutes:
sth r7,0x1E(r6) #store left minute digit

li r7,0x20
stb r7,0x20(r6) #store right minute 0x20
stb r3,0x21(r6) #store right minute digit

storeAMorPM:
cmpwi r5,0x0
bne loadPM

loadAM:
li r7,0x200A
b storeAMPM

loadPM:
li r7,0x2019

storeAMPM:
sth r7,0x22(r6) #store A/P

copyToRulesFrame:
lwz r3,-0x250(rtoc)            #destination
mr r4,r6            #source
li r5,0x28
branchl r14,0x800031f4  #branch to memcpy

b exit

TEXT:
blrl
#Stocks!
.long 0x201c2037
.long 0x20322026
.long 0x202e2036
.long 0x20ec1A1A
.long 0x1a1a1a1a
.long 0x1a1a1a1a
TIME:
#Time
.long 0x20002008 #08
.long 0x20e92004 #:1
.long 0x20052019 #4(A/P) |||| 2019 = P // 200A = A
.long 0x20160000 #M


exit:
lwz    r0, 0x001C (sp)
Code:
inject @ 8025c00c (end of CSS_LoadRules)

checkGameMode:
cmpwi r5,0x4c
bne notStockMode

isStockMode:
subi r3,r3,0x22
b store

notStockMode:
li r3,0x0

store:
stw r3,-0x250(rtoc)

exit:
lwz    r0, 0x0014 (sp)
how can I call this a waste of time (no pun intended) without sounding like an asshole?
 

UnclePunch

Smash Ace
Joined
Nov 9, 2014
Messages
673
Wow, and i thought only Animal crossing only utilized the gamecube clock.
Melee actually uses the clock for displaying when you unlocked trophies / characters.

What is that background you are using on the CSS? It looks awesome.
Thanks, the code is here,

https://smashboards.com/threads/standalone-css-color-modification.450087/

and the instructions to change the colors to your liking are included in the OP. I don't have the colors I used on hand right now but I'll try and update this post later.
 

TerryJ

Smash Journeyman
Joined
Apr 12, 2010
Messages
488
Location
BEST COAST, WA
NNID
1337-1337-1337
3DS FC
1337-1337-1337
This is sick! Could you also make it so it's displayed during games under the in-game time but smaller? Everywhere would be nice.
 

TDRR

Smash Journeyman
Joined
Sep 18, 2017
Messages
286
Location
Venezuela
I'm wondering, is this for a custom .iso you are doing? That 0.66 icon really calls my attention.
 
Top Bottom