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 - Secret of Mana Location Map Data | |
Add to favorites | "RSS" Feed | Next newer thread | Next older thread
User Post
Chickenlump

Level: 41

Posts: 586/722
EXP: 474192
For next: 5953

Since: 03-15-04
From: Columbia City Indiana

Since last post: 3 hours
Last activity: 4 min.
Posted on 06-20-05 01:05 AM Link | Quote
Some crappy notes I made earlier while looking for (and finding) some location map data.
It is fully laid out in RAM and compressed slightly in ROM. I just thought I'd toss this out for anyone wanting to play around with it. I plan on extending and better documenting it at a later time of course.

This data is for an unheadered ROM.

I'm not sure where it begins exactly (yet) but here is what I have so far...

Maps are done in rows from left to right in layers - This covers Layer 1

7F0621 - This is the top of the elder's house in Potos Village in RAM
D23F5 - This is the top of the elder's house in Potos Village in ROM


It reads 01 12 13 12 13 12 14 in RAM
It reads 01 12 13 E8 82 14 E0 in ROM

Each tile has a solitity property assigned with it (among other properties).

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: 5094/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 06-20-05 01:08 AM Link | Quote
Looks like it might be some sort of RLE/LZ77 compression, looking at that dump you posted. Notice the 'E8 82' replaces the repetitive '12 13 12', but there's still a '12 13' before it.
Chickenlump

Level: 41

Posts: 587/722
EXP: 474192
For next: 5953

Since: 03-15-04
From: Columbia City Indiana

Since last post: 3 hours
Last activity: 4 min.
Posted on 06-20-05 01:26 AM Link | Quote
I've never dealt with compression before (other than Temporal Flux's decompressor).
Lunar Compress has an entry for SoM, the title screen is compressed with one of it's entries. I'll see if it is the same compression scheme a bit later.

I also came across some sort of location map header (I'm not sure what to call it really).

$A933F - Music byte for Potos Village
$A9340 - Fade out time for previous song and echo effect of currnet song
$A9341 - Music volume (also seems to affect which instruments get played as well)
$A9343 - Event after music fades upon entering location
$A9344 - Also an event byte upon entering location



Alchemic

Level: 3

Posts: 1/3
EXP: 59
For next: 69

Since: 06-24-05

Since last post: 24 days
Last activity: 9 hours
Posted on 06-24-05 07:11 AM Link | Quote
I did some looking around at this data; addresses below are unheadered.

Potos Village:
Runs from 7F0000 to 7F19B3 in RAM.
Starts at 0xD23D6; not sure where it ends yet. The first two bytes affect practically the whole map when changed - tile set stuff? The rest is decompressed and dumped into the specified RAM range. However, if dumping a block of material (say, with an E0 code) and you breach the map width, the game with automatically jump to the next row (see below for row stuff). How the map width is determined is unknown; for Potos it's 0x34.

Rows seem to use 0x80 bytes in RAM (ie. addressN is a tile; addressN + 0x80 is the tile directly below it.) In Potos, the first 0x34 bytes of each entry stores Layer 1 tiles. I haven't looked at the rest yet.

Also, Potos loops east-west; you can test this by changing the first 0x34 bytes of any given row to 0x0, stepping onto the now-black tile space, and walking due right or left.

There seems to be a map-related pointer table at D0000. Some data, based on what changes when the pointers are corrupted:
D0020: D6 23 = D23D6 = Potos Village
D0022: 12 27 = D2712 = Potos Village
D0028: 81 2E = D2E81 = Potos Village indoors? (may just be the Inn)
D002A: F7 2E = D2EF7 = Potos Village indoors? (may just be the Inn)
D0030: 82 31 = D3182 = Potos/Pandora road
D0032: DA 3C = D3CDA = Potos/Pandora road

EDIT: Fixed some errors and added some stuff.
EDIT 2: This is getting kind of disorganized; my apologies.
Some of the compression stuff:

(prevByte1) indicates the previous byte to be decompressed; (prevByte2) indicates the byte decompressed before that; and so on (if necessary).

(Is there a C0? Would be kind of useless, you could just repeat the same tile byte...)
C1: Fill the next 2 bytes with (prevByte1).
C2: Fill the next 3 bytes with (prevByte1).
C3: Fill the next 4 bytes with (prevByte1).
C4: Fill the next 5 bytes with (prevByte1).
C5: Fill the next 6 bytes with (prevByte1).
C6: Fill the next 7 bytes with (prevByte1).
C7: Fill the next 8 bytes with (prevByte1).
(Is there a C8? Same issues as C0.)
C9: Fill the next 2 bytes with (prevByte2).
(Does it continue up to CF with the same pattern?)

E0 XX: Repeat a specific byte to fill (XX + 1) following bytes (is it always 0xBB, or is this a Potos-map-specific value?). The 0x80 bit may specify something.

E8 XX: Repeat previous byte/word to fill (XX + 1) following bytes. If the 0x80 bit is set, it's a word; if unset, a byte. 7F/FF will fill 128 bytes, not zero.

F1: Fill the next two bytes with (1 + prevByte1) (2 + prevByte1)


(edited by Alchemic on 06-25-05 11:32 AM)
(edited by Alchemic on 06-25-05 08:21 PM)
Add to favorites | "RSS" Feed | Next newer thread | Next older thread
Acmlm's Board - I2 Archive - Rom Hacking - Secret of Mana Location Map Data | |


ABII


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



Page rendered in 0.017 seconds.