Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Loading Korean SMG with Korean MAP causes unintended load behavior. #76

Open
break-core opened this issue Aug 25, 2023 · 2 comments
Open

Comments

@break-core
Copy link

break-core commented Aug 25, 2023

Issue

I am trying to load the Korean version of Super Mario Galaxy (Super Mario Wii - Galaxy Adventure) into Ghidra, as well as loading in the Korean symbol map obtained from the NVIDIA Shield port of SMG. However, when loading it into Ghidra, I face the issue of having every symbol be incorrectly named.

Basically, when a function is loaded, the symbol loader will incorrectly assume that the function is some sort of namespace, and that there is a function inside of this namespace called "4". I would assume that this is because the function is incorrectly read (somehow), with the "4" to the left of the symbol being treated as the actual function rather than what is past the "4" in the actual map.

Repro

  1. Get a copy of the Korean version of SMG's DOL
  2. Get the Korean release symbol map (https://tcrf.net/Super_Mario_Galaxy/Chinese_NVIDIA_Shield_Port#Symbol_Maps)
  3. Have the latest version of the Ghidra Gamecube Loader installed (on Ghidra 10.3.2 at the time of writing this issue)
  4. Load the DOL in with Ghidra and then when prompted for a symbol map, load in the Korean release map.
  5. Check the "Namespaces" dropdown, and then navigate into a random function. You should see the bug appear.

Who does this effect?

Anyone who wishes to disassemble/decompile the Korean version of Super Mario Galaxy (which is the version used in popular SMG decomp projects like Petari) with Ghidra. Because all of the symbols are messed up, it is hard to navigate around.

Update

I have found a solution to this, but it is incredibly tedious. Basically, you need to remove all of the 4 numbers in front of the symbol. I have no idea why this works, despite the fact that other symbol maps do the exact opposite but eh, I'm not complaining.

@vabold
Copy link
Contributor

vabold commented Jan 1, 2024

Big Brain Academy: Wii Degree has the same problem. (USA, RevoYawaraka_US.SMAP)

@hippietrail
Copy link

hippietrail commented Sep 22, 2024

Which character set / code page / encoding are they using for Korean? I can't remember for Korean, but some languages have some encodings which assign letters where ASCII assigns symbols.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants