Toggle shoutbox Shoutbox
|
Ryru's TSA Manual Editing guide
Started by Ryrumeli, Nov 18 2009 03:07 AM
5 replies to this topic
#1
Posted 18 November 2009 - 03:07 AM
QUOTE |
Text BG Screen (2 bytes per entry) Specifies the tile number and attributes. Note that BG tile numbers are always specified in steps of 1 (unlike OBJ tile numbers which are using steps of two in 256 color/1 palette mode). Bit Expl. 0-9 Tile Number (0-1023) (a bit less in 256 color mode, because there'd be otherwise no room for the bg map) 10 Horizontal Flip (0=Normal, 1=Mirrored) 11 Vertical Flip (0=Normal, 1=Mirrored) 12-15 Palette Number (0-15) (Not used in 256 color/1 palette mode) A Text BG Map always consists of 32x32 entries (256x256 pixels), 400h entries = 800h bytes. However, depending on the BG Size, one, two, or four of these Maps may be used together, allowing to create backgrounds of 256x256, 512x256, 256x512, or 512x512 pixels, if so, the first map (SC0) is located at base+0, the next map (SC1) at base+800h, and so on. |
Just bringing that along in case you do know about binaries. XD Technically Hexadecimal is just a cool and fancy way to show binaries, as you can read in any basic ASM tutorial. The windows calculator can convert from hex to binaries, though, so not such a worry.
But...pretty much... A TSA(Or Tile Map, I like this term way more) is a group of bytes which tells the image how to be loaded. Even an image, when inserted in it's full form(Say, the background of a statsheet, which is a rather understandable image even for the naked eye) is actually for the GBA a small puzzle. The GBA just "throws the pieces" over the table which is the tile viewer in the VBA, And the TSA is the cheat sheet your GBA uses to understand it.
The palettes are loaded in the right spots, then the right tiles are put in the right places, and for a "coincidence" the tiles which the TSA did handle are in the place it says, and also the palette. Almost prophetic, even. A TSA is not as attached to it's image or palette as one may think at once, it is pretty generic, and all backgrounds in a game could simply use the same TSA.
Anyways, about structure... The TSA works like this: A generic TSA for an 8-bit image(16 colors, regardless of the palettes which will be loaded over it when in-game...99% of the graphics in the FE GBA rom fall in this category) is structured in a pair of bytes for each tile(Tile being a small 8x8 square, that is how the GBA reads graphics). It goes like this:
895F
(10001001 01011111)
That is a sample entry, and the version in binaries. ...scary, uh? XD Pretty much, the first binary says(Colored in Orange), from the huge image you see in the tile viewer, which tile to get. Goes as far as 1023(Which demmands 10 bits(Digits) of 1 to be written in binary form), which should be enough to pick any of those tiles. The limegreen and the blue bits(Digits) are interesting, they define if the tile is flipped, either vertically(Limegreen) or horizontally(blue). If 0, not flipped. If 1, flipped.
And finally, red is equal to palette. So it can go from the first palette in the palette viewer(0000 = 0) to the last palette(1111 = F = 15).
...hard to edit, no? Indeed, you would need to recalculate in binaries for each entry before doing anything. ...but...there is a catch.
A coincidence here helps when all you want is to edit a palette.
4 bits = 1 half-byte(Nibble).
...pretty much, the last digit is what we look. Here is the example again.
895F
We said we wanted palette 15 for this tile, and the last digit is F. ...coincidence? Not that much, no. So, pretty much, to edit a TSA's palette manually, look in the palette viewer what palette you want for that tile. And just change the 4th digit of each tile entry for the desired palette.
Should cover it for now. For a guide on a more automatic way to create TSAs, stay tunned!
QUOTE (Akaihinata) |
No Grey you have gay needs |
QUOTE (Holy Kensai) |
BECAUSE HE CAN CREATE ALL LIFE AND ALL EXISTANCE, BUT HE NEEDS YOUR MONEY! |
#2
Posted 18 November 2009 - 03:15 AM
Decent use of colors, but needs more pictures, good unique content though, mind if I add it to mainsite and the tutorial directory?
Signature thanks to Shu.
#3
Posted 18 November 2009 - 03:27 AM
I pretty much just copy-pasted a PM I made for Leafy from Pokemblem. XD I should update it later if possible be, add a bit of content I only taught rey so far as well.
Also, it is yours to play with. XD FEShrine has full rights over this guide, or any guide I post here, as long as the credit is given of course.
Also, it is yours to play with. XD FEShrine has full rights over this guide, or any guide I post here, as long as the credit is given of course.
QUOTE (Akaihinata) |
No Grey you have gay needs |
QUOTE (Holy Kensai) |
BECAUSE HE CAN CREATE ALL LIFE AND ALL EXISTANCE, BUT HE NEEDS YOUR MONEY! |
#4
Posted 18 November 2009 - 09:56 PM
Credit is always given (although it never hurts to mention it inside the guide, too, xD). Thanks for the permission.
^^Also, you would be surprised at all the mini-tutorials and doc I have written in PMs and post. Heck I've probably wrote tutorials for patching, savestates, and other misc. things about 50 times, cumulatively... And the thing is, I'm not exaggerating, I've probably actually written 50 quick tutorials. O_O
^^Also, you would be surprised at all the mini-tutorials and doc I have written in PMs and post. Heck I've probably wrote tutorials for patching, savestates, and other misc. things about 50 times, cumulatively... And the thing is, I'm not exaggerating, I've probably actually written 50 quick tutorials. O_O
Signature thanks to Shu.
#5
Posted 18 November 2009 - 10:01 PM
Heh, I know I have written like...3 or 4 only. XD All in post, I guess. We should just compile all possible guides we find in a huge "Misc Blazer guides" topic or something, just for the heck of it. XD
A miniguide sometimes is all a person needs to accomplish something.
...speaking of which, I should just turn my lessons with rey into chapter 2 of this guide... Hmmm... >___> *Considers himself inspired now*
A miniguide sometimes is all a person needs to accomplish something.
...speaking of which, I should just turn my lessons with rey into chapter 2 of this guide... Hmmm... >___> *Considers himself inspired now*
QUOTE (Akaihinata) |
No Grey you have gay needs |
QUOTE (Holy Kensai) |
BECAUSE HE CAN CREATE ALL LIFE AND ALL EXISTANCE, BUT HE NEEDS YOUR MONEY! |
#6
Posted 19 November 2009 - 02:22 AM
QUOTE (Ryrumeli @ November 18, 2009 02:01 pm) |
...speaking of which, I should just turn my lessons with rey into chapter 2 of this guide... Hmmm... >___> *Considers himself inspired now* |
Heh... I got a bunch of screenshots with mistakes NOT to make on my photobucket...
Maybe I should make the "Hacking" album ONLY public ._.
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users