Z is my ZX Spectrum emulator.

The original version includes cassette load and save routines which use
Memotech hardware to load and save Sinclair format cassette tapes.

The version within MEMU has these routines patched so that MEMU gets
called, and it does file access to memu.tap instead.

You can write and run Sinclair BASIC programs, but programs (typically games)
that do low level access to Spectrum hardware will not work.
For that, better to use Tony Brewers Speculator.

Snapshots taken from Z will reflect the fact Z runs in IM 2, with I=E3.
Spectrum BASIC normally runs in IM 1, with I=3F.
Many games also run in this mode, although a few set up IM 2.
Some that set up IM 2, set I=38, 39, 3A or 3B.

If you want to take a snapshot on Z and load in on another Spectrum
emulator, you may need to
	check byte 0x0013 is 0x04 to check EI
	patch byte 0x0000 to 0x3F to set I
	patch byte 0x0019 to 0x01 to set IM 1
Checking EI allows us to be sure we're not within Z's interrupt routine,
which of course won't do anything useful on a real Spectrum.

If you have a snapshot taken on another emulator, which you wish to load
on Z, you may need to
	patch byte 0x0000 to 0xE3 to set I
	patch byte 0x0013 to 0x04 to set EI
	patch byte 0x0019 to 0x02 to set IM 2

This process may or may not work, YMMV.

Andys Binary Folding Editor (http://www.nyangau.org/be/be.htm) makes patching
of binary files easy to do.

{{{ Andy
