Romhacking.net

Romhacking => Personal Projects => Topic started by: Seijuurou Hiko on May 16, 2022, 01:35:22 PM

Title: Help with GameCube Windwaker Start.dol
Post by: Seijuurou Hiko on May 16, 2022, 01:35:22 PM
I'm trying to translate the GameCube WindWaker, and I found that some words are in the Start.dol.
The specif part I'm trying to change the pointers is this:
(https://i.imgur.com/HC4QILi.png)

I simply can't find the pointer to this text block. I found the pointers for another block, but for this I'm completely clueless.
Can somebody help me?
Title: Re: Help with GameCube Windwaker Start.dol
Post by: abridgewater on May 17, 2022, 10:40:28 AM
This looks like a read-only data segment or the contents of an initialized data segment produced by a C compiler. Inbound pointers are probably either stored in two parts (a high part and a low part) in nearby (not necessarily adjacent) instructions, or as an offset from some other pointer.

I'd recommend either using a debugger breakpoint in an emulator to try and track backwards to find where the pointers are stored (you'll see a variation on this trick used for the GameBoy in the recent "RomHacking 202" document), or using a "smart" disassembler or reverse-engineering tool such as IDA Pro or Ghidra to see if it detects references to these strings.

There are further techniques that might work using a "dumb" disassembler, or operating purely in terms of a hex viewer, but they amount to working out what the possible instructions might be for loading part of the pointer and searching for those instructions. Basically trading off more knowledge and effort on your part for being able to use simpler tools.
Title: Re: Help with GameCube Windwaker Start.dol
Post by: Seijuurou Hiko on May 28, 2022, 02:02:59 PM
Quote from: abridgewater on May 17, 2022, 10:40:28 AM
This looks like a read-only data segment or the contents of an initialized data segment produced by a C compiler. Inbound pointers are probably either stored in two parts (a high part and a low part) in nearby (not necessarily adjacent) instructions, or as an offset from some other pointer.

I'd recommend either using a debugger breakpoint in an emulator to try and track backwards to find where the pointers are stored (you'll see a variation on this trick used for the GameBoy in the recent "RomHacking 202" document), or using a "smart" disassembler or reverse-engineering tool such as IDA Pro or Ghidra to see if it detects references to these strings.

There are further techniques that might work using a "dumb" disassembler, or operating purely in terms of a hex viewer, but they amount to working out what the possible instructions might be for loading part of the pointer and searching for those instructions. Basically trading off more knowledge and effort on your part for being able to use simpler tools.

Thank you very much for your answer. It's the very first time someone reply on one of my topics asking help on the net. I'm very noob with hacking games, I basically know how to extract some content, change, and repack the altered content. I'll look in the document and the tools you mentioned. It's a starting point. If you, or anyone else's interrested, I can post what I already achieved with the translation, and the process I followed to achieve the results.
English obviously is not my primary language, so I'm sorry if I make any mistakes on the writing.
Title: Re: Help with GameCube Windwaker Start.dol
Post by: Seijuurou Hiko on June 10, 2022, 01:22:39 PM
I have installed IDA Pro, but can't make it "recognize" how to disassemble de dol file.
There's a specific version, and/or any plugin to make it work with the dol file?