Converting tapes to P/O/TZX (reliably)?

Any discussions related to the creation of new hardware or software for the ZX80 or ZX81
Post Reply
User avatar
TMD2003
Posts: 149
Joined: Sun Oct 11, 2020 5:39 pm

Converting tapes to P/O/TZX (reliably)?

Post by TMD2003 »

Spectrum40 saw me wave some cash in Simon Ulyett's face at the Cronosoft stand. Two of my purchases were, technically, for the Spectrum's grandad. I don't own a ZX80, but I do have a ZX81, and both ZX80 Pacman and ZX80 Kong have versions that will run on the "ZX80 with 8K ROM", i.e. the ZX81.

The tapes are fine, and I've made working WAV files of them, all of which will quite happily load into EightyOne via its WAV loader... at normal speed. Each one is two blocks, though - an initial loader with a bit of preparatory machine code followed by the main program, which is not unusual for the Spectrum but (as far as I know) almost unheard of on the ZX81 and ZX80. Hence, I'll probably have to convert them to TZX so that the two blocks are contained in one file.

EightyOne has an internal "save this block to TZX" feature on the WAV loader, and this has produced two working ZX81 TZX files. For the ZX80 WAVs, it's consistent, but consistently wrong - it'll stop converting before the end of each block, producing a file that looks right but which the emulated ZX80 can't read.

I've found a Java-based converter on ZX81Stuff, but that creates more problems than it solves, converting a working WAV into a TZX that's all over the place. The slightest imperfection in the signal, and it throws a screaming eppy-fit - not ideal when tapes are far from being paragons of perfection in the first place, even if they've only just been recorded. The resultant TZX looks like the tape has been put through a shredder.

Does anyone know of any reliable WAV-to-P-or-TZX converters for the ZX81 (and, consequently, the ZX80, because they should work the same way)?
Spectribution: Dr. Jim's Sinclair computing pages.
Features my own programs, modified type-ins, RZXs, character sets & UDGs, and QL type-ins... so far!
User avatar
XavSnap
Posts: 1940
Joined: Sat May 10, 2008 4:23 pm
Location: 'Zx81 France' Fb group.

Re: Converting tapes to P/O/TZX (reliably)?

Post by XavSnap »

'reliable' ... No.

My "ZxSpectape" can be used to repair analogs signals, but it mostly depends on the physical tape quality.

:oops:
Xavier ...on the Facebook groupe : "Zx81 France"(fr)
User avatar
mrtinb
Posts: 1906
Joined: Fri Nov 06, 2015 5:44 pm
Location: Denmark
Contact:

Re: Converting tapes to P/O/TZX (reliably)?

Post by mrtinb »

I have used the Java program on ZX81Stuff’s site to convert old tapes.

However it is not achieved just by the press of a button. It’s about recognizing the bit patterns, and applying them to the file, bit after bit.

It’s a long process, but rewarding when done.
Martin
https://zx.rtin.be
ZX81, Lambda 8300, Commodore 64, Mac G4 Cube
User avatar
TMD2003
Posts: 149
Joined: Sun Oct 11, 2020 5:39 pm

Re: Converting tapes to P/O/TZX (reliably)?

Post by TMD2003 »

Thing is, the bit patterns are so much more obvious on the ZX81/80 than on the Spectrum, that it's a wonder that any converter doesn't work first time, every time. If we think of a 0 as being represented by "V" and a 1 by "W" - because that's what it looks a bit like on screen, then the hex value 9A6D would look like:

W-V-V-W-W-V-W-V-V-W-W-V-W-W-V-W

All the Vs and Ws are distinct, and there are clear spaces between them. For the Spectrum equivalent, remove all the dashes and print them in a really narrow font, and then it's not so obvious. But for the ZX81/80 signal, there can be no confusion. And yet, I don't (usually!) have trouble with Spectrum TZX converters. There are more of those, admittedly, so if one fails I can try another. Also, the tape I bought of Rough Justice (a Spectrum game) had been sitting on a shelf, possibly since its initial release in 2003, and it had noticeably degraded. I put together a working WAV of that with all the blocks up to the end of the loading screen from one side of the tape, and the main Bytes block from the other side, and it only took a handful of attempts to make a perfect TZX. The tapes of ZX80 Kong and ZX80 Pacman are - not quite hot off the press, but weren't added to the Cronosoft roster until 2020 so the recordings are two years old at most, and it's a far clearer signal than Rough Justice is.

What ground my gears when looking at that Java program last night was that it would throw up errors at the slightest provocation, such as a tiny bit of noise at the falling edge of a bit. "Aaaaargh!" said the program. "Panic stations! I don't know if this is supposed to be 0 or 1!" when it's very, very obvious to me that it's 0 and that tiny bit of noise isn't an extra peak that would signal the start of a 1 that had been cut off too early. Any attempt I made to change the threshold for noise had no lasting effect as it would just recalculate - if it recalculated at all - with the noise threshold at the default value. And when I tried to change a bit specifically, it wouldn't overwrite all the signal - especially if it was 1, it'd leave a spare peak or two.

This may involve playing around with the volume levels - as the peaks it implants are all smaller than those on the recorded signal - and maybe the tape speed as well.

Or maybe - I'll set EightyOne to ZX81 mode with the ZX80 tape in, and see if that works. After all - and this is going to come as a shocking revelation - I've been experimenting with Commodore computers recently, and I've found that sometimes I need to make tape or disc files on one of their 8-bits and load it on another. The machines all have slightly different tape speeds but they seem to tolerate each other.

Failing that - I'll give XavSnap's program a shot and see if that works.
Spectribution: Dr. Jim's Sinclair computing pages.
Features my own programs, modified type-ins, RZXs, character sets & UDGs, and QL type-ins... so far!
Fruitcake
Posts: 346
Joined: Wed Sep 01, 2010 10:53 pm

Re: Converting tapes to P/O/TZX (reliably)?

Post by Fruitcake »

TMD2003 wrote: Mon May 02, 2022 1:43 am Spectrum40 saw me wave some cash in Simon Ulyett's face at the Cronosoft stand. Two of my purchases were, technically, for the Spectrum's grandad. I don't own a ZX80, but I do have a ZX81, and both ZX80 Pacman and ZX80 Kong have versions that will run on the "ZX80 with 8K ROM", i.e. the ZX81.
TMD2003 wrote: Mon May 02, 2022 1:43 am Hence, I'll probably have to convert them to TZX so that the two blocks are contained in one file.
Email Simon and as he has sold you the tapes he will send you ready made .p files of the tapes you purchased.
Moggy
Posts: 3231
Joined: Wed Jun 18, 2008 2:00 pm

Re: Converting tapes to P/O/TZX (reliably)?

Post by Moggy »

Am I the one only one missing the obvious answer here if all you want is the P files of said games?
Spinnetti
Posts: 253
Joined: Sat Sep 12, 2020 11:29 pm

Re: Converting tapes to P/O/TZX (reliably)?

Post by Spinnetti »

Moggy wrote: Mon May 02, 2022 5:16 pm Am I the one only one missing the obvious answer here if all you want is the P files of said games?
That was my question too lol
Zeddy: ZX80, ZX81/ZXpand, TS1000/ZXpand, TS1500/Zxpand+
Speccy: 48k, +, +2, +3, TS2068, "Bare Metal" Pi, Next KS2, IF1/Microdrives/Vdrive/Light Gun/VGA-Joy
QL: Minerva/QL-VGA/Custom PSU
C5: 24v, LiFE battery, Disc brakes
User avatar
Paul
Posts: 1511
Joined: Thu May 27, 2010 8:15 am
Location: Germanys west end

Re: Converting tapes to P/O/TZX (reliably)?

Post by Paul »

As cool as it may be to produce a tape and sell for ZX80 and or ZX81 in our modern times, a tape is useless to me and therefore a waste of resources just as the packaging and sending is.
I made several approaches to buy just the P&O files which was never offered to me.
The price is irrelevant to me, happy to pay more.
I just want the download, nothing else.
In theory, there is no difference between theory and practice. But, in practice, there is.
Post Reply