★ Graphic Tools Guide ★ Format listoffset | size | function |
|---|---|---|
$ 000 | $ 100 | Header |
variable | variable | Map data |
variable | variable | Pattern name data |
variable | variable | Character data |
variable | variable | Palette data |
variable | variable | Attribute data |
offset | size | function |
|---|---|---|
$ 00 | $ 10 | Identifier = "SEGA_SATURN_SCR" +? ("_" Is a space = $ 20) |
$ 10 | Long | Map data offset address |
$ 14 | Long | Map data size (bytes) |
$ 20 | Long | Pattern name data offset address |
$ 24 | Long | Pattern name data size (bytes) |
$ 30 | Long | Character data offset address |
$ 34 | Long | Character data size (bytes) |
$ 40 | Long | Palette data offset address |
$ 44 | Long | Palette data size (bytes) |
$ 50 | Long | Attribute data offset address |
$ 54 | Long | Attribute data size (bytes) |
$ 60 | $ A0 | All empty addresses are $ 00 |
offset | size | function |
|---|---|---|
$ 00 | word | Horizontal page size |
$ 02 | word | Vertical page size |
$ 04 | $ 0C | All dummy data $ FF |
$ 10 | variable | Page (number) table |
The page table is constructed by continuously storing an array of page numbers that make up the map in memory with horizontal priority.
Please note that the map data in the SEGA2D file has a slightly different interpretation from the map data of Sega Saturn. (Equivalent by setting 1 plane = 1 page.)
offset | size | function |
|---|---|---|
$ 00 | Long | Character control data |
$ 04 | word | Pattern name auxiliary data |
$ 06 | $ 0A | All dummy data $ FF |
$ 10 | variable | Pattern name table |
The size and arrangement of the pattern name table changes depending on the "pattern name data size" and "character size" set by the "character control data" and "pattern name auxiliary data".
The pattern name data is based on the Sega Saturn pattern name data.
MSB character size │ unused │ number of colors │ unused │ │ ┌─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┐ │-│-│-│-│-│-│-│-│ 2│1│0│-│-│-│S│ └─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┘ │ │ │ └─ SZ: 0 = 1 cell x 1 cell │ │ │ 1 = 2 cells x 2 cells │ │ │ └─┴─┴───────── CN: 000 = 16 colors 001 = 256 colors 011 = 32768 colors LSB Unused │ ┌─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┐ │-│-│-│-│-│-│-│-│-│-│-│-│-│-│-│ └─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┘
MSB LSB │ │ Unused │ Pattern name auxiliary data │ ┌─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┐ │P│N│-│-│-│-│0│0│0│0│0│0│0│0│0│ └─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┘ │ │ │ └─ NSM: Character number auxiliary mode │ 0 = 10bit │ 1 = 12bit │ └─── PNB: Pattern name data size 0 = 1 word 1 = 2 words
The palette number expresses 16 colors as one unit.
For the character number, specify the offset address of the character pattern table (see the character data section) in $ 20 units. Therefore, the number of occupants per character changes as follows depending on the character size and the number of character colors.
Number of character colors | 1 cell x 1 cell | 2 cells x 2 cells |
|---|---|---|
16 colors | 1 | Four |
256 colors | 2 | 8 |
32768 colors | Four | 16 |
In the SEGA2D file, all the bits that make up the pattern name auxiliary data are fixed to 0. Therefore, please note that the number of characters that can be used and the palette will be limited.
MSB │ Invert function │ Special function │ Unused │ Palette number │ ┌──┬──┬──┬──┬──┬──┬──┬──┬──┬──┬──┬──┬──┬──┬──┬──┐ │ HF │ VF │ Pr │ CC │ −− │ −− │ −− │ −− │ −− │ 6 │ 5 │ 4 │ 3 │ 2 │ 1 │ 0 │ └──┴──┴──┴──┴──┴──┴──┴──┴──┴──┴──┴──┴──┴──┴──┴──┘ LSB │ │ Character number │ ┌──┬──┬──┬──┬──┬──┬──┬──┬──┬──┬──┬──┬──┬──┬──┬──┐ │ −− │ 14 │ 13 │ 12 │ 11 │ 10 │ 9 │ 8 │ 7 │ 6 │ 5 │ 4 │ 3 │ 2 │ 1 │ 0 │ └──┴──┴──┴──┴──┴──┴──┴──┴──┴──┴──┴──┴──┴──┴──┴──┘
MSB LSB │ Palette number │ Invert function │ Character number │ ┌──┬──┬──┬──┬──┬──┬──┬──┬──┬──┬──┬──┬──┬──┬──┬──┐ │ 3 │ 2 │ 1 │ 0 │ VF │ HF │ 9 │ 8 │ 7 │ 6 │ 5 │ 4 │ 3 │ 2 │ 1 │ 0 │ └──┴──┴──┴──┴──┴──┴──┴──┴──┴──┴──┴──┴──┴──┴──┴──┘
MSB LSB │ Palette number │ Character number │ ┌──┬──┬──┬──┬──┬──┬──┬──┬──┬──┬──┬──┬──┬──┬──┬──┐ │ 3 │ 2 │ 1 │ 0 │ 11 │ 10 │ 9 │ 8 │ 7 │ 6 │ 5 │ 4 │ 3 │ 2 │ 1 │ 0 │ └──┴──┴──┴──┴──┴──┴──┴──┴──┴──┴──┴──┴──┴──┴──┴──┘
MSB LSB │ Palette number │ Invert function │ Character number │ ┌──┬──┬──┬──┬──┬──┬──┬──┬──┬──┬──┬──┬──┬──┬──┬──┐ │ −− │ 6 │ 5 │ 4 │ VF │ HF │ 9 │ 8 │ 7 │ 6 │ 5 │ 4 │ 3 │ 2 │ 1 │ 0 │ └──┴──┴──┴──┴──┴──┴──┴──┴──┴──┴──┴──┴──┴──┴──┴──┘
MSB LSB │ Palette number │ Character number │ ┌──┬──┬──┬──┬──┬──┬──┬──┬──┬──┬──┬──┬──┬──┬──┬──┐ │ −− │ 6 │ 5 │ 4 │ 11 │ 10 │ 9 │ 8 │ 7 │ 6 │ 5 │ 4 │ 3 │ 2 │ 1 │ 0 │ └──┴──┴──┴──┴──┴──┴──┴──┴──┴──┴──┴──┴──┴──┴──┴──┘
MSB LSB │ Palette number │ Invert function │ Character number │ ┌──┬──┬──┬──┬──┬──┬──┬──┬──┬──┬──┬──┬──┬──┬──┬──┐ │ 3 │ 2 │ 1 │ 0 │ VF │ HF │ 11 │ 10 │ 9 │ 8 │ 7 │ 6 │ 5 │ 4 │ 3 │ 2 │ └──┴──┴──┴──┴──┴──┴──┴──┴──┴──┴──┴──┴──┴──┴──┴──┘
MSB LSB │ Palette number │ Character number │ ┌──┬──┬──┬──┬──┬──┬──┬──┬──┬──┬──┬──┬──┬──┬──┬──┐ │ 3 │ 2 │ 1 │ 0 │ 13 │ 12 │ 11 │ 10 │ 9 │ 8 │ 7 │ 6 │ 5 │ 4 │ 3 │ 2 │ └──┴──┴──┴──┴──┴──┴──┴──┴──┴──┴──┴──┴──┴──┴──┴──┘
MSB LSB │ Palette number │ Invert function │ Character number │ ┌──┬──┬──┬──┬──┬──┬──┬──┬──┬──┬──┬──┬──┬──┬──┬──┐ │ −− │ 6 │ 5 │ 4 │ VF │ HF │ 11 │ 10 │ 9 │ 8 │ 7 │ 6 │ 5 │ 4 │ 3 │ 2 │ └──┴──┴──┴──┴──┴──┴──┴──┴──┴──┴──┴──┴──┴──┴──┴──┘
MSB LSB │ Palette number │ Character number │ ┌──┬──┬──┬──┬──┬──┬──┬──┬──┬──┬──┬──┬──┬──┬──┬──┐ │ −− │ 6 │ 5 │ 4 │ 13 │ 12 │ 11 │ 10 │ 9 │ 8 │ 7 │ 6 │ 5 │ 4 │ 3 │ 2 │ └──┴──┴──┴──┴──┴──┴──┴──┴──┴──┴──┴──┴──┴──┴──┴──┘
offset | size | function |
|---|---|---|
$ 00 | $ 10 | All dummy data $ FF |
$ 10 | variable | Character pattern table |
The cell data is arranged as follows according to the character size.
┌───┬───┬───┬───┬───┬ │ Cell 0 │ Cell 1 │ Cell 2 │ Cell 3 │ Cell 4 │ ├───┼───┼───┼───┼───┼ │ ・ ・ ・ │ ・ ・ ・ │ ・ ・ ・ │ ・ ・ ・ │ ・ ・ ・ │ ├───┼───┼───┼───┼───┼ │ ・ ・ ・ │ ・ ・ ・ │ ・ ・ ・ │ ・ ・ ・ │ ・ ・ ・ │ ├───┼───┼───┼───┼───┼ | Cell 0 = Character 0 | | Cell 1 = Character 1 | | Cell 2 = Character 2 | | Cell 3 = Character 3 | | Cell 4 = Character 4 | | Cell 5 = Character 5 | | Cell 6 = Character 6 | | ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ ・ |
┌───┬───┬───┬───┬───┬ │ Cell 0 │ Cell 1 │ Cell 4 │ Cell 5 │ Cell 8 │ ├───┼───┼───┼───┼───┼ │ Cell 2 │ Cell 3 │ Cell 6 │ Cell 7 │ ・ ・ ・ │ ├───┼───┼───┼───┼───┼ │ ・ ・ ・ │ ・ ・ ・ │ ・ ・ ・ │ ・ ・ ・ │ ・ ・ ・ │ ├───┼───┼───┼───┼───┼ -------------------- | Cell 0 | | | Cell 1 | Character 0 | | Cell 2 | | | Cell 3 | | -------------------- | Cell 4 | | | Cell 5 | Character 1 | | Cell 6 | | | Cell 7 | | -------------------- | ・ ・ ・ | ・ ・ ・ |
0 1 2 3 4 5 6 7 ┌───┬───┬───┬───┐ 0│ + 00│ + 01│ + 02│ + 03│ ├───┼───┼───┼───┤ 1│ + 04│ + 05│ + 06│ + 07│ ├───┼───┼───┼───┤ 2│ + 08│ + 09│ + 0a│ + 0b│ ├───┼───┼───┼───┤ 3│ + 0c│ + 0d│ + 0e│ + 0f│ ├───┼───┼───┼───┤ 4│ + 10│ + 11│ + 12│ + 13│ ├───┼───┼───┼───┤ 5│ + 14│ + 15│ + 16│ + 17│ ├───┼───┼───┼───┤ 6│ + 18│ + 19│ + 1a│ + 1b│ ├───┼───┼───┼───┤ 7│ + 1c│ + 1d│ + 1e│ + 1f│ └───┴───┴───┴───┘
0 1 2 3 4 5 6 7 ┌───┬───┬───┬───┬───┬───┬───┬───┐ 0│ + 00│ + 01│ + 02│ + 03│ + 04│ + 05│ + 06│ + 07│ ├───┼───┼───┼───┼───┼───┼───┼───┤ 1│ + 08│ + 09│ + 0a│ + 0b│ + 0c│ + 0d│ + 0e│ + 0f│ ├───┼───┼───┼───┼───┼───┼───┼───┤ 2 │ + 10 │ + 11 │ + 12 │ + 13 │ + 14 │ + 15 │ + 16 │ + 17 │ ├───┼───┼───┼───┼───┼───┼───┼───┤ 3│ + 18│ + 19│ + 1a│ + 1b│ + 1c│ + 1d│ + 1e│ + 1f│ ├───┼───┼───┼───┼───┼───┼───┼───┤ 4│ + 20│ + 21│ + 22│ + 23│ + 24│ + 25│ + 26│ + 27│ ├───┼───┼───┼───┼───┼───┼───┼───┤ 5│ + 28│ + 29│ + 2a│ + 2b│ + 2c│ + 2d│ + 2e│ + 2f│ ├───┼───┼───┼───┼───┼───┼───┼───┤ 6│ + 30│ + 31│ + 32│ + 33│ + 34│ + 35│ + 36│ + 37│ ├───┼───┼───┼───┼───┼───┼───┼───┤ 7│ + 38│ + 39│ + 3a│ + 3b│ + 3c│ + 3d│ + 3e│ + 3f│ └───┴───┴───┴───┴───┴───┴───┴───┘
0 1 2 3 4 5 6 7 ┌───┬───┬───┬───┬───┬───┬───┬───┐ 0│ + 00│ + 02│ + 04│ + 06│ + 08│ + 0a│ + 0c│ + 0e│ ├───┼───┼───┼───┼───┼───┼───┼───┤ 1│ + 10│ + 12│ + 14│ + 16│ + 18│ + 1a│ + 1c│ + 1e│ ├───┼───┼───┼───┼───┼───┼───┼───┤ 2│ + 20│ + 22│ + 24│ + 26│ + 28│ + 2a│ + 2c│ + 2e│ ├───┼───┼───┼───┼───┼───┼───┼───┤ 3│ + 30│ + 32│ + 34│ + 36│ + 38│ + 3a│ + 3c│ + 3e│ ├───┼───┼───┼───┼───┼───┼───┼───┤ 4│ + 40│ + 42│ + 44│ + 46│ + 48│ + 4a│ + 4c│ + 4e│ ├───┼───┼───┼───┼───┼───┼───┼───┤ 5│ + 50│ + 52│ + 54│ + 56│ + 58│ + 5a│ + 5c│ + 5e│ ├───┼───┼───┼───┼───┼───┼───┼───┤ 6│ + 60│ + 62│ + 64│ + 66│ + 68│ + 6a│ + 6c│ + 6e│ ├───┼───┼───┼───┼───┼───┼───┼───┤ 7│ + 70│ + 72│ + 74│ + 76│ + 78│ + 7a│ + 7c│ + 7e│ └───┴───┴───┴───┴───┴───┴───┴───┘
offset | size | function |
|---|---|---|
$ 00 | word | Start (offset) palette number |
$ 02 | word | Number of color tables |
$ 04 | $ 0C | All dummy data $ FF |
$ 10 | variable | Color table |
A color table is constructed by continuously storing the "color data" that makes up the palette in memory.
The start palette number is specified in units of 1 color (1 color data).
MSB LSB │ │ B │ G │ R │ ┌─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┐ │-│ 4 │ 3 │ 2 │ 1 │ 0 │ 4 │ 3 │ 2 │ 1 │ 0 │ 4 │ 3 │ 2 │ 1 │ 0 │ └─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┘
offset | size | function |
|---|---|---|
$ 00 | Word x number of characters | Attribute data |
There is no particular Sega Saturn hardware function that corresponds to the attribute data. Use this field when you need some information that has a one-to-one correspondence with the character table in the application software.
★ Format list