Prompts from some people made me realize I should share my notes/documentation on the FE7 World Map. If you knew everything below already, then you’re a star. :D: Of course, to some people, it’s simply just another image. But I’ve got time on my hands, sooo…
Just to show it’s possible, I inserted FE4’s world map. However, I reduced all the colours to 1 palette just to save myself some work (but you could very well use all 4 palettes).
The world map is divided into 12 segments, one after another. The first 8 are 32 x 32 tiles but the last 4 are 32 x 22 (width x height) tiles. Each segment has their own TSA. Annoyingly/funnily the TSA are all the same size though.
There are 4 palettes, located at 574990. Image starts at 574A10 and TSA starts formally at 5CAA10.
Below are the addresses for the image segments and their respective TSA’s.
Image segment - TSA 574A10 - 5CAA12 57CA10 - 5CB216 584A10 - 5CBA1A 58CA10 - 5CC21E 594A10 - 5CCA22 59CA10 - 5CD226 5A4A10 - 5CDA2A 5ACA10 - 5CE22E 5B4A10 - 5CEA32 5BA210 - 5CF236 5BFA10 - 5CFA3A 5C5210 - 5D023E
(The TSA actually starts at 2 bytes less- I ignored the first 2 bytes (1F 1F). Those tell you the size of the TSA.)
And as with a lot of GBA data, the TSA is backwards. So the TSA starts with the 32nd row of tiles, then 31st… then all the way to the 1st.
[ Of course, I heard that uncompressed TSA is backwards, but compressed TSA is not! ]
And a bonus: here’s some TSA tips. (These tips apply for all TSA, not just this world map.)
Here I loaded the 9th segment’s TSA (5CEA32) in Windhex. The underlined (green) lines represent the last (32nd) row. That 1F 1F represents the size of the TSA (I believe it’s the max size).
A tile is represented by 2 bytes. I highlighted one of them in orange:
Read it reversed- 13E0
This calls up the tile 3E0 and uses palette number 1.
When working with TSA, I like to make a grid so I can identify every tile.
Here’s the 1st image segment. I wrote down the "ID"s (or index) on top of some of the tiles just to illustrate how the grid works. The tiles run from 00 to 3FF. (Sorry if it’s hard to read!)
v don’t have to read this v
Now, I’ve been out of the hacking-loop for quite a long time really. My latest activity involves the FE12 translation project. It’s a DS game, but a lot of things are still very much the same, including TSA. I don’t know to what extent people know about things, and what programs are available now. Do you think tile editors are old-fashioned? I’ve messed with TSA before, but only recently did I fully understand it, including how tiles are flipped. I even read about looking at the TSA binary-wise, which makes a lot of sense for the tile flipping. However, the notes I read were old and didn’t seem to match with what I knew. Also, I don’t know if people understand it already, but I’m just going to summarize what I know now:
^ don’t have to read this ^
Each tile is represented by 2 bytes, stored in reverse order. Now, I’m going to refer to the bytes in the “correct order”: The first digit tells you the palette (can range from 0 to F) and the last 3 digits tells you the tile id, with any flipping effects included (can range from 0 to FFF).
Regarding flipping effects, a certain value is added to the tile id (or you could say the 2nd digit is altered). Note this is in hexadecimal. I’m not going to bother talking about it binary-wise here (unless clarification is wanted).
+ 400 horizontal flip + 800 vertical flip + C00 both flips, aka 180 rotation
So you can tell if flips are involved if the tile id exceeds 3FF. Otherwise, if it’s within 0-3FF then it’s not flipped.
An example: 3A10
Palette 3 is used. The tile id is A10, which exceeds 3FF, so it’s been flipped. Now, if you try to subtract 400 you get 610 which is still over 3FF, so you know it’s not a horizontal flip. But if you subtract 800 you get 210, which is within 0-3FF. So you know it’s the 210th tile being called up, with a vertical flip.
Credit goes to Serenes Forest’s NomadicTrooperGirl.