Skip to content

Commit

Permalink
Update BPBIOS Disk Reference Lookup
Browse files Browse the repository at this point in the history
- Modified BPBIOS to implement proper physical/logical disk unit lookups.
  • Loading branch information
wwarthen committed Jan 12, 2024
1 parent 462545b commit 0bac6f3
Show file tree
Hide file tree
Showing 28 changed files with 149 additions and 172 deletions.
Binary file modified Doc/RomWBW Applications.pdf
Binary file not shown.
Binary file modified Doc/RomWBW Disk Catalog.pdf
Binary file not shown.
Binary file modified Doc/RomWBW Errata.pdf
Binary file not shown.
Binary file modified Doc/RomWBW ROM Applications.pdf
Binary file not shown.
Binary file modified Doc/RomWBW System Guide.pdf
Binary file not shown.
Binary file modified Doc/RomWBW User Guide.pdf
Binary file not shown.
4 changes: 2 additions & 2 deletions ReadMe.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@


**RomWBW ReadMe** \
Version 3.4 \
Version 3.5 \
Wayne Warthen ([wwarthen@gmail.com](mailto:wwarthen@gmail.com)) \
09 Jan 2024
12 Jan 2024

# Overview

Expand Down
2 changes: 1 addition & 1 deletion ReadMe.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
RomWBW ReadMe
Wayne Warthen (wwarthen@gmail.com)
09 Jan 2024
12 Jan 2024



Expand Down
5 changes: 2 additions & 3 deletions Source/Apps/format.asm
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@
; 1) Actually implement this
;_______________________________________________________________________________
;
#include "../ver.inc"
;
;===============================================================================
; Definitions
;===============================================================================
Expand All @@ -30,9 +32,6 @@ bdos .equ $0005 ; BDOS invocation vector
;;
;stamp .equ $40 ; loc of RomWBW CBIOS zero page stamp
;
rmj .equ 3 ; CBIOS version - major
rmn .equ 0 ; CBIOS version - minor
;
;===============================================================================
; Code Section
;===============================================================================
Expand Down
6 changes: 3 additions & 3 deletions Source/BPBIOS/@WBW Z3ENV.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Operating System (DOS), and Basic I/O System (BIOS). The CCP and DOS components
are pre-built, relocatable binaries. The BIOS (BPBIOS) is assembled into a relocatable
binary by the build, then the build links together all three components to form the
final loadable image (.IMG) file. The linking process is performed by the custom BPBIOS
linker (BPBUILD.COM). In addition to linking the 3 components, BPBUILD also sets
linker (BPBUILD.COM). In addition to linking the 3 components, BPBUILD also
adjusts the ZCPR environment configuration.

BPBUILD is designed to be run interactively. However, it can be started with an
Expand All @@ -24,8 +24,8 @@ running of BPBUILD.

The CCP can be ZCPR 3.3 (ZCPR33?.REL), ZCPR 3.4 (Z34.REL), or ZCPR 4.1 (Z41.ZRL). ZCPR 3.3
uses static references to the ZCPR segments, so a custom version of it must be assembled.
The ZCPR33 subdirectory provides a build process for doing this. It produces a specific
version for each of the memory segment configurations (ZCPR33T.REL & ZCPR33N.REL).
The ZCPR33 subdirectory provides a build process for doing this. It produces a custom
version of ZCPR33.REL with the correct static references to the ZCPR segments.

The DOS can be ZSDOS 1.1 (ZSDOS.ZRL) or ZSDOS 2.03 (ZS203.ZRL). These are both pre-built
relocatable binaries. Note that only certain version combinations of ZSDOS and ZCPR are
Expand Down
6 changes: 6 additions & 0 deletions Source/BPBIOS/bpbio-ww.z80
Original file line number Diff line number Diff line change
Expand Up @@ -421,6 +421,12 @@ DRVTBL: LD HL,DPHTBL ; Point to DPH table
PAGE
ENDIF ;HARDDSK

IF RAMDSK ; << ****** Hardware Specific ****** >>
INCLUDE RAMD-WW.Z80 ; << This Driver is for HBIOS >>

PAGE
ENDIF ;RAMDSK


; << ****** Hardware Specific ****** >>
; << Enter Warm Boot routines in >>
Expand Down
14 changes: 7 additions & 7 deletions Source/BPBIOS/cboot-ww.z80
Original file line number Diff line number Diff line change
Expand Up @@ -120,14 +120,14 @@ DYNLP: LD E,(HL)
DEC DE ; Else back up Ptr to Driver
DEC DE
LD A,(DE) ; Get driver #
; IF RAMDSK
; DEC A
; DEC A ; Hard Disk (Driver 2)?
; JR Z,ADDSIZ ; ..jump if so
; DEC A ; RAM Disk (Driver 3)?
; ELSE
IF RAMDSK
DEC A
DEC A ; Hard Disk (Driver 2)?
JR Z,ADDSIZ ; ..jump if so
DEC A ; RAM Disk (Driver 3)?
ELSE
CP 2 ; Hard Disk (Driver 2)?
; ENDIF ; Ramdsk
ENDIF ; Ramdsk
JR NZ,DYNCHK ; ..jump to end if Not
ADDSIZ: PUSH BC ; Save loop counter
PUSH HL ; and ptr to DPH
Expand Down
2 changes: 1 addition & 1 deletion Source/BPBIOS/def-ww-z33.lib
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ MORDPB EQU NO ; Include additional Floppy DPB Formats?

;;--- RAM Disk Section ---
;
;RAMDSK EQU YES ; YES = Make RAM-Disk Code, NO = No code made
RAMDSK EQU YES ; YES = Make RAM-Disk Code, NO = No code made

;--- Hard Disk Section ---

Expand Down
2 changes: 1 addition & 1 deletion Source/BPBIOS/def-ww-z33bnk.lib
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ MORDPB EQU NO ; Include additional Floppy DPB Formats?

;;--- RAM Disk Section ---
;
;RAMDSK EQU YES ; YES = Make RAM-Disk Code, NO = No code made
RAMDSK EQU YES ; YES = Make RAM-Disk Code, NO = No code made

;--- Hard Disk Section ---

Expand Down
2 changes: 1 addition & 1 deletion Source/BPBIOS/def-ww-z34.lib
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ MORDPB EQU NO ; Include additional Floppy DPB Formats?

;;--- RAM Disk Section ---
;
;RAMDSK EQU YES ; YES = Make RAM-Disk Code, NO = No code made
RAMDSK EQU YES ; YES = Make RAM-Disk Code, NO = No code made

;--- Hard Disk Section ---

Expand Down
2 changes: 1 addition & 1 deletion Source/BPBIOS/def-ww-z34bnk.lib
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ MORDPB EQU NO ; Include additional Floppy DPB Formats?

;;--- RAM Disk Section ---
;
;RAMDSK EQU YES ; YES = Make RAM-Disk Code, NO = No code made
RAMDSK EQU YES ; YES = Make RAM-Disk Code, NO = No code made

;--- Hard Disk Section ---

Expand Down
2 changes: 1 addition & 1 deletion Source/BPBIOS/def-ww-z41bnk.lib
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ MORDPB EQU NO ; Include additional Floppy DPB Formats?

;;--- RAM Disk Section ---
;
;RAMDSK EQU YES ; YES = Make RAM-Disk Code, NO = No code made
RAMDSK EQU YES ; YES = Make RAM-Disk Code, NO = No code made

;--- Hard Disk Section ---

Expand Down
37 changes: 19 additions & 18 deletions Source/BPBIOS/dphhd.lib
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,11 @@
; 1.0 - 31 Aug 92 - General Release. HFB
; 0.1 - 3 Jan 92 - Initial release. HFB
;:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
; The Physical Drive Number byte (XDPH+3) is simply an index to the Physical
; Drive as specified in the ICFG-xx.Z80 file. Up to three physical drives
; may be defined in that section, the first byte of which defines the
; Physical/Logical Unit Address (Device & LUN for SCSI, Master/Slave for IDE),
; The Logical Drive Number byte (XDPH+3) is simply an index into the
; BPBIOS physical drive table as specified in the ICFG-xx.Z80 file.
; BPBIOS supports exactly three logical drives which
; are defined in that section, the first byte of which defines the
; Physical Unit (HBIOS Disk Unit)
; and a flag bit to specify whether or not the drive is physically present.
; See ICFG-xx.Z80 for a definition of the data.

Expand All @@ -21,7 +22,7 @@

XDPH90: DEFB TRUE ; Format lock flag (Lock RAM Drive)
DEFB FIXDSK ; Disk Drive Type
DEFB 2 ; Driver ID = Treat as Hard Drive
DEFB 3 ; Driver ID = Treat as Hard Drive
DEFB HB_MDRAM ; Physical Drive Number
DPH$90: DEFW 0 ; Skew Table pointer
DEFW 0,0,0 ; Scratch area
Expand All @@ -34,7 +35,7 @@ DPH$90: DEFW 0 ; Skew Table pointer

XDPH91: DEFB TRUE ; Format lock flag (Lock ROM Drive)
DEFB FIXDSK ; Disk Drive Type
DEFB 2 ; Driver ID = Treat as Hard Drive
DEFB 3 ; Driver ID = Treat as Hard Drive
DEFB HB_MDROM ; Physical Drive Number
DPH$91: DEFW 0 ; Skew Table pointer
DEFW 0,0,0 ; Scratch area
Expand All @@ -48,7 +49,7 @@ DPH$91: DEFW 0 ; Skew Table pointer
XDPH50: DEFB TRUE ; Format lock flag (Lock First Hard Drive)
DEFB FIXDSK ; Disk drive type
DEFB 2 ; Driver ID - 2=hard drive
DEFB HB_HDDEV0 ; Physical drive [0..6] for this Partition
DEFB 0 ; Logical drive [0..2] for this Partition
DPH$50: DEFW 0 ; Skew table pointer
DEFW 0,0,0 ; Scratch area
DEFW DIRBUF ; Directory buffer pointer
Expand All @@ -61,7 +62,7 @@ DPH$50: DEFW 0 ; Skew table pointer
XDPH51: DEFB TRUE ; --- Second Hard Drive/Partition
DEFB FIXDSK ; Disk drive type
DEFB 2 ; Driver ID - 2=hard drive
DEFB HB_HDDEV0 ; Physical drive [0..6] for this Partition
DEFB 0 ; Logical drive [0..2] for this Partition
DPH$51: DEFW 0
DEFW 0,0,0
DEFW DIRBUF
Expand All @@ -74,7 +75,7 @@ DPH$51: DEFW 0
XDPH52: DEFB TRUE ; --- Third Hard Drive/Partition
DEFB FIXDSK ; Disk drive type
DEFB 2 ; Driver ID - 2=hard drive
DEFB HB_HDDEV0 ; Physical drive [0..2] for this Partition
DEFB 0 ; Physical drive [0..2] for this Partition
DPH$52: DEFW 0
DEFW 0,0,0
DEFW DIRBUF
Expand All @@ -87,7 +88,7 @@ DPH$52: DEFW 0
XDPH53: DEFB TRUE ; --- Fourth Hard Drive/Partition
DEFB FIXDSK ; Disk drive type
DEFB 2 ; Driver ID - 2=hard drive
DEFB HB_HDDEV0 ; Physical drive [0..6] for this Partition
DEFB 0 ; Logical drive [0..2] for this Partition
DPH$53: DEFW 0
DEFW 0,0,0
DEFW DIRBUF
Expand All @@ -100,7 +101,7 @@ DPH$53: DEFW 0
XDPH54: DEFB TRUE ; --- Fifth Hard Drive/Partition
DEFB FIXDSK ; Disk drive type
DEFB 2 ; Driver ID - 2=hard drive
DEFB HB_HDDEV0 ; Physical drive [0..6] for this Partition
DEFB 0 ; Logical drive [0..2] for this Partition
DPH$54: DEFW 0
DEFW 0,0,0
DEFW DIRBUF
Expand All @@ -113,7 +114,7 @@ DPH$54: DEFW 0
XDPH55: DEFB TRUE ; --- Sixth Hard Drive/Partition
DEFB FIXDSK ; Disk drive type
DEFB 2 ; Driver ID - 2=hard drive
DEFB HB_HDDEV0 ; Physical drive [0..6] for this Partition
DEFB 0 ; Logical drive [0..2] for this Partition
DPH$55: DEFW 0
DEFW 0,0,0
DEFW DIRBUF
Expand All @@ -126,7 +127,7 @@ DPH$55: DEFW 0
XDPH56: DEFB TRUE ; --- Seventh Hard Drive/Partition
DEFB FIXDSK ; Disk drive type
DEFB 2 ; Driver ID - 2=hard drive
DEFB HB_HDDEV0 ; Physical drive [0..6] for this Partition
DEFB 0 ; Logical drive [0..2] for this Partition
DPH$56: DEFW 0
DEFW 0,0,0
DEFW DIRBUF
Expand All @@ -139,7 +140,7 @@ DPH$56: DEFW 0
XDPH57: DEFB TRUE ; --- Eighth Hard Drive/Partition
DEFB FIXDSK ; Disk drive type
DEFB 2 ; Driver ID - 2=hard drive
DEFB HB_HDDEV0 ; Physical drive [0..6] for this Partition
DEFB 0 ; Logical drive [0..2] for this Partition
DPH$57: DEFW 0
DEFW 0,0,0
DEFW DIRBUF
Expand All @@ -152,7 +153,7 @@ DPH$57: DEFW 0
XDPH58: DEFB TRUE ; --- Ninth Hard Drive/Partition
DEFB FIXDSK ; Disk drive type
DEFB 2 ; Driver ID - 2=hard drive
DEFB HB_HDDEV1 ; Physical drive [0..6] for this Partition
DEFB 1 ; Logical drive [0..2] for this Partition
DPH$58: DEFW 0
DEFW 0,0,0
DEFW DIRBUF
Expand All @@ -165,7 +166,7 @@ DPH$58: DEFW 0
XDPH59: DEFB TRUE ; --- Tenth Hard Drive/Partition
DEFB FIXDSK ; Disk drive type
DEFB 2 ; Driver ID - 2=hard drive
DEFB HB_HDDEV1 ; Physical drive [0..6] for this Partition
DEFB 1 ; Logical drive [0..2] for this Partition
DPH$59: DEFW 0
DEFW 0,0,0
DEFW DIRBUF
Expand All @@ -178,7 +179,7 @@ DPH$59: DEFW 0
XDPH60: DEFB TRUE ; --- Eleventh Hard Drive/Partition
DEFB FIXDSK ; Disk drive type
DEFB 2 ; Driver ID - 2=hard drive
DEFB HB_HDDEV1 ; Physical drive [0..6] for this Partition
DEFB 1 ; Logical drive [0..2] for this Partition
DPH$60: DEFW 0
DEFW 0,0,0
DEFW DIRBUF
Expand All @@ -191,7 +192,7 @@ DPH$60: DEFW 0
XDPH61: DEFB TRUE ; --- Twelveth Hard Drive/Partition
DEFB FIXDSK ; Disk drive type
DEFB 2 ; Driver ID - 2=hard drive
DEFB HB_HDDEV1 ; Physical drive [0..6] for this Partition
DEFB 1 ; Logical drive [0..2] for this Partition
DPH$61: DEFW 0
DEFW 0,0,0
DEFW DIRBUF
Expand Down
Loading

0 comments on commit 0bac6f3

Please sign in to comment.