Graphic Tools GuideFormat list

DGT data format


■ File layout

 offset
 size
 function
 $ 000
 $ 100
 header
 $ 100
 $ 20
 directory
 $ 120
 variable
 CLUT (color look-up table)
 Indefinite
 variable
 Bitmap data

◆ Header
 offset
 size
 Explanation
 $ 00
 word
 Header size = $ 100
 $ 07
 Part-Time Job
 Number of directory entries = $ 01
 $ 08
 Long
 File size excluding header
 $ 10
 $ 10
 Identifier = "DIGITIZER_3_Ver2" ("_" is a space = $ 20)
 $ 20
 $ E0
 Dummy data, all $ 00

◆ Directory
 offset
 size
 Explanation
 $ 00
 Long
 Directory size = $ 20 + CLUT size (variable)
 $ 04
 word
 Horizontal display position (usually $ 0000)
 $ 06
 word
 Vertical display position (usually $ 0000)
 $ 08
 word
 Horizontal image size
 $ 0A
 word
 Vertical image size
 $ 10
 $ 10
 Dummy data (all $ 00)
● The free address of "Directory name" is $ 20.
● All free addresses except "directory name" are $ 00.

◆ CLUT
Exists in palette mode and run length mode.
 offset
 size
 function
 $ 00
 Long x number of pallets
 CLUT data
● One palette is composed of "long x 16 colors".
● If even one color is used, one palette of data will be secured.

CLUT data
MSB 
│ │ Palette number 
┌─┼─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┐
│ * │ E │ D │ C │ B │ A │ 9 │ 8 │ 7 │ 6 │ 5 │ 4 │ 3 │ 2 │ 1 │ 0 │
└─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┘

│ Color data LSB
│ │ B │ G │ R │ B │ G │ R │
┌─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┐
│ * │ 0 │ 0 │ 0 │ 4 │ 3 │ 2 │ 1 │ 4 │ 3 │ 2 │ 1 │ 4 │ 3 │ 2 │ 1 │
└─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┘
* = Unused
● The color code is $ FFFF for palette numbers that are not used on the bitmap data even if there is a CLUT. This allows you to find out which palette numbers are not in use from the CLUT.

◆ Bitmap data
 offset
 size
 function
 $ 00 ~
 Word x image size
 Palette number for each pixel

Graphic Tools GuideFormat list
Copyright SEGA ENTERPRISES, LTD ,. 1997