Skip to content

My findings while reverse-engineering Pokémon Super Mystery Dungeon for the 3DS.

Notifications You must be signed in to change notification settings

ronikirla/psmd-re

Repository files navigation

psmd-re

My findings while reverse-engineering Pokémon Super Mystery Dungeon for the 3DS. Includes writeups for discovered game mechanics and an importable Ghidra project XML that includes function names etc.

Current major discoveries

How to import the Ghidra project XML

  1. Obtain the game ROM (US version) by for example dumping the cartridge using GodMode9.
  2. Extract the ExeFS of the rom using a tool such as .Net 3DS toolkit .
  3. Convert the 3DS executable into an ELF using ctr-elf. MD-5 checksum should be 818A4462B4D1977D2135AEC37956A375.
  4. Create a new Ghidra project, import the ELF-file, but do not analyze the file.
  5. Go to File -> Add to program and choose the XML-file from this repository.

Unfortunately, since Ghidra doesn't export local variable names for some reason, the only way for me to share them is by sharing the decompiled output of the well-annotated functions as text-files. They can be found in this repository.

Other tools used

  • CTRPluginFramework3DS to perform narrowing RAM searches for values. These memory addresses can then be used as watchpoints for finding relevant functions in the code.
  • The GDB stub in the Luma 3DS custom firmware to perform active analysis, i.e. debug the game on console.

About

My findings while reverse-engineering Pokémon Super Mystery Dungeon for the 3DS.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published