Open source utility to perform WAV->P conversion for ZX81
Posted: Tue Aug 06, 2013 12:28 pm
Hi all!
My name is Miguel Angel. I'm also known as mcleod_ideafix at WOS and other forums. I've found this forum while in search for ZX81 demos.
Some time ago, I was lent a ZX81 program that its owner had from the 80's and I wanted to preserve it. I recorded the sound at my office and went home with a huge WAV.
Later, I tried to use any program that could convert the information stored in the WAV to a .P file. I found two:
- One of them is JAVA ZX81 Tape Converter. Last updated 2007. Not even capable of loading the WAV's I provided. It raises an I/O exception about something wrong with mark/space (??). I tried with both WAV's and AIFF's files, which this converter claims to support but no luck. Already have the last version of the JRE.
- The other one is from Stephen McDonald, and belongs to a group of MS-DOS programs named Steven McDonald's ZX81<=>PC Converters [Version 3.0], last updated in 1999. I can actually get the audio read with it, after converting it to 22050Hz, 8 bits, but the conversion is very slow and the resulting .P is wrong.
- Besides, I tried to load the WAV with the Wave Loader option of EightyOne, but after the loading, the emulator (not the emulated machine) hung.
So, as neither of these two utilities had the source code available for me to fix them, and as they seem to be abandonware, I decided that, if I want to preserve this ZX81 program, I would have to read by my own devices. I found a very valuable piece of information in a plain text file from Martin Korth (No$Cash) that really helped me on interpreting what's in the audio signal, and later on, interpret the contents of the .P file to give a BASIC listing of the saved program, contents of screen, etc.
Details about the preserved program (basically, a spanish release of ZXAS and ZXDB) are here: http://foro.speccy.org/viewtopic.php?f=11&t=3261
About the converter program:
The last version is available at the following address:
http://www.zxprojects.com/images/storie ... 1putil.zip
As of version 1.0.3, zx81putil can perform the following operations:
- Read a sound file, WAV format, with the loading noise of a ZX81 program and convert it (with a litte luck) to a .P file (I'm preparing a Youtube video showing how this utility can help you to restore damaged recordings)
- Read a .P file and converting it back to a nice and clean WAV file for further reproduction.
- Read a .P file and convert it to a TZX 1.20 compliant file that can be played with any external utility (such as some players available for smartphones).
- Play out loud a .P file to load it directly from your PC to the ZX81, without intermediate WAV conversion.
Please, check the README file for details on how to use the program. There are some advanced options present but not yet well documented.
Win32 executable included. Source code is included. You should be able to compile on Linux or OSX without any fuss. If you want support for direct playing of .P files in your executable, make sure you have the SDL devel package and include this when compiling: -DSUPPORT_PLAY_CMD
My name is Miguel Angel. I'm also known as mcleod_ideafix at WOS and other forums. I've found this forum while in search for ZX81 demos.
Some time ago, I was lent a ZX81 program that its owner had from the 80's and I wanted to preserve it. I recorded the sound at my office and went home with a huge WAV.
Later, I tried to use any program that could convert the information stored in the WAV to a .P file. I found two:
- One of them is JAVA ZX81 Tape Converter. Last updated 2007. Not even capable of loading the WAV's I provided. It raises an I/O exception about something wrong with mark/space (??). I tried with both WAV's and AIFF's files, which this converter claims to support but no luck. Already have the last version of the JRE.
- The other one is from Stephen McDonald, and belongs to a group of MS-DOS programs named Steven McDonald's ZX81<=>PC Converters [Version 3.0], last updated in 1999. I can actually get the audio read with it, after converting it to 22050Hz, 8 bits, but the conversion is very slow and the resulting .P is wrong.
- Besides, I tried to load the WAV with the Wave Loader option of EightyOne, but after the loading, the emulator (not the emulated machine) hung.
So, as neither of these two utilities had the source code available for me to fix them, and as they seem to be abandonware, I decided that, if I want to preserve this ZX81 program, I would have to read by my own devices. I found a very valuable piece of information in a plain text file from Martin Korth (No$Cash) that really helped me on interpreting what's in the audio signal, and later on, interpret the contents of the .P file to give a BASIC listing of the saved program, contents of screen, etc.
Details about the preserved program (basically, a spanish release of ZXAS and ZXDB) are here: http://foro.speccy.org/viewtopic.php?f=11&t=3261
About the converter program:
The last version is available at the following address:
http://www.zxprojects.com/images/storie ... 1putil.zip
As of version 1.0.3, zx81putil can perform the following operations:
- Read a sound file, WAV format, with the loading noise of a ZX81 program and convert it (with a litte luck) to a .P file (I'm preparing a Youtube video showing how this utility can help you to restore damaged recordings)
- Read a .P file and converting it back to a nice and clean WAV file for further reproduction.
- Read a .P file and convert it to a TZX 1.20 compliant file that can be played with any external utility (such as some players available for smartphones).
- Play out loud a .P file to load it directly from your PC to the ZX81, without intermediate WAV conversion.
Please, check the README file for details on how to use the program. There are some advanced options present but not yet well documented.
Win32 executable included. Source code is included. You should be able to compile on Linux or OSX without any fuss. If you want support for direct playing of .P files in your executable, make sure you have the SDL devel package and include this when compiling: -DSUPPORT_PLAY_CMD