"I aim to post one map per day."
wow.
Long story short,
rise from your grave. I've done some analysis on the level format, and it seems to be a some kind of LZSS'd string of both, the physical tile definitions and tiles to print after each other with no indicator where either ends or begins. Very tedious. Digging deeper would be a waste of time, because the goal here is not to edit the levels (maybe one day ;_;) but to export the tilemaps. How, you ask?
Well, I'm confident a simple program would do the trick. Having no practically no programming skill, I'll pitch you programmers out there a plan.
First off, check the map I made out:
Then, check out this data in a ZST of Field 00, $2C13–$4C13, displayed in Tile Molester as a 2-dimensional 15bpp 555 array:
Lay them on top of each other...
The case is obvious! A ZST saved from a field contains the level tilemap data always at 0x2C13 and is 0x2000 bytes big. So, how would a mapper work?
- The program opens a ZST of choice and reads the data from 0x2C13 onwards.
- Reading two bytes at a time, byte 1 determining the 8x8 tile to print, byte 2 telling the properties of the tile in question1.
- Once 128 bytes have been printed, start a new row of tiles. Repeat step two 63 more times so all $2000 bytes, or, 4096 tiles have been printed.
- That's it! The map is ready (for post-processing2).
Note 1: The properties.
The property byte is made from 8 function bits:
vhUp ppBB
v = vertical flip the tile
h = horizontal flip the tile
U = unused
ppp = 3 bits, defines the palette to use from the 8 total palettes
BB = 2 bits, defines the bank to use from the 4 total banks
So $17, or,
00010111 would be a tile that is not flipped vertically (
0) or horizontally (
0) with the unused bit not set (
0), using palette $5 (
101) and is loaded from bank $3 (
11).
But where are the graphics loaded from?All graphics are always loaded from 0x20C12, and their total size is $8000 bytes, $2000 per bank, respectively.
Okay, what about the palettes?All palettes are always loaded from 0x618, the same way Tile Molester reads them, as 15bpp little-endian. The first bit is unused, then 5 bits for defining blue, 5 bits for green and 5 bits for red. 0
111 1111 1111 1111.
Note 2: Post processing.
Obviously, even if this tool gives 'perfect' output, all we have is a representation of the tiles that the level is built from. This is fine, but obviously enemy/player/rucksack positions, animated conveyors, the water level and some info about where the doors lead to should also be shown in the map. If a tool gets made, I promise that I can personally add this all afterwards in Photoshop.
If the game is paused, pressing the directional buttons scrolls the view to the desired direction, but only a bit. I'm searching for a "maximum amount of pixels you can scroll your view while paused"-value, and if/once found, adding sprites will be very easy. I can do this, personally, also, unless someone is ovely interested.
So uh, yeah. Anyone excited? :C