Description of the Pasopeia D88 floppy image format, based on a single implementation, being the double sided, double density, 40 track, 16 sectors per track, 256 byte sector geometry used by the Epson QX-10 computer and TF-20 Floppy Terminal (HX-20, PX-4, PX-8).
The Pasopeia D88 format is a simple floppy image format for various soft-sectored floppy disks. It is uncompressed, making it easy to read and write data from the image. It is a logical image, so interleaving and sector gap size is not preserved. So floppies with some sort of copy protection are probably not supported.
Example breakdown (tracks and heads start at 0, sectors start at 1):
0000:0000 - 0000:02AF Header consisting of: 0000:0000 - 0000:0011 Image name 0000:0012 - 0000:001B rsvr (reserved?) 0000:001C - 0000:001D protect & type 0000:001E - 0000:0021 size 0000:0022 - 0000:02AF Track index locator 0000:02B0 - 0000:02BF First sector header; 00 00 01 01 10 00 00 00 00 00 00 00 00 00 00 01 0000:02C0 - 0000:03BF First sector 0000:03C0 - 0000:03CF Second sector header; 00 00 02 01 10 00 00 00 00 00 00 00 00 00 00 01 0000:03D0 - 0000:04CF Second sector ... ... 0005:51A0 - 0005:51AF Last sector header: 27 01 10 01 01 00 00 00 00 00 00 00 00 00 00 01 0005:5200 - 0005:52AF Last sector
Sector header bytes:
0 | track (c) |
1 | side (h) |
2 | sector (r) |
3 | sector size (n), (0=128 bytes, 1=256 bytes, 2=512 bytes, 3=1024 bytes) |
4-5 | nsec (number of sectors in this track) |
6 | dens (density; 0=double density, 1=high density, ?=single density) |
7 | del (?) |
8 | stat (?) |
9-D | rsrv (reserved?) |
E-F | size (little endian) |
The info comes from the t2d.cpp source files which converts one particular type of TeleDisk image to an D88 equivalent. The file can be found in http://homepage3.nifty.com/takeda-toshiya/common/source.zip.
The format is globally defined in two structs. The header contains a 17 byte free text title, some status bytes, a 32-bit size int and a track location index, pointing to track start locations in the image.
The track header is actually a sector header containing bytes for cylinder (c), head (h), sector (r) and sector size (n). Sector size is 0=128 bytes, 1=256 bytes, 2=512 bytes, 3=1024 bytes. The actual size is also defined in the 16 bit 'size' field. Other fields include density (0=double density, 1=high density, ?=single density)
// header struct d88hdr_t { char title[17]; BYTE rsrv[9]; BYTE protect; BYTE type; DWORD size; DWORD trkptr[164]; }; // track header struct d88sct_t { BYTE c, h, r, n; WORD nsec; BYTE dens, del, stat; BYTE rsrv[5]; WORD size; };
For not Visual C++ users, byte maps to char, WORD to short, DWORD to int, at least for a modern 32-bit system.
Latest update: 2013-01-06