Japanese
Graphic Tools GuideFormat list

DGT2 data format


■File layout

 offset
 size
 function
 $00
 word
 identifier
 $02
 $04
 image size
 $06
 variable
 CLUT (present if required)
 variable
 variable
 bitmap data

◆Identifier
"PP"
 Palette mode 256 colors/32768 colors
"DC"
 RGB mode 32768 colors
"RL"
 Run length mode 256 colors/32768 colors
"FP"
 Palette mode 256 colors/approximately 16.77 million colors
"FC"
 RGB mode approximately 16.77 million colors
"pp"
 Palette mode 16 colors/32768 colors
"fp"
 Palette mode 16 colors/approximately 16.77 million colors

◆Image size
 offset
 size
 Explanation
 $00
 word
 H image size
 $02
 word
 V image size

◆CLUT
Exists in palette mode and run length mode.
 offset
 size
 function
 $00
 word or
Long x number of pallets (16 or 256)
 CLUT data

●For "PP"/"RL" mode, number of pallets = 256 For "pp" mode, number of pallets = 16
MSB     Color data            LSB
│ │ Blue │ Green │ Red │
┌─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┐
│*│4│3│2│1│0│4│3│2│1│0│4│3│2│1│0│
└─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┘

●For "FP" mode, number of pallets = 256 For "fp" mode, number of pallets = 16
MSB             │ Color code
│               │     Blue      │
┌─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┐
│*│−│−│−│−│−│−│−│7│6│5│4│3│2│1│0│
└─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┘
 
                              LSB
│     Green     │     Red       │
┌─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┐
│7│6│5│4│3│2│1│0│7│6│5│4│3│2│1│0│
└─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┘
* = Can be set freely (usually = 1b)

◆Bitmap data
 offset
 size
 function
 From $00
 variable
 bitmap data

●For "PP"/"FP" mode: 8bit/dot
MSB           LSB
│ Palette code  │
┌─┬─┬─┬─┬─┬─┬─┬─┐
│7│6│5│4│3│2│1│0│
└─┴─┴─┴─┴─┴─┴─┴─┘

●For "DC" mode: 16bit/dot
MSB        Color data         LSB
│ │  Blue   │  Green  │   Red   │
┌─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┐
│*│4│3│2│1│0│4│3│2│1│0│4│3│2│1│0│
└─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┘
* = Can be set freely (usually = 1b)

●For "FC" mode: 32bit/dot
MSB             │ Color code
│               │     Blue      │
┌─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┐
│*│−│−│−│−│−│−│−│7│6│5│4│3│2│1│0│
└─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┘
 
                              LSB
│    Green      │      Red      │
┌─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┐
│7│6│5│4│3│2│1│0│7│6│5│4│3│2│1│0│
└─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┘
* = Can be set freely (usually = 1b)

●For "pp"/"fp" mode: 4bit/dot
MSB                           LSB
│Even coordinate│Odd coordinate │
│code           │code           │
┌───┬───┬───┬───┬───┬───┬───┬───┐
│ 3 │ 2 │ 1 │ 0 │ 3 │ 2 │ 1 │ 0 │
└───┴───┴───┴───┴───┴───┴───┴───┘

●For "RL" mode:

MSB                           LSB
│   Run length  │ CLUT index num│
┌─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┐
│7│6│5│4│3│2│1│0│7│6│5│4│3│2│1│0│
└─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┘

Graphic Tools GuideFormat list
Copyright SEGA ENTERPRISES, LTD. 1997