I have some troublesome with few TAP files saved in my PC hard drive, downloaded from different sources (WOS and Spectrum Computing, mostly): they can't be loaded with well-known Jonathan Needle's emulator, giving me the same error message: "Spectaculator cannot open ‘program name' (not working on Spectaculator). The file is not valid or is corrupt."
However, if using other emulators I have on my PC as ZX Spin 0.7s, ZesarUX 10.1 or Retro Virtual Machine, load perfectly in each one of them.
I thought to manage/edit them with ZX Block Editor tool by Klaus Jahn (having installed 2.2.1 and 2.4.3.1 versions), but strangely they can't be used with it. If trying to load one of these TAP files, same message prompts in every case: "Invalid block length!".
As Spectaculator 8 is the program I mostly use nowadays, I was wondering if there is a chance to redo or restore these apparently-not-working TAPs easily.
On the other hand, I found somehow a way to restore contents of those TAP files by creating new ones, converting them into WAV and then transfer audio files into new TAPs. Using following PC Windows/MS-DOS utils: Tape2WAV by Mark Woodmass first and WAV2TZX v0.6 (Tomaz Kac, & Martin V.d. Heide, updated by M. A. Rodriguez Jodar), next. For example, "Temperament" simulator by Martin Stepaneck (existing TAP can't be loaded with Spectaculator). After transfering all blocks into a new TAP this way, I tested it and works fine as with Spectaculator as with any other ZX Spectrum emulator.
Here you have:
TEMPERAMENT (New TAP)
Restoring or renewing TAPs unloadable with Spectaculator 8
Moderator: pavero
- Neil Parsons
- Manic Miner
- Posts: 390
- Joined: Thu Nov 23, 2017 6:19 pm
Re: Restoring or renewing TAPs unloadable with Spectaculator 8
The issue is (I first wondered on reading your topic if it was the emulator) the .tap file itself.
It fails for me too in Spectaculator and in Fuse and Zero (the latter are probably well out of date on my install)
It does load in ZXSpin however. The others complain about insufficient buffer data and ZXBE complains about it being invalid. Interestingly Tapir does display it but issues a warning about corruption.
Finally, ZXSpin crashed at the end of loading said example file (Temperament.tap)
It fails for me too in Spectaculator and in Fuse and Zero (the latter are probably well out of date on my install)
It does load in ZXSpin however. The others complain about insufficient buffer data and ZXBE complains about it being invalid. Interestingly Tapir does display it but issues a warning about corruption.
Finally, ZXSpin crashed at the end of loading said example file (Temperament.tap)
Re: Restoring or renewing TAPs unloadable with Spectaculator 8
I took a look at the existing TAP file and, indeed, the final block has a misreported length:
So either there is missing data, or that last block shouldn't be there at all. Since it LOADs and runs OK with the last block missing, it seems the latter is true:
Code: Select all
$ tapinfo.py TEMPERMT.TAP
1:
Type: Header block
Program: TEMPERAM
LINE: 10
Length: 19
Data: 0, 0, 84, 69, 77, 80, 69 ... 203, 0, 10, 0, 203, 0, 29
...
6:
Type: Unknown
Length: 124
Data: 120, 0, 10, 4, 62, 8, 24 ... 40, 40, 104, 104, 120, 0, 145
WARNING: Missing 1980 data byte(s) at end of file
Code: Select all
$ tap2sna.py --tape-stop 6 TEMPERMT.TAP
Program: TEMPERAM
Fast loading data block: 23755,203
Fast loading data block: 16384,22088
Bytes:
Fast loading data block: 57075,8461
Tape finished
Simulation stopped (PC in RAM): PC=64075
Writing TEMPERMT.z80
$ fuse TEMPERMT.z80 # This works
- Neil Parsons
- Manic Miner
- Posts: 390
- Joined: Thu Nov 23, 2017 6:19 pm
Re: Restoring or renewing TAPs unloadable with Spectaculator 8
I see. If that last block has nothing to do with the rest of game code, it can be removed.SkoolKid wrote: ↑Thu Nov 30, 2023 11:57 am I took a look at the existing TAP file and, indeed, the final block has a misreported length:
---
Code: Select all
$ tap2sna.py --tape-stop 6 TEMPERMT.TAP Program: TEMPERAM Fast loading data block: 23755,203 Fast loading data block: 16384,22088 Bytes: Fast loading data block: 57075,8461 Tape finished Simulation stopped (PC in RAM): PC=64075 Writing TEMPERMT.z80 $ fuse TEMPERMT.z80 # This works
Done!
TEMPERAMENT.TAP New file