Scalable Speed [JoshuaMK]
#1
Scalable Speed (GCN) [JoshuaMK]

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.



(NTSC-U)
C25743C8 00000011
D01D0020 3C608153
81430C00 280A0000
40A2000C 3CE03FC0
90E30C00 C0030C00
C03D0014 3D808034
618BC205 896B0000
618C3E80 A18C0000
718C0890 280C0890
41820024 2C0B00C0
41810014 2C0B0040
4181002C EC210028
48000024 EC21002A
4800001C 3CE042AB
38E73333 90FD0014
3CE042F0 90FD002C
4800000C D03D0014
D03D002C 00000000

(PAL)
C257AC2C 00000011
D01D0020 3C608153
81430C00 280A0000
40A2000C 3CE03FC0
90E30C00 C0030C00
C03D0014 3D808034
618BC205 896B0000
618C3E80 A18C0000
718C0890 280C0890
41820024 2C0B00C0
41810014 2C0B0040
4181002C EC210028
48000024 EC21002A
4800001C 3CE042AB
38E73333 90FD0014
3CE042F0 90FD002C
4800000C D03D0014
D03D002C 00000000

(NTSC-J)
C257A5AC 00000011
D01D0020 3C608153
81430C00 280A0000
40A2000C 3CE03FC0
90E30C00 C0030C00
C03D0014 3D808034
618BC205 896B0000
618C3E80 A18C0000
718C0890 280C0890
41820024 2C0B00C0
41810014 2C0B0040
4181002C EC210028
48000024 EC21002A
4800001C 3CE042AB
38E73333 90FD0014
3CE042F0 90FD002C
4800000C D03D0014
D03D002C 00000000

(NTSC-K)
C2568C84 00000011
D01D0020 3C608153
81430C00 280A0000
40A2000C 3CE03FC0
90E30C00 C0030C00
C03D0014 3D808034
618BC205 896B0000
618C3E80 A18C0000
718C0890 280C0890
41820024 2C0B00C0
41810014 2C0B0040
4181002C EC210028
48000024 EC21002A
4800001C 3CE042AB
38E73333 90FD0014
3CE042F0 90FD002C
4800000C D03D0014
D03D002C 00000000



#~~~~~~~~~~~~#
#Inject > 805743C8#
#~~~~~~~~~~~#

#Params
#r11 = C-Stick Vertical Axis
#r12 = Controller Button Value
#r0 = L+R+Z Logical AND
#r3 = Mem81 Address
#r7 = Value Set
#r10 = Flag
#f0 = Original Instruction, Value to be Added
#f1 = Value to be Added to
#f5 = Value to be Added to

stfs f0, 0x0020 (r29)
lis r3, 0x8153
lwz r10, 0x0C00 (r3)
cmplwi r10, 0
bne+ already_set_values
lis r7, 0x3FC0
stw r7, 0x0C00 (r3)
already_set_values:
lfs f0, 0x0C00 (r3)
lfs f1, 0x0014 (r29)
lis r12, 0x8034
ori r11, r12, 0xC205
lbz r11, 0 (r11)
ori r12, r12, 0x3E80
lhz r12, 0 (r12)
andi. r12, r12, 0x0890
cmplwi r12, 0x0890
beq reset
cmpwi r11, 0xC0
bgt grow_speed
cmpwi 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:



Code Creator: JoshuaMK
Code Contributors: Volderbeek (Speed Address)
Super Mario Eclipse, what Super Mario Sunshine could've been.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)