Description of .ZLS file format.
================================

For version 0.17b:

 Byte  Contents     Comment
----------------------------
   0   ZX-Live!      Label
   8     AF           h l
  10     BC           h l
  12     DE           h l
  14     HL           h l
  16     IX           h l
  18     IY           h l
  20     AF'          h l
  22     BC'          h l
  24     DE'          h l
  26     HL'          h l
  28     IR           h l
  30     SP           h l
  32     PC           l h
  34   Bits0-3      Bits0&1-IMx; Bit2-IFF1; Bit3-IFF2.
  35    Byte        255 - CPU halted, 0 - normal state.
  36    Byte        Number of takts in line -1.
  37    Byte        Bits0-4 - the last OUT (FE),n.
  38    Byte        Speed: bit7= 0 - normal, 1 - max.
39--72  0..0        Reserved by emulator.
  73   Long word    Dump length - $0000xxxx - h l.
  77     48k        *Compressed.
  ..    memory
  ..     dump

For version 0.37:

 Byte  Contents     Comment
----------------------------
 0-33               As in v0.17b.
  34    Byte        Bits0-3 as in v0.17b.
                    Bit4= 0 - normal state; 1 - CPU halted.
                    Bit5= 0 - normal speed; 1 - max speed.
                    Bits6-7 - inverted number of model:
                    00-48k; 01-128k; 02-Pentagon128k.
                    Bits4-7 also is a version of .ZLS file:
                    0000=v0.17b, other combination=v0.37 or
                    higher.
  35    Byte        Bits0-4 - the last OUT (FE),n.

For 48k model without AY:

  36    Byte        Number of data bytes after this;
                    0-16 - AY=Off; 17 and more - AY=On.
  37    Word        Dump length - h l.
  39     48k        *Compressed.
  ..    memory
  ..     dump

For 48k model with AY:

  36    Byte        Number of data bytes after this;
  37    Byte        Current AY register.
38--53 AY registers 0-15
  54    Word        Dump length - h l.
  56     48k        *Compressed.
  ..    memory
  ..     dump

For 128k or Pentagon128k without AY:

  36    Byte        The last $7FFD out.
  37    Byte        Number of data bytes after this;
                    0-16 - AY=Off; 17 and more - AY=On.
  38   Long word    Dump length - h l.
  42     128k       **Compressed.
  ..    memory
  ..     dump

For 128k or Pentagon128k with AY:

  36    Byte        The last $7FFD out.
  37    Byte        Number of data bytes after this;
  38    Byte        Current AY register.
39--54 AY registers 0-15
  55   Long word    Dump length - h l.
  59     128k       **Compressed.
  ..    memory
  ..     dump

*  Compression method - as in .Z80 file format.
** 128k data block containing pages: 1; 5; 2; 0; 3; 4; 6; 7.


(C)2007 Dmitriy Vladimirovich Zhivilov.
