Register | Login
Views: 19364387
Main | Memberlist | Active users | ACS | Commons | Calendar | Online users
Ranks | FAQ | Color Chart | Photo album | IRC Chat
11-02-05 12:59 PM
1 user currently in Rom Hacking: hukka | 2 guests
Acmlm's Board - I2 Archive - Rom Hacking - TSA info for multiple systems needed | |
Add to favorites | "RSS" Feed | Next newer thread | Next older thread
User Post
interdpth

Rex
Level: 36

Posts: 422/527
EXP: 294398
For next: 13712

Since: 03-20-04

Since last post: 10 days
Last activity: 31 days
Posted on 03-29-05 11:53 PM Link | Quote
Ok I need to know how the TSA for a block in the following systems are stored. SEGA genesis, SNES, NES, GB
example:
In the GBA and the DS it's stored like this
Tile 1 TSA'ed:
Pal + Tile + Flip Pal + Tile + Flip
Pal + Tile + Flip Pal + Tile + Flip So anyone help?
NetSplit

Koopa
Level: 19

Posts: 23/117
EXP: 30378
For next: 5399

Since: 04-05-04

Since last post: 1 day
Last activity: 1 hour
Posted on 03-30-05 12:51 AM Link | Quote
TSA has various formats, some depending simply on the people who made it and some on other formats the game uses. I don't know much about Genesis nor SNES, so I'll discuss NES stuff (which should also be applicable for Game Boy).

Consider this as a 16x16 pixel block:

A B
C D


Basically, TSA formats tend to go A B C D or A C B D. They're usually 1 byte per tile and they can't use different palettes per tile (with the exception of one mapper for NES which supports it, but I don't know anything about that), nor can they be flipped horizontally or vertically. Sometimes there will be an attributes byte along with the 4 TSA bytes (and even rarer, there will be other data there, too. I think Kickle Cubicle has a whole bunch of block property data with the TSA data), though it might be separate from the TSA data. Sometimes the 4 bytes for the data will be in 4 different locations, so you have all the A's, all the B's, etc. all in their own groups, like in Faxanadu (which also has attribute and property data in the same area).

If a game uses 32x32 pixel blocks, it usually builds the 16x16 pixel blocks and then uses those to build the larger ones, which it does in the same way it built the smaller blocks (like in Ninja Gaiden 2, and quite possibly the other 2 NG games). Other games, like Castlevania, will build the 32x32 pixel blocks directly by defining all 16 tiles used in a large block; they won't bother with the smaller blocks.

I would imagine GB is no different, since I've worked with it a bit before and found it to be just like this.

A bunch of this info can be found in section 8 of The Art of ROMhacking. It's a pretty good guide to reference for this kind of stuff. Also, if you wanna know about sprite TSA, that document covers that, as well; I haven't worked with it much before and wouldn't be much help, so that's your best bet (it seems to be really similar to block TSA, though, according to the example in the document, but the few times I have worked with it had a few more complex things such as coordinates for where each tile is in relation to a certain point).
Parasyte

Bullet Bill
Level: 35

Posts: 396/514
EXP: 267348
For next: 12588

Since: 05-25-04

Since last post: 104 days
Last activity: 32 days
Posted on 03-30-05 12:06 PM Link | Quote
What you are looking for is not "TSA" data, but the format of VRAM.
Here's some general information for genesis:

_ SCROLL PATTERN NAME _

The SCROLL SCREEN's name table is in VRAM and set by REG. #2 and #4.
The PATTERN NAME requires 2 bytes (1 word) per CELL the SCROLL screen.
Depending on the SCROLL screen's size. VRAM and SCROLL SCREEN correspond
with each other differently. Refer to SCROLL SCREEN SIZE.


pri : Refer to PRIORITY
cp1 : Color palette selection hit
(See COLOR PALETTE)
cp0 : -ditto-
vf : V REVERSE bit 1: REVERSE
hf : H REVERSE bit 1: REVERSE
pt10 - pt0 : PATTERN GENERATOR NUMBER
...

5. VRAM MAPPING

In VRAM, there are various TABLEs and PATTERN GENERATORs as stated below.
Among those, the base address of PATTERN GENERATOR TABLE and SPRITE
GENERATOR TABLE are 0000H and fixed. However, the other base addresses can be
freely assigned in VRAM by setting VDP REGISTER. Also, AREA can be overlapped.
Therefore, TABLE can be commonly used by SCROLL screen and WINDOW for
example.

SCROLL A PATTERN NAME TABLE Max. 8K Byte.
Base address designated by Register #2.
SCROLL B PATTERN NAME TABLE Max. 8K Byte.
Base address designated by REGISTER #4.
WINDOW PATTERN NAME TABLE varies by H Resolution
Base address designated by REGISTER #3.
H SCROLL DATA TABLE 1K Byte
Base address designated by REGISTER #13
SPRITE ATTRIBUTE TABLE Varies by H Resolution
Base address designated by REGISTER #5
PATTERN GENERATOR TABLE
Base address is 0000H (fixed).
SPRITE GENERATOR TABLE
Base address is 0000H (fixed).

There are 1K Bytes for H SCROLL TABLE, however, as for display 896 Bytes in V28 cell
mode and 980 bytes in V30 cell mode. There are 2K bytes for WINDOW PATTERN
NAME TABLE in H32 cell mode, and 4K byte area in H 40 cell mode. For details refer
to WINDOW. There are 512 bytes for SPRITE ATTRIBUTE TABLE in H32 cell and 1K
byte area in H40 cell mode. However as for display, there are 640 bytes in H40 cell
mode.



(edited by Parasyte on 03-30-05 02:07 AM)
HyperLamer
<||bass> and this was the soloution i thought of that was guarinteed to piss off the greatest amount of people

Sesshomaru
Tamaranian

Level: 118

Posts: 3988/8210
EXP: 18171887
For next: 211027

Since: 03-15-04
From: Canada, w00t!
LOL FAD

Since last post: 2 hours
Last activity: 2 hours
Posted on 04-01-05 05:55 AM Link | Quote
Games can store TSA however they want. If you mean VRAM, I can tell you all you need to know about Gameboy. Tile data is at 0x8000 - 0x9800, containing 384 tiles. The game can select two mapping styles (and of course, switch between them during h-blank, making it hundreds of times more useful). In one, tile 0 is at 0x8000, tile 255 is at 0x8FF0. In the other, 0 is at 0x8800, 255 is at 0x97F0. VRAM contains two tile maps of 32x32 tiles, one at 0x9800 and the other at 0x9C00. The game can choose either one for both the main screen and the window (similar to another layer on SNES, but unfortunately, no transparency - it's a solid bitmap overtop of the other layer, though it can of course be disabled). On GB Colour, a second VRAM bank can be selected which contains another 384 tiles and the attributes for each tile on the map. (Where map position X's tile data is in bank 0 is where its attributes are in bank 1, pretty simple really.) Only one group of 384 tiles can be used at a time, but again this can be switched during hblank. (This is somewhat rare though, since unfortunately you have to switch back to bank 0 to modify the tile map.)

So yeah.
Add to favorites | "RSS" Feed | Next newer thread | Next older thread
Acmlm's Board - I2 Archive - Rom Hacking - TSA info for multiple systems needed | |


ABII


AcmlmBoard vl.ol (11-01-05)
© 2000-2005 Acmlm, Emuz, et al



Page rendered in 0.005 seconds.