Tele-Swap [Vega] This code allows you to press a desired button(s) to instantly swap the XYZ coordinates of the two players in the match. XXXX = Controller Address ZZZZ = Button to activate swap Link to X & Z values - https://mariokartwii.com/nonmkwcodes/dbzbt3/bt3gecko.txt NTSC-U C20453B0 0000000F 3CA0803B A0A5XXXX 2805ZZZZ 3CA08000 41820010 38000000 980503FF 48000050 880503FF 2C000001 41820044 38000001 980503FF 801EFFF8 2C000000 4182000C 3984E970 48000008 39841690 E04C0000 C06C0008 E0040000 C0240008 F0440000 D0640008 F00C0000 D02C0008 38A30020 60000000 00000000 Code creator: Vega Source~ #START ASSEMBLY #Address #NTSC-U = 800453B0 #Hook address is the first load done after manually edit XYZ's in dynamic memory, thus it's the 'best' hook for modifying the XYZs before they get loaded anywhere w/o having to 'deep-dive' too much. #r4 = XYZ Mem Pointer #r30 = Master Pointer + 0x10 #r0 & r5 = safe for use #f0 thru f3 safe for use #Statements .set P1P2XYZPointerGap, 0x1690 #90f93610 - 90f91f80 #Set Controller Upper Half lis r5, 0x803B #Check Button halfword value lhz r5, 0x0E20 (r5) #GCN Controller used for compilation, adjust this accordingly cmplwi r5, 0x0008 #GCN Up button used for compilation, adjust this accordingly #Set EVA Upper before branching (for control button status) lis r5, 0x8000 #Branch based on if activator was pressed beq- button_pressed #Nothing pressed, reset button status li r0, 0 stb r0, 0x03FF (r5) b original_instruction #Button Pressed, adjust status #0 = Not pressed yet #1 = Been pressed button_pressed: lbz r0, 0x03FF (r5) cmpwi r0, 1 beq- original_instruction #Don't reactivate code if button is being held down li r0, 1 #Set flag for button now pressed stb r0, 0x03FF (r5) #Button just pressed, time to activate code. Check slot based on current Master Pointer in r30. lwz r0, -0x8 (r30) #MP + 0xC contains player's slot value cmpwi r0, 0 beq- add_gap #We're on 2P/COM. So we need to subtract P1P2XYZPointerGap value from r4 to get other player's XYZ Mem Pointer, save it in r12 subi r12, r4, P1P2XYZPointerGap b start_swap #We're on 1P. So we need to add P1P2XYZPointerGap value to r4 to get other player's XYZ Mem Pointer, save it in r12 add_gap: addi r12, r4, P1P2XYZPointerGap #Start swap. Load other player's XYZs (r12 pointer) into f2 and f3 start_swap: psq_l f2, 0 (r12), 0, 0 lfs f3, 0x8 (r12) #Load current player's XYZs (r4) pointer) into f0 and f1 psq_l f0, 0 (r4), 0, 0 lfs f1, 0x8 (r4) #Store other player's XYZs to current player's XYZ space psq_st f2, 0 (r4), 0, 0 stfs f3, 0x8 (r4) #Store current player's XYZs to other player's XYZ space psq_st f0, 0 (r12), 0, 0 stfs f1, 0x8 (r12) #Original instruction original_instruction: addi r5, r3, 0x20 #END ASSEMBLY