Browse Source

Merge pull request #129 from wwarthen/dev

Dev
pull/134/head
b1ackmai1er 6 years ago
committed by GitHub
parent
commit
64e8803ec4
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. BIN
      Doc/RomWBW Applications.pdf
  2. BIN
      Doc/RomWBW Architecture.pdf
  3. BIN
      Doc/RomWBW Disk Catalog.pdf
  4. BIN
      Doc/RomWBW Getting Started.pdf
  5. 6
      ReadMe.md
  6. 5
      ReadMe.txt
  7. 13
      Source/Apps/SysCopy.asm
  8. 47
      Source/CPM3/diskio.z80
  9. 3
      Source/Doc/GettingStarted.md
  10. 60
      Source/HBIOS/hbios.asm
  11. 17
      Source/HBIOS/hbios.inc
  12. 3
      Source/HBIOS/md.asm
  13. BIN
      Source/Images/Common/COMP.COM
  14. BIN
      Source/Images/Common/COMPARE.COM

BIN
Doc/RomWBW Applications.pdf

Binary file not shown.

BIN
Doc/RomWBW Architecture.pdf

Binary file not shown.

BIN
Doc/RomWBW Disk Catalog.pdf

Binary file not shown.

BIN
Doc/RomWBW Getting Started.pdf

Binary file not shown.

6
ReadMe.md

@ -3,7 +3,7 @@
## Z80/Z180 System Software
Version 3.1 Pre-release
Wednesday 13 May 2020
Saturday 16 May 2020
Wayne Warthen <wwarthen@gmail.com>
@ -775,6 +775,10 @@ tracks. `CPMLDR.SYS` chain loads `CPM3.SYS`.
used to read the current date/time for file stamping, etc. You can
use the `RTC` app to set the RTC clock.
- The `COPYSYS` command described in the DRI CP/M 3 documentatin is
not provided with RomWBW. The RomWBW `SYSCOPY` command is used
instead.
## Simeon Cran’s ZPM3
ZPM3 is an interesting combination of the features of both CP/M 3 and

5
ReadMe.txt

@ -3,7 +3,7 @@ RomWBW
Z80/Z180 System Software
Version 3.1 Pre-release
Wednesday 13 May 2020
Saturday 16 May 2020
Wayne Warthen wwarthen@gmail.com
@ -804,6 +804,9 @@ Notes
to read the current date/time for file stamping, etc. You can use
the RTC app to set the RTC clock.
- The COPYSYS command described in the DRI CP/M 3 documentatin is not
provided with RomWBW. The RomWBW SYSCOPY command is used instead.
Simeon Cran’s ZPM3
ZPM3 is an interesting combination of the features of both CP/M 3 and

13
Source/Apps/SysCopy.asm

@ -17,6 +17,7 @@
; Change Log:
; 2016-04-24 [WBW] Updated to preserve MBR partition table
; 2020-02-17 [WBW] Updated for CP/M 3
; 2020-05-16 [WBW] Fixed SPT for CP/M 3
;_______________________________________________________________________________
;
; ToDo:
@ -441,6 +442,16 @@ setdsk:
ld c,(hl)
inc hl
ld b,(hl) ; BC := sectors per track
; handle CP/M 3 physical sector size
ld a,(v3os) ; CP/M 3 or greater?
or a ; set flags
jr z,setdsk1 ; if not, continue
; adjust SPT for CP/M 3 physical sector size
srl b ; divide SPT by 4
rr c
srl b
rr c
setdsk1:
ld (actspt),bc ; save it
; ensure there are system tracks (verify that offset field in DPB is not zero)
ld de,12 ; offset field is 12 bytes into DPB
@ -952,7 +963,7 @@ bpb_hl .dw 0 ; reg HL
;
; Messages
;
msgban1 .db "SYSCOPY v2.0 for RomWBW CP/M, 17-Feb-2020$"
msgban1 .db "SYSCOPY v2.1 for RomWBW CP/M, 15-May-2020$"
msgv2 .db " (CP/M 2 Mode)$"
msgv3 .db " (CP/M 3 Mode)$"
msgban2 .db "Copyright 2020, Wayne Warthen, GNU GPL v3$"

47
Source/CPM3/diskio.z80

@ -431,7 +431,7 @@ media:
ld a,e ; resultant media id to accum
ld (medid),a ; save media id
or a ; set flags, 0 is no media
jp z,err_diskio ; handle no media error
jp z,err_nodisk ; handle no media error
; Initialize slice start LBA & sectors per slice
ld hl,0 ; assume slice starts
@ -769,27 +769,21 @@ cin$echo1:
err_nodisk:
ld hl,str_err_nodisk
jr err
jr err_perm
err_noslice:
ld hl,str_err_noslice
jr err
jr err_perm
err_perm:
call prt_err
jr err_ret
err_diskio:
ld hl,str_err_diskio
jr err
err_sig:
ld hl,str_err_sig
jr err
err_api:
ld hl,str_err_api
jr err
err:
cp -10 ; HBIOS read only error
jr z,err_rdonly ; if so, handle special
ld a,(@ermde) ; get error mode
cp 0FFh ; FFh means suppress
jr z,err_ret ; if so, go to err return
push hl
call ?pderr
pop hl
call ?pmsg
ld hl,str_err_diskio
call prt_err
ld hl,str_err_retry
call ?pmsg
call cin$echo
@ -797,16 +791,29 @@ err:
jr nz,err_ret ; return error to caller
ld hl,(retry$adr) ; get retry address
jp (hl) ; and go there
err_rdonly:
ld hl,str_err_rdonly
call prt_err
ld a,2 ; signal readonly media
ret
prt_err:
ld a,(@ermde) ; get error mode
cp 0FFh ; FFh means suppress
ret z ; if so, go to err return
push hl
call ?pderr
pop hl
jp ?pmsg
err_ret:
ld a,1 ; signal I/O error
ld a,0FFh ; signal error
ret ; and done
str_err_retry db ", Retry (Y/N) ? ",0
str_err_retry db ", Retry (Y/N)?",0
str_err_nodisk db ", No disk",0
str_err_noslice db ", No slice",0
str_err_diskio db ", Disk I/O",0
str_err_sig db ", No system",0
str_err_api db ", API failure",0
str_err_rdonly db ", Read Only",0
str_err_prefix db 13,10,"BIOS Error: ",0
retry$adr dw ?wboot ; error retry address
curdph dw 0 ; working dph value

3
Source/Doc/GettingStarted.md

@ -823,6 +823,9 @@ system tracks. `CPMLDR.SYS` chain loads `CPM3.SYS`.
used to read the current date/time for file stamping, etc. You can
use the `RTC` app to set the RTC clock.
- The `COPYSYS` command described in the DRI CP/M 3 documentatin is
not provided with RomWBW. The RomWBW `SYSCOPY` command is used instead.
## Simeon Cran's ZPM3
ZPM3 is an interesting combination of the features of both CP/M 3 and

60
Source/HBIOS/hbios.asm

@ -2186,7 +2186,9 @@ RTC_DISPATCH:
RET
;
RTC_DISPERR:
OR $FF
;CALL PANIC
LD A,ERR_NOHW
OR A
RET
;
; SET RTC DISPATCH ADDRESS, USED BY RTC DRIVERS DURING INIT
@ -2339,7 +2341,9 @@ SYS_RESET:
JR Z,SYS_RESWARM
CP BF_SYSRES_COLD
JR Z,SYS_RESCOLD
OR $FF ; SIGNAL ERROR
;CALL PANIC
LD A,ERR_NOFUNC
OR A ; SIGNAL ERROR
RET
;
; SOFT RESET HBIOS, RELEASE HEAP MEMORY NOT USED BY HBIOS
@ -2450,8 +2454,9 @@ SYS_ALLOC:
; ALL OTHER REGISTERS PRESERVED
;
SYS_FREE:
CALL PANIC ; NOT YET IMPLEMENTED
OR $FF
;CALL PANIC ; NOT YET IMPLEMENTED
LD A,ERR_NOTIMPL ; NOT YET INMPLEMENTED
OR A ; SET FLAGS
RET
;
; GET SYSTEM INFORMATION
@ -2481,7 +2486,9 @@ SYS_GET:
JR Z,SYS_GETMEMINFO
CP BF_SYSGET_BNKINFO
JR Z,SYS_GETBNKINFO
OR $FF ; SIGNAL ERROR
;CALL PANIC
LD A,ERR_NOFUNC ; SIGNAL ERROR
OR A ; SET FLAGS
RET
;
; GET TIMER
@ -2619,7 +2626,9 @@ SYS_SET:
JR Z,SYS_SETSECS
CP BF_SYSSET_BOOTINFO
JR Z,SYS_SETBOOTINFO
OR $FF ; SIGNAL ERROR
;CALL PANIC
LD A,ERR_NOFUNC ; SIGNAL ERROR
OR A ; SET FLAGS
RET
;
; SET BOOT INFORMATION
@ -2714,7 +2723,9 @@ SYS_INT:
JR Z,SYS_INTGET
CP BF_SYSINT_SET
JR Z,SYS_INTSET
OR $FF ; SIGNAL ERROR
;CALL PANIC
LD A,ERR_NOFUNC ; SIGNAL ERROR
OR A ; SET FLAGS
RET
;
; GET INTERRUPT SYSTEM INFORMATION
@ -2740,8 +2751,9 @@ SYS_INTINFO:
;
SYS_INTVECADR:
#IF (INTMODE == 0)
CALL PANIC ; INVALID FOR INT MODE 0
OR $FF
;CALL PANIC ; INVALID FOR INT MODE 0
LD A,ERR_BADCFG ; SIGNAL ERROR
OR A ; SET FLAGS
RET
#ENDIF
#IF (INTMODE == 1)
@ -2755,8 +2767,9 @@ SYS_INTVECADR:
LD A,E ; INCOMING INDEX POSITION TO A
CP C ; COMPARE TO VECTOR COUNT
JR C,SYS_INTGET1 ; CONTINUE IF POSITION IN RANGE
CALL PANIC ; ELSE ERROR
OR $FF
;CALL PANIC ; ELSE ERROR
LD A,ERR_RANGE ; SIGNAL ERROR
OR A ; SET FLAGS
RET
SYS_INTGET1:
OR A ; CLEAR CARRY
@ -2935,13 +2948,13 @@ HB_DISPCALL:
; CHECK INCOMING UNIT INDEX IN C FOR VAILIDITY
LD A,C ; A := INCOMING DISK UNIT INDEX
CP (IY-1) ; COMPARE TO COUNT
JR NC,HB_DISPERR ; HANDLE INVALID UNIT INDEX
JR NC,HB_FUNCERR ; HANDLE INVALID UNIT INDEX
; CHECK FUNCTION INDEX FOR VALIDITY
LD A,B ; A := INCOMING FUNCTION NUMBER
AND $0F ; LOW NIBBLE ONLY FOR FUNC INDEX
CP (IY-3) ; CHECK FN NUM AGAINST MAX
JR NC,HB_DISPERR ; HANDLE FN NUM OUT OF RANGE ERROR
JR NC,HB_UNITERR ; HANDLE FN NUM OUT OF RANGE ERROR
; BUMP IY TO ACTUAL XXX_TBL ENTRY FOR INCOMING UNIT INDEX
PUSH BC ; SAVE BC
@ -2972,10 +2985,17 @@ HB_DISPCALL:
RET ; JUMP TO DRIVER FUNC ADR ON TOS
;
HB_DISPERR:
CALL PANIC ; PANIC
OR $FF ; SIGNAL ERROR
RET ; AND RETURN VIA DISPEXIT
HB_FUNCERR:
;CALL PANIC
LD A,ERR_NOFUNC ; SIGNAL ERROR
OR A ; SET FLAGS
RET
;
HB_UNITERR:
;CALL PANIC
LD A,ERR_NOUNIT ; SIGNAL ERROR
OR A ; SET FLAGS
RET
;
; ADD AN ENTRY TO THE UNIT TABLE AT ADDRESS IN HL
; BC: DRIVER FUNCTION TABLE
@ -3061,8 +3081,10 @@ HB_ALLOC:
HB_ALLOC1:
; ERROR RETURN
POP DE ; RESTORE INCOMING DE
OR $FF ; SIGNAL ERROR
RET ; AND RETURN
;CALL PANIC
LD A,ERR_NOMEM ; SIGNAL ERROR
OR A ; SET FLAGS
RET
;
HB_TMPSZ .DW 0
HB_TMPREF .DW 0

17
Source/HBIOS/hbios.inc

@ -116,6 +116,23 @@ BF_SYSINT_SET .EQU $20 ; SET INT VECTOR ADDRESS
;
CIO_CONSOLE .EQU $80 ; CIO UNIT NUM FOR CUR CON
;
; HBIOS GLOBAL ERROR RETURN VALUES
;
ERR_NONE .EQU 0 ; SUCCESS
;
ERR_UNDEF .EQU -1 ; UNDEFINED ERROR
ERR_NOTIMPL .EQU -2 ; FUNC NOT IMPLEMENTED
ERR_NOFUNC .EQU -3 ; INVALID FUNCTION
ERR_NOUNIT .EQU -4 ; INVALID UNIT NUMBER
ERR_NOMEM .EQU -5 ; OUT OF MEMORY
ERR_RANGE .EQU -6 ; PARAMETER OUT OF RANGE
ERR_NOMEDIA .EQU -7 ; MEDIA NOT PRESENT
ERR_NOHW .EQU -8 ; HARDWARE NOT PRESENT
ERR_IO .EQU -9 ; I/O ERROR
ERR_READONLY .EQU -10 ; WRITE REQ TO READ-ONLY MEDIA
ERR_TIMEOUT .EQU -11 ; DEVICE TIMEOUT
ERR_BADCFG .EQU -12 ; INVALID CONFIGURATION
;
; MEDIA ID VALUES
;
MID_NONE .EQU 0

3
Source/HBIOS/md.asm

@ -190,7 +190,8 @@ MD_WRITE:
OR A ; SET FLAGS TO TEST FOR ROM (UNIT 0)
JR NZ,MD_RW ; NOT ROM, SO OK TO WRITE, CONTINUE
LD E,0 ; UNIT IS READ ONLY, ZERO SECTORS WRITTEN
OR $FF ; SIGNAL ERROR
LD A,ERR_READONLY ; SIGNAL ERROR
OR A ; SET FLAGS
RET ; AND DONE
;
;

BIN
Source/Images/Common/COMP.COM

Binary file not shown.

BIN
Source/Images/Common/COMPARE.COM

Binary file not shown.
Loading…
Cancel
Save