Newsgroups: comp.sys.sinclair
Path: ulke.hiMolde.no!trane.uninett.no!nac.no!ifi.uio.no!news.sics.se!eua.ericsson.se!erinews.ericsson.se!cnn.exu.ericsson.se!convex!cs.utexas.edu!news.sprintlink.net!pipex!uknet!comlab.ox.ac.uk!imc
From: imc@comlab.ox.ac.uk (Ian Collier)
Subject: Re: Dealing with .TAP files
Message-ID: <6246.imc@comlab.ox.ac.uk>
X-Local-Date: Tuesday, 14th March 1995 at 3:19pm GMT
Originator: imc@msc2.comlab
Organization: Oxford University Computing Laboratory
References: <2C13812A5F@beluga.upe.ac.za> <3jqkte$202@ionews.io.org>
Date: Tue, 14 Mar 1995 15:22:52 GMT
Lines: 49

In article <3jqkte$202@ionews.io.org>, diehl@wink.io.org (Eric March) wrote:
>Daryl Anderson (CCADDA@upe.ac.za) wrote:
>: .TAP files are perculiar to the z80 emulator by Gerton Lunter.
[snip]
>: I do this for my personal collection of .TAP files I have when I
>: wish to play them on the JPP, SPECTRUM, xzx or xz80 emulators
[snippety snip]
>: The down side of this is that you require MS-DOS on a PC and do all
>: the convertion.

>I can always do this at a friend's place -- irritating, but I do have an
>avenue by which I can do it ayway.  Can z80 (which my friend has) save in
>.SNA format?

Just by the way...

You should be able to convert .TAP files to xzx/xz80 tape files fairly
easily with some logic of the form...

   read two bytes of length (LSB first)
   read flag byte
   read block of (length-1) bytes and junk the last byte of the block
   if flag = 0 then open a new file and write "ZXF1" to it
   else if flag = 255 and the previous flag was not 0 then open a new file
   else if flag>0 and flag<255 then open a new file
   write the block to the open file.

   Repeat until end of input file.

Then xzx and xz80 should be able to load these using "LOAD" (or calling
0556 in machine code).

Files starting with ZXF1 are xzx/xz80 tape files which contain both header
and data, while other files are just data blocks which can be loaded in
headerless.  Headerless files can also be loaded with the "LOAD" command
of Spectrum BASIC; the emulator makes up a header assuming that the block
is a CODE file.

All this does not help you if you have an Amiga, of course...

Ian Collier - Departmental Lecturer (and perpetual postgrad student) -
imc@comlab.ox.ac.uk - Oxford University Computing Laboratory, Wolfson
Building, Parks Road, Oxford OX1 3QD - WWW Home Page (including Spectrum
section): http://www.comlab.ox.ac.uk/oucl/users/ian.collier/index.html

New to this group?  Answers to frequently-asked questions can be had from
http://www.nvg.unit.no/spectrum/ .
>New< - Visit the Sam Coup FAQ at:
http://whirligig.ecs.soton.ac.uk/~tsp93/Coupe/FAQ.txt .
