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

Author Topic: It's a very... Map world (Zero Mission)  (Read 2736 times)

4lorn

  • Full Member
  • ***
  • Posts: 158
    • View Profile
    • Blunt Bit
It's a very... Map world (Zero Mission)
« on: October 18, 2011, 06:00:36 pm »
I suspect this might be a bit frowned upon, considering the documentation that already exists, but I have to confess I can't quite "get" tile maps yet. Long story short, this is related to one of the translations I'm currently working on, in this case for Metroid Zero Mission.

This started about two months ago, just a week after I started working on another translation for Link's Awakening (which is ongoing and fine, thanks to the help of several people on these boards :) )and I've been slowly working my way through things. Results for ZM are pretty good so far. I've already translated the intro, ingame and credits text, just about every menu, the title and options screen. Ingame text isn't inserted yet because, while I extracted manually, I'll probably place it in the game with Double Helix to speed up work and still need to review a couple of descriptions.

The first issue I had - finding the intro text - was resolved thanks to some dilligence and helpful hints by Odin and interdpth. When dealing with that, I found out the text tiles were 8x16, and that in order to "call" them up on the screen, all I needed was to use the top of the complete tile (ie., the first tile in the duo) in order for the game to recognize it. After some testing and jotting down a table, I did it, and am quite proud of that :)

http://www.youtube.com/watch?v=UwRf2CFZf3Q

Second issue was the end credits, but it was easy. I thought it was compressed but it's not, and is easy to spot a mile away in the rom. However, the main issue now is the "Mission Accomplished" and "Clear Time" texts, which are (or look like) tilemaps. While I still haven't gotten the hang of how the maps work - I understand the concept, but not always the application, and the order is eating away at my mind (because when I think I have it right, I have it wrong) - doubts are made worse because of a couple of things.

I generally use NLZ-GBA to extract images, and when saving them I also type the offset the program tells me they're located at. When doing this with ZM, this is what I get pertaining the "Clear Time" text:



It's got the text, the font it uses and the "See you next mission!" part. That "See you" isn't an issue, as a simple replacement works fine. NLZ also lets me know this is located at offset 59f5a8. The issue, however, starts here:



This is what I get when extracting the image with unlz-GBA instead. I know unlz lets me shift data in order to extract a "perfect looking" or rather "what you see when playing" image, but I decided to extract it in its default state. Except unlz claims the offset is 5a0234.

Since I've also been using no$gba, I checked the OAM and Tile windows to see what was being used by the game during the "Clear Time" screen, and this is what it shows:



I'm guessing it's calling into memory two different tilemaps, since I've extracted both of these in the past. The 2:06:22 / 71% is a reading taken from the game as it's played, while the numerals in half and the "New Record" image are the tilemap itself. The other tilemap is, of course, between "Clear Time" and the "See You..." part.

So, besides not getting very well with tilemaps, I'm not parsing well all the info and... I guess this is more of a rant? With all this I'm not sure at exactly what offset is the game reading from when it starts printing the "Clear Time" text. I did a quick edit of the original map with my own, and confirmed my suspicion: there's an instruction overriding it. I say this because even if I replace the original, what appears first onscreen is the original text ("Clear Time"), which is then quickly replaced by my edit. So the game has instructions to read a tile map in a specific order, but also seems to have another instruction to print the letters one by one as well. This seems to suggest that the tile map is actually somewhere between 59f5a8 and 5a0234, but that even knowing that isn't enough.



Auryn

  • Hero Member
  • *****
  • Posts: 650
    • View Profile
Re: It's a very... Map world (Zero Mission)
« Reply #1 on: October 18, 2011, 09:21:38 pm »
I don't really know about GBA tile maps but your second pic is correct, just change the width to be double and you get the same result as the first one.

4lorn

  • Full Member
  • ***
  • Posts: 158
    • View Profile
    • Blunt Bit
Re: It's a very... Map world (Zero Mission)
« Reply #2 on: October 19, 2011, 03:32:37 pm »
@Auryn: True, though I'm left wondering why the difference in offsets between both programs.

Still, going to invest a bit more time in this.