News: 11 March 2016 - Forum Rules
Current Moderators - DarkSol, KingMike, MathOnNapkins, Azkadellia, Danke

Author Topic: Help with GameCube pointers.  (Read 964 times)

carlos_violada

  • Jr. Member
  • **
  • Posts: 5
    • View Profile
Help with GameCube pointers.
« on: April 14, 2020, 04:02:50 pm »
I was able to find the Gamecube resident evil 2 and 3 texts but I couldn't understand how pointers work, does anyone have a link to a GameCube tutorial?

FAST6191

  • Hero Member
  • *****
  • Posts: 3052
    • View Profile
Re: Help with GameCube pointers.
« Reply #1 on: April 15, 2020, 03:04:08 pm »
For newer systems/file system based systems you tend not to have simple memory pointers ( http://hitmen.c02.at/files/yagcd/yagcd/frames.html ) unless the text is part of a binary. This can make some of the guides for older systems appear not as applicable, and while they technically still are I would agree to a statement of it not being an ideal teaching case for newer systems.

To that end you get to figure out what the devs used for that game, though you might be lucky and find the same format used for the sequels/other ports.

I usually start by finding the ends of text (hopefully it is a nice simple to search for value) for right after text finishes a new one starts and noting down the location. A good search in a hex editor will do this. You can always manually scan through the text as well looking at locations.
Put this list of ending values (or ending + however many to get to the next segment) next to a column or two of numbers from the start (or maybe end) of the text and you get to figure out the pattern that unites them.

You tend to get either pointers that start counting at the start of the file (conventional pointers), at the start of the text section (offset pointers) or take the address of the pointer within the file and add the contents of the pointer to it (relative pointers)

Sometimes the stuff at the start (or maybe in a similarly named file or end of the file) will be a list of locations, sometimes it will be a list of locations and lengths, sometimes it will have formatting data, sometimes it will just be a list of lengths, sometimes the text sections themselves will have a value at the start of them saying how long they are and there are probably some others.
Personally I like to play with the numbers -- take one from the next, see how far out the numbers I have are from what I expect them to be... you rarely get some kind of super convoluted difference between pointers and the eventual values.

carlos_violada

  • Jr. Member
  • **
  • Posts: 5
    • View Profile
Re: Help with GameCube pointers.
« Reply #2 on: April 16, 2020, 08:08:35 am »
Thanks for the answer my friend, yes I already use this pattern in ps1 games it is even easy to find and understand, but in Game Cube it is mind-boggling lol. :banghead: :banghead:

below is the image of iso.

here the first line of the game


here where it starts a lot


here where I think it's the pointers that I couldn't understand lol


I can't understand this pattern, and on the internet there is very little about pointers / gamecube

another thing that I found interesting was the extraction that the dolphin uses in the iso, for example, in the iso the text appears and the image is 1.4gb but after extracting the game it is only +/- 850mb and looking in file by unzipped the texts are not found.

sorry for the bad english because i'm leaving the google translator, i'm from brazil. ;D

Jorpho

  • Hero Member
  • *****
  • Posts: 4722
  • The cat screams with the voice of a man.
    • View Profile
Re: Help with GameCube pointers.
« Reply #3 on: April 16, 2020, 11:19:23 am »
Perhaps you should adjust the colors in your hex editor so the images are easier to read?

another thing that I found interesting was the extraction that the dolphin uses in the iso, for example, in the iso the text appears and the image is 1.4gb but after extracting the game it is only +/- 850mb and looking in file by unzipped the texts are not found.
What exactly are you using for the extraction?

If I'm not mistaken the game is not required to use the ISO filesystem, so even if you extract all the files that appear to be on the disc, there can still be other data.
This signature is an illusion and is a trap devised by Satan. Go ahead dauntlessly! Make rapid progres!

carlos_violada

  • Jr. Member
  • **
  • Posts: 5
    • View Profile
Re: Help with GameCube pointers.
« Reply #4 on: April 16, 2020, 01:08:36 pm »
Perhaps you should adjust the colors in your hex editor so the images are easier to read?

Worse that I see and decipher better  :laugh:

What exactly are you using for the extraction?

gc-tool and the dolphin itself

-----------
already managed to identify where the pointers of all texts are because the offsets match the location of the texts but I still couldn't translate those pointers, I don't know what I should divide or subtract from (example of most ps1 is 800)

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

I believe that the error and the difficulty I am having is to be working directly on the iso, if I could find the files that are the texts everything would be simplified ...

which program can I extract the complete iso ???? because as i said the iso has 1.4gb but when i extract it with the dolphin or gc-tool it is only 870mb ... the texts do not appear must be in those 530mb that disappear.
« Last Edit: April 16, 2020, 01:16:58 pm by carlos_violada »

FAST6191

  • Hero Member
  • *****
  • Posts: 3052
    • View Profile
Re: Help with GameCube pointers.
« Reply #5 on: April 17, 2020, 05:47:26 am »
Yeah I saw the hex editor shots and thought that is a fairly high address for a text file.

The "missing" 530 megs is likely just padding -- miniDVDs were what the GC used and they are 1.4 gigs. A basic rip then takes the whole lot regardless of how much is actually used where your unpacking only concerned itself with data.
If it was PS1 or PS2 there might be something in the raw sectors (see various audio rips of Square Enix games) but I don't recall ever seeing anything like that for the GC.

I don't know what we have for hex editor that tells you where the files are for GC isos (for the DS we have stuff like crystaltile2 that will tell you what file the current location corresponds to). You could always come the other way though and overwrite the text with something obvious and unlikely to be repeated. Unpack everything and then use one of the binary grep tools (or regular grep if you overwrote it with plain text, astrogrep was my favourite for a windows grep tool with a UI) to find your alterations. Now you know which of the files do what you want.

What you divide by (though if it is sector addressing or shifted that would more likely be multiply) or subtract is what you get to figure out. As mentioned I usually like to locate the places I expect pointers to point at (end of sentences, end of section, end of line as I might find from screenshots of play) and compare them to what the pointers say (often with a bit of maths -- difference from one value to the next usually getting me good stuff if the first "pointer" is more of a file count/section size or something and thus I should start at the second one or something, and if it is a relative pointer the secondary differences will usually be the same).

carlos_violada

  • Jr. Member
  • **
  • Posts: 5
    • View Profile
Re: Help with GameCube pointers.
« Reply #6 on: April 17, 2020, 08:47:36 am »
Yeah I saw the hex editor shots and thought that is a fairly high address for a text file.

The "missing" 530 megs is likely just padding -- miniDVDs were what the GC used and they are 1.4 gigs. A basic rip then takes the whole lot regardless of how much is actually used where your unpacking only concerned itself with data.
If it was PS1 or PS2 there might be something in the raw sectors (see various audio rips of Square Enix games) but I don't recall ever seeing anything like that for the GC.

I don't know what we have for hex editor that tells you where the files are for GC isos (for the DS we have stuff like crystaltile2 that will tell you what file the current location corresponds to). You could always come the other way though and overwrite the text with something obvious and unlikely to be repeated. Unpack everything and then use one of the binary grep tools (or regular grep if you overwrote it with plain text, astrogrep was my favourite for a windows grep tool with a UI) to find your alterations. Now you know which of the files do what you want.

What you divide by (though if it is sector addressing or shifted that would more likely be multiply) or subtract is what you get to figure out. As mentioned I usually like to locate the places I expect pointers to point at (end of sentences, end of section, end of line as I might find from screenshots of play) and compare them to what the pointers say (often with a bit of maths -- difference from one value to the next usually getting me good stuff if the first "pointer" is more of a file count/section size or something and thus I should start at the second one or something, and if it is a relative pointer the secondary differences will usually be the same).

I finally managed to find the spare text file thanks to the "Gamecube ISO Tool" program from the wii, just as I suspected the file was actually eaten / swallowed by the dolphin and was not extracted missing this file. iso has a folder called SYS and inside it there is a file called main.dol where the texts are, now it remains to understand the pointers and start the translation into Portuguese which is the language I want to translate.

I will see here now and when I understand how everything works I will update this topic to help anyone who wants to translate this game too. :crazy: :crazy: :thumbsup: :beer:

krzys837

  • Newbie
  • *
  • Posts: 4
    • View Profile
Re: Help with GameCube pointers.
« Reply #7 on: April 17, 2020, 09:57:48 am »
Hello. I'm translated all classics Resident Evil. You can find pointers offsets always before texts banks.

carlos_violada

  • Jr. Member
  • **
  • Posts: 5
    • View Profile
Re: Help with GameCube pointers.
« Reply #8 on: April 17, 2020, 12:50:51 pm »
Hello. I'm translated all classics Resident Evil. You can find pointers offsets always before texts banks.

hello, yes I understand the psx hands, in the psx version I don't know it seems easier to understand kkk, I'm here trying to understand the craziest cube. :banghead: