News:

Don't forget to visit the main site! There's lots of helpful docs, patches, and more!

Main Menu

[SM] Level Data format

Started by JAM, October 06, 2010, 06:40:42 PM

Previous topic - Next topic

JAM

Does anyone know how this data stored in the ROM? Of course, I can edit any room with SMILE, but SMILE is compressing the data and all I want is change 2-3 tiles in 5 rooms of original ROM and get very small IPS file as result.

Looks like, Layer 1 data are stored at first, BTS data at second and Layer 2 data at last. I'm understanding only how BTS values are stored.

Scyzer

#1
The data is compressed starting from top left to bottom right, with horizontal rows compressed separately IIRC
The compression works with repeating bytes/patterns, which means if you change just one tile, it will change data for the entire compressed level data after it. You won't be able to make the new tiles without huge changes to level data unless you store level design as uncompressed data, which would be huge anyway. Level data would be dependent on how many screens rather than complexity.
If the level data were uncompressed in the rom, a single screen would be $300 bytes, $500 with 2 layers.

You'll just have to change the tiles and hope for the best, as changing the level data manually can screw up the patterns in the compression, and screw over the entire room.

P.JBoy

Here's the compression format if you're interested
...

JAM

Sadiztyk Fish
Thanks for info. Looks like, tiles are compressed more intensively than BTS data due to repeated tile patterns. And I've successfully changed value of BTS block with non-zero value just making research for BTS value.

P.JBoy
Just exactly what I needed. Thanks a bunch!