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

Author Topic: Finding Pointers in Pokémon Emerald  (Read 2123 times)

shinichi999

  • Jr. Member
  • **
  • Posts: 32
    • View Profile
Finding Pointers in Pokémon Emerald
« on: October 28, 2019, 11:01:03 am »
Hello everyone! I have a problem with Pokémon Emerald that is driving me crazy!

I'm translating the Spanish version of the game (from Spain) into American Spanish (or neutral Spanish). The thing is that I'm trying to find the pointer for the attacks but I can't find a single one!

I have been doing the process of repointing for Pokémon Blue, Red, Yellow and Crystal without any problem, but with Emerald it's being a nightmare!

For instance, I'm trying to find the pointer for the Offset "3275245"



And my pointer calculator gives me "24753208"



But Translhextion can't find that pointer.



I tried with "31F9ED" but the result is the same



Which leads me to think: Does Emerald have a different way to calculate pointers? Or am I doing something wrong? Can you guys please help me with this?

Thank you very much in advance!  :)

Darrman

  • Jr. Member
  • **
  • Posts: 17
    • View Profile
Re: Finding Pointers in Pokémon Emerald
« Reply #1 on: October 28, 2019, 12:49:59 pm »
You're reading the wrong number. You're putting the decimal number into the calculator, instead of the hexadecimal number. Hexadecimal numbers usually start with "0x" or "$". In your screenshot's example, the hex would be 0x31F9ED. Your calculator should then output ED F9 31 08.

shinichi999

  • Jr. Member
  • **
  • Posts: 32
    • View Profile
Re: Finding Pointers in Pokémon Emerald
« Reply #2 on: October 28, 2019, 01:07:14 pm »
You're reading the wrong number. You're putting the decimal number into the calculator, instead of the hexadecimal number. Hexadecimal numbers usually start with "0x" or "$". In your screenshot's example, the hex would be 0x31F9ED. Your calculator should then output ED F9 31 08.


I got the same result (String not found)

Any other piece of advice?

FAST6191

  • Hero Member
  • *****
  • Posts: 3050
    • View Profile
Re: Finding Pointers in Pokémon Emerald
« Reply #3 on: October 28, 2019, 04:42:13 pm »
I don't know the format of such things in this game but there are tools to edit it. Said tools are often not great but they should at least be able to edit this string. Compare the original to the edited version and any differences become where you want to look.

shinichi999

  • Jr. Member
  • **
  • Posts: 32
    • View Profile
Re: Finding Pointers in Pokémon Emerald
« Reply #4 on: October 28, 2019, 04:57:23 pm »
I don't know the format of such things in this game but there are tools to edit it. Said tools are often not great but they should at least be able to edit this string. Compare the original to the edited version and any differences become where you want to look.

I can't. Most of the tools (if not all) work only with English versions of Pokémon, and I'm working with the Spanish ROM of Emerald. That's why I have been editing "manually" the text in all the previous Pokémon games.

I must insist that I can't find ANY pointer. Is there a special way to calculate pointers for Emerald?

FAST6191

  • Hero Member
  • *****
  • Posts: 3050
    • View Profile
Re: Finding Pointers in Pokémon Emerald
« Reply #5 on: October 28, 2019, 06:04:09 pm »
Pokemon bores me to tears so I tend not to pay attention to it or any hacking work outside of yanking out any forks of tools that are still useful outside it once or twice a year.

If the tools only do the English versions (I am pretty sure there were some general ones but that might not be for text) then edit the English one then. It should still give you an idea of the format of the pointers (I doubt that got changed) and possibly a location idea (if all the pointers are before the text or after another part of the ROM it might not be an identical location but likely to follow a similar pattern).

Or you could come the other way and edit the English one but overwrite it with Spanish of your choosing if you are literally sitting there with a translation you can essentially copy and paste -- might be slighter harder if Spanish is more verbose (don't know here -- we normally see French take that crown, or Japanese because 16 bit) but seems within reason.

shinichi999

  • Jr. Member
  • **
  • Posts: 32
    • View Profile
Re: Finding Pointers in Pokémon Emerald
« Reply #6 on: October 28, 2019, 06:29:19 pm »
Pokemon bores me to tears so I tend not to pay attention to it or any hacking work outside of yanking out any forks of tools that are still useful outside it once or twice a year.

If the tools only do the English versions (I am pretty sure there were some general ones but that might not be for text) then edit the English one then. It should still give you an idea of the format of the pointers (I doubt that got changed) and possibly a location idea (if all the pointers are before the text or after another part of the ROM it might not be an identical location but likely to follow a similar pattern).

Or you could come the other way and edit the English one but overwrite it with Spanish of your choosing if you are literally sitting there with a translation you can essentially copy and paste -- might be slighter harder if Spanish is more verbose (don't know here -- we normally see French take that crown, or Japanese because 16 bit) but seems within reason.

That's not an option. I'm using the Spanish ROM because I can save lot of time and effort by changing only the words and phrases needed. A full re-translation of a ROM that is already translated doesn't makes sense. Moreover, there are certain "special characters" in Spanish that don't exist in the English ROM, so I can't write them.

As you suggested, I tried searching for pointers in the English ROM but the result is the same: I can't find any of them. This is my first time working with GBA pointers so I'm pretty sure that the solution is very simple and that I'm just making a mistake when calculating.

Could someone please show me the exact way of calculating pointers for Emerald? Any concrete example of how to look for them? And what program do you guys suggest?

FAST6191

  • Hero Member
  • *****
  • Posts: 3050
    • View Profile
Re: Finding Pointers in Pokémon Emerald
« Reply #7 on: October 28, 2019, 08:07:36 pm »
You can probably find a few useless characters in the font to overwrite with your symbols of choice.

Don't search for a pointer as you did above (such things might do for some games but seemingly not this, don't know why at this point).
Change something with one of the text editing tools (nothing much, just enough that the length of the line and thus the pointer have changed). Now do a file compare between your simple little change and the stock ROM.
It should only have changed the string (or maybe put one somewhere else) and the pointer to it, either way the pointer will have changed. From there you should be able to figure out how the pointers work and maybe roughly where it will be in the Spanish version (translation devs don't tend to change much in this regard -- if it is just before the text in one it will likely be just before the text in another, if the "feel"* of the pointers is not enough to find it).

*it likely won't do much here but one of the things I get people to do when finding text or pointers on the GBA is note that most GBA pointers use the 08?????? format so if they see 08 usually spaced 6 characters apart (easy to highlight for in a hex editor) then it likely is a list of pointers.

shinichi999

  • Jr. Member
  • **
  • Posts: 32
    • View Profile
Re: Finding Pointers in Pokémon Emerald
« Reply #8 on: October 28, 2019, 08:43:30 pm »
You can probably find a few useless characters in the font to overwrite with your symbols of choice.

Don't search for a pointer as you did above (such things might do for some games but seemingly not this, don't know why at this point).
Change something with one of the text editing tools (nothing much, just enough that the length of the line and thus the pointer have changed). Now do a file compare between your simple little change and the stock ROM.
It should only have changed the string (or maybe put one somewhere else) and the pointer to it, either way the pointer will have changed. From there you should be able to figure out how the pointers work and maybe roughly where it will be in the Spanish version (translation devs don't tend to change much in this regard -- if it is just before the text in one it will likely be just before the text in another, if the "feel"* of the pointers is not enough to find it).

*it likely won't do much here but one of the things I get people to do when finding text or pointers on the GBA is note that most GBA pointers use the 08?????? format so if they see 08 usually spaced 6 characters apart (easy to highlight for in a hex editor) then it likely is a list of pointers.

You got a point, that's a very good idea. I changed "PLACAJE" (Tackle) for "EMBESTIDA" with Advance Text (the program repointed the word by itself), then I compared both ROMS and I got the following (these were the only changes of the whole ROM):


Untouched ROM:


Modified ROM:


Now I'm trying to figure it out how the pointer works. Unfortunately the program can't repoint all the attacks, so I can't use it entirely for my purpose. I can't see either the "08" you mentioned above, so now I'm even more confused  :o

EDIT:

This is how it looks with the text table for the game:

ORIGINAL:


MODIFIED:
« Last Edit: October 28, 2019, 08:59:50 pm by shinichi999 »

Mauron

  • Submission Reviewer
  • Hero Member
  • *****
  • Posts: 551
    • View Profile
Re: Finding Pointers in Pokémon Emerald
« Reply #9 on: October 28, 2019, 09:13:05 pm »
Those strings are all 13 bytes long, so they're not using pointers. FF is used to mark the end of the string, and then 00s are placed to pad the data up to 13 bytes. The game then finds the string with a pointer to the start of the table and the index of the string it needs * 13.

If you can fit everything in the current restrictions, you won't need to change the pointer.
Mauron wuz here.

shinichi999

  • Jr. Member
  • **
  • Posts: 32
    • View Profile
Re: Finding Pointers in Pokémon Emerald
« Reply #10 on: October 29, 2019, 09:46:38 am »
Those strings are all 13 bytes long, so they're not using pointers. FF is used to mark the end of the string, and then 00s are placed to pad the data up to 13 bytes. The game then finds the string with a pointer to the start of the table and the index of the string it needs * 13.

If you can fit everything in the current restrictions, you won't need to change the pointer.

Haha gosh... I was so focused thinking on pointers that I didn't realize about the reality. Thank you all, and time to work!  ;D