From f205a42587d97ddd8528f9a622e2d9473d0884e4 Mon Sep 17 00:00:00 2001 From: Keir Fraser Date: Fri, 6 Sep 2024 16:17:41 +0100 Subject: [PATCH] Split standard diskdefs into files by prefix --- src/greaseweazle/codec/codec.py | 22 +- src/greaseweazle/data/diskdefs.cfg | 1341 +----------------- src/greaseweazle/data/diskdefs_acorn.cfg | 117 ++ src/greaseweazle/data/diskdefs_akai.cfg | 27 + src/greaseweazle/data/diskdefs_amiga.cfg | 17 + src/greaseweazle/data/diskdefs_apple2.cfg | 31 + src/greaseweazle/data/diskdefs_atari.cfg | 16 + src/greaseweazle/data/diskdefs_atarist.cfg | 76 + src/greaseweazle/data/diskdefs_coco.cfg | 98 ++ src/greaseweazle/data/diskdefs_commodore.cfg | 127 ++ src/greaseweazle/data/diskdefs_dec.cfg | 25 + src/greaseweazle/data/diskdefs_dragon.cfg | 61 + src/greaseweazle/data/diskdefs_ensoniq.cfg | 39 + src/greaseweazle/data/diskdefs_epson.cfg | 95 ++ src/greaseweazle/data/diskdefs_gem.cfg | 15 + src/greaseweazle/data/diskdefs_hp.cfg | 25 + src/greaseweazle/data/diskdefs_ibm.cfg | 2 + src/greaseweazle/data/diskdefs_mac.cfg | 71 + src/greaseweazle/data/diskdefs_mm1.cfg | 69 + src/greaseweazle/data/diskdefs_msx.cfg | 45 + src/greaseweazle/data/diskdefs_northstar.cfg | 37 + src/greaseweazle/data/diskdefs_occ1.cfg | 23 + src/greaseweazle/data/diskdefs_olivetti.cfg | 18 + src/greaseweazle/data/diskdefs_pc98.cfg | 69 + src/greaseweazle/data/diskdefs_raw.cfg | 25 + src/greaseweazle/data/diskdefs_sci.cfg | 15 + src/greaseweazle/data/diskdefs_sega.cfg | 13 + src/greaseweazle/data/diskdefs_thomson.cfg | 78 + src/greaseweazle/data/diskdefs_tsc.cfg | 81 ++ src/greaseweazle/data/diskdefs_zx.cfg | 21 + 30 files changed, 1380 insertions(+), 1319 deletions(-) create mode 100644 src/greaseweazle/data/diskdefs_acorn.cfg create mode 100644 src/greaseweazle/data/diskdefs_akai.cfg create mode 100644 src/greaseweazle/data/diskdefs_amiga.cfg create mode 100644 src/greaseweazle/data/diskdefs_apple2.cfg create mode 100644 src/greaseweazle/data/diskdefs_atari.cfg create mode 100644 src/greaseweazle/data/diskdefs_atarist.cfg create mode 100644 src/greaseweazle/data/diskdefs_coco.cfg create mode 100644 src/greaseweazle/data/diskdefs_commodore.cfg create mode 100644 src/greaseweazle/data/diskdefs_dec.cfg create mode 100644 src/greaseweazle/data/diskdefs_dragon.cfg create mode 100644 src/greaseweazle/data/diskdefs_ensoniq.cfg create mode 100644 src/greaseweazle/data/diskdefs_epson.cfg create mode 100644 src/greaseweazle/data/diskdefs_gem.cfg create mode 100644 src/greaseweazle/data/diskdefs_hp.cfg create mode 100644 src/greaseweazle/data/diskdefs_mac.cfg create mode 100644 src/greaseweazle/data/diskdefs_mm1.cfg create mode 100644 src/greaseweazle/data/diskdefs_msx.cfg create mode 100644 src/greaseweazle/data/diskdefs_northstar.cfg create mode 100644 src/greaseweazle/data/diskdefs_occ1.cfg create mode 100644 src/greaseweazle/data/diskdefs_olivetti.cfg create mode 100644 src/greaseweazle/data/diskdefs_pc98.cfg create mode 100644 src/greaseweazle/data/diskdefs_raw.cfg create mode 100644 src/greaseweazle/data/diskdefs_sci.cfg create mode 100644 src/greaseweazle/data/diskdefs_sega.cfg create mode 100644 src/greaseweazle/data/diskdefs_thomson.cfg create mode 100644 src/greaseweazle/data/diskdefs_tsc.cfg create mode 100644 src/greaseweazle/data/diskdefs_zx.cfg diff --git a/src/greaseweazle/codec/codec.py b/src/greaseweazle/codec/codec.py index 5e2f6f0..cd8c4cb 100644 --- a/src/greaseweazle/codec/codec.py +++ b/src/greaseweazle/codec/codec.py @@ -225,16 +225,18 @@ def _get_diskdef( disk_match = re.match(r'disk\s+([\w,.-]+)', t) if disk_match: parse_mode = ParseMode.Disk - active = prefix + disk_match.group(1) == format_name + active = ((prefix + disk_match.group(1)).casefold() + == format_name.casefold()) if active: disk = DiskDef() else: - prefix_match = re.match(r'prefix\s+([\w,.-]+)\s+(\S+)', t) - error.check(prefix_match is not None, 'syntax error') - assert prefix_match is not None # mypy + import_match = re.match(r'import\s+([\w,.-]*)\s*"([^"]+)"', + t) + error.check(import_match is not None, 'syntax error') + assert import_match is not None # mypy disk = _get_diskdef(format_name, DiskDef_File( - name = prefix_match.group(2), - prefix = prefix_match.group(1), + name = import_match.group(2), + prefix = import_match.group(1), parent = diskdef_file)) if disk: break @@ -346,11 +348,11 @@ def get_all_formats(diskdef_file: DiskDef_File) -> List[str]: disk_match = re.match(r'\s*disk\s+([\w,.-]+)', l) if disk_match: formats.append(prefix + disk_match.group(1)) - prefix_match = re.match(r'\s*prefix\s+([\w,.-]+)\s+(\S+)', l) - if prefix_match: + import_match = re.match(r'\s*import\s+([\w,.-]*)\s*"([^"]+)"', l) + if import_match: formats += get_all_formats(DiskDef_File( - name = prefix_match.group(2), - prefix = prefix_match.group(1), + name = import_match.group(2), + prefix = import_match.group(1), parent = diskdef_file)) return formats diff --git a/src/greaseweazle/data/diskdefs.cfg b/src/greaseweazle/data/diskdefs.cfg index 7cd4eb7..cddfc21 100644 --- a/src/greaseweazle/data/diskdefs.cfg +++ b/src/greaseweazle/data/diskdefs.cfg @@ -1,6 +1,6 @@ ## Greaseweazle disk definitions. -# Syntax should be fairly obvious from the examples below. +# Syntax should be fairly obvious from the examples in this folder. # # A disk definition is declared by "disk "; scope extends to # the matching "end". Each disk definition must contain the following: @@ -38,1312 +38,35 @@ # eg. 250kbps is MFM DD, 500kbps is MFM HD, 1000kbps is MFM ED # rpm: Disk spin speed in RPM (1-2000, default: 300) # img_bps: Bytes per sector in IMG file (short sectors are padded) - -disk amiga.amigados - cyls = 80 - heads = 2 - tracks * amiga.amigados - secs = 11 - end -end - -disk amiga.amigados_hd - cyls = 80 - heads = 2 - tracks * amiga.amigados - secs = 22 - end -end - -disk acorn.adfs.160 - cyls = 40 - heads = 1 - tracks * ibm.mfm - secs = 16 - bps = 256 - gap3 = 57 - id = 0 - rate = 250 - end -end - -disk acorn.adfs.320 - cyls = 80 - heads = 1 - tracks * ibm.mfm - secs = 16 - bps = 256 - gap3 = 57 - id = 0 - rate = 250 - end -end - -disk acorn.adfs.640 - cyls = 80 - heads = 2 - tracks * ibm.mfm - secs = 16 - bps = 256 - gap3 = 57 - id = 0 - rate = 250 - end -end - -disk acorn.adfs.800 - cyls = 80 - heads = 2 - tracks * ibm.mfm - secs = 5 - bps = 1024 - gap3 = 116 - id = 0 - rate = 250 - end -end - -disk acorn.adfs.1600 - cyls = 80 - heads = 2 - tracks * ibm.mfm - secs = 10 - bps = 1024 - gap3 = 116 - id = 0 - rate = 500 - end -end - -disk acorn.dfs.ss - cyls = 40 - heads = 1 - tracks * ibm.fm - secs = 10 - bps = 256 - iam = no - gap3 = 21 - id = 0 - cskew = 3 - rate = 125 - end -end - -disk acorn.dfs.ss80 - cyls = 80 - heads = 1 - tracks * ibm.fm - secs = 10 - bps = 256 - iam = no - gap3 = 21 - id = 0 - cskew = 3 - rate = 125 - end -end - -disk acorn.dfs.ds - cyls = 40 - heads = 2 - tracks * ibm.fm - secs = 10 - bps = 256 - iam = no - gap3 = 21 - id = 0 - cskew = 3 - rate = 125 - end -end - -disk acorn.dfs.ds80 - cyls = 80 - heads = 2 - tracks * ibm.fm - secs = 10 - bps = 256 - iam = no - gap3 = 21 - id = 0 - cskew = 3 - rate = 125 - end -end - -disk akai.800 - cyls = 80 - heads = 2 - tracks * ibm.mfm - secs = 5 - bps = 1024 - gap3 = 116 - id = 1 - rate = 250 - cskew = 2 - end -end - -disk akai.1600 - cyls = 80 - heads = 2 - tracks * ibm.mfm - secs = 10 - bps = 1024 - gap3 = 116 - id = 1 - rate = 500 - cskew = 5 - end -end - -# Physical sector order in raw sector image file (no assumed filesystem) -disk apple2.nofs.140 - cyls = 35 - heads = 1 - tracks * apple2.gcr - clock = 3.92 - secs = 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15 - end -end - -# AppleDOS sector order in raw sector image file (.DO image layout) -disk apple2.appledos.140 - cyls = 35 - heads = 1 - tracks * apple2.gcr - clock = 3.92 - secs = 0,13,11,9,7,5,3,1,14,12,10,8,6,4,2,15 - end -end - -# ProDOS sector order in raw sector image file (.PO image layout) -disk apple2.prodos.140 - cyls = 35 - heads = 1 - tracks * apple2.gcr - clock = 3.92 - secs = 0,2,4,6,8,10,12,14,1,3,5,7,9,11,13,15 - end -end - -disk atari.90 - cyls = 40 - heads = 1 - tracks * ibm.fm - secs = 18 - bps = 128 - iam = yes - gap1 = 6 - gap3 = 17 - id = 1 - cskew = 3 - rate = 130 - end -end - -disk atarist.360 - cyls = 80 - heads = 1 - tracks * ibm.mfm - secs = 9 - bps = 512 - gap3 = 84 - rate = 250 - iam = no - cskew = 2 - end -end - -disk atarist.400 - cyls = 80 - heads = 1 - tracks * ibm.mfm - secs = 10 - bps = 512 - gap3 = 30 - rate = 250 - iam = no - end -end - -disk atarist.440 - cyls = 80 - heads = 1 - tracks * ibm.mfm - secs = 11 - bps = 512 - gap3 = 3 - rate = 261 - iam = no - end -end - -disk atarist.720 - cyls = 80 - heads = 2 - tracks * ibm.mfm - secs = 9 - bps = 512 - gap3 = 84 - rate = 250 - iam = no - cskew = 4 - hskew = 2 - end -end - -disk atarist.800 - cyls = 80 - heads = 2 - tracks * ibm.mfm - secs = 10 - bps = 512 - gap3 = 30 - rate = 250 - iam = no - end -end - -disk atarist.880 - cyls = 80 - heads = 2 - tracks * ibm.mfm - secs = 11 - bps = 512 - gap3 = 3 - rate = 261 - iam = no - end -end - -disk coco.decb - cyls = 35 - heads = 1 - tracks * ibm.mfm - secs = 18 - bps = 256 - id = 1 - gap2 = 22 - gap3 = 24 - gap4a = 32 - interleave = 5 - iam = no - rate = 250 - end -end - -disk coco.decb.40t - cyls = 40 - heads = 1 - tracks * ibm.mfm - secs = 18 - bps = 256 - id = 1 - gap2 = 22 - gap3 = 24 - gap4a = 32 - interleave = 5 - iam = no - rate = 250 - end -end - -# TRS CoCo OS-9 -disk coco.os9.40ss - cyls = 40 - heads = 1 - tracks * ibm.mfm - secs = 18 - bps = 256 - id = 1 - gap2 = 22 - gap3 = 24 - gap4a = 32 - interleave = 3 - iam = no - rate = 250 - end -end - -disk coco.os9.40ds - cyls = 40 - heads = 2 - tracks * ibm.mfm - secs = 18 - bps = 256 - id = 1 - gap2 = 22 - gap3 = 24 - gap4a = 32 - interleave = 3 - iam = no - rate = 250 - end -end - -disk coco.os9.80ss - cyls = 80 - heads = 1 - tracks * ibm.mfm - secs = 18 - bps = 256 - id = 1 - gap2 = 22 - gap3 = 24 - gap4a = 32 - interleave = 3 - iam = no - rate = 250 - end -end - -disk coco.os9.80ds - cyls = 80 - heads = 2 - tracks * ibm.mfm - secs = 18 - bps = 256 - id = 1 - gap2 = 22 - gap3 = 24 - gap4a = 32 - interleave = 3 - iam = no - rate = 250 - end -end - -disk commodore.1541 - cyls = 40 - heads = 1 - tracks 0-16 c64.gcr - clock = 3.25 - secs = 21 - end - tracks 17-23 c64.gcr - clock = 3.50 - secs = 19 - end - tracks 24-29 c64.gcr - clock = 3.75 - secs = 18 - end - tracks * c64.gcr - clock = 4.00 - secs = 17 - end -end - -disk commodore.1571 - cyls = 35 - heads = 2 - tracks 0-16 c64.gcr - clock = 3.25 - secs = 21 - end - tracks 17-23 c64.gcr - clock = 3.50 - secs = 19 - end - tracks 24-29 c64.gcr - clock = 3.75 - secs = 18 - end - tracks * c64.gcr - clock = 4.00 - secs = 17 - end -end - -disk commodore.1581 - cyls = 80 - heads = 2 - tracks 0-79.0 ibm.mfm - iam = no - secs = 10 - bps = 512 - gap3 = 30 - rate = 250 - h = 1 - end - tracks 0-79.1 ibm.mfm - iam = no - secs = 10 - bps = 512 - gap3 = 30 - rate = 250 - h = 0 - end -end - -disk commodore.cmd.fd2000.dd - cyls = 81 - heads = 2 - tracks 0-80.0 ibm.mfm - iam = no - secs = 10 - bps = 512 - gap3 = 30 - rate = 250 - h = 1 - end - tracks 0-80.1 ibm.mfm - iam = no - secs = 10 - bps = 512 - gap3 = 30 - rate = 250 - h = 0 - end -end - -disk commodore.cmd.fd2000.hd - cyls = 81 - heads = 2 - tracks 0-80.0 ibm.mfm - iam = no - secs = 10 - bps = 1024 - gap3 = 116 - rate = 500 - h = 1 - end - tracks 0-80.1 ibm.mfm - iam = no - secs = 10 - bps = 1024 - gap3 = 116 - rate = 500 - h = 0 - end -end - -disk commodore.cmd.fd4000.ed - cyls = 81 - heads = 2 - tracks 0-80.0 ibm.mfm - iam = no - secs = 20 - bps = 1024 - gap3 = 116 - rate = 1000 - h = 1 - end - tracks 0-80.1 ibm.mfm - iam = no - secs = 20 - bps = 1024 - gap3 = 116 - rate = 1000 - h = 0 - end -end - -disk dec.rx01 - cyls = 77 - heads = 1 - tracks * ibm.fm - secs = 26 - bps = 128 - gap3 = 26 - rate = 250 - rpm = 360 - end -end - -disk dec.rx02 - cyls = 77 - heads = 1 - tracks * dec.rx02 - secs = 26 - bps = 128 # Actually 256 bytes, at double rate, MMFM coded - gap3 = 26 - rate = 250 - rpm = 360 - end -end - -disk dragon.40ss - cyls = 40 - heads = 1 - tracks * ibm.mfm - secs = 18 - bps = 256 - id = 1 - gap2 = 22 - gap3 = 24 - gap4a = 32 - interleave = 2 - iam = no - end -end - -disk dragon.40ds - cyls = 40 - heads = 2 - tracks * ibm.mfm - secs = 18 - bps = 256 - id = 1 - gap2 = 22 - gap3 = 24 - gap4a = 32 - interleave = 2 - iam = no - end -end - -disk dragon.80ss - cyls = 80 - heads = 1 - tracks * ibm.mfm - secs = 18 - bps = 256 - id = 1 - gap2 = 22 - gap3 = 24 - gap4a = 32 - interleave = 2 - iam = no - end -end - -disk dragon.80ds - cyls = 80 - heads = 2 - tracks * ibm.mfm - secs = 18 - bps = 256 - id = 1 - gap2 = 22 - gap3 = 24 - gap4a = 32 - interleave = 2 - iam = no - end -end - -disk ensoniq.800 - cyls = 80 - heads = 2 - tracks * ibm.mfm - secs = 10 - bps = 512 - gap3 = 30 - id = 0 - rate = 250 - end -end - -disk ensoniq.1600 - cyls = 80 - heads = 2 - tracks * ibm.mfm - secs = 20 - bps = 512 - gap3 = 40 - id = 0 - rate = 500 - end -end - -disk ensoniq.mirage - cyls = 80 - heads = 1 - tracks * ibm.mfm - # The sectors are a tight fit so squeeze the post-index gaps a little - gap1 = 20 - gap4a = 20 - secs = 6 - bps = 1024*5,512 - id = 0 - rate = 250 - end -end - -# This is a slightly odd format with sevral unformatted tracks. -# I've seen this used with logo professor and a few other pieces -# of software. -disk epson.qx10.logo - cyls = 40 - heads = 2 - tracks 0-1,4 ibm.mfm - secs = 16 - bps = 256 - rate = 250 - end - tracks 5,6 ibm.mfm - id = 2 - secs = 10 - bps = 512 - rate = 250 - end - tracks 2,8-39 ibm.mfm - secs = 10 - bps = 512 - rate = 250 - end -end - -# This is a format used with several self-booting games. -disk epson.qx10.booter - cyls = 15 - heads = 1 - tracks 0 ibm.mfm - secs = 16 - bps = 256 - rate = 250 - end - tracks * ibm.mfm - secs = 17 - bps = 256 - rate = 250 - end -end - -# This is the QX+ format used with CPM Plus on the QX-10. Does not support system disks. -disk epson.qx10.400 - cyls = 40 - heads = 2 - tracks * ibm.mfm - secs = 5 - bps = 1024 - rate = 250 - end -end - -# This is a less common format with only track 0 using 16 256 byte sectors. -disk epson.qx10.399 - cyls = 40 - heads = 2 - tracks 0.0 ibm.mfm - secs = 16 - bps = 256 - rate = 250 - end - tracks * ibm.mfm - secs = 10 - bps = 512 - rate = 250 - end -end - -# Newer more common format capable of 396k of storage. -disk epson.qx10.396 - cyls = 40 - heads = 2 - tracks 0-1 ibm.mfm - secs = 16 - bps = 256 - rate = 250 - end - tracks * ibm.mfm - secs = 10 - bps = 512 - rate = 250 - end -end - -# Original Epson QX-10 format providing 320k of storage. -disk epson.qx10.320 - cyls = 40 - heads = 2 - tracks * ibm.mfm - secs = 16 - bps = 256 - rate = 250 - end -end - -# General Music (GEM) S2 and S3 -disk gem.1600 - cyls = 80 - heads = 2 - tracks * ibm.mfm - secs = 10 - bps = 1024 - gap3 = 116 - id = 1 - rate = 500 - cskew = 5 - end -end - -# HP 9885 Flexible Disk Drive -disk hp.mmfm.9885 - cyls = 67 - heads = 1 - tracks * hp.mmfm - secs = 30 - interleave = 4 - cskew = 4 - hskew = 1 - end -end - -# HP 9895 (and 7902) Flexible Disk Drive -disk hp.mmfm.9895 - cyls = 77 - heads = 2 - tracks * hp.mmfm - secs = 30 - interleave = 4 - cskew = 4 - hskew = 1 - end -end - -prefix ibm diskdefs_ibm.cfg - -disk mac.400 - cyls = 80 - heads = 1 - tracks 0-15 mac.gcr - clock = 2.63 - secs = 12 - format = 0x02 - interleave = 2 - end - tracks 16-31 mac.gcr - clock = 2.89 - secs = 11 - format = 0x02 - interleave = 2 - end - tracks 32-47 mac.gcr - clock = 3.20 - secs = 10 - format = 0x02 - interleave = 2 - end - tracks 48-63 mac.gcr - clock = 3.57 - secs = 9 - format = 0x02 - interleave = 2 - end - tracks * mac.gcr - clock = 3.98 - secs = 8 - format = 0x02 - interleave = 2 - end -end - -disk mac.800 - cyls = 80 - heads = 2 - tracks 0-15 mac.gcr - clock = 2.63 - secs = 12 - format = 0x22 - interleave = 2 - end - tracks 16-31 mac.gcr - clock = 2.89 - secs = 11 - format = 0x22 - interleave = 2 - end - tracks 32-47 mac.gcr - clock = 3.20 - secs = 10 - format = 0x22 - interleave = 2 - end - tracks 48-63 mac.gcr - clock = 3.57 - secs = 9 - format = 0x22 - interleave = 2 - end - tracks * mac.gcr - clock = 3.98 - secs = 8 - format = 0x22 - interleave = 2 - end -end - -# MM/1 3.5" HD 32SPT Microware OS-9 -disk mm1.os9.80dshd_32 - cyls = 80 - heads = 2 - tracks * ibm.mfm - secs = 32 - bps = 256 - id = 0 - gap2 = 22 - gap3 = 24 - gap4a = 32 - interleave = 3 - iam = no - rate = 500 - end -end - -# MM/1 3.5" HD 33SPT Microware OS-9 -disk mm1.os9.80dshd_33 - cyls = 80 - heads = 2 - tracks * ibm.mfm - secs = 33 - bps = 256 - id = 0 - gap2 = 22 - gap3 = 24 - gap4a = 32 - interleave = 3 - iam = no - rate = 500 - end -end - -# MM/1 3.5" HD 36SPT Microware OS-9 -disk mm1.os9.80dshd_36 - cyls = 80 - heads = 2 - tracks * ibm.mfm - secs = 36 - bps = 256 - id = 0 - gap2 = 22 - gap3 = 24 - gap4a = 32 - interleave = 3 - iam = no - rate = 500 - end -end - -# MM/1 3.5" HD 37SPT Microware OS-9 -disk mm1.os9.80dshd_37 - cyls = 80 - heads = 2 - tracks * ibm.mfm - secs = 37 - bps = 256 - id = 0 - gap2 = 22 - gap3 = 24 - gap4a = 32 - interleave = 3 - iam = no - rate = 500 - end -end - -disk msx.1d - cyls = 40 - heads = 1 - tracks * ibm.mfm - secs = 9 - bps = 512 - gap3 = 84 - rate = 250 - end -end - -disk msx.1dd - cyls = 80 - heads = 1 - tracks * ibm.mfm - secs = 9 - bps = 512 - gap3 = 84 - rate = 250 - end -end - -disk msx.2d - cyls = 40 - heads = 2 - tracks * ibm.mfm - secs = 9 - bps = 512 - gap3 = 84 - rate = 250 - end -end - -disk msx.2dd - cyls = 80 - heads = 2 - tracks * ibm.mfm - secs = 9 - bps = 512 - gap3 = 84 - rate = 250 - end -end - -disk northstar.fm.ss - cyls = 35 - heads = 1 - tracks * northstar - mode = fm - secs = 10 - end -end - -disk northstar.fm.ds - cyls = 35 - heads = 2 - tracks * northstar - mode = fm - secs = 10 - end -end - -disk northstar.mfm.ss - cyls = 35 - heads = 1 - tracks * northstar - mode = mfm - secs = 10 - end -end - -disk northstar.mfm.ds - cyls = 35 - heads = 2 - tracks * northstar - mode = mfm - secs = 10 - end -end - -# Osborne 1 Single Density -disk occ1.sd - cyls = 40 - heads = 1 - tracks * ibm.fm - secs = 10 - bps = 256 - rate = 125 - end -end - -# Osborne 1 Double Density -disk occ1.dd - cyls = 40 - heads = 1 - tracks * ibm.mfm - secs = 5 - bps = 1024 - rate = 250 - end -end - -# Olivetti M20 360kB DD floppies -disk olivetti.m20 - cyls = 35 - heads = 2 - tracks 0.0 ibm.fm - secs = 16 - bps = 128 - rate = 125 - img_bps = 256 - end - tracks * ibm.mfm - secs = 16 - bps = 256 - rate = 250 - end -end - -disk pc98.2d - cyls = 40 - heads = 2 - tracks * ibm.mfm - secs = 8 - bps = 512 - gap3 = 57 - rate = 250 - rpm = 300 - end -end - -disk pc98.2dd - cyls = 77 - heads = 2 - tracks * ibm.mfm - secs = 8 - bps = 512 - gap3 = 57 - rate = 250 - rpm = 360 - end -end - -disk pc98.2hd - cyls = 77 - heads = 2 - tracks * ibm.mfm - secs = 8 - bps = 1024 - gap3 = 116 - rate = 500 - rpm = 360 - end -end - -# Used by N88-Basic disks for NEC PC-98 -disk pc98.n88basic.hd - cyls = 77 - heads = 2 - tracks 0.0 ibm.fm - secs = 26 - bps = 128 - gap3 = 26 - rate = 250 - rpm = 360 - end - tracks * ibm.mfm - secs = 26 - bps = 256 - gap3 = 26 - rate = 500 - rpm = 360 - end -end - -disk pc98.2hs - cyls = 81 - heads = 2 - tracks * ibm.mfm - secs = 9 - bps = 1024 - gap3 = 116 - rate = 500 - rpm = 300 - end -end - -disk raw.125 # 125kbps (eg. FM, 5.25") - cyls = 81 - heads = 2 - tracks * bitcell - clock = 4.0 - end -end - -disk raw.250 # 250 kbps (eg. MFM DD, 3.5") - cyls = 81 - heads = 2 - tracks * bitcell - clock = 2.0 - end -end - -disk raw.500 # 500 kbps (eg. MFM HD, 3.5") - cyls = 81 - heads = 2 - tracks * bitcell - clock = 1.0 - end -end - -# Sequential Circuits Prophet -disk sci.prophet - cyls = 80 - heads = 2 - tracks * ibm.mfm - # gap1 is reduced to give a bit more leeway at the end of the track - gap1 = 20 - secs = 6 - bps = 1024*5,256 - id = 0 - rate = 250 - end -end - -disk sega.sf7000 - cyls = 40 - heads = 1 - tracks * ibm.mfm - secs = 16 - bps = 256 - gap3 = 42 - id = 1 - rate = 250 - end -end - # -# Disk formats for Thomson MO5, MO6, TO7, TO7/70, TO8, TO8D, TO9(+) computers: -# - -# 5.25" single density, 1 side = 80 kB -# @fplanque: Tested Read only -disk thomson.1s80 - cyls = 40 - heads = 1 - tracks * ibm.fm - secs = 16 - bps = 128 - rate = 250 - interleave = 7 - rpm = 300 - end -end - -# Note: Thomson never released 5.25" single-density doubled-sided drives - -# 5.25" double density, 1 side = 160 kB -disk thomson.1s160 - cyls = 40 - heads = 1 - tracks * ibm.fm - secs = 16 - bps = 256 - rate = 250 - interleave = 7 - rpm = 300 - end -end - -# Thomson 5.25" double density, 2 sides = 2x160 kB -# Note: on Thomson each side is addressed independently, so it's really 2x160 -# and not 320. -disk thomson.2s160 - cyls = 40 - heads = 2 - tracks * ibm.fm - secs = 16 - bps = 256 - rate = 250 - interleave = 7 - rpm = 300 - end -end - -# Thomson 3.5" double density, 1 side = 320 kB -# @fplanque: Tested Read and Write -disk thomson.1s320 - cyls = 80 - heads = 1 - tracks * ibm.mfm - secs = 16 - bps = 256 - rate = 250 - interleave = 7 - rpm = 300 - end -end - -# Thomson 3.5" double density, 2 sides = 2x320 kB -# Note: on Thomson each side is addressed independently, so it's really 2x320 -# and not 640. -disk thomson.2s320 - cyls = 80 - heads = 2 - tracks * ibm.mfm - secs = 16 - bps = 256 - rate = 250 - interleave = 7 - rpm = 300 - end -end - -# TSC FLEX: DS/DD with SD (FM) cylinder 0. -# Sector numbering and interleave is continuous across drive heads. Since -# there is no direct way to flag this, we implement it here by explicitly -# specifying head 1 track formats: with sector @id following on from head 0, -# and with @hskew shifting the first sector of side 1 the correct amount to -# simulate cross-track interleave. -disk tsc.flex.dsdd - cyls = 80 - heads = 2 - tracks 0.0 ibm.fm - bps = 256 - iam = no - gap3 = 16 - gap4a = 16 - secs = 10 - interleave = 4 - id = 1 - h = 0 - end - tracks 0.1 ibm.fm - bps = 256 - iam = no - gap3 = 16 - gap4a = 16 - secs = 10 - interleave = 4 - hskew = 1 - id = 11 # Follows on from head 0 (1..10 -> 11..20) - h = 0 - end - tracks 1-79.0 ibm.mfm - bps = 256 - iam = no - gap3 = 16 - gap4a = 16 - secs = 18 - interleave = 6 - id = 1 - h = 1 - end - tracks 1-79.1 ibm.mfm - bps = 256 - iam = no - gap3 = 16 - gap4a = 16 - secs = 18 - interleave = 6 - hskew = 5 - id = 19 # Follows on from head 0 (1..18 -> 19..36) - h = 1 - end -end - -# TSC FLEX: SS/DD with SD (FM) cylinder 0. -# Definition is a simplified version of the DS/DD format. -disk tsc.flex.ssdd - cyls = 80 - heads = 1 - tracks 0.0 ibm.fm - bps = 256 - iam = no - gap3 = 16 - gap4a = 16 - secs = 10 - interleave = 4 - id = 1 - h = 0 - end - tracks 1-79.0 ibm.mfm - bps = 256 - iam = no - gap3 = 16 - gap4a = 16 - secs = 18 - interleave = 6 - id = 1 - h = 1 - end -end - -disk zx.trdos.640 - cyls = 80 - heads = 2 - tracks * ibm.mfm - secs = 16 - bps = 256 - h = 0 - end -end - -# Quorum (ZX Spectrum clone) running CP/M-80 -disk zx.quorum.800 - cyls = 80 - heads = 2 - tracks * ibm.mfm - secs = 5 - bps = 1024 - end -end +# Sub-files can be imported by "import [] """. Any definition +# names from the imported file will be prefixed by the optional . + +import acorn "diskdefs_acorn.cfg" +import akai "diskdefs_akai.cfg" +import amiga "diskdefs_amiga.cfg" +import apple2 "diskdefs_apple2.cfg" +import atari "diskdefs_atari.cfg" +import atarist "diskdefs_atarist.cfg" +import coco "diskdefs_coco.cfg" +import commodore "diskdefs_commodore.cfg" +import dec "diskdefs_dec.cfg" +import dragon "diskdefs_dragon.cfg" +import ensoniq "diskdefs_ensoniq.cfg" +import epson "diskdefs_epson.cfg" +import gem "diskdefs_gem.cfg" +import hp "diskdefs_hp.cfg" +import ibm "diskdefs_ibm.cfg" +import mac "diskdefs_mac.cfg" +import mm1 "diskdefs_mm1.cfg" +import msx "diskdefs_msx.cfg" +import northstar "diskdefs_northstar.cfg" +import occ1 "diskdefs_occ1.cfg" +import olivetti "diskdefs_olivetti.cfg" +import pc98 "diskdefs_pc98.cfg" +import raw "diskdefs_raw.cfg" +import sci "diskdefs_sci.cfg" +import sega "diskdefs_sega.cfg" +import thomson "diskdefs_thomson.cfg" +import tsc "diskdefs_tsc.cfg" +import zx "diskdefs_zx.cfg" diff --git a/src/greaseweazle/data/diskdefs_acorn.cfg b/src/greaseweazle/data/diskdefs_acorn.cfg new file mode 100644 index 0000000..2a0feaa --- /dev/null +++ b/src/greaseweazle/data/diskdefs_acorn.cfg @@ -0,0 +1,117 @@ +# prefix: acorn. + +disk adfs.160 + cyls = 40 + heads = 1 + tracks * ibm.mfm + secs = 16 + bps = 256 + gap3 = 57 + id = 0 + rate = 250 + end +end + +disk adfs.320 + cyls = 80 + heads = 1 + tracks * ibm.mfm + secs = 16 + bps = 256 + gap3 = 57 + id = 0 + rate = 250 + end +end + +disk adfs.640 + cyls = 80 + heads = 2 + tracks * ibm.mfm + secs = 16 + bps = 256 + gap3 = 57 + id = 0 + rate = 250 + end +end + +disk adfs.800 + cyls = 80 + heads = 2 + tracks * ibm.mfm + secs = 5 + bps = 1024 + gap3 = 116 + id = 0 + rate = 250 + end +end + +disk adfs.1600 + cyls = 80 + heads = 2 + tracks * ibm.mfm + secs = 10 + bps = 1024 + gap3 = 116 + id = 0 + rate = 500 + end +end + +disk dfs.ss + cyls = 40 + heads = 1 + tracks * ibm.fm + secs = 10 + bps = 256 + iam = no + gap3 = 21 + id = 0 + cskew = 3 + rate = 125 + end +end + +disk dfs.ss80 + cyls = 80 + heads = 1 + tracks * ibm.fm + secs = 10 + bps = 256 + iam = no + gap3 = 21 + id = 0 + cskew = 3 + rate = 125 + end +end + +disk dfs.ds + cyls = 40 + heads = 2 + tracks * ibm.fm + secs = 10 + bps = 256 + iam = no + gap3 = 21 + id = 0 + cskew = 3 + rate = 125 + end +end + +disk dfs.ds80 + cyls = 80 + heads = 2 + tracks * ibm.fm + secs = 10 + bps = 256 + iam = no + gap3 = 21 + id = 0 + cskew = 3 + rate = 125 + end +end diff --git a/src/greaseweazle/data/diskdefs_akai.cfg b/src/greaseweazle/data/diskdefs_akai.cfg new file mode 100644 index 0000000..ca8a09c --- /dev/null +++ b/src/greaseweazle/data/diskdefs_akai.cfg @@ -0,0 +1,27 @@ +# prefix: akai. + +disk 800 + cyls = 80 + heads = 2 + tracks * ibm.mfm + secs = 5 + bps = 1024 + gap3 = 116 + id = 1 + rate = 250 + cskew = 2 + end +end + +disk 1600 + cyls = 80 + heads = 2 + tracks * ibm.mfm + secs = 10 + bps = 1024 + gap3 = 116 + id = 1 + rate = 500 + cskew = 5 + end +end diff --git a/src/greaseweazle/data/diskdefs_amiga.cfg b/src/greaseweazle/data/diskdefs_amiga.cfg new file mode 100644 index 0000000..9eaa7e2 --- /dev/null +++ b/src/greaseweazle/data/diskdefs_amiga.cfg @@ -0,0 +1,17 @@ +# prefix: amiga. + +disk amigados + cyls = 80 + heads = 2 + tracks * amiga.amigados + secs = 11 + end +end + +disk amigados_hd + cyls = 80 + heads = 2 + tracks * amiga.amigados + secs = 22 + end +end diff --git a/src/greaseweazle/data/diskdefs_apple2.cfg b/src/greaseweazle/data/diskdefs_apple2.cfg new file mode 100644 index 0000000..251af52 --- /dev/null +++ b/src/greaseweazle/data/diskdefs_apple2.cfg @@ -0,0 +1,31 @@ +# prefix: apple2. + +# Physical sector order in raw sector image file (no assumed filesystem) +disk nofs.140 + cyls = 35 + heads = 1 + tracks * apple2.gcr + clock = 3.92 + secs = 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15 + end +end + +# AppleDOS sector order in raw sector image file (.DO image layout) +disk appledos.140 + cyls = 35 + heads = 1 + tracks * apple2.gcr + clock = 3.92 + secs = 0,13,11,9,7,5,3,1,14,12,10,8,6,4,2,15 + end +end + +# ProDOS sector order in raw sector image file (.PO image layout) +disk prodos.140 + cyls = 35 + heads = 1 + tracks * apple2.gcr + clock = 3.92 + secs = 0,2,4,6,8,10,12,14,1,3,5,7,9,11,13,15 + end +end diff --git a/src/greaseweazle/data/diskdefs_atari.cfg b/src/greaseweazle/data/diskdefs_atari.cfg new file mode 100644 index 0000000..c06ec1e --- /dev/null +++ b/src/greaseweazle/data/diskdefs_atari.cfg @@ -0,0 +1,16 @@ +# prefix: atari. + +disk 90 + cyls = 40 + heads = 1 + tracks * ibm.fm + secs = 18 + bps = 128 + iam = yes + gap1 = 6 + gap3 = 17 + id = 1 + cskew = 3 + rate = 130 + end +end diff --git a/src/greaseweazle/data/diskdefs_atarist.cfg b/src/greaseweazle/data/diskdefs_atarist.cfg new file mode 100644 index 0000000..cc2ac0e --- /dev/null +++ b/src/greaseweazle/data/diskdefs_atarist.cfg @@ -0,0 +1,76 @@ +# prefix: atarist. + +disk 360 + cyls = 80 + heads = 1 + tracks * ibm.mfm + secs = 9 + bps = 512 + gap3 = 84 + rate = 250 + iam = no + cskew = 2 + end +end + +disk 400 + cyls = 80 + heads = 1 + tracks * ibm.mfm + secs = 10 + bps = 512 + gap3 = 30 + rate = 250 + iam = no + end +end + +disk 440 + cyls = 80 + heads = 1 + tracks * ibm.mfm + secs = 11 + bps = 512 + gap3 = 3 + rate = 261 + iam = no + end +end + +disk 720 + cyls = 80 + heads = 2 + tracks * ibm.mfm + secs = 9 + bps = 512 + gap3 = 84 + rate = 250 + iam = no + cskew = 4 + hskew = 2 + end +end + +disk 800 + cyls = 80 + heads = 2 + tracks * ibm.mfm + secs = 10 + bps = 512 + gap3 = 30 + rate = 250 + iam = no + end +end + +disk 880 + cyls = 80 + heads = 2 + tracks * ibm.mfm + secs = 11 + bps = 512 + gap3 = 3 + rate = 261 + iam = no + end +end diff --git a/src/greaseweazle/data/diskdefs_coco.cfg b/src/greaseweazle/data/diskdefs_coco.cfg new file mode 100644 index 0000000..cf579d7 --- /dev/null +++ b/src/greaseweazle/data/diskdefs_coco.cfg @@ -0,0 +1,98 @@ +# prefix: coco. + +disk decb + cyls = 35 + heads = 1 + tracks * ibm.mfm + secs = 18 + bps = 256 + id = 1 + gap2 = 22 + gap3 = 24 + gap4a = 32 + interleave = 5 + iam = no + rate = 250 + end +end + +disk decb.40t + cyls = 40 + heads = 1 + tracks * ibm.mfm + secs = 18 + bps = 256 + id = 1 + gap2 = 22 + gap3 = 24 + gap4a = 32 + interleave = 5 + iam = no + rate = 250 + end +end + +# TRS CoCo OS-9 +disk os9.40ss + cyls = 40 + heads = 1 + tracks * ibm.mfm + secs = 18 + bps = 256 + id = 1 + gap2 = 22 + gap3 = 24 + gap4a = 32 + interleave = 3 + iam = no + rate = 250 + end +end + +disk os9.40ds + cyls = 40 + heads = 2 + tracks * ibm.mfm + secs = 18 + bps = 256 + id = 1 + gap2 = 22 + gap3 = 24 + gap4a = 32 + interleave = 3 + iam = no + rate = 250 + end +end + +disk os9.80ss + cyls = 80 + heads = 1 + tracks * ibm.mfm + secs = 18 + bps = 256 + id = 1 + gap2 = 22 + gap3 = 24 + gap4a = 32 + interleave = 3 + iam = no + rate = 250 + end +end + +disk os9.80ds + cyls = 80 + heads = 2 + tracks * ibm.mfm + secs = 18 + bps = 256 + id = 1 + gap2 = 22 + gap3 = 24 + gap4a = 32 + interleave = 3 + iam = no + rate = 250 + end +end diff --git a/src/greaseweazle/data/diskdefs_commodore.cfg b/src/greaseweazle/data/diskdefs_commodore.cfg new file mode 100644 index 0000000..554a791 --- /dev/null +++ b/src/greaseweazle/data/diskdefs_commodore.cfg @@ -0,0 +1,127 @@ +# prefix: commodore. + +disk 1541 + cyls = 40 + heads = 1 + tracks 0-16 c64.gcr + clock = 3.25 + secs = 21 + end + tracks 17-23 c64.gcr + clock = 3.50 + secs = 19 + end + tracks 24-29 c64.gcr + clock = 3.75 + secs = 18 + end + tracks * c64.gcr + clock = 4.00 + secs = 17 + end +end + +disk 1571 + cyls = 35 + heads = 2 + tracks 0-16 c64.gcr + clock = 3.25 + secs = 21 + end + tracks 17-23 c64.gcr + clock = 3.50 + secs = 19 + end + tracks 24-29 c64.gcr + clock = 3.75 + secs = 18 + end + tracks * c64.gcr + clock = 4.00 + secs = 17 + end +end + +disk 1581 + cyls = 80 + heads = 2 + tracks 0-79.0 ibm.mfm + iam = no + secs = 10 + bps = 512 + gap3 = 30 + rate = 250 + h = 1 + end + tracks 0-79.1 ibm.mfm + iam = no + secs = 10 + bps = 512 + gap3 = 30 + rate = 250 + h = 0 + end +end + +disk cmd.fd2000.dd + cyls = 81 + heads = 2 + tracks 0-80.0 ibm.mfm + iam = no + secs = 10 + bps = 512 + gap3 = 30 + rate = 250 + h = 1 + end + tracks 0-80.1 ibm.mfm + iam = no + secs = 10 + bps = 512 + gap3 = 30 + rate = 250 + h = 0 + end +end + +disk cmd.fd2000.hd + cyls = 81 + heads = 2 + tracks 0-80.0 ibm.mfm + iam = no + secs = 10 + bps = 1024 + gap3 = 116 + rate = 500 + h = 1 + end + tracks 0-80.1 ibm.mfm + iam = no + secs = 10 + bps = 1024 + gap3 = 116 + rate = 500 + h = 0 + end +end + +disk cmd.fd4000.ed + cyls = 81 + heads = 2 + tracks 0-80.0 ibm.mfm + iam = no + secs = 20 + bps = 1024 + gap3 = 116 + rate = 1000 + h = 1 + end + tracks 0-80.1 ibm.mfm + iam = no + secs = 20 + bps = 1024 + gap3 = 116 + rate = 1000 + h = 0 + end +end diff --git a/src/greaseweazle/data/diskdefs_dec.cfg b/src/greaseweazle/data/diskdefs_dec.cfg new file mode 100644 index 0000000..f18c0c2 --- /dev/null +++ b/src/greaseweazle/data/diskdefs_dec.cfg @@ -0,0 +1,25 @@ +# prefix: dec. + +disk rx01 + cyls = 77 + heads = 1 + tracks * ibm.fm + secs = 26 + bps = 128 + gap3 = 26 + rate = 250 + rpm = 360 + end +end + +disk rx02 + cyls = 77 + heads = 1 + tracks * dec.rx02 + secs = 26 + bps = 128 # Actually 256 bytes, at double rate, MMFM coded + gap3 = 26 + rate = 250 + rpm = 360 + end +end diff --git a/src/greaseweazle/data/diskdefs_dragon.cfg b/src/greaseweazle/data/diskdefs_dragon.cfg new file mode 100644 index 0000000..c27f76f --- /dev/null +++ b/src/greaseweazle/data/diskdefs_dragon.cfg @@ -0,0 +1,61 @@ +# prefix: dragon. + +disk 40ss + cyls = 40 + heads = 1 + tracks * ibm.mfm + secs = 18 + bps = 256 + id = 1 + gap2 = 22 + gap3 = 24 + gap4a = 32 + interleave = 2 + iam = no + end +end + +disk 40ds + cyls = 40 + heads = 2 + tracks * ibm.mfm + secs = 18 + bps = 256 + id = 1 + gap2 = 22 + gap3 = 24 + gap4a = 32 + interleave = 2 + iam = no + end +end + +disk 80ss + cyls = 80 + heads = 1 + tracks * ibm.mfm + secs = 18 + bps = 256 + id = 1 + gap2 = 22 + gap3 = 24 + gap4a = 32 + interleave = 2 + iam = no + end +end + +disk 80ds + cyls = 80 + heads = 2 + tracks * ibm.mfm + secs = 18 + bps = 256 + id = 1 + gap2 = 22 + gap3 = 24 + gap4a = 32 + interleave = 2 + iam = no + end +end diff --git a/src/greaseweazle/data/diskdefs_ensoniq.cfg b/src/greaseweazle/data/diskdefs_ensoniq.cfg new file mode 100644 index 0000000..9bb6715 --- /dev/null +++ b/src/greaseweazle/data/diskdefs_ensoniq.cfg @@ -0,0 +1,39 @@ +# prefix: ensoniq. + +disk 800 + cyls = 80 + heads = 2 + tracks * ibm.mfm + secs = 10 + bps = 512 + gap3 = 30 + id = 0 + rate = 250 + end +end + +disk 1600 + cyls = 80 + heads = 2 + tracks * ibm.mfm + secs = 20 + bps = 512 + gap3 = 40 + id = 0 + rate = 500 + end +end + +disk mirage + cyls = 80 + heads = 1 + tracks * ibm.mfm + # The sectors are a tight fit so squeeze the post-index gaps a little + gap1 = 20 + gap4a = 20 + secs = 6 + bps = 1024*5,512 + id = 0 + rate = 250 + end +end diff --git a/src/greaseweazle/data/diskdefs_epson.cfg b/src/greaseweazle/data/diskdefs_epson.cfg new file mode 100644 index 0000000..955f5d0 --- /dev/null +++ b/src/greaseweazle/data/diskdefs_epson.cfg @@ -0,0 +1,95 @@ +# prefix: epson. + +# This is a slightly odd format with sevral unformatted tracks. +# I've seen this used with logo professor and a few other pieces +# of software. +disk qx10.logo + cyls = 40 + heads = 2 + tracks 0-1,4 ibm.mfm + secs = 16 + bps = 256 + rate = 250 + end + tracks 5,6 ibm.mfm + id = 2 + secs = 10 + bps = 512 + rate = 250 + end + tracks 2,8-39 ibm.mfm + secs = 10 + bps = 512 + rate = 250 + end +end + +# This is a format used with several self-booting games. +disk qx10.booter + cyls = 15 + heads = 1 + tracks 0 ibm.mfm + secs = 16 + bps = 256 + rate = 250 + end + tracks * ibm.mfm + secs = 17 + bps = 256 + rate = 250 + end +end + +# This is the QX+ format used with CPM Plus on the QX-10. Does not support system disks. +disk qx10.400 + cyls = 40 + heads = 2 + tracks * ibm.mfm + secs = 5 + bps = 1024 + rate = 250 + end +end + +# This is a less common format with only track 0 using 16 256 byte sectors. +disk qx10.399 + cyls = 40 + heads = 2 + tracks 0.0 ibm.mfm + secs = 16 + bps = 256 + rate = 250 + end + tracks * ibm.mfm + secs = 10 + bps = 512 + rate = 250 + end +end + +# Newer more common format capable of 396k of storage. +disk qx10.396 + cyls = 40 + heads = 2 + tracks 0-1 ibm.mfm + secs = 16 + bps = 256 + rate = 250 + end + tracks * ibm.mfm + secs = 10 + bps = 512 + rate = 250 + end +end + +# Original Epson QX-10 format providing 320k of storage. +disk qx10.320 + cyls = 40 + heads = 2 + tracks * ibm.mfm + secs = 16 + bps = 256 + rate = 250 + end +end diff --git a/src/greaseweazle/data/diskdefs_gem.cfg b/src/greaseweazle/data/diskdefs_gem.cfg new file mode 100644 index 0000000..e0c745d --- /dev/null +++ b/src/greaseweazle/data/diskdefs_gem.cfg @@ -0,0 +1,15 @@ +# prefix: gem. + +# General Music (GEM) S2 and S3 +disk 1600 + cyls = 80 + heads = 2 + tracks * ibm.mfm + secs = 10 + bps = 1024 + gap3 = 116 + id = 1 + rate = 500 + cskew = 5 + end +end diff --git a/src/greaseweazle/data/diskdefs_hp.cfg b/src/greaseweazle/data/diskdefs_hp.cfg new file mode 100644 index 0000000..a80150e --- /dev/null +++ b/src/greaseweazle/data/diskdefs_hp.cfg @@ -0,0 +1,25 @@ +# prefix: hp. + +# HP 9885 Flexible Disk Drive +disk mmfm.9885 + cyls = 67 + heads = 1 + tracks * hp.mmfm + secs = 30 + interleave = 4 + cskew = 4 + hskew = 1 + end +end + +# HP 9895 (and 7902) Flexible Disk Drive +disk mmfm.9895 + cyls = 77 + heads = 2 + tracks * hp.mmfm + secs = 30 + interleave = 4 + cskew = 4 + hskew = 1 + end +end diff --git a/src/greaseweazle/data/diskdefs_ibm.cfg b/src/greaseweazle/data/diskdefs_ibm.cfg index 4117468..91a22a4 100644 --- a/src/greaseweazle/data/diskdefs_ibm.cfg +++ b/src/greaseweazle/data/diskdefs_ibm.cfg @@ -1,3 +1,5 @@ +# prefix: ibm. + disk 160 cyls = 40 heads = 1 diff --git a/src/greaseweazle/data/diskdefs_mac.cfg b/src/greaseweazle/data/diskdefs_mac.cfg new file mode 100644 index 0000000..0abd2fa --- /dev/null +++ b/src/greaseweazle/data/diskdefs_mac.cfg @@ -0,0 +1,71 @@ +# prefix: mac. + +disk 400 + cyls = 80 + heads = 1 + tracks 0-15 mac.gcr + clock = 2.63 + secs = 12 + format = 0x02 + interleave = 2 + end + tracks 16-31 mac.gcr + clock = 2.89 + secs = 11 + format = 0x02 + interleave = 2 + end + tracks 32-47 mac.gcr + clock = 3.20 + secs = 10 + format = 0x02 + interleave = 2 + end + tracks 48-63 mac.gcr + clock = 3.57 + secs = 9 + format = 0x02 + interleave = 2 + end + tracks * mac.gcr + clock = 3.98 + secs = 8 + format = 0x02 + interleave = 2 + end +end + +disk 800 + cyls = 80 + heads = 2 + tracks 0-15 mac.gcr + clock = 2.63 + secs = 12 + format = 0x22 + interleave = 2 + end + tracks 16-31 mac.gcr + clock = 2.89 + secs = 11 + format = 0x22 + interleave = 2 + end + tracks 32-47 mac.gcr + clock = 3.20 + secs = 10 + format = 0x22 + interleave = 2 + end + tracks 48-63 mac.gcr + clock = 3.57 + secs = 9 + format = 0x22 + interleave = 2 + end + tracks * mac.gcr + clock = 3.98 + secs = 8 + format = 0x22 + interleave = 2 + end +end diff --git a/src/greaseweazle/data/diskdefs_mm1.cfg b/src/greaseweazle/data/diskdefs_mm1.cfg new file mode 100644 index 0000000..d71a29f --- /dev/null +++ b/src/greaseweazle/data/diskdefs_mm1.cfg @@ -0,0 +1,69 @@ +# prefix: mm1. + +# MM/1 3.5" HD 32SPT Microware OS-9 +disk os9.80dshd_32 + cyls = 80 + heads = 2 + tracks * ibm.mfm + secs = 32 + bps = 256 + id = 0 + gap2 = 22 + gap3 = 24 + gap4a = 32 + interleave = 3 + iam = no + rate = 500 + end +end + +# MM/1 3.5" HD 33SPT Microware OS-9 +disk os9.80dshd_33 + cyls = 80 + heads = 2 + tracks * ibm.mfm + secs = 33 + bps = 256 + id = 0 + gap2 = 22 + gap3 = 24 + gap4a = 32 + interleave = 3 + iam = no + rate = 500 + end +end + +# MM/1 3.5" HD 36SPT Microware OS-9 +disk os9.80dshd_36 + cyls = 80 + heads = 2 + tracks * ibm.mfm + secs = 36 + bps = 256 + id = 0 + gap2 = 22 + gap3 = 24 + gap4a = 32 + interleave = 3 + iam = no + rate = 500 + end +end + +# MM/1 3.5" HD 37SPT Microware OS-9 +disk os9.80dshd_37 + cyls = 80 + heads = 2 + tracks * ibm.mfm + secs = 37 + bps = 256 + id = 0 + gap2 = 22 + gap3 = 24 + gap4a = 32 + interleave = 3 + iam = no + rate = 500 + end +end diff --git a/src/greaseweazle/data/diskdefs_msx.cfg b/src/greaseweazle/data/diskdefs_msx.cfg new file mode 100644 index 0000000..d979a5c --- /dev/null +++ b/src/greaseweazle/data/diskdefs_msx.cfg @@ -0,0 +1,45 @@ +# prefix: msx. + +disk 1d + cyls = 40 + heads = 1 + tracks * ibm.mfm + secs = 9 + bps = 512 + gap3 = 84 + rate = 250 + end +end + +disk 1dd + cyls = 80 + heads = 1 + tracks * ibm.mfm + secs = 9 + bps = 512 + gap3 = 84 + rate = 250 + end +end + +disk 2d + cyls = 40 + heads = 2 + tracks * ibm.mfm + secs = 9 + bps = 512 + gap3 = 84 + rate = 250 + end +end + +disk 2dd + cyls = 80 + heads = 2 + tracks * ibm.mfm + secs = 9 + bps = 512 + gap3 = 84 + rate = 250 + end +end diff --git a/src/greaseweazle/data/diskdefs_northstar.cfg b/src/greaseweazle/data/diskdefs_northstar.cfg new file mode 100644 index 0000000..9871e59 --- /dev/null +++ b/src/greaseweazle/data/diskdefs_northstar.cfg @@ -0,0 +1,37 @@ +# prefix: northstar. + +disk fm.ss + cyls = 35 + heads = 1 + tracks * northstar + mode = fm + secs = 10 + end +end + +disk fm.ds + cyls = 35 + heads = 2 + tracks * northstar + mode = fm + secs = 10 + end +end + +disk mfm.ss + cyls = 35 + heads = 1 + tracks * northstar + mode = mfm + secs = 10 + end +end + +disk mfm.ds + cyls = 35 + heads = 2 + tracks * northstar + mode = mfm + secs = 10 + end +end diff --git a/src/greaseweazle/data/diskdefs_occ1.cfg b/src/greaseweazle/data/diskdefs_occ1.cfg new file mode 100644 index 0000000..5f42777 --- /dev/null +++ b/src/greaseweazle/data/diskdefs_occ1.cfg @@ -0,0 +1,23 @@ +# prefix: occ1. + +# Osborne 1 Single Density +disk sd + cyls = 40 + heads = 1 + tracks * ibm.fm + secs = 10 + bps = 256 + rate = 125 + end +end + +# Osborne 1 Double Density +disk dd + cyls = 40 + heads = 1 + tracks * ibm.mfm + secs = 5 + bps = 1024 + rate = 250 + end +end diff --git a/src/greaseweazle/data/diskdefs_olivetti.cfg b/src/greaseweazle/data/diskdefs_olivetti.cfg new file mode 100644 index 0000000..ce54bb0 --- /dev/null +++ b/src/greaseweazle/data/diskdefs_olivetti.cfg @@ -0,0 +1,18 @@ +# prefix: olivetti. + +# Olivetti M20 360kB DD floppies +disk m20 + cyls = 35 + heads = 2 + tracks 0.0 ibm.fm + secs = 16 + bps = 128 + rate = 125 + img_bps = 256 + end + tracks * ibm.mfm + secs = 16 + bps = 256 + rate = 250 + end +end diff --git a/src/greaseweazle/data/diskdefs_pc98.cfg b/src/greaseweazle/data/diskdefs_pc98.cfg new file mode 100644 index 0000000..19b02bb --- /dev/null +++ b/src/greaseweazle/data/diskdefs_pc98.cfg @@ -0,0 +1,69 @@ +# prefix: pc98. + +disk 2d + cyls = 40 + heads = 2 + tracks * ibm.mfm + secs = 8 + bps = 512 + gap3 = 57 + rate = 250 + rpm = 300 + end +end + +disk 2dd + cyls = 77 + heads = 2 + tracks * ibm.mfm + secs = 8 + bps = 512 + gap3 = 57 + rate = 250 + rpm = 360 + end +end + +disk 2hd + cyls = 77 + heads = 2 + tracks * ibm.mfm + secs = 8 + bps = 1024 + gap3 = 116 + rate = 500 + rpm = 360 + end +end + +# Used by N88-Basic disks for NEC PC-98 +disk n88basic.hd + cyls = 77 + heads = 2 + tracks 0.0 ibm.fm + secs = 26 + bps = 128 + gap3 = 26 + rate = 250 + rpm = 360 + end + tracks * ibm.mfm + secs = 26 + bps = 256 + gap3 = 26 + rate = 500 + rpm = 360 + end +end + +disk 2hs + cyls = 81 + heads = 2 + tracks * ibm.mfm + secs = 9 + bps = 1024 + gap3 = 116 + rate = 500 + rpm = 300 + end +end diff --git a/src/greaseweazle/data/diskdefs_raw.cfg b/src/greaseweazle/data/diskdefs_raw.cfg new file mode 100644 index 0000000..42b6ced --- /dev/null +++ b/src/greaseweazle/data/diskdefs_raw.cfg @@ -0,0 +1,25 @@ +# prefix: raw. + +disk 125 # 125kbps (eg. FM, 5.25") + cyls = 81 + heads = 2 + tracks * bitcell + clock = 4.0 + end +end + +disk 250 # 250 kbps (eg. MFM DD, 3.5") + cyls = 81 + heads = 2 + tracks * bitcell + clock = 2.0 + end +end + +disk 500 # 500 kbps (eg. MFM HD, 3.5") + cyls = 81 + heads = 2 + tracks * bitcell + clock = 1.0 + end +end diff --git a/src/greaseweazle/data/diskdefs_sci.cfg b/src/greaseweazle/data/diskdefs_sci.cfg new file mode 100644 index 0000000..0a1a678 --- /dev/null +++ b/src/greaseweazle/data/diskdefs_sci.cfg @@ -0,0 +1,15 @@ +# prefix: sci. + +# Sequential Circuits Prophet +disk prophet + cyls = 80 + heads = 2 + tracks * ibm.mfm + # gap1 is reduced to give a bit more leeway at the end of the track + gap1 = 20 + secs = 6 + bps = 1024*5,256 + id = 0 + rate = 250 + end +end diff --git a/src/greaseweazle/data/diskdefs_sega.cfg b/src/greaseweazle/data/diskdefs_sega.cfg new file mode 100644 index 0000000..d39ede0 --- /dev/null +++ b/src/greaseweazle/data/diskdefs_sega.cfg @@ -0,0 +1,13 @@ +# prefix: sega. + +disk sf7000 + cyls = 40 + heads = 1 + tracks * ibm.mfm + secs = 16 + bps = 256 + gap3 = 42 + id = 1 + rate = 250 + end +end diff --git a/src/greaseweazle/data/diskdefs_thomson.cfg b/src/greaseweazle/data/diskdefs_thomson.cfg new file mode 100644 index 0000000..ea0db9b --- /dev/null +++ b/src/greaseweazle/data/diskdefs_thomson.cfg @@ -0,0 +1,78 @@ +# prefix: thomson. + +# +# Disk formats for Thomson MO5, MO6, TO7, TO7/70, TO8, TO8D, TO9(+) computers: +# + +# 5.25" single density, 1 side = 80 kB +# @fplanque: Tested Read only +disk 1s80 + cyls = 40 + heads = 1 + tracks * ibm.fm + secs = 16 + bps = 128 + rate = 250 + interleave = 7 + rpm = 300 + end +end + +# Note: Thomson never released 5.25" single-density doubled-sided drives + +# 5.25" double density, 1 side = 160 kB +disk 1s160 + cyls = 40 + heads = 1 + tracks * ibm.fm + secs = 16 + bps = 256 + rate = 250 + interleave = 7 + rpm = 300 + end +end + +# Thomson 5.25" double density, 2 sides = 2x160 kB +# Note: on Thomson each side is addressed independently, so it's really 2x160 +# and not 320. +disk 2s160 + cyls = 40 + heads = 2 + tracks * ibm.fm + secs = 16 + bps = 256 + rate = 250 + interleave = 7 + rpm = 300 + end +end + +# Thomson 3.5" double density, 1 side = 320 kB +# @fplanque: Tested Read and Write +disk 1s320 + cyls = 80 + heads = 1 + tracks * ibm.mfm + secs = 16 + bps = 256 + rate = 250 + interleave = 7 + rpm = 300 + end +end + +# Thomson 3.5" double density, 2 sides = 2x320 kB +# Note: on Thomson each side is addressed independently, so it's really 2x320 +# and not 640. +disk 2s320 + cyls = 80 + heads = 2 + tracks * ibm.mfm + secs = 16 + bps = 256 + rate = 250 + interleave = 7 + rpm = 300 + end +end diff --git a/src/greaseweazle/data/diskdefs_tsc.cfg b/src/greaseweazle/data/diskdefs_tsc.cfg new file mode 100644 index 0000000..fce333c --- /dev/null +++ b/src/greaseweazle/data/diskdefs_tsc.cfg @@ -0,0 +1,81 @@ +# prefix: tsc. + +# TSC FLEX: DS/DD with SD (FM) cylinder 0. +# Sector numbering and interleave is continuous across drive heads. Since +# there is no direct way to flag this, we implement it here by explicitly +# specifying head 1 track formats: with sector @id following on from head 0, +# and with @hskew shifting the first sector of side 1 the correct amount to +# simulate cross-track interleave. +disk flex.dsdd + cyls = 80 + heads = 2 + tracks 0.0 ibm.fm + bps = 256 + iam = no + gap3 = 16 + gap4a = 16 + secs = 10 + interleave = 4 + id = 1 + h = 0 + end + tracks 0.1 ibm.fm + bps = 256 + iam = no + gap3 = 16 + gap4a = 16 + secs = 10 + interleave = 4 + hskew = 1 + id = 11 # Follows on from head 0 (1..10 -> 11..20) + h = 0 + end + tracks 1-79.0 ibm.mfm + bps = 256 + iam = no + gap3 = 16 + gap4a = 16 + secs = 18 + interleave = 6 + id = 1 + h = 1 + end + tracks 1-79.1 ibm.mfm + bps = 256 + iam = no + gap3 = 16 + gap4a = 16 + secs = 18 + interleave = 6 + hskew = 5 + id = 19 # Follows on from head 0 (1..18 -> 19..36) + h = 1 + end +end + +# TSC FLEX: SS/DD with SD (FM) cylinder 0. +# Definition is a simplified version of the DS/DD format. +disk flex.ssdd + cyls = 80 + heads = 1 + tracks 0.0 ibm.fm + bps = 256 + iam = no + gap3 = 16 + gap4a = 16 + secs = 10 + interleave = 4 + id = 1 + h = 0 + end + tracks 1-79.0 ibm.mfm + bps = 256 + iam = no + gap3 = 16 + gap4a = 16 + secs = 18 + interleave = 6 + id = 1 + h = 1 + end +end diff --git a/src/greaseweazle/data/diskdefs_zx.cfg b/src/greaseweazle/data/diskdefs_zx.cfg new file mode 100644 index 0000000..8cec088 --- /dev/null +++ b/src/greaseweazle/data/diskdefs_zx.cfg @@ -0,0 +1,21 @@ +# prefix: zx. + +disk trdos.640 + cyls = 80 + heads = 2 + tracks * ibm.mfm + secs = 16 + bps = 256 + h = 0 + end +end + +# Quorum (ZX Spectrum clone) running CP/M-80 +disk quorum.800 + cyls = 80 + heads = 2 + tracks * ibm.mfm + secs = 5 + bps = 1024 + end +end