80 file format, 81 file format

Any discussions related to the creation of new hardware or software for the ZX80 or ZX81
Post Reply
User avatar
Thunor
Posts: 42
Joined: Sun Oct 11, 2009 11:37 am
Location: Anglia
Contact:

80 file format, 81 file format

Post 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
Oliver
Posts: 6
Joined: Sun Jan 03, 2010 12:00 am

Re: 80 file format, 81 file format

Post 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 175 times
Greetings

Oliver
Thommy
Posts: 52
Joined: Wed Sep 28, 2011 6:37 pm

Re: 80 file format, 81 file format

Post 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.
sirmorris
Posts: 2811
Joined: Thu May 08, 2008 5:45 pm

Re: 80 file format, 81 file format

Post by sirmorris »

The ZX81 saves system variables from 0x4009 onward. The ZX80 saves all system variables from 0x4000 onward.

C
Post Reply