Skip to content
vcosta edited this page Nov 20, 2017 · 175 revisions

This fork was done as a sandbox to experiment with a DGDS (Dynamix) SCUMMVM engine. Games which used DGDS include: Quarky & Quaysoo's Turbo Science, Heart of China, The Adventures of Willy Beamish, Rise of the Dragon.

The database format seems to have been used in several Dynamix games, in several versions, from the early titles to the later titles. This means that parts of the file formats are also common with much later games like the RPG game: Betrayal at Krondor.

I am mainly interested in "Rise of the Dragon" and "Heart of China".

Rise of the Dragon (PC version)

contains these files:

 102094 DRAGON.EXE
  21152 INSTALL.COM
      2 RESOURCE.CFG
 769811 VOLUME.001
1192993 VOLUME.002
 197121 VOLUME.003
 197121 VOLUME.004
 197121 VOLUME.005
1146429 VOLUME.006
 920644 VOLUME.007
   7823 VOLUME.VGA

DRAGON.EXE contains the main game executable compressed with LZEXE. This executable can be uncompressed either with UNLZEXE or with UNP. Once uncompressed it becomes around twice as large:

 204128 DRAGON.EXE

The game data is stored in the VOLUME.* files with some game text strings being embedded in the DRAGON.EXE.

VOLUME.VGA contains an index of the files stored in the VOLUME.00* archives. Files inside the archives can be either uncompressed, RLE compressed, or LZW compressed. If you place a file inside the game root dir, it will be loaded before the files in the archives.

The files often contain named chunk headers (like, "SCR") followed by a colon (':') and then 4 bytes for the chunk size, with the highest bit on the file size value enabled when the chunk contains more chunks inside it.

The archives for Rise of the Dragon (PC) contain files with these extensions:

.ADH
.ADL
.ADS - invokes .TTM.
.BMP - bitmaps.
.FNT - EGA fonts.
.GDS - game code?
.OVL - drivers (video|sound). sound patch files (001,003,101) (instruments).
.PAL - VGA palettes.
.REQ 
.RST
.SCR - background screens.
.SDS - game database? w/ dialogues text & item descriptions. invokes .ADS.
.SNG - songs (Sierra SCI 1.2 .SND format).
.TTM - cinematic scripts.

.SCR image files contain 320x200 8-bit screens, while .BMP image files contain a linear array of variable sized bitmaps. The .BMP and .SCR image files can have BIN:|VGA: chunks where each chunk has 4-bits for a full 8-bit VGA image. The BIN: low 4-bit chunk is used for EGA displays, with the VGA: chunk's high 4-bits add to that, to provide 8-bits for VGA displays. Instead of both these BIN:|VGA: chunks, image files can have a single VQT: chunk which contains a compressed image (uses block compression with vector quantization?).

Rise of the Dragon (Amiga version)

.ADL
.ADS
.AMG
.BMP
.CRS - cursors?
.FNT
.GDS
.INS - instruments (AIFF).
.PAL
.REQ
.RST
.SCR
.SDS
.SNG - songs (IFF-SMUS).
.TTM

.INS sound samples are in AIFF format. These can be played with libavcodec i.e. ffplay. The files still have this comment: "Created Or Edited With Synthia Professional.". Synthia is a music composer suite, which comes with the SMUS Player software, that reads IFF-SMUS format music. ExoticA claims that Stellar 7 (Amiga), another Dynamix game also based on the DGDS, also has music in this format. UADE can play IFF-SMUS music.

I have had less luck with the Amiga images. I hoped it was using the IFF-ILBM image format. But it seems likely that the image data is compressed. The data chunks have this string inside:

LZNS05031990

Perhaps they are Lempel-Ziv encoded? The numbers in the string look like a date: 05-01-1990.

Quoting this page:

The letters typically used in the compression string come from a combination of the creators initials of the LZ algorithm, Lempel/Ziv, and the author of the LHA program, Haruyasu Yoshizaki.

Perhaps NS is the name of one of the programmers: Nels Bruckner. Still, the levels of compression involved, given we know the size of the raw images, suggests a kind of RLE compression.

Rise of the Dragon (Mac version)

.ADH
.ADL
.ADS
.BMP - foreground bitmaps (BIN|VGA).
.FNT
.GDS
.PAL
.REQ
.RST
.SCR - background screens (BIN|VGA).
.SDS
.SX - songs (Sierra SCI .SND?).
.TTM
.VIN

All the .BMP and .SCR images are in BIN|VGA format. The BIN|VGA chunks are LZW compressed. We have a decoder.

The game comes with three files: macsnd.drv, midi.rll, and Sound.p. Sound.p seems to have unsigned 8-bit PCM sound samples for the instruments when I open it in Audacity. While macsnd.drv looks like this:

$ od -N64 -c macsnd.drv.rsrc 0000000 \0 005 026 \a \0 002 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 0000020 \0 \0 \0 \0 \0 \0 \0 \0 \0 002 \0 \0 \0 \t \0 \0 0000040 \0 2 \0 \0 \0 \0 \0 \0 002 \0 \0 \0 R \0 \0 0000060 _ 272 C O D E S C I V 001 \0 \0 \0 \0 \0 0000100

Note the CODESCIV text. This suggests a Sierra SCI game sound driver, similar to the PC port, with sound samples for instruments in a patch file.

Links to previous DGDS engine attempts

Links to DGDS resources

Curiosities

Clone this wiki locally