Separated Countdown Count Sounds
#1
Separated Countdown Count Sounds [Ro]

This code will separate the countdown count sounds to allow the user to play different sounds (and any) on each count number. This is useful for modders who want to customize their countdown sounds to have a voice saying the number (inspired on the old classic starting music song edit). This will work in Battle as well. The values are the revo_kart.brsar index of the song - adding new entries should work for this. 

NTSC-U
C2835D50 00000004
38800XXX 2C060001
41800000 4181000C
38800YYY 48000000
38800ZZZ 00000000

PAL (Untested)
C28577E0 00000004
38800XXX 2C060001
41800000 4181000C
38800YYY 48000000
38800ZZZ 00000000

NTSC-J (Untested)
C2856E4C 00000004
38800XXX 2C060001
41800000 4181000C
38800YYY 48000000
38800ZZZ 00000000

NTSC-K (Untested)
C2845BA0 00000004
38800XXX 2C060001
41800000 4181000C
38800YYY 48000000
38800ZZZ 00000000

Code:
Write to:
NTSC-U: 80835D50
PAL: 808577E0
NTSC-J: 80856E4C
NTSC-K: 80845BA0

Source:
# Initialise as 3 by default
li r4, 0xXXX #Countdown Count '3' Sound

cmpwi r6, 1
blt end # 3
bgt num1

# Flows into num2 anyway without a branch
num2:
li r4, 0xYYY #Countdown Count '2' Sound
b end

num1:
li r4, 0xZZZ #Countdown Count '1' Sound

end:

Code created by: Ro
Code credits: Seeky (for small optimazion and help)
Reply
#2
Nice code, needs an ntsc-k port before it can be moved out of the incomplete category though

Also, you can do some similar optimisations on this code
Code:
# Initialise as 3 by default
li r4, 0xXXX #Countdown Count '3' Sound

cmpwi r6, 1
blt end # 3
bgt num1

# Flows into num2 anyway without a branch
num2:
li r4, 0xYYY #Countdown Count '2' Sound
b end

num1:
li r4, 0xZZZ #Countdown Count '1' Sound

end:
Reply
#3
I appreciate for the optimisations tip. I was thinking in a way to optimise it without thinking too deeply, and then I decided to release on the state it is
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)