The IDEDOS means extra facilities of the +3e operating system,
+ written by Garry Lancaster. For more details please consult his
+ page at http://www.zxplus3e.plus.com/.
+
+
In ZXVGS and CPM22QED is implemented the IDEDOS partition table
+ (also called IDEDOS system partition).
+
+
Searching for IDEDOS structures:
+
+
Read the sector 1 on cylinder 0 and head 0.
+
If sector length is 512B (full IDE), go to 5.
+
(Simple IDE - sector length is 256B.) If "PLUSIDEDOS" signature found, go to 10.
+
Don't mount the disk at all.
+
If "PLUSIDEDOS" signature found, go to 10.
+
If "P?L?U?S?I?D?E?D?O?S" signature found, switch disk
+ access to 8-bit and go to 10.
+
Read the sector 1 on cylinder 0 and head 1.
+
If "PLUSIDEDOS" signature found, go to 10.
+
Don't mount the disk. (Or try to analyse MS-DOS
+ partition tables.)
+
Analyse IDEDOS partition table.
+
+
+
+
The 64 bytes partition entry
+
Offset
Length
Description
+
+0
16
Partition name (case-insensitive, space-padded).
+
+16
16
Partition definition.
+
+
+16
1
Partition type (0=free handle)
+
+17
2
Starting cylinder.
+
+19
1
Starting head.
+
+20
2
Ending cylinder.
+
+22
1
Ending head.
+
+23
4
Largest logical sector number.
+
+27
5
Type-specific information.
+
+32
32
Type-specific information.
+
+
+
+
+
Partition types
+
+
Partition type number
+
Description
+
+
#00
+
Unused partition/free handle.
+
+
#01
+
System partition. The first partition on a disk, starting at phisical
+ sector 1 (cylinder 0, head 0 or 1), is always the system partition and
+ contains a list of 64-byte
+ partition entries that define all the partitions on the disk (including
+ the system one). Only one partition of this type is
+ permitted on a disk, and this is always the first partition. The name
+ is always "PLUSIDEDOS" (followed by 6 spaces).
+
+
#02
+
Swap partition.
+
+
#03
+
+3DOS partition. The maximum theoretical size for a +3DOS
+ partition is just under 32Mb. The XDPB has logical geometry.
+
+
#04
+
CP/M partition with XDPB that reflects phisical
+disk structure. So if the disk has 17 spt, the LSPT is
+68. The partition uses always integer number of
+cylinders and uses whole cylinder (from head 0).
+Otherwise (when from not track 0) this is converted to
+reserved tracks (OFF in XDPB). This is required for my
+DSKHNDLR low level disk drivers.
+
+
#05
+
Boot partition. This is only one file, stored
+as a partition. Used to boot a hardware. Eg. Timex FDD 3000
+extedend with YABUS.TF, will search the IDEDOS partiton
+table to find "YABUS.TF" partition. If found, the partition
+contents is loaded into RAM and started. The partition size
+is usually 8k to 64kB, what gives 1..2 tracks (or 1..8 track
+for disks with 17 spt). The number of sectors to load is in
+partition definition.
+
+
#10
+
MS-DOS (FAT16) partition.
+
+
#20
+
UZI(X) partition.
+
+
#30
+
TR-DOS diskimage partition. Usually 640kB. Sector offset.
+
MB-02 diskimage partition. Usually 1804kB. Sector offset.
+
+
#FE
+
Bad disk space.
+
+
#FF
+
Free disk space.
+
+
+
Example partitions data
+
+
The disk is Seagate ST351A/X and its structure is 980/5/17 (not the
+reported in manual 820/6/17).
+
First track is reserved to allow MBR and MS-DOS partitions table in
+0/0/1 sector. The MS-DOS (and other) partitions can start at cylinder
+198 as IDEDOS structure ends at cylinder 197 inclusive. IDEDOS structure
+could also take whole disk and contain MS-DOS partition inside.
+
IDEDOS structure starts at sector 0/1/1, so 1 * 17 * 512 = 8704 = #2200
+bytes are skpipped.
+
IDEDOS system partition (type #01 - area that describes other partitions).
+Starts at cylinder 0 head 1 and ends at the same one.
+Partition size is 11 sectors (#00000010).
+At #02220 disk parameters are defined: 198 cylinders (#0C6, two bytes),
+5 heads (one byte), 17 sectors per track (#11, one byte), sectors
+per cylinder is calculated to 85 (#0055, two bytes). Up to 136
+partitions can be defined (#0087 is last number = 1 * 17 * 512 / 64 - 1, two
+bytes). Area behind from cylinder 198 is reserved for other systems
+(e.g. MS-DOS) and not available as IDEDOS partitions.
+
+
Main CP/M partition (type #04). Starts at cylinder 2 head 0
+and ends at cylinder 197 (#00C5) head 4 inclusive. At #02260 XDPB
+is provided. Partition has 16660 sectors (#00004113).
+
+
Boot file (type #05) dedicated for the PL3MEM interface.
+Starts at cylinder 1 head 3 and ends at cylinder 1 head 4.
+File size is 32 sectors (#0000001F) - last two are unused.
+
+