ZXAY

ZXAY-file was designed speccially for Ay_Emul. It can be converted from any OUT-, EPSG-, AY- or AYM-file and has more optimal format for storing AY chip outing than OUT-file.

ZXAY-file structure is a sequence of four bytes blocks. First block of ZXAY-file is ASCII string 'ZXAY'. All further blocks have next structure:

Bit numbersName
0–19Time
20–23Register
24–31Data

Time is a time (in range 0–0FFFFFh in Z80 processor tacts) of outing Data value to Register number in range 0–13. If during Time = 0 was no outing then block is written into ZXAY-file with Register = 15. Available range of Data field depends of Register number:

Register numberRange of Data
1, 3, 5 or 130–15
6, 8, 9 or 100–31
70–63
other0–255

If previous value of registers from 0 to 12 is equal to value of current outing, then current block is not written to ZXAY-file. Outing to register 13 is always written.

As you can see, ZXAY-file structure is same as OUT-file structure.