Speed-O-Meter [Vega] This code will display the desired player (via slot value) speed in the match timer. The timer is only effected visually. Match still ends when it's suppose to end. Only tested in basketball, may not work everywhere. X = Slot 2 = P1 for 2v2 4 = P1 for 3v3 Too lazy to figure out the rest as it's not a regular ascending/descending order NOTE: This code makes use of the following addresses... 0x800007E7 thru 0x800007FF Make sure no other codes in your GCT/Cheat-Manager are using those addresses! NTSC-U 040007E8 45610000 040007FC 453B8000 C20DB570 00000006 3F408000 881A07E7 2F800001 C0040098 419E0018 2F9D000X 409E0010 38000001 981A07E7 909A07EC 60000000 00000000 C33CE7E0 0000000A 3CA08000 808507EC E18507F0 C1A507F8 E0040098 C02400A0 F00507F0 D02507F8 10006028 EC216828 10000032 10000014 EC01007A FC000034 EC000030 C18507FC C1A507E8 EC206B3A 60000000 00000000 Code creator: Vega Code credits: Bully (hook finder for 1st ASM) === 32-bit RAM Writes: Writes the single precision float value of 3600.0 at address 0x800007E8. Writes the single precision float value of 3000.0 at address 0x800007FC. === 1st ASM: #START ASSEMBLY #Address #NTSC-U = 800DB570 #Store r4 pointer for each character to EVA #For w/e reason the slots swap between 2 slot-address combos #1st slot-address connection combo is the one we'll use #With said slot-address combo , slot 2 on 2v2 is P1, and slot 4 on 3v3 is P1 #Based on slot number use that as index to store to EVA #r0, and r26 thru r28 safe for use #r29 = character slot, sort of, we'll work for what we need it to do #****CR0 NOT SAFE**** #Set EVA Upper lis r26, 0x8000 #Check First-Time-Execute Flag lbz r0, 0x07E7 (r26) #Check flag cmpwi cr7, r0, 1 #Original instruction lfs f0, 0x0098 (r4) #Now branch beq- cr7, end #Check if we're on correct slot set by User cmpwi cr7, r29, 2 #2v2 P1 set for compilation, adjust this accordingly bne- cr7, end #**DON'T** set flag yet #Slot found, Set Flag li r0, 1 stb r0, 0x07E7 (f26) #Store pointer to EVA (0x800007EC) stw r4, 0x07EC (r26) #End code end: #END ASSEMBLY === 2nd ASM: #START ASSEMBLY #Address #NTSC-U = 813CE7E0 #Fyi address gets executed every frame #Do XYZ Speed calculations and set the speed on the timer #0x800007E7 = first time flag (not relevant to this specific ASM code) #0x800007E8 = 3600.0 #0x800007EC = pointer #0x800007F0 = last frame X #0x800007F4 = last frame Y #0x800007F8 = last frame Z #0x800007FC = 2400.0 #pointer + 0x98 = this frame X #pointer + 0x9C = this frame Y #pointer + 0xA0 = this frame Z #r4 and r5 safe for use #f0 and f1 safe for use #f1 must end up being XYZ Speed x 60 #Set EVA Upper lis r5, 0x8000 #Load current XYZ pointer into r4 lwz r4, 0x07EC (r5) #Load last frame's XYZs from EVA psq_l f12, 0x07F0 (r5), 0, 0 lfs f13, 0x07F8 (r5) #Load current frame's XYZs from r4 pointer, and then store to EVA psq_l f0, 0x0098 (r4), 0, 0 lfs f1, 0x00A0 (r4) psq_st f0, 0x07F0 (r5), 0, 0 stfs f1, 0x07F8 (r5) #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 #(f1 x f1) + f0 #Get Square Root frsqrte f0, f0 fres f0, f0 #Multiply XYZ Speed by 60. It needed to mimic the frame count remaining in game; place this final result in f1. Omit original instruction of "fmr f1, f31" #When then need to multiply by 50 to get a workable speed range because differences in XYZ movements are small #Thus we will use 3000 to multiply by. (60 x 50) #Finally we need to add 3600 to that result. Why? Because the timer has flickering problems from animation/font-size changes when its below 10 lfs f12, 0x7FC (r5) #Load 3000 lfs f13, 0x7E8 (r5) #Load 3600 fmadds f1, f0, f12, f13 #(f0 x f12) + f13 #END ASSEMBLY