DDiCI Graphics format
Dangerous Dave in Copyright Infringement has all its graphics in the file EGAPICS.DD2. The format is quite convoluted and was eventually abandoned for the more convenient but closely related Commander Keen EGA Header. The problem is that ALL the game's graphics are stored in this file as 4-plane Raw EGA data, including the sprites, and that the game itself is rather primitive.
DDiCI can only retrieve data from 'rounded ($X0) addresses; this means that all pointers end in 0 ($00030, $00150...) and that any data not stored starting at a rounded address will be 'clipped' (Though the sprites have a way around this...) The locations are always the actual location divided by 16, (In hex just lop a zero off the end of the address, so $0890 becomes $0089) This is seen later on in Keen, albeit a bit differently.
The file doesn't have an EGA plane size in it, and indeed the planes can be different sizes (But they shouldn't be.) This is because the primitive Dave engine loads the graphics consecutively rather than as separate modules like in Keen, and because the file contains a header, which cannot be part of a plane. The plane size has to be worked out using more complicated means.
Another thing to note is the sprite 'masking'; since DDiCI has the sprites and other graphics together, it can't use a separate 'masking' plane like later games did. Instead EACH of the rgbi planes has a separate 'mask data' segment after EVERY sprite data segment. These masks are all identical but all four are needed for a sprite to be masked, as each ONLY masks its own plane. This is even more inefficient than its precursor Dangerous Dave, where a single monochrome mask graphic masked all four planes.
Another similarity to Dave 1 is the sprite graphics themselves, each sprite frame is composed of four graphics, stored individually, each offset by two pixels from each other. These are used for smooth movement in-game. (In later games the game engine created these graphics automatically and they did not need to be stored individually.)
File structure: 0 2 Blank 2 4 Font start Start of 8x8 font \ 16 6 4 Tile start Start of 16x16 tiles \ 16 10 4 Image start Start of unmasked images \ 16 14 4 Sprit start Start of masked sprites \ 16 18 4 Image en st Start of image header entries \ 16 22 4 Sprit en st Start of sprite graphics header entries \ 16 26 4 Blue pl st Start of the blue plane (At end of header) 30 4 Green pl st Start of green plane 34 4 Red pl st Start of red plane 38 2 Inten pl st Start of intensity plane 40 2 Num font Number of font entries 42 2 Num til Number of tiles 44 2 Num unmsk Number of unmasked images in file 46 2 Num spr Number of sprite images 48 16x Image ent Image entries, name, size, etc ? 32x Mask ent Sprite entries, name, size, etc ? ? EGA data Raw uncompressed EGA data for all graphics
Unmasked graphic entries: 0 2 Width Image width \ 8 2 2 Height Image height 4 4 Offset Offset from plane start to start reading data \16 8 8 Name Image name, padded with nulls
Masked sprite entries
0 2 Width Sprite width \ 8
2 2 Height Sprite height
4 4 Offset Offset from plane start to start reading data \16
8 4 Mask offset Offset for mask data, = [Offset] + [Height] * [Width]
12 8 Hitbox The hitbox co-ords; starting from 0,0; the left, then top, then
right then bottom limits of the sprite's hitbox; each two bytes
long.
20 12 Name Sprite name, padded with nulls
Notes
Format reverse engineered by Levellass
This format in practice bridges the gap between Dangerous Dave and latter games like Dangerous Dave 2; the graphics are stored in something very close to that of Dave 1, but with innovations and formats that were passed on to latter games.