Browse Community

Dungeon Master II Data Files Notes

Author of this documentation: kentaro.k-21

How to read a directory entry

It will be simple to read.
I took the 1st raw data from dm2 amiga graphics.dat.

ADDRESS 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F 0123456789ABCDEF
————————————————————————-
0000000 80 01 27 3D 00 07 54 01 49 01 44 01 53 01 46 01 ..’=..T.I.D.S.F.
0000010 47 01 50 02 00 00 08 00 00 00 00 01 00 00 0B 00 G.P………….
0000020 00 00 00 2B 00 01 00 00 00 FE 00 02 01 00 04 00 …+…………
0000030 00 00 00 F3 01 00 05 06 10 00 00 F8 01 00 05 06 …………….

The 1st highlighted word value (27 3D) represents how many entries exist in this binary.
Read this value as a big endian word value even if the target platform is oriented in little endian.

In this case, the value is obtained with expression 0x27 * 256 + 0x3D.
It is 10045. There are 10045 entries in dm2 amiga graphics.dat.

The offset of 1st entry begins at 0x00000014.

Each entry has 8 bytes long.

Next table shows known spec information with 1st entry
00000014: 00 00 08 00 00 00 00 01

PositionBinaryKnown meaning
1st byte00Main Category. One of following values.
0x00: Unknown
0x01: Unknown (for Graphical Interface?)
0x02: No applicable data
0x03: Unknown (Text message in scrolls and message board?)
0x04: No applicable data
0x05: Unknown
0x06: Unknown
0x07: Unknown (for Graphical Interface in inventory window?)
0x08: Unknown (for wall and tile images?)
0x09: Unknown (for Wall Graphics used in dungeon.dat?)
0x0A: Unknown (for Pad Graphics used in dungeon.dat?)
0x0B: Unknown (for Ornate Graphics used in dungeon.dat?)
0x0C: Unknown
0x0D: Unknown (for magical effect images?)
0x0E: Door entry
0x0F: Creature entry
0x10: Weapon entry
0x11: Cloth entry
0x12: Scroll entry
0x13: Potion entry
0x14: Chest entry (contains magical minion maps)
0x15: Miscellaneous item entry
0x16: Hero entry
0x17: Unknown (for weather images?)
0x18: Unknown
0x19: No applicable data
0x1A: Dialogue Interface
2nd byte00Data index in Main Category.
3rd byte08Data representation. One of following values.
0x01: Images
0x05: Text
Other: Unknown
4th byte00Depending on what kind of “Data representation”.
5th byte00Depending on what kind of “Data representation”.
6th byte00Depending on what kind of “Data representation”.
7th and 8th byte00 01This entry may store the binary index in graphics.dat to represent data.
*If this represents the binary index, it is always stored in big endian format.
Depending on what kind of “Data representation”.
0x01: The value indicates an index to stored image.
0x05: The value indicates an index to stored text.
Other: Unknown

This is a sample for image entry.
0001313C: 1A 00 01 00 00 FF 00 11

PositionBinaryMeaning
1st byte1AMain Category.
2nd byte00Index in Main Category.
3rd byte01It represents an image.
4th byte00-
5th byte00-
6th byteFE-
7th and 8th byte00 110x00 * 256 + 0x11 = 17.
17th raw data (0 based index) has an image for this entry.

This is a sample for text entry.
0001315C: 1A 00 05 14 10 FF 00 12

PositionBinaryMeaning
1st byte1AMain Category.
2nd byte00Index in Main Category.
3rd byte05It represents a text.
4th byte14-
5th byte10-
6th byteFF-
7th and 8th byte00 120x00 * 256 + 0x12 = 18.
18th raw data (0 based index) has a text for this entry.

How to read and decompress images from the PC version

This is a binary dump of DM2 PC specific image to be described.

ADDRESS 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F 0123456789ABCDEF
------------------------------------------------------------------------
0000000 0C 00 07 7C 00 00 03 00 BD 0A 22 00 27 2A 2A 27 ...|......".'**'
0000010 44 01 27 EF 2A 2D 2D 2A 44 01 2A 3B 3F CF 3F 3B D.'.*--*D.*;?.?;
0000020 2A 27 41 01 C0 02 2D 3B 9F 3F 2D 27 00 00 01 03 *'A...-;.?-'....
0000030 A0 01 2D 10 41 06 C3 01 A5 07 81 03 27 00 09 ?? ..-.A.......'..

It is 1620th binary (0 based index) in DM2 PC GRAPHICS.DAT, and is the compressed image of Blue gem.

The DM2 PC specific compressed image has 8 bytes for prefix and sequent bytes for body of compressed image. It has no suffix.

PartHeading hexa binary
Prefix0C 00 07 **7C** 00 00 03 00
BodyBD 0A 22 00 27 2A 2A 27 44 01 27 EF 2A 2D 2D 2A 44...

The 4th byte in Prefix is highlighted. It may be used to know that this image is formatted in DM2 PC specific image.

Majority images has 4th byte fixed in 0x7C.

Body binary format

There are command control byte and sequent 8 primitives in a set.

Command control byte
If 1st bit is set in command control byte, here is a pixel(1 byte), otherwise here is repetition command(2 bytes)
If 2st bit is set in command control byte, here is a pixel(1 byte), otherwise here is repetition command(2 bytes)
If 3st bit is set in command control byte, here is a pixel(1 byte), otherwise here is repetition command(2 bytes)
If 4st bit is set in command control byte, here is a pixel(1 byte), otherwise here is repetition command(2 bytes)
If 5st bit is set in command control byte, here is a pixel(1 byte), otherwise here is repetition command(2 bytes)
If 6st bit is set in command control byte, here is a pixel(1 byte), otherwise here is repetition command(2 bytes)
If 7st bit is set in command control byte, here is a pixel(1 byte), otherwise here is repetition command(2 bytes)
If 8st bit is set in command control byte, here is a pixel(1 byte), otherwise here is repetition command(2 bytes)
Command control byte
  • 1st bit means LSB in a byte. 8th bit means MSB in a byte.

Format of Pixel

A pixel is represented in 1 byte and is a 8-bit indexed palette in DM2.

It renders only 1 pixel per pixel command.

Format of Repetition Command

This command is to copy pixels from previous rendered pixels. It has 2 following scalar factors

  • How far do you go back to fetch pixels (As negative-offset)
  • How length do you copy (As length)

It is always consisted with 2 bytes.

First byte is variant against each image prefix. They will be grouped in ‘Type’.

TypeFormat of 1st byte (from MSB to LSB)
Type 2XXXXyyyy (leading 4 bits for X, sequent 4 bits for Y)
Type 3XXXyyyyy (leading 3 bits for X, sequent 5 bits for Y)

X and Y are defined for expression.

Second byte is a unsigned byte value and defined as B for expression.

negative_offset and copy_length are figured out as next table shows.

TypeExpression
Type 2negative_offset = X + (16 * B)
copy_length = Y + 3
Type 3negative_offset = X + (8 * B)
copy_length = Y + 3
  • It is possible that source pixel range and destination pixel range between a repetition command are overlapped. It says (negative_offset < copy_length) is actually possible.

Decision of Type

This is prefix part of the image: 0C 00 07 7C 00 00 03 00

The 7th byte, the highlighted part shows the Type of decompression factor.

If it is 02, it is Type2 factor applied compressed image.
If it is 03, it is Type3 factor applied compressed image.

Decompression Example

Here is reading sample for the 1620th compressed image.

Dungeon Master II - Uncompression Example

This is Type3 factor applied compressed image.

Index in c.c.b.BinaryReading
BDCommand control byte.bit array is 1011 1101
1st0APixel 0A
2nd22 00Repetition command.
negative_offset is (1 + 8 * 0) = 1
copy_length is (3 + 2) = 5
Pixels are 0A 0A 0A 0A 0A
3rd27Pixel 27
4th2APixel 2A
5th2APixel 2A
6th27Pixel 27
7th44 01Repetition command.
negative_offset is (2 + 8 * 1) = 10
copy_length is (3 + 4) = 7
Pixels are 0A 0A 0A 0A 0A 0A 27
8th27Pixel 27
EFCommand control byte.bit array is 1110 1111
1st2APixel 2A
2nd2DPixel 2D
3rd2DPixel 2D
4th2APixel 2A
5th44 01Repetition command.
negative_offset is (2 + 8 * 1) = 10
copy_length is (3 + 4) = 7
Pixels are 0A 0A 0A 0A 27 27 2A
6th2APixel 2A
7th3BPixel 3B
8th3FPixel 3F
CFCommand control byte.bit array is 1100 1111
1st3FPixel 3F
2nd3BPixel 3B
3rd2APixel 2A
4th27Pixel 27
5th41 01Repetition command.
negative_offset is (2 + 8 * 1) = 10
copy_length is (3 + 1) = 4
Pixels are 27 27 2A 2A
6thC0 02Repetition command.
negative_offset is (6 + 8 * 2) = 22
copy_length is (3 + 0) = 3
Pixels are 2A 2D 2D
7th2DPixel 2D
8th3BPixel 3B
9FCommand control byte.bit array is 1001 1111
1st3FPixel 3F
2nd2DPixel 2D
3rd27Pixel 27
4th00Pixel 00
5th00Pixel 00
6th01 03Repetition command.
negative_offset is (0 + 8 * 3) = 24
copy_length is (3 + 1) = 4
Pixels are 27 27 2A 2A
7thA0 01Repetition command.
negative_offset is (5 + 8 * 1) = 13
copy_length is (3 + 0) = 3
Pixels are 2D 2D 2D
8th2DPixel 2D
10Command control byte.bit array is 0001 0000
1st41 06Repetition command.
negative_offset is (2 + 8 * 6) = 50
copy_length is (3 + 1) = 4
Pixels are 2A 27 0A 0A
2ndC3 01Repetition command.
negative_offset is (6 + 8 * 1) = 14
copy_length is (3 + 3) = 6
Pixels are 00 00 27 27 2A 2A
3rdA5 07Repetition command.
negative_offset is (5 + 8 * 7) = 61
copy_length is (3 + 5) = 8
Pixels are 2A 2A 27 0A 0A 0A 0A 0A
4th81 03Repetition command.
negative_offset is (4 + 8 * 3) = 28
copy_length is (3 + 1) = 4
Pixels are 00 00 27 27
5th27Pixel 27
6th00 09Repetition command.
negative_offset is (0 + 8 * 9) = 72
copy_length is (3 + 0) = 3
Pixels are 27 0A 0A

How to read some messed up images

I’m not good at explain in English, so I prepared enough screen shots to explain.
This explanation refers to the DM2 GRAPHICS.DAT of Amiga version, which is formatted in big endian.

I’ll show how to extract the next image.

Dungeon Master II - Messed Up Images Sceenshot 1

This operation uses 3 images to combine and merges into one complete image.

Dungeon Master II - Messed Up Images Sceenshot 2 + Dungeon Master II - Messed Up Images Sceenshot 3 + Dungeon Master II - Messed Up Images Sceenshot 4 = Dungeon Master II - Messed Up Images Sceenshot 1

In convenience, I allocate the index number for them. The index is based on order from GRAPHICS.DAT.

#4537 + #4539 + #4540 = New #4540 Image

About 1st image.

You can extract the first image(#4537) easily.

Please visit Data Files for further information about IMG3 and IMG4 formats. It’s great resource!

This image requires to combine with 2nd image.

About 2nd image.

Generally, it appears to be the messed up image.

I’ll explain with the next figure.

Dungeon Master II - Messed Up Images Sceenshot 5

This shows the binary image of 2nd image(#4539).

This tool divides a raw data into 3 parts automatically.
They are Prefix, Compressed Binary bytes and Suffix.

PartSize of each part (in bytes)
Prefix7
Binary2,348
Suffix16
Total2,371

I copied the each heading binary into a table.

PartHeading hex binary
Prefix00 A0 00 74 **96 F1 2D**
BinaryFF F0 54 C2 D3 2D F8 4A 01 0D 28 19 0A 0D F7 E2 ...
Suffix00 E9 EB A8 A6 AA 58 00 BC 3D 00 8C E7 ED 00 EF

I highlighted the 6 components of “Prefix” (9, 6, F, 1, 2, D) and the entire “Binary”.
The 6 components means “Local palette of 6 most used colors in image” (from Christophe’s Data files description).

Generally, It is believed that the compressed image starts from “Binary”.

However, this 2nd image is some bit different.

PartHeading hex binary
Prefix00 A0 00 74 **96 F1 2*****D***
BinaryFF F0 54 C2 D3 2D F8 4A 01 0D 28 19 0A 0D F7 E2 ...
Suffix00 E9 EB A8 A6 AA 58 00 BC 3D 00 8C E7 ED 00 EF

The 2nd image starts from 52th bit (8*6+4) in “Prefix”.

If decompression work start from 52th bit, You can get the next image.

Dungeon Master II - Messed Up Images Sceenshot 6

In this case, the last component of “Prefix” (0xD) is part of compressed image.
So, you should not contain it to decode Local palette.
They should be consisted from 5 components (9, 6, F, 1, 2).

Next problem is “What’s the mask color? or transparent color?”

I brought 2 words in my discretion. (I may need the correct for these expression.)

Empty color: from Christophe’s Data files description. “Copy pixels from the previous line of the image
Transparent color: Copy the pixels from previous image at same position. In this case, it’s the 1st image.

Allocation for “Empty color” is same as IMG3 or IMG4 (described at Christophe’s Data files description).

Allocation for “Transparent color”.
I tried and decided the colors with my feeling. They are 6th Color and 14th Color.

I arranged role of colors/palettes to next table. ("-" means it doesn’t change the existing role.)

ColourRoleColourRole
1stColor:0-Palette:0-
2ndColor:1-Palette:1-
3rdColor:2-Palette:2-
4thColor:3-Palette:3-
5thColor:4-Palette:4-
6thColor:5Transparent colorPalette:5-
7thColor:6- (Empty color)Palette:6-
8thColor:7-Palette:7-
9thColor:8-Palette:8-
10thColor:9-Palette:9-
11thColor:10-Palette:10-
12thColor:11-Palette:11-
13thColor:12-Palette:12-
14thColor:13Transparent colorPalette:13-
15thColor:14- (Empty color)Palette:14-
16thColor:15-Palette:15-

If combine work proceeded successfully, You can finally get the next image.

Dungeon Master II - Messed Up Images Sceenshot 2 + Dungeon Master II - Messed Up Images Sceenshot 6 = Dungeon Master II - Messed Up Images Sceenshot 7

About 3rd image

It’s the same way as method against 2nd image.

How to decide the 3 Images (1st image, 2nd image and 3rd image)

Please remember this screen shot.

Dungeon Master II - Messed Up Images Sceenshot 8

The raw data at “0001” is that.

The next heading binary from this entry.

ADDRESS 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F 0123456789ABCDEF
------------------------------------------------------------------------
0000000 00 0B 00 38 00 11 00 03 00 38 00 11 00 45 00 6D ...8.....8...E.m
0000010 00 6D 00 77 00 77 00 03 00 7E 00 77 00 DB 00 DA .m.w.w...~.w....
0000020 00 DE 00 DD 00 E5 00 E1 00 E7 00 E6 00 EA 00 E6 ................
0000030 00 EB 00 EA 00 ED 00 F2 00 EE 00 DF 00 F0 00 EF ................

This raw data is read as next table shows.

OffsetWhat image do you want to renderThat image inherits from the following image
0000000B0038
000400110003
000800380011
000C0045006D
0F6811BB (4539, the 2nd img)11B9 (4537, the 1st img)
0F6C11BC (4540, the 3rd img)11BB (4539, the 2nd img)

I arranged in logical consideration for extraction.

To render image #4540, it requires #4539 has been already rendered.
To render image #4539, it requires #4537 has been already rendered.
To render image #4537, it doesn’t require any image has been rendered.

Renders #4537 as 1st image.
Renders #4539 as 2nd image and overrides the previous image.
Renders #4540 as 3rd image and overrides the previous image.
Done.

These explanations are way how to read some messed up images in DM2 GRAPHICS.DAT.

And this document doesn’t have complete information.
This means that some images can be obtained with this method but other images won’t be able to be obtained correctly with this method.
So I’m welcome to have any correction for this document.

Thanks.

History

Revision 1 (2003-03-07)
First release
Revision 2 (2003-03-08)
Corrects for some miscalculation ;)
Detailed description for boundary between Local palette and compressed image.

How to read the Text data

PC, Amiga version

This is a binary of encoded text.
AB B6 BC A8 D4 A7 D9 AA A8 A2 D5 A0 AB AD D1 A3 AE 9B 99 A7 99 CA A5 9F 94 9B C4 E4
The decoded text represents:
THAT’S NOT THE MASTER DISK!
The next table shows how to decode.

BinaryAdd the value withAdded ResultLogical Xor between prior value and 0xFFDecoded character
0xAB+00xAB0x54T
0xB6+10xB70x48H
0xBC+20xBE0x41A
0xA8+30xAB0x54T
0xD4+40xD80x27'
0xA7+50xAC0x53S
0xD9+60xDF0x20 
0xAA+70xB10x4EN
0xA8+80xB00x4FO
0xA2+90xAB0x54T
0xD5+100xDF0x20
0xA0+110xAB0x54T
0xAB+120xB70x48H
0xAD+130xBA0x45E
0xD1+140xDF0x20
0xA3+150xB20x4DM
0xAE+160xBE0x41A
0x9B+170xAC0x53S
0x99+180xAB0x54T
0xA7+190xBA0x45E
0x99+200xAD0x52R
0xCA+210xDF0x20
0xA5+220xBB0x44D
0x9F+230xB60x49I
0x94+240xAC0x53S
0x9B+250xB40x4BK
0xC4+260xDE0x21!
0xE4+270xFF0x00

The next table is for decoding alphabet characters and symbols in English language.
I don’t check about unfilled part.

0123456789ABCDEF
0NULSPCPLOBRO
1AQUMGOR
2BRONKU
3CSEEROS
4DTPALDAIN
5EUMONNETA
6FVYARA
7GWVISAR
8HXOH
9IYFUL
ALFJZDES
BKZO
CLVEN
DMEW
ENKATH
FOIR

PC9801 version

There are two tables in PC9801 version.
This is the encoded text in PC9801 version.
0F 6C 0D 35 16 FA F9
This is decoded binary.
F0 92 F0 C7 E5 00 00
If the character starts in 0xF0, It references the 2nd table with 2nd byte, and get forward 2 bytes.
Otherwise just reference the 1st table with 1st byte, and get forward 1 byte.

Example.

BinaryHow to read
F0 92Find the character # 0x92 from 2nd table.
F0 C7Find the character # 0xC7 from 2nd table.
E5Find the character # 0xE5 from 1st table.
00End

This is 1st table.

0123456789ABCDEF
0NUL0@PLOBRO
1!1AQUMGOR
2"2BRONKU
3#3CSEEROS
4$4DTPALDAIN
5%5EUMONNETA
6&6FVYARA-
7'7GWVISAR
8(8HXOH
9)9IYFUL
ALF*:JZDES
B+;K[ZO
C,<L\VEN
D-=M]EW
E.>N^KATH
F/?O_IR

This is 2nd table.

0123456789ABCDEF
0
1
2
3使
4
5
6
7
8
9
A
B
C
D
E
F

Palettes, colors, suffix palettes, etc

Terminology

entry XX YY ZZ AA BB CC

The entry is an item stored in ENT1 format (check ENT1 section at 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 nameFormat nameSpecNotes
C4IMG3,4,7,84bpp, compressed3=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.
U4IMG64bpp, uncompressed6=little
C8IMG98bpp, compressed9=little
U8IMG?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:

ScenePalette in entry…ApplicationPalettes list
Inventory interfaceentry 01 00 09 00 04 FFFull screen246 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 00Full screen214 Main Menu and Credits, 0, b1=“01” b2=“04” b3=“00” => 16 colors
Main menuentry 05 00 09 04 04 00Full screen215 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 zoneentry 08 00 09 00 04 00Dungeon viewport2346 Dungeon Graphics, 0, b1=“00” b2=“04” b3=“00” => 16 colors + 5*16 colors for light gradient
1: Outsideentry 08 01 09 00 04 00Dungeon viewport2319 Dungeon Graphics, 1, b1=“00” b2=“04” b3=“00” => 16 colors + 5*16 colors for light gradient
2: Caveentry 08 02 09 00 04 00Dungeon viewport2176 Dungeon Graphics, 2, b1=“00” b2=“04” b3=“00” => 16 colors + 5*16 colors for light gradient
3: Interiorentry 08 03 09 00 04 00Dungeon viewport2117 Dungeon Graphics, 3, b1=“00” b2=“04” b3=“00” => 16 colors + 5*16 colors for light gradient
4: Skullkeep roofentry 08 04 09 00 04 00Dungeon viewport2280 Dungeon Graphics, 4, b1=“00” b2=“04” b3=“00” => 16 colors + 5*16 colors for light gradient
5: Mistentry 08 05 09 00 04 00Dungeon viewport2245 Dungeon Graphics, 5, b1=“00” b2=“04” b3=“00” => 16 colors + 5*16 colors for light gradient
Flutter wheelentry 09 51 09 0A 04 00?2823 Wall Decorations, 81, b1=“0A” b2=“04” b3=“00” => 6 or 16 colors
Sleep machineentry 09 5B 09 09 04 00?2586 Wall Decorations, 91, b1=“09” b2=“04” b3=“00” => 6 or 16 colors
Sleep machineentry 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 panelentry 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 crystalentry 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-guardentry 0F 1D 09 09 04 00?3474 Creatures, 29, b1=“09” b2=“04” b3=“00” => 6 or 16 colors
Archer-guardentry 0F 1D 09 0A 04 00?3473 Creatures, 29, b1=“0A” b2=“04” b3=“00” => 6 or 16 colors

Credits: Dungeon Files 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

PatternNoteDM2 versions
NoImage has no palette.
DM2 Sega
DM2 FM-Towns
SuffixIt is placed after image bits.
Always 16 bytes.
DM2 PC
DM2 Mac
DM2 Amiga
DM2 PC98
DM2 PS/V
DM2 Mac JP
SeparatedImage 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: Dungeon Master II - DM2PerImgPalDesc )
(Format)
It indicates what palette should be applied for each creature and each ornate.

Transparent color

Color countNote
0Main title, credits, etc.
1Creatures, items, etc
2Such 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