Contents

Technical Documentation - Dungeon Master II Graphics.dat: palettes, colors, suffix palettes, etc

Author of this documentation: Kentaro.k-21

Terminology

entry XX YY ZZ AA BB CC

The entry is an item stored in ENT1 format (check ENT1 section at Technical Documentation - File Formats - Data Files).

XX = Entry category
YY = Entry index
ZZ = Entry type
AA = Entry name 1st byte.
BB = Entry name 2nd byte.
CC = Entry name 3rd byte.

IRGB palette

A color representation. 4 bytes per palette entry.

I = Index
R = Red intensity
G = Green intensity
B = Blue intensity

Image Formats

They are all known image formats. Each of DM2 versions supports some of them.

Short name Format name Spec Notes
C4 IMG3,4,7,8 4bpp, compressed 3=little&full
4=big&full
7=little&differential
8=big&differential

Note: DM2 Sega, PC Beta, FM-Towns versions don't contain image palette at image's suffix. Other versions contain.

U4 IMG6 4bpp, uncompressed 6=little
C8 IMG9 8bpp, compressed 9=little
U8 IMG? 8bpp, uncompressed

Palette

Each of DM2 versions has different palette management due to hardware limitation.

DM2 Amiga

Although images have palette, it seems not to be used.

Instead, there are IRGB palettes which depends on scene.

Known palettes:

Scene Palette in entry... Application Palettes list
Inventory interface entry 01 00 09 00 04 FF Full screen 246 Interface - Main Screen, 0, b1="00" b2="04" b3="FF" => 16 colors
? entry 01 00 09 01 04 FF ? 245 Interface - Main Screen, 0, b1="01" b2="04" b3="FF" => 16 colors, all black
---
Credits paper? entry 05 00 09 01 04 00 Full screen 214 Main Menu and Credits, 0, b1="01" b2="04" b3="00" => 16 colors
Main menu entry 05 00 09 04 04 00 Full screen 215 Main Menu and Credits, 0, b1="04" b2="04" b3="00" => 16 colors
? entry 05 00 09 05 04 00 ? 212 Main Menu and Credits, 0, b1="05" b2="04" b3="00" => 16 colors
? entry 05 00 09 06 04 00 ? 213 Main Menu and Credits, 0, b1="06" b2="04" b3="00" => 16 colors
---
0: Blue zone entry 08 00 09 00 04 00 Dungeon viewport 2346 Dungeon Graphics, 0, b1="00" b2="04" b3="00" => 16 colors + 5*16 colors for light gradient
1: Outside entry 08 01 09 00 04 00 Dungeon viewport 2319 Dungeon Graphics, 1, b1="00" b2="04" b3="00" => 16 colors + 5*16 colors for light gradient
2: Cave entry 08 02 09 00 04 00 Dungeon viewport 2176 Dungeon Graphics, 2, b1="00" b2="04" b3="00" => 16 colors + 5*16 colors for light gradient
3: Interior entry 08 03 09 00 04 00 Dungeon viewport 2117 Dungeon Graphics, 3, b1="00" b2="04" b3="00" => 16 colors + 5*16 colors for light gradient
4: Skullkeep roof entry 08 04 09 00 04 00 Dungeon viewport 2280 Dungeon Graphics, 4, b1="00" b2="04" b3="00" => 16 colors + 5*16 colors for light gradient
5: Mist entry 08 05 09 00 04 00 Dungeon viewport 2245 Dungeon Graphics, 5, b1="00" b2="04" b3="00" => 16 colors + 5*16 colors for light gradient
---
Flutter wheel entry 09 51 09 0A 04 00 ? 2823 Wall Decorations, 81, b1="0A" b2="04" b3="00" => 6 or 16 colors
Sleep machine entry 09 5B 09 09 04 00 ? 2586 Wall Decorations, 91, b1="09" b2="04" b3="00" => 6 or 16 colors
Sleep machine entry 09 5B 09 0A 04 00 ? 2585 Wall Decorations, 91, b1="0A" b2="04" b3="00" => 6 or 16 colors
? none ? 1 RAW data before: 2435
Shop vendor panel entry 09 72 09 0A 04 00 ? 2433 Wall Decorations, 114, b1="0A" b2="04" b3="00" => 6 or 16 colors
---
? none ? 4 RAW data before: 3377, 3378, 3356, 3353
Power crystal entry 0F 11 09 09 04 00 ? 4226 Creatures, 17, b1="09" b2="04" b3="00" => 6 or 16 colors
? none ? 4 RAW data before: 3487, 3488, 3402, 3486
Archer-guard entry 0F 1D 09 09 04 00 ? 3474 Creatures, 29, b1="09" b2="04" b3="00" => 6 or 16 colors
Archer-guard entry 0F 1D 09 0A 04 00 ? 3473 Creatures, 29, b1="0A" b2="04" b3="00" => 6 or 16 colors

Credits: Technical Documentation - File Formats - Dungeon File (DUNGEON.DAT) for Map graphics style. GreatStone for Palettes list.

Creature palettes:

Some creatures have one or more dedicated color. It is like creature specific color found in DM1. Its support is done by altering hardware palette.

Archer-guard has 2 colors:

entry (0F 1D 09 09 04 00) has alternate color for color9.
entry (0F 1D 09 0A 04 00) has alternate color for color10.

Raw data format is: 6 set of IRGB entry. It maps from brightest to darkness.

DM2 PC

It has a palette with 256 colors.

The palette is stored at entry (01 00 09 FE 08 00).

DM2 PC Beta

It has a palette with 256 colors.

The palette is stored at entry (01 00 07 FE 08 00).

DM2 Mac

It has a palette with 256 colors.

The palette is stored at entry (01 00 09 FE 08 00).

DM2 Sega

Not yet.

DM2 PC9801

It has a palette with 256 colors.

The palette is stored at entry (01 00 09 FE 08 00).

DM2 PC9821

Not yet.

DM2 PS/V

It has a palette with 256 colors.

The palette is stored at entry (01 00 09 FE 08 00).

DM2 MacJP

It has a palette with 256 colors.

The palette is stored at entry (01 00 09 FE 08 00).

DM2 FM-Towns

Not yet.

Known image palette patterns

Pattern Note DM2 versions
No Image has no palette. DM2 Sega
DM2 FM-Towns
Suffix It is placed after image bits.
Always 16 bytes.
DM2 PC
DM2 Mac
DM2 Amiga
DM2 PC98
DM2 PS/V
DM2 Mac JP
Separated Image has no palette.
It is stored at another entry in graphics.dat.
Always 16 bytes.

Image entry (?? ?? 01 ?? ?? ??) entry's palette is at entry (?? ?? 0D ?? ?? ??).
In case of lack of the image palette, default palette'll be used. entry (?? ?? 01 ?? ?? ??) → entry (?? ?? 0D FE 00 00)

e.g.
Image entry (0F 04 01 12 00 00) (e.g. Bush) 's palette is at entry (0F 04 0D 12 00 00). It is present and available.
e.g.
Image entry (0F 02 01 00 00 00) (e.g. Vortex) 's palette is at entry (0F 02 0D 00 00 00). However it is absent. Use default palette at entry (0F 02 0D FE 00 00) instead.

PC Beta

How to decide image palette for "No" pattern

Just guess from dungeon.dat!

About creature palette decision:

Check dungeon.dat.

e.g.
Thorn demon will appear on Outside area map style. So, apply the Outside area's palette.

About DM2GDED's palette decision:

It uses mapping information stored in the file DM2PerImgPalDesc.csv.
(File sample: Technical_Documentation~DM2PerImgPalDesc~Data.zip Technical_Documentation~DM2PerImgPalDesc~Data.zip)
(Format: http://kkdf2.sakura.ne.jp/danmasu-lj/Tool_DM2GDED/cmpp.htm)
It indicates what palette should be applied for each creature and each ornate.

Transparent color

Color count Note
0 Main title, credits, etc.
1 Creatures, items, etc
2 Such as gates within 0A Floor Ornates class.
One is transparent mask,
two is mask for displaying over there.

The entry (?? ?? 0B 04 00 00) will be Colorkey1 (transparent), if it needs another selection. (Valid for Creatures, Wall/Floor ornates)
The entry (08 ?? 0B 64 00 00) will be default Colorkey1 of 0A Dungeon Graphics's.
The entry (?? ?? 0B 11 00 00) entry'll be Colorkey2 (over there).

Resources