Skip to content

Commit 7c0c329

Browse files
Improve docs (#37)
* fix markdown lint * ida script instructions * hactool instructions
1 parent 45cf3a4 commit 7c0c329

3 files changed

Lines changed: 18 additions & 6 deletions

File tree

docs/BUILDING.md

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# Building
2+
23
The decomp toolchain was created for Linux & MacOS users. While it isn't a hard requirement, if you're running Windows its advised that you [setup WSL](https://learn.microsoft.com/en-us/windows/wsl/install) with an Ubuntu-like distro for the easiest setup.
34

45
The instructions below assume you're running a form of Linux (WSL or native).
@@ -8,7 +9,7 @@ The instructions below assume you're running a form of Linux (WSL or native).
89
* Python 3.6 or newer with [pip](https://pip.pypa.io/en/stable/installation/)
910
* Ninja
1011
* CMake 3.13+
11-
* If you are on Ubuntu 18.04, you must
12+
* If you are on Ubuntu 18.04, you must
1213
first [update CMake by using the official CMake APT repository](https://apt.kitware.com/).
1314
* ccache (to speed up builds)
1415
* llvm-objdump
@@ -40,9 +41,16 @@ Additionally, you'll also need:
4041

4142
2. Run `git submodule update --init --recursive`
4243

43-
Next, you'll need to acquire the **original v1.0.17 `main` NSO executable**.
44+
3. Acquire the **original v1.0.17 `main` NSO executable**.
45+
1. Acquire an NSP dump of v1.0.17. [Dumping guide](https://zeldamods.org/wiki/Help:Dumping_games#Switch)
46+
2. Setup [hactool](https://github.com/SciresM/hactool) and configure your dumped `title.keys`.
47+
3. Run `hactool [path to the NSP] -t pfs0 --outdir=extracted`.
48+
4. `cd` into `extracted`.
49+
5. Find the largest NCA.
50+
6. Run `hactool [path to largest NCA] -t nca --exefsdir=exefs`
51+
7. `exefs/main` is the NSO.
4452

45-
3. Run `tools/setup.py [path to the NSO]`
53+
4. Run `tools/setup.py [path to the NSO]`
4654
* This will:
4755
* install tools/check to check for differences in decompiled code
4856
* convert the executable if necessary

docs/CONTRIBUTING.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# Contributing
2+
23
As this project is in its very early stages, its hard to put guidelines on something that will evolve over time as contributors gain a better understanding of the game's internals.
34

45
While almost all source paths aren't known, a few .cpp file names do appear in the Wii U Edition's global static constructors, along with a couple asserts giving file paths. Follow these file names wherever possible.

docs/DECOMPILERS.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,17 @@
11
# Decompilers
22

33
## IDA Pro
4-
1. Install `nxo64.py` from `reswitched/loaders`. Instructions are available [here](https://github.com/reswitched/loaders?tab=readme-ov-file#installation)
4+
5+
1. Install `nxo64.py` from `reswitched/loaders`. [Instructions](https://github.com/reswitched/loaders?tab=readme-ov-file#installation)
56
2. Open `ida64.exe` and disassemble `main.nso`.
7+
3. To use scripts, click `File->Script File` and select the script you want to use.
68

79
## Ghidra
10+
811
### Setup Instructions
912

10-
1. Setup `Ghidrathon`. Instructions are available [here](https://github.com/mandiant/Ghidrathon#installing-ghidrathon). Make sure `Ghidrathon` has access to the `toml` package.
11-
2. Setup `Ghidra Switch Loader`. Instructions are available [here](https://github.com/Adubbz/Ghidra-Switch-Loader).
13+
1. . Setup [Ghidrathon](https://github.com/mandiant/Ghidrathon). Make sure `Ghidrathon` has access to the `toml` package.
14+
2. Setup [Ghidra Switch Loader](https://github.com/Adubbz/Ghidra-Switch-Loader).
1215
3. Create a new project. When importing `main.nso`, click `Options`. Then set `Base Address` to `0x7100000000`.
1316
4. Open the `Script Manager` (green play icon) from Ghidra's toolbar.
1417
5. Click on Manage Script Directories (bullet points icon) inside the Script Manager, and add `tools/ghidra`. Do not add `tools/common/ghidra_scripts`.

0 commit comments

Comments
 (0)