TZX2WAV alternative...?

Y'know, other stuff, Sinclair related.
Post Reply
User avatar
TMD2003
Rick Dangerous
Posts: 2045
Joined: Fri Apr 10, 2020 9:23 am
Location: Airstrip One
Contact:

TZX2WAV alternative...?

Post by TMD2003 »

The time came to get off my arse and give Corona Capers a slight wash and brush up so that it'll work on any 128K Spectrum. It's because I have to make it into a real tape and send it to [mention]Lee Spoons[/mention] as part of the prize for making Most Crap game Of The Year (That Didn't Annoy Me Enough To Warrant A Demerit). And that should have been straightforward. I found a way to eliminate the requirement for RAM disc commands that are different on the ROM 4.0 and 4.1 models, remade the TZX, shoved it through TZX2WAV, loaded it into a +2B via a tape adapter (you know the one I mean, it has a head inside a cassette shell and a wire with a 3.5 mm jack plug hanging out...)

...what's this? R Tape loading error? I haven't even put it on a tape yet. The signal should be perfect. And it is.

The error is shown right at the end of the load for the Amazing End Sequence. And, typing GOTO 100 to carry on where the BASIC program loaded all the code necessary to show the screens, the end sequence works fine - it doesn't crash when the screens are displayed with the appropriate USR call (as they're all compressed screens made by BMP2SCR).

After it failed on the real +2B, I've run the WAV file through Fuse, seeing as it'll allow me to load WAVs as if they were TZXs. I get the same error at the same point - and I don't get it when I'm using the TZX on any emulator that I've tried. So the error is in the WAV itself.

I've tried Fuse in +2A and +2 mode, seeing as these are the two real models I could test it on.

So far, to get rid of the error, I've tried:
- outputting the signal at 24 kHz and 48 kHz (even 12 kHz is adequate, I find - multiples of 11025 Hz are not recommended);
- using the -128 switch and also leaving it out;
- reloading the TZX in Taper and adding a "Stop The Tape" at the end of the last block where the failure occurs;
- editing the WAV to add some extra black space at the end.

Every one of these has still resulted in the loading error that otherwise does not affect the program, but knowingly releasing something that has an error of this nature in it is not something I will consider acceptable, especially as it's part of the prize for a year-long competition, "Crap"ness be damned. I am not British Leyland. Up with this I will not put.

With all that in mind, what other PC programs (Windows or Linux, if necessary) could I try to get this WAV right?
Spectribution: Dr. Jim's Sinclair computing pages.
Features my own programs, modified type-ins, RZXs, character sets & UDGs, and QL type-ins... so far!
Mikie
Microbot
Posts: 122
Joined: Fri Jun 11, 2021 12:58 am
Location: Prague
Contact:

Re: TZX2WAV alternative...?

Post by Mikie »

Ahem, T..ir perhaps?
User avatar
lister_of_smeg
Microbot
Posts: 145
Joined: Thu Nov 16, 2017 1:44 pm

Re: TZX2WAV alternative...?

Post by lister_of_smeg »

Try adding a pause block with a non-zero length to the end of the TZX. It's possible TZX2WAV isn't closing off the final pulse, and adding a pause block would fix this.
User avatar
TMD2003
Rick Dangerous
Posts: 2045
Joined: Fri Apr 10, 2020 9:23 am
Location: Airstrip One
Contact:

Re: TZX2WAV alternative...?

Post by TMD2003 »

lister_of_smeg wrote: Mon Feb 14, 2022 8:54 pm Try adding a pause block with a non-zero length to the end of the TZX. It's possible TZX2WAV isn't closing off the final pulse, and adding a pause block would fix this.
I did try a "Pause/Stop" to be designated as "stop", but I've tried it again with a half-second pause and it made no difference.

I've been back to check the program to see if the start address and length matches what's in the listing, and it's as it should be, mainly because I never changed these two blocks over the original.

This week's Sesame Street has been brought to you by the letters W, T and F.
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
MatGubbins
Dynamite Dan
Posts: 1239
Joined: Mon Nov 13, 2017 11:45 am
Location: Kent, UK

Re: TZX2WAV alternative...?

Post by MatGubbins »

Save your game out as a TAP file instead
Test the file with another emulator, to make sure it load/works as it should.

Convert it with Tape2WAV (it produces a louder file than other converters), then by using your favourite sound editing software add an extra 2 seconds to the end of the WAV file, save it.
Test it by loading it into the emulator again (Spin 0.666 is fine)

Send it over to your Spectrum either by the PC sound output or bung the WAV file on to an old Nokia phone and load it from there.
Stu
Manic Miner
Posts: 243
Joined: Wed May 20, 2020 2:59 pm

Re: TZX2WAV alternative...?

Post by Stu »

tzxplay could be worth a go -- it's part of tzxtools.
User avatar
spider
Dynamite Dan
Posts: 1099
Joined: Wed May 01, 2019 10:59 am
Location: Derby, UK
Contact:

Re: TZX2WAV alternative...?

Post by spider »

Untested but...

Play the tape file in an emulator at normal speed. Put something like

LOAD "not this" , so it merely listens to all the tape

Connect a suitable recording device (tape recorder or electronic gadget) via the emulators device (PC/Laptop/Mac etc) audio out.

May not be loud enough but maybe worth a shot if nothing else!
User avatar
Lee P
Microbot
Posts: 157
Joined: Fri Jan 05, 2018 9:47 am
Location: The Warehouse
Contact:

Re: TZX2WAV alternative...?

Post by Lee P »

TMD2003 wrote: Mon Feb 14, 2022 5:47 pmEvery one of these has still resulted in the loading error that otherwise does not affect the program, but knowingly releasing something that has an error of this nature in it is not something I will consider acceptable, especially as it's part of the prize for a year-long competition, "Crap"ness be damned. I am not British Leyland. Up with this I will not put.
Ironically, I don't even own a tape deck, let alone a +2 or any form of Speccy, so the thing will probably be unplayed until I die and one of my kids tries to sell it as a L@@K R@RE game on whatever's replaced eBay in (hopefully) the mid-to-late 21st century.

But at least it will load properly. I believe in you, [mention]TMD2003[/mention]!
User avatar
Ast A. Moore
Rick Dangerous
Posts: 2641
Joined: Mon Nov 13, 2017 3:16 pm

Re: TZX2WAV alternative...?

Post by Ast A. Moore »

Yes, I’d give Tapir a try. It generates a waveform that is very close to what a real Spectrum would produce.
Every man should plant a tree, build a house, and write a ZX Spectrum game.

Author of A Yankee in Iraq, a 50 fps shoot-’em-up—the first game to utilize the floating bus on the +2A/+3,
and zasm Z80 Assembler syntax highlighter.
User avatar
TMD2003
Rick Dangerous
Posts: 2045
Joined: Fri Apr 10, 2020 9:23 am
Location: Airstrip One
Contact:

Re: TZX2WAV alternative...?

Post by TMD2003 »

Lee Spoons wrote: Sat Feb 19, 2022 6:59 pm Ironically, I don't even own a tape deck, let alone a +2 or any form of Speccy, so the thing will probably be unplayed until I die and one of my kids tries to sell it as a L@@K R@RE game on whatever's replaced eBay in (hopefully) the mid-to-late 21st century.

But at least it will load properly. I believe in you, @TMD2003!
And there I was about to ask you if you have a ZX81 and a wobbly RAM pack to test the ZX81 games on the end of each side of the tape...

...those will probably not work anyway, but the principle stands. After all, there are people who buy expensive wine and/or whisky just to look at, and invite their friends round to look at it while drinking a bottle of Chilean Merlot or base-model Glenfiddich.

One of these tapes will be the equivalent of Dom Perignon 1944, the other will be 100-year-old Macallan. Except... not. The contents will be more like Blue Nun and Banjo Pickin' Willie's Old Tyme Nebraska Bourbon.
Spectribution: Dr. Jim's Sinclair computing pages.
Features my own programs, modified type-ins, RZXs, character sets & UDGs, and QL type-ins... so far!
Post Reply