Compare commits

..

1 Commits

Author SHA1 Message Date
wwarthen
d4b19fd589 2014-09-01 03:19:59 +00:00
3861 changed files with 62228 additions and 591198 deletions

2
.gitattributes vendored
View File

@@ -1,2 +0,0 @@
# Leave all line endings alone!
* -text

View File

@@ -1,13 +0,0 @@
<!--
BEFORE YOU CREATE A PULL REQUEST:
- Please base all pull requests against the master branch
- Include a clear description of your change
- Reference related Issue(s) (e.g., "Resolves Issue #123")
Thank you for contributing to RomWBW! I will review your pull request as soon as possible.
-Wayne
DELETE EVERYTHING IN THIS COMMENT BLOCK AND REPLACE WITH YOUR COMMENTS
-->

View File

@@ -1,75 +0,0 @@
name: Commit Build
on:
push:
branches:
- '**'
tags-ignore:
- '**'
jobs:
buildLinux:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4.1.1
- name: Get Commit Ref
run: |
COMMIT_REF=$(git rev-parse --short $GITHUB_SHA)
echo "COMMIT_REF: $COMMIT_REF"
echo "COMMIT_REF=$COMMIT_REF" >>$GITHUB_ENV
- name: Build
run: |
export TZ='America/Los_Angeles'
sudo apt-get install srecord
make transpile-c-code
make distlog --trace
rm -rf .git*
- name: List Output
run: |
cd Binary
ls -l
find -type f -exec md5sum '{}' \;
- name: Upload Artifact
uses: actions/upload-artifact@v4.3.0
with:
name: RomWBW-${{env.COMMIT_REF}}-Linux
path: .
buildMacOS:
runs-on: macOS-latest
steps:
- name: Checkout
uses: actions/checkout@v4.1.1
- name: Get Commit Ref
run: |
COMMIT_REF=$(git rev-parse --short $GITHUB_SHA)
echo "COMMIT_REF: $COMMIT_REF"
echo "COMMIT_REF=$COMMIT_REF" >>$GITHUB_ENV
- name: Build
run: |
export TZ='America/Los_Angeles'
brew install srecord
make distlog
rm -rf .git*
- name: List Output
run: |
cd Binary
ls -l
find . -type f -exec md5 -r -- '{}' +;
- name: Upload Artifact
uses: actions/upload-artifact@v4.3.0
with:
name: RomWBW-${{env.COMMIT_REF}}-MacOS
path: .

View File

@@ -1,127 +0,0 @@
name: Release Build
on:
push:
tags:
- '**'
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4.1.1
- name: Build
run: |
export TZ='America/Los_Angeles'
sudo apt-get install libncurses-dev
sudo apt-get install srecord
make transpile-c-code
make distlog --trace
rm -rf .git*
- name: Create Package Archive
run: |
zip -r RomWBW-${{github.ref_name}}-Package.zip .
- name: Set Title
run: |
echo "Tag: ${{github.ref_name}}"
if grep -q "dev" <<< "${{github.ref_name}}"; then
TITLE="RomWBW Development Snapshot"
elif grep -q "beta" <<< "${{github.ref_name}}"; then
TITLE="RomWBW Beta Release"
elif grep -q "pre" <<< "${{github.ref_name}}"; then
TITLE="RomWBW Prerelease"
elif grep -q "rc" <<< "${{github.ref_name}}"; then
TITLE="RomWBW Release Candidate"
else
TITLE="RomWBW"
fi
echo "Title: $TITLE"
echo "TITLE=$TITLE" >>$GITHUB_ENV
- name: Attach Package Archive
uses: wwarthen/actions/packages/automatic-releases@built-packages
with:
repo_token: "${{secrets.GITHUB_TOKEN}}"
draft: true
prerelease: true
title: "${{env.TITLE}} ${{github.ref_name}}"
files: |
RomWBW-${{github.ref_name}}-Package.zip
- name: Build Docs
run: |
export TZ='America/Los_Angeles'
sudo apt-get install gpp pandoc
pip install mkdocs
make -C Source/Doc deploy_mkdocs
mkdocs build -f Source/Doc/mkdocs.yml
- name: Deploy Docs
uses: peaceiris/actions-gh-pages@v4
# if: github.ref == 'refs/heads/master'
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: Source/Doc/site
# - name: Upload Package Archive
# uses: AButler/upload-release-assets@v2.0.2
# with:
# repo-token: ${{secrets.github_token}}
# files: |
# RomWBW-${{env.PKGLBL}}-Package.zip
# - name: Post SnapShot
# uses: docker://antonyurchenko/git-release:latest
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# RELEASE_NAME_PREFIX: "${{env.TITLE}} "
# CHANGELOG_FILE: "none"
# with:
# args: |
# RomWBW-SnapShot-Package.zip
# - name: Post SnapShot
# uses: cb80/pubrel@latest
# with:
# replace: true
# files: |
# RomWBW-SnapShot-Package.zip
# - name: Post SnapShot
# uses: wwarthen/actions/packages/automatic-releases@built-packages
# with:
# repo_token: "${{ secrets.GITHUB_TOKEN }}"
# prerelease: true
# title: "RomWBW Development SnapShot ${{env.GITHUB_REF_SLUG}}"
# files: |
# RomWBW-SnapShot-Package.zip
# - name: Remove Older Releases
# uses: wwarthen/delete-release-action@v1.2
# with:
# release-drop: true
# release-keep-count: 0
# release-drop-tag: true
# pre-release-drop: false
# pre-release-keep-count: 0
# pre-release-drop-tag: true
# draft-drop: true
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# - name: Remove Older Releases
# uses: s00d/delete-older-releases@0.2.1
# with:
# keep_latest: 1
## delete_tag_pattern: beta # defaults to ""
# delete_type: 'release'
# delete_branch: 'main'
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

204
.gitignore vendored
View File

@@ -1,204 +0,0 @@
# Not sure what patterns to apply
# So ignoring all generated files explicitly
**/*.[Bb][Ii][Nn]
**/*.[Cc][Oo][Mm]
**/*.[Rr][Oo][Mm]
**/*.com
**/*.eeprom
**/*.hex
**/*.img
**/*.lib
**/*.lst
**/*.o
**/*.prn
**/*.rel
**/*.sym
**/*.sys
**/*.tmp
**/*/font*.asm
Binary/**/*.mym
Binary/**/*.pt3
!Binary/CPNET/NetBoot/*/cpnos.sys
Source/**/eeprom
Source/Apps/Assign.com
Source/Apps/FDU/FDU.COM
Source/Apps/Format.com
Source/Apps/IntTest.com
Source/Apps/Mode.com
Source/Apps/OSLdr.com
Source/Apps/RTC.com
Source/Apps/SysCopy.com
Source/Apps/SysGen.com
Source/Apps/Talk.com
Source/Apps/Timer.com
Source/Apps/Tune/Tune.com
Source/BPBIOS/bpsys.bak
Source/BPBIOS/bpsys.dat
Source/BPBIOS/def-ww.lib
Source/CPM3/bios3.spr
Source/CPM3/bnkbios3.spr
Source/CPM3/gencpm.dat
Source/CPM3/options.lib
Source/CPM3/zpmbios3.spr
Source/HBIOS/Blank512KB.dat
Source/HBIOS/build.inc
Source/Images/blank144
Source/Images/blankhd
Source/Prop/Spin/ParPortProp.list
Source/Prop/Spin/PropIO.list
Source/Prop/Spin/PropIO2.list
Source/Prop/ParPortProp.list
Source/Prop/PropIO.list
Source/Prop/PropIO2.list
Source/ZPM3/bnkbios3.spr
Source/ZPM3/gencpm.com
Source/ZPM3/gencpm.com
Source/ZPM3/gencpm.dat
Tools/Linux
Tools/Darwin
Tools/unix/bin2asm/bin2asm
Tools/unix/cpmtools/cpmchattr
Tools/unix/cpmtools/cpmchmod
Tools/unix/cpmtools/cpmcp
Tools/unix/cpmtools/cpmls
Tools/unix/cpmtools/cpmrm
Tools/unix/cpmtools/fsck.cpm
Tools/unix/cpmtools/fsed.cpm
Tools/unix/cpmtools/mkfs.cpm
Tools/unix/lzsa/lzsa
Tools/unix/uz80as/uz80as
Tools/unix/zx/config.h
Tools/unix/zx/zx
!Source/ver.lib
!Source/Apps/FAT/FAT.COM
!Source/Apps/ZMP/zmpx.com
!Source/Apps/ZMD/zmdsubs.rel
!Source/Apps/Test/vdctest/font.asm
!Source/BPBIOS/bpbuild.com
!Source/BPBIOS/movp112.com
!Source/BPBIOS/*.lib
!Source/BPBIOS/Z34RCP11/cledinst.com
!Source/BPBIOS/Z34RCP11/cledsave.com
!Source/CPNET/**
!Source/Fonts/*
!Source/Images/**
!Source/RomDsk/**
!Source/UBIOS/FSFAT.BIN
!Source/UBIOS/UNA-BIOS.BIN
!Source/ZCCP/*.[Cc][Oo][Mm]
!Source/ZCPR-DJ/*.[Cc][Oo][Mm]
!Source/ZPM3/*.[Cc][Oo][Mm]
!Source/ZSDOS/*.[Cc][Oo][Mm]
!Source/ZRC/*.bin
!Source/ZRC512/*.bin
!Source/EZ512/*.bin
!Source/Z1RCC/*.bin
!Source/ZZRCC/*.bin
!Source/SZ80/*.bin
!Tools/cpm/**
!Tools/unix/zx/*
!Tools/zx/*
Source/ZPM3/gencpm.com
Source/ZPM3/startzpm.com
Source/ZPM3/zccp.com
Source/ZPM3/zpmldr.com
Source/ZPM3/genbnk.dat
Source/ZSDOS/zsdos.err
# Lets explicit list all generate untracked binary files
Binary/*.upd
Binary/Apps/bbcbasic.txt
Binary/Apps/copysl.doc
Binary/Apps/copysl.doc
Binary/Apps/fdu.doc
Binary/Apps/fdu.doc
Binary/Apps/Tunes/bgm.vgm
Binary/Apps/Tunes/ending.vgm
Binary/Apps/Tunes/inchina.vgm
Binary/Apps/Tunes/shirakaw.vgm
Binary/Apps/Tunes/startdem.vgm
Binary/Apps/Tunes/wonder01.vgm
Binary/Apps/zmconfig.ovr
Binary/Apps/zminit.ovr
Binary/Apps/zmp.cfg
Binary/Apps/zmp.doc
Binary/Apps/zmp.fon
Binary/Apps/zmp.hlp
Binary/Apps/zmterm.ovr
Binary/Apps/zmxfer.ovr
Binary/CPM3/bdos3.spr
Binary/CPM3/bios3.spr
Binary/CPM3/bnkbdos3.spr
Binary/CPM3/bnkbios3.spr
Binary/CPM3/cpm3fix.pat
Binary/CPM3/genbnk.dat
Binary/CPM3/gencpm.dat
Binary/CPM3/genres.dat
Binary/CPM3/readme.1st
Binary/CPM3/resbdos3.spr
Binary/CPNET/cpn12duo.lbr
Binary/CPNET/cpn12mt.lbr
Binary/CPNET/cpn12ser.lbr
Binary/CPNET/cpn3duo.lbr
Binary/CPNET/cpn3mt.lbr
Binary/CPNET/cpn3ser.lbr
Binary/hd1k_prefix.dat
Binary/ZPM3/bnkbdos3.spr
Binary/ZPM3/bnkbios3.spr
Binary/ZPM3/gencpm.dat
Binary/ZPM3/resbdos3.spr
Binary/ZPM3/zinstal.zpm
Source/BPBIOS/def-ww.lib
Source/CPNET/cpn12duo.lbr
Source/CPNET/cpn12mt.lbr
Source/CPNET/cpn12ser.lbr
Source/CPNET/cpn3duo.lbr
Source/CPNET/cpn3mt.lbr
Source/CPNET/cpn3ser.lbr
Source/Fonts/font8x11c.asm
Source/Fonts/font8x11c.bin
Source/Fonts/font8x11u.asm
Source/Fonts/font8x16c.asm
Source/Fonts/font8x16c.bin
Source/Fonts/font8x16u.asm
Source/Fonts/font8x8c.asm
Source/Fonts/font8x8c.bin
Source/Fonts/font8x8u.asm
Source/Fonts/font6x8c.asm
Source/Fonts/font6x8c.bin
Source/Fonts/font6x8u.asm
Source/Fonts/fontcgac.asm
Source/Fonts/fontcgac.bin
Source/Fonts/fontcgau.asm
Source/Fonts/fontvgarcc.asm
Source/Fonts/fontvgarcc.bin
Source/Fonts/fontvgarcu.asm
Source/HBIOS/*.upd
Source/HBIOS/build_env.cmd
Source/HBIOS/build_env.cmd
Source/HBIOS/hbios_env.sh
Source/HBIOS/hbios_env.sh
Source/HBIOS/netboot.mod
Source/Images/*.cat
Source/Images/*.img
Source/Images/blank144
Source/Images/blankhd1k
Source/Images/blankhd512
Source/RomDsk/*.cat
Source/RomDsk/*.dat
Source/ZCPR-DJ/zcprdemo.com
Source/ZPM3/autotog.com
Source/ZPM3/clrhist.com
Source/ZPM3/cpmldr.com
Source/ZPM3/setz3.com
Tools/unix/OpenSpin/build/
Tools/unix/zxcc/config.h
Tools/unix/zxcc/zxcc

38
.vscode/settings.json vendored
View File

@@ -1,38 +0,0 @@
{
"z80-macroasm.format.enabled": true,
"z80-macroasm.format.baseIndent": 1,
"z80-macroasm.format.whitespaceAfterInstruction": "tab",
"z80-macroasm.format.uppercaseKeywords": true,
"z80-macroasm.format.spaceAfterArgument": true,
"z80-macroasm.format.hexaNumberStyle": "motorola",
"z80-macroasm.format.hexaNumberCase": true,
"files.trimTrailingWhitespace": false,
"files.eol": "\r\n",
"files.associations": {
"*.inc": "z80-macroasm",
"*.asm": "z80-macroasm",
"*.180": "z80-macroasm",
"*.asm.m4": "z80-macroasm",
"*.inc.m4": "z80-macroasm",
"*.mac": "z80-macroasm",
"*.asmpp": "z80-macroasm",
"*.zdsproj": "xml",
"*.Z80": "z80-macroasm",
"ch376.h": "c",
"protocol.h": "c",
"usb_state.h": "c",
"functional": "c",
"class_scsi.h": "c",
"z80.h": "c",
"dev_transfers.h": "c",
"usb-base-drv.h": "c",
"critical-section.h": "c",
"enumerate.h": "c",
"ch376inc.h": "c",
"enumerate_storage.h": "c",
"work-area.h": "c",
"hbios-driver-storage.h": "c",
"class_hid_keyboard.h": "c",
"print.h": "c"
}
}

1073
Apps/Assign - Copy.asm Normal file

File diff suppressed because it is too large Load Diff

1163
Apps/Assign.asm Normal file

File diff suppressed because it is too large Load Diff

26
Apps/Build.cmd Normal file
View File

@@ -0,0 +1,26 @@
@echo off
setlocal
set PATH=..\Tools\tasm32;..\Tools\zx;%PATH%
set TASMTABS=..\Tools\tasm32
set ZXBINDIR=../tools/cpm/bin/
set ZXLIBDIR=../tools/cpm/lib/
set ZXINCDIR=../tools/cpm/include/
call :asm SysCopy || goto :eof
call :asm Assign || goto :eof
call :asm Format || goto :eof
call :asm Talk || goto :eof
zx Z80ASM -SYSGEN/F
goto :eof
:asm
echo.
echo Building %1...
tasm -t80 -b -g3 -fFF %1.asm %1.com %1.lst
goto :eof

4
Apps/Clean.cmd Normal file
View File

@@ -0,0 +1,4 @@
@echo off
if exist *.bin del *.bin
if exist *.com del *.com
if exist *.lst del *.lst

28
Apps/Format.asm Normal file
View File

@@ -0,0 +1,28 @@
;===============================================================================
; FORMAT - DISK FORMAT UTILITY FOR ROMWBW ADAPTATION OF CP/M 2.2
;===============================================================================
;
; AUTHOR: WAYNE WARTHEN (wwarthen@gmail.com)
;_______________________________________________________________________________
;
; CHANGELOG:
;_______________________________________________________________________________
;
; TODO:
;
;_______________________________________________________________________________
;
;
;===============================================================================
; MAIN PROGRAM PROCEDURE
;===============================================================================
;
.ORG 00100H
RET
;
STACKSAV .DW 0
STACKSIZ .EQU 40H ; WE ARE A STACK PIG
.FILL STACKSIZ,0
STACK .EQU $
;
.END

856
Apps/SysCopy.asm Normal file
View File

@@ -0,0 +1,856 @@
;===============================================================================
; SysCopy - Copy System Image to/from reserved tracks of disk for RomWBW
; adaptation of CP/M 2.2
;===============================================================================
;
; Author: Wayne Warthen (wwarthen@gmail.com)
;_______________________________________________________________________________
;
; Usage:
; SYSCOPY <dest>[=<src>]
;
; <dest> and <src> may be a drive or a file reference
; If <src> is not specified, the system image will
; be read from the current drive
;_______________________________________________________________________________
;
; Change Log:
;_______________________________________________________________________________
;
; ToDo:
; 1) Add option to wait/prompt for disk change
; 2) Allow <src> and <dest> to be memory
;_______________________________________________________________________________
;
;===============================================================================
; Definitions
;===============================================================================
;
stksiz .equ $40 ; we are a stack pig
;
restart .equ $0000 ; CP/M restart vector
bdos .equ $0005 ; BDOS invocation vector
;
buf .equ $900 ; load point for system image (from original SYSGEN)
;
;===============================================================================
; Code Section
;===============================================================================
;
.org $100
; setup stack (save old value)
ld (stksav),sp ; save stack
ld sp,stack ; set new stack
; processing...
call main ; do the real work
call crlf ; formatting
; return
jp 0 ; return to CP/M via reset
;
;ld sp,(stksav) ; restore stack
;ret ; return to CP/M w/o reset
;
; Main routine
;
main:
call init ; initialize
ret nz ; abort on failure
call parse ; parse command tail
ret nz ; abort on failure
call confirm ; confirm pending action
ret nz ; abort on failure
call crlf ; formatting
ld de,msgrd
call prtstr ; display "reading" message
call rdimg ; do the image read
ret nz ; abort on failure
ld de,msgwrt
call prtstr ; display "writing" message
call wrtimg ; do the image write
ret nz ; abort on failure
ld de,msgdon ; completion message
call prtstr ; display it
ret
;
; Initialization
;
init:
; add check for RomWBW?
;
; locate cbios function table address
ld hl,(restart+1) ; load address of CP/M restart vector
ld de,-3 ; adjustment for start of table
add hl,de ; HL now has start of table
ld (cbftbl),hl ; save it
; save current drive no
ld c,$19 ; bdos func: get current drive
call bdos ; invoke BDOS function
inc a ; 1-based index for fcb
ld (defdrv),a ; save it
; return success
xor a
ret
;
; Parse command tail
;
parse:
ld hl,$81 ; point to start of command tail (after length byte)
call nonblank ; locate start of parms
jp z,erruse ; no parms
ld de,destfcb ; point to destination fcb
call convert ; convert destination spec
jp nz,erramb ; Error, ambiguous file specification
call nonblank ; skip blanks
or a ; end of command tail (null)?
jr z,parse2 ; setup default source fcb
cp '=' ; std delimiter
jr z,parse1 ; valid delimiter, continue
cp '_' ; alt delimiter
jr z,parse1 ; valid delimiter, continue
jp errdlm ; invalid delimiter
parse1:
inc hl ; skip delimiter
call nonblank ; skip blanks
parse2:
ld de,srcfcb ; point to source fcb
call convert ; convert spec to fcb
jp nz,erramb ; Error, ambiguous file specification
; return success
xor a ; signal success
ret ; done parsing
;
; Confirm pending action with user
;
confirm:
; prompt
call crlf
ld de,sconf1
call prtstr
ld hl,srcfcb
call prtfcb
ld de,sconf2
call prtstr
ld hl,destfcb
call prtfcb
ld de,sconf3
call prtstr
;
; get input
ld c,$0A ; get console buffer
ld de,buf ; into buf
ld a,1 ; max of 1 character
ld (de),a ; set up buffer
call bdos ; invoke BDOS
ld a,(buf+1) ; get num chars entered
dec a ; check that we got exactly one char
jr nz,confirm ; bad input, re-prompt
ld a,(buf+2) ; get the character
and $DF ; force upper case
cp 'Y' ; compare to Y
ret ; return with Z set appropriately
;
; Read system image
;
rdimg:
ld hl,srcfcb ; point to source fcb
call chkfcb ; check if for drive/file spec
bit 1,a ; is there a file spec?
jp nz,rdfil ; yes, read using file i/o
jp rddsk ; no, read using raw disk i/o
;
; Write system image
;
wrtimg:
ld hl,destfcb ; point to destination fcb
call chkfcb ; check it for drive/file spec
bit 1,a ; is there a file spec?
jp nz,wrfil ; yes, write using file i/o
jp wrdsk ; no, write using raw disk i/o
;
; Read system image from file system
;
rdfil:
; open the file
ld c,$0F ; bdos open file
ld de,srcfcb ; source fcb
ld (rwfcb),de ; save it
call bdos ; invoke bdos function
cp $FF ; $FF is error
jp z,errfil ; handle error condition
; read the header
ld a,$14 ; setup for bdos read sequential
ld (rwfun),a ; save bdos function
ld a,12 ; start with 1536 byte header (12 records)
ld (reccnt),a ; init record counter
ld hl,buf ; start of buffer
ld (bufptr),hl ; init buffer pointer
call rwfil ; read the header
ret nz ; abort on error (no need to close file)
; check header and get image size
call chkhdr ; verifies marker & ver, hl = image size
ret nz ; abort on error (no need to close file)
ld b,7 ; right shift 7 bits to get 128 byte record count
rdfil1: srl h ; shift right msb
rr l ; shift lsb w/ carry from msb
djnz rdfil1 ; loop till done
ld a,l ; record count to a
ld (reccnt),a ; set remaining records to read
add a,12 ; add the header back
ld (imgsiz),a ; and save the total image size (in records)
call rwfil ; do it
ret nz ; abort on error
; return via close file
jp closefile ; close file
;
; Write system image to file system
;
wrfil:
; check for pre-existing target file
ld c,$11 ; bdos find first
ld de,destfcb ; destination fcb
call bdos
cp $FF ; check for error
jr z,wrfil1 ; not there, skip delete
; delete target file if it exists
ld c,$13 ; bdos delete
ld de,destfcb ; destination fcb
call bdos
cp $FF ; check return code
jp z,errdel ; handle error
wrfil1: ; create target file
ld c,$16 ; bdos create file
ld de,destfcb ; destination fcb
ld (rwfcb),de ; save it
call bdos
cp $FF ; check return code
jp z,errfil ; handle error
; write the image
ld a,$15 ; setup for bdos write sequential
ld (rwfun),a ; save bdos function
ld a,(imgsiz) ; number of records to read
ld (reccnt),a ; init record counter
ld hl,buf ; start of buffer
ld (bufptr),hl ; init buffer pointer
call rwfil ; do it
ret nz ; abort on error
; return via close file
jp closefile ; close file
;
; Common routine to handle read/write for file system
;
rwfil:
ld c,$1A ; BDOS set dma
ld de,(bufptr) ; current buffer pointer
push de ; save pointer
call bdos ; do it
pop de ; recover pointer
ld hl,128 ; record length
add hl,de ; increment buffer pointer
ld (bufptr),hl ; save it
ld a,(rwfun) ; get the active function
ld c,a ; set it
ld de,(rwfcb) ; active fcb
call bdos ; do it
or a ; check return code
jp nz,errdos ; BDOS err
ld hl,reccnt ; point to record count
dec (hl) ; decrement record count
jr nz,rwfil ; loop till done
xor a ; signal success
ret ; done
;
; Close file
;
closefile:
ld c,$10 ; BDOS close file
ld de,(rwfcb) ; active fcb
call bdos ; do it
cp $FF ; $FF is error
jp z,errclo ; if error, handle it
xor a ; signal success
ret ; done
;
; Read image directly from disk system tracks using CBIOS
;
rddsk:
; force return to go through disk reset
ld hl,resdsk ; load address of reset disk routine
push hl ; and put it on the stack
; set drive for subsequent reads
ld a,(srcfcb) ; get the drive
dec a ; adjust for zero indexing
call setdsk ; setup disk
ret nz ; abort on error
; set function to read
ld hl,(cbftbl) ; get address of CBIOS function table
ld a,$27 ; $27 is CBIOS READ entry offset
call addhl ; set HL to resultant entry point
ld (actfnc),hl ; save it
; read the header
ld a,12 ; start with 1536 byte header (12 records)
ld (reccnt),a ; initialize record counter
call rwdsk ; read the header
ret nz ; abort on error
; check header and get image size
call chkhdr ; check integrity, HL = image size on return
ret nz ; abort on error
; convert image size to count of 128-byte records
ld b,7 ; right shift 7 bits to get 128 byte record count
rddsk1: srl h ; shift right msb
rr l ; shift lsb w/ carry from msb
djnz rddsk1 ; loop till done
; set the number of records pending to read
ld a,l ; record count to a
ld (reccnt),a ; set remaining records to read
; save the total image size (including header) for later
add a,12 ; add the header records back
ld (imgsiz),a ; and save the total image size (in records)
; read the remaining system image records
call rwdsk ; finish up
ret nz ; abort on error
; perform BDOS disk reset (critical since we mucked with CBIOS)
ld c,$0D ; BDOS reset disk
call bdos ; do it
; return
xor a ; signal success
ret ; done
;
; Write image directly to disk system tracks using CBIOS
;
wrdsk:
; force return to go through disk reset
ld hl,resdsk ; load address of reset disk routine
push hl ; and put it on the stack
; set drive for subsequent writes
ld a,(destfcb) ; get the drive
dec a ; adjust for zero indexing
call setdsk ; setup disk
ret nz ; abort on error
; set function to write
ld hl,(cbftbl) ; get address of CBIOS function table
ld a,$2A ; $2A is CBIOS WRITE entry offset
call addhl ; set HL to resultant entry point
ld (actfnc),hl ; save it
; setup the record count to write
ld a,(imgsiz) ; get previously recorded image size
ld (reccnt),a ; save it as pending record count
; write the image
call rwdsk ; write the image
ret nz ; abort on error
; return
xor a ; signal success
ret ; done
;
; Perform BDOS disk reset
; Required after making direct CBIOS disk calls
;
resdsk:
; perform BDOS disk reset
push af ; preserve status
ld c,$0D ; BDOS reset disk
call bdos ; do it
pop af ; restore status
ret
;
; Setup for CBIOS disk access
;
setdsk:
; select disk
ld (actdsk),a ; save active disk no
ld c,a ; move to c
ld e,0 ; treat as first select
call cbios ; invoke cbios with...
.db $1B ; SELDSK entry offset
; check return (sets HL to DPH address)
ld a,h
or l
jp z,errsel ; HL == 0 is select error
; set HL to DPB address
ld de,10 ; DPB address is 10 bytes into DPH
add hl,de ; HL := address of DPB pointer
ld a,(hl) ; dereference...
inc hl
ld h,(hl)
ld l,a ; HL := address of DPB
; extract sectors per track from first word of DPB
ld c,(hl)
inc hl
ld b,(hl) ; BC := sectors per track
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
add hl,de ; point to offset field in DPB
ld a,(hl) ; load first byte in A
inc hl ; point to second byte
or (hl) ; or with first byte
jp z,errsys ; if zero, abort (no system tracks)
; initialize for I/O
ld hl,0
ld (acttrk),hl ; active track := 0
ld (actsec),hl ; active sector := 0
ld hl,buf
ld (bufptr),hl ; reset buffer pointer
;
xor a ; signal success
ret ; done
;
; Read or write (reccnt) sectors to/from disk via CBIOS
;
rwdsk:
; setup to read/write a sector
ld bc,(acttrk) ; get active track
call cbios ; invoke cbios with...
.db $1E ; SETTRK entry offset
ld bc,(actsec) ; get active sector
call cbios ; invoke cbios with...
.db $21 ; SETSEC entry offset
ld bc,(bufptr) ; get active buffer pointer
call cbios ; invoke cbios with...
.db $24 ; SETDMA entry offset
; read/write sector
ld a,(reccnt) ; get the pending record count
dec a ; last record?
ld c,2 ; allow cached writes by default
jr nz,rwdsk1 ; not last record, continue
ld c,1 ; last record, no caching please
rwdsk1: ld hl,(actfnc) ; load the CBIOS function vector
call jphl ; indirect call (read or write)
or a ; set flags on return code
jp nz,errio ; if not zero, error abort
; adjust buffer pointer
ld hl,(bufptr) ; get buffer pointer
ld de,128 ; record length is 128 bytes
add hl,de ; adjust buffer ptr for next record
ld (bufptr),hl ; save it
; next sector
ld hl,(actsec) ; current sector
inc hl ; increment sector
ld (actsec),hl ; save it
; check for end of track
ld de,(actspt) ; get current sectors per track
or a ; clear CF
sbc hl,de ; current track == sectors per track?
jr nz,rwdsk2 ; no, skip track change
; next track
ld hl,0
ld (actsec),hl ; current sector := 0
ld hl,acttrk ; point to track variable
inc (hl) ; increment track
; check pending record count and loop or return
rwdsk2: ld hl,reccnt
dec (hl) ; decrement pending record count
ret z ; if zero, done, return with Z set
jr rwdsk ; otherwise, loop
;
jphl: jp (hl) ; indirect jump
;
; Verify system image header in buf by checking the expected signature.
; Compute and return image size (based on header values) in HL.
; NZ set if signature error.
;
chkhdr:
; check signature
ld hl,(buf+$580) ; get signature
ld de,$A55A ; signature value
or a ; clear CF
sbc hl,de ; compare
jp nz,errsig ; invalid signature
; compute the image size (does not include size of header)
ld hl,(buf+$5FC) ; get CPM_END
ld de,(buf+$5FA) ; get CPM_LOC
or a ; clear CF
sbc hl,de ; image size := CPM_END - CPM_LOC
xor a ; signal success
ret ; done
;
; Convert a filename at (HL) into an FCB at (DE).
; Includes wildcard expansion.
; On return, A=0 if unambiguous name specified, and
; (HL) points to character following filename spec
;
convert:
push de ; put fcb address on stack
ex de,hl
ld a,(de) ; get first character.
or a
jp z,convrt1
sbc a,'A'-1 ; might be a drive name, convert to binary.
ld b,a ; and save.
inc de ; check next character for a ':'.
ld a,(de)
cp ':'
jp z,convrt2
dec de ; nope, move pointer back to the start of the line.
convrt1:
ld a,(defdrv)
ld (hl),a
jp convrt3
convrt2:
ld a,b
ld (hl),b
inc de
; Convert the base file name.
convrt3:ld b,08h
convrt4:ld a,(de)
call delim
jp z,convrt8
inc hl
cp '*' ; note that an '*' will fill the remaining
jp nz,convrt5 ; field with '?'
ld (hl),'?'
jp convrt6
convrt5:ld (hl),a
inc de
convrt6:dec b
jp nz,convrt4
convrt7:ld a,(de)
call delim ; get next delimiter
jp z,getext
inc de
jp convrt7
convrt8:inc hl ; blank fill the file name
ld (hl),' '
dec b
jp nz,convrt8
getext: ld b,03h
cp '.'
jp nz,getext5
inc de
getext1:ld a,(de)
call delim
jp z,getext5
inc hl
cp '*'
jp nz,getext2
ld (hl),'?'
jp getext3
getext2:ld (hl),a
inc de
getext3:dec b
jp nz,getext1
getext4:ld a,(de)
call delim
jp z,getext6
inc de
jp getext4
getext5:inc hl
ld (hl),' '
dec b
jp nz,getext5
getext6:ld b,3
getext7:inc hl
ld (hl),0
dec b
jp nz,getext7
pop hl ; HL := start of FCB
push de ; save input line pointer
; Check to see if this is an ambiguous file name specification.
; Set the A register to non-zero if it is.
ld bc,11 ; set name length.
getext8:inc hl
ld a,(hl)
cp '?' ; any question marks?
jp nz,getext9
inc b ; count them.
getext9:dec c
jp nz,getext8
ld a,b
or a
pop hl ; return with updated input pointer
ret
;
; Print formatted FCB at (HL)
;
prtfcb:
push hl ; save HL
call chkfcb ; set flags indicating nature of FCB
pop hl ; restore HL
ret z ; nothing to print
push af ; save FCB flags
ld a,(hl) ; get first byte of FCB (drive)
inc hl ; point to next char
or a ; is drive specified (non-zero)?
jr z,prtfcb1 ; if zero, do not print drive letter
add a,'@' ; adjust drive number to alpha
call prtchr ; print it
ld a,':'
call prtchr ; print drive separator
prtfcb1:
pop af ; restore FCB flags
bit 1,a ; bit 1 set if filename specified
ret z ; return if no filename
ld b,8 ; base is 8 characters
call prtfcb2 ; print them
ld a,'.'
call prtchr ; print file extension separator
ld b,3 ; extension is 3 characters
prtfcb2:
ld a,(hl) ; load the next character
inc hl ; point to next character
cp ' ' ; check for blank
call nz,prtchr ; print char if it is not a blank
djnz prtfcb2 ; loop till done
ret ; return
;
; Check FCB to see if a drive and/or filename is specified.
; Set bit 0 for drive and bit 1 for filename in A
;
chkfcb:
ld c,0 ; use C for flags, start with none
ld a,(hl) ; get drive
or a ; anything there?
jr z,chkfcb1 ; skip if nothing there
set 0,c ; set bit zero to indicate a drive spec
chkfcb1:
ld b,11 ; set up to check 11 bytes (base & ext)
chkfcb2:
inc hl ; bump to next byte
ld a,(hl) ; get next
cp 'A' ; blank means empty byte
jr nc,chkfcb3 ; if not blank, we have a filename
djnz chkfcb2 ; loop
jr chkfcb4 ; nothing there
chkfcb3:
set 1,c ; set bit 1 to indicate a file spec
chkfcb4:
ld a,c ; put result in a
or a ; set flags
ret
;
; Print character in A without destroying any registers
;
prtchr:
push bc ; save registers
push de
push hl
ld e,a ; character to print in E
ld c,$02 ; BDOS function to output a character
call bdos ; do it
pop hl ; restore registers
pop de
pop bc
ret
;
; Print $ terminated string at (DE) without destroying any registers
;
prtstr:
push bc ; save registers
push de
push hl
ld c,$09 ; BDOS function to output a '$' terminated string
call bdos ; do it
pop hl ; restore registers
pop de
pop bc
ret
;
; Print the value in A in hex without destroying any registers
;
prthex:
push af ; save AF
push de ; save DE
call hexascii ; convert value in A to hex chars in DE
ld a,d ; get the high order hex char
call prtchr ; print it
ld a,e ; get the low order hex char
call prtchr ; print it
pop de ; restore DE
pop af ; restore AF
ret ; done
;
; Convert binary value in A to ascii hex characters in DE
;
hexascii:
ld d,a ; save A in D
call hexconv ; convert low nibble of A to hex
ld e,a ; save it in E
ld a,d ; get original value back
rlca ; rotate high order nibble to low bits
rlca
rlca
rlca
call hexconv ; convert nibble
ld d,a ; save it in D
ret ; done
;
; Convert low nibble of A to ascii hex
;
hexconv:
and $0F ; low nibble only
add a,$90
daa
adc a,$40
daa
ret
;
; Start a new line
;
crlf:
ld a,13 ; <CR>
call prtchr ; print it
ld a,10 ; <LF>
jr prtchr ; print it
;
; Get the next non-blank character from (HL).
;
nonblank:
ld a,(hl) ; load next character
or a ; string ends with a null
ret z ; if null, return pointing to null
cp ' ' ; check for blank
ret nz ; return if not blank
inc hl ; if blank, increment character pointer
jr nonblank ; and loop
;
; Check character at (DE) for delimiter.
;
delim: or a
ret z
cp ' ' ; blank
ret z
jr c,delim1 ; handle control characters
cp '=' ; equal
ret z
cp '_' ; underscore
ret z
cp '.' ; period
ret z
cp ':' ; colon
ret z
cp $3b ; semicolon
ret z
cp '<' ; less than
ret z
cp '>' ; greater than
ret
delim1:
; treat control chars as delimiters
xor a ; set Z
ret ; return
;
; Invoke CBIOS function
; The CBIOS function offset must be stored in the byte
; following the call instruction. ex:
; call cbios
; .db $0C ; offset of CONOUT CBIOS function
;
cbios:
ex (sp),hl
ld a,(hl) ; get the function offset
inc hl ; point past value following call instruction
ex (sp),hl ; put address back at top of stack and recover HL
ld hl,(cbftbl) ; address of CBIOS function table to HL
call addhl ; determine specific function address
jp (hl) ; invoke CBIOS
;
; Add the value in A to HL (HL := HL + A)
;
addhl:
add a,l ; A := A + L
ld l,a ; Put result back in L
ret nc ; if no carry, we are done
inc h ; if carry, increment H
ret ; and return
;
; Errors
;
erruse: ; command usage error (syntax)
ld de,msguse
jr err
erramb: ; ambiguous file spec (wild cards) is not allowed
ld de,msgamb
jr err
errdlm: ; invalid delimiter in command tail
ld de,msgdlm
jr err
errfil: ; source file not found
ld de,msgfil
jr err
errclo: ; file close error
ld de,msgclo
jr err
errdel: ; file delete error
ld de,msgdel
jr err
errsig: ; invalid system image signature error
ld de,msgsig
jr err
errsel: ; CBIOS drive select error
ld de,msgsel
jr err
errsys: ; no system tracks on drive error
ld de,msgsys
jr err
errio: ; I/O error
ld de,msgio
jr err
err: ; print error string and return error signal
call crlf ; print newline
call prtstr ; print error string
or $FF ; signal error
ret ; done
errdos: ; handle BDOS errors
push af ; save return code
call crlf ; newline
ld de,msgdos ; load
call prtstr ; and print error string
pop af ; recover return code
call prthex ; print error code
or $FF ; signal error
ret ; done
;
;===============================================================================
; Storage Section
;===============================================================================
;
defdrv .db 0 ; default drive for FCB
cbftbl .dw 0 ; address of CBIOS function table
imgsiz .db 0 ; image size (count of 128 byte records)
;
destfcb .fill 36,0 ; destination FCB
srcfcb .fill 36,0 ; source FCB
;
stksav .dw 0 ; stack pointer saved at start
.fill stksiz,0 ; stack
stack .equ $ ; stack top
;
rwfun .db 0 ; active read/write function
rwfcb .dw 0 ; active read/write FCB
reccnt .db 0 ; active remaining records to read/write
bufptr .dw 0 ; active pointer into buffer
;
actdsk .db 0 ; active disk no
acttrk .dw 0 ; active track
actsec .dw 0 ; active sector
actspt .dw 0 ; active sectors per track
actfnc .dw 0 ; active function (read or write)
;
; Messages
;
msguse .db "Usage: SYSCOPY <dest>[=<source>]$"
msgamb .db "Ambiguous file specification not allowed$"
msgdlm .db "Invalid delimiter$"
msgfil .db "File not found$"
msgclo .db "File close error$"
msgdel .db "Error deleting target file$"
msgsig .db "Invalid system image (bad signature)$"
msgdos .db "DOS error, return code=0x$"
msgsel .db "Disk select error$"
msgsys .db "Non-system disk error$"
msgio .db "Disk I/O error$"
msgrd .db "Reading image... $"
msgwrt .db "Writing image... $"
msgdon .db "Done$"
sconf1 .db "Transfer system image from $"
sconf2 .db " to $"
sconf3 .db " (Y/N)? $"
;
.end

507
Apps/SysGen.z80 Normal file
View File

@@ -0,0 +1,507 @@
TITLE 'SYSGEN - SYSTEM GENERATION PROGRAM 8/79'
; SYSTEM GENERATION PROGRAM, VERSION FOR ROMWBW
VERS EQU 20 ; X.X
;
; COPYRIGHT (C) DIGITAL RESEARCH
; 1976, 1977, 1978, 1979
;
NDISKS EQU 16 ; NUMBER OF DISK DRIVES
SECSIZ EQU 128 ; SIZE OF EACH SECTOR
LOG2SEC EQU 7 ; LOG 2 SECSIZ
;
FCB EQU 05CH ; DEFAULT FCB LOCATION
FCBCR EQU FCB+32 ; CURRENT RECORD LOCATION
TPA EQU 0100H ; TRANSIENT PROGRAM AREA
LOADP EQU 900H ; LOAD POINT FOR SYSTEM DURING LOAD/STORE
BDOS EQU 5 ; DOS ENTRY POINT
BOOT EQU 0 ; JMP TO 'BOOT' TO REBOOT SYSTEM
CONI EQU 1 ; CONSOLE INPUT FUNCTION
CONO EQU 2 ; CONSOLE OUTPUT FUNCTION
OPENF EQU 15 ; DISK OPEN FUNCTION
DREADF EQU 20 ; DISK READ FUNCTION
;
CR EQU 0DH ; CARRIAGE RETURN
LF EQU 0AH ; LINE FEED
STKSIZE EQU 16 ; SIZE OF LOCAL STACK
;
WBOOT EQU 1 ; ADDRESS OF WARM BOOT (OTHER PATCH ENTRY
;
ORG TPA ; TRANSIENT PROGRAM AREA
JP START
DB 'COPYRIGHT (C) 1978, DIGITAL RESEARCH '
;
; UTILITY SUBROUTINES
;
GETCHAR:
; READ CONSOLE CHARACTER TO REGISTER A
LD C,CONI
CALL BDOS
; CONVERT TO UPPER CASE BEFORE RETURN
CP 'A' OR 20H
RET C ; RETURN IF BELOW LOWER CASE A
CP ('Z' OR 20H) + 1
RET NC ; RETURN IF ABOVE LOWER CASE Z
AND 5FH
RET
;
PUTCHAR:
; WRITE CHARACTER FROM A TO CONSOLE
LD E,A
LD C,CONO
CALL BDOS
RET
;
CRLF: ; SEND CARRIAGE RETURN, LINE FEED
LD A,CR
CALL PUTCHAR
LD A,LF
CALL PUTCHAR
RET
;
CRMSG: ; PRINT MESSAGE ADDRESSED BY H,L TIL ZERO
; WITH LEADING CRLF
PUSH HL
CALL CRLF
POP HL ; DROP THRU TO OUTMSG0
OUTMSG:
LD A,(HL)
OR A
RET Z
; MESSAGE NOT YET COMPLETED
PUSH HL
CALL PUTCHAR
POP HL
INC HL
JP OUTMSG
;
DREAD: ; DISK READ FUNCTION VIA BDOS
LD C,DREADF
JP BDOS
;
OPEN: ; FILE OPEN FUNCTION VIA BDOS
LD C,OPENF
JP BDOS
;
; READ IMAGE DIRECTLY FROM DISK SYSTEM TRACKS USING CBIOS
; DISK NUMBER MUST BE IN (ACTDSK)
;
RDDSK:
; FORCE RETURN TO GO THROUGH DISK RESET
LD HL,RESDSK ; LOAD ADDRESS OF RESET DISK ROUTINE
PUSH HL ; AND PUT IT ON THE STACK
; SET DRIVE FOR SUBSEQUENT READS
CALL SETDSK ; SETUP DISK SPECIFIED IN A
RET NZ ; ABORT ON ERROR
; SET FUNCTION TO READ
LD HL,(CBFTBL) ; GET ADDRESS OF CBIOS FUNCTION TABLE
LD A,027H ; $27 IS CBIOS READ ENTRY OFFSET
CALL ADDHL ; SET HL TO RESULTANT ENTRY POINT
LD (ACTFNC),HL ; SAVE IT
; READ THE HEADER
LD A,12 ; START WITH 1536 BYTE HEADER (12 RECORDS)
LD (RECCNT),A ; INITIALIZE RECORD COUNTER
CALL RWDSK ; READ THE HEADER
RET NZ ; ABORT ON ERROR
; CHECK HEADER AND GET IMAGE SIZE
CALL CHKHDR ; CHECK INTEGRITY, HL = IMAGE SIZE ON RETURN
RET NZ ; ABORT ON ERROR
; CONVERT IMAGE SIZE TO COUNT OF 128-BYTE RECORDS
LD B,7 ; RIGHT SHIFT 7 BITS TO GET 128 BYTE RECORD COUNT
RDDSK1: SRL H ; SHIFT RIGHT MSB
RR L ; SHIFT LSB W/ CARRY FROM MSB
DJNZ RDDSK1 ; LOOP TILL DONE
; SET THE NUMBER OF RECORDS PENDING TO READ
LD A,L ; RECORD COUNT TO A
LD (RECCNT),A ; SET REMAINING RECORDS TO READ
; SAVE THE TOTAL IMAGE SIZE (INCLUDING HEADER) FOR LATER
ADD A,12 ; ADD THE HEADER RECORDS BACK
LD (IMGSIZ),A ; AND SAVE THE TOTAL IMAGE SIZE (IN RECORDS)
; READ THE REMAINING SYSTEM IMAGE RECORDS
CALL RWDSK ; FINISH UP
RET NZ ; ABORT ON ERROR
; PERFORM BDOS DISK RESET (CRITICAL SINCE WE MUCKED WITH CBIOS)
LD C,0DH ; BDOS RESET DISK
CALL BDOS ; DO IT
; RETURN
XOR A ; SIGNAL SUCCESS
RET ; DONE
;
; WRITE IMAGE DIRECTLY TO DISK SYSTEM TRACKS USING CBIOS
; DISK NUMBER MUST BE IN (ACTDSK)
;
WRDSK:
; FORCE RETURN TO GO THROUGH DISK RESET
LD HL,RESDSK ; LOAD ADDRESS OF RESET DISK ROUTINE
PUSH HL ; AND PUT IT ON THE STACK
; SET DRIVE FOR SUBSEQUENT WRITES
CALL SETDSK ; SETUP DISK SPECIFIED IN A
RET NZ ; ABORT ON ERROR
; SET FUNCTION TO WRITE
LD HL,(CBFTBL) ; GET ADDRESS OF CBIOS FUNCTION TABLE
LD A,02AH ; $2A IS CBIOS WRITE ENTRY OFFSET
CALL ADDHL ; SET HL TO RESULTANT ENTRY POINT
LD (ACTFNC),HL ; SAVE IT
; SETUP THE RECORD COUNT TO WRITE
LD A,(IMGSIZ) ; GET PREVIOUSLY RECORDED IMAGE SIZE
LD (RECCNT),A ; SAVE IT AS PENDING RECORD COUNT
; WRITE THE IMAGE
CALL RWDSK ; WRITE THE IMAGE
RET NZ ; ABORT ON ERROR
; RETURN
XOR A ; SIGNAL SUCCESS
RET ; DONE
;
; PERFORM BDOS DISK RESET
; REQUIRED AFTER MAKING DIRECT CBIOS DISK CALLS
;
RESDSK:
; PERFORM BDOS DISK RESET
PUSH AF ; PRESERVE STATUS
LD C,0DH ; BDOS RESET DISK
CALL BDOS ; DO IT
POP AF ; RESTORE STATUS
RET
;
; SETUP FOR CBIOS DISK ACCESS
;
SETDSK:
; SELECT DISK
LD A,(ACTDSK) ; GET ACTIVE DISK
LD C,A ; MOVE TO C
LD E,0 ; TREAT AS FIRST SELECT
CALL CBIOS ; INVOKE CBIOS WITH...
DB 01BH ; SELDSK ENTRY OFFSET
; CHECK RETURN (SETS HL TO DPH ADDRESS)
LD A,H
OR L
JP Z,ERRSEL ; HL == 0 IS SELECT ERROR
; SET HL TO DPB ADDRESS
LD DE,10 ; DPB ADDRESS IS 10 BYTES INTO DPH
ADD HL,DE ; HL := ADDRESS OF DPB POINTER
LD A,(HL) ; DEREFERENCE...
INC HL
LD H,(HL)
LD L,A ; HL := ADDRESS OF DPB
; EXTRACT SECTORS PER TRACK FROM FIRST WORD OF DPB
LD C,(HL)
INC HL
LD B,(HL) ; BC := SECTORS PER TRACK
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
ADD HL,DE ; POINT TO OFFSET FIELD IN DPB
LD A,(HL) ; LOAD FIRST BYTE IN A
INC HL ; POINT TO SECOND BYTE
OR (HL) ; OR WITH FIRST BYTE
JP Z,ERRSYS ; IF ZERO, ABORT (NO SYSTEM TRACKS)
; INITIALIZE FOR I/O
LD HL,0
LD (ACTTRK),HL ; ACTIVE TRACK := 0
LD (ACTSEC),HL ; ACTIVE SECTOR := 0
LD HL,LOADP
LD (BUFPTR),HL ; RESET BUFFER POINTER
;
XOR A ; SIGNAL SUCCESS
RET ; DONE
;
; READ OR WRITE (RECCNT) SECTORS TO/FROM DISK VIA CBIOS
;
RWDSK:
; SETUP TO READ/WRITE A SECTOR
LD BC,(ACTTRK) ; GET ACTIVE TRACK
CALL CBIOS ; INVOKE CBIOS WITH...
DB 01EH ; SETTRK ENTRY OFFSET
LD BC,(ACTSEC) ; GET ACTIVE SECTOR
CALL CBIOS ; INVOKE CBIOS WITH...
DB 021H ; SETSEC ENTRY OFFSET
LD BC,(BUFPTR) ; GET ACTIVE BUFFER POINTER
CALL CBIOS ; INVOKE CBIOS WITH...
DB 024H ; SETDMA ENTRY OFFSET
; READ/WRITE SECTOR
LD A,(RECCNT) ; GET THE PENDING RECORD COUNT
DEC A ; LAST RECORD?
LD C,2 ; ALLOW CACHED WRITES BY DEFAULT
JR NZ,RWDSK1 ; NOT LAST RECORD, CONTINUE
LD C,1 ; LAST RECORD, NO CACHING PLEASE
RWDSK1: LD HL,(ACTFNC) ; LOAD THE CBIOS FUNCTION VECTOR
CALL JPHL ; INDIRECT CALL (READ OR WRITE)
OR A ; SET FLAGS ON RETURN CODE
JP NZ,ERRIO ; IF NOT ZERO, ERROR ABORT
; ADJUST BUFFER POINTER
LD HL,(BUFPTR) ; GET BUFFER POINTER
LD DE,128 ; RECORD LENGTH IS 128 BYTES
ADD HL,DE ; ADJUST BUFFER PTR FOR NEXT RECORD
LD (BUFPTR),HL ; SAVE IT
; NEXT SECTOR
LD HL,(ACTSEC) ; CURRENT SECTOR
INC HL ; INCREMENT SECTOR
LD (ACTSEC),HL ; SAVE IT
; CHECK FOR END OF TRACK
LD DE,(ACTSPT) ; GET CURRENT SECTORS PER TRACK
OR A ; CLEAR CF
SBC HL,DE ; CURRENT TRACK == SECTORS PER TRACK?
JR NZ,RWDSK2 ; NO, SKIP TRACK CHANGE
; NEXT TRACK
LD HL,0
LD (ACTSEC),HL ; CURRENT SECTOR := 0
LD HL,ACTTRK ; POINT TO TRACK VARIABLE
INC (HL) ; INCREMENT TRACK
; CHECK PENDING RECORD COUNT AND LOOP OR RETURN
RWDSK2: LD HL,RECCNT
DEC (HL) ; DECREMENT PENDING RECORD COUNT
RET Z ; IF ZERO, DONE, RETURN WITH Z SET
JR RWDSK ; OTHERWISE, LOOP
;
JPHL: JP (HL) ; INDIRECT JUMP
;
; VERIFY SYSTEM IMAGE HEADER IN BUF BY CHECKING THE EXPECTED SIGNATURE.
; COMPUTE AND RETURN IMAGE SIZE (BASED ON HEADER VALUES) IN HL.
; NZ SET IF SIGNATURE ERROR.
;
CHKHDR:
; CHECK SIGNATURE
LD HL,(LOADP+580H) ; GET SIGNATURE
LD DE,0A55AH ; SIGNATURE VALUE
OR A ; CLEAR CF
SBC HL,DE ; COMPARE
JP NZ,ERRSIG ; INVALID SIGNATURE
; COMPUTE THE IMAGE SIZE (DOES NOT INCLUDE SIZE OF HEADER)
LD HL,(LOADP+5FCH) ; GET CPM_END
LD DE,(LOADP+5FAH) ; GET CPM_LOC
OR A ; CLEAR CF
SBC HL,DE ; IMAGE SIZE := CPM_END - CPM_LOC
XOR A ; SIGNAL SUCCESS
RET ; DONE
;
; INVOKE CBIOS FUNCTION
; THE CBIOS FUNCTION OFFSET MUST BE STORED IN THE BYTE
; FOLLOWING THE CALL INSTRUCTION. EX:
; CALL CBIOS
; DB 0CH ; OFFSET OF CONOUT CBIOS FUNCTION
;
CBIOS:
EX (SP),HL
LD A,(HL) ; GET THE FUNCTION OFFSET
INC HL ; POINT PAST VALUE FOLLOWING CALL INSTRUCTION
EX (SP),HL ; PUT ADDRESS BACK AT TOP OF STACK AND RECOVER HL
LD HL,(CBFTBL) ; ADDRESS OF CBIOS FUNCTION TABLE TO HL
CALL ADDHL ; DETERMINE SPECIFIC FUNCTION ADDRESS
JP (HL) ; INVOKE CBIOS
;
; ADD THE VALUE IN A TO HL (HL := HL + A)
;
ADDHL:
ADD A,L ; A := A + L
LD L,A ; PUT RESULT BACK IN L
RET NC ; IF NO CARRY, WE ARE DONE
INC H ; IF CARRY, INCREMENT H
RET ; AND RETURN
;
; START OF PROGRAM
;
START:
LD SP,STACK ; SET LOCAL STACK POINTER
LD HL,SIGNON
CALL CRMSG
; LOCATE CBIOS FUNCTION TABLE ADDRESS
LD HL,(BOOT+1) ; LOAD ADDRESS OF CP/M RESTART VECTOR
LD DE,-3 ; ADJUSTMENT FOR START OF TABLE
ADD HL,DE ; HL NOW HAS START OF TABLE
LD (CBFTBL),HL ; SAVE IT
; CHECK FOR DEFAULT FILE LOAD INSTEAD OF GET
LD A,(FCB+1); BLANK IF NO FILE
CP ' '
JP Z,GETSYS ; SKIP TO GET SYSTEM MESSAGE IF BLANK
LD DE,FCB ; TRY TO OPEN IT
CALL OPEN ;
INC A ; 255 BECOMES 00
JP NZ,RDOK ; OK TO READ IF NOT 255
; FILE NOT PRESENT, ERROR AND REBOOT
LD HL,NOFILE
CALL CRMSG
JP REBOOT
;
; FILE PRESENT - READ TO LOAD POINT
;
RDOK:
XOR A
LD (FCBCR),A; CURRENT RECORD = 0
; PRE-READ AREA FROM TPA TO LOADP
LD C,(LOADP-TPA)/SECSIZ
PRERD: ; PRE-READ FILE
PUSH BC ; SAVE COUNT
LD DE,FCB ; INPUT FILE CONTROL COUNT
CALL DREAD ; ASSUME SET TO DEFAULT BUFFER
POP BC ; RESTORE COUNT
OR A
JP NZ,BADRD ; CANNOT ENCOUNTER END-OF FILE
DEC C ; COUNT DOWN
JP NZ,PRERD ; FOR ANOTHER SECTOR
;
; SECTORS SKIPPED AT BEGINNING OF FILE
;
LD HL,LOADP
RDINP:
PUSH HL
LD B,H
LD C,L ; READY FOR DMA
CALL CBIOS ; INVOKE CBIOS WITH...
DB 024H ; SETDMA ENTRY OFFSET
LD DE,FCB ; READY FOR READ
CALL DREAD ;
POP HL ; RECALL DMA ADDRESS
OR A ; 00 IF READ OK
JP NZ,PUTSYS ; ASSUME EOF IF NOT.
; MORE TO READ, CONTINUE
LD DE,SECSIZ
ADD HL,DE ; HL IS NEW LOAD ADDRESS
JP RDINP
;
BADRD: ; EOF ENCOUNTERED IN INPUT FILE
LD HL,BADFILE
CALL CRMSG
JP REBOOT
;
GETSYS:
CALL CRLF
LD HL,ASKGET ; GET SYSTEM?
CALL CRMSG
CALL GETCHAR
CP CR
JP Z,PUTSYS ; SKIP IF CR ONLY
;
SUB 'A' ; NORMALIZE DRIVE NUMBER
CP NDISKS ; VALID DRIVE?
JP C,GETC ; SKIP TO GETC IF SO
; INVALID DRIVE NUMBER
CALL BADDISK
JP GETSYS ; TO TRY AGAIN
;
GETC:
; SELECT DISK GIVEN BY REGISTER A
ADD A,'A'
LD (GDISK),A; TO SET MESSAGE
SUB 'A'
LD (ACTDSK),A ; SAVE ACTIVE DISK NO
; ; GETSYS, SET RW TO READ AND GET THE SYSTEM
CALL CRLF
LD HL,GETMSG
CALL OUTMSG
CALL GETCHAR
CP CR
JP NZ,REBOOT
CALL CRLF
CALL RDDSK
JP NZ,GETSYS
LD HL,DONE
CALL OUTMSG
;
; PUT SYSTEM
;
PUTSYS:
CALL CRLF
LD HL,ASKPUT
CALL CRMSG
CALL GETCHAR
CP CR
JP Z,REBOOT
SUB 'A'
CP NDISKS
JP C,PUTC
; INVALID DRIVE NAME
CALL BADDISK
JP PUTSYS ; TO TRY AGAIN
;
PUTC: ; SET DISK FROM REGISTER C
ADD A,'A'
LD (PDISK),A ; MESSAGE SET
SUB 'A'
LD (ACTDSK),A ; SAVE ACTIVE DISK NO
; PUT SYSTEM
LD HL,PUTMSG
CALL CRMSG
CALL GETCHAR
CP CR
JP NZ,REBOOT
CALL CRLF
CALL WRDSK
JP NZ,PUTSYS
LD HL,DONE
CALL OUTMSG
JP PUTSYS ; FOR ANOTHER PUT OPERATION
;
REBOOT:
CALL CRLF
JP BOOT
;
ERRSEL:
LD HL,SELMSG
JP ERR
;
ERRSYS:
LD HL,SYSMSG
JP ERR
;
ERRIO:
LD HL,IOMSG
JP ERR
;
ERRSIG:
LD HL,SIGMSG
JP ERR
;
ERR:
CALL OUTMSG
OR A,0FFH
RET
;
BADDISK:;BAD DISK NAME
LD HL,QDISK
CALL CRMSG
RET
;
; DATA AREAS
; MESSAGES
;
SIGNON: DB 'ROMWBW SYSGEN VER '
DB VERS/10+'0','.',VERS MOD 10+'0'
DB 0
ASKGET: DB 'SOURCE DRIVE NAME (OR RETURN TO SKIP): ',0
GETMSG: DB 'SOURCE ON '
GDISK: DS 1 ; FILLED IN AT GET FUNCTION
DB ':, THEN TYPE RETURN',0
ASKPUT: DB 'DESTINATION DRIVE NAME (OR RETURN TO REBOOT): ',0
PUTMSG: DB 'DESTINATION ON '
PDISK: DS 1 ; FILLED IN AT PUT FUNCTION
DB ':, THEN TYPE RETURN',0
ERRMSG: DB 'PERMANENT ERROR, TYPE RETURN TO IGNORE',0
DONE: DB 'FUNCTION COMPLETE',0
QDISK: DB 'INVALID DRIVE NAME (USE A-P)',0
NOFILE: DB 'NO SOURCE FILE ON DISK',0
BADFILE:
DB 'SOURCE FILE INCOMPLETE',0
SELMSG: DB 'DISK SELECTION ERROR',0
SYSMSG: DB 'NON-SYSTEM DISK ERROR',0
IOMSG: DB 'FATAL DISK I/O ERROR',0
SIGMSG: DB 'INVALID SYSTEM IMAGE (BAD SIGNATURE)',0
;
; VARIABLES
;
CBFTBL DW 0 ; ADDRESS OF CBIOS FUNCTION TABLE
IMGSIZ DB 0 ; IMAGE SIZE (COUNT OF 128 BYTE RECORDS)
;
RWFUN DB 0 ; ACTIVE READ/WRITE FUNCTION
RECCNT DB 0 ; ACTIVE REMAINING RECORDS TO READ/WRITE
BUFPTR DW 0 ; ACTIVE POINTER INTO BUFFER
;
ACTDSK DB 0 ; ACTIVE DISK NO
ACTTRK DW 0 ; ACTIVE TRACK
ACTSEC DW 0 ; ACTIVE SECTOR
ACTSPT DW 0 ; ACTIVE SECTORS PER TRACK
ACTFNC DW 0 ; ACTIVE FUNCTION (READ OR WRITE)
DS STKSIZE*2
STACK:
;
END

View File

@@ -1,16 +0,0 @@
@echo off
setlocal
if exist *.com del *.com
if exist *.ovr del *.ovr
if exist *.doc del *.doc
if exist *.hlp del *.hlp
if exist Tunes\*.pt? del Tunes\*.pt?
if exist Tunes\*.mym del Tunes\*.mym
if exist Tunes\*.vgm del Tunes\*.vgm
if exist bbcbasic.txt del bbcbasic.txt
if exist *.cfg del *.cfg
if exist *.fon del *.fon
pushd Test && call Clean || exit /b 1 & popd
pushd ZDE && call Clean || exit /b 1 & popd

View File

@@ -1,11 +0,0 @@
TOOLS = ../../Tools
MOREDIFF := $(shell $(TOOLS)/unix/casefn.sh *.com)
SUBDIRS = Test ZDE
include $(TOOLS)/Makefile.inc
all::
mkdir -p Tunes
clean::
@rm -f *.bin *.com *.img *.rom *.pdf *.log *.eeprom *.ovr *.hlp *.doc *.COM *.BIN Tunes/*.mym Tunes/*.pt? Tunes/*.vgm bbcbasic.txt *.cfg *.fon

View File

@@ -1,21 +0,0 @@
***********************************************************************
*** ***
*** R o m W B W ***
*** ***
*** Z80/Z180 System Software ***
*** ***
***********************************************************************
This directory contains the executable application files that
are specific to RomWBW. The source for these applications is found
in the Source\Apps directory of the distribution.
The Tunes subdirectory contains some sample ProTracker and MYM sound
files that can be played by the TUNE application.
All of these files are already included in the pre-built boot disk
images. They are also included on the ROM disk except for
FAT.COM, TUNE.COM, and the sample tune files in the Tunes directory.
If you upgrade your ROM to a new version, you should also copy
these files over to any hard disk images you are using.

View File

@@ -1,4 +0,0 @@
@echo off
setlocal
if exist *.com del *.com

View File

@@ -1,7 +0,0 @@
TOOLS = ../../../Tools
MOREDIFF := $(shell $(TOOLS)/unix/casefn.sh *.com)
include $(TOOLS)/Makefile.inc
clean::
@rm -f *.com

View File

@@ -1,16 +0,0 @@
***********************************************************************
*** ***
*** R o m W B W ***
*** ***
*** Z80/Z180 System Software ***
*** ***
***********************************************************************
This directory contains various hardware test application files that
are specific to RomWBW. The source for these applications is found
in the Source\Apps\Test directory of the distribution.
These files are included on the pre-built disk images in user area 2.
N.B., these files may be specific to certain hardware. They should
be used as directred by the instructions for your specific hardware.

View File

@@ -1,44 +0,0 @@
INTTEST
=======
RomWBW includes an API allowing applications to "hook" interrupts.
The `INTTEST` utility allows you to test this functionality.
** Syntax **
`INTTEST`
** Usage **
`INTTEST` is an interactive application. At startup, it will display
a list of the interrupt vector slots in your system along with the
current vector address for each of them.
It then prompts you to enter the slot number (in hex) of a vector to
hook. After entering this, the application will watch the hooked
vector and countdown from 0xFF to 0x00 as interrupts are noted.
When the counter reaches 0x00, the interrupt is unhooked and the
application terminates. The application can also be terminated by
pressing <esc>.
** Notes **
If your system is running without interrupts active, the application
will terminate immediately.
All slots have vectors even if the corresponding interrupt is not
doing anything. In this case, the vector is pointing to the "bad
interrupt" handler.
If you hook a vector that is not receiving any interrupts, the
down-counter will not do anything.
** Etymology* *
The `INTTEST` command is an original product and the source code is
provided in the RomWBW distribution.

View File

@@ -1,10 +0,0 @@
***********************************************************************
*** ***
*** R o m W B W ***
*** ***
*** Z80/Z180 System Software ***
*** ***
***********************************************************************
This directory contains some sample ProTracker and MYM sound
files that can be played by the TUNE or VGMPLAY application.

View File

@@ -1,4 +0,0 @@
@echo off
setlocal
if exist *.com del *.com

View File

@@ -1,6 +0,0 @@
TOOLS = ../../../Tools
include $(TOOLS)/Makefile.inc
clean::
@rm -f *.com

View File

@@ -1,10 +0,0 @@
***********************************************************************
*** ***
*** R o m W B W ***
*** ***
*** Z80/Z180 System Software ***
*** ***
***********************************************************************
This directory contains the ZDE executable binaries. They are
in their original, unconfigured state.

View File

@@ -1,4 +0,0 @@
@echo off
setlocal
if exist *.sys del *.sys

View File

@@ -1,7 +0,0 @@
TOOLS = ../../Tools
MOREDIFF := $(shell $(TOOLS)/unix/casefn.sh *.spr)
include $(TOOLS)/Makefile.inc
clean::
@rm -f *.sys

View File

@@ -1,23 +0,0 @@
***********************************************************************
*** ***
*** R o m W B W ***
*** ***
*** Z80/Z180 System Software ***
*** ***
***********************************************************************
This directory contains the CP/M 2.2 system files for the RomWBW CP/M 2.2
adaptation. All of these files are already included on the CP/M
boot disk images. However if you are creating a CP/M boot disk
manually, you should copy all of these files to the boot disk.
Note: Two file have been provided one for RomWBW HBIOS, and one for UNA
BIOS. One of these files must be installed on the system boot track.
This is usually achieved by the SYSCOPY utility e.g.
SYSCOPY a:=cpm_wbw.sys
These files should also be copied to any CP/M 2.2 boot disks on your
system when you upgrade your ROM firmware. Some of these files
*must* match the version of the RomWBW firmware you are using for
proper operation of your system.

View File

@@ -1,11 +0,0 @@
@echo off
setlocal
if exist *.spr del *.spr
if exist *.com del *.com
if exist *.sys del *.sys
if exist *.pat del *.pat
if exist *.dat del *.dat
if exist *.1st del *.1st
if exist *.spr del *.spr
if exist *.pat del *.pat

View File

@@ -1,7 +0,0 @@
TOOLS = ../../Tools
MOREDIFF := $(shell $(TOOLS)/unix/casefn.sh *.spr)
include $(TOOLS)/Makefile.inc
clean::
@rm -f *.spr *.com *.sys *.dat cpm3fix.pat readme.1st

View File

@@ -1,17 +0,0 @@
***********************************************************************
*** ***
*** R o m W B W ***
*** ***
*** Z80/Z180 System Software ***
*** ***
***********************************************************************
This directory contains the CP/M 3 system files for the RomWBW CP/M 3
adaptation. All of these files are already included on the CP/M 3
boot disk images. However if you are creating a CP/M 3 boot disk
manually, you should copy all of these files to the boot disk.
These files should also be copied to any CP/M 3 boot disks on your
system when you upgrade your ROM firmware. Some of these files
*must* match the version of the RomWBW firmware you are using for
proper operation of your system.

View File

@@ -1,4 +0,0 @@
@echo off
setlocal
if exist *.lbr del *.lbr

View File

@@ -1,7 +0,0 @@
TOOLS = ../../Tools
MOREDIFF := $(shell $(TOOLS)/unix/casefn.sh *.lbr)
include $(TOOLS)/Makefile.inc
clean::
@rm -f *.lbr

Binary file not shown.

Binary file not shown.

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,38 +0,0 @@
***********************************************************************
*** ***
*** R o m W B W ***
*** ***
*** Z80/Z180 System Software ***
*** ***
***********************************************************************
This directory contains the CP/NET client packages. Please refer to
the RomWBW User Guide for instructions on installing these packages.
Either the MT011 RCBus module or the Duodyne Disk I/O board is required.
All of these files come from Douglas Miller. Please refer to
https://github.com/durgadas311/cpnet-z80 for more information, complete
documentation and the latest source code. Refer to the RomWBW
User Guide for basic installation and usage instructions under RomWBW.
| File | CP/NET Version | OS | Hardware |
+--------------+----------------+----------+-----------------------+
| CPN12MT.LBR | CP/NET 1.2 | CP/M 2.2 | RCBus w/ MT011 |
| CPN3MT.LBR | CP/NET 3 | CP/M 3 | RCBus w/ MT011 |
| CPN12DUO.LBR | CP/NET 1.2 | CP/M 2.2 | Duodyne w/ Disk I/O |
| CPN3DUO.LBR | CP/NET 3 | CP/M 3 | Duodyne w/ Disk I/O |
In general, to use CP/NET on RomWBW, it is intended that you will
extract the appropriate set of files into your default directory in
user area 0. Refer to the RomWBW User Guide for more information.
The libraries include enhanced help files appropriate for the version
of CP/NET. Rename the desired topic collection to HELP.HLP on the
target system.
CPM2NET.HLP CP/M 2.2 basic system with CP/NET 1.2
CPNET12.HLP CP/NET 1.2 help only
CPM3NET.HLP CP/M 3 basic system with CP/NET 3
CPNET3.HLP CP/NET 3 help only
-- WBW 7:14 AM 2/11/2024

View File

@@ -1,20 +0,0 @@
@echo off
setlocal
if exist *.bin del *.bin
if exist *.dat del *.dat
if exist *.com del *.com
if exist *.img del *.img
if exist *.rom del *.rom
if exist *.hex del *.hex
if exist *.upd del *.upd
if exist *.pdf del *.pdf
if exist *.eeprom del *.eeprom
pushd Apps && call Clean || exit /b 1 & popd
pushd CPM22 && call Clean || exit /b 1 & popd
pushd CPM3 && call Clean || exit /b 1 & popd
pushd QPM && call Clean || exit /b 1 & popd
pushd ZSDOS && call Clean || exit /b 1 & popd
pushd ZPM3 && call Clean || exit /b 1 & popd
pushd CPNET && call Clean || exit /b 1 & popd

View File

@@ -1,674 +0,0 @@
GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The GNU General Public License is a free, copyleft license for
software and other kinds of works.
The licenses for most software and other practical works are designed
to take away your freedom to share and change the works. By contrast,
the GNU General Public License is intended to guarantee your freedom to
share and change all versions of a program--to make sure it remains free
software for all its users. We, the Free Software Foundation, use the
GNU General Public License for most of our software; it applies also to
any other work released this way by its authors. You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
them if you wish), that you receive source code or can get it if you
want it, that you can change the software or use pieces of it in new
free programs, and that you know you can do these things.
To protect your rights, we need to prevent others from denying you
these rights or asking you to surrender the rights. Therefore, you have
certain responsibilities if you distribute copies of the software, or if
you modify it: responsibilities to respect the freedom of others.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must pass on to the recipients the same
freedoms that you received. You must make sure that they, too, receive
or can get the source code. And you must show them these terms so they
know their rights.
Developers that use the GNU GPL protect your rights with two steps:
(1) assert copyright on the software, and (2) offer you this License
giving you legal permission to copy, distribute and/or modify it.
For the developers' and authors' protection, the GPL clearly explains
that there is no warranty for this free software. For both users' and
authors' sake, the GPL requires that modified versions be marked as
changed, so that their problems will not be attributed erroneously to
authors of previous versions.
Some devices are designed to deny users access to install or run
modified versions of the software inside them, although the manufacturer
can do so. This is fundamentally incompatible with the aim of
protecting users' freedom to change the software. The systematic
pattern of such abuse occurs in the area of products for individuals to
use, which is precisely where it is most unacceptable. Therefore, we
have designed this version of the GPL to prohibit the practice for those
products. If such problems arise substantially in other domains, we
stand ready to extend this provision to those domains in future versions
of the GPL, as needed to protect the freedom of users.
Finally, every program is threatened constantly by software patents.
States should not allow patents to restrict development and use of
software on general-purpose computers, but in those that do, we wish to
avoid the special danger that patents applied to a free program could
make it effectively proprietary. To prevent this, the GPL assures that
patents cannot be used to render the program non-free.
The precise terms and conditions for copying, distribution and
modification follow.
TERMS AND CONDITIONS
0. Definitions.
"This License" refers to version 3 of the GNU General Public License.
"Copyright" also means copyright-like laws that apply to other kinds of
works, such as semiconductor masks.
"The Program" refers to any copyrightable work licensed under this
License. Each licensee is addressed as "you". "Licensees" and
"recipients" may be individuals or organizations.
To "modify" a work means to copy from or adapt all or part of the work
in a fashion requiring copyright permission, other than the making of an
exact copy. The resulting work is called a "modified version" of the
earlier work or a work "based on" the earlier work.
A "covered work" means either the unmodified Program or a work based
on the Program.
To "propagate" a work means to do anything with it that, without
permission, would make you directly or secondarily liable for
infringement under applicable copyright law, except executing it on a
computer or modifying a private copy. Propagation includes copying,
distribution (with or without modification), making available to the
public, and in some countries other activities as well.
To "convey" a work means any kind of propagation that enables other
parties to make or receive copies. Mere interaction with a user through
a computer network, with no transfer of a copy, is not conveying.
An interactive user interface displays "Appropriate Legal Notices"
to the extent that it includes a convenient and prominently visible
feature that (1) displays an appropriate copyright notice, and (2)
tells the user that there is no warranty for the work (except to the
extent that warranties are provided), that licensees may convey the
work under this License, and how to view a copy of this License. If
the interface presents a list of user commands or options, such as a
menu, a prominent item in the list meets this criterion.
1. Source Code.
The "source code" for a work means the preferred form of the work
for making modifications to it. "Object code" means any non-source
form of a work.
A "Standard Interface" means an interface that either is an official
standard defined by a recognized standards body, or, in the case of
interfaces specified for a particular programming language, one that
is widely used among developers working in that language.
The "System Libraries" of an executable work include anything, other
than the work as a whole, that (a) is included in the normal form of
packaging a Major Component, but which is not part of that Major
Component, and (b) serves only to enable use of the work with that
Major Component, or to implement a Standard Interface for which an
implementation is available to the public in source code form. A
"Major Component", in this context, means a major essential component
(kernel, window system, and so on) of the specific operating system
(if any) on which the executable work runs, or a compiler used to
produce the work, or an object code interpreter used to run it.
The "Corresponding Source" for a work in object code form means all
the source code needed to generate, install, and (for an executable
work) run the object code and to modify the work, including scripts to
control those activities. However, it does not include the work's
System Libraries, or general-purpose tools or generally available free
programs which are used unmodified in performing those activities but
which are not part of the work. For example, Corresponding Source
includes interface definition files associated with source files for
the work, and the source code for shared libraries and dynamically
linked subprograms that the work is specifically designed to require,
such as by intimate data communication or control flow between those
subprograms and other parts of the work.
The Corresponding Source need not include anything that users
can regenerate automatically from other parts of the Corresponding
Source.
The Corresponding Source for a work in source code form is that
same work.
2. Basic Permissions.
All rights granted under this License are granted for the term of
copyright on the Program, and are irrevocable provided the stated
conditions are met. This License explicitly affirms your unlimited
permission to run the unmodified Program. The output from running a
covered work is covered by this License only if the output, given its
content, constitutes a covered work. This License acknowledges your
rights of fair use or other equivalent, as provided by copyright law.
You may make, run and propagate covered works that you do not
convey, without conditions so long as your license otherwise remains
in force. You may convey covered works to others for the sole purpose
of having them make modifications exclusively for you, or provide you
with facilities for running those works, provided that you comply with
the terms of this License in conveying all material for which you do
not control copyright. Those thus making or running the covered works
for you must do so exclusively on your behalf, under your direction
and control, on terms that prohibit them from making any copies of
your copyrighted material outside their relationship with you.
Conveying under any other circumstances is permitted solely under
the conditions stated below. Sublicensing is not allowed; section 10
makes it unnecessary.
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
No covered work shall be deemed part of an effective technological
measure under any applicable law fulfilling obligations under article
11 of the WIPO copyright treaty adopted on 20 December 1996, or
similar laws prohibiting or restricting circumvention of such
measures.
When you convey a covered work, you waive any legal power to forbid
circumvention of technological measures to the extent such circumvention
is effected by exercising rights under this License with respect to
the covered work, and you disclaim any intention to limit operation or
modification of the work as a means of enforcing, against the work's
users, your or third parties' legal rights to forbid circumvention of
technological measures.
4. Conveying Verbatim Copies.
You may convey verbatim copies of the Program's source code as you
receive it, in any medium, provided that you conspicuously and
appropriately publish on each copy an appropriate copyright notice;
keep intact all notices stating that this License and any
non-permissive terms added in accord with section 7 apply to the code;
keep intact all notices of the absence of any warranty; and give all
recipients a copy of this License along with the Program.
You may charge any price or no price for each copy that you convey,
and you may offer support or warranty protection for a fee.
5. Conveying Modified Source Versions.
You may convey a work based on the Program, or the modifications to
produce it from the Program, in the form of source code under the
terms of section 4, provided that you also meet all of these conditions:
a) The work must carry prominent notices stating that you modified
it, and giving a relevant date.
b) The work must carry prominent notices stating that it is
released under this License and any conditions added under section
7. This requirement modifies the requirement in section 4 to
"keep intact all notices".
c) You must license the entire work, as a whole, under this
License to anyone who comes into possession of a copy. This
License will therefore apply, along with any applicable section 7
additional terms, to the whole of the work, and all its parts,
regardless of how they are packaged. This License gives no
permission to license the work in any other way, but it does not
invalidate such permission if you have separately received it.
d) If the work has interactive user interfaces, each must display
Appropriate Legal Notices; however, if the Program has interactive
interfaces that do not display Appropriate Legal Notices, your
work need not make them do so.
A compilation of a covered work with other separate and independent
works, which are not by their nature extensions of the covered work,
and which are not combined with it such as to form a larger program,
in or on a volume of a storage or distribution medium, is called an
"aggregate" if the compilation and its resulting copyright are not
used to limit the access or legal rights of the compilation's users
beyond what the individual works permit. Inclusion of a covered work
in an aggregate does not cause this License to apply to the other
parts of the aggregate.
6. Conveying Non-Source Forms.
You may convey a covered work in object code form under the terms
of sections 4 and 5, provided that you also convey the
machine-readable Corresponding Source under the terms of this License,
in one of these ways:
a) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by the
Corresponding Source fixed on a durable physical medium
customarily used for software interchange.
b) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by a
written offer, valid for at least three years and valid for as
long as you offer spare parts or customer support for that product
model, to give anyone who possesses the object code either (1) a
copy of the Corresponding Source for all the software in the
product that is covered by this License, on a durable physical
medium customarily used for software interchange, for a price no
more than your reasonable cost of physically performing this
conveying of source, or (2) access to copy the
Corresponding Source from a network server at no charge.
c) Convey individual copies of the object code with a copy of the
written offer to provide the Corresponding Source. This
alternative is allowed only occasionally and noncommercially, and
only if you received the object code with such an offer, in accord
with subsection 6b.
d) Convey the object code by offering access from a designated
place (gratis or for a charge), and offer equivalent access to the
Corresponding Source in the same way through the same place at no
further charge. You need not require recipients to copy the
Corresponding Source along with the object code. If the place to
copy the object code is a network server, the Corresponding Source
may be on a different server (operated by you or a third party)
that supports equivalent copying facilities, provided you maintain
clear directions next to the object code saying where to find the
Corresponding Source. Regardless of what server hosts the
Corresponding Source, you remain obligated to ensure that it is
available for as long as needed to satisfy these requirements.
e) Convey the object code using peer-to-peer transmission, provided
you inform other peers where the object code and Corresponding
Source of the work are being offered to the general public at no
charge under subsection 6d.
A separable portion of the object code, whose source code is excluded
from the Corresponding Source as a System Library, need not be
included in conveying the object code work.
A "User Product" is either (1) a "consumer product", which means any
tangible personal property which is normally used for personal, family,
or household purposes, or (2) anything designed or sold for incorporation
into a dwelling. In determining whether a product is a consumer product,
doubtful cases shall be resolved in favor of coverage. For a particular
product received by a particular user, "normally used" refers to a
typical or common use of that class of product, regardless of the status
of the particular user or of the way in which the particular user
actually uses, or expects or is expected to use, the product. A product
is a consumer product regardless of whether the product has substantial
commercial, industrial or non-consumer uses, unless such uses represent
the only significant mode of use of the product.
"Installation Information" for a User Product means any methods,
procedures, authorization keys, or other information required to install
and execute modified versions of a covered work in that User Product from
a modified version of its Corresponding Source. The information must
suffice to ensure that the continued functioning of the modified object
code is in no case prevented or interfered with solely because
modification has been made.
If you convey an object code work under this section in, or with, or
specifically for use in, a User Product, and the conveying occurs as
part of a transaction in which the right of possession and use of the
User Product is transferred to the recipient in perpetuity or for a
fixed term (regardless of how the transaction is characterized), the
Corresponding Source conveyed under this section must be accompanied
by the Installation Information. But this requirement does not apply
if neither you nor any third party retains the ability to install
modified object code on the User Product (for example, the work has
been installed in ROM).
The requirement to provide Installation Information does not include a
requirement to continue to provide support service, warranty, or updates
for a work that has been modified or installed by the recipient, or for
the User Product in which it has been modified or installed. Access to a
network may be denied when the modification itself materially and
adversely affects the operation of the network or violates the rules and
protocols for communication across the network.
Corresponding Source conveyed, and Installation Information provided,
in accord with this section must be in a format that is publicly
documented (and with an implementation available to the public in
source code form), and must require no special password or key for
unpacking, reading or copying.
7. Additional Terms.
"Additional permissions" are terms that supplement the terms of this
License by making exceptions from one or more of its conditions.
Additional permissions that are applicable to the entire Program shall
be treated as though they were included in this License, to the extent
that they are valid under applicable law. If additional permissions
apply only to part of the Program, that part may be used separately
under those permissions, but the entire Program remains governed by
this License without regard to the additional permissions.
When you convey a copy of a covered work, you may at your option
remove any additional permissions from that copy, or from any part of
it. (Additional permissions may be written to require their own
removal in certain cases when you modify the work.) You may place
additional permissions on material, added by you to a covered work,
for which you have or can give appropriate copyright permission.
Notwithstanding any other provision of this License, for material you
add to a covered work, you may (if authorized by the copyright holders of
that material) supplement the terms of this License with terms:
a) Disclaiming warranty or limiting liability differently from the
terms of sections 15 and 16 of this License; or
b) Requiring preservation of specified reasonable legal notices or
author attributions in that material or in the Appropriate Legal
Notices displayed by works containing it; or
c) Prohibiting misrepresentation of the origin of that material, or
requiring that modified versions of such material be marked in
reasonable ways as different from the original version; or
d) Limiting the use for publicity purposes of names of licensors or
authors of the material; or
e) Declining to grant rights under trademark law for use of some
trade names, trademarks, or service marks; or
f) Requiring indemnification of licensors and authors of that
material by anyone who conveys the material (or modified versions of
it) with contractual assumptions of liability to the recipient, for
any liability that these contractual assumptions directly impose on
those licensors and authors.
All other non-permissive additional terms are considered "further
restrictions" within the meaning of section 10. If the Program as you
received it, or any part of it, contains a notice stating that it is
governed by this License along with a term that is a further
restriction, you may remove that term. If a license document contains
a further restriction but permits relicensing or conveying under this
License, you may add to a covered work material governed by the terms
of that license document, provided that the further restriction does
not survive such relicensing or conveying.
If you add terms to a covered work in accord with this section, you
must place, in the relevant source files, a statement of the
additional terms that apply to those files, or a notice indicating
where to find the applicable terms.
Additional terms, permissive or non-permissive, may be stated in the
form of a separately written license, or stated as exceptions;
the above requirements apply either way.
8. Termination.
You may not propagate or modify a covered work except as expressly
provided under this License. Any attempt otherwise to propagate or
modify it is void, and will automatically terminate your rights under
this License (including any patent licenses granted under the third
paragraph of section 11).
However, if you cease all violation of this License, then your
license from a particular copyright holder is reinstated (a)
provisionally, unless and until the copyright holder explicitly and
finally terminates your license, and (b) permanently, if the copyright
holder fails to notify you of the violation by some reasonable means
prior to 60 days after the cessation.
Moreover, your license from a particular copyright holder is
reinstated permanently if the copyright holder notifies you of the
violation by some reasonable means, this is the first time you have
received notice of violation of this License (for any work) from that
copyright holder, and you cure the violation prior to 30 days after
your receipt of the notice.
Termination of your rights under this section does not terminate the
licenses of parties who have received copies or rights from you under
this License. If your rights have been terminated and not permanently
reinstated, you do not qualify to receive new licenses for the same
material under section 10.
9. Acceptance Not Required for Having Copies.
You are not required to accept this License in order to receive or
run a copy of the Program. Ancillary propagation of a covered work
occurring solely as a consequence of using peer-to-peer transmission
to receive a copy likewise does not require acceptance. However,
nothing other than this License grants you permission to propagate or
modify any covered work. These actions infringe copyright if you do
not accept this License. Therefore, by modifying or propagating a
covered work, you indicate your acceptance of this License to do so.
10. Automatic Licensing of Downstream Recipients.
Each time you convey a covered work, the recipient automatically
receives a license from the original licensors, to run, modify and
propagate that work, subject to this License. You are not responsible
for enforcing compliance by third parties with this License.
An "entity transaction" is a transaction transferring control of an
organization, or substantially all assets of one, or subdividing an
organization, or merging organizations. If propagation of a covered
work results from an entity transaction, each party to that
transaction who receives a copy of the work also receives whatever
licenses to the work the party's predecessor in interest had or could
give under the previous paragraph, plus a right to possession of the
Corresponding Source of the work from the predecessor in interest, if
the predecessor has it or can get it with reasonable efforts.
You may not impose any further restrictions on the exercise of the
rights granted or affirmed under this License. For example, you may
not impose a license fee, royalty, or other charge for exercise of
rights granted under this License, and you may not initiate litigation
(including a cross-claim or counterclaim in a lawsuit) alleging that
any patent claim is infringed by making, using, selling, offering for
sale, or importing the Program or any portion of it.
11. Patents.
A "contributor" is a copyright holder who authorizes use under this
License of the Program or a work on which the Program is based. The
work thus licensed is called the contributor's "contributor version".
A contributor's "essential patent claims" are all patent claims
owned or controlled by the contributor, whether already acquired or
hereafter acquired, that would be infringed by some manner, permitted
by this License, of making, using, or selling its contributor version,
but do not include claims that would be infringed only as a
consequence of further modification of the contributor version. For
purposes of this definition, "control" includes the right to grant
patent sublicenses in a manner consistent with the requirements of
this License.
Each contributor grants you a non-exclusive, worldwide, royalty-free
patent license under the contributor's essential patent claims, to
make, use, sell, offer for sale, import and otherwise run, modify and
propagate the contents of its contributor version.
In the following three paragraphs, a "patent license" is any express
agreement or commitment, however denominated, not to enforce a patent
(such as an express permission to practice a patent or covenant not to
sue for patent infringement). To "grant" such a patent license to a
party means to make such an agreement or commitment not to enforce a
patent against the party.
If you convey a covered work, knowingly relying on a patent license,
and the Corresponding Source of the work is not available for anyone
to copy, free of charge and under the terms of this License, through a
publicly available network server or other readily accessible means,
then you must either (1) cause the Corresponding Source to be so
available, or (2) arrange to deprive yourself of the benefit of the
patent license for this particular work, or (3) arrange, in a manner
consistent with the requirements of this License, to extend the patent
license to downstream recipients. "Knowingly relying" means you have
actual knowledge that, but for the patent license, your conveying the
covered work in a country, or your recipient's use of the covered work
in a country, would infringe one or more identifiable patents in that
country that you have reason to believe are valid.
If, pursuant to or in connection with a single transaction or
arrangement, you convey, or propagate by procuring conveyance of, a
covered work, and grant a patent license to some of the parties
receiving the covered work authorizing them to use, propagate, modify
or convey a specific copy of the covered work, then the patent license
you grant is automatically extended to all recipients of the covered
work and works based on it.
A patent license is "discriminatory" if it does not include within
the scope of its coverage, prohibits the exercise of, or is
conditioned on the non-exercise of one or more of the rights that are
specifically granted under this License. You may not convey a covered
work if you are a party to an arrangement with a third party that is
in the business of distributing software, under which you make payment
to the third party based on the extent of your activity of conveying
the work, and under which the third party grants, to any of the
parties who would receive the covered work from you, a discriminatory
patent license (a) in connection with copies of the covered work
conveyed by you (or copies made from those copies), or (b) primarily
for and in connection with specific products or compilations that
contain the covered work, unless you entered into that arrangement,
or that patent license was granted, prior to 28 March 2007.
Nothing in this License shall be construed as excluding or limiting
any implied license or other defenses to infringement that may
otherwise be available to you under applicable patent law.
12. No Surrender of Others' Freedom.
If conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot convey a
covered work so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you may
not convey it at all. For example, if you agree to terms that obligate you
to collect a royalty for further conveying from those to whom you convey
the Program, the only way you could satisfy both those terms and this
License would be to refrain entirely from conveying the Program.
13. Use with the GNU Affero General Public License.
Notwithstanding any other provision of this License, you have
permission to link or combine any covered work with a work licensed
under version 3 of the GNU Affero General Public License into a single
combined work, and to convey the resulting work. The terms of this
License will continue to apply to the part which is the covered work,
but the special requirements of the GNU Affero General Public License,
section 13, concerning interaction through a network will apply to the
combination as such.
14. Revised Versions of this License.
The Free Software Foundation may publish revised and/or new versions of
the GNU General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the
Program specifies that a certain numbered version of the GNU General
Public License "or any later version" applies to it, you have the
option of following the terms and conditions either of that numbered
version or of any later version published by the Free Software
Foundation. If the Program does not specify a version number of the
GNU General Public License, you may choose any version ever published
by the Free Software Foundation.
If the Program specifies that a proxy can decide which future
versions of the GNU General Public License can be used, that proxy's
public statement of acceptance of a version permanently authorizes you
to choose that version for the Program.
Later license versions may give you additional or different
permissions. However, no additional obligations are imposed on any
author or copyright holder as a result of your choosing to follow a
later version.
15. Disclaimer of Warranty.
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. Limitation of Liability.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
SUCH DAMAGES.
17. Interpretation of Sections 15 and 16.
If the disclaimer of warranty and limitation of liability provided
above cannot be given local legal effect according to their terms,
reviewing courts shall apply local law that most closely approximates
an absolute waiver of all civil liability in connection with the
Program, unless a warranty or assumption of liability accompanies a
copy of the Program in return for a fee.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
Also add information on how to contact you by electronic and paper mail.
If the program does terminal interaction, make it output a short
notice like this when it starts in an interactive mode:
<program> Copyright (C) <year> <name of author>
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, your program's commands
might be different; for a GUI interface, you would use an "about box".
You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU GPL, see
<http://www.gnu.org/licenses/>.
The GNU General Public License does not permit incorporating your program
into proprietary programs. If your program is a subroutine library, you
may consider it more useful to permit linking proprietary applications with
the library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License. But first, please read
<http://www.gnu.org/philosophy/why-not-lgpl.html>.

View File

@@ -1,8 +0,0 @@
TOOLS = ../Tools
MOREDIFF := $(shell $(TOOLS)/unix/casefn.sh *.img *.rom *.com *.eeprom)
SUBDIRS = Apps CPM22 CPM3 QPM ZSDOS ZPM3 CPNET
include $(TOOLS)/Makefile.inc
clean::
@rm -f *.bin *.com *.img *.rom *.upd *.hex *.pdf *.log *.eeprom *.dat

View File

@@ -1,4 +0,0 @@
@echo off
setlocal
if exist *.sys del *.sys

View File

@@ -1,7 +0,0 @@
TOOLS = ../../Tools
MOREDIFF := $(shell $(TOOLS)/unix/casefn.sh *.spr)
include $(TOOLS)/Makefile.inc
clean::
@rm -f *.sys *.bin

View File

@@ -1,21 +0,0 @@
***********************************************************************
*** ***
*** R o m W B W ***
*** ***
*** Z80/Z180 System Software ***
*** ***
***********************************************************************
This directory contains the QPM 2.7 system files for the RomWBW QPM 2.7
adaptation. All of these files are already included on the QPM
boot disk images. However if you are creating a QPM boot disk
manually, you should copy all of these files to the boot disk.
Note: Two file have been provided one for RomWBW HBIOS, and one for UNA
BIOS. One of these files must be installed on the system boot track.
Refer to the QPM Documentation for installing QPM
These files should also be copied to any QPM boot disks on your
system when you upgrade your ROM firmware. Some of these files
*must* match the version of the RomWBW firmware you are using for
proper operation of your system.

View File

@@ -1,194 +0,0 @@
***********************************************************************
*** ***
*** R o m W B W ***
*** ***
*** Z80/Z180 System Software ***
*** ***
***********************************************************************
This directory ("Binary") is part of the RomWBW System Software
distribution archive. It contains the completed binary outputs of
the build process. As described below, these files are used to
assemble a working RetroBrew Computers system.
The files in this directory are created by the build process that is
documented in the ReadMe.txt file in the Source directory. When
released the directory is populated with the default output files.
However, the output of custom builds will be placed in this directory
as well.
If you only see a few files in this directory, then you downloaded
just the source from GitHub. To retrieve the full release download
package, go to https://github.com/wwarthen/RomWBW. On this page,
look for the text "XX releases" where XX is a number. Click on this
text to go to the releases page. On this page, you will see the
latest releases listed. For each release, you will see a package
file called something like "RomWBW-2.9.0-Package.zip". Click on the
package file for the release you want to download.
ROM Firmware Images (<plt>_<cfg>.rom)
-------------------------------------
The files with a ".rom" extension are binary images ready to program
into an appropriate PROM. These files are named with the format
<plt>_<cfg>.rom. <plt> refers to the primary platform such as Zeta,
N8, Mark IV, etc. <cfg> refers to the specific configuration. In
general, there will be a standard configuration ("std") for each
platform. So, for example, the file called MK4_std.rom is a ROM
image for the Mark IV with the standard configuration. If a custom
configuration called "custom" is created and built, a new file called
MK4_custom.rom will be added to this directory.
Documentation of the pre-built ROM Images is contained in
"RomWBW User Guide.pdf" in the Doc directory.
ROM Firmware Update Images (<plt>_<cfg>.upd)
-------------------------------------
The files with a ".upd" extension are binary images identical to the
.rom files, but they only have the first 128K bytes. The first 128K
is the system image without the ROM disk contents. These files can be
used to update the system image without modifying the ROM disk
contents. Refer to the RomWBW User Guide for more information.
ROM Executable Images (<plt>_<cfg>.com)
---------------------------------------
When a ROM image (".rom") is created, an executable version of the
ROM is also created. These files have the same naming convention as
the ROM Image files, but have the extension ".com". These files can
be copied to a working system and run like a normal CP/M application.
When run on the target system, they install in RAM just like they had
been loaded from ROM. This allows a new ROM build to be tested
without reprogramming the actual ROM.
WARNING: In a few cases the .com file is too big to load. If you get
a message like "Full" or "BAD LOAD" when trying to load one of the
.com files, it is too big. In these cases, you will not be able to
test the ROM prior to programming it.
VDU ROM Image (vdu.rom)
-----------------------
The VDU video board requires a dedicated onboard ROM containing the
font data. The "vdu.rom" file contains the binary data to program
onto that chip.
Disk Images (fd_*.img, hd_*.img)
--------------------------------
RomWBW includes a mechanism for generating floppy disk and hard disk
binary images that are ready to copy directly to a floppy, hard disk,
CF Card, or SD Card which will then be ready for use in any
RomWBW-based system.
Essentially, these files contain prepared floppy and hard disk images
with a large set of programs and related files. By copying the
contents of these files to appropriate media as described below, you
can quickly create ready-to-use media. Win32DiskImager or
RawWriteWin can be used to copy images directly to media. These
programs are included in the RomWBW Tools directory.
The fd_*.img files are floppy disk images. They are sized for 1.44MB
floppy media and can be copied to actual floppy disks using
RawWriteWin (as long as you have access to a floppy drive on your
Windows computer). The resulting floppy disks will be usable on any
RomWBW-based system with floppy drive(s).
Likewise, the hd512_*.img and hd1k_*.img files are hard disk images.
Each file is intended to be copied to the start of any type of hard
disk media (typically a CF Card or SD Card). The resulting media will
be usable on any RomWBW-based system that accepts the corresponding
media type.
NOTE: The hd512_*.img files are equivalent to the hd_*.img
files in previous distributions. The hd1k_*.img files
contained a revised file system format that increases the
maximum number of CP/M directory entries from 512 to 1024.
Refer to the ReadMe.txt in the Source/Images directory
for details.
Documentation of the pre-built disk images is contained in the
"RomWBW User Guide" found in the Doc directory. The contents of
the disk images is contained in the "RomWBW Disk Catalog", but it
is significantly out-of-date.
The contents of the floppy/hard disk images are created by
the BuildImages.cmd script in the Source directory. Additional
information on how to generate custom disk images is found in the
Source\Images ReadMe.txt file.
Disk Images (hd512_combo.img, hd1k_combo.img, *_std_hd1k_combo.img)
-------------------------------------------------------------------
The hd512_combo.img and hd1k_combo.img file are the primary combo
disk image files suitable for most platforms.
The *_std_hd1k_combo.img files are platform specific combo files
typically used in romless platforms, they also contain RomWBW binary code
that is loaded at boot time into RAM
Disk Images (hd1k_prefix.dat, *_std_hd1k_prefix.dat)
----------------------------------------------------
The hd1k_prefix.dat file is part of the combo disk images and is
applied to hd1k image files as a prefix, it contains the standard
partion table.
The *_std_hd1k_prefix.dat files are platform specific prefixes
typically used in romless platforms, they also contain RomWBW binary code
that is loaded at boot time into RAM
Disk Images (psys.img)
----------------------
The psys.img file contains a full implementation of the UCSD p-System
for the Z80 running under RomWBW. This image file must be placed on
disk media by itself (not appended or concatenated with hd*.img files.
Refer to the Source/pSys/ReadMe.txt file for more information on the
p-System implementation.
Propeller ROM Images (*.eeprom)
-------------------------------
The files with and extension of ".eeprom" contain the binary images
to be programmed into the Propeller-based boards. The list below
indicates which file targets each of the Propeller board variants:
ParPortProp ParPortProp.eeprom
PropIO V1 PropIO.eeprom
PropIO V2 PropIO2.eeprom
Refer to the board documentation of the boards for more information
on how to program the EEPROMs on these boards.
SUB DIRECTORIES
===============
Apps Directory
--------------
The Apps subdirectory contains the executable application files that
are specific to RomWBW. The source for these applications is found
in the Source\Apps directory of the distribution.
CPNET Directory
---------------
This directory contains the CP/NET client packages. Please refer to
the RomWBW User Guide for instructions on installing these packages,
or see the Readme.txt file in this sub-directory
CPM22 CPM3 ZSDOS ZPM3 QPM Directories
-------------------------------------
These directories contains the system files for the RomWBW adaptations
for each operating system. All of these files are already included on
the boot disk images. However if you are creating a o/s boot disk
manually, you will need copy all of these files to the boot disk.
These files should also be copied to any boot disks on your
system when you upgrade your ROM firmware. Some of these files
*must* match the version of the RomWBW firmware you are using for
proper operation of your system.

View File

@@ -1,10 +0,0 @@
@echo off
setlocal
if exist *.spr del *.spr
if exist *.com del *.com
if exist *.sys del *.sys
if exist *.pat del *.pat
if exist *.dat del *.dat
if exist *.zpm del *.zpm
if exist *.spr del *.spr

View File

@@ -1,7 +0,0 @@
TOOLS = ../../Tools
MOREDIFF := $(shell $(TOOLS)/unix/casefn.sh *.spr)
include $(TOOLS)/Makefile.inc
clean::
@rm -f *.spr *.com *.sys *.dat *.zpm

View File

@@ -1,17 +0,0 @@
***********************************************************************
*** ***
*** R o m W B W ***
*** ***
*** Z80/Z180 System Software ***
*** ***
***********************************************************************
This directory contains the ZPM3 system files for the RomWBW ZPM3
adaptation. All of these files are already included on the ZPM3
boot disk images. However if you are creating a CP/M 3 boot disk
manually, you should copy all of these files to the boot disk.
These files should also be copied to any ZPM3 boot disks on your
system when you upgrade your ROM firmware. Some of these files
*must* match the version of the RomWBW firmware you are using for
proper operation of your system.

View File

@@ -1,4 +0,0 @@
@echo off
setlocal
if exist *.sys del *.sys

View File

@@ -1,7 +0,0 @@
TOOLS = ../../Tools
MOREDIFF := $(shell $(TOOLS)/unix/casefn.sh *.spr)
include $(TOOLS)/Makefile.inc
clean::
@rm -f *.sys

View File

@@ -1,23 +0,0 @@
***********************************************************************
*** ***
*** R o m W B W ***
*** ***
*** Z80/Z180 System Software ***
*** ***
***********************************************************************
This directory contains the ZSDOS system files for the RomWBW ZSDOS
adaptation. All of these files are already included on the ZSDOS
boot disk images. However if you are creating a ZSDOS boot disk
manually, you should copy all of these files to the boot disk.
Note: Two file have been provided one for RomWBW HBIOS, and one for UNA
BIOS. One of these files must be installed on the system boot track.
This is usually achieved by the SYSCOPY utility e.g.
SYSCOPY a:=zsys_wbw.sys
These files should also be copied to any ZSDOS boot disks on your
system when you upgrade your ROM firmware. Some of these files
*must* match the version of the RomWBW firmware you are using for
proper operation of your system.

View File

@@ -1,6 +1,4 @@
@echo off
setlocal
pushd Source && call Build %* || exit /b & popd
if "%*" == "" pause
cd Source
PowerShell .\Build.ps1 %*

7
BuildApps.cmd Normal file
View File

@@ -0,0 +1,7 @@
@echo off
setlocal
echo Building Apps...
cd Apps
call Build.cmd

7
BuildCPM22.cmd Normal file
View File

@@ -0,0 +1,7 @@
@echo off
setlocal
echo Building CP/M 2.2...
cd CPM22
call Build.cmd

7
BuildCommon.cmd Normal file
View File

@@ -0,0 +1,7 @@
@echo off
setlocal
call BuildCPM22
call BuildZCPR
call BuildZCPR-DJ
call BuildApps.cmd

4
BuildUNA.cmd Normal file
View File

@@ -0,0 +1,4 @@
@echo off
setlocal
cd Source
PowerShell .\BuildUNA.ps1 %*

4
BuildUNALOAD.cmd Normal file
View File

@@ -0,0 +1,4 @@
@echo off
setlocal
cd Source
PowerShell .\BuildUNALOAD.ps1 %*

7
BuildZCPR-DJ.cmd Normal file
View File

@@ -0,0 +1,7 @@
@echo off
setlocal
echo Building ZCPR-DJ...
cd ZCPR-DJ
call Build.cmd

7
BuildZCPR.cmd Normal file
View File

@@ -0,0 +1,7 @@
@echo off
setlocal
echo Building ZCPR...
cd ZCPR
call Build.cmd

View File

@@ -1,128 +0,0 @@
# Contributor Covenant Code of Conduct
## Our Pledge
We as members, contributors, and leaders pledge to make participation in our
community a harassment-free experience for everyone, regardless of age, body
size, visible or invisible disability, ethnicity, sex characteristics, gender
identity and expression, level of experience, education, socio-economic status,
nationality, personal appearance, race, religion, or sexual identity
and orientation.
We pledge to act and interact in ways that contribute to an open, welcoming,
diverse, inclusive, and healthy community.
## Our Standards
Examples of behavior that contributes to a positive environment for our
community include:
* Demonstrating empathy and kindness toward other people
* Being respectful of differing opinions, viewpoints, and experiences
* Giving and gracefully accepting constructive feedback
* Accepting responsibility and apologizing to those affected by our mistakes,
and learning from the experience
* Focusing on what is best not just for us as individuals, but for the
overall community
Examples of unacceptable behavior include:
* The use of sexualized language or imagery, and sexual attention or
advances of any kind
* Trolling, insulting or derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or email
address, without their explicit permission
* Other conduct which could reasonably be considered inappropriate in a
professional setting
## Enforcement Responsibilities
Community leaders are responsible for clarifying and enforcing our standards of
acceptable behavior and will take appropriate and fair corrective action in
response to any behavior that they deem inappropriate, threatening, offensive,
or harmful.
Community leaders have the right and responsibility to remove, edit, or reject
comments, commits, code, wiki edits, issues, and other contributions that are
not aligned to this Code of Conduct, and will communicate reasons for moderation
decisions when appropriate.
## Scope
This Code of Conduct applies within all community spaces, and also applies when
an individual is officially representing the community in public spaces.
Examples of representing our community include using an official e-mail address,
posting via an official social media account, or acting as an appointed
representative at an online or offline event.
## Enforcement
Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported to the community leaders responsible for enforcement at
wwarthen@gmail.com.
All complaints will be reviewed and investigated promptly and fairly.
All community leaders are obligated to respect the privacy and security of the
reporter of any incident.
## Enforcement Guidelines
Community leaders will follow these Community Impact Guidelines in determining
the consequences for any action they deem in violation of this Code of Conduct:
### 1. Correction
**Community Impact**: Use of inappropriate language or other behavior deemed
unprofessional or unwelcome in the community.
**Consequence**: A private, written warning from community leaders, providing
clarity around the nature of the violation and an explanation of why the
behavior was inappropriate. A public apology may be requested.
### 2. Warning
**Community Impact**: A violation through a single incident or series
of actions.
**Consequence**: A warning with consequences for continued behavior. No
interaction with the people involved, including unsolicited interaction with
those enforcing the Code of Conduct, for a specified period of time. This
includes avoiding interactions in community spaces as well as external channels
like social media. Violating these terms may lead to a temporary or
permanent ban.
### 3. Temporary Ban
**Community Impact**: A serious violation of community standards, including
sustained inappropriate behavior.
**Consequence**: A temporary ban from any sort of interaction or public
communication with the community for a specified period of time. No public or
private interaction with the people involved, including unsolicited interaction
with those enforcing the Code of Conduct, is allowed during this period.
Violating these terms may lead to a permanent ban.
### 4. Permanent Ban
**Community Impact**: Demonstrating a pattern of violation of community
standards, including sustained inappropriate behavior, harassment of an
individual, or aggression toward or disparagement of classes of individuals.
**Consequence**: A permanent ban from any sort of public interaction within
the community.
## Attribution
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
version 2.0, available at
https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
Community Impact Guidelines were inspired by [Mozilla's code of conduct
enforcement ladder](https://github.com/mozilla/diversity).
[homepage]: https://www.contributor-covenant.org
For answers to common questions about this code of conduct, see the FAQ at
https://www.contributor-covenant.org/faq. Translations are available at
https://www.contributor-covenant.org/translations.

View File

@@ -1,90 +0,0 @@
# Contributing to RomWBW
> **WARNING**: The `dev` branch of RomWBW has been deprecated as of
v3.4. All Pull Requests should now target the `master` branch.
Contributions of all kinds to RomWBW are welcomed and greatly
appreciated.
- Reporting bug(s) and suggesting new feature(s)
- Discussing the current state of the code
- Submitting fixes and enhancements
## RomWBW GitHub Repository
The [RomWBW GitHub Repository](https://github.com/wwarthen/RomWBW) is
the primary location for developing, supporting, and distributing
RomWBW. Although input is gladly accepted from almost any channel, the
GitHub Repository is preferred.
- Use **Issues** to report bugs, request enhancements, or ask usage
questions.
- Use **Discussions** to interact with others
- Use **Pull Requests** to submit content (code, documentation, etc.)
## Submitting Content
This RomWBW Project uses the standard
[GitHub Flow](https://docs.github.com/en/get-started/quickstart/github-flow).
Submission of content changes (including code) are ideally done via Pull
Requests.
- Submitters are advised to contact [Wayne Warthen](mailto:wwarthen@
gmail.com) or start a GitHub Discussion prior to starting any
significant work. This is simply to ensure that submissions are
consistent with the overall goals and intentions of RomWBW.
- All submissions should be based on the `master` branch. To create
your submission, fork the RomWBW repository and create your branch from
`master`. Make (and test) your changes in your personal fork.
- Please update relevant documentation and the `ChangeLog` found in the
`Doc` folder.
- You are encouraged to comment your submissions to ensure your work is
properly attributed.
- When ready, submit a Pull Request to merge your forked branch into the
RomWBW master branch.
## Coding Style
Due to the nature of the project, you will find a variety of coding
styles. When making changes to existing code, please try to be
consistent with the existing coding style. You may not like the current
style, but no one likes mixed styles in one file/module.
Be careful with white space. RomWBW is primarily assembly langauge
code. The use of tab stops at every 8 characters is pretty standard for
assembler. If you use something else, then your code will look odd
when viewed by others.
In most cases, the use of `<cr><lf>` line endings is preferred. This is
standard for the operating systems of the era that RomWBW provides.
Also note that CP/M text files should end with a ctrl-Z (0x1A). This is
not magically added by the tools that generate the disk images.
## Hints for Developers
- The majority of RomWBW is assembled with TASM (and it's compatible
equivalent sz80as). These tools have quirks that are very subtle. For
example, TASM does not evaluate expressions in the standard way. It
uses a left to right approach. Check the TASM documentation carefully.
- The following two Z80 instructions highlight a common issue with the
Z80 assembler syntax. Parens in operands frequently indicate an
indirect reference. To treat the operand as an expression, use the
second format.
```
LD A,(5+5) ; Load A with the value at address 10
LD A,0+(5+5) ; Load A with the value 10
```
- The RomWBW documewntation in the Doc directory is generated with a
process outside of the normal build process. To update documentation,
please update the .md files in Source/Doc. Those are the Markdown
source files for the documentation. The PDF files will be updated
offline from those.
## License
RomWBW is licensed under GPLv3. When you submit code changes, your
submissions are understood to be under the same [GPLv3 License]
(https://www.gnu.org/licenses/gpl-3.0.html) that covers the project.

View File

@@ -2300,11 +2300,9 @@ diskwr11:
;
diskwr2: ;a has vrecord, c=2 if new block or
; new record #
; WW: DRI Patch 01 Start
nop ; dcr c
nop ; dcr c
lxi h,0 ; jnz noupdate
; WW: DRI Patch 01 End
dcr c
dcr c
jnz noupdate
push psw ;save vrecord value
call getmodnum ;hl=.fcb(modnum),a=fcb(modnum)
;reset the file write flag to mark

72
CPM22/Build.cmd Normal file
View File

@@ -0,0 +1,72 @@
@echo off
setlocal
set PATH=..\Tools\tasm32;..\Tools\zx;%PATH%
set TASMTABS=..\Tools\tasm32
set ZXBINDIR=../tools/cpm/bin/
set ZXLIBDIR=../tools/cpm/lib/
set ZXINCDIR=../tools/cpm/include/
call :asm ccpb03 || goto :eof
call :asm bdosb01 || goto :eof
zx MAC -CCP.ASM -$PO
zx MLOAD25 -CCP.BIN=CCP.HEX
zx MAC -BDOS.ASM -$PO
zx MLOAD25 -BDOS.BIN=BDOS.HEX
zx MAC -CCP22.ASM -$PO
zx MLOAD25 -CCP22.BIN=CCP22.HEX
zx MAC -BDOS22.ASM -$PO
zx MLOAD25 -BDOS22.BIN=BDOS22.HEX
zx MAC -OS2CCP.ASM -$PO
zx MLOAD25 -OS2CCP.BIN=OS2CCP.HEX
zx MAC -OS3BDOS.ASM -$PO
zx MLOAD25 -OS3BDOS.BIN=OS3BDOS.HEX
goto :eof
:asm
echo.
echo Building %1...
tasm -t80 -b -g3 -fFF %1.asm %1.bin %1.lst
goto :eof
@echo off
setlocal
set PATH=..\Tools\tasm32;..\Tools\zx;%PATH%
set TASMTABS=..\Tools\tasm32
set ZXBINDIR=../tools/cpm/bin/
set ZXLIBDIR=../tools/cpm/lib/
set ZXINCDIR=../tools/cpm/include/
call :asm SysCopy || goto :eof
call :asm Assign || goto :eof
call :asm Format || goto :eof
call :asm Talk || goto :eof
zx Z80ASM -SYSGEN/F
goto :eof
:asm
echo.
echo Building %1...
tasm -t80 -b -g3 -fFF %1.asm %1.com %1.lst
goto :eof

5
CPM22/Clean.cmd Normal file
View File

@@ -0,0 +1,5 @@
@echo off
if exist *.bin del *.bin
if exist *.lst del *.lst
if exist *.prn del *.prn
if exist *.hex del *.hex

View File

@@ -1700,10 +1700,8 @@ diskwrite: ;(may enter here from seqdiskwrite above)
mvi c,2 ;mark as record count incremented
diskwr2:
;A has vrecord, C=2 if new block or new record#
; WW: DRI BDOS Patch start
;dcr c! ;dcr c! ;jnz noupdate
nop! nop! lxi h,0
; WW: DRI BDOS Patch end
nop! nop! lxi h,0 ; WW: DRI BDOS Patch
push psw ;save vrecord value
call getmodnum ;HL=.fcb(modnum), A=fcb(modnum)
;reset the file write flag to mark as written fcb

View File

@@ -803,7 +803,7 @@ RESETDR:LD A,(CHGDRV) ; DRIVE CHANGE INDICATED?
;**************************************************************
;
.IF MON
MONITOR:RST 38H
MONITOR:RST 38
.ENDIF
;

View File

@@ -1,5 +1,37 @@
@echo off
setlocal
pushd Binary && call Clean || exit /b 1 & popd
pushd Source && call Clean || exit /b 1 & popd
echo Cleaning Source...
pushd Source
call Clean.cmd
popd
echo Cleaning Apps...
pushd Apps
call Clean.cmd
popd
echo Cleaning CPM22...
pushd CPM22
call Clean.cmd
popd
echo Cleaning ZCPR...
pushd ZCPR
call Clean.cmd
popd
echo Cleaning ZCPR-DJ...
pushd ZCPR-DJ
call Clean.cmd
popd
if exist *.img del *.img /Q
if exist debug.log del debug.log
choice /m "Clean Output directories?"
if errorlevel 2 goto :eof
echo Cleaning Output directories...
if exist Output\*.* del Output\*.* /Q
if exist OutputUNA\*.* del OutputUNA\*.* /Q
if exist OutputUNALOAD\*.* del OutputUNALOAD\*.* /Q

348
Doc/Build.txt Normal file
View File

@@ -0,0 +1,348 @@
Building a Custom ROM
---------------------
At present, the build environment assumes you are running
a current version of Microsoft Windows (either 32-bit or
64-bit).
If you are using Linux, David Giles has contributed a Linux
makefile that should work for you. Please read the
LinuxBuild.txt file for more information.
All required tools are included in the distribution. You
should not need anything other than what comes as part of
Windows or as part of the distribution.
In summary, the process involves the 4 steps below:
1) Create/update configuration file
2) Update/Add/Delete any files you want incorporated in
the ROM Disk
3) Run the build script (or makefile if you prefer) and
confirm there are no errors.
4) Burn the resultant ROM image and try it.
The process is really very simple. In fact, you can
essentially skip steps 1 & 2 if you want to try simply
building one of the existing configurations.
Each of the 4 steps above is described in more detail
below.
1. Create/Update Configuration File
-----------------------------------
The settings for a build are primarily controled by
a configuration file that is included in the build
process. In order to customize your settings, you
need to modify an existing configuration file or
create your own.
If you look in the Source directory, you will see
a series of files named config_xxxx_yyyy.asm. Each of
them corresponds to one of the standard configurations
listed in the ROMList.txt file.
You have two choices. You can simply modify the existing
configuration file that is closest to your situation, or
you can copy it to a new config_xxxx_yyyy.asm file and modify
that. I recommend that you copy one to your own name so
that you will always have the unmodified standard configuration
files left in place. So, for example, you could just
copy config_ZETA_std.asm to config_ZETA_wayne.asm. You MUST
name your config file as config_xxxx_yyyy.asm. The xxxx's
must match your platform (N8VEM, ZETA, N8, S2I, or S100).
The yyyy's can be whatever you want.
The config files are simply text files with various
settings. Open your target config file with your
favorite text editor and modify the settings as desired.
Unfortunately, I have not yet documented each of the
settings in detail; that will be a separate document
provided in the future. However, there are comments
in the config file that will probably be sufficient
for the most part.
2. Update/Add/Delete ROM Disk Files
-----------------------------------
The files that are included on the ROM Disk of your
ROM are copied from a set of directories during the
build process. This allows you to have complete
flexibility over the files you want included in your
ROM.
If you look at the RomDsk directory, you will see
a variety of subdirectories. These subdirectories
contain the files that will be included in the
ROM disk. The build process will determine
which subdirectories to include files from based
on the following rules:
First, all files from either std_512 or std_1024 will
be incuded depending on on the size of the ROM you
are building. If you are building a 512KB ROM, then
all the files from std_512KB will be included. If you
are building a 1MB ROM, then all the files from std_1024KB
will be included. Essentialy, the files in std_1204KB are
a superset of the ones in std_512KB because there is more
space available for the ROM drive.
Second, all files from the directory that corresponds to
your configuration file will be included. If you build
the "ZETA_std" configuration, all files in cfg_ZETA_std will
be added. Note that these files will be in addition
to the files from the std_XXXKB directory.
If you created your own config file (like config_ZETA_wayne.asm
described above), you MUST create a subdirectory within
the RomDsk directory and populate it with the files
you want added. Normally, you would include the
files from the original standard config. So, if
you created config_ZETA_wayne.asm from config_ZETA_std.asm,
then you would create a subdirectory in RomDsk called
cfg_ZETA_wayne and copy all the files from cfg_ZETA_std to
cfg_ZETA_wayne.
3. Run the Build Process
------------------------
NOTE: The process described here is the more commonly
used build script. If you wish to use a makefile
instead, refer to the comments in the makefile in
the Source directory as an alternative to the
process described here.
The build involves running commands at the command
prompt. From a Command Prompt window, you will need
to change to the high level directory for the build.
Normally, you would be changing to the RomWBW directory
unless you renamed it.
First, you will need to build the components that are
common to all configurations. These components do not
require any configuration. To build these, use the
following commands and ensure that they complete
without error:
BuildZCPR-DJ
BuildApps2
To run the main build and be prompted for required information,
just enter "Build". You will be prompted for the information
described below and the build should run. If an error is
encountered, the build should stop and display an error
in red text.
If you immediately receive the error "the execution of
scripts is disabled on this system", then you will need to
change the PowerShell Execution-Polcy to "RemoteSigned".
To do this, you need to right-click on FixPowerShell.cmd and
choose "Run as Administrator" to make the change. If is
critical that you right-click and use "Run as Administrator"
or the change will not work (you will get an error
indicating "Access to the registry denied" if you fail to
use "Run as Administrator".
The build script will prompt you for the following information
which you will need to provide (don't worry, it is simple):
Platform:
Respond with the name of the platform that you are targeting.
It must be one of N8VEM, ZETA, N8, S2I, or S100.
Configuration:
Respond with the name of the configuration you wish to build.
A list of all available configurations is displayed for your
convenience. For example, if you are building the provided
ZETA_std configuration, just enter "std". If you have created a
custom configuration as described above, you would enter
"wayne".
ROM Size [512|1024]:
Respond with either "512" for a 512KB ROM build or "1024" for a
1MB ROM build. Only the two choices are possible at this time.
It is important that you choose a ROM size that is no larger than
the szie of the ROM you will ultimately be burning. This is
dependant on your hardware.
System [CPM|ZSYS]:
Respond with the type of system you wish to create. If you are
not sure which you want, you should enter "CPM". Refer to the
ReadMe.txt file for more information on the difference between
the two system types.
At this point, the build should run and you will see output related
to the assembler runs and some utility invocations. Just review
the output for any obvioius errors. Normally, all errors will
cause the build to stop immediately and display an error message
in red.
You will see some lines in the output indicating the amount of
space variouis components have taken. You should check these
to make sure you do not see any negative numbers which would
indicate that you have included too many features/drivers for
the available memory space. Here are examples of the lines
showing the space used:
DATA space remaining: 39 bytes.
BOOT LOADER space remaining: 3503 bytes.
CBIOS space remaining: 161 bytes.
DBGMON space remaining: 860 bytes.
ROMX space remaining: 8191 bytes.
BOOT LOADER space remaining: 3503 bytes.
4. Deploy the ROM
-----------------
If you look in the Output directory. You should find the following files:
<config>.rom - binary ROM image to burn to EEPROM
<config>.sys - system image that can be written to the start of a
disk to enable boot from disk functionality
<config>.com - executable version of the system image that can be
copied via xmodem to a running system to test
the build.
The actual ROM image is the file ending in .rom. It should be exactly
512KB or 1MB depending on the ROM size you chose. Simply burn the .rom
image to your ROM and install it in your hardware.
Specifying Build Options on Command Line
----------------------------------------
If you don't want to be prompted for the options to the "Build"
command, you can specify the options right on the command line.
For example:
Build ZETA std 512 CPM
In this case, you will not be prompted. This is useful if you
wish to automate your build process.
Example Build Run
-----------------
C:\Users\WWarthen\Projects\N8VEM\Build\RomWBW>Build.cmd
Platform [N8VEM|ZETA|N8|S2I|S100]: ZETA
Configurations available:
> ppp
> std
Configuration: std
ROM Size [512|1024]: 512
System [CPM|ZSYS]: CPM
Building ZETA_std: 512KB ROM configuration std for Z80...
tasm -t80 -g3 ccpb03.asm cp.bin
TASM Z80 Assembler. Version 3.2 September, 2001.
Copyright (C) 2001 Squak Valley Software
tasm: pass 1 complete.
tasm: pass 2 complete.
tasm: Number of errors = 0
tasm -t80 -g3 bdosb01.asm dos.bin
TASM Z80 Assembler. Version 3.2 September, 2001.
Copyright (C) 2001 Squak Valley Software
tasm: pass 1 complete.
tasm: pass 2 complete.
tasm: Number of errors = 0
tasm -t80 -g3 syscfg.asm syscfg.bin
TASM Z80 Assembler. Version 3.2 September, 2001.
Copyright (C) 2001 Squak Valley Software
tasm: pass 1 complete.
Configuration: ZETA Z80 SBC, FLOPPY (AUTOSIZE), PPIDE (STD)
tasm: pass 2 complete.
tasm: Number of errors = 0
tasm -t80 -g3 -dBLD_SYS=SYS_CPM cbios.asm cbios.bin
TASM Z80 Assembler. Version 3.2 September, 2001.
Copyright (C) 2001 Squak Valley Software
tasm: pass 1 complete.
Configuration: ZETA Z80 SBC, FLOPPY (AUTOSIZE), PPIDE (STD)
INFOLIST occupies 18 bytes.
UTIL occupies 484 bytes.
FD_DATA occupies 340 bytes.
PPIDE_DATA occupies 1116 bytes.
CBIOS space remaining: 2092 bytes.
tasm: pass 2 complete.
tasm: Number of errors = 0
tasm -t80 -g3 dbgmon.asm dbgmon.bin
TASM Z80 Assembler. Version 3.2 September, 2001.
Copyright (C) 2001 Squak Valley Software
tasm: pass 1 complete.
Configuration: ZETA Z80 SBC, FLOPPY (AUTOSIZE), PPIDE (STD)
DBGMON space remaining: 795 bytes.
tasm: pass 2 complete.
tasm: Number of errors = 0
tasm -t80 -g3 prefix.asm prefix.bin
TASM Z80 Assembler. Version 3.2 September, 2001.
Copyright (C) 2001 Squak Valley Software
tasm: pass 1 complete.
Configuration: ZETA Z80 SBC, FLOPPY (AUTOSIZE), PPIDE (STD)
tasm: pass 2 complete.
tasm: Number of errors = 0
tasm -t80 -g3 bootrom.asm bootrom.bin
TASM Z80 Assembler. Version 3.2 September, 2001.
Copyright (C) 2001 Squak Valley Software
tasm: pass 1 complete.
Configuration: ZETA Z80 SBC, FLOPPY (AUTOSIZE), PPIDE (STD)
tasm: pass 2 complete.
tasm: Number of errors = 0
tasm -t80 -g3 bootapp.asm bootapp.bin
TASM Z80 Assembler. Version 3.2 September, 2001.
Copyright (C) 2001 Squak Valley Software
tasm: pass 1 complete.
Configuration: ZETA Z80 SBC, FLOPPY (AUTOSIZE), PPIDE (STD)
tasm: pass 2 complete.
tasm: Number of errors = 0
tasm -t80 -g3 loader.asm loader.bin
TASM Z80 Assembler. Version 3.2 September, 2001.
Copyright (C) 2001 Squak Valley Software
tasm: pass 1 complete.
Configuration: ZETA Z80 SBC, FLOPPY (AUTOSIZE), PPIDE (STD)
LOADER space remaining: 1205 bytes.
tasm: pass 2 complete.
tasm: Number of errors = 0
tasm -t80 -g3 pgzero.asm pgzero.bin
TASM Z80 Assembler. Version 3.2 September, 2001.
Copyright (C) 2001 Squak Valley Software
tasm: pass 1 complete.
tasm: pass 2 complete.
tasm: Number of errors = 0
tasm -t80 -g3 hbios.asm hbios.bin
TASM Z80 Assembler. Version 3.2 September, 2001.
Copyright (C) 2001 Squak Valley Software
tasm: pass 1 complete.
Configuration: ZETA Z80 SBC, FLOPPY (AUTOSIZE), PPIDE (STD)
UART occupies 146 bytes.
FD occupies 2071 bytes.
PPIDE occupies 809 bytes.
HBIOS space remaining: 24428 bytes.
STACK space remaining: 145 bytes.
tasm: pass 2 complete.
tasm: Number of errors = 0
tasm -t80 -g3 hbfill.asm hbfill.bin
TASM Z80 Assembler. Version 3.2 September, 2001.
Copyright (C) 2001 Squak Valley Software
tasm: pass 1 complete.
Configuration: ZETA Z80 SBC, FLOPPY (AUTOSIZE), PPIDE (STD)
tasm: pass 2 complete.
tasm: Number of errors = 0
tasm -t80 -g3 romfill.asm romfill.bin
TASM Z80 Assembler. Version 3.2 September, 2001.
Copyright (C) 2001 Squak Valley Software
tasm: pass 1 complete.
tasm: pass 2 complete.
tasm: Number of errors = 0
Building ZETA_std output files...
Building 512KB ZETA_std ROM disk data file...
C:\Users\WWarthen\Projects\N8VEM\Build\RomWBW>

View File

@@ -1,81 +0,0 @@
# B/P Bios
# Banked and Portable Basic IO System
# 1 Introduction
The Banked and Portable (B/P) Basic I/O System (BIOS) is an effort to standardize many of the logical to physical mapping mechanisms on Microcomputers running Z-Systems with ZSDOS. In expanding the capabilities of such systems, it became apparent that standard BIOSes do not contain the functionality necessary, adequate standardization in extended BIOS calls, nor an internal structure to fully support external determination of system parameters. B/P Bios provides a method of achieving these goals, while also possessing the flexibility to operate on a wide range of hardware systems with a much smaller level of systems programming than previously required.
## 1.1 About This Manual
Documentation on B/P Bios consists of this manual plus the latest addendum on the distribution disk in the file README.2ND. This manual is divided into the following sections:
* The Features of B/P Bios summarizes the significant features of B/P Bios in general, highlighting advantages and the few limitations in the system.
* Tailoring B/P Bios contains details on altering the many options to generate a customized `.REL` file tailored to your system.
* Installing a B/P Bios details the installation of B/P Bios in both Unbanked and Banked configurations in a "how to" fashion.
* Programming for B/P Bios describes the interfaces, data structures and recommended programming practices to insure the maximum benefit and performance from systems with B/P Bios.
* The B/P Bios Utilities describes the purpose, operation, and customization of all supplied B/P Bios utilities and support routines.
* Appendices which summarize various technical information.
* A glossary defining many technical terms used in this Manual.
* An index of key words and phrases used in this Manual.
For those not interested in the technical details, or who want to bring the system up with a pre-configured version as quickly as possible, Section 4, Installing a B/P Bios, will lead you through the installation steps needed to perform the final tailoring to your specific computer. Other chapters cover details of the individual software modules comprising the B/P Bios, and specifics on the utilities provided to ease you use of this product.
## 1.2 Notational Conventions
Various shorthand terms and notations are used throughout this manual. Terms are listed in the Glossary at the end of this manual.
Though the symbols seem cryptic at first, they are a consistent way of briefly summarizing program syntax. Once you learn to read them you can tell at a glance how to enter even the most complicated commands.
Several special symbols are used in program syntax descriptions. By convention, square brackets (\[\]) indicate optional command line items. You may or may not include items shown between brackets in your command, but if you do not, programs usually substitute a default value of their own. If items between brackets are used in a command, all other items between the brackets must also be used, unless these items are themselves bracketed.
All of the support utilities developed to support the B/P Bios system contain built-in help screens which use the above conventions to display helpful syntax summaries. Help is always invoked by following the command with two slashes (`//`). So for example,
`ZXD //`
invokes help for ZXD, the ZSDOS extended directory program. Interactive ZSDOS programs such as BPCNFG2 also contain more detailed help messages which appear as a session progresses.
Many utilities may be invoked from the command line with options which command the programs to behave in slightly different ways. By convention, options are given after other command parameters. For example, the `P` option in the command
`ZXD *.* P`
causes the ZXD directory utility to list all files (*.*) and send its output to the printer (P). For convenience, a single slash character (/) can often be used in place of leading parameters to signify that the rest of the command line consists of option characters. Therefore, the command
`ZXD /P`
is identical in meaning to the previous example (see 6.23 for more on ZXD).
## 1.3 What is B/P Bios?
B/P Bios is a set of software subroutines which directly control the chips and other hardware in your computer and present a standard software interface to the Operating System such as our ZSDOS/ZDDOS, Echelon's ZRDOS, or even Digital Research's CP/M 2.2. These routines comply with the CP/M 2.2 standards for a Basic IO System (BIOS) with many extensions; some based on CP/M 3.x (aka CP/M Plus), and others developed to provide necessary capabilities of modern software. When properly coded, the modules comprising a B/P Bios perform with all the standard support utilities, nearly all Z-System utilities, and most application programs without alteration.
The ability to operate Banked, Non-banked and Boot System versions of the Bios with a single suite of software, across a number of different hardware machines, plus the maximization of Transient Program Area for application programs in banked systems are features which are offered by no other system of which we are aware.
## 1.4 The History of B/P Bios
Our earlier work developing ZSDOS convinced us that we needed to attack the machine-dependent software in Z80-compatible computers and develop some standard enhancements in order to exercise the full potential of our machines. This premise is even more true today with large Hard Disks (over 100 Megabytes) being very common, needs for large RAM Drives, and an ever shrinking Transient Program Area. Attempts to gain flexibility with normal operating systems were constrained by the 64k addressable memory range in Z80-compatible systems, and forced frequent operating system changes exemplified by NZCOM and NZBLITZ where different operating configurations could be quickly changed to accommodate application program needs.
In the mid to late 1980's, several efforts had been made to bank portions of CP/M 2.2 "type" systems. XBIOS was a banked Bios for only the HD64180-based MicroMint SB-180 family. While it displayed an excellent and flexible interface and the ability to operate with a variety of peripherals, it had several quirks and noticeably degraded the computer performance. A banked Bios was also produced for the XLM-180 single board S-100 computer, but required special versions of many Z-System utilities, and was not produced in any significant quantity. Other spinoffs, such as the Epson portable, attempted banking of the Bios, but most failed to achieve our comprehensive goals of compatibility with the existing software base, high performance, and portability.
In 1989, Cam developed the first prototype of B/P Bios in a Non-banked mode on his TeleTek while Hal concentrated on extending ZSDOS and the Command Processor. As of 1997, B/P Bios has been installed on:
| Computer | Features |
| :--- | :--- |
| YASBEC | Z180 CPU, FD1772 FDC, DP8490 SCSI, 1MB RAM |
| Ampro LB w/MDISK | Z80 CPU, FD1770 FDC, MDISK 1MB RAM |
| MicroMint SB-180 | HD64180 CPU, SMS9266 FDC, 256KB RAM |
| MicroMint SB180FX | HD64180Z CPU, SMS9266 FDC, 512KB RAM |
| Compu/Time S-100 | Z80 CPU, FD1795 FDC, 1 MB RAM |
| Teletek | Z80 CPU, NEC765 FDC, 64KB RAM |
| D-X Designs P112 | Z182 CPU, SMC FDC37C665 FDC, Flash ROM, 512KB RAM (mods for 5380 SCSI and GIDE) |

View File

@@ -1,36 +0,0 @@
# 2 Features of B/P Bios
B/P BIOS is designed to be completely compatible with the CP/M 2.2 standards for a Basic IO System, as well as to provide many extensions needed for banked memory which is becoming so prevalent with newer systems and processors. Additionally, strict coding standards used in the various modules forming the BIOS ease interface problems with applications programs and provide a more robust framework for future development. The extensions added to the basic CP/M 2.2 foundation include many elements from Digital Research's CP/M 3 (aka CP/M Plus), but in a more logically consistent manner. Also included in banked versions are provisions for managing up to 8 MB of extended memory for banked applications, RAM Drives and potentially multitasking in future versions. To provide insight into the methodology used, let us now examine some of the features in a generic B/P Bios.
## 2.1 Character IO
As defined by Digital Research in their CP/M 2.2 standards, character IO consisted of logical devices referred to as TTY, CRT, UC1, CON, etc. B/P Bios extends and generalizes these interfaces using the IOBYTE to define four physical devices called COM1, COM2, PIO and NUL. The first two, COM1 and COM2, are serial ports; PIO is a Parallel port, while NUL is a "bit-bucket" which can be replaced by a customized driver, or used in lieu of an actual device. Digital Research provided only a limited interface capability to the character devices in CP/M 2.2, consisting of a Console (CON), an auxiliary Input and Output (RDR/PUN), and a Printer (LST). The ability to sense Input and Output Status with these devices was extremely limited and was enhanced in CP/M 3. These enhanced capabilities are completely incorporated into B/P Bios with the addition of strict register usage so that only relevant registers may be altered in the respective routines. By manipulating the IOBYTE, any of the four physical devices may be used in the three logical devices of CONsole, AUXiliary, and Printer (LST).
Also featured in B/P Bios are modifications of CP/M 3 functions to initialize (or re-initialize) all devices and parameters, and return the address of a table which contains names and parameters of the defined character devices. While not totally compatible with CP/M 3 equivalents, these functions are consistent with the spirit and functionality needed with this advanced system. Included in the device table are; flags defining whether the device is capable of Input, Output or Both, Data rates for serial devices (Maximum and Set), Serial data format where applicable, and Handshaking method (CTS/RTS, XON/XOFF or None), as well as Input and Output Data masks for stripping unneeded bits from characters during IO.
## 2.2 Mass Storage IO
All versions of Digital Research's CP/M BIOSes define only a generic Disk driver with implementations of Floppy, Hard, RAM and Tape drives left to the user or developer. In B/P Bios, we went several steps further to ease many problems. First, we retained all standard CP/M 2.2 functions and parameters, added CP/M 3 features for returning the Disk Parameter Header (DPH) table address, and flushing of the software deblocking code segment, and added a new vector to the BIOS jump table to provide a standard method of directly addressing low-level device functions. Several standard low-level Floppy Disk functions are supported and used by the standard utilities, including a function to return the type of Disk Controller in use which permits a single support utility to adapt to a wide variety of hardware platforms. In a like manner, low-level functions are provided for SCSI/SASI Hard Disk drives, and provisions for RAM Disk drives in the event special hardware is implemented. The methods used to implement these access mechanisms may be logically extended to handle Tape Drives or Network Interfaces.
## 2.3 Clock Support for Time and Date
Many Hardware vendors have added provisions for Time and Date as non-standard extensions to CP/M 2.2 BIOSes, and more have incorporated such support into CP/M 3 BIOSes. We opted to define the CP/M 3 clock vector as a ZSDOS-standard clock building on our previous Operating System work. This entry point into the Bios completely complies with our ZSDOS standards and can completely replace the separate clock driver when used with ZSDOS. For systems capable of returning tenths-of-seconds, such as the YASBEC and SB-180, the standard has been enhanced to support this capability as well.
## 2.4 Banked Memory Support
While Digital Research added banked memory support to their CP/M 3, it was in a manner incompatible with Bios interface standards defined for earlier CP/M standards. The method used in B/P Bios is compliant with CP/M 2.2 in direct accessing of Bios functions with only one minor exception when using the Banked ZSDOS2, and contains many of the CP/M 3 extensions added for banked memory support, with some being modified to be consistent with standards adopted for Z-System software. The exception to CP/M 2.2 accesses occurs when the Operating System can access certain buffers in the System Memory Bank. With ZSDOS 2, Allocation Bit Buffers (ALV), Check Buffers (CSV), and the Disk Host Buffer are all contained in the System Bank and not directly accessible from Transient Programs. To compensate for this, we have added a command to ZSDOS 2 to return the free space on disks (the most common reason for accessing these buffers) and tailored several utilities to adapt to banked and non-banked systems.
In addition to the primitives initiated by Digital Research, we added functions to directly access Words and Bytes in extended banks of memory, Directly accessing software routines contained in alternate memory banks, and properly managing the system when errors occur. These features make B/P Bios much more robust and resilient than other products. These features are implemented by methods transparent to the system utilities so that the same functions are available in both banked and non-banked versions.
## 2.5 Other Features
B/P Bios contains a standardized identification method which may be used to determine the hardware on which the software is operating. This allows applications to "adapt" to the environment in a manner similar to that used in the rest of the Z-System community. It also minimizes system "crashes" by executing programs which assume certain hardware features which may be detrimental if executed on other systems. The effects of identification of physical system parameters is most readily noticed by virtue of a single suite of support programs performing low-level functions such as formatting and diagnostics which function across widely differing hardware platforms. Portability on this scale can rarely be seen in other computer systems.
The ZCPR 3.4 Environment with extensions is mandatory in a B/P Bios system. Beginning with the addition of System Segment address and size information for CPR, DOS and BIOS which were added in the ZCPR 3.4 Environment, B/P Bios also adds a Resident User Space which may be used to locate unique routines for custom applications in a manner similar to, but more consistent than NZ-COM. An Environment Version number of 90H identifies the Z3 Environment as being compliant with B/P definitions.
In Banked systems, application programs may also be placed in alternate memory banks using location and sizing information contained at standard positions within the Bios Header Structure. This feature permits significantly greater functionality without sacrificing precious Transient Program Area. While the scheme employed in the initial distribution is subject to minor adjustments as the banked ZSDOS2 becomes more firmly developed, experimentation and suggestions into this realm are encouraged.

View File

@@ -1,232 +0,0 @@
# 3 Tailoring a B/P Bios
To customize a B/P Bios for your use, or adapt it to a new hardware set, you will need an editor and an assembler capable of producing standard Microsoft Relocatable files. Systems using the Hitachi HD64180 or Zilog Z180 must be assembled with either ZMAC or SLR180 which recognize the extended mnemonic set, or with a Z80 assembler and MACRO file which permits assembly of the extended instructions. For Z80 and compatible processors, suitable assemblers include ZMAC and Z80ASM. For any assembler, failure to produce standard Microsoft Relocatable code will preclude the ability of our Standard utilities to properly install B/P Bios systems.
## 3.1 Theory of Operation
In order to understand the need for, and principles behind B/P Bios, you must understand the way in which CP/M 2.2, as modified by the Z-System, uses the available memory address space of a Z80 microprocessor. For standard versions of CP/M and compatible systems, the only absolute memory addresses are contained in the Base Page which is the range of 0 to 100H. All addresses above this point are variable (within certain limits). User programs are normally run from the Transient Program Area (TPA) which is the remaining space after all Operating System components have been allocated. The following depicts the assigned areas pictorially along with some common elements assigned to each memory area:
```generic
FFFFH /------------------\
| Z-System Buffers | ENV, TCAP, IOP, FCP, RCP
|------------------|
| Bios | Code + ALV, CSV, Sector Buffers
|------------------|
| Operating System | CP/M 2.2, ZRDOS, ZSDOS1
|------------------|
| Command Processor| CCP, ZCPR3.x
|------------------|
| Transient |
| |
| Program |
| |
| Area |
0100H |------------------|
| Base Page | IOBYTE, Jmp WB, Jmp Dos, FCB, Buffer
0000H \------------------/
```
As more and more functionality was added to the Z-System Buffers, bigger drives were added using more ALV space, and additional functionality was added to Bios code in recent systems, the available TPA space has become increasingly scarce.
B/P Bios attacks this problem at the source in a manner which is easily adaptable to different hardware platforms. It uses additional memory for more than the traditional role of simple RAM Disks, it moves much of the added overhead to alternate memory banks. The generic scheme appears pictorially as:
```generic
FFFFH /----------\
| |
| BNK1 |
| |
8000H |----------| /----------\ /----------\ /----------\
| | | |\ | |\ | |\
| BNK0 | | BNK2 | | BNKU | | BNK3 ||\
| | | || | || | |||
0000H \----------/ \----------/ \----------/ \----------/
\- - - - - / \- - - - - / \- - - - - /|
| BNKM |
\----------/
TPA SYSTEM USER RAM DISK
```
As can be seen from the above diagram, multiple banks of memory may be assigned to different functional regions of memory, with each 32k bank (except for the one defined as BNK1) being switched in and out of the lower 32k of the processor's memory map. The bank defined as BNK1 is ALWAYS present and is referred to as the Common Bank. This bank holds the portions of the Operating System (Command Processor, Operating System, BIOS, and Z-System tables) which may be accessed from other areas, and which therefore must always be "visible" in the processor's memory. It also contains the code to control the Bank switching mechanisms within the B/P Bios.
To illustrate this functional division, the memory map of a basic B/P Bios system is divided as:
```generic
FFFFH /------------------\
| Z-System Buffers |
|------------------|
| User Space |
|------------------|
| Bios |
|------------------|
| Operating System |
|------------------|
| Command Processor| /------------------\ 8000H
|------------------| / | Bios Buffers |
8000H | Transient | | Banked Bios Part |
| | |------------------|
| | | Banked Dos Part |
| Program | |------------------|
| | | Banked CCP Part |
| | |------------------|
| Area | | CCP Restoral |
0100H |------------------| |------------------| 0100H
| Base Page | | Base Page Copy |
0000H \------------------/ \------------------/ 0000H
TPA (BNK0/BNK1) System Bank (BNK2)
```
The B/P Bios banking concept defines a one byte Bank Number permitting up to 8 Megabytes to be directly controlled. Certain assumptions are made in the numbering scheme, the foremost of which is that BNK0 is the lowest physical RAM bank, BNK1 is the next incremental RAM bank, with others follow in incrementing sequential order. A couple of examples may serve to illustrate this process. The YASBEC is offered with a couple of options in the Memory Map. Units with the MEM-1, 2 or 3 decoder PALs assign the first 128k bytes of physical memory to the Boot ROM, so BNK0 is set to 4 (Banks 0-3 are the ROM). The MEM-4 PAL only uses the first 32k (Physical Bank 0) for the ROM which means that BNK0 is assigned to 1, BNK1 to 2 and so on up to the 1 Megabyte maximum where BNKM is 31.
The Ampro Little Board equipped with MDISK, on the other hand, completely removes the Boot ROM from the memory map leaving a maximum of 1 MB of contiguous RAM space. In this system, BNK0 is set to 0 and BNKM to 31 of a fully equipped 1 MB MDISK board.
The region beginning after BNK1 is referred to as the System Bank. It begins at the bank number assigned to BNK2 and ends at the bank number immediately before that assigned to the User Bank, BNKU if present, or BNK3 if no User Bank area is defined.
If present, one or more 32k banks of memory may be defined with the BNKU equate for unique user programs or storage areas. This area begins with the bank number set to the label and ends at the bank number immediately before the BNK3 label. BNK3 defines a high area of physical memory which is most often used for a RAM Disk providing fast temporary workspace in the form of an emulated disk drive.
B/P Bios contains protection mechanisms in the form of software checks to insure that critical portions of the memory map are enforced. In the case of Non-banked systems, a check is made to insure that the system size is not so great that the Bios may overwrite reserved Z-System areas in high memory (RCP, IOP, etc). If a possible overflow condition is detected, the message
`++ mem ovfl ++`
will be issued when the system is started. In Banked Bios systems, this message will be displayed if the top of the system portions in the SYStem Bank exceeds the 32k bank size. For most systems, this space still permits drives of several hundred megabytes to be accommodated.
Since the Common portions of the operating system components must remain visible to applications, a similar check is made to insure that the lowest address used by the Command Processor is equal to or greater than 8000H. This factor is checked both in both MOVxSYS and BPBUILD with either a warning issued in the case of the former, or validity checks on entry in the case of the latter.
## 3.2 B/P Bios Files
This BIOS is divided into a number of files, some of which depend highly on the specific hardware used on the computer, and some of which are generic and need not be edited to assemble a working system. Much use is made of conditional assembly to tailor the resulting Bios file to the desired configuration. The Basic file, `BPBIO-xx.Z80`, specifies which files are used to assemble the Bios image under the direction of an included file, `DEF-xx.LIB`. It is this file which selects features and contains the Hardware-dependent mnemonic equates. By maintaining the maximum possible code in common modules which require no alterations, versions of B/P Bios are relatively easy to convert to different machines. The independent modules used in the B/P Bios system are:
| Filename | Description |
| :--- | :--- |
| `BOOTRAM.Z80` | (only needed in BOOT ROM applications) |
| `BOOTROM.Z80` | (only needed in BOOT ROM applications) |
| `BYTEIO.Z80` | Character IO per IOBYTE using IIO-xx routines |
| `DEBLOCK.Z80` | Disk Deblocking routines |
| `DPB.LIB` | 3.5/5.25" Floppy Format Definitions (if AutoSelect) |
| `DPB8.LIB` | 8"/Hi-Density Floppy Format Definitions (if AutoSelect) |
| `DPB2.LIB` | Additional Floppy Definitions (optional if AutoSelect) |
| `DPBRAM.LIB` | Fixed Floppy Format Definitions (if Not AutoSelect) |
| `DPH.LIB` | Disk Parameter Header Table & Floppy definitions |
| `FLOPPY.Z80` | Floppy Disk High-Level Control |
| `SECTRAN.Z80` | Sector Translate routines |
| `SELFLP1.Z80` | Floppy Select routine (if Not auto selecting) |
| `SELFLP2.Z80` | Floppy Select routine (if auto selecting) |
| `SELRWD.Z80` | Generic Read/Write routines |
| `Z3BASE.LIB` | ZCPR 3.x file equate for Environment settings |
Other files are hardware version dependent to varying extents. These modules requiring customization for different hardware systems are given names which end with a generic "-xx" designator to identify specific versions. Tailoring these modules ranges from simple prompt line customization to complete re-writes. Versions of B/P Bios generated to date are identified as:
| ID | Computer system |
| :---: | :--- |
| `-18` | MicroMint SB-180 | (64180 CPU, 9266 FDC, 5380 SCSI) |
| `-YS` | YASBEC | (Z180 CPU, 1772 FDC, DP8490 SCSI) |
| `-AM` | Ampro Little Board | (Z80 CPU, 1770 FDC, 1MB MDISK) |
| `-CT` | Compu/Time S-100 board set | (Z80 CPU, 1795 FDC, 1MB Memory) |
| `-TT` | Teletek | (Z80 CPU, 765 FDC) |
Files associated with specific hardware versions or require tailoring are:
| Filename | Description |
| :--- | :--- |
| `BPBIO-xx.Z80` | Basic file, tailored for included file names |
| `CBOOT-xx.Z80` | Cold Boot routines, Sign-on prompts |
| `DEF-xx.LIB` | Equates for option settings, mode, speed, etc. |
| `DPBHD-xx.LIB` | Hard Drive Partition Definitions (optional) |
| `DPBM-xx.LIB` | Ram Drive Definition (optional) |
| `DPHHD-xx.LIB` | Hard Drive DPH definitions (optional) |
| `DPHM-xx.LIB` | Ram Drive DPH Definition (optional) |
| `FDC-xx.Z80` | Floppy Disk Low-Level interface/driver routines |
| `HARD-xx.Z80` | Hard Drive Low-Level interface/driver routines (optional) |
| `IBMV-xx.Z80` | Banking Support Routines (if banked) |
| `ICFG-xx.Z80` | Configuration file for speed, Physical Disks, etc. |
| `IIO-xx.Z80` | Character IO definitions and routines |
| `RAMD-xx.Z80` | Ram Drive interface/driver routines (optional) |
| `TIM-xx.Z80` | Counter/Timer routines and ZSDOS Clock Driver |
| `WBOOT-xx.Z80` | Warm Boot and re-initialization routines |
## 3.3 B/P Bios Options
The most logical starting point in beginning a configuration is to edit the `DEF-xx.LIB` file to select your desired options. This file is the basic guide to choosing the options for your system, and some careful choices here will minimize the Bios size and maximize your functionality. Some of the more important options and a brief description of them are:
**MOVCPM** - Integrate into MOVCPM "type" loader? If the system is to be integrated into a MOVCPM system, the Environment descriptor contained in the CBOOT routine is always moved into position as part of the Cold Start process. If set to NO, a check will be made to see if an Environment Descriptor is already loaded, and the Bios copy will not be loaded if one is present.
NOTE: When assembling a Bios for Boot Track Installation (MOVCPM set to YES), many options are deleted to conserve space and the Bios Version Number is forced to 1.1.
**BANKED** - Is this a banked BIOS? If set to YES, the Bank control module, IBMV, is included in the assembly, and much of the code is relocated to the system bank. Note that a Banked system CANNOT be placed on the System Tracks, or integrated into a MOVCPM image.
**IBMOVS** - Are Direct Inter-Bank Moves possible? If set to YES, direct transfer of data between banks is possible such as with the Zilog Z180/Hitachi 64180. If NO, a 256-byte transfer buffer is included in high Common Memory and Interbank moves require transfer of bytes through this buffer.
**ZSDOS2** - Assemble this for a Banked ZSDOS2 system? If YES, the ALV and CSV buffers will be placed in the System bank invisible to normal programs. This has the side effect that many CP/M programs which perform sizing of files (Directory Listers, DATSWEEP, MEX, etc) which do not know about this function will report erroneous sizes. The advantage is that no sacrifice in TPA is required for large Hard Disks. Set this to NO if you want strict CP/M 2.2 compatibility.
**FASTWB** - Restore the Command Processor from the System Bank RAM? If set to YES, Warm Boots will restore the Command Processor from a reserved area in the System RAM bank rather than from the boot tracks. For the maximum benefit of B/P Bios, always attempt to set this to YES. In systems without extended memory, it MUST be set to NO.
**MHZ** - Set to Processor Speed in closest even Megahertz (e.g. for a 9.216 MHz clock rate, set to 9). The value entered here is used in many systems to compute Timing values and/or serial data rate parameters.
**CALCSK** - Calculate Diskette Skew Table? If NO, a Skew table is used for each floppy format included in the image. Calculating Skew is generally more efficient from a size perspective, although slightly slower by factors which are so small as to be practically unmeasurable.
**HAVIOP** - Include IOP code into Jump table? If the IOPINIT routine satisfies your IOP initialization requirements, you may turn this off by setting to NO and save a little space. This typically will be turned off when generating a system for MOVCPM integration to conserve space.
**INROM** - Is the Alternate Bank in ROM? Set to NO for Normal Disk-based systems. Please contact the authors if you need additional information concerning ROM-based system components.
**BIOERM** - Print BIOS error messages? Set this to YES if you desire direct BIOS printing of Floppy Disk Error Messages. If you are building a BIOS for placement on Boot Tracks, however, you will probably not have room and must turn this Off. Set to NO to simply return the normal Success/Fail error flag with no Message printout.
**FLOPY8** - Include 8"/Hi-Density Floppy Formats? Some systems (SB-180, Compu/Time) can handle both 5.25" and 8" disks. If your hardware supports the capability and you want use 8" disks as well as the normal 3.5 and 5.25" diskettes, setting this to YES will add formats contained in `DPB8.LIB` and control logic to the assembly. Future systems may take advantage of the "High-Density" 3.5 and 5.25" Floppy Disks which use higher data rates. Their definitions will be controlled by this flag as well.
NOTE: If AUTOSL is set to NO, this option will probably cause the BIOS to be larger than necessary since these additional formats may not be accessible.
**MORDPB** - Use more Floppy DPB's (in addition to normal 4-5.25" and optional 8")? If YES, the file `DPB2.LIB` is included. Many of the formats are Dummies and may be filled with any non-conflicting formats you desire.
NOTE: If AUTOSL if set to NO, this option will probably cause the BIOS to be larger than necessary since these additional formats may not be accessible.
**MORDEV** - Include Additional Character Device Drivers? Is set to YES, user-defined drivers are added to the Character IO table, and associated driver code is assembled. Systems featuring expansion board such as the SB-180 and YASBEC may now take advantage of additional serial and parallel interfaces within the basic Bios. Set to NO to limit code to the basic 4 drivers.
NOTE: When assembling a Bios for Boot Track Installation (MOVCPM set to YES), MORDEV is overridden to conserve space, and the Bios Version Number is forced to 1.1 in the distribution files.
**BUFCON** - Use type ahead buffer for the Console? If set to YES, code is added to create and manage a type-ahead buffer for the driver assembled as the console. This device will be controlled by either interrupts (in systems such as the YASBEC and SB-180) or background polling (in Ampro and Compu/Time). This means that characters typed while the computer is doing something else will not be lost, but will be held until requested.
**BUFAUX** - Use type ahead buffer on Auxiliary Port? As with BUFCON above, setting to YES will add code to create and manage a type ahead buffer for the auxiliary device. Since the AUX port typically is used for Modem connections, buffering the input will minimize the loss of characters from the remote end.
**AUTOSL** - Auto-select floppy formats? If set to YES, selection of Floppy disks will use an algorithm in `SELFLP2.Z80` to identify the format of the disk from the DPB files included (`DPB.LIB`, optional `DPB8.LIB`, and optional `DPB2.LIB`) and log the disk if a match is found. There must be NO conflicting definitions included in the various files for this to function properly. See the notes in the various files to clarify the restrictions. If set to NO, the single file `DPBRAM.LIB` is included which may be tailored to contain only the fixed format or formats desired per disk drive. This results in the smallest code requirement, but least flexibility.
**RAMDSK** - Include code for a RAM-Disk? If set to YES, any memory above the System or User bank may be used for a RAM Drive (default is drive M:) by including the file `RAMD-xx.Z80`. Parameters to determine the size and configuration are also included in the files `DPHM-xx.LIB` and `DPBM-xx.LIB`. In systems without extended memory, or to conserve space such as when building a system for the boot tracks, this may be disabled by setting to NO.
**HARDDSK** - Include SCSI Hard Disk Driver? Set to YES if you wish to include the ability to access Hard Disk Drives. In a floppy-only system, a NO entry will minimize BIOS code.
**HDINTS** - (System Dependent) In some systems such as the YASBEC, Interrupt-driven Hard Disk Controllers using DMA transfer capabilities may be used. If you wish to use this type of driver specified in the file `HARDI-xx.Z80` instead of the normal polled routines included in `HARD-xx.Z80`, set this option to TRUE. In most cases, this driver will require more Transient Program Area since the Interrupt Handling routine must be in Common Memory.
**CLOCK** - Include ZSDOS Clock Driver Code? If set to YES, the vector at BIOS+4EH will contain a ZSDOS-compatible clock driver with the physical code contained in the `TIM-xx.Z80` module. If set to NO, calls to BIOS+4EH return an error code.
**TICTOC** - (System Dependent) Use pseudo heartbeat counter? This feature is used in systems such as the Ampro Little Board and Compu/Time SBC880 which do not have an Interrupt scheme to control a Real Time Clock. Instead, a series of traps are included in the code (Character IO Status polls, Floppy Disk Status polls) to check for overflow of a 1-Second Counter. It is less desirable than an Interrupt based system, but suffices when no other method is available. Set to NO if not needed.
**QSIZE** - Size in bytes of type ahead buffers controlled by BUFCON and BUFAUX.
**REFRSH** - Activate Dynamic Refresh features of Z180/HD64180 processors? In some computers using these processors such as the YASBEC, refresh is not needed and merely slows down processing. Set to NO if you do not need this feature. If your processor uses dynamic memory, or needs the signal for other purposes (e.g. The SB180 uses Refresh for Floppy Disk DMA), Set this to YES.
**Z3** - Include ZCPR init code? Since a Z3 Environment is mandatory in a B/P Bios (which now "owns" the Environment), this option has little effect.
For assembly of a Banked version of B/P Bios, the identification of various banks of memory must be made so that the various system components "know" where things are located. Refer to Section 3.1 above for a description of these areas. The BNK0 value should be the first bank of RAM in the System unless other decoding is done. The following equates must be set:
| Equate | Description |
| :--- | :--- |
| BNK0 | First 32k TPA Bank (switched in/out) |
| BNK1 | Second 32k TPA Bank (Common Bank) |
| BNK2 | Beginning of System Bank (BIOS, DOS, CPR) area |
| BNKU | Beginning of Bank sequence for User Applications |
| BNK3 | Beginning of Extra Banks (first bank to use for RAM Disk) |
| BNKM | Maximum Bank Number assigned |
## 3.4 Configuration Considerations
When assembling a version of B/P Bios for integration into an IMG file, size of the resulting image is not much of a concern, so you need not worry about minor issues of size. For integration into a system for loading onto diskette boot tracks, however, the limitation is very real in order to insure that the CPR/DOS/BIOS and Boot Sector(s) can fit on the reserved system tracks. Typically, a limit of slightly under 4.5k exists for the Bios component. When the MOVCPM flag is set to YES for this type of assembly, warnings will be issued when the image exceeds 4352 bytes (the maximum for systems with 2 boot records), and 4480 bytes (the maximum for systems with a single boot record). Achieving these limits often requires disabling many of the features.
The first thing you should do before assembling the BIOS is to back up the entire disk, then copy only the necessary files onto a work disk for any editing. After setting the options as desired, edit the hardware definitions in `ICFG-xx.Z80` to reflect the physical characteristics of your floppy and hard drives, as well as any other pertinent items. Then edit the logical characteristics for your Hard and Ram Drives (if any) in `DPBHD-xx.LIB` and `DPBM-xx.LIB`. If you do not desire any of the standard floppy formats or want to change them, edit `DPB.LIB` and/or `DPB2.LIB` (if using auto selection) or `DPBRAM.LIB` if you are using fixed floppy formats. Finally edit the DPH files to place the logical drives where desired in the range A..P.
Decide whether you want to generate a system using the Image file construct developed in support of B/P Bios (BPBUILD/LDSYS), or for integration on a floppy disk's boot tracks. If the latter, you probably will not be able to have all options turned on. For example, with the MicroMint SB-180, the following options must be turned Off: BANKED, ZSDOS2, BIOERM, FLOPY8, MORDPB, BUFAUX and usually either CLOCK or RAMDSK. As an aid to space reduction, conditional assembly based on the MOVCPM flag automatically inhibits all but double-sided Floppy formats from `DPB.LIB`. If configuring for Floppy Boot tracks (MOVCPM flag set to TRUE), a warning will be printed during assembly if the size exceeds that available for a One or Two-sector boot record. Using the BPBUILD/LDSYS method, you may vary nearly all system parameters, even making different systems for later dynamic loading.
If you are using a version of the B/P Bios already set for your type of computer, you are now ready to assemble, build a system and execute it. The only remaining task would be an optional tailoring of the sign on banner in the file `CBOOT-xx.Z80` and reassembly to a `.REL` file.
For those converting a standard version of the B/P Bios to a new hardware system, we recommend that you begin with a Floppy-only system in Non-Banked mode then expand from there. The easiest way to test out new versions is to use the System Image (IMG file) mode, then advance to boot track installations if that is desired. Enhancements that can be added after testing previous versions may be to add Hard Drives, RAM Drive, and finally Banking.

View File

@@ -1,200 +0,0 @@
# 4 Installing a B/P Bios
The Distribution diskette(s) on which B/P Bios is furnished are configured for booting from the vanilla hardware for the version ordered. A 9600 bps serial terminal is standard, and will allow you to immediately bring up a minimal Non-Banked Floppy Disk system. Due to the variety of different system configurations and size restrictions in some versions, only the Floppy Disk Mass Storage capability can be assured on the initial boot disk. Where space remained on the boot tracks, limited Hard Drive support is also provided, and in some configurations, even RAM Drive support exists.
After booting from either an established system, or the boot tracks of the distribution disk, format one or more fresh diskettes and copy the distribution diskette(s) contents to the backup diskette(s). Copy the boot tracks from the master to the copies using BPSYSGEN (see 6.6). Remove the master diskette(s) for safekeeping and work only with the copies you just made.
Using the backup diskette with the B/P utilities on it, execute BPCNFG in the Boot Track configuration mode (see 6.2), adjusting all the options to your specific operating environment. When you have completed tailoring the system, it is ready for booting by placing the diskette in drive A: and resetting the system.
The sample `STARTUP.COM` file on the distribution disk will automatically execute a sequence of instructions when the system is booted. It contains various instructions which further tailor the system and load portions of the operating system which are too big to fit on the boot tracks. The default instruction sequence is:
| Command | Explanation |
| :--- | :--- |
| `LDDS` | Load the DateStamper style File Stamp routine and clock |
| `LDR SYS.RCP,SYS.FCP,SYS.NDR` | Load ZCPR 3 Environment segments for Resident Command Processor, Flow Control Pkg and Named Dirs |
| `IOPINIT` | Initialize the IO Processor Pkg |
| `TD S` | Prompt for Date and Time, Set Clk / Alternatives are to use `TDD` (6.21) or `SETCLOK` (6.18) |
| `IF ~EX MYTERM.Z3T` | If the file `MYTERM.Z3T` does Not exist... |
| `TCSELECT MYTERM.Z3T` | ..select which terminal you have creating a `MYTERM.Z3T` file |
| `FI` | ...end of the `IF` |
| `LDR MYTERM.Z3T` | Load the Terminal Definition data |
If you wish to alter any of these initial instructions to, for example, initialize the RAM drive using INIRAMD, add File Time Stamp capabilities to it with INITDIR or PUTDS and copy some files there with COPY, these may be added with ALIAS, VALIAS, SALIAS or other compatible files available from the ZSYSTEM or ZCPR33 areas on Z-Nodes.
After the initial system is up and running from the Default Boot Track system, you may expand the operation by generating systems for different purposes in order to gain the most advantage from your system. Many types of installation are possible, the simplest of which is a Non-Banked system using only 64k of the systems memory, all of which is in primary memory. Such a system uses a normal Command Processor such as the ZCPR3.x family, and a Non-Banked Operating System such as our ZSDOS Version 1. Non-Banked systems may be installed on a Disk's Boot Tracks, or created as an Image File for dynamic loading using the LDSYS Utility (see 6.15).
Banked systems MUST be created with the BPBUILD Utility (see 6.1) and loaded with LDSYS (see 6.15). The techniques to manage different memory banks to form a complete Operating Environment are rather intricate and are best handled by our utilities. Many Image files may be created and loaded as needed to tailor your system for optimum performance. The following sections describe these various types of installations in detail.
## 4.1 Boot Track Installation
For most of the existing CP/M compatible computers to begin executing a Disk Operating System, a program must be placed on a specified area of a Floppy or Hard Disk Drive. Normally, the first two or three tracks on the disk are reserved for this purpose and are referred to as the "Boot Tracks". Since the space so defined is generally restricted, neither a complete B/P Bios nor a Banked installation is possible. Instead, a scaled-down system roughly equivalent to those currently in use is used to start the computer and serve as the Operating System, with larger systems loaded later as needed.
If you are using a pre-configured version of B/P Bios for your hardware, you may simply continue to use the Boot Track system from the distribution disk(s) by copying the system as described in Section 4 above using BPSYSGEN (see 6.6). If you elect to alter or otherwise customize the Boot Track system, you must assemble the B/P Bios source setting certain of the equates in the `DEF-xx.LIB` file to insure a correct type of system. To assemble a Boot Track system, the most important equates are:
| Equate | |
| :---: | :--- |
| `MOVCPM` | Set to `YES` |
| `BANKED` | Set to `NO` |
| `ZSDOS2` | Set to `NO` |
One element of Banked Systems is available in a Boot Track installation if additional memory is available, and your B/P Bios routines support such a feature. This feature reloads the Command Processor from Banked memory instead of from the Boot Tracks of a disk, and generally produces less code (taking less space on the Boot Tracks) and executes faster. It is set with:
| Equate | |
| :---: | :--- |
| `FASTWB` | Set to `YES` if desired, `NO` if Warm Boot from disk |
Some of the features that generally need to be disabled to scale a smaller system are set as:
| Equate | |
| :---: | :--- |
| `MORDPB` | Set to `NO` |
| `DPB8` | Set to `NO` |
| `MORDEV` | Set to `NO` |
When at least these equates and any others you desire to change (see section 4) have been made to the component files of the system, assemble your `BPBIO-xx` file to a Microsoft standard `.REL` file. This output file may be used to overlay the Bios portion of the `MOVxSYS.COM` system generation utility (see 6.16) furnished with your distribution disk, or an equivalent program provided with your computer. MOVxSYS or its equivalent (MOVCPM, MOVZSYS, etc) is a special program customized for your particular hardware containing all the Operating System components which will be placed on the Boot Tracks, along with a routine to alter the internal addresses to correspond to a specified memory size.
To Add the new Bios you just assembled, execute INSTAL12 (see procedures in 6.13) specifying your computer's MOVxSYS or equivalent program and follow the prompts to overlay the new Bios. Once INSTAL12 has saved a relocatable or absolute file, you are ready to create a boot disk containing the modified system.
If you used the command INSTAL12 to install system segments on MOVxSYS or equivalent program, you must first create an Absolute System Model file. Since the functional portion of your new program is identical to the original MOVxSYS or equivalent, use the method explained in your original documentation to generate a new system. With MOVxSYS, the command is:
| Command | |
| :---: | :--- |
| `MOVxSYS nn *` | replace MOVxSYS with your version |
Where `nn` is the size of the system (typically 51 for a moderate boot system). The asterisk tells the program to retain the image in memory and not write it to a disk file. You may now use BPSYSGEN to write the new image to the system tracks of your boot diskette. Do this by executing BPSYSGEN with no arguments and issue a single Carriage Return when asked for the source of the Image.
If you used the command `INSTAL12 /A` to install replacement system segments over a System Image file, or used a utility which wrote the new image to a disk file, use BPSYSGEN to write the image file to the system tracks of your boot disk. The proper command is
`BPSYSGEN filename`
where filename is the name of the disk file you just created by executing MOVxSYS or equivalent with output to a disk file, or with INSTAL12 on an existing image file.
If the system is written to a Hard Disk, and your system supports booting from a Hard Disk such as the YASBEC, you normally must alter the default Boot Sector from the default Floppy Disk Boot Sector contained in MOVxSYS or equivalent. This alteration is accomplished by HDBOOT (see 6.9) which must be customized to the specific Hardware System used.
After the above actions have been completed as appropriate, tailor the Boot Track system to reflect the desired starting configurations with BPCNFG (see 6.2). Such items as the desired Startup file name, Bank Numbers (critical if FASTWB is used), and drive types and assignments are routinely tailored at this point. When the you have finished this step, test your new system by resetting the system, or cycling the power and you should be up and running!
## 4.2 Non-Banked Image Installation
A Non-Banked system may be installed as an Image File as opposed to the basic Boot Track installation covered in 4.1 above. To create an Image File, you must have `.REL` or `.ZRL` versions of a Command Processor (ZCPR3.x or equivalent recommended), an Operating (`ZSDOS.ZRL` recommended), and a REL version of B/P Bios for your system assembled with the MOVCPM equate in `DEF-xx.LIB` set to NO. Other equates in this file may be set as described above for the Boot Track system. Since Image Files are not as constrained in size as is installation for Boot Tracks, more features may generally be activated such as Error Messages, RAM Drive, additional Hard Drive partitions, and complete Floppy Format suites. The main precaution here is that large Hard Drives will rapidly cause significant loss of Transient Program Area since all Drive parameters must be in protected high memory above the Bios.
After the Bios has been assembled, an Image file must be produced. This is accomplished with the BPBUILD Utility (see 6.1). Set the File names in Menu 1 to reflect only Non-Banked files (or minimally banked Bios if FASTWB is set to YES), and let BPBUILD do the work. Since the standard Non-Banked System segments are normally set to the "standard" CP/M 2.2 sizes, you may answer the "autosize" query with a Y to obtain the maximum Transient Program Area in the resulting system. When BPBUILD completes its work, a file, normally with the default type of `.IMG`, will have been placed in the currently logged Drive/User area and you are ready to perform the next step in preparation of the Non-Banked Image.
As with the Boot Track installation covered above, several system items must be tailored before the Image may be safely loaded and executed. This is done by calling BPCNFG with the Image file name as an argument, or specify Image configuration from the interactive menu (see 6.2). Set all items as you desire them in the operating system, particularly the Bank Numbers (if FASTWB is active), and the Disk Drive characteristics and assignments. When this has been satisfactorily completed, you are ready to load and execute the newly-created system.
Installing an Image File (default file type of `.IMG`) is extremely easy. Only the utility `LDSYS.COM` (see 6.15) is needed. If the file type has not been changed from the default `.IMG`, only the basic name of the Image File need be passed to LDSYS when executed as:
| Command | |
| :---: | :--- |
| `LDSYS IMGFILE` | where IMGFILE.IMG is your Image file name |
The operating parameters of the currently-executing system are first examined for suitability of loading the Image File. If it is possible to proceed, the Image File is loaded, placed in the proper memory locations, and commanded to begin execution by calling the B/P Bios Cold Boot Vector. The Cold Boot (Bios Function 0) performs final installation, displays any desired opening prompt and transfers control to the Command Processor with any specified Startup file for use by a ZCPR3.x Command Processor Replacement.
Since a non-banked Image File will probably closely resemble that contained on the Boot Tracks, the same STARTUP file may generally be used to complete the initial tailoring sequence. If a different file is desired, the Image File may be altered to specify a different file using BPCNFG.
## 4.3 Banked Bios, Non-banked System Installation
With the B/P Bios system, an Image system may be created and loaded which places portions of the Bios Only in the System bank, retaining a non-banked Operating System and therefore maximum compatibility with existing applications software. A few thousand bytes can normally be reclaimed for Transient Programs in this manner, although large and/or increasing numbers of logical drives will still reduce TPA space because of the need to store Allocation Vector information in Common Memory.
To prepare such a system, simply edit the needed Bios files if necessary with particular emphasis on the `DEF-xx.LIB` file where the following equates must be set as:
| Equate | |
| :---: | :--- |
| `MOVCPM` | Set to `NO` |
| `BANKED` | Set to `YES` |
| `ZSDOS2` | Set to `NO` |
Since banked memory MUST be available for this type of installation, you will probably want the Fast Warm Boot feature available to maximize system performance. To activate this option, set the following equate as:
| Equate | |
| :---: | :--- |
| `FASTWB` | Set to `YES` |
When the editing is complete, assemble the Bios to a Microoft `.REL` file with an appropriate assembler such as ZMAC and build an Image system with BPBUILD (see 6.1) changing the Bios file name in menu 1 to the name of the newly created Bios file. Next, configure the default conditions if necessary with BPCNFG (see 6.2) and you are ready to activate the new system in the same manner as all Image files by calling LDSYS with the Image file argument as:
| Command | |
| :---: | :--- |
| `LDSYS BBSYS` | where BBSYS.IMG is your Image File Name |
As with the completely Non-Banked system described above in Section 4.2, no new requirements are established for a Startup file over that used for the initial Boot System, since both the Command Processor and Disk Operating System are unbanked, and no data areas needed by application programs are placed in the System Bank. As with all Image Files, additional features such as full Bios Error Messages, more extensive Floppy Disk Formats and RAM drive may generally be included in the System definition prior to assembly since the size constraints of Boot Track systems do not apply.
## 4.4 Fully Banked Image Installation
To create a system taking maximum advantage of banked memory, a special banked Operating System and Command Processor are needed. These have been furnished in initial form with this package as `ZSDOS20.ZRL` and `Z40.ZRL` respectively. They use the Banking features of B/P Bios and locate the maximum practicable amount of executable code and data in the System Bank. Of significant importance to maximizing the Transient Program Area is that the Drive Allocation Bit maps are placed in the System Bank meaning that adding large hard drives, or multiple drives produce only minimal expansion to the resident portion of the Bios.
NOTE: The latest versions are `ZS203.ZRL`, `ZS227G.ZRL`, and `Z41.ZRL` as included in the public release of B/P Bios. See also sections 7 and 8.
A Fully banked Bios is created by editing the B/P Bios files as needed to customize the system to your desires. Insure that the following `DEF-xx.LIB` equates are set as:
| Equate | |
| :---: | :--- |
| `MOVCPM` | Set to `NO` |
| `BANKED` | Set to `YES` |
| `ZSDOS2` | Set to `YES` |
Assemble the resultant B/P Bios to a Microsoft `.REL` file, Build an Image file with BPBUILD (see 6.1) and configure the produced Image file with BPCNFG (see 6.2). When you are confident that all default settings have been made, activate the file by entering:
| Command | |
| :---: | :--- |
| `LDSYS FBANKSYS` | where FBANKSYS.IMG is your Image File Name |
Several differences may exist in the Startup file used for a Fully banked system. Generally the changes amount to deleting items such as a File Stamp module for the Non-banked ZSDOS1 which is not necessary with the fully-banked ZSDOS 2 and Z40. Only the type of clock need be specified for ZSDOS2. Furthermore, since the Z40 Command Processor Replacement contains most commonly-used commands gathered from a number of Resident Command Processor (RCP) packages, there is normally no need to load an RCP. A simple Startup file found adequate during development of the fully-banked B/P system is:
| Command | Explanation |
| :--- | :--- |
| `ZSCFG2 CB` | Set ZSDOS 2 clock to Bios+4EH |
| `LDR SYS.FCP,SYS.NDR` | Load ZCPR 3 Environment segments for Flow Control and Named Dirs |
| `IOPINIT` | Initialize the IO Processor Pkg |
| `TD S` | Prompt for Date and Time, Set Clk / Alternatives are to use `TDD` (6.21) or `SETCLOK` (6.18) |
| `IF ~EX MYTERM.Z3T` | If the file `MYTERM.Z3T` does Not exist... |
| `TCSELECT MYTERM.Z3T` | ..select which terminal you have creating a `MYTERM.Z3T` file |
| `FI` | ...end if the `IF` |
| `LDR MYTERM.Z3T` | Load the Terminal Definition data |
Since the requirements for a fully-banked system differ significantly from a non-banked one, we recommend that you use a different name for the Startup file. For example, `STARTUP.COM` is the default name used with Boot Track systems for initial operation, and with Non-banked Image Files, while STARTB may be a suitable name for the script to be executed upon loading a fully-banked system. The name of the desired Startup file may be easily altered in either Boot Track or Image systems from Option 1 in BPCNFG (see 6.2).
An option available to start from a large Image File is to configure a Startup file for execution by the Boot Track system containing a single command. The command would simply invoke LDSYS with the desired Banked Image File as an argument such as:
| Command | |
| :---: | :--- |
| `LDSYS BANKSYS` | where BANKSYS.IMG is your Image file |
In this case, none of the normal initialization sequences cited above would be executed by the Boot Track system, and only those contained in the Startup for `BANKSYS.IMG` would occur. Other options abound and are left to the community to invent new combinations and sequences.
## 4.5 In Case of Problems...
While We attempted to outline procedures for the majority of installations we considered feasible, there may be occasions where you inadvertently find yourself in a position where you seem to have lost the ability to get your system up and running.
**PROBLEM:** When loading an `.IMG` file with LDSYS, the screen displays the LDSYS banner, system addresses, and halts with the last screen displaying: "...loading banked system".
_SOLUTION:_ Something is not set correctly in the Bios, since all lines after the last one displayed are printed from the newly-loaded Bios. One of the most common causes for this problem is incorrect bank number settings. Use the hidden selection in Menu 1 of BPCNFG (see 6.2) to verify that the correct bank numbers have been set for TPA and SYStem banks. Another common cause of this problem is incorrect settings for the Console port, or a setting in the IOBYTE which directs Console data to a device other than the one intended. Use Menu 2 BPCNFG to properly set the IOBYTE and the console parameters.
**PROBLEM:** You boot from or load a B/P Bios system from a Hard Drive, and immediately after starting, the system attempts to log onto Floppy Drive 0.
_SOLUTION:_ The most common cause for this symptom is that the desired Hard Drive and Floppy Drive definitions were not swapped to define a Hard Drive Partition as the A: drive. Use BPCNFG (see 6.2), Menu 5 to exchange drives to the desired configuration. A similar situation may exist where a Hard Drive is activated immediately after booting when a Floppy drive is desired as the A: Drive.
**PROBLEM:** The computer seems to boot satisfactorily, but after a few programs or any program which executes a Warm Boot (or entering Control-C), the system goes into "Never-never Land" and must be reset.
_SOLUTION:_ This symptom is most often caused by an inability to access and load the Command Processor. This is most probably caused by assembling B/P Bios with the FASTWB equate in `DEF-xx.LIB` set to YES when the system contains no extended memory, or incorrect settings of the Bank Numbers. To check Bank Number settings, use the hidden function in BPCNFG, Menu 1 (see 6.2).
**PROBLEM:** When doing a Cold Boot from a Hard Drive (from Power up or Reset), the system goes to a Floppy Drive before displaying the initial sign on messages, and remains logged on the Floppy.
_SOLUTION:_ This is most often due to your forgetting to run the HDBOOT utility on the Hard Drive Boot system after applying it with BPSYSGEN. Normally, systems created with MOVxSYS contain a Floppy Disk Boot sector which will load the initial Operating System from a Floppy. HDBOOT (see 6.9) modifies this record on a specified Hard Drive Unit so that the Operating System is loaded from a Hard Drive. Run HDBOOT on the Desired Hard Drive, then use BPCNFG (see 6.2) to insure that the logical drives are positioned as desired (Menu 5).
**PROBLEM:** When Booting, the system console either doesn't display anything, or prints strange characters.
_SOLUTION:_ This is most often due to incorrect settings for the current Console, most probably the Data rate, or CPU Clock Frequency. Boot from a good system, then use BPCNFG (see 6.2) to adjust the settings on the problem system. Pay particular attention to Menu 1 (CPU Clock Rate) and Menu 2 (IOBYTE and Serial Port Data Rates).
**PROBLEM:** When running a fully-banked system with ZSDOS 2, some programs seem to "hang" or "lock up" the system on exit.
_SOLUTION:_ One of the most common sources of this symptom is with the application program where the author used code which assumes that the BDOS and Command Processor are of a certain size, or bear a fixed relationship to the addresses in page 0. You may experience this most often when using an IMG system built by answering YES to the Autosizing query in BPBUILD (see 6.1). To compensate for such ill-behaved programs, you may use a two-step build process as:
1. Use BPBUILD to create an IMG file answering YES to Autosizing on exit. This maximizes TPA placing the Resident Bios as high as possible in memory.
2. Execute BPBUILD again with an argument of the name you gave to the file just created above. This loads the definition from the IMG file. Immediately exit with a Carriage Return, and answer NO to Autosizing, and YES to placing system segments at standard locations. This procedure keeps the Bios address constant, but will move the starting addresses of BDOS and Command Processor down, if possible, to simulate "standard" sizes used in CP/M 2.2.

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -1,37 +0,0 @@
# 7 ZSDOS Version 2
Version 2 of ZSDOS is currently in a developmental phase. The version provided with this package is preliminary and should not be considered a final work. Be sure you back up any files which you don't mind sacrificing, and please let us know in as much detail as possible any problems you experience.
In addition to the ZSDOS Version call (Function 48) returning 20H signifying ZSDOS2, three new Operating System functions have been added. They are:
| Function 46 | Return Disk Free Space |
| ---: | :--- |
| Enter: | C = 46 (function #) |
| | E = Drive # (A=0..P=15) |
| Exit: | A = 0 if Ok, <>0 if Error |
| | Disk Free Space in kilobytes is placed in DMA+0 (LSB) thru DMA+3 (MSB) |
This function returns Disk Free Space from fully-banked systems where the ALV buffers are not directly accessible by applications programs. It **MUST** be used to reliably determine free space since there is no way for programs to ascertain which System Bank (if more than one) contains the Allocation Bit Map. For most reasonably-sized systems, only the lower two or three bytes will be used, but four bytes are allocated to accommodate a maximally-sized system.
| Function | Return Environment Descriptor Address |
| ---: | :--- |
| Enter: | C = 49 (function #) |
| Exit: | HL = Address of Env Desc. |
This function returns the address of a ZCPR 3.4 "type" Environment Descriptor needed in B/P Bios systems. Rather than rely on the Command Processor inserting the ENV address into application programs upon execution, this function may be used to reliably acquire the ENV address at any time.
| Function 152 | Parse File Name |
| ---: | :--- |
| Enter: | C = 152 (function #) |
| | DE = Pointer to dest FCB |
| | DMA --> start of parse string |
| Exit: | A = Number of "?" in fn.ft |
| | DE = points to delimiter |
| | FCB+15 will be 0 if parse Ok, 0FFH if errors occurred |
This function may be used to replace Z3LIB library routines in a more robust manner and produce consequently smaller applications programs. It is fully compliant with ZCPR 3.4 parse specifications.
## 7.1 NOTES Spring 2001
The versions of ZSDOS2 (the Banked Z-System DOS) and Z4x Banked Command Processor Replacement have been modified over the years. The manual may refer to specific versions, or by generic names. As of the Spring 2001 release under the GNU General Public License, Two versions of ZSDOS2 are provided; `ZS203.ZRL` which contains code for hashed directories, and `ZS227G,ZRL` which does not.

View File

@@ -1,10 +0,0 @@
# 8 ZCPR Version 4
`Z40.ZRL` is a consolidation of ZCPR34 and many of the RCP features commonly in use, modified by the need to bank as much of the Command Processor as possible. When Z40 is used in a Fully-Banked system, you may not need much of, or any Resident Command Processor with your system. Z40 relys on ZSDOS2 and will **NOT** work without it since the Command Line Parser and disk free space calculations have been removed in favor of ZSDOS2 services. Additionally, the prompt line displays the time and will only function correctly if he ZSDOS2 clock is enabled. Comments on how these new System components work would be appreciated.
More complete documentation is provided in the `Z40.HLP` files included with the distribution diskettes, and a list of active functions is available with the H command at the prompt. To read the On-line help files, use `HELP.COM` available for downloading from any Z-Node.
## 8.1 NOTES Spring 2001
The versions of ZSDOS2 (the Banked Z-System DOS) and Z4x Banked Command Processor Replacement have been modified over the years. The manual may refer to specific versions, or by generic names. As of the Spring 2001 release under the GNU General Public License, the latest version of the Z4x Processor Replacement is `Z41.ZRL` which features a small amount of tailoring. A new utility; **`CONFZ4.COM`** is available for this purpose.

View File

@@ -1,100 +0,0 @@
# GLOSSARY
**Application Programs**
In contrast to utility programs (see), application programs or applications are larger programs such as word processors which function interactively with the user.
**BDOS**
Basic Disk Operating System. The machine-independent, but usually processor-dependent, program which controls the interface between application programs and the machine-dependent hardware devices such as printers, disk drives, clocks, etc. It also establishes the concept of files on media and controls the opening, reading, writing, and closing of such constructs.
**BGii**
BackGrounder ii from Plu*Perfect Systems, a windowing task-switching system for CP/M users with hard or RAM disks.
**BIOS**
Basic Input/Output System. Machine-dependent routines which perform actual peripheral device control such as sending and receiving characters to the console, reading and writing to disk drives, etc.
**Bit**
BInary digiT. An element which can have only a single on or off state.
**Bit Map**
An array of bits used to represent or map large arrays of binary information in a compact form.
**Boot**
The term used for the starting sequence of a computer. Generally applies to starting from a "Cold," or power-off state, and includes the loading of Operating System, and configuration steps.
**Byte**
A grouping of eight bits.
**CPR**
Command Processor Replacement. Replaces CCP (see below). Example: ZCPR
**CCP**
Console Command Processor. The portion of the operating system that interprets user's commands and either executes them directly or loads application programs from disk for execution. The CCP may be overwritten by applications, and is reloaded by the "Warm Boot" function of the BIOS.
**Checksum**
An value which arithmetically summarizes the contents of a series of memory locations, and used to check the current contents for errors.
**Clock Driver**
A software link between a Non-banked ZSDOS and the clock on your system. The clock driver allows ZSDOS and its utilities to read the clock which is normally inherent in the B/P Bios.
**Command Script**
Sometimes called simply scripts, command scripts allow you to create a single command which issues other commands to perform a unique set of actions. CP/M submit files are one kind of command script familiar to all CP/M users. ZCPR also offers more sophisticated types of scripts such as aliases and command files (e.g., ALIAS.CMD).
**DateStamper**
A software package developed by Plu*Perfect Systems to allow time and date stamping of files. The Boot System uses an external module in the file LDDS.COM to implement DateStamper, while ZSDOS2 automatically supports this stamping method. DateStamper is unique among file stampers for microcomputers for two reasons: first, it maintains all file stamps within a file; second, it maintains stamps for create, access, and modify time/date for each file.
**DDT**
Dynamic Debugging Tool. A utility distributed with CP/M 2.2 which can display, disassemble, or alter disk files or areas of memory using opcodes or hexadecimal values.
**DOS**
Disk Operating System. Often used term for the BDOS, but generally refers to the aggregate of CCP, BDOS and BIOS.

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,83 +0,0 @@
***********************************************************************
*** ***
*** R o m W B W ***
*** ***
*** Z80/Z180 System Software ***
*** ***
***********************************************************************
This directory ("Doc/CPM") is part of the RomWBW System Software
distribution archive. It contains documentation for the CP/M and
CP/M work-alike operating system components of the system.
CPM Manual ("CPM Manual.pdf")
-----------------------------
The original DRI CP/M 2.x Operating System Manual. This should be
considered the primary reference for system operation. The section
on CP/M 2 Alteration can be ignored since this work has already been
completed as part of the RomWBW distribution.
CPM3 Command Summary ("CPM3 Command Summary.pdf")
CPM3 Programmer's Guide ("CPM3 Programmers Guide.pdf")
CPM3 System Guide ("CPM3 System Guide.pdf")
CPM3 User's Guide ("CPM3 Users Guide.pdf")
------------------------------------------------------
The original DRI CP/M 3.0 Operating System Documentation Set. This
should be considered the primary reference for CP/M 3 system operation.
NZCOM, Z3PLUS, and replace ZCPR3.3 Documentation
------------------------------------------------
NZCOM operating system operation manual. ("NZCOM Users Manual.pdf")
Z3PLUS operating system operation manual. ("Z3PLUS Users Manual.pdf")
Z-System User Guide ("Z-System User Guide.pdf")
ZCPR3.3 Users Guide ("ZCPR3.3 Users Guide.pdf")
QP/M 2.7 Installation Guide and Supplements ("qpm27.pdf")
QP/M 2.7 Interface Guide ("qdos27.pdf")
QP/M 2.7 Features and Facilities ("qcp27.pdf")
--------------------------------------------
Official documentation set for QP/M 2.7 from original QP/M distribution.
ZCPR Manual ("ZCPR Manual.pdf")
-------------------------------
ZCPR is the command proccessor portion of Z-System. This is the
manual for ZCPR 1.x as included in RomWBW. The installation
instructions can be ignored since that work has already been
completed as part of the RomWBW distribution.
ZCPR D&J Manual ("ZCPR-DJ.doc")
-------------------------------
ZCPR D&J User Manual. This manual supplements the ZCPR Manual.
ZSDOS Manual ("ZSDOS Manual.pdf")
ZSDOS Programmer's Manual ("ZSDOS Programmers Manual.pdf")
---------------------------------
ZSDOS is the DOS portion of Z-System. This is the manual for ZSDOS
1.x as included in RomWBW. The installation instructions can be
ignored since that work has already been completed as part of the
RomWBW distribution.
The ZSDOS Programmer's Manual is also included courtesy of Wayne
Hortensius and Randy Merkel. This manual includes documentation of the
ZSDOS BDOS API enhancements.
ZPM3 ("ZPM3.txt")
-----------------
A Z80 coded CP/M 3.0 compatible BDOS replacement with ZCPR support.
This minimal documentation is all that is provided with ZPM3.
-- WBW 8:38 AM 6/6/2025

Some files were not shown because too many files have changed in this diff Show More