Compare commits

...

7 Commits

Author SHA1 Message Date
Wayne Warthen
0598d921bc Floppy Fix
- Recent change to device type id's broke floppy access.  This is corrected.
2023-10-07 16:01:09 -07:00
Wayne Warthen
93dcfe9610 Slice Protection, Issue #366
- Dean Jenkins has motivated me to implement additional protection from using a slice that does not fit within the capacity of the physical disk being used.  You can still assign an unusable slice, but when you try to refer to it, you will immediately get a "no disk" error from the OS.
2023-10-07 15:15:10 -07:00
Wayne Warthen
d98547dea3 Minor Doc and Build Tweaks 2023-10-06 16:53:52 -07:00
Wayne Warthen
a157d9ba13 Device Type ID Reorganization
Driver Device Type ID's have been stored in the upper nibble.  However, running out of ID's, I have changed them to occupy the entire byte.

This is a breaking change, so I have updated the minor version number to maintain integrity between components.  So, v3.3 will never become a stable release and I am moving directly to v3.4.
2023-10-05 18:08:52 -07:00
Wayne Warthen
85783148be Bump Version 2023-10-05 15:33:41 -07:00
Wayne Warthen
7bd930bc76 Issue #366
Further refinements to User Guide based on input from Dean Jenkins.
2023-10-05 15:04:26 -07:00
Wayne Warthen
c1fa7b420a SD Media Automatic Drive Assignment - Issue #365
- Modified SD Media handling such that no OS drive letters will be assigned automatically at OS Startup if there is no media inserted.
2023-10-05 10:14:30 -07:00
27 changed files with 399 additions and 187 deletions

View File

@@ -1,3 +1,8 @@
Version 3.4
-----------
NOTE: Changes require HBIOS/CBIOS/Apps sync, version bump to 3.4 to ensure integrity
- WBW: Device type number moved from upper nibble to full byte
Version 3.3
-----------
- WBW: Support Front Panel switches

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -1,5 +1,11 @@
all:
.PHONY: tools source clean clobber diff dist
all: tools source
tools:
$(MAKE) --directory Tools
source:
$(MAKE) --directory Source
clean:

View File

@@ -1,9 +1,9 @@
**RomWBW ReadMe** \
Version 3.3 \
Version 3.4 \
Wayne Warthen ([wwarthen@gmail.com](mailto:wwarthen@gmail.com)) \
04 Oct 2023
06 Oct 2023
# Overview

View File

@@ -1,6 +1,6 @@
RomWBW ReadMe
Wayne Warthen (wwarthen@gmail.com)
04 Oct 2023
06 Oct 2023

View File

@@ -1066,10 +1066,6 @@ drvmap1: ; loop through device table looking for a match
drvmap2:
; convert index to device type id
ld a,c ; index to accum
rlca ; move it to upper nibble
rlca ; ...
rlca ; ...
rlca ; ...
ld (device),a ; save as device id
;
; loop thru hbios units looking for device type/unit match
@@ -1309,10 +1305,6 @@ prtdev:
rst 08 ; call hbios, D := device, E := unit
push de ; save results
ld a,d ; device to A
rrca ; isolate high nibble (device)
rrca ; ...
rrca ; ...
rrca ; ... into low nibble
and $0F ; mask out undesired bits
push hl ; save HL
add a,a ; multiple A by two for word table

View File

@@ -1350,7 +1350,6 @@ DSK_SELECT1A:
LD B,BF_DIODEVICE ; HBIOS FUNC: REPORT DEVICE INFO
RST 08 ; GET UNIT INFO, DEVICE TYPE IN D
LD A,D ; DEVICE TYPE -> A
AND $F0 ; ISOLATE HIGH BITS
CP DIODEV_FD ; FLOPPY?
JR NZ,DSK_SELECT1B ; IF NOT, DO LBA IO
LD HL,SEKLBA+3 ; POINT TO HIGH ORDER BYTE
@@ -1511,8 +1510,8 @@ DSK_MBR3:
;
DSK_MBR4:
; IF BOOT FROM PARTITION, USE NEW SECTORS PER SLICE VALUE
LD HL,16384 ; NEW SECTORS PER SLICE
LD (SPS),HL ; SAVE IT
LD HL,16384 ; NEW SECTORS PER SLICE
LD (SPS),HL ; SAVE IT
; UPDATE MEDIA ID
LD A,MID_HDNEW ; NEW MEDIA ID
@@ -1520,20 +1519,79 @@ DSK_MBR4:
;
DSK_MBR5:
; ADJUST LBA OFFSET BASED ON TARGET SLICE
LD A,(SLICE) ; GET SLICE, A IS LOOP CNT
LD HL,(SEKLBA) ; SET DE:HL
LD DE,(SEKLBA+2) ; ... TO STARTING LBA
LD BC,(SPS) ; SECTORS PER SLICE
DSK_MBR6:
OR A ; SET FLAGS TO CHECK LOOP CNTR
JR Z,DSK_MBR8 ; DONE IF COUNTER EXHAUSTED
ADD HL,BC ; ADD ONE SLICE TO LOW WORD
JR NC,DSK_MBR7 ; CHECK FOR CARRY
INC DE ; IF SO, BUMP HIGH WORD
DSK_MBR7:
DEC A ; DEC LOOP DOWNCOUNTER
JR DSK_MBR6 ; AND LOOP
LD A,(SLICE) ; GET SLICE, A IS LOOP CNT
LD HL,(SEKLBA) ; SET DE:HL
LD DE,(SEKLBA+2) ; ... TO STARTING LBA
LD BC,(SPS) ; SECTORS PER SLICE
DSK_MBR6:
OR A ; SET FLAGS TO CHECK LOOP CNTR
JR Z,DSK_MBR8 ; DONE IF COUNTER EXHAUSTED
ADD HL,BC ; ADD ONE SLICE TO LOW WORD
JR NC,DSK_MBR7 ; CHECK FOR CARRY
INC DE ; IF SO, BUMP HIGH WORD
DSK_MBR7:
DEC A ; DEC LOOP DOWNCOUNTER
JR DSK_MBR6 ; AND LOOP
DSK_MBR8:
; LBA OFFSET OF DESIRED SLICE IS NOW IN DE:HL
; NEED TO CHECK IF THE SLICE IS BEYOND CAPACITY OF MEDIA
; IF LBA_OFF + SPS >= DSK_CAP, ERROR!
; SAVE LBA_OFF
PUSH DE ; MSW
PUSH HL ; LSW
; ADD SPS TO COMPUTE LBA_REQ
LD BC,(SPS) ; SECTORS PER SLICE
ADD HL,BC ; ADD ONE SLICE TO LOW WORD
JR NC,DSK_MBR9 ; CHECK FOR CARRY
INC DE ; IF SO, BUMP HIGH WORD
DSK_MBR9:
; SAVE CAP_REQ
LD (CAP_REQ),HL ; LSW
LD (CAP_REQ+2),DE ; MSW
;
#IFDEF PLTWBW
; GET DSK_CAP (DE:HL)
LD B,BF_DIOCAP ; HBIOS DISK CAPACITY FUNC
LD A,(SEKUNIT) ; DISK UNIT NUMBER
LD C,A ; ... INTO C
RST 08 ; HBIOS CALL (DE:HL = CAPACITY)
#ENDIF
;
#IFDEF PLTUNA
; GET DSK_CAP (DE:HL)
LD C,$45 ; UBIOS DISK INFO FUNC
LD A,(SEKUNIT) ; DISK UNIT NUMBER
LD B,A ; ... INTO B
RST 08 ; CALL UNA (DE:HL = CAPACITY)
#ENDIF
;
; SAVE DSK_CAP (DE:HL)
PUSH DE ; SAVE DSK_CAP (MSW)
PUSH HL ; SAVE DSK_CAP (LSW)
;
; CHECK DSK_CAP >= CAP_REQ, CF SET ON OVERFLOW
; NO NEED SAVE ACTUAL RESULT
OR A ; CLEAR CARRY FOR SBC
POP HL ; DSK_CAP LSW
LD DE,(CAP_REQ) ; CAP_REQ LSW
SBC HL,DE ; DSK_CAP - LBA_REQ (LSW)
POP HL ; DSK_CAP MSW
LD DE,(CAP_REQ+2) ; CAP_REQ MSW
SBC HL,DE ; DSK_CAP - LBA_REQ (MSW)
;
; RESTORE LBA_OFF
POP HL ; LSW
POP DE ; MSW
;
; ABORT ON OVERFLOW WITH ERROR!
JR NC,DSK_MBR10 ; IF NO OVERFLOW, CONTINUE
OR $FF ; SIGNAL ERROR
RET ; DONE
;
DSK_MBR10:
; FINALIZE SLICE LBA
SET 7,D ; SET LBA ACCESS FLAG
; RESAVE IT
LD (SEKLBA),HL ; LOWORD
@@ -1758,6 +1816,7 @@ CCPBUF .DW 0 ; ADDRESS OF CCP BUF IN BIOS BANK
MEDID .DB 0 ; TEMP STORAGE FOR MEDIA ID
SLICE .DB 0 ; CURRENT SLICE
SPS .DW 0 ; SECTORS PER SLICE
CAP_REQ .DW 0,0 ; LBA CAP REQUIRED FOR SLICE
STKSAV .DW 0 ; TEMP SAVED STACK POINTER
;
#IFDEF PLTWBW
@@ -3346,10 +3405,6 @@ DEVUNK .DB "UNK$"
RST 08 ; CALL HBIOS
LD A,D ; RESULTANT DEVICE TYPE
PUSH DE ; NEED TO SAVE UNIT NUMBER (IN E)
RRCA ; ROTATE DEVICE
RRCA ; ... BITS
RRCA ; ... INTO
RRCA ; ... LOWEST 4 BITS
AND $0F ; ISOLATE DEVICE BITS
ADD A,A ; MULTIPLY BY TWO FOR WORD TABLE
LD HL,DEVTBL ; POINT TO START OF DEVICE NAME TABLE

View File

@@ -38,7 +38,7 @@
extrn ?bnkxlt
extrn phex8, cout
extrn phex16, phex8, cout, crlf, crlf2
; CP/M 3 Disk definition macros
@@ -493,8 +493,7 @@ media:
ld b,17h ; HBIOS func: report device info
call 0FFF0h ; get unit info, device type in D
ld a,d ; device type -> A
and 0F0h ; isolate high bits
cp 10h ; floppy?
cp 01h ; floppy?
jr nz,media1 ; if not, do LBA I/O
ld hl,lba+3 ; point to high order byte
res 7,(hl) ; switch from LBA -> CHS
@@ -600,6 +599,53 @@ boot7:
dec a ; dec loop downcounter
jr boot6 ; and loop
boot8:
; LBA offset of desired slice is now in DE:HL.
; Need to check if the slice is beyond capacity of media.
; If lba_off + sps >= dsk_cap, error!
; Save lba_off
push de ; msw
push hl ; lsw
; Add sps to compute lba_req
ld bc,(sps) ; sectors per slice
add hl,bc ; add one slice to low word
jr nc,dsk_mbr9 ; check for carry
inc de ; if so, bump high word
dsk_mbr9:
; Save cap_req
ld (cap_req),hl ; lsw
ld (cap_req+2),de ; msw
; Get dsk_cap (de:hl)
ld b,1Ah ; hbios disk capacity func
ld a,(unit) ; disk unit number
ld c,a ; ... into c
rst 08 ; hbios call (de:hl = capacity)
; Save dsk_cap (de:hl)
push de ; save dsk_cap (msw)
push hl ; save dsk_cap (lsw)
; Check dsk_cap >= cap_req, cf set on overflow
; No need save actual result
or a ; clear carry for sbc
pop hl ; dsk_cap lsw
ld de,(cap_req) ; cap_req lsw
sbc hl,de ; dsk_cap - lba_req (lsw)
pop hl ; dsk_cap msw
ld de,(cap_req+2) ; cap_req msw
sbc hl,de ; dsk_cap - lba_req (msw)
; Restore lba_off
pop hl ; lsw
pop de ; msw
; Abort on overflow with error!
jp c,err_noslice ; slice too high, error exit
; Finalize slice lba
set 7,d ; set LBA access flag
ld (lba),hl ; save new lba, low word
ld (lba+2),de ; save new lba, high word
@@ -870,6 +916,7 @@ unit db 0 ; working disk unit num
slice db 0 ; working slice num
lba dw 0,0 ; working lba
sps dw 0 ; sectors per slice
cap_req dw 0,0 ; lba cap required for slice
mbrsec ds 512 ; MBR sector buffer
dma dw 0 ; current DMA address
bank db 0 ; HBIOS DMA bank

View File

@@ -1,4 +1,4 @@
$define{doc_ver}{Version 3.3}$
$define{doc_ver}{Version 3.4}$
$define{doc_product}{RomWBW}$
$define{doc_root}{https://github.com/wwarthen/RomWBW/raw/dev/Doc}$
$ifndef{doc_title}$ $define{doc_title}{Document Title}$ $endif$

View File

@@ -1,7 +1,7 @@
#
# NOTE: Pandoc, Latex (MiKTeX or TexLive), and gpp must be installed
# NOTE: gpp, Pandoc, and Latex (MiKTeX or TexLive) must be installed
# and available on commandline for this build to work!!!
# Typically "sudo apt install pandoc, texlive-latex-extra, gpp"
# Typically "sudo apt install gpp pandoc texlive-latex-extra texlive-luatex texlive-fonts-extra fonts-roboto"
#
OBJECTS = ReadMe.gfm ReadMe.txt UserGuide.pdf SystemGuide.pdf Applications.pdf ROM_Applications.pdf Catalog.pdf Errata.pdf
# DEST = ../../Doc
@@ -16,7 +16,7 @@ all :: deploy
gpp -o $@ -U "$$" "$$" "{" "}{" "}$$" "{" "}" "@@@" "" -M "$$" "$$" "{" "}{" "}$$" "{" "}" $<
%.pdf : %.tmp
pandoc $< -f markdown -t latex -s -o $@ --default-image-extension=pdf
pandoc $< -f markdown -t pdf -s -o $@ --default-image-extension=pdf --pdf-engine=lualatex
%.html : %.tmp
pandoc $< -f markdown -t html -s -o $@ --default-image-extension=pdf

View File

@@ -390,17 +390,20 @@ below enumerates these values.
| **Device Type** | **ID** | **Description** | **Driver** |
|-----------------|-------:|------------------------------------------|------------|
| CIODEV_UART | 0x00 | 16C550 Family Serial Interface | uart.asm |
| CIODEV_ASCI | 0x10 | Z180 Built-in Serial Ports | asci.asm |
| CIODEV_TERM | 0x20 | Terminal | ansi.asm |
| CIODEV_PRPCON | 0x30 | PropIO Serial Console Interface | prp.asm |
| CIODEV_PPPCON | 0x40 | ParPortProp Serial Console Interface | ppp.asm |
| CIODEV_SIO | 0x50 | Zilog Serial Port Interface | sio.asm |
| CIODEV_ACIA | 0x60 | MC68B50 Asynchronous Interface | acia.asm |
| CIODEV_PIO | 0x70 | Zilog Parallel Interface Controller | pio.asm |
| CIODEV_UF | 0x80 | FT232H-based ECB USB FIFO | uf.asm |
| CIODEV_DUART | 0x90 | SCC2681 Family Dual UART | duart.asm |
| CIODEV_Z2U | 0xA0 | Zilog Z280 Built-in Serial Ports | z2u.asm |
| CIODEV_LPT | 0xB0 | Parallel I/O Controller | lpt.asm |
| CIODEV_ASCI | 0x01 | Z180 Built-in Serial Ports | asci.asm |
| CIODEV_TERM | 0x02 | Terminal | ansi.asm |
| CIODEV_PRPCON | 0x03 | PropIO Serial Console Interface | prp.asm |
| CIODEV_PPPCON | 0x04 | ParPortProp Serial Console Interface | ppp.asm |
| CIODEV_SIO | 0x05 | Zilog Serial Port Interface | sio.asm |
| CIODEV_ACIA | 0x06 | MC68B50 Asynchronous Interface | acia.asm |
| CIODEV_PIO | 0x07 | Zilog Parallel Interface Controller | pio.asm |
| CIODEV_UF | 0x08 | FT232H-based ECB USB FIFO | uf.asm |
| CIODEV_DUART | 0x09 | SCC2681 Family Dual UART | duart.asm |
| CIODEV_Z2U | 0x0A | Zilog Z280 Built-in Serial Ports | z2u.asm |
| CIODEV_LPT | 0x0B | Parallel I/O Controller | lpt.asm |
| CIODEV_ESPCON | 0x0B | ESP32 VGA Console | esp.asm |
| CIODEV_ESPSER | 0x0B | ESP32 Serial Port | esp.asm |
| CIODEV_SCON | 0x0B | S100 Console | scon.asm |
Character devices can usually be configured with line characteristics
such as speed, framing, etc. A word value (16 bit) is used to describe
@@ -568,15 +571,20 @@ below enumerates there values.
| **Device Type** | **ID** | **Description** | **Driver** |
|-----------------|-------:|------------------------------------------|------------|
| DIODEV_MD | 0x00 | Memory Disk | md.asm |
| DIODEV_FD | 0x10 | Floppy Disk | fd.asm |
| DIODEV_RF | 0x20 | RAM Floppy | rf.asm |
| DIODEV_IDE | 0x30 | IDE Disk | ide.asm |
| DIODEV_ATAPI | 0x40 | ATAPI Disk (not implemented) | |
| DIODEV_PPIDE | 0x50 | PPIDE Disk | ppide.asm |
| DIODEV_SD | 0x60 | SD Card | sd.asm |
| DIODEV_PRPSD | 0x70 | PropIO SD Card | prp.asm |
| DIODEV_PPPSD | 0x80 | ParPortProp SD Card | ppp.asm |
| DIODEV_HDSK | 0x90 | SIMH HDSK Disk | hdsk.asm |
| DIODEV_FD | 0x01 | Floppy Disk | fd.asm |
| DIODEV_RF | 0x02 | RAM Floppy | rf.asm |
| DIODEV_IDE | 0x03 | IDE Disk | ide.asm |
| DIODEV_ATAPI | 0x04 | ATAPI Disk (not implemented) | |
| DIODEV_PPIDE | 0x05 | PPIDE Disk | ppide.asm |
| DIODEV_SD | 0x06 | SD Card | sd.asm |
| DIODEV_PRPSD | 0x07 | PropIO SD Card | prp.asm |
| DIODEV_PPPSD | 0x08 | ParPortProp SD Card | ppp.asm |
| DIODEV_HDSK | 0x09 | SIMH HDSK Disk | hdsk.asm |
| DIODEV_PPA | 0x0A | Iomega PPA Disk | ppa.asm |
| DIODEV_IMM | 0x0B | Iomega IMM Disk | imm.asm |
| DIODEV_SYQ | 0x0C | Syquest Sparq Disk | syq.asm |
| DIODEV_CHUSB | 0x0D | CH375/376 USB Disk | ch.asm |
| DIODEV_CHSD | 0x0E | CH375/376 SD Card | ch.asm |
A fixed set of media types are defined. The currently defined media
types identifiers are listed below. Each driver will support one or
@@ -878,11 +886,11 @@ unit. The table below enumerates these values.
| **Device Type** | **ID** | **Description** | **Driver** |
|-----------------|-------:|------------------------------------------|------------|
| RTCDEV_DS | 0x00 | Maxim DS1302 Real-Time Clock w/ NVRAM | dsrtc.asm |
| RTCDEV_BQ | 0x10 | BQ4845P Real Time Clock | bqrtc.asm |
| RTCDEV_SIMH | 0x20 | SIMH Simulator Real-Time Clock | simrtc.asm |
| RTCDEV_INT | 0x30 | Interrupt-based Real Time Clock | intrtc.asm |
| RTCDEV_DS7 | 0x40 | Maxim DS1307 PCF I2C RTC w/ NVRAM | ds7rtc.asm |
| RTCDEV_RP5 | 0x50 | Ricoh RPC01A Real-Time Clock w/ NVRAM | rp5rtc.asm |
| RTCDEV_BQ | 0x01 | BQ4845P Real Time Clock | bqrtc.asm |
| RTCDEV_SIMH | 0x02 | SIMH Simulator Real-Time Clock | simrtc.asm |
| RTCDEV_INT | 0x03 | Interrupt-based Real Time Clock | intrtc.asm |
| RTCDEV_DS7 | 0x04 | Maxim DS1307 PCF I2C RTC w/ NVRAM | ds7rtc.asm |
| RTCDEV_RP5 | 0x05 | Ricoh RPC01A Real-Time Clock w/ NVRAM | rp5rtc.asm |
The time functions to get and set the time (RTCGTM and RTCSTM) require a
6 byte date/time buffer in the following format. Each byte is BCD
@@ -1021,8 +1029,8 @@ unit. The table below enumerates these values.
| **Device Type** | **ID** | **Description** | **Driver** |
|-----------------|-------:|------------------------------------------|------------|
| DSKYDEV_ICM | 0x00 | Original ICM7218 based DSKY | icm.asm |
| DSKYDEV_PKD | 0x10 | Next Gen Intel P8279 based DSKY | pkd.asm |
| DSKYDEV_ICM | 0x01 | Original ICM7218 based DSKY | icm.asm |
| DSKYDEV_PKD | 0x02 | Next Gen Intel P8279 based DSKY | pkd.asm |
When segment display function encodes the display data in a byte per
character format. Currently, all segment displays are exactly
@@ -1214,10 +1222,11 @@ below enumerates there values.
| **Device Type** | **ID** | **Description** | **Driver** |
|-----------------|-------:|------------------------------------------|------------|
| VDADEV_VDU | 0x00 | MC6845 Family Video Display Controller | vdu.asm |
| VDADEV_CVDU | 0x10 | MC8563-based Video Display Controller | cvdu.asm |
| VDADEV_GDC | 0x20 | uPD7220 Video Display Controller | gdc.asm |
| VDADEV_TMS | 0x30 | TMS9918/38/58 Video Display Controller | tms.asm |
| VDADEV_VGA | 0x40 | HD6445CP4-based Video Display Controller | vga.asm |
| VDADEV_CVDU | 0x01 | MC8563-based Video Display Controller | cvdu.asm |
| VDADEV_GDC | 0x02 | uPD7220 Video Display Controller | gdc.asm |
| VDADEV_TMS | 0x03 | TMS9918/38/58 Video Display Controller | tms.asm |
| VDADEV_VGA | 0x04 | HD6445CP4-based Video Display Controller | vga.asm |
| VDADEV_VRC | 0x05 | VGARC | vrc.asm |
Depending on the capabilities of the hardware, the use of colors and
attributes may or may not be supported. If the hardware does not support
@@ -1629,9 +1638,9 @@ below enumerates these values.
| **Device Type** | **ID** | **Description** | **Driver** |
|-----------------|-------:|----------------------------------------------|-------------|
| SNDDEV_SN76489 | $00 | SN76489 Programmable Sound Generator | sn76489.asm |
| SNDDEV_AY38910 | $10 | AY-3-8910/YM2149 Programmable Sound Generator| ay38910.asm |
| SNDDEV_BITMODE | $20 | Bit-bang Speaker | spk.asm |
| SNDDEV_YM2612 | $30 | YM2612 Programmable Sound Generator | ym2612.asm |
| SNDDEV_AY38910 | $01 | AY-3-8910/YM2149 Programmable Sound Generator| ay38910.asm |
| SNDDEV_BITMODE | $02 | Bit-bang Speaker | spk.asm |
| SNDDEV_YM2612 | $03 | YM2612 Programmable Sound Generator | ym2612.asm |
The Sound functions defer the actual programming of the sound chip
until the SNDPLAY function is called. You will call the volume

View File

@@ -206,7 +206,7 @@ below, **carefully** pick the appropriate ROM image for your hardware.
| [Z80-Retro SBC]^8^ | - | Z80RETRO_std.rom | 38400 |
| [S100 Computers Z180]^9^ | S100 | S100_std.rom | 38400 |
| [Duodyne Z80 System]^1^ | Duo | DUO_std.rom | 38400 |
| [Heath H8 Z80 System] | H8 | HEATH_std.rom | 115200 |
| [Heath H8 Z80 System]^10^ | H8 | HEATH_std.rom | 115200 |
| ^1^Designed by Andrew Lynch
| ^2^Designed by Sergey Kiselev
@@ -217,6 +217,7 @@ below, **carefully** pick the appropriate ROM image for your hardware.
| ^7^Designed by Bill Shen
| ^8^Designed by Peter Wilson
| ^9^Designed by John Monahan
| ^10^Designed by Les Bird
RCBus refers to Spencer Owen's RC2014 bus specification and derivatives
including RC26, RC40, RC80, and BP80.
@@ -1300,7 +1301,7 @@ is considered the "legacy" disk layout for RomWBW.
RomWBW has subsequently been enhanced to support the concept of
partitioning. The partition mechanism is entirely compliant with Master
Boot Record (MBR) Partition Tables introduced by IBM for the PC. The
Boot Record (MBR) Partition Tables introduced by IBM for the PC. The
Wikipedia article on the
[Master Boot Record](https://en.wikipedia.org/wiki/Master_boot_record)
is excellent if you are not familiar with them. This is considered the
@@ -1403,6 +1404,38 @@ Directory Entries". In this case, the value is 1024 which implies that
this drive is located on a modern (hd1k) disk layout. If the value
was 512, it would indicate a legacy (hd512) disk layout.
## Hard Disk Capacity
Although RomWBW can support many CP/M filesystem slices on a single
hard disk, you are still constrained by the physical capacity of the
actual hard disk. In most scenarios, RomWBW does not prevent you
from attempting to use more slices than will fit on your hard disk
device. If you attempt to do so, disk I/O errors will be reported.
The exact number of CP/M filesystem slices that will fit on your
specific physical hard disk can be determined as follows:
- For hd512 disk layouts, it is slices * 8,320KB.
- For hd1k disk layouts, it is 1024KB + (slices * 8192KB). Since
1024KB is exactly 1MB, it is equivalent to say 1MB + (slices * 8MB).
**WARNING**: In this document KB means 1024 bytes and MB means 1048576
bytes (frequently expressed as KiB and MiB in modern terminology).
In general, hard disk capacities use KB to mean 1000 bytes and MB
to mean 1,000,000 bytes.
As an example, hardware distributors frequently supply a "64MB"
CF Card with a RomWBW system. Such a hard disk probably has
less than 62.5MB of actual space (using the RomWBW definition that
1MB is 1048576 bytes). Such a drive will not support 8 slices. It
will support 7 slices just fine because 7 * 8,320KB = 58.24MB (hd512)
or 1024KB + (7 * 8192MB) = 57MB (hd1k).
The cost of high capacity CF and SD Cards has become very reasonable.
I highly recommend upgrading to 1GB or greater media. This size will
support all features of the RomWBW Combo Disk Image with 64 slices
and a 384MB FAT filesystem (see [Combo Hard Disk Image]).
# Disk Content Preparation
With some understanding of how RomWBW presents disk space to the
@@ -1510,20 +1543,20 @@ command prompt.
### Hard Disk Images
Keeping in mind that a RomWBW hard disk (including CF /SD Cards)
Keeping in mind that a RomWBW hard disk (including CF/SD Cards)
allows you to have multiple slices (CP/M filesystems), there are a
couple ways to image hard disk media. The easiest approach is to
use the "combo" disk image. This image is already prepared
with 6 slices containing 5 ready-to-run OSes and a slice with
the WordStar application. Alternatively, you can create your own
the WordStar application files. Alternatively, you can create your own
hard disk image with the specific slice contents you choose.
#### Combo Hard Disk Image
The combo disk image is essentially just a single image that has several
of the individual filesystem images already concatenated together. The
combo disk image contains the following 6 slices in the positions
indicated:
of the individual filesystem images (slices) already concatenated
together. The combo disk image contains the following 6 slices in the
positions indicated:
| **Slice** | **Description** |
|-----------|------------------------------------------------------------------|
@@ -1541,42 +1574,46 @@ corresponds to your desired hard disk layout. Review the information
in [Hard Disk Layouts] if you need more information of the disk layout
options.
The partition table in the combo disk images includes an entry for a
FAT filesystem starting at 512K with a size of 384K. So when using
the combo disk image, by default, your disk will have the first 512K
dedicated to CP/M slices followed by 384K for a FAT filesystem. Note
that the pre-allocated FAT partition must still be formatted using
`FDISK32` in order to actually use it
(see [FAT Filesystem Preparation]).
Although the combo disk images contain only 6 slices of content, they
reserve space to store 64 CP/M filesystem slices as well as a
single 384MB FAT filesystem. Keep in mind that the slices beyond the
first 6 are not yet initialized. You will need to use the `CLRDIR`
application to initialize them before their first use. Likewise, the
pre-allocated FAT partition must still be formatted using `FAT FORMAT`
in order to actually use it (see [FAT Filesystem Preparation]).
Alternatively, the FAT partition can be formatted on a modern computer.
The combo disk image layout was designed to fit well on a 1GB hard
disk. The 512K of CP/M slices and 384K of FAT filesystem all fit inside
a 1GB hard disk. This size choice was a bit arbitrary, but based on the
idea that a 1GB CF or SD Card is easy and cheap to acquire. It is fine
if your hard disk is smaller than 1GB. It just means that it will not
be possible to use the pre-allocated FAT filesystem partition (you will
get I/O errors if you attempt to do so).
The combo disk image layout was designed to fit well on a 1GB hard disk.
The 64 CP/M slices (approximately 512MB) and 384MB FAT filesystem all
fit well within a 1GB hard disk. This size choice was a bit arbitrary,
but based on the idea that a 1GB CF or SD Card is easy and cheap to
acquire. It is fine if your hard disk is smaller than 1GB. It just
means that it will not be possible to use the pre-allocated FAT
filesystem partition and any CP/M filesystem slices that don't fit. You
will get I/O errors if you attempt to access an area beyond the end of
the physical hard disk.
The 512KB area of the combo disk image set aside for slices can contain
approximately 64 slices (8MB per slice). If your actual hard disk is
less than 512KB, then this will correspondingly reduce the number of
possible slices. If your hard disk is smaller than 64MB, then you
will find that some of the higher drive letters do not work because
they exist "off the end" of the hard disk.
**WARNING**:Your hard disk may be too small to contain the full 64
CP/M filesystem slices. The true number of CP/M filesystem slices that
will fit on your specific physical hard disk can be calculated as
described in [Hard Disk Capacity].
For RomWBW systems with a single hard disk (typical), you will notice
that an OS will pre-allocate 8 drive letters to the hard disk. If the
combo disk image is being used, only the first 6 drive letters (A: - H:)
will have any content because the combo disk image only provides 6
slices. The subsequent drives (I: - J:) will have no content and will
not be pre-initialized. If you want to use any slices beyond the first
6, you must initialize them using `CLRDIR` first.
that the OS will pre-allocate 8 drive letters to the hard disk. If the
combo disk image is being used, only the first 6 drive letters
(typically C: - H:) will have any content because the combo disk image
only provides 6 slices. The subsequent drives (typically I: - J:) will
have no content and will not be pre-initialized. If you want to use any
slices beyond the first 6 on the hard disk, then you must initialize
them using `CLRDIR` first.
A great way to maintain your own data on a hard disk is to put this
data in slices beyond the first 6. By doing so, you can always
"reimage" your drive with the combo image without overlaying the data
stored in the slices beyond the first 6. Just be very careful to use
the same combo image (hd512 or hd1k) as you used originally.
the same combo image layout (hd512 or hd1k) as you used originally.
Also remember to calculate the maximum number of slices your hard disk
will support and do not exceed this number.
#### Custom Hard Disk Image

View File

@@ -6945,7 +6945,6 @@ PS_PRTDT:
BIT 7,A ; FLOPPY BIT SET?
LD HL,PS_DTFLOP ; ASSUME FLOPPY
JP NZ,PS_PRT18 ; IF FLOPPY, JUMP AHEAD
LD C,E
LD DE,PS_DTHARD
LD A,00001111B
@@ -7242,10 +7241,9 @@ PS_SOUND:
LD E,BF_SNDQ_DEV
RST 08
PUSH BC
LD C,B
LD A,11110000B ; TYPE IS IN UPPER NIBBLE
LD A,B
LD DE,PS_SDSN76489
CALL PRTIDXMSK
CALL PRTIDXDEA
CALL PS_PAD18
POP BC
;
@@ -7270,9 +7268,8 @@ PS_SOUND:
;
PS_PRTDEV:
EX DE,HL
LD C,H
LD A,11110000B ; TYPE IS IN UPPER NIBBLE
CALL PRTIDXMSK
LD A,H ; TYPE ID
CALL PRTIDXDEA ; PRINT TYPE LABEL
LD A,L ; UNIT NUMBER
CALL PRTDECB ; PRINT NUM, ASSUME 1 CHAR
CALL PC_COLON ; PRINT COLON

View File

@@ -303,20 +303,20 @@ MID_HDNEW .EQU 10
; CHAR DEVICE IDS
;
CIODEV_UART .EQU $00
CIODEV_ASCI .EQU $10
CIODEV_TERM .EQU $20
CIODEV_PRPCON .EQU $30
CIODEV_PPPCON .EQU $40
CIODEV_SIO .EQU $50
CIODEV_ACIA .EQU $60
CIODEV_PIO .EQU $70
CIODEV_UF .EQU $80
CIODEV_DUART .EQU $90
CIODEV_Z2U .EQU $A0
CIODEV_LPT .EQU $B0
CIODEV_ESPCON .EQU $C0
CIODEV_ESPSER .EQU $D0
CIODEV_SCON .EQU $E0
CIODEV_ASCI .EQU $01
CIODEV_TERM .EQU $02
CIODEV_PRPCON .EQU $03
CIODEV_PPPCON .EQU $04
CIODEV_SIO .EQU $05
CIODEV_ACIA .EQU $06
CIODEV_PIO .EQU $07
CIODEV_UF .EQU $08
CIODEV_DUART .EQU $09
CIODEV_Z2U .EQU $0A
CIODEV_LPT .EQU $0B
CIODEV_ESPCON .EQU $0C
CIODEV_ESPSER .EQU $0D
CIODEV_SCON .EQU $0E
;
; SUB TYPES OF CHAR DEVICES
;
@@ -328,51 +328,51 @@ CIODEV_SCON .EQU $E0
; DISK DEVICE IDS
;
DIODEV_MD .EQU $00
DIODEV_FD .EQU $10
DIODEV_RF .EQU $20
DIODEV_IDE .EQU $30
DIODEV_ATAPI .EQU $40
DIODEV_PPIDE .EQU $50
DIODEV_SD .EQU $60
DIODEV_PRPSD .EQU $70
DIODEV_PPPSD .EQU $80
DIODEV_HDSK .EQU $90
DIODEV_PPA .EQU $A0
DIODEV_IMM .EQU $B0
DIODEV_SYQ .EQU $C0
DIODEV_CHUSB .EQU $D0
DIODEV_CHSD .EQU $E0
DIODEV_FD .EQU $01
DIODEV_RF .EQU $02
DIODEV_IDE .EQU $03
DIODEV_ATAPI .EQU $04
DIODEV_PPIDE .EQU $05
DIODEV_SD .EQU $06
DIODEV_PRPSD .EQU $07
DIODEV_PPPSD .EQU $08
DIODEV_HDSK .EQU $09
DIODEV_PPA .EQU $0A
DIODEV_IMM .EQU $0B
DIODEV_SYQ .EQU $0C
DIODEV_CHUSB .EQU $0D
DIODEV_CHSD .EQU $0E
;
; RTC DEVICE IDS
;
RTCDEV_DS .EQU $00 ; DS1302
RTCDEV_BQ .EQU $10 ; BQ4845P
RTCDEV_SIMH .EQU $20 ; SIMH
RTCDEV_INT .EQU $30 ; PERIODIC INT TIMER
RTCDEV_DS7 .EQU $40 ; DS1307 (I2C)
RTCDEV_RP5 .EQU $50 ; RP5C01
RTCDEV_BQ .EQU $01 ; BQ4845P
RTCDEV_SIMH .EQU $02 ; SIMH
RTCDEV_INT .EQU $03 ; PERIODIC INT TIMER
RTCDEV_DS7 .EQU $04 ; DS1307 (I2C)
RTCDEV_RP5 .EQU $05 ; RP5C01
;
; DSKY DEVICE IDS
;
DSKYDEV_ICM .EQU $00 ; Intersil ICM7218
DSKYDEV_PKD .EQU $10 ; Intel P8279
DSKYDEV_H8P .EQU $20 ; Heath H8 Panel
DSKYDEV_PKD .EQU $01 ; Intel P8279
DSKYDEV_H8P .EQU $02 ; Heath H8 Panel
;
; VIDEO DEVICE IDS
;
VDADEV_VDU .EQU $00 ; ECB VDU - MOTOROLA 6545
VDADEV_CVDU .EQU $10 ; ECB COLOR VDU - MOS 8563
VDADEV_GDC .EQU $20 ; GRAPHICS DISPLAY CTLR - UPD7220
VDADEV_TMS .EQU $30 ; N8 ONBOARD VDA SUBSYSTEM - TMS 9918
VDADEV_VGA .EQU $40 ; ECB VGA3 - HITACHI HD6445
VDADEV_VRC .EQU $50 ; VGARC
VDADEV_CVDU .EQU $01 ; ECB COLOR VDU - MOS 8563
VDADEV_GDC .EQU $02 ; GRAPHICS DISPLAY CTLR - UPD7220
VDADEV_TMS .EQU $03 ; N8 ONBOARD VDA SUBSYSTEM - TMS 9918
VDADEV_VGA .EQU $04 ; ECB VGA3 - HITACHI HD6445
VDADEV_VRC .EQU $05 ; VGARC
;
; SOUND DEVICE IDS
;
SNDDEV_SN76489 .EQU $00
SNDDEV_AY38910 .EQU $10
SNDDEV_BITMODE .EQU $20
SNDDEV_YM2612 .EQU $30
SNDDEV_AY38910 .EQU $01
SNDDEV_BITMODE .EQU $02
SNDDEV_YM2612 .EQU $03
;
; DSKY KEYS
;

View File

@@ -688,7 +688,7 @@ PPPSD_RESET:
PPPSD_DEVICE:
LD D,DIODEV_PPPSD ; D := DEVICE TYPE
LD E,(IY+PPPSD_DEV) ; E := PHYSICAL DEVICE NUMBER
LD C,%01110010 ; C := ATTRIBUTES, REMOVABLE, SD CARD
LD C,%00110010 ; C := ATTRIBUTES, REMOVABLE, SD CARD
LD H,0 ; H := 0, DRIVER HAS NO MODES
LD L,PPPBASE ; L := BASE I/O ADDRESS
XOR A ; SIGNAL SUCCESS

View File

@@ -545,7 +545,7 @@ PRPSD_RESET:
PRPSD_DEVICE:
LD D,DIODEV_PRPSD ; D := DEVICE TYPE
LD E,(IY+PRPSD_DEV) ; E := PHYSICAL DEVICE NUMBER
LD C,%01110010 ; C := ATTRIBUTES, REMOVABLE, SD CARD
LD C,%00110010 ; C := ATTRIBUTES, REMOVABLE, SD CARD
LD H,0 ; H := 0, DRIVER HAS NO MODES
LD L,PRP_IOBASE ; L := BASE I/O ADDRESS
XOR A ; SIGNAL SUCCESS

View File

@@ -932,7 +932,7 @@ SD_RESET:
SD_DEVICE:
LD D,DIODEV_SD ; D := DEVICE TYPE
LD E,(IY+SD_DEV) ; E := PHYSICAL DEVICE NUMBER
LD C,%01110010 ; C := ATTRIBUTES, REMOVABLE, SD CARD
LD C,%00110010 ; C := ATTRIBUTES, REMOVABLE, SD CARD
LD H,SDMODE ; H := MODE
LD L,(SD_IOBASE) ; L := BASE I/O ADDRESS
XOR A ; SIGNAL SUCCESS

View File

@@ -583,6 +583,8 @@ BID_ROMN .EQU (BID_ROM0 + ROMBANKS - 1)
BID_RAMN .EQU (BID_RAM0 + RAMBANKS - 1)
;
#IF (ROMSIZE > 0)
;
; NORMAL SYSTEM WITH ROM & RAM
; -- TYPICAL --
BID_BOOT .EQU BID_ROM0 + 0 ; BOOT BANK 0x00
BID_IMG0 .EQU BID_ROM0 + 1 ; ROM LOADER AND FIRST IMAGES BANK 0x01
@@ -600,6 +602,9 @@ BID_USR .EQU BID_RAMN - 1 ; USER BANK (CP/M TPA, ETC.) 0x8E
BID_COM .EQU BID_RAMN - 0 ; COMMON BANK, UPPER 32K 0x8F
;
#ELSE
;
; SPECIAL CONFIGURATION FOR A ROMLESS SYSTEM
; RAM IS POPULATED PRIOR TO ROMWBW STARTUP
; -- TYPICAL --
BID_BOOT .EQU BID_RAM0 + 0 ; BOOT BANK 0x80
BID_IMG0 .EQU BID_RAM0 + 1 ; ROM LOADER AND FIRST IMAGES BANK 0x81
@@ -618,10 +623,6 @@ BID_ROMDN .EQU $FF ; NO ROM DRIVE
;
#ENDIF
;
#IF (ROMSIZE == 0)
BID_BOOT .SET BID_RAM0 ; SPECIAL CASE ROM-LESS SYSTEM
#ENDIF
;
#IF (BIOS == BIOS_WBW)
;
#IF (!MDRAM)

View File

@@ -24,27 +24,57 @@ ifeq ($(UNAME), Linux)
# uname machine strings for building Propeller
endif
SUBDIRS = HDIAG
.PHONY: doc prop shared bp images rom zrc zzrc
all: prop shared images rom zrc zzrc
doc:
$(MAKE) --directory Doc $(ACTION)
prop:
ifeq ($(BUILDPROP), 1)
SUBDIRS += Prop
$(MAKE) --directory Prop $(ACTION)
else
$(info "Builing Propeller is not supported on this $(ARCH) host Linux OS")
$(info Builing Propeller is not supported on this $(ARCH) host Linux OS)
endif
SUBDIRS += Apps
SUBDIRS += CBIOS
SUBDIRS += Forth
SUBDIRS += TastyBasic
SUBDIRS += Fonts
SUBDIRS += CPM22 ZCPR ZCPR-DJ ZSDOS CPM3 ZPM3 QPM
#SUBDIRS += BPBIOS
SUBDIRS += pSys
SUBDIRS += RomDsk
SUBDIRS += HBIOS
SUBDIRS += Images
SUBDIRS += ZRC
SUBDIRS += ZZRC
#SUBDIRS += Doc
TOOLS = ../Tools
include $(TOOLS)/Makefile.inc
shared:
$(MAKE) --directory HDIAG $(ACTION)
$(MAKE) --directory CBIOS $(ACTION)
$(MAKE) --directory CPM22 $(ACTION)
$(MAKE) --directory QPM $(ACTION)
$(MAKE) --directory ZCPR $(ACTION)
$(MAKE) --directory ZCPR-DJ $(ACTION)
$(MAKE) --directory ZSDOS $(ACTION)
$(MAKE) --directory CPM3 $(ACTION)
$(MAKE) --directory ZPM3 $(ACTION)
$(MAKE) --directory pSys $(ACTION)
$(MAKE) --directory Apps $(ACTION)
$(MAKE) --directory Forth $(ACTION)
$(MAKE) --directory TastyBasic $(ACTION)
$(MAKE) --directory Fonts $(ACTION)
$(MAKE) --directory RomDsk $(ACTION)
bp:
$(MAKE) --directory BPBIOS $(ACTION)
images:
$(MAKE) --directory Images $(ACTION)
rom:
$(MAKE) --directory HBIOS $(ACTION)
zrc:
$(MAKE) --directory ZRC $(ACTION)
zzrc:
$(MAKE) --directory ZZRC $(ACTION)
clean: ACTION=clean
clean: all
diff: ACTION=diff
diff: all

33
Source/ReadMeDoc.txt Normal file
View File

@@ -0,0 +1,33 @@
***********************************************************************
*** ***
*** R o m W B W ***
*** ***
*** Z80/Z180 System Software ***
*** ***
***********************************************************************
This document describes the process to build the custom documentation
for RomWBW. The RomWBW documentation is not normally built as part of
the full build process. This is because it requires external tools
to be installed.
All source documents are first pre-processed with gpp to allow use of
some global variable expansions. Pandoc is then used to generate a
variety of output formats. The most significant of these are the PDF
documents. Pandoc invokes a Latex-type processor (LuaTeX) to
produce the final PDF documents.
Required for Windows:
- Pandoc (https://pandoc.org/)
- MiKTeX (https://miktex.org/)
- Install Roboto font from MiKTeX Console
Required for Linux:
- gpp ((apt install gpp)
- Pandoc (dpkg -i pandoc-3.1.8-1-amd64.deb)
- TexLive (apt install texlive-latex-extra texlive-luatex fonts-roboto texlive-fonts-extra)
The source directory for the documentation is .../Source/Doc. From this
directory run Build.cmd for Windows or make for Linux to create the
output documents. This will create the final documents and copy them
to their destination directories.

View File

@@ -1,8 +1,8 @@
#DEFINE RMJ 3
#DEFINE RMN 3
#DEFINE RMN 4
#DEFINE RUP 0
#DEFINE RTP 0
#DEFINE BIOSVER "3.3.0-dev.61"
#DEFINE BIOSVER "3.4.0-dev.2"
#define rmj RMJ
#define rmn RMN
#define rup RUP

View File

@@ -1,7 +1,7 @@
rmj equ 3
rmn equ 3
rmn equ 4
rup equ 0
rtp equ 0
biosver macro
db "3.3.0-dev.61"
db "3.4.0-dev.2"
endm