Dungeon Master: Swoosh Construction Kit - A data extractor




"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


Mapfile
Specification 2.x

Date:
28 October 2008
This version:
http://greatstone.free.fr/dm/d_mapfile_20.html
Last version:
http://greatstone.free.fr/dm/d_mapfile_20.html
Author:
Pierre Monnot
History:
28 Octobre 2008: 2.5 release. Add INT2, P3B1, P8B1, P8B2, IMGEHB, CW_SNB, CW_BGD, CW_BGDDEF, CW_BGDGRAPH, CW_BGDMASK, CW_BGDCODE, CW_BGDDECFLOOR, CW_BGDDECWALL, CW_AMG, CW_WALLDEC, BMP items.
11 March 2007: 2.4 release. Add PALSEL item. Add PALSEL, PALSEL_INCR and TILESBYITEM attributes to ROMIMG1 to ROMIMG6.
28 May 2006: 2.3 release. Add FTL value for FORMAT attribute and syntax to specify external file for attribute value.
09 January 2006: 2.2 release. Add CMP value for FORMAT attribute.
18 December 2005: 2.1 release. COLORCHANGE and REVERSEORDER attributes added.
01 December 2005: 2.0 release.

Table of content
1.Header
1.1.Goal
1.2.Properties
1.2.1.MAPFORMATVERSION
1.2.2.MAPVERSION
1.2.3.FORMAT
1.2.4.CLOCKMODE
1.2.5.ENDIAN
2.Data
2.1.Goal
2.2.Comment
2.3.Item definition
2.3.1.Item number
2.3.2.Item type
2.3.3.Item attributes
2.3.4.Item description
2.3.5.Item long description
2.3.6.Item comment
3.Items types
3.1.ECI
3.2.IMG1
3.3.IMG2
3.4.IMG3
3.5.IMG4
3.6.IMG5
3.7.MUS1
3.8.MUS2
3.9.SND1
3.10.SND2
3.11.SND2B
3.12.SND3
3.13.SND4
3.14.SND5
3.15.SND6
3.16.SND7
3.17.SND8
3.18.SND9
3.19.FNT1
3.20.SEQ1
3.21.SEQ2
3.22.TXT1
3.23.TXT2
3.24.TXT3
3.25.OFFSET3
3.26.OFFSET4
3.27.PAL
3.28.PALSEL
3.29.P4B1
3.30.P4B2
3.31.P5B1
3.32.P5B2
3.33.PALAN
3.34.RAW1
3.35.RAW2
3.36.RAWINSTR
3.37.RAWINSTR_AMIGA
3.38.ROMGH
3.39.ROMDATA
3.40.ROMIMG
3.41.ROMIMG1
3.42.ROMIMG2
3.43.ROMIMG3
3.44.ROMIMG4
3.45.ROMIMG5
3.46.ROMIMG6
3.47.ROMIMGH5
3.48.ROMDUNGEON
3.49.ROMCHAMPION
3.50.TILEMAP1
3.51.TILEMAP1D
3.52.TILEMAP2
3.53.TILEMAP2H
3.54.TILEMAP2H8
3.55.TILEMAP2JP
3.56.SPRITEMAP
3.57.SPRITEMAP2
3.58.SNES558
3.59.NULL
4.Compatibility
4.1.Shortcuts
4.2.Aliases

1.Header
1.1.Goal
It defines the global attributes used for all items.
property=value,property=value,property=value,...
1.2.Properties
1.2.1.MAPFORMATVERSION
Type: string
Goal: defines the mapfile specification version required to read this file.
Mandatory: yes
Example:

1.0

1.2.2.MAPVERSION
Type: string
Goal: defines the version of this mapfile. Each new release must increment this property.
Mandatory: yes
Example:

1.1

1.2.3.FORMAT
Type: string
Goal: defines the resource type to avoid error in the resource extraction.
Mandatory: yes
Values allowed:
EXEdefines that the resource is an executable, a file containing code.
DMCSB1defines the header format of the resource (graphics.dat, animate.dat, hcsb.dat, naked.amg) which is a collection of items. See the DM/CSB Encyclopaedia for details.
DMCSB2defines the header format of the resource (graphics.dat, song.dat) which is a collection of items. See the DM/CSB Encyclopaedia for details.
DMIIdefines the header format of the resource (graphics.dat) which is a collection of items. See the DM/CSB Encyclopaedia for details.
SINGLEITEMdefines one item without any header (some *.amg files, etc.).
ROMdefines a complete rom as the SNES one, grouping together code, dungeon.dat, graphics.dat, etc.
CMPdefines a portrait file (*.cmp) as found in Chaos Strikes Back utility disk.
FTLdefines a FTL file (*.ftl), which can contains images, sounds, texts, palettes, etc.
Example:

FORMAT=DMCSB1

1.2.4.CLOCKMODE
Type: string
Goal: defines the clock mode to use to extract item for Amiga resources. Some sound files are exactly the same in a DM resource for PAL or NTSC system. But they sound not identically because the internal clock value of the system used to run the game is not the same for PAL or NTSC. So, extracting a resource with PAL value will produce "wrong" (from the user point of view) sounds for user using a NTSC system.
Mandatory: no
Values allowed:
PALdefines the European modewiki (CPU clock = 7.0937892 MHz)
NTSCdefines the American modewiki (CPU clock = 7.1590905 MHz)
Example:

CLOCKMODE=PAL

1.2.5.ENDIAN
Type: string
Goal: defines the endiannesswiki which is an arbitrary convention of byte order, required when integerswiki are represented with multiple byteswiki .
Mandatory: yes
Values allowed:
BIGmost significant byte first
LITTLEless significant byte first
Example:

ENDIAN=LITTLE

2.Data
2.1.Goal
each line following the header can be a comment or an item definition.
2.2.Comment
#<anything on one line>
2.3.Item definition
<item_number>,<item_type>,<item_attributes>,<item_description>,<item_long_description>,<comment>
2.3.1.Item number
Type: string with characters in [a-zA-Z0-9]
Goal: defines the element number versus the other items or the offset in the resource or another significant identifier containing the notion of order between items.
Example:

0001

2.3.2.Item type
Type: string in uppercase
Goal: defines the format of the item, the algorithm required to extract it.
Values allowed:see "item types" section.
Example:

IMG1

2.3.3.Item attributes
Type: attributes list in uppercase
Goal: defines all the required attributes necessary to extract the item based on its type. Each item type has a specific set of valid attributes and attribute names are in uppercase. Warning: if no attribute is required, NULL shortcut must be used.
Syntax: <attribute1>=<value1>&<attribute2>=<value2>&<attribute3>=<value3>&... Note that there is an alternate syntax to specify the value when this value is an id of another item. In this case, the item can be located in another file than the current one. So, the external file must be described: <attribute1>=[file_name]<value1>
Values allowed:see "item types" section.
Example:

SIZE=100
PAL=[KAOS.FTL]PAL_INGAME

2.3.4.Item description
Type: sentence without ','
Goal: quickly describes the item.
Values allowed:short sentence, few words.
Example:

Sound 01

2.3.5.Item long description
Type: sentence without ','
Goal: fully describes the item.
Values allowed:sentence.
Example:

Sound for screamer

2.3.6.Item comment
Type: sentence without ','
Goal: defines information which can not be put in the other parts of the line.
Values allowed:sentence.
Example:

Noisy sound in this version

3.Items types
3.1.ECI
Type: other
Multiple occurences allowed: no
Goal: Embedded Cartridge Information contained in the SNES rom like rom speed, bank size, rom type, rom size, sram size, video system, country, company, game version, etc.
Possible attributes:
ID (0, 1) : string which defines a unique identifier in order to be referenced in other items.
SIZE (0, 1) [def=64] : integer which defines the size of the item in bytes.
NULL (0, 1) : string which defines an empty attributes list.
Example:

032704, ECI, NULL, Embedded Cartridge Information, documented in sneskart.txt

3.2.IMG1
Type: image
Multiple occurences allowed: yes
Goal: defines a compressed image in 4 bits per pixels, linear encoded from top left to bottom right, 16 colors, header (width, height) in big endian. The compression is a RLE algorithm (Run Length Encoding).
Possible attributes:
ID (0, 1) : string which defines a unique identifier in order to be referenced in other items.
SIZE (0, 1) : integer which defines the size of the item in bytes.
PAL (1, n) : string which defines the item identifier of the palette used.
SPAL (0, n) : string which defines the item identifier of the secondary palettes used. It will allow to extract multiple image of the item, one for each secondary palette. As PAL attribute is now multiple, it is nearly an obsolete attribute.
COLORCHANGE (0, n) : integer;integer;integer;integer which defines the modification of R, G and B parts of a color index. It will allow to handle strange color background to produce beautiful images.COLORCHANGE=color_index;R;G;B with R, G and B from 0 to 255.
NULL (0, 1) : string which defines an empty attributes list.
Example:

0434, IMG1, PAL1, Item on floor 74, Rabbit's Foot,

3.3.IMG2
Type: image
Multiple occurences allowed: yes
Goal: defines a compressed image in 4 bits per pixels, linear encoded from top left to bottom right, 16 colors, header (width, height) in little endian. The compression is a RLE algorithm (Run Length Encoding).
Possible attributes:
ID (0, 1) : string which defines a unique identifier in order to be referenced in other items.
SIZE (0, 1) : integer which defines the size of the item in bytes.
PAL (1, n) : string which defines the item identifier of the palette used.
SPAL (0, n) : string which defines the item identifier of the secondary palettes used. It will allow to extract multiple image of the item, one for each secondary palette. As PAL attribute is now multiple, it is nearly an obsolete attribute.
COLORCHANGE (0, n) : integer;integer;integer;integer which defines the modification of R, G and B parts of a color index. It will allow to handle strange color background to produce beautiful images.COLORCHANGE=color_index;R;G;B with R, G and B from 0 to 255.
NULL (0, 1) : string which defines an empty attributes list.
Example:

0493, IMG2, PAL1, Creature 15 (Front), Magenta Worm,

3.4.IMG3
Type: image
Multiple occurences allowed: yes
Goal: defines a compressed image in 4 bits per pixels, linear encoded from top left to bottom right, 16 colors, header (width, height) in little endian. The compression is a RLE algorithm (Run Length Encoding).
Possible attributes:
ID (0, 1) : string which defines a unique identifier in order to be referenced in other items.
SIZE (0, 1) : integer which defines the size of the item in bytes.
PAL (1, n) : string which defines the item identifier of the palette used.
SPAL (0, n) : string which defines the item identifier of the secondary palettes used. It will allow to extract multiple image of the item, one for each secondary palette. As PAL attribute is now multiple, it is nearly an obsolete attribute.
COLORCHANGE (0, n) : integer;integer;integer;integer which defines the modification of R, G and B parts of a color index. It will allow to handle strange color background to produce beautiful images.COLORCHANGE=color_index;R;G;B with R, G and B from 0 to 255.
NULL (0, 1) : string which defines an empty attributes list.
Example:

0486, IMG3, PAL1, Explosion 0, Fireball,

3.5.IMG4
Type: image
Multiple occurences allowed: yes
Goal: defines a compressed image in 4 bits per pixels, linear encoded from top left to bottom right, 16 colors, header (width, height) in big endian. The compression is a RLE algorithm (Run Length Encoding).
Possible attributes:
ID (0, 1) : string which defines a unique identifier in order to be referenced in other items.
SIZE (0, 1) : integer which defines the size of the item in bytes.
PAL (1, n) : string which defines the item identifier of the palette used.
SPAL (0, n) : string which defines the item identifier of the secondary palettes used. It will allow to extract multiple image of the item, one for each secondary palette. As PAL attribute is now multiple, it is nearly an obsolete attribute.
COLORCHANGE (0, n) : integer;integer;integer;integer which defines the modification of R, G and B parts of a color index. It will allow to handle strange color background to produce beautiful images.COLORCHANGE=color_index;R;G;B with R, G and B from 0 to 255.
NULL (0, 1) : string which defines an empty attributes list.
3.6.IMG5
Type: image
Multiple occurences allowed: yes
Goal: defines an image in 4 bits per pixels, planar encoded from top left to bottom right in 4 planes (1 plane per bit), 16 colors. It is associated with a palette animation (PALAN item) and a sound to build a full animation as the swoosh one.
Possible attributes:
ID (0, 1) : string which defines a unique identifier in order to be referenced in other items.
SIZE (0, 1) : integer which defines the size of the item in bytes.
PAL (1, n) : string which defines the item identifier of the palette used.
SPAL (0, n) : string which defines the item identifier of the secondary palettes used. It will allow to extract multiple image of the item, one for each secondary palette. As PAL attribute is now multiple, it is nearly an obsolete attribute.
COLORCHANGE (0, n) : integer;integer;integer;integer which defines the modification of R, G and B parts of a color index. It will allow to handle strange color background to produce beautiful images.COLORCHANGE=color_index;R;G;B with R, G and B from 0 to 255.
NULL (0, 1) : string which defines an empty attributes list.
WIDTH (1, 1) : integer which defines the width of the image in pixels.
HEIGHT (1, 1) : integer which defines the height of the image in pixels.
PALAN (0, 1) : string which defines the item identifier of the animation item used. See "PALAN" item.
SND (0, 1) : string which defines the sound item used during the animation. See "PALAN" item.
3.7.MUS1
Type: sound
Multiple occurences allowed: yes
Goal: defines a sound in the well known midi format.
Possible attributes:
ID (0, 1) : string which defines a unique identifier in order to be referenced in other items.
NULL (0, 1) : string which defines an empty attributes list.
Example:

0000, MUS1, NULL, Chaos Strikes Back Main Menu Music,,

3.8.MUS2
Type: sound
Multiple occurences allowed: yes
Goal: defines a sound in the not so well known hmp format. HMP is the file extension for the Human machine interfaces MIDI music file associated with Descent. It can be played with WinAmp for example.
Possible attributes:
ID (0, 1) : string which defines a unique identifier in order to be referenced in other items.
NULL (0, 1) : string which defines an empty attributes list.
3.9.SND1
Type: sound
Multiple occurences allowed: yes
Goal: defines a compressed sound encoded as PCM, in 4 bits (mono, unsigned). The compression is a RLE algorithm (Run Length Encoding).
Possible attributes:
ID (0, 1) : string which defines a unique identifier in order to be referenced in other items.
SPR (1, 1) : integer which defines the playback rate in Hertz.
NULL (0, 1) : string which defines an empty attributes list.
Example:

0085, SND1, SPR1, Explosion Sound,,

3.10.SND2
Type: sound
Multiple occurences allowed: yes
Goal: defines a sound encoded as PCM, in 8 bits (mono, signed) with 2 bytes as header defining the number of samples.
Possible attributes:
ID (0, 1) : string which defines a unique identifier in order to be referenced in other items.
SIZE (0, 1) : integer which defines the size of the item in bytes.
SPR (1, 1) : integer which defines the playback rate in Hertz, which is not the same for PAL or NTSC system.
NULL (0, 1) : string which defines an empty attributes list.
Example:

0572, SND2, SPR1, Sound 30, Attack (Couatl),

3.11.SND2B
Type: sound
Multiple occurences allowed: yes
Goal: defines a sound encoded as PCM, in 8 bits (mono, signed), with 2 bytes as header defining the native period and 4 bytes defining the number of samples. This period is used with the CLOCKMODE global attribute to compute the exact required playback rate, which is not the same for PAL or NTSC system.
Possible attributes:
ID (0, 1) : string which defines a unique identifier in order to be referenced in other items.
SIZE (0, 1) : integer which defines the size of the item in bytes.
NULL (0, 1) : string which defines an empty attributes list.
Example:

0018, SND2B, ID=SND_LOGO, Sound 01, Swoosh,

3.12.SND3
Type: sound
Multiple occurences allowed: yes
Goal: defines a sound encoded as PCM, in 8 bits (mono, unsigned), with 4 bytes as header defining the number of samples.
Possible attributes:
ID (0, 1) : string which defines a unique identifier in order to be referenced in other items.
SPR (1, 1) : integer which defines the playback rate in Hertz.
NULL (0, 1) : string which defines an empty attributes list.
Example:

0671, SND3, SPR1, Sound 00, Falling item,

3.13.SND4
Type: sound
Multiple occurences allowed: yes
Goal: defines a sound encoded as ADPCM, in 4 bits (mono), used by the internal sound chipset of the X68000 system. It's a compressed format which can not be uncompressed to the original data without losing data.
Possible attributes:
ID (0, 1) : string which defines a unique identifier in order to be referenced in other items.
SPR (1, 1) : integer which defines the playback rate in Hertz. This rate is different for DM and CSB.
NULL (0, 1) : string which defines an empty attributes list.
Example:

0707, SND4, SPR6, Sound 27, War Cry,

3.14.SND5
Type: sound
Multiple occurences allowed: yes
Goal: defines a sound encoded as PCM, in 8 bits (mono, signed), with 2 bytes as header defining the playback rate in big endian, 1 byte for the bits per sample and 1 byte for the number of channel.
Possible attributes:
ID (0, 1) : string which defines a unique identifier in order to be referenced in other items.
SPR (1, 1) : integer which defines the playback rate in Hertz.
NULL (0, 1) : string which defines an empty attributes list.
3.15.SND6
Type: sound
Multiple occurences allowed: yes
Goal: defines a sound encoded as PCM, in 8 bits (mono, signed), with 2 bytes as header defining the playback rate in little endian, 1 byte for the bits per sample and 1 byte for the number of channel.
Possible attributes:
ID (0, 1) : string which defines a unique identifier in order to be referenced in other items.
SPR (1, 1) : integer which defines the playback rate in Hertz.
NULL (0, 1) : string which defines an empty attributes list.
3.16.SND7
Type: sound
Multiple occurences allowed: yes
Goal: defines a sound encoded as PCM, in 8 bits (mono, signed), with 2 bytes as header defining the size in bytes.
Possible attributes:
ID (0, 1) : string which defines a unique identifier in order to be referenced in other items.
SPR (1, 1) : integer which defines the playback rate in Hertz.
NULL (0, 1) : string which defines an empty attributes list.
3.17.SND8
Type: sound
Multiple occurences allowed: yes
Goal: defines a sound encoded as DPCM, in 8 bits (mono, signed), with 2 bytes as header defining the number of samples.
Possible attributes:
ID (0, 1) : string which defines a unique identifier in order to be referenced in other items.
SPR (1, 1) : integer which defines the playback rate in Hertz.
NULL (0, 1) : string which defines an empty attributes list.
Example:

0005, SND8, SPR5, Music Part 5,,

3.18.SND9
Type: sound
Multiple occurences allowed: yes
Goal: defines a sound encoded for the SNES internal sound chipset (SPC700), with a header containing the playback rate.
Possible attributes:
ID (0, 1) : string which defines a unique identifier in order to be referenced in other items.
GH (0, 1) : string which defines the unique identifier for the ROMGH item of the resource. This ROMGH item contains the size of all the 'graphics.dat'-like items for the SNES. Consequently, if the item is part of the 'graphics.dat'-like section, this attribute is MANDATORY. If not, this attribute is NOT ALLOWED.
NULL (0, 1) : string which defines an empty attributes list.
Example:

999631, SND9, GH=ROMGH, Sound xx, Champion Wounded 1

3.19.FNT1
Type: image/font
Multiple occurences allowed: yes
Goal: defines a font as an image containing 128 characters, in one line. Each character has 5 pixels width and 6 pixels height. 1 byte (with only 5 significant bits) is used for one line of a character.
Possible attributes:
ID (0, 1) : string which defines a unique identifier in order to be referenced in other items.
NULL (0, 1) : string which defines an empty attributes list.
Example:

0695, FNT1, NULL, Font Used For Interface And Scrolls,,

3.20.SEQ1
Type: sound
Multiple occurences allowed: yes
Goal: defines a sequence of music part. Each music part is an index on 1 byte. The sequence ends with 0xFF.
Possible attributes:
ID (0, 1) : string which defines a unique identifier in order to be referenced in other items.
NULL (0, 1) : string which defines an empty attributes list.
Example:

0000, SEQ1, NULL, Music Score (Sequence of Music Parts Numbers),,

3.21.SEQ2
Type: sound
Multiple occurences allowed: yes
Goal: defines a sequence of music part. Each music part is an index on 2 bytes (with only 11 significant bits). The sequence ends with the 12th bit set to 1.
Possible attributes:
ID (0, 1) : string which defines a unique identifier in order to be referenced in other items.
NULL (0, 1) : string which defines an empty attributes list.
Example:

0000, SEQ2, NULL, Music Score (Sequence of Music Parts Numbers),,

3.22.TXT1
Type: text
Multiple occurences allowed: yes
Goal: defines a text containing strings. Each characters use 1 byte (with only 7 significant bits). Each string ends with the 8th bit set to 1.
Possible attributes:
ID (0, 1) : string which defines a unique identifier in order to be referenced in other items.
NULL (0, 1) : string which defines an empty attributes list.
Example:

0556, TXT1, NULL, Items Names,,

3.23.TXT2
Type: text
Multiple occurences allowed: yes
Goal: defines a text containing strings. Each characters use 1 byte. Each string ends with 0x00.
Possible attributes:
ID (0, 1) : string which defines a unique identifier in order to be referenced in other items.
SIZE (0, 1) : integer which defines the size of the item in bytes. If this item is in a graphics.dat resource, the SIZE can be omitted because the resource header provides it. If not, the SIZE or LINES attribute must be specified.
LINES (0, 1) : integer which defines the number of strings in this text. If this item is in a graphics.dat resource, the LINES can be omitted because the resource header provides it. If not, the SIZE or LINES attribute must be specified.
NULL (0, 1) : string which defines an empty attributes list.
Example:

018601, TXT2, LINES=6 &ID=TXT2_CHAMPIONS_NAMES, Champions names, More than 5 characters long Champions names

3.24.TXT3
Type: text
Multiple occurences allowed: yes
Goal: defines a text containing strings and offsets on these strings. It begins with all the offsets (with sometimes redundant ones), each of them on 2 bytes, then the strings themselves with 1 byte per character and finally a sequence of bytes defining the redundant offsets.
Possible attributes:
ID (0, 1) : string which defines a unique identifier in order to be referenced in other items.
GH (0, 1) : string which defines the unique identifier for the ROMGH item of the resource. This ROMGH item contains the size of all the 'graphics.dat'-like items for the SNES. Consequently, if the item is part of the 'graphics.dat'-like section, this attribute is MANDATORY. If not, this attribute is NOT ALLOWED.
NULL (0, 1) : string which defines an empty attributes list.
Example:

999483, TXT3, GH=ROMGH, Dungeon Texts (Walls - Scrolls - Messages),

3.25.OFFSET3
Type: others/offset
Multiple occurences allowed: yes
Goal: defines a list of offsets of items in a SNES resource on 3 bytes (2 bytes to deal with the offset inside a bank, 1 byte to deal with the index of the bank).
Possible attributes:
ID (0, 1) : string which defines a unique identifier in order to be referenced in other items.
SIZE (0, 1) : integer which defines the size of the item in bytes. If the NUMBER attribute is specified, the SIZE attribute can be omitted.
NUMBER (0, 1) : integer which defines the number of offset in this item. If the SIZE attribute is specified, the NUMBER attribute can be omitted.
NULL (0, 1) : string which defines an empty attributes list.
Example:

215840, OFFSET3, NUMBER=7, Text Offsets in previous item,

3.26.OFFSET4
Type: others/offset
Multiple occurences allowed: yes
Goal: defines a list of offsets of items in a SNES resource on 4 bytes (2 bytes to deal with the offset inside a bank, 1 byte to deal with the index of the bank, the last is ignored).
Possible attributes:
ID (0, 1) : string which defines a unique identifier in order to be referenced in other items.
SIZE (0, 1) : integer which defines the size of the item in bytes. If the NUMBER attribute is specified, the SIZE attribute can be omitted.
NUMBER (0, 1) : integer which defines the number of offset in this item. If the SIZE attribute is specified, the NUMBER attribute can be omitted.
NULL (0, 1) : string which defines an empty attributes list.
Example:

144105, OFFSET4, NUMBER=4, Offsets of the next four TILEMAP2H,

3.27.PAL
Type: palette
Multiple occurences allowed: yes
Goal: defines a palette. It is a generic item which can be configured by using the right attributes to reproduce all the DM known palette formats (P4B1, P4B2, P5B1, P5B2).
Possible attributes:
ID (0, 1) : string which defines a unique identifier in order to be referenced in other items.
SIZE (0, 1) : integer which defines the size of the item in bytes.
COLORS (0, 1) [def=16] : integer which defines the number of colors.
BYTESPERCOLOR (0, 1) [def=2] : integer which defines the number of bytes used in the resource to store one color.
MAXINDEX (0, 1) [def=15] : integer which defines the maximum color index used starting from 0. Some palette with 16 colors only use indexes from 0 to 7 (P4B1).
STORAGE (0, 1) : integer which defines the algorithm used to decode the colors. which represents
4BITSdefines that one component of a color (<$A href="http://en.wikipedia.org/wiki/RGBA_color_space" type="wiki" text="RGBA">) uses 4 bits.
5BITSdefines that one component of a color (RGB) uses 5 bits.
NULL (0, 1) : string which defines an empty attributes list.
3.28.PALSEL
Type: palette indexes selector
Multiple occurences allowed: yes
Goal: defines a list of palette indexes. It must be applied on a tiled image (as SNES image) and a multi-palette item (as SNES 256 colors palettes).
Possible attributes:
ID (0, 1) : string which defines a unique identifier in order to be referenced in other items.
SIZE (0, 1) : integer which defines the size of the item in bytes.
3.29.P4B1
Type: palette
Multiple occurences allowed: yes
Goal: defines a palette of 16 colors, with max color index = 7, using 4 bits for R; G, B and A.
Possible attributes:
ID (0, 1) : string which defines a unique identifier in order to be referenced in other items.
NULL (0, 1) : string which defines an empty attributes list.
Example:

0003, P4B1, ID=PAL_HINT, 16 colors palette,,

3.30.P4B2
Type: palette
Multiple occurences allowed: yes
Goal: defines a palette of 16 colors, with max color index = 15, using 4 bits for R; G, B and A.
Possible attributes:
ID (0, 1) : string which defines a unique identifier in order to be referenced in other items.
NULL (0, 1) : string which defines an empty attributes list.
Example:

0009, P4B2, ID=PAL_LOGO, Initial palette for image 01, black,

3.31.P5B1
Type: palette
Multiple occurences allowed: yes
Goal: defines a palette of 16 colors, with max color index = 31, using 5 bits for R; G and B.
Possible attributes:
ID (0, 1) : string which defines a unique identifier in order to be referenced in other items.
NULL (0, 1) : string which defines an empty attributes list.
Example:

160122, P5B1, ID=PALETTE_DRAGON_DIALOG_BOX_0, 16 colors palette to replace PALETTE_INGAME!0 when Dragon dialog box is displayed,

3.32.P5B2
Type: palette
Multiple occurences allowed: yes
Goal: defines a palette of 256 colors (in fact 16 palettes of 16 colors), with max color index = 31, using 5 bits for R; G and B.
Possible attributes:
ID (0, 1) : string which defines a unique identifier in order to be referenced in other items.
NULL (0, 1) : string which defines an empty attributes list.
Example:

092178, P5B2, ID=PALETTE_END_OF_GAME, Palette for the end of game sequence,

3.33.PALAN
Type: others/animation
Multiple occurences allowed: yes
Goal: defines an animation as a list of color changes and delays. It must be applied on an image and a palette. It is used in some swoosh files.
Possible attributes:
ID (0, 1) : string which defines a unique identifier in order to be referenced in other items.
SIZE (0, 1) : integer which defines the size of the item in bytes.
NULL (0, 1) : string which defines an empty attributes list.
Example:

0015, PALAN ,ID=PALAN_LOGO ,Palette animation for FTL Logo,,

3.34.RAW1
Type: others/unknown
Multiple occurences allowed: yes
Goal: defines an unknown item.
Possible attributes:
ID (0, 1) : string which defines a unique identifier in order to be referenced in other items.
SIZE (0, 1) : integer which defines the size of the item in bytes. If GH attribute is used, SIZE is not necessary.
GH (0, 1) : string which defines the unique identifier for the ROMGH item of the resource. This ROMGH item contains the size of all the 'graphics.dat'-like items for the SNES. Consequently, if the item is part of the 'graphics.dat'-like section, this attribute is MANDATORY. If not, this attribute is NOT ALLOWED.
NULL (0, 1) : string which defines an empty attributes list.
Example:

142108, RAW1, SIZE=317, Starts with 0B 3B 38 E9 Maybe program code,

3.35.RAW2
Type: others/empty
Multiple occurences allowed: yes
Goal: defines an empty item with nothing useful.
Possible attributes:
ID (0, 1) : string which defines a unique identifier in order to be referenced in other items.
SIZE (0, 1) : integer which defines the size of the item in bytes. If GH attribute is used, SIZE is not necessary.
GH (0, 1) : string which defines the unique identifier for the ROMGH item of the resource. This ROMGH item contains the size of all the 'graphics.dat'-like items for the SNES. Consequently, if the item is part of the 'graphics.dat'-like section, this attribute is MANDATORY. If not, this attribute is NOT ALLOWED.
NULL (0, 1) : string which defines an empty attributes list.
Example:

018156, RAW2, SIZE=1754, Padding until end of bank,,

3.36.RAWINSTR
Type: others/code
Multiple occurences allowed: yes
Goal: defines an unknown item containing probably code and not data.
Possible attributes:
ID (0, 1) : string which defines a unique identifier in order to be referenced in other items.
SIZE (0, 1) : integer which defines the size of the item in bytes. If GH attribute is used, SIZE is not necessary.
GH (0, 1) : string which defines the unique identifier for the ROMGH item of the resource. This ROMGH item contains the size of all the 'graphics.dat'-like items for the SNES. Consequently, if the item is part of the 'graphics.dat'-like section, this attribute is MANDATORY. If not, this attribute is NOT ALLOWED.
NULL (0, 1) : string which defines an empty attributes list.
Example:

0002, RAWINSTR, SIZE=1323, Instruction - Unknown code,,

3.37.RAWINSTR_AMIGA
Type: others/code
Multiple occurences allowed: yes
Goal: defines an unknown item containing probably amiga code and not data. Amiga code follows a specific structure which could be used to extract it.
Possible attributes:
ID (0, 1) : string which defines a unique identifier in order to be referenced in other items.
SIZE (0, 1) : integer which defines the size of the item in bytes.
NULL (0, 1) : string which defines an empty attributes list.
Example:

0007, RAWINSTR_AMIGA, SIZE=1096, Instruction - Function allocation table,,

3.38.ROMGH
Type: others
Multiple occurences allowed: yes
Goal: defines an item containing a graphics.dat-header-like with items sizes and compressions in a SNES resource. All the compression types are decrypted (compression types: H00 = no compression, H01 = 0A82 compression, H02 = IMG1 RLE compression, H03 = SNES specific compression).
Possible attributes:
ID (0, 1) : string which defines a unique identifier in order to be referenced in other items.
SIZE (0, 1) : integer which defines the size of the item in bytes.
NULL (0, 1) : string which defines an empty attributes list.
Example:

033744, ROMGH, ID=ROMGH, Size 2087 bytes,

3.39.ROMDATA
Type: others
Multiple occurences allowed: yes
Goal: defines an item contained in the graphics.dat-like part of a SNES resource. Its size and compression type can be found in the ROMGH item.
Possible attributes:
ID (0, 1) : string which defines a unique identifier in order to be referenced in other items.
SIZE (0, 1) : integer which defines the size of the item in bytes. If GH attribute is used, SIZE is not necessary.
GH (0, 1) : string which defines the unique identifier for the ROMGH item of the resource. This ROMGH item contains the size of all the 'graphics.dat'-like items for the SNES. Consequently, if the item is part of the 'graphics.dat'-like section, this attribute is MANDATORY. If not, this attribute is NOT ALLOWED.
NULL (0, 1) : string which defines an empty attributes list.
Example:

999521, ROMDATA, GH=ROMGH&GD=558, Music program 'Gigglers',

3.40.ROMIMG
Type: image
Multiple occurences allowed: yes
Goal: defines a compressed (or not, depending of the compression set in ROMGH item) image in 4 bits per pixel, linear encoded from top left to bottom right, 16 colors.
Possible attributes:
ID (0, 1) : string which defines a unique identifier in order to be referenced in other items.
SIZE (0, 1) : integer which defines the size of the item in bytes. If GH attribute is used, SIZE is not necessary.
GH (0, 1) : string which defines the unique identifier for the ROMGH item of the resource. This ROMGH item contains the size of all the 'graphics.dat'-like items for the SNES. Consequently, if the item is part of the 'graphics.dat'-like section, this attribute is MANDATORY. If not, this attribute is NOT ALLOWED.
GD (0, 1) : string which defines the unique identifier for the SNES558 item used to extract width and height. Consequently, if the item is part of the 'graphics.dat'-like section, this attribute is MANDATORY. If not, this attribute is NOT ALLOWED.
WIDTH (0, 1) : integer which defines the width of the image. If GD is specified, using WIDTH is not necessary.
HEIGHT (0, 1) : integer which defines the height of the image. If GD is specified, using HEIGHT is not necessary.
PAL (1, n) : string which defines the item identifier of the palette used.
COLORCHANGE (0, n) : integer;integer;integer;integer which defines the modification of R, G and B parts of a color index. It will allow to handle strange color background to produce beautiful images.COLORCHANGE=color_index;R;G;B with R, G and B from 0 to 255.
NULL (0, 1) : string which defines an empty attributes list.
Example:

999273, ROMIMG, GH=ROMGH&GD=558, Missile 12 (Front), Poison Blob

3.41.ROMIMG1
Type: image
Multiple occurences allowed: yes
Goal: defines a compressed (or not, depending of the compression set in ROMGH item) image in 4 bits per pixel, pixels grouped by tile of 8x8, each tile linear encoded from top left to bottom right, 16 colors.
Possible attributes:
ID (0, 1) : string which defines a unique identifier in order to be referenced in other items.
SIZE (0, 1) : integer which defines the size of the item in bytes. If GH attribute is used, SIZE is not necessary.
GH (0, 1) : string which defines the unique identifier for the ROMGH item of the resource. This ROMGH item contains the size of all the 'graphics.dat'-like items for the SNES. Consequently, if the item is part of the 'graphics.dat'-like section, this attribute is MANDATORY. If not, this attribute is NOT ALLOWED.
TMWIDTH (0, 1) : integer which defines the width of the tilemap (number of tiles in width).
TMHEIGHT (0, 1) : integer which defines the height of the tilemap (number of tiles in height).
PAL (1, n) : string which defines the item identifier of the palette used.
PALSEL (0, 1) : string which defines the item identifier of the sub-palette indexes to use with each group of tiles.
PALSEL_INCR (0, 1) : string which defines the value to add to the PALSEL indexes to find the right indexes. if tiles generate a sprite, there is nothing to add; else, add 8.
TILESBYITEM (0, 1) : string which defines the number of tiles to take to have a group using an index in the PALSEL list.
COLORCHANGE (0, n) : integer;integer;integer;integer which defines the modification of R, G and B parts of a color index. It will allow to handle strange color background to produce beautiful images.COLORCHANGE=color_index;R;G;B with R, G and B from 0 to 255.
REVERSEORDER (0, 1) : boolean which defines the bits ordering inside each byte. It's an endianess-like storage at bit level. Images in GBA games use this attribute.
0defines that the order of bits is 'normal'.
1defines that the order of bits is reversed.
NULL (0, 1) : string which defines an empty attributes list.
Example:

999660, ROMIMG1, GH=ROMGH &TMWIDTH=16 &TMHEIGHT=16 &PAL=PALETTE_MENU_INTRO!1 &ID=TILES_MAIN_MENU_DUNGEON, Main Menu - 'Dungeon',

3.42.ROMIMG2
Type: image
Multiple occurences allowed: yes
Goal: defines a compressed (or not, depending of the compression set in ROMGH item) image in 8 bits per pixel, pixels grouped by tile of 8x8, each tile linear encoded from top left to bottom right, 16 colors.
Possible attributes:
ID (0, 1) : string which defines a unique identifier in order to be referenced in other items.
SIZE (0, 1) : integer which defines the size of the item in bytes. If GH attribute is used, SIZE is not necessary.
GH (0, 1) : string which defines the unique identifier for the ROMGH item of the resource. This ROMGH item contains the size of all the 'graphics.dat'-like items for the SNES. Consequently, if the item is part of the 'graphics.dat'-like section, this attribute is MANDATORY. If not, this attribute is NOT ALLOWED.
TMWIDTH (0, 1) : integer which defines the width of the tilemap (number of tiles in width).
TMHEIGHT (0, 1) : integer which defines the height of the tilemap (number of tiles in height).
PAL (1, n) : string which defines the item identifier of the palette used.
PALSEL (0, 1) : string which defines the item identifier of the sub-palette indexes to use with each group of tiles.
PALSEL_INCR (0, 1) : string which defines the value to add to the PALSEL indexes to find the right indexes. if tiles generate a sprite, there is nothing to add; else, add 8.
TILESBYITEM (0, 1) : string which defines the number of tiles to take to have a group using an index in the PALSEL list.
COLORCHANGE (0, n) : integer;integer;integer;integer which defines the modification of R, G and B parts of a color index. It will allow to handle strange color background to produce beautiful images.COLORCHANGE=color_index;R;G;B with R, G and B from 0 to 255.
NULL (0, 1) : string which defines an empty attributes list.
Example:

999666, ROMIMG2, GH=ROMGH &TMWIDTH=16 &TMHEIGHT=16 &PAL=PALETTE_CREDITS_MAPS!0 &ID=TILES_MAP_ICONS, Map icons,

3.43.ROMIMG3
Type: image
Multiple occurences allowed: yes
Goal: defines a compressed (or not, depending of the compression set in ROMGH item) image in 4 bits per pixel, planar composite (2 planes, each plane is grouped by tile of 8x8, each tile is linear encoded with 2 bits per pixel from top left to bottom right), 16 colors.
Possible attributes:
ID (0, 1) : string which defines a unique identifier in order to be referenced in other items.
SIZE (0, 1) : integer which defines the size of the item in bytes. If GH attribute is used, SIZE is not necessary.
GH (0, 1) : string which defines the unique identifier for the ROMGH item of the resource. This ROMGH item contains the size of all the 'graphics.dat'-like items for the SNES. Consequently, if the item is part of the 'graphics.dat'-like section, this attribute is MANDATORY. If not, this attribute is NOT ALLOWED.
TMWIDTH (0, 1) : integer which defines the width of the tilemap (number of tiles in width).
TMHEIGHT (0, 1) : integer which defines the height of the tilemap (number of tiles in height).
PAL (1, n) : string which defines the item identifier of the palette used.
PALSEL (0, 1) : string which defines the item identifier of the sub-palette indexes to use with each group of tiles.
PALSEL_INCR (0, 1) : string which defines the value to add to the PALSEL indexes to find the right indexes. if tiles generate a sprite, there is nothing to add; else, add 8.
TILESBYITEM (0, 1) : string which defines the number of tiles to take to have a group using an index in the PALSEL list.
COLORCHANGE (0, n) : integer;integer;integer;integer which defines the modification of R, G and B parts of a color index. It will allow to handle strange color background to produce beautiful images.COLORCHANGE=color_index;R;G;B with R, G and B from 0 to 255.
NULL (0, 1) : string which defines an empty attributes list.
Example:

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

3.44.ROMIMG4
Type: image
Multiple occurences allowed: yes
Goal: defines a compressed (or not, depending of the compression set in ROMGH item) image in 2 bits per pixel, planar (2 planes, each plane is grouped by tile of 8x8, each tile is linear encoded with 1 bit per pixel from top left to bottom right), 16 colors.
Possible attributes:
ID (0, 1) : string which defines a unique identifier in order to be referenced in other items.
SIZE (0, 1) : integer which defines the size of the item in bytes. If GH attribute is used, SIZE is not necessary.
GH (0, 1) : string which defines the unique identifier for the ROMGH item of the resource. This ROMGH item contains the size of all the 'graphics.dat'-like items for the SNES. Consequently, if the item is part of the 'graphics.dat'-like section, this attribute is MANDATORY. If not, this attribute is NOT ALLOWED.
TMWIDTH (0, 1) : integer which defines the width of the tilemap (number of tiles in width).
TMHEIGHT (0, 1) : integer which defines the height of the tilemap (number of tiles in height).
PAL (1, n) : string which defines the item identifier of the palette used.
PALSEL (0, 1) : string which defines the item identifier of the sub-palette indexes to use with each group of tiles.
PALSEL_INCR (0, 1) : string which defines the value to add to the PALSEL indexes to find the right indexes. if tiles generate a sprite, there is nothing to add; else, add 8.
TILESBYITEM (0, 1) : string which defines the number of tiles to take to have a group using an index in the PALSEL list.
COLORCHANGE (0, n) : integer;integer;integer;integer which defines the modification of R, G and B parts of a color index. It will allow to handle strange color background to produce beautiful images.COLORCHANGE=color_index;R;G;B with R, G and B from 0 to 255.
NULL (0, 1) : string which defines an empty attributes list.
Example:

999686, ROMIMG4, GH=ROMGH &TMWIDTH=16 &TMHEIGHT=32 &PAL=PALETTE_END_OF_GAME!4, Japanese Text for end of game, Unused in US version

3.45.ROMIMG5
Type: image
Multiple occurences allowed: yes
Goal: defines a compressed (or not, depending of the compression set in ROMGH item) image in 4 bits per pixel, planar composite (2 planes, each plane is grouped by tile of 16x16, each tile is linear encoded with 2 bits per pixel from top left to bottom right), 16 colors.
Possible attributes:
ID (0, 1) : string which defines a unique identifier in order to be referenced in other items.
SIZE (0, 1) : integer which defines the size of the item in bytes. If GH attribute is used, SIZE is not necessary.
GH (0, 1) : string which defines the unique identifier for the ROMGH item of the resource. This ROMGH item contains the size of all the 'graphics.dat'-like items for the SNES. Consequently, if the item is part of the 'graphics.dat'-like section, this attribute is MANDATORY. If not, this attribute is NOT ALLOWED.
TMWIDTH (0, 1) : integer which defines the width of the tilemap (number of tiles in width).
TMHEIGHT (0, 1) : integer which defines the height of the tilemap (number of tiles in height).
PAL (1, n) : string which defines the item identifier of the palette used.
PALSEL (0, 1) : string which defines the item identifier of the sub-palette indexes to use with each group of tiles.
PALSEL_INCR (0, 1) : string which defines the value to add to the PALSEL indexes to find the right indexes. if tiles generate a sprite, there is nothing to add; else, add 8.
TILESBYITEM (0, 1) : string which defines the number of tiles to take to have a group using an index in the PALSEL list.
COLORCHANGE (0, n) : integer;integer;integer;integer which defines the modification of R, G and B parts of a color index. It will allow to handle strange color background to produce beautiful images.COLORCHANGE=color_index;R;G;B with R, G and B from 0 to 255.
NULL (0, 1) : string which defines an empty attributes list.
3.46.ROMIMG6
Type: image
Multiple occurences allowed: yes
Goal: defines a compressed (or not, depending of the compression set in ROMGH item) image in 1 bit per pixel, pixels grouped by tile of 8x8, each tile linear encoded from top left to bottom right, 16 colors.
Possible attributes:
ID (0, 1) : string which defines a unique identifier in order to be referenced in other items.
SIZE (0, 1) : integer which defines the size of the item in bytes. If GH attribute is used, SIZE is not necessary.
GH (0, 1) : string which defines the unique identifier for the ROMGH item of the resource. This ROMGH item contains the size of all the 'graphics.dat'-like items for the SNES. Consequently, if the item is part of the 'graphics.dat'-like section, this attribute is MANDATORY. If not, this attribute is NOT ALLOWED.
TMWIDTH (0, 1) : integer which defines the width of the tilemap (number of tiles in width).
TMHEIGHT (0, 1) : integer which defines the height of the tilemap (number of tiles in height).
PAL (1, n) : string which defines the item identifier of the palette used.
PALSEL (0, 1) : string which defines the item identifier of the sub-palette indexes to use with each group of tiles.
PALSEL_INCR (0, 1) : string which defines the value to add to the PALSEL indexes to find the right indexes. if tiles generate a sprite, there is nothing to add; else, add 8.
TILESBYITEM (0, 1) : string which defines the number of tiles to take to have a group using an index in the PALSEL list.
COLORCHANGE (0, n) : integer;integer;integer;integer which defines the modification of R, G and B parts of a color index. It will allow to handle strange color background to produce beautiful images.COLORCHANGE=color_index;R;G;B with R, G and B from 0 to 255.
NULL (0, 1) : string which defines an empty attributes list.
Example:

999481, ROMIMG6, GH=ROMGH &TMWIDTH=1 &TMHEIGHT=196 &ID=TILES_FONT_KATAKANA, Font for katakana Japanese characters,

3.47.ROMIMGH5
Type: image
Multiple occurences allowed: yes
Goal: defines a ROMIMG item with an unknown header on 5 bits.
Possible attributes:
ID (0, 1) : string which defines a unique identifier in order to be referenced in other items.
SIZE (0, 1) : integer which defines the size of the item in bytes. If GH attribute is used, SIZE is not necessary.
GH (0, 1) : string which defines the unique identifier for the ROMGH item of the resource. This ROMGH item contains the size of all the 'graphics.dat'-like items for the SNES. Consequently, if the item is part of the 'graphics.dat'-like section, this attribute is MANDATORY. If not, this attribute is NOT ALLOWED.
GD (0, 1) : string which defines the unique identifier for the SNES558 item used to extract width and height. Consequently, if the item is part of the 'graphics.dat'-like section, this attribute is MANDATORY. If not, this attribute is NOT ALLOWED.
WIDTH (0, 1) : integer which defines the width of the image. If GD is specified, using WIDTH is not necessary.
HEIGHT (0, 1) : integer which defines the height of the image. If GD is specified, using HEIGHT is not necessary.
PAL (1, n) : string which defines the item identifier of the palette used.
COLORCHANGE (0, n) : integer;integer;integer;integer which defines the modification of R, G and B parts of a color index. It will allow to handle strange color background to produce beautiful images.COLORCHANGE=color_index;R;G;B with R, G and B from 0 to 255.
NULL (0, 1) : string which defines an empty attributes list.
3.48.ROMDUNGEON
Type: others/dungeon
Multiple occurences allowed: yes
Goal: defines the dungeon.dat part of a SNES resource, compressed (compression type H03) and splitted to fit on 2 banks.
Possible attributes:
ID (0, 1) : string which defines a unique identifier in order to be referenced in other items.
NULL (0, 1) : string which defines an empty attributes list.
Example:

262144, ROMDUNGEON, NULL, Dungeon data,

3.49.ROMCHAMPION
Type: others/champion
Multiple occurences allowed: yes
Goal: defines the statistics of a champion in the same format than the Atari one.
Possible attributes:
ID (0, 1) : string which defines a unique identifier in order to be referenced in other items.
NULL (0, 1) : string which defines an empty attributes list.
Example:

260029, ROMCHAMPION, NULL, Champions statistics 'DAROOU',

3.50.TILEMAP1
Type: tilemap
Multiple occurences allowed: yes
Goal: defines a tilemap which is basically a list of tile indexes and properties to be applied on each tile. Each tile section of this tilemap uses 1 byte and no property.
Possible attributes:
ID (0, 1) : string which defines a unique identifier in order to be referenced in other items.
SIZE (0, 1) : integer which defines the size of the item in bytes. If GH attribute is used, SIZE is not allowed. If WIDTH and HEIGHT attributes are used, SIZE is not necessary but can be specified to load more bytes than necessary to add also an empty byte at the end.
GH (0, 1) : string which defines the unique identifier for the ROMGH item of the resource. This ROMGH item contains the size of all the 'graphics.dat'-like items for the SNES. Consequently, if the item is part of the 'graphics.dat'-like section, this attribute is MANDATORY. If not, this attribute is NOT ALLOWED.
WIDTH (0, 1) : integer which defines the width of the tilemap (as a number of tiles).
HEIGHT (0, 1) : integer which defines the height of the tilemap (as a number of tiles).
PAL (1, n) : string which defines the item identifier of the palette used. If the tilemap uses TILES in 1 bit per pixel and PAL is not set, a simple black and white palette will be automatically added.
TILES (1, n) : string which defines the unique identifier of the tiles to use. These tiles are encoded as a ROMIMGx item. Multiple TILES attributes can be specified to concatenate ROMIMGx items if required by the tilemap.
NULL (0, 1) : string which defines an empty attributes list.
Example:

999667, TILEMAP1, GH=ROMGH &WIDTH=64 &HEIGHT=64 &PAL=PALETTE_CREDITS_MAPS!0 &TILES=TILES_MAP_ICONS, Level 00 Map,

3.51.TILEMAP1D
Type: tilemap
Multiple occurences allowed: yes
Goal: defines a tilemap which is basically a list of tile indexes and properties to be applied on each tile. Each tile section of this tilemap uses 1 byte and no property. As each tiles must always be used here two by two in a 1 (width) x 2 (height) box, the tilemap only set the first tile of a pair.
Possible attributes:
ID (0, 1) : string which defines a unique identifier in order to be referenced in other items.
SIZE (0, 1) : integer which defines the size of the item in bytes. If GH attribute is used, SIZE is not allowed. If WIDTH and HEIGHT attributes are used, SIZE is not necessary but can be specified to load more bytes than necessary to add also an empty byte at the end.
GH (0, 1) : string which defines the unique identifier for the ROMGH item of the resource. This ROMGH item contains the size of all the 'graphics.dat'-like items for the SNES. Consequently, if the item is part of the 'graphics.dat'-like section, this attribute is MANDATORY. If not, this attribute is NOT ALLOWED.
WIDTH (0, 1) : integer which defines the width of the tilemap (as a number of tiles).
HEIGHT (0, 1) : integer which defines the height of the tilemap (as a number of tiles).
PAL (1, n) : string which defines the item identifier of the palette used. If the tilemap uses TILES in 1 bit per pixel and PAL is not set, a simple black and white palette will be automatically added.
TILES (1, n) : string which defines the unique identifier of the tiles to use. These tiles are encoded as a ROMIMGx item. Multiple TILES attributes can be specified to concatenate ROMIMGx items if required by the tilemap.
NULL (0, 1) : string which defines an empty attributes list.
Example:

039356, TILEMAP1D, SIZE=9 &WIDTH=8 &HEIGHT=2 &TILES=TILES_1x2_ATTACKS_NAMES_FONT, 'FLUXCAGE' (Short attack name), Ends with ignored 00

3.52.TILEMAP2
Type: tilemap
Multiple occurences allowed: yes
Goal: defines a tilemap, in the native SNES tilemap format, which is basically a list of tile indexes and properties to be applied on each tile. Each tile section of this tilemap uses 2 bytes (bit 0->9 = tile index, bit 10->12 = palette index, bit 13 = priority, bit 14 = horizontal flip, bit 15 = vertical flip).
Possible attributes:
ID (0, 1) : string which defines a unique identifier in order to be referenced in other items.
SIZE (0, 1) : integer which defines the size of the item in bytes. If GH attribute is used, SIZE is not allowed. If WIDTH and HEIGHT attributes are used, SIZE is not necessary.
GH (0, 1) : string which defines the unique identifier for the ROMGH item of the resource. This ROMGH item contains the size of all the 'graphics.dat'-like items for the SNES. Consequently, if the item is part of the 'graphics.dat'-like section, this attribute is MANDATORY. If not, this attribute is NOT ALLOWED.
WIDTH (0, 1) : integer which defines the width of the tilemap (as a number of tiles).
HEIGHT (0, 1) : integer which defines the height of the tilemap (as a number of tiles).
PAL (1, n) : string which defines the item identifier of the palette used. If the tilemap uses TILES in 1 bit per pixel and PAL is not set, a simple black and white palette will be automatically added.
TILES (1, n) : string which defines the unique identifier of the tiles to use. These tiles are encoded as a ROMIMGx item. Multiple TILES attributes can be specified to concatenate ROMIMGx items if required by the tilemap.
NULL (0, 1) : string which defines an empty attributes list.
Example:

999685, TILEMAP2, GH=ROMGH &WIDTH=64 &HEIGHT=32 &PAL=PALETTE_END_OF_GAME &TILES=TILES_END_CLOUDS, End - Clouds,

3.53.TILEMAP2H
Type: tilemap
Multiple occurences allowed: yes
Goal: defines a TILEMAP2 item with a header on 12 bytes providing x origin, y origin, width and height.
Possible attributes:
ID (0, 1) : string which defines a unique identifier in order to be referenced in other items.
SIZE (0, 1) : integer which defines the size of the item in bytes. If GH attribute is used, SIZE is not necessary. If not set, this attribute can also be automatically computed.
GH (0, 1) : string which defines the unique identifier for the ROMGH item of the resource. This ROMGH item contains the size of all the 'graphics.dat'-like items for the SNES. Consequently, if the item is part of the 'graphics.dat'-like section, this attribute is MANDATORY. If not, this attribute is NOT ALLOWED.
PAL (1, n) : string which defines the item identifier of the palette used. If the tilemap uses TILES in 1 bit per pixel and PAL is not set, a simple black and white palette will be automatically added.
TILES (1, n) : string which defines the unique identifier of the tiles to use. These tiles are encoded as a ROMIMGx item. Multiple TILES attributes can be specified to concatenate ROMIMGx items if required by the tilemap.
NULL (0, 1) : string which defines an empty attributes list.
Example:

152231, TILEMAP2H, PAL=PALETTE_INGAME &TILES=TILES_INTERFACE1 &TILES=TILES_INTERFACE2, Inventory screen with Food and Water,

3.54.TILEMAP2H8
Type: tilemap
Multiple occurences allowed: yes
Goal: defines a TILEMAP2 item with a header on 8 bytes providing width and height.
Possible attributes:
ID (0, 1) : string which defines a unique identifier in order to be referenced in other items.
SIZE (0, 1) : integer which defines the size of the item in bytes. If GH attribute is used, SIZE is not necessary. If not set, this attribute can also be automatically computed.
GH (0, 1) : string which defines the unique identifier for the ROMGH item of the resource. This ROMGH item contains the size of all the 'graphics.dat'-like items for the SNES. Consequently, if the item is part of the 'graphics.dat'-like section, this attribute is MANDATORY. If not, this attribute is NOT ALLOWED.
PAL (1, n) : string which defines the item identifier of the palette used. If the tilemap uses TILES in 1 bit per pixel and PAL is not set, a simple black and white palette will be automatically added.
TILES (1, n) : string which defines the unique identifier of the tiles to use. These tiles are encoded as a ROMIMGx item. Multiple TILES attributes can be specified to concatenate ROMIMGx items if required by the tilemap.
NULL (0, 1) : string which defines an empty attributes list.
Example:

144649, TILEMAP2H8, PAL=PALETTE_INGAME &TILES=TILES_INTERFACE1 &TILES=TILES_INTERFACE2, Attack menu background,

3.55.TILEMAP2JP
Type: tilemap
Multiple occurences allowed: yes
Goal: defines a TILEMAP2 item used to build Japanese characters as Kanji, Hiragana and/or Katakana. Kanji uses 4 consecutive tiles to build one character (2x2). Hiragana and Katakana use 2 consecutive tiles for one character (1x2). Only the first tile index is specified, the following ones must be computed. The 2 highest bits of the tiles indexes are used to select Kanji, Hiragana or Katakana. Note that using attributes WIDTH, HEIGHT, PAL, SIZE and GH is not necessary in most of the cases.
Possible attributes:
ID (0, 1) : string which defines a unique identifier in order to be referenced in other items.
SIZE (0, 1) : integer which defines the size of the item in bytes. If GH attribute is used, SIZE is not necessary. If not set, this attribute can be automatically computed.
GH (0, 1) : string which defines the unique identifier for the ROMGH item of the resource. This ROMGH item contains the size of all the 'graphics.dat'-like items for the SNES. Consequently, if the item is part of the 'graphics.dat'-like section, this attribute is MANDATORY. If not, this attribute is NOT ALLOWED.
WIDTH (0, 1) : integer which defines the width of the tilemap (as a number of tiles). If not set, this attribute can be automatically computed.
HEIGHT (0, 1) [def=2] : integer which defines the height of the tilemap (as a number of tiles).
PAL (1, n) : string which defines the item identifier of the palette used. If the tilemap uses TILES in 1 bit per pixel and PAL is not set, a simple black and white palette will be automatically added.
TILES (1, n) : string which defines the unique identifier of the tiles to use. These tiles are encoded as a ROMIMGx item. Multiple TILES attributes can be specified to concatenate ROMIMGx items if required by the tilemap.
NULL (0, 1) : string which defines an empty attributes list.
Example:

258339, TILEMAP2JP, TILES=TILES_FONT_KANJI &TILES=TILES_FONT_HIRAGANA &TILES=TILES_FONT_KATAKANA, Text,

3.56.SPRITEMAP
Type: tilemap
Multiple occurences allowed: yes
Goal: defines a tilemap which is basically a list of tile indexes and properties to be applied on each tile. Each tile section of this tilemap uses 2 bytes for the tile index, 2 bytes for X origin, 2 bytes for Y origin, 1 byte for the tile size selector (possible values are 0 and 1: the size is computed using the attribute TILETYPE) and 1 unknown byte.
Possible attributes:
ID (0, 1) : string which defines a unique identifier in order to be referenced in other items.
SIZE (0, 1) : integer which defines the size of the item in bytes. If GH attribute is used, SIZE is not necessary.
GH (0, 1) : string which defines the unique identifier for the ROMGH item of the resource. This ROMGH item contains the size of all the 'graphics.dat'-like items for the SNES. Consequently, if the item is part of the 'graphics.dat'-like section, this attribute is MANDATORY. If not, this attribute is NOT ALLOWED.
PAL (1, n) : string which defines the item identifier of the palette used. If the tilemap uses TILES in 1 bit per pixel and PAL is not set, a simple black and white palette will be automatically added.
TILES (1, n) : string which defines the unique identifier of the tiles to use. These tiles are encoded as a ROMIMGx item. Multiple TILES attributes can be specified to concatenate ROMIMGx items if required by the tilemap.
TILETYPE (1, 1) : integer which defines the pair of tile sizes available to decode each tiles.
0defines that the tile size selector can choose between 8x8 and 16x16 tiles.
1defines that the tile size selector can choose between 8x8 and 32x32 tiles.
2defines that the tile size selector can choose between 8x8 and 64x64 tiles.
3defines that the tile size selector can choose between 16x16 and 32x32 tiles.
4defines that the tile size selector can choose between 16x16 and 64x64 tiles.
5defines that the tile size selector can choose between 32x32 and 64x64 tiles.
NULL (0, 1) : string which defines an empty attributes list.
Example:

167090, SPRITEMAP, PAL=PALETTE_END_OF_GAME!9 &TILES=TILES_END_GREY_LORD &TILETYPE=1, End - Big torch 1,

3.57.SPRITEMAP2
Type: tilemap
Multiple occurences allowed: yes
Goal: defines a tilemap which is basically a list of tile indexes and properties to be applied on each tile. Each tile section of this tilemap uses 1 byte for the tile index, 1 byte for X origin and 1 bytes for Y origin.
Possible attributes:
ID (0, 1) : string which defines a unique identifier in order to be referenced in other items.
SIZE (0, 1) : integer which defines the size of the item in bytes. If GH attribute is used, SIZE is not necessary.
GH (0, 1) : string which defines the unique identifier for the ROMGH item of the resource. This ROMGH item contains the size of all the 'graphics.dat'-like items for the SNES. Consequently, if the item is part of the 'graphics.dat'-like section, this attribute is MANDATORY. If not, this attribute is NOT ALLOWED.
PAL (1, n) : string which defines the item identifier of the palette used. If the tilemap uses TILES in 1 bit per pixel and PAL is not set, a simple black and white palette will be automatically added.
TILES (1, n) : string which defines the unique identifier of the tiles to use. These tiles are encoded as a ROMIMGx item. Multiple TILES attributes can be specified to concatenate ROMIMGx items if required by the tilemap.
TILETYPE (1, 1) : integer which defines the tile size available to decode each tiles (it's not a pair of size as SPRITEMAP because there is no tile selector in each tile properties).
0defines that the tile size will be 8x8.
1defines that the tile size will be 8x8.
2defines that the tile size will be 8x8.
3defines that the tile size will be 16x16.
4defines that the tile size will be 16x16.
5defines that the tile size will be 32x32.
NULL (0, 1) : string which defines an empty attributes list.
Example:

200101, SPRITEMAP2, PAL=PALETTE_MENU_INTRO!10 &TILES=TILES_MAIN_MENU_MASTER &TILETYPE=0, Main Menu - Copyrights,

3.58.SNES558
Type: others/558
Multiple occurences allowed: yes
Goal: defines a 558-like item as the 558 item of the Atari version. This item provides sizes for images like Creatures, Missiles, Items on floor, Wall ornates, Floor ornates, Door ornates, Door buttons.
Possible attributes:
ID (0, 1) : string which defines a unique identifier in order to be referenced in other items.
NULL (0, 1) : string which defines an empty attributes list.
Example:

099799, SNES558, ID=558 &SIZE=4769, SNES 558 item (Graphics characteristics),

3.59.NULL
Type: others/null
Multiple occurences allowed: yes
Goal: defines an item without data and consequently a size equals to 0.
Possible attributes:
ID (0, 1) : string which defines a unique identifier in order to be referenced in other items.
NULL (0, 1) : string which defines an empty attributes list.
Example:

0558, NULL, NULL, No Item Data,,

4.Compatibility
4.1.Shortcuts
To ensure compatibility with mapfile specification 1.0, some attributes shortcuts are also allowed. A shortcut is a shorter way to define a key-value pair: "KEY=VALUE" becomes "VALUE". The only allowed shortcuts are:
PAL1 for PAL=PAL1
SPR1 for SPR=SPR1
SPR2 for SPR=SPR2
SPR4 for SPR=SPR4
SPR5 for SPR=SPR5
SPR6 for SPR=SPR6
NULL for NULL=NULL
4.2.Aliases
To ensure compatibility with mapfile specification 1.0, some values aliases used in attributes are also allowed. The only allowed aliases are:
SPR1 for 6000
SPR2 for 10740
SPR3 for 5208
SPR4 for 11025
SPR6 for 7812