GCN to PS/XBOX Controller Preferred Input Remap for Menus [Vega] Swap Menu Inputs to Xbox/PS Standard; GCN [Vega] This code makes the following button input changes that *ONLY* occur during Menu Navigation: GCN A = Disabled GCN B = GCN A GCN X = GCN B This new input design makes Menu Navigation controller inputs aligned with the standard for Xbox/PlayStation controllers (A/Cross for Accept, B/Circle for Back). This is assuming that you have a controller profile set up that's already aligned to mimic BT3 PS2 Gameplay: GCN A = Xbox X/PS Square GCN B = Xbox A/PS Cross GCN X = Xbox B/PS Circle GCN Y = Xbox Y/PS Triangle NTSC-U Launch C221FD90 00000012 38210050 3D80803D 800CF8F8 70000001 41820018 800CF8F4 540C97FF 4082000C 5400BFFF 41820068 A1610008 A1810014 556B062C 558C062C B1610008 B1810014 7D8802A6 39600008 48000015 39600014 4800000D 7D8803A6 48000034 7D4B0A2E 71400200 41A20010 694A0200 614A0100 48000014 71400400 4DA20020 694A0400 614A0200 7D4B0B2E 4E800020 00000000 Code creator: Vega #C2 Hook Address's (instruction before blr of PADRead) #NTSC-U Launch 8021FD90 #NTSC-U Rev1 80220960 #PAL 802214B4 #Source Region setting, SET ME BEFORE ASSEMBLING!!!!!!!!!!!!!! .set region, '' #Set the unk ptr that is a hardcoded constant, ofc this varies per region/version of DBZ BT3 .if (region == 'l') .set UnkPtr, 0x803CF8F8 .elseif (region == 'r') .set UnkPtr, 0x803D06B8 .elseif (region == 'p') .set UnkPtr, 0x803D10B8 .else .err .endif #Set handy symbols .set UnkPtr2, UnkPtr - 4 .set A, 0x0100 .set B, 0x0200 .set X, 0x0400 .set NOT_A, 0xFFFFFEFF #Original Instruction, pop the Stack Frame of PADRead addi sp, sp, 0x0050 #Set UnkPtr upper lis r12, UnkPtr@ha #Load match/non-match word status (unkptr) #0 = Not In Match #1 = In Match #If Not in Match, we must change button inputs #If in Match, check if we are at cinmatic preview, paused, or paused for match ending (unkptr -4) #If in Match and not paused, SKIP code (blr) #(Unkptr - 4) word bits; all bits low if first time entering a Match #Bits 0 thru 15 unk; unused? #Bit 16 = unk; checked by at least 1 func #Bit 17 = set High when Match is Paused voluntarily (not by Match ending). Otherwise it's always set low #Bit 18 = unk; checked by multiple funcs #Bit 19 = unk; checked by multiple funcs #Bit 20 = unk; unused? #Bit 21 = set High only when text/image "Ready!" appears. Otherwise it's always set low #Bit 22 = set High when Cinematic Preview of Map & Chars plays, set High for Pause Menu that occurs when Match ends. afterwards bit is left high. set High after leaving any sort of Pause Menu to leave Match. Gets set low during intermission loading screen #Bit 23 = Set High when Match is voluntarily paused. Left High is leaving Match from voluntary pause. Gets set low during Match intermission screen #Bits 24 thru 31 = unk; unused? lwz r0, UnkPtr@l (r12) andi. r0, r0, 1 #Just in case, do bit instead of byte check, you never know..... beq- disable_A lwz r0, UnkPtr2@l (r12) extrwi. r12, r0, 1, 17 #If bit 17 is high, then we are paused in a match bne- disable_A extrwi. r0, r0, 1, 22 #If bit 22 is high, then we are at cinematic preview or force pause due to end of match beq- end_code #We are in some sort of Menu #First thing's first, disable A button disable_A: lhz r11, 0x8 (sp) lhz r12, 0x14 (sp) rlwinm r11, r11, 0, NOT_A rlwinm r12, r12, 0, NOT_A sth r11, 0x8 (sp) sth r12, 0x14 (sp) #Save LR mflr r12 #Do button swaps for Port 1 li r11, 0x8 bl do_code #Do button swaps for Port 2 li r11, 0x14 bl do_code #Restore LR mtlr r12 #End code b end_code #Do code subroutine do_code: #Load buttons lhzx r10, r11, sp #Check B andi. r0, r10, B beq+ check_X #B pressed, remove B, set A high xori r10, r10, B ori r10, r10, A b update #Check X check_X: andi. r0, r10, X beqlr+ #End subroutine #X pressed, remove X, set B high xori r10, r10, X ori r10, r10, B #Update new button values update: sthx r10, r11, sp blr end_code: