shred / tzxtools

Tools for processing TZX files
GNU General Public License v3.0
99 stars 25 forks source link

Issues converting from tape #7

Closed James-Cuadra closed 3 years ago

James-Cuadra commented 3 years ago

Hi,

This isn't a direct issue with the software but more a request for any advice/help to do with converting all my old Spectrum games to a .tzx format. I have tried recording the tapes using Audacity and an old radio/cassette player plugged into my microphone line of my pc and then using the tzxwav command to convert them. I am using ZXSpectrum 4 as my emulator to test the .tzx files and I haven't had any success, the furthest ive gotten is this: image Followed by incoherent beeps. I used the following command to achieve this: tzxwav -Thigh -lnone -p -o tape.tzx "Jet Set Bottom.wav" -v I have tried playing around with the -T and -l commands but I never get further than the aforementioned screen. As I used the -v command I get alot of console spam about CRC Errors. A few hundred lines similar to this Frame 8367326 - 8373721: 25 bytes of data, CRC ERROR! I have also tried using the tzxcat command to print the contents of each block as text. I get:

Warning: Block 1 has bad CRC GO TO CLEAR 25000FN a: PAPER 1: BORDER 1: CLS : FOR a=0 TO 12 STEP 2: BEEP .1}L TO TO TO ,a: NEXT a: PAPER 6: INK 0: PRINT AT 10,5;" ";AT 11,5;" JetSet Wi

jsw1 BRIGHT

Warning: Block 3 has bad CRC ▖▙

for the first three blocks. Any help would be appreciated as my ultimate goal is to translate the games I wrote as a young teen into .tzx format before the tapes stop working altogether.

Thanks, James

shred commented 3 years ago

All "bad CRC" warnings will eventually result in a Tape Loading Error on the Spectrum side, so you have to get rid of them. A remote diagnostics is difficult though, as there can be a lot of reasons for the CRC errors.

First of all, make sure that your WAV file has a sufficient quality. It should be stereo, have a sampling rate of at least 32000 Hz, and the level should be good (not too silent, but also no clipping). I also recommend not to apply any filters unless you really have an issue with disturbing noises (e.g. a loud mains hum).

From my experience, -Thigh -lnone are extreme settings that usually produce more rubbish than usable blocks. I would start with the default parameters, but maybe try -S left first. Both stereo channels are mixed by default. It often helps, but sometimes it just adds noise. With -S left only the left channel is used, which is usually the better channel if you had recorded the ZX Spectrum's mono sound with a stereo cassette recorder.

Now you should find the cause of the individual CRC errors. In many cases, a CRC error is detected because the block ends too early. The -v option shows the first and last frame of a block. So if you get a Frame 8367326 - 8373721: 25 bytes of data, CRC ERROR!, you can use Audacity and have a close look around frame 8373721. It should give you a clue why the block end was detected there. If there is a gap in the waveform, you can use Audacity to "paint" the waveform manually, and then retry.

I wrote a blog article about how the Spectrum saved its data. It might be helpful for identifying audio issues.

James-Cuadra commented 3 years ago

Hi, Thank you for your reply, following your suggestions I tried recording from multiple different cassette tape players and did not have any luck. After investigating further I established that my computer was automatically enhancing the audio inputs from the player and this was causing the volume to vary and the recordings to result in CRC errors. image This was where I found the setting, at the bottom of the advanced tab under Control Panel>Hardware and Sound>Sound>Recording>Properties. I hadn't seen this setting mentioned in any guides online and by asking friends I have also established that this setting is not available on all PCs, it may be specific to the motherboard, soundcard or microphone used. After disabling this setting I was able to record and convert all my games to .tzx files with the help of the tips you mentioned! Thank you for helping and maybe my experience will be useful to someone else.

shred commented 3 years ago

Closed because of inactivity. If you need further help, feel free to reopen.