Jump to content

FE7 World Map! +TSA tips


NTG
 Share

Recommended Posts

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).

fe7wmapedit.png

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).

tsa-1.png

A tile is represented by 2 bytes. I highlighted one of them in orange:

E0 13

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!)

tsa-2B.png

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 ^

Summary

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.

And that's all for now. :):

Edited by MagikruiserGirl
okay I'll stop editing this post
Link to comment
Share on other sites

Thanks! I'm sure this will come in handy for a lot of people even if I'm not one of them since hacking FE12 taught me way more about TSA, graphic editing, and compressions than I could ever want to know.

I'm glad I have something that's simple and thorough to link to now for TSA tips as well. I've been meaning to make a tutorial on it for like a year but I'm so pre-occupied with other priorities so you did me another sweet favor~ or "took my job" again :P just kidding

And I'll be honest in saying I didn't actually know where the image was either, it's 4bpp graphics though right?

but yeah tl;dr thanks for sharing this! And I'm glad your sig shared it with us so we could peer pressure you into posting about it ;)

Link to comment
Share on other sites

さすがビンセントの妹・・・

Also just a note, GBA Graphics Editor has support for looking at image with flipped TSA, just like it is for CGs.

SomeonetellmewhyImdoingthisagain.png

And NTG don't say A WORD about that CG. I know what you're thinking. XD

Also, yes, compressed TSA is NOT backwards:

10601937.png

Edited by shadowofchaos
Link to comment
Share on other sites

holy crap it's mage girl

...holy crap it isn't

even though I don't plan on using/editing the WM, this still is a good batch of info, nice stuff :o

Hehe. It's Magikruiser~

Thanks :)

And I'll be honest in saying I didn't actually know where the image was either, it's 4bpp graphics though right?

but yeah tl;dr thanks for sharing this! And I'm glad your sig shared it with us so we could peer pressure you into posting about it ;)

Yup! 4bpp, standard GBA, uncompressed. Funnily enough, I think I've actually seen the world map ages ago, when I used to scroll through FE7 looking for images. But I'm not sure really!

But that was exactly my plan, so people would see my sig and then pester me into posting this topic hehehehe--- ok not really

さすがビンセントの妹・・・

Hey you I know what you're saying

I see. *Goes to download latest version of GBAGE* So I have to vertically flip all tiles and do a whole vertical flip as well.

Hey, I am not thinking anything about that CG. :P You just think I'm thinking something.

And I realize now that I realized compressed TSA wasn't backwards. Those DS TSA files weren't backwards. :D I never handled compressed TSA before this though.

Link to comment
Share on other sites

double post but whatever

TSA is actually a bit easier than that if you have a scientific calculator.

It's based on each of the bits

The first 10 bits are the tile index *4

the next bit is vertical flip boolean

bit after is horizontal

last four bits are palette index *4

Link to comment
Share on other sites

yeah someone really needs to make a legitimate tutorial on TSA

not all these random notes and tidbits that only come up in specific situations lol

and yeah what I do is just insert the image upside down and then flip all the tiles using GBAGE's (relatively new) feature :\

Link to comment
Share on other sites

  • 2 weeks later...

doesn't cam always say he's working on a TSA editor? :P FINISH IT CAM AND WE WILL WORSHIP YOU

>implying we don't already

(we don't)

Link to comment
Share on other sites

  • 2 weeks later...

A TSA editor would be nice. Hehe...

double post but whatever

TSA is actually a bit easier than that if you have a scientific calculator.

It's based on each of the bits

The first 10 bits are the tile index *4

the next bit is vertical flip boolean

bit after is horizontal

last four bits are palette index *4

I feel like I'm a bit late but, isn't it the other way around? First 4 is palette, next 2 are flips, and last 10 are tile index.

Link to comment
Share on other sites

Uhhhhhhh I know that the bytes are reversed (so 19 43 isn't 0001 1001 0100 0011b but actually 0x4319 = 0100 0011 0001 1001b)

they might be fully bit-reversed too, I dunno.

Edited by CT075
Link to comment
Share on other sites

  • 2 months later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...