Thanks to Julio Marchi for this space in MSX All
 

Layout (.LAY)

  This file contains the MSX 1 character table data compacted. It cointains the MSX file header.

  The compress method applied on the character table data is described next.

  Let p as a file pointer and val(p) the returned value from p. For each byte, we have:

  • If val(p) = 0, then val(p+1) indicates the number of sequential empty lines.
  • If val(p)=255, then val(p+1) indicates the number of sequential full lines.
  • If val(p) ≠ 0 and val(p) ≠ 255/, then val(p) indicates the current line pattern.


  The 8x1 line pattern is described here.

  Examples:

 p
 00 02

  Draws two empty (white) lines on the screen.

 p
 FF 03

  Draws three full (black) lines on the screen.

 p
 01 06 D7 

  The pattern for the next three lines are the following:

 00000001
 00000110 
 11010111 

  Where 1 is black (pixel on) and 0 is white (pixel off).

  Everytime the pointer p finds the values 00 or FF, we know that the next byte tell us the number of consecutive lines to be considered. According to that, the pointer has to jump two bytes in order to search the next information. If the value is diffrent from 00 or FF, the pointer jumps one position (the next byte).


  Graphos III version 1.2 Layout Format

  On Graphos III version 1.2, the layout format was modified. Every byte that indicates the line pattern, including the 00 and FF, were shifted 99H positions forward. So, comparing the data from version 1.1:

00 02
FF 03
01 06 D7

  They will be on v. 1.2:

99 02
98 03
9A 9F 70

  Notice that the bytes that represent the line counting were not modified.


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