Custom Text Box [Vega] This code will allow you to place in custom text at any desired text box. View the info at the bottom to know how to select the specific text box that you want to overwrite. XXXXXXXX = MemPointer (view bottom of file for more info) YY = Second digit of 1st 16-bit ASCII character ZZZZ's = 16-bit ASCII characters The string of text must be 16-bit ASCII aka Wide ASCII. However, in the game, all 1st ASCII characters for strings are FEYY, where YY is the 2nd portion. This YY value follows 8-bit ASCII because the first portion must be FE. Your string *MUST* end in 0000. Any unfilled ZZZZ's should be filled to 0000. Example string: 123abc 123abc in 16-bit ASCII = 0031 0032 0033 0061 0062 0063 YY = 31 ZZZZ's are.. 00320033 00610062 00630000 <--- Notice the 0000 at end, all strings *MUST* end in 0000 rest of unfilled Z's must be 0's. Final NOTE: Your new string cannot be longer than the original/legit string. If so, it will be cut short when displayed in the game. NTSC-U Rev1 C202B374 00000018 7FC40214 3D80XXXX 618CXXXX 7F8CF000 409E00AC 48000085 0000FEYY ZZZZZZZZ ZZZZZZZZ ZZZZZZZZ ZZZZZZZZ ZZZZZZZZ ZZZZZZZZ ZZZZZZZZ ZZZZZZZZ ZZZZZZZZ ZZZZZZZZ ZZZZZZZZ ZZZZZZZZ ZZZZZZZZ ZZZZZZZZ ZZZZZZZZ ZZZZZZZZ ZZZZZZZZ ZZZZZZZZ ZZZZZZZZ ZZZZZZZZ ZZZZZZZZ ZZZZZZZZ ZZZZZZZZ ZZZZZZZZ ZZZZZZZZ ZZZZZZZZ ZZZZZZZZ ZZZZZZZZ ZZZZZZZZ ZZZZZZZZ ZZZZZZZZ 7D8802A6 397EFFFF A54B0002 2F8A0000 419E0014 A54C0002 2F8A0000 B14B0000 409EFFE8 00000000 Code creator: Vega ========== Source: #START ASSEMBLY #Address #NTSC-U = 8002B374 #Register notes and safety #r30 (after og instruction) = MemPointer (exact pointer to text/string) #LR = safe #****cr0 *NOT* safe**** #Author's Note! #For whatever reason setting r30 to our custom pointer won't work but it causes all other text box instances to be cleared (text everyelse is wiped). I cannot figure out what the reason for this is so a quirky fix is instead of adjusting r30 to point to our BL table, we will simply transfer data from BL table to Memory to overwrite legit string #Another note (to other coders/devs) #Yes you can modify this to where you can have swap/overwrite text LIVE (changes work in real time instantly). #Original Instruction add r30, r4, r0 #Set User's Pointer, each menu and submenu have their own text root pointer constant lis r12, 0xXXXX ori r12, r12, 0xXXXX #FILL THIS IN BEFORE COMPILING!!!*** #Check if pointers are a match & branch cmpw cr7, r12, r30 bne- cr7, end #Everything is a match, set the Custom Text Table. Text (except first byte) is 16-bit ASCII bl custom_text #Max length is 0x80 bytes .short 0x0000 #This must be null, it allows the loop to not have to decrement the first load address .byte 0xFE #2nd byte of Magic Header, don't edit this, fyi we don't need 1st byte of magic header in our code .zero 0x7D custom_text: mflr r12 #Transfer text, stop transferring once we hit legit string's null terminator addi r11, r30, -1 transfer: lhzu r10, 0x2 (r11) cmpwi cr7, r10, 0 #For the case if user's string is longer than legit string beq- cr7, end lhzu r10, 0x2 (r12) cmpwi cr7, r10, 0 #Prevent possibility of instructions in code getting transferred to memory after null terminator. Nothing will spill over to a lower legit string due to above cmpwi instruction, but it's not good practice to have junk placed into memory. Nothing should occur if we let it, but just in case... sth r10, 0 (r11) bne+ cr7, transfer #End end: #END ASSEMBLY ========== How to fill in XXXXXXXX (MemPointer): Here's a list of XXXXXXXX values I've documented so far for Rev1 (only a handful). Don't worry about the number on the far left, it's irrelevant to this code. Duel 0 - 915A73E0 - Now, let me enjoy the fight. 1 - 915A7420 - Fight against the computer. 2 - 915A7460 - Fight against another Player! 3 - 915A74A0 - Watch the computer fight. 4 - 915A74E0 - Nappa! Prepare for battle! 5 - 915A7520 - This is a serious one on one match! 6 - 915A75A0 - This is a team fight. Nappa! Follow me! 7 - 915A7620 - Form a team using limited Destruction Points! 8 - 915A76A0 - Hey uh... Think if we went Super Saiyan, my goatee would grow? 9 - 915A7720 - Time to fight! A - 915A7760 - Entertain me as much as you can. B - 915A77E0 - Alright Nappa, let's do this!