ZX80 convert .o to .wav

Any discussions related to the creation of new hardware or software for the ZX80 or ZX81
neazoi
Posts: 51
Joined: Sun Feb 20, 2011 1:59 am

ZX80 convert .o to .wav

Post by neazoi »

Hello, this is my first post,
I have found this website
http://www.fruitcake.plus.com/Sinclair/ ... vaders.htm
Which has three games in .o files

I have started a new zx80 project here http://microwave.gr/giannopk/zxcomputer/sinclair.htm and I wish to investigate the zx80 wave files pulses for further development, so I need a .o to .wav converter in order to listen to these audio tones and also to write them on a tape.

The eightyone emulator does not seem to do the job. Remember I am talking about the zx-80 not the zx-81. The tape archives between these are incompatible.
User avatar
BrunoFlorindo
Posts: 290
Joined: Sat May 10, 2008 2:46 am
Location: Anaheim, CA, USA

Re: ZX80 convert .o to .wav

Post by BrunoFlorindo »

I've done that same research just a few months ago. This is a quote of a previous conversation between me and Paul Farrow:
> Is there a way to convert a .O file to WAV?

I don't know of one but if there is a method for converting .P files can it should also work for .O files, which leads onto your next question....


> How different is the ZX80 tape format in comparison to the ZX81? Rather than knowing the technical bits (I wouldn't be able to understand) I'm curious as to how it would sound like on a real tape.

The format is identical to the ZX81 - same format, same data rate. The only difference is the actual data and the lack of a file name. So if you listened to a ZX80 tape it would be indistinguishable from a ZX81 tape to the ear.


> If I wanted to transfer your flick-free games back to tape, is there a way to do it?

It can be done (I know because I have done it) but I found it far from easy. There may be tried and tested methods for transferring ZX81 programs which should therefore work just as well, but I don't know what other people use.

The method I used for ZX80 Pacman was to hook my PC to a cassette recorder and record the sound output by the EightyOne emulator when running the SAVE command. However, this proved very unreliable, often taking days of attempts to load the program from the cassette. Pacman went through 3 versions and each time I had the pain of trying to transfer it. The sound saved on cassette is very similar to that from a real machine but somehow sufficiently different to make loading tricky. So when creating ZX80 Kong I wanted a more reliable method and so decided to use our old friend - RS232. Unfortunately this meant constructing an RS232 interface and writing the control software for it. Although this took a couple of weeks to construct, once working it proved very reliable and would transfer a 16K game in about 20 seconds at 9600 baud. I extended the control software to allow send programs to the PC.

I don't have the time to test it now, but there might be a way to use EightyOne or another emulator to save the ZX80 tape output to a .WAV file without losing any quality. I have a few ideas on how to do it.
sirmorris
Posts: 2811
Joined: Thu May 08, 2008 5:45 pm

Re: ZX80 convert .o to .wav

Post by sirmorris »

I wrote a program to transfer P files to WAV, I guess I could modify it to drop the filename header.

C
User avatar
zx81jens
Posts: 201
Joined: Sat May 10, 2008 8:26 am
Location: a Basement in Nienburg / Germany

Re: ZX80 convert .o to .wav

Post by zx81jens »

Hi Users!

Olli from the german ZX-TEAM wrote a fine piece of software for Windows (zxp2wav). You can download it in the german Forum:

http://forum.tlienhard.com/phpBB3/viewt ... =398#p2123

Greetings
Jens
eyerything will be okay in the end.
if it´s not okay, it´s not the end.

and: uıɐbɐ ʎɐqǝ uo pɹɐoqʎǝʞ ɐ ʎnq ɹǝʌǝ ɹǝʌǝu ןןıʍ ı
RWAP
Posts: 1348
Joined: Thu May 08, 2008 8:42 am
Location: Stoke-on-Trent, UK
Contact:

Re: ZX80 convert .o to .wav

Post by RWAP »

sirmorris wrote:I wrote a program to transfer P files to WAV, I guess I could modify it to drop the filename header.

C
Now Charlie, there is surely a better way of doing this (wink, wink)
User avatar
BrunoFlorindo
Posts: 290
Joined: Sat May 10, 2008 2:46 am
Location: Anaheim, CA, USA

Re: ZX80 convert .o to .wav

Post by BrunoFlorindo »

sirmorris wrote:I wrote a program to transfer P files to WAV, I guess I could modify it to drop the filename header.

C
Please do! You will be remembered for what you did. :)
sirmorris
Posts: 2811
Joined: Thu May 08, 2008 5:45 pm

Re: ZX80 convert .o to .wav

Post by sirmorris »

[** EDIT ** - sorry - I've made myself into a time-traveller and vandalised the thread. Rich's upcoming post will make NO SENSE unless I explain that I linked to a (now) non-existent file in my original post and asked if there was a backup. I then accidentally removed the original content while I was editing.]


Here's my attempt:
PnO2Wav.zip
P and O file to WAV
(12.34 KiB) Downloaded 539 times
I've simply removed the code which adds the filename to the data stream when .O or .80 files are dropped.

Can someone please let me know if it works?

It generates a 44k/16bit/stereo WAV, so it'll burn straight to a CD if required.

*** BEWARE *** The file is LOUD. DO NOT LISTEN WITH YOUR EARS!
Last edited by sirmorris on Thu Feb 24, 2011 6:37 pm, edited 2 times in total.
RWAP
Posts: 1348
Joined: Thu May 08, 2008 8:42 am
Location: Stoke-on-Trent, UK
Contact:

Re: ZX80 convert .o to .wav

Post by RWAP »

I have restored all of the backups I could find - so unfortunately this one has gone missing.

I have emailed Oliver who posted the original to see if he can re-upload it.

In the meantime, I have found the version from the German forums and re-added that to the original post.
sirmorris
Posts: 2811
Joined: Thu May 08, 2008 5:45 pm

Re: ZX80 convert .o to .wav

Post by sirmorris »

Aha!

Thanks Rich.

Sorry for any confusion :roll:
Oliver
Posts: 7
Joined: Sun Jan 03, 2010 12:00 am

Re: ZX80 convert .o to .wav

Post by Oliver »

Here is the tool that should auto-detect ZX81 and ZX80 files (.p/.o/.80 etc) and convert to a sound file:
zx_p2wav_v0_04.zip
File converter with C language sources
(18.58 KiB) Downloaded 691 times
Post Reply