From f3fa2dc311b9fa2764b300d252412d875843e323 Mon Sep 17 00:00:00 2001 From: Keir Fraser Date: Tue, 20 Aug 2024 17:33:07 +0100 Subject: [PATCH] CMD FD: Support D1M, D2M, D4M image types Refs keirf/flashfloppy#922 --- src/greaseweazle/data/diskdefs.cfg | 57 ++++++++++++++++++++++++++++++ src/greaseweazle/image/d81.py | 12 +++++++ src/greaseweazle/tools/util.py | 3 ++ 3 files changed, 72 insertions(+) diff --git a/src/greaseweazle/data/diskdefs.cfg b/src/greaseweazle/data/diskdefs.cfg index 6e3c878b..727d12e9 100644 --- a/src/greaseweazle/data/diskdefs.cfg +++ b/src/greaseweazle/data/diskdefs.cfg @@ -475,6 +475,63 @@ disk commodore.1581 end end +disk commodore.cmd.fd2000.dd + cyls = 81 + heads = 2 + tracks 0-80.0 ibm.mfm + secs = 10 + bps = 512 + gap3 = 30 + rate = 250 + h = 1 + end + tracks 0-80.1 ibm.mfm + 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 + secs = 10 + bps = 1024 + gap3 = 116 + rate = 500 + h = 1 + end + tracks 0-80.1 ibm.mfm + 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 + secs = 20 + bps = 1024 + gap3 = 116 + rate = 1000 + h = 1 + end + tracks 0-80.1 ibm.mfm + secs = 20 + bps = 1024 + gap3 = 116 + rate = 1000 + h = 0 + end +end + disk dec.rx01 cyls = 77 heads = 1 diff --git a/src/greaseweazle/image/d81.py b/src/greaseweazle/image/d81.py index 379a17bb..e29f4716 100644 --- a/src/greaseweazle/image/d81.py +++ b/src/greaseweazle/image/d81.py @@ -11,6 +11,18 @@ class D81(IMG): default_format = 'commodore.1581' sides_swapped = True +class D1M(IMG): + default_format = 'commodore.cmd.fd2000.dd' + sides_swapped = True + +class D2M(IMG): + default_format = 'commodore.cmd.fd2000.hd' + sides_swapped = True + +class D4M(IMG): + default_format = 'commodore.cmd.fd4000.ed' + sides_swapped = True + # Local variables: # python-indent: 4 # End: diff --git a/src/greaseweazle/tools/util.py b/src/greaseweazle/tools/util.py index 43b7aeba..92332ec5 100644 --- a/src/greaseweazle/tools/util.py +++ b/src/greaseweazle/tools/util.py @@ -268,6 +268,9 @@ def split_opts(seq): '.adm': ('ADM','acorn'), '.adl': ('ADL','acorn'), '.ctr': ('CTRaw','caps'), + '.d1m': ('D1M','d81'), + '.d2m': ('D2M','d81'), + '.d4m': ('D4M','d81'), '.d64': 'D64', '.d71': ('D71','d64'), '.d81': 'D81',