;Copyright (c) 1984, Morrow Designs, Inc., Bill Smith ;naming conventions: ; macros defined by DEFINE begin with the structure name MT, DPH, DPB, ; have the letter M in them, ; and end with the drive letter, ; as in DPBMA, the dpb for drive a ;this macro will compile DPBxxxx where xxxx is the drive type (see below) ;these macros generate labels which are the same as the macro name without M, ; as in DPBA: ; ;the following drive type codes are either defined or reserved: ; ;DSDD 5.25 inch double sided double density 48 tpi drive ;DSQD 5.25 inch double sided double density 96 tip drive ; ;CM11 Computer Memories Inc. Model 5412, 11 meg drive ;SA11 Shugart Associates, Model SA712 11 meg drive ;ST06 Seagate Model ST506 5 meg drive ;CM34 Computer Memories Inc. Model 6640, 34 meg drive ;---------------------------------------------------------------------- ;the define macro is called once for each drive. ;each time it is called it generates 3 new macros which are unique for ;the logical drive, and contain the logical drive's name. ;it generates macros which when used, create the MTAB, DPH, and DPB for the drive. define macro dv,typ mt&m&dv macro mt&dv: mt&typ endm dpbm&dv macro dpb&dv: dpb&typ endm dphm&dv macro dph&dv: dphgen dv endm xl&dv equ xl&typ csv&dv equ csv&typ endm table_gen macro typ drive aset 0 irpc dv,ABCDEFGHIJKLMNOP if drive lt drives drive aset drive+1 dw typ&dv else exitm endif endm endm struct_gen macro typ drive aset 0 irpc dv,ABCDEFGHIJKLMNOP if drive lt drives drive aset drive+1 &typ&m&dv dv else exitm endif endm endm ;---------------------------------------------------------------------- ;prototype data structures ;---------------------------------------------------------------------- ;prototype dph for all drives, do not change dphgen macro dv dw xl&dv ds 10,0 dw dpb&dv dw csv&dv dw -2,-2,-2,-2 db 0 endm ;---------------------------------------------------------------------- ;make an entry here for each drive type to define the name of the xlate xldsdd equ xlt1k ;standard floppy xlcm11 equ 0 ;no xlate ; ;make an entry here for each drive type to define the name of the csv csvdsdd equ -2 ;gencpm does it csvcm11 equ 0 ;none ;---------------------------------------------------------------------- ;prototype mtabs ;---------------------------------------------------------------------- mtdsdä macro ;media table (mtab) for standard Morrow 5.25 inch double sided double density drives ;see file HD??DEF.MAC for full description of field assignments db 10000100b ;virtual drive, double sided, drive address = 0 db 00100011b ;double density, 1024 bytes per sector db 00000000b ;reserved byte db 0 ;no park offset dw 40 ;40 cylinders db 6 /3 ;6 ms step rate db 15 /3 ;15 ms settling time db 6 /3 ;6 ms recal step rate db 0 /3 ;0 ms head load time db 500 /3 ;500 ms motor on time dw 23 ;starting track of write precompensation dw -1 ;starting track of write lo-current db 0 ;format type, odd track on alternate head endm mtcm11 macro ;media table (mtab) for standard Morrow 5.25 inch 11 meg winchester ;see file HD??DEF.MAC for full description of field assignments db 00101110b ;sector numbers start at 0, 4 heads, drive address = 2 db 01101111b ;drive has ready line, "double density", has bad map, has fast seek, 1k sectors db 00000000b ;reserved byte db 0 ;no park offset dw 306 ;306 cylinders db 0 /3 ;no step rate for fast seek db 765 /3 ;recal step rate is recal settling time, long time db 3 /3 ;1 ms recal step rate db 0 /3 ;0 ms head load time db 0 /3 ;0 ms motor on time dw 128 ;starting track of write precompensation dw 128 ;starting track of write lo-current db 0 ;format type, normal endm ;---------------------------------------------------------------------- ;prototype dpbs ;---------------------------------------------------------------------- dpbdsdd macro ;dpb for standard Morrow 5.25 inch 400k dsdd floppy dw 40 ;records per track db 4,0Fh ;2k blocks db 1 ;2 logical extents per physical extent dw 195-1 ;195*2k drive capacity = 390k (including directory) dw 192-1 ;192 directory entries in db 0E0h ; 3 blocks (2k blocks * 3)/32bytes/entry db 000h ; dw (192/4)-1 ;cks size dw 2 ;2 system tracks db 3,7 ;physical sectors are 1k each endm dpbcm11 macro ;dpb for standard Morrow 5.25 inch 11 meg winchesters dw 72 ;records per track db 5,1Fh ;4k blocks db 1 ;2 locical extents per physical extent dw (306-2)*36/4-1 ;306 cyl-2 reserved * 36sec/cyl / 4sec/grp - 1 = 11.2 million bytes dw 16*4*32-1 ;16 groups * 4k per group * 32 dirs per k = 2048 directory entries db 0FFh ;reserve 16 groups for directory (max) db 0FFh ; dw 8000h ;drive is permanent, no checking for cks dw 8 ;eight tracks (two cylinders) reserved for system and bad map db 3,7 ;physical sectors are 1k each endm