Compare commits

...

58 Commits

Author SHA1 Message Date
Justin Waymire
a94560458e added Pegasus 2024-11-15 00:06:53 -06:00
Wayne Warthen
5e0f9b3e89 Bump Version 2024-11-13 11:14:33 -08:00
Wayne Warthen
c60d46d773 Enable SD by Default in RCZ80_std Config
- An additional SD Module has been developed by Stephen Cousins.  Since this module will be distributed as a kit, I think it makes sense to enable support by default.  It will do nothing on systems without an SD Module.
2024-11-13 10:47:54 -08:00
Wayne Warthen
72527366cb Follow up to Initial NVRAM Changes
See notes in Issue #451
2024-11-08 16:41:30 -08:00
Wayne Warthen
de426b9833 Merge pull request #453 from kiwisincebirth/map/switches
Initial NVRAM Changes,
2024-11-08 15:04:26 -08:00
Wayne Warthen
c7923bbcff Miscellaneous Disk Image Cleanup
- Per Mark Pruden, corrected NZCOM user area specification for CP/M 2.2 files.
- Added some DRI files to CP/M 3 that are documented in the CP/M 3 documentation (LIB, LINK, MAC, RMAC, XREF).  They are duplicated in CP/M 2.2 image, so this should be reviewed at some point.
- Added XREF to CP/M 2 disk image for consistency with CP/M 3.
- Updated Catalog.md per Mark Pruden to eliminate obsolete column from table.
2024-11-08 09:37:21 -08:00
Mark Pruden
29b2bec1e7 Initial NVRAM Changes, for HBIOS including public API, sysconfig app, build changes 2024-11-08 22:24:01 +11:00
Wayne Warthen
e97c0d7288 Dump ROM Disk Image Directories
- Print a catalog of the ROM disk images during the build process to make it easier too verify and determine how full they are.
2024-11-07 18:47:06 -08:00
Wayne Warthen
68d88be975 Merge branch 'master' of https://github.com/wwarthen/RomWBW 2024-11-02 12:56:55 -07:00
Wayne Warthen
cecb72f20d Update Makefile
Print build execution time
2024-11-02 12:56:51 -07:00
Wayne Warthen
d7225f40cd Update commit.yml
Undo execution timing
2024-11-02 12:23:17 -07:00
Wayne Warthen
99bf1799a6 Update commit.yml
Add build execution time measurement.
2024-11-02 12:02:57 -07:00
Wayne Warthen
3470b9a656 Fix WRERR Routine in XModem per HubertH
- WRERR was putting the CAN character in register C to send.  However, it needs to be in register A.  Fixed here.  Credit and thanks to HubertH for finding this and providing the fix.
2024-11-02 11:26:37 -07:00
Wayne Warthen
803d1b2d4a Update Makefile.inc
- Missed file in prior commit.
2024-10-27 17:35:23 -07:00
Wayne Warthen
a410e81689 Miscellaneous
- Added "Character Device Mapping" sub-section to each of the Operating System sections of the User Guide.  This attempts to clarify how character devices will appear within the different operating system environments.
- Generate a disk image "catalog" file for each disk image generated during build.  This simply helps confirm what files wound up on each disk image and the space used/free.
- Make the CP/M 2.2 files added to NZCOM and ZSDOS consistent.
2024-10-27 17:07:42 -07:00
Wayne Warthen
8b299428b3 Merge branch 'master' of https://github.com/wwarthen/RomWBW 2024-10-27 13:17:42 -07:00
Wayne Warthen
76567d1e53 Disk Image Processing Tweaks
- Restore copying PIP application to ZSDOS and NZCOM disks.
- The floppy version of some supplemental disks were not being generated due to a typo.
- The ReadMe.txt file for some supplemental disks was not being added to the disk.
2024-10-27 13:17:39 -07:00
Wayne Warthen
0683b0f483 Merge pull request #450 from kiwisincebirth/map/readme
Updated attributions
2024-10-27 11:08:55 -07:00
Mark Pruden
b802915067 Updated attributions 2024-10-27 17:52:11 +11:00
Wayne Warthen
497fa3cdf3 Fix File Sort Order
- The file sort order being forced in the disk image generation process was causing a problem with achieving binary exact build results.  Not sure why it was the way it was, but corrected now.
2024-10-26 16:53:47 -07:00
Wayne Warthen
5ddde9cee2 Remove Obsolete References to UTILS 2024-10-26 16:04:10 -07:00
Wayne Warthen
e946116cc8 Merge pull request #449 from kiwisincebirth/map/z3plus
Z3PLUS Distro - Initial Addition of the Z3PLUS Distro
2024-10-26 15:10:35 -07:00
Mark Pruden
e7fb74b73f Minor correction to place help and Doc files consistently in U10 2024-10-25 23:12:38 +11:00
Mark Pruden
683121ace2 Reconsidered the pubic naming NZ3PLUS, chnaged section headings. 2024-10-25 19:02:10 +11:00
Mark Pruden
a3a3b20ded Z3PLUS Distro - Inital Additon of the Distro Image 2024-10-25 12:15:57 +11:00
Wayne Warthen
ba25ff879a Move COPY Application to Common
- COPY application was duplicated in multiple disk images.  Moved to a single copy in Common/Z.
2024-10-23 19:39:59 -07:00
Wayne Warthen
93f1964052 Fix BPBIOS File Duplicates 2024-10-23 15:44:53 -07:00
Wayne Warthen
33df7fab30 Regen Documentation 2024-10-23 15:06:26 -07:00
Wayne Warthen
65fa595602 Disk Image Organization Updates (Issue #440)
- Move SALIAS and related files to Common/Z3
- Move ALIAS and related files to Common/Z3
- Remove Source/ZSDOS/Distribution folder because the files were duplicated in the ZSDOS disk image
2024-10-23 15:03:52 -07:00
Wayne Warthen
355902fe25 Merge pull request #448 from kiwisincebirth/map/shared-z-file
Consolidation of Shared Z and Z3 files into Common
2024-10-23 12:13:45 -07:00
Wayne Warthen
19d1547606 Merge pull request #447 from kiwisincebirth/map/disk-optimise
Merged /Common/Utils into Common/All, and reorganised.
2024-10-23 12:08:28 -07:00
Mark Pruden
582b73cee0 Consolidated duplicate files - from NZCOM and ZPM 2024-10-23 14:09:39 +11:00
Mark Pruden
063a15c338 Consolidated duplicate files - ZCNFG 2024-10-23 14:08:58 +11:00
Mark Pruden
830195cd42 Attributions 2024-10-23 12:32:46 +11:00
Mark Pruden
1fe47c4100 Merged /Common/Utils into Common/All, and reorganised.
Created U10 U14 U15 directories, since dome of the DOC files were quite large, and on space constrained floppies, the docs can be removed. Note: this commit also made (non impacting changes) to the fd_* files (/Apps) by adding commented lines, to highlight files that could potentially be added back
2024-10-23 12:29:07 +11:00
Wayne Warthen
0c7dfa0ae7 Minor ReadMe Updates -- Issue #440 2024-10-22 16:32:38 -07:00
Wayne Warthen
0113852f7b Various Cleanup - Issue #440
- Removed duplicate files in disk image process
- Moved all applications to individual folders
2024-10-21 15:43:11 -07:00
Wayne Warthen
dde7a46b87 Merge pull request #445 from kiwisincebirth/map/disk-catalog
Significant Rewrite to the Disk Catalog
2024-10-20 19:09:00 -07:00
Mark Pruden
22290294ef Last Change. Merged shared files definitions into sections based on type of file, rather than location on disk 2024-10-20 22:24:15 +11:00
Mark Pruden
3f5a3683f7 Significant Rewrite to the Disk Catalog 2024-10-20 12:16:51 +11:00
Wayne Warthen
dbbfd5dfcc Merge pull request #444 from kiwisincebirth/map/image-file-defs
Fixes to Imgae file Defs, and move test files, and readme files
2024-10-19 16:26:33 -07:00
Mark Pruden
55fa39730a Remove CPM3 Loaders from ZPM3. remove sample audio from floppy. 2024-10-20 09:37:30 +11:00
Mark Pruden
610c0f7856 Fixes to Imgae file Defs, and move test files, and readme files 2024-10-20 09:20:48 +11:00
Wayne Warthen
1505c995e3 Bump Version 2024-10-18 10:02:50 -07:00
Wayne Warthen
9ba6627da8 Merge pull request #443 from dinoboards/dean/fixes-for-int-handling-of-msx-keyboard
msx-keyboard: corrected implementation of msx-keyboard's tick hook
2024-10-18 09:47:27 -07:00
Wayne Warthen
0558e84e09 Merge pull request #442 from kiwisincebirth/map/publish-cpm22
Publish the CPM2.2 CPM.SYS Binary Files in a new Binary/CPM22 folder
2024-10-18 09:44:21 -07:00
Dean Netherton
fa45185945 msx-keyboard: corrected implementation of msx-keyboard's integration to the timer tick handler 2024-10-18 18:04:54 +11:00
Mark Pruden
99265f03d1 QPM Copy SYS Files to the Binary Distribution Folder 2024-10-18 11:45:39 +11:00
Mark Pruden
a2fcab4045 Minor Documentation fix in Readme File 2024-10-18 10:49:37 +11:00
Mark Pruden
b3b4426a46 Publish the ZSDOS .SYS Binary Files in a new Binary/ZSDOS folder 2024-10-18 10:42:38 +11:00
Wayne Warthen
4ff6961539 Merge pull request #441 from kiwisincebirth/map/diskio-hbios-slice
CPM3 DiskIO routines now use HBIOS EXT_SLICE function during Drive SEL
2024-10-17 11:10:38 -07:00
Mark Pruden
72fcee24f3 Publish the CPM2.2 CPM.SYS Binary Files in a new Binary/CPM22 folder 2024-10-17 15:42:41 +11:00
Mark Pruden
8e56b270c4 CPM3 DiskIO routines now use HBIOS EXT_SLICE function during Drive Select 2024-10-17 13:39:31 +11:00
Wayne Warthen
42e50889be Refactor ROM Loader Baud Rate Change
- The baud rate change functionality in ROM Loader was refactored to reduce it's size and be consistent with the approach used in the MODE command.
2024-10-16 12:59:13 -07:00
Wayne Warthen
b3a250b63f Merge pull request #439 from kiwisincebirth/map/cpm-loader
CPM3 Loader Using New HBIOS SLICE Function
2024-10-15 10:32:12 -07:00
Wayne Warthen
30d79fe7f7 Merge pull request #438 from kiwisincebirth/map/hbios-slice0
Fix: If the Slice=0 and No CPM partition
2024-10-15 10:28:29 -07:00
Mark Pruden
221b1b408c CPM3 Loader Using New HBIOS SLICE Function 2024-10-15 15:40:56 +11:00
Mark Pruden
1f383a3639 Fix: If the Slice=0 and No CPM partition, boot the disk, ignore all Calculations and checks. 2024-10-15 11:09:49 +11:00
398 changed files with 12359 additions and 3360 deletions

3
.gitignore vendored
View File

@@ -22,7 +22,10 @@ Binary/**/*.mym
Binary/**/*.pt3
!Binary/CPNET/NetBoot/cpnos-wbw.sys
Source/Images
Source/RomDsk
Source/**/eeprom
Binary/Apps/copysl.doc
Source/Apps/Assign.com
Source/Apps/FDU/FDU.COM
Source/Apps/Format.com

4
Binary/CPM22/Clean.cmd Normal file
View File

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

7
Binary/CPM22/Makefile Normal file
View File

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

23
Binary/CPM22/ReadMe.txt Normal file
View File

@@ -0,0 +1,23 @@
***********************************************************************
*** ***
*** 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

@@ -12,6 +12,9 @@ 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,6 +1,6 @@
TOOLS = ../Tools
MOREDIFF := $(shell $(TOOLS)/unix/casefn.sh *.img *.rom *.com *.eeprom)
SUBDIRS = Apps CPM3 ZPM3 CPNET
SUBDIRS = Apps CPM22 CPM3 QPM ZSDOS ZPM3 CPNET
include $(TOOLS)/Makefile.inc

BIN
Binary/PEGASUS_std.upd Normal file

Binary file not shown.

4
Binary/QPM/Clean.cmd Normal file
View File

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

7
Binary/QPM/Makefile Normal file
View File

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

21
Binary/QPM/ReadMe.txt Normal file
View File

@@ -0,0 +1,21 @@
***********************************************************************
*** ***
*** 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

@@ -163,9 +163,32 @@ indicates which file targets each of the Propeller board variants:
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.

BIN
Binary/Z80RETRO_std.upd Normal file

Binary file not shown.

4
Binary/ZSDOS/Clean.cmd Normal file
View File

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

7
Binary/ZSDOS/Makefile Normal file
View File

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

23
Binary/ZSDOS/ReadMe.txt Normal file
View File

@@ -0,0 +1,23 @@
***********************************************************************
*** ***
*** 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

@@ -30,10 +30,13 @@ 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 User's Manual ("NZCOM Users Manual.pdf")
----------------------------------------------
NZCOM, Z3PLUS, and replace ZCPR3.3 Documentation
------------------------------------------------
NZCOM operating system operation manual.
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")

Binary file not shown.

File diff suppressed because it is too large Load Diff

Binary file not shown.

View File

@@ -42,7 +42,12 @@ Version 3.5
- MAP: Added new HBIOS function EXT_SLICE (orginally SYSGET_DIOMED)
- MAP: ROMLDR now uses EXT_SLICE to get Slice Sector for boot
- MAP: CBIOS now uses EXT_SLICE during drive selection
- MAP: CPM3 Boot Loader, and BIOS (drive select) now use EXT_SLICE
- M?R: Added REBOOT application
- MAP: Significant improvement in Disk Catalog document
- MAP: Added Disk Image for the Z3PLUS (Z-System for CP/M-Plus) os.
- H?H: Fix XModem 12.3 WRERR to put CAN char in proper register to send.
- MAP: Initial NVRAM configuration infrastructure
Version 3.4
-----------

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -28,4 +28,4 @@ dist:
$(MAKE) --directory Source clean
distlog:
$(MAKE) dist 2>&1 | tee make.log
time -p $(MAKE) dist 2>&1 | tee make.log

View File

@@ -3,7 +3,7 @@
**RomWBW ReadMe** \
Version 3.5 \
Wayne Warthen ([wwarthen@gmail.com](mailto:wwarthen@gmail.com)) \
13 Oct 2024
08 Nov 2024
# Overview
@@ -198,8 +198,9 @@ let me know if I missed you!
- Martin R has provided substantial help reviewing and improving the
User Guide and Applications documents.
- Mark Pruden has also contributed a great deal of content to the User
Guide as well as the COPYSL utility.
- Mark Pruden has also contributed a great deal of content to the Disk
Catalog, User Guide as well as contributing the disk image for the
Z3PLUS operating system, and the COPYSL utility.
- Jacques Pelletier has contributed the DS1501 RTC driver code.

View File

@@ -1,6 +1,6 @@
RomWBW ReadMe
Wayne Warthen (wwarthen@gmail.com)
13 Oct 2024
08 Nov 2024
@@ -199,8 +199,9 @@ let me know if I missed you!
- Martin R has provided substantial help reviewing and improving the
User Guide and Applications documents.
- Mark Pruden has also contributed a great deal of content to the User
Guide as well as the COPYSL utility.
- Mark Pruden has also contributed a great deal of content to the Disk
Catalog, User Guide as well as contributing the disk image for the
Z3PLUS operating system, and the COPYSL utility.
- Jacques Pelletier has contributed the DS1501 RTC driver code.

View File

@@ -2,50 +2,37 @@
setlocal
set TOOLS=..\..\Tools
set APPBIN=..\..\Binary\Apps
set PATH=%TOOLS%\tasm32;%TOOLS%\zxcc;%PATH%
set TASMTABS=%TOOLS%\tasm32
set CPMDIR80=%TOOLS%/cpm/
call :asm syscopy || exit /b
call :asm assign || exit /b
call :asm format || exit /b
call :asm talk || exit /b
call :asm mode || exit /b
call :asm rtc || exit /b
call :asm timer || exit /b
call :asm rtchb || exit /b
zxcc Z80ASM -SYSGEN/F || exit /b
pushd XM && call Build || exit /b & popd
pushd FDU && call Build || exit /b & popd
pushd Tune && call Build || exit /b & popd
pushd FAT && call Build || exit /b & popd
pushd Test && call Build || exit /b & popd
pushd ZMP && call Build || exit /b & popd
pushd ZMD && call Build || exit /b & popd
pushd Dev && call Build || exit /b & popd
pushd VGM && call Build || exit /b & popd
pushd cpuspd && call Build || exit /b & popd
pushd reboot && call Build || exit /b & popd
pushd Survey && call Build || exit /b & popd
pushd HTalk && call Build || exit /b & popd
pushd BBCBASIC && call Build || exit /b & popd
pushd copysl && call Build || exit /b & popd
copy *.com %APPBIN%\ || exit /b
call :build syscopy || exit /b
call :build assign || exit /b
call :build format || exit /b
call :build talk || exit /b
call :build mode || exit /b
call :build rtc || exit /b
call :build timer || exit /b
call :build sysgen || exit /b
call :build XM || exit /b
call :build FDU || exit /b
call :build Tune || exit /b
call :build FAT || exit /b
call :build Test || exit /b
call :build ZMP || exit /b
call :build ZMD || exit /b
call :build Dev || exit /b
call :build VGM || exit /b
call :build cpuspd || exit /b
call :build reboot || exit /b
call :build Survey || exit /b
call :build HTalk || exit /b
call :build BBCBASIC || exit /b
call :build copysl || exit /b
goto :eof
:asm
echo.
echo Building %1...
tasm -t80 -g3 -fFF %1.asm %1.com %1.lst || exit /b
goto :eof
:asm180
echo.
echo Building %1...
tasm -t180 -g3 -fFF %1.asm %1.com %1.lst || exit /b
:build
echo Building %1
pushd %1 && call Build || exit /b & popd
goto :eof

View File

@@ -1,24 +1,32 @@
@echo off
setlocal
if exist *.bin del *.bin
if exist *.com del *.com
if exist *.lst del *.lst
if exist *.hex del *.hex
if exist *.prn del *.prn
call :clean syscopy || exit /b
call :clean assign || exit /b
call :clean format || exit /b
call :clean talk || exit /b
call :clean mode || exit /b
call :clean rtc || exit /b
call :clean timer || exit /b
call :clean sysgen || exit /b
call :clean XM || exit /b
call :clean FDU || exit /b
call :clean Tune || exit /b
call :clean FAT || exit /b
call :clean Test || exit /b
call :clean ZMP || exit /b
call :clean ZMD || exit /b
call :clean Dev || exit /b
call :clean VGM || exit /b
call :clean cpuspd || exit /b
call :clean reboot || exit /b
call :clean Survey || exit /b
call :clean HTalk || exit /b
call :clean BBCBASIC || exit /b
call :clean copysl || exit /b
pushd XM && call Clean || exit /b 1 & popd
pushd FDU && call Clean || exit /b 1 & popd
pushd Tune && call Clean || exit /b 1 & popd
pushd FAT && call Clean || exit /b 1 & popd
pushd Test && call Clean || exit /b 1 & popd
pushd ZMP && call Clean || exit /b 1 & popd
pushd ZMD && call Clean || exit /b 1 & popd
pushd Dev && call Clean || exit /b 1 & popd
pushd VGM && call Clean || exit /b 1 & popd
pushd cpuspd && call Clean || exit /b 1 & popd
pushd reboot && call Clean || exit /b 1 & popd
pushd Survey && call Clean || exit /b 1 & popd
pushd HTalk && call Clean || exit /b 1 & popd
pushd BBCBASIC && call Clean || exit /b 1 & popd
pushd copysl && call Clean || exit /b 1 & popd
goto :eof
:clean
pushd %1 && call Clean || exit /b & popd
goto :eof

View File

@@ -1,9 +1,5 @@
OBJECTS = sysgen.com syscopy.com assign.com format.com talk.com \
mode.com rtc.com timer.com rtchb.com
SUBDIRS = HTalk XM FDU FAT Tune Test ZMP ZMD Dev VGM cpuspd reboot Survey BBCBASIC copysl
DEST = ../../Binary/Apps
SUBDIRS = HTalk XM FDU FAT Tune Test ZMP ZMD Dev VGM cpuspd reboot Survey BBCBASIC copysl \
sysgen syscopy assign format talk mode rtc timer
TOOLS =../../Tools
include $(TOOLS)/Makefile.inc
USETASM = 1

View File

@@ -1,10 +1,8 @@
@echo off
setlocal
set TOOLS=..\..\..\..\Tools
set TOOLS=../../../../Tools
set PATH=%TOOLS%\zxcc;%PATH%
set CPMDIR80=%TOOLS%/cpm/
zxcc M80 -=2piotst/l || exit /b

View File

@@ -1,42 +1,31 @@
@echo off
setlocal
set TOOLS=../../../Tools
set APPBIN=..\..\Binary\Apps
set TOOLS=..\..\..\Tools
set PATH=%TOOLS%\tasm32;%TOOLS%\zxcc;%PATH%
set TASMTABS=%TOOLS%\tasm32
set CPMDIR80=%TOOLS%/cpm/
pushd DMAmon && call Build || exit /b & popd
pushd tstdskng && call Build || exit /b & popd
pushd inttest && call Build || exit /b & popd
pushd ppidetst && call Build || exit /b & popd
pushd ramtest && call Build || exit /b & popd
pushd I2C && call Build || exit /b & popd
pushd rzsz && call Build || exit /b & popd
pushd vdctest && call Build || exit /b & popd
pushd kbdtest && call Build || exit /b & popd
pushd ps2info && call Build || exit /b & popd
pushd 2piotst && call Build || exit /b & popd
pushd piomon && call Build || exit /b & popd
pushd banktest && call Build || exit /b & popd
pushd portscan && call Build || exit /b & popd
pushd sound && call Build || exit /b & popd
pushd testh8p && call Build || exit /b & popd
call :build DMAmon || exit /b
call :build tstdskng || exit /b
call :build inttest || exit /b
call :build ppidetst || exit /b
call :build ramtest || exit /b
call :build I2C || exit /b
call :build rzsz || exit /b
call :build vdctest || exit /b
call :build kbdtest || exit /b
call :build ps2info || exit /b
call :build 2piotst || exit /b
call :build piomon || exit /b
call :build banktest || exit /b
call :build portscan || exit /b
call :build sound || exit /b
call :build testh8p || exit /b
goto :eof
:asm
echo.
echo Building %1...
tasm -t80 -g3 -fFF %1.asm %1.com %1.lst || exit /b
goto :eof
:asm180
echo.
echo Building %1...
tasm -t180 -g3 -fFF %1.asm %1.com %1.lst || exit /b
:build
echo Building %1
pushd %1 && call Build || exit /b & popd
goto :eof

View File

@@ -5,9 +5,9 @@ set TOOLS=../../../../Tools
set PATH=%TOOLS%\tasm32;%PATH%
set TASMTABS=%TOOLS%\tasm32
tasm -t180 -g3 -fFF i2cscan.asm i2cscan.com i2cscan.lst || exit /b
tasm -t180 -g3 -fFF rtcds7.asm rtcds7.com rtcds7.lst || exit /b
tasm -t180 -g3 -fFF i2clcd.asm i2clcd.com i2clcd.lst || exit /b
tasm -t80 -g3 -fFF i2cscan.asm i2cscan.com i2cscan.lst || exit /b
tasm -t80 -g3 -fFF rtcds7.asm rtcds7.com rtcds7.lst || exit /b
tasm -t80 -g3 -fFF i2clcd.asm i2clcd.com i2clcd.lst || exit /b
tasm -t80 -g3 -ff srom.asm srom.com srom.lst || exit /b
copy /Y i2c*.com ..\..\..\..\Binary\Apps\Test\ || exit /b

View File

@@ -1,6 +1,6 @@
OBJECTS =
# OBJECTS =
SUBDIRS = DMAmon I2C inttest ppidetst ramtest tstdskng rzsz vdctest kbdtest ps2info 2piotst piomon banktest portscan sound testh8p
DEST = ../../../Binary/Apps/Test
# DEST = ../../../Binary/Apps/Test
TOOLS =../../../Tools
include $(TOOLS)/Makefile.inc

View File

@@ -5,7 +5,7 @@ set TOOLS=../../../../Tools
set PATH=%TOOLS%\tasm32;%PATH%
set TASMTABS=%TOOLS%\tasm32
tasm -t180 -g3 -fFF inttest.asm inttest.com inttest.lst || exit /b
tasm -t80 -g3 -fFF inttest.asm inttest.com inttest.lst || exit /b
copy /Y inttest.com ..\..\..\..\Binary\Apps\Test\ || exit /b
copy /Y inttest.doc ..\..\..\..\Binary\Apps\Test\ || exit /b

View File

@@ -5,7 +5,7 @@ set TOOLS=../../../../Tools
set PATH=%TOOLS%\tasm32;%PATH%
set TASMTABS=%TOOLS%\tasm32
tasm -t180 -g3 -fFF kbdtest.asm kbdtest.com kbdtest.lst || exit /b
tasm -t80 -g3 -fFF kbdtest.asm kbdtest.com kbdtest.lst || exit /b
copy /Y kbdtest.com ..\..\..\..\Binary\Apps\Test\ || exit /b

View File

@@ -5,6 +5,6 @@ set TOOLS=../../../../Tools
set PATH=%TOOLS%\tasm32;%PATH%
set TASMTABS=%TOOLS%\tasm32
tasm -t180 -g3 -fFF piomon.asm piomon.com piomon.lst || exit /b
tasm -t80 -g3 -fFF piomon.asm piomon.com piomon.lst || exit /b
copy /Y piomon.com ..\..\..\..\Binary\Apps\Test\ || exit /b

View File

@@ -5,7 +5,7 @@ set TOOLS=../../../../Tools
set PATH=%TOOLS%\tasm32;%PATH%
set TASMTABS=%TOOLS%\tasm32
tasm -t180 -g3 -fFF ppidetst.asm ppidetst.com ppidetst.lst || exit /b
tasm -t80 -g3 -fFF ppidetst.asm ppidetst.com ppidetst.lst || exit /b
copy /Y ppidetst.com ..\..\..\..\Binary\Apps\Test\ || exit /b

View File

@@ -5,6 +5,6 @@ set TOOLS=../../../../Tools
set PATH=%TOOLS%\tasm32;%PATH%
set TASMTABS=%TOOLS%\tasm32
tasm -t180 -g3 -fFF ps2info.asm ps2info.com ps2info.lst || exit /b
tasm -t80 -g3 -fFF ps2info.asm ps2info.com ps2info.lst || exit /b
copy /Y ps2info.com ..\..\..\..\Binary\Apps\Test\ || exit /b

View File

@@ -2,7 +2,7 @@ OBJECTS = ramtest.com
DEST = ../../../../Binary/Apps/Test
DOCDEST = ../../../../Doc
TOOLS = ../../../../Tools
OTHERS = loader.bin dbgmon.bin
OTHERS = *.bin
include $(TOOLS)/Makefile.inc
ramtest.com: loader.bin dbgmon.bin

View File

@@ -5,7 +5,7 @@ set TOOLS=../../../../Tools
set PATH=%TOOLS%\tasm32;%PATH%
set TASMTABS=%TOOLS%\tasm32
tasm -t180 -g3 -fFF tstdskng.asm tstdskng.com tstdskng.lst || exit /b
tasm -t80 -g3 -fFF tstdskng.asm tstdskng.com tstdskng.lst || exit /b
copy /Y tstdskng.com ..\..\..\..\Binary\Apps\Test\ || exit /b

View File

@@ -5,8 +5,8 @@ set TOOLS=../../../../Tools
set PATH=%TOOLS%\tasm32;%PATH%
set TASMTABS=%TOOLS%\tasm32
tasm -t180 -g3 -fFF vdctest.asm vdctest.com vdctest.lst || exit /b
tasm -t180 -g3 -fFF vdconly.asm vdconly.com vdconly.lst || exit /b
tasm -t80 -g3 -fFF vdctest.asm vdctest.com vdctest.lst || exit /b
tasm -t80 -g3 -fFF vdconly.asm vdconly.com vdconly.lst || exit /b
copy /Y vdctest.com ..\..\..\..\Binary\Apps\Test\ || exit /b
copy /Y vdconly.com ..\..\..\..\Binary\Apps\Test\ || exit /b

View File

@@ -5,9 +5,9 @@ set TOOLS=../../../Tools
set PATH=%TOOLS%\tasm32;%PATH%
set TASMTABS=%TOOLS%\tasm32
tasm -t180 -g3 -fFF -dWBW tune.asm tune.com tune.lst || exit /b
tasm -t180 -g3 -fFF -dZX tune.asm tunezx.com tunezx.lst || exit /b
tasm -t180 -g3 -fFF -dMSX tune.asm tunemsx.com tunemsx.lst || exit /b
tasm -t80 -g3 -fFF -dWBW tune.asm tune.com tune.lst || exit /b
tasm -t80 -g3 -fFF -dZX tune.asm tunezx.com tunezx.lst || exit /b
tasm -t80 -g3 -fFF -dMSX tune.asm tunemsx.com tunemsx.lst || exit /b
copy /Y tune*.com ..\..\..\Binary\Apps\ || exit /b
copy /Y Tunes\*.* ..\..\..\Binary\Apps\Tunes\ || exit /b

View File

@@ -5,8 +5,8 @@ set TOOLS=../../../Tools
set PATH=%TOOLS%\tasm32;%PATH%
set TASMTABS=%TOOLS%\tasm32
tasm -t180 -g3 -fFF -dWBW vgmplay.asm vgmplay.com vgmplay.lst || exit /b
tasm -t180 -g3 -fFF -dWBW ymfmdemo.asm ymfmdemo.com ymfmdemo.lst || exit /b
tasm -t80 -g3 -fFF -dWBW vgmplay.asm vgmplay.com vgmplay.lst || exit /b
tasm -t80 -g3 -fFF -dWBW ymfmdemo.asm ymfmdemo.com ymfmdemo.lst || exit /b
copy /Y vgmplay.com ..\..\..\Binary\Apps\ || exit /b
copy /Y Tunes\*.vgm ..\..\..\Binary\Apps\Tunes\ || exit /b

View File

@@ -3478,7 +3478,17 @@ RSDMA: LXI D,TBUF ; Reset DMA address
RET
;
WRERR: CALL RSDMA ; Reset DMA to normal
MVI C,CAN ; Cancel
; [WBW] BEGIN: Fixed to put CAN character in A instead of C because
; SEND uses the A register. Also increased number of CAN characters
; sent to 3. Credit to HubertH for finding this and providing the fix.
; MVI C,CAN ; Cancel
; [WBW] -----
MVI A,CAN ; Cancel
CALL SEND ; Sender
MVI A,CAN ; Cancel
CALL SEND ; Sender
MVI A,CAN ; Cancel
; [WBW] END
CALL SEND ; Sender
; [WBW] BEGIN: RCVSABT does not return, so file write error
; message was never being displayed. Swapped things around

View File

@@ -0,0 +1,10 @@
@echo off
setlocal
set TOOLS=../../../Tools
set PATH=%TOOLS%\tasm32;%PATH%
set TASMTABS=%TOOLS%\tasm32
tasm -t80 -g3 -fFF assign.asm assign.com assign.lst || exit /b
copy /Y assign.com ..\..\..\Binary\Apps\ || exit /b

View File

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

View File

@@ -0,0 +1,7 @@
OBJECTS = assign.com
DEST = ../../../Binary/Apps
TOOLS =../../../Tools
USETASM=1
include $(TOOLS)/Makefile.inc

View File

@@ -51,7 +51,7 @@ bnksel .equ $FFF3 ; HBIOS bank select vector
;
stamp .equ $40 ; loc of RomWBW CBIOS zero page stamp
;
#include "../ver.inc"
#include "../../ver.inc"
;
;===============================================================================
; Code Section

View File

@@ -5,6 +5,6 @@ set TOOLS=../../../Tools
set PATH=%TOOLS%\tasm32;%PATH%
set TASMTABS=%TOOLS%\tasm32
tasm -t180 -g3 -fFF cpuspd.asm cpuspd.com cpuspd.lst || exit /b
tasm -t80 -g3 -fFF cpuspd.asm cpuspd.com cpuspd.lst || exit /b
copy /Y cpuspd.com ..\..\..\Binary\Apps\ || exit /b

View File

@@ -0,0 +1,10 @@
@echo off
setlocal
set TOOLS=../../../Tools
set PATH=%TOOLS%\tasm32;%PATH%
set TASMTABS=%TOOLS%\tasm32
tasm -t80 -g3 -fFF format.asm format.com format.lst || exit /b
copy /Y format.com ..\..\..\Binary\Apps\ || exit /b

View File

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

View File

@@ -0,0 +1,7 @@
OBJECTS = format.com
DEST = ../../../Binary/Apps
TOOLS =../../../Tools
USETASM=1
include $(TOOLS)/Makefile.inc

View File

@@ -19,7 +19,7 @@
; 1) Actually implement this
;_______________________________________________________________________________
;
#include "../ver.inc"
#include "../../ver.inc"
;
;===============================================================================
; Definitions

View File

@@ -0,0 +1,10 @@
@echo off
setlocal
set TOOLS=../../../Tools
set PATH=%TOOLS%\tasm32;%PATH%
set TASMTABS=%TOOLS%\tasm32
tasm -t80 -g3 -fFF mode.asm mode.com mode.lst || exit /b
copy /Y mode.com ..\..\..\Binary\Apps\ || exit /b

View File

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

View File

@@ -0,0 +1,7 @@
OBJECTS = mode.com
DEST = ../../../Binary/Apps
TOOLS =../../../Tools
USETASM=1
include $(TOOLS)/Makefile.inc

View File

@@ -37,7 +37,7 @@
; 1) Implement flow control settings
;_______________________________________________________________________________
;
#include "../ver.inc"
#include "../../ver.inc"
;
;===============================================================================
; Definitions

View File

@@ -5,6 +5,6 @@ set TOOLS=../../../Tools
set PATH=%TOOLS%\tasm32;%PATH%
set TASMTABS=%TOOLS%\tasm32
tasm -t180 -g3 -fFF reboot.asm reboot.com reboot.lst || exit /b
tasm -t80 -g3 -fFF reboot.asm reboot.com reboot.lst || exit /b
copy /Y reboot.com ..\..\..\Binary\Apps\ || exit /b

12
Source/Apps/rtc/Build.cmd Normal file
View File

@@ -0,0 +1,12 @@
@echo off
setlocal
set TOOLS=../../../Tools
set PATH=%TOOLS%\tasm32;%PATH%
set TASMTABS=%TOOLS%\tasm32
tasm -t80 -g3 -fFF rtc.asm rtc.com rtc.lst || exit /b
tasm -t80 -g3 -fFF rtchb.asm rtchb.com rtchb.lst || exit /b
copy /Y rtc.com ..\..\..\Binary\Apps\ || exit /b
copy /Y rtchb.com ..\..\..\Binary\Apps\ || exit /b

View File

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

7
Source/Apps/rtc/Makefile Normal file
View File

@@ -0,0 +1,7 @@
OBJECTS = rtc.com rtchb.com
DEST = ../../../Binary/Apps
TOOLS =../../../Tools
USETASM=1
include $(TOOLS)/Makefile.inc

View File

@@ -0,0 +1,10 @@
@echo off
setlocal
set TOOLS=../../../Tools
set PATH=%TOOLS%\tasm32;%PATH%
set TASMTABS=%TOOLS%\tasm32
tasm -t80 -g3 -fFF syscopy.asm syscopy.com syscopy.lst || exit /b
copy /Y syscopy.com ..\..\..\Binary\Apps\ || exit /b

View File

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

View File

@@ -0,0 +1,7 @@
OBJECTS = syscopy.com
DEST = ../../../Binary/Apps
TOOLS =../../../Tools
USETASM=1
include $(TOOLS)/Makefile.inc

View File

@@ -0,0 +1,13 @@
@echo off
setlocal
set TOOLS=..\..\..\Tools
set PATH=%TOOLS%\tasm32;%TOOLS%\zxcc;%PATH%
set TASMTABS=%TOOLS%\tasm32
set CPMDIR80=%TOOLS%/cpm/
:: tasm -t80 -g3 -fFF sysgen.asm sysgen.com sysgen.lst || exit /b
zxcc Z80ASM -SYSGEN/F || exit /b
copy /Y sysgen.com ..\..\..\Binary\Apps\ || exit /b

View File

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

View File

@@ -0,0 +1,7 @@
OBJECTS = sysgen.com
DEST = ../../../Binary/Apps
TOOLS =../../../Tools
USETASM=1
include $(TOOLS)/Makefile.inc

View File

@@ -0,0 +1,10 @@
@echo off
setlocal
set TOOLS=../../../Tools
set PATH=%TOOLS%\tasm32;%PATH%
set TASMTABS=%TOOLS%\tasm32
tasm -t80 -g3 -fFF talk.asm talk.com talk.lst || exit /b
copy /Y talk.com ..\..\..\Binary\Apps\ || exit /b

View File

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

View File

@@ -0,0 +1,7 @@
OBJECTS = talk.com
DEST = ../../../Binary/Apps
TOOLS =../../../Tools
USETASM=1
include $(TOOLS)/Makefile.inc

View File

@@ -0,0 +1,10 @@
@echo off
setlocal
set TOOLS=../../../Tools
set PATH=%TOOLS%\tasm32;%PATH%
set TASMTABS=%TOOLS%\tasm32
tasm -t80 -g3 -fFF timer.asm timer.com timer.lst || exit /b
copy /Y timer.com ..\..\..\Binary\Apps\ || exit /b

View File

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

View File

@@ -0,0 +1,7 @@
OBJECTS = timer.com
DEST = ../../../Binary/Apps
TOOLS =../../../Tools
USETASM=1
include $(TOOLS)/Makefile.inc

View File

@@ -40,7 +40,7 @@
; Includes division subroutines from: https://wikiti.brandonw.net/
;;_______________________________________________________________________________
;
#include "../ver.inc" ; Used for building RomWBW
#include "../../ver.inc" ; Used for building RomWBW
;#include "ver.inc" ; Used for testing purposes during code development
;
;===============================================================================

View File

@@ -5,8 +5,8 @@ setlocal
call BuildProp || exit /b
call BuildShared || exit /b
call BuildBP || exit /b
call BuildImages || exit /b
call BuildROM %* || exit /b
call BuildImages || exit /b
call BuildZRC || exit /b
call BuildZ1RCC || exit /b
call BuildZZRCC || exit /b

View File

@@ -38,6 +38,10 @@ copy /b os2ccp.bin + os3bdos.bin + ..\cbios\cbios_una.bin cpm_una.bin || exit /b
copy /b loader.bin + cpm_wbw.bin cpm_wbw.sys || exit /b
copy /b loader.bin + cpm_una.bin cpm_una.sys || exit /b
rem Copy OS files to Binary directory
copy cpm_wbw.sys ..\..\Binary\CPM22 || exit /b
copy cpm_una.sys ..\..\Binary\CPM22 || exit /b
goto :eof
:asm

View File

@@ -3,14 +3,20 @@ BINFILES = cpm_wbw.bin cpm_una.bin
OBJECTS = CCP.bin BDOS.bin CCP22.bin BDOS22.bin OS2CCP.bin OS3BDOS.bin \
ccpb03.bin bdosb01.bin loader.bin $(SYSFILES) $(BINFILES)
OTHERS = *.hex
NOCOPY = cpm_wbw.bin cpm_una.bin \
CCP.bin BDOS.bin CCP22.bin BDOS22.bin OS2CCP.bin OS3BDOS.bin \
ccpb03.bin bdosb01.bin loader.bin
DEST = ../../Binary/CPM22
TOOLS = ../../Tools
include $(TOOLS)/Makefile.inc
%.sys: %.bin loader.bin
cat loader.bin $*.bin > $@
%.sys: %.bin loader.bin
cat loader.bin $*.bin > $@
cpm_una.bin: OS2CCP.bin OS3BDOS.bin ../CBIOS/cbios_una.bin
cat OS2CCP.bin OS3BDOS.bin ../CBIOS/cbios_una.bin > $@
cpm_wbw.bin: OS2CCP.bin OS3BDOS.bin ../CBIOS/cbios_wbw.bin
cat OS2CCP.bin OS3BDOS.bin ../CBIOS/cbios_wbw.bin > $@

View File

@@ -4,11 +4,13 @@
maclib cpm3.lib
cseg
extrn phex16, phex8
extrn cin, cout
extrn crlf, crlf2
include hbios.z80
debug equ false
; BIOS Jump vector.
@@ -65,7 +67,7 @@ boot:
; this routine to avoid issues.
ld (stksav),sp
ld sp,stack
; Do the real work
call boot0
@@ -78,6 +80,10 @@ boot0:
if cmdline
boot1:
;
; The following Code is the Entry Point for the Loader when
; it is built as a COM file. Typically CPMLDR.COM or ZPMLDR.COM
;
; Get disk unit from user
ld de,msgunit ; disk unit prompt
call writestr ; display on console
@@ -88,7 +94,7 @@ boot1:
sub '0' ; convert to binary
ld (unit),a ; save it
jr c,selerr ; loop if below 0 entered
ld bc,0F810h ; HBIOS, get disk unit count
ld bc,BC_SYSGET_DIOCNT ; HBIOS, get disk unit count
call 0FFF0h ; do it, E := disk unit count
ld a,(unit) ; get unit num back
cp e ; compare to entry
@@ -118,7 +124,7 @@ selerr:
boot2:
; Record unit & slice w/ HBIOS
ld bc,0F9E0h ; HBIOS func: set boot info
ld bc,BC_SYSSET_BOOTINFO ; HBIOS func: set boot info
ld a,(unit) ; get unit
ld d,a ; put in D
ld a,(slice) ; get slice
@@ -128,8 +134,13 @@ boot2:
else
;
; The following Code is the Entry Point for the Loader when
; it is built as a SYS file, and run from the System Track
;
; Get unit & slice from HBIOS
ld bc,0F8E0h ; HBIOS func: get boot info
ld bc,BC_SYSGET_BOOTINFO ; HBIOS func: get boot info
call 0FFF0h ; do it, D := boot unit, E: := slice
ld a,d ; move unit to A
ld (unit),a ; save it
@@ -138,103 +149,27 @@ boot2:
endif
; Check that drive actually exists
ld bc,0F810h ; HBIOS func: get disk count
call 0FFF0h ; do it, E=disk count
ld a,(unit) ; get boot disk unit
cp e ; compare to count
jp nc,err_nodisk ; handle no disk err
; Sense media to determine media format
ld a,(unit) ; Get boot unit
ld c,a ; put in C
ld b,18h ; HBIOS Media function
ld e,1 ; Enable media check/discovery
ld d,a ; put in D
ld a,(slice) ; get boot slice
ld e,a ; put in E
ld b,BF_EXTSLICE ; HBIOS FUNC: SLICE
call 0FFF0H ; HBIOS call
jp nz,err_diskio ; handle error
ld a,e ; resultant media id to accum
; Check errors from the Function
cp ERR_NOUNIT ; compare to no unit error
jp z,err_nodisk ; handle no disk err
cp ERR_NOMEDIA ; no media in the device
jp z,err_nodisk ; handle the error
cp ERR_RANGE ; slice is invalid
jp z,err_noslice ; bad slice, handle err
or a ; any other error
jp nz,err_diskio ; handle as general IO error
; Initialize slice start LBA and Media ID
ld a,c
ld (medid),a ; save media id
or a ; set flags, 0 is no media
jp z,err_diskio ; handle no media error
; Initialize slice start LBA & sectors per slice
ld hl,0 ; assume slice starts
ld (lba),hl ; ... at LBA offset
ld (lba+2),hl ; ... of zero
ld hl,16640 ; assume legacy value for
ld (sps),hl ; ... sectors per slice
; If not hard disk, skip partition & slice stuff
ld a,(medid) ; get media id
cp 4 ; hard disk?
jr nz,boot9 ; if not, jump ahead
; Read MBR
ld de,8000h ; LBA address zero
ld hl,0 ; ... to read first sector
ld bc,mbrsec ; read into MBR buffer
ld (dma),bc ; save
ld b,1 ; one sector
ld a,(unit) ; get bootunit
ld c,a ; put in C
call diskread ; do it, no return on err
; Check signature
ld hl,(mbrsec+1FEh) ; get signature
ld a,l ; first byte
cp 055h ; should be $55
jr nz,boot5 ; if not, no part table
ld a,h ; second byte
cp 0AAh ; should be $AA
jr nz,boot5 ; if not, no part table
; Search part table for CP/M entry (type 0x2E)
ld b,4 ; four entries in part table
ld hl,mbrsec+1BEh+4 ; offset of first part type
boot3:
ld a,(hl) ; get part type
cp 2Eh ; CP/M partition?
jr z,boot4 ; cool, grab the LBA offset
ld de,16 ; part table entry size
add hl,de ; bump to next part type
djnz boot3 ; loop thru table
jr boot5 ; too bad, no CP/M partition
boot4:
; Capture the starting LBA of the CP/M partition we found
ld de,4 ; LBA is 4 bytes after part type
add hl,de ; point to it
ld de,lba ; loc to store lba offset
ld bc,4 ; 4 bytes (32 bits)
ldir ; copy it
; For now, it is implied that a slice within a partition
; table will be in the "new" disk format. So, we now
; adjust the sectors per slice and media id.
; Use new slice format sectors per slice value
ld hl,16384 ; new sectors per slice
ld (sps),hl ; save it
; Update media id for new hard disk format
ld a,10 ; new media id
ld (medid),a ; save it
boot5:
; Adjust LBA offset based on target slice
ld a,(slice) ; get boot slice, A is loop cnt
ld hl,(lba) ; set DE:HL
ld de,(lba+2) ; ... to starting LBA
ld bc,(sps) ; sectors per slice
boot6:
or a ; set flags to check loop cntr
jr z,boot8 ; done if counter exhausted
add hl,bc ; add one slice to low word
jr nc,boot7 ; check for carry
inc de ; if so, bump high word
boot7:
dec a ; dec loop downcounter
jr boot6 ; and loop
boot8:
ld (lba),hl ; save new lba, low word
ld (lba+2),de ; save new lba, high word
@@ -277,7 +212,7 @@ conin:
conout:
ld e,c ; output character in E
ld bc,0180h ; unit 80h (console), func 1 = COUT
jp 0FFF0h
jp 0FFF0h
list:
ld a,85H
halt
@@ -311,7 +246,7 @@ setdma:
call crlf
call phex16
pop hl
endif
ld (dma),bc
@@ -337,18 +272,18 @@ read:
call phex16
ld hl,(lba+0)
call phex16
endif
; Check device type
ld a,(unit) ; get unit
ld c,a ; BIOS Disk Unit in C
ld b,17h ; HBIOS DEVICE function
ld b,BF_DIODEVICE ; HBIOS DEVICE function
rst 08 ; Do it, D=device type
ld a,d ; put in accum
cp 01h ; floppy?
jr nz,read2 ; if not, do LBA i/o
; Floppy I/O
ld de,(sect) ; sector -> de, head(d) becomes zero
ld hl,(trk) ; track -> hl (low bit has head)
@@ -356,7 +291,7 @@ read:
rr l ; ... and into carry
rl d ; carry bit (head) into d
jr read3 ; do the disk i/o
; LBA I/O
read2:
ld hl,(trk) ; get track
@@ -386,7 +321,7 @@ read3:
call phex16
ex de,hl
call phex16
endif
; DE:HL has sector address to read (LBA or CHS)
@@ -401,14 +336,14 @@ diskread:
; Seek to requested sector in DE:HL
push bc ; save unit & count
ld b,012h ; HBIOS func: seek
ld b,BF_DIOSEEK ; HBIOS func: seek
call 0FFF0h ; do it
pop bc ; recover unit & count
jp nz,err_diskio ; handle error
; Read sector(s) into buffer
ld e,b ; transfer count
ld b,013h ; HBIOS func: disk read
ld b,BF_DIOREAD ; HBIOS func: disk read
ld hl,(dma) ; read into info sec buffer
ld a,(0FFE0h) ; get current bank
ld d,a ; put in D
@@ -477,7 +412,7 @@ xmove:
;cin:
; ; Input character from console via HBIOS
; ld c,080H ; console unit to C
; ld b,00H ; HBIOS func: input char
; ld b,BF_CIOIN ; HBIOS func: input char
; call 0FFF0H ; HBIOS reads character
; ld a,e ; To A for return
; ret ; done
@@ -486,7 +421,7 @@ xmove:
; ; Output character to console via HBIOS
; ld e,a ; output char to E
; ld c,080H ; console unit to C
; ld b,01H ; HBIOS func: output char
; ld b,BF_CIOOUT ; HBIOS func: output char
; jp 0FFF0H ; output & return
writestr:
@@ -539,7 +474,7 @@ err:
str_err_prefix db "\r\n\r\n*** ","$"
str_err_nodisk db "Disk unit not available","$"
str_err_noslice db "Disk unit does not support slices","$"
str_err_noslice db "Slice not supported","$"
str_err_diskio db "Disk I/O failure","$"
str_err_sig db "No system image on disk","$"
str_err_api db "HBIOS API failure","$"
@@ -728,7 +663,6 @@ dma ds 2 ; current DMA address
medid ds 1 ; media id
lba ds 4 ; current lba
sps ds 2 ; sectors per slice
ds 64
stack equ $

View File

@@ -35,9 +35,9 @@
extrn ?pderr ; print BIOS disk error header
extrn ?conin,?cono ; con in and out
extrn ?const ; get console status
extrn ?bnkxlt
extrn phex16, phex8, cout, crlf, crlf2
@@ -45,15 +45,18 @@
maclib cpm3.lib
; HBIOS related definitons
include hbios.z80
; common control characters
cr equ 13
lf equ 10
bell equ 7
; Extended Disk Parameter Headers (XDPHs)
; Extended Disk Parameter Headers (XPDHs)
; All DPH entries below are generic. They are updated during
; boot to point to available HBIOS disk unit/slices dynamically.
@@ -186,7 +189,7 @@ dph15: dph 0,dpb$max ; Real DPB filled in at disk login
dw 0, 0 ; LBA Offset
cseg ; DPB must be resident
dpb$max:
dw 64 ; spt: sectors per track
db 5 ; bsh: block shift factor
@@ -288,7 +291,7 @@ dpb_fd144: ; 3.5" DS/HD Floppy Drive (1.44M)
db 2 ; psh: 2 for 512 byte sectors
db 3 ; phm: (512 / 128) - 1
dpb_fd360: ; 5.25" DS/DD Floppy Drive (360K)
dpb_fd360: ; 5.25" DS/DD Floppy Drive (360K)
dw 36 ; spt: sectors per track
db 4 ; bsh: block shift factor
db 15 ; blm: block mask
@@ -370,7 +373,7 @@ dsk$init:
dsk$init1:
; Get bank count of RAM/ROM disk
ld b,0FAh ; HBIOS Peek Function
ld b,BF_SYSPEEK ; HBIOS Peek Function
ld a,(@hbbio) ; HBIOS bank id
ld d,a ; ... goes in D
rst 08 ; Call HBIOS, value in E
@@ -399,9 +402,9 @@ dsk$init3:
dec hl ; subtract 1 for proper DSM value
ld (ix+5),l ; save updated
ld (ix+6),h ; ... DSM value
ret
;ld a,(@rdrv) ; unit being initialized
;ld hl,@bootdu
;cp (hl) ; compare to boot unit
@@ -445,14 +448,13 @@ dsk$login:
;ret ; we have nothing to do in
; simple single density only environment.
;ld a,'L'
;call cout
ld (curdph),de ; save working DPH
ex de,hl ; DPH adr to HL
dec hl ; point to slice
dec hl ; point to slice
ld a,(hl) ; get slice
ld (slice),a ; save it
dec hl ; point to disk unit
@@ -460,194 +462,38 @@ dsk$login:
ld (unit),a ; save it
inc a ; 0FFh -> 000h
jp z,err_ret ; bail out on no disk mapped here
;call media ; update DPH for media
;ret
media:
; Set retry address
ld hl,media
ld (retry$adr),hl
; Sense media to determine media format
ld a,(unit) ; get disk unit
ld c,a ; put in C
ld b,18h ; HBIOS Media function
ld e,1 ; Enable media check/discovery
ld b,BF_EXTSLICE ; HBIOS func: SLICE
ld a,(unit) ; passing boot unit
ld d,a
ld a,(slice) ; and slice
ld e,a
call 0FFF0H ; HBIOS call
jp nz,err_diskio ; handle error
ld a,e ; resultant media id to accum
; Check errors from the Function
cp ERR_NOUNIT ; compare to no unit error
jp z,err_nodisk ; handle no disk err
cp ERR_NOMEDIA ; no media in the device
jp z,err_nodisk ; handle the error
cp ERR_RANGE ; slice is invalid
jp z,err_noslice ; bad slice, handle err
or a ; any other error
jp nz,err_diskio ; handle as general IO error
; Capture the Result
ld a,c ; resultant media id to accum
ld (medid),a ; save media id
or a ; set flags, 0 is no media
jp z,err_nodisk ; handle no media error
; Initialize slice start LBA & sectors per slice
ld hl,0 ; assume slice starts
ld (lba),hl ; ... at LBA offset
set 7,h ; ... of zero
ld (lba+2),hl ; ... w/ LBA access
; Check device type
ld a,(unit) ; get disk unit
ld c,a ; put in C
ld b,17h ; HBIOS func: report device info
call 0FFF0h ; get unit info, device type in D
ld a,d ; device type -> A
cp 01h ; floppy?
jr nz,media1 ; if not, do LBA I/O
ld hl,lba+3 ; point to high order byte
res 7,(hl) ; switch from LBA -> CHS
media1:
ld hl,16640 ; assume legacy value for
ld (sps),hl ; ... sectors per slice
; If not hard disk, skip partition & slice stuff
ld a,(medid) ; get media id
cp 4 ; hard disk?
jp nz,media9 ; if not, jump ahead
; Read MBR
ld de,8000h ; LBA address zero
ld hl,0 ; ... to read first sector
ld bc,mbrsec ; read into MBR buffer
ld (dma),bc ; save
ld a,(0FFE0h) ; get current HBIOS bank
ld (bank),a ; set DMA bank
ld a,(unit) ; get bootunit
ld c,a ; put in C
ld b,013h ; HBIOS func: disk read
call dsk$io ; do it
ret nz ; abort on error
; Check signature
ld hl,(mbrsec+1FEh) ; get signature
ld a,l ; first byte
cp 055h ; should be $55
jr nz,media5 ; if not, no part table
ld a,h ; second byte
cp 0AAh ; should be $AA
jr nz,media5 ; if not, no part table
; Search part table for CP/M entry (type 0x2E)
ld b,4 ; four entries in part table
ld hl,mbrsec+1BEh+4 ; offset of first part type
media3:
ld a,(hl) ; get part type
cp 2Eh ; CP/M partition?
jr z,media4 ; cool, grab the LBA offset
ld de,16 ; part table entry size
add hl,de ; bump to next part type
djnz media3 ; loop thru table
jr media5 ; too bad, no CP/M partition
media4:
; Capture the starting LBA of the CP/M partition we found
ld de,4 ; LBA is 4 bytes after part type
add hl,de ; point to it
ld de,lba ; loc to store lba offset
ld bc,4 ; 4 bytes (32 bits)
ldir ; copy it
; Check that requested slice is "inside" partition.
; Slice size is exactly 16,384 sectors (8mb), so we can just
; right shift partition sector count by 14 bits
ld e,(hl) ; HL points to first byte
inc hl ; ... of 32 bit partition
ld d,(hl) ; ... sector count,
inc hl ; ... load sector count
push de ; ... into DE:HL
ld e,(hl) ; ...
inc hl ; ...
ld d,(hl) ; ...
pop hl ; ... DE:HL = part size in sectors
ld b,2 ; DE = DE:HL >> 2 (tricky!)
call rl32 ; DE = slicecnt
ex de,hl ; HL = slicecnt
ld a,(slice) ; get target slice
ld c,a ; put in C
ld b,0 ; BC := requested slice #
scf ; set carry!
sbc hl,bc ; max slices - slice - 1
jp c,err_noslice ; slice too high, error exit
; For now, it is implied that a slice within a partition
; table will be in the "new" disk format. So, we now
; adjust the sectors per slice and media id.
; Use new slice format sectors per slice value
ld hl,16384 ; new sectors per slice
ld (sps),hl ; save it
; Update media id for new hard disk format
ld a,10 ; new media id
ld (medid),a ; save it
media5:
; Adjust LBA offset based on target slice
ld a,(slice) ; get slice, A is loop cnt
ld hl,(lba) ; set DE:HL
ld de,(lba+2) ; ... to starting LBA
ld bc,(sps) ; sectors per slice
res 7,d ; clear lba mode bit
boot6:
or a ; set flags to check loop cntr
jr z,boot8 ; done if counter exhausted
add hl,bc ; add one slice to low word
jr nc,boot7 ; check for carry
inc de ; if so, bump high word
boot7:
dec a ; dec loop downcounter
jr boot6 ; and loop
boot8:
; LBA offset of desired slice is now in DE:HL.
; Need to check if the slice is beyond capacity of media.
; If lba_off + sps >= dsk_cap, error!
; Save lba_off
push de ; msw
push hl ; lsw
; Add sps to compute lba_req
ld bc,(sps) ; sectors per slice
add hl,bc ; add one slice to low word
jr nc,dsk_mbr9 ; check for carry
inc de ; if so, bump high word
dsk_mbr9:
; Save cap_req
ld (cap_req),hl ; lsw
ld (cap_req+2),de ; msw
; Get dsk_cap (de:hl)
ld b,1Ah ; hbios disk capacity func
ld a,(unit) ; disk unit number
ld c,a ; ... into c
rst 08 ; hbios call (de:hl = capacity)
; Save dsk_cap (de:hl)
push de ; save dsk_cap (msw)
push hl ; save dsk_cap (lsw)
; Check dsk_cap >= cap_req, cf set on overflow
; No need save actual result
or a ; clear carry for sbc
pop hl ; dsk_cap lsw
ld de,(cap_req) ; cap_req lsw
sbc hl,de ; dsk_cap - lba_req (lsw)
pop hl ; dsk_cap msw
ld de,(cap_req+2) ; cap_req msw
sbc hl,de ; dsk_cap - lba_req (msw)
; Restore lba_off
pop hl ; lsw
pop de ; msw
; Abort on overflow with error!
jp c,err_noslice ; slice too high, error exit
; Finalize slice lba
BIT 7,B ; Is the floppy Disk Attribute Set
jr nz,media8 ; if it is Floppy; Skip Setting LBA
set 7,d ; set LBA access flag
media8:
ld (lba),hl ; save new lba, low word
ld (lba+2),de ; save new lba, high word
@@ -698,23 +544,23 @@ media10:
; if necessary, then return an error code in <A>
dsk$read:
ld a,13h ; HBIOS disk read function
ld a,BF_DIOREAD ; HBIOS disk read function
ld (func),a ; save it
jr dsk$rw ; common disk read/write code
dsk$write:
ld a,14h ; HBIOS disk write function
ld a,BF_DIOWRITE ; HBIOS disk write function
ld (func),a ; save it
jr dsk$rw ; common disk read/write code
dsk$rw:
; Common disk read/write routine
; Assumes func is set to HBIOS read or write
; Set retry address
ld hl,dsk$rw$retry
ld (retry$adr),hl
; Save XDPH address
ld (curdph),de ; save to curdph
@@ -743,12 +589,12 @@ dsk$rw$retry:
rr l ; ... and into carry
rl d ; carry bit (head) into d
jr dsk$rw9 ; do the disk I/O
dsk$rw2:
; LBA I/O
push de ; save hiword of LBA
push hl ; save loword of LBA
; Get track and shift into correct bits
ld hl,(@trk) ; get track
ld de,0 ; clear hiword
@@ -767,7 +613,7 @@ dsk$rw2:
pop bc ; lba offset hiword
adc hl,bc ; add w/ carry to cur hiword
ex de,hl ; swap back
dsk$rw9:
; DE:HL has sector address to read (LBA or CHS)
ld bc,(@dma) ; get dma address
@@ -791,7 +637,7 @@ dsk$io:
; Seek to requested sector in DE:HL
push bc ; save func & unit
ld b,012h ; HBIOS func: seek
ld b,BF_DIOSEEK ; HBIOS func: seek
call 0FFF0h ; do it
pop bc ; recover func & unit
jp nz,err_diskio ; handle error
@@ -824,7 +670,7 @@ mult8_loop:
mult8_noadd:
djnz mult8_loop
ret
rl32:
; Left shift DE:HL by B bits (B > 0)
or a ; clear carry
@@ -834,7 +680,7 @@ rl32:
rl d ; rotate D thru carry
djnz rl32 ; loop B times
ret ; done
cin$echo: ; get console input, echo it, and shift to upper case
call ?const ; check for char
or a ; set flags
@@ -851,7 +697,7 @@ cin$echo1:
ret c ; done if carry
sub 'a' - 'A' ; make upper case
ret ; and done
; call ?const ! ora a ! jz u$c1 ; see if any char already struck
; call ?conin ! jmp u$conin$echo ; yes, eat it and try again
;u$c1:
@@ -872,7 +718,7 @@ err_perm:
call prt_err
jr err_ret
err_diskio:
cp -10 ; HBIOS read only error
cp ERR_READONLY ; HBIOS read only error
jr z,err_rdonly ; if so, handle special
ld a,(@ermde) ; get error mode
cp 0FFh ; FFh means suppress
@@ -916,9 +762,6 @@ medid db 0 ; working media id value
unit db 0 ; working disk unit num
slice db 0 ; working slice num
lba dw 0,0 ; working lba
sps dw 0 ; sectors per slice
cap_req dw 0,0 ; lba cap required for slice
mbrsec ds 512 ; MBR sector buffer
dma dw 0 ; current DMA address
bank db 0 ; HBIOS DMA bank
func db 0 ; HBIOS function

90
Source/CPM3/hbios.z80 Normal file
View File

@@ -0,0 +1,90 @@
;
BF_CIO EQU 000h
BF_CIOIN EQU BF_CIO + 0 ; CHARACTER INPUT
BF_CIOOUT EQU BF_CIO + 1 ; CHARACTER OUTPUT
BF_CIOIST EQU BF_CIO + 2 ; CHARACTER INPUT STATUS
BF_CIOOST EQU BF_CIO + 3 ; CHARACTER OUTPUT STATUS
BF_CIOINIT EQU BF_CIO + 4 ; INIT/RESET DEVICE/LINE CONFIG
BF_CIOQUERY EQU BF_CIO + 5 ; REPORT DEVICE/LINE CONFIG
BF_CIODEVICE EQU BF_CIO + 6 ; REPORT DEVICE INFO
;
;
BF_DIO EQU 010h
BF_DIOSTATUS EQU BF_DIO + 0 ; DISK STATUS
BF_DIORESET EQU BF_DIO + 1 ; DISK RESET
BF_DIOSEEK EQU BF_DIO + 2 ; DISK SEEK
BF_DIOREAD EQU BF_DIO + 3 ; DISK READ SECTORS
BF_DIOWRITE EQU BF_DIO + 4 ; DISK WRITE SECTORS
BF_DIOVERIFY EQU BF_DIO + 5 ; DISK VERIFY SECTORS
BF_DIOFORMAT EQU BF_DIO + 6 ; DISK FORMAT TRACK
BF_DIODEVICE EQU BF_DIO + 7 ; DISK DEVICE INFO REPORT
BF_DIOMEDIA EQU BF_DIO + 8 ; DISK MEDIA REPORT
BF_DIODEFMED EQU BF_DIO + 9 ; DEFINE DISK MEDIA
BF_DIOCAP EQU BF_DIO + 10 ; DISK CAPACITY REPORT
BF_DIOGEOM EQU BF_DIO + 11 ; DISK GEOMETRY REPORT
;
BF_EXT EQU 0E0h
BF_EXTSLICE EQU BF_EXT + 0 ; SLICE CALCULATION (WAS BF_SYSGET_DIOMED)
;
BF_SYS EQU 0F0h
BF_SYSRESET EQU BF_SYS + 0 ; SOFT RESET HBIOS
BF_SYSVER EQU BF_SYS + 1 ; GET HBIOS VERSION
BF_SYSSETBNK EQU BF_SYS + 2 ; SET CURRENT BANK
BF_SYSGETBNK EQU BF_SYS + 3 ; GET CURRENT BANK
BF_SYSSETCPY EQU BF_SYS + 4 ; BANK MEMORY COPY SETUP
BF_SYSBNKCPY EQU BF_SYS + 5 ; BANK MEMORY COPY
BF_SYSALLOC EQU BF_SYS + 6 ; ALLOC HBIOS HEAP MEMORY
BF_SYSFREE EQU BF_SYS + 7 ; FREE HBIOS HEAP MEMORY
BF_SYSGET EQU BF_SYS + 8 ; GET HBIOS INFO
BF_SYSSET EQU BF_SYS + 9 ; SET HBIOS PARAMETERS
BF_SYSPEEK EQU BF_SYS + 10 ; GET A BYTE VALUE FROM ALT BANK
BF_SYSPOKE EQU BF_SYS + 11 ; SET A BYTE VALUE IN ALT BANK
BF_SYSINT EQU BF_SYS + 12 ; MANAGE INTERRUPT VECTORS
;
; 2 BYTE FUNCTION/SUBFUNCTION : BC_ => BIOS CALL -> LOAD TO BC REGISTER
;
BC_SYSGET_CIOCNT EQU 0F800h ; GET CHAR UNIT COUNT
BC_SYSGET_CIOFN EQU 0F801h ; GET CIO UNIT FN/DATA ADR
BC_SYSGET_DIOCNT EQU 0F810h ; GET DISK UNIT COUNT
BC_SYSGET_DIOFN EQU 0F811h ; GET DIO UNIT FN/DATA ADR
BC_SYSGET_RTCCNT EQU 0F820h ; GET RTC UNIT COUNT
BC_SYSGET_DSKYCNT EQU 0F830h ; GET DSKY UNIT COUNT
BC_SYSGET_VDACNT EQU 0F840h ; GET VDA UNIT COUNT
BC_SYSGET_VDAFN EQU 0F841h ; GET VDA UNIT FN/DATA ADR
BC_SYSGET_SNDCNT EQU 0F850h ; GET VDA UNIT COUNT
BC_SYSGET_SNDFN EQU 0F851h ; GET SND UNIT FN/DATA ADR
BC_SYSGET_TIMER EQU 0F8D0h ; GET CURRENT TIMER VALUE
BC_SYSGET_SECS EQU 0F8D1h ; GET CURRENT SECONDS VALUE
BC_SYSGET_BOOTINFO EQU 0F8E0h ; GET BOOT INFORMATION
BC_SYSGET_CPUINFO EQU 0F8F0h ; GET CPU INFORMATION
BC_SYSGET_MEMINFO EQU 0F8F1h ; GET MEMORY CAPACTITY INFO
BC_SYSGET_BNKINFO EQU 0F8F2h ; GET BANK ASSIGNMENT INFO
BC_SYSGET_CPUSPD EQU 0F8F3h ; GET CLOCK SPEED & WAIT STATES
BC_SYSGET_PANEL EQU 0F8F4h ; GET FRONT PANEL SWITCHES VAL
BC_SYSGET_APPBNKS EQU 0F8F5h ; GET APP BANK INFORMATION
;
BC_SYSSET_TIMER EQU 0F9D0h ; SET TIMER VALUE
BC_SYSSET_SECS EQU 0F9D1h ; SET SECONDS VALUE
BC_SYSSET_BOOTINFO EQU 0F9E0h ; SET BOOT INFORMATION
BC_SYSSET_CPUSPD EQU 0F9F3h ; SET CLOCK SPEED & WAIT STATES
BC_SYSSET_PANEL EQU 0F9F4h ; SET FRONT PANEL LEDS
;
;
;
ERR_NONE EQU 0 ; SUCCESS
;
ERR_UNDEF EQU -1 ; UNDEFINED ERROR
ERR_NOTIMPL EQU -2 ; FUNCTION NOT IMPLEMENTED
ERR_NOFUNC EQU -3 ; INVALID FUNCTION
ERR_NOUNIT EQU -4 ; INVALID UNIT NUMBER
ERR_NOMEM EQU -5 ; OUT OF MEMORY
ERR_RANGE EQU -6 ; PARAMETER OUT OF RANGE
ERR_NOMEDIA EQU -7 ; MEDIA NOT PRESENT
ERR_NOHW EQU -8 ; HARDWARE NOT PRESENT
ERR_IO EQU -9 ; I/O ERROR
ERR_READONLY EQU -10 ; WRITE REQUEST TO READ-ONLY MEDIA
ERR_TIMEOUT EQU -11 ; DEVICE TIMEOUT
ERR_BADCFG EQU -12 ; INVALID CONFIGURATION
ERR_INTERNAL EQU -13 ; INTERNAL ERROR

File diff suppressed because it is too large Load Diff

View File

@@ -190,7 +190,8 @@ please let me know if I missed you!
User Guide and Applications documents.
* Mark Pruden has also contributed a great deal of content to the
User Guide as well as the COPYSL utility.
Disk Catalog, User Guide as well as contributing the disk image
for the Z3PLUS operating system, and the COPYSL utility.
* Jacques Pelletier has contributed the DS1501 RTC driver code.

View File

@@ -2418,6 +2418,88 @@ call "CPM.SYS". For example:
`SYSCOPY C:=B:CPM.SYS`
#### Character Device Mapping
Character device mapping under CP/M 2.2 has 3 layers:
CP/M Logical Device --> CP/M Physical Device --> RomWBW HBIOS Device
The CP/M Logical Devices are:
| Device | Description |
|--------|--------------------------------------------------------------------------|
| `CON:` | System console device, used by CCP for communication with the operator |
| `RDR:` | Paper tape reader device |
| `PUN:` | Paper tape punch device |
| `LST:` | Output list device |
The CP/M Physical Devices are:
| Device | Description |
|--------|--------------------------------------------------------------------------|
| `TTY:` | Teletype device (slow speed console) |
| `CRT:` | Cathode ray tube device (high speed console) |
| `BAT:` | Batch processing (input from `RDR:`, output to `LST:`) |
| `UC1:` | User-defined console |
| `PTR:` | Paper tape reader (high speed reader) |
| `UR1:` | User-defined reader #1 |
| `UR2:` | User-defined reader #2 |
| `PTP:` | Paper tape punch (high speed punch) |
| `UP1:` | User-defined punch #1 |
| `UP2:` | User-defined punch #2 |
| `LPT:` | Line printer |
| `UL1:` | User-defined list device #1 |
CP/M Logical Devices are mapped to CP/M Physical Devices via the
IOBYTE at 0x0003 as shown below.
+----------------+----------+----------+----------+----------+
| Logical Device | `LST:` | `PUN:` | `RDR:` | `CON:` |
+----------------+----------+----------+----------+----------+
| IOBYTE Bits | 7 6 | 5 4 | 3 2 | 1 0 |
+================+==========+==========+==========+==========+
| 0 (0b00) | `TTY:` | `TTY:` | `TTY:` | `TTY:` |
+----------------+----------+----------+----------+----------+
| 1 (0b01) | `CRT:` | `PTP:` | `PTR:` | `CRT:` |
+----------------+----------+----------+----------+----------+
| 2 (0b10) | `LPT:` | `UP1:` | `UR1:` | `BAT:` |
+----------------+----------+----------+----------+----------+
| 3 (0b11) | `UL1:` | `UP2:` | `UR2:` | `UC1:` |
+----------------+----------+----------+----------+----------+
The mappings above can be managed using the `STAT` command. This
command essentially just modifies the IOBYTE value.
CP/M Physical Devices are mapped to RomWBW HBIOS devices during
the boot process depending on the number of HBIOS Char devices
in the system.
All CP/M Physical Devices are initially mapped to HBIOS Char 0.
If additional HBIOS Char devices are available in the system, they will
be mapped as below:
| CP/M | RomWBW HBIOS |
|--------|------------------|
| `TTY:` | Char 0 |
| `CRT:` | CRT |
| `BAT:` | CP/M RDR/LST |
| `UC1:` | Char 1 |
| `PTR:` | Char 1 |
| `UR1:` | Char 2 |
| `UR2:` | Char 3 |
| `PTP:` | Char 1 |
| `UP1:` | Char 2 |
| `UP2:` | Char 3 |
| `LPT:` | Char 1 |
| `UL1:` | Char 2 |
Normally, the HBIOS Console device (Loader prompt) is on HBIOS Device
Char 0. If it has been reassigned to a different HBIOS character
device before launching CP/M, then the above mapping will be modified.
TTY: will be assigned to the current HBIOS console Char device. The
remaining assignments will be filled in with the other Char devices
as available.
#### Notes
* You can change media, but it must be done while at the OS
@@ -2466,6 +2548,12 @@ call "ZSYS.SYS". For example:
`SYSCOPY C:=B:ZSYS.SYS`
#### Character Device Mapping
Mapping of character devices to RomWBW HBIOS Character devices
operates exactly the same as described in [Digital Research CP/M 2.2].
The CP/M 2.2 `STAT` command is used to manipulate the device mappings.
#### Notes
* Although most CP/M 2.2 applications will run under Z-System, some
@@ -2512,6 +2600,11 @@ a host OS. On the RomWBW NZCOM disk images, the boot OS is ZSDOS 1.1.
A `PROFILE.SUB` file is included which automatically launches NZCOM
as soon as ZSDOS loads.
NZCOM is a companion product to Z3PLUS, they are almost identical having
been written by the same team. The only difference is the base operating
system on which they run, but the architecture, the tools, libraries,
files, etc are all primarily the same.
NZCOM is highly configurable. The RomWBW distribution has been
configured in the most basic way possible. You should refer to the
documentation and use `MKZCM` as desired to customize your system.
@@ -2523,6 +2616,8 @@ Manual.pdf" document in order to use this operating system effectively.
#### Documentation
* [NZCOM Users Manual]($doc_root$/CPM/NZCOM Users Manual.pdf)
* [Z-System Users Guide]($doc_root$/CPM/Z-System Users Guide.pdf)
* [ZCPR3.3 User Guide]($doc_root$/CPM/ZCPR3.3 User Guide.pdf)
#### Boot Disk
@@ -2530,6 +2625,18 @@ Since NZ-COM boots via Z-System, you can make a bootable
NZ-COM disk using `ZSYS.SYS` as described in [Z-System] above. You
will need to add a `PROFILE.SUB` file to auto-start NZ-COM itself.
#### Character Device Mapping
Mapping of character devices to RomWBW HBIOS Character devices
operates exactly the same as described in [Digital Research CP/M 2.2].
However, it is **not** possible to manipulate the CP/M Logical to
Physical device mapping using the `STAT` command. The mapping is
static.
Note: A custom ZCPR IOP module could theoretically be used to manage
the character device mappings. RomWBW does not provide this module
and writing an IOP module is beyond the scope of this document.
#### Notes
* All of the notes for [Z-System] above generally apply to NZCOM.
@@ -2537,6 +2644,10 @@ will need to add a `PROFILE.SUB` file to auto-start NZ-COM itself.
* There is no `DIR` command, you must use `SDZ` instead. If you don't
like this, look into the `ALIAS` facility.
* For consistency with other ZCPR3 operating systems (ZPM3, Z3PLUS)
the SHOW.COM and HELP.COM command files were renamed to ZSHOW.COM
and ZHELP.COM
## Digital Research CP/M 3
This is the Digital Research follow-up product to their very popular
@@ -2596,6 +2707,36 @@ COPY A:CCP.COM F:
Note in the example above that `CPM3BNK.SYS` is renamed to `CPM3.SYS`
in the copy command.
#### Character Device Mapping
Character device mapping under CP/M 3 has 3 layers:
CP/M Logical Device --> CP/M Physical Device --> RomWBW HBIOS Device
The primary CP/M Logical Devices are:
| Device | Description |
|--------|--------------------------------------------------------------------------|
| `CON:` | Console input or output device |
| `AUX:` | Auxiliary Input or Output Device |
| `LST:` | List output device, usually the printer |
There are various aliases for these devices. Please refer to the CP/M 3
Users Guide for more information.
The mapping of CP/M 3 Logical Devices to Physical Devices is performed
using the `DEVICE` command.
CP/M 3 refers to Physical Character Devices using the `COM` device
label. These `COM` devices are mapped directly to the RomWBW HBIOS Char
devices as described below:
| `COM0:` --> HBIOS Char 0
| `COM1:` --> HBIOS Char 1
| `COM2:` --> HBIOS Char 2
| . . .
| `COMn:` --> HBIOS Char n
#### Notes
- The `COPYSYS` command described in the DRI CP/M 3 documentation is
@@ -2613,6 +2754,58 @@ in the copy command.
has not been performed on the CP/M 3 disk image. Follow the
CP/M 3 documentation to complete this process, if desired.
## Z3PLUS Z-System for CP/M-Plus
Z3PLUS is a much further refined version of Z-System (ZCPR 3.4). Z3PLUS
was sold as an enhancement for existing users of CP/M 3.
For this reason, (by design) Z3PLUS does not provide a way to boot
directly from disk. Rather, it is loaded after the system boots into
CP/M 3. A `PROFILE.SUB` file is included which automatically launches
Z3PLUS as soon as CP/M 3 loads.
Z3PLUS is a companion product to NZ-COM, they are almost identical having
been written by the same team. The only difference is the base operating
system on which they run, but the architecture, the tools, libraries,
files, etc are all primarily the same.
Z3PLUS is highly configurable. The RomWBW distribution has been
configured in the most basic way possible. You should refer to the
documentation to customize your system.
Z3PLUS has substantially more functionality than CP/M 3 or the basic
Z-System. It is important to read the "Z3PLUS Users Manual.pdf"
document in order to use this operating system effectively.
#### Documentation
* [Z3PLUS Users Manual]($doc_root$/CPM/Z3PLUS Users Manual.pdf)
* [Z-System Users Guide]($doc_root$/CPM/Z-System Users Guide.pdf)
* [ZCPR3.3 User Guide]($doc_root$/CPM/ZCPR3.3 User Guide.pdf)
#### Boot Disk
Since Z3PLUS boots via CP/M 3, you first must make the disk CP/M 3
bootable. This is not a simple process, as well as placing `CPMLDR.SYS` on
the system track of the disk there are several files that are required
on the disk itself.This is described in [Digital Research CP/M 3]
section above.
You will need to add a `PROFILE.SUB` file to auto-start Z3PLUS itself.
#### Character Device Mapping
Mapping of character devices to RomWBW HBIOS Character devices
operates exactly the same as described in [Digital Research CP/M 3].
The CP/M 3 `DEVICE` command is used to manipulate the device mappings.
#### Notes
* All of the notes for [Digital Research CP/M 3] above generally
apply to Z3PLUS.
* Some applications in the Z3PLUS distribution have been upgraded
with newer versions. This is done with in
## ZPM3
Simeon Cran's ZPM3 is an interesting combination of the features of both
@@ -2682,6 +2875,12 @@ COPY A:ZINSTAL.ZPM F:
COPY A:STARTZPM.COM F:
```
#### Character Device Mapping
Mapping of character devices to RomWBW HBIOS Character devices
operates exactly the same as described in [Digital Research CP/M 3].
The CP/M 3 `DEVICE` command is used to manipulate the device mappings.
#### Notes
- The ZPM3 operating system is contained in the file called CPM3.SYS
@@ -2705,7 +2904,6 @@ regarding the RomWBW adaptation and customizations.
#### Boot Disk
To create or update a bootable QP/M Z-System disk, a special process
is required. QP/M is not provided in source format. You are expected
to install QP/M over an existing CP/M installation using the
@@ -2736,6 +2934,14 @@ pre-built RomWBW QP/M disk image includes a couple of specific
non-default settings to optimize use with RomWBW. Please review the
notes in the ReadMe.txt file in Source/Images/d_qpm.
#### Character Device Mapping
Mapping of character devices to RomWBW HBIOS Character devices operates
exactly the same as described in [Digital Research CP/M 2.2]. The
mappings can be viewed or modified using the QP/M `QSTAT` command which
is analogous to the CP/M 2.2 `STAT` command. Do **not** use the CP/M
2.2 `STAT` command under QP/M.
#### Notes
- QPM is not available as source. This implementation was based
@@ -2799,6 +3005,13 @@ scratch under RomWBW. This has already been done as part of the
porting process. You must use the provided p-System hard disk image
file which is bootable.
#### Character Device Mapping
RomWBW Character Devices are automatically assigned to p-System devices
at startup. The current HBIOS Console device is assigned to CONSOLE:.
The next available HBIOS Char device is assigned to REMIN:/REMOUT:. The
next available HBIOS Char devices is assigned to PRINTER:
#### Notes
* There is no floppy support at this time.
@@ -4464,7 +4677,8 @@ please let me know if I missed you!
User Guide and Applications documents.
* Mark Pruden has also contributed a great deal of content to the
User Guide as well as the COPYSL utility.
Disk Catalog, User Guide as well as contributing the disk image
for the Z3PLUS operating system, and the COPYSL utility.
* Jacques Pelletier has contributed the DS1501 RTC driver code.

View File

@@ -89,6 +89,11 @@ call :asm usrrom || exit /b
call :asm updater || exit /b
call :asm imgpad2 || exit /b
::
:: Build components in Sub folders
::
pushd SysConfig && call Build || exit /b & popd
::
:: Create additional ROM bank images by assembling components into
:: 32K chunks which can be concatenated later. Note that
@@ -97,7 +102,7 @@ call :asm imgpad2 || exit /b
::
copy /b romldr.bin + dbgmon.bin + ..\zsdos\zsys_wbw.bin + ..\cpm22\cpm_wbw.bin osimg.bin || exit /b
copy /b ..\Forth\camel80.bin + nascom.bin + ..\tastybasic\src\tastybasic.bin + game.bin + eastaegg.bin + netboot.mod + updater.bin + usrrom.bin osimg1.bin || exit /b
copy /b ..\Forth\camel80.bin + nascom.bin + ..\tastybasic\src\tastybasic.bin + game.bin + eastaegg.bin + netboot.mod + updater.bin + SysConfig\sysconfig.bin + usrrom.bin osimg1.bin || exit /b
if %Platform%==S100 (
zxcc slr180 -s100mon/fh

View File

@@ -52,6 +52,7 @@ if [ "${ROM_PLATFORM}" == "dist" ] ; then
ROM_PLATFORM="NABU"; ROM_CONFIG="std"; bash Build.sh
ROM_PLATFORM="FZ80"; ROM_CONFIG="std"; bash Build.sh
ROM_PLATFORM="UNA"; ROM_CONFIG="std"; bash Build.sh
ROM_PLATFORM="PEGASUS"; ROM_CONFIG="std"; bash Build.sh
exit
fi

View File

@@ -16,3 +16,5 @@ if exist build.inc del build.inc
if exist font*.asm del font*.asm
if exist build_env.cmd del build_env.cmd
if exist hbios_env.cmd del hbios_env.cmd
pushd SysConfig && call Clean & popd

View File

@@ -0,0 +1,56 @@
;
;==================================================================================================
; ROMWBW DEFAULT BUILD SETTINGS FOR Z80 RETRO
;==================================================================================================
;
; THIS FILE DEFINES THE DEFAULT CONFIGURATION SETTINGS FOR THE PLATFORM
; INDICATED ABOVE. THESE SETTINGS DEFINE THE OFFICIAL BUILD FOR THIS
; PLATFORM AS DISTRIBUTED IN ROMWBW RELEASES.
;
; ROMWBW USES CASCADING CONFIGURATION FILES AS INDICATED BELOW:
;
; cfg_MASTER.asm - MASTER: CONFIGURATION FILE DEFINES ALL POSSIBLE ROMWBW SETTINGS
; |
; +-> cfg_<platform>.asm - PLATFORM: DEFAULT SETTINGS FOR SPECIFIC PLATFORM
; |
; +-> Config/<plt>_std.asm - BUILD: SETTINGS FOR EACH OFFICIAL DIST BUILD
; |
; +-> Config/<plt>_<cust>.asm - USER: CUSTOM USER BUILD SETTINGS
;
; THE TOP (MASTER CONFIGURATION) FILE DEFINES ALL POSSIBLE ROMWBW
; CONFIGURATION SETTINGS. EACH FILE BELOW THE MASTER CONFIGURATION FILE
; INHERITS THE CUMULATIVE SETTINGS OF THE FILES ABOVE IT AND MAY
; OVERRIDE THESE SETTINGS AS DESIRED.
;
; OTHER THAN THE TOP MASTER FILE, EACH FILE MUST "#INCLUDE" ITS PARENT
; FILE (SEE #INCLUDE STATEMENT BELOW). THE TOP TWO FILES SHOULD NOT BE
; MODIFIED.
;
; TO CUSTOMIZE YOUR BUILD SETTINGS YOU SHOULD MODIFY THIS FILE, THE
; DEFAULT BUILD SETTINGS (Config/<platform>_std.asm) OR PREFERABLY
; CREATE AN OPTIONAL CUSTOM USER SETTINGS FILE THAT INCLUDES THE DEFAULT
; BUILD SETTINGS FILE (SEE EXAMPLE Config/SBC_user.asm).
;
; BY CREATING A CUSTOM USER SETTINGS FILE, YOU ARE LESS LIKELY TO BE
; IMPACTED BY FUTURE CHANGES BECAUSE YOU WILL BE INHERITING MOST
; OF YOUR SETTINGS WHICH WILL BE UPDATED BY AUTHORS AS ROMWBW EVOLVES.
;
; PLEASE REFER TO THE CUSTOM BUILD INSTRUCTIONS (README.TXT) IN THE
; SOURCE DIRECTORY (TWO DIRECTORIES ABOVE THIS ONE).
;
; *** WARNING: ASIDE FROM THE MASTER CONFIGURATION FILE, YOU MUST USE
; ".SET" TO OVERRIDE SETTINGS. THE ASSEMBLER WILL ERROR IF YOU ATTEMPT
; TO USE ".EQU" BECAUSE IT WON'T LET YOU REDEFINE A SETTING WITH ".EQU".
;
#DEFINE BOOT_DEFAULT "H" ; DEFAULT BOOT LOADER CMD ON <CR> OR AUTO BOOT
;
#INCLUDE "cfg_PEGASUS.asm"
;
CPUOSC .SET 14745600 ; CPU OSC FREQ IN MHZ
INTMODE .SET 2 ; INTERRUPTS: 0=NONE, 1=MODE 1, 2=MODE 2
;
CRTACT .SET FALSE ; ACTIVATE CRT (VDU,CVDU,PROPIO,ETC) AT STARTUP
;
UARTENABLE .SET FALSE ; UART: ENABLE 8250/16550-LIKE SERIAL DRIVER (UART.ASM)
;
SDENABLE .SET TRUE ; SD: ENABLE SD CARD DISK DRIVER (SD.ASM)

View File

@@ -75,9 +75,10 @@ IDEENABLE .SET TRUE ; IDE: ENABLE IDE DISK DRIVER (IDE.ASM)
;
PPIDEENABLE .SET TRUE ; PPIDE: ENABLE PARALLEL PORT IDE DISK DRIVER (PPIDE.ASM)
;
SDENABLE .SET FALSE ; SD: ENABLE SD CARD DISK DRIVER (SD.ASM)
SDENABLE .SET TRUE ; SD: ENABLE SD CARD DISK DRIVER (SD.ASM)
SDMODE .SET SDMODE_PIO ; SD: DRIVER MODE: SDMODE_[JUHA|N8|CSIO|PPI|UART|DSD|MK4|SC|MT|USR|PIO|Z80R|EPITX|FZ80]
SDCNT .SET 1 ; SD: NUMBER OF SD CARD DEVICES (1-2), FOR DSD/SC/MT ONLY
;
PRPENABLE .SET FALSE ; PRP: ENABLE ECB PROPELLER IO BOARD DRIVER (PRP.ASM)
;
LPTENABLE .SET FALSE ; LPT: ENABLE CENTRONICS PRINTER DRIVER (LPT.ASM)

View File

@@ -3,10 +3,11 @@ MOREDIFF = game.bin hbios_rom.bin nascom.bin usrrom.bin \
dbgmon.bin hbios_app.bin imgpad2.bin osimg1.bin osimg2.bin romldr.bin \
eastaegg.bin hbios_img.bin osimg.bin game.bin updater.bin usrrom.bin
SUBDIRS =
# SUBDIRS = SysConfig
DEST = ../../Binary
TOOLS =../../Tools
OTHERS = *.img *.rom *.com *.upd *.bin *.hex cpm.sys zsys.sys Build.inc font*.asm *.dat hbios_env.sh
OTHERS = *.img *.rom *.com *.upd *.bin *.hex cpm.sys zsys.sys Build.inc font*.asm *.dat hbios_env.sh \
SysConfig/*.com SysConfig/*.bin SysConfig/*.lst
# DIFFMAKE = 1
@@ -62,7 +63,7 @@ $(OBJECTS) : $(ROMDEPS)
@cat romldr.bin dbgmon.bin ../ZSDOS/zsys_$(BIOS).bin ../CPM22/cpm_$(BIOS).bin >osimg.bin
cat romldr.bin dbgmon.bin ../ZSDOS/zsys_$(BIOS).bin >osimg_small.bin
if [ $(ROM_PLATFORM) != UNA ] ; then \
cat camel80.bin nascom.bin tastybasic.bin game.bin eastaegg.bin netboot.mod updater.bin usrrom.bin >osimg1.bin ; \
cat camel80.bin nascom.bin tastybasic.bin game.bin eastaegg.bin netboot.mod updater.bin SysConfig/sysconfig.bin usrrom.bin >osimg1.bin ; \
if [ $(ROM_PLATFORM) = S100 ] ; then \
cat s100mon.bin >osimg2.bin ; \
else \
@@ -88,7 +89,7 @@ $(OBJECTS) : $(ROMDEPS)
fi \
fi
prereq: $(FONTS) camel80.bin tastybasic.bin
prereq: $(FONTS) camel80.bin tastybasic.bin syscon
font%.asm:
cp ../Fonts/$@ .
@@ -96,13 +97,16 @@ font%.asm:
camel80.bin:
cp ../Forth/$@ .
syscon:
$(MAKE) --directory SysConfig
s100mon.bin:
$(ZXCC) $(CPM)/SLR180 -s100mon/FH
$(ZXCC) $(CPM)/MLOAD25 -s100mon.bin=s100mon
tastybasic.bin:
cp ../TastyBasic/src/$@ .
hbios_rom.bin: hbios.asm build.inc $(DEPS)
@$(TASM) -dROMBOOT hbios.asm hbios_rom.bin hbios_rom.lst
@@ -114,7 +118,7 @@ hbios_img.bin: hbios.asm build.inc $(DEPS)
hbios_env.com: hbios_env.asm build.inc
@$(TASM) -dBASH hbios_env.asm hbios_env.com hbios_env.lst
hbios_env.sh: hbios_env.com
@$(ZXCC) hbios_env.com >hbios_env.sh

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