"Oh, wow--that totally rocks!
Thanks a million. You've saved me an incredible amount of work."

Mon Ful Ir, Aug 29 2008

"So I checked out the XSLT converter and my goodness: this is an amazing piece of work!
It's fantastic that you can convert DUNGEON.DAT into XML because this info can be used by anyone now (well, anyone who knows how to use XML files).
Excellent work!"

Gambit, Feb 13 2008

"Greatstone's work looks interesting."
Paul Stevens, Feb 14, 2008

i'm gathering info enough to render complete dungeon viewport (DM snes style) in some ways: (i) using sck (swoosh construction kit) to extract viewport information. it includes decoder for "558 item", very excellent!
Kentaro, Mar 11 2007


Technical documentation - articles - SNES multi-palettes images
DM SNES: how to decode images using multiple palettes by tiles group

The extraction of DM SNES version resources was a hugh work. A lot of data can be now extracted but, as nothing is perfect in this world, there is always something to do.
One annoying point is the fact that some images don't use the right color palette with all tiles. As you may know, a SNES image is a list of tiles (ex: 8x8 pixels) and a color palette. There are palettes in DM SNES with 256 colors but each image in DM can just have 16 colors. So, we have to select the sub-palette (16 colors) to be used with a specific image. It's ok for a lot of images but not all. We have in fact SNES images using different sub-palettes (from a common full 256 colors palette) for group of tiles. Example: tiles 0 to 3 must use sub-palette 2, tiles 4 to 7 must use sub-palette 0, etc. Consequently, there is somewhere in the rom an item containing the palette indexes of graphics for a specific image item. Moreover we must know how many tiles to use by group.
There is also a special case to handle, if the resulting images is a sprite or not: if not, the selected sub-palette indexes must be incremented by 8. This explanation is copyrighted by C.Fontanel and I have translated it in a new mapfile syntax and implemented in the sck.

To modelize this behavior, we must highlight in the corresponding mapfile (see dm_snes_jp.map):

  • a new item, labelled PALSEL (PALette SELector), to identify a palette indexes list
    Example:

    018156,PALSEL,SIZE=32&ID=PALSEL1,Palette indexes of item graphics in items 999470,,

  • a new attribute for image item, labelled TILESBYITEM, to describe the size of the tile groups (each group will be associated with one palette index found in the PALSEL item). The objects use 4 (2x2) tiles by group. The champion portraits use 9 (3x3) tiles by group.
    Example:

    999470,ROMIMG3,GH=ROMGH&TMWIDTH=2&TMHEIGHT=64&PAL=PALETTE_INGAME&PALSEL=PALSEL1&TILESBYITEM=4&PALSEL_INCR=8&ID=TILES_ITEMS1,Items 0,

  • a new attribute for image item, labelled PALSEL_INCR, to describe the indexes shift to use (if not sprite, use 8).
  • associate the image item with the PALSEL item and the TILESBYITEM attribute
    Example:

    999470,ROMIMG3,GH=ROMGH&TMWIDTH=2&TMHEIGHT=64&PAL=PALETTE_INGAME&PALSEL=PALSEL1&TILESBYITEM=4&PALSEL_INCR=8&ID=TILES_ITEMS1,Items 0,

Finally, 8 PALSEL have been discovered:

018156,PALSEL,SIZE=32&ID=PALSEL1,Palette indexes of item graphics in items 999470,,
018188,PALSEL,SIZE=32&ID=PALSEL2,Palette indexes of item graphics in items 999471,,
018220,PALSEL,SIZE=32&ID=PALSEL3,Palette indexes of item graphics in items 999472,,
018252,PALSEL,SIZE=32&ID=PALSEL4,Palette indexes of item graphics in items 999473,,
018284,PALSEL,SIZE=32&ID=PALSEL5,Palette indexes of item graphics in items 999474,,
018316,PALSEL,SIZE=32&ID=PALSEL6,Palette indexes of item graphics in items 999475,,
018348,PALSEL,SIZE=32&ID=PALSEL7,Palette indexes of item graphics in items 999476,,
...
111859,PALSEL,SIZE=24&ID=PALSEL8,Palette indexes of champion portraits in item 999480,,

Here is an example of a PALSEL item content (taken from PALSEL1):

1 1 1 1 3 3 3 3 3 3 4 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 5 5 6 3 3

And we are now able to perfectly decode 8 images (all DM item graphics and the champion portraits):

999470,ROMIMG3,GH=ROMGH&TMWIDTH=2&TMHEIGHT=64&PAL=PALETTE_INGAME&PALSEL=PALSEL1&TILESBYITEM=4&PALSEL_INCR=8&ID=TILES_ITEMS1,Items 0,
999471,ROMIMG3,GH=ROMGH&TMWIDTH=2&TMHEIGHT=64&PAL=PALETTE_INGAME&PALSEL=PALSEL2&TILESBYITEM=4&PALSEL_INCR=8&ID=TILES_ITEMS2,Items 1,
999472,ROMIMG3,GH=ROMGH&TMWIDTH=2&TMHEIGHT=64&PAL=PALETTE_INGAME&PALSEL=PALSEL3&TILESBYITEM=4&PALSEL_INCR=8&ID=TILES_ITEMS3,Items 2,
999473,ROMIMG3,GH=ROMGH&TMWIDTH=2&TMHEIGHT=64&PAL=PALETTE_INGAME&PALSEL=PALSEL4&TILESBYITEM=4&PALSEL_INCR=8&ID=TILES_ITEMS4,Items 3,
999474,ROMIMG3,GH=ROMGH&TMWIDTH=2&TMHEIGHT=64&PAL=PALETTE_INGAME&PALSEL=PALSEL5&TILESBYITEM=4&PALSEL_INCR=8&ID=TILES_ITEMS5,Items 4,
999475,ROMIMG3,GH=ROMGH&TMWIDTH=2&TMHEIGHT=64&PAL=PALETTE_INGAME&PALSEL=PALSEL6&TILESBYITEM=4&PALSEL_INCR=8&ID=TILES_ITEMS6,Items 5,
999476,ROMIMG3,GH=ROMGH&TMWIDTH=2&TMHEIGHT=64&PAL=PALETTE_INGAME&PALSEL=PALSEL7&TILESBYITEM=4&PALSEL_INCR=8&ID=TILES_ITEMS7,Items 6,
...
999480,ROMIMG3,GH=ROMGH&TMWIDTH=3&TMHEIGHT=85&PAL=PALETTE_INGAME&PALSEL=PALSEL8&TILESBYITEM=9&ID=TILES_PORTRAITS,Portaits,3x85+1 tiles

All DM SNES mapfiles have been updated:
  • dm_snes_en.map (DM SNES english rom)
  • dm_snes_jp.map (DM SNES japanese rom 1.0)
  • dm_snes_jp_11.map (DM SNES japanese rom 1.1)
Here are the extracted images:
Items 0
Items 1
Items 2
Items 3
Items 4
Items 5
Items 6
Portraits

Credits

Christophe Fontanel, who understood first this format.

History

1.0 (11 March 2007): initial release.