• Please review our updated Terms and Rules here

PET TAP Files

tezza

Veteran Member
Joined
Oct 1, 2007
Messages
4,731
Location
New Zealand
Hi,

I recently had cause to duplicate my tape of PET games. I also took the opportunity to digitised the programs by loading them in through the computer soundcard. So I now have some WAVs.

There doesn't seem to be many places you can get PET software on the web (apart from in D64 format) and I was thinking it would be good to share the Wavs. Wavs are very big though and my bandwidth allocation is small. I've converted these WAVs to TAP files using audiotap, but seem to get variable results when loading into VICE 2.2 (in CBM 3032 mode). Strangely, loading is often not always consistent. I thought maybe the TAPs were "dirty" (very likely) and so tried to clean them using Tapclean. Tapclean told me I had a lot of errors and fixed them. I could load back into the emulated PET but I still kept getting errors.

Tapclean says it's for C64/Vic20 and C16 but no mention of PET. I wonder if cleaning a PET tap screws it up somewhat? It may mess with the start of BASIC for example. Does anyone know, or has anyone had any experience at making and cleaning TAPs from PET file audio (not C64).

Of course it could be that my WAV dumps are just too dirty. I recorded some of the WAVs BACK to tape and a few had problems loading into the real PET so data could just be getting degraded in the digitizing and re-analoguing process.

I could do a lot of testing and more playing around but time for purely altruistic activities like this is fairly limited. However, it would be good to get some clean, workable PET tape images out there for all to use. If I remember rightly Bill D. discussed this last year. Any progress Bill?

Tez
 
Last edited:
Hi,

Please note that there are lot of sound drivers for PC computer trying to be smart and do filtering of MIC input, so to do a good WAV you need to disable all filtering features, which is sometimes even not possible (depends of driver itself), had similar problem on one machine, but when I did it on other it just worked out of box. Thing I have noticed is that for example first 5 sec were just fine and then it started puting volume down,
and therefore it was not same anymore and was not able to load it to real machine.

My proposal is to try to load this WAV's in MESS (www.mess.org) emulator, which suports WAV's and save them again from it to WAV, that way
you will get filtered files, and then you can use those to make good TAP, but guess issues is in making WAV's so please first check sound driver settings.

Micko
 
Hi Tez,

Just a thought - reading a digitised input file, whether WAV or TAP, ought to be a deterministic process, either succeeding or failing in the same way every time. As this doesn't seem to be the case here, a possible cause is contention with other processes during the load. A badly fragmented drive, network I/O, memory paging by the OS, or contention with other higher priority activities could all introduce random delays into the timing-critical decoding process in the emulator.

Also, if your only concern is bandwidth allocation, it's quite possible that the original WAV files are highly repetitive and so might crunch down very considerably if compressed with a lossless utility like gzip or ZIP, removing the need for TAP conversion.
 
Hi Tez,

Just a thought - reading a digitised input file, whether WAV or TAP, ought to be a deterministic process, either succeeding or failing in the same way every time. As this doesn't seem to be the case here, a possible cause is contention with other processes during the load. A badly fragmented drive, network I/O, memory paging by the OS, or contention with other higher priority activities could all introduce random delays into the timing-critical decoding process in the emulator..

yes, I agree. I feel this is the only reason there can be variability. But are TAPS taken from cleaner WAVs more robust to background activities than others? I don't know enough about what's involved to answer this.

Also, if your only concern is bandwidth allocation, it's quite possible that the original WAV files are highly repetitive and so might crunch down very considerably if compressed with a lossless utility like gzip or ZIP, removing the need for TAP conversion.

A good idea. I'll explore this.

Tez
 
Hi,

Please note that there are lot of sound drivers for PC computer trying to be smart and do filtering of MIC input, so to do a good WAV you need to disable all filtering features, which is sometimes even not possible (depends of driver itself), had similar problem on one machine, but when I did it on other it just worked out of box. Thing I have noticed is that for example first 5 sec were just fine and then it started puting volume down,
and therefore it was not same anymore and was not able to load it to real machine.

My proposal is to try to load this WAV's in MESS (www.mess.org) emulator, which suports WAV's and save them again from it to WAV, that way
you will get filtered files, and then you can use those to make good TAP, but guess issues is in making WAV's so please first check sound driver settings.

Micko

I'll check this. I don't think it does any filtering but there maybe hidden settings I haven't noticed. Also good thought about using MESS as a WAV cleaner.

Tez
 
But are TAPS taken from cleaner WAVs more robust to background activities than others? I don't know enough about what's involved to answer this.

I found a description of TAP files at http://www.unusedino.de/ec64/technical/formats/tap.html. The data is stored as bytes representing the raw bits on the tape, encoded as the time between succesive positive/negative transitions. It's difficult to see how this could be both noisy and valid at the same time. Presumably the cleaning is done by changing the intervals to conform more closely with multiples of the serial clock frequency, removing spurious transitions resulting from noise in the original?

I think the best way to debug the problem would be to make a tape from a known program, digitise it and then write something to translate the time values in the cleaned TAP file directly back to the original bits and bytes, comparing these with the original. It should be possible to do this by calculation, rather than timing. I posted a while ago about a someone's blog on decoding digitised Kansas City Format tapes with a Python script - it ought to be possible to do something comparable with TAP files.
 
I think the best way to debug the problem would be to make a tape from a known program, digitise it and then write something to translate the time values in the cleaned TAP file directly back to the original bits and bytes, comparing these with the original. It should be possible to do this by calculation, rather than timing. I posted a while ago about a someone's blog on decoding digitised Kansas City Format tapes with a Python script - it ought to be possible to do something comparable with TAP files.

Yes, true. I'm sure this the best way to do it but can't see myself affording the time.

I dumped a newer copy of the tape I had and I can see this has a much cleaner and more consistant waveform than the first. I'll chop this up and make TAPS of it and check them in the VICE Emulator (with no activity on the computer APART from the emulator). If they seem ok, I'll upload them to a site people can download them from. I won't attempt to clean the TAP as TAP cleaning software seems to be written for the C64/Vic20/C16 rather than the PET. Others can clean them if they wish.

I tried zipping but it doesn't compress the original WAVS much. I'll explore the use of MESS to clean the WAVs before I TAP them but if it's time consuming it's not likely to happen.

Tez
 
Great job! I only saw this thread now and only wanted to add - you have to remember that the PET and the C64 use a slightly different timing, as the tape timing strongly depends on the CPU speed. Which is 1MHz for the PET and 0.9something for the C64.

From your description I read that TAP files should not be affected by this - otherwise they would also not be able to record turbotape tapes :) But tapclean might be

André
 
Yes, I didn't use tapclean in the end as there was no indication that it supported the PETS. Perhaps it was a good thing I didn't use it.

The TAPS up there seem ok, despite not being "cleaned". I checked them all in VICE before I uploaded.

Tez
 
Yea, I see the bandwith has been consumed already. It doesn't take long.

I might be able to help you out. I'll PM you.

Tez
 
Back
Top