home *** CD-ROM | disk | FTP | other *** search
/ ftp.barnyard.co.uk / 2015.02.ftp.barnyard.co.uk.tar / ftp.barnyard.co.uk / cpm / walnut-creek-CDROM / CPM / ZCPR33 / A-R / BANKSYS1.LBR / MDST24.ZZ0 / MDST24.Z80
Text File  |  2000-06-30  |  14KB  |  449 lines

  1. ;++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  2.  .Title    'MDST24.Z80 / XL-M180 Floppy Drive Spec Tables / 27jan88'
  3.  .Sbttl    '(C) Copyright 1988 By W. Brimhall / Znode 52 (602)996-8739'
  4. ;++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  5.  
  6. ;Revisions:
  7. ;27jan88 - Revised for ZAS 3.0 and renamed to MDST24.Z80.
  8. ;30jul87 - Re-defined type code bit 4 to specify hi-dens 96tpi formats,
  9. ;       placed all 96tpi dst's in same table. Corrected tracks entry
  10. ;       on ICM5HD dst and renamed to MDST24.
  11. ;25apr87 - Added DST table for 5.25" high density drives & renamed
  12. ;       to MDST23. (Must use MFD23 or later floppy driver).
  13. ;09apr87 - Added ICM82 8" DSDD 512 sector with one reserved track and 
  14. ;       renamed to MDST22.
  15. ;20Jan87 - Placed dsttbl at start of this module and renamed to MDST21.
  16. ;27nov86 - Added access mode, base sector number & head id bytes to each 
  17. ;       DST for support of several additional formats. Combined with 
  18. ;       ZDST8F and Added Kpro4, Kpro96 and Ampro DST's. Made cylinder/
  19. ;       track entries 1 based for Turbodos. Renamed to MDST20.MAC for use
  20. ;       with MFD20.MAC floppy driver in both Turbodos and Zsystem.
  21. ;01Sep86 - Made BLKS 1 based to match the Tdos DST standard. (Also had
  22. ;       to modify ZDM2.MAC.) Renamed to ZD5F2.
  23. ;12Jul86 - Added comments to kpro2 dst.
  24. ;06Jul86 - Released as ZDST5F.
  25.  
  26.     name MDST24    ; Module id
  27.  
  28. ;DST size codes (2^n*128):
  29.  
  30. s128    equ 0        ;128
  31. s256    equ 1        ;256
  32. s512    equ 2        ;512
  33. s1024    equ 3        ;1024
  34. s2048    equ 4        ;2048
  35. s4096    equ 5        ;4096
  36.  
  37. ;These bits in the DST TYPE CODE byte are set true to 
  38. ;specify the following parameters:
  39.  
  40. tsd    equ 1 shl 2    ; 1= Two-sided
  41. mfm    equ 1 shl 3    ; 1= mfm
  42. hd    equ 1 shl 4    ; l= Hi density 
  43. tpi96    equ 1 shl 5    ; 1= 96tpi (not used)
  44. ibm    equ 1 shl 7    ; 1= IBM pc 9 sector (not used)
  45.  
  46. ;This bit in the block size byte is set true to
  47. ;specify the following parameter:
  48.  
  49. fixed    equ 1 shl 7        ; fixed media bit (block size)
  50.  
  51. ;These mode bytes specify how data is accessed on the diskette:
  52.  
  53. s0mod    equ 0        ;side0 mode= use side 0 only
  54. s1mod    equ 1        ;side1 mode= use side 1 only
  55. cylmod    equ 2        ;cylinder mode= second half of sectors are on side1
  56. trkmod    equ 3        ;track mode= odd tracks are on side1
  57.  
  58. ;The following DST value definitions differ depending on wheter the
  59. ;format is accessed in cylinder or track mode.
  60. ;
  61. ; CYLMOD:
  62. ; Dst+7= 1 based Sectors per cylinder (both sides of the disk)
  63. ; Dst+9= 1 based Cylinders (tracks on 1 side of disk)
  64. ;
  65. ; TRKMOD:
  66. ; Dst+7= 1 based Sectors per track (one side of the disk)
  67. ; Dst+9= 1 based Tracks (tracks on both sides of disk)
  68.  
  69. ; Dst+9 is the only value that is 0 based, all others are 1 based.
  70.  
  71. ;The head id byte specifies the value that was written to the head
  72. ;field in the sector id header when the diskette was formatted.
  73.  
  74. ;All DST entries are 1 based except for the sector translation
  75. ;tables which must use 0 based values.
  76.  
  77. ;--------------------
  78. ; DST pointer table.
  79. ;--------------------
  80.  
  81. ;The DSKAST table defines the physical disk assignments for the system. A
  82. ;floppy drive must have an entry in the table before it can be accessed.
  83. ;Each entry has a channel byte. For a floppy drive the high nibble defines 
  84. ;the DST table (0-7) and the low nibble defines the Unit number (0-3).
  85. ;When a disk is logged in, the system compares the ID info read off the disk 
  86. ;to the Type code, base sector numbers and head id bytes in each DST within 
  87. ;the table assigned to the drive. The first DST that matches is then selected.
  88.  
  89. ;Only uniquely detectable formats can be placed into the same DST table. DSTs
  90. ;that only differ by number of cylinders or number of reserved tracks must
  91. ;be placed into a seperate DST table. These formats must then be accessed as
  92. ;a different physical drive. The low nibble of the channel byte will select
  93. ;the same unit number, but the high nibble will select a different DST table.
  94.  
  95. ;The enty point for each DST table must be placed in the following pointer
  96. ;table. The high nibble of the Floppy channel byte uses these pointers to
  97. ;select which DST table (0-7) to use. (Drives with the same physical 
  98. ;parameters can share the same DST table.)
  99.  
  100. dsttbl::
  101.     dw dstbla    ; Dst 0= 5.25" 48 tpi
  102.     dw dstblb    ; Dst 1= 5.25" 96 tpi
  103.     dw dstblc    ; Dst 2= 8" 
  104.     dw 0,0,0,0,0    ; Dst 3 thru 7 undefined
  105.  
  106. ;------------------------------------------ 
  107. dstbla:: ;DST table for 5.25" 48tpi floppy
  108. ;------------------------------------------
  109.  
  110. ; + + + +  kpro2  + + + +
  111.  
  112. ;Kaypro 2, 512 byte sector, SS, DD, 48tpi
  113.  
  114. type    defl mfm or s512
  115.  
  116. kpro2::    dw kpro4        ; Pointer to next DST in table
  117.     db s1024        ; Media type / block size code
  118.     dw 195             ; Number of blocks (1 based)
  119.     db 2            ; Number of directory blocks
  120.     db s512            ; Phy sector size code
  121.     dw 10            ; Phy sectors per cylinder
  122.     dw 40            ; Cylinders
  123.     dw 1            ; Reserved tracks
  124.     dw 0            ; Translation table address
  125.     db type            ; Disk type code
  126.     db 1bh            ; Gap length
  127.     db s0mod        ; access side0 only
  128.     db 0,0            ; side0 base sector & head id
  129.  
  130. ; + + + +  kpro4  + + + +
  131.  
  132. ;Kaypro 4, 512 byte sector, DS, DD, 48tpi
  133.  
  134. type    defl mfm or tsd or s512
  135.  
  136. kpro4::    dw td482        ; Pointer to next DST in table
  137.     db s2048        ; Media type / block size code
  138.     dw 197             ; Number of blocks (1 based)
  139.     db 2            ; Number of directory blocks
  140.     db s512            ; Phy sector size code
  141.     dw 10            ; Phy sectors per track
  142.     dw 80            ; Tracks
  143.     dw 1            ; Reserved tracks
  144.     dw 0            ; Translation table address
  145.     db type            ; Disk type code
  146.     db 1bh            ; Gap length
  147.     db trkmod        ; odd tracks on side1
  148.     db 0,0            ; side0 base sector & head id
  149.     db 10,0            ; side1 base sector & head id
  150.  
  151. ; + + + +  td482  + + + +
  152.  
  153. ;Turbodos, 1024 byte sector, DS, DD, 48tpi
  154.  
  155. type    defl mfm or tsd or s1024
  156.  
  157. td482::    dw    td481        ; Disk spec table link pointer
  158.     db    s2048        ; Media / block size code
  159.     dw    200        ; Number of blocks (1 based)
  160.     db    2        ; Number of directory blocks
  161.     db    s1024        ; Physical sector size code
  162.     dw    10        ; Physical sectors per cylinder
  163.     dw    40        ; Cylinders
  164.     dw    0        ; Number of reserved cylinders
  165.     dw    0        ; Translation table address
  166.     db    type        ; Disk type code
  167.     db    35h        ; Gap length
  168.     db    cylmod        ; 2nd half of sectors on side1
  169.     db    1,0        ; side0 base sector & head id
  170.     db    1,1        ; side1 base sector & head id
  171.  
  172. ; + + + +  td481  + + + +
  173.  
  174. ;Turbodos, 1024 byte sector, SS, DD, 48tpi
  175.  
  176. type    defl mfm or s1024
  177.  
  178. td481::    dw    amp48        ; Disk spec table link pointer
  179.     db    s1024        ; Media type / Block size code
  180.     dw    200        ; Number of blocks (1 based)
  181.     db    2        ; Number of directory blocks
  182.     db    s1024        ; Physical sector size code
  183.     dw    5        ; Physical sectors per cylinder
  184.     dw    40        ; Cylinders
  185.     dw    0        ; Reserved cylinders
  186.     dw    0        ; Translation table address
  187.     db    type        ; Disk type code
  188.     db    35h        ; Gap length
  189.     db    s0mod        ; access side0 only
  190.     db    1,0        ; side0 base sector & head id
  191.  
  192. ; + + + +  amp48  + + + +
  193.  
  194. ;Ampro (MicroMint SB180), 512 byte sector, DS, DD, 48tpi
  195.  
  196. type    defl mfm or tsd or s512
  197.  
  198. amp48::    dw    0        ; Disk spec table link pointer
  199.     db    s2048        ; Media type / Block size code
  200.     dw    195        ; Number of blocks (1 based)
  201.     db    2        ; Number of directory blocks
  202.     db    s512        ; Physical sector size code
  203.     dw    10        ; Physical sectors per track
  204.     dw    80        ; Tracks
  205.     dw    2        ; Reserved tracks
  206.     dw    0        ; Translation table address
  207.     db    type        ; Disk type code
  208.     db    1bh        ; Gap length
  209.     db    trkmod        ; odd tracks on side1
  210.     db    17,0        ; side0 base sector & head id
  211.     db    17,1        ; side1 base sector & head id
  212.  
  213. ;------------------------------------------
  214. dstblb:: ;DST table for 5.25" 96tpi floppy 
  215. ;------------------------------------------
  216.  
  217. ; + + + +  td962  + + + +
  218.  
  219. ;Turbodos, 1024 byte sector, DS, DD, 96tpi
  220.  
  221. type    defl mfm or tsd or s1024
  222.  
  223. td962::    dw    td961        ; Link pointer to next dst
  224.     db    s2048        ; Media type / block size code
  225.     dw    400        ; Number of blocks (1 based)
  226.     db    4        ; Number of directory blocks
  227.     db    s1024        ; Physical sector size code
  228.     dw    10        ; Physical sectors per cylinder
  229.     dw    80        ; Cylinders
  230.     dw    0        ; Reserved cylinders
  231.     dw    0        ; Xlate table ptr
  232.     db     type        ; Disk type code
  233.     db    35h        ; Gap
  234.     db    cylmod        ; 2nd half of sectors on side1
  235.     db    1,0        ; side0 base sector & head id
  236.     db    1,1        ; side1 base sector & head id
  237.  
  238. ; + + + +  td961  + + + +
  239.  
  240. ;Turbodos, 1024 byte sector, SS, DD, 96tpi
  241.  
  242. type    defl mfm or s1024
  243.  
  244. td961::    dw    amp96        ; Link pointer to next dst
  245.     db    s2048        ; Media type / blk size code
  246.     dw    200        ; Number of blocks (1 based)
  247.     db    2        ; Number of directory blocks
  248.     db    s1024        ; Phy sect size code
  249.     dw    5        ; Phy sectors per cylinder
  250.     dw    80        ; Cylinders 
  251.     dw    0        ; Reserved cylinders
  252.     dw    0        ; Xlate table ptr
  253.     db     type        ; Disk type code
  254.     db    35h        ; Gap
  255.     db    s0mod        ; access side0 only
  256.     db    1,0        ; side0 base sector & head id
  257.  
  258. ; + + + +  amp96  + + + +
  259.  
  260. ;Ampro (Micromint SB180), 1024 byte sector, SS, DD, 96tpi
  261.  
  262. type    defl mfm or tsd or s1024
  263.  
  264. amp96::    dw    kp96        ; Link pointer to next dst
  265.     db    s2048        ; Media type / block size code
  266.     dw    395        ; Number of blocks (1 based)
  267.     db    4        ; Number of directory blocks
  268.     db    s1024        ; Physical sector size code
  269.     dw    5        ; Physical sectors per track
  270.     dw    160        ; Tracks 
  271.     dw    2        ; Reserved tracks
  272.     dw    0        ; Xlate table ptr
  273.     db     type        ; Disk type code
  274.     db    35h        ; Gap
  275.     db    trkmod        ; odd tracks on side1
  276.     db    17,0        ; side0 base sector & head id
  277.     db    17,1        ; side1 base sector & head id
  278.  
  279. ; + + + +  kpro96  + + + +
  280.  
  281. ;Kaypro, 512 byte sector, DS, DD, 96tpi
  282.  
  283. type    defl mfm or tsd or s512
  284.  
  285. kp96::    dw td5hd        ; Pointer to next DST in table
  286.     db s4096        ; Media type / block size code
  287.     dw 197             ; Number of blocks (1 based)
  288.     db 1            ; Number of directory blocks
  289.     db s512            ; Phy sector size code
  290.     dw 10            ; Phy sectors per track
  291.     dw 160            ; Tracks
  292.     dw 2            ; Reserved tracks
  293.     dw 0            ; Translation table address
  294.     db type            ; Disk type code
  295.     db 1bh            ; Gap length
  296.     db trkmod        ; odd tracks on side1
  297.     db 0,0            ; side0 base sector & head id
  298.     db 20,0            ; side1 base sector & head id
  299.  
  300. ; + + + +  td5hd  + + + +
  301.  
  302. ;Turbodos high density two sided format with no reserved tracks,
  303. ;1024 byte sector, double-density. (1.28meg)
  304.  
  305. ;(This is identical to the TDOS82 format below except 
  306. ;it has 3 more cylinders.)
  307.  
  308. type    defl hd or mfm or tsd or s1024 
  309.  
  310. td5hd::    dw    icm5hd        ; Disk spec table link pointer
  311.     db    s2048        ; Media type / Block size code
  312.     dw    640        ; Total blocks (1 based)
  313.     db    4        ; Number of directory blocks
  314.     db    s1024        ; Physical sector size code
  315.     dw    16        ; Physical sectors per cylinder
  316.     dw    80        ; Cylinders
  317.     dw    0        ; Reserved cylinders
  318.     dw    0        ; Translation table address
  319.     db    type        ; Disk type code
  320.     db    35h        ; Gap length
  321.     db    cylmod        ; cylinder access mode
  322.     db    1,0        ; side0 base sector & head id
  323.     db    1,1        ; side1 base sector & head id
  324.  
  325. ; + + + +  icm5hd  + + + +
  326.  
  327. ;Intercontiential Micro Systems high density 2 sided format,
  328. ;1 reserved track, 512 byte sector, double-density.
  329.  
  330. ;(This identical to the ICM82 8" format below.)
  331.  
  332. type     defl hd or mfm or tsd or s512
  333.  
  334. icm5hd::    
  335.     dw    0        ; Disk spec table link pointer
  336.     db    s4096        ; Media type / Block size
  337.     dw    308        ; Total blocks (1 based)
  338.     db    2        ; Number of directory blocks
  339.     db    s512        ; Physical sector size (2^n*128)
  340.     dw    16        ; Physical sectors per track
  341.     dw    160        ; Physical tracks per disk
  342.     dw    2        ; Reserved tracks
  343.     dw    0        ; Translation table address
  344.     db    type        ; Disk type code
  345.     db    1bh        ; Gap length
  346.     db    trkmod        ; Odd tracks on side 1
  347.     db    1,0        ; Side0 base sector & head id
  348.     db    1,1        ; Side1 base sector & head id
  349.  
  350. ;------------------------------------------
  351. dstblc:: ;table entry point for 8" floppys
  352. ;------------------------------------------
  353.  
  354. ; + + + +  tdos82  + + + +
  355.  
  356. ;Turbodos two sided format with no reserved tracks,
  357. ;1024 byte sector, double-density. (1.232meg)
  358.  
  359. type    defl mfm or tsd or s1024
  360.  
  361. tdos82::dw    tdos81        ; Disk spec table link pointer
  362.     db    s2048        ; Media type / Block size code
  363.     dw    616        ; Total blocks (1 based)
  364.     db    4        ; Number of directory blocks
  365.     db    s1024        ; Physical sector size code
  366.     dw    16        ; Physical sectors per cylinder
  367.     dw    77        ; Cylinders
  368.     dw    0        ; Reserved cylinders
  369.     dw    0        ; Translation table address
  370.     db    type        ; Disk type code
  371.     db    35h        ; Gap length
  372.     db    cylmod        ; cylinder access mode
  373.     db    1,0        ; side0 base sector & head id
  374.     db    1,1        ; side1 base sector & head id
  375.  
  376. ; + + + +  tdos81  + + + +
  377.  
  378. ;Turbodos one sided format with no reserved tracks,
  379. ;1024 byte sector, double-density.
  380.  
  381. type    defl mfm or s1024
  382.  
  383. tdos81::dw    icm82        ; Disk spec table link pointer
  384.     db    s2048        ; Media type / Block size code
  385.     dw    308        ; Total blocks (1 based)
  386.     db    3        ; Number of directory blocks
  387.     db    s1024        ; Physical sector size code
  388.     dw    8        ; Physical sectors per cylinder
  389.     dw    77        ; Cylinders
  390.     dw    0        ; Reserved cylinders
  391.     dw    0        ; Translation table address
  392.     db    type        ; Disk type code
  393.     db    35h        ; Gap length
  394.     db    s0mod        ; Use side0 only
  395.     db    1,0        ; side0 base sector & head id
  396.  
  397.  
  398. ; + + + + icm82  + + + +
  399.  
  400. ;Intercontiential Micro Systems 2 sided format,
  401. ;1 reserved track, 512 byte sector, double-density.
  402.  
  403. type     defl mfm or tsd or s512
  404.  
  405. icm82::    dw    ibm81        ; Disk spec table link pointer
  406.     db    s4096        ; Media type / Block size
  407.     dw    308        ; Total blocks (1 based)
  408.     db    2        ; Number of directory blocks
  409.     db    s512        ; Physical sector size (2^n*128)
  410.     dw    16        ; Physical sectors per track
  411.     dw    154        ; Physical tracks per disk
  412.     dw    2        ; Reserved tracks
  413.     dw    0        ; Translation table address
  414.     db    type        ; Disk type code
  415.     db    1bh        ; Gap length
  416.     db    trkmod        ; Odd tracks on side 1
  417.     db    1,0        ; Side0 base sector & head id
  418.     db    1,1        ; Side1 base sector & head id
  419.  
  420. ; + + + +  ibm81  + + + +
  421.  
  422. ;IBM Industry standard single-sided, single-density,
  423. ;128 byte sector, 2 reserved tracks.
  424.  
  425. type    defl s128
  426.  
  427. ibm81::    dw    0        ; Disk spec table link pointer
  428.     db    s1024        ; Media type / Block size code
  429.     dw    243        ; Total blocks (1 based)
  430.     db    2        ; Number of directory blocks
  431.     db    s128        ; Physical sector size code
  432.     dw    26        ; Physical sectors per cylinder
  433.     dw    77        ; Cylinders
  434.     dw    2        ; Reserved cylinders
  435.     dw    ibmxlt        ; Translation table address
  436.     db    type        ; Disk type code
  437.     db    7        ; Gap length
  438.     db    s0mod        ; use side0 only
  439.     db    1,0        ; side0 base sector & head id
  440.  
  441. ; single-density/single-sided sector translation table
  442. ; (Base sector is added to each value so they must be 0 based)
  443.  
  444. ibmxlt:    db    0,6,12,18,24,4,10,16,22
  445.     db    2,8,14,20,1,7,13,19,25
  446.     db    5,11,17,23,3,9,15,21
  447.  
  448.     end
  449.