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 numbers | Name |
---|---|
0–19 | Time |
20–23 | Register |
24–31 | Data |
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 number | Range of Data |
---|---|
1, 3, 5 or 13 | 0–15 |
6, 8, 9 or 10 | 0–31 |
7 | 0–63 |
other | 0–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.