+  RHDN Forum Archive
|-+  Romhacking
| |-+  ROM Hacking Discussion
| | |-+  Help with palette data and pointers snes
Pages: [1]
Author Topic: Help with palette data and pointers snes  (Read 2 times)
elixirnova
Guest
« on: September 11, 2008, 03:00:05 pm »

So I have found a bunch of TSA data for the stages in my ROM and palette data and object/sprite data. The stuff that is giving me problems is Palette and GFX data. The game is made by capcom if anyone has any experience with capcom formats. Right now I have found the following addresses and some description
Quote
$08:1AFE is where the offset to the next ptr is stored, this is not changed on level load or anything, probably not important

$08:8627 - Two bytes? This points to the next position in the same pointer table to read the offset for the next ptr
   When this value is changed to another similar val;ue all stage sprites are incorrect graphics and palette, but TSA is same

$08:86B1 - Two bytes length. The offset position for the next pointer table is stored here. (table begins at $08:8623 and is offset by an X position to get to this address)

$08:89DF - Three bytes here. (Table starts at $08:8626 and was offset by X that comes from stack)
   Byte 1( and 2?) = ptr number to load in next table
   Byte 3 = not sure what this byte does??

$06:819C - two bytes here representing the address of the next 5 byte block of data that is also in bank $06
   These bytes are read from a table beginning at $06:8180 that is offset by the previous data to find the desired address to point to

$06:8385 - block of 5 bytes (xx, yy yy, zz zz)
   xx * 2 = length
   yy yy = address of palette
   zz zz = store palette to this position in pallet block in RAM

$0C:B0E0 - A block of palette data that is #$10*(2) in bytes of length
   This palette is used for Life bars yellow shots, X's charging energy, smoke, health/weapon energy pickups, and some other stuff

So this is from tracing backwards from the palette data I found. I'm not too sure what to make of it except a bunch of pointers... Is there any methods that I am not aware of to find out how the graphics and palette are set for each TSA or sprite data I have found? So far the sprite/TSA data doesn't seem to affect the palette for it at all. Granted I have not yet traced the sprite data back as far as I'd like to yet. There is still no link between the stage TSA data and the graphics and palettes loaded for the stage.

Just wondering if anyone had any input or thoughts on what I could do next aside from tracing everything I can and reading through assembly .
KingMike
Guest
« Reply #1 on: September 11, 2008, 03:21:50 pm »

Is it HiROM or LoROM?

If it's LoROM, the first address is actually a RAM pointer (xx:0000-xx:1FFF = first 8KB of RAM (except when x=70-7F).
elixirnova
Guest
« Reply #2 on: September 11, 2008, 03:44:27 pm »

Yea I understood that the first address is a RAM pointer. I believe I tried setting a breakpoint in snes9x debugger for when it is written to, but it didn't turn anything up. For some reason I do not think snes9x always catches ram being written to or I'm not sure how to set a breakpoint for it.

Although your explanation of the bank number explains alot after reading through lots of this assembly!
Quote
(xx:0000-xx:1FFF = first 8KB of RAM (except when xx=70-7F).

Is there a way to find out when $xx:1AFE is written to to trace that value back? I tried typing 001AFE into snes9x breakpoint for write and it turns up nothing through the stage select screen up until I'm playing the stage...


I am also trying following the loading of the stage number which is also stored to RAM right after it is read thus I cannot find when it is read again in snes9x... Looking through my assembly log I do find it quite a few times and am going through that right now... So now I'm kinda coming towards some sort of desired data from the stage # to load and from the actual data itself. I'm bound to find something!

EDIT: It is pretty much a piece of cake to trace from the stage number loading, forward, to the palette data instead of palette data backwards to stage #...
« Last Edit: September 11, 2008, 04:28:35 pm by elixirnova »
Pages: [1]  


Powered by SMF 1.1.4 | SMF © 2006-2007, Simple Machines LLC