Thanks to Julio Marchi for this space in MSX All
 

PC Shape (.SDR) and (.SHP)

  The PC shape is the file format used on the PC's Print-Master program and it is quite similar to the MSX shape file, where a header describes the picture and it is followed by the picture data. Se the illustration below.

 

  The pictures are separated by a byte valued as "00".


  Header

  Each picture header has the following data:

Offset
(hexa)
Size
(bytes)
Description
0 1 Width in bytes
1 1 Shape height in pixels
2 1 Shape width in pixels
3 1 Value 00

  The PC Shape that comes along with the Print-Master has the following header: 0B 34 58 00. According to that, we have:

 Width in bytes: &H0B = 11 bytes
 Height: &H34 = 52 pixels
 Width: &H58 = 88 pixels
 Size: Width in bytes x Height = 11 x 52 = 572 bytes


  Picture data

  The picture is composed by 8x1 pixels blocks arranged in sequence. Instead of the next byte correspond to the line below, it corresponds to the next 8x1 block located on the right.

  Differences between MSX layout and the PC Shape layout for the following bytes sequence: 00 01 02 03 04 05 06 07 08

       MSX                               PC

00000000 00001000      00000000 00000001 00000010 ... 00001000      
00000001
00000010
00000011
00000100
00000101
00000110
00000111


  For the example shown in the header section, the 8x1 blocks layout for that picture is described next:

 +---------------------+
 | 000 001 002 ... 010 |
 | 011 012 013 ... 021 |
 | ...                 |
 | 561 561 563 ... 571 |
 +---------------------+


  The .SDR format

  The .SDR file is a small descriptor for each picture contained in the .SHP file. There are 16 bytes reserved to describe each picture, where the non used charcters are marked as 00. Example:

 Hexadecimal                                     | ASCII
 ------------------------------------------------+-----------------
 46 49 47 55 52 41 31 00 00 00 00 00 00 00 00 00 | FIGURA1.........
 46 49 47 55 52 41 32 00 00 00 00 00 00 00 00 00 | FIGURA2.........

Marcelo Silveira
Systems and Computing Engineer
Expert in Image Processing and Artificial Intelligence
© MarMSX 1999-2021