ACE snapshot file format as used by ACE32, Blaze, Multi-Machine, ZZACE09 (Java) emulators

2005-11-04 cleaned-up by kio

Many thanks to Edwin Blink for his work on finding this out after many hours looking at the ACE32 emulators snapshots. It was thought that the ACE32 snapshot format information had been lost, but we know the following:


The ACE snapshot file is a memory dump from address 2000 up to and inclusive 3FFF,7FFF or BFFF depending on the memory configuration that is being used.

It uses a simple compression algorithm to reduce the snapshots file size. Three or more bytes of the same values are compressed into a three byte sequence. Byte ED has special meanings:

1) ED 00       end of file
2) ED xx yy    repeat byte yy, xx times.

- one, two or three of more ED bytes are always stored in it's three byte form.
- ACE32 uses a maximum repeat value of F0 so a maximum of 240 repeated bytes are reduced to a three byte sequence. More repeats are stored in seperate sequences.

ACE32 configuration settings and Z80 Registers

In the ACEs memory map there are several shadows of other memory parts that are normally filled with 0s ( in emulation). However the first shadow at 2000-23FF is used to store ACE32 configurations and the Z80 registers.

Because an ACE snapshot is compressed an offset seems out of place and the Ace memory addresses instead. All numbers used by ACE32 are 32-bit words in little indian format. (Least significant byte first).

ACE32 Configuration

Addr:   Defaults            Description

2000    01, 80, 00, 00      ?

2080    00, 80, 00, 00      Ramtop 4000 (3K), 8000(19K), C000(35K)
2084    00, 00, 00, 00      Debugger Data Address
2088    00, 00, 00, 00      Debugger Breakpoint Address
208C    03, 00, 00, 00      Frame Skip Rate (3)
2090    03, 00, 00, 00      Frames per TV Tick (3)
2094    FD, FD, 00, 00      ? 
2098    XX, XX, XX, XX      Time emulator is running probably in milliseconds
209C    00, 00, 00, 00      Emulator Colors 0(white on Black),1(grean on Black),
                                            2(purple on Black),3(Black on White)

Z80 Register dump

Addr:	last state             Registers

2100    50, 04, 00, 00         AF
        00, 00, 00, 00         BC
        E2, 26, 00, 00         DE
        28, 3C, 00, 00         HL
        00, 3C, 00, 00         IX
        C8, 04, 00, 00         IY
        FE, 7F, 00, 00         SP
        9D, 05, 00, 00         PC
        40, 20, 00, 00         AF'
        00, 01, 00, 00         BC'
        60, 00, 00, 00         DE'
        80, 26, 00, 00         HL'
        01, 00, 00, 00         IM
        01, 00, 00, 00         IFF1
        01, 00, 00, 00         IFF2
        00, 00, 00, 00         I
        11, 00, 00, 00         R
        80, 00, 00, 00         ?

Creating ACE Snapshots

Using ACE snapshots is a good workaround for some emulators to get programs running as not all emulators can deal with TAP or WAV files. Besides this it is also a good way of ommiting the sometimes awkward loading instructions as they are only needed once when the snapshot is created. To make it as user friendly as possible consider the following when making ACE snapsots:

- Before loading your program you wan't to save make sure the emulator has been reset. This ensures a clean and shorter ACE file.

- Load programs using their loading instructions but do not type the part that will run them automatically. ie when the loading instructions say 'LOAD D D' to load and start the game enter 'LOAD D' instead to just load the program. After the program has loaded successfully. Type the command needed to start the program. But instead of pressing enter you save the snapshot. When a snapshot is loaded back. Enter needs to be pressed to start the program. But the advantage is that you can see which command is used to start the program. so you know what to type again in case the program stops.