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 - Re-writing a Game's TSA Engine? | |
Add to favorites | "RSS" Feed | Next newer thread | Next older thread
User Post
Rockman

Flurry
Level: 26

Posts: 200/250
EXP: 96387
For next: 5888

Since: 03-17-04

Since last post: 18 days
Last activity: 16 days
Posted on 05-01-05 08:36 AM Link | Quote
I have heard DahrkDaiz talk about this before. When he was hacking Super Mario Bros. 2, he changed the game's TSA engine. He even managed to change the way the graphics were stored, in his Super Mario Bros. hack, Mario Seasons. I'm about to go read some of the 6502 documents for the NES, but while I'm doing that, if anyone has any useful information regarding this subject, that would be cool. Thanks a lot.
Parasyte

Bullet Bill
Level: 35

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

Since: 05-25-04

Since last post: 104 days
Last activity: 32 days
Posted on 05-01-05 11:11 AM Link | Quote
Yes, you must study the NES PPU, and study it well. Making such hacks will require more knowledge of the PPU than the CPU. In other words, forget about 6502 until you understand what it is about 6502 that you will need to learn. And that is; everything related to how to manipulate the PPU to do what you want. I guess I'm being a bit cryptic about the whole thing, but it's not without reason. You're worrying about the CPU when you should be focusing on the PPU. So go do that, instead.
Rockman

Flurry
Level: 26

Posts: 202/250
EXP: 96387
For next: 5888

Since: 03-17-04

Since last post: 18 days
Last activity: 16 days
Posted on 05-01-05 09:09 PM Link | Quote
Yah, I'm reading, re-reading, and studying the PPU section in the NES Tech document. I also have open Firebug's Mapper Document. These documents are very useful. I'm going to try to see if I can do what DahrkDaiz did to Super Mario Bros; add a new mapper, and rewrite the TSA. Should be fun!
dan

Snap Dragon
Level: 43

Posts: 559/782
EXP: 534516
For next: 30530

Since: 03-15-04

Since last post: 20 hours
Last activity: 14 hours
Posted on 05-02-05 12:20 AM Link | Quote
Unless a game uses a totally ass-backwards-major-fucked-up way of storing the TSA, I can't really see why you would need to change the TSA engine of a game. Just seems like it would be a waste of effort (and would probably break any level editors for the game).
Rockman

Flurry
Level: 26

Posts: 207/250
EXP: 96387
For next: 5888

Since: 03-17-04

Since last post: 18 days
Last activity: 16 days
Posted on 05-02-05 01:33 AM Link | Quote
Changing the way the tiles are stored isn't TSA hacking, is it?

I think I figured out how DahrkDaiz stored his graphics for Mario Seasons. He just put them the way he wanted them to appear, and changed the order of the tile numbers.
DahrkDaiz

Red Super Koopa

Acmlm's Mosts 2005
Best ROM Hacker

Level: 45

Posts: 631/885
EXP: 643520
For next: 16644

Since: 03-15-04
From: K-Town

Since last post: 4 hours
Last activity: 4 hours
Posted on 05-02-05 04:56 AM Link | Quote
for SMB, I changed the TSA data, how the tiles are actually arranged on the pattern table has absolutely no bearing on the TSA data. I just modified the TSA data to fit the pattern table I created, rather than creating a pattern table to fit the TSA.

For SMB2, the game drew the tiles based on level tile id numbers, meaning one 16x16 block had a unique id (256 in all) and that id was used as an index into the TSA data table, however, the method it used limited how many ids you could have unique TSA data for. SMB3's method used a 1028 byte table which the first 256 bytes was the upper left hand corner, the next 256 was the upper right hand corner, and so on..., tile number and used 4 indexed tables to draw each unique tile id number (tile id nubmers are stored in RAM for SMB2 and SMB3 both in the 6000-about 75FF range). Anyways, there was enough free space in SMB2 so I could include one giant 1KB (1028 byte) table and used the same SMB3 method for indexing TSA data so each tile id could have a unique set of TSA data.

So for SMB2, I just lucky that the drawing engines were very similiar (with SMB3), I just changed how it referenced the data so I could make full use of every tile id number.
Rockman

Flurry
Level: 26

Posts: 209/250
EXP: 96387
For next: 5888

Since: 03-17-04

Since last post: 18 days
Last activity: 16 days
Posted on 05-02-05 09:45 AM Link | Quote
How did you change the TSA "data"? What I know is that you can easily find the tile numbers by searching for the hex values in a hex editor. But other than that, I don't know. When you say edit data, you don't mean editing the engine, do you?
dan

Snap Dragon
Level: 43

Posts: 560/782
EXP: 534516
For next: 30530

Since: 03-15-04

Since last post: 20 hours
Last activity: 14 hours
Posted on 05-02-05 03:30 PM Link | Quote
Usually when you edit the TSA data, you don't change the engine. Sometimes, it is not as easy as searching for the tile numbers in the ROM. Some ROMs don't store each 16x16 tile (or whatever) in one continuous sequence (like SMB3). Or some ROMs don't even store the 8x8 tiles that are used to make up a tile (Megaman comes to mind).
Fx3

Shyguy
Level: 13

Posts: 11/80
EXP: 10252
For next: 15

Since: 04-11-05
From: Brazil

Since last post: 98 days
Last activity: 34 days
Posted on 05-04-05 03:59 AM Link | Quote
TSA is a table of values. The engine fetches them in a certain manner and do the proper screen arrangement. However, there's no sense changing certain things, like air, solid, spikes, in-water etc.. Plus, the GFX table - it can or cannot use interleaved tiles - changing the TSA engine would imply in a full GFX change. In my opinion, storage x storage I prefer the original. Anyway, your hack might extend this thing a bit... It depends what you want to do exactly.
Parasyte

Bullet Bill
Level: 35

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

Since: 05-25-04

Since last post: 104 days
Last activity: 32 days
Posted on 05-04-05 04:10 AM Link | Quote
One possibility is changing an engine which stores level data as objects (IE, Metroid) and rewriting it to use something quite a bit different, such as blocks of 2x2 tiles (16x16 pixels). Though I haven't quite decided what to change it to, Metroid will have to suffer through such a hack. As I've stated elsewhere, the object render code is much too slow. When the engine needs to draw the next screen, it has to step through every object in a room to find the ones at the edges of the screen. Blah, blah.
So that's one reason for making such vast modification. But I would not recommend trying it just because others have. To paraphrase Fx3, do something useful with it.
dormento

Shyguy
Level: 17

Posts: 99/99
EXP: 24075
For next: 668

Since: 03-15-04
From: Esteio - Brasil

Since last post: 182 days
Last activity: 161 days
Posted on 05-04-05 07:29 AM Link | Quote
One possibility is changing an engine which stores level data as objects (IE, Metroid) and rewriting it to use something quite a bit different, such as blocks of 2x2 tiles (16x16 pixels). Though I haven't quite decided what to change it to, Metroid will have to suffer through such a hack. As I've stated elsewhere, the object render code is much too slow. When the engine needs to draw the next screen, it has to step through every object in a room to find the ones at the edges of the screen. Blah, blah.
So that's one reason for making such vast modification. But I would not recommend trying it just because others have. To paraphrase Fx3, do something useful with it.


Yay for multi directional scrolling


(edited by dormento on 05-03-05 02:37 PM)
Add to favorites | "RSS" Feed | Next newer thread | Next older thread
Acmlm's Board - I2 Archive - Rom Hacking - Re-writing a Game's TSA Engine? | |


ABII


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



Page rendered in 0.005 seconds.