News:

11 March 2016 - Forum Rules

Main Menu

Main.DOL Text Hacking - Gamecube & Wii

Started by MarkAss, August 21, 2017, 02:53:54 PM

Previous topic - Next topic

MarkAss

I couldn't find much on this topic, so I would like share my findings on Main.DOL modification.
http://wiibrew.org/wiki/DOL
=======================================================================================================

TOOLS USED

*Hex Editor

*Create your own .gct file [http://geckocodes.org/index.php?gct=R7CJ01#editbox]

*Brawlbox - Examine DOL - http://forums.kc-mm.com/index.php?topic=67847.0 - [Helpful, but not needed]

*Wiimms Tools - https://szs.wiimm.de/info/add-section.html#gch-gct

=======================================================================================================

So first I examined the DOL file with BrawlBox, (Link above), It gives you and idea of how the file is broken up, and gives you the offsets of each section as well as the memory addresses for them.
https://goo.gl/photos/YZk9rUWAnp561EW88

Now open the game in Dolphin Emulator in Debug mode. - "Dolphin.exe" -d
Search for the text you want by typing the first 4 letters of it in the second textbox,
check the box for ascii, and search.
Write down the memory address for the start of the line.
https://goo.gl/photos/3SiLwhJQwF43cHyR8

Now you need to create a .gct file to create memory space.
Go to http://geckocodes.org/index.php?gct=R7CJ01#editbox and create a large one depending on space needed.
PHP Script to create space with GCT
-------------------------------------------------

<?php
$i = 0;
$a = 8388608;
do {
    $b = $a;
    echo "00";
    echo dechex($b);
    echo " 44415441";
    echo "<br />";
    $a = $a + 4;
    $i = $i + 1;
} while ($i < 250);
?>

-------------------------------------------------

Now download Wiimms and follow these instructions to convert .gct to .gch
https://szs.wiimm.de/info/add-section.html#gch-gct

Open the new .gch in hex editor and scroll to the bottom where you will see the values you created.
https://goo.gl/photos/oRVsKg5QaMX3LQ3QA

Now you can Patch the DOL file with the Wiimms
https://szs.wiimm.de/info/add-section.html#gch-gct


Now that it is patched, lets open up Main.dol in HEX editor.
Compare the patched Main.dol to the original copy;
https://goo.gl/photos/xE6mVMT1iasZZ4vF7
https://goo.gl/photos/WeMkgAT918ozYZs88
https://goo.gl/photos/99wTebcFqa3QSAiP8


Copy Memory address from Dolphin where your original text starts;
https://goo.gl/photos/7hbDBMRdsrR1NFAr7
Also copy Memory address for where your new text is.

Search for the original Memory address it in Hex editor
(if address started with 00 it was replaced by 80)
https://goo.gl/photos/zmcXq3ch4RFs6uLAA

Replace with new address. Now the game displays new text!
https://goo.gl/photos/mRmamfmj3rQoRKW56