Set CPU Soft Speed Limit [B_squo]
#1
Set CPU Soft Speed Limit [B_squo]

Also known as Set CPU Rubberband Speed Limit. This code will set the Soft Speed Limit for all CPU's.

The CPU Soft Speed limit is a dynamic speed limit that effects all CPU's. This limit is determined by some factors such as...
  • whether or not CPU is hit by a blooper
  • if Human has an advantage (i.e. taking a shortcut)
  • current lap
  • distance between you and CPU(s)
  • values from kartAISpdParam.bin / AIParam.bas

Under normal conditions, the highest this Limit reaches is around 110-116. The lowest is around 30.

XXXXXXXX = Speed (single float value)

Example X values:
41F00000 = 30.0
42700000 = 60.0
42B40000 = 90.0
42F00000 = 120.0

Online converter - https://www.h-schmidt.net/FloatConverter/IEEE754.html

NTSC-U
C273428C 00000002
3D60XXXX 616BXXXX
9163001C 00000000

PAL
C2744158 00000002
3D60XXXX 616BXXXX
9163001C 00000000

NTSC-J
C27437C4 00000002
3D60XXXX 616BXXXX
9163001C 00000000

NTSC-K
C2732518 00000002
3D60XXXX 616BXXXX
9163001C 00000000

Source:
Code:
#Handy Directive
.set speed, 0x42F00000 #120.0 used for assembling, change this to what you want

#Set new CPU soft speed limit in GPR
lis r11, speed@h
ori r11, r11, speed@l

#Write it, no need for Original Instruction
stw r11, 0x001C (r3)


Code creator: B_squo
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)