Thanks to Julio Marchi for this space in MSX All
The shape file is a collection of stacked pictures, where each picture has its own header and the picture data. This file do not have the MSX file header.
Header example: 01 01 30 06.
Shape ID: 1 Shape type: 1 Shape width: &H30 or 48 pixels Shape height: &H06 or 6 blocks of 8x8 pixels = 48 pixels
For each picture, the mask, pattern and color tables have the same size.
The pattern table (or character table) is responsible for setting the color pattern for each line of 8x1 pixels on screen. It defines if a pixel has front or background color, according to the colors defined for this line at the color table.
Defines the front and background colors for each line of 8x1 pixels. It works together with the pattern table.
For further informations on these tables, please click here.
The mask is a pixel selector for the shape. This option can only be found at shapes type 3 and 4.
Shapes type 1 and 2 overwrite all pixels within the picture limits, when copied on a screen region. In the other hand, shapes type 3 and 4 use a mask to indicate the pixels that will be copied to the screen.
The mask value 0 indicates that the pixel will be copied to the screen, whereas the value 1 indicates that the pixel will not be copied. According to that, the mask is generally the complement values for the pattern data.
Shape Mask 00100000 11011111 01010000 10101111 10001000 01110111 10001000 01110111 11111000 00000111 10001000 01110111 10001000 01110111 00000000 11111111
0 291 292 ┌───────────┬───────────┐ │ Picture 1 │ Picture 2 │ ... └───────────┴───────────┘