Page 1 of 1

80 file format, 81 file format

Posted: Mon Jan 10, 2011 3:28 pm
by Thunor
Hi

Can somebody explain the apparently minor differences between 80 and O files and 81 and P files.

I can't find this information anywhere and it definitely needs writing up somewhere.

Regards,
Thunor

Re: 80 file format, 81 file format

Posted: Tue Jan 11, 2011 8:47 pm
by Oliver
AFAIK, both file formats consist of the raw byte stream as written on tape. So the differences should be the same as for the tape format:

- ZX81 files start with the file name, ZX80 files do not have a name included and just start with the data
- The memory offset for ZX81 files is 4009 hex, whereas the offset for ZX80 files is 400A hex
- The system variables that are always written with the files are different on both computer, therefore also the stored files

Here is a small software tool that I use to convert .O and .P files into .wav sound files so I can load them using the soundcard of my PC. It autodetects the file type.
zx_p2wav_v0_04.zip
File Convertor - convert .o and .p files to .wav files
(18.58 KiB) Downloaded 291 times
Greetings

Oliver

Re: 80 file format, 81 file format

Posted: Mon Oct 10, 2011 4:32 pm
by Thommy
I've found this not to be entirely accurate; of the files I have the .p/.81 files appear to be the data that would appear on a tape, with the filename missing. So, on a real ZX81 tape you'd see:
  • long pause
  • filename, with the high bit set on the final character
  • file data
  • short pause
On a .p/.81 file you see:
  • file data
Based on quick testing, just prefixing a 0x80 to the file data and outputting wrapped in pauses seems to be acceptable for the ZX81.

As stated above, ZX80 tape images appear to be a complete duplication of the data on a ZX80 tape. The ZX80 doesn't store filenames at all.

Re: 80 file format, 81 file format

Posted: Mon Oct 10, 2011 6:43 pm
by sirmorris
The ZX81 saves system variables from 0x4009 onward. The ZX80 saves all system variables from 0x4000 onward.

C