#
#
#BEGIN A1  Generic CP/M - SSSD 8"
#DENSITY FM, HIGH
#CYLINDERS 77 SIDES 1 SECTORS 26,128
#SIDE1 0 1,7,13,19,25,5,11,17,23,3,9,15,21,2,8,14,20,26,6,12,18,24,4,10,16,22
#BSH 3 BLM 7 EXM 0 DSM 242 DRM 63 AL0 0C0H AL1 0 OFS 2
#END

diskdef a1
  seclen 128      #= Sectors xx,512
  tracks 77       #= (Cylinders * Sides) = 40*1 = 40
  sectrk 26       #= Sectors 10,xxx
  blocksize 1024  #= (128*(BLM+1)) = 2048                               
  maxdir 64       #= (DRM+1) = 64
  datarate SD
  fm YES 
  skew 6          # may be 1, not sure = SKEW 2 = 2
  boottrk 2       #= OFS = 2
  os 2.2
end

#BEGIN BIG1  Big Board (512 bytes/sector) - SSDD 8"
#DENSITY MFM, HIGH
#CYLINDERS 77 SIDES 1 SECTORS 15,512
#SIDE1 0 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15
#BSH 4 BLM 15 EXM 0 DSM 280 DRM 127 AL0 0C0H AL1 0 OFS 2
#END 

diskdef big1
  seclen 512      #= Sectors xx,512
  tracks 77       #= (Cylinders * Sides) = 40*1 = 40
  sectrk 15       #= Sectors 10,xxx
  blocksize 2048  #= (128*(BLM+1)) = 2048                               
  maxdir 128      #= (DRM+1) = 64
  datarate DD
  fm NO 
  skew 0          # may be 1, not sure = SKEW 2 = 2
  boottrk 2       #= OFS = 2
  os 2.2
end

#BEGIN BIG2  Big Board (512 bytes/sector) - DSDD 8"
#DENSITY MFM, HIGH
#CYLINDERS 77 SIDES 2 SECTORS 15,512
#SIDE1 0 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15
#SIDE2 1 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15
#ORDER CYLINDERS 
#BSH 4 BLM 15 EXM 0 DSM 569 DRM 127 AL0 0C0H AL1 0 OFS 2
#END

diskdef big2
  seclen 512      #= Sectors xx,512
  tracks 154      #= (Cylinders * Sides) = 40*1 = 40
  sides outback
  sectrk 15       #= Sectors 10,xxx
  blocksize 2048  #= (128*(BLM+1)) = 2048                               
  maxdir 128      #= (DRM+1) = 64
  datarate DD
  fm NO 
  skew 0          # may be 1, not sure = SKEW 2 = 2
  boottrk 1       #= OFS = 2
  os 2.2
end

#BEGIN BIG3  Big Board 1024 bytes/sector - SSDD 8"
#DENSITY MFM, HIGH
#CYLINDERS 77 SIDES 1 SECTORS 9,1024
#SIDE1 0 1,2,3,4,5,6,7,8,9
#BSH 4 BLM 15 EXM 0 DSM 336 DRM 127 AL0 0C0H AL1 0 OFS 2
#END

diskdef big3
  seclen 1024     #= Sectors xx,512
  tracks 77       #= (Cylinders * Sides) = 40*1 = 40
  sectrk 9        #= Sectors 10,xxx
  blocksize 2048  #= (128*(BLM+1)) = 2048                               
  maxdir 128      #= (DRM+1) = 64
  datarate DD
  fm NO 
  skew 0          # may be 1, not sure = SKEW 2 = 2
  boottrk 2       #= OFS = 2
  os 2.2
end

#BEGIN BIG4  Big Board SWP 1024 bytes/sector - SSDD 8"
#DENSITY MFM, HIGH
#CYLINDERS 77 SIDES 1 SECTORS 9,1024
#SIDE1 18 1,2,3,4,5,6,7,8,9
#BSH 4 BLM 15 EXM 0 DSM 336 DRM 127 AL0 0C0H AL1 0 OFS 2
#END

diskdef big4
  seclen 1024     #= Sectors xx,512
  tracks 77       #= (Cylinders * Sides) = 40*1 = 40
  sectrk 9        #= Sectors 10,xxx
  blocksize 2048  #= (128*(BLM+1)) = 2048                               
  maxdir 128      #= (DRM+1) = 64
  datarate DD
  fm NO
  secbase 18 
  skew 0          # may be 1, not sure = SKEW 2 = 2
  boottrk 2       #= OFS = 2
  os 2.2
end

#Radio Shack Model 4 running Montezuma Micro Ver 2.31 CP/M
#BEGIN TRSG TRS-80 Model 4,4P Montezuma System 170K - SSDD 48 tpi 5.25"
#DENSITY MFM, LOW
#CYLINDERS 40 SIDES 1 SECTORS 18,256
#SIDE1 0 1,3,5,7,9,11,13,15,17,2,4,6,8,10,12,14,16,18
#BSH 4 BLM 15 EXM 1 DSM 84 DRM 127 AL0 0C0H AL1 0 OFS 2
#END

diskdef trsg
  seclen 256
  tracks 40
  sectrk 18
  blocksize 2048
  maxdir 128
  datarate DD
  fm NO
  skew 2
  boottrk 2
  os 2.2
end

#BEGIN TRSH TRS-80 Model 4,4P Montezuma Data 200K - SSDD 48 tpi 5.25"
#DENSITY MFM, LOW
#CYLINDERS 40 SIDES 1 SECTORS 10,512
#SIDE1 0 1,3,5,7,9,2,4,6,8,10
#BSH 4 BLM 15 EXM 1 DSM 99 DRM 127 AL0 0C0H AL1 0 OFS 0
#END

diskdef trsh
  seclen 512
  tracks 40
  sectrk 10
  blocksize 2048
  maxdir 128
  datarate DD
  fm NO
  skew 2
  boottrk 0
  os 2.2
end
 
#BEGIN TRSI TRS-80 Model 4,4P Montezuma System 350K - DSDD 48 tpi 5.25"
#DENSITY MFM, LOW
#CYLINDERS 40 SIDES 2 SECTORS 18,256
#SIDE1 0 1,3,5,7,9,11,13,15,17,2,4,6,8,10,12,14,16,18
#SIDE2 1 1,3,5,7,9,11,13,15,17,2,4,6,8,10,12,14,16,18
#ORDER EAGLE
#BSH 4 BLM 15 EXM 1 DSM 174 DRM 127 AL0 0C0H AL1 0 OFS 2
#END

diskdef trsi
  seclen 256
  tracks 80
  sides outout
  sectrk 18
  blocksize 2048
  maxdir 128
  datarate DD
  fm NO
  skew 2
  boottrk 2
  os 2.2
end

#BEGIN TRSJ  TRS-80 Model 4,4P Montezuma Data 400K - DSDD 48 tpi 5.25"
#DENSITY MFM, LOW
#CYLINDERS 40 SIDES 2 SECTORS 10,512
#SIDE1 0 1,3,5,7,9,2,4,6,8,10
#SIDE2 1 1,3,5,7,9,2,4,6,8,10
#ORDER EAGLE
#BSH 4 BLM 15 EXM 1 DSM 199 DRM 127 AL0 0C0H AL1 0 OFS 0
#END

diskdef trsj
  seclen 512
  tracks 80
  sides outout
  sectrk 10
  blocksize 2048
  maxdir 128
  datarate DD
  fm NO
  skew 2
  boottrk 0
  os 2.2
end
 
#BEGIN TRSK TRS-80 Model 4,4P Montezuma System 350K - SSDD 96 tpi 5.25"
#DENSITY MFM, LOW
#CYLINDERS 80 SIDES 1 SECTORS 18,256
#SIDE1 0 1,3,5,7,9,11,13,15,17,2,4,6,8,10,12,14,16,18
#BSH 4 BLM 15 EXM 1 DSM 174 DRM 127 AL0 0C0H AL1 0 OFS 2
#END

diskdef trsk
  seclen 256
  tracks 80
  sectrk 18
  blocksize 2048
  maxdir 128
  datarate DD
  fm NO
  skew 2
  boottrk 2
  os 2.2
end
 
#BEGIN TRSL TRS-80 Model 4,4P Montezuma Data 400K - SSDD 96 tpi 5.25"
#DENSITY MFM, LOW
#CYLINDERS 80 SIDES 1 SECTORS 10,512
#SIDE1 0 1,3,5,7,9,2,4,6,8,10
#BSH 4 BLM 15 EXM 1 DSM 199 DRM 127 AL0 0C0H AL1 0 OFS 0
#END

diskdef trsl
  seclen 512
  tracks 80
  sectrk 10
  blocksize 2048
  maxdir 128
  datarate DD
  fm NO
  skew 2
  boottrk 0
  os 2.2
end
 
#BEGIN TRSM TRS-80 Model 4,4P Montezuma System 710K - DSDD 96 tpi 5.25"
#DENSITY MFM, LOW
#CYLINDERS 80 SIDES 2 SECTORS 18,256
#SIDE1 0 1,3,5,7,9,11,13,15,17,2,4,6,8,10,12,14,16,18
#SIDE2 1 1,3,5,7,9,11,13,15,17,2,4,6,8,10,12,14,16,18
#ORDER SIDES
#BSH 4 BLM 15 EXM 0 DSM 354 DRM 127 AL0 0C0H AL1 0 OFS 2
#END

diskdef trsm
  seclen 256
  tracks 160
  sides alt
  sectrk 18
  blocksize 2048
  maxdir 128
  datarate DD
  fm NO
  skew 2
  boottrk 2
  os 2.2
end
 
#BEGIN TRSN  TRS-80 Model 4,4P Montezuma Data 800K - DSDD 96 tpi 5.25"
#DENSITY MFM, LOW
#CYLINDERS 80 SIDES 2 SECTORS 10,512
#SIDE1 0 1,3,5,7,9,2,4,6,8,10
#SIDE2 1 1,3,5,7,9,2,4,6,8,10
#ORDER SIDES
#BSH 4 BLM 15 EXM 0 DSM 399 DRM 127 AL0 0C0H AL1 0 OFS 0
#END

diskdef trsn
  seclen 512
  tracks 160
  sides alt
  sectrk 10
  blocksize 2048
  maxdir 128
  datarate DD
  fm NO
  skew 2
  boottrk 0
  os 2.2
end
 
#BEGIN TRSO TRS-80 Model 4,4P Montezuma Extend System 190K - SSDD 48 tpi 5.25"
#DENSITY MFM, LOW
#CYLINDERS 40 SIDES 1 SECTORS 10,512
#SIDE1 0 1,3,5,7,9,2,4,6,8,10
#BSH 4 BLM 15 EXM 1 DSM 94 DRM 127 AL0 0C0H AL1 0 OFS 2
#END

diskdef trso
  seclen 512
  tracks 40
  sectrk 10
  blocksize 2048
  maxdir 128
  datarate DD
  fm NO
  skew 2
  boottrk 2
  os 2.2
end
 
#BEGIN TRSP TRS-80 Model 4,4P Montezuma Extend System 390K - SSDD 48 tpi 5.25"
#DENSITY MFM, LOW
#CYLINDERS 40 SIDES 2 SECTORS 10,512
#SIDE1 0 1,3,5,7,9,2,4,6,8,10
#SIDE2 1 1,3,5,7,9,2,4,6,8,10
#ORDER SIDES
#BSH 4 BLM 15 EXM 1 DSM 194 DRM 127 AL0 0C0H AL1 0 OFS 2
#END

diskdef trsp
  seclen 512
  tracks 80
  sides alt
  sectrk 10
  blocksize 2048
  maxdir 128
  datarate DD
  fm NO
  skew 2
  boottrk 2
  os 2.2
end
 
#BEGIN TRSQ TRS-80 Model 4,4P Montezuma Extend System 390K - SSDD 96 tpi 5.25"
#DENSITY MFM, LOW
#CYLINDERS 80 SIDES 1 SECTORS 10,512
#SIDE1 0 1,3,5,7,9,2,4,6,8,10
#BSH 4 BLM 15 EXM 0 DSM 194 DRM 127 AL0 0C0H AL1 0 OFS 2
#END

 diskdef trsq
  seclen 512
  tracks 80
  sectrk 10
  blocksize 2048
  maxdir 128
  datarate DD
  fm NO
  skew 2
  boottrk 2
  os 2.2
end

#BEGIN TRSR TRS-80 Model 4,4P Montezuma Extend System 790K - DSDD 96 tpi 5.25"
#DENSITY MFM, LOW
#CYLINDERS 80 SIDES 2 SECTORS 10,512
#SIDE1 0 1,3,5,7,9,2,4,6,8,10
#SIDE2 1 1,3,5,7,9,2,4,6,8,10
#ORDER SIDES
#BSH 4 BLM 15 EXM 0 DSM 394 DRM 127 AL0 0C0H AL1 0 OFS 2
#END

diskdef trsr
  seclen 512
  tracks 160
  sides alt
  sectrk 10
  blocksize 2048
  maxdir 128
  datarate DD
  fm NO
  skew 2
  boottrk 2
  os 2.2
end
 
#BEGIN TRSS TRS-80 Model 4,4P Montezuma Super Data 220K - SSDD 48 tpi 5.25"
#DENSITY MFM, LOW
#CYLINDERS 40 SIDES 1 SECTORS 6,1024
#SIDE1 0 1,3,5,2,4,6
#BSH 4 BLM 15 EXM 1 DSM 109 DRM 127 AL0 0C0H AL1 0 OFS 0
#END
diskdef trss
  seclen 1024
  tracks 40
  sectrk 6
  blocksize 2048
  maxdir 128
  datarate DD
  fm NO
  skew 2
  boottrk 0
  os 2.2
end
 
#BEGIN TRST TRS-80 Model 4,4P Montezuma Super Data 440K - DSDD 48 tpi 5.25"
#DENSITY MFM, LOW
#CYLINDERS 40 SIDES 2 SECTORS 6,1024
#SIDE1 0 1,3,5,2,4,6
#SIDE2 1 1,3,5,2,4,6
#ORDER EAGLE
#BSH 4 BLM 15 EXM 1 DSM 219 DRM 127 AL0 0C0H AL1 0 OFS 0
#END
diskdef trst
  seclen 1024
  tracks 80
  sides outout
  sectrk 6
  blocksize 2048
  maxdir 128
  datarate DD
  fm NO
  skew 2
  boottrk 0
  os 2.2
end
 
#BEGIN TRSU TRS-80 Model 4,4P Montezuma Super Data 440K - SSDD 96 tpi 5.25"
#DENSITY MFM, LOW
#CYLINDERS 80 SIDES 1 SECTORS 6,1024
#SIDE1 0 1,3,5,2,4,6
#BSH 4 BLM 15 EXM 1 DSM 219 DRM 127 AL0 0C0H AL1 0 OFS 0
#END
diskdef trsu
  seclen 1024
  tracks 80
  sectrk 6
  blocksize 2048
  maxdir 128
  datarate DD
  fm NO
  skew 2
  boottrk 0
  os 2.2
end
 
#BEGIN TRSV TRS-80 Model 4,4P Montezuma Super Data 880K - DSDD 96 tpi 5.25"
#DENSITY MFM, LOW
#CYLINDERS 80 SIDES 2 SECTORS 6,1024
#SIDE1 0 1,3,5,2,4,6
#SIDE2 1 1,3,5,2,4,6
#ORDER SIDES
#BSH 4 BLM 15 EXM 0 DSM 439 DRM 127 AL0 0C0H AL1 0 OFS 0
#END

diskdef trsv
  seclen 1024
  tracks 160
  sides alt
  sectrk 6
  blocksize 2048
  maxdir 128
  datarate DD
  fm NO
  skew 2
  boottrk 0
  os 2.2
end
 
#BEGIN TRSW TRS-80 Model 4,4P Montezuma System 400K - SSDD 96 tpi 3.5"
#DENSITY MFM, LOW
#CYLINDERS 80 SIDES 1 SECTORS 10,512
#SIDE1 0 1,3,5,7,9,2,4,6,8,10
#BSH 4 BLM 15 EXM 1 DSM 199 DRM 127 AL0 0C0H AL1 0 OFS 0
#END
 
diskdef trsw
  seclen 512
  tracks 80
  sectrk 10
  blocksize 2048
  maxdir 128
  datarate DD
  fm NO
  skew 2
  boottrk 0
  os 2.2
end

#-------------------------------------included in Original file
diskdef ibm-3740
  seclen 128
  tracks 77
  sectrk 26
  blocksize 1024
  maxdir 64
  skew 6
  boottrk 2
  os 2.2
end

diskdef 4mb-hd
  seclen 128
  tracks 1024
  sectrk 32
  blocksize 2048
  maxdir 256
  skew 1
  boottrk 0
  os p2dos
end

diskdef pcw
  seclen 512
  tracks 40
  sectrk 9
  blocksize 1024
  maxdir 64
  skew 1
  boottrk 1
  os 3
  libdsk:format pcw180
end

diskdef pc1.2m
  seclen 512
  tracks 80
  # this format uses 15 sectors per track, but 30 per cylinder
  sectrk 30
  blocksize 4096
  maxdir 256
  skew 1
  boottrk 0
  os 3
end

# CP/M 86 on 1.44MB floppies
diskdef cpm86-144feat
  seclen 512
  tracks 160
  sectrk 18
  blocksize 4096
  maxdir 256
  skew 1
  boottrk 2
  os 3
  libdsk:format ibm1440
end

# CP/M 86 on 720KB floppies
diskdef cpm86-720
  seclen 512
  tracks 160
  sectrk 9 
  blocksize 2048
  maxdir 256
  skew 1
  boottrk 2
  os 3
end

diskdef cf2dd
  seclen 512
  tracks 160
  sectrk 9
  blocksize 2048
  maxdir 256
  skew 1
  boottrk 1
  os 3
  libdsk:format pcw720
end

#amstrad: values are read from super block (special name hardcoded)

# Royal alphatronic
# setfdprm /dev/fd1 dd ssize=256 cyl=40 sect=16 head=2
diskdef alpha
  seclen 256
  tracks 40
  sectrk 32
  blocksize 2048
  maxdir 128
  skew 1
  boottrk 2
  os 2.2
end

# Apple II CP/M skew o Apple II DOS 3.3 skew
diskdef apple-do
  seclen 256
  tracks 35
  sectrk 16
  blocksize 1024
  maxdir 64
  skewtab 0,6,12,3,9,15,14,5,11,2,8,7,13,4,10,1
  boottrk 3
  os 2.2
end

# Apple II CP/M skew o Apple II PRODOS skew
diskdef apple-po
  seclen 256
  tracks 35
  sectrk 16
  blocksize 1024
  maxdir 64
  skewtab 0,9,3,12,6,15,1,10,4,13,7,8,2,11,5,14
  boottrk 3
  os 2.2
end

# MYZ80 hard drive (only works with libdsk, because it has a 256-byte header)
diskdef myz80
  seclen 1024
  tracks 64
  sectrk 128
  blocksize 4096
  maxdir 1024
  skew 1
  boottrk 0
  os 3
  libdsk:format pcw720
end

# Despite being Amstrad formats, CPC System and CPC Data don't have an Amstrad 
# superblock. You'll need to use libdsk to access them because the Linux 
# and Windows kernel drivers won't touch them.
diskdef cpcsys
  seclen 512
  tracks 40
  sectrk 9
  blocksize 1024
  maxdir 64
  skew 1
  boottrk 2
  os 3
  libdsk:format cpcsys
end

diskdef cpcdata
  seclen 512
  tracks 40
  sectrk 9
  blocksize 1024
  maxdir 64
  skew 1
  boottrk 0
  os 3
  libdsk:format cpcdata
end

# after being read in with no sector skew.
diskdef nigdos
  seclen 512
  # NigDos double sided disk format, 42 tracks * 2 sides
  tracks 84
  sectrk 10
  blocksize 2048
  maxdir 128
  skew 1
  boottrk 0
  # this format wastes half of the directory entry
  logicalextents 1
  os 3
end

diskdef epsqx10
  seclen 512
  tracks 40
  sectrk 20
  blocksize 2048
  maxdir 128
  skew 0
  boottrk 2
  os 2.2
end

diskdef ibm-8ss
  seclen 512
  tracks 40
  sectrk 8
  blocksize 1024
  maxdir 64
  skew 0
  boottrk 1
  os 2.2
end

diskdef ibm-8ds
  seclen 512
  tracks 40
  sectrk 8
  blocksize 1024
  maxdir 64
  skew 0
  boottrk 1
  os 2.2
end

diskdef electroglas
  seclen 512
  tracks 80
  sectrk 10
  blocksize 2048
  maxdir 256
  skew 0
  boottrk 1
  os 3
end

# IBM CP/M-86
# setfdprm /dev/fd1 sect=8 dtr=1 hd ssize=512 tpi=48 head=1
diskdef ibmpc-514ss
   seclen 512
   tracks 40
   sectrk 8
   blocksize 1024
   maxdir 64
   skew 1
   boottrk 1
   os 2.2
   libdsk:format ibm160
end

# IBM CP/M-86
# setfdprm /dev/fd1 sect=8 dtr=1 hd ssize=512 tpi=48
diskdef ibmpc-514ds
   seclen 512
   tracks 80
   sectrk 8
   blocksize 2048
   maxdir 64
   skew 0
   boottrk 2
   os 2.2
   libdsk:format ibm320
end

diskdef p112
  seclen 512
  tracks 160
  sectrk 18
  blocksize 2048
  maxdir 256
  skew 1
  boottrk 2
  os 3
end

diskdef p112-old
  seclen 512
  tracks 160
  sectrk 18
  blocksize 2048
  maxdir 128
  skew 1
  boottrk 1
  os 3
end

diskdef gide-cfa
  seclen 512
  tracks 1000
  sectrk 16
  blocksize 4096
  maxdir 1024
  skew 0
  boottrk 2
  os 3
end

diskdef gide-cfb
  seclen 512
  tracks 1000
  sectrk 16
  blocksize 4096
  maxdir 1024
  skew 0
  boottrk 0
# Start of second partition
  offset 1000trk
  os 3
end

# AT&T/Olivetti Word Processor
diskdef attwp
   seclen 256
   tracks 80
   sectrk 32
   blocksize 2048
   maxdir 128
   boottrk 1
   logicalextents 1
   skewtab 0,2,4,6,8,10,12,14,1,3,5,7,9,11,13,15,16,18,20,22,24,26,28,30,17,19,21,23,25,27,29,31
   os 2.2
end

# setfdprm /dev/fd0 zerobased SS DD ssize=512 cyl=40 sect=10 head=1
# Kaypro II
diskdef kpii
  seclen 512
  tracks 40
  sectrk 10
  blocksize 1024
  maxdir 64
  skew 0
  boottrk 1
  os 2.2
end

# setfdprm /dev/fd0 zerobased DS DD ssize=512 cyl=40 sect=10 head=2
# Kayro IV
diskdef kpiv
  seclen 512
  tracks 80
  sectrk 10
  blocksize 2048
  maxdir 64
  skew 0
  boottrk 1
  os 2.2
end

# setfdprm /dev/fd0 dd sect=10
diskdef interak
  seclen 512
  tracks 80
  sectrk 20
  blocksize 4096
  maxdir 256
  skew 1
  boottrk 2
  os 2.2
end

# Timex FDD3000 3"
diskdef fdd3000
  seclen 256
  tracks 40
  sectrk 16
  blocksize 1024
  maxdir 128
  boottrk 4
  os 2.2
  skew 7
end

# Timex FDD3000 3"
diskdef fdd3000_2
  seclen 256
  tracks 40
  sectrk 16
  blocksize 1024
  maxdir 128
  boottrk 2
  os 2.2
  skew 5
end

# Robotron 1715
diskdef 1715
  seclen 1024
  tracks 40
  sectrk 5
  blocksize 1024
  maxdir 64
  skew 0
  boottrk 3
  os 2.2
end

# Robotron 1715 with SCP3
diskdef 17153
  seclen 1024
  tracks 160
  sectrk 5
  blocksize 2048
  maxdir 128
  skew 0
  boottrk 4
  os 3
end

#DDR
diskdef scp624
  seclen 256
  tracks 160
  sectrk 16
  blocksize 2048
  maxdir 128
  skew 0
  boottrk 2
  os 2.2
end

diskdef scp640
  seclen 256
  tracks 160
  sectrk 16
  blocksize 2048
  maxdir 128
  skew 0
  boottrk 0
  os 2.2
end

diskdef scp780
  seclen 1024
  tracks 160
  sectrk 5
  blocksize 2048
  maxdir 128
  skew 0
  boottrk 2
  os 2.2
end

diskdef scp800
  seclen 1024
  tracks 160
  sectrk 5
  blocksize 2048
  maxdir 128
  skew 0
  boottrk 0
  os 2.2
end 

diskdef z9001
  seclen 1024
  tracks 160
  sectrk 5
  blocksize 2048
  maxdir 192
  skew 0
  boottrk 0
  os 2.2
end 

# Visual Technology Visual 1050 computer
diskdef v1050
  seclen 512
  tracks 80
  sectrk 10
  blocksize 2048
  maxdir 128
  skew 0
  boottrk 2
  os 3
end

# Microbee 40 track 5.25" disks
diskdef microbee40
  seclen 512
  tracks 80
  sectrk 10
  blocksize 2048
  maxdir 128
  skewtab 1,4,7,0,3,6,9,2,5,8
  boottrk 2
  os 2.2
end

diskdef dreamdisk40
  seclen 512
  tracks 80
  sectrk 10
  blocksize 2048
  maxdir 128
  skewtab 1,4,7,0,3,6,9,2,5,8
  boottrk 2
  os 2.2
end

diskdef dreamdisk80
  seclen 512
  tracks 160
  sectrk 10
  blocksize 2048
  maxdir 256
  skewtab 1,4,7,0,3,6,9,2,5,8
  boottrk 2
  os 2.2
end

diskdef rc759
  seclen 1024
  tracks 154
  sectrk 8
  blocksize 2048
  maxdir 512
  boottrk 4
  os 3
end

# ICL Comet: 40 track 5.25" Single Sided
#
diskdef icl-comet-525ss
   seclen 512
   tracks 40
   sectrk 10
   blocksize 1024
   maxdir 64
   skewtab 0,3,6,9,2,5,8,1,4,7
   boottrk 2
   os 2.2
end

diskdef z80pack-hd
  seclen 128
  tracks 255
  sectrk 128
  blocksize 2048
  maxdir 1024
  skew 0
  boottrk 0
  os 2.2
end

diskdef z80pack-hdb
  seclen 128
  tracks 256
  sectrk 16384
  blocksize 16384
  maxdir 8192
  skew 0
  boottrk 0
  os 2.2
end

# Bondwell 12 and 14 disk images in IMD raw binary format
diskdef bw12
  seclen 256
  tracks 40
  sectrk 18
  blocksize 2048
  maxdir 64
  skew 1
  boottrk 2
  os 2.2
end

diskdef bw14
  seclen 256
  tracks 80
  sectrk 18
  blocksize 2048
  maxdir 64
  skew 1
  boottrk 2
  os 2.2
end

############################
# north star cp/m  disks
############################

#North Star floppy 360K

diskdef nsfd
  seclen 512
  tracks 70 
  sectrk 10 
  blocksize 2048
  maxdir 64
  skew 5  
  boottrk 2
  os 2.2
end


#North Star CP/M Virtual-Disk file on Hard Disk
# prepared with allocation factor = 4
# as in "CR CPMB 4000 4"
# needs to be copied off hard drive before you can 
# work on it with cpmtools

diskdef nshd4
  seclen 512
  tracks 512
  sectrk 16 
  blocksize 4096
  maxdir 256
  skew 0  
  boottrk 0
  os 2.2
end


#North Star CP/M Virtual-Disk file on Hard Disk
# prepared with allocation factor = 8
# as in "CR CPMB 6000 8"
# needs to be copied off hard drive before you can
# work on it with cpmtools

diskdef nshd8
  seclen 512
  tracks 1024
  sectrk 16 
  blocksize 8192
  maxdir 256
  skew 0  
  boottrk 0
  os 2.2
end

# Northstar Micro-Disk System MDS-A-D 175
diskdef mdsad175
    seclen 512
    blocksize 1024
    tracks 35
    maxdir 64
    boottrk 2
    sectrk 10
    skew 5
    os 2.2
end


# Northstar Micro-Disk System MDS-A-D 350
diskdef mdsad350
   seclen 512
   blocksize 2048
   tracks 70
   maxdir 64
   boottrk 2
   sectrk 10
   skew 5
   os 2.2
end


# Osborne 1
diskdef osborne1
   seclen 1024
   tracks 40
   sectrk 5
   blocksize 1024
   maxdir 64
   boottrk 3
   os 2.2
end

# Osborne Nuevo/Vixen/4
diskdef osborne4
   seclen 1024
   tracks 80
   sectrk 5
   blocksize 2048
   maxdir 128
   skew 2
   boottrk 2
   os 2.2
end

# Lobo Max-80 8" CP/M 2
diskdef lobo2
  seclen 256
  tracks 77
  sectrk 30
  blocksize 2048
  maxdir 64
  skew 0
  boottrk 2
  os 2.2
end

# Lobo Max-80 8" CP/M 3
diskdef lobo3
  seclen 512
  tracks 77
  sectrk 17
  blocksize 2048
  maxdir 64
  skew 0
  boottrk 2
  os 3
end

# PRO CP/M RZ50 DZ format (Perhaps only 79 tracks should be used?)
diskdef dec_pro
  seclen 512
  tracks 80
  sectrk 10
  blocksize 2048
  maxdir 128
  skew 2
  boottrk 2
  os 2.2
end

# TDOS with DateStamper
diskdef tdos-ds
  seclen 1024
  tracks 77
  sectrk 16
  blocksize 2048
  maxdir 256
  skew 0
  boottrk 1
  os zsys
end

# The following entires are tested and working
# Most of the images are either from Don Maslin's archive or from
# Dave Dunfield's site, but not all - they are noted as well as
# their size.

# PMC Micromate
# Dave Dunfield's Imagedisk information from DSK conversion from IMD:
# IMageDisk Utility 1.18 / Mar 07 2012
# IMD 1.14: 10/03/2007 11:13:27
# PMC-101 MicroMate
# CP/M Plus
# System Master
# Assuming 1:1 for Binary output
# 0/0 250 kbps DD  5x1024
# 80 tracks(40/40), 400 sectors (12 Compressed)
# Entry derived from above - image size = 409,600, from Dave Dunfield
diskdef pmc101
  seclen 1024
  tracks 80
  sectrk 5
  blocksize 2048
  maxdir 128
  skew 0
  boottrk 2
  os 3
end
  
# BEGIN td143ssdd8  Turbo Dos 1.43 - SSDD 8" - 512 x 16
# Test OK - image size = 630,784, from Don Maslin's archive
diskdef td143ssdd8
  seclen 512
  tracks 77
  sectrk 9
  blocksize 1024
  maxdir 64
  skew 0
  boottrk 0
  os 2.2
# DENSITY MFM ,LOW 
end

# BEGIN headsdd8  Heath H89, Magnolia CP/M - SSDD 8" - 512 x 16
# Test OK - image size = 630,784, from Don Maslin's archive
diskdef heassdd8
  seclen 512
  tracks 77
  sectrk 16
  blocksize 2048
  maxdir 128
  skew 0
  boottrk 2
  os 2.2
# DENSITY MFM ,LOW 
end

# Morrow Designs Micro-Decision         DOUBLE
# 64k CP/M Vers. 2.2 Rev.2.3            SIDED
# Copyright '76, '77, '78, '79, '80
# Digital Research
# Copyright 1982,1983 Morrow Designs, Inc.
# Assuming 1:1 for Binary output
#  0/0 250 kbps DD  5x1024
# 80 tracks(40/40), 400 sectors (128 Compressed)
# Entry derived from above data
# Test OK - image siae = 409600, from Dave Dunfield
diskdef mordsdd
  seclen 1024
  tracks 80
  sectrk 5
  blocksize 2048
  maxdir 128
  skew 3
  boottrk 2
  OS 2.2
end


# BEGIN morsddd Morrow MD2 - SSDD 48 tpi 5.25" - 1024 x 5
# Test OK - image size = 204,800, from Don Maslin's archive
# Also tested with image from Dave Dunfield
diskdef morsddd
  seclen 1024
  tracks 40
  sectrk 5
  blocksize 2048
  maxdir 128
  skew 3
  boottrk 2
  os 2.2
# DENSITY MFM ,LOW 
# BSH 4 BLM 15 EXM 1 DSM 94 DRM 127 AL0 0C0H AL1 0 OFS 2
end

#BEGIN MOR1  Morrow MD2 - SSDD 48 tpi 5.25"
#DENSITY MFM, LOW
#CYLINDERS 40 SIDES 1 SECTORS 5,1024
#SIDE1 0 1,4,2,5,3
#LABEL MOR1
#BSH 4 BLM 15 EXM 1 DSM 94 DRM 127 AL0 0C0H AL1 0 OFS 2
#END

diskdef mor1
  seclen 1024     #= Sectors xx,512
  tracks 40       #= (Cylinders * Sides) = 40*1 = 40
  sectrk 5        #= Sectors 10,xxx
  blocksize 2048  #= (128*(BLM+1)) = 2048                               
  maxdir 128       #= (DRM+1) = 64
  datarate DD
  fm NO 
  skew 3          # may be 1, not sure = SKEW 2 = 2
  boottrk 2       #= OFS = 2
  os 2.2
end

#BEGIN MOR2  Morrow MD3, 5, 11, 16, 34 - DSDD 48 tpi 5.25"
#DENSITY MFM, LOW
#CYLINDERS 40 SIDES 2 SECTORS 5,1024
#SIDE1 0 1,4,2,5,3
#SIDE2 1 1,4,2,5,3
#ORDER SIDES 
#LABEL MOR2
#BSH 4 BLM 15 EXM 1 DSM 194 DRM 191 AL0 0E0H AL1 0 OFS 2
#END
 
diskdef mor2
  seclen 1024     #= Sectors xx,512
  tracks 80       #= (Cylinders * Sides) = 40*1 = 40
  sectrk 5        #= Sectors 10,xxx
  sides alt
  blocksize 2048  #= (128*(BLM+1)) = 2048                               
  maxdir 192       #= (DRM+1) = 64
  datarate DD
  fm NO 
  skew 3          # may be 1, not sure = SKEW 2 = 2
  boottrk 2       #= OFS = 2
  os 2.2
end

#BEGIN MOR3  Morrow 8 (512 bytes/sector) - SSDD 8"
#DENSITY MFM, HIGH
#CYLINDERS 77 SIDES 1 SECTORS 15,512
#SIDE1 0 1,5,9,13,2,6,10,14,3,7,11,15,4,8,12
#BSH 4 BLM 15 EXM 0 DSM 280 DRM 127 AL0 0C0H AL1 0 OFS 2
#END
 
diskdef mor3
  seclen 512      #= Sectors xx,512
  tracks 77       #= (Cylinders * Sides) = 40*1 = 40
  sectrk 15       #= Sectors 10,xxx
  blocksize 2048  #= (128*(BLM+1)) = 2048                               
  maxdir 128      #= (DRM+1) = 64
  datarate DD
  fm NO 
  skew 4          # may be 1, not sure = SKEW 2 = 2
  boottrk 2       #= OFS = 2
  os 2.2
end

#BEGIN MOR4  Morrow 8 (1024 bytes/sector) - SSDD 8"
#SEE COM8
#BEGIN COM8  Compupro (Viasyn) 8/16 1,024 bytes/sector - SSDD 8"
#DENSITY MFM, HIGH
#CYLINDERS 77 SIDES 1 SECTORS 8,1024
#SIDE1 0 1,4,7,2,5,8,3,6
#BSH 4 BLM 15 EXM 0 DSM 299 DRM 127 AL0 0C0H AL1 0 OFS 2
#END 
diskdef mor4
  seclen 8        #= Sectors xx,512
  tracks 77       #= (Cylinders * Sides) = 40*1 = 40
  sectrk 1024     #= Sectors 10,xxx
  blocksize 2048  #= (128*(BLM+1)) = 2048                               
  maxdir 128      #= (DRM+1) = 64
  datarate DD
  fm NO 
  skew 3          # may be 1, not sure = SKEW 2 = 2
  boottrk 2       #= OFS = 2
  os 2.2
end

#BEGIN MOR5  Morrow 8 (1024 bytes/sector) - DSDD 8"
#SEE COM9
#BEGIN COM9  Compupro (Viasyn) 8/16 1,024 bytes/sector - DSDD 8"
#DENSITY MFM, HIGH
#CYLINDERS 77 SIDES 2 SECTORS 8,1024
#SIDE1 0 1,4,7,2,5,8,3,6
#SIDE2 1 1,4,7,2,5,8,3,6
#ORDER SIDES 
#BSH 4 BLM 15 EXM 0 DSM 599 DRM 255 AL0 0F0H AL1 0 OFS 4
#END

diskdef mor5
  seclen 1024     #= Sectors xx,512
  tracks 154      #= (Cylinders * Sides) = 40*1 = 40
  sectrk 8        #= Sectors 10,xxx
  sides alt
  blocksize 2048  #= (128*(BLM+1)) = 2048                               
  maxdir 256      #= (DRM+1) = 64
  datarate DD
  fm NO 
  skew 3          # may be 1, not sure = SKEW 2 = 2
  boottrk 2       #= OFS = 2
  os 2.2
end

#BEGIN MOR6  Morrow TurboDOS - DSDD 48 tpi 5.25"
#DENSITY MFM, LOW
#CYLINDERS 40 SIDES 2 SECTORS 4,1024
#SIDE1 0 1,2,3,4
#SIDE2 1 1,2,3,4
#ORDER SIDES 
#BSH 4 BLM 15 EXM 0 DSM 155 DRM 127 AL0 0C0H AL1 0 OFS 2
#END
 
diskdef mor6
  seclen 1024     #= Sectors xx,512
  tracks 80       #= (Cylinders * Sides) = 40*1 = 40
  sectrk 4        #= Sectors 10,xxx
  sides alt
  blocksize 2048  #= (128*(BLM+1)) = 2048                               
  maxdir 128      #= (DRM+1) = 64
  datarate DD
  fm NO 
  skew 1          # may be 1, not sure = SKEW 2 = 2
  boottrk 2       #= OFS = 2
  os 2.2
end

#BEGIN MOR7  Morrow MD3...CP/M Plus - DSDD 48 tpi 5.25"
#DENSITY MFM, LOW
#CYLINDERS 40 SIDES 2 SECTORS 5,1024
#SIDE1 0 1,4,2,5,3
#SIDE2 1 1,4,2,5,3
#ORDER SIDES 
#BSH 4 BLM 15 EXM 1 DSM 194 DRM 127 AL0 0C0H AL1 0 OFS 2
#END
 
diskdef mor7
  seclen 1024     #= Sectors xx,512
  tracks 80       #= (Cylinders * Sides) = 40*1 = 40
  sectrk 5        #= Sectors 10,xxx
  sides alt
  blocksize 2048  #= (128*(BLM+1)) = 2048                               
  maxdir 128      #= (DRM+1) = 64
  datarate DD
  fm NO 
  skew 3          # may be 1, not sure = SKEW 2 = 2
  boottrk 2       #= OFS = 2
  os 2.2
end

#BEGIN MOR8  Morrow 5/11/34 - SSDD 48 tpi 5.25"
#DENSITY MFM, LOW
#CYLINDERS 40 SIDES 1 SECTORS 5,1024
#SIDE1 0 1,4,2,5,3
#BSH 4 BLM 15 EXM 1 DSM 92 DRM 127 AL0 0C0H AL1 0 OFS 3
#END

diskdef mor8
  seclen 1024     #= Sectors xx,512
  tracks 40       #= (Cylinders * Sides) = 40*1 = 40
  sectrk 5        #= Sectors 10,xxx
  blocksize 2048  #= (128*(BLM+1)) = 2048                               
  maxdir 128       #= (DRM+1) = 64
  datarate DD
  fm NO 
  skew 3          # may be 1, not sure = SKEW 2 = 2
  boottrk 2       #= OFS = 2
  os 2.2
end

diskdef morrow-9x1024
  seclen 1024
  tracks 77
  sectrk 9
  blocksize 1024
  maxdir 128
  skew 3
  boottrk 2
  os 2.2
end

# BEGIN osb1sssd  Osborne 1 - SSSD 48 tpi 5.25" - 256 x 10
# Test OK - image size = 102,400, from Don Maslin's archive
diskdef osb1sssd
  seclen 256
  tracks 40
  sectrk 10
  blocksize 2048
  maxdir 64
  skew 2
  boottrk 3
  os 2.2
# DENSITY MFM ,LOW 
# BSH 4 BLM 15 EXM 1 DSM 45 DRM 63 AL0 080H AL1 0 OFS 3
end

# BEGIN ampdsdd  Ampro - DSDD 48 tpi 5.25" - 512 x 10
# Test OK - image size = 409,600, from Don Maslin's archive
diskdef ampdsdd
  seclen 1024
  tracks 80
  sectrk 5
  blocksize 2048
  maxdir 128
  skew 0
  boottrk 2
  os 2.2
  libdsk:format ampro400d
# DENSITY MFM ,LOW 
# BSH 4 BLM 15 EXM 1 DSM 194 DRM 127 AL0 0C0H AL1 0 OFS 2
end

# BEGIN ampdsdd80  Ampro - DSDD 96 tpi 5.25" - 512 x 10
# Test OK - image size = 819,200, from Don Maslin's archive
diskdef ampdsdd80
  seclen 1024
  tracks 160
  sectrk 5
  blocksize 2048
  maxdir 128
  skew 0
  boottrk 2
  os 2.2
  libdsk:format ampro800
# DENSITY MFM ,LOW 
# BSH 4 BLM 15 EXM 1 DSM 194 DRM 127 AL0 0C0H AL1 0 OFS 2
end

# BEGIN altdsdd  Altos - DSDD 5" - 512 x 9
# Test OK - both CP/M and MP/M - image size = 737,280, from Dave Dunfield
diskdef altdsdd
  seclen 512
  tracks 160
  sectrk 9
  blocksize 4096
  maxdir 177
  skew 0
  boottrk 2
  os 3
# DENSITY MFM ,HIGH 
# BSH 5 BLM 31 EXM 3 DSM 176 DRM 176 AL0 0C0H AL1 0 OFS 2
end

# BEGIN trsomsssd  TRS-80 Model 1, Omikron CP/M - SSSD 48 tpi 5.25" - 128 x 18
# Test OK - image size = 80,640, from TRS-80 Yahoo Group posting
diskdef trsomsssd
  seclen 128
  tracks 35
  sectrk 18
  blocksize 1024
  maxdir 64
  skew 4
  boottrk 3
  os 2.2
# DENSITY FM ,LOW 
# BSH 3 BLM 7 EXM 0 DSM 71 DRM 63 AL0 0C0H AL1 0 OFS 3
end

# Memotech type 03, ie: 3.5" or 5.25", D/S, D/D, S/T
# 40 tracks, 2 sides, 16 sectors/track, 256 bytes/sector
# Bytes on the media = 2*40*16*256 = 327680
# CP/M sees 26 128 byte records per track (similar to 8" disks).
# Tracks = 327680/(26*128) = 98
# Data is in 2048 byte blocks, on track 2 onwards
# Blocks = ((98-2)*26*128)/2048 = 156, which agrees with DPB

diskdef memotech-type03
  seclen 128
  tracks 98
  sectrk 26
  blocksize 2048
  maxdir 64
  skew 1
  boottrk 2
  os 2.2
end

# Memotech type 07, ie: 3.5" or 5.25", D/S, D/D, D/T
# 80 tracks, 2 sides, 16 sectors/track, 256 bytes/sector
# Bytes on the media = 2*80*16*256 = 655360
# CP/M sees 26 128 byte records per track (similar to 8" disks).
# Tracks = 655360/(26*128) = 196
# Data is in 2048 byte blocks, on track 2 onwards
# Blocks = ((196-2)*26*128)/2048 = 315, which agrees with DPB

diskdef memotech-type07
  seclen 128
  tracks 196
  sectrk 26
  blocksize 2048
  maxdir 128
  skew 1
  boottrk 2
  os 2.2
end

# Memotech type 43, ie: 1MB Silicon Disc
# CP/M sees 26 128 byte records per track
# Note: Unlike common practice with real physical disks, with real geometry,
#       the DPB for Silicon Discs includes blocks on the last incomplete track
# Tracks = 1048576/(26*128) = 315.07
# Data is in 4096 byte blocks, on track 2 onwards
# Blocks = (1048576-2*26*128)/4096 = 254, which agrees with DPB
# Blocks = ((315-2)*26*128)/4096 = 254, so we don't need the 0.07 track
diskdef memotech-type43
  seclen 128
  tracks 315
  sectrk 26
  blocksize 4096
  maxdir 256
  skew 1
  boottrk 2
  os 2.2
end

# Memotech type 47, ie: 2MB Silicon Disc
# CP/M sees 26 128 byte records per track
# Note: Unlike common practice with real physical disks, with real geometry,
#       the DPB for Silicon Discs includes blocks on the last incomplete track
# Tracks = 2097152/(26*128) = 630.15
# Data is in 4096 byte blocks, on track 2 onwards
# Blocks = (2097152-2*26*128)/4096 = 510, which agrees with DPB
# Blocks = ((630-2)*26*128)/4096 = 510, so we don't need the 0.15 track
diskdef memotech-type47
  seclen 128
  tracks 630
  sectrk 26
  blocksize 4096
  maxdir 256
  skew 1
  boottrk 2
  os 2.2
end

# Memotech type 4B, ie: 4MB Silicon Disc
# CP/M sees 26 128 byte records per track
# Note: Unlike common practice with real physical disks, with real geometry,
#       the DPB for Silicon Discs includes blocks on the last incomplete track
# Tracks = 4194304/(26*128) = 1260.3
# Data is in 4096 byte blocks, on track 2 onwards
# Blocks = (4194304-2*26*128)/4096 = 1022, which agrees with DPB
# Blocks = ((1260-2)*26*128)/4096 = 1022, so we don't need the 0.3 track
diskdef memotech-type4B
  seclen 128
  tracks 1260
  sectrk 26
  blocksize 4096
  maxdir 512
  skew 1
  boottrk 2
  os 2.2
end

# Memotech type 4F, ie: 8MB Silicon Disc
# CP/M sees 26 128 byte records per track
# Note: Unlike common practice with real physical disks, with real geometry,
#       the DPB for Silicon Discs includes blocks on the last incomplete track
# Tracks = 8388608/(26*128) = 2520.61
# Data is in 4096 byte blocks, on track 2 onwards
# Blocks = (8388608-2*26*128)/4096 = 2046, which agrees with DPB
# Blocks = ((2520-2)*26*128)/4096 = 2045, so we need the extra 0.61 track
diskdef memotech-type4F
  seclen 128
  tracks 2521
  sectrk 26
  blocksize 4096
  maxdir 512
  skew 1
  boottrk 2
  os 2.2
end

# Memotech type 18, ie: 8MB SD Card
# CP/M sees 26 128 byte records per track
# Note: Unlike common practice with real physical disks, with real geometry,
#       the DPB for SD Cards includes blocks on the last incomplete track
# Tracks = 8388608/(26*128) = 2520.61
# Data is in 4096 byte blocks, on track 2 onwards
# Blocks = (8388608-2*26*128)/4096 = 2046, which agrees with DPB
# Blocks = ((2520-2)*26*128)/4096 = 2045, so we need the extra 0.61 track
diskdef memotech-type18
  seclen 128
  tracks 2521
  sectrk 26
  blocksize 4096
  maxdir 512
  skew 1
  boottrk 2
  os 2.2
end

# Memotech type 19, ie: 8MB SD Card
diskdef memotech-type19
  seclen 128
  tracks 2521
  sectrk 26
  blocksize 4096
  maxdir 512
  skew 1
  boottrk 2
  os 2.2
  offset 8M
end

# Memotech type 1A, ie: 8MB SD Card
diskdef memotech-type1A
  seclen 128
  tracks 2521
  sectrk 26
  blocksize 4096
  maxdir 512
  skew 1
  boottrk 2
  os 2.2
  offset 16M
end

# Memotech type 1B, ie: 8MB SD Card
diskdef memotech-type1B
  seclen 128
  tracks 2521
  sectrk 26
  blocksize 4096
  maxdir 512
  skew 1
  boottrk 2
  os 2.2
  offset 24M
end

# Memotech type 1C, ie: 8MB SD Card
diskdef memotech-type1C
  seclen 128
  tracks 2521
  sectrk 26
  blocksize 4096
  maxdir 512
  skew 1
  boottrk 2
  os 2.2
  offset 32M
end

# Memotech type 1D, ie: 8MB SD Card
diskdef memotech-type1D
  seclen 128
  tracks 2521
  sectrk 26
  blocksize 4096
  maxdir 512
  skew 1
  boottrk 2
  os 2.2
  offset 40M
end

# Memotech type 1E, ie: 8MB SD Card
diskdef memotech-type1E
  seclen 128
  tracks 2521
  sectrk 26
  blocksize 4096
  maxdir 512
  skew 1
  boottrk 2
  os 2.2
  offset 48M
end

# Memotech type 1F, ie: 8MB SD Card
diskdef memotech-type1F
  seclen 128
  tracks 2521
  sectrk 26
  blocksize 4096
  maxdir 512
  skew 1
  boottrk 2
  os 2.2
  offset 56M
end

# Memotech type 50, ie: 256KB RAM Disc
# CP/M sees 26 128 byte records per track
# Note: Unlike common practice with real physical disks, with real geometry,
#       the DPB for RAM Discs includes blocks on the last incomplete track
# Tracks = 262144/(26*128) = 78.76
# Data is in 1024 byte blocks, on track 2 onwards
# Blocks = (262144-2*26*128)/1024 = 249, which agrees with DPB 
# Blocks = ((78-2)*26*128)/1024 = 247, so we need the extra 0.76 track
diskdef memotech-type50
  seclen 128
  tracks 79
  sectrk 26
  blocksize 1024
  maxdir 64
  skew 1
  boottrk 2
  os 2.2
end

# Memotech type 51, ie: 512KB RAM Disc
# CP/M sees 26 128 byte records per track
# Note: Unlike common practice with real physical disks, with real geometry,
#       the DPB for RAM Discs includes blocks on the last incomplete track
# Tracks = 524288/(26*128) = 157.53
# Data is in 2048 byte blocks, on track 2 onwards
# Blocks = (524288-2*26*128)/2048 = 252, which agrees with DPB
# Blocks = ((157-2)*26*128)/2048 = 251, so we need the extra 0.53 track
diskdef memotech-type51
  seclen 128
  tracks 158
  sectrk 26
  blocksize 2048
  maxdir 128
  skew 1
  boottrk 2
  os 2.2
end

# Memotech type 51, as used in Italy, ie: 480KB RAM Disc
# CP/M sees 26 128 byte records per track
# Note: Unlike common practice with real physical disks, with real geometry,
#       the DPB for RAM Discs includes blocks on the last incomplete track
# Tracks = 491520/(26*128) = 147.69
# Data is in 2048 byte blocks, on track 2 onwards
# Blocks = (491520-2*26*128)/2048 = 236, which agrees with DPB
# Blocks = ((147-2)*26*128)/2048 = 235, so we need the extra 0.69 track
diskdef memotech-type51-italy
  seclen 128
  tracks 148
  sectrk 26
  blocksize 2048
  maxdir 128
  skew 1
  boottrk 2
  os 2.2
end

# Memotech type 51, after S2R64.COM, ie: 448KB RAM Disc
# CP/M sees 26 128 byte records per track
# Note: Unlike common practice with real physical disks, with real geometry,
#       the DPB for RAM Discs includes blocks on the last incomplete track
# Tracks = 458752/(26*128) = 137.84
# Data is in 2048 byte blocks, on track 2 onwards
# Blocks = (458752-2*26*128)/2048 = 220, which agrees with DPB, after S2R64.COM
# Blocks = ((137-2)*26*128)/2048 = 219, so we need the extra 0.84 track
diskdef memotech-type51-s2r64
  seclen 128
  tracks 138
  sectrk 26
  blocksize 2048
  maxdir 128
  skew 1
  boottrk 2
  os 2.2
end

# Memotech type 51, after S2R.COM, ie: 144KB RAM Disc
# CP/M sees 26 128 byte records per track
# Note: Unlike common practice with real physical disks, with real geometry,
#       the DPB for RAM Discs includes blocks on the last incomplete track
# Tracks = 147456/(26*128) = 44.3
# Data is in 2048 byte blocks, on track 2 onwards
# Blocks = (147456-2*26*128)/2048 = 68, which agrees with DPB, after S2R.COM
# Blocks = ((44-2)*26*128)/2048 = 68, so we don't need the extra 0.3 track
diskdef memotech-type51-s2r
  seclen 128
  tracks 44
  sectrk 26
  blocksize 2048
  maxdir 128
  skew 1
  boottrk 2
  os 2.2
end

# Memotech type 52, ie: 320KB RAM Disc
# Added for REMEMOTECH
# CP/M sees 26 128 byte records per track
# Note: Unlike common practice with real physical disks, with real geometry,
#       the DPB for RAM Discs includes blocks on the last incomplete track
# Tracks = 327680/(26*128) = 98.46
# Data is in 2048 byte blocks, on track 2 onwards
# Blocks = (327680-2*26*128)/2048 = 156
# Blocks = ((98-2)*26*128)/2048 = 156, so we don't need the extra 0.46 track
# This type very deliberately and conveniently exactly matches type 03
diskdef memotech-type52
  seclen 128
  tracks 98
  sectrk 26
  blocksize 2048
  maxdir 64
  skew 1
  boottrk 2
  os 2.2
end

# Research Machines 380Z/480Z 5.25" "Single Density" or "MDS" format.
# All tracks are formatted FM 16x128.
diskdef rm-sd
  seclen 128
  tracks 40
  sectrk 16
  blocksize 1024
  maxdir 64
  skew 3
  boottrk 3
  os 2.2
end

# Research Machines 380Z/480Z 5.25" "Double Density" or "MD" format.
# Track 0 is formatted FM 16x128; 1+ are MFM 9x512.
# If you're working with an image file, make sure that track 0 is
# padded to be the same size as the other tracks.
diskdef rm-dd
  seclen 512
  tracks 40
  sectrk 9
  blocksize 1024
  maxdir 64
  skew 5
  boottrk 3
  os 2.2
end

# Research Machines 380Z/480Z 5.25" "Quad Density" or "MQ" format.
# Track 0 is formatted FM 16x128; 1+ are MFM 9x512.
diskdef rm-qd
  seclen 512
  tracks 80
  sectrk 9
  blocksize 2048
  maxdir 128
  skew 5
  boottrk 3
  os 2.2
end

#
# Ampro Little Board Z80 running CP/M 2.21
# BEGIN AMP1  Ampro - SSDD 48 tpi 5.25"
# DENSITY MFM, LOW
# CYLINDERS 40 SIDES 1 SECTORS 10,512 SKEW 2
# SIDE1 0 1,2,3,4,5,6,7,8,9,10
# BSH 4 BLM 15 EXM 1 DSM 94 DRM 63 AL0 080H AL1 0 OFS 2
# END
#
diskdef amp1
  seclen 512      #= Sectors xx,512
  tracks 40       #= (Cylinders * Sides) = 40*1 = 40
  sectrk 10       #= Sectors 10,xxx
  blocksize 2048  #= (128*(BLM+1)) = 2048
  maxdir 64       #= (DRM+1) = 64
  skew 0          #= SKEW 0
  boottrk 2       #= OFS = 2
  os 2.2
end

#BEGIN AMP2  Ampro - DSDD 48 tpi 5.25"
#DENSITY MFM, LOW
#CYLINDERS 40 SIDES 2
#SECTORS 10,512
#SKEW 2
#SIDE1 0 17,18,19,20,21,22,23,24,25,26
#SIDE2 1 17,18,19,20,21,22,23,24,25,26
#ORDER SIDES
#BSH 4 BLM 15 EXM 1 DSM 194 DRM 127 AL0 0C0H AL1 0 OFS 2
#END

# setfdprm /dev/fd0 DS DD ssize=512 cyl=40 sect=10 head=2
diskdef amp2
  seclen 512
  tracks 80
  sectrk 10
  blocksize 2048
  maxdir 128
  skew 0
  boottrk 2
  os 2.2
end

#BEGIN AMP3  Ampro - SSDD 96 tpi 3.5"
#DENSITY MFM, LOW
#CYLINDERS 80 SIDES 1 SECTORS 5,1024 SKEW 2
#SIDE1 0 1,2,3,4,5
#BSH 4 BLM 15 EXM 1 DSM 194 DRM 127 AL0 0C0H AL1 0 OFS 2
#END

# setfdprm /dev/fd0 SS DD ssize=1024 cyl=80 sect=5 head=1
diskdef amp3
  seclen 1024
  tracks 80
  sectrk 5
  blocksize 2048
  maxdir 128
  skew 0
  boottrk 2
  os 2.2
end

#BEGIN AMP4  Ampro - DSDD 96 tpi 3.5"
#DENSITY MFM, LOW
#CYLINDERS 80 SIDES 2 SECTORS 5,1024 SKEW 2
#SIDE1 0 17,18,19,20,21
#SIDE2 1 17,18,19,20,21
#ORDER SIDES
#BSH 4 BLM 15 EXM 0 DSM 394 DRM 255 AL0 0F0H AL1 0 OFS 2
#END

# setfdprm /dev/fd0 DS DD ssize=1024 cyl=80 sect=5 head=2
diskdef amp4
  seclen 1024
  tracks 160
  sectrk 5
  blocksize 2048
  maxdir 256
  skew 0
  boottrk 2
  os 2.2
end

#BEGIN AMP5  Ampro - SSDD 3.5"
#DENSITY MFM, LOW
#CYLINDERS 80 SIDES 1 SECTORS 5,1024 SKEW 2
#SIDE1 0 1,2,3,4,5
#BSH 4 BLM 15 EXM 1 DSM 194 DRM 127 AL0 0C0H AL1 0 OFS 2
#END

# setfdprm /dev/fd0 SS DD ssize=1024 cyl=80 sect=5 head=1
diskdef amp5
  seclen 1024
  tracks 80
  sectrk 5
  blocksize 2048
  maxdir 128
  skew 0
  boottrk 2
  os 2.2
end

#BEGIN AMP6  Ampro - DSDD 3.5"
#DENSITY MFM, LOW
#CYLINDERS 80 SIDES 2 SECTORS 5,1024 SKEW 2
#SIDE1 0 17,18,19,20,21
#SIDE2 1 17,18,19,20,21
#ORDER SIDES
#BSH 4 BLM 15 EXM 0 DSM 394 DRM 255 AL0 0F0H AL1 0 OFS 2
#END

# setfdprm /dev/fd0 DS DD ssize=1024 cyl=80 sect=5 head=2
diskdef amp6
  seclen 1024
  tracks 160
  sectrk 5
  blocksize 2048
  maxdir 256
  skew 0
  boottrk 2
  os 2.2
end

diskdef ampro800
  seclen 1024
  tracks 160
  sectrk 5
  blocksize 2048
  maxdir 256
  skew 0
  boottrk 2
  os 2.2
end

#BEGIN ZOR1  Zorba - DSDD 48 tpi 5.25"
#DENSITY MFM, LOW
#CYLINDERS 40 SIDES 2 SECTORS 10,512 SKEW 2
#SIDE1 0 1,2,3,4,5,6,7,8,9,10
#SIDE2 0 11,12,13,14,15,16,17,18,19,20
#ORDER SIDES 
#BSH 4 BLM 15 EXM 1 DSM 194 DRM 63 AL0 080H AL1 0 OFS 2
#END

#[zor1] 
#description = Zorba - DSDD 48 tpi 5.25"
#sides=alt
#cylinders = 80
#heads = 2
#sectors = 10
#secbase = 1
#secsize = 512
#datarate = DD
#rwgap = 12
#fmtgap = 23
#fm = N
#multitrack = N
#skipdeleted = Y

diskdef zor1
  seclen 512      #= Sectors xx,512
  tracks 80       #= (Cylinders * Sides) = 40*1 = 40
  sectrk 10       #= Sectors 10,xxx
  blocksize 2048  #= (128*(BLM+1)) = 2048                               
  maxdir 64       #= (DRM+1) = 64 
  skew 0          #= SKEW 0
  boottrk 2       #= OFS = 2
  os 2.2
end

#BEGIN ZOR2  Zorba - DSDD 96 tpi 5.25"
#DENSITY MFM, LOW
#CYLINDERS 80 SIDES 2 SECTORS 10,512 SKEW 2
#SIDE1 0 1,2,3,4,5,6,7,8,9,10
#SIDE2 0 11,12,13,14,15,16,17,18,19,20
#ORDER SIDES 
#BSH 5 BLM 31 EXM 3 DSM 194 DRM 127 AL0 080H AL1 0 OFS 2
#END

#[zor2]
#description = Zorba - DSDD 48 tpi 5.25"
#sides=alt
#cylinders = 160
#heads = 2
#sectors = 10
#secbase = 1
#secsize = 512
#datarate = DD
#rwgap = 12
#fmtgap = 23
#fm = N
#multitrack = N
#skipdeleted = Y

diskdef zor2
  seclen 512      #= Sectors xx,512
  tracks 160      #= (Cylinders * Sides) = 40*1 = 40
  sectrk 10       #= Sectors 10,xxx
  blocksize 4096  #= (128*(BLM+1)) = 2048                               
  maxdir 128      #= (DRM+1) = 64 
  skew 0          #= SKEW 0
  boottrk 2       #= OFS = 2
  os 2.2
end

#[zqq]
#description = Zorba qq - DSDD 48 tpi 5.25"
#sides=alt
#cylinders = 80
#heads = 2
#sectors = 9
#secbase = 1
#secsize = 512
#datarate = DD
#rwgap = 12
#fmtgap = 23
#fm = N
#multitrack = N
#skipdeleted = Y

diskdef zqq
  seclen 512      #= Sectors xx,512
  tracks 160      #= (Cylinders * Sides) = 40*1 = 40
  sectrk 9        #= Sectors 10,xxx
  blocksize 4096  #= (128*(BLM+1)) = 2048                               
  maxdir 128      #= (DRM+1) = 64 
  skew 0          #= SKEW 0
  boottrk 2       #= OFS = 2
  os 2.2
end

#BEGIN SIN1  Sinclair ZX Spectrum+3 DOS - DSDD 3.5"
#DENSITY MFM, LOW
#CYLINDERS 80 SIDES 2 SECTORS 9,512 SKEW 2
#SIDE1 0 1,2,3,4,5,6,7,8,9
#SIDE2 1 1,2,3,4,5,6,7,8,9
#ORDER SIDES LABEL AMS1
#BSH 4 BLM 15 EXM 0 DSM 356 DRM 255 AL0 0F0H AL1 0 OFS 1
#END
 
# Sinclair ZX SIN1
diskdef sin1
   seclen 512
   tracks 160
   sectrk 9
   blocksize 2048
   maxdir 256
   skew 0
   boottrk 1
   os 2.2
end

#BEGIN SIN2  Sinclair ZX Spectrum+3 CP/M 3.0 - SSDD 3.5"
#DENSITY MFM, LOW
#CYLINDERS 80 SIDES 1 SECTORS 9,512
#SIDE1 0 1,2,3,4,5,6,7,8,9
#BSH 3 BLM 7 EXM 0 DSM 175 DRM 63 AL0 0C0H AL1 0 OFS 1
#END

diskdef elwro
   seclen 512
   tracks 160
   sectrk 9
   blocksize 2048
   maxdir 256
   skew 1
   boottrk 2
   os 2.2
end

# Sinclair ZX SIN2
diskdef sin2
   seclen 512
   tracks 80
   sectrk 9
   blocksize 1024
   maxdir 64
   skew 0    # may be =1
   boottrk 1
   os 2.2
end

#BEGIN SIN3  Sinclair Spectrum ZX - SSDD 48 tpi 5.25"
#DENSITY MFM, LOW
#CYLINDERS 40 SIDES 1 SECTORS 16,256
#SIDE1 0 1,4,7,10,13,16,3,6,9,12,15,2,5,8,11,14
#BSH 3 BLM 7 EXM 0 DSM 159 DRM 31 AL0 080H AL1 0 OFS 0
#END
 
# Sinclair ZX 3
diskdef sin3
   seclen 256
   tracks 40
   sectrk 16
   blocksize 1024
   maxdir 32
   skew 0    # may be =1
   boottrk 1
   os 2.2
end

#BEGIN SIN4  Sinclair Spectrum ZX Lexor CP/M - DSDD 48 tpi 5.25"
#DENSITY MFM, LOW
#CYLINDERS 40 SIDES 2 SECTORS 16,256
#SIDE1 0 1,4,7,10,13,16,3,6,9,12,15,2,5,8,11,14
#SIDE2 1 1,4,7,10,13,16,3,6,9,12,15,2,5,8,11,14
#BSH 4 BLM 15 EXM 1 DSM 160 DRM 63 AL0 080H AL1 0 OFS 0
#END
# Sinclair ZX 4
diskdef sin4
   seclen 256
   tracks 80
   sectrk 16
   blocksize 2048
   maxdir 64
   skew 0    # may be =1
   boottrk 2
   os 2.2
end

