Selaa lähdekoodia

More IBM format specifiers.

Keir Fraser 3 vuotta sitten
vanhempi
commit
d3752d9563
2 muutettua tiedostoa jossa 46 lisäystä ja 12 poistoa
  1. 35 1
      scripts/greaseweazle/codec/formats.py
  2. 11 11
      scripts/greaseweazle/codec/ibm/mfm.py

+ 35 - 1
scripts/greaseweazle/codec/formats.py

@@ -23,6 +23,28 @@ class Format_Amiga_AmigaDOS(Format):
         self.decode_track = m.decode_track
         super().__init__()
     
+class Format_IBM_180(Format):
+    img_compatible = True
+    default_trackset = 'c=0-39:h=0'
+    max_trackset = 'c=0-41:h=0'
+    def __init__(self):
+        import greaseweazle.codec.ibm.mfm as m
+        self.fmt = m.IBM_MFM_720
+        self.default_revs = m.default_revs
+        self.decode_track = self.fmt.decode_track
+        super().__init__()
+    
+class Format_IBM_360(Format):
+    img_compatible = True
+    default_trackset = 'c=0-39:h=0-1'
+    max_trackset = 'c=0-41:h=0-1'
+    def __init__(self):
+        import greaseweazle.codec.ibm.mfm as m
+        self.fmt = m.IBM_MFM_720
+        self.default_revs = m.default_revs
+        self.decode_track = self.fmt.decode_track
+        super().__init__()
+    
 class Format_IBM_720(Format):
     img_compatible = True
     def __init__(self):
@@ -45,7 +67,16 @@ class Format_IBM_1440(Format):
     img_compatible = True
     def __init__(self):
         import greaseweazle.codec.ibm.mfm as m
-        self.fmt = m.IBM_MFM_1M44
+        self.fmt = m.IBM_MFM_1440
+        self.default_revs = m.default_revs
+        self.decode_track = self.fmt.decode_track
+        super().__init__()
+
+class Format_IBM_1200(Format):
+    img_compatible = True
+    def __init__(self):
+        import greaseweazle.codec.ibm.mfm as m
+        self.fmt = m.IBM_MFM_1200
         self.default_revs = m.default_revs
         self.decode_track = self.fmt.decode_track
         super().__init__()
@@ -113,7 +144,10 @@ class Format_AtariST_880(Format):
     
 formats = {
     'amiga.amigados': Format_Amiga_AmigaDOS,
+    'ibm.180': Format_IBM_180,
+    'ibm.360': Format_IBM_360,
     'ibm.720': Format_IBM_720,
+    'ibm.1200': Format_IBM_1200,
     'ibm.1440': Format_IBM_1440,
     'atarist.360': Format_AtariST_360,
     'atarist.400': Format_AtariST_400,

+ 11 - 11
scripts/greaseweazle/codec/ibm/mfm.py

@@ -364,17 +364,6 @@ class IBM_MFM_Predefined(IBM_MFM_Formatted):
         return mfm
 
 
-class IBM_MFM_1M44(IBM_MFM_Predefined):
-
-    time_per_rev = 0.2
-    clock = 1e-6
-    
-    gap_3  = 84 # Post-DAM
-    nsec   = 18
-    id0    = 1
-    sz     = 2
-
-
 class IBM_MFM_720(IBM_MFM_Predefined):
 
     time_per_rev = 0.2
@@ -390,6 +379,17 @@ class IBM_MFM_800(IBM_MFM_720):
     gap_3 = 30
     nsec  = 10
 
+class IBM_MFM_1200(IBM_MFM_720):
+
+    time_per_rev = 60/360
+    clock = 1e-6
+    nsec   = 15
+
+class IBM_MFM_1440(IBM_MFM_720):
+
+    clock = 1e-6
+    nsec   = 18
+
 class AtariST_SS_9SPT(IBM_MFM_720):
 
     gap_1 = None