Takes binary files, puts them in .tap files. Handy for when you want to load binary data into zx spectrum emulators. These can also be converted to audio to load on a real spectrum.
Licenced with the MIT licence, see LICENCE file
Build using ghc like so...
ghc bin2tap.hs -o bin2tap
To make a full .tap
file containing a binary including the header block:
bin2tap address name file
where:
address
is the start address in the ZX spectrum memory, in the range 0x0000 to 0xFFFFname
is the name of the file on the tape (the name the spectrum will see, no more than 10 chars)file
is the name of the binary to convert
This is not normally what you want, but:
To make a .tap
file that only contains the data block, no header:
bin2block file
where:
file
is the name of the binary to convert
It's possible that some software will not consider this to be a valid tap file. Depending on what the proram is supposed to achieve, that might be true.
Sometimes a piece of software might want to load a specific file from the tape where it knows already the size and location and doesn't really care about the name. This is where it might be useful to have a data block that is not preceded by a header.
You have a binary file called foo.dat
that you want to load at 0xFE00
and you want to LOAD "datafoo" CODE
bin2tap 0xFE00 datafoo foo.dat