øAslickproductions.org/forum/index.php?PHPSESSID=68p7via6vbjki8mblg09r3gui5&topic=738.0e:/My Web Sites/Slick Productions - FFIV Message Board/slickproductions.org/forum/index00de.htmlslickproductions.org/forum/index.php?board=16.0e:/My Web Sites/Slick Productions - FFIV Message Board/slickproductions.org/forum/index00de.html.zxÈ_h^ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÈð¥ìmOKtext/htmlISO-8859-1gzip8:ÖìmÿÿÿÿÿÿÿÿWed, 11 Mar 2020 04:05:53 GMT0ó°° ®0®P®€§²ð®È_h^œìm Map format in the ROM

Author Topic: Map format in the ROM  (Read 2878 times)

Entroper

  • Moderator
  • *
  • Posts: 235
  • Gender: Male
    • View Profile
Map format in the ROM
« on: August 19, 2008, 11:00:39 PM »
Hello all.  I'm not dead!

I have been rather busy lately.  I may have mentioned that we had a bug infestation at our apartment.  As it turned out, the bugs came back after the second extermination, and we elected to move to a vacant apartment across the street.  I've also had to work late a lot at my new job, but recently I've had a bit more free time to plug away at the project.

So, I've decided on a format for tiles and such in my maps.  The map file will have a tileset section that just lists pathnames to where tilesets can be found.  Each tileset has a definition file that contains filenames of all the images in the tileset.  This way, authors will be able to do drop-in replacements of upgraded tilesets, without having to edit the maps, and yet map editors can use as many tiles as they want per map.

I've started trying to rip the initial tilesets from the ROM, but I'm having some difficulty with the patterns.  If someone knows how the map's 16x16 tiles are composed from the 8x8 tiles in each tileset, that info would be greatly appreciated.  If not, I'll have to pore over these tiles and figure out why they're coming out weird looking.  :)

Entroper

  • Moderator
  • *
  • Posts: 235
  • Gender: Male
    • View Profile
Re: Map format in the ROM
« Reply #1 on: August 20, 2008, 04:09:26 PM »
I got it!

I fixed two bugs in the ripping code, and then discovered that the pattern tables are stored in a rather odd fasion.  All of the upper-left tiles for a map tileset come first, then all the upper-right tiles, etc.  So to assemble the first 16x16 tile, I need to look in the pattern table at entries 0, 128, 256, and 384 to see which 8x8 tiles to use.  Strange, but I can't argue with the results it produced.  :)  I now have the town tileset in .bmp format.

The next step is to identify all of the distinct tileset + palette combinations.  A lot of the dungeons in FF1 share the same tileset, and just use different color palettes (Gurgu Volcano's tileset is just a red version of the Earth Cave tileset).  Since I'm just using straight 24-bit images instead of bothering with palettized textures (which aren't well-supported by graphics drivers), I need separate tilesets for these.  But I don't want to rip a separate tileset for each map, since, for example, all five floors of the Earth Cave use the same tileset + palette combination.  Once I've identified and labeled these, I can have the program spit out all of the unique map tilesets into their own folders.  Then it's time for a little RLE-decompression on the map data.

In some other news, my Linux box died when I moved apartments.  I think there's just a PCI card not seated properly or something (the motherboard and case have had fitment issues ever since I built the thing), but I just haven't had time to unhook everything and drag it out to check.  It's acting as a headless server (not connected to a monitor or keyboard) because I usually just ssh into it, so fixing it is a pain.  The result of all this is that my web server will be down until I get it fixed.  Until then, I'll use the attachment system for updates.

Entroper

  • Moderator
  • *
  • Posts: 235
  • Gender: Male
    • View Profile
Re: Map format in the ROM
« Reply #2 on: August 20, 2008, 10:42:32 PM »
I've been productive today.   :omg: