8bit Projects For Everyone


Find   for  

IDEDOS - the access to harddisks

The IDEDOS means extra facilities of the +3e operating system, written by Garry Lancaster. For more details about +3e please consult his page at http://www.zxplus3e.plus.com/.

In ZXVGS and CPM22QED the IDEDOS partition table (also called IDEDOS system partition) is implemented.

Why IDEDOS partitionning is the best for 8bit computers?

  • Is simple but not so primitive like MS-DOS one and less complicated than Amiga OS one.
  • Informations about all partitions is in one place, not spread over the disk like MS-DOS one.
  • Floppy diskimages (TR-DOS, MB-02, +D, Sam) can be easy defined, also with information of its (virtual) phisical structure.
  • Each partition must have a name, up to 16 charaters long.
  • Extra parameters can be assigned to partition. For example, CP/M partitions (also CP/M floppy diskimages) can have XDPB table.
  • System files can be stored as partitions. Wide range of computers can be booted from one disk, as every hardware uses different name of boot file.
  • For big files, e.g. movies made form series of screenshoots (see BMP2SCR) unfagmented areas (partitions) can be allocated.
  • Up to 65535 partitions can be defined.
  • Other partition types can be added in future.
  • CHS adressing is suitable for older disks.

Technical details

Each partition definition takes 64 bytes. The first entry defines system partition. Partitions are defined in whole tracks - from cylinder/head to cylinder/head. There's no support for LBA - default geometry is always used.

For the diskimage type partitions (type #30..#3F), virtual geometry is defined. Area allocated for diskimage can be rounded up to track boundary or the last track can be shared with next diskimage partrion. When partitions overlap on same track, the latter one must have sector shift defined. For example for 980/5/17 disk, a 800kB partition takes 1600 sectors = 18 cylinders + 4 tracks + 2 sectors, so the shift for next partition is 2, otherwise the last 15 sectors can be unused.

The 64 bytes partition entry
OffsetLengthDescription
+016Partition name (case-insensitive, space-padded).
+1616Partition definition.

+161Partition type (0=free handle)
+172Starting cylinder.
+191Starting head.
+202Ending cylinder.
+221Ending head.
+234Largest logical sector number.
+275Type-specific information.

+271Shift from sector 1 of partition start (0 for no shift).
+281Virtual sector size (0-128B, 1-256B, 2-512B, 3-1kB).
+291Virtual first sector number (0..240).
+301Virtual heads (1, 2, more?).
+311Virtual sectors (usually 5, 8, 9, 16, 18).
+3232Type-specific information. For example XDPB, movie format.

Partition types
Partition
type
number
Description
#00Unused partition/free handle.
#01System 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).
#02Swap partition.
#03+3DOS partition. The maximum theoretical size for a +3DOS partition is just under 32MB. The XDPB has logical geometry.
#04CP/M partition with XDPB that reflects phisical disk structure. So if the disk has 17 sectors per track, 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 DSKHNDLR low level disk drivers.
#05Boot 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.
#0FMovie partition. A sequence of screenshoots and optional sound track.
#10MS-DOS (FAT16) partition.
#20UZI(X) partition.
#3xNon-CP/M diskimages, ZX Spectrum.
#30TR-DOS diskimage. Usual geometry 80/2/16, 640kB.
#31+D/SAMDOS diskimage (B-DOS record)*. Geometry 80/2/10, 800kB.
#32MB-02 diskimage. Usual goeometry 82/2/11, 1804kB.
#FEBad disk space.
#33TOS A.2 diskimage. Usual goeometry 40/1/16, 160kB or 80/2/16, 640kB.
#4xCP/M diskimages. Partition type describes computer that uses CP/M format for non-CP/M purposes.
#40ZX Spectrum +3 diskimages.
#41Elwro 800 Junior diskimages.
#48Amstrad CPC diskimages.
#49Amstrad PCW diskimages.
#FEBad disk space.
#FFFree disk space.
*Caution! SAMDOS diskimage can have swapped L/H bytes due to compatibility with Atom interface.

Searching for IDEDOS structures:

  1. Read the sector 1 on cylinder 0 and head 0.
  2. If sector length is 512B (full IDE), go to 5.
  3. (Simple IDE - sector length is 256B.) If PLUSIDEDOS signature found, go to 10.
  4. Don't mount the disk at all.
  5. If PLUSIDEDOS signature found, go to 10.
  6. If P?L?U?S?I?D?E?D?O?S signature found, switch disk access to 8-bit and go to 10.
  7. Read the sector 1 on cylinder 0 and head 1.
  8. If PLUSIDEDOS signature found, go to 10.
  9. Don't mount the disk. (Or try to analyse MS-DOS partition tables.)
  10. Analyse IDEDOS partition table.

MBR - MS-DOS partition table

It is recomended to place IDEDOS partition as first on the disk. If you would like to have also a FAT (FAT-16) partion, place it as second. To prevent overwriting, define the IDEDOS partition as CP/M one (type #DB in MS-DOS partition table).

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.

02200  50 4C 55 53  49 44 45 44  4F 53 20 20  20 20 20 20   PLUSIDEDOS
02210  01 00 00 01  00 00 01 10  00 00 00 00  00 00 00 00   ................ 
02220  C6 00 05 11  55 00 87 00  02 00 00 00  00 00 00 00   O...U........... 
02230  00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00   ................ 
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 17 sectors (#00000010). At #02220 disk parameters are defined: 198 cylinders (#00C6, 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 from cylinder 198 and behind is reserved for other systems (e.g. MS-DOS) and not available as IDEDOS partitions.
02240  5A 58 56 47  53 20 20 20  20 20 20 20  20 20 20 20   ZXVGS
02250  04 02 00 00  C5 00 04 13  41 00 00 00  00 00 00 00   ....L...A....... 
02260  44 00 04 0F  00 44 10 FF  03 FF FF 00  00 00 00 02   D....D.˙.˙˙..... 
02270  03 04 C4 11  01 00 02 00  00 A1 FF 00  00 00 00 00   ..A.......˙..... 
Main CP/M partition (type #04). Starts at cylinder 2 head 0 and ends at cylinder 197 (#00C5) head 4 inclusive. Partition has 16660 sectors (#00004113). At #02260 XDPB is provided (#A1 at #02279 is the unit code for HDD partition).
02280  50 4C 33 4D  45 4D 2E 53  59 53 20 20  20 20 20 20   PL3MEM.SYS
02290  05 01 00 03  01 00 04 1F  00 00 00 00  00 00 00 00   ................
022A0  00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00   ................
022B0  00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00   ................
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.
022C0  46 52 45 45  20 20 20 20  20 20 20 20  20 20 20 20   FREE
022D0  FF 00 00 02  01 00 02 65  00 00 00 00  00 00 00 00   .......e........ 
022E0  00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00   ................ 
022F0  00 00 00 00  00 00 00 00  00 00 00 00  00 00 00 00   ................ 
Some free space (type #FF). Starts at cylinder 0 head 2 and ends at cylinder 1 head 2 inclusive. Has 102 sectors (#00000065). Can be used later to place more boot files.

Tell other people:

Links to other pages



E-mail:

Password:



Forgot password?

Register?
CP/M
CPM22QED
CPC
FutureOS
ParaDOS
SymbOS
CPM22QED
MB02
SAM Coupé
Spectravideo
Timex 2068
Timex FDD
YABUS.TF(3)
Filesystem
IDEDOS
Memdisk
MGT
BDOS
Master DOS
Timex
TOS A.2
TOS A.4
ZX Spectrum
Doors
ResiDOS
ZXVGS
ZXVGS
FlashD0
MB02
PL3MEM
Pentagon
TI-of-TTL
Unipolbrit
Warajevo
ZXATASP

If you see error on this page, describe here:

© 2009-12-28 21:50 Jarek Adamski, http://8bit.yarek.pl