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

Author Topic: Does this game need two tables?  (Read 1142 times)

SquiddyGoat

  • Jr. Member
  • **
  • Posts: 15
    • View Profile
Does this game need two tables?
« on: August 17, 2020, 04:06:26 am »
So I'm trying to create a fan translation/menu translation of Legendz: Yomigaeru Shiren no Shima for the GBA. I have a million new things that I need to learn on my own time, but I have a question to ask about a certain problem that I'm not so sure how to solve.

Here's a video showing what I can do so far: https://www.youtube.com/watch?v=g8hBBjF5nQQ

If I can ever hope to translate at least the menus of this game, I need to know how to change the text on the pause menu. Inside the ROM, the graphics for the pause menu look as shown here:

https://i.imgur.com/z2aMKXN.png

At first, I thought this was simply the case of text being stored as a graphic rather than being typed on-screen using the game's general alphabet. So, I went in and tried turning the first two letters into "EY", hoping to fill the rest in to spell "MONEY". Then, this happened:

https://i.imgur.com/4dU6YHi.png

Notice how the "Y" appears in three places even though I only edited one letter. This must mean that the text really is being typed on-screen... but how, then, if this text doesn't appear in a hex editor even when searching by hex?

So I reconstructed some of the letter order as shown here:

https://i.imgur.com/ladScMk.png

As you can see, it appears as if this is hinting at a table's letter order. Problem is, how would I go about building a table if I already have one for 95% of the game's written content? It can't start at 01, because that's where the main table starts. How am I supposed to figure out what hex value this table starts on?

FAST6191

  • Hero Member
  • *****
  • Posts: 3054
    • View Profile
Re: Does this game need two tables?
« Reply #1 on: August 17, 2020, 12:37:44 pm »
"This must mean that the text really is being typed on-screen"
You can reuse sprites/background images, with menus being one of the big ones for this.
http://problemkaputt.de/gbatek.htm#lcdvrambgscreendataformatbgmap if it is BG based (can see in the various viewers)
http://problemkaputt.de/gbatek.htm#lcdobjvramcharactertilemapping if it is obj/oam/sprite based.

I usually take a look how complex the text looks and go from there, in addition to the viewers as they will tell you right away, as fancier looking makes it more likely it will be mapped, though 2 colour outline of that size could plausibly be either.


"if this text doesn't appear in a hex editor even when searching by hex?"
It probably still is mapped graphics but compression (LZ might show something like that, however I would expect more corruption), non standard encoding (or indeed just another encoding -- menus being notorious for this one),

SquiddyGoat

  • Jr. Member
  • **
  • Posts: 15
    • View Profile
Re: Does this game need two tables?
« Reply #2 on: August 20, 2020, 11:42:18 pm »
The "Map Viewer" in VisualBoyAdvance tells me that the graphics are BG based. I guess the hex data for the table does exist, but it is just hidden by compression. I'll have to find a way to edit that compressed text, then.

Also, I believe I've found the start of the TRUE pointer table for this game's text:

https://i.imgur.com/P212ZKx.png

When I changed the first pointer, 1C0F1808, to AAAAAA08, this happened to the game's first spoken line:

https://i.imgur.com/YxFXNUW.png

However, the pointer table isn't really organized into a neat "table". It's going down in a completely random order, which makes it hard to organize it into a table. I figured I could just enter the pointers manually into Kruptar, which I have been experimenting with recently.

I entered the beginning offset and "ptReference" of 15BD50 to be added to 251CC to get to 180F1C. Instead of bringing me there, I got 6CCC2D:

https://i.imgur.com/ilS3oOS.png

Despite all I've learned up until now, I'm kinda stuck again.

FAST6191

  • Hero Member
  • *****
  • Posts: 3054
    • View Profile
Re: Does this game need two tables?
« Reply #3 on: August 21, 2020, 08:12:15 am »
I haven't had a look yet at it but looking at the hex shot above and seeing the same data after the pointer makes me wonder if it is formatting (size, location, animation style, bold...).

As far as random order then yeah that happens. If say paragraphs got shuffled round it in editing/play testing/development it is valid to change the pointers around and keep the text (game does not really care if it is effectively doing a boring take on choose your own adventure, and the devs of the game possibly have their own nice little editor to type in anyway).

SquiddyGoat

  • Jr. Member
  • **
  • Posts: 15
    • View Profile
Re: Does this game need two tables?
« Reply #4 on: August 25, 2020, 06:55:31 pm »
I haven't messed around with the data that comes after the pointer, but I think I've found out how to re-point the pointers. I replaced the reversed hex address that came before the "08" with one that points to a huge blank area full of "00"'s in the ROM. Now, I can write anything of any length and have it show up in the game.

So, in trying to solve one problem, I ended up solving another. I still don't know what to do about the pause menu text, though. I agree that the graphics might be mapped rather than encoded, similar to the copyright info on the title screen that is made up of only the needed letters. This makes more sense because they were probably intended to remain static for the rest of the game.

Thing is, how would I go about "re-mapping" these graphics, if even possible for someone with no/basic skills like me? I'm able to change the in-battle exclaimations, the compressed fight menu graphics, dialogue, menu options, items... but this pause menu is really the last thing that I don't know how to change.

What's also peculiar to me is that "し" and "じ" appear on-screen but only "じ" appears in the graphics for the pause menu.