;****************************************
;					*
;	DISK PARAMTER HEADERS & BLOCKS  *
;	Last changed: 12/19/84		*
;					*
;****************************************
;
;This module is assembled as part of the Headentr.a86 file.
;It includes the dph's and dpb's for the current configuration.
;
;
;
	DSEG
;
;
PUBLIC	CURRENT_RESKEW
PUBLIC	DPB8TBL,DPB5TBL
PUBLIC	X8TABLE,X5TABLE
PUBLIC	FMT8TBL,FMT5TBL
;
PUBLIC	FMT5DOS,DPB5DOS,FMT5DO3
;
PUBLIC	FMT5CPM1
;
PUBLIC	DPHMDRV, DPBMDRV
PUBLIC	LOG_PHY
;
PUBLIC	FLPSIGN
;
;
   if HARD
PUBLIC	NHARD
   endif
;
   if DISK2
PUBLIC	SIGNON2
   endif
;
   if DISK3
PUBLIC	SIGNON3
   endif
;
;==   floppy disk 0
	DB	0		; unit select byte
DPHF1	DW	XLT8D3,	0000h	; translate table
	DW	0000h, 0000h	; scratch area
	DW	DPBF8D7		; disk paramater table 
	DW	0FFFFh,	0FFFFh	; check, alloc vectors
	DW	0FFFFh		; dir buf control block
	DW	0FFFFh		; data buff cntrl block
	DW	0FFFFh		; hash table segment
;
;==  floppy disk 1
	DB	1		; unit select byte
DPHF2	DW	XLT8D3,	0000h	; translate table
	DW	0000h, 0000h	; scratch area
	DW	DPBF8D7		; disk paramater table
	DW	Offset DPH1_CSV	; check sum vector
	DW	0FFFFh		; alloc vectors
	DW	0FFFFh		; dir buf control block
	DW	0FFFFh		; data buff cntrl block
	DW	0FFFFh		; hash table segment
;
   if not FLOPPY5
;==  floppy disk 2
	DB	2		; unit select byte
DPHF3	DW	XLT8D3,	0000h	; translate table
	DW	0000h, 0000h	; scratch area
	DW	DPBF8D7		; disk paramater table
	DW	Offset DPH2_CSV	; check sum vector
	DW	0FFFFh		; alloc vectors
	DW	0FFFFh		; dir buf control block
	DW	0FFFFh		; data buff cntrl block
	DW	0FFFFh		; hash table segment
;
;==  floppy disk 3
	DB	3		; unit select byte
DPHF4	DW	XLT8D3,	0000h	; translate table
	DW	0000h, 0000h	; scratch area
	DW	DPBF8D7		; disk paramater table
	DW	Offset DPH3_CSV	; check sum vector
	DW	0FFFFh		; alloc vectors
	DW	0FFFFh		; dir buf control block
	DW	0FFFFh		; data buff cntrl block
	DW	0FFFFh		; hash table segment
;
   else
;==  floppy disk 2
	DB	2
DPHF3	DW	XLT5D3,0000h	; translate table
	DW	0000h,0000h	; scratch area
	DW	DPBF5D7		; disk parameter table
	DW	Offset DPH2_CSV	; check sum vector
	DW	0FFFFh		; alloc vectors
	DW	0FFFFh		; dir buf control block
	DW	0FFFFh		; data buff cntrl block
	DW	0FFFFh		; hash table segment
;
;==  floppy disk 3
	DB	3
DPHF4	DW	XLT5D3,0000h	; translate table
	DW	0000h,0000h	; scratch area
	DW	DPBF5D7		; disk parameter table
	DW	Offset DPH3_CSV	; check sum vector
	DW	0FFFFh		; alloc vectors
	DW	0FFFFh		; dir buf control block
	DW	0FFFFh		; data buff cntrl block
	DW	0FFFFh		; hash table segment
	
   endif
;
   if HARD and DISK2 and D2M20
; hard disk outer edge
	DB	010h		;Unit select 0
				;Upper nibble is drive data select (for disk2)
				;Lower nibble is drive unit #
DPHM20	DW	0000h, 0000h	; translate table
	DW	0000h, 0000h	; scratch area
	DW	DPBH1		; disk paramater table
	DW	0FFFFh		; check sum vector
	DW	0FFFFh		; alloc vectors
	DW	0FFFFh		; dir buf control block
	DW	0FFFFh		; data buff cntrl block
	DW	0FFFFh		; hash table segment
;
; hard disk middle
	DB	010h		;Unit select 0
DPHM21	DW	0000h, 0000h	; translate table
	DW	0000h, 0000h	; scratch area
	DW	DPBH2		; disk paramater table
	DW	0FFFFh		; check sum vector
	DW	0FFFFh		; alloc vectors
	DW	0FFFFh		; dir buf control block
	DW	0FFFFh		; data buff cntrl block
	DW	0FFFFh		; hash table segment
;
; hard disk near spindle
	DB	010h		;Unit select 0
DPHM22	DW	0000h, 0000h	; translate table
	DW	0000h, 0000h	; scratch area
	DW	DPBH3		; disk paramater table
	DW	0FFFFh		; check sum vector
	DW	0FFFFh		; alloc vectors
	DW	0FFFFh		; dir buf control block
	DW	0FFFFh		; data buff cntrl block
	DW	0FFFFh		; hash table segment
;
     if NDISK2 eq 2
; hard disk outer edge
	DB	021h		;Unit select 1
DPHM23	DW	0000h, 0000h	; translate table
	DW	0000h, 0000h	; scratch area
	DW	DPBH1		; disk paramater table
	DW	0FFFFh		; check sum vector
	DW	0FFFFh		; alloc vectors
	DW	0FFFFh		; dir buf control block
	DW	0FFFFh		; data buff cntrl block
	DW	0FFFFh		; hash table segment
;
; hard disk middle
	DB	021h		;Unit select 1
DPHM24	DW	0000h, 0000h	; translate table
	DW	0000h, 0000h	; scratch area
	DW	DPBH2		; disk paramater table
	DW	0FFFFh		; check sum vector
	DW	0FFFFh		; alloc vectors
	DW	0FFFFh		; dir buf control block
	DW	0FFFFh		; data buff cntrl block
	DW	0FFFFh		; hash table segment
;
; hard disk near spindle
	DB	021h		;Unit select 1
DPHM25	DW	0000h, 0000h	; translate table
	DW	0000h, 0000h	; scratch area
	DW	DPBH3		; disk paramater table
	DW	0FFFFh		; check sum vector
	DW	0FFFFh		; alloc vectors
	DW	0FFFFh		; dir buf control block
	DW	0FFFFh		; data buff cntrl block
	DW	0FFFFh		; hash table segment
;
     endif			; 
   endif
;
   if HARD and DISK2 and D2F40b
	DB	010h
DPHF40	DW	0000h,0000h
	DW	0000h,0000h
	DW	DPB_F40	
	DW	0FFFFh
	DW	0FFFFh
	DW	0FFFFh
	DW	0FFFFh
	DW	0FFFFh
;
	DB	010h
DPHF41	DW	0000h,0000h
	DW	0000h,0000h
	DW	DPB_F41	
	DW	0FFFFh
	DW	0FFFFh
	DW	0FFFFh
	DW	0FFFFh
	DW	0FFFFh
;
	DB	010h
DPHF42	DW	0000h,0000h
	DW	0000h,0000h
	DW	DPB_F42	
	DW	0FFFFh
	DW	0FFFFh
	DW	0FFFFh
	DW	0FFFFh
	DW	0FFFFh
;
	DB	010h
DPHF43	DW	0000h,0000h
	DW	0000h,0000h
	DW	DPB_F43	
	DW	0FFFFh
	DW	0FFFFh
	DW	0FFFFh
	DW	0FFFFh
	DW	0FFFFh
;
	DB	010h
DPHF44	DW	0000h,0000h
	DW	0000h,0000h
	DW	DPB_F44	
	DW	0FFFFh
	DW	0FFFFh
	DW	0FFFFh
	DW	0FFFFh
	DW	0FFFFh
;
     if NDISK2 eq 2
;
	DB	021h
DPHF45	DW	0000h,0000h
	DW	0000h,0000h
	DW	DPB_F40	
	DW	0FFFFh
	DW	0FFFFh
	DW	0FFFFh
	DW	0FFFFh
	DW	0FFFFh
;
	DB	021h
DPHF46	DW	0000h,0000h
	DW	0000h,0000h
	DW	DPB_F41	
	DW	0FFFFh
	DW	0FFFFh
	DW	0FFFFh
	DW	0FFFFh
	DW	0FFFFh
;
	DB	021h
DPHF47	DW	0000h,0000h
	DW	0000h,0000h
	DW	DPB_F42	
	DW	0FFFFh
	DW	0FFFFh
	DW	0FFFFh
	DW	0FFFFh
	DW	0FFFFh
;
	DB	021h
DPHF48	DW	0000h,0000h
	DW	0000h,0000h
	DW	DPB_F43	
	DW	0FFFFh
	DW	0FFFFh
	DW	0FFFFh
	DW	0FFFFh
	DW	0FFFFh
;
	DB	021h
DPHF49	DW	0000h,0000h
	DW	0000h,0000h
	DW	DPB_F44	
	DW	0FFFFh
	DW	0FFFFh
	DW	0FFFFh
	DW	0FFFFh
	DW	0FFFFh
;
     endif
   endif
;
;
  if HARD and DISK3 and D3ST506
	DB	0
DPHH30	DW	0000h,0000h
	DW	0000h,0000h
	DW	DPB_H30
	DW	0FFFFh
	DW	0FFFFh
	DW	0FFFFh
	DW	0FFFFh
	DW	0FFFFh
   endif
;
   if HARD and DISK3 and D3Q520
	DB	0
DPHH30	DW	0,0
	DW	0,0
	DW	DPB_H30
	DW	0FFFFh
	DW	0FFFFh
	DW	0FFFFh
	DW	0FFFFh
	DW	0FFFFh
	DW	0FFFFh
;
	DB	0
DPHH31	DW	0,0
	DW	0,0
	DW	DPB_H31
	DW	0FFFFh
	DW	0FFFFh
	DW	0FFFFh	
	DW	0FFFFh
	DW	0FFFFh
;
	DB	0
DPHH32	DW	0,0
	DW	0,0
	DW	DPB_H32
	DW	0FFFFh
	DW	0FFFFh
	DW	0FFFFh
	DW	0FFFFh
	DW	0FFFFh
;
	DB	0
DPHH33	DW	0,0
	DW	0,0
	DW	DPB_H33
	DW	0FFFFh
	DW	0FFFFh
	DW	0FFFFh
	DW	0FFFFh
	DW	0FFFFh
;
     if NDISK3 eq 2
;
	DB	1
DPHH34	DW	0,0
	DW	0,0
	DW	DPB_H30
	DW	0FFFFh
	DW	0FFFFh
	DW	0FFFFh
	DW	0FFFFh
	DW	0FFFFh
	DW	0FFFFh
;
	DB	1
DPHH35	DW	0,0
	DW	0,0
	DW	DPB_H31
	DW	0FFFFh
	DW	0FFFFh
	DW	0FFFFh	
	DW	0FFFFh
	DW	0FFFFh
;
	DB	1
DPHH36	DW	0,0
	DW	0,0
	DW	DPB_H32
	DW	0FFFFh
	DW	0FFFFh
	DW	0FFFFh
	DW	0FFFFh
	DW	0FFFFh
;
	DB	1
DPHH37	DW	0,0
	DW	0,0
	DW	DPB_H33
	DW	0FFFFh
	DW	0FFFFh
	DW	0FFFFh
	DW	0FFFFh
	DW	0FFFFh
	
     endif
   endif
;
   if HARD and DISK3 and (D3Q540 or D3Q80)
	DB	0
DPHH30	DW	0,0
	DW	0,0
	DW	DPB_H30
	DW	0FFFFh
	DW	0FFFFh
	DW	0FFFFh
	DW	0FFFFh
	DW	0FFFFh
	DW	0FFFFh
;
	DB	0
DPHH31	DW	0,0
	DW	0,0
	DW	DPB_H31
	DW	0FFFFh
	DW	0FFFFh
	DW	0FFFFh	
	DW	0FFFFh
	DW	0FFFFh
;
	DB	0
DPHH32	DW	0,0
	DW	0,0
	DW	DPB_H32
	DW	0FFFFh
	DW	0FFFFh
	DW	0FFFFh
	DW	0FFFFh
	DW	0FFFFh
;
	DB	0
DPHH33	DW	0,0
	DW	0,0
	DW	DPB_H33
	DW	0FFFFh
	DW	0FFFFh
	DW	0FFFFh
	DW	0FFFFh
	DW	0FFFFh
	
	DB	0
DPHH34	DW	0,0
	DW	0,0
	DW	DPB_H34
	DW	0FFFFh
	DW	0FFFFh
	DW	0FFFFh
	DW	0FFFFh
	DW	0FFFFh
;
     if NDISK3 eq 2
;
	DB	1
DPHH35	DW	0,0
	DW	0,0
	DW	DPB_H30
	DW	0FFFFh
	DW	0FFFFh
	DW	0FFFFh
	DW	0FFFFh
	DW	0FFFFh
	DW	0FFFFh
;
	DB	1
DPHH36	DW	0,0
	DW	0,0
	DW	DPB_H31
	DW	0FFFFh
	DW	0FFFFh
	DW	0FFFFh	
	DW	0FFFFh
	DW	0FFFFh
;
	DB	1
DPHH37	DW	0,0
	DW	0,0
	DW	DPB_H32
	DW	0FFFFh
	DW	0FFFFh
	DW	0FFFFh
	DW	0FFFFh
	DW	0FFFFh
;
	DB	1
DPHH38	DW	0,0
	DW	0,0
	DW	DPB_H33
	DW	0FFFFh
	DW	0FFFFh
	DW	0FFFFh
	DW	0FFFFh
	DW	0FFFFh
	
	DB	1
DPHH39	DW	0,0
	DW	0,0
	DW	DPB_H34
	DW	0FFFFh
	DW	0FFFFh
	DW	0FFFFh
	DW	0FFFFh
	DW	0FFFFh
;
     endif
   endif
;
; Memory disk (M-DRIVE)
	DB	0
DPHMDRV	DW	0000,0000h	;Translate table
	DW	0000h,0000h	;Scratch area
	DW	DPBMDRV		;Dsk parm block
	DW	Offset DPH2_CSV	; check sum vector
	DW	Offset DPHM_ALV	; alloc vectors
	DW	0FFFFh		;Dir buff cntrl	blk
	DW	0		;Data buff cntrl blk
	DW	0		;Hash table segment
;
DPH1_CSV	RB	256 / 4	+ 1	; ( drm/4 ) + 2
DPH2_CSV	RB	256 / 4	+ 1	; ( drm/4 ) + 2
DPH3_CSV	RB	256 / 4	+ 1
DPH4_CSV	RB	256 / 4	+ 1
;
;
HMDSMMAX EQU	8*(HMDDSM-1)-1		;Size of largest possible m-drive/h
DPHM_ALV RB	((HMDSMMAX/8)+1)*2	;Allocation vector for biggest drive
;
;
;
CURRENT_RESKEW	DW	0
;
eject
;****************************************************************
;*	DISK LOGICAL TO PHYSICAL SECTOR TRANSLATION TABLES	*
;****************************************************************
;
;
	DW	Offset DPB8TBL
FMT8TBL	DW	Offset FMT8TYP0		;Pointer to type "0" entry
	DW	Offset FMT8TYP1		;Pointer to type "1" entry
	DW	Offset FMT8TYP2		;Pointer to type "2" entry
	DW	Offset FMT8TYP3		;Pointer to type "3" entry
;
X8TABLE	RS	0
;		GPL1,	GPL2,	Physical sectors/track
FMT8TYP0 DW  XLT8S0				;Single 128
	 DW  RE_SKEW8_26_2			;Reskew table
	 DB	26,	  2			;Maximum sector xlate size,directory track 
	 DB	07h,	 1Bh,	 26,	0	;Format information "header"
;
FMT8TYP1 DW  XLT8D1				;Double 256
	 DW  RE_SKEW8_26_2			;Reskew table
	 DB	26,	  2			;Maximum sector xlate size,directory track 
	 DB	0Eh,	 36h,	 26,	0
;
FMT8TYP2 DW  XLT8D2				;Double 512
	 DW  RE_SKEW8_15_2			;Reskew table
	 DB	15,	  2			;Maximum sector xlate size,directory track 
	 DB	1Bh,	 54h,	 15,	0
;
FMT8TYP3 DW  XLT8D3				;Double 1024
	 DW  RE_SKEW8_8_2			;Reskew table
	 DB	 8,	  2			;Maximum sector xlate size,directory track 
	 DB	35h,	 74h,	 08,	0
;---------------------------------------
XLT8S0	DB	 0, 6,12,18,24,	4,10,16
	DB	22, 2, 8,14,20,	1, 7,13
	DB	19,25, 5,11,17,23, 3, 9
	DB	15,21
;---------------------------------------
XLT8D1	DB	 0, 9,18, 1,10,19, 2,11
	DB	20, 3,12,21, 4,13,22, 5
	DB	14,23, 6,15,24,	7,16,25
	DB	 8,17
;---------------------------------------
XLT8D2	DB	 0, 4, 8,12, 1,	5, 9,13
	DB	 2, 6,10,14, 3,	7,11
;---------------------------------------
XLT8D3	DB	0,3,6,1,4,7,2,5
;
;=======================================
;
RE_SKEW8_26_3	RS	0
	DB	0,3,6, 9,12,15,18,21,24
	DB	1,4,7,10,13,16,19,22,25
	DB	2,5,8,11,14,17,20,23
;---------------------------------------
;
RE_SKEW8_26_2	RS	0
	DB	0,2,4,6,8,10,12,14,16,18,20,22,24
	DB	1,3,5,7,9,11,13,15,17,19,21,23,25
;---------------------------------------
;
RE_SKEW8_15_2	RS	0
	DB	0,2,4,6,8,10,12,14
	DB	1,3,5,7,9,11,13
;---------------------------------------
;
RE_SKEW8_8_2	RS	0
	DB	0,2,4,6
	DB	1,3,5,7
;
;=======================================
	DW	Offset DPB5TBL		;Pointer to disk parameter block base
FMT5TBL	DW	Offset FMT5TBL0
	DW	Offset FMT5TBL1
	DW	Offset FMT5TBL2
	DW	Offset FMT5TBL3
;
X5TABLE	RS	0
;		GPL1,	GPL2,	Physical sectors/track, format info
FMT5TBL0 DW  XLT5S0			;Single 128
	 DW  RE_SKEW5_16_2		;Reskew table
	 DB	18,	4		;Xlate table size, directory track 
	 DB	08h,   10h,  16, 11000010b ;Format information
;
FMT5TBL1 DW  XLT5D1			  ;Double 256
	 DW  RE_SKEW5_16_2		;Reskew table
	 DB	20,	4		;Xlate table size, directory track 
	 DB	10h,  19h,  16,	 11000111b
;
;		IBM-PC, CP/M-86 -- DSDD
FMT5TBL2 DW  XLT5D2			  ;Double 512
	 DW  RE_SKEW5_8_2			;Reskew table
	 DB	10,	4		;Xlate table size, directory track 
	 DB	2Ah,   50h,  08, 10001001b
;
FMT5TBL3 DW  XLT5D3			;Double 1024
	 DW  RE_SKEW5_5_2		;Reskew table
	 DB	6,	4		;Xlate table size, directory track 
	 DB	20h,   32h,  05, 11000111b
;---------------------------------------
XLT5S0	DB	 0, 5,10,15, 4,	9,14, 3		
	DB	 8,13, 2, 7,12,	1, 6,11		
	DB	00,00		;Additional space for other allocations
;		|----5---10---15---20---25---30-|
	DB	'CompuPro default	  Single',0
;---------------------------------------
XLT5D1	DB	 0, 5,10,15, 4,	9,14, 3	
	DB	 8,13, 2, 7,12,	1, 6,11	
	DB	 0,0,0,0	;Additional space for other allocations	
;		|----5---10---15---20---25---30-|
	DB	'CompuPro default	  Double',0
;---------------------------------------
XLT5D2	RS	0
	DB	 0, 1, 2, 3, 4	
	DB	 5, 6, 7,00,00	  
;		|----5---10---15---20---25---30-|
	DB	'IBM-PC  CP/M-86         Double',0
;---------------------------------------
XLT5D3	DB	0,2,4,1,3
	DB	0	 
;		|----5---10---15---20---25---30-|
	DB	'CompuPro default	  Double',0
;
;======================================
;
RE_SKEW5_16_2	RS	0
	DB	0,2,4,6,8,10,12,14
	DB	1,3,5,7,9,11,13,15
	DB	0,0
;--------------------------------------
;
RE_SKEW5_16_3	RS	0
	DB	0, 3, 6, 9,12,15
	DB	1, 4, 7,10,13
	DB	2, 5, 8,11,14
	DB	0, 0, 0, 0, 0
;--------------------------------------
;
RE_SKEW5_8_2	RS	0
	DB	0,2,4,6
	DB	1,3,5,7
	DB	0,0
;--------------------------------------
RE_SKEW5_8_3	RS	0
	DB	0, 3, 6
	DB	1, 4, 7
	DB	2, 5
	DB	0, 0
;--------------------------------------
;
RE_SKEW5_5_2	RS	0
	DB	0,2,4
	DB	1,3
	DB	0
;--------------------------------------
RE_SKEW5_5_3	RS	0
	DB	0, 3
	DB	1, 4
	DB	2
	DB	0
;======================================
;
;=================================
;Format tables for IBMPC Diskettes
;=================================
;
;The format of information in these tables is the same as that 
; for other 5 1/4 inch diskettes. However, indexing into the table 
; is carried out using the fat_id byte or the floppy type byte
; instead of the N field (See FD.A86 for details).
; All IBMPC formats use 512 byte sectors.
;
FMT5DOS	DW	Offset FMT5DO0
	DW	Offset FMT5DO1
	DW	Offset FMT5DO2
	DW	Offset FMT5DO3
	DW	Offset FMT5CPM0
	DW	Offset FMT5CPM1
;
;	GPL1, GPL2, Physical Sectors/Track, Format Info
;
FMT5DO0	DW	XLTD5DO2		;Dos 2.0 single side, 9 sector/track
	DW	RE_SKEW5_DO2
	DB	10,4			;Xlate table size, dir track (necessary?)
	DB	10h,19h,09,10000000b
;
FMT5DO1	DW	XLTD5DO2		;Dos 2.0 double side, 9 sector/track
	DW	RE_SKEW5_DO2
	DB	10,4
	DB	10h,19h,09,10000101b
;
FMT5DO2	DW	XLTD5DO1		;Dos 1.x single side, 8 sector/track
	DW	RE_SKEW5_DO1
	DB	10,4
	DB	2Ah,50h,08,10000000b
;
FMT5DO3	DW	XLTD5DO1		;Dos 1.x double side, 8 sector/track
	DW	RE_SKEW5_DO1
	DB	10,4
	DB	2Ah,50h,08,10000101b
;
FMT5CPM0:
	DW	XLTD5CPM		;Ibm-pc cp/m single sided, 8 spt 
	DW	RE_SKEW5_DO1
	DB	10,4
	DB	2Ah,50h,08,10000000b
;
FMT5CPM1:
	DW	XLTD5CPM		;Ibm-pc cp/m double side, 8 spt
	DW	RE_SKEW5_DO1
	DB	10,4
	DB	2Ah,50h,08,10001001b
;-----------------------------------
XLTD5DO2 DB	0,1,2,3,4
	DB	5,6,7,8,0
;		|----5---10---15---20---25---30-|
	DB	'IBM-PC DOS 2.x           Double',0
;-----------------------------------
XLTD5DO1 DB	0,1,2,3,4
	DB	5,6,7,0,0
;		|----5---10---15---20---25---30-|
	DB	'IBM-PC DOS 1.x           Double',0
;------------------------------------
XLTD5CPM DB	0,1,2,3,4
	DB	5,6,7,0,0
;		|----5---10---15---20---25---30-|
	DB	'IBM-PC CP/M              Double',0
;===================================
;
RE_SKEW5_DO2	RS	0
	DB	0,2,4,6,8
	DB	1,3,5,7,0
;-----------------------------------
;
RE_SKEW5_DO1	RS	0
	DB	0,2,4,6
	DB	1,3,5,7
	DB	0,0
;===================================
;
;
;********************************************************
;							*
; DISK PARAMETER BLOCKS					*
;							*
;********************************************************
;
; Control Blocks (DPB's in CP/M-eze) for disk drives:
 noiflist 
;
;
DPB8TBL	RS	0
;
; 128 BYTE SECTORS, 26 BY 1 SIDE.
DSM8S0	EQU  (1*26*(77-2))/BZ1K		;Disk allocation vector size
ALV8S0	EQU	(DSM8S0	+7)/8
CSV8S0	EQU	(64 + 3)/4		;Disk checksum vector size of directory
	DB	0			;Type = 0
DPBF8S0	DW	26			;Sectors/track
	DB	3, 00000111b, 0		;Block extent size, mask, extra count 
	DW	DSM8S0-1,	64 -1	;Drive, directory size
	DB	11000000b,00000000b	;Directory allocation bits
	DW	CSV8S0+8000h,	2 * 1	;Checksum vector size, reserved tracks
	DB	0,	0		;Psm, psh for 128 byte sectors
;
; 128 BYTE SECTORS, 26 BY 2 SIDES.
DSM8S1	EQU  (2*26*(77-2))/BZ2K		;Disk allocation vector size
ALV8S1	EQU	(DSM8S1	+7)/8
CSV8S1	EQU	(128 + 3)/4		;Disk directory checksum vector size
	DB	1			;Type = 1
DPBF8S1	DW	26			;Sectors/track
	DB	3, 00000111b, 0		;Block extent size, mask, extra count 
	DW	DSM8S1-1,	128 -1	;Drive, directory size
	DB	11000000b,00000000	;Directory allocation bits
	DW	CSV8S1+8000h, 2	* 2	;Checksum vector size, reserved tracks
	DB	0,	0		;Psm, psh for 128 byte sectors
;
; 256 BYTE SECTORS, 26 BY 1 SIDE.
DSM8D2	EQU  (2*26*(77-2))/BZ2K		;Disk allocation vector size
ALV8D2	EQU	(DSM8D2	+7)/8
CSV8D2	EQU	(128 + 3)/4		;Disk checksum vector size of directory
	DB	2			;Type = 2
DPBF8D2	DW	26			;Sectors/track
	DB	4, 00001111b, 0		;Block extent size, mask, extra count 
	DW	DSM8D2-1,	128 -1	;Drive, directory size
	DB	11000000b,00000000b	;Directory allocation bits
	DW	CSV8D2+8000h, 2	* 1	;Checksum vector size, reserved tracks
	DB	1,	1		;Psm, psh for 256 byte sectors
;
; 256 BYTE SECTORS, 26 BY 2 SIDES.
DSM8D3	EQU  (4*26*(77-2))/BZ2K	;Disk allocation vector size
ALV8D3	EQU	(DSM8D3	+7)/8
CSV8D3	EQU	(256 + 3)/4		;Disk directory checksum vector size
	DB	3			;Type = 3
DPBF8D3	DW	26			;Sectors/track
	DB	4, 00001111b, 0		;Block extent size, mask, extra count 
	DW	DSM8D3-1,	256 -1	;Drive, directory size
	DB	11110000b,00000000b	;Directory allocation bits
	DW	CSV8D3+8000h, 2	* 2	;Checksum vector size, reserved tracks
	DB	1,	1		;Psm, psh for 256 byte sectors
;
; 512 BYTE SECTORS, 15 BY 1 SIDE.
DSM8D4	EQU  (4*15*(77-2))/BZ2K	;Disk allocation vector size
ALV8D4	EQU	(DSM8D4	+7)/8
CSV8D4	EQU	(128 + 3)/4		;Disk checksum vector size of directory
	DB	4			;Type = 4
DPBF8D4	DW	15			;Sectors/track
	DB	4, 00001111b, 0		;Block extent size, mask, extra count 
	DW	DSM8D4-1,	128 -1	;Drive, directory size
	DB	11000000b,00000000b	;Directory allocation bits
	DW	CSV8D4+8000h, 2	* 1	;Checksum vector size, reserved tracks
	DB	2,	3		;Psm, psh for 512 byte sectors
;
;
; 512 BYTE SECTORS, 15 BY 2 SIDES.
DSM8D5	EQU  (8*15*(77-2))/BZ2K	;Disk allocation vector size
ALV8D5	EQU	(DSM8D5	+7)/8
CSV8D5	EQU	(256 + 3)/4		;Disk directory checksum vector size
	DB	5			;Type = 5
DPBF8D5	DW	15			;Sectors/track
	DB	4, 00001111b, 0		;Block extent size, mask, extra count 
	DW	DSM8D5-1,	256 -1	;Drive, directory size
	DB	11110000b,00000000b	;Directory allocation bits
	DW	CSV8D5+8000h, 2	* 2	;Checksum vector size, reserved tracks
	DB	2,	3		;Psm, psh for 512 byte sectors
;
;
; 1024 BYTE SECTORS, 8 BY 1 SIDE.
DSM8D6	EQU  (8* 8*(77-2))/BZ2K	;Disk allocation vector size
ALV8D6	EQU	(DSM8D6	+7)/8
CSV8D6	EQU	(128 + 3)/4		;Disk checksum vector size of directory
	DB	6			;Type = 6
DPBF8D6	DW	8			;Sectors/track
	DB	4, 00001111b, 0		;Block extent size, mask, extra count 
	DW	DSM8D6-1,	128 -1	;Drive, directory size
	DB	11000000b,00000000b	;Directory allocation bits
	DW	CSV8D6+8000h, 2	* 1	;Checksum vector size, reserved tracks
	DB	3,	7		;Psm, psh for 1024 byte sectors
;
; 1024 BYTE SECTORS, 8 BY 2 SIDES.
DSM8D7	EQU  (8*16*(77-2))/BZ2K	;Disk allocation vector size
ALV8D7	EQU	(DSM8D7	+7)/8
CSV8D7	EQU	(256 + 3)/4		;Disk directory checksum vector size
	DB	7			;Type = 7
DPBF8D7	DW	8			;Sectors/track
	DB	4, 00001111b, 0		;Block extent size, mask, extra count 
	DW	DSM8D7-1,	256 -1	;Drive, directory size
	DB	11110000b,00000000b	;Directory allocation bits
	DW	CSV8D7+8000h, 2	* 2	;Checksum vector size, reserved tracks
	DB	3,	7		;Psm, psh for 1024 byte sectors
;
;--------------------------------------
;
DPB5TBL	RS	0
;
;Bias for DPB type detrmination
BIAS5	EQU	FD5TYPE+8*(HEADS5/2) + 16*(TRK5/80)
;
; 128 BYTE SECTORS, 16 BY 1 SIDE.
DSM5S0	EQU  (1*16*(TRK5-2))/BZ1K	;Disk allocation vector size
ALV5S0	EQU	(DSM5S0	+7)/8
CSV5S0	EQU	(64 + 3)/4		;Disk checksum vector size of directory
	DB	BIAS5+0			;Type = 0
DPBF5S0	DW	16			;Sectors/track
	DB	3, 00000111b, 0		;Block extent size, mask, extra count 
	DW	DSM5S0-1,	64 -1	;Drive, directory size
	DB	11000000b,00000000b	;Directory allocation bits
	DW	CSV5S0+8000h,	2 * 1	;Checksum vector size, reserved tracks
	DB	0,	0		;Psm, psh for 128 byte sectors
;
; 128 BYTE SECTORS, 16 BY 2 SIDES.
DSM5S1	EQU  (2*16*(TRK5-2))/BZ2K	;Disk allocation vector size
ALV5S1	EQU	(DSM5S1	+7)/8
CSV5S1	EQU	(128 + 3)/4		;Disk directory checksum vector size
	DB	BIAS5+1			;Type = 1
DPBF5S1	DW	16			;Sectors/track
	DB	3, 00000111b, 0		;Block extent size, mask, extra count 
	DW	DSM5S1-1,	128 -1	;Drive, directory size
	DB	11000000b,00000000	;Directory allocation bits
	DW	CSV5S1+8000h, 2	* 2	;Checksum vector size, reserved tracks
	DB	0,	0		;Psm, psh for 128 byte sectors
;
; 256 BYTE SECTORS, 16 BY 1 SIDE.
DSM5D2	EQU  (2*16*(TRK5-2))/BZ2K	;Disk allocation vector size
ALV5D2	EQU	(DSM5D2	+7)/8
CSV5D2	EQU	(128 + 3)/4		;Disk checksum vector size of directory
	DB	BIAS5+2			;Type = 2
DPBF5D2	DW	2 * 16			;Sectors/track
	DB	4, 00001111b, 0		;Block extent size, mask, extra count 
	DW	DSM5D2-1,	128 -1	;Drive, directory size
	DB	11000000b,00000000b	;Directory allocation bits
	DW	CSV5D2+8000h, 2	* 1	;Checksum vector size, reserved tracks
	DB	1,	1		;Psm, psh for 256 byte sectors
;
; 256 BYTE SECTORS, 16 BY 2 SIDES.
DSM5D3	EQU  (4*16*(TRK5-2))/BZ2K	;Disk allocation vector size
ALV5D3	EQU	(DSM5D3	+7)/8
CSV5D3	EQU	(256 + 3)/4		;Disk directory checksum vector size
	DB	BIAS5+3			;Type = 3
DPBF5D3	DW	16			;Sectors/track
	DB	4, 00001111b, 0		;Block extent size, mask, extra count 
	DW	DSM5D3-1,	256 -1	;Drive, directory size
	DB	11110000b,00000000b	;Directory allocation bits
	DW	CSV5D3+8000h, 2	* 2	;Checksum vector size, reserved tracks
	DB	1,	1		;Psm, psh for 256 byte sectors
;
;=======================================================
;
;		IBM-PC, CPM-86 -- SSDD
; Double density, 512 byte sectors, 8 by 1 side
;
DSM5D4	EQU  (4* 8*(40-1))/BZ1K		;Disk allocation vector size
CSV5D4	EQU	(64 + 3)/4		;Disk checksum vector size of directory
	DB	BIAS5+4			;Type = 4
DPBF5D4	DW	8			;Sectors/track
	DB	3, 00000111b, 0		;Block extent size, mask, extra count 
	DW	DSM5D4-1,	64 -1	;Drive, directory size
	DB	10000000b,00000000b	;Directory allocation bits
	DW	CSV5D4+8000h,  1	;Checksum vector size, reserved tracks
	DB	2,	3		;Psm, psh for 512 byte sectors
;
;=======================================================
;
;		IBM-PC, CP/M-86 -- DSDD
; Double density, 512 byte sectors, 8 by 2 sides
;
	DB	BIAS5+5
DPBF5D5	DW	8
	DB	4, 00001111b, 1
	DW	((4 * 8	* (80 -	1))/BZ2K)-1,	64 -1
	DB	10000000b,00000000b
	DW	8000h+ 64 / 4, 1
	DB	2,	3		;Psm, psh for 512 byte sectors
;
;
; 1024 BYTE SECTORS, 5 BY 1 SIDE.
DSM5D6	EQU  (8* 5*(TRK5-2))/BZ2K	;Disk allocation vector size
ALV5D6	EQU	(DSM5D6	+7)/8
CSV5D6	EQU	(128 + 3)/4		;Disk checksum vector size of directory
	DB	BIAS5+6			;Type = 6
DPBF5D6	DW	5			;Sectors/track
	DB	4, 00001111b, 0		;Block extent size, mask, extra count 
	DW	DSM5D6-1,	128 -1	;Drive, directory size
	DB	11000000b,00000000b	;Directory allocation bits
	DW	CSV5D6+8000h, 2	* 1	;Checksum vector size, reserved tracks
	DB	3,	7		;Psm, psh for 1024 byte sectors
;
; 1024 BYTE SECTORS, 5 BY 2 SIDES.
DSM5D7	EQU  (16*5*(TRK5-2))/BZ2K	;Disk allocation vector size
ALV5D7	EQU	(DSM5D7	+7)/8
CSV5D7	EQU	(256 + 3)/4		;Disk directory checksum vector size
	DB	BIAS5+7			;Type = 7
DPBF5D7	DW	5			;Sectors/track
	DB	4, 00001111b, 0		;Block extent size, mask, extra count 
	DW	DSM5D7-1,	256 -1	;Drive, directory size
	DB	11110000b,00000000b	;Directory allocation bits
	DW	CSV5D7+8000h, 2	* 2	;Checksum vector size, reserved tracks
	DB	3,	7		;Psm, psh for 1024 byte sectors
;
;===================================================================
;	EXTENDED DPBS DESCRIBE PC FORMAT MSDOS DISKS
;	These are in order for indexing according to FATID bits 0-1
;===================================================================
DPB5DOS	RS	0
;
;
;	FAT ID = FC, Single Sided, 9 Sector format (IBM PCDOS 2.0 ONLY)
	DB	BIAS5+4		;Type
PCDPB9S	DW	-1		;extended dpb flag
	DW	2		;Nfats
	DW	2		;Nfatrecs
	DW	360		;Nclstrs
	DW	512		;Clsize
	DW	1		;Fatadd
;
	DW	9		;sectors per track
	DB	0		; cp/m block shift <not used>
	DB	0		; cp/m block mask  <not used>
	DB	0		; cp/m extnt mask  <not used>
	DW	360		; cp/m disk size in 1k blocks
				; less offset track(s) <not used>
	DW	63		;directory max  (root directory size)
	DB	0		; cp/m alloc0      <not used>
	DB	0		; cp/m alloc1      <not used>
	DW	16		;check size
	DW	0		;offset		   <used as usual?>
	DB	2		;phys sec shift	   <used as usual?>
	DB	3		;phys sec mask	   <used as usual?>
;
;
;	FAT ID = FD, DOUBLE Sided, 9 Sector format (IBM PCDOS 2.0 ONLY)
	DB	BIAS5+5		;Type
PCDPB9D	DW	-1		;extended dpb flag
	DW	2		;Nfats
	DW	2		;Nfatrecs
	DW	360		;Nclstrs
	DW	512*2		;Clsize
	DW	1		;Fatadd
;
	DW	9		;sectors per track
	DB	0		; cp/m block shift <not used>
	DB	0		; cp/m block mask  <not used>
	DB	0		; cp/m extnt mask  <not used>
	DW	360		; cp/m disk size in 1k blocks
				; less offset track(s) <not used>
	DW	111		;directory max  (root directory size)
	DB	0		; cp/m alloc0      <not used>
	DB	0		; cp/m alloc1      <not used>
	DW	16		;check size
	DW	0		;offset		   <used as usual?>
	DB	2		;phys sec shift	   <used as usual?>
	DB	3		;phys sec mask	   <used as usual?>
;
;	FAT ID = FE, Single Sided, 8 Sector format (PCDOS/MSDOS STANDARD)
	DB	BIAS5+4		;Type
PCDPB8S	DW	-1		;extended dpb flag
	DW	2		;Nfats
	DW	1		;Nfatrecs
	DW	320		;Nclstrs
	DW	512*1		;Clsize
	DW	1		;Fatadd
;
	DW	8		;sectors per track
	DB	0		; cp/m block shift <not used>
	DB	0		; cp/m block mask  <not used>
	DB	0		; cp/m extnt mask  <not used>
	DW	320		; cp/m disk size in 1k blocks
				; less offset track(s) <not used>
	DW	63		;directory max  (root directory size)
	DB	0		; cp/m alloc0      <not used>
	DB	0		; cp/m alloc1      <not used>
	DW	16		;check size
	DW	0		;offset		   <used as usual?>
	DB	2		;phys sec shift	   <used as usual?>
	DB	3		;phys sec mask	   <used as usual?>
;
;	FAT ID = FF, Double Sided, 8 Sector format (PCDOS/MSDOS STANDARD)
	DB	BIAS5+5		;Type
PCDPB8D	DW	-1		;extended dpb flag
	DW	2		;Nfats
	DW	1		;Nfatrecs
	DW	320		;Nclstrs
	DW	512*2		;Clsize
	DW	1		;Fatadd
;
	DW	8		;sectors per track
	DB	0		; cp/m block shift <not used>
	DB	0		; cp/m block mask  <not used>
	DB	0		; cp/m extnt mask  <not used>
	DW	320		; cp/m disk size in 1k blocks
				; less offset track(s) <not used>
	DW	111		;directory max  (root directory size)
	DB	0		; cp/m alloc0      <not used>
	DB	0		; cp/m alloc1      <not used>
	DW	16		;check size
	DW	0		;offset		   <used as usual?>
	DB	2		;phys sec shift	   <used as usual?>
	DB	3		;phys sec mask	   <used as usual?>
;
;
   if HARD and DISK2 and D2M20
	DB	HD2TYP
DPBH1:	; hard disk near outer edge
	DW	11			;physical sectors per track
	DB	5,31,1			; 4k block size, exm=1
	DW	7FDh,3FFH		;dsm, drm
	DB	0FFh,0FFh		; 16 directory blocks
	DW	8000h			; 0 cks, semi-permanent
	DW	8			;offset 8 tracks
	DB	3			; physical sector shift
	DB	7			; physical sector mask
;
	DB	HD2TYP
DPBH2:	; hard disk near middle
	DW	11			;physical sectors per track
	DB	5,31,1			; 4k block size, exm=1
	DW	7FDh,3FFH		;dsm, drm
	DB	0FFh,0FFh		; 16 directory blocks
	DW	8000h			; 0 cks, semi-permanent
	DW	2F0h			;offset 2f0h tracks
	DB	3			; physical sector shift
	DB	7			; physical sector mask
;
	DB	HD2TYP
DPBH3:	; hard disk near spindle
	DW	11			;physical sectors per track
	DB	5,31,1			; 4k block size, exm=1
	DW	4E5h,3FFH		;dsm, drm
	DB	0FFh,0FFh		; 16 directory blocks
	DW	8000h			; 0 cks, semi-permanent
	DW	5D8h			;offset 5d8h tracks
	DB	3			; physical sector shift
	DB	7			; physical sector mask
   endif
;
   if HARD and DISK2 and D2F40b
	DB	HD2TYP
DPB_F40:
	DW	22			;physical sectors per track
	DB	5,31,1			; 4k block size, exm=1
	DW	2156-1,1024-1		; dsm, drm
	DB	0FFh,0FFh		; 16 directory blocks
	DW	8000h			; 0 chks, semi-permanent
	DW	8*1			; offset
	DB	3			; physical sector shift
	DB	7			; physical sector mask
;
	DB	HD2TYP
DPB_F41:
	DW	22			;physical sectors per track
	DB	5,31,1			; 4k block size, exm=1
	DW	2156-1,1024-1		; dsm, drm
	DB	0FFh,0FFh		; 16 directory blocks
	DW	8000h			; 0 chks, semi-permanent
	DW	8*50			; offset
	DB	3			; physical sector shift
	DB	7			; physical sector mask
;
	DB	HD2TYP
DPB_F42:
	DW	22			;physical sectors per track
	DB	5,31,1			; 4k block size, exm=1
	DW	2112-1,1024-1		; dsm, drm
	DB	0FFh,0FFh		; 16 directory blocks
	DW	8000h			; 0 chks, semi-permanent
	DW	8*99			; offset
	DB	3			; physical sector shift
	DB	7			; physical sector mask
;
	DB	HD2TYP
DPB_F43:
	DW	22			;physical sectors per track
	DB	5,31,1			; 4k block size, exm=1
	DW	2112-1,1024-1		; dsm, drm
	DB	0FFh,0FFh		; 16 directory blocks
	DW	8000h			; 0 chks, semi-permanent
	DW	8*147			; offset
	DB	3			; physical sector shift
	DB	7			; physical sector mask
;
	DB	HD2TYP
DPB_F44:
	DW	22			;physical sectors per track
	DB	5,31,1			; 4k block size, exm=1
	DW	2112-1,1024-1		; dsm, drm
	DB	0FFh,0FFh		; 16 directory blocks
	DW	8000h			; 0 chks, semi-permanent
	DW	8*195			; offset
	DB	3			; physical sector shift
	DB	7			; physical sector mask
;
   endif
;
   if HARD and DISK3 and D3ST506
;
DSM_H30	EQU  (4 * 8 * 9 * (153-4))/BZ4K ;Disk total size in blocks
	DB	HD3TYP			;Type
DPB_H30	DW	9			;Physical sectors/track
	DB	5,31,1			;Block, mask, exm
	DW 	DSM_H30-1,1024-1	;Drive size, directory count
	DB	0FFh,0FFh		;Allocation bits
	DW	8000h			;0 cks 
	DW	2			;Reserved tracks
	DB	3			;Psh
	DB	7			;Prm
;
   endif
;
   if HARD and DISK3 and D3Q520		;Quantum q520, 20 meg. drive
;
	DB	HD3TYP			;Type
DSM_H30	EQU  (8*145*4*9)/BZ4K		;Drive size in blocks
DPB_H30	DW	9			;Sectors/track
	DB	5,31,1			;Block,mask,exm
	DW	DSM_H30-1		;DSM
	DW	1024-1			;Drm
	DB	0FFh,0FFh		;Allocation bits
	DW	8000h			;0 cks
	DW	2			;Offset
	DB	3
	DB	7
;
	DB	HD3TYP
DSM_H31	EQU  (8*165*4*9)/BZ4K
DPB_H31	DW	9
	DB	5,31,1
	DW	DSM_H31-1		;Dsm
	DW	1024-1			;Drm
	DB	0FFh,0FFh
	DW	8000h
	DW	2+4*145
	DB	3
	DB	7
;
	DB	HD3TYP
DSM_H32	EQU  (8*165*4*9)/BZ4K
DPB_H32	DW	9
	DB	5,31,1
	DW	DSM_H32-1		;Dsm
	DW	1024-1			;Drm
	DB	0FFh,0FFh
	DW	8000h
	DW	2+4*310
	DB	3
	DB	7
;
	DB	HD3TYP
DSM_H33	EQU (8*34*4*9)/BZ2K
DPB_H33	DW	9
	DB	4,15,0
	DW	DSM_H33-1
	DW	256-1
	DB	0F0h,00h
	DW	8000h
	DW	2+4*475
	DB	3
	DB	7
   endif
;
   if HARD and DISK3 and D3Q540		;Quantum q540, 40 meg. drive
;
;First 5 Meg.
	DB	HD3TYP			;Type
DSM_H30 EQU  ((8 * 9 * 8)/BZ4K) * 72 
DPB_H30	DW	9			;Sectors/track
	DB	5,31,1			;Block,mask,exm
	DW	DSM_H30-1,1024-1	;Dsm,drm
	DB	0FFh,0FFh		;Allocation bits
	DW	8000h			;0 cks
	DW	2			;Offset
	DB	3
	DB	7
;
;Second 10 Meg.
	DB	HD3TYP
DSM_H31 EQU  ((8 * 9 * 8)/BZ4K) * (212-72)
DPB_H31	DW	9
	DB	5,31,1
	DW	DSM_H31-1,1024-1
	DB	0FFh,0FFh
	DW	8000h
	DW	2+8*72
	DB	3
	DB	7
;
;Third 10 Meg.
	DB	HD3TYP
DSM_H32 EQU  ((8 * 9 * 8)/BZ4K) * (352-212)
DPB_H32	DW	9
	DB	5,31,1
	DW	DSM_H32-1,1024-1
	DB	0FFh,0FFh
	DW	8000h
	DW	2+8*212
	DB	3
	DB	7
;
;Fourth 10 Meg.
	DB	HD3TYP
DSM_H33 EQU  ((8 * 9 * 8)/BZ4K) * (492-352)
DPB_H33	DW	9
	DB	5,31,1
	DW	DSM_H33-1,1024-1
	DB	0FFh,0FFh
	DW	8000h
	DW	2+8*352
	DB	3
	DB	7
;
;Fifth 1200k
	DB	HD3TYP
DSM_H34 EQU  ((8 * 9 * 8)/BZ2K) * (509-492)
DPB_H34	DW	9
	DB	4,15,0
	DW	DSM_H34-1,256-1
	DB	0F0h,00h
	DW	8000h
	DW	2+8*492
	DB	3
	DB	7
;
   endif			;Disk 3 and 40 meg.
;
   if HARD and DISK3 and D3Q80
;
;First 6 Meg.
	DB	HD3TYP			;Type
DPB_H30	DW	11			;Sectors/track
	DB	5,31,1			;Block,mask,exm
	DW	5F0h-1,1024-1		;Dsm,drm
	DB	0FFh,0FFh		;Allocation bits
	DW	8000h			;0 cks
	DW	2			;Offset
	DB	3
	DB	7
;
;Second 20 Meg.
	DB	HD3TYP
DPB_H31	DW	11
	DB	5,31,1
	DW	1A51h-1,1024-1
	DB	0FFh,0FFh
	DW	8000h
	DW	2+7*79
	DB	3
	DB	7
;
;Third 20 Meg.
	DB	HD3TYP
DPB_H32	DW	11
	DB	5,31,1
	DW	1b12h-1,1024-1
	DB	0FFh,0FFh
	DW	8000h
	DW	2+7*429
	DB	3
	DB	7
;
;Fourth 20 Meg.
	DB	HD3TYP
DPB_H33	DW	11
	DB	5,31,1
	DW	1b12h-1,1024-1
	DB	0FFh,0FFh
	DW	8000h
	DW	2+7*789
	DB	3
	DB	7
;
;Fifth 1200k
	DB	HD3TYP
DPB_H34	DW	11
	DB	4,15,0
	DW	0268h-1,256-1
	DB	0F0h,00h
	DW	8000h
	DW	2+7*1149
	DB	3
	DB	7
;
   endif			;Disk 3 and 80 meg drive
;
;
;Dpb for M-Drive/H board is set for a single board. If more boards are found
;during xios initialization, this table will be updated.
;
	DB	HMDTYP
DPBMDRV	EQU	Offset $	;Disk parameter block
	DW	8		;Sectors per track
	DB	4		;Block shift
	DB	15		;Block mask
	DB	1		;Extnt mask
	DW	HMDDSM-1	;Disk size - 1
	DW	128-1		;Directory max
	DB	0C0h		;Alloc0
	DB	0		;Alloc1
	DW	8000h		;Check size
	DW	4		;Offset
	DB	0		;Phys sec shift
	DB	0		;Phys sec mask
;
;
;
;Internal to External DPH Map for Selected Configuration of Hard and Floppy
;Drives
 
   if not HARD
    if FLPYORDR eq 0
DPH1	EQU	Offset DPHF1		;First floppy 8"
DPH2	EQU	Offset DPHF2
DPH3	EQU	Offset DPHF3
DPH4	EQU	Offset DPHF4		;Fourth and final floppy
    else
DPH1	EQU	Offset DPHF3		;First floppy is drive A:
DPH2	EQU	Offset DPHF4
DPH3	EQU	Offset DPHF1		;Drive C: is 8" 
DPH4	EQU	Offset DPHF2		;Fourth and final floppy
    endif
DPH5	EQU	0
DPH6	EQU	0
DPH7	EQU	0
DPH8	EQU	0
DPH9	EQU	0
DPH10	EQU	0
DPH11	EQU	0
DPH12	EQU	0
DPH13	EQU	Offset DPHMDRV
DPH14	EQU	0
DPH15	EQU	0
DPH16	EQU	0
;
LOG_PHY	DB	'A'-'A'			;Floppies start at logical drive 0
   endif
;
   if HARD and DISK2 and D2M20
DPH1	EQU	Offset DPHM20	;Hard disk on first three logical drives
DPH2	EQU	Offset DPHM21	
DPH3	EQU	Offset DPHM22
     if NDISK2 EQ 2
DPH4	EQU	Offset DPHM23
DPH5	EQU	Offset DPHM24
DPH6	EQU	Offset DPHM25
     else
DPH4	EQU	0
DPH5	EQU	0
DPH6	EQU	0
     endif
;
DPH7	EQU	0
DPH8	EQU	0
DPH9	EQU	Offset DPHF1	;Next come the floppies
DPH10	EQU	Offset DPHF2
DPH11	EQU	Offset DPHF3
DPH12	EQU	Offset DPHF4
DPH13	EQU	Offset DPHMDRV
DPH14	EQU	0
DPH15	EQU	0
DPH16	EQU	0
;
LOG_PHY	DB	'I'-'A'		;First floppy is logical drive i
;
   endif
;
   if HARD and DISK2 and D2F40b
DPH1	EQU	Offset DPHF40	;Hard disk on first three logical drives
DPH2	EQU	Offset DPHF41	
DPH3	EQU	Offset DPHF42
DPH4	EQU	Offset DPHF43
DPH5	EQU	Offset DPHF44
     if NDISK2 eq 2
DPH6	EQU	Offset DPHF45
DPH7	EQU	Offset DPHF46
DPH8	EQU	Offset DPHF47
     else
DPH6	EQU	0
DPH7	EQU	0
DPH8	EQU	0
     endif
DPH9	EQU	Offset DPHF1	;Next come the floppies
DPH10	EQU	Offset DPHF2
DPH11	EQU	Offset DPHF3
DPH12	EQU	Offset DPHF4
DPH13	EQU	Offset DPHMDRV
     if NDISK2 eq 2
DPH14	EQU	Offset DPHF48
DPH15	EQU	Offset DPHF49
     else
DPH14	EQU	0
DPH15	EQU	0
     endif
;
DPH16	EQU	0
;
LOG_PHY	DB	'I'-'A'		;First floppy is logical drive i
;
   endif
;
   if HARD and DISK3 and D3ST506
DPH1	EQU	Offset DPHH30	;Hard disk is first
DPH2	EQU	0
DPH3	EQU	0
DPH4	EQU	0
DPH5	EQU	0
DPH6	EQU	0
DPH7	EQU	0
DPH8	EQU	0
DPH9	EQU	Offset DPHF1	;Next come the floppies
DPH10	EQU	Offset DPHF2
DPH11	EQU	Offset DPHF3
DPH12	EQU	Offset DPHF4
DPH13	EQU	Offset DPHMDRV
DPH14	EQU	0
DPH15	EQU	0
DPH16	EQU	0
;
LOG_PHY	DB	'I'-'A'		;First floppy is logical drive i
;
   endif
;
   if HARD and DISK3 and D3Q520
DPH1	EQU	Offset DPHH30	;Hard disk on first 5
DPH2	EQU	Offset DPHH31
DPH3	EQU	Offset DPHH32
DPH4	EQU	Offset DPHH33
     if NDISK3 eq 2
DPH5	EQU	Offset DPHH34
DPH6	EQU	Offset DPHH35
DPH7	EQU	Offset DPHH36
DPH8	EQU	Offset DPHH37
     else
DPH5	EQU	0
DPH6	EQU	0
DPH7	EQU	0
DPH8	EQU	0
     endif
DPH9	EQU	Offset DPHF1	;Next come the floppies
DPH10	EQU	Offset DPHF2
DPH11	EQU	Offset DPHF3
DPH12	EQU	Offset DPHF4
DPH13	EQU	Offset DPHMDRV
DPH14	EQU	0
DPH15	EQU	0
DPH16	EQU	0
;
LOG_PHY	DB	'I'-'A'		;First floppy is logical drive i
;
   endif
;
;
   if HARD and DISK3 and (D3Q540 or D3Q80)
DPH1	EQU	Offset DPHH30	;Hard disk on first 5
DPH2	EQU	Offset DPHH31
DPH3	EQU	Offset DPHH32
DPH4	EQU	Offset DPHH33
DPH5	EQU	Offset DPHH34
     if NDISK3 EQ 2
DPH6	EQU	Offset DPHH35
DPH7	EQU	Offset DPHH36
DPH8	EQU	Offset DPHH37
     else
DPH6	EQU	0
DPH7	EQU	0
DPH8	EQU	0
     endif
DPH9	EQU	Offset DPHF1	;Next come the floppies
DPH10	EQU	Offset DPHF2
DPH11	EQU	Offset DPHF3
DPH12	EQU	Offset DPHF4
DPH13	EQU	Offset DPHMDRV
     if NDISK3 eq 2
DPH14	EQU	Offset DPHH38
DPH15	EQU	Offset DPHH39
     else
DPH14	EQU	0
DPH15	EQU	0
     endif
;
DPH16	EQU	0
;
LOG_PHY	DB	'I'-'A'		;First floppy is logical drive i
;
   endif
;
;
;Signon messages showing current hardware configuration
;
;Floppy signon
;
FLPSIGN	DB	'	 8" Drives on '
;
   if HARD
	DB	'I: J:'
     if	FLOPPY5
	DB	0Ah,0Dh,'	 5 1/4"	Drives on'
     endif
	DB	' K: L:'
   else
    if FLPYORDR eq 0
	DB	'A: B:'
     if	FLOPPY5
	DB	0AH,0DH,'	 5 1/4"	Drives on'
     endif
	DB	' C: D:'
    else
	DB	' C: D:'
	DB	0AH,0DH,'        5 1/4" Drives on'
	DB	' A: B:'
    endif
  endif
	DB	0Ah,0Dh,0FFh
;
;Disk2 signon messages
   if DISK2
;
SIGNON2	DB	'Disk 2/ '
     if	D2M20
	DB	'20 mbyte unit #0 A: B:	C:'
       if NDISK2 EQ 2
	DB	0Ah,0Dh
	DB	'    unit #1 D:	E: F:'
       endif
     endif
;
     if	D2F40b
	DB	'40 mbyte unit #0 A: B:	C: D: E:'
       if NDISK2 EQ 2
	DB	0Ah,0Dh
	DB	'    unit #1 F:	G: H: N: O:'
       endif
     endif
	DB	0Ah,0Dh,0FFh
;
   endif
;
;Disk3 signon messages
;
   if DISK3
;
SIGNON3	DB	'Disk3 / '
     if	D3ST506
	DB	' ST506		A:'			;5 meg st drive
     endif
	
     if	D3Q520
	DB	' Q520		A: B: C: D:'		;20 m. quantum drive
	
       if NDISK3 EQ 2
	DB	0Ah,0Dh
	DB	'		E: F: G: H:'
       endif
     endif
;
     if	D3Q540
	DB	' Q540		A: B: C: D: E:'		;40 m. quantum drive
;
       if NDISK3 EQ 2
	DB	0Ah,0Dh
	DB	'		F: G: H: N: O:'
       endif
;
     endif
;
     if	D3Q80
	DB	' 80 meg.	A: B: C: D: E:'		;80 m. drive
     endif
	
	
	DB	0AH,0DH,0FFh
;
   endif
;
;Byte defining the number of hard disk drive units in the system
;
   if NOT HARD
NHARD	DB	0
   endif
   if DISK2
NHARD	DB	NDISK2
   endif
   if DISK3
NHARD	DB	NDISK3
   endif
;
	DB	0
   END
