BenArthur_7

MSC Debugger simple guide

Mar 12th, 2018
316
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.05 KB | None | 0 0
  1. MSC Debugger simple guide:
  2.  
  3. Make sure that you have the following:
  4. Diibugger HBL: https://github.com/jam1garner/diibugger-hbl/releases
  5. MSC Debugger: https://github.com/jam1garner/msc-debugger
  6. PyMSC: https://github.com/jam1garner/pymsc
  7. WIIU IPv4 Adr: AAA.BBB.CCC.DDD
  8. MSC Sheet: https://docs.google.com/spreadsheets/d/1-Fv8UyW2eTCjDfRnN3ObRD9e6ig4zmlhU_IzCDWh86Q/edit?usp=sharing
  9.  
  10. Warning: MSC Debugger crashes fairly easily, so have patience when using it.
  11. ----------------
  12. The file 'diibugger.elf' should be placed inside the SD Card with the other homebrew launcher apps
  13.  
  14. WII U's IPv4 Address is obtainable from the Wii U internet browser. To do so, start the browser and go to Settings. Scroll down and press "Enable Developer Tools". Once enabled, it should show you the IP Address in a message with the format "AAA.BBB.CCC.DDD:XXXX".
  15. Only the numbers before the ":" are needed.
  16.  
  17. Load 'diibugger.elf' from the homebrew launcher. It will take you to the Mii Maker, but just exit it and load Smash. You can start MSC Debugger ahead of time using 'run.bat' and type in the Wii U's IP. However, your game must be completely loaded first BEFORE pressing 'Connect' or it will not work. You can do this at any point after the game loads the menu.
  18.  
  19. At this point, MSC Debugger should be connected. With a specific MSC script we want to debug, put it in the pymsc folder (or nearby) and start the Command Prompt there with the command: "python PrintMscScript.py [character name].mscsb [script number]".
  20. The output should look similar to this: https://imgur.com/wEqVWW3
  21.  
  22. Each number corresponds to a position in the MSC file. In MSC Debugger, go to "Breakpoints" > "Add" and type in the value. NOTE: the value is given in hexadecimal, however you do not need to include "0x" at the start of the number. Now that a breakpoint is added, if the game ever reaches that point in code, it will halt. Depending on the connection to the Wii U, MSC Debugger may be slow and take time to read the game's data.
  23.  
  24. MSC Debugger interface:
  25. MSC Disassembly:
  26. "Continue" allows you to continue execution of the game at a normal rate; still halts when reaching a Breakpoint.
  27. "Step" takes you through one line of MSC.
  28. "Break" halts the game's execution at the earliest possible line in MSC. If the game isn't loaded or if it is paused, then it waits until it can. This method can be used to verify the Entrypoint of MSC.
  29. --NOTE: MSC Debugger previously used a version of msc.py which contained outdated commands. If your version has "unk_2E" instead of the command "try", you should get MSC Debugger from source again. If you're just reading this for the first time then you already have the update, probably.
  30. Breakpoints:
  31. "Add" adds a breakpoint that the game will halt at when reached.
  32. "Remove" will remove a breakpoint; make sure to select the breakpoint you want to remove first.
  33. MSC Data: (The two most important tabs here are "Local Variables" and "Global Variables")
  34. "Local Variables" contains the values of variables locally referenced in each script. All values are written in hexadecimal, so you will usually have to convert the Float values into a readable number form. On the right side is where all the values on the stack are written, so this is where most of the debugging happens.
  35. "Global Variables" contains the values of variables shared across all MSC scripts. They are described in the MSC Note Sheet.
  36. MSC File:
  37. THESE OPTIONS ARE NOT SUPPORTED
  38. Memory:
  39. View the game's memory at specified addresses. I haven't used this yet but I suppose it can be helpful after searching for addresses with CEMU because this allows you to see neightboring addresses.
  40. Threads: (I don't know. Seems to not be important)
  41.  
  42. --NOTE: Registers, Local Variables, Global Variables and Memory support something called "Poking" which is changing the memory of the game. When you do so, you should include the formatting string such as "0x". With no formatting string, it considers it an integer. I do not know if it supports "f" for floats, because I always write with Hex. To poke a Local Variable, double click the number.
Add Comment
Please, Sign In to add comment