Jump to content



Toggle shoutbox Shoutbox Open the Shoutbox in a popup

@  Fire Blazer : (15 September 2019 - 05:39 AM) I do kinda miss the days these forums were active :(
@  Ezra : (29 August 2019 - 04:14 PM) *BOX!!!*
@  kirant : (19 August 2019 - 12:49 PM) Huh. Bothammer time.
@  Elwood : (12 August 2019 - 05:57 AM) Oh, new posts! ...And it's bots. Kinda nostalgic actually.
@  xcrash1998 : (22 June 2019 - 09:24 PM) (Brushes dust of the Shoutbox)
@  Elwood : (17 June 2019 - 06:14 AM) *tumbleweed*
@  Lucina : (16 June 2019 - 09:19 AM) Whew. I haven't been here in forever.
@  Cero : (11 June 2019 - 06:51 PM) oof
@  kirant : (01 June 2019 - 05:54 PM) f
@  Fire Blazer : (30 May 2019 - 03:01 AM) rip
@  Valke : (29 May 2019 - 08:20 AM) bruh i deleted my discord a few months ago,,,,
@  Fire Blazer : (28 May 2019 - 01:59 AM) glad ur alive. join our Discord
@  Fire Blazer : (28 May 2019 - 01:59 AM) yo
@  Valke : (25 May 2019 - 03:08 PM) im alive, college finally gave me breaks (coupled with a few assignments i need to turn next week)
@  Valke : (25 May 2019 - 03:07 PM) hi
@  Valke : (25 May 2019 - 03:07 PM) guys
@  Fire Blazer : (25 March 2019 - 10:43 PM) how things have changed
@  Elwood : (12 March 2019 - 08:31 AM) (a sigh somewhere between small and large)
@  kirant : (12 March 2019 - 05:40 AM) (larger sigh)
@  Fire Blazer : (11 March 2019 - 08:49 PM) (small sigh)

Photo

Ryru's TSA Manual Editing guide


  • Please log in to reply
5 replies to this topic

#1 Ryrumeli

Ryrumeli

    Hit by a meteor

  • Members
  • PipPipPipPipPipPipPipPip
  • 424 posts
  • Location:Inside a giant Mecha, fighting monsters in your city.

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. wink.gif 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! biggrin.gif
user posted image
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 Fire Blazer

Fire Blazer

    You ready?

  • Creator
  • 12,103 posts
  • Gender:Male
  • Location:U.S.A.
  • Interests:Too many to list. =P

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?

Bblazer2.png

Signature thanks to Shu.


#3 Ryrumeli

Ryrumeli

    Hit by a meteor

  • Members
  • PipPipPipPipPipPipPipPip
  • 424 posts
  • Location:Inside a giant Mecha, fighting monsters in your city.

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. wink.gif
user posted image
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 Fire Blazer

Fire Blazer

    You ready?

  • Creator
  • 12,103 posts
  • Gender:Male
  • Location:U.S.A.
  • Interests:Too many to list. =P

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

Bblazer2.png

Signature thanks to Shu.


#5 Ryrumeli

Ryrumeli

    Hit by a meteor

  • Members
  • PipPipPipPipPipPipPipPip
  • 424 posts
  • Location:Inside a giant Mecha, fighting monsters in your city.

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. wink.gif


...speaking of which, I should just turn my lessons with rey into chapter 2 of this guide... Hmmm... >___> *Considers himself inspired now*
user posted image
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 shadowofchaos

shadowofchaos

    ??????

  • Members
  • PipPipPipPipPipPipPipPipPipPip
  • 721 posts

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

I really don't want anyone seeing all the fanart I've collected... *cough*
user posted image




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users