You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

278 lines
7.4 KiB

;:::::::::::::::::::::::::::::::::::::::::::::::*****************************
; DPH Pointer Table ** Configuration Dependant **
; (This table may be in Banked Memory) *****************************
;
; All access to DPH's are done through this table. A Zero in this table
; indicates the logical drive does Not exist. The table is indexed by logical
; drive (e.g. A-P). To swap logical drives, exchange entries in this table.
;
; 1.0 - 31 Aug 92 - General Release. HFB
; 0.1 - 3 Jan 92 - Initial Release. HFB
;:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
CSEG
DPHTBL:
IF DRV_E AND HARDDSK
DEFW DPH$50 ; Dph for Hard drive Partition E
ELSE
DEFW 00
ENDIF
IF DRV_F AND HARDDSK
DEFW DPH$51 ; Dph for Hard drive Partition F
ELSE
DEFW 00
ENDIF
IF DRV_G AND HARDDSK
DEFW DPH$52 ; Dph for Hard drive Partition G
ELSE
DEFW 00
ENDIF
IF DRV_H AND HARDDSK
DEFW DPH$53 ; Dph for Hard drive Partition H
ELSE
DEFW 00
ENDIF
IF DRV_A
DEFW DPH$00 ; Dph for drive A (Floppy)
ELSE
DEFW 00
ENDIF
IF DRV_B
DEFW DPH$01 ; Dph for drive B (Floppy)
ELSE
DEFW 00
ENDIF
IF DRV_C
DEFW DPH$02 ; Dph for drive C (Floppy)
ELSE
DEFW 00
ENDIF
IF DRV_D
DEFW DPH$03 ; Dph for drive D (Floppy)
ELSE
DEFW 0 ; Dph for drive D
ENDIF
IF DRV_I AND HARDDSK
DEFW DPH$54 ; Dph for Hard drive Partition I
ELSE
DEFW 00
ENDIF
IF DRV_J AND HARDDSK
DEFW DPH$55 ; Dph for Hard drive Partition J
ELSE
DEFW 00
ENDIF
IF DRV_K AND HARDDSK
DEFW DPH$56 ; Dph for Hard drive Partition K
ELSE
DEFW 00
ENDIF
IF DRV_L AND HARDDSK
DEFW DPH$57 ; Dph for Hard drive Partition L
ELSE
DEFW 00
ENDIF
IF DRV_M AND RAMDSK
DEFW DPH$90 ; Dph for RAM Drive M in DPHM-xx.Z80
ELSE
DEFW 00 ; Dph for drive M
ENDIF ;ramdsk
IF DRV_N AND HARDDSK
DEFW DPH$58 ; Dph for Hard drive Partition N
ELSE
DEFW 00
ENDIF
IF DRV_O AND HARDDSK
DEFW DPH$59 ; Dph for Hard drive Partition O
ELSE
DEFW 00
ENDIF
IF DRV_P AND HARDDSK
DEFW DPH$60 ; Dph for Hard drive Partition P
ELSE
DEFW 00
ENDIF
;:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
; Disk Parameter Headers (DPH) for Drives MUST be in Common Memory
;
; The DPH's used have a two byte prefix which indicates the Physical
; Unit # and the Driver Number for the Drive. The Physical Unit Number
; is Controller specific, while the driver number is used to select
; which service routines are to be called to satisfy service requests.
;:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
; Drive Type Byte
; ---------------
; D D D D D D D D
; 7 6 5 4 3 2 1 0
; | | | | | +-+-+--- Disk Size: 000=Fixed Disk, 001=8", 010=5.25", 011=3.5"
; | | | | +--------- 0 = Single Sided, 1 = Double Sided
; | | | +----------- 0 = Normal Step, 1 = Double-Step Drive
; | | +------------- 0 = Motor Always On, 1 = Drive Motor Control needed
; | +--------------- 0 = Max Speed is Normal 5.25" (300rpm)
; | 1 = 8" and Hi-Density 5.25" Max Speed (360rpm)
; +----------------- 0 = Double-Density, 1 = Single-Density
FIXDSK EQU 00000000B
DSK8 EQU 00000001B
DSK5 EQU 00000010B
DSK3 EQU 00000011B
SS EQU 00000000B
DS EQU 00001000B
DD EQU 00000000B
SD EQU 10000000B
DVSPDH EQU 01000000B
DVSPDL EQU 00000000B
MTR EQU 00100000B
NOMTR EQU 00000000B
DBLSTP EQU 00010000B
NODBLS EQU 00000000B
CSEG
IF DRV_A
XDPH00: DB LOCKF ; Format lock flag
DB DSK5+DS+DD+DVSPDL+MTR ; Disk drive type
DB 1 ; Driver id
DB 0 ; Physical drive number
DPH$00: DW 0 ; Skew table pointer
DW 0,0,0 ; Scratch area
DW DIRBUF ; Directory buffer pointer
IF AUTOSL ; For autoselection, we need RAM Space
DEFW DPB$00+DPHDSZ ; Ram area for DPB #0
ELSE
DW DPBRA ; Pointer to current DPB for Drive 0
ENDIF
DW CHK$00 ; Wacd for drive 00
DW ALV$00 ; Alloc vector for 00
XDPHSZ EQU $-XDPH00 ; Calc for xdph size
XDPHOF EQU DPH$00-XDPH00 ; Offset from xdph to dph
ENDIF ;Drv_a
IF DRV_B
XDPH01: DB LOCKF ; Format lock flag
DB DSK5+DS+DD+DVSPDL+MTR ; Disk drive type
DB 1 ; Driver id
DB 1 ; Physical drive number
DPH$01: DW 0 ; Skew table pointer
DW 0,0,0 ; Scratch area
DW DIRBUF ; Directory buffer pointer
IF AUTOSL
DEFW DPB$01+DPHDSZ ; Ram space for DPB #1
ELSE
DW DPBRB ; Pointer to current DPB for Drive 1
ENDIF
DW CHK$01 ; Wacd for drive 01
DW ALV$01 ; Alloc vector for 01
ENDIF ;Drv_b
IF DRV_C
XDPH02: DB LOCKF ; Format lock flag
DB DSK5+DS+DD+DVSPDL+MTR ; Disk drive type
DB 1 ; Driver id
DB 2 ; Physical drive number
DPH$02: DW 0 ; Skew table pointer
DW 0,0,0 ; Scratch area
DW DIRBUF ; Directory buffer pointer
IF AUTOSL
DEFW DPB$02+DPHDSZ ; Ram space for DPB #2
ELSE
DW DPBRA ; Pointer to current DPB for Drive #2
ENDIF
DW CHK$02 ; Wacd for drive 02
DW ALV$02 ; Alloc vector for 02
ENDIF
IF DRV_D
XDPH03: DB LOCKF ; Format lock flag
DB DSK3+sS+DD+DVSPDl+MTR ; Disk drive type
DB 1 ; Driver id
DB 3 ; Physical drive number
DPH$03: DW 0 ; Skew table pointer
DW 0,0,0 ; Scratch area
DW DIRBUF ; Directory buffer pointer
IF AUTOSL
DEFW DPB$03+DPHDSZ ; Ram space for DPB #3
ELSE
DW DPBRA ; Pointer to current DPB for Drive #3
ENDIF
DW CHK$03 ; Wacd for drive 03
DW ALV$03 ; Alloc vector for 03
ENDIF ;Drv_d
; Directory Buffer Allocation. Only One Directory Buffer is required. Since
; we want it to be the first item in DSEG, it must be placed here.
DSEG
IF BANKED
DIRBUF EQU CBOOT ; Resident Init code in here
ELSE
DIRBUF EQU $
ENDIF
ORG DIRBUF+128 ; Directory buffer
; If we are using autoselection of drives, we copy the XDPB/DPB structure
; for the identified format to RAM thereby allowing emulation of formats by
; installing data for the desired format and locking the DPH. For Non-auto-
; select, we simply point to the read-only structure defined in DPB.LIB.
IF AUTOSL
IF DRV_A
DPB$00: DEFS DPBSIZ ; Size of XDPB+DPB
ENDIF
IF DRV_B
DPB$01: DEFS DPBSIZ
ENDIF
IF DRV_C
DPB$02: DEFS DPBSIZ
ENDIF
IF DRV_D
DPB$03: DEFS DPBSIZ
ENDIF
ENDIF ;autosel
IF [BANKED AND ZSDOS2]
COMMON /B2RAM/
ELSE
DSEG
ENDIF
; Directory Check Buffers. Each Buffer MUST be NDE/4 Bytes long at minimum.
; Each Logical Drive with removable media MUST have its own check buffer.
IF DRV_A
CHK$00: DEFS [MXFDIR/4]+1 ; Enough for 256 dir entries
ENDIF
IF DRV_B
CHK$01: DEFS [MXFDIR/4]+1 ; Enough for 256 dir entries
ENDIF
IF DRV_C
CHK$02: DEFS [MXFDIR/4]+1 ; Enough for 256 dir entries
ENDIF
IF DRV_D
CHK$03: DEFS [MXFDIR/4]+1 ; Enough for 256 dir entries
ENDIF
; Allocation BitMap Buffers. Each MUST be NAB/8 Bytes at Minimum.
; Each Logical Floppy Drive MUST have an Allocation BitMap Buffer.
IF DRV_A
ALV$00: DEFS [MXFALC/8]+1 ; Enough for 800 KB or 1.44 MB drives
ENDIF
IF DRV_B
ALV$01: DEFS [MXFALC/8]+1 ; Enough for 800 KB or 1.44 MB drives
ENDIF
IF DRV_C
ALV$02: DEFS [MXFALC/8]+1 ; Enough for 800 KB or 1.44 MB drives
ENDIF
IF DRV_D
ALV$03: DEFS [MXFALC/8]+1 ; Enough for 800 KB or 1.44 MB drives
ENDIF
;======================= End of DPH.LIB =======================