Zzap! Megatape plug-in for WAV-PRG
Written by Fabrizio Gennari, 1999

This plug-in supports a standard loader used in many (not all) programs featured
on Zzap! Megatapes. It needs ld_kernelheader.dll to work.

How can you discover if the format is the standard Zzap! Megatape format? Type
SYS63276 instead of LOAD, then

PRINT PEEK(829),PEEK(830),PEEK(831),PEEK(832)

If the response is

224 2 4 3

it is most certainly a file in the right format.

No checksums nor other integrity checks are performed. Therefore, if a converted
program does not work, it is probably due to a poor recording quality. Try
sampling again the tape, adjusting the volume so it is not too high nor too low.

This format does not contain any information about start and end addresses.
While the start address is always 2049, the end address must be extracted from the header chunk. That's why the plug-in ld_kernelheader.dll is needed. The file name is extracted from the header chunk too.

Here are some of the programs tested with the plug-in and the relevant end
addresses.

Bombuzal        
Flik Flak       
Kaleidograph    
Rainbow         
Yabba Dabba Doo
Starace
Flik Flak
Nythyhel

File format

Bit 0: about 16 samples (at 44100 Hz)
Bit 1: about 24 samples (at 44100 Hz)

Data endianness: least significant bit first.

Lead-in byte: $80
   Sync byte: $AA

The pilot tone is made up of short impulses. Then lead-in byte, sync byte and
data bytes follow.