-
Notifications
You must be signed in to change notification settings - Fork 15
Using DolRecomp
Now that you have successfully built DolRecomp on your PC. Here's a guide on how to recompile GameCube DOLs, Wii DOLs, and even Wii U RPXs!
You will first need to extract the .dol file from your ISO ROM. This can be done using Dolphin Emulator, or you can use DolRecomp's built-in disc extractor.
# Windows
dolrecomp.exe extract path\to\iso extracted
dolrecomp.exe extract path\to\wbfs extracted
# MacOS/Linux
./dolrecomp extract path/to/iso extracted
./dolrecomp extract path/to/wbfs extractedNote: Currently. The Disk extractor only accepts
.isoand.wbfs. Support for.gcmand.rvzmay arrive in future updates.
- Ensure the GameCube ISO is on the path
- Right-click on the game and select Properties
- Select the Filesystems tab
- Right-click the disc at the top and select Extract Entire Disc, then choose the folder
- In the extracted folder, it will be in DATA/sys/main.dol
INCOMPLETE
With the extracted main.dol file, you can use it; it will be located in the sys folder.
# Windows
dolrecomp.exe --gamecube path\to\main.dol build_output
# MacOS/Linux
./dolrecomp --gamecube path/to/main.dol build_outputThe "build_output" argument is where the recompiled output folder is stored. If you do not wish to store it this way, you can run it like this:
# Windows
dolrecomp.exe --gamecube path\to\main.dol
# MacOS/Linux
./dolrecomp --gamecube path/to/main.dolThis will only generate the recompiled output folder in the directory where you are running dolrecomp.exe in a folder called generated.
Here I've used DolRecomp to recompile the extracted main.dol file from the Luigi's Mansion USA (GLME01) ROM .iso:
=== DOL Info ===
entry point: 0x80003100
game: GameCube DOL
BSS: 0x803968E0 (0x142F8D bytes)
text sections:
[0] file:0x00000100 -> addr:0x80003100 size:0x000023C0
[1] file:0x000024C0 -> addr:0x80005760 size:0x00206360
data sections:
[0] file:0x00208820 -> addr:0x800054C0 size:0x00000180
[1] file:0x002089A0 -> addr:0x80005640 size:0x00000120
[2] file:0x00208AC0 -> addr:0x8020BAC0 size:0x00000320
[3] file:0x00208DE0 -> addr:0x8020BDE0 size:0x00000020
[4] file:0x00208E00 -> addr:0x8020BE00 size:0x0000C300
[5] file:0x00215100 -> addr:0x80218100 size:0x0017E7E0
[6] file:0x003938E0 -> addr:0x804CFF60 size:0x00008080
[7] file:0x0039B960 -> addr:0x804D9880 size:0x000040C0
cpu: Gekko (GameCube)
generating code...
writing output to: .\generated\generated.c
decoding text[0]: 2288 instructions at 0x80003100
2288 decoded, 644 known, 1644 embedded data, 0 unknown
writing 1 chunks with 1 job
decoding text[1]: 530648 instructions at 0x80005760
530648 decoded, 529094 known, 1554 embedded data, 0 unknown
writing 130 chunks with 1 job
warning: this DOL may patch executable memory at runtime. generated code many need additional patches
possible patching instructions:
0x80003308-0x80003308
0x800036C0-0x800036C0
0x80007498-0x800074A0
0x8001F74C-0x8001F754
0x8001F760-0x8001F760
0x8001F774-0x8001F774
0x8001F7A4-0x8001F7A4
0x8001F7AC-0x8001F7AC
...
full list: .\generated\generated_smc.txt
done!
header: .\generated\generated.h
chunks: .\generated\chunks (131 files)With the extracted main.dol file you can use it, it will be located in the sys folder.
Wii DOLs require a six-character title ID, therefore first run this to install a stored database of them.
# Windows
dolrecomp.exe --setup
# MacOS/Linux
./dolrecomp --setupOnce this is complete, you will have a new folder called database containing titles.txt.
# Windows
dolrecomp.exe path\to\main.dol <title-ID> build_output
# MacOS/Linux
./dolrecomp path/to/main.dol <title-ID> build_outputThe "build_output" argument is where the recompiled output folder is stored. If you do not wish to store it this way, you can run it like this:
# Windows
dolrecomp.exe path\to\main.dol <title-ID>
# MacOS/Linux
./dolrecomp path/to/main.dol <title-ID>This will only generate the recompiled output folder in the directory where you are running dolrecomp.exe in a folder called _generated.
Here I've used DolRecomp to recompile the extracted main.dol file from the New Super Mario Bros. Wii USA (SMNE01) ROM .iso:
Searching for game info...
Found!
New Super Mario Bros. Wii (SMNE01)
=== DOL Info ===
entry point: 0x80004050
game: New Super Mario Bros. Wii (SMNE01)
BSS: 0x80351680 (0xDE5BC bytes)
text sections:
[0] file:0x00000100 -> addr:0x80004000 size:0x000026C0
[1] file:0x000027C0 -> addr:0x80006780 size:0x002E7260
data sections:
[0] file:0x002E9A20 -> addr:0x800066C0 size:0x00000060
[1] file:0x002E9A80 -> addr:0x80006720 size:0x00000060
[2] file:0x002E9AE0 -> addr:0x802ED9E0 size:0x000002E0
[3] file:0x002E9DC0 -> addr:0x802EDCC0 size:0x00000020
[4] file:0x002E9DE0 -> addr:0x802EDCE0 size:0x000106C0
[5] file:0x002FA4A0 -> addr:0x802FE3A0 size:0x000532A0
[6] file:0x0034D740 -> addr:0x80427680 size:0x00002540
[7] file:0x0034FC80 -> addr:0x8042B080 size:0x00004B60
cpu: Broadway (Wii)
generating code...
writing output to: ./SMNE01_generated/SMNE01.c
decoding text[0]: 2480 instructions at 0x80004000
2480 decoded, 829 known, 1651 embedded data, 0 unknown
writing 1 chunks with 1 job
decoding text[1]: 760984 instructions at 0x80006780
760984 decoded, 737431 known, 23553 embedded data, 0 unknown
writing 186 chunks with 8 jobs
warning: this DOL may patch executable memory at runtime. generated code may need additional patches
possible patching instructions:
0x8000434C-0x8000434C
0x800048EC-0x800048EC
0x80108C18-0x80108C18
0x80108C48-0x80108C48
0x801AAE58-0x801AAE58
0x801AAEAC-0x801AAEC8
0x801AAEE0-0x801AAEE0
0x801AAFBC-0x801AAFBC
...
full list: ./SMNE01_generated/SMNE01_smc.txt
done!
header: ./SMNE01_generated/SMNE01.h
chunks: ./SMNE01_generated/chunks (187 files)INCOMPLETE