Get Four DVDs for $.49 each. Join now. Tell me when this page is updated

Spectrum floppy file format structure - Pera Putnik (PP) format


Used floppies are standard 3.5 inch double density (720K) diskettes. Sides are threated separated, because of mechanical switch. 10 sector/track is used, so total capacity per side is 400 KB.

It is divided as follows:

0 Pointer to first free sector. Contains only 2 bytes - initial it is 10
1-9 Catalog of files on side. Each file record contains 32 bytes,
so there is place for 9x16=144 files per disk side
10-799 Data area. Here are placed files in order as they been recorded

Minimum used length is 1 sector - 512 bytes. File from 7 bytes uses 1 sector, from 513 bytes 2 sectors etc. No fragmentation... But only last file can be deleted.

File record structure:

0 Type. 0=Basic, 3=Code . Arrays are not supported
1-15 Name. Max length is 15 char. Lower case not equ. to capital (like in Unix)
16-17 Lenght of file in bytes
18-19 Begin address for code, Autostart line for Basic
20-21 Lenght of Basic program without variables
22-23 Start sector on disk side (logical)
24 Lenght in sectors (or used sectors count) for file - byte (Max len 96 sect=48KB)
25-26 Stack pointer - for snapshot
27-31 Not used, should be zero

As you may see, first 22 byte is similar to standard Spectrum tape header, except that name lenght is enlarged to 15 chars.
Additional entries are for file position on disk & snapshot.

Pera Putnik surface@ptt.yu