09-19-2019, 06:10 AM
(This post was last modified: 03-25-2025, 01:02 PM by Vega.
Edit Reason: Ports fixed, added CPU-disabling
)
Scalable Speed (GCN) [JoshuaMK]
For GCN Port 1 Only. Code only effects you. CPUs are left alone.
Like my Scalable Gravity code, this lets you freely scale your speed. Negative values have some interesting effects.
To control your speed simply tilt the c-stick up to increase speed, and tilt the c-stick down to decrease speed. I designed the controls to be compatible with most other codes.
PAL
C257AC2C 00000012
D01D0020 819D0000
818C0000 898C0010
3D60809C 816BD728
896B0B84 7C0C5800
40A2006C 3C608153
81430C00 2C0A0000
40A2000C 3CE03FC0
90E30C00 C0030C00
C03D0014 3D608035
896B0585 280B00C0
41810014 280B0040
4181002C EC210028
48000024 EC21002A
4800001C 3CE042AB
38E73333 90FD0014
3CE042F0 90FD002C
4800000C D03D0014
D03D002C 00000000
NTSC-U
C25743C8 00000012
D01D0020 819D0000
818C0000 898C0010
3D60809C 816B8F68
896B0B84 7C0C5800
40A2006C 3C608153
81430C00 2C0A0000
40A2000C 3CE03FC0
90E30C00 C0030C00
C03D0014 3D608035
896BC205 280B00C0
41810014 280B0040
4181002C EC210028
48000024 EC21002A
4800001C 3CE042AB
38E73333 90FD0014
3CE042F0 90FD002C
4800000C D03D0014
D03D002C 00000000
NTSC-J
C257A5AC 00000012
D01D0020 819D0000
818C0000 898C0010
3D60809C 816BC788
896B0B84 7C0C5800
40A2006C 3C608153
81430C00 2C0A0000
40A2000C 3CE03FC0
90E30C00 C0030C00
C03D0014 3D608035
896BFF05 280B00C0
41810014 280B0040
4181002C EC210028
48000024 EC21002A
4800001C 3CE042AB
38E73333 90FD0014
3CE042F0 90FD002C
4800000C D03D0014
D03D002C 00000000
NTSC-K
C2568C84 00000012
D01D0020 819D0000
818C0000 898C0010
3D60809B 816BBD68
896B0B84 7C0C5800
40A2006C 3C608153
81430C00 2C0A0000
40A2000C 3CE03FC0
90E30C00 C0030C00
C03D0014 3D608034
896BE585 280B00C0
41810014 280B0040
4181002C EC210028
48000024 EC21002A
4800001C 3CE042AB
38E73333 90FD0014
3CE042F0 90FD002C
4800000C D03D0014
D03D002C 00000000
Code creator: JoshuaMK
Code credits: Volderbeek (Speed Address), Vega (don't effect CPUs), Stebler (Racedata ptr code)
For GCN Port 1 Only. Code only effects you. CPUs are left alone.
Like my Scalable Gravity code, this lets you freely scale your speed. Negative values have some interesting effects.
To control your speed simply tilt the c-stick up to increase speed, and tilt the c-stick down to decrease speed. I designed the controls to be compatible with most other codes.
PAL
C257AC2C 00000012
D01D0020 819D0000
818C0000 898C0010
3D60809C 816BD728
896B0B84 7C0C5800
40A2006C 3C608153
81430C00 2C0A0000
40A2000C 3CE03FC0
90E30C00 C0030C00
C03D0014 3D608035
896B0585 280B00C0
41810014 280B0040
4181002C EC210028
48000024 EC21002A
4800001C 3CE042AB
38E73333 90FD0014
3CE042F0 90FD002C
4800000C D03D0014
D03D002C 00000000
NTSC-U
C25743C8 00000012
D01D0020 819D0000
818C0000 898C0010
3D60809C 816B8F68
896B0B84 7C0C5800
40A2006C 3C608153
81430C00 2C0A0000
40A2000C 3CE03FC0
90E30C00 C0030C00
C03D0014 3D608035
896BC205 280B00C0
41810014 280B0040
4181002C EC210028
48000024 EC21002A
4800001C 3CE042AB
38E73333 90FD0014
3CE042F0 90FD002C
4800000C D03D0014
D03D002C 00000000
NTSC-J
C257A5AC 00000012
D01D0020 819D0000
818C0000 898C0010
3D60809C 816BC788
896B0B84 7C0C5800
40A2006C 3C608153
81430C00 2C0A0000
40A2000C 3CE03FC0
90E30C00 C0030C00
C03D0014 3D608035
896BFF05 280B00C0
41810014 280B0040
4181002C EC210028
48000024 EC21002A
4800001C 3CE042AB
38E73333 90FD0014
3CE042F0 90FD002C
4800000C D03D0014
D03D002C 00000000
NTSC-K
C2568C84 00000012
D01D0020 819D0000
818C0000 898C0010
3D60809B 816BBD68
896B0B84 7C0C5800
40A2006C 3C608153
81430C00 2C0A0000
40A2000C 3CE03FC0
90E30C00 C0030C00
C03D0014 3D608034
896BE585 280B00C0
41810014 280B0040
4181002C EC210028
48000024 EC21002A
4800001C 3CE042AB
38E73333 90FD0014
3CE042F0 90FD002C
4800000C D03D0014
D03D002C 00000000
Code creator: JoshuaMK
Code credits: Volderbeek (Speed Address), Vega (don't effect CPUs), Stebler (Racedata ptr code)
Code:
#PAL 8057AC2C
#NTSC-U 805743C8
#NTSC-J 8057A5AC
#NTSC-K 80568C84
.set region, '' #Fill in p, e, j, or k (case sensitive)
.if (region == 'p')
.set ptr_raceData, 0x809bd728
.set gcn_button, 0x80348200
.set gcn_cstick, gcn_button + 0x8385
.elseif (region == 'e')
.set ptr_raceData, 0x809b8f68
.set gcn_button, 0x80343E80
.set gcn_cstick, gcn_button + 0x8385
.elseif (region == 'j')
.set ptr_raceData, 0x809bc788
.set gcn_button, 0x80347B80
.set gcn_cstick, gcn_button + 0x8385
.elseif (region == 'k')
.set ptr_raceData, 0x809abd68
.set gcn_button, 0x80336200
.set gcn_cstick, gcn_button + 0x8385
.else
.err
.endif
#Params
#r11 = C-Stick Vertical Axis
#r12 = Controller Button Value
#r3 = Mem81 Address
#r7 = Value Set
#r10 = Flag
#f0 = Original Instruction, Value to be Added
#f1 = Value to be Added to
#OG instruction
stfs f0, 0x0020 (r29)
#Load slot code is hooked on
lwz r12, 0 (r29)
lwz r12, 0 (r12)
lbz r12, 0x10 (r12)
#Load your slot (this may be needed for online, need to test if hook only gets executed for you if online)
lis r11, ptr_raceData@ha
lwz r11, ptr_raceData@l (r11)
lbz r11, 0xb84 (r11)
#Check slots
cmpw r12, r11
bne+ past_end
#Execute Code
lis r3, 0x8153
lwz r10, 0x0C00 (r3)
cmpwi r10, 0
bne+ already_set_values
lis r7, 0x3FC0
stw r7, 0x0C00 (r3)
already_set_values:
lfs f0, 0x0C00 (r3)
lfs f1, 0x0014 (r29)
#Check Stick
lis r11, gcn_cstick@ha
lbz r11, gcn_cstick@l (r11)
cmplwi r11, 0xC0
bgt- grow_speed
cmplwi r11, 0x40
bgt- the_end
fsubs f1, f1, f0
b the_end
grow_speed:
fadds f1, f1, f0
b the_end
reset:
lis r7, 0x42AB
addi r7, r7, 0x3333
stw r7, 0x0014 (r29)
lis r7, 0x42F0
stw r7, 0x002C (r29)
b past_end
the_end:
stfs f1, 0x0014 (r29)
stfs f1, 0x002C (r29)
past_end:
Super Mario Eclipse, what Super Mario Sunshine could've been.