Speed-O-Meter [Vega] This is a code that displays the character's speed on the game's timer! You can choose to display 1P's speed for 2P/COM's speed. The timer itself will still function fine, it's just that it will now display speed. Won't work in Infinite Matches. MMMMMMMM value is a multiplier. I've added this because the true speed by itself is kind of a dull range. (i.e. Metacooler slowly moving is 3 units per frame and while flying fast is 15). The multiplier opens up the range. Example M values: 3F800000 = x1 (keep speed 100% true) 40000000 = x2 40400000 = x3 40C00000 = x6 (what I personally prefer) 41200000 = x10 Number convertor tool to generate M values if you need it - https://www.h-schmidt.net/FloatConverter/IEEE754.html S = Slot (0 = 1P; 1 = 2P/COM) NTSC-U C203BD1C 0000000C 2C1D000S 40820054 3D808000 E18C07F0 C1AC07F8 F00C07F0 D02C07F8 10006028 EC216828 10000032 10000014 EC01007A FC000034 EC000030 3D60MMMM 616BMMMM 916C07FC C1AC07FC EC000372 FC00001C 396007FC 7C0B67AE 7FC3F378 00000000 C20C6A08 00000002 3C608000 806307FC 60000000 00000000 Code creator: Vega Code credits: JoshuaMK (provided Vector Speed Formula) Sources~ 1st source: #START ASSEMBLY #Address #NTSC-U = 8003BD1C #Notes #Hook occurence swaps between 1P and 2P/COM. #Register Notes #r3 (before default insruction) points to XYZ coordinatse exactly #r29 = Slot (0 = 1P; 1 = 2P/COM) #r30 = Master Pointer #f0 ps0 = X Coordinate (left - right) #f0 ps1 = Y Coordinate (up - down) #f1 ps0 = Z Coordinate (forward - back) #f1 ps1 = Always 1 (0x3F800000) #Vector Speed Formula (thank you Joshua!) = sqrt{[(x2 - x1)^2] + [(y2 - y1)^2] + [(z2 - z1)^2]} #Check User slot cmpwi r29, 0 #1P used for compilation, adjust this accordingly bne- original_instruction #Set EVA Upper lis r12, 0x8000 #Load last frame's XYZs from EVA psq_l f12, 0x07F0 (r12), 0, 0 lfs f13, 0x07F8 (r12) #Write in current frame's XYZs to update EVA psq_st f0, 0x07F0 (r12), 0, 0 stfs f1, 0x07F8 (r12) #Do the formula: sqrt{[(x2 - x1)^2] + [(y2 - y1)^2] + [(z2 - z1)^2]} #X2 = f0 ps0 #X1 = f12 ps0 #Y2 = f0 ps1 #Y1 = f12 ps1 #Z2 = f1 ps0 #Z1 = f13 ps0 #Preform X2 minus X1, and Y2 minus Y1 ps_sub f0, f0, f12 #Z2 minus Z1 fsubs f1, f1, f13 #Raise X and Y to power of 2 ps_mul f0, f0, f0 #Add X + Y ps_sum0 f0, f0, f0, f0 #Raise Z to power of 2, then add Z to (X+Y) fmadds f0, f1, f1, f0 #Get Square Root frsqrte f0, f0 fres f0, f0 #Set and load User's multiplier into f13 lis r11, 0x3F80 #x1 (show true speed) used for compilation, adjust this accordingly ori r11, r11, 0x0000 stw r11, 0x07FC (r12) lfs f13, 0x07FC (r12) #Use the multiplier. We have final float result. fmuls f0, f0, f13 #Convert to integer with standard rounding; btw float result is always positive, no need for fabs instruction fctiw f0, f0 #Store integer to 0x800007FC li r11, 0x07FC stfiwx f0, r11, f12 #Original instruction original_instruction: mr r3, r30 ========== 2nd Source: #START ASSEMBLY #Address #NTSC-U = 800C6A08 #r4 & r5 safe for use #r3 safe for use if you don't need original instruction #Original instruction is extsh r3, r3 (not needed in this source) #Set EVA Upper lis r3, 0x8000 #Load Integer from EVA (set r3 which is in-game timer value) lwz r3, 0x07FC (r3) #END ASSEMBLY