mirror of
https://github.com/wwarthen/RomWBW.git
synced 2026-02-06 22:43:15 -06:00
Compare commits
347 Commits
v3.2.0-rc.
...
v3.5.0-dev
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3eea703d02 | ||
|
|
74daa4d3c5 | ||
|
|
0539b25046 | ||
|
|
a7e767d0b7 | ||
|
|
78a765147e | ||
|
|
1cb5f0b3b4 | ||
|
|
a34afaa11e | ||
|
|
e8d79bdf0a | ||
|
|
e5232c6696 | ||
|
|
70fcb2cbee | ||
|
|
dab2408166 | ||
|
|
d02c734478 | ||
|
|
c4cc800040 | ||
|
|
f82b4c9bc7 | ||
|
|
1db620d2d7 | ||
|
|
3b2c5b57ad | ||
|
|
69ab236d53 | ||
|
|
e7ed6ed27c | ||
|
|
5ea5003d01 | ||
|
|
7c41ef6fc9 | ||
|
|
7497e233d2 | ||
|
|
157af16d32 | ||
|
|
e0414bca05 | ||
|
|
2a6a3f36c2 | ||
|
|
337374c9e9 | ||
|
|
4946b313e1 | ||
|
|
a6505fbbb1 | ||
|
|
dd93a178fa | ||
|
|
a4fdebea2b | ||
|
|
3f63c92fd5 | ||
|
|
c8794d2b9c | ||
|
|
bf2d0b8196 | ||
|
|
e41cd6d8d2 | ||
|
|
47120dcf8c | ||
|
|
67d23dc540 | ||
|
|
99d5c50556 | ||
|
|
438df9a80b | ||
|
|
8c4a3d2b3d | ||
|
|
585c892a54 | ||
|
|
49025dca44 | ||
|
|
2d8c37307d | ||
|
|
d294fb6d09 | ||
|
|
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 | ||
|
|
b175808a92 | ||
|
|
3e86e79133 | ||
|
|
3247e67ed4 | ||
|
|
bbc84f0c2d | ||
|
|
872d51e9b6 | ||
|
|
b41f189a4c | ||
|
|
25fb2bd59e | ||
|
|
76867b8351 | ||
|
|
43745f8c90 | ||
|
|
ed4daf06a4 | ||
|
|
14cc41c3c4 | ||
|
|
0598d921bc | ||
|
|
93dcfe9610 | ||
|
|
d98547dea3 | ||
|
|
a157d9ba13 | ||
|
|
85783148be | ||
|
|
7bd930bc76 | ||
|
|
c1fa7b420a | ||
|
|
9072bc6d70 | ||
|
|
480dbe4f4c | ||
|
|
26fad23c3a | ||
|
|
883dab7e97 | ||
|
|
d3f5643791 | ||
|
|
5299d24379 | ||
|
|
a229db96a6 | ||
|
|
092e44c62e | ||
|
|
722bce819b | ||
|
|
2d470a2a90 | ||
|
|
b6700dfa4c | ||
|
|
cfc76d0659 | ||
|
|
7fce3277a0 | ||
|
|
2219e4c82d | ||
|
|
68e841e62c | ||
|
|
bb70c36b36 | ||
|
|
c391fd6d56 | ||
|
|
e69caf5059 | ||
|
|
8b7e71049b | ||
|
|
50e190c755 | ||
|
|
d0eccf026b | ||
|
|
39f796ce22 | ||
|
|
5610e79db4 | ||
|
|
e782b78b16 | ||
|
|
c0d3969244 | ||
|
|
c62af3df33 | ||
|
|
6d736996fd | ||
|
|
8bc801d0a4 | ||
|
|
2c6b7f7fb1 | ||
|
|
c3503f56d1 | ||
|
|
d4c87996f0 | ||
|
|
9f5b3a8b1c | ||
|
|
d06e1e2a5c | ||
|
|
22a0c52af3 | ||
|
|
85aa7e89c2 | ||
|
|
59d04f2446 | ||
|
|
9cc52e30d6 | ||
|
|
e1a4e815dc | ||
|
|
3c340d1ab9 | ||
|
|
138248fafc | ||
|
|
834eefb0bb | ||
|
|
7835eb5deb | ||
|
|
d1a5c66147 | ||
|
|
b184ccfb78 | ||
|
|
4776b32cd3 | ||
|
|
2bc5333f2b | ||
|
|
a5575456e2 | ||
|
|
bdb8dc020b | ||
|
|
faaba69554 | ||
|
|
0395bba4f5 | ||
|
|
14ac7a917b | ||
|
|
7a209d4053 | ||
|
|
7e5b140c2f | ||
|
|
1f1952fb19 | ||
|
|
229bdaa308 | ||
|
|
5c0894b8c1 | ||
|
|
9cefcfb0bc | ||
|
|
5d34a5c5d5 | ||
|
|
f8c800e527 | ||
|
|
b90e4d932a | ||
|
|
5457a7e7fd | ||
|
|
8f5cc510ee | ||
|
|
0475f5e853 | ||
|
|
5b7dee0689 | ||
|
|
6532f61747 | ||
|
|
4bdae4eccb | ||
|
|
efb9840b86 | ||
|
|
308a11cb32 | ||
|
|
3a7421de33 | ||
|
|
21a58397b6 | ||
|
|
9ae61806dc | ||
|
|
87ac6f07f8 | ||
|
|
1cd5313259 | ||
|
|
04c1ff04ac | ||
|
|
0e1a0afa2c | ||
|
|
5227bb68b5 | ||
|
|
fb68941768 | ||
|
|
8747ec8d02 | ||
|
|
abd939625f | ||
|
|
69716abb25 | ||
|
|
1f526d440a | ||
|
|
84374c86e6 | ||
|
|
45ea46b105 | ||
|
|
1333d6a491 | ||
|
|
b7e865dbf1 | ||
|
|
1c411f5552 | ||
|
|
364e48a5d3 | ||
|
|
63cb89dcfc | ||
|
|
6e316b46f0 | ||
|
|
3f23396536 | ||
|
|
c628ba10f2 | ||
|
|
9358299f14 | ||
|
|
d445c4a015 | ||
|
|
e32002545b | ||
|
|
7ac88efac1 | ||
|
|
9f71fe05aa | ||
|
|
ad3c533145 | ||
|
|
e43a939f54 | ||
|
|
e5b7409f44 | ||
|
|
9100f199b1 | ||
|
|
bcc50a31a9 | ||
|
|
c891ba2bad | ||
|
|
2f9e77ca13 | ||
|
|
f346209c82 | ||
|
|
0742fb6188 | ||
|
|
94239866a5 | ||
|
|
2681b84a20 | ||
|
|
b5437c56e9 | ||
|
|
f640630a06 | ||
|
|
53e201bd28 | ||
|
|
51d962aeab | ||
|
|
5f36cf9a12 | ||
|
|
d812066f2e | ||
|
|
7563863be2 | ||
|
|
9654d487ba | ||
|
|
5b339aef3e | ||
|
|
47a7d81bb9 | ||
|
|
a92c44e53f | ||
|
|
cc9f5dd516 | ||
|
|
6e34de0e02 | ||
|
|
5a6d7f853b | ||
|
|
a646f49866 | ||
|
|
98a33b8b50 | ||
|
|
8aebaab3fe | ||
|
|
798d8c3ea3 | ||
|
|
bbaf2b0714 | ||
|
|
74a8283bba | ||
|
|
e869e55252 | ||
|
|
e8a76817dc | ||
|
|
e839c77844 | ||
|
|
ada7254b84 | ||
|
|
cd96ea7e26 | ||
|
|
0098540cc9 | ||
|
|
b3e7e2ff62 | ||
|
|
582937de8e | ||
|
|
5f5953edd8 | ||
|
|
50cd6ff955 | ||
|
|
82c53bd20b | ||
|
|
0d0f5fb182 | ||
|
|
3773c9c7fa | ||
|
|
b7dc67b9c7 | ||
|
|
76c4209a5e | ||
|
|
76d9a99758 | ||
|
|
1db858027e | ||
|
|
d3fb3710ff | ||
|
|
170cecd112 | ||
|
|
f469699449 | ||
|
|
c4ff7315c9 | ||
|
|
ddbd338b6f | ||
|
|
77c6f934dc | ||
|
|
f72bf4e4c5 | ||
|
|
dcc6bd2b62 | ||
|
|
01fac79902 | ||
|
|
70d3f54834 | ||
|
|
650dcdb35f | ||
|
|
b27e14826a | ||
|
|
d2b9333288 | ||
|
|
cbd60d02d9 | ||
|
|
93a1eade2a | ||
|
|
a7ef76b9c4 | ||
|
|
d8b7f88dad |
11
.github/pull_request_template.md
vendored
Normal file
11
.github/pull_request_template.md
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
<!--
|
||||
BEFORE YOU CREATE A PULL REQUEST:
|
||||
|
||||
- Please base all pull requests against the master branch
|
||||
- Include a clear description of your change
|
||||
- Reference related Issue(s) (e.g., "Resolves Issue #123")
|
||||
|
||||
Thank you for contributing to RomWBW! I will review your pull request as soon as possible.
|
||||
|
||||
DELETE EVERYTHING IN THIS COMMENT BLOCK AND REPLACE WITH YOUR COMMENTS
|
||||
-->
|
||||
37
.github/workflows/commit.yml
vendored
37
.github/workflows/commit.yml
vendored
@@ -13,18 +13,20 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Make Slugs
|
||||
uses: rlespinasse/github-slug-action@v4.4.1
|
||||
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3.3.0
|
||||
uses: actions/checkout@v4.1.1
|
||||
|
||||
- name: Get Commit Ref
|
||||
run: |
|
||||
COMMIT_REF=$(git rev-parse --short $GITHUB_SHA)
|
||||
echo "COMMIT_REF: $COMMIT_REF"
|
||||
echo "COMMIT_REF=$COMMIT_REF" >>$GITHUB_ENV
|
||||
|
||||
- name: Build
|
||||
run: |
|
||||
export TZ='America/Los_Angeles'
|
||||
sudo apt-get install libncurses-dev
|
||||
sudo apt-get install srecord
|
||||
make dist
|
||||
make distlog
|
||||
rm -rf .git*
|
||||
|
||||
- name: List Output
|
||||
@@ -34,26 +36,29 @@ 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.GITHUB_SHA_SHORT}}-Linux
|
||||
name: RomWBW-${{env.COMMIT_REF}}-Linux
|
||||
path: .
|
||||
|
||||
buildMacOS:
|
||||
runs-on: macOS-latest
|
||||
|
||||
steps:
|
||||
- name: Make Slugs
|
||||
uses: rlespinasse/github-slug-action@v4.4.1
|
||||
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3.3.0
|
||||
uses: actions/checkout@v4.1.1
|
||||
|
||||
- name: Get Commit Ref
|
||||
run: |
|
||||
COMMIT_REF=$(git rev-parse --short $GITHUB_SHA)
|
||||
echo "COMMIT_REF: $COMMIT_REF"
|
||||
echo "COMMIT_REF=$COMMIT_REF" >>$GITHUB_ENV
|
||||
|
||||
- name: Build
|
||||
run: |
|
||||
export TZ='America/Los_Angeles'
|
||||
brew install srecord
|
||||
make dist
|
||||
make distlog
|
||||
rm -rf .git*
|
||||
|
||||
- name: List Output
|
||||
@@ -63,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.GITHUB_SHA_SHORT}}-MacOS
|
||||
path: .
|
||||
name: RomWBW-${{env.COMMIT_REF}}-MacOS
|
||||
path: .
|
||||
|
||||
40
.github/workflows/release.yml
vendored
40
.github/workflows/release.yml
vendored
@@ -12,43 +12,49 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3.3.0
|
||||
uses: actions/checkout@v4.1.1
|
||||
|
||||
- name: Create Package Label
|
||||
run: |
|
||||
echo GITHUB_REF: "$GITHUB_REF"
|
||||
LABEL=`echo "$GITHUB_REF" | sed "s|^refs/tags/||"`
|
||||
echo "PKGLBL=$LABEL" >> $GITHUB_ENV
|
||||
echo PKGLBL: "$PKGLBL"
|
||||
echo Upload URL: "${{github.event.release.upload_url}}"
|
||||
echo GITHUB_TOKEN: "${{secrets.GITHUB_TOKEN}}"
|
||||
|
||||
- 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
|
||||
run: |
|
||||
zip -r RomWBW-${{env.PKGLBL}}-Package.zip .
|
||||
zip -r RomWBW-${{github.ref_name}}-Package.zip .
|
||||
|
||||
- name: Set Title
|
||||
run: |
|
||||
echo "Tag: ${{github.ref_name}}"
|
||||
if grep -q "dev" <<< "${{github.ref_name}}"; then
|
||||
TITLE="RomWBW Development Snapshot"
|
||||
elif grep -q "pre" <<< "${{github.ref_name}}"; then
|
||||
TITLE="RomWBW Prerelease"
|
||||
elif grep -q "rc" <<< "${{github.ref_name}}"; then
|
||||
TITLE="RomWBW Release Candidate"
|
||||
else
|
||||
TITLE="RomWBW"
|
||||
fi
|
||||
echo "Title: $TITLE"
|
||||
echo "TITLE=$TITLE" >>$GITHUB_ENV
|
||||
|
||||
- name: Attach Package Archive
|
||||
uses: wwarthen/actions/packages/automatic-releases@built-packages
|
||||
with:
|
||||
repo_token: "${{ secrets.GITHUB_TOKEN }}"
|
||||
repo_token: "${{secrets.GITHUB_TOKEN}}"
|
||||
draft: true
|
||||
prerelease: true
|
||||
title: "RomWBW Development SnapShot ${{env.PKGLBL}}"
|
||||
title: "${{env.TITLE}} ${{github.ref_name}}"
|
||||
files: |
|
||||
RomWBW-${{env.PKGLBL}}-Package.zip
|
||||
RomWBW-${{github.ref_name}}-Package.zip
|
||||
|
||||
# - name: Upload Package Archive
|
||||
# uses: AButler/upload-release-assets@v2.0.2
|
||||
# with:
|
||||
# repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
# repo-token: ${{secrets.github_token}}
|
||||
# files: |
|
||||
# RomWBW-${{env.PKGLBL}}-Package.zip
|
||||
|
||||
@@ -57,7 +63,7 @@ jobs:
|
||||
# uses: docker://antonyurchenko/git-release:latest
|
||||
# env:
|
||||
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
# RELEASE_NAME_PREFIX: "Development SnapShot Release "
|
||||
# RELEASE_NAME_PREFIX: "${{env.TITLE}} "
|
||||
# CHANGELOG_FILE: "none"
|
||||
# with:
|
||||
# args: |
|
||||
|
||||
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/*
|
||||
|
||||
@@ -8,5 +8,6 @@ if exist *.hlp del *.hlp
|
||||
if exist Tunes\*.pt? del Tunes\*.pt?
|
||||
if exist Tunes\*.mym del Tunes\*.mym
|
||||
if exist Tunes\*.vgm del Tunes\*.vgm
|
||||
if exist bbcbasic.txt del bbcbasic.txt
|
||||
|
||||
pushd Test && call Clean || exit /b 1 & popd
|
||||
|
||||
@@ -8,4 +8,4 @@ all::
|
||||
mkdir -p Tunes
|
||||
|
||||
clean::
|
||||
@rm -f *.bin *.com *.img *.rom *.pdf *.log *.eeprom *.ovr *.hlp *.doc *.COM *.BIN Tunes/*.mym Tunes/*.pt? Tunes/*.vgm
|
||||
@rm -f *.bin *.com *.img *.rom *.pdf *.log *.eeprom *.ovr *.hlp *.doc *.COM *.BIN Tunes/*.mym Tunes/*.pt? Tunes/*.vgm bbcbasic.txt
|
||||
|
||||
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,173 +0,0 @@
|
||||
***********************************************************************
|
||||
*** ***
|
||||
*** R o m W B W ***
|
||||
*** ***
|
||||
*** Z80/Z180 System Software ***
|
||||
*** ***
|
||||
***********************************************************************
|
||||
|
||||
This directory ("Binary") is part of the RomWBW System Software
|
||||
distribution archive. Refer to the ReadMe.txt file in this
|
||||
directory for more information on the overall contents of the
|
||||
directory.
|
||||
|
||||
RomWBW includes a set of disk images that are ready to copy onto
|
||||
a floppy or hard/CF/SD disk. You can use your modern computer
|
||||
(Windows/Linux/Mac) to copy the disk image file onto your disk
|
||||
media. The disk media will then be ready to use in your RomWBW
|
||||
System.
|
||||
|
||||
WARNING: The hdnew_*.img disk images are part of a new disk
|
||||
format that is a work in progress. Do not use these disk
|
||||
images without knowing exactly what you are doing! The
|
||||
hd_*.img disk images continue to be the images you should
|
||||
be using under normal circumstances.
|
||||
|
||||
A description of the disk images is provided later in this file.
|
||||
For more information on the creatioin of these images including
|
||||
instructions for customizing them or creating your own, refer to
|
||||
the ReadMe.txt file in the Source\Images directory.
|
||||
|
||||
Installing Images
|
||||
-----------------
|
||||
|
||||
The following instructions apply to Windows computers. Alternatively,
|
||||
you can use the "dd" command on Linux or Mac.
|
||||
|
||||
First of all, a MAJOR WARNING!!!! The tools described below are
|
||||
quite capable of obliterating your running Windows system drive. Use
|
||||
with extreme caution and make sure you have backups.
|
||||
|
||||
To install a floppy image on floppy media, you can use the tool
|
||||
called RaWriteWin. This tool is included in the Tools directory of
|
||||
the distribution. This tool will write your floppy image (fd_xxx.img)
|
||||
to a floppy disk using a raw block transfer. The tool is GUI based
|
||||
and it's operation is self explanatory.
|
||||
|
||||
To install a hard disk image on a CF card or SD card, you must have
|
||||
the appropriate media card slot on your computer. If you do, you can
|
||||
use the tool called Win32DiskImager. This tool is also included in
|
||||
the Tools directory of the distribution. It will write your
|
||||
hard disk image (hd_xxx.img) to the designated media card. This tool
|
||||
is also GUI based and self explanatory.
|
||||
|
||||
The use of the SIMH emulator is outside of the scope of this document.
|
||||
However, if you use SIMH, you will find that you can attach the hard
|
||||
disk images to the emulator with lines such as the following in your
|
||||
SIMH configuration file:
|
||||
|
||||
| attach hdsk0 hd_cpm22.img
|
||||
| set hdsk0 format=HDSK
|
||||
| set hdsk0 geom=T:2048/N:256/S:512
|
||||
| set hdsk0 wrtenb
|
||||
|
||||
Making Disk Images Bootable
|
||||
---------------------------
|
||||
|
||||
The Operating System disk images below are ready to boot by the
|
||||
RomWBW Boot Loader. However, if you update your RomWBW ROM, then
|
||||
you should also update the system tracks of your bootable disk
|
||||
images. You would use SYSCOPY to do this. SYSCOPY can also be
|
||||
used to make a disk bootable if it is not already bootable.
|
||||
|
||||
You would use a command like the following to make drive C bootable:
|
||||
|
||||
| B>SYSCOPY C:=CPM.SYS
|
||||
|
||||
The system file to use depends on the operating system you are trying
|
||||
to boot from the slice you are initializing with SYSCOPY:
|
||||
|
||||
CP/M 2.2 - cpm.sys
|
||||
ZSDOS 1.1 - zsys.sys
|
||||
CP/M 3 - cpmldr.sys
|
||||
ZPM3 - cpmldr.sys
|
||||
|
||||
Slices
|
||||
------
|
||||
|
||||
A RomWBW CP/M filesystem is fixed at 8MB. This is because it is the
|
||||
largest size filesystem supported by all common CP/M variants. Since
|
||||
all modern hard disks (including SD Cards and CF Cards) are much
|
||||
larger than 8MB, RomWBW supports the concept of "slices". This
|
||||
simply means that you can concatenate multiple CP/M filesystems (up
|
||||
to 256 of them) on a single physical hard disk and RomWBW will allow
|
||||
you to assign drive letters to them and treat them as multiple
|
||||
independent CP/M drives.
|
||||
|
||||
With the exception of the hd_combo image, each of the disk images
|
||||
includes a single CP/M file system (i.e., a single slice). However,
|
||||
you can easily create a multi-slice disk image by merely concatenating
|
||||
multiple images together. For example, if you wanted to create a 2
|
||||
slice disk image that has ZSDOS in the first slice and Wordstar in
|
||||
the second slice, you could use the following command from a Windows
|
||||
command prompt:
|
||||
|
||||
| C:\RomWBW\Binary>copy /b hd_zsdos.img + hd_ws.img hd_multi.img
|
||||
|
||||
You can now write hd_multi.img onto your SD or CF Card and you will
|
||||
have ZSDOS in the first slice and Wordstar in the second slice.
|
||||
|
||||
The hd_combo disk image is an example of this. It contains several
|
||||
slices in one image file. The contents of this special disk image
|
||||
are described below.
|
||||
|
||||
The concept of slices applies ONLY to hard disks. Floppy disks are
|
||||
not large enough to support multiple slices.
|
||||
|
||||
Disk Image Contents
|
||||
-------------------
|
||||
|
||||
What follows is a brief description of the contents of the
|
||||
disk images automatically provided in the RomWBW distribution.
|
||||
Note that all of the OS images include the RomWBW custom
|
||||
support apps.
|
||||
|
||||
cpm22 - DRI CP/M 2.2 (Bootable Floppy and Hard Disk)
|
||||
|
||||
Standard DRI CP/M 2.2 distribution files along with a few commonly
|
||||
used utilities.
|
||||
|
||||
zsdos - ZCPR1 + ZSDOS 1.1 (Bootable Floppy and Hard Disk)
|
||||
|
||||
Contains ZCPR1 and ZSDOS 1.1. This is roughly equivalent to the
|
||||
ROM boot contents, but provides a full set of the applications
|
||||
and related files that would not all fit on the ROM drive.
|
||||
|
||||
nzcom - NZCOM (Bootable Floppy and Hard Disk)
|
||||
|
||||
Standard NZCOM distribution. Note that you will need to run the
|
||||
NZCOM setup before this will run properly. You will need
|
||||
to refer to the NZCOM documentation.
|
||||
|
||||
cpm3 - DRI CP/M3 (Bootable Floppy and Hard Disk)
|
||||
|
||||
Standard DRI CP/M 3 adaptation for RomWBW that is ready to run.
|
||||
It can be started by running CPMLDR.
|
||||
|
||||
zpm3 - ZPM3 (Bootable Floppy and Hard Disk)
|
||||
|
||||
Simeon Cran's ZCPR 3 compatible OS for CP/M 3 adapted for RomWBW and
|
||||
ready to run. It can be started by running CPMLDR (which seems
|
||||
wrong, but ZPMLDR is somewhat broken).
|
||||
|
||||
ws4 - WordStar 4 (Floppy and Hard Disk)
|
||||
|
||||
Micropro Wordstar 4 full distribution. This image is not bootable
|
||||
and is intended to be added as an additional slice to an OS image.
|
||||
|
||||
bp - BPBIOS (Hard Disk only)
|
||||
|
||||
Adaptation of BPBIOS for RomWBW. This is NOT complete and NOT
|
||||
useable in it's current state.
|
||||
|
||||
combo - Multi-Boot Combination (Bootable Hard Disk)
|
||||
|
||||
A pre-created combo image that contains the following slices. The
|
||||
slices are identical to the individual images listed above.
|
||||
|
||||
Slice 0: cpm22 (bootable)
|
||||
Slice 1: zsdos (bootable)
|
||||
Slice 2: nzcom (bootable)
|
||||
Slice 3: cpm3 (bootable)
|
||||
Slice 4: zpm3 (bootable)
|
||||
Slice 5: ws4 (not bootable)
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -39,8 +39,8 @@ image for the Mark IV with the standard configuration. If a custom
|
||||
configuration called "custom" is created and built, a new file called
|
||||
MK4_custom.rom will be added to this directory.
|
||||
|
||||
Documentation of the pre-built ROM Images is contained in the
|
||||
RomList.txt file in this directory.
|
||||
Documentation of the pre-built ROM Images is contained in
|
||||
"RomWBW User Guide.pdf" in the Doc directory.
|
||||
|
||||
ROM Firmware Update Images (<plt>_<cfg>.upd)
|
||||
-------------------------------------
|
||||
@@ -49,7 +49,7 @@ The files with a ".upd" extension are binary images identical to the
|
||||
.rom files, but they only have the first 128K bytes. The first 128K
|
||||
is the system image without the ROM disk contents. These files can be
|
||||
used to update the system image without modifying the ROM disk
|
||||
contents. Refer to the Getting Started document for more information.
|
||||
contents. Refer to the RomWBW User Guide for more information.
|
||||
|
||||
ROM Executable Images (<plt>_<cfg>.com)
|
||||
---------------------------------------
|
||||
@@ -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.
|
||||
67
Doc/CPM/ReadMe.txt
Normal file
67
Doc/CPM/ReadMe.txt
Normal file
@@ -0,0 +1,67 @@
|
||||
***********************************************************************
|
||||
*** ***
|
||||
*** R o m W B W ***
|
||||
*** ***
|
||||
*** Z80/Z180 System Software ***
|
||||
*** ***
|
||||
***********************************************************************
|
||||
|
||||
This directory ("Doc/CPM") is part of the RomWBW System Software
|
||||
distribution archive. It contains documentation for the CP/M and
|
||||
CP/M work-alike operating system components of the system.
|
||||
|
||||
|
||||
CPM Manual ("CPM Manual.pdf")
|
||||
-----------------------------
|
||||
|
||||
The original DRI CP/M 2.x Operating System Manual. This should be
|
||||
considered the primary reference for system operation. The section
|
||||
on CP/M 2 Alteration can be ignored since this work has already been
|
||||
completed as part of the RomWBW distribution.
|
||||
|
||||
|
||||
CPM3 Command Summary ("CPM3 Command Summary.pdf")
|
||||
CPM3 Programmer's Guide ("CPM3 Programmers Guide.pdf")
|
||||
CPM3 System Guide ("CPM3 System Guide.pdf")
|
||||
CPM3 User's Guide ("CPM3 Users Guide.pdf")
|
||||
------------------------------------------------------
|
||||
|
||||
The original DRI CP/M 3.0 Operating System Documentation Set. This
|
||||
should be considered the primary reference for CP/M 3 system operation.
|
||||
|
||||
|
||||
NZCOM User's Manual ("NZCOM Users Manual.pdf")
|
||||
----------------------------------------------
|
||||
|
||||
NZCOM operating system operation manual.
|
||||
|
||||
|
||||
QP/M 2.7 Installation Guide and Supplements ("qpm27.pdf")
|
||||
QP/M 2.7 Interface Guide ("qdos27.pdf")
|
||||
QP/M 2.7 Features and Facilities ("qcp27.pdf")
|
||||
--------------------------------------------
|
||||
|
||||
Official documentation set for QP/M 2.7 from original QP/M distribution.
|
||||
|
||||
|
||||
ZCPR Manual ("ZCPR Manual.pdf")
|
||||
-------------------------------
|
||||
|
||||
ZCPR is the command proccessor portion of Z-System. This is the
|
||||
manual for ZCPR 1.x as included in RomWBW. The installation
|
||||
instructions can be ignored since that work has already been
|
||||
completed as part of the RomWBW distribution.
|
||||
|
||||
ZCPR D&J Manual ("ZCPR-DJ.doc")
|
||||
-------------------------------
|
||||
|
||||
ZCPR D&J User Manual. This manual supplements the ZCPR Manual.
|
||||
|
||||
|
||||
ZSDOS Manual ("ZSDOS Manual.pdf")
|
||||
---------------------------------
|
||||
|
||||
ZSDOS is the DOS portion of Z-System. This is the manual for ZSDOS
|
||||
1.x as included in RomWBW. The installation instructions can be
|
||||
ignored since that work has already been completed as part of the
|
||||
RomWBW distribution.
|
||||
@@ -1,3 +1,100 @@
|
||||
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
|
||||
- WBW: Auto restore TMS video on user reset (CP/M warm boot)
|
||||
- L?B: Added support for NABU w/ RomWBW Option Board
|
||||
- M?P: Reorganization of Doc directory introducing subfolders
|
||||
- WBW: Upgraded BBCBASIC to v5.00
|
||||
- W?S: Updated FLASH utility to v1.3.9
|
||||
- WBW: Support RCBus PS/2 Keyboard (EP/Sally)
|
||||
|
||||
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
|
||||
- A?C: Support for Z80-Retro SD interface
|
||||
- WBW: Support per-drive floppy configuration
|
||||
- WBW: Support for Bill Shen's VGARC
|
||||
- WBW: Support for MG014 Parallel Port module + printer
|
||||
- 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
|
||||
- R?P: Added new disk images: Aztec C, MS BASIC Compiler, MS Fortran, Games, HiTech-C, Turbo Pascal, SLR Z80ASM
|
||||
- JBL: Added RCZ80 configuration for ColecoVision
|
||||
- WBW: Support for Z180 running interrupt mode 1
|
||||
- WBW: Preliminary support for S100 Computers Z180
|
||||
- WBW: Preliminary support for Dan Werner's ESP32 MBC Module
|
||||
- WBW: Early support for Duodyne base system (CPU/UART/ROM/RAM/RTC/SPK)
|
||||
- M?C: Fixed XM to allow specifying HBIOS port for send operations
|
||||
- WBW: Fix S100 Z180 LED operation (credit to Jay Cotton for finding this issue)
|
||||
- WBW: QPM system image is now combined with current CBIOS during build
|
||||
- WBW: Added framework for Heath platform
|
||||
- WBW: Support for USB Disks via CH375/CH376
|
||||
- D?J: Support for Raspberry Pi build process
|
||||
|
||||
Version 3.2.1
|
||||
-------------
|
||||
- M?P: Fixed Zeta 2 FDD and CPUSPD config settings
|
||||
- WBW: Fixed SURVEY.COM (again)
|
||||
- DDW: Updates to DOS/65 binaries in disk images
|
||||
- PMS: Updates to VGMPLAY including support for YM2151
|
||||
- WBW: Fix for quark delay adjustment being trashed
|
||||
|
||||
Version 3.2
|
||||
-----------
|
||||
- WBW: Version bump for release
|
||||
|
||||
Version 3.1.1
|
||||
-------------
|
||||
- WBW: Version bumped due to pervasive changes
|
||||
|
||||
BIN
Doc/Contrib/AY-3-8910 Registers.xlsx
Normal file
BIN
Doc/Contrib/AY-3-8910 Registers.xlsx
Normal file
Binary file not shown.
@@ -4,7 +4,7 @@ ZSDOS Adaptation Notes for RomWBW
|
||||
Wayne Warthen
|
||||
wwarthen@gmail.com
|
||||
|
||||
This file is a log of the work done to adapt the ZSDOS distribution to the N8VEM platforms under RomWBW. I strongly recommend reviewing the zsdos.pdf file in the Doc directory.
|
||||
This file is a log of the work done to adapt the ZSDOS distribution to the N8VEM platforms under RomWBW. I strongly recommend reviewing the zsdos.pdf file in the Doc/CPM directory.
|
||||
|
||||
The starting point was the general public release of ZSDOS that is generally available. The first line of the README file is "ZSDOS-GP. General Public Release of the ZSDOS 1.x Operating System."
|
||||
|
||||
@@ -52,4 +52,4 @@ Usage Notes
|
||||
|
||||
6. After using PUTDS to initialize a directory for ZDS date stamping, I am finding that it is necessary to run RELOG before the stamping routines will actually start working.
|
||||
|
||||
7. Generic CP/M PIP and ZSDOS path searching do not play well together if you use PIP to copy to or from a directory in the ZSDOS search path. Best to use COPY from the ZSDOS distribution.
|
||||
7. Generic CP/M PIP and ZSDOS path searching do not play well together if you use PIP to copy to or from a directory in the ZSDOS search path. Best to use COPY from the ZSDOS distribution.
|
||||
|
||||
BIN
Doc/Language/Aztec_C_1.06_User_Manual_Mar84.pdf
Normal file
BIN
Doc/Language/Aztec_C_1.06_User_Manual_Mar84.pdf
Normal file
Binary file not shown.
BIN
Doc/Language/Cowgol Language.pdf
Normal file
BIN
Doc/Language/Cowgol Language.pdf
Normal file
Binary file not shown.
11351
Doc/Language/HI-TECH Z80 C Compiler Manual.txt
Normal file
11351
Doc/Language/HI-TECH Z80 C Compiler Manual.txt
Normal file
File diff suppressed because it is too large
Load Diff
4090
Doc/Language/Microsoft_FORTRAN-80_Users_Manual_1977.pdf
Normal file
4090
Doc/Language/Microsoft_FORTRAN-80_Users_Manual_1977.pdf
Normal file
File diff suppressed because one or more lines are too long
62
Doc/Language/ReadMe.txt
Normal file
62
Doc/Language/ReadMe.txt
Normal file
@@ -0,0 +1,62 @@
|
||||
***********************************************************************
|
||||
*** ***
|
||||
*** R o m W B W ***
|
||||
*** ***
|
||||
*** Z80/Z180 System Software ***
|
||||
*** ***
|
||||
***********************************************************************
|
||||
|
||||
This directory ("Doc/Language") is part of the RomWBW System Software
|
||||
distribution archive. It contains documentation for Programming
|
||||
Languages provided with the system.
|
||||
|
||||
|
||||
Aztec C Compiler User Manual (Aztec_C_1.06_User_Manual_Mar84.pdf)
|
||||
-----------------------------------------------------------------
|
||||
|
||||
Official user manual for the Aztec C Compiler included in the aztecc disk image.
|
||||
|
||||
|
||||
Borland TurboPascal User Manual (Turbo_Pascal_Version_3.0_Reference_Manual_1986.pdf)
|
||||
------------------------------------------------------------------------------------
|
||||
|
||||
Official user manual Borland TurboPascal included in the pascal disk image.
|
||||
|
||||
|
||||
Cowgol Lanaguage (Cowgol Language.pdf)
|
||||
--------------------------------------
|
||||
|
||||
Documentation for Cowgol Language included in the cowgol disk image
|
||||
|
||||
|
||||
HI-TECH C Compiler User Manual (HI-TECH Z80 C Compiler Manual.txt)
|
||||
------------------------------------------------------------------
|
||||
|
||||
Official user manual for the HI-TECH C Compiler included in the
|
||||
hitechc disk image.
|
||||
|
||||
|
||||
Microsoft Basic-80 Reference Manual v5.0 (Microsoft Basic-80 Reference Manual v5.0.pdf)
|
||||
---------------------------------------------------------------------------------------
|
||||
|
||||
Official manual for Microsoft BASIC as included in RomWBW.
|
||||
|
||||
|
||||
Microsoft FORTRAN-80 User Manual (Microsoft_FORTRAN-80_Users_Manual_1977.pdf)
|
||||
-----------------------------------------------------------------------------
|
||||
|
||||
Official user manual for Microsoft's FORTRAN-80 compiler included in the fortran
|
||||
disk image.
|
||||
|
||||
|
||||
Z80 Assembler User Manual (z80asm (SLR Systems).pdf)
|
||||
----------------------------------------------------
|
||||
|
||||
Official user manual for the Z80 Macro Assembler by SLR Systems
|
||||
included in the z80asm disk image.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
49495
Doc/Language/Turbo_Pascal_Version_3.0_Reference_Manual_1986.pdf
Normal file
49495
Doc/Language/Turbo_Pascal_Version_3.0_Reference_Manual_1986.pdf
Normal file
File diff suppressed because one or more lines are too long
BIN
Doc/Language/z80asm (SLR Systems).pdf
Normal file
BIN
Doc/Language/z80asm (SLR Systems).pdf
Normal file
Binary file not shown.
@@ -6,28 +6,41 @@
|
||||
*** ***
|
||||
***********************************************************************
|
||||
|
||||
This directory ("Doc") is part of the RomWBW System Software
|
||||
distribution archive. It contains documentation for components of
|
||||
This directory ("Doc") is part of the RomWBW System Software
|
||||
distribution archive. It contains documentation for components of
|
||||
the system.
|
||||
|
||||
CPM (Directory)
|
||||
---------------
|
||||
|
||||
CPM Manual ("CPM Manual.pdf")
|
||||
-----------------------------
|
||||
|
||||
The original DRI CP/M 2.x Operating System Manual. This should be
|
||||
considered the primary reference for system operation. The section
|
||||
on CP/M 2 Alteration can be ignored since this work has already been
|
||||
completed as part of the RomWBW distribution.
|
||||
Documentation specific to CP/M, including all versions and derivatives.
|
||||
|
||||
|
||||
CPM3 Command Summary ("CPM3 Command Summary.pdf")
|
||||
CPM3 Programmer's Guide ("CPM3 Programmers Guide.pdf")
|
||||
CPM3 System Guide ("CPM3 System Guide.pdf")
|
||||
CPM3 User's Guide ("CPM3 Users Guide.pdf")
|
||||
------------------------------------------------------
|
||||
Language (Directory)
|
||||
--------------------
|
||||
|
||||
The original DRI CP/M 3.0 Operating System Documentation Set. This
|
||||
should be considered the primary reference for CP/M 3 system operation.
|
||||
Documentation specific to programming languages, provided with the system
|
||||
|
||||
|
||||
ChangeLog.txt
|
||||
-------------
|
||||
|
||||
Log of changes in RomWBW by version.
|
||||
|
||||
|
||||
RomWBW User Guide ("RomWBW User Guide.pdf")
|
||||
RomWBW System Guide ("RomWBW System Guide.pdf")
|
||||
RomWBW Applications ("RomWBW Applications.pdf")
|
||||
RomWBW ROM Applications ("RomWBW ROM Applications.pdf")
|
||||
RomWBW Disk Catalog ("RomWBW Disk Catalog.pdf")
|
||||
RomWBW Errata ("RomWBW Errata.pdf")
|
||||
-------------------------------------------------------
|
||||
|
||||
Documentation set for RomWBW. The primary document is the
|
||||
User Guide. The System Guide explains internal system operation
|
||||
and has a reference for the HBIOS API. Use of included tools
|
||||
and utilities are detailed in the Applications and
|
||||
ROM Applications documents.
|
||||
|
||||
|
||||
DDTZ Manual ("DDTZ.doc")
|
||||
@@ -39,39 +52,21 @@ Manual for the DDTZ v2.7 debug tool included on the ROM drive.
|
||||
FDisk Manual ("FDisk Manual.pdf")
|
||||
---------------------------------
|
||||
|
||||
The operational manual for John Coffman's hard disk partitioning
|
||||
The operational manual for John Coffman's hard disk partitioning
|
||||
program. This program is included in RomWBW as FDISK80.
|
||||
|
||||
|
||||
Floppy Disk Utility Documentation ("FDU.tst")
|
||||
---------------------------------------------
|
||||
|
||||
Operational documentation for the RomWBW FDU application.
|
||||
|
||||
|
||||
Hard Disk Anatomy ("Hard Disk Anatomy.pdf")
|
||||
-------------------------------------------
|
||||
|
||||
Diagram of a CP/M & MS-DOS (FAT) hybrid hard disk layout.
|
||||
|
||||
|
||||
NZCOM User's Manual ("NZCOM Users Manual.pdf")
|
||||
----------------------------------------------
|
||||
SIO+CTC Baud Rate Options (SIO+CTC Baud Rate Options.pdf)
|
||||
---------------------------------------------------------
|
||||
|
||||
NZCOM operating system operation manual.
|
||||
|
||||
|
||||
RomWBW Architecture ("RomWBW Architecture.pdf")
|
||||
-----------------------------------------------
|
||||
|
||||
Document describing the architecture of the RomWBW HBIOS. It
|
||||
includes reference information for the HBIOS calls.
|
||||
|
||||
ROM Applications ("ROM Applications.pdf")
|
||||
-----------------------------------------
|
||||
|
||||
Breif instructions for the ROM based applications included in
|
||||
in the boot ROM.
|
||||
Documents possible baud rates available based on different baud
|
||||
clock rates for Zilog SIO using CTC for baud rate clock generation.
|
||||
|
||||
|
||||
Z180 ASCI Baud Rate Options ("Z180 ASCI Baud Rate Options.pdf")
|
||||
@@ -83,19 +78,10 @@ clock rate. This document provides a list of the possible
|
||||
baud rates for typical CPU clock rates.
|
||||
|
||||
|
||||
ZCPR Manual ("ZCPR Manual.pdf")
|
||||
-------------------------------
|
||||
UCSD p-System Users Manual ("UCSD p-System Users Manual.pdf")
|
||||
-------------------------------------------------------------
|
||||
|
||||
ZCPR is the command proccessor portion of Z-System. This is the
|
||||
manual for ZCPR 1.x as included in RomWBW. The installation
|
||||
instructions can be ignored since that work has already been
|
||||
completed as part of the RomWBW distribution.
|
||||
Official user manual for p-System operating system included with
|
||||
RomWBW.
|
||||
|
||||
|
||||
ZSDOS Manual ("ZSDOS Manual.pdf")
|
||||
---------------------------------
|
||||
|
||||
ZSDOS is the DOS portion of Z-System. This is the manual fo ZSDOS
|
||||
1.x as included in RomWBW. The installation instructions can be
|
||||
ignored since that work has already been completed as part of the
|
||||
RomWBW distribution.
|
||||
--WBW 5:18 PM 6/14/2023
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -40,7 +40,7 @@ N8-2312 (X)
|
||||
- Test FDU app
|
||||
- Test TMS driver (video & kbd)
|
||||
|
||||
N8-2511 ( )
|
||||
N8-2511 (X)
|
||||
-------
|
||||
- Test ASCI driver
|
||||
- Test SD driver (Juha mode)
|
||||
@@ -139,27 +139,6 @@ GENERAL (X)
|
||||
- ASSIGN app
|
||||
- MODE app
|
||||
- SYSCOPY app
|
||||
- OSLDR app
|
||||
- FDU app
|
||||
- FDISK80 app
|
||||
- TUNE app
|
||||
|
||||
RESULTS
|
||||
-------
|
||||
- Missing HBIOS startup banner (X)
|
||||
- PANIC while printing Serial device inventory (X)
|
||||
- Unexpected interrupt signals not handled well (X)
|
||||
- Fix IT_??? usage (X)
|
||||
- Fix HB_DI/HB_EI in PEEK/POKE/BNKCPY (X)
|
||||
- Fix SIMH timer interrupt setup (X)
|
||||
- Move DI/EI in PEEK/POKE/BNKCPY to API layer? (X)
|
||||
- RETI vs. JP in page zero when INTMODE = 0 (X)
|
||||
- Check interrupt stack space (X)
|
||||
- If an early INT fires, we return with INTs enabled (not good) (X)
|
||||
- PPPCON init should display ANSI 80x25 or similar (X)
|
||||
- Add INT MODE X message to early boot messages (X)
|
||||
- OSLDR fails when LDDS is loaded (X)
|
||||
- Add "!!!" to force assembly error as needed ( )
|
||||
- TIMER app should check for HBIOS active (X)
|
||||
- Halt system after bad interrupt??? ( )
|
||||
- Adapt and bundle PLAYER.COM (X)
|
||||
|
||||
Binary file not shown.
18
Makefile
18
Makefile
@@ -1,5 +1,14 @@
|
||||
all:
|
||||
.PHONY: tools source clean clobber diff dist
|
||||
|
||||
.ONESHELL:
|
||||
.SHELLFLAGS = -cex
|
||||
|
||||
all: tools source
|
||||
|
||||
tools:
|
||||
$(MAKE) --directory Tools
|
||||
|
||||
source:
|
||||
$(MAKE) --directory Source
|
||||
|
||||
clean:
|
||||
@@ -14,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
|
||||
|
||||
134
ReadMe.md
134
ReadMe.md
@@ -1,9 +1,9 @@
|
||||
|
||||
|
||||
**RomWBW ReadMe** \
|
||||
Version 3.2 \
|
||||
Version 3.5 \
|
||||
Wayne Warthen ([wwarthen@gmail.com](mailto:wwarthen@gmail.com)) \
|
||||
05 Mar 2023
|
||||
04 Jun 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.
|
||||
@@ -102,22 +112,22 @@ functionality.
|
||||
|
||||
Complete instructions for installation and operation of RomWBW are found
|
||||
in the [RomWBW User
|
||||
Guide](https://github.com/wwarthen/RomWBW/raw/dev/Doc/RomWBW%20User%20Guide.pdf).
|
||||
Guide](https://github.com/wwarthen/RomWBW/raw/master/Doc/RomWBW%20User%20Guide.pdf).
|
||||
|
||||
## Documentation
|
||||
|
||||
Documentation for RomWBW includes:
|
||||
|
||||
- [RomWBW User
|
||||
Guide](https://github.com/wwarthen/RomWBW/raw/dev/Doc/RomWBW%20User%20Guide.pdf)
|
||||
Guide](https://github.com/wwarthen/RomWBW/raw/master/Doc/RomWBW%20User%20Guide.pdf)
|
||||
- [RomWBW System
|
||||
Guide](https://github.com/wwarthen/RomWBW/raw/dev/Doc/RomWBW%20System%20Guide.pdf)
|
||||
Guide](https://github.com/wwarthen/RomWBW/raw/master/Doc/RomWBW%20System%20Guide.pdf)
|
||||
- [RomWBW
|
||||
Applications](https://github.com/wwarthen/RomWBW/raw/dev/Doc/RomWBW%20Applications.pdf)
|
||||
Applications](https://github.com/wwarthen/RomWBW/raw/master/Doc/RomWBW%20Applications.pdf)
|
||||
- [RomWBW ROM
|
||||
Applications](https://github.com/wwarthen/RomWBW/raw/dev/Doc/RomWBW%20ROM%20Applications.pdf)
|
||||
Applications](https://github.com/wwarthen/RomWBW/raw/master/Doc/RomWBW%20ROM%20Applications.pdf)
|
||||
- [RomWBW
|
||||
Errata](https://github.com/wwarthen/RomWBW/raw/dev/Doc/RomWBW%20Errata.pdf)
|
||||
Errata](https://github.com/wwarthen/RomWBW/raw/master/Doc/RomWBW%20Errata.pdf)
|
||||
|
||||
# Acknowledgments
|
||||
|
||||
@@ -128,8 +138,8 @@ contributions. The list below is probably missing many names – please
|
||||
let me know if I missed you!
|
||||
|
||||
- Andrew Lynch started it all when he created the N8VEM Z80 SBC which
|
||||
became the first platform RomWBW supported. Some of his code can still
|
||||
be found in RomWBW.
|
||||
became the first platform RomWBW supported. Some of his original code
|
||||
can still be found in RomWBW.
|
||||
|
||||
- Dan Werner wrote much of the code from which RomWBW was originally
|
||||
derived and he has always been a great source of knowledge and advice.
|
||||
@@ -140,23 +150,30 @@ let me know if I missed you!
|
||||
due to internal changes within RomWBW. As of RomWBW 2.6, these
|
||||
applications are no longer provided.
|
||||
|
||||
- Sergey Kiselev created several hardware platforms for RomWBW including
|
||||
the very popular Zeta.
|
||||
|
||||
- David Giles created support for the Z180 CSIO which is now included SD
|
||||
Card driver.
|
||||
|
||||
- Phil Summers contributed the Forth and BASIC adaptations in ROM, the
|
||||
AY-3-8910 sound driver, DMA support, and a long list of general code
|
||||
and documentation enhancements.
|
||||
|
||||
- Ed Brindley contributed some of the code that supports the RCBus
|
||||
platform.
|
||||
|
||||
- Phil Summers contributed the Forth and BASIC adaptations in ROM, the
|
||||
AY-3-8910 sound driver as well as a long list of general code
|
||||
enhancements.
|
||||
|
||||
- Spencer Owen created the RC2014 series of hobbyist kit computers which
|
||||
has exponentially increased RomWBW usage.
|
||||
has exponentially increased RomWBW usage. Some of his kits include
|
||||
RomWBW.
|
||||
|
||||
- Stephen Cousins has likewise created a series of hobbyist kit
|
||||
computers at Small Computer Central and is distributing RomWBW with
|
||||
many of them.
|
||||
|
||||
- Alan Cox has contributed some driver code and has provided a great
|
||||
deal of advice.
|
||||
|
||||
- The CP/NET client files were developed by Douglas Miller.
|
||||
|
||||
- Phillip Stevens contributed support for FreeRTOS.
|
||||
@@ -176,6 +193,44 @@ let me know if I missed you!
|
||||
|
||||
- The RomWBW Disk Catalog document was produced by Mykl Orders.
|
||||
|
||||
- Rob Prouse has created many of the supplemental disk images 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.
|
||||
|
||||
- Les Bird has contributed support for the NABU w/ Option Board
|
||||
|
||||
Contributions of all kinds to RomWBW are very welcome.
|
||||
|
||||
# Licensing
|
||||
@@ -197,14 +252,15 @@ Portions of RomWBW were created by, contributed by, or derived from the
|
||||
work of others. It is believed that these works are being used in
|
||||
accordance with the intentions and/or licensing of their creators.
|
||||
|
||||
If anyone feels their work is being used outside of it’s intended
|
||||
If anyone feels their work is being used outside of its intended
|
||||
licensing, please notify:
|
||||
|
||||
> Wayne Warthen wwarthen@gmail.com
|
||||
> Wayne Warthen
|
||||
> <wwarthen@gmail.com>
|
||||
|
||||
RomWBW is an aggregate work. It is composed of many individual,
|
||||
standalone programs that are distributed as a whole to function as a
|
||||
cohesive system. Each program may have it’s own licensing which may be
|
||||
cohesive system. Each program may have its own licensing which may be
|
||||
different from other programs within the aggregate.
|
||||
|
||||
In some cases, a single program (e.g., CP/M Operating System) is
|
||||
|
||||
119
ReadMe.txt
119
ReadMe.txt
@@ -1,6 +1,6 @@
|
||||
RomWBW ReadMe
|
||||
Wayne Warthen (wwarthen@gmail.com)
|
||||
05 Mar 2023
|
||||
04 Jun 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.
|
||||
@@ -129,8 +137,8 @@ contributions. The list below is probably missing many names – please
|
||||
let me know if I missed you!
|
||||
|
||||
- Andrew Lynch started it all when he created the N8VEM Z80 SBC which
|
||||
became the first platform RomWBW supported. Some of his code can
|
||||
still be found in RomWBW.
|
||||
became the first platform RomWBW supported. Some of his original
|
||||
code can still be found in RomWBW.
|
||||
|
||||
- Dan Werner wrote much of the code from which RomWBW was originally
|
||||
derived and he has always been a great source of knowledge and
|
||||
@@ -142,23 +150,30 @@ let me know if I missed you!
|
||||
due to internal changes within RomWBW. As of RomWBW 2.6, these
|
||||
applications are no longer provided.
|
||||
|
||||
- Sergey Kiselev created several hardware platforms for RomWBW
|
||||
including the very popular Zeta.
|
||||
|
||||
- David Giles created support for the Z180 CSIO which is now included
|
||||
SD Card driver.
|
||||
|
||||
- Phil Summers contributed the Forth and BASIC adaptations in ROM, the
|
||||
AY-3-8910 sound driver, DMA support, and a long list of general code
|
||||
and documentation enhancements.
|
||||
|
||||
- Ed Brindley contributed some of the code that supports the RCBus
|
||||
platform.
|
||||
|
||||
- Phil Summers contributed the Forth and BASIC adaptations in ROM, the
|
||||
AY-3-8910 sound driver as well as a long list of general code
|
||||
enhancements.
|
||||
|
||||
- Spencer Owen created the RC2014 series of hobbyist kit computers
|
||||
which has exponentially increased RomWBW usage.
|
||||
which has exponentially increased RomWBW usage. Some of his kits
|
||||
include RomWBW.
|
||||
|
||||
- Stephen Cousins has likewise created a series of hobbyist kit
|
||||
computers at Small Computer Central and is distributing RomWBW with
|
||||
many of them.
|
||||
|
||||
- Alan Cox has contributed some driver code and has provided a great
|
||||
deal of advice.
|
||||
|
||||
- The CP/NET client files were developed by Douglas Miller.
|
||||
|
||||
- Phillip Stevens contributed support for FreeRTOS.
|
||||
@@ -178,6 +193,45 @@ let me know if I missed you!
|
||||
|
||||
- The RomWBW Disk Catalog document was produced by Mykl Orders.
|
||||
|
||||
- Rob Prouse has created many of the supplemental disk images
|
||||
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.
|
||||
|
||||
- Les Bird has contributed support for the NABU w/ Option Board
|
||||
|
||||
Contributions of all kinds to RomWBW are very welcome.
|
||||
|
||||
|
||||
@@ -202,14 +256,15 @@ Portions of RomWBW were created by, contributed by, or derived from the
|
||||
work of others. It is believed that these works are being used in
|
||||
accordance with the intentions and/or licensing of their creators.
|
||||
|
||||
If anyone feels their work is being used outside of it’s intended
|
||||
If anyone feels their work is being used outside of its intended
|
||||
licensing, please notify:
|
||||
|
||||
Wayne Warthen wwarthen@gmail.com
|
||||
Wayne Warthen
|
||||
wwarthen@gmail.com
|
||||
|
||||
RomWBW is an aggregate work. It is composed of many individual,
|
||||
standalone programs that are distributed as a whole to function as a
|
||||
cohesive system. Each program may have it’s own licensing which may be
|
||||
cohesive system. Each program may have its own licensing which may be
|
||||
different from other programs within the aggregate.
|
||||
|
||||
In some cases, a single program (e.g., CP/M Operating System) is
|
||||
|
||||
23
Source/Apps/BBCBASIC/Build.cmd
Normal file
23
Source/Apps/BBCBASIC/Build.cmd
Normal file
@@ -0,0 +1,23 @@
|
||||
@echo off
|
||||
setlocal
|
||||
|
||||
set TOOLS=..\..\..\Tools
|
||||
|
||||
set PATH=%TOOLS%\zxcc;%PATH%
|
||||
|
||||
set CPMDIR80=%TOOLS%/cpm/
|
||||
|
||||
zxcc z80asm -dist/FM
|
||||
zxcc z80asm -main/FM
|
||||
zxcc z80asm -exec/FM
|
||||
zxcc z80asm -eval/FM
|
||||
zxcc z80asm -asmb/FM
|
||||
zxcc z80asm -cmos/FM
|
||||
zxcc z80asm -math/FM
|
||||
zxcc z80asm -hook/FM
|
||||
zxcc z80asm -data/FM
|
||||
|
||||
zxcc slrnk -/v,/a:0100,dist,main,exec,eval,asmb,math,hook,cmos,/p:4B00,data,bbcbasic/n,/e
|
||||
|
||||
copy /Y bbcbasic.com ..\..\..\Binary\Apps\ || exit /b
|
||||
copy /Y bbcbasic.txt ..\..\..\Binary\Apps\ || exit /b
|
||||
9
Source/Apps/BBCBASIC/Clean.cmd
Normal file
9
Source/Apps/BBCBASIC/Clean.cmd
Normal file
@@ -0,0 +1,9 @@
|
||||
@echo off
|
||||
setlocal
|
||||
|
||||
if exist *.com del *.com
|
||||
if exist *.lst del *.lst
|
||||
if exist *.hex del *.hex
|
||||
if exist *.prn del *.prn
|
||||
if exist *.rel del *.rel
|
||||
if exist *.sym del *.sym
|
||||
11
Source/Apps/BBCBASIC/Makefile
Normal file
11
Source/Apps/BBCBASIC/Makefile
Normal file
@@ -0,0 +1,11 @@
|
||||
OBJECTS = bbcbasic.com
|
||||
DOCS = bbcbasic.txt
|
||||
DEST = ../../../Binary/Apps
|
||||
DOCDEST = ../../../Binary/Apps
|
||||
TOOLS = ../../../Tools
|
||||
OTHERS = *.rel
|
||||
|
||||
include $(TOOLS)/Makefile.inc
|
||||
|
||||
bbcbasic.com: dist.rel main.rel exec.rel eval.rel asmb.rel cmos.rel math.rel hook.rel data.rel
|
||||
$(ZXCC) SLRNK -/V,/A:0100,DIST,MAIN,EXEC,EVAL,ASMB,MATH,HOOK,CMOS,/P:4B00,DATA,BBCBASIC/N,/E
|
||||
1010
Source/Apps/BBCBASIC/asmb.z80
Normal file
1010
Source/Apps/BBCBASIC/asmb.z80
Normal file
File diff suppressed because it is too large
Load Diff
455
Source/Apps/BBCBASIC/bbcbasic.txt
Normal file
455
Source/Apps/BBCBASIC/bbcbasic.txt
Normal file
@@ -0,0 +1,455 @@
|
||||
This is a RomWBW HBIOS adaptation of BBCBASIC v5.00. The
|
||||
cursor and screen management assumes the use of an ANSI/VT-100 terminal
|
||||
which is generally correct for RomWBW. Support for a hardware system
|
||||
timer is also implemented. If your system does not have a hardware
|
||||
timer, the TIME function will always return 0 and the timeout
|
||||
parameter of the INKEY(n) function will not be observed (will never
|
||||
timeout).
|
||||
|
||||
What follows is some basic information on BBCBASIC from the
|
||||
distribution. Note that it starts with the v3.00 information and
|
||||
later on provides information on the changes in v5.00.
|
||||
|
||||
-- WBW 1:15 PM 5/30/2024
|
||||
|
||||
|
||||
|
||||
|
||||
BBC BASIC (Z80)
|
||||
|
||||
Generic CP/M Version 3.00
|
||||
|
||||
(C) Copyright R.T.Russell 1982-1999
|
||||
|
||||
1. INTRODUCTION
|
||||
|
||||
BBC BASIC (Z80) has been designed to be as compatible as possible with
|
||||
Version 4 of the 6502 BBC BASIC resident in the BBC Micro Master series.
|
||||
The language syntax is not always identical to that of the 6502 version,
|
||||
but in most cases the Z80 version is more tolerant.
|
||||
|
||||
BBC BASIC (Z80) is as machine independent as possible and, as supplied,
|
||||
it will run on any CP/M 2.2 (or later) system using a Z80 processor
|
||||
(checks are carried out to ensure that the processor is a Z80 and that
|
||||
the version of CP/M is at least 2.2). It is minimally configured for an
|
||||
ADM3a-compatible VDU.
|
||||
|
||||
Few CP/M systems offer colour graphics of the quality provided as
|
||||
standard on the BBC Microcomputer, and no software can provide colour
|
||||
high-resolution graphics from a monochrome character-orientated computer.
|
||||
However, many CP/M system users are interested in the advanced program
|
||||
structures available from BBC BASIC and, within the limitations of the
|
||||
host computer, BBC BASIC (Z80) provides the programming structures and
|
||||
the non-graphic commands and functions specified for BBC BASIC.
|
||||
|
||||
In order to make full use of the facilities available in BBC BASIC (Z80)
|
||||
it is necessary to install a small patch to adapt it to the capabilities
|
||||
of the host computer. The source code of the patch present in the
|
||||
distribution version is supplied as BBCDIST.MAC.
|
||||
|
||||
This documentation should be read in conjunction with a standard BBC
|
||||
BASIC manual. Only those features which differ from the standard Acorn
|
||||
versions are documented here.
|
||||
|
||||
|
||||
2. MEMORY UTILISATION
|
||||
|
||||
BBC BASIC (Z80) requires about 16 Kbytes of code space, resulting in a
|
||||
value of PAGE of about &3E00. The remainder of the user memory is
|
||||
available for BASIC programs, variables (heap) and stack. Depending on
|
||||
the system configuration, HIMEM can have a value up to &FE00.
|
||||
|
||||
|
||||
3. COMMANDS, STATEMENTS AND FUNCTIONS
|
||||
|
||||
The syntax of BASIC commands, statements and functions is in most cases
|
||||
identical to that of the BBC Micro version (BASIC 4). The few
|
||||
differences are documented here:
|
||||
|
||||
ADVAL
|
||||
This function is not implemented.
|
||||
|
||||
CALL
|
||||
CALL sets up a table in RAM containing details of the parameters; the
|
||||
processor's IX register is set to the address of this parameter table.
|
||||
The other processor registers are initialised as follows:
|
||||
|
||||
A is initialised to the least significant byte of A%
|
||||
B is initialised to the least significant byte of B%
|
||||
C is initialised to the least significant byte of C%
|
||||
D is initialised to the least significant byte of D%
|
||||
E is initialised to the least significant byte of E%
|
||||
F is initialised to the least significant byte of F%
|
||||
H is initialised to the least significant byte of H%
|
||||
L is initialised to the least significant byte of L%
|
||||
|
||||
The parameter types are:
|
||||
|
||||
Code No. Parameter Type Example
|
||||
0 Byte (8 bits) ?A%
|
||||
4 Word (32 bits) !A% or A%
|
||||
5 Real (40 bits) A
|
||||
128 Fixed string $A%
|
||||
129 Movable string A$
|
||||
|
||||
On entry to the subroutine the parameter table contains the following
|
||||
values:
|
||||
|
||||
Number of parameters 1 byte (at IX)
|
||||
|
||||
Parameter type 1 byte (at IX+1)
|
||||
Parameter address 2 bytes (at IX+2, IX+3, LSB first)
|
||||
|
||||
Parameter type ) repeated as often as necessary
|
||||
Parameter address )
|
||||
|
||||
Except in the case of a movable string (normal string variable), the
|
||||
parameter address given is the absolute address at which the item is
|
||||
stored. In the case of movable strings (type 129) it is the address of a
|
||||
4-byte parameter block containing the current length, the maximum length
|
||||
and the start address of the string (LSB first) in that order.
|
||||
|
||||
Integer variables are stored in twos complement form with their least
|
||||
significant byte first.
|
||||
|
||||
Fixed strings are stored as the characters of the string followed by a
|
||||
carriage return (&0D).
|
||||
|
||||
Floating point variables are stored in binary floating point format with
|
||||
their least significant byte first; the fifth byte is the exponent. The
|
||||
mantissa is stored as a binary fraction in sign and magnitude format.
|
||||
Bit 7 of the most significant byte is the sign bit and, for the purposes
|
||||
of calculating the magnitude of the number, this bit is assumed to be set
|
||||
to one. The exponent is stored as an integer in excess 127 format (to
|
||||
find the exponent subtract 127 from the value in the fifth byte).
|
||||
|
||||
If the exponent byte of a floating point number is zero, the number is an
|
||||
integer stored in integer format in the mantissa bytes. Thus an integer
|
||||
can be represented in two different ways in a real variable. For example
|
||||
the value +5 can be stored as:
|
||||
|
||||
05 00 00 00 00 Integer 5
|
||||
00 00 00 20 82 (0.5 + 0.125) * 2^3
|
||||
|
||||
COLOUR (COLOR)
|
||||
This statement is not implemented.
|
||||
|
||||
DRAW
|
||||
This statement is not implemented.
|
||||
|
||||
EDIT
|
||||
A command to edit or concatenate and edit the specified program line(s).
|
||||
The specified lines (including their line numbers) are listed as a single
|
||||
line. By changing only the line number you can use EDIT to duplicate a
|
||||
line.
|
||||
|
||||
EDIT 230
|
||||
EDIT 200,230
|
||||
|
||||
The following control functions are active both in the EDIT mode and in
|
||||
the immediate entry mode (i.e. at the BASIC prompt):
|
||||
|
||||
Move the cursor one character position to the left
|
||||
Move the cursor one character position to the right
|
||||
Move the cursor to the start of the line
|
||||
Move the cursor to the end of the line
|
||||
Insert a space at the current cursor position
|
||||
Delete the character at the current cursor position
|
||||
Backspace and delete the character to the left of the cursor
|
||||
Delete all characters to the left of the cursor
|
||||
Delete all characters from the cursor to the end of the line
|
||||
|
||||
The choice of which keys activate these functions is made when BBC BASIC
|
||||
is configured for a particular system. The distribution version uses ^H,
|
||||
^I, ^K, ^J, ^A, ^E, DEL (&7F), ^L and ^X.
|
||||
|
||||
To exit EDIT mode and replace the edited line, type RETURN (ENTER).
|
||||
|
||||
To abort the edit and leave the line unchanged, type ESCape.
|
||||
|
||||
ENVELOPE
|
||||
This statement is not implemented.
|
||||
|
||||
GET
|
||||
This function waits for a character to be typed at the keyboard, and
|
||||
returns the ASCII code.
|
||||
|
||||
GET can also be used to read data from a processor I/O port; full 16-bit
|
||||
port addressing is available:
|
||||
|
||||
N% = GET(X%) : REM input from port X%
|
||||
|
||||
INKEY
|
||||
This function waits for a specified maximum number of centiseconds for a
|
||||
character to be typed at the keyboard. If no character is typed in that
|
||||
time, the value -1 is returned. In the distribution version the delay is
|
||||
determined by a simple software timing loop, and may be very inaccurate.
|
||||
The customisation patch allows this to be adjusted to suit the system in
|
||||
use.
|
||||
|
||||
INPUT#
|
||||
The format of data files is different from that used by the BBC Micro, in
|
||||
part to improve compatibility with standard CP/M files. Numeric values
|
||||
are stored as five bytes in the format documented under CALL; if the
|
||||
fifth byte is zero the value is an integer. Strings are stored as the
|
||||
characters of the string (in the correct order!) followed by a carriage
|
||||
return (&0D).
|
||||
|
||||
MODE
|
||||
This statement is not implemented.
|
||||
|
||||
MOVE
|
||||
This statement is not implemented.
|
||||
|
||||
PLOT
|
||||
This statement is not implemented.
|
||||
|
||||
POINT
|
||||
This function is not implemented.
|
||||
|
||||
PRINT#
|
||||
The format of data files is different from that used by the BBC Micro, in
|
||||
part to improve compatibility with standard CP/M files. Numeric values
|
||||
are stored as five bytes in the format documented under CALL; if the
|
||||
fifth byte is zero the value is an integer. Strings are stored as the
|
||||
characters of the string (in the correct order!) followed by a carriage
|
||||
return (&0D).
|
||||
|
||||
PUT
|
||||
A statement to output data to a processor port. Full 16-bit addressing
|
||||
is available.
|
||||
|
||||
PUT A%,N% : REM Output N% to port A%
|
||||
|
||||
SOUND
|
||||
This statement is not implemented.
|
||||
|
||||
TIME
|
||||
This pseudo-variable is not implemented in the distribution version, but
|
||||
can be supported by means of the customisation patch. See BBCDIST.MAC.
|
||||
|
||||
USR
|
||||
As with CALL, the processor's registers are initialised as follows:
|
||||
|
||||
A is initialised to the least significant byte of A%
|
||||
B is initialised to the least significant byte of B%
|
||||
C is initialised to the least significant byte of C%
|
||||
D is initialised to the least significant byte of D%
|
||||
E is initialised to the least significant byte of E%
|
||||
F is initialised to the least significant byte of F%
|
||||
H is initialised to the least significant byte of H%
|
||||
L is initialised to the least significant byte of L%
|
||||
|
||||
USR returns a 32-bit integer result composed of the processor's H, L, H'
|
||||
and L' registers, with H being the most significant.
|
||||
|
||||
|
||||
4. RESIDENT Z80 ASSEMBLER
|
||||
|
||||
The in-line assembler is accessed in exactly the same way as the 6502
|
||||
assembler in the BBC Micro version of BBC BASIC. That is, '[' enters
|
||||
assembler mode and ']' exits assembler mode.
|
||||
|
||||
All standard Zilog mnemonics are accepted: ADD, ADC and SBC must be
|
||||
followed by A or HL. For example, ADD A,C is accepted but ADD C is not.
|
||||
However, the brackets around the port number in IN and OUT are optional.
|
||||
Thus both OUT (5),A and OUT 5,A are accepted. The instruction IN F,(C)
|
||||
is not accepted, but the equivalent code is produced from IN (HL),C
|
||||
|
||||
The pseudo-ops DEFB, DEFW and DEFM are included. DEFM works like EQUS in
|
||||
the 6502 version.
|
||||
|
||||
|
||||
5. OPERATING SYSTEM INTERFACE
|
||||
|
||||
The following resident Operating System ("star") commands are
|
||||
implemented. They may be accessed directly (e.g. *BYE) or via the OSCLI
|
||||
statement (OSCLI "BYE").
|
||||
|
||||
Control characters, lower-case characters, DEL and quotation marks may be
|
||||
incorporated in filenames by using the 'escape' character '|'. However,
|
||||
there is no equivalent to the BBC Microcomputer's '|!' to set bit 7.
|
||||
|
||||
*BYE
|
||||
Returns control to the operating system (CP/M).
|
||||
|
||||
*CPM
|
||||
Same as *BYE.
|
||||
|
||||
*. [filespec]
|
||||
*DIR [filespec]
|
||||
List the files which match the (optional) ambiguous filespec. If the
|
||||
filespec is omitted, all .BBC files are listed:
|
||||
*DIR List all .BBC files on the disk
|
||||
*DIR B:*.* List all files on disk B:
|
||||
*.*.* List all files on the current disk
|
||||
|
||||
*DRIVE d:
|
||||
Select drive d as the default drive for subsequent disk operations.
|
||||
|
||||
*ERA filespec
|
||||
Erase (delete) the specified disk file or files. The extension defaults
|
||||
to .BBC if omitted.
|
||||
|
||||
*ESC [ON|OFF]
|
||||
*ESC OFF disables the abort action of the ESCape key; after *ESC OFF the
|
||||
ESCape key simply returns the ASCII code ESC (27). *ESC ON, or *ESC,
|
||||
restores the normal action of the ESCape key.
|
||||
|
||||
*EXEC filespec
|
||||
Accept console input from the specified file instead of from the
|
||||
keyboard. If the extension is omitted, .BBC is assumed.
|
||||
|
||||
*LOAD filespec aaaa
|
||||
Loads the specified file into memory at address aaaa. The load address
|
||||
must be specified. If the extension is omitted, .BBC is assumed.
|
||||
|
||||
*OPT [n]
|
||||
Select the destination for console output characters. The value n is in
|
||||
the range 0 to 2, as follows:
|
||||
|
||||
0 Send characters to the console output
|
||||
1 Send characters to the auxiliary output
|
||||
2 Send characters to the printer (list) output
|
||||
|
||||
*REN newfile=oldfile
|
||||
*RENAME newfile=oldfile
|
||||
Renames 'oldfile' as 'newfile'. If the extension is omitted, .BBC is
|
||||
assumed.
|
||||
|
||||
*RESET
|
||||
Rest the disk system (CP/M function 13). This command does not close any
|
||||
files nor does it perform any other housekeeping function. You should
|
||||
use *RESET after you have changed a disk.
|
||||
|
||||
*SAVE filespec aaaa bbbb
|
||||
*SAVE filespec aaaa +llll
|
||||
This command saves a specified range of memory to disk. The address range
|
||||
is specified either as start (aaaa) and end+1 (bbbb) or as start (aaaa)
|
||||
and length (llll). If the extension is omitted, .BBC is assumed.
|
||||
|
||||
*SPOOL [filespec]
|
||||
Copy all subsequent console output to the specified file. If the filename
|
||||
is omitted, any current spool file is closed and spooling is terminated.
|
||||
If the extension is omitted, .BBC is assumed.
|
||||
|
||||
*TYPE filespec
|
||||
Type the specified file to the screen. If the extension is omitted, .BBC
|
||||
is assumed.
|
||||
|
||||
*| comment
|
||||
This is a comment line. Anything following the | is ignored.
|
||||
|
||||
|
||||
6. ERROR MESSAGES AND CODES
|
||||
|
||||
Untrappable:
|
||||
|
||||
No room RENUMBER space
|
||||
Silly LINE space
|
||||
Sorry Bad program
|
||||
|
||||
Trappable - BASIC:
|
||||
|
||||
1 Out of range 24 Exp range
|
||||
2 25
|
||||
3 26 No such variable
|
||||
4 Mistake 27 Missing )
|
||||
5 Missing , 28 Bad HEX
|
||||
6 Type mismatch 29 No such FN/PROC
|
||||
7 No FN 30 Bad call
|
||||
8 31 Arguments
|
||||
9 Missing " 32 No FOR
|
||||
10 Bad DIM 33 Can't match FOR
|
||||
11 DIM space 34 FOR variable
|
||||
12 Not LOCAL 35
|
||||
13 No PROC 36 No TO
|
||||
14 Array 37
|
||||
15 Subscript 38 No GOSUB
|
||||
16 Syntax error 39 ON syntax
|
||||
17 Escape 40 ON range
|
||||
18 Division by zero 41 No such line
|
||||
19 String too long 42 Out of DATA
|
||||
20 Too big 43 No REPEAT
|
||||
21 -ve root 44
|
||||
22 Log range 45 Missing #
|
||||
23 Accuracy lost
|
||||
|
||||
Trappable - OS:
|
||||
|
||||
190 Directory full 214 File not found
|
||||
192 Too many open files 222 Channel
|
||||
196 File exists 253 Bad string
|
||||
198 Disk full 254 Bad command
|
||||
200 Close error 255 CP/M error
|
||||
204 Bad name
|
||||
|
||||
|
||||
New features in BBC BASIC (Z80) version 5.00, May 2024:
|
||||
|
||||
1. BASIC V statements
|
||||
|
||||
1.1 WHILE...ENDWHILE
|
||||
1.2 Multi-line IF...THEN...ELSE...ENDIF
|
||||
1.3 CASE...WHEN...OTHERWISE...ENDCASE
|
||||
1.4 LOCAL DATA / RESTORE DATA
|
||||
1.5 ON ERROR LOCAL / RESTORE ERROR
|
||||
1.6 DIM var LOCAL size
|
||||
1.7 ERROR err, message$
|
||||
1.8 RESTORE +n
|
||||
1.9 SWAP var1,var2
|
||||
1.10 BPUT #file,string$[;]
|
||||
1.11 QUIT
|
||||
|
||||
2. BASIC V functions
|
||||
|
||||
2.1 DIM(array()[,sub])
|
||||
2.2 END (pointer to free space)
|
||||
2.3 REPORT$
|
||||
2.4 Binary constants
|
||||
2.5 LEFT$ & RIGHT$ with last parameter omitted
|
||||
2.6 MOD(array)
|
||||
2.7 SUM(array)
|
||||
2.8 SUMLEN(array)
|
||||
2.9 GET$#file
|
||||
|
||||
3. BASIC V whole array operations
|
||||
|
||||
3.1 Pass a whole array to a FN/PROC
|
||||
3.2 Pass a whole array to CALL
|
||||
3.3 Whole array assignment
|
||||
3.4 Whole array arithmetic *
|
||||
3.5 Array dot-product operator
|
||||
3.6 Array initialisation lists
|
||||
3.7 Array compound assignment (+= etc.)
|
||||
3.8 Make a whole array LOCAL
|
||||
3.9 DIM a LOCAL array (on the stack) +
|
||||
|
||||
* String array expressions A$() = B$() + C$() are not currently supported.
|
||||
+ LOCAL string arrays should be initialised to their maximum needed length
|
||||
to eliminate the risk of a memory leak each time the PROC/FN is called:
|
||||
LOCAL a$() : DIM a$(size%) : a$() = STRING$(max%, "a") : a$() = ""
|
||||
|
||||
4. Miscellaneous BASIC V features
|
||||
|
||||
4.1 Bit-shifts <<, >>, >>>
|
||||
4.2 Floating-point indirection (|)
|
||||
4.3 RETURNed parameters from FN/PROC
|
||||
4.4 Compound assignment (+=, -=, *=, /= etc.)
|
||||
4.5 Assigning to a sub-string: LEFT$()=, MID$()= , RIGHT$()=
|
||||
4.6 Hooks for CIRCLE,ELLIPSE,FILL,LINE,MOUSE,ORIGIN,RECTANGLE,TINT,SYS,WAIT
|
||||
4.7 Hooks for WIDTH function, TINT function, MODE function
|
||||
|
||||
5. Extensions to Acorn's BASIC V, compatible with BB4W, BBCSDL and BBCTTY
|
||||
|
||||
5.1 EXIT REPEAT / WHILE / FOR [var]
|
||||
5.2 Address-of operator ^
|
||||
5.3 Byte variables and arrays (& suffix)
|
||||
5.4 'BY len' and 'TO term' qualifiers to GET$#file
|
||||
5.5 ELSE IF <condition> THEN; (trailing semicolon)
|
||||
5.6 == synonymous with = in comparisons
|
||||
5.7 DIM a global array inside a FN/PROC (use RETURN)
|
||||
|
||||
Note: The token for PUT has changed from &CE in version 3 to &0E in version 5.
|
||||
If this token is present in existing programs it will list as ENDWHILE rather
|
||||
than PUT, and the programs will need to be modified to restore functionality.
|
||||
1494
Source/Apps/BBCBASIC/cmos.z80
Normal file
1494
Source/Apps/BBCBASIC/cmos.z80
Normal file
File diff suppressed because it is too large
Load Diff
69
Source/Apps/BBCBASIC/data.z80
Normal file
69
Source/Apps/BBCBASIC/data.z80
Normal file
@@ -0,0 +1,69 @@
|
||||
TITLE BBC BASIC (C) R.T.RUSSELL 1981-2024
|
||||
NAME ('DATA')
|
||||
;
|
||||
;RAM MODULE FOR BBC BASIC INTERPRETER
|
||||
;FOR USE WITH VERSION 5.0 OF BBC BASIC
|
||||
;(C) COPYRIGHT R.T.RUSSELL 1981-2024
|
||||
;
|
||||
GLOBAL ACCS
|
||||
GLOBAL BUFFER
|
||||
GLOBAL ONERSP
|
||||
GLOBAL LIBASE
|
||||
GLOBAL PAGE
|
||||
GLOBAL LOMEM
|
||||
GLOBAL FREE
|
||||
GLOBAL HIMEM
|
||||
GLOBAL RANDOM
|
||||
GLOBAL COUNT
|
||||
GLOBAL WIDTH
|
||||
GLOBAL ERL
|
||||
GLOBAL ERR
|
||||
GLOBAL ERRTRP
|
||||
GLOBAL ERRTXT
|
||||
GLOBAL TRACEN
|
||||
GLOBAL AUTONO
|
||||
GLOBAL INCREM
|
||||
GLOBAL LISTON
|
||||
GLOBAL DATPTR
|
||||
GLOBAL FNPTR
|
||||
GLOBAL PROPTR
|
||||
GLOBAL STAVAR
|
||||
GLOBAL OC
|
||||
GLOBAL PC
|
||||
GLOBAL DYNVAR
|
||||
GLOBAL CURLIN
|
||||
GLOBAL USER
|
||||
;
|
||||
;n.b. ACCS, BUFFER & STAVAR must be on page boundaries.
|
||||
;
|
||||
ACCS: DEFS 256 ;STRING ACCUMULATOR
|
||||
BUFFER: DEFS 256 ;STRING INPUT BUFFER
|
||||
STAVAR: DEFS 27*4 ;STATIC VARIABLES
|
||||
OC EQU STAVAR+15*4 ;CODE ORIGIN (O%)
|
||||
PC EQU STAVAR+16*4 ;PROGRAM COUNTER (P%)
|
||||
DYNVAR: DEFS 54*2 ;DYN. VARIABLE POINTERS
|
||||
FNPTR: DEFS 2 ;DYN. FUNCTION POINTER
|
||||
PROPTR: DEFS 2 ;DYN. PROCEDURE POINTER
|
||||
;
|
||||
PAGE: DEFS 2 ;START OF USER PROGRAM
|
||||
LOMEM: DEFS 2 ;START OF DYN. STORAGE
|
||||
FREE: DEFS 2 ;FIRST FREE-SPACE BYTE
|
||||
HIMEM: DEFS 2 ;FIRST BYTE ABOVE STACK
|
||||
LIBASE: DEFS 2 ;START OF FIRST LIBRARY
|
||||
;
|
||||
TRACEN: DEFS 2 ;TRACE FLAG AND NUMBER
|
||||
AUTONO: DEFS 2 ;AUTO FLAG AND NUMBER
|
||||
ERRTRP: DEFS 2 ;ON ERROR STMT POINTER \
|
||||
ONERSP: DEFS 2 ;ON ERROR LOCAL STKPTR /
|
||||
ERRTXT: DEFS 2 ;ERROR MESSAGE POINTER
|
||||
DATPTR: DEFS 2 ;DATA POINTER
|
||||
ERL: DEFS 2 ;LINE NO OF LAST ERROR
|
||||
CURLIN: DEFS 2 ;POINTER TO CURRENT LINE
|
||||
RANDOM: DEFS 5 ;RANDOM NUMBER
|
||||
COUNT: DEFS 1 ;PRINT POSITION
|
||||
WIDTH: DEFS 1 ;PRINT WIDTH
|
||||
ERR: DEFS 1 ;ERROR NUMBER
|
||||
LISTON: DEFS 1 ;LISTO & OPT FLAG
|
||||
INCREM: DEFS 1 ;AUTO INCREMENT
|
||||
;
|
||||
USER: END
|
||||
241
Source/Apps/BBCBASIC/dist.z80
Normal file
241
Source/Apps/BBCBASIC/dist.z80
Normal file
@@ -0,0 +1,241 @@
|
||||
TITLE BBCDIST.Z80 (C) R.T.RUSSELL 1982-2024
|
||||
NAME ('DIST3')
|
||||
;
|
||||
;BBC BASIC (Z80) - CP/M VERSION 2.20 & 3.00
|
||||
;(C) COPYRIGHT R.T.RUSSELL, 1982-2024.
|
||||
;ALL RIGHTS RESERVED.
|
||||
;
|
||||
;THIS PROGRAM ALLOWS THE USER TO ADAPT BBC BASIC TO THE
|
||||
;PARTICULAR CHARACTERISTICS OF HIS SYSTEM HARDWARE ETC.
|
||||
;
|
||||
;THE PROGRAM RESIDES AT 100H FOR EASE OF LOADING.
|
||||
;*** IT MUST NOT EXCEED 256 BYTES IN TOTAL LENGTH ***
|
||||
;
|
||||
;PLEASE NOTE THAT A Z80 PROCESSOR AND CP/M VERSION 2.2
|
||||
;OR LATER ARE REQUIRED.
|
||||
;
|
||||
;R.T.RUSSELL, 11-03-1984, 03-05-1989, 12-05-2024
|
||||
;
|
||||
CPM EQU 5
|
||||
COLD EQU 200H
|
||||
;
|
||||
CR EQU 0DH
|
||||
LF EQU 0AH
|
||||
ESC EQU 1BH
|
||||
;
|
||||
GLOBAL CLRSCN
|
||||
GLOBAL PUTCSR
|
||||
GLOBAL GETCSR
|
||||
GLOBAL PUTIME
|
||||
GLOBAL GETIME
|
||||
GLOBAL GETKEY
|
||||
GLOBAL BYE
|
||||
GLOBAL BEGIN
|
||||
; GLOBAL BDOS
|
||||
;
|
||||
; EXTRN PRTDEC16
|
||||
;
|
||||
;ASEG
|
||||
;ORG 100H
|
||||
;
|
||||
;JUMP TABLE - BASIC makes calls to hardware-dependent
|
||||
;features via this table:
|
||||
;
|
||||
BEGIN: JP INIT
|
||||
CLRSCN: JP CLS ;CLEAR SCREEN
|
||||
PUTCSR: JP PCSR ;SET CURSOR POSN.
|
||||
GETCSR: JP GCSR ;READ CURSOR POSN.
|
||||
PUTIME: JP PTIME ;SET ELAPSED TIME
|
||||
GETIME: JP GTIME ;READ ELAPSED TIME
|
||||
GETKEY: JP INKEY ;READ KEY (TIME LIMIT)
|
||||
BYE: JP REBOOT ;RETURN TO CP/M
|
||||
;
|
||||
;BDOS - Save the IX and IY registers and before performing a
|
||||
; CP/M function call.
|
||||
;
|
||||
BDOS: PUSH IX
|
||||
PUSH IY
|
||||
CALL CPM
|
||||
POP IY
|
||||
POP IX
|
||||
RET
|
||||
;
|
||||
;INIT - Perform hardware initialisation (if any).
|
||||
;
|
||||
INIT: LD HL,40H ;CPM/HBIOS MARKER LOC
|
||||
LD A,'W'
|
||||
CP (HL)
|
||||
JR NZ,FAIL
|
||||
INC HL
|
||||
LD A,NOT 'W'
|
||||
CP (HL)
|
||||
JR NZ,FAIL
|
||||
JP COLD
|
||||
FAIL: LD DE,NOTHB
|
||||
LD C,9
|
||||
CALL BDOS
|
||||
RST 0
|
||||
;
|
||||
NOTHB: DEFB 'CP/M w/ HBIOS required$'
|
||||
;
|
||||
;REBOOT - Switch off interrupts and return to CP/M
|
||||
;
|
||||
REBOOT: RST 0
|
||||
;
|
||||
;GTIME - Read elapsed-time clock.
|
||||
; Outputs: DEHL = elapsed time (centiseconds)
|
||||
; Destroys: A,D,E,H,L,F
|
||||
;
|
||||
GTIME: JR TICKS
|
||||
;
|
||||
;PTIME - Load elapsed-time clock.
|
||||
; Inputs: DEHL = time to load (centiseconds)
|
||||
; Destroys: A,D,E,H,L,F
|
||||
;
|
||||
PTIME:
|
||||
LD BC,0F9D0H
|
||||
SRL D
|
||||
RR E
|
||||
RR H
|
||||
RR L
|
||||
RST 08
|
||||
RET
|
||||
;
|
||||
; Get OS elapsed-time clock
|
||||
; Outputs: DEHL = time (centiseconds)
|
||||
; Destroys: A,B,C,D,E,H,L,F
|
||||
;
|
||||
TICKS: LD BC,0F8D0H
|
||||
RST 08
|
||||
SLA L
|
||||
RL H
|
||||
RL E
|
||||
RL D
|
||||
RET
|
||||
;
|
||||
;INKEY - Sample keyboard with specified wait.
|
||||
; Inputs: HL = Time to wait (centiseconds)
|
||||
; Outputs: Carry reset indicates time-out.
|
||||
; If carry set, A = character typed.
|
||||
; Destroys: A,D,E,H,L,F
|
||||
;
|
||||
INKEY: PUSH BC
|
||||
PUSH HL
|
||||
CALL TICKS
|
||||
POP DE
|
||||
ADD HL,DE
|
||||
WAIT: PUSH HL
|
||||
LD C,6
|
||||
LD E,0FFH
|
||||
CALL BDOS
|
||||
POP HL
|
||||
OR A
|
||||
SCF
|
||||
JR NZ,INKEY1
|
||||
PUSH HL
|
||||
CALL TICKS
|
||||
POP DE
|
||||
SBC HL,DE
|
||||
EX DE,HL
|
||||
JR C,WAIT
|
||||
INKEY1: POP BC
|
||||
RET
|
||||
;
|
||||
;CLS - Clear screen.
|
||||
; (Customise to suit your VDU)
|
||||
; Destroys: A,D,E,H,L,F
|
||||
;
|
||||
CLS:
|
||||
LD DE,CLSSTR
|
||||
LD C,9
|
||||
JP BDOS
|
||||
;
|
||||
CLSSTR: DEFB ESC,'[H',ESC,'[2J$'
|
||||
;
|
||||
;PCSR - Move cursor to specified position.
|
||||
; Inputs: DE = horizontal position (LHS=0)
|
||||
; HL = vertical position (TOP=0)
|
||||
; Destroys: A,D,E,H,L,F
|
||||
;
|
||||
PCSR: LD B,L ; vertical = line (row)
|
||||
CALL CONV ; normalized and convert to decimal
|
||||
LD (LIN),HL ; and store into string
|
||||
LD B,E ; horizontal = column
|
||||
CALL CONV ; normalized and convert to decimal
|
||||
LD (COL),HL ; and store into string
|
||||
LD C,9 ; output string command
|
||||
LD DE,CURS ; start of string
|
||||
JP BDOS ; output string to terminal
|
||||
;
|
||||
; VT100 sequence for cursor positioning
|
||||
CURS: DEFB 27, '['
|
||||
LIN: DEFW 0 ; high byte, low byte for decimal line
|
||||
DEFB ';'
|
||||
COL: DEFW 0 ; high byte, low byte for decimal column
|
||||
DEFB 'H$'
|
||||
;
|
||||
; convert binary B (0 <= B < 99, not checked) into B+1 in decimal.
|
||||
; L = upper byte, H = lower byte. ready for LD (...), HL
|
||||
; destroys A, B, L, H
|
||||
; optimized for space over time
|
||||
;
|
||||
CONV: INC B ; normalize, home in VT100 is (1,1)
|
||||
LD A,'0' ; A is counter for low byte of result
|
||||
LD L,A ; L is counter for high byte of result
|
||||
CONVLP: INC A ; now B times increment AL in decimal
|
||||
CP '9'+1 ; low byte overflow?
|
||||
JR NZ,CONT ; no, continue incrementing
|
||||
LD A,'0' ; reset low byte
|
||||
INC L ; and increment high byte
|
||||
CONT: DJNZ CONVLP ; B times
|
||||
LD H,A ; put low byte into right place
|
||||
RET
|
||||
;
|
||||
;GCSR - Return cursor coordinates.
|
||||
; Outputs: DE = X coordinate (POS)
|
||||
; HL = Y coordinate (VPOS)
|
||||
; Destroys: A,D,E,H,L,F
|
||||
;
|
||||
GCSR: LD DE,0
|
||||
LD HL,0
|
||||
RET
|
||||
;
|
||||
;COUT - Output a character to the console
|
||||
; Inputs: A = character
|
||||
; Destroys: A,F
|
||||
;
|
||||
COUT: PUSH BC
|
||||
PUSH DE
|
||||
PUSH HL
|
||||
LD E,A
|
||||
LD C,2
|
||||
CALL BDOS
|
||||
POP HL
|
||||
POP DE
|
||||
POP BC
|
||||
RET
|
||||
;
|
||||
;IF $ GT 1F0H
|
||||
IF $-BEGIN GT 0F0H
|
||||
ERROR 'INSUFFICIENT SPACE'
|
||||
ENDIF
|
||||
;
|
||||
;ORG 1F0H
|
||||
DEFS 0F0H - ($ - BEGIN)
|
||||
;
|
||||
OFFLO: DEFW 0 ;TIME OFFSET LO
|
||||
OFFHI: DEFW 0 ;TIME OFFSET HI
|
||||
DEFB 80 ;WIDTH
|
||||
DEFB 'G' AND 1FH ;CURSOR UP
|
||||
DEFB 'O' AND 1FH ;CURSOR DOWN
|
||||
DEFB 'F' AND 1FH ;START OF LINE
|
||||
DEFB 'N' AND 1FH ;END OF LINE
|
||||
DEFB 'X' AND 1FH ;DELETE TO END OF LINE
|
||||
DEFB 08H ;BACKSPACE & DELETE
|
||||
DEFB 'U' AND 1FH ;DEL TO START OF LINE
|
||||
DEFB 'J' AND 1FH ;CURSOR LEFT
|
||||
DEFB 'L' AND 1FH ;CURSOR RIGHT
|
||||
DEFB 'R' AND 1FH ;DELETE CHARACTER
|
||||
DEFB 'Q' AND 1FH ;INS/OVR TOGGLE
|
||||
;
|
||||
FIN: END
|
||||
2587
Source/Apps/BBCBASIC/eval.z80
Normal file
2587
Source/Apps/BBCBASIC/eval.z80
Normal file
File diff suppressed because it is too large
Load Diff
3274
Source/Apps/BBCBASIC/exec.z80
Normal file
3274
Source/Apps/BBCBASIC/exec.z80
Normal file
File diff suppressed because it is too large
Load Diff
64
Source/Apps/BBCBASIC/hook.z80
Normal file
64
Source/Apps/BBCBASIC/hook.z80
Normal file
@@ -0,0 +1,64 @@
|
||||
NAME ('HOOK')
|
||||
;
|
||||
GLOBAL CLG
|
||||
GLOBAL COLOUR
|
||||
GLOBAL DRAW
|
||||
GLOBAL ENVEL
|
||||
GLOBAL GCOL
|
||||
GLOBAL MODE
|
||||
GLOBAL MOVE
|
||||
GLOBAL PLOT
|
||||
GLOBAL SOUND
|
||||
GLOBAL PUTIMS
|
||||
GLOBAL CIRCLE
|
||||
GLOBAL ELLIPSE
|
||||
GLOBAL FILL
|
||||
GLOBAL MOUSE
|
||||
GLOBAL ORIGIN
|
||||
GLOBAL RECTAN
|
||||
GLOBAL LINE
|
||||
GLOBAL TINT
|
||||
GLOBAL WAIT
|
||||
GLOBAL SYS
|
||||
;
|
||||
GLOBAL ADVAL
|
||||
GLOBAL POINT
|
||||
GLOBAL GETIMS
|
||||
GLOBAL TINTFN
|
||||
GLOBAL MODEFN
|
||||
GLOBAL WIDFN
|
||||
;
|
||||
EXTRN EXTERR
|
||||
;
|
||||
CLG:
|
||||
COLOUR:
|
||||
DRAW:
|
||||
ENVEL:
|
||||
GCOL:
|
||||
MODE:
|
||||
MOVE:
|
||||
PLOT:
|
||||
SOUND:
|
||||
ADVAL:
|
||||
POINT:
|
||||
GETIMS:
|
||||
PUTIMS:
|
||||
CIRCLE:
|
||||
ELLIPSE:
|
||||
FILL:
|
||||
MOUSE:
|
||||
ORIGIN:
|
||||
RECTAN:
|
||||
LINE:
|
||||
TINT:
|
||||
TINTFN:
|
||||
MODEFN:
|
||||
WIDFN:
|
||||
WAIT:
|
||||
SYS:
|
||||
XOR A
|
||||
CALL EXTERR
|
||||
DEFM 'Sorry'
|
||||
DEFB 0
|
||||
;
|
||||
END
|
||||
2237
Source/Apps/BBCBASIC/main.z80
Normal file
2237
Source/Apps/BBCBASIC/main.z80
Normal file
File diff suppressed because it is too large
Load Diff
2267
Source/Apps/BBCBASIC/math.z80
Normal file
2267
Source/Apps/BBCBASIC/math.z80
Normal file
File diff suppressed because it is too large
Load Diff
@@ -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
|
||||
@@ -32,6 +29,8 @@ pushd Dev && call Build || exit /b & popd
|
||||
pushd VGM && call Build || exit /b & popd
|
||||
pushd cpuspd && call Build || exit /b & popd
|
||||
pushd Survey && call Build || exit /b & popd
|
||||
pushd HTalk && call Build || exit /b & popd
|
||||
pushd BBCBASIC && call Build || exit /b & popd
|
||||
|
||||
copy *.com %APPBIN%\ || exit /b
|
||||
|
||||
|
||||
@@ -18,3 +18,5 @@ pushd Dev && call Clean || exit /b 1 & popd
|
||||
pushd VGM && call Clean || exit /b 1 & popd
|
||||
pushd cpuspd && call Clean || exit /b 1 & popd
|
||||
pushd Survey && call Clean || exit /b 1 & popd
|
||||
pushd HTalk && call Clean || exit /b 1 & popd
|
||||
pushd BBCBASIC && call Clean || exit /b 1 & popd
|
||||
|
||||
158
Source/Apps/FAT/ReadMe.md
Normal file
158
Source/Apps/FAT/ReadMe.md
Normal file
@@ -0,0 +1,158 @@
|
||||
# RomWBW HBIOS CP/M FAT Utility ("FAT.COM")
|
||||
|
||||
Author: Wayne Warthen \
|
||||
Updated: 6-May-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.
|
||||
|
||||
- The `FAT FORMAT` command will not perform a physical format on
|
||||
floppy disks. You must use FDU to do this prior to using
|
||||
`FAT FORMAT`.
|
||||
|
||||
- Formatting (`FAT FORMAT`) of floppies does not work well. The
|
||||
underlying FatFs library uses some non-standard fields. The
|
||||
resulting floppy may or may not be useable on other systems. It is
|
||||
best to format a FAT floppy on a Windows or DOS system. You should
|
||||
have no problems copying files to/from such a floppy using `FAT`.
|
||||
|
||||
### Known Issues
|
||||
|
||||
- CP/M (and workalike) OSes have significant restrictions on filename
|
||||
characters. The FAT application will block any attempt to create a
|
||||
file on the CP/M filesystem containing any of these prohibited
|
||||
characters:
|
||||
|
||||
| `< > . , ; : ? * [ ] |/ \`
|
||||
|
||||
The operation will be aborted with "`Error: Invalid Path Name`" if such
|
||||
a filename character is encountered.
|
||||
|
||||
Since MS-DOS does allow some of these characters, you can have
|
||||
issues when copying files from MS-DOS to CP/M if the MS-DOS filenames
|
||||
use these characters. Unfortunately, FAT is not yet smart enough to
|
||||
substitute illegal characters with legal ones. So, you will need to
|
||||
clean the filenames before trying to copy them to CP/M.
|
||||
|
||||
- The FAT application does try to detect the scenario where you are
|
||||
copying a file to itself. However, this detection is not perfect and
|
||||
can corrupt a file if it occurs. Be careful to avoid this.
|
||||
|
||||
### 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) |
|
||||
| 6-May-2024 | v1.1.0 | improve floppy format boot record |
|
||||
@@ -1,104 +0,0 @@
|
||||
RomWBW HBIOS CP/M FAT Utility ("FAT.COM")
|
||||
|
||||
Author: Wayne Warthen
|
||||
Updated: 12-Apr-2021
|
||||
|
||||
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
|
||||
|
||||
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:
|
||||
@@ -153,7 +156,8 @@ JP2 (/FAULT) shorted, JP3 (MINI): 2-3, JP4 (/DC/RDY): 2-3.
|
||||
|
||||
The RCBus Scott Baker WDC-based floppy module should be jumpered
|
||||
for I/O base address 0x50 (SV1: 11-12), JP1 (/DACK): 1-2,
|
||||
JP2 (TC): 2-3.
|
||||
JP2 (TC): 2-3. Note that pin 1 of JPX jumpers is toward the bottom
|
||||
of the board.
|
||||
|
||||
The RCBus FDC by Alan Cox (Etched Pixels) needs to be strapped
|
||||
for base I/O address 0x48.
|
||||
@@ -164,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
|
||||
------------------
|
||||
@@ -532,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
|
||||
|
||||
14
Source/Apps/HTalk/Build.cmd
Normal file
14
Source/Apps/HTalk/Build.cmd
Normal file
@@ -0,0 +1,14 @@
|
||||
@echo off
|
||||
setlocal
|
||||
|
||||
set TOOLS=../../../Tools
|
||||
set PATH=%TOOLS%\tasm32;%PATH%
|
||||
set TASMTABS=%TOOLS%\tasm32
|
||||
|
||||
echo Building HTalk...
|
||||
tasm -t80 -g3 -fFF htalk.asm htalk.com %htalk.lst || exit /b
|
||||
|
||||
copy /Y htalk.com ..\..\..\Binary\Apps\ || exit /b
|
||||
rem copy /Y *.ovr ..\..\..\Binary\Apps\ || exit /b
|
||||
rem copy /Y *.hlp ..\..\..\Binary\Apps\ || exit /b
|
||||
rem copy /Y *.doc ..\..\..\Binary\Apps\ || exit /b
|
||||
5
Source/Apps/HTalk/Clean.cmd
Normal file
5
Source/Apps/HTalk/Clean.cmd
Normal file
@@ -0,0 +1,5 @@
|
||||
@echo off
|
||||
setlocal
|
||||
|
||||
if exist *.com del *.com
|
||||
if exist *.lst del *.lst
|
||||
10
Source/Apps/HTalk/Makefile
Normal file
10
Source/Apps/HTalk/Makefile
Normal file
@@ -0,0 +1,10 @@
|
||||
OBJECTS = htalk.com
|
||||
#DOCS = htalk.txt
|
||||
DEST = ../../../Binary/Apps
|
||||
DOCDEST = ../../../Binary/Apps
|
||||
TOOLS = ../../../Tools
|
||||
include $(TOOLS)/Makefile.inc
|
||||
|
||||
%.com: USETASM=1
|
||||
|
||||
|
||||
725
Source/Apps/HTalk/htalk.asm
Normal file
725
Source/Apps/HTalk/htalk.asm
Normal file
@@ -0,0 +1,725 @@
|
||||
;===============================================================================
|
||||
;HTALK - BARE MINIMUM TERMINAL INTERFACE
|
||||
;
|
||||
; CONSOLE TALKS TO ARBITRARY CHARACTER DEVICE.
|
||||
;===============================================================================
|
||||
;
|
||||
; AUTHOR: TOM PLANO (TOMPLANO@PROTON.ME)
|
||||
;
|
||||
; USAGE:
|
||||
; HTALK $<CHAR_DEVICE_NUM>
|
||||
;
|
||||
;_______________________________________________________________________________
|
||||
;
|
||||
; CHANGE LOG:
|
||||
; I'VE NOTATED SECTIONS OF CODE THAT ARNT REQUIRED IF THIS APP IS
|
||||
; INCORPORATED INTO DBGMOD WITH A <OPT> TAG
|
||||
;
|
||||
;_______________________________________________________________________________
|
||||
;
|
||||
; TODO:
|
||||
; SEE ENUM_DEV1 TODO
|
||||
;
|
||||
;
|
||||
;_______________________________________________________________________________
|
||||
;
|
||||
;===============================================================================
|
||||
; DEFINITIONS
|
||||
;===============================================================================
|
||||
;
|
||||
STKSIZ .EQU $FF
|
||||
;
|
||||
; HBIOS SYSTEM CALLS AND ID STRING ADDRESS
|
||||
;
|
||||
ROMWBW_ID .EQU $FFFE ; ROMWBW ID STRING ADDRESS
|
||||
HBIOS_SYS .EQU $FFF0 ; HBIOS SYSCALL ADDRESS
|
||||
|
||||
H_SYSGET .EQU $F8 ; GET SYSTEM INFO
|
||||
H_CIOCNT .EQU $00 ; GET CHAR DEV COUNT SUBFUNCTION
|
||||
|
||||
BF_CIOIN .EQU $00 ; HBIOS CHAR INPUT
|
||||
BF_CIOOUT .EQU $01 ; HBIOS CHAR OUTPUT
|
||||
BF_CIOIST .EQU $02 ; HBIOS CHAR INPUT STATUS
|
||||
BF_CIOOST .EQU $03 ; HBIOS CHAR OUTPUT STATUS
|
||||
BF_CIOINIT .EQU $04 ; HBIOS CHAR I/O INIT
|
||||
BF_CIOQUERY .EQU $05 ; HBIOS CHAR I/O QUERY
|
||||
BF_CIODEVICE .EQU $06 ; HBIOS CHAR I/O DEVICE
|
||||
;
|
||||
; SUPPORTED HBIOS CIO DEVICE TYPES
|
||||
;
|
||||
CIODEV_UART .EQU $00 ; 16C550 FAMILY SERIAL INTERFACE UART.ASM
|
||||
CIODEV_ASCI .EQU $10 ; Z180 BUILT-IN SERIAL PORTS ASCI.ASM
|
||||
CIODEV_TERM .EQU $20 ; TERMINAL ANSI.ASM
|
||||
CIODEV_PRPCON .EQU $30 ; PROPIO SERIAL CONSOLE INTERFACE PRP.ASM
|
||||
CIODEV_PPPCON .EQU $40 ; PARPORTPROP SERIAL CONSOLE INTERFACE PPP.ASM
|
||||
CIODEV_SIO .EQU $50 ; ZILOG SERIAL PORT INTERFACE SIO.ASM
|
||||
CIODEV_ACIA .EQU $60 ; MC68B50 ASYNCHRONOUS INTERFACE ACIA.ASM
|
||||
CIODEV_PIO .EQU $70 ; ZILOG PARALLEL INTERFACE CONTROLLER PIO.ASM
|
||||
CIODEV_UF .EQU $80 ; FT232H-BASED ECB USB FIFO UF.ASM
|
||||
CIODEV_DUART .EQU $90 ; SCC2681 FAMILY DUAL UART DUART.ASM
|
||||
CIODEV_Z2U .EQU $A0 ; ZILOG Z280 BUILT-IN SERIAL PORTS Z2U.ASM
|
||||
CIODEV_LPT .EQU $B0 ; PARALLEL I/O CONTROLLER LPT.ASM
|
||||
|
||||
; HBIOS CURRENT CONSOLE NUMBER
|
||||
CIO_CONSOLE .EQU $80
|
||||
|
||||
; SPECIAL CHARS
|
||||
CTRLC .EQU $03
|
||||
CHR_BEL .EQU $07
|
||||
CHR_CR .EQU $0D
|
||||
CHR_LF .EQU $0A
|
||||
CHR_BS .EQU $08
|
||||
CHR_ESC .EQU $1B
|
||||
CHR_DEL .EQU $7F
|
||||
|
||||
;
|
||||
;===============================================================================
|
||||
; BEGIN MAIN PROGRAM
|
||||
;===============================================================================
|
||||
;
|
||||
.ORG $0100
|
||||
;
|
||||
; SETUP STACK (SAVE OLD VALUE)
|
||||
; <OPT> HANDLED BY DBGMON
|
||||
LD (STKSAV),SP
|
||||
LD SP,STACK
|
||||
|
||||
|
||||
;
|
||||
; INITIALIZATION + STARTUP MESSAGE + HBIOS DETECT
|
||||
; <OPT> HANDLED BY DBGMON
|
||||
CALL INIT_PROG
|
||||
JP NZ,EXIT
|
||||
;
|
||||
; LIST HBIOS DEV OPTIONS FOR REFERENCE
|
||||
; ALSO GETS MAX CONN
|
||||
;
|
||||
; <OPT> THIS IS OPTIONAL BECAUSE IF A CHAR DEVICE DOESNT EXIST, WE NEVER READ OR
|
||||
; WRITE TO IT, WE SIMPLY CALL CIOIST AND CIOOST OVER AND OVER ON IT, WITHOUT
|
||||
; EVER PUSHING DATA TO IT
|
||||
CALL ENUM_DEV
|
||||
JP NZ,EXIT
|
||||
;
|
||||
; PARSE COMMAND LINE
|
||||
;
|
||||
CALL PARSE
|
||||
JP NZ,EXIT
|
||||
;
|
||||
; RUN CONVERSTION WITH CHAR DEVICE
|
||||
;
|
||||
CALL TALK
|
||||
;
|
||||
; DONE
|
||||
JP EXIT
|
||||
|
||||
|
||||
;
|
||||
; CLEAN UP AND RETURN TO CALLING PROCESS
|
||||
;
|
||||
EXIT:
|
||||
CALL NEWLINE ; ...
|
||||
LD HL,STR_EXITMSG ; LOAD EXIT STRING
|
||||
CALL PRTSTR ; PRINT IT
|
||||
CALL NEWLINE ; ...
|
||||
LD SP,(STKSAV) ; RESET STACK
|
||||
RET ; RETURN TO CALLER
|
||||
|
||||
|
||||
;
|
||||
;===============================================================================
|
||||
; END MAIN PROGRAM
|
||||
;===============================================================================
|
||||
;
|
||||
|
||||
;
|
||||
;===============================================================================
|
||||
; BEGIN MAIN PROGRAM SUBROUTINES
|
||||
;===============================================================================
|
||||
;
|
||||
|
||||
INIT_PROG:
|
||||
LD HL, STR_BANNER ; LOAD WELCOME BANNER
|
||||
CALL PRTSTR ; PRINT IT
|
||||
CALL NEWLINE ; ...
|
||||
LD HL,(ROMWBW_ID) ; GET FIRST BYTE OF ROMWBW MARKER
|
||||
LD A,(HL) ; ... THROUGH HL
|
||||
CP 'W' ; MATCH?
|
||||
JP NZ,NOTHBIOS ; ABORT WITH INVALID CONFIG BLOCK
|
||||
INC HL ; NEXT BYTE (MARKER BYTE 2)
|
||||
LD A,(HL) ; LOAD IT
|
||||
CP ~'W' ; MATCH?
|
||||
JP NZ,NOTHBIOS ; ABORT WITH INVALID CONFIG BLOCK
|
||||
LD HL,STR_HBIOS ; POINT TO HBIOS STR
|
||||
CALL PRTSTR ; PRINT IT
|
||||
CALL NEWLINE ; ...
|
||||
RET
|
||||
;
|
||||
; HBOIS NOT DETECTED, BAIL OUT W/ ERROR
|
||||
;
|
||||
NOTHBIOS:
|
||||
LD HL,STR_BIOERR ; LOAD HBIOS NOT FOUND STR
|
||||
CALL PRTSTR ; PRINT IT
|
||||
CALL NEWLINE ; ...
|
||||
AND $FF ; SET FLAGS
|
||||
RET
|
||||
|
||||
ENUM_DEV:
|
||||
;
|
||||
; CHAR COUNT HEADER
|
||||
;
|
||||
LD HL,STR_DEVS_FOUND
|
||||
CALL PRTSTR
|
||||
;
|
||||
;GET COUNT OF CHAR UNITS
|
||||
;
|
||||
LD B,H_SYSGET ; LOAD SYSGET HBIOS FUNCTION
|
||||
LD C,H_CIOCNT ; LOAD SYSGET CHAR DEV COUNT SUBFUNCTION
|
||||
CALL HBIOS_SYS ; JUMP TO HBIOS
|
||||
OR A ; SET FLAGS
|
||||
JP NZ, EXIT ; JUMP TO EXIT ON FAILED
|
||||
LD A,E ; NUM CHAR DEVICES NOW IN A
|
||||
|
||||
DEC A ; DEC NUM DEVICES TO BE 0 INDEXED
|
||||
LD (CIODEV_CNT), A ; STORE BEFORE PRINT
|
||||
LD (CIODEV_MAX), A ; STORE BEFORE PRINT
|
||||
INC A ; RESTORE NUM DEVICES VALUE
|
||||
|
||||
CALL PRTHEX ; PRINT NUMBER OF UNITS FOUND
|
||||
CALL NEWLINE ; ...
|
||||
|
||||
ENUM_DEV1:
|
||||
|
||||
LD IX, TGT_DEV
|
||||
; TODO: H AND L DONT ALWAYS GET SET BY THE DRIVERS. FIND SOME WAY TO MASK
|
||||
; THEM OUT IF THEY ARE THE SAME BEFORE AND AFTER THE CALL?
|
||||
LD B, BF_CIODEVICE ; LOAD HBIOS FUNCTION TO QUERRY DEVICE INFO
|
||||
LD HL, CIODEV_CNT ; REQUEST A CHAR DEVICE
|
||||
LD C, (HL) ; ...
|
||||
LD (IX), C ; REMEMBER WHAT DEVICE WE ASKED FOR BEFORE BE
|
||||
CALL HBIOS_SYS ; EXECUTE HBIOS SUBROUTINE
|
||||
OR A ; SET FLAGS
|
||||
RET NZ ; RETURN FAILED
|
||||
;
|
||||
; STORE RESULTS OF HBOIS DEVICE QUERRY
|
||||
;
|
||||
LD A,C ; MOVE C TO A
|
||||
LD (IX+1), A ; STORE A DEVICE ATTRIBUTES, SKIP FIRST ENTRY
|
||||
LD A,D
|
||||
LD (IX+2), A
|
||||
LD A,E
|
||||
LD (IX+3), A
|
||||
LD A,H
|
||||
LD (IX+4), A
|
||||
LD A,L
|
||||
LD (IX+5), A
|
||||
;
|
||||
; PRINT FORMATED DATA LOOP
|
||||
;
|
||||
LD B, $06 ; PRINT THE 5 ELEMENTS OF DEV_STR_TBL
|
||||
LD HL,DEV_STR_TBL ; TABLE BASE PTR
|
||||
|
||||
PLOOP_BASE:
|
||||
CALL PRTSTR ; PTRSTR INCREMENTS HL FOR US
|
||||
LD A, (IX)
|
||||
CALL PRTHEX
|
||||
LD A, '|'
|
||||
CALL COUT
|
||||
INC IX
|
||||
DJNZ PLOOP_BASE
|
||||
|
||||
CALL NEWLINE
|
||||
|
||||
LD A, (CIODEV_CNT)
|
||||
DEC A
|
||||
LD (CIODEV_CNT), A
|
||||
JP P, ENUM_DEV1 ; JUMP WHILE CIODEV_CNT >=0
|
||||
AND $00
|
||||
RET
|
||||
|
||||
|
||||
;
|
||||
; RUN CONVERSTION WITH CHAR DEVICE
|
||||
;
|
||||
TALK:
|
||||
;
|
||||
; INIT PING PONG DEVICE POINTERS
|
||||
;
|
||||
LD IX, USER_CON ; LOAD VALUE AT ADDR USER_CON
|
||||
LD A, (IX) ; LOAD VALUE AT ADDR USER_CON
|
||||
LD (RF_DEV), A ; STORE TO ADDR RF_DEV
|
||||
LD A, (IX+1) ; LOAD VALUE AT ADDR TARGET_CON
|
||||
LD (WT_DEV), A ; STORE TO ADDR WT_DEV
|
||||
;
|
||||
; READ FROM RF_DEV -> WRITE TO WT_DEV
|
||||
;
|
||||
TALK_LOOP:
|
||||
;
|
||||
; CHECK FOR DATA ON RF_DEV
|
||||
;
|
||||
LD B,BF_CIOIST ; SET HBIOS FUNCTION TO RUN
|
||||
LD HL, RF_DEV
|
||||
LD C,(HL)
|
||||
CALL HBIOS_SYS ; CHECK FOR CHAR PENDING ON INPUT BUFFER USING HBIOS
|
||||
OR A ; SET FLAGS
|
||||
JP Z,TALK_NEXT ; JUMP NO CHARACTERS READY
|
||||
JP M,TALK_NEXT ; JUMP ERROR ON READ
|
||||
;
|
||||
; EXEC READ FROM RF_DEV
|
||||
;
|
||||
LD B,BF_CIOIN ; SET FUNCTION TO RUN
|
||||
LD HL, RF_DEV
|
||||
LD C,(HL) ; RETRIEVE CON_DEV_NUM TO READ/WRITE FROM ACTIVE CONSOLE
|
||||
CALL HBIOS_SYS ; CHECK FOR CHAR PENDING USING HBIOS
|
||||
LD A,E ; MOVE RESULT TO A
|
||||
CP CTRLC ; CHECK FOR EXIT REQUEST (CTRL+C)
|
||||
RET Z ; IF SO, BAIL OUT
|
||||
PUSH AF ; SAVE THE CHAR WE READ
|
||||
;
|
||||
; CHECK FOR SPACE ON WT_DEV
|
||||
;
|
||||
LD B,BF_CIOOST ; SET HBIOS FUNCTION TO RUN
|
||||
LD HL, WT_DEV
|
||||
LD C,(HL)
|
||||
CALL HBIOS_SYS ; CHECK FOR SPACE IN OUTPUT BUFFER USING HBIOS
|
||||
|
||||
OR A ; 0 OR 1 IS A VALID RETURN
|
||||
JP Z,TALK_NEXT ; JUMP NO SPACE
|
||||
JP M,TALK_NEXT ; JUMP ERROR ON WRITE
|
||||
;
|
||||
; EXEC WRITE TO WT_DEV
|
||||
;
|
||||
LD B,BF_CIOOUT ; SET HBIOS FUNCTION TO RUN
|
||||
LD HL, WT_DEV
|
||||
LD C,(HL) ; RETRIEVE TGT_DEV_NUM TO READ/WRITE FROM TARGET CHAR DEVICE
|
||||
;
|
||||
POP AF ; RECOVER THE CHARACTER
|
||||
LD E,A ; MOVE CHARACTER TO E
|
||||
CALL HBIOS_SYS ; WRITE CHAR USING HBIOS
|
||||
|
||||
TALK_NEXT:
|
||||
;
|
||||
; SWAP RF_DEV AND WT_DEV
|
||||
;
|
||||
LD IX, RF_DEV ; LOAD VALUE AT ADDR USER_CON
|
||||
LD A, (IX) ; LOAD VALUE AT ADDR RF_DEV
|
||||
LD B, (IX+1) ; LOAD VALUE AT ADDR WT_DEV
|
||||
LD (IX+1), A ; STORE TO OLD RF_DEV TO ADDR WT_DEV
|
||||
LD A, B ; MOVE OLD WT_DEV TO A
|
||||
LD (IX), A ; STORE TO OLD WT_DEF TO ADDR RF_DEV
|
||||
JP TALK_LOOP ; LOOP
|
||||
|
||||
;
|
||||
;===============================================================================
|
||||
; END MAIN PROGRAM SUBROUTINES
|
||||
;===============================================================================
|
||||
;
|
||||
|
||||
;
|
||||
;===============================================================================
|
||||
; BEGIN ROUTINES THAT ARE NOT COMPATIBLE WITH DBGMON
|
||||
;===============================================================================
|
||||
;
|
||||
|
||||
|
||||
PARSE:
|
||||
;
|
||||
LD HL,$81 ; POINT TO START OF COMMAND TAIL (AFTER LENGTH BYTE)
|
||||
CALL NONBLANK ; SKIP LEADING BLANKS,
|
||||
CALL HEXBYTE
|
||||
JP C,ERRHEXRD ; IF NOT, ERR
|
||||
LD (TARGET_CON),A ; REQUESTED TARGET CONN
|
||||
|
||||
LD B,A ; MOVE TO B
|
||||
|
||||
LD HL,CIODEV_MAX ; GRAB MAX VALUE OF TARGETCON
|
||||
LD A,(HL)
|
||||
|
||||
CP B ; CHECK IF B<=A
|
||||
JP M, ERROOR ; IF B>A, and both are less then 80 then S SET, ERR
|
||||
JP C, ERROOR ; IF B> 80 carry set instead (signed numbers problem)
|
||||
; swap A and B
|
||||
|
||||
JP PE, ERROOR ; IF B>A, C SET, ERR
|
||||
|
||||
LD HL, MSGTALKING ; PRINT TARGET DEVICE
|
||||
CALL PRTSTR
|
||||
LD A, B ; RETRIEVE TARGET CON
|
||||
CALL PRTHEX
|
||||
CALL NEWLINE
|
||||
|
||||
AND $00
|
||||
RET
|
||||
|
||||
|
||||
|
||||
;
|
||||
;NOT COMPATIBLE WITH THE DBGMON FUNCTION OF THE SAME NAME
|
||||
;
|
||||
NONBLANK:
|
||||
LD A,(HL) ; LOAD NEXT CHARACTER
|
||||
OR A ; STRING ENDS WITH A NULL
|
||||
RET Z ; IF NULL, RETURN POINTING TO NULL
|
||||
CP ' ' ; CHECK FOR BLANK
|
||||
RET NZ ; RETURN IF NOT BLANK
|
||||
INC HL ; IF BLANK, INCREMENT CHARACTER POINTER
|
||||
JR NONBLANK ; AND LOOP
|
||||
|
||||
;
|
||||
;
|
||||
;===============================================================================
|
||||
; END ROUTINES THAT ARE NOT COMPATIBLE WITH DBGMON
|
||||
;===============================================================================
|
||||
;
|
||||
|
||||
|
||||
|
||||
|
||||
;
|
||||
;===============================================================================
|
||||
; BEGIN ROUTINES THAT ARE LIFTED FROM DBGMON
|
||||
;===============================================================================
|
||||
;
|
||||
|
||||
|
||||
;
|
||||
; PRINT THE VALUE IN A IN HEX WITHOUT DESTROYING ANY REGISTERS
|
||||
;
|
||||
PRTHEX:
|
||||
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 COUT ; PRINT IT
|
||||
LD A,E ; GET THE LOW ORDER HEX CHAR
|
||||
CALL COUT ; PRINT IT
|
||||
POP DE ; RESTORE DE
|
||||
RET ; DONE
|
||||
|
||||
;
|
||||
; CONVERT BINARY VALUE IN A TO ASCII HEX CHARACTERS IN DE
|
||||
;
|
||||
|
||||
HEXASCII:
|
||||
LD D,A ; SAVE A IN D
|
||||
CALL HEXCONV ; CONVERT LOW NIBBLE OF A TO HEX
|
||||
LD E,A ; SAVE IT IN E
|
||||
LD A,D ; GET ORIGINAL VALUE BACK
|
||||
RLCA ; ROTATE HIGH ORDER NIBBLE TO LOW BITS
|
||||
RLCA
|
||||
RLCA
|
||||
RLCA
|
||||
CALL HEXCONV ; CONVERT NIBBLE
|
||||
LD D,A ; SAVE IT IN D
|
||||
RET ; DONE
|
||||
|
||||
;
|
||||
; CONVERT LOW NIBBLE OF A TO ASCII HEX
|
||||
;
|
||||
HEXCONV:
|
||||
AND $0F ; LOW NIBBLE ONLY
|
||||
ADD A,$90
|
||||
DAA
|
||||
ADC A,$40
|
||||
DAA
|
||||
RET
|
||||
;
|
||||
|
||||
|
||||
;
|
||||
; ADD THE VALUE IN A TO HL (HL := HL + A)
|
||||
;
|
||||
ADDHL:
|
||||
ADD A,L ; A := A + L
|
||||
LD L,A ; PUT RESULT BACK IN L
|
||||
RET NC ; IF NO CARRY, WE ARE DONE
|
||||
INC H ; IF CARRY, INCREMENT H
|
||||
RET ; AND RETURN
|
||||
|
||||
|
||||
;
|
||||
;__________________________________________________________________________________________________
|
||||
;
|
||||
; UTILITY PROCS TO PRINT SINGLE CHARACTERS WITHOUT TRASHING ANY REGISTERS
|
||||
;
|
||||
;__________________________________________________________________________________________________
|
||||
;
|
||||
PC_SPACE:
|
||||
PUSH AF
|
||||
LD A,' '
|
||||
JR PC_PRTCHR
|
||||
PC_COLON:
|
||||
PUSH AF
|
||||
LD A,':'
|
||||
JR PC_PRTCHR
|
||||
PC_CR:
|
||||
PUSH AF
|
||||
LD A,CHR_CR
|
||||
JR PC_PRTCHR
|
||||
|
||||
PC_LF:
|
||||
PUSH AF
|
||||
LD A,CHR_LF
|
||||
JR PC_PRTCHR
|
||||
|
||||
PC_PRTCHR:
|
||||
CALL COUT
|
||||
POP AF
|
||||
RET
|
||||
|
||||
NEWLINE2:
|
||||
CALL NEWLINE
|
||||
NEWLINE:
|
||||
CALL PC_CR
|
||||
CALL PC_LF
|
||||
RET
|
||||
|
||||
PRTSTR:
|
||||
LD A,(HL)
|
||||
INC HL
|
||||
CP '$'
|
||||
RET Z
|
||||
CALL COUT
|
||||
JR PRTSTR
|
||||
|
||||
;
|
||||
;__COUT_______________________________________________________________________
|
||||
;
|
||||
; OUTPUT CHARACTER FROM A
|
||||
;_____________________________________________________________________________
|
||||
;
|
||||
COUT:
|
||||
; SAVE ALL INCOMING REGISTERS
|
||||
PUSH AF
|
||||
PUSH BC
|
||||
PUSH DE
|
||||
PUSH HL
|
||||
;
|
||||
; OUTPUT CHARACTER TO CONSOLE VIA HBIOS
|
||||
LD E,A ; OUTPUT CHAR TO E
|
||||
LD C,CIO_CONSOLE ; CONSOLE UNIT TO C
|
||||
LD B,BF_CIOOUT ; HBIOS FUNC: OUTPUT CHAR
|
||||
CALL HBIOS_SYS ; HBIOS OUTPUTS CHARACTER
|
||||
;
|
||||
; RESTORE ALL REGISTERS
|
||||
POP HL
|
||||
POP DE
|
||||
POP BC
|
||||
POP AF
|
||||
RET
|
||||
;
|
||||
;__CIN________________________________________________________________________
|
||||
;
|
||||
; INPUT CHARACTER TO A
|
||||
;_____________________________________________________________________________
|
||||
;
|
||||
CIN:
|
||||
; SAVE INCOMING REGISTERS (AF IS OUTPUT)
|
||||
PUSH BC
|
||||
PUSH DE
|
||||
PUSH HL
|
||||
;
|
||||
; INPUT CHARACTER FROM CONSOLE VIA HBIOS
|
||||
LD C,CIO_CONSOLE ; CONSOLE UNIT TO C
|
||||
LD B,BF_CIOIN ; HBIOS FUNC: INPUT CHAR
|
||||
CALL HBIOS_SYS ; HBIOS READS CHARACTER
|
||||
LD A,E ; MOVE CHARACTER TO A FOR RETURN
|
||||
;
|
||||
; RESTORE REGISTERS (AF IS OUTPUT)
|
||||
POP HL
|
||||
POP DE
|
||||
POP BC
|
||||
RET
|
||||
;
|
||||
;__CST________________________________________________________________________
|
||||
;
|
||||
; RETURN INPUT STATUS IN A (0 = NO CHAR, !=0 CHAR WAITING)
|
||||
;_____________________________________________________________________________
|
||||
;
|
||||
CST:
|
||||
; SAVE INCOMING REGISTERS (AF IS OUTPUT)
|
||||
PUSH BC
|
||||
PUSH DE
|
||||
PUSH HL
|
||||
;
|
||||
; GET CONSOLE INPUT STATUS VIA HBIOS
|
||||
LD C,CIO_CONSOLE ; CONSOLE UNIT TO C
|
||||
LD B,BF_CIOIST ; HBIOS FUNC: INPUT STATUS
|
||||
CALL HBIOS_SYS ; HBIOS RETURNS STATUS IN A
|
||||
;
|
||||
; RESTORE REGISTERS (AF IS OUTPUT)
|
||||
POP HL
|
||||
POP DE
|
||||
POP BC
|
||||
RET
|
||||
;
|
||||
|
||||
|
||||
;
|
||||
;__ISHEX______________________________________________________________________
|
||||
;
|
||||
; CHECK BYTE AT (HL) FOR HEX CHAR, RET Z IF SO, ELSE NZ
|
||||
;_____________________________________________________________________________
|
||||
;
|
||||
ISHEX:
|
||||
LD A,(HL) ; CHAR TO AS
|
||||
CP '0' ; < '0'?
|
||||
JR C,ISHEX1 ; YES, NOT 0-9, CHECK A-F
|
||||
CP '9' + 1 ; > '9'
|
||||
JR NC,ISHEX1 ; YES, NOT 0-9, CHECK A-F
|
||||
XOR A ; MUST BE 0-9, SET ZF
|
||||
RET ; AND DONE
|
||||
ISHEX1:
|
||||
CP 'A' ; < 'A'?
|
||||
JR C,ISHEX2 ; YES, NOT A-F, FAIL
|
||||
CP 'F' + 1 ; > 'F'
|
||||
JR NC,ISHEX2 ; YES, NOT A-F, FAIL
|
||||
XOR A ; MUST BE A-F, SET ZF
|
||||
RET ; AND DONE
|
||||
ISHEX2:
|
||||
OR $FF ; CLEAR ZF
|
||||
RET ; AND DONE
|
||||
;
|
||||
;__HEXBYTE____________________________________________________________________
|
||||
;
|
||||
; GET ONE BYTE OF HEX DATA FROM BUFFER IN HL, RETURN IN A
|
||||
;_____________________________________________________________________________
|
||||
;
|
||||
HEXBYTE:
|
||||
LD C,0 ; INIT WORKING VALUE
|
||||
HEXBYTE1:
|
||||
CALL ISHEX ; DO WE HAVE A HEX CHAR?
|
||||
JR NZ,HEXBYTE3 ; IF NOT, WE ARE DONE
|
||||
LD B,4 ; SHIFT WORKING VALUE (C := C * 16)
|
||||
HEXBYTE2:
|
||||
SLA C ; SHIFT ONE BIT
|
||||
RET C ; RETURN W/ CF SET INDICATING OVERFLOW ERROR
|
||||
DJNZ HEXBYTE2 ; LOOP FOR 4 BITS
|
||||
CALL NIBL ; CONVERT HEX CHAR TO BINARY VALUE IN A & INC HL
|
||||
OR C ; COMBINE WITH WORKING VALUE
|
||||
LD C,A ; AND PUT BACK IN WORKING VALUE
|
||||
JR HEXBYTE1 ; DO ANOTHER CHARACTER
|
||||
HEXBYTE3:
|
||||
LD A,C ; WORKING VALUE TO A
|
||||
OR A ; CLEAR CARRY
|
||||
RET
|
||||
|
||||
;
|
||||
;__NIBL_______________________________________________________________________
|
||||
;
|
||||
; GET ONE BYTE OF HEX DATA FROM BUFFER IN HL, RETURN IN A
|
||||
;_____________________________________________________________________________
|
||||
;
|
||||
NIBL:
|
||||
LD A,(HL) ; GET K B. DATA
|
||||
INC HL ; INC KB POINTER
|
||||
CP 40H ; TEST FOR ALPHA
|
||||
JR NC,ALPH
|
||||
AND 0FH ; GET THE BITS
|
||||
RET
|
||||
ALPH:
|
||||
AND 0FH ; GET THE BITS
|
||||
ADD A,09H ; MAKE IT HEX A-F
|
||||
RET
|
||||
|
||||
|
||||
;
|
||||
;===============================================================================
|
||||
; END ROUTINES THAT ARE LIFTED FROM DBGMON
|
||||
;===============================================================================
|
||||
;
|
||||
|
||||
|
||||
|
||||
|
||||
;
|
||||
;===============================================================================
|
||||
; ERROR RESPONCES
|
||||
;===============================================================================
|
||||
;
|
||||
|
||||
ERROOR: ; REQUESTED DEV OUT OF RANGE (SYNTAX)
|
||||
CALL NEWLINE
|
||||
LD A, 'R'
|
||||
CALL COUT
|
||||
LD HL,TARGET_CON
|
||||
LD A,(HL)
|
||||
CALL PRTHEX
|
||||
|
||||
|
||||
LD A, ':'
|
||||
CALL COUT
|
||||
LD A, 'M'
|
||||
CALL COUT
|
||||
LD HL,CIODEV_MAX
|
||||
LD A,(HL)
|
||||
CALL PRTHEX
|
||||
|
||||
LD HL,MSGOOR
|
||||
JR ERROR
|
||||
ERRHEXRD: ; COMMAND HEX READ ERROR (SYNTAX)
|
||||
LD HL,MSGHEXRD
|
||||
JR ERROR
|
||||
ERRUSE: ; COMMAND USAGE ERROR (SYNTAX)
|
||||
LD HL,MSGUSE
|
||||
JR ERROR
|
||||
ERRPRM: ; COMMAND PARAMETER ERROR (SYNTAX)
|
||||
LD HL,MSGPRM
|
||||
JR ERROR
|
||||
ERROR: ; PRINT ERROR STRING AND RETURN ERROR SIGNAL
|
||||
CALL NEWLINE ; PRINT NEWLINE
|
||||
CALL PRTSTR ; PRINT ERROR STRING
|
||||
OR $FF ; SIGNAL ERROR
|
||||
RET ; DONE
|
||||
|
||||
;===============================================================================
|
||||
; STORAGE SECTION
|
||||
;===============================================================================
|
||||
;
|
||||
|
||||
; CHAR DEV COUNT
|
||||
CIODEV_CNT .DB $0
|
||||
CIODEV_MAX .DB $0
|
||||
|
||||
;TALK LOOP DATA, DEFAULT TO LOOPBACK
|
||||
USER_CON .DB $80
|
||||
TARGET_CON .DB $80
|
||||
|
||||
; PING PONG POINTERS
|
||||
RF_DEV .DB 0
|
||||
WT_DEV .DB 0
|
||||
|
||||
; TARGET CHARACTER DEVICE DATA
|
||||
TGT_DEV:
|
||||
.DB 0 ; HBIOS CHAR NUM
|
||||
.DB 0 ; C: DEVICE ATTRIBUTES
|
||||
.DB 0 ; D: DEVICE TYPE
|
||||
.DB 0 ; E: DEVICE NUMBER
|
||||
.DB 0 ; H: DEVICE MODE
|
||||
.DB 0 ; L: DEVICE I/O BASE ADDRESS
|
||||
|
||||
; STRING LITERALS
|
||||
MSGUSE .TEXT "USAGE: HTALK <CIO_DEV_ID>$"
|
||||
MSGPRM .TEXT "PARAMETER ERROR$"
|
||||
MSGOOR .TEXT "CIO VAL TOO LARGE$"
|
||||
MSGHEXRD .TEXT "HEX READ ERR$"
|
||||
MSGTALKING .TEXT "CONNECTING TO CHAR:$"
|
||||
|
||||
|
||||
DEV_STR_TBL:
|
||||
.TEXT "CHAR:$"
|
||||
.TEXT "ATTR:$"
|
||||
.TEXT "TYPE:$"
|
||||
.TEXT "NUMB:$"
|
||||
.TEXT "MODE:$"
|
||||
.TEXT "ADDR:$"
|
||||
|
||||
STR_DEVS_FOUND .TEXT "NUM CHAR DEVICES FOUND - $"
|
||||
STR_EXITMSG .TEXT "HTALK DONE$"
|
||||
STR_BANNER .TEXT "HTALK V1.0 (CTRL-C TO EXIT)$"
|
||||
STR_HBIOS .TEXT "HBIOS DETECTED$"
|
||||
STR_BIOERR .TEXT "*** UNKNOWN BIOS - BAILING OUT ***$"
|
||||
|
||||
STKSAV .DW 0 ; STACK POINTER SAVED AT START
|
||||
.FILL STKSIZ,0 ; STACK
|
||||
STACK .EQU $ ; STACK TOP
|
||||
;
|
||||
.END
|
||||
@@ -1,6 +1,6 @@
|
||||
OBJECTS = sysgen.com syscopy.com assign.com format.com talk.com \
|
||||
mode.com rtc.com timer.com rtchb.com
|
||||
SUBDIRS = XM FDU FAT Tune Test ZMP ZMD Dev VGM cpuspd Survey
|
||||
SUBDIRS = HTalk XM FDU FAT Tune Test ZMP ZMD Dev VGM cpuspd Survey BBCBASIC
|
||||
DEST = ../../Binary/Apps
|
||||
TOOLS =../../Tools
|
||||
|
||||
|
||||
@@ -15,6 +15,13 @@
|
||||
;
|
||||
;VERSION LIST - Most recent version first.
|
||||
;
|
||||
;21/Mar/23 - Previous hack was worthless because it broke
|
||||
; the memory survey. Rehacked to use HBIOS to
|
||||
; detect if N8VEM SBC MPCL memory management is
|
||||
; in use and bypass MPCL ports if so. HBIOS check
|
||||
; should allow use in non-RomWBW systems again.
|
||||
; Wayne Warthen
|
||||
;
|
||||
;10/Feb/23 - Total hack to avoid crash on ECB SBC
|
||||
; RomWBW now required by this version
|
||||
; Wayne Warthen
|
||||
@@ -240,20 +247,6 @@ TABS EQU 9 ; Tab columns
|
||||
;
|
||||
;ORG 100H
|
||||
;
|
||||
;
|
||||
;
|
||||
.Z80
|
||||
LD HL,IMGORG
|
||||
LD DE,START
|
||||
LD BC,IMGEND-IMGORG
|
||||
LDIR
|
||||
JP START
|
||||
.8080
|
||||
;
|
||||
IMGORG:
|
||||
;
|
||||
.PHASE 8000H
|
||||
;
|
||||
START:
|
||||
LXI H,0 ; Save stack pointer
|
||||
DAD SP
|
||||
@@ -261,9 +254,38 @@ START:
|
||||
LXI SP,FINIS+64
|
||||
CALL TYPE ; Type initial CRLF
|
||||
DW CRLF,CRLF
|
||||
DB TAB,'*** RomWBW System Survey (Feb 2023) ***'
|
||||
DB TAB,'*** RomWBW System Survey (Mar 2023) ***'
|
||||
DW CRLF,CRLFE
|
||||
;
|
||||
; Are we running an N8VEM SBC w/ MPCL on RomWBW???
|
||||
;
|
||||
.Z80
|
||||
XOR A ; assume not
|
||||
LD (ISMPCL),A ; save it
|
||||
|
||||
; Check for RomWBW (HBIOS)
|
||||
LD HL,(0FFFEH) ; HL := HBIOS ident location
|
||||
LD A,'W' ; First byte of ident
|
||||
CP (HL) ; Compare
|
||||
JR NZ,NOTMPCL ; Not HBIOS
|
||||
INC HL ; Next byte of ident
|
||||
LD A,NOT 'W' ; Second byte of ident
|
||||
CP (HL) ; Compare
|
||||
JR NZ,NOTMPCL ; Not HBIOS
|
||||
;
|
||||
LD B,0F1H ; HBIOS: VER function
|
||||
LD C,0 ; required reserved value
|
||||
RST 08 ; DE := version, L := platform id
|
||||
LD A,L ; Platform ID
|
||||
CP 01H ; SBC?
|
||||
JR NZ,NOTMPCL ; Not SBC
|
||||
LD A,0FFH ; Flag
|
||||
LD (ISMPCL),A ; Set flag
|
||||
;
|
||||
.8080
|
||||
;
|
||||
NOTMPCL:
|
||||
;
|
||||
;DISK SURVEY
|
||||
LXI H,8 ; Init drive counter
|
||||
MVI C,24 ; Get login vector
|
||||
@@ -445,20 +467,19 @@ MSURV:
|
||||
ENDM
|
||||
DB '|'
|
||||
DW CRLF
|
||||
db ' ' ; dmb 31-May-82
|
||||
DB 'T'+EOL
|
||||
DB 'TT','T'+EOL
|
||||
LXI H,RAM
|
||||
MVI M,LOW 1023 ; Init RAM counter
|
||||
MVI M,LOW 2047 ; Init RAM counter
|
||||
INX H
|
||||
MVI M,HIGH 1023
|
||||
MVI M,HIGH 2047
|
||||
MVI B,4 ; Clear ROM, EMP
|
||||
CLREG:
|
||||
INX H
|
||||
MVI M,0
|
||||
DCR B
|
||||
JNZ CLREG
|
||||
LXI H,1024 ; Init memory pointer
|
||||
MVI C,63 ; K to be checked
|
||||
LXI H,2048 ; Init memory pointer
|
||||
MVI C,62 ; K to be checked
|
||||
|
||||
;Start of analysis loop
|
||||
BEGANA:
|
||||
@@ -492,7 +513,7 @@ NOTEM:
|
||||
INXI ROM
|
||||
NEXT:
|
||||
INX H ; Index next byte
|
||||
DCX D ; Decrement K counter
|
||||
DCX D ; DEC DE; Decrement K counter
|
||||
XRA A
|
||||
ORA D
|
||||
ORA E
|
||||
@@ -545,8 +566,19 @@ NEXTK:
|
||||
; contents of first page
|
||||
call type
|
||||
db 'BIOS at',' '+eol
|
||||
hexout bios+2
|
||||
hexout bios+1
|
||||
;hexout bios+2
|
||||
;hexout bios+1
|
||||
.z80
|
||||
ld hl,(bios+1)
|
||||
ld de,-3
|
||||
add hl,de
|
||||
push hl
|
||||
ld a,h
|
||||
call hexprn
|
||||
pop hl
|
||||
ld a,l
|
||||
call hexprn
|
||||
.8080
|
||||
call type
|
||||
db tab,'iobyte',' '+eol
|
||||
hexout bios+3
|
||||
@@ -555,8 +587,19 @@ NEXTK:
|
||||
hexout bios+4
|
||||
call type
|
||||
db tab,'BDOS at',' '+eol
|
||||
hexout bdos+2
|
||||
hexout bdos+1
|
||||
;hexout bdos+2
|
||||
;hexout bdos+1
|
||||
.z80
|
||||
ld hl,(bdos+1)
|
||||
ld de,-6
|
||||
add hl,de
|
||||
push hl
|
||||
ld a,h
|
||||
call hexprn
|
||||
pop hl
|
||||
ld a,l
|
||||
call hexprn
|
||||
.8080
|
||||
call type
|
||||
dw crlf,crlfe
|
||||
;
|
||||
@@ -572,6 +615,8 @@ NEXTK:
|
||||
CALL TYPE
|
||||
DB ' Bytes ROM',TAB,TAB+EOL
|
||||
LHLD BDOS+1
|
||||
LXI D,-6
|
||||
DAD D
|
||||
CALL BINDEC
|
||||
CALL TYPE
|
||||
DB ' Bytes in TPA'
|
||||
@@ -607,9 +652,6 @@ PDLY:
|
||||
JNZ PDLY
|
||||
;
|
||||
.Z80
|
||||
; record the active bank
|
||||
ld a,(0ffe0h) ; get current hbios bank id
|
||||
ld (BANK),a ; and save it
|
||||
; Check for Z180 CPU
|
||||
xor a ; assume Z80
|
||||
ld (IS180),a ; save it
|
||||
@@ -635,6 +677,17 @@ PORTLP:
|
||||
ENDIF
|
||||
;
|
||||
.Z80
|
||||
;
|
||||
ld a,(ISMPCL) ; MPCL?
|
||||
or a ; set flags
|
||||
jr z,PCONT ; if not, skip ahead
|
||||
ld a,d ; get port to test
|
||||
and 0F8H ; range of 8 ports
|
||||
cp 078H ; starting at 78H
|
||||
jr z,ISPORT ; if in range, assume real port
|
||||
;
|
||||
PCONT:
|
||||
|
||||
di ; interrupts off
|
||||
ld a,(IS180) ; Z180?
|
||||
or a
|
||||
@@ -679,11 +732,6 @@ pnum1b equ $-1
|
||||
push af
|
||||
;
|
||||
rdz:
|
||||
; Make sure correct bank is still selected!
|
||||
push af
|
||||
ld a,(BANK)
|
||||
call 0FFF3H
|
||||
pop af
|
||||
;
|
||||
ei ; interrupts back on now
|
||||
;
|
||||
@@ -818,13 +866,9 @@ RAMF: DS 1 ; RAM good flag
|
||||
EMPF: DS 1 ; Empty so far flag
|
||||
BLKSHF: DS 1 ; block shift factor
|
||||
MAXALL: DS 2 ; maximum block number
|
||||
BANK: DS 1 ; saved HBIOS bank id
|
||||
IS180: DS 1 ; non-zero for Z180 CPU
|
||||
ISMPCL: DS 1 ; non-zero for N8VEM SBC MPCL
|
||||
FINIS EQU $ ; End of program
|
||||
;
|
||||
.DEPHASE
|
||||
;
|
||||
IMGEND:
|
||||
;
|
||||
END
|
||||
|
||||
@@ -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
|
||||
@@ -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
|
||||
|
||||
@@ -12,12 +12,26 @@ DMAMODE_Z180 .EQU 2 ; Z180 INTEGRATED DMA
|
||||
DMAMODE_Z280 .EQU 3 ; Z280 INTEGRATED DMA
|
||||
DMAMODE_RC .EQU 4 ; RCBUS Z80 DMA
|
||||
DMAMODE_MBC .EQU 5 ; MBC
|
||||
DMAMODE_VDG .EQU 6 ; VELESOFT DATAGEAR
|
||||
DMAMODE_DUO .EQU 6 ; DUO
|
||||
DMAMODE_VDG .EQU 7 ; VELESOFT DATAGEAR
|
||||
;
|
||||
DMAMODE .EQU DMAMODE_DUO ; SELECT DMA DEVICE FOR TESTING
|
||||
;
|
||||
;==================================================================================================
|
||||
; SOME DEFAULT PLATFORM CONFIGURATIONS
|
||||
;==================================================================================================
|
||||
;
|
||||
DMABASE .EQU $E0 ; DMA: DMA BASE ADDRESS
|
||||
DMAMODE .EQU DMAMODE_MBC ; SELECT DMA DEVICE FOR TESTING
|
||||
DMALATCH .EQU DMABASE+1 ; DMA: DMA LATCH ADDRESS
|
||||
DMAIOTST .EQU $68 ; AN OUTPUT PORT FOR TESTING - 16C450 SERIAL OUT
|
||||
;
|
||||
#IF (DMAMODE==DMAMODE_DUO)
|
||||
DMABASE .SET $40 ; DMA: DMA0 BASE ADDRESS
|
||||
DMALATCH .SET $43 ; DMA: DMA LATCH ADDRESS
|
||||
DMAIOTST .SET $58 ; AN OUTPUT PORT FOR TESTING - 16C450 SERIAL OUT
|
||||
;DMAIOTST .SET $94 ; AN ALT OUTPUT PORT FOR TESTING - RTC/SPEAKER/LEDS PORT
|
||||
#ENDIF
|
||||
;
|
||||
;==================================================================================================
|
||||
; HELPER MACROS AND EQUATES
|
||||
;==================================================================================================
|
||||
@@ -39,12 +53,36 @@ INTENABLE .EQU TRUE ; ENABLE INT TESTING
|
||||
INTIDX .EQU 1 ; INT VECTOR INDEX
|
||||
;
|
||||
;==================================================================================================
|
||||
; DMA MODE BYTES
|
||||
; DMA MODE BYTES - I/O ROUTINES CLEAR b3 AND ONLY PROGRAM LOW ADDRESS
|
||||
;==================================================================================================
|
||||
;
|
||||
DMA_CONTINUOUS .equ %10111101 ; + Pulse
|
||||
DMA_BYTE .equ %10011101 ; + Pulse
|
||||
DMA_BURST .equ %11011101 ; + Pulse
|
||||
DMA_BYTE .equ %10011101 ; b7b1b0 = Register = 1xxxxx01 = Program R4
|
||||
; b6b5 = Transfer Mode = x00xxxxx = Byte transfer mode
|
||||
; b2 = start address (low) = xxxxx1xx = low address follows (1 byte)
|
||||
; b3 = start address (high) = xxxx1xxx = high address follows (1 byte)
|
||||
; b4 = int control byte = xxx1xxxx = interrupt, pulse or vector byte follow
|
||||
;
|
||||
DMA_CONTINUOUS .equ %10111101 ; b7b1b0 = Register = 1xxxxx01 = Program R4
|
||||
; b6b5 = Transfer Mode = x01xxxxx = Continuous transfer mode (default)
|
||||
; b2 = start address (low) = xxxxx1xx = low address follows (1 byte)
|
||||
; b3 = start address (high) = xxxx1xxx = high address follows (1 byte)
|
||||
; b4 = int control byte = xxx1xxxx = interrupt, pulse or vector byte follow
|
||||
;
|
||||
DMA_BURST .equ %11011101 ; b7b1b0 = Register = 1xxxxx01 = Program R4
|
||||
; b6b5 = Transfer Mode = x10xxxxx = Burst transfer mode
|
||||
; b2 = start address (low) = xxxxx1xx = low address follows (1 byte)
|
||||
; b3 = start address (high) = xxxx1xxx = high address follows (1 byte)
|
||||
; b4 = int control byte = xxx1xxxx = interrupt, pulse or vector byte follow
|
||||
;
|
||||
DMA_ICBYTE .equ %00001100 ; b7 = Interrupt Cont. Byte = 0xxxxxxx = Interrupt Control Byte identifier
|
||||
; b6 = Interrupt on RDY = x0xxxxxx = Do not interrupt on RDY
|
||||
; b5 = Status affects vector= xx0xxxxx = Status does not affect vector
|
||||
; b4 = Interrupt vector byte= xxx0xxxx = No interrupt vector byte will follow
|
||||
; b3 = Pulse control byte = xxxx1xxx = A pulse control byte will follow
|
||||
; b2 = Pulse generation = xxxxx100 = A pulse will be generated
|
||||
; b1 = Interrupt @ block end= xxxxxx0x = No interrupt at block end
|
||||
; b0 = Interrupt on match = xxxxxxx0 = No interrupt on match
|
||||
;
|
||||
DMA_LOAD .equ $cf ; %11001111
|
||||
DMA_ENABLE .equ $87 ; %10000111
|
||||
DMA_FORCE_READY .equ $b3
|
||||
@@ -64,6 +102,7 @@ DMA_REINIT_STATUS_BYTE .equ $8b
|
||||
;
|
||||
DMA_RDY .EQU %00001000
|
||||
DMA_FORCE .EQU 0
|
||||
DMA_XMODE .equ 1 ; Byte = 0, Continuous = 1, Burst = 2
|
||||
;
|
||||
;==================================================================================================
|
||||
; ROMWBW HBIOS DEFINITIONS
|
||||
@@ -88,7 +127,7 @@ MAIN:
|
||||
LD SP,STACK ; STACK
|
||||
;
|
||||
call PRTSTRD ; WELCOME
|
||||
.db "\n\rDMA Monitor V3\n\r$"
|
||||
.db "\n\rDMA Monitor V3.1\n\r$"
|
||||
;
|
||||
#IF (INTENABLE)
|
||||
;
|
||||
@@ -97,6 +136,8 @@ MAIN:
|
||||
ld de,$A000
|
||||
ld bc,hsiz
|
||||
ldir
|
||||
ld a,(dmaport)
|
||||
ld (int_dmaport),a
|
||||
;
|
||||
; Install interrupt vector (RomWBW specific!!!)
|
||||
ld hl,int ; pointer to my interrupt handler
|
||||
@@ -116,6 +157,8 @@ MENULP: CALL DISPM ; DISPLAY MENU
|
||||
;
|
||||
MENULP1:
|
||||
CALL NEWLINE
|
||||
CP 'C'
|
||||
JP Z,DMACFG_C ; CONFIGURE XFER MODE
|
||||
CP 'D'
|
||||
JP Z,DMATST_D ; DUMP REGISTERS
|
||||
CP 'I'
|
||||
@@ -129,50 +172,64 @@ MENULP1:
|
||||
CP 'N'
|
||||
JP Z,DMATST_N ; MEMORY COPY ITER
|
||||
CP '0'
|
||||
JP Z,DMATST_01
|
||||
JP Z,DMATST_0 ; PULSE DMA PORT
|
||||
CP '1'
|
||||
JP Z,DMATST_1 ; PULSE LATCH PORT
|
||||
CP 'O'
|
||||
JP Z,DMATST_O
|
||||
#IF !(DMAMODE==DMAMODE_VDG)
|
||||
CP '1'
|
||||
JP Z,DMATST_01
|
||||
CP 'R'
|
||||
JP Z,DMATST_R ; TOGGLE RESET
|
||||
CP 'Y'
|
||||
JP Z,DMATST_Y ; TOGGLE READY
|
||||
#ENDIF
|
||||
JP Z,DMATST_Y
|
||||
cp 'L'
|
||||
jp z,DMACFG_L ; SET LATCH PORT
|
||||
cp 'S'
|
||||
call z,DMACFG_S ; SET PORT
|
||||
jp z,DMACFG_S ; SET PORT
|
||||
cp 'V'
|
||||
jp z,DMACFG_V ; TOGGLE VERBOSE
|
||||
CP 'X'
|
||||
JP Z,DMABYE ; EXIT
|
||||
;
|
||||
JR MENULP
|
||||
;
|
||||
DMACFG_S:
|
||||
call PRTSTRD
|
||||
.db "\n\rSet port address\n\rPort:$"
|
||||
call HEXIN
|
||||
ld hl,dmaport
|
||||
ld (hl),a
|
||||
inc hl
|
||||
inc a
|
||||
ld (hl),a
|
||||
jp MENULP
|
||||
;
|
||||
DMABYE:
|
||||
#IF (INTENABLE)
|
||||
; Deinstall interrupt vector
|
||||
ld hl,(orgvec) ; original vector
|
||||
ld hl,(orgvec) ; original vector
|
||||
ld b,bf_sysint
|
||||
ld c,bf_sysintset ; set new vector
|
||||
ld e,INTIDX ; vector idx
|
||||
ld c,bf_sysintset ; set new vector
|
||||
ld e,INTIDX ; vector idx
|
||||
di
|
||||
rst 08 ; do it
|
||||
ei ; interrupts back on
|
||||
rst 08 ; do it
|
||||
ei ; interrupts back on
|
||||
#ENDIF
|
||||
;
|
||||
LD SP,(SAVSTK) ; RESTORE CP/M STACK
|
||||
RET
|
||||
;
|
||||
;==================================================================================================
|
||||
; CONFIGURE PORT
|
||||
;==================================================================================================
|
||||
;
|
||||
DMACFG_S:
|
||||
call PRTSTRD
|
||||
.db "\n\rSet DMA port address\n\rPort:$"
|
||||
call HEXIN
|
||||
ld hl,dmaport
|
||||
ld (hl),a
|
||||
#IF (INTENABLE)
|
||||
ld (int_dmaport),a
|
||||
#ENDIF
|
||||
jp MENULP
|
||||
;
|
||||
DMACFG_L:
|
||||
call PRTSTRD
|
||||
.db "\n\rSet Latch port address\n\rPort:$"
|
||||
call HEXIN
|
||||
ld hl,dmalach
|
||||
ld (hl),a
|
||||
jp MENULP
|
||||
;
|
||||
DMATST_I:
|
||||
call PRTSTRD
|
||||
.db "\n\rStart Initialization\n\r$"
|
||||
@@ -201,11 +258,17 @@ DMATST_N:
|
||||
CALL DMAMemTestIter
|
||||
JP MENULP
|
||||
;
|
||||
DMATST_01:
|
||||
DMATST_0:
|
||||
call PRTSTRD
|
||||
.db "\n\rPerforming Port Selection Test\n\r$"
|
||||
CALL DMA_Port01
|
||||
JP MENULP
|
||||
.db "\n\rPerforming DMA Port Selection Test\n\r$"
|
||||
CALL DMA_Port0
|
||||
ret
|
||||
|
||||
DMATST_1:
|
||||
call PRTSTRD
|
||||
.db "\n\rPerforming Latch Port Selection Test\n\r$"
|
||||
CALL DMA_Port1
|
||||
ret
|
||||
;
|
||||
DMATST_O:
|
||||
call PRTSTRD
|
||||
@@ -222,7 +285,7 @@ DMATST_D:
|
||||
DMATST_Y:
|
||||
call PRTSTRD
|
||||
.db "\n\rPerforming Ready Bit Test\n\r$"
|
||||
CALL DMA_ReadyT
|
||||
CALL DMA_ReadyY
|
||||
JP MENULP
|
||||
;
|
||||
DMATST_R:
|
||||
@@ -230,6 +293,16 @@ DMATST_R:
|
||||
.db "\n\rPerforming Reset\n\r$"
|
||||
; CALL
|
||||
JP MENULP
|
||||
|
||||
DMACFG_C:
|
||||
CALL DMA_XferM
|
||||
call PRTSTRD
|
||||
.db "\n\rTransfer mode change to: $"
|
||||
LD a,(dmaxfer)
|
||||
LD DE,DMA_XFRMODE
|
||||
CALL PRTIDXDEA
|
||||
CALL NEWLINE
|
||||
JP MENULP
|
||||
;
|
||||
;==================================================================================================
|
||||
; DISPLAY MENU
|
||||
@@ -246,6 +319,10 @@ DISPM: call PRTSTRD
|
||||
.db ", Port=0x$"
|
||||
LD A,(dmaport) ; DISPLAY
|
||||
CALL PRTHEXBYTE ; DMA PORT
|
||||
call PRTSTRD
|
||||
.db ", Latch Port=0x$"
|
||||
ld A,(dmalach)
|
||||
CALL PRTHEXBYTE ; DMA PORT
|
||||
;
|
||||
#IF (INTENABLE)
|
||||
;
|
||||
@@ -274,7 +351,6 @@ DISPM_INT:
|
||||
#ENDIF
|
||||
call PRTSTRD ; DISPLAY SPEED
|
||||
.db "\n\rCPU at $"
|
||||
|
||||
LD B,bf_sysget
|
||||
LD C,bf_sysgetcpuspd ; GET CURRENT
|
||||
RST 08 ; SPEED SETTING
|
||||
@@ -282,9 +358,14 @@ DISPM_INT:
|
||||
LD A,L
|
||||
JR Z,SPDDISP
|
||||
LD A,3
|
||||
;
|
||||
SPDDISP:LD DE,DMA_SPD_STR
|
||||
CALL PRTIDXDEA
|
||||
;
|
||||
call PRTSTRD
|
||||
.db "\n\rTransfer Mode: $" ; DIPLAY TRANSFER
|
||||
LD a,(dmaxfer) ; MODE
|
||||
LD DE,DMA_XFRMODE
|
||||
CALL PRTIDXDEA
|
||||
CALL NEWLINE
|
||||
;
|
||||
LD HL,MENU_OPT ; DISPLAY
|
||||
@@ -304,22 +385,26 @@ DMA_INIT:
|
||||
CALL PRTHEXBYTE
|
||||
;
|
||||
#IF !(DMAMODE==DMAMODE_VDG)
|
||||
ld a,(dmautil)
|
||||
ld a,(dmalach)
|
||||
ld c,a
|
||||
LD A,DMA_FORCE
|
||||
out (c),a ; force ready off
|
||||
#ENDIF
|
||||
;
|
||||
;
|
||||
call DMAProbe ; do we have a dma?
|
||||
jr nz,DMA_NOTFOUND
|
||||
;
|
||||
call PRTSTRD
|
||||
.db " DMA Found\n\r$"
|
||||
;
|
||||
ld hl,DMAInitMode ; setup the
|
||||
call SETXFER ; transfer mode
|
||||
set 3,(hl) ; upper and lower address
|
||||
;
|
||||
ld hl,DMACode ; program the
|
||||
ld b,DMACode_Len ; dma command
|
||||
ld c,DMABASE ; block
|
||||
ld a,(dmaport)
|
||||
ld c,a ; block
|
||||
;
|
||||
di
|
||||
otir ; load dma
|
||||
@@ -338,6 +423,27 @@ DMA_NOTFOUND:
|
||||
;
|
||||
DMA_FAIL_FLAG:
|
||||
.db 0
|
||||
;
|
||||
DMACode ;.db DMA_DISABLE ; R6-Command Disable DMA
|
||||
.db %01111101 ; R0-Transfer mode, A -> B, start address, block length follow
|
||||
.dw 0 ; R0-Port A, Start address
|
||||
.dw 0 ; R0-Block length
|
||||
.db %00010100 ; R1-No timing bytes follow, address increments, is memory
|
||||
.db %00010000 ; R2-No timing bytes follow, address increments, is memory
|
||||
.db %10000000 ; R3-DMA, interrupt, stop on match disabled
|
||||
DMAInitMode: .db DMA_CONTINUOUS ; R4-Transfer mode, destination address, interrupt and control byte follow
|
||||
.dw 0 ; R4-Port B, Destination address
|
||||
.db DMA_ICBYTE ; R4-Pulse byte follows, Pulse generated
|
||||
.db 0 ; R4-Pulse offset
|
||||
.db %10010010+DMA_RDY; R5-Stop on end of block, ce/wait multiplexed, READY active config
|
||||
.db DMA_LOAD ; R6-Command Load
|
||||
; .db DMA_FORCE_READY ; R6-Command Force ready
|
||||
; .db DMA_ENABLE ; R6-Command Enable DMA
|
||||
DMACode_Len .equ $-DMACode
|
||||
;
|
||||
;==================================================================================================
|
||||
; STRINGS
|
||||
;==================================================================================================
|
||||
;
|
||||
DMA_DEV_STR:
|
||||
.TEXT "NONE$"
|
||||
@@ -346,6 +452,7 @@ DMA_DEV_STR:
|
||||
.TEXT "Z280$"
|
||||
.TEXT "RCBUS$"
|
||||
.TEXT "MBC$"
|
||||
.TEXT "DUODYNE$"
|
||||
.TEXT "DATAGEAR$"
|
||||
;
|
||||
DMA_SPD_STR:
|
||||
@@ -354,8 +461,14 @@ DMA_SPD_STR:
|
||||
.TEXT "double speed.$"
|
||||
.TEXT "unknown speed.$"
|
||||
;
|
||||
DMA_XFRMODE:
|
||||
.TEXT "Byte.$"
|
||||
.TEXT "Continuous.$"
|
||||
.TEXT "Burst.$"
|
||||
;
|
||||
MENU_OPT:
|
||||
.TEXT "\n\r"
|
||||
.TEXT "C) Change transfer mode\n\r"
|
||||
.TEXT "D) Dump DMA registers\n\r"
|
||||
.TEXT "I) Initialize DMA\n\r"
|
||||
.TEXT "T) Toggle Interrupt Usage\n\r"
|
||||
@@ -368,20 +481,46 @@ MENU_OPT:
|
||||
.TEXT "Y) Test Ready Bit\n\r"
|
||||
#ENDIF
|
||||
.TEXT "S) Set DMA port\n\r"
|
||||
.TEXT "L) Set Latch port\n\r"
|
||||
.TEXT "V) Verbose status toggle\n\r"
|
||||
.TEXT "X) Exit\n\r"
|
||||
|
||||
.TEXT ">$"
|
||||
;
|
||||
;==================================================================================================
|
||||
; TOGGLE TRANSFER MODE
|
||||
;==================================================================================================
|
||||
;
|
||||
DMA_XferM: ; Set next transfer mode
|
||||
ld a,(dmaxfer)
|
||||
inc a
|
||||
cp 3
|
||||
jr nz,NextX
|
||||
ld a,0
|
||||
NextX: ld (dmaxfer),a
|
||||
ret
|
||||
;
|
||||
;==================================================================================================
|
||||
; TOGGLE VERBOSE MODE
|
||||
;==================================================================================================
|
||||
;
|
||||
DMACFG_V:
|
||||
ld a,(dmavbs)
|
||||
cpl
|
||||
ld (dmavbs),a
|
||||
jp MENULP
|
||||
;
|
||||
;==================================================================================================
|
||||
; OUTPUT A BUFFER OF TEXT TO AN IOPORT
|
||||
;==================================================================================================
|
||||
;
|
||||
DMABUF .TEXT "0123456789abcdef"
|
||||
;DMABUF .DB $04,$00,$04,$00,$04,$00,$04,$00,$04,$00,$04,$00,$04,$00,$04,$00,$00,$00,$00 ; SPEAKER
|
||||
;
|
||||
DMA_ReadyO:
|
||||
call PRTSTRD
|
||||
.db "\r\nOutputing string to port 0x$"
|
||||
ld a,DMAIOTST
|
||||
ld a,(tstport)
|
||||
call PRTHEXBYTE
|
||||
call NEWLINE
|
||||
;
|
||||
@@ -389,32 +528,28 @@ DMA_ReadyO:
|
||||
IOLoop: push bc
|
||||
call NEWLINE
|
||||
ld hl,DMABUF
|
||||
ld a,DMAIOTST
|
||||
ld a,(tstport)
|
||||
ld bc,16
|
||||
;
|
||||
call DMAOTIR
|
||||
;
|
||||
call PRTSTRD
|
||||
.db " Return Status: $"
|
||||
call PRTHEXBYTE
|
||||
;
|
||||
pop bc
|
||||
djnz IOLoop
|
||||
call NEWLINE
|
||||
|
||||
ret
|
||||
;
|
||||
;==================================================================================================
|
||||
; PULSE PORT (COMMON ROUTINE WITH A CONTAINING ASCII PORT OFFSET)
|
||||
; PULSE PORT
|
||||
;==================================================================================================
|
||||
;
|
||||
DMA_Port01:
|
||||
DMA_Port0:
|
||||
ld a,(dmaport)
|
||||
jr DMA_Port
|
||||
DMA_Port1:
|
||||
ld a,(dmalach)
|
||||
DMA_Port:
|
||||
call PRTSTRD
|
||||
.db "\r\nPulsing port 0x$"
|
||||
sub '0' ; Calculate
|
||||
ld c,a
|
||||
ld a,(dmaport) ; Port to
|
||||
add a,c
|
||||
call PRTHEXBYTE
|
||||
call NEWLINE
|
||||
ld c,a ; toggle
|
||||
@@ -446,12 +581,9 @@ dlylp: dec bc
|
||||
; TOGGLE READY BIT
|
||||
;==================================================================================================
|
||||
;
|
||||
DMA_ReadyT:
|
||||
DMA_ReadyY:
|
||||
call NEWLINE
|
||||
#IF !(DMAMODE==DMAMODE_VDG)
|
||||
|
||||
#ENDIF
|
||||
ld a,(dmautil)
|
||||
ld a,(dmalach)
|
||||
ld c,a ; toggle
|
||||
ld b,$20 ; loop counter
|
||||
portlp2:push bc
|
||||
@@ -461,14 +593,12 @@ portlp2:push bc
|
||||
.db ": ON$"
|
||||
call delay
|
||||
ld a,$FF
|
||||
; ld c,DMABASE+1
|
||||
out (c),a
|
||||
call PRTSTRD
|
||||
.db " -> OFF$"
|
||||
call delay
|
||||
call PRTSTRD
|
||||
.db "\r \r$"
|
||||
; ld c,DMABASE+1
|
||||
ld a,0
|
||||
out (c),a
|
||||
pop bc
|
||||
@@ -480,7 +610,6 @@ portlp2:push bc
|
||||
;==================================================================================================
|
||||
;
|
||||
DMAMemMove:
|
||||
;
|
||||
LD HL,$8000 ; PREFILL DESTINATION WITH $55
|
||||
LD A,$55
|
||||
LD (HL),A
|
||||
@@ -509,20 +638,24 @@ DMAMemMove1:
|
||||
;
|
||||
DMAMemMove2:
|
||||
;
|
||||
; LD HL,$8400 ; PLANT
|
||||
; LD A,$00 ; BAD
|
||||
; LD (HL),A ; SEED
|
||||
;LD HL,$8400 ; PLANT
|
||||
;LD A,$00 ; BAD
|
||||
;LD (HL),A ; SEED
|
||||
;
|
||||
call PRTSTRD
|
||||
.db "Return Status: $"
|
||||
call PRTHEXBYTE
|
||||
|
||||
LD A,$AA ; CHECK COPY SUCCESSFULL
|
||||
LD HL,$8000
|
||||
LD BC,4096
|
||||
NXTCMP: CPI
|
||||
JP PO,CMPOK
|
||||
JR Z,NXTCMP
|
||||
|
||||
DEC HL
|
||||
CALL PRTHEXWORDHL
|
||||
LD A,' '
|
||||
CALL COUT
|
||||
LD A,(HL)
|
||||
CALL PRTHEXBYTE
|
||||
|
||||
RET ; RET W/ ZF CLEAR
|
||||
;
|
||||
CMPOK:
|
||||
@@ -616,23 +749,6 @@ DMAProbe:
|
||||
cpl
|
||||
ret
|
||||
;
|
||||
DMACode ;.db DMA_DISABLE ; R6-Command Disable DMA
|
||||
.db %01111101 ; R0-Transfer mode, A -> B, start address, block length follow
|
||||
.dw 0 ; R0-Port A, Start address
|
||||
.dw 0 ; R0-Block length
|
||||
.db %00010100 ; R1-No timing bytes follow, address increments, is memory
|
||||
.db %00010000 ; R2-No timing bytes follow, address increments, is memory
|
||||
.db %10000000 ; R3-DMA, interrupt, stop on match disabled
|
||||
.db DMA_CONTINUOUS ; R4-Continuous mode, destination address, interrupt and control byte follow
|
||||
.dw 0 ; R4-Port B, Destination address
|
||||
.db %00001100 ; R4-Pulse byte follows, Pulse generated
|
||||
.db 0 ; R4-Pulse offset
|
||||
.db %10010010+DMA_RDY; R5-Stop on end of block, ce/wait multiplexed, READY active config
|
||||
.db DMA_LOAD ; R6-Command Load
|
||||
; .db DMA_FORCE_READY ; R6-Command Force ready
|
||||
; .db DMA_ENABLE ; R6-Command Enable DMA
|
||||
DMACode_Len .equ $-DMACode
|
||||
;
|
||||
;==================================================================================================
|
||||
; DMA COPY BLOCK CODE - ASSUMES DMA PREINITIALIZED
|
||||
;==================================================================================================
|
||||
@@ -641,6 +757,10 @@ DMALDIR:
|
||||
ld (DMASource),hl ; populate the dma
|
||||
ld (DMADest),de ; register template
|
||||
ld (DMALength),bc
|
||||
;
|
||||
ld hl,DMACopyMode
|
||||
call SETXFER
|
||||
set 3,(hl) ; upper and lower address
|
||||
;
|
||||
ld hl,DMACopy ; program the
|
||||
ld b,DMACopy_Len ; dma command
|
||||
@@ -651,11 +771,7 @@ DMALDIR:
|
||||
otir ; load and execute dma
|
||||
ei
|
||||
;
|
||||
ld a,DMA_READ_STATUS_BYTE ; check status
|
||||
out (c),a ; of transfer
|
||||
in a,(c) ; set non-zero
|
||||
; and %00111011 ; if failed
|
||||
; sub %00011011
|
||||
call DMASTATUS
|
||||
ret
|
||||
;
|
||||
DMACopy ;.db DMA_DISABLE ; R6-Command Disable DMA
|
||||
@@ -665,9 +781,9 @@ DMALength .dw 0 ; R0-Block length
|
||||
.db %00010100 ; R1-No timing bytes follow, address increments, is memory
|
||||
.db %00010000 ; R2-No timing bytes follow, address increments, is memory
|
||||
.db %10000000 ; R3-DMA, interrupt, stop on match disabled
|
||||
.db DMA_CONTINUOUS ; R4-Continuous mode, destination address, interrupt and control byte follow
|
||||
DMACopyMode: .db DMA_CONTINUOUS ; R4-Transfer mode. Destination address, interrupt and control byte follow
|
||||
DMADest .dw 0 ; R4-Port B, Destination address
|
||||
.db %00001100 ; R4-Pulse byte follows, Pulse generated
|
||||
.db DMA_ICBYTE ; R4-Pulse byte follows, Pulse generated
|
||||
.db 0 ; R4-Pulse offset
|
||||
; .db %10010010+DMA_RDY;R5-Stop on end of block, ce/wait multiplexed, READY active config
|
||||
.db DMA_LOAD ; R6-Command Load
|
||||
@@ -687,6 +803,10 @@ DMALDIRINT:
|
||||
ld (DMASourceInt),hl ; populate the dma
|
||||
ld (DMADestInt),de ; register template
|
||||
ld (DMALengthInt),bc
|
||||
;
|
||||
ld hl,DMAICopyMode
|
||||
call SETXFER
|
||||
set 3,(hl) ; upper and lower address
|
||||
;
|
||||
ld hl,DMACopyInt ; program the
|
||||
ld b,DMACopyInt_Len ; dma command
|
||||
@@ -697,17 +817,7 @@ DMALDIRINT:
|
||||
otir ; load and execute dma
|
||||
ei
|
||||
;
|
||||
ld a,DMA_READ_STATUS_BYTE ; check status
|
||||
out (c),a ; of transfer
|
||||
in a,(c)
|
||||
|
||||
call PRTSTRD
|
||||
.db "Return Status: $"
|
||||
call PRTHEXBYTE
|
||||
|
||||
; and %00111011 ; set non-zero
|
||||
; sub %00011011 ; if failed
|
||||
;
|
||||
call DMASTATUS
|
||||
#ENDIF
|
||||
;
|
||||
ret
|
||||
@@ -721,7 +831,7 @@ DMALengthInt .dw 0 ; R0-Block length
|
||||
.db %00010100 ; R1-No timing bytes follow, address increments, is memory
|
||||
.db %00010000 ; R2-No timing bytes follow, address increments, is memory
|
||||
.db %10100000 ; R3-DMA, interrupt, stop on match disabled
|
||||
.db DMA_CONTINUOUS ; R4-Continuous mode, destination address, interrupt and control byte follow
|
||||
DMAICopyMode: .db DMA_CONTINUOUS ; R4-Transfer mode, destination address, interrupt and control byte follow
|
||||
DMADestInt .dw 0 ; R4-Port B, Destination address
|
||||
.db %00011110 ; R4-Interrupt control byte: Pulse byte follows, Pulse generated
|
||||
.db 0 ; R4-Pulse control byte
|
||||
@@ -743,6 +853,10 @@ DMAOTIR:
|
||||
ld (DMAOutSource),hl ; populate the dma
|
||||
ld (DMAOutDest),a ; register template
|
||||
ld (DMAOutLength),bc
|
||||
;
|
||||
ld hl,DMAOutMode
|
||||
call SETXFER
|
||||
res 3,(hl) ; no upper address
|
||||
;
|
||||
ld hl,DMAOutCode ; program the
|
||||
ld b,DMAOut_Len ; dma command
|
||||
@@ -753,14 +867,7 @@ DMAOTIR:
|
||||
otir ; load and execute dma
|
||||
ei
|
||||
;
|
||||
ld a,DMA_READ_STATUS_BYTE ; check status
|
||||
out (c),a ; of transfer
|
||||
in a,(c) ; set non-zero
|
||||
|
||||
|
||||
; and %00111011 ; if failed
|
||||
; sub %00011011
|
||||
;
|
||||
call DMASTATUS
|
||||
ret
|
||||
;
|
||||
DMAOutCode ;.db DMA_DISABLE ; R6-Command Disable DMA
|
||||
@@ -772,10 +879,10 @@ DMAOutLength .dw 0 ; R0-Block length
|
||||
.db %00101000 ; R2-No timing bytes follow, address static, is i/o
|
||||
.db %10000000 ; R3-DMA, interrupt, stop on match disabled
|
||||
|
||||
.db %10100101 ; R4-Continuous mode, destination port, interrupt and control byte follow
|
||||
DMAOutMode: .db DMA_CONTINUOUS ; R4-Transfer Mode, destination port, interrupt and control byte follow
|
||||
DMAOutDest .db 0 ; R4-Port B, Destination port
|
||||
; .db %00001100 ; R4-Pulse byte follows, Pulse generated
|
||||
; .db 0 ; R4-Pulse offset
|
||||
.db DMA_ICBYTE ; R4-Pulse byte follows, Pulse generated
|
||||
.db 0 ; R4-Pulse offset
|
||||
|
||||
.db %10010010+DMA_RDY;R5-Stop on end of block, ce/wait multiplexed, READY active config
|
||||
.db DMA_LOAD ; R6-Command Load
|
||||
@@ -794,6 +901,10 @@ DMAINIR:
|
||||
ld (DMAInSource),a ; register template
|
||||
ld (DMAInLength),bc
|
||||
;
|
||||
ld hl,DMAOutMode
|
||||
call SETXFER
|
||||
res 3,(hl) ; no upper address
|
||||
|
||||
ld hl,DMAInCode ; program the
|
||||
ld b,DMAIn_Len ; dma command
|
||||
ld a,(dmaport) ; block
|
||||
@@ -803,13 +914,7 @@ DMAINIR:
|
||||
otir ; load and execute dma
|
||||
ei
|
||||
;
|
||||
ld a,DMA_READ_STATUS_BYTE ; check status
|
||||
out (c),a ; of transfer
|
||||
in a,(c) ; set non-zero
|
||||
|
||||
; and %00111011 ; if failed
|
||||
; sub %00011011
|
||||
;
|
||||
call DMASTATUS
|
||||
ret
|
||||
;
|
||||
DMAInCode ;.db DMA_DISABLE ; R6-Command Disable DMA
|
||||
@@ -819,10 +924,10 @@ DMAInLength .dw 0 ; R0-Block length
|
||||
.db %00010100 ; R1-No timing bytes follow, address increments, is memory
|
||||
.db %00111000 ; R2-No timing bytes follow, address static, is i/o
|
||||
.db %10000000 ; R3-DMA, interrupt, stop on match disabled
|
||||
.db %10100101 ; R4-Continuous mode, destination port, no interrupt, control byte.
|
||||
DMAInMode: .db DMA_CONTINUOUS ; R4-Transfer mode, destination port, no interrupt, control byte.
|
||||
DMAInSource .db 0 ; R4-Port B, Destination port
|
||||
; .db %00001100 ; R4-Pulse byte follows, Pulse generated
|
||||
; .db 0 ; R4-Pulse offset
|
||||
.db DMA_ICBYTE ; R4-Pulse byte follows, Pulse generated
|
||||
.db 0 ; R4-Pulse offset
|
||||
.db %10010010+DMA_RDY;R5-Stop on end of block, ce/wait multiplexed, READY active config
|
||||
.db DMA_LOAD ; R6-Command Load
|
||||
.db DMA_FORCE_READY ; R6-Command Force ready
|
||||
@@ -831,6 +936,99 @@ DMAInSource .db 0 ; R4-Port B, Destination port
|
||||
DMAIn_Len .equ $-DMAInCode
|
||||
;
|
||||
;==================================================================================================
|
||||
; SET TRANSFER MODE
|
||||
;==================================================================================================
|
||||
;
|
||||
SETXFER:
|
||||
ld a,(dmaxfer) ; setup the
|
||||
cp 0 ; transfer mode
|
||||
jr nz,DMAX1
|
||||
ld a,DMA_BYTE
|
||||
jr DMAX3
|
||||
DMAX1: cp 1
|
||||
jr nz,DMAX2
|
||||
ld a,DMA_CONTINUOUS
|
||||
jr DMAX3
|
||||
DMAX2: cp 2
|
||||
ret nz
|
||||
ld a,DMA_BURST
|
||||
DMAX3: ld (hl),a
|
||||
ret
|
||||
;
|
||||
;==================================================================================================
|
||||
; GET STATUS
|
||||
;==================================================================================================
|
||||
;
|
||||
DMASTATUS:
|
||||
ld a,(dmaxfer) ; if byte mode
|
||||
cp 0 ; give some time to finish
|
||||
jr nz,DMASTS1
|
||||
|
||||
; ld b,1
|
||||
;DMASTS2:call delay
|
||||
; djnz DMASTS2
|
||||
;
|
||||
DMASTS1:ld a,DMA_READ_STATUS_BYTE ; check status
|
||||
out (c),a ; of transfer
|
||||
in a,(c)
|
||||
and %00111011
|
||||
;
|
||||
; push af
|
||||
; ld a,DMA_REINIT_STATUS_BYTE
|
||||
; out (c),a
|
||||
; pop af
|
||||
;
|
||||
call PRTSTRD
|
||||
.db "\n\rReturn Status: $"
|
||||
call PRTHEXBYTE
|
||||
call NEWLINE
|
||||
;
|
||||
ld c,a
|
||||
ld a,(dmavbs)
|
||||
or a
|
||||
jr z,DMSSTS2
|
||||
ld a,c
|
||||
;
|
||||
ld a,%00000001
|
||||
ld de,DMASTSBIT0
|
||||
call PRTIDXMSK
|
||||
;
|
||||
ld a,%00000010
|
||||
ld de,DMASTSBIT1
|
||||
call PRTIDXMSK
|
||||
;
|
||||
ld a,%00001000
|
||||
ld de,DMASTSBIT3
|
||||
call PRTIDXMSK
|
||||
;
|
||||
ld a,%00010000
|
||||
ld de,DMASTSBIT4
|
||||
call PRTIDXMSK
|
||||
;
|
||||
ld a,%00100000
|
||||
ld de,DMASTSBIT5
|
||||
call PRTIDXMSK
|
||||
;
|
||||
DMSSTS2:ld a,c
|
||||
ret
|
||||
|
||||
DMASTSBIT0:
|
||||
.TEXT "DMA Bus request did not occur after LOAD command\n\r$"
|
||||
.TEXT "DMA Bus request occurred after the LOAD command\n\r$"
|
||||
DMASTSBIT1:
|
||||
.TEXT "Ready line inactive\n\r$"
|
||||
.TEXT "Ready line active\n\r$"
|
||||
DMASTSBIT3:
|
||||
.TEXT "Interrupt pending\n\r$"
|
||||
.TEXT "No interrupt pending\n\r$"
|
||||
DMASTSBIT4:
|
||||
.TEXT "Match found\n\r$"
|
||||
.TEXT "No match found\n\r$"
|
||||
DMASTSBIT5:
|
||||
.TEXT "End of block reached\n\r$"
|
||||
.TEXT "End of block not reached\n\r$"
|
||||
;
|
||||
;==================================================================================================
|
||||
; DEBUG - READ START, DESTINATION AND COUNT REGISTERS
|
||||
;==================================================================================================
|
||||
;
|
||||
@@ -1010,7 +1208,11 @@ CST:
|
||||
RET
|
||||
;
|
||||
USEINT .DB FALSE ; USE INTERRUPTS FLAG
|
||||
;
|
||||
dmaport .db DMABASE
|
||||
dmalach .db DMALATCH
|
||||
dmaxfer .db DMA_XMODE
|
||||
tstport .db DMAIOTST
|
||||
dmavbs .db 0
|
||||
SAVSTK: .DW 2
|
||||
.FILL 64
|
||||
STACK: .EQU $
|
||||
@@ -1026,11 +1228,16 @@ reladr .equ $ ; relocation start adr
|
||||
.org $A000 ; code will run here
|
||||
;
|
||||
int:
|
||||
;LD E,'.' ; OUTPUT CHAR TO E
|
||||
;LD C,CIO_CONSOLE ; CONSOLE UNIT TO C
|
||||
;LD B,BF_CIOOUT ; HBIOS FUNC: OUTPUT CHAR
|
||||
;CALL $FFF0 ; HBIOS OUTPUTS CHARACTER
|
||||
|
||||
; According to the DMA doc, you must issue
|
||||
; a DMA_DISABLE command prior to a
|
||||
; DMA_REINIT_STATUS_BYTE command to avoid a
|
||||
; potential race condition.
|
||||
ld a,(dmaport)
|
||||
ld a,(int_dmaport)
|
||||
ld c,a
|
||||
ld a,DMA_DISABLE
|
||||
out (c),a
|
||||
@@ -1050,9 +1257,10 @@ int:
|
||||
or $ff ; signal int handled
|
||||
ret
|
||||
;
|
||||
counter .dw 0
|
||||
dmaport .db DMABASE
|
||||
dmautil .db DMABASE+1
|
||||
; data referred to in handler must reside in high mem
|
||||
;
|
||||
int_dmaport .db 0 ; hi mem copy of dmaport
|
||||
counter .dw 0 ; interrupt counter
|
||||
;
|
||||
hsiz .equ $ - $A000 ; size of handler to relocate
|
||||
;
|
||||
|
||||
@@ -8,6 +8,8 @@ set TASMTABS=%TOOLS%\tasm32
|
||||
tasm -t180 -g3 -fFF i2cscan.asm i2cscan.com i2cscan.lst || exit /b
|
||||
tasm -t180 -g3 -fFF rtcds7.asm rtcds7.com rtcds7.lst || exit /b
|
||||
tasm -t180 -g3 -fFF i2clcd.asm i2clcd.com i2clcd.lst || exit /b
|
||||
tasm -t80 -g3 -ff srom.asm srom.com srom.lst || exit /b
|
||||
|
||||
copy /Y i2c*.com ..\..\..\..\Binary\Apps\Test\ || exit /b
|
||||
copy /Y rtcds7*.com ..\..\..\..\Binary\Apps\Test\ || exit /b
|
||||
copy /Y srom.com ..\..\..\..\Binary\Apps\Test\ || exit /b
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
OBJECTS = i2cscan.com rtcds7.com i2clcd.com
|
||||
OBJECTS = i2cscan.com rtcds7.com i2clcd.com srom.com
|
||||
DEST = ../../../../Binary/Apps/Test/
|
||||
TOOLS = ../../../../Tools
|
||||
|
||||
|
||||
@@ -5,12 +5,13 @@
|
||||
; MARCO MACCAFERRI, HTTPS://WWW.MACCASOFT.COM
|
||||
; HBIOS VERSION BY PHIL SUMMERS (B1ACKMAILER) DIFFICULTLEVELHIGH@GMAIL.COM
|
||||
;
|
||||
PCF .EQU 1
|
||||
P8X180 .EQU 0
|
||||
SC126 .EQU 0
|
||||
SC137 .EQU 0
|
||||
PCFECB .EQU 0
|
||||
PCFDUO .EQU 1
|
||||
P8X180 .EQU 0
|
||||
SC126 .EQU 0
|
||||
SC137 .EQU 0
|
||||
;
|
||||
#IF (PCF)
|
||||
#IF (PCFECB)
|
||||
I2C_BASE .EQU 0F0H
|
||||
PCF_ID .EQU 0AAH
|
||||
CPU_CLK .EQU 12
|
||||
@@ -20,6 +21,16 @@ PCF_RS1 .EQU PCF_RS0+1
|
||||
PCF_OWN .EQU (PCF_ID >> 1) ; PCF'S ADDRESS IN SLAVE MODE
|
||||
#ENDIF
|
||||
;
|
||||
#IF (PCFDUO)
|
||||
I2C_BASE .EQU 056H
|
||||
PCF_ID .EQU 0AAH
|
||||
CPU_CLK .EQU 12
|
||||
;
|
||||
PCF_RS0 .EQU I2C_BASE
|
||||
PCF_RS1 .EQU PCF_RS0+1
|
||||
PCF_OWN .EQU (PCF_ID >> 1) ; PCF'S ADDRESS IN SLAVE MODE
|
||||
#ENDIF
|
||||
;
|
||||
#IF (P8X180)
|
||||
I2C_BASE .EQU 0A0h
|
||||
_sda .EQU 0
|
||||
@@ -153,8 +164,11 @@ lp5f: ld a,(addr) ; next address
|
||||
jp 0
|
||||
|
||||
signon: .db "I2C Bus Scanner"
|
||||
#IF (PCF)
|
||||
.DB " - PCF8584"
|
||||
#IF (PCFECB)
|
||||
.DB " - PCF8584 (ECB)"
|
||||
#ENDIF
|
||||
#IF (PCFDUO)
|
||||
.DB " - PCF8584 (Duodyne)"
|
||||
#ENDIF
|
||||
#IF (SC126)
|
||||
.DB " - SC126"
|
||||
@@ -219,7 +233,7 @@ _cout: ; character
|
||||
ret
|
||||
|
||||
;-----------------------------------------------------------------------------
|
||||
#IF (PCF)
|
||||
#IF (PCFECB | PCFDUO)
|
||||
_i2c_start:
|
||||
PCF_START:
|
||||
LD A,PCF_START_
|
||||
@@ -418,7 +432,7 @@ PCF_PINFAIL .DB "PIN FAIL$"
|
||||
PCF_BBFAIL .DB "BUS BUSY$"
|
||||
;
|
||||
;-----------------------------------------------------------------------------
|
||||
#IF (PCF)
|
||||
#IF (PCFECB | PCFDUO)
|
||||
_i2c_stop:
|
||||
PCF_STOP:
|
||||
LD A,PCF_STOP_ ; issue
|
||||
|
||||
1679
Source/Apps/Test/I2C/srom.asm
Normal file
1679
Source/Apps/Test/I2C/srom.asm
Normal file
File diff suppressed because it is too large
Load Diff
@@ -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
|
||||
|
||||
|
||||
@@ -176,6 +176,8 @@ estidx:
|
||||
jr z,hkim
|
||||
cp 2
|
||||
jr z,hkim
|
||||
cp 3
|
||||
jr z,hkim
|
||||
ret
|
||||
;
|
||||
; Setup interrupt handler
|
||||
@@ -545,8 +547,8 @@ stack .equ $ ; stack top
|
||||
;
|
||||
; Messages
|
||||
;
|
||||
msgban .db "INTTEST v1.2, 15-May-2019",13,10
|
||||
.db "Copyright (C) 2019, Wayne Warthen, GNU GPL v3",0
|
||||
msgban .db "INTTEST v1.3, 16-May-2024",13,10
|
||||
.db "Copyright (C) 2024, Wayne Warthen, GNU GPL v3",0
|
||||
msginfo .db "Interrupt information request...",0
|
||||
msgmode .db " Active interrupt mode: ",0
|
||||
msgcnt .db " Vector entries in use: ",0
|
||||
|
||||
@@ -7,20 +7,29 @@
|
||||
; 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
|
||||
; WBW 2024-06-10: Add support for RC2014
|
||||
;
|
||||
;=======================================================================
|
||||
;
|
||||
; 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
|
||||
; RC2014 (EP/Sally)
|
||||
iocmd_rc .equ $64 ; PS/2 controller command port address
|
||||
iodat_rc .equ $60 ; PS/2 controller data port address
|
||||
|
||||
;
|
||||
cpumhz .equ 8 ; for time delay calculations (not critical)
|
||||
;
|
||||
@@ -77,10 +86,14 @@ 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 '4' ; RC2014 EP/Sally
|
||||
jr z,setup_rc
|
||||
cp 'X'
|
||||
jr z,exit
|
||||
jr setup
|
||||
@@ -101,6 +114,22 @@ 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
|
||||
;
|
||||
setup_rc:
|
||||
ld a,iocmd_rc
|
||||
ld (iocmd),a
|
||||
ld a,iodat_rc
|
||||
ld (iodat),a
|
||||
ld de,str_rc
|
||||
jr setup2
|
||||
;
|
||||
setup2:
|
||||
call prtstr
|
||||
call crlf2
|
||||
@@ -181,6 +210,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 +263,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 +301,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 +335,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 +479,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 +668,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 +694,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 +761,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 +1452,18 @@ 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.9, 10-Jun-2024",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 " 4 - RC2014\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_rc .db "RC2014 (Saly)",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 +1494,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
|
||||
@@ -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
|
||||
@@ -45,6 +45,10 @@
|
||||
; 2021-08-13 [WBW] Add support for LiNC Z50 Sound Card
|
||||
; 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
|
||||
; 2024-04-16 [WBW] Add support for NABU AY-3-8910
|
||||
; 2024-05-10 [WBW] Hack to avoid corrupting bits 6&7 of PSG R7 for NABU!
|
||||
;_______________________________________________________________________________
|
||||
;
|
||||
; ToDo:
|
||||
@@ -137,11 +141,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:
|
||||
@@ -301,6 +304,11 @@ GOPT3 LD A,0 ; SETUP value to PT3 sound files
|
||||
JR GOPTX ; Play PTx file
|
||||
|
||||
GOPTX
|
||||
LD HL,(QDLY) ; Get basic quark delay
|
||||
OR A ; Clear carry
|
||||
SBC HL,DE ; Adjust for file type
|
||||
LD (QDLY),HL ; Save updated quark delay factor
|
||||
|
||||
CALL CRLF2
|
||||
LD DE, MSGSONGNAME ; Print song name message
|
||||
CALL PRTSTR
|
||||
@@ -322,10 +330,6 @@ GOPTX2 LD A,(DE)
|
||||
CALL CRLF2 ; Formatting
|
||||
LD DE,MSGPLY ; Playing message
|
||||
CALL PRTSTR ; Print message
|
||||
LD HL,(QDLY) ; Get basic quark delay
|
||||
OR A ; Clear carry
|
||||
SBC HL,DE ; Adjust for file type
|
||||
LD (QDLY),HL ; Save updated quark delay factor
|
||||
CALL START ; Do initialization
|
||||
PTXLP CALL START+5 ; Play one quark
|
||||
LD A,(START+10) ; Get setup byte
|
||||
@@ -552,81 +556,87 @@ 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, $A4, $A5, $A4, $FF, $A6, $FE ; DUODYNE
|
||||
.DW HWSTR_DUO
|
||||
;
|
||||
.DB 22, $41, $40, $40, $FF, $FF, $FF ; NABU
|
||||
.DW HWSTR_NABU
|
||||
;
|
||||
.DB $FF ; END OF TABLE MARKER
|
||||
;
|
||||
@@ -637,7 +647,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
|
||||
@@ -655,8 +666,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.5, 20-Mar-2022",0
|
||||
MSGUSE .DB "Copyright (C) 2021, Wayne Warthen, GNU GPL v3",13,10
|
||||
MSGBAN .DB "Tune Player for RomWBW v3.8, 10-May-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
|
||||
@@ -680,6 +691,8 @@ HWSTR_RCEB6 .DB "RCBus Sound Module (EBv6)",0
|
||||
HWSTR_RCMF .DB "RCBus Sound Module (MF)",0
|
||||
HWSTR_LINC .DB "Z50 LiNC Sound Module",0
|
||||
HWSTR_MBC .DB "NHYODYNE Sound Module",0
|
||||
HWSTR_DUO .DB "DUODYNE Sound Module",0
|
||||
HWSTR_NABU .DB "NABU Onboard Sound",0
|
||||
|
||||
MSGUNSUP .db "MYM files not supported with HBIOS yet!\r\n", 0
|
||||
|
||||
@@ -2073,8 +2086,23 @@ LOUT OUT (C),A
|
||||
LD HL, AYREGS ; START OF VALUE LIST
|
||||
LOUT OUT (C), A ; SELECT REGISTER
|
||||
LD C, D ; POINT TO DATA PORT
|
||||
OUTI ; WRITE (HL) TO DATA PORT, BUMP HL
|
||||
LD C, E ; POINT TO ADDRESS PORT
|
||||
|
||||
; UGLINESS FOR NABU! WE NEED TO KEEP BIT 7 = 0, AND BIT 6 = 1
|
||||
; FOR PSG REG 7
|
||||
CP 7 ; PSG REG 7?
|
||||
JR NZ,LOUT1 ; SKIP SPECIAL PROCESSING
|
||||
PUSH AF ; SAVE AF
|
||||
LD A,(HL) ; GET VALUE BYTE
|
||||
AND %00111111 ; FIX BITS 6 & 7
|
||||
OR %01000000 ; ... FOR NABU!
|
||||
OUT (C),A ; SEND THE FIXED VALUE
|
||||
DEC B ; SIMULATE THE RESET
|
||||
INC HL ; ... OF OUTI
|
||||
POP AF ; RESTORE AF
|
||||
JR LOUT1A ; RESUME LOOP
|
||||
|
||||
LOUT1 OUTI ; WRITE (HL) TO DATA PORT, BUMP HL
|
||||
LOUT1A LD C, E ; POINT TO ADDRESS PORT
|
||||
INC A ; NEXT REGISTER
|
||||
CP 13 ; REG 13?
|
||||
JR NZ, LOUT ; IF NOT, LOOP
|
||||
@@ -2084,6 +2112,7 @@ LOUT OUT (C), A ; SELECT REGISTER
|
||||
JP M, LOUT2 ; IF BIT 7 SET, RETURN W/O WRITING VALUE
|
||||
LD C, D ; SELECT DATA PORT
|
||||
OUT (C), A ; WRITE VALUE TO REGISTER 13
|
||||
|
||||
LOUT2 CALL NORMIO
|
||||
EI
|
||||
RET ; AND DONE
|
||||
@@ -2530,8 +2559,23 @@ upsg1: ld hl,(psource)
|
||||
psglp: ld c, e ; C := RSEL
|
||||
out (c), a ; Select register
|
||||
ld c, d ; C := RDAT
|
||||
outi ; Set register value
|
||||
inc a ; Next register
|
||||
|
||||
; ugliness for nabu! we need to keep bit 7 = 0, and bit 6 = 1
|
||||
; for psg reg 7
|
||||
cp 7 ; psg reg 7?
|
||||
jr nz,psglp1 ; if not, skip special processing
|
||||
push af ; save af
|
||||
ld a,(hl) ; get value byte
|
||||
and %00111111 ; fix bits 6 & 7
|
||||
or %01000000 ; ... for NABU!
|
||||
out (c),a ; send the fixed value
|
||||
dec b ; simulate the rest
|
||||
inc hl ; ... of outi
|
||||
pop af ; restore af
|
||||
jr psglp2 ; resume loop
|
||||
|
||||
psglp1: outi ; Set register value
|
||||
psglp2: inc a ; Next register
|
||||
|
||||
ld bc, (3 * FRAG) - 1 ; Bytes to skip before next reg-1
|
||||
add hl, bc ; Update HL
|
||||
|
||||
BIN
Source/Apps/VGM/Tunes/More/sabredan.vgm
Normal file
BIN
Source/Apps/VGM/Tunes/More/sabredan.vgm
Normal file
Binary file not shown.
BIN
Source/Apps/VGM/Tunes/More/sure.vgm
Normal file
BIN
Source/Apps/VGM/Tunes/More/sure.vgm
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