mirror of
https://github.com/wwarthen/RomWBW.git
synced 2026-02-06 22:43:15 -06:00
Compare commits
127 Commits
v3.4.0-dev
...
v3.5.0-dev
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1649b6093b | ||
|
|
d50593a70e | ||
|
|
874cc450ba | ||
|
|
918ed66967 | ||
|
|
7fe0312359 | ||
|
|
842a79ae5d | ||
|
|
34d25cb906 | ||
|
|
b8af62d7de | ||
|
|
b28c3b7978 | ||
|
|
bf9a8400de | ||
|
|
c3c541d150 | ||
|
|
cecd13fba9 | ||
|
|
7ce7bda43e | ||
|
|
bb5161dcb0 | ||
|
|
285853e65d | ||
|
|
ab1e9ccab8 | ||
|
|
33cbdd2040 | ||
|
|
792e76b069 | ||
|
|
d572a7ca32 | ||
|
|
c4f78bb3ae | ||
|
|
77ba29c73f | ||
|
|
1a24fcb61b | ||
|
|
9dbceb4a15 | ||
|
|
c2721d1572 | ||
|
|
b7a26bb274 | ||
|
|
6ecf8f9920 | ||
|
|
c1d7a41c82 | ||
|
|
c622e43c14 | ||
|
|
119e2d5421 | ||
|
|
b574768e2b | ||
|
|
2aa3bc2018 | ||
|
|
627e012f3f | ||
|
|
4d39bf93ba | ||
|
|
d2f7830b9e | ||
|
|
30db4c7fe9 | ||
|
|
b020fc3901 | ||
|
|
3f102e0151 | ||
|
|
e18014a8a7 | ||
|
|
074f2cfdb2 | ||
|
|
91f5b36fbc | ||
|
|
9ad7798713 | ||
|
|
807999928e | ||
|
|
0b1bbf3d2b | ||
|
|
d93e639e4b | ||
|
|
b633c309f4 | ||
|
|
a00cf821c7 | ||
|
|
d13ea96f35 | ||
|
|
8e4bb575f1 | ||
|
|
ee8cdfa4b8 | ||
|
|
6f7d1447ea | ||
|
|
3e6120e0fa | ||
|
|
61565bffd7 | ||
|
|
0bac6f32ea | ||
|
|
462545bfe7 | ||
|
|
cc4ad0d4b9 | ||
|
|
458b04404e | ||
|
|
4143cfa4cf | ||
|
|
438e59a05e | ||
|
|
7385d07b9a | ||
|
|
5bea1f400e | ||
|
|
1a9701e51d | ||
|
|
23e0b82112 | ||
|
|
b4b5ef19fc | ||
|
|
4dd46c3df6 | ||
|
|
17e3a95768 | ||
|
|
3529cdaa2f | ||
|
|
556b7074ae | ||
|
|
952489eac4 | ||
|
|
8f326fb081 | ||
|
|
2925ab3d42 | ||
|
|
cdb9f9b40a | ||
|
|
def84eded9 | ||
|
|
d89e055f18 | ||
|
|
62f9330de8 | ||
|
|
374ed7ab97 | ||
|
|
c7bee46f60 | ||
|
|
e9b9782ede | ||
|
|
af00df9182 | ||
|
|
e286a428bf | ||
|
|
f2fc049f07 | ||
|
|
d8a485a5fb | ||
|
|
ed53030de2 | ||
|
|
4b88986de8 | ||
|
|
3df34b4ce0 | ||
|
|
f230fb22da | ||
|
|
2225847212 | ||
|
|
edbe7d0781 | ||
|
|
1d3438fb29 | ||
|
|
a5de77438b | ||
|
|
b841705023 | ||
|
|
72cdbdd4ad | ||
|
|
b8ef50fad5 | ||
|
|
c7d22892c1 | ||
|
|
8b3deb057f | ||
|
|
df42cf544e | ||
|
|
55a41ec0a3 | ||
|
|
4417f871e5 | ||
|
|
1c10f734bd | ||
|
|
214182b514 | ||
|
|
08942fb944 | ||
|
|
5dc724785b | ||
|
|
ce17be9ba6 | ||
|
|
badca621ba | ||
|
|
291cdd2c03 | ||
|
|
888d9879c9 | ||
|
|
39446d5e4f | ||
|
|
af8385fba8 | ||
|
|
10ff97b6c6 | ||
|
|
7e9191f3ef | ||
|
|
a67b1ecd0a | ||
|
|
4012ee7775 | ||
|
|
150ca6b50c | ||
|
|
6af84e9ad8 | ||
|
|
6bcad122cd | ||
|
|
003481410f | ||
|
|
9a1c3f7929 | ||
|
|
ef536750ea | ||
|
|
347a15a3b6 | ||
|
|
1e5b38c251 | ||
|
|
29f93fb153 | ||
|
|
b0975745df | ||
|
|
163460856a | ||
|
|
3ce9246904 | ||
|
|
1a021e02b9 | ||
|
|
f2d304ef0d | ||
|
|
cbfbca8d92 | ||
|
|
d8b7f88dad |
2
.github/pull_request_template.md
vendored
2
.github/pull_request_template.md
vendored
@@ -1,7 +1,7 @@
|
||||
<!--
|
||||
BEFORE YOU CREATE A PULL REQUEST:
|
||||
|
||||
- Please base all pull requests against the dev branch
|
||||
- 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")
|
||||
|
||||
|
||||
12
.github/workflows/commit.yml
vendored
12
.github/workflows/commit.yml
vendored
@@ -14,7 +14,7 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3.3.0
|
||||
uses: actions/checkout@v4.1.1
|
||||
|
||||
- name: Get Commit Ref
|
||||
run: |
|
||||
@@ -26,7 +26,7 @@ jobs:
|
||||
run: |
|
||||
export TZ='America/Los_Angeles'
|
||||
sudo apt-get install srecord
|
||||
make dist
|
||||
make distlog
|
||||
rm -rf .git*
|
||||
|
||||
- name: List Output
|
||||
@@ -36,7 +36,7 @@ jobs:
|
||||
find -type f -exec md5sum '{}' \;
|
||||
|
||||
- name: Upload Artifact
|
||||
uses: actions/upload-artifact@v3.1.1
|
||||
uses: actions/upload-artifact@v4.3.0
|
||||
with:
|
||||
name: RomWBW-${{env.COMMIT_REF}}-Linux
|
||||
path: .
|
||||
@@ -46,7 +46,7 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3.3.0
|
||||
uses: actions/checkout@v4.1.1
|
||||
|
||||
- name: Get Commit Ref
|
||||
run: |
|
||||
@@ -58,7 +58,7 @@ jobs:
|
||||
run: |
|
||||
export TZ='America/Los_Angeles'
|
||||
brew install srecord
|
||||
make dist
|
||||
make distlog
|
||||
rm -rf .git*
|
||||
|
||||
- name: List Output
|
||||
@@ -68,7 +68,7 @@ jobs:
|
||||
find . -type f -exec md5 -r -- '{}' +;
|
||||
|
||||
- name: Upload Artifact
|
||||
uses: actions/upload-artifact@v3.1.1
|
||||
uses: actions/upload-artifact@v4.3.0
|
||||
with:
|
||||
name: RomWBW-${{env.COMMIT_REF}}-MacOS
|
||||
path: .
|
||||
|
||||
4
.github/workflows/release.yml
vendored
4
.github/workflows/release.yml
vendored
@@ -12,14 +12,14 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3.3.0
|
||||
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 dist
|
||||
make distlog
|
||||
rm -rf .git*
|
||||
|
||||
- name: Create Package Archive
|
||||
|
||||
8
.gitignore
vendored
8
.gitignore
vendored
@@ -20,7 +20,7 @@
|
||||
|
||||
Binary/**/*.mym
|
||||
Binary/**/*.pt3
|
||||
!Binary/cpnos-wbw.sys
|
||||
!Binary/CPNET/NetBoot/cpnos-wbw.sys
|
||||
|
||||
Source/**/eeprom
|
||||
Source/Apps/Assign.com
|
||||
@@ -85,6 +85,7 @@ Tools/unix/zx/zx
|
||||
!Source/BPBIOS/*.lib
|
||||
!Source/BPBIOS/Z34RCP11/cledinst.com
|
||||
!Source/BPBIOS/Z34RCP11/cledsave.com
|
||||
!Source/CPNET/**
|
||||
!Source/Fonts/*
|
||||
!Source/Images/**
|
||||
!Source/RomDsk/**
|
||||
@@ -95,8 +96,9 @@ Tools/unix/zx/zx
|
||||
!Source/ZPM3/*.[Cc][Oo][Mm]
|
||||
!Source/ZSDOS/*.[Cc][Oo][Mm]
|
||||
!Source/ZRC/*.bin
|
||||
!Source/ZZRC/*.bin
|
||||
!Source/ZZRC/*.hex
|
||||
!Source/ZRC512/*.bin
|
||||
!Source/Z1RCC/*.bin
|
||||
!Source/ZZRCC/*.bin
|
||||
!Tools/cpm/**
|
||||
!Tools/unix/zx/*
|
||||
!Tools/zx/*
|
||||
|
||||
4
Binary/CPNET/Clean.cmd
Normal file
4
Binary/CPNET/Clean.cmd
Normal file
@@ -0,0 +1,4 @@
|
||||
@echo off
|
||||
setlocal
|
||||
|
||||
if exist *.lbr del *.lbr
|
||||
7
Binary/CPNET/Makefile
Normal file
7
Binary/CPNET/Makefile
Normal file
@@ -0,0 +1,7 @@
|
||||
TOOLS = ../../Tools
|
||||
MOREDIFF := $(shell $(TOOLS)/unix/casefn.sh *.lbr)
|
||||
|
||||
include $(TOOLS)/Makefile.inc
|
||||
|
||||
clean::
|
||||
@rm -f *.lbr
|
||||
38
Binary/CPNET/ReadMe.txt
Normal file
38
Binary/CPNET/ReadMe.txt
Normal file
@@ -0,0 +1,38 @@
|
||||
***********************************************************************
|
||||
*** ***
|
||||
*** 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
|
||||
@@ -14,3 +14,4 @@ if exist *.eeprom del *.eeprom
|
||||
pushd Apps && call Clean || exit /b 1 & popd
|
||||
pushd CPM3 && call Clean || exit /b 1 & popd
|
||||
pushd ZPM3 && call Clean || exit /b 1 & popd
|
||||
pushd CPNET && call Clean || exit /b 1 & popd
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
TOOLS = ../Tools
|
||||
MOREDIFF := $(shell $(TOOLS)/unix/casefn.sh *.img *.rom *.com *.eeprom)
|
||||
SUBDIRS = Apps CPM3 ZPM3
|
||||
SUBDIRS = Apps CPM3 ZPM3 CPNET
|
||||
|
||||
include $(TOOLS)/Makefile.inc
|
||||
|
||||
|
||||
@@ -110,7 +110,9 @@ Refer to the ReadMe.txt in the Source/Images directory
|
||||
for details.
|
||||
|
||||
Documentation of the pre-built disk images is contained in the
|
||||
DiskList.txt file in this directory.
|
||||
"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
|
||||
|
||||
42
CONTRIBUTING.md
Normal file
42
CONTRIBUTING.md
Normal file
@@ -0,0 +1,42 @@
|
||||
# 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 a 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.
|
||||
|
||||
## 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.
|
||||
@@ -1,10 +1,58 @@
|
||||
Version 3.5
|
||||
-----------
|
||||
- M?F: Fix for hours display in HBRTC application
|
||||
- M?F: Fix for assembly error in DS1501RTC driver
|
||||
- WBW: Add VT-100 graphics char selection to Propeller firmware
|
||||
- WBW: Allow all lines of VGA display to be used on Propeller firmware
|
||||
- WBW: Allow front panel LED/Switch bits to be inverted in config
|
||||
- WBW: Add API to expose application banks available
|
||||
- WBW: Added console takeover at boot loader prompt
|
||||
- L?N: Fixed Propeller font vertical line character to align properly
|
||||
- L?S: EF9345 video display controller driver
|
||||
- WBW: Added Cowgol disk image based on the work of Ladislau Szilagyi
|
||||
- WBW: Added support for CP/NET on Duodyne Disk I/O
|
||||
- DDW: Added support for Duodyne Media board
|
||||
|
||||
Version 3.4
|
||||
-----------
|
||||
NOTE: Changes require HBIOS/CBIOS/Apps sync, version bump to 3.4 to ensure integrity
|
||||
- WBW: Device type number moved from upper nibble to full byte
|
||||
- A?C: Support for EP ITX-Mini Z180 Platform
|
||||
- M?R: Significant improvement in User Guide document
|
||||
- J?P: Preliminary support for Monsputer (MON)
|
||||
- JLC: Standardize TMS driver memory map for compatibility
|
||||
- WBW: Improved IDE device detection
|
||||
- WBW: Fixed decompression when run on Z280
|
||||
- K?B: WDATE generic HBIOS date/time utility
|
||||
- WBW: Create new DSKY framework with simple driver style interface
|
||||
- JBL: Added ColecoVision config in TMS driver
|
||||
- WBW: Added support for interrupt mode 1 on Z180
|
||||
- WBW: Added S100 platform
|
||||
- WBW: Added Duodyne platform
|
||||
- WBW: Incorporated John Monahan's S100 Monitor in S100 platform build
|
||||
- WBW: Support ESP32 on Duodyne
|
||||
- M?C: Fixed port specification when using XM.COM send transfers
|
||||
- PMS: Support for Duodyne DMA
|
||||
- WBW: Added Serial ROM (SROM.COM) utility
|
||||
- WBW: Support S100 Propeller Console
|
||||
- SCC: Added support for SC700
|
||||
- WBW: Added Heath H8 platform
|
||||
- D?J: Enhanced build to run on Raspberry Pi 4
|
||||
- WBW: Complete overhaul of ROMless boot operation
|
||||
- WBW: Prevent access to slices outside of partition
|
||||
- T?P: Contributed the HTALK utility
|
||||
- WBW: CTS stall detection
|
||||
- W?S: Updated FLASH utility to v1.3.7
|
||||
- L?N: Updated UNARC to new OS universal version
|
||||
- B?C: Added support for Z1RCC
|
||||
- M?R: User Guide enhancements and corrections
|
||||
- D?H: Added support for specification of secondary console
|
||||
- WBW: Added platform for Monsputer
|
||||
- WBW: Added FAT.COM to standard ROM Disk (removed RMAC.COM & LINK.COM)
|
||||
|
||||
Version 3.3
|
||||
-----------
|
||||
NOTE: v3.3 was never released
|
||||
- WBW: Support Front Panel switches
|
||||
- A?C: Preliminary support for Z80-Retro
|
||||
- A?C: Support for SD PIO
|
||||
@@ -12,7 +60,7 @@ Version 3.3
|
||||
- WBW: Support per-drive floppy configuration
|
||||
- WBW: Support for Bill Shen's VGARC
|
||||
- WBW: Support for MG014 Parallel Port module + printer
|
||||
- WBW: Support for EMM Zip Drive on PPI interface (much inspiration from Alan Cox)
|
||||
- WBW: Support for IMM Zip Drive on PPI interface (much inspiration from Alan Cox)
|
||||
- WBW: Support for PPA Zip Drive on PPI interface (much inspiration from Alan Cox)
|
||||
- WBW: Support for SyQuest SparQ Drive on PPI interface (much inspiration from Alan Cox)
|
||||
- WBW: Support for ATAPI Disk Drives (not CD-ROMs) on IDE and PPIDE interfaces
|
||||
|
||||
BIN
Doc/Cowgol Language.pdf
Normal file
BIN
Doc/Cowgol Language.pdf
Normal file
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.
BIN
Doc/The Cowgol language.pdf
Normal file
BIN
Doc/The Cowgol language.pdf
Normal file
Binary file not shown.
10
Makefile
10
Makefile
@@ -1,5 +1,8 @@
|
||||
.PHONY: tools source clean clobber diff dist
|
||||
|
||||
.ONESHELL:
|
||||
.SHELLFLAGS = -cex
|
||||
|
||||
all: tools source
|
||||
|
||||
tools:
|
||||
@@ -20,6 +23,9 @@ diff:
|
||||
$(MAKE) --directory Source diff
|
||||
|
||||
dist:
|
||||
$(MAKE) ROM_PLATFORM=dist 2>&1 | tee make.log
|
||||
$(MAKE) --directory Source clean
|
||||
$(MAKE) ROM_PLATFORM=dist
|
||||
$(MAKE) --directory Tools clean
|
||||
$(MAKE) --directory Source clean
|
||||
|
||||
distlog:
|
||||
$(MAKE) dist 2>&1 | tee make.log
|
||||
|
||||
88
ReadMe.md
88
ReadMe.md
@@ -1,9 +1,9 @@
|
||||
|
||||
|
||||
**RomWBW ReadMe** \
|
||||
Version 3.4 \
|
||||
Version 3.5 \
|
||||
Wayne Warthen ([wwarthen@gmail.com](mailto:wwarthen@gmail.com)) \
|
||||
09 Oct 2023
|
||||
28 Feb 2024
|
||||
|
||||
# Overview
|
||||
|
||||
@@ -14,15 +14,24 @@ platforms are supported including those produced by these developer
|
||||
communities:
|
||||
|
||||
- [RetroBrew Computers](https://www.retrobrewcomputers.org)
|
||||
- [RC2014](https://rc2014.co.uk),
|
||||
(<https://www.retrobrewcomputers.org>)
|
||||
- [RC2014](https://rc2014.co.uk) (<https://rc2014.co.uk>),
|
||||
[RC2014-Z80](https://groups.google.com/g/rc2014-z80)
|
||||
- [retro-comp](https://groups.google.com/forum/#!forum/retro-comp)
|
||||
(<https://groups.google.com/g/rc2014-z80>)
|
||||
- [Retro Computing](https://groups.google.com/g/retro-comp)
|
||||
(<https://groups.google.com/g/retro-comp>)
|
||||
- [Small Computer Central](https://smallcomputercentral.com/)
|
||||
(<https://smallcomputercentral.com/>)
|
||||
|
||||
A complete list of the currently supported platforms is found in the
|
||||
\[Installation\] section.
|
||||
|
||||
General features include:
|
||||
|
||||
- Z80 Family CPUs including Z80, Z180, and Z280
|
||||
- Banked memory services for several banking designs
|
||||
- Disk drivers for RAM, ROM, Floppy, IDE, CF, and SD
|
||||
- Disk drivers for RAM, ROM, Floppy, IDE ATA/ATAPI, CF, SD, USB, Zip,
|
||||
Iomega
|
||||
- Serial drivers including UART (16550-like), ASCI, ACIA, SIO
|
||||
- Video drivers including TMS9918, SY6545, MOS8563, HD6445
|
||||
- Keyboard (PS/2) drivers via VT8242 or PPI interfaces
|
||||
@@ -42,11 +51,11 @@ ROM firmware itself:
|
||||
|
||||
A dynamic disk drive letter assignment mechanism allows mapping
|
||||
operating system drive letters to any available disk media.
|
||||
Additionally, mass storage devices (IDE Disk, CF Card, SD Card) support
|
||||
the use of multiple slices (up to 256 per device). Each slice contains a
|
||||
complete CP/M filesystem and can be mapped independently to any drive
|
||||
letter. This overcomes the inherent size limitations in legacy OSes and
|
||||
allows up to 2GB of accessible storage on a single device.
|
||||
Additionally, mass storage devices (IDE Disk, CF Card, SD Card, etc.)
|
||||
support the use of multiple slices (up to 256 per device). Each slice
|
||||
contains a complete CP/M filesystem and can be mapped independently to
|
||||
any drive letter. This overcomes the inherent size limitations in legacy
|
||||
OSes and allows up to 2GB of accessible storage on a single device.
|
||||
|
||||
The pre-built ROM firmware images are generally suitable for most users.
|
||||
However, it is also very easy to modify and build custom ROM images that
|
||||
@@ -66,7 +75,7 @@ changing media.
|
||||
By design, RomWBW isolates all of the hardware specific functions in the
|
||||
ROM chip itself. The ROM provides a hardware abstraction layer such that
|
||||
all of the operating systems and applications on a disk will run on any
|
||||
RomWBW-based system. To put it simply, you can take a disk (or CF/SD
|
||||
RomWBW-based system. To put it simply, you can take a disk (or CF/SD/USB
|
||||
Card) and move it between systems transparently.
|
||||
|
||||
A tool is provided that allows you to access a FAT-12/16/32 filesystem.
|
||||
@@ -76,18 +85,19 @@ OSes such as Windows, MacOS, and Linux very easy.
|
||||
|
||||
# Acquiring RomWBW
|
||||
|
||||
The [RomWBW Repository](https://github.com/wwarthen/RomWBW) on GitHub is
|
||||
the official distribution location for all project source and
|
||||
documentation. The fully-built distribution releases are available on
|
||||
the [RomWBW Releases Page](https://github.com/wwarthen/RomWBW/releases)
|
||||
of the repository. On this page, you will normally see a Development
|
||||
Snapshot as well as recent stable releases. Unless you have a specific
|
||||
reason, I suggest you stick to the most recent stable release. Expand
|
||||
the “Assets” drop-down for the release you want to download, then select
|
||||
the asset named RomWBW-vX.X.X-Package.zip. The Package asset includes
|
||||
all pre-built ROM and Disk images as well as full source code. The other
|
||||
assets contain only source code and do not have the pre-built ROM or
|
||||
disk images.
|
||||
The [RomWBW Repository](https://github.com/wwarthen/RomWBW)
|
||||
(<https://github.com/wwarthen/RomWBW>) on GitHub is the official
|
||||
distribution location for all project source and documentation. The
|
||||
fully-built distribution releases are available on the [RomWBW Releases
|
||||
Page](https://github.com/wwarthen/RomWBW/releases)
|
||||
(<https://github.com/wwarthen/RomWBW/releases>) of the repository. On
|
||||
this page, you will normally see a Development Snapshot as well as
|
||||
recent stable releases. Unless you have a specific reason, I suggest you
|
||||
stick to the most recent stable release. Expand the “Assets” drop-down
|
||||
for the release you want to download, then select the asset named
|
||||
RomWBW-vX.X.X-Package.zip. The Package asset includes all pre-built ROM
|
||||
and Disk images as well as full source code. The other assets contain
|
||||
only source code and do not have the pre-built ROM or disk images.
|
||||
|
||||
All source code and distributions are maintained on GitHub. Code
|
||||
contributions are very welcome.
|
||||
@@ -187,6 +197,38 @@ let me know if I missed you!
|
||||
Aztec C, HiTech C, SLR Z80ASM, Turbo Pascal, Microsoft BASIC Compiler,
|
||||
Microsoft Fortran Compiler, and a Games compendium.
|
||||
|
||||
- Martin R has provided substantial help reviewing and improving the
|
||||
User Guide.
|
||||
|
||||
- Jacques Pelletier has contributed the DS1501 RTC driver code.
|
||||
|
||||
- Jose Collado has contributed enhancements to the TMS driver including
|
||||
compatibility with standard TMS register configuration.
|
||||
|
||||
- Kevin Boone has contributed a generic HBIOS date/time utility (WDATE).
|
||||
|
||||
- Matt Carroll has contributed a fix to XM.COM that corrects the port
|
||||
specification when doing a send.
|
||||
|
||||
- Dean Jenkins enhanced the build process to accommodate the Raspberry
|
||||
Pi 4.
|
||||
|
||||
- Tom Plano has contributed a new utility (HTALK) to allow talking
|
||||
directly to HBIOS COM ports.
|
||||
|
||||
- Lars Nelson has contributed several generic utilities such as a
|
||||
universal (OS agnostic) UNARC application.
|
||||
|
||||
- Dylan Hall added support for specifying a secondary console.
|
||||
|
||||
- Bill Shen has contributed boot loaders for several of his systems.
|
||||
|
||||
- Laszlo Szolnoki has contributed an EF9345 video display controller
|
||||
driver.
|
||||
|
||||
- Ladislau Szilagyi has contributed an enhanced version of CP/M Cowgol
|
||||
that leverages RomWBW memory banking.
|
||||
|
||||
Contributions of all kinds to RomWBW are very welcome.
|
||||
|
||||
# Licensing
|
||||
|
||||
85
ReadMe.txt
85
ReadMe.txt
@@ -1,6 +1,6 @@
|
||||
RomWBW ReadMe
|
||||
Wayne Warthen (wwarthen@gmail.com)
|
||||
09 Oct 2023
|
||||
28 Feb 2024
|
||||
|
||||
|
||||
|
||||
@@ -13,15 +13,21 @@ Z80/180/280 retro-computing hardware systems. A wide variety of
|
||||
platforms are supported including those produced by these developer
|
||||
communities:
|
||||
|
||||
- RetroBrew Computers
|
||||
- RC2014, RC2014-Z80
|
||||
- retro-comp
|
||||
- Small Computer Central
|
||||
- RetroBrew Computers (https://www.retrobrewcomputers.org)
|
||||
- RC2014 (https://rc2014.co.uk),
|
||||
RC2014-Z80 (https://groups.google.com/g/rc2014-z80)
|
||||
- Retro Computing (https://groups.google.com/g/retro-comp)
|
||||
- Small Computer Central (https://smallcomputercentral.com/)
|
||||
|
||||
A complete list of the currently supported platforms is found in the
|
||||
[Installation] section.
|
||||
|
||||
General features include:
|
||||
|
||||
- Z80 Family CPUs including Z80, Z180, and Z280
|
||||
- Banked memory services for several banking designs
|
||||
- Disk drivers for RAM, ROM, Floppy, IDE, CF, and SD
|
||||
- Disk drivers for RAM, ROM, Floppy, IDE ATA/ATAPI, CF, SD, USB, Zip,
|
||||
Iomega
|
||||
- Serial drivers including UART (16550-like), ASCI, ACIA, SIO
|
||||
- Video drivers including TMS9918, SY6545, MOS8563, HD6445
|
||||
- Keyboard (PS/2) drivers via VT8242 or PPI interfaces
|
||||
@@ -41,11 +47,11 @@ ROM firmware itself:
|
||||
|
||||
A dynamic disk drive letter assignment mechanism allows mapping
|
||||
operating system drive letters to any available disk media.
|
||||
Additionally, mass storage devices (IDE Disk, CF Card, SD Card) support
|
||||
the use of multiple slices (up to 256 per device). Each slice contains a
|
||||
complete CP/M filesystem and can be mapped independently to any drive
|
||||
letter. This overcomes the inherent size limitations in legacy OSes and
|
||||
allows up to 2GB of accessible storage on a single device.
|
||||
Additionally, mass storage devices (IDE Disk, CF Card, SD Card, etc.)
|
||||
support the use of multiple slices (up to 256 per device). Each slice
|
||||
contains a complete CP/M filesystem and can be mapped independently to
|
||||
any drive letter. This overcomes the inherent size limitations in legacy
|
||||
OSes and allows up to 2GB of accessible storage on a single device.
|
||||
|
||||
The pre-built ROM firmware images are generally suitable for most users.
|
||||
However, it is also very easy to modify and build custom ROM images that
|
||||
@@ -65,7 +71,7 @@ changing media.
|
||||
By design, RomWBW isolates all of the hardware specific functions in the
|
||||
ROM chip itself. The ROM provides a hardware abstraction layer such that
|
||||
all of the operating systems and applications on a disk will run on any
|
||||
RomWBW-based system. To put it simply, you can take a disk (or CF/SD
|
||||
RomWBW-based system. To put it simply, you can take a disk (or CF/SD/USB
|
||||
Card) and move it between systems transparently.
|
||||
|
||||
A tool is provided that allows you to access a FAT-12/16/32 filesystem.
|
||||
@@ -78,16 +84,18 @@ OSes such as Windows, MacOS, and Linux very easy.
|
||||
ACQUIRING ROMWBW
|
||||
|
||||
|
||||
The RomWBW Repository on GitHub is the official distribution location
|
||||
for all project source and documentation. The fully-built distribution
|
||||
releases are available on the RomWBW Releases Page of the repository. On
|
||||
this page, you will normally see a Development Snapshot as well as
|
||||
recent stable releases. Unless you have a specific reason, I suggest you
|
||||
stick to the most recent stable release. Expand the “Assets” drop-down
|
||||
for the release you want to download, then select the asset named
|
||||
RomWBW-vX.X.X-Package.zip. The Package asset includes all pre-built ROM
|
||||
and Disk images as well as full source code. The other assets contain
|
||||
only source code and do not have the pre-built ROM or disk images.
|
||||
The RomWBW Repository (https://github.com/wwarthen/RomWBW) on GitHub is
|
||||
the official distribution location for all project source and
|
||||
documentation. The fully-built distribution releases are available on
|
||||
the RomWBW Releases Page (https://github.com/wwarthen/RomWBW/releases)
|
||||
of the repository. On this page, you will normally see a Development
|
||||
Snapshot as well as recent stable releases. Unless you have a specific
|
||||
reason, I suggest you stick to the most recent stable release. Expand
|
||||
the “Assets” drop-down for the release you want to download, then select
|
||||
the asset named RomWBW-vX.X.X-Package.zip. The Package asset includes
|
||||
all pre-built ROM and Disk images as well as full source code. The other
|
||||
assets contain only source code and do not have the pre-built ROM or
|
||||
disk images.
|
||||
|
||||
All source code and distributions are maintained on GitHub. Code
|
||||
contributions are very welcome.
|
||||
@@ -189,6 +197,39 @@ let me know if I missed you!
|
||||
including Aztec C, HiTech C, SLR Z80ASM, Turbo Pascal, Microsoft
|
||||
BASIC Compiler, Microsoft Fortran Compiler, and a Games compendium.
|
||||
|
||||
- Martin R has provided substantial help reviewing and improving the
|
||||
User Guide.
|
||||
|
||||
- Jacques Pelletier has contributed the DS1501 RTC driver code.
|
||||
|
||||
- Jose Collado has contributed enhancements to the TMS driver
|
||||
including compatibility with standard TMS register configuration.
|
||||
|
||||
- Kevin Boone has contributed a generic HBIOS date/time utility
|
||||
(WDATE).
|
||||
|
||||
- Matt Carroll has contributed a fix to XM.COM that corrects the port
|
||||
specification when doing a send.
|
||||
|
||||
- Dean Jenkins enhanced the build process to accommodate the Raspberry
|
||||
Pi 4.
|
||||
|
||||
- Tom Plano has contributed a new utility (HTALK) to allow talking
|
||||
directly to HBIOS COM ports.
|
||||
|
||||
- Lars Nelson has contributed several generic utilities such as a
|
||||
universal (OS agnostic) UNARC application.
|
||||
|
||||
- Dylan Hall added support for specifying a secondary console.
|
||||
|
||||
- Bill Shen has contributed boot loaders for several of his systems.
|
||||
|
||||
- Laszlo Szolnoki has contributed an EF9345 video display controller
|
||||
driver.
|
||||
|
||||
- Ladislau Szilagyi has contributed an enhanced version of CP/M Cowgol
|
||||
that leverages RomWBW memory banking.
|
||||
|
||||
Contributions of all kinds to RomWBW are very welcome.
|
||||
|
||||
|
||||
|
||||
@@ -1,13 +1,10 @@
|
||||
@echo off
|
||||
setlocal
|
||||
|
||||
set TOOLS=../../Tools
|
||||
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
|
||||
|
||||
125
Source/Apps/FAT/ReadMe.md
Normal file
125
Source/Apps/FAT/ReadMe.md
Normal file
@@ -0,0 +1,125 @@
|
||||
# RomWBW HBIOS CP/M FAT Utility ("FAT.COM")
|
||||
|
||||
Author: Wayne Warthen \
|
||||
Updated: 6-Jan-2024
|
||||
|
||||
This application allows copying files between CP/M filesystems and FAT
|
||||
filesystems (DOS, Windows, Mac, Linux, etc.). The application runs on
|
||||
RomWBW hosted CP/M (and compatible) operating systems. The application
|
||||
also has limited file management capabilities on FAT filesystems
|
||||
including directory listing, renaming, deleting, and sub-directory
|
||||
creation.
|
||||
|
||||
### Usage:
|
||||
|
||||
```
|
||||
FAT DIR <path>
|
||||
FAT COPY <src> <dst>
|
||||
FAT REN <from> <to>
|
||||
FAT DEL <path>[<file>|<dir>]
|
||||
FAT MD <path>
|
||||
FAT FORMAT <drv>
|
||||
```
|
||||
|
||||
CP/M filespec: \<d\>:FILENAME.EXT (\<d\> is CP/M drive letter A-P) \
|
||||
FAT filespec: \<u\>:/DIR/FILENAME.EXT (\<u\> is disk unit #)
|
||||
|
||||
### Notes:
|
||||
|
||||
- Partitioned or non-partitioned media is handled automatically.
|
||||
A floppy drive is a good example of a non-partitioned FAT
|
||||
filesystem and will be recognized. Larger media will typically
|
||||
have a partition table which will be recognized by the
|
||||
application to find the FAT filesystem.
|
||||
|
||||
- Although RomWBW-style CP/M media does not know anything about
|
||||
partition tables, it is entirely possible to have media that
|
||||
has both CP/M and FAT file systems on it. This is accomplished
|
||||
by creating a FAT filesystem on the media that starts on a track
|
||||
beyond the last track used by CP/M. Each CP/M slice can occupy
|
||||
up to 8MB. So, make sure to start your FAT partition beyond
|
||||
(slice count) * 9MB.
|
||||
|
||||
- The application infers whether you are attempting to reference
|
||||
a FAT or CP/M filesystem via the drive specifier (char before ':').
|
||||
A numeric drive character specifies the HBIOS disk unit number
|
||||
for FAT access. An alpha (A-P) character indicates a CP/M
|
||||
file system access targeting the specified drive letter. If there
|
||||
is no drive character specified, the current CP/M filesystem and
|
||||
current CP/M drive is assumed. For example:
|
||||
|
||||
`2:README.TXT` refers to FAT file README.TXT on disk unit #2 \
|
||||
`C:README.TXT` refers to CP/M file README.TXT on CP/M drive C: \
|
||||
`README.TXT` refers to CP/M file README.TXT on current CP/M drive
|
||||
|
||||
- FAT files with SYS, HIDDEN, or R/O attributes are not given
|
||||
any special treatment. Such files are found and processed
|
||||
like any other file. However, any attempt to write to a
|
||||
read-only file will fail and the application will abort.
|
||||
|
||||
- It is not currently possible to reference CP/M user areas other
|
||||
than the current user. To copy files to alternate user areas,
|
||||
you must switch to the desired user number first or use an
|
||||
additional step to copy the file to the desired user area.
|
||||
|
||||
- Accessing FAT filesystems on a floppy requires the use of
|
||||
RomWBW HBIOS v2.9.1-pre.13 or greater.
|
||||
|
||||
- Only the first 8 RomWBW disk units (0-7) can be referenced.
|
||||
|
||||
- Files written are not verified.
|
||||
|
||||
- Wildcard matching in FAT filesystems is a bit unusual as
|
||||
implemented by FatFs. See FatFs documentation.
|
||||
|
||||
### License:
|
||||
|
||||
GNU GPLv3 (see file LICENSE.txt)
|
||||
|
||||
### Build Notes:
|
||||
|
||||
- Source is maintained on GitHub at <https://github.com/wwarthen/FAT>.
|
||||
|
||||
- Application is based on FatFs. FatFs source is included. See
|
||||
<http://elm-chan.org/fsw/ff/>.
|
||||
|
||||
- SDCC compiler v4.3 or greater is required to build. New calling
|
||||
conventions introduced in v4.3 are assumed.
|
||||
|
||||
- See Build.cmd for sample build script under Windows. References
|
||||
to SDCC must be updated for your environment.
|
||||
|
||||
- Note that ff.c (core FatFs code) generates quite a few compiler
|
||||
warnings (all appear to be benign).
|
||||
|
||||
### To Do:
|
||||
|
||||
- Allow ^C to abort any operation in progress.
|
||||
|
||||
- Allow referencing more than the first 8 RomWBW disk units.
|
||||
|
||||
- Handle wildcards in destination, e.g.:
|
||||
|
||||
`FAT REN 2:/*.TXT 2:/*.BAK`
|
||||
|
||||
- Do something intelligent with R/O and SYS file attributes
|
||||
|
||||
- Support UNA
|
||||
|
||||
### History:
|
||||
|
||||
| Date | Version | Notes |
|
||||
|------------:|-------- |-------------------------------------------------------------|
|
||||
| 2-May-2019 | v0.9 | (beta) initial release |
|
||||
| 7-May-2019 | v0.9.1 | (beta) added REN and DEL |
|
||||
| 8-May-2019 | v0.9.2 | (beta) handle file collisions w/ user prompt |
|
||||
| 8-Oct-2019 | v0.9.3 | (beta) fixed incorrect filename buffer size (MAX_FN) |
|
||||
| 10-Oct-2019 | v0.9.4 | (beta) upgraded to FatFs R0.13c |
|
||||
| 10-Oct-2019 | v0.9.5 | (beta) added MD (make directory) |
|
||||
| 10-Oct-2019 | v0.9.6 | (beta) added FORMAT |
|
||||
| 11-Oct-2019 | v0.9.7 | (beta) fix FORMAT to use existing partition table entries |
|
||||
| | | add attributes to directory listing |
|
||||
| 12-Apr-2021 | v0.9.8 | (beta) support CP/NET drives |
|
||||
| 12-Oct-2023 | v0.9.9 | (beta) handle updated HBIOS Disk Device call |
|
||||
| 6-Jan-2024 | v1.0.0 | updated to latest FsFat (v0.15) |
|
||||
| | | updated to latest SDCC (v4.3) |
|
||||
@@ -1,105 +0,0 @@
|
||||
RomWBW HBIOS CP/M FAT Utility ("FAT.COM")
|
||||
|
||||
Author: Wayne Warthen
|
||||
Updated: 12-Oct-2023
|
||||
|
||||
Application to manipulate and exchange files with a FAT (DOS)
|
||||
filesystem. Runs on any HBIOS hosted CP/M implementation.
|
||||
|
||||
USAGE:
|
||||
FAT DIR <path>
|
||||
FAT COPY <src> <dst>
|
||||
FAT REN <from> <to>
|
||||
FAT DEL <path>[<file>|<dir>]
|
||||
FAT MD <path>
|
||||
FAT FORMAT <drv>
|
||||
|
||||
CP/M filespec: <d>:FILENAME.EXT (<d> is CP/M drive letter A-P)
|
||||
FAT filespec: <u>:/DIR/FILENAME.EXT (<u> is disk unit #)
|
||||
|
||||
LICENSE:
|
||||
GNU GPLv3 (see file LICENSE.txt)
|
||||
|
||||
NOTES:
|
||||
- Partitioned or non-partitioned media is handled automatically.
|
||||
A floppy drive is a good example of a non-partitioned FAT
|
||||
filesystem and will be recognized. Larger media will typically
|
||||
have a partition table which will be recognized by the
|
||||
application to find the FAT filesystem.
|
||||
|
||||
- Although RomWBW-style CP/M media does not know anything about
|
||||
partition tables, it is entirely possible to have media that
|
||||
has both CP/M and FAT file systems on it. This is accomplished
|
||||
by creating a FAT filesystem on the media that starts on a track
|
||||
beyond the last track used by CP/M. Each CP/M slice on a
|
||||
media will occupy a little over 8MB. So, make sure to start
|
||||
your FAT partition beyond (slice count) * 8MB.
|
||||
|
||||
- The application infers whether you are attempting to reference
|
||||
a FAT or CP/M filesystem via the drive specifier (char before ':').
|
||||
A numeric drive character specifies the HBIOS disk unit number
|
||||
for FAT access. An alpha (A-P) character indicates a CP/M
|
||||
file system access targeting the specified drive letter. If there
|
||||
is no drive character specified, the current CP/M filesystem and
|
||||
current CP/M drive is assumed. For example:
|
||||
|
||||
"2:README.TXT" refers to FAT file README.TXT on disk unit #2
|
||||
"C:README.TXT" refers to CP/M file README.TXT on CP/M drive C
|
||||
"README.TXT" refers to CP/M file README.TXT on current CP/M drive
|
||||
|
||||
- FAT files with SYS, HIDDEN, or R/O only attributes are not given
|
||||
any special treatment. Such files are found and processed
|
||||
like any other file. However, any attempt to write to a
|
||||
read-only file will fail and the application will abort.
|
||||
|
||||
- It is not currently possible to reference CP/M user areas other
|
||||
than the current user. To copy files to alternate user areas,
|
||||
you must switch to the desired user number first or use an
|
||||
additional step to copy the file to the desired user area.
|
||||
|
||||
- Accessing FAT filesystems on a floppy requires the use of
|
||||
RomWBW HBIOS v2.9.1-pre.13 or greater.
|
||||
|
||||
- Files written are not verified.
|
||||
|
||||
- Wildcard matching in FAT filesystems is a bit unusual as
|
||||
implemented by FatFs. See FatFs documentation.
|
||||
|
||||
BUILD NOTES:
|
||||
- Source is maintained on GitHub at https://github.com/wwarthen/FAT
|
||||
|
||||
- Application is based on FatFs. FatFs source is included.
|
||||
|
||||
- SDCC compiler is required to build (v4.0.0 known working).
|
||||
|
||||
- ZX CP/M emulator is required to build (from RomWBW distribution).
|
||||
|
||||
- See Build.cmd for sample build script under Windows. References
|
||||
to SDCC and ZX must be updated for your environment.
|
||||
|
||||
- Note that ff.c (core FatFs code) generates quite a few compiler
|
||||
warnings (all appear to be benign).
|
||||
|
||||
TO DO:
|
||||
- Allow ^C to abort any operation in progress.
|
||||
|
||||
- Handle wildcards in destination, e.g.:
|
||||
"FAT REN 2:/*.TXT 2:/*.BAK"
|
||||
|
||||
- Do something intelligent with R/O and SYS files on FAT
|
||||
|
||||
- Support UNA
|
||||
|
||||
HISTORY:
|
||||
2-May-2019: v0.9 (beta) initial release
|
||||
7-May-2019: v0.9.1 (beta) added REN and DEL
|
||||
8-May-2019: v0.9.2 (beta) handle file collisions w/ user prompt
|
||||
8-Oct-2019: v0.9.3 (beta) fixed incorrect filename buffer size (MAX_FN)
|
||||
10-Oct-2019: v0.9.4 (beta) upgraded to FatFs R0.13c
|
||||
10-Oct-2019: v0.9.5 (beta) added MD (make directory)
|
||||
10-Oct-2019: v0.9.6 (beta) added FORMAT
|
||||
11-Oct-2019: v0.9.7 (beta) fix FORMAT to use existing partition table entries
|
||||
add attributes to directory listing
|
||||
12-Apr-2021: v0.9.8 (beta) support CP/NET drives
|
||||
12-Oct-2023: v0.9.9 (beta) handle updated HBIOS Disk Device call
|
||||
|
||||
Binary file not shown.
@@ -48,7 +48,8 @@
|
||||
; 2020-04-29: v5.5 ADDED SUPPORT FOR ETCHED PIXELS FDC
|
||||
; 2020-12-12: v5.6 UPDATED SMALLZ80 TO NEW I/O ADDRESSES
|
||||
; 2021-03-24: v5.7 ADDED SOME SINGLE-SIDED FORMATS
|
||||
; 2021-07-26: v5.8 ADDED SUPPORT MBC FDC
|
||||
; 2021-07-26: v5.8 ADDED SUPPORT FOR NHYODYNE (MBC) FDC
|
||||
; 2023-12-10: v5.9 ADDED SUPPORT FOR DUODYNE (DUO) FDC
|
||||
;
|
||||
;_______________________________________________________________________________
|
||||
;
|
||||
@@ -85,6 +86,7 @@ FDC_SMZ80 .EQU 8
|
||||
FDC_DYNO .EQU 9
|
||||
FDC_EPFDC .EQU 10
|
||||
FDC_MBC .EQU 11
|
||||
FDC_DUO .EQU 12
|
||||
;
|
||||
; FDC MODE
|
||||
;
|
||||
@@ -219,8 +221,8 @@ INIT5:
|
||||
XOR A
|
||||
RET
|
||||
|
||||
STR_BANNER .DB "Floppy Disk Utility (FDU) v5.8, 26-Jul-2021$"
|
||||
STR_BANNER2 .DB "Copyright (C) 2021, Wayne Warthen, GNU GPL v3","$"
|
||||
STR_BANNER .DB "Floppy Disk Utility (FDU) v5.9, 10-Dec-2023$"
|
||||
STR_BANNER2 .DB "Copyright (C) 2023, Wayne Warthen, GNU GPL v3","$"
|
||||
STR_HBIOS .DB " [HBIOS]$"
|
||||
STR_UBIOS .DB " [UBIOS]$"
|
||||
;
|
||||
@@ -292,6 +294,7 @@ FDCTBL: ; LABEL CONFIG DATA
|
||||
.DW STR_DYNO, CFG_DYNO
|
||||
.DW STR_EPFDC, CFG_EPFDC
|
||||
.DW STR_MBC, CFG_MBC
|
||||
.DW STR_DUO, CFG_DUO
|
||||
FDCCNT .EQU ($-FDCTBL)/4 ; FD CONTROLLER COUNT
|
||||
;
|
||||
; FDC LABEL STRINGS
|
||||
@@ -307,7 +310,8 @@ STR_RCWDC .TEXT "RC-WDC$"
|
||||
STR_SMZ80 .TEXT "SMZ80$"
|
||||
STR_DYNO .TEXT "DYNO$"
|
||||
STR_EPFDC .TEXT "EPFDC$"
|
||||
STR_MBC .TEXT "MBC$"
|
||||
STR_MBC .TEXT "NHYODYNE$"
|
||||
STR_DUO .TEXT "DUODYNE$"
|
||||
;
|
||||
; FDC CONFIGURATION BLOCKS
|
||||
;
|
||||
@@ -448,7 +452,18 @@ CFG_MBC:
|
||||
.DB 035H ; CONFIGURATION CONTROL REGISTER
|
||||
.DB 036H ; DACK (WHEN READ)
|
||||
.DB 037H ; TERMINAL COUNT (W/ DACK)
|
||||
.DB 0FFH ; NOT USED BY ZETA SBC V2
|
||||
.DB 0FFH ; NOT USED
|
||||
.DB _PCAT ; MODE=
|
||||
;
|
||||
CFG_DUO:
|
||||
.DB 080H ; FDC MAIN STATUS REGISTER
|
||||
.DB 081H ; FDC DATA PORT
|
||||
.DB 0FFH ; DATA INPUT REGISTER
|
||||
.DB 086H ; DIGITAL OUTPUT REGISTER (WHEN WRITTEN)
|
||||
.DB 085H ; CONFIGURATION CONTROL REGISTER
|
||||
.DB 086H ; DACK (WHEN READ)
|
||||
.DB 087H ; TERMINAL COUNT (W/ DACK)
|
||||
.DB 0FFH ; NOT USED
|
||||
.DB _PCAT ; MODE=
|
||||
;
|
||||
FDCID .DB 0 ; FDC IDENTIFIER (0 INDEXED)
|
||||
@@ -470,7 +485,8 @@ FSS_MENU:
|
||||
.TEXT " (I) SmallZ80 Expansion\r\n"
|
||||
.TEXT " (J) Dyno-Card FDC, D1030\r\n"
|
||||
.TEXT " (K) RCBus EPFDC\r\n"
|
||||
.TEXT " (L) Multi-Board Computer FDC\r\n"
|
||||
.TEXT " (L) Nhyodyne FDC\r\n"
|
||||
.TEXT " (M) Duodyne FDC\r\n"
|
||||
.TEXT " (X) Exit\r\n"
|
||||
.TEXT "=== OPTION ===> $\r\n"
|
||||
;
|
||||
@@ -1561,6 +1577,7 @@ MD_MAP:
|
||||
.DB %00000001 ; DYNO POLL
|
||||
.DB %00000001 ; EPFDC POLL
|
||||
.DB %00000001 ; MBC POLL
|
||||
.DB %00000001 ; DUO POLL
|
||||
;
|
||||
; MEDIA DESCRIPTION BLOCK
|
||||
;
|
||||
@@ -2021,7 +2038,7 @@ FM_DRAW0B: ; ZETA, DIO3
|
||||
LD A,(FST_DOR)
|
||||
AND 00000010B
|
||||
JR FM_DRAW1
|
||||
FM_DRAW0C: ; DIDE, N8, ZETA2, RCWDC, SMZ80, DYNO, EPFDC, MBC
|
||||
FM_DRAW0C: ; DIDE, N8, ZETA2, RCWDC, SMZ80, DYNO, EPFDC, MBC, DUO
|
||||
LD A,(FST_DOR)
|
||||
AND 11110000B
|
||||
JR FM_DRAW1
|
||||
@@ -2174,7 +2191,7 @@ FM_MOTOR0B: ; ZETA, DIO3
|
||||
LD A,(FST_DOR)
|
||||
AND 00000010B
|
||||
JR FM_MOTOR1
|
||||
FM_MOTOR0C: ; DIDE, N8, ZETA2, RCWDC, SMZ80, DYNO, EPFDC, MBC
|
||||
FM_MOTOR0C: ; DIDE, N8, ZETA2, RCWDC, SMZ80, DYNO, EPFDC, MBC, DUO
|
||||
LD A,(FST_DOR)
|
||||
AND 11110000B
|
||||
JR FM_MOTOR1
|
||||
@@ -2913,7 +2930,7 @@ FC_INIT1: ; DIO
|
||||
FC_INIT2: ; ZETA, DIO3
|
||||
LD A,(FCD_DORB)
|
||||
JR FC_INIT5
|
||||
FC_INIT3: ; DIDE, N8, ZETA2, RCWDC, SMZ80, DYNO, EPFDC, MBC
|
||||
FC_INIT3: ; DIDE, N8, ZETA2, RCWDC, SMZ80, DYNO, EPFDC, MBC, DUO
|
||||
LD A,(FCD_DORC)
|
||||
JR FC_INIT5
|
||||
FC_INIT4: ; WDSMC
|
||||
@@ -2957,7 +2974,7 @@ FC_RESETFDC1: ; ZETA, DIO3, RCSMC
|
||||
POP AF
|
||||
OUT (C),A
|
||||
JR FC_RESETFDC3
|
||||
FC_RESETFDC2: ; DIDE, N8, ZETA2, RCWDC, SMZ80, DYNO, EPFDC, MBC
|
||||
FC_RESETFDC2: ; DIDE, N8, ZETA2, RCWDC, SMZ80, DYNO, EPFDC, MBC, DUO
|
||||
LD A,0
|
||||
OUT (C),A
|
||||
LD A,(FST_DOR)
|
||||
@@ -2984,7 +3001,7 @@ FC_PULSETC:
|
||||
;RES 0,A
|
||||
;OUT (C),A
|
||||
;JR FC_PULSETC2
|
||||
;FC_PULSETC1: ; DIDE, N8, ZETA2, RCWDC, SMZ80, DYNO, EPFDC, MBC
|
||||
;FC_PULSETC1: ; DIDE, N8, ZETA2, RCWDC, SMZ80, DYNO, EPFDC, MBC, DUO
|
||||
;LD C,(IY+CFG_TC)
|
||||
;IN A,(C)
|
||||
;JR FC_PULSETC2
|
||||
@@ -3016,7 +3033,7 @@ FC_MOTORON2: ; ZETA, DIO3
|
||||
LD HL,FST_DOR ; POINT TO FDC_DOR
|
||||
SET 1,(HL)
|
||||
JR FC_MOTORON5
|
||||
FC_MOTORON3: ; DIDE, N8, ZETA2, RCWDC, SMZ80, DYNO, EPFDC, MBC
|
||||
FC_MOTORON3: ; DIDE, N8, ZETA2, RCWDC, SMZ80, DYNO, EPFDC, MBC, DUO
|
||||
LD HL,FST_DOR ; POINT TO FDC_DOR
|
||||
LD A,(HL) ; START WITH CURRENT DOR
|
||||
AND 11111100B ; GET RID OF ANY ACTIVE DS BITS
|
||||
@@ -3080,7 +3097,7 @@ FC_MOTOROFF2: ; ZETA, DIO3
|
||||
LD HL,FST_DOR ; POINT TO FDC_DOR
|
||||
RES 1,(HL)
|
||||
JR FC_MOTOROFF5
|
||||
FC_MOTOROFF3: ; DIDE, N8, ZETA2, RCWDC, SMZ80, DYNO, EPFDC, MBC
|
||||
FC_MOTOROFF3: ; DIDE, N8, ZETA2, RCWDC, SMZ80, DYNO, EPFDC, MBC, DUO
|
||||
LD HL,FST_DOR ; POINT TO FDC_DOR
|
||||
LD A,DORC_INIT
|
||||
LD (HL),A
|
||||
@@ -3950,7 +3967,7 @@ DORB_BR500 .EQU 10100000B ; 500KBPS
|
||||
;
|
||||
DORB_INIT .EQU DORB_BR250
|
||||
;
|
||||
; *** DIDE/N8/ZETA2/RCWDC/SMZ80/DYNO/EPFDC/MBC ***
|
||||
; *** DIDE/N8/ZETA2/RCWDC/SMZ80/DYNO/EPFDC/MBC/DUO ***
|
||||
;
|
||||
DORC_INIT .EQU 00001100B ; SOFT RESET INACTIVE, DMA ENABLED
|
||||
;
|
||||
|
||||
@@ -1,14 +1,15 @@
|
||||
================================================================
|
||||
Floppy Disk Utility (FDU) v5.3 for RetroBrew Computers
|
||||
Disk IO / Zeta / Dual-IDE / N8 / RCBus / SmallZ80 / Dyno
|
||||
Floppy Disk Utility (FDU) v5.9 for RetroBrew Computers
|
||||
Disk IO / Zeta / Dual-IDE / N8 / RCBus / SmallZ80 / Dyno / Nhyodyne / Duodyne
|
||||
================================================================
|
||||
|
||||
Updated January 5, 2020
|
||||
Updated December 12, 2023
|
||||
by Wayne Warthen (wwarthen@gmail.com)
|
||||
|
||||
Application to test the hardware functionality of the Floppy
|
||||
Disk Controller (FDC) on the ECB DISK I/O, DISK I/O V3, ZETA
|
||||
SBC, Dual IDE w/ Floppy, or N8 board.
|
||||
SBC, Dual IDE w/ Floppy, N8, RCBus, SmallZ80, Dyno, Nhyodyne,
|
||||
Duodyne systems.
|
||||
|
||||
The intent is to provide a testbed that allows direct testing
|
||||
of all possible media types and modes of access. The
|
||||
@@ -77,9 +78,10 @@ supported:
|
||||
- RCBus
|
||||
- SmallZ80
|
||||
- Dyno
|
||||
- MBC
|
||||
- Nhyodyne (MBC)
|
||||
- Duodyne (DUO)
|
||||
|
||||
You must be using either a RomWBW or UBA based OS version.
|
||||
You must be using either a RomWBW or UNA based OS version.
|
||||
|
||||
You must have one of the following floppy disk controllers:
|
||||
|
||||
@@ -93,7 +95,8 @@ You must have one of the following floppy disk controllers:
|
||||
- RCBus Scott Baker WDC-based Floppy Module
|
||||
- SmallZ80 FDC
|
||||
- Dyno FDC
|
||||
- MBC FDC
|
||||
- Nhyodyne (MBC) FDC
|
||||
- Duodyne (DUO) FDC
|
||||
|
||||
Finally, you will need a floppy drive connected via an
|
||||
appropriate cable:
|
||||
@@ -165,8 +168,11 @@ hardwired I/O ranges are assumed in the code.
|
||||
Dyno does not have any relevant jumper settings. The
|
||||
hardwired I/O ranges are assumed in the code.
|
||||
|
||||
The MBC FDC is expected to be strapped to use neither INT nor NMI. It
|
||||
is also not expected to use DMA.
|
||||
The Nhyodyne (MBC) FDC is expected to be strapped to use neither INT
|
||||
nor NMI. It is also not expected to use DMA.
|
||||
|
||||
The Duodyne (DUO) FDC is expected to be strapped to use neither INT
|
||||
nor NMI. It is also not expected to use DMA.
|
||||
|
||||
Modes of Operation
|
||||
------------------
|
||||
@@ -533,4 +539,7 @@ WW 3/24/2021: v5.7
|
||||
- Added support for a few single-sided formats
|
||||
|
||||
WW 7/26/2021: v5.8
|
||||
- Added support for MBC FDC
|
||||
- Added support for Nhyodyne (MBC) FDC
|
||||
|
||||
WW 12/10/2023: v5.9
|
||||
- Added support for Duodyne (DUO) FDC
|
||||
|
||||
@@ -24,6 +24,7 @@ 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
|
||||
|
||||
goto :eof
|
||||
|
||||
|
||||
@@ -21,3 +21,4 @@ pushd 2piotst && call Clean || exit /b 1 & popd
|
||||
pushd piomon && call Clean || exit /b 1 & popd
|
||||
pushd banktest && call Clean || exit /b 1 & popd
|
||||
pushd portscan && call Clean || exit /b 1 & popd
|
||||
pushd sound && call Clean || exit /b 1 & popd
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
OBJECTS =
|
||||
SUBDIRS = DMAmon I2C inttest ppidetst ramtest tstdskng rzsz vdctest kbdtest ps2info 2piotst piomon banktest portscan
|
||||
OBJECTS =
|
||||
SUBDIRS = DMAmon I2C inttest ppidetst ramtest tstdskng rzsz vdctest kbdtest ps2info 2piotst piomon banktest portscan sound
|
||||
DEST = ../../../Binary/Apps/Test
|
||||
TOOLS =../../../Tools
|
||||
|
||||
|
||||
@@ -7,20 +7,24 @@
|
||||
; keyboard, and mouse.
|
||||
;
|
||||
; WBW 2022-03-28: Add menu driven port selection
|
||||
; Add support for RHYOPHYRE
|
||||
; Add support for Rhyophyre
|
||||
; WBW 2022-04-01: Add menu for test functions
|
||||
; WBW 2022-04-02: Fix prtchr register saving/recovery
|
||||
; WBW 2023-10-19: Add support for Duodyne
|
||||
;
|
||||
;=======================================================================
|
||||
;
|
||||
; PS/2 Keyboard/Mouse controller port addresses (adjust as needed)
|
||||
;
|
||||
; MBC:
|
||||
; Nhyodyne:
|
||||
iocmd_mbc .equ $E3 ; PS/2 controller command port address
|
||||
iodat_mbc .equ $E2 ; PS/2 controller data port address
|
||||
; RPH:
|
||||
; Rhyophyre:
|
||||
iocmd_rph .equ $8D ; PS/2 controller command port address
|
||||
iodat_rph .equ $8C ; PS/2 controller data port address
|
||||
; Duodyne:
|
||||
iocmd_duo .equ $4D ; PS/2 controller command port address
|
||||
iodat_duo .equ $4C ; PS/2 controller data port address
|
||||
;
|
||||
cpumhz .equ 8 ; for time delay calculations (not critical)
|
||||
;
|
||||
@@ -77,10 +81,12 @@ setup1:
|
||||
jr z,setup1
|
||||
call upcase
|
||||
call prtchr
|
||||
cp '1' ; MBC
|
||||
cp '1' ; Nhyodyne
|
||||
jr z,setup_mbc
|
||||
cp '2' ; RHYOPHYRE
|
||||
cp '2' ; Rhyophyre
|
||||
jr z,setup_rph
|
||||
cp '3' ; Duodyne
|
||||
jr z,setup_duo
|
||||
cp 'X'
|
||||
jr z,exit
|
||||
jr setup
|
||||
@@ -101,6 +107,14 @@ setup_rph:
|
||||
ld de,str_rph
|
||||
jr setup2
|
||||
;
|
||||
setup_duo:
|
||||
ld a,iocmd_duo
|
||||
ld (iocmd),a
|
||||
ld a,iodat_duo
|
||||
ld (iodat),a
|
||||
ld de,str_duo
|
||||
jr setup2
|
||||
;
|
||||
setup2:
|
||||
call prtstr
|
||||
call crlf2
|
||||
@@ -181,6 +195,12 @@ test_kbd:
|
||||
;
|
||||
call ctlr_test
|
||||
jr nz,test_kbd_fail
|
||||
;
|
||||
ld a,$20 ; kbd enabled, mse disabled, no ints
|
||||
call ctlr_setup
|
||||
jr nz,test_kbd_fail
|
||||
;
|
||||
call ctlr_flush
|
||||
;
|
||||
call test_kbd_basic
|
||||
jr nz,test_kbd_fail
|
||||
@@ -228,9 +248,13 @@ test_mse:
|
||||
ld a,$10 ; kbd disabled, mse enabled, no ints
|
||||
call ctlr_setup
|
||||
jr nz,test_mse_fail
|
||||
;
|
||||
call ctlr_flush
|
||||
;
|
||||
call mse_reset
|
||||
jr nz,test_mse_fail
|
||||
;
|
||||
call ctlr_flush
|
||||
;
|
||||
call mse_ident
|
||||
jr nz,test_mse_fail
|
||||
@@ -262,15 +286,21 @@ test_kbdmse:
|
||||
ld a,$00 ; kbd enabled, mse enabled, no ints
|
||||
call ctlr_setup
|
||||
jr nz,test_kbdmse_fail
|
||||
;
|
||||
call ctlr_flush
|
||||
;
|
||||
call kbd_reset
|
||||
jr nz,test_kbdmse_fail
|
||||
;
|
||||
call ctlr_flush
|
||||
;
|
||||
ld a,2
|
||||
call kbd_setsc
|
||||
;
|
||||
call mse_reset
|
||||
jr nz,test_kbdmse_fail
|
||||
;
|
||||
call ctlr_flush
|
||||
;
|
||||
call mse_stream
|
||||
jr nz,test_kbdmse_fail
|
||||
@@ -290,15 +320,13 @@ test_kbdmse_fail:
|
||||
; inventory the supported scan code sets.
|
||||
;
|
||||
test_kbd_basic:
|
||||
ld a,$20 ; Xlat off for this checking
|
||||
call ctlr_setup
|
||||
ret nz
|
||||
;
|
||||
call kbd_reset
|
||||
ret nz
|
||||
;
|
||||
call ctlr_flush
|
||||
;
|
||||
call kbd_ident
|
||||
;ret nz
|
||||
ret nz
|
||||
;
|
||||
ld b,3 ; Loop control, 3 scan code sets
|
||||
ld c,1 ; Current scan code number
|
||||
@@ -436,6 +464,19 @@ ctlr_setup:
|
||||
xor a
|
||||
ret
|
||||
;
|
||||
; Flush incoming data buffer
|
||||
;
|
||||
ctlr_flush:
|
||||
call crlf2
|
||||
ld de,str_ctlr_flush
|
||||
call prtstr
|
||||
ctlr_flush1:
|
||||
call delay ; small delay
|
||||
call check_read ; data pending?
|
||||
ret nz ; return if nothing there
|
||||
call get_data_dbg ; get and discard byte
|
||||
jr ctlr_flush1 ; loop
|
||||
;
|
||||
; Perform a keyboard reset
|
||||
;
|
||||
kbd_reset:
|
||||
@@ -612,13 +653,17 @@ mse_reset:
|
||||
call crlf2
|
||||
ld de,str_mse_reset
|
||||
call prtstr
|
||||
ld a,$f2 ; Identify mouse command
|
||||
ld a,$ff ; Identify mouse command
|
||||
call put_data_mse_dbg
|
||||
jp c,err_ctlr_to ; handle controller error
|
||||
call get_data_dbg
|
||||
jp c,err_ctlr_to ; handle controller error
|
||||
cp $fa ; Is it an ack as expected?
|
||||
jp nz,err_mse_reset
|
||||
call get_data_dbg
|
||||
jp c,err_ctlr_to ; handle controller error
|
||||
cp $aa ; Success?
|
||||
jp nz,err_mse_reset
|
||||
call crlf
|
||||
ld de,str_mse_reset_ok
|
||||
call prtstr
|
||||
@@ -634,18 +679,61 @@ mse_ident:
|
||||
ld a,$f2 ; Identify mouse command
|
||||
call put_data_mse_dbg
|
||||
jp c,err_ctlr_to ; handle controller error
|
||||
mse_ident0:
|
||||
call get_data_dbg
|
||||
jp c,err_ctlr_to ; handle controller error
|
||||
|
||||
;cp $00 ; extraneous?
|
||||
;jr z,mse_ident0 ; ignore it, get another
|
||||
|
||||
cp $fa ; Is it an ack as expected?
|
||||
jp nz,err_mse_ident
|
||||
call get_data_dbg
|
||||
jp c,err_ctlr_to ; handle controller error
|
||||
; Now we need to receive 0-2 bytes. There is no way to know
|
||||
; how many are coming, so we receive bytes until there is a
|
||||
; timeout error. Timeout is shortened here so that we don't
|
||||
; have to wait seconds for the routine to complete normally.
|
||||
; A short timeout is more than sufficient here.
|
||||
ld ix,workbuf
|
||||
ld a,(timeout) ; save current timeout
|
||||
push af
|
||||
ld a,stimout ; set a short timeout
|
||||
ld (timeout),a
|
||||
ld b,8 ; buf max
|
||||
ld c,0 ; buf len
|
||||
mse_ident1:
|
||||
push bc
|
||||
call get_data_dbg
|
||||
pop bc
|
||||
jr c,mse_ident2
|
||||
ld (ix),a
|
||||
inc ix
|
||||
inc c
|
||||
djnz mse_ident1
|
||||
mse_ident2:
|
||||
pop af ; restore original timeout
|
||||
ld (timeout),a
|
||||
call crlf
|
||||
ld de,str_mse_ident_disp
|
||||
call prtstr
|
||||
pop af
|
||||
call prtdecb
|
||||
ld a,'['
|
||||
call prtchr
|
||||
ld ix,workbuf
|
||||
ld a,c ; bytes to print
|
||||
or a ; check for zero
|
||||
jr z,mse_ident4 ; handle zero
|
||||
ld b,a ; setup loop counter
|
||||
jr mse_ident3a
|
||||
mse_ident3:
|
||||
ld a,','
|
||||
call prtchr
|
||||
mse_ident3a:
|
||||
ld a,(ix)
|
||||
call prthex
|
||||
inc ix
|
||||
djnz mse_ident3
|
||||
mse_ident4:
|
||||
ld a,']'
|
||||
call prtchr
|
||||
xor a
|
||||
ret
|
||||
;
|
||||
@@ -658,8 +746,13 @@ mse_stream:
|
||||
ld a,$f4 ; Stream packets cmd
|
||||
call put_data_mse_dbg
|
||||
jp c,err_ctlr_to ; handle controller error
|
||||
mse_stream0:
|
||||
call get_data_dbg
|
||||
jp c,err_ctlr_to ; handle controller error
|
||||
|
||||
;cp $00 ; extraneous?
|
||||
;jr z,mse_stream0 ; ignore it, get another
|
||||
|
||||
cp $FA ; Is it an ack as expected?
|
||||
jp nz,err_mse_stream
|
||||
xor a
|
||||
@@ -1344,14 +1437,16 @@ delay1:
|
||||
; Constants
|
||||
;=======================================================================
|
||||
;
|
||||
str_banner .db "PS/2 Keyboard/Mouse Information v0.6a, 2-Apr-2022",0
|
||||
str_banner .db "PS/2 Keyboard/Mouse Information v0.8, 6-Nov-2023",0
|
||||
str_hwmenu .db "PS/2 Controller Port Options:\r\n\r\n"
|
||||
.db " 1 - MBC\r\n"
|
||||
.db " 2 - RHYOPHYRE\r\n"
|
||||
.db " 1 - Nhyodyne\r\n"
|
||||
.db " 2 - Rhyophyre\r\n"
|
||||
.db " 3 - Duodyne\r\n"
|
||||
.db " X - Exit Application\r\n"
|
||||
.db "\r\nSelection? ",0
|
||||
str_mbc .db "MBC",0
|
||||
str_rph .db "RHYOPHYRE",0
|
||||
str_mbc .db "Nhyodyne",0
|
||||
str_rph .db "Rhyophyre",0
|
||||
str_duo .db "Duodyne",0
|
||||
str_menu .db "PS/2 Testing Options:\r\n\r\n"
|
||||
.db " C - Test PS/2 Controller\r\n"
|
||||
.db " K - Test PS/2 Keyboard\r\n"
|
||||
@@ -1382,6 +1477,7 @@ str_trans_off .db "***** Testing Keyboard with Scan Code Translation DISABLED *
|
||||
str_trans_on .db "***** Testing Keyboard with Scan Code Translation ENABLED *****",0
|
||||
str_basic_mse .db "***** Basic Mouse Tests *****",0
|
||||
str_kbdmse .db "***** Test All Devices Combined *****",0
|
||||
str_ctlr_flush .db "Flushing controller input buffer",0
|
||||
str_kbd_reset .db "Attempting Keyboard Reset",0
|
||||
str_kbd_reset_ok .db "Keyboard Reset OK",0
|
||||
str_err_kbd_reset .db "Keyboard Reset Failed",0
|
||||
|
||||
12
Source/Apps/Test/sound/Build.cmd
Normal file
12
Source/Apps/Test/sound/Build.cmd
Normal file
@@ -0,0 +1,12 @@
|
||||
@echo off
|
||||
setlocal
|
||||
|
||||
set TOOLS=../../../../Tools
|
||||
set PATH=%TOOLS%\tasm32;%PATH%
|
||||
set TASMTABS=%TOOLS%\tasm32
|
||||
|
||||
tasm -t80 -g3 -fFF sound.asm sound.com sound.lst || exit /b
|
||||
tasm -t80 -g3 -fFF ay-test.asm ay-test.com ay-test.lst || exit /b
|
||||
|
||||
copy /Y sound.com ..\..\..\..\Binary\Apps\Test\ || exit /b
|
||||
copy /Y ay-test.com ..\..\..\..\Binary\Apps\Test\ || exit /b
|
||||
6
Source/Apps/Test/sound/Clean.cmd
Normal file
6
Source/Apps/Test/sound/Clean.cmd
Normal 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/Test/sound/Makefile
Normal file
7
Source/Apps/Test/sound/Makefile
Normal file
@@ -0,0 +1,7 @@
|
||||
OBJECTS = ay-test.com sound.com
|
||||
DEST = ../../../../Binary/Apps/Test
|
||||
TOOLS =../../../../Tools
|
||||
|
||||
USETASM=1
|
||||
|
||||
include $(TOOLS)/Makefile.inc
|
||||
@@ -1,329 +0,0 @@
|
||||
;
|
||||
;------------------------------------------------------------------------------
|
||||
; PLAY SCALES USING HBIOS
|
||||
;------------------------------------------------------------------------------
|
||||
;
|
||||
FCB .EQU $5C ; Location of default FCB
|
||||
BDOS .EQU $0005
|
||||
;
|
||||
.ORG $0100
|
||||
;
|
||||
LD (OLDSTACK),SP ; save old stack pointer
|
||||
LD SP,STACK ; set new stack pointer
|
||||
;
|
||||
;------------------------------------------------------------------------------
|
||||
; GET DEVICE # FROM COMMAND LINE
|
||||
;------------------------------------------------------------------------------
|
||||
;
|
||||
LD A,(FCB+1) ; GET FIRST CHAR
|
||||
SUB ' '
|
||||
JR Z,NO_ARG
|
||||
SUB '0'-' '
|
||||
JP C,EXIT
|
||||
;
|
||||
;------------------------------------------------------------------------------
|
||||
; DISPLAY DEVICE AND NUMBER OF CHANNELS
|
||||
;------------------------------------------------------------------------------
|
||||
;
|
||||
NO_ARG: LD (DEVICE),A ;
|
||||
LD DE,TXT_DEV ; DEVICE:
|
||||
CALL PRTSTR
|
||||
CALL PRTDECB
|
||||
LD C,A ; GET DEVICE ID
|
||||
LD A,':'
|
||||
CALL PRTCHR
|
||||
LD B,$55
|
||||
PUSH BC
|
||||
LD E,4
|
||||
RST 08
|
||||
LD DE,TXT_NAME
|
||||
LD A,B
|
||||
RRCA \ RRCA \ RRCA \ RRCA
|
||||
CALL PRTIDXDEA ; SHOW NAME
|
||||
LD DE,TXT_CH
|
||||
CALL PRTSTR
|
||||
;
|
||||
POP BC ; GET & DISPLAY # CHANNELS
|
||||
LD E,1
|
||||
RST 08
|
||||
LD A,B
|
||||
CALL PRTDECB
|
||||
CALL CRLF ; NUMBER OF CHANNELS IS IN B
|
||||
;
|
||||
;------------------------------------------------------------------------------
|
||||
; LOOP THROUGH EACH CHANNEL
|
||||
;------------------------------------------------------------------------------
|
||||
|
||||
CH__TONE: LD A,(DEVICE) ; C CONTAINS DEVICE
|
||||
LD C,A ; THROUGH THIS LOOP
|
||||
;
|
||||
PUSH BC
|
||||
LD B,50H ; RESET DEVICE
|
||||
RST 08
|
||||
POP BC
|
||||
;
|
||||
PUSH BC
|
||||
LD B,51H ; VOLUME FULL
|
||||
LD L,0FFH
|
||||
RST 08
|
||||
POP BC
|
||||
;
|
||||
LD A,B
|
||||
TST_TONE_LP: DEC A
|
||||
LD (CHANNEL),A ; SAVE CURRENT CHANNEL
|
||||
CALL TST_SCALES ; SCALES TEST
|
||||
; CALL TST_VOLUME ; VOLUME TEST
|
||||
CALL CRLF
|
||||
DJNZ TST_TONE_LP
|
||||
;
|
||||
PUSH BC
|
||||
LD B,50H ; RESET DEVICE
|
||||
RST 08
|
||||
POP BC
|
||||
;
|
||||
;------------------------------------------------------------------------------
|
||||
; RESTORE STACK & EXIT
|
||||
;------------------------------------------------------------------------------
|
||||
;
|
||||
EXIT: LD SP, (OLDSTACK) ; Exit to CP/M
|
||||
RST 00H
|
||||
DI
|
||||
HALT
|
||||
;
|
||||
;------------------------------------------------------------------------------
|
||||
; PLAY SCALES FROM HIGHEST HBIOS NOTE TO LOWEST
|
||||
;------------------------------------------------------------------------------
|
||||
;
|
||||
TST_SCALES: PUSH BC
|
||||
PUSH AF
|
||||
;
|
||||
LD HL,380 ; START NOTE
|
||||
LD (NOTE),HL ; Top of Octave 7 is 343
|
||||
|
||||
LD B,51H ; VOLUME HIGH
|
||||
LD L,0FFH
|
||||
PUSH BC
|
||||
RST 08
|
||||
POP BC
|
||||
;
|
||||
NEXT0: PUSH BC
|
||||
;
|
||||
LD DE,TXT_TSTCH ; DISPLAY CHANNEL
|
||||
CALL PRTSTR
|
||||
LD A,(CHANNEL)
|
||||
CALL PRTDECB
|
||||
;
|
||||
LD DE,TXT_NOTE ; DISPLAY NOTE
|
||||
CALL PRTSTR
|
||||
LD HL,(NOTE)
|
||||
CALL PRTDECW
|
||||
POP BC
|
||||
;
|
||||
LD B,53H ; SET NOTE
|
||||
LD HL,(NOTE)
|
||||
PUSH BC
|
||||
RST 08
|
||||
POP BC
|
||||
|
||||
OR A ; DID DRIVER FAIL
|
||||
JR Z,NEXT4 ; THIS NOTE ?
|
||||
|
||||
LD DE,TXT_BAD_N
|
||||
CALL FAILMSG
|
||||
JR SKIP
|
||||
;
|
||||
NEXT4: LD B,57H ; DURATION
|
||||
LD HL,1000
|
||||
PUSH BC
|
||||
RST 08
|
||||
POP BC
|
||||
|
||||
LD B,54H ; PLAY
|
||||
LD A,(CHANNEL)
|
||||
LD D,A
|
||||
PUSH BC
|
||||
RST 08
|
||||
POP BC
|
||||
;
|
||||
OR A ; DID DRIVER FAIL
|
||||
JR Z,NEXT2 ; TO PLAY ?
|
||||
|
||||
LD DE,TXT_BAD_N
|
||||
CALL FAILMSG
|
||||
JR SKIP
|
||||
;
|
||||
NEXT2: CALL DELAY
|
||||
CALL CRLF
|
||||
;
|
||||
SKIP: LD HL,(NOTE)
|
||||
DEC HL
|
||||
LD (NOTE),HL
|
||||
|
||||
INC HL
|
||||
LD A,H
|
||||
OR L
|
||||
DEC HL
|
||||
JR NZ,NEXT0
|
||||
;
|
||||
LD B,51H ; VOLUME
|
||||
LD L,00H ; OFF
|
||||
PUSH BC
|
||||
RST 08
|
||||
POP BC
|
||||
;
|
||||
LD B,54H ; PLAY
|
||||
LD A,(CHANNEL)
|
||||
LD D,A
|
||||
PUSH BC
|
||||
RST 08
|
||||
POP BC
|
||||
|
||||
PUSH BC
|
||||
LD C, 6 ; check for keypress
|
||||
LD E,0FFH
|
||||
CALL BDOS
|
||||
POP BC
|
||||
OR A
|
||||
JP NZ,EXIT
|
||||
|
||||
POP AF
|
||||
POP BC
|
||||
;
|
||||
RET
|
||||
;
|
||||
FAILMSG: PUSH AF
|
||||
PUSH BC
|
||||
CALL PRTSTR
|
||||
CALL CRLF
|
||||
POP BC
|
||||
POP AF
|
||||
RET
|
||||
;
|
||||
;------------------------------------------------------------------------------
|
||||
; CONSTANT TONE ON ALL CHANNELS, SCALE VOLUME
|
||||
;------------------------------------------------------------------------------
|
||||
;
|
||||
TST_VOLUME:
|
||||
LD HL,332+48 ; TONE
|
||||
LD (NOTE),HL
|
||||
;
|
||||
LD B,3
|
||||
NEXTCH1 LD A,B
|
||||
DEC A
|
||||
LD (CHANNEL),A
|
||||
PUSH BC ; ACROSS
|
||||
CALL TONE ; ALL
|
||||
|
||||
LD C, 6 ; KEYPRESS
|
||||
LD E, 0FFH
|
||||
CALL BDOS
|
||||
POP BC ; CHANNELS
|
||||
|
||||
OR A
|
||||
JP NZ,EXIT
|
||||
|
||||
DJNZ NEXTCH1
|
||||
|
||||
RET
|
||||
|
||||
TONE: LD A,(DEVICE)
|
||||
LD C,A
|
||||
|
||||
LD B,50H ; RESET
|
||||
PUSH BC
|
||||
RST 08
|
||||
POP BC
|
||||
;
|
||||
NEXT1: LD B,51H ; VOLUME
|
||||
LD A,(VOLUME)
|
||||
LD L,A
|
||||
PUSH BC
|
||||
RST 08
|
||||
POP BC
|
||||
;
|
||||
LD B,53H ; NOTE
|
||||
LD HL,(NOTE)
|
||||
PUSH BC
|
||||
RST 08
|
||||
POP BC
|
||||
;
|
||||
LD B,54H ; PLAY
|
||||
LD A,(CHANNEL)
|
||||
LD D,A
|
||||
PUSH BC
|
||||
RST 08
|
||||
POP BC
|
||||
;
|
||||
CALL DELAY
|
||||
;
|
||||
LD A,(VOLUME)
|
||||
DEC A
|
||||
LD (VOLUME),A
|
||||
JR NZ,NEXT1
|
||||
;
|
||||
LD B,51H ; VOLUME
|
||||
LD L,00H
|
||||
PUSH BC
|
||||
RST 08
|
||||
POP BC
|
||||
;
|
||||
LD B,54H ; PLAY
|
||||
PUSH BC
|
||||
LD A,(CHANNEL)
|
||||
LD D,A
|
||||
POP BC
|
||||
RST 08
|
||||
;
|
||||
RET
|
||||
;;
|
||||
;------------------------------------------------------------------------------
|
||||
; LONG DELAY
|
||||
;------------------------------------------------------------------------------
|
||||
;
|
||||
DELAY: LD HL,-1
|
||||
DELAY1: DEC HL
|
||||
LD A,H
|
||||
OR L
|
||||
JR NZ,DELAY1
|
||||
RET
|
||||
;
|
||||
;------------------------------------------------------------------------------
|
||||
; PRINT THE nTH STRING IN A LIST OF STRINGS WHERE EACH IS TERMINATED BY 0
|
||||
; A REGISTER DEFINES THE nTH STRING IN THE LIST TO PRINT AND DE POINTS
|
||||
; TO THE START OF THE STRING LIST.
|
||||
;------------------------------------------------------------------------------
|
||||
;
|
||||
PRTIDXDEA: LD C,A
|
||||
OR A
|
||||
PRTIDXDEA1: JR Z,PRTIDXDEA3 ; FOUND TARGET SO EXIT
|
||||
PRTIDXDEA2: LD A,(DE) ; LOOP UNIT
|
||||
INC DE ; WE REACH
|
||||
OR A ; END OF STRING
|
||||
JR NZ,PRTIDXDEA2
|
||||
DEC C ; AT STRING END. SO GO
|
||||
JR PRTIDXDEA1 ; CHECK FOR INDEX MATCH
|
||||
PRTIDXDEA3: CALL PRTSTR ; DISPLAY THE STRING
|
||||
RET
|
||||
;
|
||||
#INCLUDE "printing.inc"
|
||||
;
|
||||
TXT_CH .DB "CHANNELS: ",0
|
||||
TXT_TSTCH .DB "CHANNEL: ",0
|
||||
TXT_BAD_N .DB " BAD NOTE",0
|
||||
TXT_BAD_P .DB " PLAY ERROR",0
|
||||
TXT_NOTE .DB " NOTE: ",0
|
||||
TXT_DEV .DB "DEVICE: ",0
|
||||
TXT_NAME .DB "SN76489 ",0
|
||||
.DB "AY-3-8910 ",0
|
||||
.DB "I/O PORT ",0
|
||||
.DB "YM2612 ",0
|
||||
MODE .DB 0 ; scales mode or volume mode
|
||||
DEVICE .DB 0
|
||||
NOTE .DW 128
|
||||
VOLUME .DB 0
|
||||
CHANNEL .DB 0
|
||||
OLDSTACK .DW 0 ; original stack pointer
|
||||
.DS 40H ; space for stack
|
||||
STACK ; top of stack
|
||||
;
|
||||
.END
|
||||
@@ -13,9 +13,9 @@
|
||||
;
|
||||
; Hardware port addresses
|
||||
;
|
||||
rsel .equ $9A ; Register seelection port address
|
||||
rdat .equ $9B ; Register data port address
|
||||
acr .equ $9C ; Aux control register port address
|
||||
rsel .equ $A4 ; Register seelection port address
|
||||
rdat .equ $A5 ; Register data port address
|
||||
acr .equ $A2 ; Aux control register port address
|
||||
;
|
||||
; CPU speed for delay scaling
|
||||
;
|
||||
|
||||
177
Source/Apps/Test/sound/printing.inc
Normal file
177
Source/Apps/Test/sound/printing.inc
Normal file
@@ -0,0 +1,177 @@
|
||||
;
|
||||
; 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
|
||||
;
|
||||
PRTDOT:
|
||||
;
|
||||
; shortcut to print a dot preserving all regs
|
||||
PUSH AF ; save af
|
||||
LD A,'.' ; load dot char
|
||||
CALL PRTCHR ; print it
|
||||
POP AF ; restore af
|
||||
RET ; done
|
||||
;
|
||||
PRTCR:
|
||||
;
|
||||
; shortcut to print a carriage return preserving all regs
|
||||
PUSH AF ; save af
|
||||
LD A,13 ; load CR value
|
||||
CALL PRTCHR ; print it
|
||||
POP AF ; restore af
|
||||
RET ; done
|
||||
;
|
||||
; Print a zero terminated string at (DE) without destroying any registers
|
||||
;
|
||||
PRTSTR:
|
||||
PUSH AF
|
||||
PUSH DE
|
||||
;
|
||||
PRTSTR1:
|
||||
LD A,(DE) ; get next char
|
||||
OR A
|
||||
JR Z,PRTSTR2
|
||||
CALL PRTCHR
|
||||
INC DE
|
||||
JR PRTSTR1
|
||||
;
|
||||
PRTSTR2:
|
||||
POP DE ; restore registers
|
||||
POP AF
|
||||
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
|
||||
;
|
||||
; print the hex word value in bc
|
||||
;
|
||||
PRTHEXWORD:
|
||||
PUSH AF
|
||||
LD A,B
|
||||
CALL PRTHEX
|
||||
LD A,C
|
||||
CALL PRTHEX
|
||||
POP AF
|
||||
RET
|
||||
;
|
||||
; print the hex dword value in de:hl
|
||||
;
|
||||
PRTHEX32:
|
||||
PUSH BC
|
||||
PUSH DE
|
||||
POP BC
|
||||
CALL PRTHEXWORD
|
||||
PUSH HL
|
||||
POP BC
|
||||
CALL PRTHEXWORD
|
||||
POP BC
|
||||
RET
|
||||
;
|
||||
; 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
|
||||
|
||||
;
|
||||
; Print value of A or HL in decimal with leading zero suppression
|
||||
; Use prtdecb for A or prtdecw for HL
|
||||
;
|
||||
PRTDECB:
|
||||
PUSH HL
|
||||
LD H,0
|
||||
LD L,A
|
||||
CALL PRTDECW ; print it
|
||||
POP HL
|
||||
RET
|
||||
;
|
||||
PRTDECW:
|
||||
PUSH AF
|
||||
PUSH BC
|
||||
PUSH DE
|
||||
PUSH HL
|
||||
CALL PRTDEC0
|
||||
POP HL
|
||||
POP DE
|
||||
POP BC
|
||||
POP AF
|
||||
RET
|
||||
;
|
||||
PRTDEC0:
|
||||
LD E,'0'
|
||||
LD BC,-10000
|
||||
CALL PRTDEC1
|
||||
LD BC,-1000
|
||||
CALL PRTDEC1
|
||||
LD BC,-100
|
||||
CALL PRTDEC1
|
||||
LD C,-10
|
||||
CALL PRTDEC1
|
||||
LD E,0
|
||||
LD C,-1
|
||||
PRTDEC1:
|
||||
LD A,'0' - 1
|
||||
PRTDEC2:
|
||||
INC A
|
||||
ADD HL,BC
|
||||
JR C,PRTDEC2
|
||||
SBC HL,BC
|
||||
CP E
|
||||
RET Z
|
||||
LD E,0
|
||||
CALL PRTCHR
|
||||
RET
|
||||
;
|
||||
; Start a new line
|
||||
;
|
||||
CRLF2:
|
||||
CALL CRLF ; two of them
|
||||
CRLF:
|
||||
PUSH AF ; preserve AF
|
||||
LD A,13 ; <CR>
|
||||
CALL PRTCHR ; print it
|
||||
LD A,10 ; <LF>
|
||||
CALL PRTCHR ; print it
|
||||
POP AF ; restore AF
|
||||
RET
|
||||
460
Source/Apps/Test/sound/sound.asm
Normal file
460
Source/Apps/Test/sound/sound.asm
Normal file
@@ -0,0 +1,460 @@
|
||||
;
|
||||
;=======================================================================
|
||||
; RomWBW HBIOS Sound Device Test Tool (SOUND)
|
||||
;=======================================================================
|
||||
;
|
||||
; Simple utility that can exercise a sound device in RomWBW. It can
|
||||
; play a single tone, sliding scale, or sliding volume.
|
||||
;
|
||||
; I'm not actually sure who wrote the original version of this, but I
|
||||
; suspect it was Phil Summers.
|
||||
;
|
||||
; WBW 2024-03-21: Control test function by command line
|
||||
; Add (T)one function
|
||||
;
|
||||
;=======================================================================
|
||||
;
|
||||
;------------------------------------------------------------------------------
|
||||
; PLAY SCALES USING HBIOS
|
||||
;------------------------------------------------------------------------------
|
||||
;
|
||||
FCB .EQU $5C ; Location of default FCB
|
||||
BDOS .EQU $0005
|
||||
;
|
||||
.ORG $0100
|
||||
;
|
||||
LD (OLDSTACK),SP ; save old stack pointer
|
||||
LD SP,STACK ; set new stack pointer
|
||||
;
|
||||
LD DE,TXT_BANNER
|
||||
CALL PRTSTR
|
||||
;
|
||||
;------------------------------------------------------------------------------
|
||||
; PARSE COMMAND LINE
|
||||
;------------------------------------------------------------------------------
|
||||
;
|
||||
LD HL,FCB+1 ; POINT TO FCB CHARS
|
||||
LD B,8 ; PARSE 8 CHARS
|
||||
PARSE:
|
||||
PUSH BC
|
||||
LD A,(HL) ; GET NEXT CHAR
|
||||
;
|
||||
; IF NUMBER, SET DEVICE ID
|
||||
CP '0'
|
||||
JR C,PARSE1 ; IF < 0, SKIP
|
||||
CP '9'+ 1
|
||||
JR NC,PARSE1 ; IF > 9, SKIP
|
||||
SUB '0' ; MAKE BINARY
|
||||
LD (DEVICE),A ; SAVE DEVICE NUM
|
||||
JR PARSE2 ; CONTINUE LOOP
|
||||
PARSE1:
|
||||
; IF LETTER, SET RUN OPTION
|
||||
CP 'A'
|
||||
JR C,PARSE2 ; IF < A, SKIP
|
||||
CP 'Z'+ 1
|
||||
JR NC,PARSE1 ; IF > Z, SKIP
|
||||
LD (OPTION),A ; SAVE RUN OPTION
|
||||
JR PARSE2 ; CONTINUE LOOP
|
||||
;
|
||||
PARSE2:
|
||||
INC HL ; BUMP PTR
|
||||
DJNZ PARSE
|
||||
;
|
||||
LD A,(OPTION) ; GET OPTION
|
||||
CP ' ' ; HAVE OPTION?
|
||||
JR NZ,RUN ; IF SO, RUN
|
||||
LD DE,TXT_USAGE ; ELSE GET USAGE
|
||||
CALL PRTSTR ; AND DISPLAY IT
|
||||
JP EXIT ; AND GET OUT
|
||||
;
|
||||
;------------------------------------------------------------------------------
|
||||
; DISPLAY DEVICE AND NUMBER OF CHANNELS
|
||||
;------------------------------------------------------------------------------
|
||||
;
|
||||
RUN:
|
||||
LD DE,TXT_DEV ; DEVICE:
|
||||
CALL PRTSTR
|
||||
LD A,(DEVICE)
|
||||
CALL PRTDECB
|
||||
LD C,A ; GET DEVICE ID
|
||||
LD A,':'
|
||||
CALL PRTCHR
|
||||
;
|
||||
LD B,$55 ; HBIOS SND QUERY
|
||||
LD A,(DEVICE)
|
||||
LD C,A
|
||||
;
|
||||
PUSH BC ; SAVE FUNC AND ID
|
||||
LD E,4 ; HBIOS SNDQ DEV
|
||||
RST 08
|
||||
LD A,B
|
||||
;RRCA \ RRCA \ RRCA \ RRCA
|
||||
LD DE,TXT_NAME
|
||||
CALL PRTIDXDEA ; SHOW NAME
|
||||
;
|
||||
LD DE,TXT_CH
|
||||
CALL PRTSTR
|
||||
POP BC ; RESTORE FUNC AND ID
|
||||
LD E,1 ; HBIOS SNDQ_CHCNT
|
||||
RST 08
|
||||
LD A,B ; NUMBER OF CHANNELS IS IN B
|
||||
LD (CHANNELS),A ; SAVE IT
|
||||
CALL PRTDECB ; PRINT IT
|
||||
CALL CRLF
|
||||
;
|
||||
;------------------------------------------------------------------------------
|
||||
; LOOP THROUGH EACH CHANNEL
|
||||
;------------------------------------------------------------------------------
|
||||
;
|
||||
LD A,(DEVICE) ; GET DEVICE
|
||||
LD C,A ; INTO C
|
||||
PUSH BC ; SAVE IT
|
||||
LD B,$50 ; RESET SND DEVICE
|
||||
RST 08 ; DO IT
|
||||
POP BC ; RECOVER DEVICE
|
||||
LD B,$51 ; SET VOLUME
|
||||
LD L,$FF ; TO MAX
|
||||
RST 08 ; DO IT
|
||||
;
|
||||
LD A,(CHANNELS)
|
||||
LD B,A ; B IS LOOP COUNTER
|
||||
LD C,0 ; C IS CHANNEL INDEX
|
||||
;
|
||||
CH_LOOP:
|
||||
PUSH BC ; SAVE LOOP CTL
|
||||
LD A,C ; CHANNEL
|
||||
LD (CHANNEL),A ; TO STORAGE
|
||||
CALL CH_RUN ; DO CHANNEL
|
||||
PUSH AF
|
||||
LD A,(DEVICE)
|
||||
LD C,A
|
||||
LD B,50H ; RESET
|
||||
RST 08
|
||||
POP AF
|
||||
POP BC ; RECOVER LOOP CTL
|
||||
JR NZ,EXIT ; HANDLE ERROR/ABORT
|
||||
INC C ; NEXT CHANNEL
|
||||
DJNZ CH_LOOP ; LOOP AS NEEDED
|
||||
;
|
||||
LD A,(DEVICE) ; GET DEVICE
|
||||
LD C,A ; TO C
|
||||
LD B,50H ; RESET DEVICE
|
||||
RST 08 ; DO IT
|
||||
JR EXIT ; DONE
|
||||
;
|
||||
CH_RUN:
|
||||
LD A,(OPTION) ; RUN OPTION
|
||||
CP 'S' ; SCALES?
|
||||
JP Z,TST_SCALES ; IF SO, DO SCALES
|
||||
CP 'V' ; VOLUME?
|
||||
JP Z,TST_VOLUME ; IF SO, DO VOLUME
|
||||
CP 'T' ; TONE
|
||||
JP Z,TST_TONE ; IF SO, DO TONE
|
||||
RET
|
||||
;
|
||||
;------------------------------------------------------------------------------
|
||||
; RESTORE STACK & EXIT
|
||||
;------------------------------------------------------------------------------
|
||||
;
|
||||
EXIT: LD SP, (OLDSTACK) ; Exit to CP/M
|
||||
RST 00H
|
||||
DI
|
||||
HALT
|
||||
;
|
||||
;------------------------------------------------------------------------------
|
||||
; PLAY SCALES FROM HIGHEST HBIOS NOTE TO LOWEST
|
||||
;------------------------------------------------------------------------------
|
||||
;
|
||||
TST_SCALES: LD A,(DEVICE) ; SETUP DEVICE FOR BELOW
|
||||
LD C,A
|
||||
;
|
||||
LD HL,380 ; START NOTE
|
||||
LD (NOTE),HL ; Top of Octave 7 is 343
|
||||
|
||||
LD B,51H ; VOLUME HIGH
|
||||
LD L,0FFH ; MAX
|
||||
PUSH BC
|
||||
RST 08
|
||||
POP BC
|
||||
;
|
||||
NEXT0: PUSH BC
|
||||
;
|
||||
LD DE,TXT_TSTCH ; DISPLAY CHANNEL
|
||||
CALL PRTSTR
|
||||
LD A,(CHANNEL)
|
||||
CALL PRTDECB
|
||||
;
|
||||
LD DE,TXT_NOTE ; DISPLAY NOTE
|
||||
CALL PRTSTR
|
||||
LD HL,(NOTE)
|
||||
CALL PRTDECW
|
||||
POP BC
|
||||
;
|
||||
LD B,53H ; SET NOTE
|
||||
LD HL,(NOTE)
|
||||
PUSH BC
|
||||
RST 08
|
||||
POP BC
|
||||
|
||||
OR A ; DID DRIVER FAIL
|
||||
JR Z,NEXT4 ; THIS NOTE ?
|
||||
|
||||
LD DE,TXT_BAD_N
|
||||
CALL FAILMSG
|
||||
JR SKIP
|
||||
;
|
||||
NEXT4: LD B,57H ; DURATION
|
||||
LD HL,1000
|
||||
PUSH BC
|
||||
RST 08
|
||||
POP BC
|
||||
|
||||
LD B,54H ; PLAY
|
||||
LD A,(CHANNEL)
|
||||
LD D,A
|
||||
PUSH BC
|
||||
RST 08
|
||||
POP BC
|
||||
;
|
||||
OR A ; DID DRIVER FAIL
|
||||
JR Z,NEXT2 ; TO PLAY ?
|
||||
|
||||
LD DE,TXT_BAD_N
|
||||
CALL FAILMSG
|
||||
JR SKIP
|
||||
;
|
||||
NEXT2: CALL DELAY
|
||||
CALL CRLF
|
||||
;
|
||||
SKIP:
|
||||
PUSH BC
|
||||
LD C, 6 ; CHECK FOR KEYPRESS
|
||||
LD E,0FFH
|
||||
CALL BDOS
|
||||
POP BC
|
||||
OR A ; SET RESULT
|
||||
RET NZ ; RETURN IF ABORT
|
||||
|
||||
LD HL,(NOTE)
|
||||
DEC HL
|
||||
LD (NOTE),HL
|
||||
|
||||
INC HL
|
||||
LD A,H
|
||||
OR L
|
||||
DEC HL
|
||||
JR NZ,NEXT0
|
||||
;
|
||||
LD B,51H ; VOLUME
|
||||
LD L,00H ; OFF
|
||||
PUSH BC
|
||||
RST 08
|
||||
POP BC
|
||||
;
|
||||
LD B,54H ; PLAY
|
||||
LD A,(CHANNEL)
|
||||
LD D,A
|
||||
PUSH BC
|
||||
RST 08
|
||||
POP BC
|
||||
;
|
||||
XOR A ; SET RESULT
|
||||
RET
|
||||
;
|
||||
FAILMSG: PUSH BC
|
||||
CALL PRTSTR
|
||||
CALL CRLF
|
||||
POP BC
|
||||
RET
|
||||
;
|
||||
;------------------------------------------------------------------------------
|
||||
; CONSTANT TONE ON ALL CHANNELS, SCALE VOLUME
|
||||
;------------------------------------------------------------------------------
|
||||
;
|
||||
TST_VOLUME:
|
||||
; LD HL,332+48 ; TONE
|
||||
LD HL,244 ; ~1000 HZ
|
||||
LD (NOTE),HL
|
||||
;
|
||||
LD DE,TXT_TSTCH ; DISPLAY CHANNEL
|
||||
CALL PRTSTR
|
||||
LD A,(CHANNEL)
|
||||
CALL PRTDECB
|
||||
|
||||
LD A,(DEVICE)
|
||||
LD C,A
|
||||
|
||||
LD B,50H ; RESET
|
||||
PUSH BC
|
||||
RST 08
|
||||
POP BC
|
||||
;
|
||||
NEXT1:
|
||||
LD B,51H ; VOLUME
|
||||
LD A,(VOLUME)
|
||||
LD L,A
|
||||
PUSH BC
|
||||
RST 08
|
||||
POP BC
|
||||
;
|
||||
LD B,53H ; NOTE
|
||||
LD HL,(NOTE)
|
||||
PUSH BC
|
||||
RST 08
|
||||
POP BC
|
||||
;
|
||||
LD B,54H ; PLAY
|
||||
LD A,(CHANNEL)
|
||||
LD D,A
|
||||
PUSH BC
|
||||
RST 08
|
||||
POP BC
|
||||
;
|
||||
CALL DELAY
|
||||
|
||||
PUSH BC
|
||||
LD C, 6 ; KEYPRESS
|
||||
LD E, 0FFH
|
||||
CALL BDOS
|
||||
POP BC ; RECOVER LOOP CTRL
|
||||
OR A ; KEY PRESSED?
|
||||
RET NZ ; BAIL OUT IF SO
|
||||
;
|
||||
LD A,(VOLUME)
|
||||
DEC A
|
||||
LD (VOLUME),A
|
||||
JR NZ,NEXT1
|
||||
;
|
||||
CALL CRLF
|
||||
;
|
||||
RET
|
||||
;
|
||||
;------------------------------------------------------------------------------
|
||||
; 1 KHZ TONE ON CHANNEL, PLAY TILL KEYPRESS
|
||||
;------------------------------------------------------------------------------
|
||||
;
|
||||
TST_TONE:
|
||||
LD HL,244 ; ~1000 HZ
|
||||
LD (NOTE),HL
|
||||
;
|
||||
LD DE,TXT_TSTCH ; DISPLAY CHANNEL
|
||||
CALL PRTSTR
|
||||
LD A,(CHANNEL)
|
||||
CALL PRTDECB
|
||||
;
|
||||
LD A,(DEVICE)
|
||||
LD C,A
|
||||
;
|
||||
LD B,50H ; RESET
|
||||
PUSH BC
|
||||
RST 08
|
||||
POP BC
|
||||
;
|
||||
LD B,51H ; VOLUME
|
||||
LD A,$FF ; MAX
|
||||
LD L,A
|
||||
PUSH BC
|
||||
RST 08
|
||||
POP BC
|
||||
;
|
||||
LD B,53H ; NOTE
|
||||
LD HL,(NOTE)
|
||||
PUSH BC
|
||||
RST 08
|
||||
POP BC
|
||||
;
|
||||
TST_TONE1:
|
||||
;
|
||||
LD B,54H ; PLAY
|
||||
LD A,(CHANNEL)
|
||||
LD D,A
|
||||
PUSH BC
|
||||
RST 08
|
||||
POP BC
|
||||
;
|
||||
;CALL DELAY
|
||||
;
|
||||
PUSH BC
|
||||
LD C, 6 ; KEYPRESS
|
||||
LD E, 0FFH
|
||||
CALL BDOS
|
||||
OR A ; KEY PRESSED?
|
||||
POP BC
|
||||
JR Z,TST_TONE1
|
||||
CALL CRLF
|
||||
XOR A
|
||||
RET ; RETURN ON KEYPRESS
|
||||
;
|
||||
;------------------------------------------------------------------------------
|
||||
; LONG DELAY
|
||||
;------------------------------------------------------------------------------
|
||||
;
|
||||
;DELAY: LD HL,-1
|
||||
DELAY: LD HL,1000
|
||||
DELAY1: DEC HL
|
||||
LD A,H
|
||||
OR L
|
||||
JR NZ,DELAY1
|
||||
RET
|
||||
;
|
||||
;------------------------------------------------------------------------------
|
||||
; PRINT THE nTH STRING IN A LIST OF STRINGS WHERE EACH IS TERMINATED BY 0
|
||||
; A REGISTER DEFINES THE nTH STRING IN THE LIST TO PRINT AND DE POINTS
|
||||
; TO THE START OF THE STRING LIST.
|
||||
;------------------------------------------------------------------------------
|
||||
;
|
||||
PRTIDXDEA: LD C,A
|
||||
OR A
|
||||
PRTIDXDEA1: JR Z,PRTIDXDEA3 ; FOUND TARGET SO EXIT
|
||||
PRTIDXDEA2: LD A,(DE) ; LOOP UNIT
|
||||
INC DE ; WE REACH
|
||||
OR A ; END OF STRING
|
||||
JR NZ,PRTIDXDEA2
|
||||
DEC C ; AT STRING END. SO GO
|
||||
JR PRTIDXDEA1 ; CHECK FOR INDEX MATCH
|
||||
PRTIDXDEA3: CALL PRTSTR ; DISPLAY THE STRING
|
||||
RET
|
||||
;
|
||||
#INCLUDE "printing.inc"
|
||||
;
|
||||
TXT_BANNER .DB 13,10,"RomWBW HBIOS Sound Tool v1.0, 21-Mar-2024",13,10,13,10,0
|
||||
TXT_USAGE .DB "Usage:",13,10
|
||||
.DB "SOUND <d><o>",13,10
|
||||
.DB "",13,10
|
||||
.DB " <d> is number of sound device",13,10
|
||||
.DB " <o> is option to run:",13,10
|
||||
.DB " 'T': play a 1 KHz tone on each channel until keypress",13,10
|
||||
.DB " 'S': play a scale of notes on each channel",13,10
|
||||
.DB " 'V': play a 1 KHz tone at all volumes on each channel",13,10
|
||||
.DB "",13,10
|
||||
.DB "Examples:",13,10
|
||||
.DB "SOUND 1T - play a tone on all channels of sound device unit #1",13,10
|
||||
.DB "SOUND 0S - play a scale on all channels of sound device unit #0",13,10,0
|
||||
TXT_CH .DB "CHANNELS=",0
|
||||
TXT_TSTCH .DB "CHANNEL: ",0
|
||||
TXT_BAD_N .DB " BAD NOTE",0
|
||||
TXT_BAD_P .DB " PLAY ERROR",0
|
||||
TXT_NOTE .DB " NOTE: ",0
|
||||
TXT_VOL .DB " VOLUME: ",0
|
||||
TXT_DEV .DB "DEVICE: ",0
|
||||
TXT_NAME .DB "SN76489 ",0
|
||||
.DB "AY-3-8910 ",0
|
||||
.DB "I/O PORT ",0
|
||||
.DB "YM2612 ",0
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
MODE .DB 0 ; scales mode or volume mode
|
||||
DEVICE .DB 0
|
||||
OPTION .DB ' ' ; run scales
|
||||
NOTE .DW 128
|
||||
VOLUME .DB 0
|
||||
CHANNEL .DB 0
|
||||
CHANNELS .DB 0
|
||||
OLDSTACK .DW 0 ; original stack pointer
|
||||
.DS 40H ; space for stack
|
||||
STACK ; top of stack
|
||||
;
|
||||
.END
|
||||
@@ -46,6 +46,7 @@
|
||||
; 2021-08-17 [WBW] When playing via HBIOS, call BF_SNDRESET at end
|
||||
; 2022-03-20 [DDW] Add support for MBC PSG module
|
||||
; 2023-03-30 [WBW] Fix for quark delay adjustment being trashed
|
||||
; 2024-02-23 [WBW] Include ACR value in config table
|
||||
;_______________________________________________________________________________
|
||||
;
|
||||
; ToDo:
|
||||
@@ -138,11 +139,10 @@ CFGSEL:
|
||||
; Activate card if applicable
|
||||
CALL SLOWIO ; Slow down I/O now
|
||||
LD A,(ACR) ; Get ACR port address (if any)
|
||||
LD C,A ; Copy to C for I/O later
|
||||
INC A ; $FF -> $00 & set flags
|
||||
JR Z,PROBE ; Skip ahead to probe if no ACR
|
||||
DEC A ; Restore real ACR port address
|
||||
LD C,A ; Put in C for I/O
|
||||
LD A,$FF ; Value to activate card
|
||||
JR Z,PROBE ; If no ACR, skip ahead
|
||||
LD A,(ACRVAL) ; Value to activate card
|
||||
OUT (C),A ; Write value to ACR
|
||||
;
|
||||
PROBE:
|
||||
@@ -554,83 +554,83 @@ ERR2: ; without the string
|
||||
;
|
||||
; CONFIG TABLE, ENTRY ORDER MATCHES HBIOS PLATFORM ID
|
||||
;
|
||||
CFGSIZ .EQU 8
|
||||
;
|
||||
CFGTBL: ; PLT RSEL RDAT RIN Z180 ACR
|
||||
CFGTBL: ; PLT RSEL RDAT RIN Z180 ACR ACRVAL
|
||||
; DESC
|
||||
.DB $01, $9A, $9B, $9A, $FF, $9C ; SBC W/ SCG
|
||||
.DB $01, $9A, $9B, $9A, $FF, $9C, $FF ; SBC W/ SCG
|
||||
.DW HWSTR_SCG
|
||||
;
|
||||
.DB $04, $9C, $9D, $9C, $40, $FF ; N8 W/ ONBOARD PSG
|
||||
CFGSIZ .EQU $ - CFGTBL
|
||||
;
|
||||
.DB $04, $9C, $9D, $9C, $40, $FF, $FF ; N8 W/ ONBOARD PSG
|
||||
.DW HWSTR_N8
|
||||
;
|
||||
.DB $05, $9A, $9B, $9A, $40, $9C ; MK4 W/ SCG
|
||||
.DB $05, $9A, $9B, $9A, $40, $9C, $FF ; MK4 W/ SCG
|
||||
.DW HWSTR_SCG
|
||||
;
|
||||
.DB $07, $D8, $D0, $D8, $FF, $FF ; RCZ80 W/ RC SOUND MODULE (EB)
|
||||
.DB $07, $D8, $D0, $D8, $FF, $FF, $FF ; RCZ80 W/ RC SOUND MODULE (EB)
|
||||
.DW HWSTR_RCEB
|
||||
;
|
||||
.DB $07, $A0, $A1, $A2, $FF, $FF ; RCZ80 W/ RC SOUND MODULE (EB Rev 6)
|
||||
.DB $07, $A0, $A1, $A2, $FF, $FF, $FF ; RCZ80 W/ RC SOUND MODULE (EB Rev 6)
|
||||
.DW HWSTR_RCEB6
|
||||
;
|
||||
.DB $07, $D1, $D0, $D0, $FF, $FF ; RCZ80 W/ RC SOUND MODULE (MF)
|
||||
.DB $07, $D1, $D0, $D0, $FF, $FF, $FF ; RCZ80 W/ RC SOUND MODULE (MF)
|
||||
.DW HWSTR_RCMF
|
||||
;
|
||||
.DB $07, $33, $32, $32, $FF, $FF ; RCZ80 W/ LINC SOUND MODULE
|
||||
.DB $07, $33, $32, $32, $FF, $FF, $FF ; RCZ80 W/ LINC SOUND MODULE
|
||||
.DW HWSTR_LINC
|
||||
;
|
||||
.DB $08, $68, $60, $68, $C0, $FF ; RCZ180 W/ RC SOUND MODULE (EB)
|
||||
.DB $08, $68, $60, $68, $C0, $FF, $FF ; RCZ180 W/ RC SOUND MODULE (EB)
|
||||
.DW HWSTR_RCEB
|
||||
;
|
||||
.DB $08, $A0, $A1, $A2, $C0, $FF ; RCZ180 W/ RC SOUND MODULE (EB Rev 6)
|
||||
.DB $08, $A0, $A1, $A2, $C0, $FF, $FF ; RCZ180 W/ RC SOUND MODULE (EB Rev 6)
|
||||
.DW HWSTR_RCEB6
|
||||
;
|
||||
.DB $08, $61, $60, $60, $C0, $FF ; RCZ180 W/ RC SOUND MODULE (MF)
|
||||
.DB $08, $61, $60, $60, $C0, $FF, $FF ; RCZ180 W/ RC SOUND MODULE (MF)
|
||||
.DW HWSTR_RCMF
|
||||
;
|
||||
.DB $08, $33, $32, $32, $C0, $FF ; RCZ180 W/ LINC SOUND MODULE
|
||||
.DB $08, $33, $32, $32, $C0, $FF, $FF ; RCZ180 W/ LINC SOUND MODULE
|
||||
.DW HWSTR_LINC
|
||||
;
|
||||
.DB $09, $D8, $D0, $D8, $FF, $FF ; EZZ80 W/ RC SOUND MODULE (EB)
|
||||
.DB $09, $D8, $D0, $D8, $FF, $FF, $FF ; EZZ80 W/ RC SOUND MODULE (EB)
|
||||
.DW HWSTR_RCEB
|
||||
;
|
||||
.DB $09, $A0, $A1, $A2, $FF, $FF ; EZZ80 W/ RC SOUND MODULE (EB Rev 6)
|
||||
.DB $09, $A0, $A1, $A2, $FF, $FF, $FF ; EZZ80 W/ RC SOUND MODULE (EB Rev 6)
|
||||
.DW HWSTR_RCEB6
|
||||
;
|
||||
.DB $09, $D1, $D0, $D0, $FF, $FF ; EZZ80 W/ RC SOUND MODULE (MF)
|
||||
.DB $09, $D1, $D0, $D0, $FF, $FF, $FF ; EZZ80 W/ RC SOUND MODULE (MF)
|
||||
.DW HWSTR_RCMF
|
||||
;
|
||||
.DB $09, $33, $32, $32, $FF, $FF ; EZZ80 W/ LINC SOUND MODULE
|
||||
.DB $09, $33, $32, $32, $FF, $FF, $FF ; EZZ80 W/ LINC SOUND MODULE
|
||||
.DW HWSTR_LINC
|
||||
;
|
||||
.DB $0A, $68, $60, $68, $C0, $FF ; SCZ180 W/ RC SOUND MODULE (EB)
|
||||
.DB $0A, $68, $60, $68, $C0, $FF, $FF ; SCZ180 W/ RC SOUND MODULE (EB)
|
||||
.DW HWSTR_RCEB
|
||||
;
|
||||
.DB $0A, $A0, $A1, $A2, $C0, $FF ; SCZ180 W/ RC SOUND MODULE (EB Rev 6)
|
||||
.DB $0A, $A0, $A1, $A2, $C0, $FF, $FF ; SCZ180 W/ RC SOUND MODULE (EB Rev 6)
|
||||
.DW HWSTR_RCEB6
|
||||
;
|
||||
.DB $0A, $61, $60, $60, $C0, $FF ; SCZ180 W/ RC SOUND MODULE (MF)
|
||||
.DB $0A, $61, $60, $60, $C0, $FF, $FF ; SCZ180 W/ RC SOUND MODULE (MF)
|
||||
.DW HWSTR_RCMF
|
||||
;
|
||||
.DB $0A, $33, $32, $32, $C0, $FF ; SCZ180 W/ LINC SOUND MODULE
|
||||
.DB $0A, $33, $32, $32, $C0, $FF, $FF ; SCZ180 W/ LINC SOUND MODULE
|
||||
.DW HWSTR_LINC
|
||||
;
|
||||
.DB $0B, $D8, $D0, $D8, $FF, $FF ; RCZ280 W/ RC SOUND MODULE (EB)
|
||||
.DB $0B, $D8, $D0, $D8, $FF, $FF, $FF ; RCZ280 W/ RC SOUND MODULE (EB)
|
||||
.DW HWSTR_RCEB
|
||||
;
|
||||
.DB $0B, $A0, $A1, $A2, $FF, $FF ; RCZ280 W/ RC SOUND MODULE (EB Rev 6)
|
||||
.DB $0B, $A0, $A1, $A2, $FF, $FF, $FF ; RCZ280 W/ RC SOUND MODULE (EB Rev 6)
|
||||
.DW HWSTR_RCEB6
|
||||
;
|
||||
.DB $0B, $D1, $D0, $D0, $FF, $FF ; RCZ280 W/ RC SOUND MODULE (MF)
|
||||
.DB $0B, $D1, $D0, $D0, $FF, $FF, $FF ; RCZ280 W/ RC SOUND MODULE (MF)
|
||||
.DW HWSTR_RCMF
|
||||
;
|
||||
.DB $0B, $33, $32, $32, $FF, $FF ; RCZ280 W/ LINC SOUND MODULE
|
||||
.DB $0B, $33, $32, $32, $FF, $FF, $FF ; RCZ280 W/ LINC SOUND MODULE
|
||||
.DW HWSTR_LINC
|
||||
;
|
||||
.DB 13, $A0, $A1, $A0, $FF, $A2 ; MBC
|
||||
.DB 13, $A0, $A1, $A0, $FF, $A2, $FE ; MBC
|
||||
.DW HWSTR_MBC
|
||||
;
|
||||
.DB 17, $A0, $A1, $A0, $FF, $A2 ; DUODYNE
|
||||
.DB 17, $A4, $A5, $A4, $FF, $A6, $FE ; DUODYNE
|
||||
.DW HWSTR_DUO
|
||||
;
|
||||
.DB $FF ; END OF TABLE MARKER
|
||||
@@ -642,7 +642,8 @@ RSEL .DB 0 ; Register selection port
|
||||
RDAT .DB 0 ; Register data port
|
||||
RIN .DB 0 ; Register input port
|
||||
Z180 .DB 0 ; Z180 base I/O port
|
||||
ACR .DB 0 ; Aux Ctrl Reg I/O port on SCG
|
||||
ACR .DB 0 ; Aux Ctrl Reg I/O port (ACR)
|
||||
ACRVAL .DB 0 ; ACR sound enable value
|
||||
DESC .DW 0 ; Hardware description string adr
|
||||
;
|
||||
CURPLT .DB 0 ; Current platform id reported by HBIOS
|
||||
@@ -660,8 +661,8 @@ TMP .DB 0 ; work around use of undocumented Z80
|
||||
HBIOSMD .DB 0 ; NON-ZERO IF USING HBIOS SOUND DRIVER, ZERO OTHERWISE
|
||||
OCTAVEADJ .DB 0 ; AMOUNT TO ADJUST OCTAVE UP OR DOWN
|
||||
|
||||
MSGBAN .DB "Tune Player for RomWBW v3.5a, 30-Mar-2023",0
|
||||
MSGUSE .DB "Copyright (C) 2023, Wayne Warthen, GNU GPL v3",13,10
|
||||
MSGBAN .DB "Tune Player for RomWBW v3.6, 23-Feb-2024",0
|
||||
MSGUSE .DB "Copyright (C) 2024, Wayne Warthen, GNU GPL v3",13,10
|
||||
.DB "PTxPlayer Copyright (C) 2004-2007 S.V.Bulba",13,10
|
||||
.DB "MYMPlay by Marq/Lieves!Tuore",13,10,13,10
|
||||
.DB "Usage: TUNE <filename>.[PT2|PT3|MYM] [--hbios] [+tn|-tn]",0
|
||||
|
||||
@@ -48,7 +48,7 @@ SHIRAKAW.VGM - SN76489+YM2612 * Jantei Monogatari: St. Shirakawa University
|
||||
ANNA.VGM - SN76489+YM2612 - Jantei Monogatari: Anna : 32K
|
||||
FIELDMAP.VGM - SN76489+YM2612 - Taikou Risshiden: Field Map: Summer : 8K
|
||||
ITSGAMOV.VGM - SN76489+YM2612 - Puyo Puyo Tsuu: It's Game Over! : 16K
|
||||
STARTDEM.VGN - 2xSN76489+AY-3-8910 * Exed Exes / Savage Bees: Start Demo ~Main BGM : 32K
|
||||
STARTDEM.VGM - 2xSN76489+AY-3-8910 * Exed Exes / Savage Bees: Start Demo ~Main BGM : 32K
|
||||
INCHINA.VGM - YM2612 * Double Dragon 3: The Rosetta Stone: In China : 44K
|
||||
SURE.VGM - YM2151 - Martial Age: Sure?? : 36K
|
||||
SABERDAN.VGM - YM2151 - Road Runner: Sabre Dance (Attract Mode - Stage 4) : 28K
|
||||
|
||||
@@ -189,9 +189,9 @@ show_spd:
|
||||
ld b,BF_SYSGET
|
||||
ld c,BF_SYSGET_CPUINFO
|
||||
rst 08
|
||||
jp nz,err_not_sup
|
||||
jp nz,err_api
|
||||
call crlf2
|
||||
ld (cpu_spd),de ; save CPU speed for now
|
||||
push de ; save CPU speed for now
|
||||
push bc ; Oscillator speed to HL
|
||||
pop hl
|
||||
ld de,str_spacer
|
||||
@@ -199,10 +199,18 @@ show_spd:
|
||||
call prtd3m ; print it
|
||||
ld de,str_oscspd
|
||||
call prtstr
|
||||
call crlf
|
||||
ld de,str_cpuspd
|
||||
call prtstr
|
||||
pop hl ; recover CPU speed
|
||||
call prtd3m ; print it
|
||||
ld de,str_mhz
|
||||
call prtstr
|
||||
;
|
||||
ld b,BF_SYSGET
|
||||
ld c,BF_SYSGET_CPUSPD
|
||||
rst 08
|
||||
jp nz,err_not_sup
|
||||
ret nz ; no CPU speed info, done
|
||||
push de ; save wait states for now
|
||||
ld a,l
|
||||
ld de,str_slow
|
||||
@@ -216,11 +224,6 @@ show_spd:
|
||||
jr z,show_spd1
|
||||
jp err_invalid
|
||||
show_spd1:
|
||||
call crlf
|
||||
call prtstr
|
||||
ld hl,(cpu_spd) ; recover CPU speed
|
||||
call prtd3m
|
||||
ld de,str_cpuspd
|
||||
call prtstr
|
||||
pop hl
|
||||
ld a,h ; memory wait states
|
||||
@@ -284,6 +287,9 @@ err_not_sup:
|
||||
err_invalid:
|
||||
ld de,str_err_invalid
|
||||
jr err_ret
|
||||
err_api:
|
||||
ld de,str_err_api
|
||||
jr err_ret
|
||||
;
|
||||
err_ret:
|
||||
call crlf2
|
||||
@@ -659,21 +665,24 @@ delay1:
|
||||
; Constants
|
||||
;=======================================================================
|
||||
;
|
||||
str_banner .db "RomWBW CPU Speed Selector v0.5, 2-Feb-2022",0
|
||||
str_banner .db "RomWBW CPU Speed Selector v0.6, 29-Dec-2023",0
|
||||
str_spacer .db " ",0
|
||||
str_oscspd .db " MHz Oscillator",0
|
||||
str_slow .db " CPU speed is HALF (",0
|
||||
str_full .db " CPU speed is FULL (",0
|
||||
str_dbl .db " CPU speed is DOUBLE (",0
|
||||
str_cpuspd .db " MHz)",0
|
||||
str_cpuspd .db " CPU speed is ",0
|
||||
str_mhz .db " MHz",0
|
||||
|
||||
str_slow .db " (Half)",0
|
||||
str_full .db " (Full)",0
|
||||
str_dbl .db " (Double)",0
|
||||
str_memws .db " Memory Wait State(s)",0
|
||||
str_iows .db " I/O Wait State(s)",0
|
||||
str_err_una .db " ERROR: UNA not supported by application",0
|
||||
str_err_inv .db " ERROR: Invalid BIOS (signature missing)",0
|
||||
str_err_ver .db " ERROR: Unexpected HBIOS version",0
|
||||
str_err_parm .db " ERROR: Parameter error (CPUSPD /? for usage)",0
|
||||
str_err_not_sup .db " ERROR: Platform or configuration not supported!",0
|
||||
str_err_not_sup .db " ERROR: Platform or configuration does not support CPU speed configuration!",0
|
||||
str_err_invalid .db " ERROR: Invalid configuration!",0
|
||||
str_err_api .db " ERROR: HBIOS API error!",0
|
||||
str_usage .db " Usage: CPUSPD <cpuspd>,<memws>,<iows>\r\n"
|
||||
.db "\r\n"
|
||||
.db " <cpuspd>: \"Half\", \"Full\", or \"Double\"\r\n"
|
||||
@@ -693,7 +702,6 @@ stack .equ $ ; stack top
|
||||
;
|
||||
;
|
||||
tmpstr .fill 9,0 ; temp string (8 chars, 0 term)
|
||||
cpu_spd .dw 0 ; current cpu speed
|
||||
new_cpu_spd .db $FF ; new CPU speed
|
||||
new_ws_mem .db $FF ; new memory wait states
|
||||
new_ws_io .db $FF ; new I/O wait states
|
||||
|
||||
@@ -19,6 +19,8 @@
|
||||
; 1) Actually implement this
|
||||
;_______________________________________________________________________________
|
||||
;
|
||||
#include "../ver.inc"
|
||||
;
|
||||
;===============================================================================
|
||||
; Definitions
|
||||
;===============================================================================
|
||||
@@ -30,9 +32,6 @@ bdos .equ $0005 ; BDOS invocation vector
|
||||
;;
|
||||
;stamp .equ $40 ; loc of RomWBW CBIOS zero page stamp
|
||||
;
|
||||
rmj .equ 3 ; CBIOS version - major
|
||||
rmn .equ 0 ; CBIOS version - minor
|
||||
;
|
||||
;===============================================================================
|
||||
; Code Section
|
||||
;===============================================================================
|
||||
|
||||
@@ -58,7 +58,7 @@ HBC_CLKTBL:
|
||||
.DB 02H, 00111111B, '/'
|
||||
.DB 01H, 00011111B, '/'
|
||||
.DB 00H, 11111111B, ' '
|
||||
.DB 03H, 00011111B, ':'
|
||||
.DB 03H, 00111111B, ':'
|
||||
.DB 04H, 01111111B, ':'
|
||||
.DB 05H, 01111111B, 00H
|
||||
;
|
||||
|
||||
@@ -12,7 +12,7 @@ Operating System (DOS), and Basic I/O System (BIOS). The CCP and DOS components
|
||||
are pre-built, relocatable binaries. The BIOS (BPBIOS) is assembled into a relocatable
|
||||
binary by the build, then the build links together all three components to form the
|
||||
final loadable image (.IMG) file. The linking process is performed by the custom BPBIOS
|
||||
linker (BPBUILD.COM). In addition to linking the 3 components, BPBUILD also sets
|
||||
linker (BPBUILD.COM). In addition to linking the 3 components, BPBUILD also
|
||||
adjusts the ZCPR environment configuration.
|
||||
|
||||
BPBUILD is designed to be run interactively. However, it can be started with an
|
||||
@@ -24,8 +24,8 @@ running of BPBUILD.
|
||||
|
||||
The CCP can be ZCPR 3.3 (ZCPR33?.REL), ZCPR 3.4 (Z34.REL), or ZCPR 4.1 (Z41.ZRL). ZCPR 3.3
|
||||
uses static references to the ZCPR segments, so a custom version of it must be assembled.
|
||||
The ZCPR33 subdirectory provides a build process for doing this. It produces a specific
|
||||
version for each of the memory segment configurations (ZCPR33T.REL & ZCPR33N.REL).
|
||||
The ZCPR33 subdirectory provides a build process for doing this. It produces a custom
|
||||
version of ZCPR33.REL with the correct static references to the ZCPR segments.
|
||||
|
||||
The DOS can be ZSDOS 1.1 (ZSDOS.ZRL) or ZSDOS 2.03 (ZS203.ZRL). These are both pre-built
|
||||
relocatable binaries. Note that only certain version combinations of ZSDOS and ZCPR are
|
||||
|
||||
@@ -3,8 +3,8 @@ setlocal
|
||||
|
||||
pushd ZCPR33 && call Build || exit /b & popd
|
||||
|
||||
set PATH=%PATH%;..\..\Tools\zxcc;..\..\Tools\cpmtools;
|
||||
|
||||
set TOOLS=..\..\Tools
|
||||
set PATH=%PATH%;%TOOLS%\zxcc;%TOOLS%\cpmtools;
|
||||
set CPMDIR80=%TOOLS%/cpm/
|
||||
|
||||
call :makebp 33
|
||||
@@ -48,7 +48,8 @@ if exist bp%VER%.prn del bp%VER%.prn || exit /b
|
||||
ren bpbio-ww.prn bp%VER%.prn || exit /b
|
||||
if exist bp%VER%.err del bp%VER%.err || exit /b
|
||||
ren bpbio-ww.err bp%VER%.err || exit /b
|
||||
copy bpbio-ww.rel bp%VER%.rel || exit /b
|
||||
if exist bp%VER%.rel del bp%VER%.rel || exit /b
|
||||
ren bpbio-ww.rel bp%VER%.rel || exit /b
|
||||
|
||||
rem pause
|
||||
|
||||
|
||||
@@ -1,44 +1,37 @@
|
||||
VERSIONS = \
|
||||
33t 33tbnk \
|
||||
33n 33nbnk \
|
||||
34t 34tbnk \
|
||||
34n 34nbnk \
|
||||
41tbnk 41nbnk
|
||||
33 33bnk \
|
||||
33 33bnk \
|
||||
34 34bnk \
|
||||
34 34bnk \
|
||||
41bnk
|
||||
|
||||
HD0IMG = ../../Binary/hd_bp.img
|
||||
IMGFILES = $(foreach ver,$(VERSIONS),bp$(ver).img)
|
||||
DISTFILES = *.zex *.rel myterm.z3t
|
||||
|
||||
OTHERS = zcpr33n.rel zcpr33t.rel \
|
||||
bpbio-ww.rel bpsys.dat bpsys.bak bpbio-ww.err def-ww.lib *.img
|
||||
OTHERS = zcpr33.rel bp*.prn bp*.rel \
|
||||
bpbio-ww.rel bpsys.dat bpsys.bak bpbio-ww.err def-ww.lib bp*.img
|
||||
|
||||
TOOLS = ../../Tools
|
||||
|
||||
SUBDIRS = ZCPR33
|
||||
include $(TOOLS)/Makefile.inc
|
||||
|
||||
$(HD0IMG): $(IMGFILES)
|
||||
if [ -f $(HD0IMG) ] ; then \
|
||||
for f in $(IMGFILES) $(DISTFILES) ; do \
|
||||
$(BINDIR)/cpmrm -f wbw_hd0 $(HD0IMG) 0:$$f ; \
|
||||
done ; \
|
||||
$(CPMCP) -f wbw_hd0 $(HD0IMG) $(IMGFILES) $(DISTFILES) 0: ; \
|
||||
fi
|
||||
|
||||
zcpr33n.rel zcpr33t.rel:
|
||||
zcpr33.rel:
|
||||
(cd ZCPR33 ; make)
|
||||
|
||||
all:: $(HD0IMG)
|
||||
all:: $(IMGFILES)
|
||||
|
||||
clean::
|
||||
@rm -f $(HD0IMG)
|
||||
# clean::
|
||||
# $(MAKE) --directory ZCPR3 clean
|
||||
|
||||
%.img: zcpr33n.rel zcpr33t.rel
|
||||
%.img: zcpr33.rel
|
||||
$(eval VER := $(subst .img,,$(subst bp,,$@)))
|
||||
cp def-ww-z$(VER).lib def-ww.lib
|
||||
rm -f bpbio-ww.rel
|
||||
$(ZXCC) ZMAC -BPBIO-WW -/P
|
||||
mv bpbio-ww.prn bp$(VER).prn
|
||||
if [ -f bpbio-ww.err ] ; then mv bpbio-ww.err bp$(VER).err; fi
|
||||
mv bpbio-ww.rel bp$(VER).rel
|
||||
cp bp$(VER).dat bpsys.dat
|
||||
$(ZXCC) ./bpbuild.com -bpsys.dat 0 < bpbld1.rsp
|
||||
cp bpsys.img bpsys.dat
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
@echo off
|
||||
setlocal
|
||||
|
||||
set PATH=%PATH%;..\..\..\Tools\zxcc;..\..\..\Tools\cpmtools;
|
||||
|
||||
set TOOLS=..\..\..\Tools
|
||||
set PATH=%PATH%;%TOOLS%\zxcc;%TOOLS%\cpmtools;
|
||||
set CPMDIR80=%TOOLS%/cpm/
|
||||
|
||||
copy ..\z3base.lib . || exit /b
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
OBJECTS = zcpr33n.rel zcpr33t.rel
|
||||
OTHERS = z3basen.lib z3baset.lib
|
||||
OBJECTS = zcpr33.rel
|
||||
OTHERS = z3base.lib *.prn *.rel
|
||||
TOOLS = ../../../Tools
|
||||
DEST = ..
|
||||
|
||||
@@ -7,12 +7,7 @@ include $(TOOLS)/Makefile.inc
|
||||
|
||||
DIFFPATH = $(DIFFTO)/Source/BPBIOS
|
||||
|
||||
zcpr33t.rel: ../z3baset.lib
|
||||
cp ../z3baset.lib z3baset.lib
|
||||
$(ZXCC) ZMAC -zcpr33t.z80 -/P
|
||||
rm z3baset.lib
|
||||
|
||||
zcpr33n.rel: ../z3basen.lib
|
||||
cp ../z3basen.lib z3basen.lib
|
||||
$(ZXCC) ZMAC -zcpr33n.z80 -/P
|
||||
rm z3basen.lib
|
||||
zcpr33.rel: ../z3base.lib
|
||||
cp ../z3base.lib z3base.lib
|
||||
$(ZXCC) ZMAC -zcpr33.z80 -/P
|
||||
rm z3base.lib
|
||||
|
||||
@@ -421,6 +421,12 @@ DRVTBL: LD HL,DPHTBL ; Point to DPH table
|
||||
PAGE
|
||||
ENDIF ;HARDDSK
|
||||
|
||||
IF RAMDSK ; << ****** Hardware Specific ****** >>
|
||||
INCLUDE RAMD-WW.Z80 ; << This Driver is for HBIOS >>
|
||||
|
||||
PAGE
|
||||
ENDIF ;RAMDSK
|
||||
|
||||
|
||||
; << ****** Hardware Specific ****** >>
|
||||
; << Enter Warm Boot routines in >>
|
||||
|
||||
@@ -102,6 +102,9 @@ CBOOT:
|
||||
; BPCNFG to configure a generic IMG file for specific Hard Drive Partitions.
|
||||
|
||||
CBOOT0:
|
||||
LD BC,HBF_SYSRES_INT ; HB Func: Internal Reset
|
||||
CALL HBX_INVOKE ; Do it
|
||||
|
||||
LD HL,BRAME ; Get end of banked RAM
|
||||
LD (HISAV),HL ; and save for later use
|
||||
IF HARDDSK
|
||||
@@ -117,14 +120,14 @@ DYNLP: LD E,(HL)
|
||||
DEC DE ; Else back up Ptr to Driver
|
||||
DEC DE
|
||||
LD A,(DE) ; Get driver #
|
||||
; IF RAMDSK
|
||||
; DEC A
|
||||
; DEC A ; Hard Disk (Driver 2)?
|
||||
; JR Z,ADDSIZ ; ..jump if so
|
||||
; DEC A ; RAM Disk (Driver 3)?
|
||||
; ELSE
|
||||
IF RAMDSK
|
||||
DEC A
|
||||
DEC A ; Hard Disk (Driver 2)?
|
||||
JR Z,ADDSIZ ; ..jump if so
|
||||
DEC A ; RAM Disk (Driver 3)?
|
||||
ELSE
|
||||
CP 2 ; Hard Disk (Driver 2)?
|
||||
; ENDIF ; Ramdsk
|
||||
ENDIF ; Ramdsk
|
||||
JR NZ,DYNCHK ; ..jump to end if Not
|
||||
ADDSIZ: PUSH BC ; Save loop counter
|
||||
PUSH HL ; and ptr to DPH
|
||||
|
||||
@@ -268,16 +268,15 @@ MATCH: LD A,(SECMSK) ; Get the sector mask
|
||||
;
|
||||
; Modified to use HBIOS host buffer
|
||||
;
|
||||
; HSTBUF is always in HBIOS bank where I/O is done
|
||||
LD A,(TPABNK) ; TPA BANK
|
||||
DEC A ; HBIOS bank is one below
|
||||
LD C,A
|
||||
; HSTBUF is always in HBIOS bank where I/O is actually done
|
||||
LD A,(HB_BNKBIOS) ; HBIOS bank id
|
||||
LD C,A ; Set Read Source Bank
|
||||
IF BANKED
|
||||
LD A,(DMABNK) ; Set Read Destination Bank
|
||||
LD A,(DMABNK) ; Read Destination Bank
|
||||
ELSE
|
||||
LD A,(TPABNK) ; Set Read Destination Bank
|
||||
LD A,(TPABNK) ; Read Destination Bank
|
||||
ENDIF
|
||||
LD B,A
|
||||
LD B,A ; Set Read Destination Bank
|
||||
LD A,(READOP) ; Direction?
|
||||
OR A
|
||||
JR NZ,OKBNKS ; ..jump if read
|
||||
|
||||
@@ -74,7 +74,7 @@ MORDPB EQU NO ; Include additional Floppy DPB Formats?
|
||||
|
||||
;;--- RAM Disk Section ---
|
||||
;
|
||||
;RAMDSK EQU YES ; YES = Make RAM-Disk Code, NO = No code made
|
||||
RAMDSK EQU YES ; YES = Make RAM-Disk Code, NO = No code made
|
||||
|
||||
;--- Hard Disk Section ---
|
||||
|
||||
@@ -133,8 +133,8 @@ BNK1 EQU BID_COM ; Second TPA Bank (Common Bank) 48000H
|
||||
BNK2 EQU BID_SYS ; System Bank (BIOS, DOS, CPR) 50000H
|
||||
BNKU EQU 00H ; User Area Bank 58000H
|
||||
; (set to 0 to disable)
|
||||
BNK3 EQU BID_RAMD ; First Bank for RAM disk 60000H
|
||||
BNKM EQU BID_RAMM ; Maximum Bank # F8000H
|
||||
BNK3 EQU BID_BUF ; First Bank for RAM disk 60000H
|
||||
BNKM EQU BID_BUF ; Maximum Bank # F8000H
|
||||
|
||||
IF NO ; REMOVE CODE - NOT NEEDED WITH HBIOS makes a
|
||||
; nice resource for Z180 programing in general
|
||||
|
||||
@@ -74,7 +74,7 @@ MORDPB EQU NO ; Include additional Floppy DPB Formats?
|
||||
|
||||
;;--- RAM Disk Section ---
|
||||
;
|
||||
;RAMDSK EQU YES ; YES = Make RAM-Disk Code, NO = No code made
|
||||
RAMDSK EQU YES ; YES = Make RAM-Disk Code, NO = No code made
|
||||
|
||||
;--- Hard Disk Section ---
|
||||
|
||||
@@ -133,8 +133,8 @@ BNK1 EQU BID_COM ; Second TPA Bank (Common Bank) 48000H
|
||||
BNK2 EQU BID_SYS ; System Bank (BIOS, DOS, CPR) 50000H
|
||||
BNKU EQU 00H ; User Area Bank 58000H
|
||||
; (set to 0 to disable)
|
||||
BNK3 EQU BID_RAMD ; First Bank for RAM disk 60000H
|
||||
BNKM EQU BID_RAMM ; Maximum Bank # F8000H
|
||||
BNK3 EQU BID_BUF ; First Bank for RAM disk 60000H
|
||||
BNKM EQU BID_BUF ; Maximum Bank # F8000H
|
||||
|
||||
IF NO ; REMOVE CODE - NOT NEEDED WITH HBIOS makes a
|
||||
; nice resource for Z180 programing in general
|
||||
|
||||
@@ -74,7 +74,7 @@ MORDPB EQU NO ; Include additional Floppy DPB Formats?
|
||||
|
||||
;;--- RAM Disk Section ---
|
||||
;
|
||||
;RAMDSK EQU YES ; YES = Make RAM-Disk Code, NO = No code made
|
||||
RAMDSK EQU YES ; YES = Make RAM-Disk Code, NO = No code made
|
||||
|
||||
;--- Hard Disk Section ---
|
||||
|
||||
@@ -133,8 +133,8 @@ BNK1 EQU BID_COM ; Second TPA Bank (Common Bank) 48000H
|
||||
BNK2 EQU BID_SYS ; System Bank (BIOS, DOS, CPR) 50000H
|
||||
BNKU EQU 00H ; User Area Bank 58000H
|
||||
; (set to 0 to disable)
|
||||
BNK3 EQU BID_RAMD ; First Bank for RAM disk 60000H
|
||||
BNKM EQU BID_RAMM ; Maximum Bank # F8000H
|
||||
BNK3 EQU BID_BUF ; First Bank for RAM disk 60000H
|
||||
BNKM EQU BID_BUF ; Maximum Bank # F8000H
|
||||
|
||||
IF NO ; REMOVE CODE - NOT NEEDED WITH HBIOS makes a
|
||||
; nice resource for Z180 programing in general
|
||||
|
||||
@@ -74,7 +74,7 @@ MORDPB EQU NO ; Include additional Floppy DPB Formats?
|
||||
|
||||
;;--- RAM Disk Section ---
|
||||
;
|
||||
;RAMDSK EQU YES ; YES = Make RAM-Disk Code, NO = No code made
|
||||
RAMDSK EQU YES ; YES = Make RAM-Disk Code, NO = No code made
|
||||
|
||||
;--- Hard Disk Section ---
|
||||
|
||||
@@ -133,8 +133,8 @@ BNK1 EQU BID_COM ; Second TPA Bank (Common Bank) 48000H
|
||||
BNK2 EQU BID_SYS ; System Bank (BIOS, DOS, CPR) 50000H
|
||||
BNKU EQU 00H ; User Area Bank 58000H
|
||||
; (set to 0 to disable)
|
||||
BNK3 EQU BID_RAMD ; First Bank for RAM disk 60000H
|
||||
BNKM EQU BID_RAMM ; Maximum Bank # F8000H
|
||||
BNK3 EQU BID_BUF ; First Bank for RAM disk 60000H
|
||||
BNKM EQU BID_BUF ; Maximum Bank # F8000H
|
||||
|
||||
IF NO ; REMOVE CODE - NOT NEEDED WITH HBIOS makes a
|
||||
; nice resource for Z180 programing in general
|
||||
|
||||
@@ -74,7 +74,7 @@ MORDPB EQU NO ; Include additional Floppy DPB Formats?
|
||||
|
||||
;;--- RAM Disk Section ---
|
||||
;
|
||||
;RAMDSK EQU YES ; YES = Make RAM-Disk Code, NO = No code made
|
||||
RAMDSK EQU YES ; YES = Make RAM-Disk Code, NO = No code made
|
||||
|
||||
;--- Hard Disk Section ---
|
||||
|
||||
@@ -133,8 +133,8 @@ BNK1 EQU BID_COM ; Second TPA Bank (Common Bank) 48000H
|
||||
BNK2 EQU BID_SYS ; System Bank (BIOS, DOS, CPR) 50000H
|
||||
BNKU EQU 00H ; User Area Bank 58000H
|
||||
; (set to 0 to disable)
|
||||
BNK3 EQU BID_RAMD ; First Bank for RAM disk 60000H
|
||||
BNKM EQU BID_RAMM ; Maximum Bank # F8000H
|
||||
BNK3 EQU BID_BUF ; First Bank for RAM disk 60000H
|
||||
BNKM EQU BID_BUF ; Maximum Bank # F8000H
|
||||
|
||||
IF NO ; REMOVE CODE - NOT NEEDED WITH HBIOS makes a
|
||||
; nice resource for Z180 programing in general
|
||||
|
||||
@@ -271,9 +271,9 @@ diskdef interak
|
||||
os 2.2
|
||||
end
|
||||
|
||||
# RomWBW 256KB ROM (128KB reserved, 128KB ROM Disk)
|
||||
# RomWBW 128KB ROM Disk
|
||||
|
||||
diskdef wbw_rom256
|
||||
diskdef wbw_rom128
|
||||
seclen 512
|
||||
tracks 4
|
||||
sectrk 64
|
||||
@@ -284,35 +284,9 @@ diskdef wbw_rom256
|
||||
os 2.2
|
||||
end
|
||||
|
||||
# RomWBW 512KB ROM (128KB reserved, 384KB ROM Disk)
|
||||
# RomWBW 256KB ROM Disk
|
||||
|
||||
diskdef wbw_rom512
|
||||
seclen 512
|
||||
tracks 12
|
||||
sectrk 64
|
||||
blocksize 2048
|
||||
maxdir 256
|
||||
skew 0
|
||||
boottrk 0
|
||||
os 2.2
|
||||
end
|
||||
|
||||
# RomWBW 1024KB ROM (128KB reserved, 896KB ROM Disk)
|
||||
|
||||
diskdef wbw_rom1024
|
||||
seclen 512
|
||||
tracks 28
|
||||
sectrk 64
|
||||
blocksize 2048
|
||||
maxdir 256
|
||||
skew 0
|
||||
boottrk 0
|
||||
os 2.2
|
||||
end
|
||||
|
||||
# RomWBW 512KB RAM (256KB reserved, 256KB RAM Disk)
|
||||
|
||||
diskdef wbw_ram512
|
||||
diskdef wbw_rom256
|
||||
seclen 512
|
||||
tracks 8
|
||||
sectrk 64
|
||||
@@ -323,11 +297,24 @@ diskdef wbw_ram512
|
||||
os 2.2
|
||||
end
|
||||
|
||||
# RomWBW 1024KB RAM (256KB reserved, 768KB RAM Disk)
|
||||
# RomWBW 384KB ROM Disk
|
||||
|
||||
diskdef wbw_ram1024
|
||||
diskdef wbw_rom384
|
||||
seclen 512
|
||||
tracks 24
|
||||
tracks 12
|
||||
sectrk 64
|
||||
blocksize 2048
|
||||
maxdir 256
|
||||
skew 0
|
||||
boottrk 0
|
||||
os 2.2
|
||||
end
|
||||
|
||||
# RomWBW 896KB ROM Disk
|
||||
|
||||
diskdef wbw_rom896
|
||||
seclen 512
|
||||
tracks 28
|
||||
sectrk 64
|
||||
blocksize 2048
|
||||
maxdir 256
|
||||
|
||||
@@ -46,7 +46,7 @@
|
||||
; NOTE: No Skew Table needed since Hard Disk Format is locked w/No Skew
|
||||
|
||||
;.....
|
||||
; Currently, BPBIOS supports 2 memory drive devices and 3 phyical hard
|
||||
; Currently, BPBIOS supports 2 memory drive devices and 3 physical hard
|
||||
; drive like devices. BPBIOS can support seven but unfortunately
|
||||
; BPCNFG only supports 3 hard drive like devices and the source
|
||||
; code is not available, so menu 4 is meaningless. Devices
|
||||
@@ -64,26 +64,22 @@
|
||||
;
|
||||
; Starting with ver 2.8 of HBIOS, devices are discovered at boot
|
||||
; time and assigned device numbers. Since devices are tested in
|
||||
; a certain order, the device numbers are somewhat predicably
|
||||
; a certain order, the device numbers are somewhat predictably
|
||||
; assigned. Memory drives are discovered first. IDE drives are
|
||||
; discovered next so that IDE Hard drives including CF cards are
|
||||
; assigned device 2 and device 3 if a slave drive is supported by
|
||||
; the interface. Next comes the SD drive and is assigned device 3
|
||||
; or 4 depending on the whether there is an ide slave drive.
|
||||
; USB drive is assigned device 4 or 5 . For SIMH HDSK0 is device 0
|
||||
; USB drive is assigned device 4 or 5. For SIMH HDSK0 is device 0
|
||||
; and HDSK1 is device 1. Memory drives are now handled as LBA
|
||||
; devices, ie like hard drives.
|
||||
;
|
||||
; The following non-memory drive capacities and configurations used for
|
||||
; the SIMH, SD and IDE drives: Slice geometry is 256, 512 byte sectors,
|
||||
; 1 head per track and 1 with one reserved track, a block size of 4096
|
||||
; bytes with 512 directory entries. An equivalent geometry is 16
|
||||
; sectors and 16 heads per track. Internally BPBIOS uses a uniform
|
||||
; logical organization with 64 logical records per logical track.
|
||||
; Thus there are 16 logical tracks per physical track with 1040
|
||||
; logical (65 physical) tracks per slice. If all partitions are not
|
||||
; physically present, the missing partitions can be disabled in the
|
||||
; BPBCNFG configuration file or by hand. Note that HBIOS uses LBA,
|
||||
; the SIMH, SD and IDE drives: Track geometry is 16 512 byte sectors.
|
||||
; A slice is exactly 64 tracks, with 1 of the 64 tracks as a system
|
||||
; track. There are 1024 directory entries per slice. If all partitions
|
||||
; are not physically present, the missing partitions can be disabled in
|
||||
; the BPBCNFG configuration file or by hand. Note that HBIOS uses LBA,
|
||||
; Logical Block Addressing, for non-floppy drives.
|
||||
;
|
||||
; For SBC V1,2, ZETA, MARK IV and N8, the following non-memory partitions
|
||||
@@ -94,26 +90,26 @@
|
||||
; partition Size Blocks Block Offset in
|
||||
; MByte Size logical tracks
|
||||
;====================================================================
|
||||
; C 8 2048 4096 1*16 = 16
|
||||
; D 8 2048 4096 (1+65)*16 = 1056
|
||||
; E 8 2048 4096 (1+2*65)*16 = 2096
|
||||
; F 8 2048 4096 (1+3*65)*16 = 3136
|
||||
; G 8 2048 4096 (1+4*65)*16 = 4176
|
||||
; H 8 2048 4096 (1+5*65)*16 = 5216
|
||||
; I 8 2048 4096 (1+6*65)*16 = 6256
|
||||
; J 8 2048 4096 (1+7*65)*16 = 7296
|
||||
; C 8 2044 4096 128+(1024*0)+2 = 130
|
||||
; D 8 2044 4096 128+(1024*1)+2 = 1154
|
||||
; E 8 2044 4096 128+(1024*2)+2 = 2178
|
||||
; F 8 2044 4096 128+(1024*3)+2 = 3202
|
||||
; G 8 2044 4096 128+(1024*4)+2 = 4226
|
||||
; H 8 2044 4096 128+(1024*5)+2 = 5250
|
||||
; I 8 2044 4096 128+(1024*6)+2 = 6274
|
||||
; J 8 2044 4096 128+(1024*7)+2 = 7298
|
||||
;
|
||||
; These are capacities and configurations used for SD card:
|
||||
;
|
||||
; partition Size Blocks Block Offset
|
||||
; MByte Size logical tracks
|
||||
;====================================================================
|
||||
; K 8 2048 4096 1*16 = 16
|
||||
; L 8 2048 4096 (1+65)*16 = 1056
|
||||
; M 8 2048 4096 (1+2*65)*16 = 2096
|
||||
; N 8 2048 4096 (1+3*65)*16 = 3136
|
||||
; K 8 2044 4096 128+(1024*0)+2 = 130
|
||||
; L 8 2044 4096 128+(1024*1)+2 = 1154
|
||||
; M 8 2044 4096 128+(1024*2)+2 = 2178
|
||||
; N 8 2044 4096 128+(1024*3)+2 = 3202
|
||||
;
|
||||
; RAM drive is paritition A while ROM drive is partition B.
|
||||
; RAM drive is partition A while ROM drive is partition B.
|
||||
;
|
||||
; For example, a typical Memory drive configuration is:
|
||||
;
|
||||
@@ -199,17 +195,17 @@ DPBROM: DEFW 64 ; Sectors/Track
|
||||
; even though real layout is 256 physical
|
||||
; sectors per track
|
||||
DEFB 0 ; Physical tracks/side (No Meaning in HD)
|
||||
HSIZ0 EQU 2048 ; # of blocks in first Partition (1024 trks)
|
||||
HSIZ0 EQU 2048 - 4 ; # of blocks in first Partition (1022 trks)
|
||||
;
|
||||
DPB50: DEFW 64 ; Sctrs/Trk
|
||||
DEFB 5 ; Blk Shf Fctr
|
||||
DEFB 31 ; Block Mask
|
||||
DEFB 1 ; Extent Mask
|
||||
DEFW HSIZ0-1 ; Disk Size-1
|
||||
DEFW 511 ; Dir Max-1 - 4 blocks
|
||||
DEFB 0F0H,0 ; Alloc 0,1 - 4 blocks
|
||||
DEFW HSIZ0-1 ; Disk Size-1
|
||||
DEFW 1024-1 ; Dir Max-1
|
||||
DEFB 0FFH,0 ; Alloc 0,1
|
||||
DEFW 0 ; Check Size
|
||||
DEFW 16 ; Trk Offset
|
||||
DEFW 128+(1024*0)+2 ; Trk Offset
|
||||
ENDIF
|
||||
;
|
||||
;.....
|
||||
@@ -226,17 +222,17 @@ DPB50: DEFW 64 ; Sctrs/Trk
|
||||
; sectors per track
|
||||
DEFB 0 ; Physical tracks/side (No Meaning in HD)
|
||||
|
||||
HSIZ1 EQU 2048 ; # of blocks in Second Partition (1024 trks)
|
||||
HSIZ1 EQU 2048 - 4 ; # of blocks in Second Partition (1022 trks)
|
||||
;
|
||||
DPB51: DEFW 64 ; Scts/Trk
|
||||
DEFB 5 ; Blk Shf Fctr
|
||||
DEFB 31 ; Block Mask
|
||||
DEFB 1 ; Extent Mask
|
||||
DEFW HSIZ1-1 ; Disk Size-1
|
||||
DEFW 511 ; Dir Max-1 4 blocks
|
||||
DEFB 0F0H,0 ; Alloc 0,1
|
||||
DEFW 1024-1 ; Dir Max-1
|
||||
DEFB 0FFH,0 ; Alloc 0,1
|
||||
DEFW 0 ; Check size
|
||||
DEFW (1+65)*16 ; Track offset 1056
|
||||
DEFW 128+(1024*1)+2 ; Trk Offset
|
||||
ENDIF
|
||||
;
|
||||
;.....
|
||||
@@ -253,21 +249,21 @@ DPB51: DEFW 64 ; Scts/Trk
|
||||
; sectors per track
|
||||
DEFB 0 ; Physical tracks/side (No Meaning in HD)
|
||||
|
||||
HSIZ2 EQU 2048 ; # of blocks in third Partition (1024 tracks)
|
||||
HSIZ2 EQU 2048 - 4 ; # of blocks in Second Partition (1022 trks)
|
||||
;
|
||||
DPB52: DEFW 64 ; Scts/Trk
|
||||
DEFB 5 ; Blk Shf Fctr
|
||||
DEFB 31 ; Block Mask
|
||||
DEFB 1 ; Extent Mask
|
||||
DEFW HSIZ2-1 ; Disk Size-1
|
||||
DEFW 511 ; Dir Max-1 4 blocks
|
||||
DEFB 0F0H,0 ; Alloc 0,1
|
||||
DEFW 1024-1 ; Dir Max-1
|
||||
DEFB 0FFH,0 ; Alloc 0,1
|
||||
DEFW 0 ; Check size
|
||||
DEFW (1+2*65)*16 ; Track offset = 2096
|
||||
DEFW 128+(1024*2)+2 ; Trk Offset
|
||||
ENDIF
|
||||
;
|
||||
;.....
|
||||
; Partition F. HBIOS Disk 0, Slice 4
|
||||
; Partition F. HBIOS Disk 0, Slice 3
|
||||
|
||||
IF DRV_F
|
||||
DEFB 'HBDSK0:3 ','F'+80H ; Id - 10 bytes
|
||||
@@ -280,17 +276,17 @@ DPB52: DEFW 64 ; Scts/Trk
|
||||
; sectors per track
|
||||
DEFB 0 ; Physical tracks/side (No Meaning in HD)
|
||||
|
||||
HSIZ3 EQU 2048 ; # of blocks in Fourth Partition (1024 tracks)
|
||||
HSIZ3 EQU 2048 - 4 ; # of blocks in Second Partition (1022 trks)
|
||||
;
|
||||
DPB53: DEFW 64 ; Scts/Trk
|
||||
DEFB 5 ; Blk Shf Fctr
|
||||
DEFB 31 ; Block Mask
|
||||
DEFB 1 ; Extent Mask
|
||||
DEFW HSIZ3-1 ; Disk Size-1
|
||||
DEFW 511 ; Dir Max-1 4 blocks
|
||||
DEFB 0F0H,0 ; Alloc 0,1
|
||||
DEFW 1024-1 ; Dir Max-1
|
||||
DEFB 0FFH,0 ; Alloc 0,1
|
||||
DEFW 0 ; Check size
|
||||
DEFW (1+3*65)*16 ; Track offset = 3136
|
||||
DEFW 128+(1024*3)+2 ; Trk Offset
|
||||
ENDIF
|
||||
;
|
||||
;.....
|
||||
@@ -307,17 +303,17 @@ DPB53: DEFW 64 ; Scts/Trk
|
||||
; sectors per track
|
||||
DEFB 0 ; Physical tracks/side (No Meaning in HD)
|
||||
|
||||
HSIZ4 EQU 2048 ; # of blocks in first Partition (1024 trks)
|
||||
HSIZ4 EQU 2048 - 4 ; # of blocks in Second Partition (1022 trks)
|
||||
;
|
||||
DPB54: DEFW 64 ; Sctrs/Trk
|
||||
DEFB 5 ; Blk Shf Fctr
|
||||
DEFB 31 ; Block Mask
|
||||
DEFB 1 ; Extent Mask
|
||||
DEFW HSIZ4-1 ; Disk Size - 1
|
||||
DEFW 511 ; Dir Max-1 4 blocks
|
||||
DEFB 0F0H,0 ; Alloc 0,1
|
||||
DEFW 1024-1 ; Dir Max-1
|
||||
DEFB 0FFH,0 ; Alloc 0,1
|
||||
DEFW 0 ; Check size
|
||||
DEFW (1+4*65)*16 ; Track offset = 16
|
||||
DEFW 128+(1024*4)+2 ; Trk Offset
|
||||
ENDIF
|
||||
;
|
||||
;.....
|
||||
@@ -334,17 +330,17 @@ DPB54: DEFW 64 ; Sctrs/Trk
|
||||
; sectors per track
|
||||
DEFB 0 ; Physical tracks/side (No Meaning in HD)
|
||||
|
||||
HSIZ5 EQU 2048 ; # of blocks in Second Partition (1024 trks)
|
||||
HSIZ5 EQU 2048 - 4 ; # of blocks in Second Partition (1022 trks)
|
||||
;
|
||||
DPB55: DEFW 64 ; Sctrs/Trk - actually 256
|
||||
DEFB 5 ; Blk Shf Fctr
|
||||
DEFB 31 ; Block Mask
|
||||
DEFB 1 ; Extent Mask
|
||||
DEFW HSIZ5-1 ; Disk Size-1
|
||||
DEFW 511 ; Dir Max-1
|
||||
DEFB 0F0H,0 ; Alloc 0,1 - 4 blocks
|
||||
DEFW 1024-1 ; Dir Max-1
|
||||
DEFB 0FFH,0 ; Alloc 0,1
|
||||
DEFW 0 ; Check Size
|
||||
DEFW (1+5*65)*16 ; Trk Offset = 1056
|
||||
DEFW 128+(1024*5)+2 ; Trk Offset
|
||||
ENDIF
|
||||
;
|
||||
;.....
|
||||
@@ -361,17 +357,17 @@ DPB55: DEFW 64 ; Sctrs/Trk - actually 256
|
||||
; sectors per track
|
||||
DEFB 0 ; Physical tracks/side (No Meaning in HD)
|
||||
|
||||
HSIZ6 EQU 2048 ; # of blocks in third Partition (1024 tracks)
|
||||
HSIZ6 EQU 2048 - 4 ; # of blocks in Second Partition (1022 trks)
|
||||
;
|
||||
DPB56: DEFW 64 ; Scts/Trk
|
||||
DEFB 5 ; Blk Shf Fctr
|
||||
DEFB 31 ; Block Mask
|
||||
DEFB 1 ; Extent Mask
|
||||
DEFW HSIZ6-1 ; Disk Size-1
|
||||
DEFW 511 ; Dir Max-1 4 blocks
|
||||
DEFB 0F0H,0 ; Alloc 0,1
|
||||
DEFW 1024-1 ; Dir Max-1
|
||||
DEFB 0FFH,0 ; Alloc 0,1
|
||||
DEFW 0 ; Check size
|
||||
DEFW (1+6*65)*16 ; Track offset = 2096
|
||||
DEFW 128+(1024*6)+2 ; Trk Offset
|
||||
ENDIF
|
||||
|
||||
;.....
|
||||
@@ -388,17 +384,17 @@ DPB56: DEFW 64 ; Scts/Trk
|
||||
; sectors per track
|
||||
DEFB 0 ; Physical tracks/side (No Meaning in HD)
|
||||
|
||||
HSIZ7 EQU 2048 ; # of blocks in Fourth Partition (1024 tracks)
|
||||
HSIZ7 EQU 2048 - 4 ; # of blocks in Second Partition (1022 trks)
|
||||
;
|
||||
DPB57: DEFW 64 ; Scts/Trk
|
||||
DEFB 5 ; Blk Shf Fctr
|
||||
DEFB 31 ; Block Mask
|
||||
DEFB 1 ; Extent Mask
|
||||
DEFW HSIZ7-1 ; Disk Size-1
|
||||
DEFW 511 ; Dir Max-1 4 blocks
|
||||
DEFB 0F0H,0 ; Alloc 0,1
|
||||
DEFW 1024-1 ; Dir Max-1
|
||||
DEFB 0FFH,0 ; Alloc 0,1
|
||||
DEFW 0 ; Check size
|
||||
DEFW (1+7*65)*16 ; Track offset = 3136
|
||||
DEFW 128+(1024*7)+2 ; Trk Offset
|
||||
ENDIF
|
||||
;
|
||||
;.....
|
||||
@@ -414,17 +410,18 @@ DPB57: DEFW 64 ; Scts/Trk
|
||||
; even though real layout is 256 physical
|
||||
; sectors per track
|
||||
DEFB 0 ; Physical tracks/side (No Meaning in HD)
|
||||
HSIZ8 EQU 2048 ; # of blocks in first Partition (1024 trks)
|
||||
|
||||
HSIZ8 EQU 2048 - 4 ; # of blocks in Second Partition (1022 trks)
|
||||
;
|
||||
DPB58: DEFW 64 ; Sctrs/Trk
|
||||
DEFB 5 ; Blk Shf Fctr
|
||||
DEFB 31 ; Block Mask
|
||||
DEFB 1 ; Extent Mask
|
||||
DEFW HSIZ8-1 ; Disk Size-1
|
||||
DEFW 511 ; Dir Max-1 - 4 blocks
|
||||
DEFB 0F0H,0 ; Alloc 0,1 - 4 blocks
|
||||
DEFW 1024-1 ; Dir Max-1
|
||||
DEFB 0FFH,0 ; Alloc 0,1
|
||||
DEFW 0 ; Check Size
|
||||
DEFW 16 ; Trk Offset
|
||||
DEFW 128+(1024*0)+2 ; Trk Offset
|
||||
ENDIF
|
||||
;
|
||||
;.....
|
||||
@@ -441,17 +438,17 @@ DPB58: DEFW 64 ; Sctrs/Trk
|
||||
; sectors per track
|
||||
DEFB 0 ; Physical tracks/side (No Meaning in HD)
|
||||
|
||||
HSIZ9 EQU 2048 ; # of blocks in Second Partition (1024 trks)
|
||||
HSIZ9 EQU 2048 - 4 ; # of blocks in Second Partition (1022 trks)
|
||||
;
|
||||
DPB59: DEFW 64 ; Scts/Trk
|
||||
DEFB 5 ; Blk Shf Fctr
|
||||
DEFB 31 ; Block Mask
|
||||
DEFB 1 ; Extent Mask
|
||||
DEFW HSIZ9-1 ; Disk Size-1
|
||||
DEFW 511 ; Dir Max-1 4 blocks
|
||||
DEFB 0F0H,0 ; Alloc 0,1
|
||||
DEFW 1024-1 ; Dir Max-1
|
||||
DEFB 0FFH,0 ; Alloc 0,1
|
||||
DEFW 0 ; Check size
|
||||
DEFW (1+65)*16 ; Track offset 1056
|
||||
DEFW 128+(1024*1)+2 ; Trk Offset
|
||||
ENDIF
|
||||
;
|
||||
;.....
|
||||
@@ -468,17 +465,17 @@ DPB59: DEFW 64 ; Scts/Trk
|
||||
; sectors per track
|
||||
DEFB 0 ; Physical tracks/side (No Meaning in HD)
|
||||
|
||||
HSIZ10 EQU 2048 ; # of blocks in Second Partition (1024 trks)
|
||||
HSIZ10 EQU 2048 - 4 ; # of blocks in Second Partition (1022 trks)
|
||||
;
|
||||
DPB60: DEFW 64 ; Scts/Trk
|
||||
DEFB 5 ; Blk Shf Fctr
|
||||
DEFB 31 ; Block Mask
|
||||
DEFB 1 ; Extent Mask
|
||||
DEFW HSIZ10 ; Disk Size-1
|
||||
DEFW 511 ; Dir Max-1 4 blocks
|
||||
DEFB 0F0H,0 ; Alloc 0,1
|
||||
DEFW HSIZ10-1 ; Disk Size-1
|
||||
DEFW 1024-1 ; Dir Max-1
|
||||
DEFB 0FFH,0 ; Alloc 0,1
|
||||
DEFW 0 ; Check size
|
||||
DEFW (1+2*65)*16 ; Track offset 2096
|
||||
DEFW 128+(1024*2)+2 ; Trk Offset
|
||||
ENDIF
|
||||
;
|
||||
;.....
|
||||
@@ -492,18 +489,17 @@ DPB60: DEFW 64 ; Scts/Trk
|
||||
DEFB 16 ; Logical Sectors per track
|
||||
DEFB 0 ; Physical tracks/side (No Meaning in HD)
|
||||
|
||||
HSIZ11 EQU 2048 ; # of blocks in Forth Logical Drive
|
||||
; (1024 tracks)
|
||||
HSIZ11 EQU 2048 - 4 ; # of blocks in Second Partition (1022 trks)
|
||||
|
||||
DPB61: DEFW 64 ; Scts/Trk
|
||||
DEFB 5 ; Blk Shf Fctr
|
||||
DEFB 31 ; Block Mask
|
||||
DEFB 1 ; Extent Mask
|
||||
DEFW HSIZ11-1 ; Disk Size-1
|
||||
DEFW 511 ; Dir Max-1
|
||||
DEFB 0F0H,0 ; Alloc 0,1
|
||||
DEFW 1024-1 ; Dir Max-1
|
||||
DEFB 0FFH,0 ; Alloc 0,1
|
||||
DEFW 0 ; Check size
|
||||
DEFW (1+3*65)*16 ; Track offset 3136
|
||||
DEFW 128+(1024*3)+2 ; Trk Offset
|
||||
ENDIF
|
||||
|
||||
;=========== End of Hard Disk DPBs ===========
|
||||
|
||||
@@ -9,10 +9,11 @@
|
||||
; 1.0 - 31 Aug 92 - General Release. HFB
|
||||
; 0.1 - 3 Jan 92 - Initial release. HFB
|
||||
;:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
|
||||
; The Physical Drive Number byte (XDPH+3) is simply an index to the Physical
|
||||
; Drive as specified in the ICFG-xx.Z80 file. Up to three physical drives
|
||||
; may be defined in that section, the first byte of which defines the
|
||||
; Physical/Logical Unit Address (Device & LUN for SCSI, Master/Slave for IDE),
|
||||
; The Logical Drive Number byte (XDPH+3) is simply an index into the
|
||||
; BPBIOS physical drive table as specified in the ICFG-xx.Z80 file.
|
||||
; BPBIOS supports exactly three logical drives which
|
||||
; are defined in that section, the first byte of which defines the
|
||||
; Physical Unit (HBIOS Disk Unit)
|
||||
; and a flag bit to specify whether or not the drive is physically present.
|
||||
; See ICFG-xx.Z80 for a definition of the data.
|
||||
|
||||
@@ -21,7 +22,7 @@
|
||||
|
||||
XDPH90: DEFB TRUE ; Format lock flag (Lock RAM Drive)
|
||||
DEFB FIXDSK ; Disk Drive Type
|
||||
DEFB 2 ; Driver ID = Treat as Hard Drive
|
||||
DEFB 3 ; Driver ID = Treat as Hard Drive
|
||||
DEFB HB_MDRAM ; Physical Drive Number
|
||||
DPH$90: DEFW 0 ; Skew Table pointer
|
||||
DEFW 0,0,0 ; Scratch area
|
||||
@@ -34,7 +35,7 @@ DPH$90: DEFW 0 ; Skew Table pointer
|
||||
|
||||
XDPH91: DEFB TRUE ; Format lock flag (Lock ROM Drive)
|
||||
DEFB FIXDSK ; Disk Drive Type
|
||||
DEFB 2 ; Driver ID = Treat as Hard Drive
|
||||
DEFB 3 ; Driver ID = Treat as Hard Drive
|
||||
DEFB HB_MDROM ; Physical Drive Number
|
||||
DPH$91: DEFW 0 ; Skew Table pointer
|
||||
DEFW 0,0,0 ; Scratch area
|
||||
@@ -48,7 +49,7 @@ DPH$91: DEFW 0 ; Skew Table pointer
|
||||
XDPH50: DEFB TRUE ; Format lock flag (Lock First Hard Drive)
|
||||
DEFB FIXDSK ; Disk drive type
|
||||
DEFB 2 ; Driver ID - 2=hard drive
|
||||
DEFB HB_HDDEV0 ; Physical drive [0..6] for this Partition
|
||||
DEFB 0 ; Logical drive [0..2] for this Partition
|
||||
DPH$50: DEFW 0 ; Skew table pointer
|
||||
DEFW 0,0,0 ; Scratch area
|
||||
DEFW DIRBUF ; Directory buffer pointer
|
||||
@@ -61,7 +62,7 @@ DPH$50: DEFW 0 ; Skew table pointer
|
||||
XDPH51: DEFB TRUE ; --- Second Hard Drive/Partition
|
||||
DEFB FIXDSK ; Disk drive type
|
||||
DEFB 2 ; Driver ID - 2=hard drive
|
||||
DEFB HB_HDDEV0 ; Physical drive [0..6] for this Partition
|
||||
DEFB 0 ; Logical drive [0..2] for this Partition
|
||||
DPH$51: DEFW 0
|
||||
DEFW 0,0,0
|
||||
DEFW DIRBUF
|
||||
@@ -74,7 +75,7 @@ DPH$51: DEFW 0
|
||||
XDPH52: DEFB TRUE ; --- Third Hard Drive/Partition
|
||||
DEFB FIXDSK ; Disk drive type
|
||||
DEFB 2 ; Driver ID - 2=hard drive
|
||||
DEFB HB_HDDEV0 ; Physical drive [0..2] for this Partition
|
||||
DEFB 0 ; Physical drive [0..2] for this Partition
|
||||
DPH$52: DEFW 0
|
||||
DEFW 0,0,0
|
||||
DEFW DIRBUF
|
||||
@@ -87,7 +88,7 @@ DPH$52: DEFW 0
|
||||
XDPH53: DEFB TRUE ; --- Fourth Hard Drive/Partition
|
||||
DEFB FIXDSK ; Disk drive type
|
||||
DEFB 2 ; Driver ID - 2=hard drive
|
||||
DEFB HB_HDDEV0 ; Physical drive [0..6] for this Partition
|
||||
DEFB 0 ; Logical drive [0..2] for this Partition
|
||||
DPH$53: DEFW 0
|
||||
DEFW 0,0,0
|
||||
DEFW DIRBUF
|
||||
@@ -100,7 +101,7 @@ DPH$53: DEFW 0
|
||||
XDPH54: DEFB TRUE ; --- Fifth Hard Drive/Partition
|
||||
DEFB FIXDSK ; Disk drive type
|
||||
DEFB 2 ; Driver ID - 2=hard drive
|
||||
DEFB HB_HDDEV0 ; Physical drive [0..6] for this Partition
|
||||
DEFB 0 ; Logical drive [0..2] for this Partition
|
||||
DPH$54: DEFW 0
|
||||
DEFW 0,0,0
|
||||
DEFW DIRBUF
|
||||
@@ -113,7 +114,7 @@ DPH$54: DEFW 0
|
||||
XDPH55: DEFB TRUE ; --- Sixth Hard Drive/Partition
|
||||
DEFB FIXDSK ; Disk drive type
|
||||
DEFB 2 ; Driver ID - 2=hard drive
|
||||
DEFB HB_HDDEV0 ; Physical drive [0..6] for this Partition
|
||||
DEFB 0 ; Logical drive [0..2] for this Partition
|
||||
DPH$55: DEFW 0
|
||||
DEFW 0,0,0
|
||||
DEFW DIRBUF
|
||||
@@ -126,7 +127,7 @@ DPH$55: DEFW 0
|
||||
XDPH56: DEFB TRUE ; --- Seventh Hard Drive/Partition
|
||||
DEFB FIXDSK ; Disk drive type
|
||||
DEFB 2 ; Driver ID - 2=hard drive
|
||||
DEFB HB_HDDEV0 ; Physical drive [0..6] for this Partition
|
||||
DEFB 0 ; Logical drive [0..2] for this Partition
|
||||
DPH$56: DEFW 0
|
||||
DEFW 0,0,0
|
||||
DEFW DIRBUF
|
||||
@@ -139,7 +140,7 @@ DPH$56: DEFW 0
|
||||
XDPH57: DEFB TRUE ; --- Eighth Hard Drive/Partition
|
||||
DEFB FIXDSK ; Disk drive type
|
||||
DEFB 2 ; Driver ID - 2=hard drive
|
||||
DEFB HB_HDDEV0 ; Physical drive [0..6] for this Partition
|
||||
DEFB 0 ; Logical drive [0..2] for this Partition
|
||||
DPH$57: DEFW 0
|
||||
DEFW 0,0,0
|
||||
DEFW DIRBUF
|
||||
@@ -152,7 +153,7 @@ DPH$57: DEFW 0
|
||||
XDPH58: DEFB TRUE ; --- Ninth Hard Drive/Partition
|
||||
DEFB FIXDSK ; Disk drive type
|
||||
DEFB 2 ; Driver ID - 2=hard drive
|
||||
DEFB HB_HDDEV1 ; Physical drive [0..6] for this Partition
|
||||
DEFB 1 ; Logical drive [0..2] for this Partition
|
||||
DPH$58: DEFW 0
|
||||
DEFW 0,0,0
|
||||
DEFW DIRBUF
|
||||
@@ -165,7 +166,7 @@ DPH$58: DEFW 0
|
||||
XDPH59: DEFB TRUE ; --- Tenth Hard Drive/Partition
|
||||
DEFB FIXDSK ; Disk drive type
|
||||
DEFB 2 ; Driver ID - 2=hard drive
|
||||
DEFB HB_HDDEV1 ; Physical drive [0..6] for this Partition
|
||||
DEFB 1 ; Logical drive [0..2] for this Partition
|
||||
DPH$59: DEFW 0
|
||||
DEFW 0,0,0
|
||||
DEFW DIRBUF
|
||||
@@ -178,7 +179,7 @@ DPH$59: DEFW 0
|
||||
XDPH60: DEFB TRUE ; --- Eleventh Hard Drive/Partition
|
||||
DEFB FIXDSK ; Disk drive type
|
||||
DEFB 2 ; Driver ID - 2=hard drive
|
||||
DEFB HB_HDDEV1 ; Physical drive [0..6] for this Partition
|
||||
DEFB 1 ; Logical drive [0..2] for this Partition
|
||||
DPH$60: DEFW 0
|
||||
DEFW 0,0,0
|
||||
DEFW DIRBUF
|
||||
@@ -191,7 +192,7 @@ DPH$60: DEFW 0
|
||||
XDPH61: DEFB TRUE ; --- Twelveth Hard Drive/Partition
|
||||
DEFB FIXDSK ; Disk drive type
|
||||
DEFB 2 ; Driver ID - 2=hard drive
|
||||
DEFB HB_HDDEV1 ; Physical drive [0..6] for this Partition
|
||||
DEFB 1 ; Logical drive [0..2] for this Partition
|
||||
DPH$61: DEFW 0
|
||||
DEFW 0,0,0
|
||||
DEFW DIRBUF
|
||||
|
||||
@@ -104,15 +104,69 @@ SELHD: ; SET DEVICE
|
||||
; Writes from HSTBUF using HSTTRK and HSTSEC to build Block Number.
|
||||
; NOTE: This routine uses physical drive characteristics from ICFG-xx.
|
||||
|
||||
HDWRIT:
|
||||
HDWRIT:
|
||||
; CALL PRTSTRD
|
||||
; DEFB '[HD WRITE]$'
|
||||
|
||||
XOR A
|
||||
LD (HSTWRT),A ; Show no active writes pending
|
||||
JP HDSK_WRITE ; ..continue
|
||||
|
||||
LD B,HB_DIOWRITE ; HBIOS WRITE
|
||||
JR HDIO ; ..continue
|
||||
|
||||
;::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
|
||||
; Read from Hard Disk Drive < Internal BIOS Routine >
|
||||
; Reads to HSTBUF using HSTTRK and HSTSEC to build Block Number.
|
||||
|
||||
HDREAD:
|
||||
; CALL PRTSTRD ; DEBUG
|
||||
; DEFB '[HD READ]$' ; DEBUG
|
||||
|
||||
LD B,HB_DIOREAD ; HBIOS READ
|
||||
JR HDIO ; ..continue
|
||||
|
||||
;::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
|
||||
; Common read/write code for hard disk
|
||||
|
||||
HDIO:
|
||||
LD HL,(HSTDPH) ; GET ACTIVE DPH POINTER
|
||||
DEC HL ; ADJUST TO POINT TO BPBIOS LOGICAL UNIT NUMBER
|
||||
LD A,(HL) ; LOAD IT IN A
|
||||
;
|
||||
; Convert logical -> physical
|
||||
; Code below is ugly brute force approach, but since there are
|
||||
; always exactly 3 logical drives in BPBIOS and the first one
|
||||
; is the most commonly used, this turns out to be reasonably
|
||||
; efficient.
|
||||
LD HL,HDRV0 ; PERHAPS HDRV0
|
||||
OR A ; A == 0?
|
||||
JR Z,HDSK_HDIO1 ; HANDLE IF SO
|
||||
LD HL,HDRV1 ; PERHAPS HDRV1
|
||||
DEC A ; A == 1?
|
||||
JR Z,HDSK_HDIO1 ; HANDLE IF SO
|
||||
LD HL,HDRV2 ; PERHAPS HDRV2
|
||||
DEC A ; A == 2?
|
||||
JR Z,HDSK_HDIO1 ; HANDLE IF SO
|
||||
CALL PANIC ; INVALID LOGICAL UNIT NUMBER
|
||||
HDSK_HDIO1:
|
||||
LD A,(HL) ; LOAD PHYS UNIT NUM (HBIOS DISK UNIT)
|
||||
AND 0FH ; REMOVE EXTRANEOUS BITS
|
||||
LD C,A ; PUT IN C FOR BELOW
|
||||
JR HB_DSKIO
|
||||
|
||||
IF BANKED
|
||||
COMMON /BANK2/
|
||||
ELSE
|
||||
CSEG
|
||||
ENDIF
|
||||
;
|
||||
;==================================================================================================
|
||||
; HBIOS Disk Driver Interface
|
||||
;==================================================================================================
|
||||
;
|
||||
; Enter with B=HBIOS disk function code (read/write)
|
||||
; C=HBIOS disk unit number
|
||||
;
|
||||
; NOTE: This routine uses physical drive characteristics from ICFG-xx.
|
||||
; The routine computes a sequential block number with the algorithm;
|
||||
; Trk * 16 + Sector, HBIOS uses LBA addressing for hard drive like
|
||||
@@ -127,43 +181,8 @@ HDWRIT:
|
||||
; Sector := (Block# MOD hdSPT)+1 (* Quotient1 := Block# DIV hdSPT *)
|
||||
; Head := Quotient1 MOD hdHds (* Quotient2 := Quotient1 DIV hdHds *)
|
||||
; Track := Quotient2
|
||||
;::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
|
||||
|
||||
HDREAD:
|
||||
JP HDSK_READ
|
||||
|
||||
IF BANKED
|
||||
COMMON /BANK2/
|
||||
ELSE
|
||||
CSEG
|
||||
ENDIF
|
||||
;
|
||||
;==================================================================================================
|
||||
; HBIOS Disk Driver Interface
|
||||
;==================================================================================================
|
||||
;
|
||||
; HBIOS disk commands
|
||||
;
|
||||
HB_DSKRD EQU 13H
|
||||
HB_DSKWR EQU 14H
|
||||
;
|
||||
HDSK_READ:
|
||||
; CALL PRTSTRD ; DEBUG
|
||||
; DEFB '[HDSK READ]$' ; DEBUG
|
||||
|
||||
LD B,HB_DSKRD ; HBIOS DISK READ (13H)
|
||||
JR HDSK_RW
|
||||
;
|
||||
HDSK_WRITE:
|
||||
; CALL PRTSTRD
|
||||
; DEFB '[HDSK WRITE]$'
|
||||
|
||||
LD B,HB_DSKWR ; HBIOS DISK WRITE (14H)
|
||||
;
|
||||
HDSK_RW:
|
||||
LD HL,(HSTDPH) ; GET ACTIVE DPH POINTER
|
||||
DEC HL ; ADJUST TO POINT TO UNIT NUMBER
|
||||
LD C,(HL) ; LOAD IT IN C FOR HBIOS CALL LATER
|
||||
HB_DSKIO:
|
||||
PUSH BC ; SAVE FUNCTION AND DEVICE FOR LATER
|
||||
LD HL,(HSTTRK) ; GET TRACK VALUE
|
||||
LD A,L ; LSB OF TRACK TO A
|
||||
@@ -172,10 +191,10 @@ HDSK_RW:
|
||||
LD A,(HSTSEC) ; GET SECTOR
|
||||
LD E,A ; STUFF IT IN E
|
||||
LD B,4 ; PREPARE TO SHIFT OUT 4 BIT HEAD VALUE
|
||||
HDSK_RW1:
|
||||
HB_DSKIO1:
|
||||
SRL H ; SHIFT ONE BIT OUT
|
||||
RR L ; ... OF HL
|
||||
DJNZ HDSK_RW1 ; DO ALL 4 BITS
|
||||
DJNZ HB_DSKIO1 ; DO ALL 4 BITS
|
||||
POP BC ; RECOVER FUNCTION AND DEVICE
|
||||
PUSH BC ; SAVE INCOMING FUNCTION, DEVICE/UNIT
|
||||
LD B,12H ; SETUP FOR NEW SEEK CALL
|
||||
@@ -183,7 +202,6 @@ HDSK_RW1:
|
||||
POP BC ; RESTORE INCOMING FUNCTION, DEVICE/UNIT
|
||||
RET NZ ; ABORT IF SEEK RETURNED AN ERROR W/ ERROR IN A
|
||||
LD HL,(HB_DSKBUF) ; GET BUFFER ADDRESS
|
||||
;LD D,BID_HB ; BUFFER IN HBIOS BANK
|
||||
LD A,(HB_BNKBIOS) ; BUFFER IN HBIOS BANK
|
||||
LD D,A ; PUT IN D
|
||||
LD E,1 ; ONE SECTOR
|
||||
@@ -193,17 +211,3 @@ HDSK_RW1:
|
||||
|
||||
OR 0FFH ; A=$FF TO SIGNAL ERROR
|
||||
RET ; AND DONE W/ ERROR
|
||||
;
|
||||
;==================================================================================================
|
||||
; HDSK DISK DRIVER - DATA
|
||||
;==================================================================================================
|
||||
;
|
||||
IF BANKED
|
||||
COMMON /B2RAM/
|
||||
ELSE
|
||||
DSEG
|
||||
ENDIF
|
||||
|
||||
HDSK_PDN DEFS 1 ; PHYSICAL DEVICE
|
||||
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
HBF_ALLOC EQU 0F6H ; HBIOS Func: ALLOCATE Heap Memory
|
||||
HBF_PEEK EQU 0FAH ; HBIOS Func: Peek Byte
|
||||
HBF_POKE EQU 0FBH ; HBIOS Func: Poke Byte
|
||||
HBF_SYSRES_INT EQU 0F000H ; HBIOS Func: Internal Reset
|
||||
HBF_MEMINFO EQU 0F8F1H ; HBIOS Func: Get Memory Info
|
||||
HBF_BNKINFO EQU 0F8F2H ; HBIOS Func: Get Bank Info
|
||||
;
|
||||
@@ -26,6 +27,11 @@ HBX_SRCBNK EQU 0FFE4H
|
||||
HBX_DSTADR EQU 0FFE5H
|
||||
HBX_DSTBNK EQU 0FFE7H
|
||||
HBX_CPYLEN EQU 0FFE8H
|
||||
;
|
||||
; HBIOS disk commands
|
||||
;
|
||||
HB_DIOREAD EQU 13H
|
||||
HB_DIOWRITE EQU 14H
|
||||
|
||||
CSEG
|
||||
|
||||
@@ -43,22 +49,23 @@ HBX_CPYLEN EQU 0FFE8H
|
||||
; call here, make required changes, then update the
|
||||
; BIOSJT to point directly to the normal SELMEM routine for
|
||||
; all subsequent calls.
|
||||
;
|
||||
; When called, the incoming bank id will be the original hard-coded
|
||||
; bank id prior to any adjustments. These original bank id's are
|
||||
; coded to be an offset from the ending HBIOS RAM bank id which
|
||||
; is (80h + RAM banks). See romwbw.lib. We update the requested
|
||||
; bank id for this initial call to make it the proper absolute
|
||||
; HBIOS bank id.
|
||||
;
|
||||
; See romwbw.lib for additional RAM bank layout information.
|
||||
|
||||
; BPBIOS HBIOS Typical
|
||||
; ------------ -------------- --------------
|
||||
; -1: <COMMON> BID_COM 90h - 1 = 8Fh
|
||||
; -2: TPABNK BID_USR 90h - 2 = 8Eh
|
||||
; -3: <HBIOS> BID_BIOS 90h - 3 = 8Dh
|
||||
; -4: SYSBNK BID_AUX 90h - 4 = 8Ch
|
||||
; -9: BNKM BID_AUX-5 90h - 9 = 87h
|
||||
; -16: RAMBNK RAMD0 90h - 16 = 80h
|
||||
|
||||
HB_SELMEM:
|
||||
PUSH AF
|
||||
PUSH BC
|
||||
PUSH DE
|
||||
PUSH HL
|
||||
|
||||
PUSH AF ; Save incoming bank request
|
||||
|
||||
IF HB_DEBUG AND FALSE
|
||||
CALL PRTSTRD
|
||||
DEFB '[HB_SELMEM: $'
|
||||
@@ -68,23 +75,30 @@ HB_SELMEM:
|
||||
ENDIF
|
||||
|
||||
LD BC,HBF_BNKINFO ; HBIOS BNKINFO function
|
||||
CALL HBX_INVOKE ; DO IT, D=BID_BIOS, E=BID_USER
|
||||
LD A,D ; BID_BIOS
|
||||
LD (HB_BNKBIOS),A ; SET HB_BNKBIOS
|
||||
ADD A,3 ; HBIOS + 3
|
||||
LD (HB_BNKEND),A ; ... is the ending RAM bank
|
||||
IF BANKED
|
||||
LD (BNKADJ+1),A ; Dynamically update SELBNK
|
||||
ENDIF
|
||||
|
||||
CALL HBX_INVOKE ; Do it, D=BIOS bank, E=USER (TPA) bank
|
||||
LD A,D ; BIOS bank
|
||||
LD (HB_BNKBIOS),A ; Save it for later (deblock & hard-ww)
|
||||
LD A,E ; USER (TPA) bank
|
||||
LD (TPABNK),A ; Update BP register
|
||||
DEC A ; SYS bank is one below USER
|
||||
LD (SYSBNK),A ; Update BP register
|
||||
DEC A ; HBIOS BUF bank is one more below
|
||||
;LD (UABNK),A ; Set BPBIOS USER bank
|
||||
LD (RAMBNK),A ; Update BP RAM disk bank register
|
||||
LD (MAXBNK),A ; Update ending bank register
|
||||
|
||||
LD HL,SELMEM ; Future SELMEM calls will
|
||||
LD (BIOSJT+(27*3)+1),HL ; ... go to real SELMEM
|
||||
|
||||
POP BC ; Recover requested bank to B
|
||||
LD A,(TPABNK) ; Get TPA bank
|
||||
ADD 2 ; Offset to ending RAM bank id
|
||||
ADD B ; Adjust for incoming request
|
||||
|
||||
POP HL
|
||||
POP DE
|
||||
POP BC
|
||||
POP AF
|
||||
JP SELMEM
|
||||
JP SELMEM ; Continue to normal SELMEM
|
||||
|
||||
;::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
|
||||
; Move Data - Possibly between banks. This resembles CP/M 3, but
|
||||
@@ -97,15 +111,10 @@ HB_SELMEM:
|
||||
;::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
|
||||
|
||||
HB_MOVE:
|
||||
PUSH HL
|
||||
LD HL,HB_BNKEND
|
||||
LD A,(HB_SRCBNK)
|
||||
ADD A,(HL) ; Adjust for HBIOS bank ids
|
||||
LD (HBX_SRCBNK),A
|
||||
LD A,(HB_DSTBNK)
|
||||
ADD A,(HL) ; Adjust for HBIOS bank ids
|
||||
LD (HBX_DSTBNK),A
|
||||
POP HL
|
||||
CALL HBX_BNKCPY
|
||||
PUSH HL
|
||||
LD HL,(TPABNK) ; Get TPA Bank #
|
||||
@@ -141,6 +150,5 @@ HB_XMOVE:
|
||||
HB_SRCBNK: DEFS 1 ; Move Source Bank #
|
||||
HB_DSTBNK: DEFS 1 ; Move Destination Bank #
|
||||
HB_BNKBIOS: DEFS 1 ; Bank id of HBIOS bank
|
||||
HB_BNKEND: DEFS 1 ; End of available RAM banks (last bank + 1)
|
||||
HB_DSKBUF: DEFS 2 ; Address of physical disk buffer in HBIOS bank
|
||||
|
||||
@@ -115,10 +115,22 @@ SELMEM: LD (USRBNK),A ; Update user bank
|
||||
; Must preserve all Registers including Flags.
|
||||
; All Bank Switching MUST be done by this routine
|
||||
;::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
|
||||
;
|
||||
; Parameter to BNKADJ (ADD) is set dynamically at initialization.
|
||||
|
||||
SELBNK: PUSH AF ; Save regs
|
||||
SELBN0: LD (CURBNK),A ; Save as current bank #
|
||||
BNKADJ: ADD A,90H ; Adjust for HBIOS bank ids
|
||||
|
||||
IF HB_DEBUG AND FALSE
|
||||
|
||||
CALL PRTSTRD
|
||||
DEFB '[SELBNK: $'
|
||||
CALL PRTHEXBYTE
|
||||
CALL PRTSTRD
|
||||
DEFB ']$'
|
||||
|
||||
ENDIF
|
||||
|
||||
CALL HBX_BNKSEL
|
||||
POP AF ; restore regs
|
||||
RET
|
||||
@@ -172,7 +184,7 @@ FRGETB:
|
||||
PUSH BC ; Save BC
|
||||
PUSH DE ; Save DE
|
||||
LD B,0FAH ; HBIOS Peek function
|
||||
LD D,C ; Bank in D
|
||||
LD D,C
|
||||
CALL HBX_INVOKE ; Do it
|
||||
LD A,E ; Value to A
|
||||
POP DE ; Restore DE
|
||||
@@ -203,8 +215,8 @@ FRPUTB:
|
||||
PUSH BC ; Save BC
|
||||
PUSH DE ; Save DE
|
||||
LD B,0FBH ; HBIOS Poke function
|
||||
LD D,C ; Bank in D
|
||||
LD E,A ; Value in E
|
||||
LD D,C
|
||||
CALL HBX_INVOKE ; Do it
|
||||
POP DE ; Restore DE
|
||||
POP BC ; Restore BC
|
||||
|
||||
@@ -11,9 +11,8 @@
|
||||
COMMON /BANK2/
|
||||
ENDIF
|
||||
|
||||
; This module creates a RAM Drive using the available memory (if available)
|
||||
; above the TPA and possible System banks. For a banked system, the minimum
|
||||
; needed is a 64k Main TPA and a 32k System Bank.
|
||||
; This module implements the HBIOS RAM disk driver by using the
|
||||
; RomWBW disk interface.
|
||||
|
||||
;.....
|
||||
; Select the RAM Drive. This routine performs any setup required in a select.
|
||||
@@ -22,70 +21,28 @@ SELRAM: JP SETPARMS ; No action locally.
|
||||
|
||||
;.....
|
||||
; Read a 128-byte logical sector from the RAM Drive to main memory.
|
||||
; This routine uses the HSTxxx values from the base BIOS routines.
|
||||
|
||||
RAMRD: OR 0FFH ; Set Read flag (non-0)
|
||||
JR RamRW ; ..go to common code
|
||||
RAMRD:
|
||||
LD B,HB_DIOREAD ; HBIOS READ
|
||||
JR RAMIO ; READ/WRITE COMMON CODE
|
||||
|
||||
;.....
|
||||
; Write a 128-byte logical sector from main memory to the RAM Drive.
|
||||
; This routine uses the HSTxxx values from the base BIOS routines.
|
||||
|
||||
RAMWR: XOR A ; Set Write flag with 0, Read w/AFH
|
||||
RAMWR:
|
||||
XOR A ; Set Write flag with 0, Read w/AFH
|
||||
LD (HSTWRT),A ; clear pending write flag
|
||||
;..fall thru to common code..
|
||||
;
|
||||
LD B,HB_DIOWRITE ; HBIOS WRITE
|
||||
JR RAMIO ; READ/WRITE COMMON CODE
|
||||
|
||||
; The following performs calculations for the proper address and bank, sets
|
||||
; the DMA block and executes the Move to/from the Host Buffer.
|
||||
|
||||
RamRW:
|
||||
PUSH AF ; Save R/W flag for later
|
||||
; BUILD TOTAL BYTE OFFSET INTO A:HL
|
||||
XOR A,A ; A STARTS OUT ZERO
|
||||
LD HL,(HSTTRK) ; HL STARTS WITH TRACK NUM
|
||||
LD H,0 ; ONLY LSB IS NEEDED (INIRAMD PASSES INVALID MSB)
|
||||
LD B,5 ; MULT BY 32 SECTORS PER TRACK
|
||||
RAMWR1:
|
||||
ADD HL,HL ; DOUBLE VALUE
|
||||
ADC A,A ; ... INCLUDING A WITH CARRY
|
||||
DJNZ RAMWR1 ; LOOP 5 TIMES FOR MULT BY 32
|
||||
LD DE,(HSTSEC) ; SECTOR VALUE TO 3 (ONE BYTE)
|
||||
LD D,0 ; CLEAR MSB SINCE HSTSEC IS JUST ONE BYTE
|
||||
ADD HL,DE ; ADD TO WORKING VALUE
|
||||
ADC A,0 ; HANDLE POSSIBLE CARRY
|
||||
LD B,7 ; MULT BY 128 BYTES PER SECTOR
|
||||
RAMWR2:
|
||||
ADD HL,HL ; DOUBLE VALUE
|
||||
ADC A,A ; ... INCLUDING A WITH CARRY
|
||||
DJNZ RAMWR2 ; LOOP 7 TIME FOR MULT BY 128
|
||||
; CONVERT BYTE OFFSET IN A:HL TO BANK(A):OFFSET(HL)
|
||||
SLA H ; ROTATE HIGH BIT OF H INTO CF
|
||||
RL A ; ROTATE CF INTO LOW BIT OF A
|
||||
SRL H ; FIX H (ROTATE BACK W/ ZERO INTO HIGH BIT)
|
||||
; ADJUST FOR STARTING RAM BANK
|
||||
LD C,A ; BANK TO C
|
||||
LD A,(RAMBNK) ; GET STARTING RAM BANK NUM
|
||||
ADD A,C ; COMBINE TO GET ACTUAL SOURCE BANK NUM
|
||||
; SETUP FOR INTERBANK COPY
|
||||
LD C,A ; SOURCE BANK TO C
|
||||
LD B,BID_HB ; DEST BANK TO B (HSTBUF IN HBIOS)
|
||||
;LD A,(HB_BNKBIOS) ; DEST BANK (HSTBUF IN HBIOS)
|
||||
;LD B,A ; PUT IN B
|
||||
LD DE,(HB_DSKBUF) ; DEST ADDRESS TO DE; HL ALREADY HAS SOURCE ADDRESS
|
||||
; REVERSE VALUES IF WRITE
|
||||
POP AF ; Read or Write?
|
||||
JR NZ,RAMWR3 ; ..jump if Read
|
||||
EX DE,HL ; Else swap things around
|
||||
LD A,C
|
||||
LD C,B
|
||||
LD B,A
|
||||
RAMWR3:
|
||||
; PERFORM THE COPY
|
||||
CALL XMOVE ; SET BANKS FOR COPY
|
||||
LD BC,128 ; SET LENGTH OF COPY (ONE SECTOR)
|
||||
CALL MOVE ; DO THE COPY
|
||||
; CLEAN UP AND RETURN
|
||||
XOR A ; SIGNAL SUCCESS
|
||||
RET ; AND RETURN
|
||||
;.....
|
||||
; Common code to setup RomWBW disk access
|
||||
;
|
||||
RAMIO:
|
||||
LD HL,(HSTDPH) ; GET ACTIVE DPH PTR
|
||||
DEC HL ; ADJUST TO POINT TO BPBIOS LOGICAL UNIT
|
||||
LD C,(HL) ; USE AS HBIOS DISK UNIT NUMBER
|
||||
JP HB_DSKIO ; DO THE REST IN HARD DISK DRIVER
|
||||
|
||||
;================== End of RAM Disk Code ====================
|
||||
|
||||
@@ -27,7 +27,11 @@ HB_IODEV EQU 80H ; 0x80 is current HBIOS console
|
||||
HB_MDRAM EQU 0 ; HBIOS Disk Unit #0 is usually the RAM Disk
|
||||
HB_MDROM EQU 1 ; HBIOS Disk Unit #1 is usually the ROM Disk
|
||||
;
|
||||
; Set HB_HDDEVN to appropriate HBIOS disk device numbers
|
||||
; Map BPBIOS logical drive numbers (0-2) to HBIOS physical disk units
|
||||
; HB_HDDEVn values map to HDRVn (see icfg-ww).
|
||||
;
|
||||
; The values below will be the default mapping. They can be changed
|
||||
; using BPCNFG *Physical Drive* configuration.
|
||||
;
|
||||
; If the RomWBW system has no floppy drives, then the hard disk units
|
||||
; will start right after the memory disk units. So, the first hard disk
|
||||
@@ -48,20 +52,33 @@ DRV_P SET NO ; YES if system has flopy drives
|
||||
;
|
||||
; RAM/ROM Bank Reserve
|
||||
;
|
||||
HB_RAMRESV EQU 8 ; RAM reserve is 8 banks
|
||||
HB_RAMRESV EQU 5 ; RAM reserve is 5 banks
|
||||
HB_ROMRESV EQU 4 ; ROM reserve is 4 banks
|
||||
;
|
||||
; Layout of RAM banks
|
||||
;
|
||||
; TODO: Query system via HBIOS API to determine the actual bank
|
||||
; assignments, then adjust BPBIOS operation accordingly.
|
||||
; The BID_xxx values below are used to set the initial values of
|
||||
; the BPBIOS bank registers (see def-ww-xxx.lib and HB_SELMEM in
|
||||
; hbios.z80). The running values of the BPBIOS bank registers (TPABNK,
|
||||
; SYSBNK, etc.) are set to absolute HBIOS bank ids in hbios.z80 during
|
||||
; startup.
|
||||
;
|
||||
BID_RAMD EQU -16 ; 90h - 16 = 80h
|
||||
BID_RAMM EQU -9 ; 90h - 9 = 87h
|
||||
BID_SYS EQU -4 ; 90h - 4 = 8Ch
|
||||
BID_HB EQU -3 ; 90h - 3 = 8Dh
|
||||
BID_USR EQU -2 ; 90h - 2 = 8Eh
|
||||
BID_COM EQU -1 ; 90h - 1 = 8Fh
|
||||
; The values below are expressed as an offset from the ending HBIOS
|
||||
; RAM bank id. They map to HBIOS bank ids
|
||||
; by subtracting from the ending HBIOS bank id (N). HBIOS RAM bank ids
|
||||
; start at 80h. The ending HBIOS bank id is (80h + RAM banks). The
|
||||
; typical layout assumes 16 banks of RAM starting at HBIOS bank id 80h
|
||||
; and ending at bank id 90h (N = 90h).
|
||||
;
|
||||
; BPBIOS HBIOS (TYPICAL)
|
||||
; -------------------------------------- ---------------
|
||||
; <HBIOS> 80h (80h)
|
||||
; <RAMD> 81h (81h)
|
||||
; <RAMM> N - 5 (8Bh)
|
||||
BID_BUF EQU -4 ; BNK3 -> RAMBNK N - 4 (8Ch)
|
||||
BID_SYS EQU -3 ; BNK2 -> SYSBNK N - 3 (8Dh)
|
||||
BID_USR EQU -2 ; BNK0 -> TPABNK N - 2 (8Eh)
|
||||
BID_COM EQU -1 ; BNK1 -> N - 1 (8Fh)
|
||||
;
|
||||
HB_EI MACRO
|
||||
EI
|
||||
|
||||
@@ -115,17 +115,17 @@ DVRVCT: DEFW SELERR ; Driver 0 Select
|
||||
DEFW HDREAD ; Driver 2 Read
|
||||
DEFW HDWRIT ; Driver 2 Write
|
||||
ENDIF ; harddsk
|
||||
; IF [RAMDSK AND NOT HARDDSK]
|
||||
; DEFW SELERR ; Driver 2 Select (Dummy if No Hard Drive)
|
||||
; DEFW ISTRUE ; Driver 2 Read
|
||||
; DEFW ISTRUE ; Driver 2 Write
|
||||
; ENDIF ;ramdsk & not harddsk
|
||||
IF [RAMDSK AND NOT HARDDSK]
|
||||
DEFW SELERR ; Driver 2 Select (Dummy if No Hard Drive)
|
||||
DEFW ISTRUE ; Driver 2 Read
|
||||
DEFW ISTRUE ; Driver 2 Write
|
||||
ENDIF ;ramdsk & not harddsk
|
||||
|
||||
; IF RAMDSK
|
||||
; DEFW SELHD ; Driver 3 Select (RAM Drive)
|
||||
; DEFW HDREAD ; Driver 3 Read
|
||||
; DEFW HDWRIT ; Driver 3 Write
|
||||
; ENDIF ;ramdsk
|
||||
IF RAMDSK
|
||||
DEFW SELRAM ; Driver 3 Select (RAM Drive)
|
||||
DEFW RAMRD ; Driver 3 Read
|
||||
DEFW RAMWR ; Driver 3 Write
|
||||
ENDIF ;ramdsk
|
||||
|
||||
SELERR: LD HL,0 ; Send null DPH pointer back to caller
|
||||
RET
|
||||
|
||||
@@ -4,11 +4,13 @@ setlocal
|
||||
:: call BuildDoc || exit /b
|
||||
call BuildProp || exit /b
|
||||
call BuildShared || exit /b
|
||||
:: call BuildBP || exit /b
|
||||
call BuildBP || exit /b
|
||||
call BuildImages || exit /b
|
||||
call BuildROM %* || exit /b
|
||||
call BuildZRC || exit /b
|
||||
call BuildZ1RCC || exit /b
|
||||
call BuildZZRCC || exit /b
|
||||
call BuildZRC512 || exit /b
|
||||
|
||||
if "%1" == "dist" (
|
||||
call Clean || exit /b
|
||||
|
||||
@@ -10,6 +10,7 @@ pushd ZCPR-DJ && call Build || exit /b & popd
|
||||
pushd ZSDOS && call Build || exit /b & popd
|
||||
pushd CPM3 && call Build || exit /b & popd
|
||||
pushd ZPM3 && call Build || exit /b & popd
|
||||
pushd CPNET && call Build || exit /b & popd
|
||||
pushd pSys && call Build || exit /b & popd
|
||||
pushd Apps && call Build || exit /b & popd
|
||||
pushd Forth && call Build || exit /b & popd
|
||||
|
||||
4
Source/BuildZ1RCC.cmd
Normal file
4
Source/BuildZ1RCC.cmd
Normal file
@@ -0,0 +1,4 @@
|
||||
@echo off
|
||||
setlocal
|
||||
|
||||
pushd Z1RCC && call Build || exit /b & popd
|
||||
4
Source/BuildZRC512.cmd
Normal file
4
Source/BuildZRC512.cmd
Normal file
@@ -0,0 +1,4 @@
|
||||
@echo off
|
||||
setlocal
|
||||
|
||||
pushd ZRC512 && call Build || exit /b & popd
|
||||
@@ -13,7 +13,7 @@
|
||||
extrn @dtbl,@ctbl
|
||||
extrn @date,@hour,@min,@sec
|
||||
extrn @srch1
|
||||
extrn @hbbio
|
||||
extrn @hbbio,@hbusr
|
||||
extrn addhla
|
||||
extrn phex16, phex8
|
||||
extrn cin, cout
|
||||
@@ -46,7 +46,7 @@ tpa$bank equ 0
|
||||
; Clone page zero from bank 0 to additional banks
|
||||
ld b,2 ; last bank
|
||||
ld c,0 ; src bank
|
||||
init$2:
|
||||
init$1:
|
||||
push bc ; save bank id's
|
||||
call ?xmove ; set src/dest banks
|
||||
ld bc,0100h ; size is one page
|
||||
@@ -54,7 +54,7 @@ init$2:
|
||||
ld de,0 ; src adr is 0
|
||||
call ?move ; do it
|
||||
pop bc ; restore bank id's
|
||||
djnz init$2 ; loop till done
|
||||
djnz init$1 ; loop till done
|
||||
|
||||
endif
|
||||
|
||||
@@ -62,6 +62,35 @@ init$2:
|
||||
ld hl,signon$msg ; signon message
|
||||
call ?pmsg ; print it
|
||||
|
||||
if banked
|
||||
|
||||
; Confirm that HBIOS is configured with enough RAM banks
|
||||
; to accommodate banked version of CP/M 3. We use 2
|
||||
; additional banks which live below the user bank. So we
|
||||
; check that the these don't overlap with the RomWBW HBIOS
|
||||
; bank.
|
||||
|
||||
ld bc,0F8F2h ; HBIOS GET BNKINFO
|
||||
call 0FFF0h ; D: BIOS Bank, E: User Bank
|
||||
ld a,d
|
||||
ld (@hbbio),a
|
||||
ld a,e
|
||||
ld (@hbusr),a
|
||||
|
||||
sub 3 ; 2 extra banks (+1 for compare)
|
||||
cp d ; lowest cpm bank - hbios bank
|
||||
jr nc,init$2 ; continue if space available
|
||||
|
||||
ld hl,noram$msg ; signon message
|
||||
call ?pmsg ; print it
|
||||
|
||||
ld b,0F0h ; HBIOS system reset
|
||||
ld c,1h ; reset type warm (back to loader)
|
||||
call 0FFFFh ; do it
|
||||
|
||||
endif
|
||||
|
||||
init$2:
|
||||
; Check for HBIOS/CBIOS mismatch
|
||||
ld b,0F1h ; hbios version
|
||||
rst 08 ; do it, de=maj/min/up/pat
|
||||
@@ -731,6 +760,10 @@ clrflg db 0 ; RAM disk cleared flag
|
||||
clr$msg db 'RAM Disk Initialized',13,10,13,10,0
|
||||
vermis$msg db 7,'*** WARNING: HBIOS/CBIOS Version Mismatch ***',13,10,13,10,0
|
||||
|
||||
if banked
|
||||
noram$msg db 7,'*** ERROR: Insufficient RAM for banked CP/M 3 ***',13,10,13,10,0
|
||||
endif
|
||||
|
||||
if zpm
|
||||
|
||||
signon$msg db 13,10,'ZPM3'
|
||||
|
||||
16
Source/CPNET/Build.cmd
Normal file
16
Source/CPNET/Build.cmd
Normal file
@@ -0,0 +1,16 @@
|
||||
@echo off
|
||||
setlocal
|
||||
|
||||
set TOOLS=%~dp0..\..\Tools
|
||||
|
||||
set PATH=%TOOLS%\zxcc;%PATH%
|
||||
set CPMDIR80=%TOOLS%\cpm\
|
||||
|
||||
zxcc nulu --O -cpn12mt "-<30" --A mt011/cpnet12/*.* --L --X || exit /b
|
||||
zxcc nulu --O -cpn3mt "-<30" --A mt011/cpnet3/*.* --L --X || exit /b
|
||||
zxcc nulu --O -cpn12duo "-<30" --A duo/cpnet12/*.* --L --X || exit /b
|
||||
zxcc nulu --O -cpn3duo "-<30" --A duo/cpnet3/*.* --L --X || exit /b
|
||||
zxcc nulu --O -cpn12ser "-<30" --A serial/cpnet12/*.* --L --X || exit /b
|
||||
zxcc nulu --O -cpn3ser "-<30" --A serial/cpnet3/*.* --L --X || exit /b
|
||||
|
||||
copy *.lbr ..\..\Binary\CPNET
|
||||
4
Source/CPNET/Clean.cmd
Normal file
4
Source/CPNET/Clean.cmd
Normal file
@@ -0,0 +1,4 @@
|
||||
@echo off
|
||||
setlocal
|
||||
|
||||
if exist *.lbr del *.lbr
|
||||
19
Source/CPNET/Makefile
Normal file
19
Source/CPNET/Makefile
Normal file
@@ -0,0 +1,19 @@
|
||||
OBJECTS = cpn12mt.lbr cpn3mt.lbr cpn12duo.lbr cpn3duo.lbr cpn12ser.lbr cpn3ser.lbr
|
||||
DEST = ../../Binary/CPNET/
|
||||
TOOLS = ../../Tools
|
||||
|
||||
include $(TOOLS)/Makefile.inc
|
||||
|
||||
cpn12%.lbr: CPNETVER=cpnet12
|
||||
cpn3%.lbr: CPNETVER=cpnet3
|
||||
%mt.lbr: HWVER=mt011
|
||||
%duo.lbr: HWVER=duo
|
||||
%ser.lbr: HWVER=serial
|
||||
|
||||
%.lbr:
|
||||
rm -f $@
|
||||
$(ZXCC) NULU --O -$(*F) -\<30 --X
|
||||
for f in `ls $(HWVER)/$(CPNETVER) | sort` ; \
|
||||
do \
|
||||
$(ZXCC) NULU --O -$(*F) --A $(HWVER)/$(CPNETVER)/$$f --X ; \
|
||||
done
|
||||
@@ -6,12 +6,15 @@
|
||||
*** ***
|
||||
***********************************************************************
|
||||
|
||||
This directory contains the CP/M 2.2 client tools for CP/NET. These
|
||||
tools work only with the MT011 RCBus module.
|
||||
This directory contains the CP/M client components for CP/NET. These
|
||||
components require either the MT011 RCBus module or the Duodyne
|
||||
Disk I/O board.
|
||||
|
||||
All of these files come from Douglas Miller. Please refer to
|
||||
https://github.com/durgadas311/cpnet-z80 for more information and
|
||||
the latest source code.
|
||||
|
||||
In general, to use CP/NET on RomWBW, it is intended that you will
|
||||
copy all of these files into your user 0 directory.
|
||||
The build process packages the client files into .lbr packages
|
||||
appropriate for the hardware variations and CP/NET versions.
|
||||
|
||||
-- WBW 7:15 AM 2/11/2024
|
||||
BIN
Source/CPNET/duo/cpnet12/ccp.spr
Normal file
BIN
Source/CPNET/duo/cpnet12/ccp.spr
Normal file
Binary file not shown.
Binary file not shown.
BIN
Source/CPNET/duo/cpnet12/cpnboot.com
Normal file
BIN
Source/CPNET/duo/cpnet12/cpnboot.com
Normal file
Binary file not shown.
Binary file not shown.
BIN
Source/CPNET/duo/cpnet12/cpnetldr.com
Normal file
BIN
Source/CPNET/duo/cpnet12/cpnetldr.com
Normal file
Binary file not shown.
BIN
Source/CPNET/duo/cpnet12/ndos.spr
Normal file
BIN
Source/CPNET/duo/cpnet12/ndos.spr
Normal file
Binary file not shown.
BIN
Source/CPNET/duo/cpnet12/nvram.com
Normal file
BIN
Source/CPNET/duo/cpnet12/nvram.com
Normal file
Binary file not shown.
BIN
Source/CPNET/duo/cpnet12/snios.spr
Normal file
BIN
Source/CPNET/duo/cpnet12/snios.spr
Normal file
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user