In this section you can obtain utilities that enable you to create your own AY files. Many hundreds of hours have been dedicated to creating the AY collection at this site. If you have Z80 coding knowledge and enjoy what we have provided here then please consider contributing. The current active contributors are unable to dedicate as much time to the project as was once the case. More contributors are needed if the collection is to continue to grow.
The first step to making AY files to is locate the relevant Z80 code from a game or demo. This is achieved using a debugger. Many Spectrum and CPC emulators have debugger tools included (such as ZX SPIN and No$CPC). A debugger will allow you to examine to contents of the computers memory as machine code (aka assembly language). The code will usually comprise of a player routine, a note table, and any other special interrupt handling code. The player routine sends data to the AY chip or the beeper (in the Spectrum). The data the player routine sends is usually referred to as the note table. This section of code contains information about which notes to play, note frequency and duration, for example. Finally, in some cases, there may be an interrupt routine. This routine instructs the Z80 to execute other routines whilst music is playing. For example, the Z80 might scan the keyboard after each note is played to determine if the user has pressed a key.
Once you have located the relevant routines in memory, the next step is to extract only those sections of memory needed to play the music. For the Spectrum, you can use an emulator such as ZX SPIN to save specific blocks of code as binary files. For the CPC, you can use a command line program called CPCSnip (which you can download below) which allows you to save blocks of code located anywhere in the CPCs memory.
The final step is the creation of the actual AY file. An AY file can contain multiple Z80 binary files. The AY file contains information on where each Z80 binary file should be located in memory. Other information is also stored such as track names, track timings, artist and copyright details. An AY Player is essentially a Z80 emulator as well as an AY emulator. The AY Player uses the metadata stored in the AY file to place each block of Z80 code into the correct memory locations (as per the game/demo that the data has been extracted from). AY files are compiled using AYMakeR (which can be downloaded below).
AYMakeR is a command line utility used to compile extracted Z80 code into AY files.
Click here to download AYMakeR - (last updated 2nd September 2001)
AYSplitR is a utility used for splitting AY files into blocks of Z80 code and ini script.
Click here to download AYSplitR - (last updated 2nd September 2001)
Alternatively, you can use an assembler to make AY files manually. Full documentation and the original AY file format specifications can be found in the AYMakeR zip file. For extracting Z80 data from Spectrum code, the X128 emulator provides excellent options to dump user-defined blocks of code.
CPCSNIP is a utility used for extracting Z80 code from CPC snapshot files.
Click here to download CPCSNIP - (last updated 8th March 2003)
You can also download a number of useful AY related utilities from Laurent de Soras site:
� z80span - inspect a map of the memory used by the code of a CPC program for the Z80 CPU
� ay2sna - convert AY files to CPC snapshots that can be loaded into CPC emulators