mirror of
https://github.com/wwarthen/RomWBW.git
synced 2026-02-06 22:43:15 -06:00
Compare commits
341 Commits
v3.6.0-dev
...
v3.6.0-dev
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a4fc24239e | ||
|
|
e488aec54d | ||
|
|
4a66eb61ee | ||
|
|
59694aa936 | ||
|
|
096bbf4ee6 | ||
|
|
31b2325037 | ||
|
|
d1e9065d19 | ||
|
|
56544dc315 | ||
|
|
0c13a056b4 | ||
|
|
b49142e61e | ||
|
|
9b1439ec50 | ||
|
|
ace325377a | ||
|
|
f4b9e48ccf | ||
|
|
078a624e5c | ||
|
|
4a511ad27e | ||
|
|
d3f74ed97d | ||
|
|
8402324bb5 | ||
|
|
5014a47a64 | ||
|
|
b832103f6b | ||
|
|
951cded095 | ||
|
|
f137823950 | ||
|
|
b8439c29e6 | ||
|
|
9b8320e34a | ||
|
|
69021f298d | ||
|
|
9a5f156a0f | ||
|
|
d05c1af35c | ||
|
|
65094dd9b3 | ||
|
|
22217bd484 | ||
|
|
8a5ab762f3 | ||
|
|
305a93163f | ||
|
|
5237595822 | ||
|
|
b55d7a3f72 | ||
|
|
8fa3a7442d | ||
|
|
061863998e | ||
|
|
0b6415c846 | ||
|
|
cbaae67ee4 | ||
|
|
95584e9271 | ||
|
|
c616e76b2a | ||
|
|
c1bc58b687 | ||
|
|
cc32697ae3 | ||
|
|
42e630a746 | ||
|
|
605ac58f7a | ||
|
|
b9a251bb1f | ||
|
|
f283aed73b | ||
|
|
704b31eb23 | ||
|
|
a57fc8d4fa | ||
|
|
5ccc225343 | ||
|
|
25facb8e4d | ||
|
|
ac48639bfc | ||
|
|
8c7f51fd74 | ||
|
|
2de1c9b05d | ||
|
|
2ac394f22b | ||
|
|
b652412964 | ||
|
|
bb93010716 | ||
|
|
f5a7c61214 | ||
|
|
6a9f06cb22 | ||
|
|
99ed022660 | ||
|
|
eec721e3bb | ||
|
|
9233d19c2c | ||
|
|
0656589f06 | ||
|
|
7686cef325 | ||
|
|
063e7c87d4 | ||
|
|
e771ca88c1 | ||
|
|
915552fed8 | ||
|
|
6592a0797f | ||
|
|
ad2d3f3ac3 | ||
|
|
d0ac04045a | ||
|
|
54c9478dfd | ||
|
|
b62f652a69 | ||
|
|
3a571c6d2f | ||
|
|
08753fe7dd | ||
|
|
c39d81c226 | ||
|
|
c8448940dd | ||
|
|
ad5961ba6e | ||
|
|
d741d18705 | ||
|
|
71bc7719e8 | ||
|
|
e1ded4d07c | ||
|
|
4bca65e53c | ||
|
|
cbfa6d9241 | ||
|
|
2d0ebf49f7 | ||
|
|
7177f1183d | ||
|
|
9d04a7b1df | ||
|
|
6121e80310 | ||
|
|
d6e2e042f8 | ||
|
|
361e9ed83a | ||
|
|
4ee14cbefa | ||
|
|
10b4f98276 | ||
|
|
affc47efc2 | ||
|
|
1195a82ab9 | ||
|
|
2d77d4f036 | ||
|
|
43a835fdde | ||
|
|
22f9c9cef1 | ||
|
|
7e4ce45f9a | ||
|
|
f164ffdc76 | ||
|
|
6684a3e039 | ||
|
|
6202bd244c | ||
|
|
9ba4a7fecd | ||
|
|
130c0590fa | ||
|
|
a11b42f734 | ||
|
|
33f69d0497 | ||
|
|
648c464518 | ||
|
|
a4b8d14e3d | ||
|
|
08f2eb215a | ||
|
|
cf528ef1c1 | ||
|
|
16449bb817 | ||
|
|
e6b3945e42 | ||
|
|
c11ec9f097 | ||
|
|
8983b3642d | ||
|
|
fa4f0c996a | ||
|
|
74cfca470d | ||
|
|
1f6672ebab | ||
|
|
b5f402554c | ||
|
|
ee6cd57f15 | ||
|
|
e43b739ddd | ||
|
|
474a261649 | ||
|
|
2b459b1358 | ||
|
|
5e7009876c | ||
|
|
046c8cc20c | ||
|
|
caf7544219 | ||
|
|
58d0c7add0 | ||
|
|
067363824c | ||
|
|
edaa4e2a03 | ||
|
|
1a38b97e51 | ||
|
|
36dac79faf | ||
|
|
1738bfeb35 | ||
|
|
79180f2a3b | ||
|
|
a51a581d97 | ||
|
|
aee9b4aa87 | ||
|
|
9f2bee08b6 | ||
|
|
ec973d0b3f | ||
|
|
a6f04b8be2 | ||
|
|
cccb51b3c4 | ||
|
|
15f22a0cb0 | ||
|
|
b82910cad8 | ||
|
|
a188add0eb | ||
|
|
641a4d7daf | ||
|
|
d7dc9aafa4 | ||
|
|
072774a147 | ||
|
|
15e44ecd8e | ||
|
|
2eb4e5606c | ||
|
|
15f440ce4d | ||
|
|
1a8f03b322 | ||
|
|
2d2696d22c | ||
|
|
090d26b2af | ||
|
|
e4c55edc02 | ||
|
|
a68ae0cd24 | ||
|
|
45ac5cb3be | ||
|
|
21f7dfc4fb | ||
|
|
d92fb77f11 | ||
|
|
4006bc0224 | ||
|
|
0d5681d2db | ||
|
|
ab9e6d662d | ||
|
|
4fa7bf0117 | ||
|
|
14a9f51efe | ||
|
|
a052b145fe | ||
|
|
1d7b0d970f | ||
|
|
ddeb6ce48b | ||
|
|
b6598cdcc6 | ||
|
|
74f9daaaaa | ||
|
|
dddffac68f | ||
|
|
f03c68c016 | ||
|
|
8c629c637d | ||
|
|
2dba16c62d | ||
|
|
90bb60d423 | ||
|
|
52bf7a56e3 | ||
|
|
0a0f2f8a4b | ||
|
|
aacf98a82a | ||
|
|
42385fd120 | ||
|
|
d754e475c2 | ||
|
|
a75dada16e | ||
|
|
e5a98ec501 | ||
|
|
0a8b4355c9 | ||
|
|
bd6e374d72 | ||
|
|
e4c5f1e1f8 | ||
|
|
a29c6f35c7 | ||
|
|
c5da5b60a8 | ||
|
|
8a5f9eed2d | ||
|
|
5a70c0bd38 | ||
|
|
edfb568c82 | ||
|
|
d35207c7a8 | ||
|
|
347223fa02 | ||
|
|
d259411e72 | ||
|
|
2bb559d29a | ||
|
|
5855dafac6 | ||
|
|
b4fe4dc7e9 | ||
|
|
2269142a04 | ||
|
|
ae3cd27579 | ||
|
|
7dbe9a5abb | ||
|
|
1a955efee6 | ||
|
|
67b89d2a9c | ||
|
|
7d72d8c347 | ||
|
|
8475f29e43 | ||
|
|
7f64871014 | ||
|
|
1ef10c3c14 | ||
|
|
9f15687b03 | ||
|
|
e696dc6c19 | ||
|
|
c8014d1947 | ||
|
|
801ee17487 | ||
|
|
0a35539d1c | ||
|
|
43680193a9 | ||
|
|
7accbc4981 | ||
|
|
9689034523 | ||
|
|
af3401ac5b | ||
|
|
b50913e4c3 | ||
|
|
f99afc3d37 | ||
|
|
744736fa23 | ||
|
|
84770dc29a | ||
|
|
cebeee1157 | ||
|
|
f6b083d835 | ||
|
|
71abbfb8fc | ||
|
|
0932a43fe7 | ||
|
|
58b016d173 | ||
|
|
c884571384 | ||
|
|
cfaa2b39c1 | ||
|
|
a68467150e | ||
|
|
ed095285c5 | ||
|
|
4ad437d557 | ||
|
|
666e7717f8 | ||
|
|
5f4a6c5160 | ||
|
|
36ea53f612 | ||
|
|
540475b50f | ||
|
|
1d8ffa2d8a | ||
|
|
02f5e05761 | ||
|
|
1cba90ff15 | ||
|
|
5a519540bc | ||
|
|
782e614b29 | ||
|
|
f131b2486a | ||
|
|
c399864e95 | ||
|
|
4e49a0fede | ||
|
|
00a6c8143a | ||
|
|
ab7c566270 | ||
|
|
70742d5083 | ||
|
|
75c9a4e482 | ||
|
|
ba7281d399 | ||
|
|
31aa305522 | ||
|
|
9a3ef54f53 | ||
|
|
14b58db9c6 | ||
|
|
d83ed6f774 | ||
|
|
100b2fc46e | ||
|
|
53d2f3f57b | ||
|
|
024074b2cf | ||
|
|
4436209213 | ||
|
|
c8a551a781 | ||
|
|
e0d385af38 | ||
|
|
135641d66c | ||
|
|
f63ef6ba04 | ||
|
|
b62b8639a6 | ||
|
|
253b92377d | ||
|
|
b006343740 | ||
|
|
f0133d1b1b | ||
|
|
d1722923fd | ||
|
|
242c004749 | ||
|
|
e24860f474 | ||
|
|
ecb95cc161 | ||
|
|
4e23c9104d | ||
|
|
179abe7087 | ||
|
|
2b5a224a4f | ||
|
|
c350d153da | ||
|
|
347b7e6a06 | ||
|
|
802c1b41ff | ||
|
|
7e8560f9a9 | ||
|
|
580d7761e1 | ||
|
|
149ab3ca8a | ||
|
|
b7234d339a | ||
|
|
9abba42df7 | ||
|
|
22c26dba36 | ||
|
|
7e9c08993d | ||
|
|
3f6fc215e9 | ||
|
|
62d5a7b825 | ||
|
|
2b1d703c4e | ||
|
|
b98c506baf | ||
|
|
60cf40f0b8 | ||
|
|
9c96e7c7a2 | ||
|
|
ce0d04226e | ||
|
|
eec2147826 | ||
|
|
93d7c7ed77 | ||
|
|
1a44fbee0f | ||
|
|
9cbd8937d7 | ||
|
|
ca6979d97e | ||
|
|
72ec983c4f | ||
|
|
f63c324764 | ||
|
|
ea3ba6e0d4 | ||
|
|
bf2a45f83e | ||
|
|
3f8bc43596 | ||
|
|
e6143beb25 | ||
|
|
3b0f00520e | ||
|
|
db0afaedfa | ||
|
|
a92bd780c8 | ||
|
|
04dbb0e4bb | ||
|
|
601ddee38b | ||
|
|
1e1554937c | ||
|
|
b4421a0532 | ||
|
|
7c3eeaff27 | ||
|
|
ed47d2f8b6 | ||
|
|
643e59e204 | ||
|
|
5dd48da5c8 | ||
|
|
134518ea52 | ||
|
|
a2b01b9681 | ||
|
|
bccd80882c | ||
|
|
eefb0d2df1 | ||
|
|
edfbfe8eee | ||
|
|
8510158aa0 | ||
|
|
760ed38297 | ||
|
|
95e7c5ce3b | ||
|
|
e92091c922 | ||
|
|
edf3cf93bb | ||
|
|
a110b24d76 | ||
|
|
1813100142 | ||
|
|
e29fb43754 | ||
|
|
d32fe11a19 | ||
|
|
db577eddd9 | ||
|
|
603d29f4ba | ||
|
|
ba5af175ba | ||
|
|
a9c7be6744 | ||
|
|
4ff7888bdc | ||
|
|
80e514e5d4 | ||
|
|
54b48da071 | ||
|
|
1b2f452373 | ||
|
|
4f25b011e1 | ||
|
|
6c95a4285a | ||
|
|
f2e42dd9d8 | ||
|
|
936a3958a5 | ||
|
|
eb8b76819d | ||
|
|
11bc9703c0 | ||
|
|
9a77d7f93e | ||
|
|
2f5cf8fce4 | ||
|
|
0d0360b277 | ||
|
|
7515359c3f | ||
|
|
30a89dedbd | ||
|
|
f5e1987367 | ||
|
|
45222d6b2a | ||
|
|
3513b220c0 | ||
|
|
81278afefe | ||
|
|
eaca39b557 | ||
|
|
27864e8128 | ||
|
|
ec77861fae | ||
|
|
c802bd2ce2 | ||
|
|
6ad93577db | ||
|
|
cb2f4e5773 | ||
|
|
e6a14dda4d | ||
|
|
8163c20342 |
1
.github/pull_request_template.md
vendored
1
.github/pull_request_template.md
vendored
@@ -4,6 +4,7 @@ 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")
|
||||
- Indicate whether an AI LLM was utilized
|
||||
|
||||
Thank you for contributing to RomWBW! I will review your pull request as soon as possible.
|
||||
|
||||
|
||||
3
.github/workflows/commit.yml
vendored
3
.github/workflows/commit.yml
vendored
@@ -26,7 +26,8 @@ jobs:
|
||||
run: |
|
||||
export TZ='America/Los_Angeles'
|
||||
sudo apt-get install srecord
|
||||
make distlog
|
||||
make transpile-c-code
|
||||
make distlog --trace
|
||||
rm -rf .git*
|
||||
|
||||
- name: List Output
|
||||
|
||||
18
.github/workflows/release.yml
vendored
18
.github/workflows/release.yml
vendored
@@ -19,7 +19,8 @@ jobs:
|
||||
export TZ='America/Los_Angeles'
|
||||
sudo apt-get install libncurses-dev
|
||||
sudo apt-get install srecord
|
||||
make distlog
|
||||
make transpile-c-code
|
||||
make distlog --trace
|
||||
rm -rf .git*
|
||||
|
||||
- name: Create Package Archive
|
||||
@@ -52,6 +53,21 @@ jobs:
|
||||
title: "${{env.TITLE}} ${{github.ref_name}}"
|
||||
files: |
|
||||
RomWBW-${{github.ref_name}}-Package.zip
|
||||
|
||||
- name: Build Docs
|
||||
run: |
|
||||
export TZ='America/Los_Angeles'
|
||||
sudo apt-get install gpp pandoc
|
||||
pip install mkdocs
|
||||
make -C Source/Doc deploy_mkdocs
|
||||
mkdocs build -f Source/Doc/mkdocs.yml
|
||||
|
||||
- name: Deploy Docs
|
||||
uses: peaceiris/actions-gh-pages@v4
|
||||
# if: github.ref == 'refs/heads/master'
|
||||
with:
|
||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
publish_dir: Source/Doc/site
|
||||
|
||||
# - name: Upload Package Archive
|
||||
# uses: AButler/upload-release-assets@v2.0.2
|
||||
|
||||
23
.gitignore
vendored
23
.gitignore
vendored
@@ -100,7 +100,7 @@ Tools/unix/zx/zx
|
||||
!Source/EZ512/*.bin
|
||||
!Source/Z1RCC/*.bin
|
||||
!Source/ZZRCC/*.bin
|
||||
!Source/FZ80/*.bin
|
||||
!Source/SZ80/*.bin
|
||||
!Tools/cpm/**
|
||||
!Tools/unix/zx/*
|
||||
!Tools/zx/*
|
||||
@@ -114,20 +114,24 @@ Source/ZPM3/genbnk.dat
|
||||
Source/ZSDOS/zsdos.err
|
||||
|
||||
# Lets explicit list all generate untracked binary files
|
||||
Binary/*.upd
|
||||
Binary/Apps/bbcbasic.txt
|
||||
Binary/Apps/copysl.doc
|
||||
Binary/Apps/copysl.doc
|
||||
Binary/Apps/fdu.doc
|
||||
Binary/Apps/fdu.doc
|
||||
Binary/Apps/Tunes/bgm.vgm
|
||||
Binary/Apps/Tunes/ending.vgm
|
||||
Binary/Apps/Tunes/inchina.vgm
|
||||
Binary/Apps/Tunes/shirakaw.vgm
|
||||
Binary/Apps/Tunes/startdem.vgm
|
||||
Binary/Apps/Tunes/wonder01.vgm
|
||||
Binary/Apps/copysl.doc
|
||||
Binary/Apps/fdu.doc
|
||||
Binary/Apps/zmconfig.ovr
|
||||
Binary/Apps/zminit.ovr
|
||||
Binary/Apps/zmp.doc
|
||||
Binary/Apps/zmp.hlp
|
||||
Binary/Apps/zmp.cfg
|
||||
Binary/Apps/zmp.doc
|
||||
Binary/Apps/zmp.fon
|
||||
Binary/Apps/zmp.hlp
|
||||
Binary/Apps/zmterm.ovr
|
||||
Binary/Apps/zmxfer.ovr
|
||||
Binary/CPM3/bdos3.spr
|
||||
@@ -146,13 +150,12 @@ Binary/CPNET/cpn12ser.lbr
|
||||
Binary/CPNET/cpn3duo.lbr
|
||||
Binary/CPNET/cpn3mt.lbr
|
||||
Binary/CPNET/cpn3ser.lbr
|
||||
Binary/*.upd
|
||||
Binary/hd1k_prefix.dat
|
||||
Binary/ZPM3/bnkbdos3.spr
|
||||
Binary/ZPM3/bnkbios3.spr
|
||||
Binary/ZPM3/gencpm.dat
|
||||
Binary/ZPM3/resbdos3.spr
|
||||
Binary/ZPM3/zinstal.zpm
|
||||
Binary/hd1k_prefix.dat
|
||||
Source/BPBIOS/def-ww.lib
|
||||
Source/CPNET/cpn12duo.lbr
|
||||
Source/CPNET/cpn12mt.lbr
|
||||
@@ -169,6 +172,9 @@ Source/Fonts/font8x16u.asm
|
||||
Source/Fonts/font8x8c.asm
|
||||
Source/Fonts/font8x8c.bin
|
||||
Source/Fonts/font8x8u.asm
|
||||
Source/Fonts/font6x8c.asm
|
||||
Source/Fonts/font6x8c.bin
|
||||
Source/Fonts/font6x8u.asm
|
||||
Source/Fonts/fontcgac.asm
|
||||
Source/Fonts/fontcgac.bin
|
||||
Source/Fonts/fontcgau.asm
|
||||
@@ -177,6 +183,8 @@ Source/Fonts/fontvgarcc.bin
|
||||
Source/Fonts/fontvgarcu.asm
|
||||
Source/HBIOS/*.upd
|
||||
Source/HBIOS/build_env.cmd
|
||||
Source/HBIOS/build_env.cmd
|
||||
Source/HBIOS/hbios_env.sh
|
||||
Source/HBIOS/hbios_env.sh
|
||||
Source/HBIOS/netboot.mod
|
||||
Source/Images/*.cat
|
||||
@@ -194,4 +202,3 @@ Source/ZPM3/setz3.com
|
||||
Tools/unix/OpenSpin/build/
|
||||
Tools/unix/zxcc/config.h
|
||||
Tools/unix/zxcc/zxcc
|
||||
Binary/Apps/bbcbasic.txt
|
||||
|
||||
36
.vscode/settings.json
vendored
36
.vscode/settings.json
vendored
@@ -1,4 +1,38 @@
|
||||
{
|
||||
"z80-macroasm.format.enabled": true,
|
||||
"z80-macroasm.format.baseIndent": 1,
|
||||
"z80-macroasm.format.whitespaceAfterInstruction": "tab",
|
||||
"z80-macroasm.format.uppercaseKeywords": true,
|
||||
"z80-macroasm.format.spaceAfterArgument": true,
|
||||
"z80-macroasm.format.hexaNumberStyle": "motorola",
|
||||
"z80-macroasm.format.hexaNumberCase": true,
|
||||
"files.trimTrailingWhitespace": false,
|
||||
"files.eol": "\r\n"
|
||||
"files.eol": "\r\n",
|
||||
"files.associations": {
|
||||
"*.inc": "z80-macroasm",
|
||||
"*.asm": "z80-macroasm",
|
||||
"*.180": "z80-macroasm",
|
||||
"*.asm.m4": "z80-macroasm",
|
||||
"*.inc.m4": "z80-macroasm",
|
||||
"*.mac": "z80-macroasm",
|
||||
"*.asmpp": "z80-macroasm",
|
||||
"*.zdsproj": "xml",
|
||||
"*.Z80": "z80-macroasm",
|
||||
"ch376.h": "c",
|
||||
"protocol.h": "c",
|
||||
"usb_state.h": "c",
|
||||
"functional": "c",
|
||||
"class_scsi.h": "c",
|
||||
"z80.h": "c",
|
||||
"dev_transfers.h": "c",
|
||||
"usb-base-drv.h": "c",
|
||||
"critical-section.h": "c",
|
||||
"enumerate.h": "c",
|
||||
"ch376inc.h": "c",
|
||||
"enumerate_storage.h": "c",
|
||||
"work-area.h": "c",
|
||||
"hbios-driver-storage.h": "c",
|
||||
"class_hid_keyboard.h": "c",
|
||||
"print.h": "c"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,42 +1,91 @@
|
||||
# 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.
|
||||
> **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.
|
||||
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
|
||||
- Submitting fixes and enhancements
|
||||
|
||||
## RomWBW GitHub Repository
|
||||
|
||||
The [RomWBW GitHub Repository](https://github.com/wwarthen/RomWBW) is the primary location for developing, supporting, and distributing RomWBW. Although input is gladly accepted from almost any channel, the GitHub Repository is preferred.
|
||||
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 **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.
|
||||
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.
|
||||
- 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. In the comments, be sure to indicate if an
|
||||
AI LLM was utilized in any way.
|
||||
|
||||
## 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.
|
||||
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.
|
||||
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.
|
||||
In most cases, the use of `<cr><lf>` line endings is preferred. This is
|
||||
standard for the operating systems of the era that RomWBW provides.
|
||||
Also note that CP/M text files should end with a ctrl-Z (0x1A). This is
|
||||
not magically added by the tools that generate the disk images.
|
||||
|
||||
## Hints for Developers
|
||||
|
||||
- The majority of RomWBW is assembled with TASM (and it's compatible
|
||||
equivalent sz80as). These tools have quirks that are very subtle. For
|
||||
example, TASM does not evaluate expressions in the standard way. It
|
||||
uses a left to right approach. Check the TASM documentation carefully.
|
||||
|
||||
- The following two Z80 instructions highlight a common issue with the
|
||||
Z80 assembler syntax. Parens in operands frequently indicate an
|
||||
indirect reference. To treat the operand as an expression, use the
|
||||
second format.
|
||||
|
||||
```
|
||||
LD A,(5+5) ; Load A with the value at address 10
|
||||
LD A,0+(5+5) ; Load A with the value 10
|
||||
```
|
||||
|
||||
- The RomWBW documewntation in the Doc directory is generated with a
|
||||
process outside of the normal build process. To update documentation,
|
||||
please update the .md files in Source/Doc. Those are the Markdown
|
||||
source files for the documentation. The PDF files will be updated
|
||||
offline from those.
|
||||
|
||||
## License
|
||||
|
||||
RomWBW is licensed under GPLv3. When you submit code changes, your submissions are understood to be under the same [GPLv3 License](https://www.gnu.org/licenses/gpl-3.0.html) that covers the project.
|
||||
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.
|
||||
|
||||
81
Doc/CPM/BPBIOS/BPBIOS_1_Introduction.md
Normal file
81
Doc/CPM/BPBIOS/BPBIOS_1_Introduction.md
Normal file
@@ -0,0 +1,81 @@
|
||||
# B/P Bios
|
||||
# Banked and Portable Basic IO System
|
||||
|
||||
# 1 Introduction
|
||||
|
||||
The Banked and Portable (B/P) Basic I/O System (BIOS) is an effort to standardize many of the logical to physical mapping mechanisms on Microcomputers running Z-Systems with ZSDOS. In expanding the capabilities of such systems, it became apparent that standard BIOSes do not contain the functionality necessary, adequate standardization in extended BIOS calls, nor an internal structure to fully support external determination of system parameters. B/P Bios provides a method of achieving these goals, while also possessing the flexibility to operate on a wide range of hardware systems with a much smaller level of systems programming than previously required.
|
||||
|
||||
|
||||
## 1.1 About This Manual
|
||||
|
||||
Documentation on B/P Bios consists of this manual plus the latest addendum on the distribution disk in the file README.2ND. This manual is divided into the following sections:
|
||||
|
||||
* The Features of B/P Bios summarizes the significant features of B/P Bios in general, highlighting advantages and the few limitations in the system.
|
||||
|
||||
* Tailoring B/P Bios contains details on altering the many options to generate a customized `.REL` file tailored to your system.
|
||||
|
||||
* Installing a B/P Bios details the installation of B/P Bios in both Unbanked and Banked configurations in a "how to" fashion.
|
||||
|
||||
* Programming for B/P Bios describes the interfaces, data structures and recommended programming practices to insure the maximum benefit and performance from systems with B/P Bios.
|
||||
|
||||
* The B/P Bios Utilities describes the purpose, operation, and customization of all supplied B/P Bios utilities and support routines.
|
||||
|
||||
* Appendices which summarize various technical information.
|
||||
|
||||
* A glossary defining many technical terms used in this Manual.
|
||||
|
||||
* An index of key words and phrases used in this Manual.
|
||||
|
||||
For those not interested in the technical details, or who want to bring the system up with a pre-configured version as quickly as possible, Section 4, Installing a B/P Bios, will lead you through the installation steps needed to perform the final tailoring to your specific computer. Other chapters cover details of the individual software modules comprising the B/P Bios, and specifics on the utilities provided to ease you use of this product.
|
||||
|
||||
|
||||
## 1.2 Notational Conventions
|
||||
|
||||
Various shorthand terms and notations are used throughout this manual. Terms are listed in the Glossary at the end of this manual.
|
||||
|
||||
Though the symbols seem cryptic at first, they are a consistent way of briefly summarizing program syntax. Once you learn to read them you can tell at a glance how to enter even the most complicated commands.
|
||||
|
||||
Several special symbols are used in program syntax descriptions. By convention, square brackets (\[\]) indicate optional command line items. You may or may not include items shown between brackets in your command, but if you do not, programs usually substitute a default value of their own. If items between brackets are used in a command, all other items between the brackets must also be used, unless these items are themselves bracketed.
|
||||
|
||||
All of the support utilities developed to support the B/P Bios system contain built-in help screens which use the above conventions to display helpful syntax summaries. Help is always invoked by following the command with two slashes (`//`). So for example,
|
||||
|
||||
`ZXD //`
|
||||
|
||||
invokes help for ZXD, the ZSDOS extended directory program. Interactive ZSDOS programs such as BPCNFG2 also contain more detailed help messages which appear as a session progresses.
|
||||
|
||||
Many utilities may be invoked from the command line with options which command the programs to behave in slightly different ways. By convention, options are given after other command parameters. For example, the `P` option in the command
|
||||
|
||||
`ZXD *.* P`
|
||||
|
||||
causes the ZXD directory utility to list all files (*.*) and send its output to the printer (P). For convenience, a single slash character (/) can often be used in place of leading parameters to signify that the rest of the command line consists of option characters. Therefore, the command
|
||||
|
||||
`ZXD /P`
|
||||
|
||||
is identical in meaning to the previous example (see 6.23 for more on ZXD).
|
||||
|
||||
|
||||
## 1.3 What is B/P Bios?
|
||||
|
||||
B/P Bios is a set of software subroutines which directly control the chips and other hardware in your computer and present a standard software interface to the Operating System such as our ZSDOS/ZDDOS, Echelon's ZRDOS, or even Digital Research's CP/M 2.2. These routines comply with the CP/M 2.2 standards for a Basic IO System (BIOS) with many extensions; some based on CP/M 3.x (aka CP/M Plus), and others developed to provide necessary capabilities of modern software. When properly coded, the modules comprising a B/P Bios perform with all the standard support utilities, nearly all Z-System utilities, and most application programs without alteration.
|
||||
|
||||
The ability to operate Banked, Non-banked and Boot System versions of the Bios with a single suite of software, across a number of different hardware machines, plus the maximization of Transient Program Area for application programs in banked systems are features which are offered by no other system of which we are aware.
|
||||
|
||||
|
||||
## 1.4 The History of B/P Bios
|
||||
|
||||
Our earlier work developing ZSDOS convinced us that we needed to attack the machine-dependent software in Z80-compatible computers and develop some standard enhancements in order to exercise the full potential of our machines. This premise is even more true today with large Hard Disks (over 100 Megabytes) being very common, needs for large RAM Drives, and an ever shrinking Transient Program Area. Attempts to gain flexibility with normal operating systems were constrained by the 64k addressable memory range in Z80-compatible systems, and forced frequent operating system changes exemplified by NZCOM and NZBLITZ where different operating configurations could be quickly changed to accommodate application program needs.
|
||||
|
||||
In the mid to late 1980's, several efforts had been made to bank portions of CP/M 2.2 "type" systems. XBIOS was a banked Bios for only the HD64180-based MicroMint SB-180 family. While it displayed an excellent and flexible interface and the ability to operate with a variety of peripherals, it had several quirks and noticeably degraded the computer performance. A banked Bios was also produced for the XLM-180 single board S-100 computer, but required special versions of many Z-System utilities, and was not produced in any significant quantity. Other spinoffs, such as the Epson portable, attempted banking of the Bios, but most failed to achieve our comprehensive goals of compatibility with the existing software base, high performance, and portability.
|
||||
|
||||
In 1989, Cam developed the first prototype of B/P Bios in a Non-banked mode on his TeleTek while Hal concentrated on extending ZSDOS and the Command Processor. As of 1997, B/P Bios has been installed on:
|
||||
|
||||
| Computer | Features |
|
||||
| :--- | :--- |
|
||||
| YASBEC | Z180 CPU, FD1772 FDC, DP8490 SCSI, 1MB RAM |
|
||||
| Ampro LB w/MDISK | Z80 CPU, FD1770 FDC, MDISK 1MB RAM |
|
||||
| MicroMint SB-180 | HD64180 CPU, SMS9266 FDC, 256KB RAM |
|
||||
| MicroMint SB180FX | HD64180Z CPU, SMS9266 FDC, 512KB RAM |
|
||||
| Compu/Time S-100 | Z80 CPU, FD1795 FDC, 1 MB RAM |
|
||||
| Teletek | Z80 CPU, NEC765 FDC, 64KB RAM |
|
||||
| D-X Designs P112 | Z182 CPU, SMC FDC37C665 FDC, Flash ROM, 512KB RAM (mods for 5380 SCSI and GIDE) |
|
||||
|
||||
36
Doc/CPM/BPBIOS/BPBIOS_2_Features.md
Normal file
36
Doc/CPM/BPBIOS/BPBIOS_2_Features.md
Normal file
@@ -0,0 +1,36 @@
|
||||
# 2 Features of B/P Bios
|
||||
|
||||
B/P BIOS is designed to be completely compatible with the CP/M 2.2 standards for a Basic IO System, as well as to provide many extensions needed for banked memory which is becoming so prevalent with newer systems and processors. Additionally, strict coding standards used in the various modules forming the BIOS ease interface problems with applications programs and provide a more robust framework for future development. The extensions added to the basic CP/M 2.2 foundation include many elements from Digital Research's CP/M 3 (aka CP/M Plus), but in a more logically consistent manner. Also included in banked versions are provisions for managing up to 8 MB of extended memory for banked applications, RAM Drives and potentially multitasking in future versions. To provide insight into the methodology used, let us now examine some of the features in a generic B/P Bios.
|
||||
|
||||
|
||||
## 2.1 Character IO
|
||||
|
||||
As defined by Digital Research in their CP/M 2.2 standards, character IO consisted of logical devices referred to as TTY, CRT, UC1, CON, etc. B/P Bios extends and generalizes these interfaces using the IOBYTE to define four physical devices called COM1, COM2, PIO and NUL. The first two, COM1 and COM2, are serial ports; PIO is a Parallel port, while NUL is a "bit-bucket" which can be replaced by a customized driver, or used in lieu of an actual device. Digital Research provided only a limited interface capability to the character devices in CP/M 2.2, consisting of a Console (CON), an auxiliary Input and Output (RDR/PUN), and a Printer (LST). The ability to sense Input and Output Status with these devices was extremely limited and was enhanced in CP/M 3. These enhanced capabilities are completely incorporated into B/P Bios with the addition of strict register usage so that only relevant registers may be altered in the respective routines. By manipulating the IOBYTE, any of the four physical devices may be used in the three logical devices of CONsole, AUXiliary, and Printer (LST).
|
||||
|
||||
Also featured in B/P Bios are modifications of CP/M 3 functions to initialize (or re-initialize) all devices and parameters, and return the address of a table which contains names and parameters of the defined character devices. While not totally compatible with CP/M 3 equivalents, these functions are consistent with the spirit and functionality needed with this advanced system. Included in the device table are; flags defining whether the device is capable of Input, Output or Both, Data rates for serial devices (Maximum and Set), Serial data format where applicable, and Handshaking method (CTS/RTS, XON/XOFF or None), as well as Input and Output Data masks for stripping unneeded bits from characters during IO.
|
||||
|
||||
|
||||
## 2.2 Mass Storage IO
|
||||
|
||||
All versions of Digital Research's CP/M BIOSes define only a generic Disk driver with implementations of Floppy, Hard, RAM and Tape drives left to the user or developer. In B/P Bios, we went several steps further to ease many problems. First, we retained all standard CP/M 2.2 functions and parameters, added CP/M 3 features for returning the Disk Parameter Header (DPH) table address, and flushing of the software deblocking code segment, and added a new vector to the BIOS jump table to provide a standard method of directly addressing low-level device functions. Several standard low-level Floppy Disk functions are supported and used by the standard utilities, including a function to return the type of Disk Controller in use which permits a single support utility to adapt to a wide variety of hardware platforms. In a like manner, low-level functions are provided for SCSI/SASI Hard Disk drives, and provisions for RAM Disk drives in the event special hardware is implemented. The methods used to implement these access mechanisms may be logically extended to handle Tape Drives or Network Interfaces.
|
||||
|
||||
|
||||
## 2.3 Clock Support for Time and Date
|
||||
|
||||
Many Hardware vendors have added provisions for Time and Date as non-standard extensions to CP/M 2.2 BIOSes, and more have incorporated such support into CP/M 3 BIOSes. We opted to define the CP/M 3 clock vector as a ZSDOS-standard clock building on our previous Operating System work. This entry point into the Bios completely complies with our ZSDOS standards and can completely replace the separate clock driver when used with ZSDOS. For systems capable of returning tenths-of-seconds, such as the YASBEC and SB-180, the standard has been enhanced to support this capability as well.
|
||||
|
||||
|
||||
## 2.4 Banked Memory Support
|
||||
|
||||
While Digital Research added banked memory support to their CP/M 3, it was in a manner incompatible with Bios interface standards defined for earlier CP/M standards. The method used in B/P Bios is compliant with CP/M 2.2 in direct accessing of Bios functions with only one minor exception when using the Banked ZSDOS2, and contains many of the CP/M 3 extensions added for banked memory support, with some being modified to be consistent with standards adopted for Z-System software. The exception to CP/M 2.2 accesses occurs when the Operating System can access certain buffers in the System Memory Bank. With ZSDOS 2, Allocation Bit Buffers (ALV), Check Buffers (CSV), and the Disk Host Buffer are all contained in the System Bank and not directly accessible from Transient Programs. To compensate for this, we have added a command to ZSDOS 2 to return the free space on disks (the most common reason for accessing these buffers) and tailored several utilities to adapt to banked and non-banked systems.
|
||||
|
||||
In addition to the primitives initiated by Digital Research, we added functions to directly access Words and Bytes in extended banks of memory, Directly accessing software routines contained in alternate memory banks, and properly managing the system when errors occur. These features make B/P Bios much more robust and resilient than other products. These features are implemented by methods transparent to the system utilities so that the same functions are available in both banked and non-banked versions.
|
||||
|
||||
|
||||
## 2.5 Other Features
|
||||
|
||||
B/P Bios contains a standardized identification method which may be used to determine the hardware on which the software is operating. This allows applications to "adapt" to the environment in a manner similar to that used in the rest of the Z-System community. It also minimizes system "crashes" by executing programs which assume certain hardware features which may be detrimental if executed on other systems. The effects of identification of physical system parameters is most readily noticed by virtue of a single suite of support programs performing low-level functions such as formatting and diagnostics which function across widely differing hardware platforms. Portability on this scale can rarely be seen in other computer systems.
|
||||
|
||||
The ZCPR 3.4 Environment with extensions is mandatory in a B/P Bios system. Beginning with the addition of System Segment address and size information for CPR, DOS and BIOS which were added in the ZCPR 3.4 Environment, B/P Bios also adds a Resident User Space which may be used to locate unique routines for custom applications in a manner similar to, but more consistent than NZ-COM. An Environment Version number of 90H identifies the Z3 Environment as being compliant with B/P definitions.
|
||||
|
||||
In Banked systems, application programs may also be placed in alternate memory banks using location and sizing information contained at standard positions within the Bios Header Structure. This feature permits significantly greater functionality without sacrificing precious Transient Program Area. While the scheme employed in the initial distribution is subject to minor adjustments as the banked ZSDOS2 becomes more firmly developed, experimentation and suggestions into this realm are encouraged.
|
||||
232
Doc/CPM/BPBIOS/BPBIOS_3_Tailoring.md
Normal file
232
Doc/CPM/BPBIOS/BPBIOS_3_Tailoring.md
Normal file
@@ -0,0 +1,232 @@
|
||||
# 3 Tailoring a B/P Bios
|
||||
|
||||
To customize a B/P Bios for your use, or adapt it to a new hardware set, you will need an editor and an assembler capable of producing standard Microsoft Relocatable files. Systems using the Hitachi HD64180 or Zilog Z180 must be assembled with either ZMAC or SLR180 which recognize the extended mnemonic set, or with a Z80 assembler and MACRO file which permits assembly of the extended instructions. For Z80 and compatible processors, suitable assemblers include ZMAC and Z80ASM. For any assembler, failure to produce standard Microsoft Relocatable code will preclude the ability of our Standard utilities to properly install B/P Bios systems.
|
||||
|
||||
|
||||
## 3.1 Theory of Operation
|
||||
|
||||
In order to understand the need for, and principles behind B/P Bios, you must understand the way in which CP/M 2.2, as modified by the Z-System, uses the available memory address space of a Z80 microprocessor. For standard versions of CP/M and compatible systems, the only absolute memory addresses are contained in the Base Page which is the range of 0 to 100H. All addresses above this point are variable (within certain limits). User programs are normally run from the Transient Program Area (TPA) which is the remaining space after all Operating System components have been allocated. The following depicts the assigned areas pictorially along with some common elements assigned to each memory area:
|
||||
|
||||
```generic
|
||||
FFFFH /------------------\
|
||||
| Z-System Buffers | ENV, TCAP, IOP, FCP, RCP
|
||||
|------------------|
|
||||
| Bios | Code + ALV, CSV, Sector Buffers
|
||||
|------------------|
|
||||
| Operating System | CP/M 2.2, ZRDOS, ZSDOS1
|
||||
|------------------|
|
||||
| Command Processor| CCP, ZCPR3.x
|
||||
|------------------|
|
||||
| Transient |
|
||||
| |
|
||||
| Program |
|
||||
| |
|
||||
| Area |
|
||||
0100H |------------------|
|
||||
| Base Page | IOBYTE, Jmp WB, Jmp Dos, FCB, Buffer
|
||||
0000H \------------------/
|
||||
```
|
||||
|
||||
As more and more functionality was added to the Z-System Buffers, bigger drives were added using more ALV space, and additional functionality was added to Bios code in recent systems, the available TPA space has become increasingly scarce.
|
||||
|
||||
B/P Bios attacks this problem at the source in a manner which is easily adaptable to different hardware platforms. It uses additional memory for more than the traditional role of simple RAM Disks, it moves much of the added overhead to alternate memory banks. The generic scheme appears pictorially as:
|
||||
|
||||
```generic
|
||||
FFFFH /----------\
|
||||
| |
|
||||
| BNK1 |
|
||||
| |
|
||||
8000H |----------| /----------\ /----------\ /----------\
|
||||
| | | |\ | |\ | |\
|
||||
| BNK0 | | BNK2 | | BNKU | | BNK3 ||\
|
||||
| | | || | || | |||
|
||||
0000H \----------/ \----------/ \----------/ \----------/
|
||||
\- - - - - / \- - - - - / \- - - - - /|
|
||||
| BNKM |
|
||||
\----------/
|
||||
TPA SYSTEM USER RAM DISK
|
||||
```
|
||||
|
||||
As can be seen from the above diagram, multiple banks of memory may be assigned to different functional regions of memory, with each 32k bank (except for the one defined as BNK1) being switched in and out of the lower 32k of the processor's memory map. The bank defined as BNK1 is ALWAYS present and is referred to as the Common Bank. This bank holds the portions of the Operating System (Command Processor, Operating System, BIOS, and Z-System tables) which may be accessed from other areas, and which therefore must always be "visible" in the processor's memory. It also contains the code to control the Bank switching mechanisms within the B/P Bios.
|
||||
|
||||
To illustrate this functional division, the memory map of a basic B/P Bios system is divided as:
|
||||
|
||||
```generic
|
||||
FFFFH /------------------\
|
||||
| Z-System Buffers |
|
||||
|------------------|
|
||||
| User Space |
|
||||
|------------------|
|
||||
| Bios |
|
||||
|------------------|
|
||||
| Operating System |
|
||||
|------------------|
|
||||
| Command Processor| /------------------\ 8000H
|
||||
|------------------| / | Bios Buffers |
|
||||
8000H | Transient | | Banked Bios Part |
|
||||
| | |------------------|
|
||||
| | | Banked Dos Part |
|
||||
| Program | |------------------|
|
||||
| | | Banked CCP Part |
|
||||
| | |------------------|
|
||||
| Area | | CCP Restoral |
|
||||
0100H |------------------| |------------------| 0100H
|
||||
| Base Page | | Base Page Copy |
|
||||
0000H \------------------/ \------------------/ 0000H
|
||||
TPA (BNK0/BNK1) System Bank (BNK2)
|
||||
```
|
||||
|
||||
The B/P Bios banking concept defines a one byte Bank Number permitting up to 8 Megabytes to be directly controlled. Certain assumptions are made in the numbering scheme, the foremost of which is that BNK0 is the lowest physical RAM bank, BNK1 is the next incremental RAM bank, with others follow in incrementing sequential order. A couple of examples may serve to illustrate this process. The YASBEC is offered with a couple of options in the Memory Map. Units with the MEM-1, 2 or 3 decoder PALs assign the first 128k bytes of physical memory to the Boot ROM, so BNK0 is set to 4 (Banks 0-3 are the ROM). The MEM-4 PAL only uses the first 32k (Physical Bank 0) for the ROM which means that BNK0 is assigned to 1, BNK1 to 2 and so on up to the 1 Megabyte maximum where BNKM is 31.
|
||||
|
||||
The Ampro Little Board equipped with MDISK, on the other hand, completely removes the Boot ROM from the memory map leaving a maximum of 1 MB of contiguous RAM space. In this system, BNK0 is set to 0 and BNKM to 31 of a fully equipped 1 MB MDISK board.
|
||||
|
||||
The region beginning after BNK1 is referred to as the System Bank. It begins at the bank number assigned to BNK2 and ends at the bank number immediately before that assigned to the User Bank, BNKU if present, or BNK3 if no User Bank area is defined.
|
||||
|
||||
If present, one or more 32k banks of memory may be defined with the BNKU equate for unique user programs or storage areas. This area begins with the bank number set to the label and ends at the bank number immediately before the BNK3 label. BNK3 defines a high area of physical memory which is most often used for a RAM Disk providing fast temporary workspace in the form of an emulated disk drive.
|
||||
|
||||
B/P Bios contains protection mechanisms in the form of software checks to insure that critical portions of the memory map are enforced. In the case of Non-banked systems, a check is made to insure that the system size is not so great that the Bios may overwrite reserved Z-System areas in high memory (RCP, IOP, etc). If a possible overflow condition is detected, the message
|
||||
|
||||
`++ mem ovfl ++`
|
||||
|
||||
will be issued when the system is started. In Banked Bios systems, this message will be displayed if the top of the system portions in the SYStem Bank exceeds the 32k bank size. For most systems, this space still permits drives of several hundred megabytes to be accommodated.
|
||||
|
||||
Since the Common portions of the operating system components must remain visible to applications, a similar check is made to insure that the lowest address used by the Command Processor is equal to or greater than 8000H. This factor is checked both in both MOVxSYS and BPBUILD with either a warning issued in the case of the former, or validity checks on entry in the case of the latter.
|
||||
|
||||
|
||||
## 3.2 B/P Bios Files
|
||||
|
||||
This BIOS is divided into a number of files, some of which depend highly on the specific hardware used on the computer, and some of which are generic and need not be edited to assemble a working system. Much use is made of conditional assembly to tailor the resulting Bios file to the desired configuration. The Basic file, `BPBIO-xx.Z80`, specifies which files are used to assemble the Bios image under the direction of an included file, `DEF-xx.LIB`. It is this file which selects features and contains the Hardware-dependent mnemonic equates. By maintaining the maximum possible code in common modules which require no alterations, versions of B/P Bios are relatively easy to convert to different machines. The independent modules used in the B/P Bios system are:
|
||||
|
||||
| Filename | Description |
|
||||
| :--- | :--- |
|
||||
| `BOOTRAM.Z80` | (only needed in BOOT ROM applications) |
|
||||
| `BOOTROM.Z80` | (only needed in BOOT ROM applications) |
|
||||
| `BYTEIO.Z80` | Character IO per IOBYTE using IIO-xx routines |
|
||||
| `DEBLOCK.Z80` | Disk Deblocking routines |
|
||||
| `DPB.LIB` | 3.5/5.25" Floppy Format Definitions (if AutoSelect) |
|
||||
| `DPB8.LIB` | 8"/Hi-Density Floppy Format Definitions (if AutoSelect) |
|
||||
| `DPB2.LIB` | Additional Floppy Definitions (optional if AutoSelect) |
|
||||
| `DPBRAM.LIB` | Fixed Floppy Format Definitions (if Not AutoSelect) |
|
||||
| `DPH.LIB` | Disk Parameter Header Table & Floppy definitions |
|
||||
| `FLOPPY.Z80` | Floppy Disk High-Level Control |
|
||||
| `SECTRAN.Z80` | Sector Translate routines |
|
||||
| `SELFLP1.Z80` | Floppy Select routine (if Not auto selecting) |
|
||||
| `SELFLP2.Z80` | Floppy Select routine (if auto selecting) |
|
||||
| `SELRWD.Z80` | Generic Read/Write routines |
|
||||
| `Z3BASE.LIB` | ZCPR 3.x file equate for Environment settings |
|
||||
|
||||
Other files are hardware version dependent to varying extents. These modules requiring customization for different hardware systems are given names which end with a generic "-xx" designator to identify specific versions. Tailoring these modules ranges from simple prompt line customization to complete re-writes. Versions of B/P Bios generated to date are identified as:
|
||||
|
||||
| ID | Computer system |
|
||||
| :---: | :--- |
|
||||
| `-18` | MicroMint SB-180 | (64180 CPU, 9266 FDC, 5380 SCSI) |
|
||||
| `-YS` | YASBEC | (Z180 CPU, 1772 FDC, DP8490 SCSI) |
|
||||
| `-AM` | Ampro Little Board | (Z80 CPU, 1770 FDC, 1MB MDISK) |
|
||||
| `-CT` | Compu/Time S-100 board set | (Z80 CPU, 1795 FDC, 1MB Memory) |
|
||||
| `-TT` | Teletek | (Z80 CPU, 765 FDC) |
|
||||
|
||||
Files associated with specific hardware versions or require tailoring are:
|
||||
|
||||
| Filename | Description |
|
||||
| :--- | :--- |
|
||||
| `BPBIO-xx.Z80` | Basic file, tailored for included file names |
|
||||
| `CBOOT-xx.Z80` | Cold Boot routines, Sign-on prompts |
|
||||
| `DEF-xx.LIB` | Equates for option settings, mode, speed, etc. |
|
||||
| `DPBHD-xx.LIB` | Hard Drive Partition Definitions (optional) |
|
||||
| `DPBM-xx.LIB` | Ram Drive Definition (optional) |
|
||||
| `DPHHD-xx.LIB` | Hard Drive DPH definitions (optional) |
|
||||
| `DPHM-xx.LIB` | Ram Drive DPH Definition (optional) |
|
||||
| `FDC-xx.Z80` | Floppy Disk Low-Level interface/driver routines |
|
||||
| `HARD-xx.Z80` | Hard Drive Low-Level interface/driver routines (optional) |
|
||||
| `IBMV-xx.Z80` | Banking Support Routines (if banked) |
|
||||
| `ICFG-xx.Z80` | Configuration file for speed, Physical Disks, etc. |
|
||||
| `IIO-xx.Z80` | Character IO definitions and routines |
|
||||
| `RAMD-xx.Z80` | Ram Drive interface/driver routines (optional) |
|
||||
| `TIM-xx.Z80` | Counter/Timer routines and ZSDOS Clock Driver |
|
||||
| `WBOOT-xx.Z80` | Warm Boot and re-initialization routines |
|
||||
|
||||
|
||||
## 3.3 B/P Bios Options
|
||||
|
||||
The most logical starting point in beginning a configuration is to edit the `DEF-xx.LIB` file to select your desired options. This file is the basic guide to choosing the options for your system, and some careful choices here will minimize the Bios size and maximize your functionality. Some of the more important options and a brief description of them are:
|
||||
|
||||
**MOVCPM** - Integrate into MOVCPM "type" loader? If the system is to be integrated into a MOVCPM system, the Environment descriptor contained in the CBOOT routine is always moved into position as part of the Cold Start process. If set to NO, a check will be made to see if an Environment Descriptor is already loaded, and the Bios copy will not be loaded if one is present.
|
||||
|
||||
NOTE: When assembling a Bios for Boot Track Installation (MOVCPM set to YES), many options are deleted to conserve space and the Bios Version Number is forced to 1.1.
|
||||
|
||||
**BANKED** - Is this a banked BIOS? If set to YES, the Bank control module, IBMV, is included in the assembly, and much of the code is relocated to the system bank. Note that a Banked system CANNOT be placed on the System Tracks, or integrated into a MOVCPM image.
|
||||
|
||||
**IBMOVS** - Are Direct Inter-Bank Moves possible? If set to YES, direct transfer of data between banks is possible such as with the Zilog Z180/Hitachi 64180. If NO, a 256-byte transfer buffer is included in high Common Memory and Interbank moves require transfer of bytes through this buffer.
|
||||
|
||||
**ZSDOS2** - Assemble this for a Banked ZSDOS2 system? If YES, the ALV and CSV buffers will be placed in the System bank invisible to normal programs. This has the side effect that many CP/M programs which perform sizing of files (Directory Listers, DATSWEEP, MEX, etc) which do not know about this function will report erroneous sizes. The advantage is that no sacrifice in TPA is required for large Hard Disks. Set this to NO if you want strict CP/M 2.2 compatibility.
|
||||
|
||||
**FASTWB** - Restore the Command Processor from the System Bank RAM? If set to YES, Warm Boots will restore the Command Processor from a reserved area in the System RAM bank rather than from the boot tracks. For the maximum benefit of B/P Bios, always attempt to set this to YES. In systems without extended memory, it MUST be set to NO.
|
||||
|
||||
**MHZ** - Set to Processor Speed in closest even Megahertz (e.g. for a 9.216 MHz clock rate, set to 9). The value entered here is used in many systems to compute Timing values and/or serial data rate parameters.
|
||||
|
||||
**CALCSK** - Calculate Diskette Skew Table? If NO, a Skew table is used for each floppy format included in the image. Calculating Skew is generally more efficient from a size perspective, although slightly slower by factors which are so small as to be practically unmeasurable.
|
||||
|
||||
**HAVIOP** - Include IOP code into Jump table? If the IOPINIT routine satisfies your IOP initialization requirements, you may turn this off by setting to NO and save a little space. This typically will be turned off when generating a system for MOVCPM integration to conserve space.
|
||||
|
||||
**INROM** - Is the Alternate Bank in ROM? Set to NO for Normal Disk-based systems. Please contact the authors if you need additional information concerning ROM-based system components.
|
||||
|
||||
**BIOERM** - Print BIOS error messages? Set this to YES if you desire direct BIOS printing of Floppy Disk Error Messages. If you are building a BIOS for placement on Boot Tracks, however, you will probably not have room and must turn this Off. Set to NO to simply return the normal Success/Fail error flag with no Message printout.
|
||||
|
||||
**FLOPY8** - Include 8"/Hi-Density Floppy Formats? Some systems (SB-180, Compu/Time) can handle both 5.25" and 8" disks. If your hardware supports the capability and you want use 8" disks as well as the normal 3.5 and 5.25" diskettes, setting this to YES will add formats contained in `DPB8.LIB` and control logic to the assembly. Future systems may take advantage of the "High-Density" 3.5 and 5.25" Floppy Disks which use higher data rates. Their definitions will be controlled by this flag as well.
|
||||
|
||||
NOTE: If AUTOSL is set to NO, this option will probably cause the BIOS to be larger than necessary since these additional formats may not be accessible.
|
||||
|
||||
**MORDPB** - Use more Floppy DPB's (in addition to normal 4-5.25" and optional 8")? If YES, the file `DPB2.LIB` is included. Many of the formats are Dummies and may be filled with any non-conflicting formats you desire.
|
||||
|
||||
NOTE: If AUTOSL if set to NO, this option will probably cause the BIOS to be larger than necessary since these additional formats may not be accessible.
|
||||
|
||||
**MORDEV** - Include Additional Character Device Drivers? Is set to YES, user-defined drivers are added to the Character IO table, and associated driver code is assembled. Systems featuring expansion board such as the SB-180 and YASBEC may now take advantage of additional serial and parallel interfaces within the basic Bios. Set to NO to limit code to the basic 4 drivers.
|
||||
|
||||
NOTE: When assembling a Bios for Boot Track Installation (MOVCPM set to YES), MORDEV is overridden to conserve space, and the Bios Version Number is forced to 1.1 in the distribution files.
|
||||
|
||||
**BUFCON** - Use type ahead buffer for the Console? If set to YES, code is added to create and manage a type-ahead buffer for the driver assembled as the console. This device will be controlled by either interrupts (in systems such as the YASBEC and SB-180) or background polling (in Ampro and Compu/Time). This means that characters typed while the computer is doing something else will not be lost, but will be held until requested.
|
||||
|
||||
**BUFAUX** - Use type ahead buffer on Auxiliary Port? As with BUFCON above, setting to YES will add code to create and manage a type ahead buffer for the auxiliary device. Since the AUX port typically is used for Modem connections, buffering the input will minimize the loss of characters from the remote end.
|
||||
|
||||
**AUTOSL** - Auto-select floppy formats? If set to YES, selection of Floppy disks will use an algorithm in `SELFLP2.Z80` to identify the format of the disk from the DPB files included (`DPB.LIB`, optional `DPB8.LIB`, and optional `DPB2.LIB`) and log the disk if a match is found. There must be NO conflicting definitions included in the various files for this to function properly. See the notes in the various files to clarify the restrictions. If set to NO, the single file `DPBRAM.LIB` is included which may be tailored to contain only the fixed format or formats desired per disk drive. This results in the smallest code requirement, but least flexibility.
|
||||
|
||||
**RAMDSK** - Include code for a RAM-Disk? If set to YES, any memory above the System or User bank may be used for a RAM Drive (default is drive M:) by including the file `RAMD-xx.Z80`. Parameters to determine the size and configuration are also included in the files `DPHM-xx.LIB` and `DPBM-xx.LIB`. In systems without extended memory, or to conserve space such as when building a system for the boot tracks, this may be disabled by setting to NO.
|
||||
|
||||
**HARDDSK** - Include SCSI Hard Disk Driver? Set to YES if you wish to include the ability to access Hard Disk Drives. In a floppy-only system, a NO entry will minimize BIOS code.
|
||||
|
||||
**HDINTS** - (System Dependent) In some systems such as the YASBEC, Interrupt-driven Hard Disk Controllers using DMA transfer capabilities may be used. If you wish to use this type of driver specified in the file `HARDI-xx.Z80` instead of the normal polled routines included in `HARD-xx.Z80`, set this option to TRUE. In most cases, this driver will require more Transient Program Area since the Interrupt Handling routine must be in Common Memory.
|
||||
|
||||
**CLOCK** - Include ZSDOS Clock Driver Code? If set to YES, the vector at BIOS+4EH will contain a ZSDOS-compatible clock driver with the physical code contained in the `TIM-xx.Z80` module. If set to NO, calls to BIOS+4EH return an error code.
|
||||
|
||||
**TICTOC** - (System Dependent) Use pseudo heartbeat counter? This feature is used in systems such as the Ampro Little Board and Compu/Time SBC880 which do not have an Interrupt scheme to control a Real Time Clock. Instead, a series of traps are included in the code (Character IO Status polls, Floppy Disk Status polls) to check for overflow of a 1-Second Counter. It is less desirable than an Interrupt based system, but suffices when no other method is available. Set to NO if not needed.
|
||||
|
||||
**QSIZE** - Size in bytes of type ahead buffers controlled by BUFCON and BUFAUX.
|
||||
|
||||
**REFRSH** - Activate Dynamic Refresh features of Z180/HD64180 processors? In some computers using these processors such as the YASBEC, refresh is not needed and merely slows down processing. Set to NO if you do not need this feature. If your processor uses dynamic memory, or needs the signal for other purposes (e.g. The SB180 uses Refresh for Floppy Disk DMA), Set this to YES.
|
||||
|
||||
**Z3** - Include ZCPR init code? Since a Z3 Environment is mandatory in a B/P Bios (which now "owns" the Environment), this option has little effect.
|
||||
|
||||
For assembly of a Banked version of B/P Bios, the identification of various banks of memory must be made so that the various system components "know" where things are located. Refer to Section 3.1 above for a description of these areas. The BNK0 value should be the first bank of RAM in the System unless other decoding is done. The following equates must be set:
|
||||
|
||||
| Equate | Description |
|
||||
| :--- | :--- |
|
||||
| BNK0 | First 32k TPA Bank (switched in/out) |
|
||||
| BNK1 | Second 32k TPA Bank (Common Bank) |
|
||||
| BNK2 | Beginning of System Bank (BIOS, DOS, CPR) area |
|
||||
| BNKU | Beginning of Bank sequence for User Applications |
|
||||
| BNK3 | Beginning of Extra Banks (first bank to use for RAM Disk) |
|
||||
| BNKM | Maximum Bank Number assigned |
|
||||
|
||||
|
||||
## 3.4 Configuration Considerations
|
||||
|
||||
When assembling a version of B/P Bios for integration into an IMG file, size of the resulting image is not much of a concern, so you need not worry about minor issues of size. For integration into a system for loading onto diskette boot tracks, however, the limitation is very real in order to insure that the CPR/DOS/BIOS and Boot Sector(s) can fit on the reserved system tracks. Typically, a limit of slightly under 4.5k exists for the Bios component. When the MOVCPM flag is set to YES for this type of assembly, warnings will be issued when the image exceeds 4352 bytes (the maximum for systems with 2 boot records), and 4480 bytes (the maximum for systems with a single boot record). Achieving these limits often requires disabling many of the features.
|
||||
|
||||
The first thing you should do before assembling the BIOS is to back up the entire disk, then copy only the necessary files onto a work disk for any editing. After setting the options as desired, edit the hardware definitions in `ICFG-xx.Z80` to reflect the physical characteristics of your floppy and hard drives, as well as any other pertinent items. Then edit the logical characteristics for your Hard and Ram Drives (if any) in `DPBHD-xx.LIB` and `DPBM-xx.LIB`. If you do not desire any of the standard floppy formats or want to change them, edit `DPB.LIB` and/or `DPB2.LIB` (if using auto selection) or `DPBRAM.LIB` if you are using fixed floppy formats. Finally edit the DPH files to place the logical drives where desired in the range A..P.
|
||||
|
||||
Decide whether you want to generate a system using the Image file construct developed in support of B/P Bios (BPBUILD/LDSYS), or for integration on a floppy disk's boot tracks. If the latter, you probably will not be able to have all options turned on. For example, with the MicroMint SB-180, the following options must be turned Off: BANKED, ZSDOS2, BIOERM, FLOPY8, MORDPB, BUFAUX and usually either CLOCK or RAMDSK. As an aid to space reduction, conditional assembly based on the MOVCPM flag automatically inhibits all but double-sided Floppy formats from `DPB.LIB`. If configuring for Floppy Boot tracks (MOVCPM flag set to TRUE), a warning will be printed during assembly if the size exceeds that available for a One or Two-sector boot record. Using the BPBUILD/LDSYS method, you may vary nearly all system parameters, even making different systems for later dynamic loading.
|
||||
|
||||
If you are using a version of the B/P Bios already set for your type of computer, you are now ready to assemble, build a system and execute it. The only remaining task would be an optional tailoring of the sign on banner in the file `CBOOT-xx.Z80` and reassembly to a `.REL` file.
|
||||
|
||||
For those converting a standard version of the B/P Bios to a new hardware system, we recommend that you begin with a Floppy-only system in Non-Banked mode then expand from there. The easiest way to test out new versions is to use the System Image (IMG file) mode, then advance to boot track installations if that is desired. Enhancements that can be added after testing previous versions may be to add Hard Drives, RAM Drive, and finally Banking.
|
||||
|
||||
200
Doc/CPM/BPBIOS/BPBIOS_4_Installation.md
Normal file
200
Doc/CPM/BPBIOS/BPBIOS_4_Installation.md
Normal file
@@ -0,0 +1,200 @@
|
||||
# 4 Installing a B/P Bios
|
||||
|
||||
The Distribution diskette(s) on which B/P Bios is furnished are configured for booting from the vanilla hardware for the version ordered. A 9600 bps serial terminal is standard, and will allow you to immediately bring up a minimal Non-Banked Floppy Disk system. Due to the variety of different system configurations and size restrictions in some versions, only the Floppy Disk Mass Storage capability can be assured on the initial boot disk. Where space remained on the boot tracks, limited Hard Drive support is also provided, and in some configurations, even RAM Drive support exists.
|
||||
|
||||
After booting from either an established system, or the boot tracks of the distribution disk, format one or more fresh diskettes and copy the distribution diskette(s) contents to the backup diskette(s). Copy the boot tracks from the master to the copies using BPSYSGEN (see 6.6). Remove the master diskette(s) for safekeeping and work only with the copies you just made.
|
||||
|
||||
Using the backup diskette with the B/P utilities on it, execute BPCNFG in the Boot Track configuration mode (see 6.2), adjusting all the options to your specific operating environment. When you have completed tailoring the system, it is ready for booting by placing the diskette in drive A: and resetting the system.
|
||||
|
||||
The sample `STARTUP.COM` file on the distribution disk will automatically execute a sequence of instructions when the system is booted. It contains various instructions which further tailor the system and load portions of the operating system which are too big to fit on the boot tracks. The default instruction sequence is:
|
||||
|
||||
| Command | Explanation |
|
||||
| :--- | :--- |
|
||||
| `LDDS` | Load the DateStamper style File Stamp routine and clock |
|
||||
| `LDR SYS.RCP,SYS.FCP,SYS.NDR` | Load ZCPR 3 Environment segments for Resident Command Processor, Flow Control Pkg and Named Dirs |
|
||||
| `IOPINIT` | Initialize the IO Processor Pkg |
|
||||
| `TD S` | Prompt for Date and Time, Set Clk / Alternatives are to use `TDD` (6.21) or `SETCLOK` (6.18) |
|
||||
| `IF ~EX MYTERM.Z3T` | If the file `MYTERM.Z3T` does Not exist... |
|
||||
| `TCSELECT MYTERM.Z3T` | ..select which terminal you have creating a `MYTERM.Z3T` file |
|
||||
| `FI` | ...end of the `IF` |
|
||||
| `LDR MYTERM.Z3T` | Load the Terminal Definition data |
|
||||
|
||||
If you wish to alter any of these initial instructions to, for example, initialize the RAM drive using INIRAMD, add File Time Stamp capabilities to it with INITDIR or PUTDS and copy some files there with COPY, these may be added with ALIAS, VALIAS, SALIAS or other compatible files available from the ZSYSTEM or ZCPR33 areas on Z-Nodes.
|
||||
|
||||
After the initial system is up and running from the Default Boot Track system, you may expand the operation by generating systems for different purposes in order to gain the most advantage from your system. Many types of installation are possible, the simplest of which is a Non-Banked system using only 64k of the systems memory, all of which is in primary memory. Such a system uses a normal Command Processor such as the ZCPR3.x family, and a Non-Banked Operating System such as our ZSDOS Version 1. Non-Banked systems may be installed on a Disk's Boot Tracks, or created as an Image File for dynamic loading using the LDSYS Utility (see 6.15).
|
||||
|
||||
Banked systems MUST be created with the BPBUILD Utility (see 6.1) and loaded with LDSYS (see 6.15). The techniques to manage different memory banks to form a complete Operating Environment are rather intricate and are best handled by our utilities. Many Image files may be created and loaded as needed to tailor your system for optimum performance. The following sections describe these various types of installations in detail.
|
||||
|
||||
|
||||
## 4.1 Boot Track Installation
|
||||
|
||||
For most of the existing CP/M compatible computers to begin executing a Disk Operating System, a program must be placed on a specified area of a Floppy or Hard Disk Drive. Normally, the first two or three tracks on the disk are reserved for this purpose and are referred to as the "Boot Tracks". Since the space so defined is generally restricted, neither a complete B/P Bios nor a Banked installation is possible. Instead, a scaled-down system roughly equivalent to those currently in use is used to start the computer and serve as the Operating System, with larger systems loaded later as needed.
|
||||
|
||||
If you are using a pre-configured version of B/P Bios for your hardware, you may simply continue to use the Boot Track system from the distribution disk(s) by copying the system as described in Section 4 above using BPSYSGEN (see 6.6). If you elect to alter or otherwise customize the Boot Track system, you must assemble the B/P Bios source setting certain of the equates in the `DEF-xx.LIB` file to insure a correct type of system. To assemble a Boot Track system, the most important equates are:
|
||||
|
||||
| Equate | |
|
||||
| :---: | :--- |
|
||||
| `MOVCPM` | Set to `YES` |
|
||||
| `BANKED` | Set to `NO` |
|
||||
| `ZSDOS2` | Set to `NO` |
|
||||
|
||||
One element of Banked Systems is available in a Boot Track installation if additional memory is available, and your B/P Bios routines support such a feature. This feature reloads the Command Processor from Banked memory instead of from the Boot Tracks of a disk, and generally produces less code (taking less space on the Boot Tracks) and executes faster. It is set with:
|
||||
|
||||
| Equate | |
|
||||
| :---: | :--- |
|
||||
| `FASTWB` | Set to `YES` if desired, `NO` if Warm Boot from disk |
|
||||
|
||||
Some of the features that generally need to be disabled to scale a smaller system are set as:
|
||||
|
||||
| Equate | |
|
||||
| :---: | :--- |
|
||||
| `MORDPB` | Set to `NO` |
|
||||
| `DPB8` | Set to `NO` |
|
||||
| `MORDEV` | Set to `NO` |
|
||||
|
||||
When at least these equates and any others you desire to change (see section 4) have been made to the component files of the system, assemble your `BPBIO-xx` file to a Microsoft standard `.REL` file. This output file may be used to overlay the Bios portion of the `MOVxSYS.COM` system generation utility (see 6.16) furnished with your distribution disk, or an equivalent program provided with your computer. MOVxSYS or its equivalent (MOVCPM, MOVZSYS, etc) is a special program customized for your particular hardware containing all the Operating System components which will be placed on the Boot Tracks, along with a routine to alter the internal addresses to correspond to a specified memory size.
|
||||
|
||||
To Add the new Bios you just assembled, execute INSTAL12 (see procedures in 6.13) specifying your computer's MOVxSYS or equivalent program and follow the prompts to overlay the new Bios. Once INSTAL12 has saved a relocatable or absolute file, you are ready to create a boot disk containing the modified system.
|
||||
|
||||
If you used the command INSTAL12 to install system segments on MOVxSYS or equivalent program, you must first create an Absolute System Model file. Since the functional portion of your new program is identical to the original MOVxSYS or equivalent, use the method explained in your original documentation to generate a new system. With MOVxSYS, the command is:
|
||||
|
||||
| Command | |
|
||||
| :---: | :--- |
|
||||
| `MOVxSYS nn *` | replace MOVxSYS with your version |
|
||||
|
||||
Where `nn` is the size of the system (typically 51 for a moderate boot system). The asterisk tells the program to retain the image in memory and not write it to a disk file. You may now use BPSYSGEN to write the new image to the system tracks of your boot diskette. Do this by executing BPSYSGEN with no arguments and issue a single Carriage Return when asked for the source of the Image.
|
||||
|
||||
If you used the command `INSTAL12 /A` to install replacement system segments over a System Image file, or used a utility which wrote the new image to a disk file, use BPSYSGEN to write the image file to the system tracks of your boot disk. The proper command is
|
||||
|
||||
`BPSYSGEN filename`
|
||||
|
||||
where filename is the name of the disk file you just created by executing MOVxSYS or equivalent with output to a disk file, or with INSTAL12 on an existing image file.
|
||||
|
||||
If the system is written to a Hard Disk, and your system supports booting from a Hard Disk such as the YASBEC, you normally must alter the default Boot Sector from the default Floppy Disk Boot Sector contained in MOVxSYS or equivalent. This alteration is accomplished by HDBOOT (see 6.9) which must be customized to the specific Hardware System used.
|
||||
|
||||
After the above actions have been completed as appropriate, tailor the Boot Track system to reflect the desired starting configurations with BPCNFG (see 6.2). Such items as the desired Startup file name, Bank Numbers (critical if FASTWB is used), and drive types and assignments are routinely tailored at this point. When the you have finished this step, test your new system by resetting the system, or cycling the power and you should be up and running!
|
||||
|
||||
|
||||
## 4.2 Non-Banked Image Installation
|
||||
|
||||
A Non-Banked system may be installed as an Image File as opposed to the basic Boot Track installation covered in 4.1 above. To create an Image File, you must have `.REL` or `.ZRL` versions of a Command Processor (ZCPR3.x or equivalent recommended), an Operating (`ZSDOS.ZRL` recommended), and a REL version of B/P Bios for your system assembled with the MOVCPM equate in `DEF-xx.LIB` set to NO. Other equates in this file may be set as described above for the Boot Track system. Since Image Files are not as constrained in size as is installation for Boot Tracks, more features may generally be activated such as Error Messages, RAM Drive, additional Hard Drive partitions, and complete Floppy Format suites. The main precaution here is that large Hard Drives will rapidly cause significant loss of Transient Program Area since all Drive parameters must be in protected high memory above the Bios.
|
||||
|
||||
After the Bios has been assembled, an Image file must be produced. This is accomplished with the BPBUILD Utility (see 6.1). Set the File names in Menu 1 to reflect only Non-Banked files (or minimally banked Bios if FASTWB is set to YES), and let BPBUILD do the work. Since the standard Non-Banked System segments are normally set to the "standard" CP/M 2.2 sizes, you may answer the "autosize" query with a Y to obtain the maximum Transient Program Area in the resulting system. When BPBUILD completes its work, a file, normally with the default type of `.IMG`, will have been placed in the currently logged Drive/User area and you are ready to perform the next step in preparation of the Non-Banked Image.
|
||||
|
||||
As with the Boot Track installation covered above, several system items must be tailored before the Image may be safely loaded and executed. This is done by calling BPCNFG with the Image file name as an argument, or specify Image configuration from the interactive menu (see 6.2). Set all items as you desire them in the operating system, particularly the Bank Numbers (if FASTWB is active), and the Disk Drive characteristics and assignments. When this has been satisfactorily completed, you are ready to load and execute the newly-created system.
|
||||
|
||||
Installing an Image File (default file type of `.IMG`) is extremely easy. Only the utility `LDSYS.COM` (see 6.15) is needed. If the file type has not been changed from the default `.IMG`, only the basic name of the Image File need be passed to LDSYS when executed as:
|
||||
|
||||
| Command | |
|
||||
| :---: | :--- |
|
||||
| `LDSYS IMGFILE` | where IMGFILE.IMG is your Image file name |
|
||||
|
||||
The operating parameters of the currently-executing system are first examined for suitability of loading the Image File. If it is possible to proceed, the Image File is loaded, placed in the proper memory locations, and commanded to begin execution by calling the B/P Bios Cold Boot Vector. The Cold Boot (Bios Function 0) performs final installation, displays any desired opening prompt and transfers control to the Command Processor with any specified Startup file for use by a ZCPR3.x Command Processor Replacement.
|
||||
|
||||
Since a non-banked Image File will probably closely resemble that contained on the Boot Tracks, the same STARTUP file may generally be used to complete the initial tailoring sequence. If a different file is desired, the Image File may be altered to specify a different file using BPCNFG.
|
||||
|
||||
|
||||
## 4.3 Banked Bios, Non-banked System Installation
|
||||
|
||||
With the B/P Bios system, an Image system may be created and loaded which places portions of the Bios Only in the System bank, retaining a non-banked Operating System and therefore maximum compatibility with existing applications software. A few thousand bytes can normally be reclaimed for Transient Programs in this manner, although large and/or increasing numbers of logical drives will still reduce TPA space because of the need to store Allocation Vector information in Common Memory.
|
||||
|
||||
To prepare such a system, simply edit the needed Bios files if necessary with particular emphasis on the `DEF-xx.LIB` file where the following equates must be set as:
|
||||
|
||||
| Equate | |
|
||||
| :---: | :--- |
|
||||
| `MOVCPM` | Set to `NO` |
|
||||
| `BANKED` | Set to `YES` |
|
||||
| `ZSDOS2` | Set to `NO` |
|
||||
|
||||
Since banked memory MUST be available for this type of installation, you will probably want the Fast Warm Boot feature available to maximize system performance. To activate this option, set the following equate as:
|
||||
|
||||
| Equate | |
|
||||
| :---: | :--- |
|
||||
| `FASTWB` | Set to `YES` |
|
||||
|
||||
When the editing is complete, assemble the Bios to a Microoft `.REL` file with an appropriate assembler such as ZMAC and build an Image system with BPBUILD (see 6.1) changing the Bios file name in menu 1 to the name of the newly created Bios file. Next, configure the default conditions if necessary with BPCNFG (see 6.2) and you are ready to activate the new system in the same manner as all Image files by calling LDSYS with the Image file argument as:
|
||||
|
||||
| Command | |
|
||||
| :---: | :--- |
|
||||
| `LDSYS BBSYS` | where BBSYS.IMG is your Image File Name |
|
||||
|
||||
As with the completely Non-Banked system described above in Section 4.2, no new requirements are established for a Startup file over that used for the initial Boot System, since both the Command Processor and Disk Operating System are unbanked, and no data areas needed by application programs are placed in the System Bank. As with all Image Files, additional features such as full Bios Error Messages, more extensive Floppy Disk Formats and RAM drive may generally be included in the System definition prior to assembly since the size constraints of Boot Track systems do not apply.
|
||||
|
||||
|
||||
## 4.4 Fully Banked Image Installation
|
||||
|
||||
To create a system taking maximum advantage of banked memory, a special banked Operating System and Command Processor are needed. These have been furnished in initial form with this package as `ZSDOS20.ZRL` and `Z40.ZRL` respectively. They use the Banking features of B/P Bios and locate the maximum practicable amount of executable code and data in the System Bank. Of significant importance to maximizing the Transient Program Area is that the Drive Allocation Bit maps are placed in the System Bank meaning that adding large hard drives, or multiple drives produce only minimal expansion to the resident portion of the Bios.
|
||||
|
||||
NOTE: The latest versions are `ZS203.ZRL`, `ZS227G.ZRL`, and `Z41.ZRL` as included in the public release of B/P Bios. See also sections 7 and 8.
|
||||
|
||||
A Fully banked Bios is created by editing the B/P Bios files as needed to customize the system to your desires. Insure that the following `DEF-xx.LIB` equates are set as:
|
||||
|
||||
| Equate | |
|
||||
| :---: | :--- |
|
||||
| `MOVCPM` | Set to `NO` |
|
||||
| `BANKED` | Set to `YES` |
|
||||
| `ZSDOS2` | Set to `YES` |
|
||||
|
||||
Assemble the resultant B/P Bios to a Microsoft `.REL` file, Build an Image file with BPBUILD (see 6.1) and configure the produced Image file with BPCNFG (see 6.2). When you are confident that all default settings have been made, activate the file by entering:
|
||||
|
||||
| Command | |
|
||||
| :---: | :--- |
|
||||
| `LDSYS FBANKSYS` | where FBANKSYS.IMG is your Image File Name |
|
||||
|
||||
Several differences may exist in the Startup file used for a Fully banked system. Generally the changes amount to deleting items such as a File Stamp module for the Non-banked ZSDOS1 which is not necessary with the fully-banked ZSDOS 2 and Z40. Only the type of clock need be specified for ZSDOS2. Furthermore, since the Z40 Command Processor Replacement contains most commonly-used commands gathered from a number of Resident Command Processor (RCP) packages, there is normally no need to load an RCP. A simple Startup file found adequate during development of the fully-banked B/P system is:
|
||||
|
||||
| Command | Explanation |
|
||||
| :--- | :--- |
|
||||
| `ZSCFG2 CB` | Set ZSDOS 2 clock to Bios+4EH |
|
||||
| `LDR SYS.FCP,SYS.NDR` | Load ZCPR 3 Environment segments for Flow Control and Named Dirs |
|
||||
| `IOPINIT` | Initialize the IO Processor Pkg |
|
||||
| `TD S` | Prompt for Date and Time, Set Clk / Alternatives are to use `TDD` (6.21) or `SETCLOK` (6.18) |
|
||||
| `IF ~EX MYTERM.Z3T` | If the file `MYTERM.Z3T` does Not exist... |
|
||||
| `TCSELECT MYTERM.Z3T` | ..select which terminal you have creating a `MYTERM.Z3T` file |
|
||||
| `FI` | ...end if the `IF` |
|
||||
| `LDR MYTERM.Z3T` | Load the Terminal Definition data |
|
||||
|
||||
Since the requirements for a fully-banked system differ significantly from a non-banked one, we recommend that you use a different name for the Startup file. For example, `STARTUP.COM` is the default name used with Boot Track systems for initial operation, and with Non-banked Image Files, while STARTB may be a suitable name for the script to be executed upon loading a fully-banked system. The name of the desired Startup file may be easily altered in either Boot Track or Image systems from Option 1 in BPCNFG (see 6.2).
|
||||
|
||||
An option available to start from a large Image File is to configure a Startup file for execution by the Boot Track system containing a single command. The command would simply invoke LDSYS with the desired Banked Image File as an argument such as:
|
||||
|
||||
| Command | |
|
||||
| :---: | :--- |
|
||||
| `LDSYS BANKSYS` | where BANKSYS.IMG is your Image file |
|
||||
|
||||
In this case, none of the normal initialization sequences cited above would be executed by the Boot Track system, and only those contained in the Startup for `BANKSYS.IMG` would occur. Other options abound and are left to the community to invent new combinations and sequences.
|
||||
|
||||
|
||||
## 4.5 In Case of Problems...
|
||||
|
||||
While We attempted to outline procedures for the majority of installations we considered feasible, there may be occasions where you inadvertently find yourself in a position where you seem to have lost the ability to get your system up and running.
|
||||
|
||||
**PROBLEM:** When loading an `.IMG` file with LDSYS, the screen displays the LDSYS banner, system addresses, and halts with the last screen displaying: "...loading banked system".
|
||||
|
||||
_SOLUTION:_ Something is not set correctly in the Bios, since all lines after the last one displayed are printed from the newly-loaded Bios. One of the most common causes for this problem is incorrect bank number settings. Use the hidden selection in Menu 1 of BPCNFG (see 6.2) to verify that the correct bank numbers have been set for TPA and SYStem banks. Another common cause of this problem is incorrect settings for the Console port, or a setting in the IOBYTE which directs Console data to a device other than the one intended. Use Menu 2 BPCNFG to properly set the IOBYTE and the console parameters.
|
||||
|
||||
**PROBLEM:** You boot from or load a B/P Bios system from a Hard Drive, and immediately after starting, the system attempts to log onto Floppy Drive 0.
|
||||
|
||||
_SOLUTION:_ The most common cause for this symptom is that the desired Hard Drive and Floppy Drive definitions were not swapped to define a Hard Drive Partition as the A: drive. Use BPCNFG (see 6.2), Menu 5 to exchange drives to the desired configuration. A similar situation may exist where a Hard Drive is activated immediately after booting when a Floppy drive is desired as the A: Drive.
|
||||
|
||||
**PROBLEM:** The computer seems to boot satisfactorily, but after a few programs or any program which executes a Warm Boot (or entering Control-C), the system goes into "Never-never Land" and must be reset.
|
||||
|
||||
_SOLUTION:_ This symptom is most often caused by an inability to access and load the Command Processor. This is most probably caused by assembling B/P Bios with the FASTWB equate in `DEF-xx.LIB` set to YES when the system contains no extended memory, or incorrect settings of the Bank Numbers. To check Bank Number settings, use the hidden function in BPCNFG, Menu 1 (see 6.2).
|
||||
|
||||
**PROBLEM:** When doing a Cold Boot from a Hard Drive (from Power up or Reset), the system goes to a Floppy Drive before displaying the initial sign on messages, and remains logged on the Floppy.
|
||||
|
||||
_SOLUTION:_ This is most often due to your forgetting to run the HDBOOT utility on the Hard Drive Boot system after applying it with BPSYSGEN. Normally, systems created with MOVxSYS contain a Floppy Disk Boot sector which will load the initial Operating System from a Floppy. HDBOOT (see 6.9) modifies this record on a specified Hard Drive Unit so that the Operating System is loaded from a Hard Drive. Run HDBOOT on the Desired Hard Drive, then use BPCNFG (see 6.2) to insure that the logical drives are positioned as desired (Menu 5).
|
||||
|
||||
**PROBLEM:** When Booting, the system console either doesn't display anything, or prints strange characters.
|
||||
|
||||
_SOLUTION:_ This is most often due to incorrect settings for the current Console, most probably the Data rate, or CPU Clock Frequency. Boot from a good system, then use BPCNFG (see 6.2) to adjust the settings on the problem system. Pay particular attention to Menu 1 (CPU Clock Rate) and Menu 2 (IOBYTE and Serial Port Data Rates).
|
||||
|
||||
**PROBLEM:** When running a fully-banked system with ZSDOS 2, some programs seem to "hang" or "lock up" the system on exit.
|
||||
|
||||
_SOLUTION:_ One of the most common sources of this symptom is with the application program where the author used code which assumes that the BDOS and Command Processor are of a certain size, or bear a fixed relationship to the addresses in page 0. You may experience this most often when using an IMG system built by answering YES to the Autosizing query in BPBUILD (see 6.1). To compensate for such ill-behaved programs, you may use a two-step build process as:
|
||||
|
||||
1. Use BPBUILD to create an IMG file answering YES to Autosizing on exit. This maximizes TPA placing the Resident Bios as high as possible in memory.
|
||||
|
||||
2. Execute BPBUILD again with an argument of the name you gave to the file just created above. This loads the definition from the IMG file. Immediately exit with a Carriage Return, and answer NO to Autosizing, and YES to placing system segments at standard locations. This procedure keeps the Bios address constant, but will move the starting addresses of BDOS and Command Processor down, if possible, to simulate "standard" sizes used in CP/M 2.2.
|
||||
|
||||
|
||||
1364
Doc/CPM/BPBIOS/BPBIOS_5_Programming.md
Normal file
1364
Doc/CPM/BPBIOS/BPBIOS_5_Programming.md
Normal file
File diff suppressed because it is too large
Load Diff
2579
Doc/CPM/BPBIOS/BPBIOS_6_Utilities.md
Normal file
2579
Doc/CPM/BPBIOS/BPBIOS_6_Utilities.md
Normal file
File diff suppressed because it is too large
Load Diff
37
Doc/CPM/BPBIOS/BPBIOS_7_ZSDOS2.md
Normal file
37
Doc/CPM/BPBIOS/BPBIOS_7_ZSDOS2.md
Normal file
@@ -0,0 +1,37 @@
|
||||
# 7 ZSDOS Version 2
|
||||
|
||||
Version 2 of ZSDOS is currently in a developmental phase. The version provided with this package is preliminary and should not be considered a final work. Be sure you back up any files which you don't mind sacrificing, and please let us know in as much detail as possible any problems you experience.
|
||||
|
||||
In addition to the ZSDOS Version call (Function 48) returning 20H signifying ZSDOS2, three new Operating System functions have been added. They are:
|
||||
|
||||
| Function 46 | Return Disk Free Space |
|
||||
| ---: | :--- |
|
||||
| Enter: | C = 46 (function #) |
|
||||
| | E = Drive # (A=0..P=15) |
|
||||
| Exit: | A = 0 if Ok, <>0 if Error |
|
||||
| | Disk Free Space in kilobytes is placed in DMA+0 (LSB) thru DMA+3 (MSB) |
|
||||
|
||||
This function returns Disk Free Space from fully-banked systems where the ALV buffers are not directly accessible by applications programs. It **MUST** be used to reliably determine free space since there is no way for programs to ascertain which System Bank (if more than one) contains the Allocation Bit Map. For most reasonably-sized systems, only the lower two or three bytes will be used, but four bytes are allocated to accommodate a maximally-sized system.
|
||||
|
||||
| Function | Return Environment Descriptor Address |
|
||||
| ---: | :--- |
|
||||
| Enter: | C = 49 (function #) |
|
||||
| Exit: | HL = Address of Env Desc. |
|
||||
|
||||
This function returns the address of a ZCPR 3.4 "type" Environment Descriptor needed in B/P Bios systems. Rather than rely on the Command Processor inserting the ENV address into application programs upon execution, this function may be used to reliably acquire the ENV address at any time.
|
||||
|
||||
| Function 152 | Parse File Name |
|
||||
| ---: | :--- |
|
||||
| Enter: | C = 152 (function #) |
|
||||
| | DE = Pointer to dest FCB |
|
||||
| | DMA --> start of parse string |
|
||||
| Exit: | A = Number of "?" in fn.ft |
|
||||
| | DE = points to delimiter |
|
||||
| | FCB+15 will be 0 if parse Ok, 0FFH if errors occurred |
|
||||
|
||||
This function may be used to replace Z3LIB library routines in a more robust manner and produce consequently smaller applications programs. It is fully compliant with ZCPR 3.4 parse specifications.
|
||||
|
||||
|
||||
## 7.1 NOTES Spring 2001
|
||||
|
||||
The versions of ZSDOS2 (the Banked Z-System DOS) and Z4x Banked Command Processor Replacement have been modified over the years. The manual may refer to specific versions, or by generic names. As of the Spring 2001 release under the GNU General Public License, Two versions of ZSDOS2 are provided; `ZS203.ZRL` which contains code for hashed directories, and `ZS227G,ZRL` which does not.
|
||||
10
Doc/CPM/BPBIOS/BPBIOS_8_ZCPR4.md
Normal file
10
Doc/CPM/BPBIOS/BPBIOS_8_ZCPR4.md
Normal file
@@ -0,0 +1,10 @@
|
||||
# 8 ZCPR Version 4
|
||||
|
||||
`Z40.ZRL` is a consolidation of ZCPR34 and many of the RCP features commonly in use, modified by the need to bank as much of the Command Processor as possible. When Z40 is used in a Fully-Banked system, you may not need much of, or any Resident Command Processor with your system. Z40 relys on ZSDOS2 and will **NOT** work without it since the Command Line Parser and disk free space calculations have been removed in favor of ZSDOS2 services. Additionally, the prompt line displays the time and will only function correctly if he ZSDOS2 clock is enabled. Comments on how these new System components work would be appreciated.
|
||||
|
||||
More complete documentation is provided in the `Z40.HLP` files included with the distribution diskettes, and a list of active functions is available with the H command at the prompt. To read the On-line help files, use `HELP.COM` available for downloading from any Z-Node.
|
||||
|
||||
|
||||
## 8.1 NOTES Spring 2001
|
||||
|
||||
The versions of ZSDOS2 (the Banked Z-System DOS) and Z4x Banked Command Processor Replacement have been modified over the years. The manual may refer to specific versions, or by generic names. As of the Spring 2001 release under the GNU General Public License, the latest version of the Z4x Processor Replacement is `Z41.ZRL` which features a small amount of tailoring. A new utility; **`CONFZ4.COM`** is available for this purpose.
|
||||
100
Doc/CPM/BPBIOS/BPBIOS_9_Glossary.md
Normal file
100
Doc/CPM/BPBIOS/BPBIOS_9_Glossary.md
Normal file
@@ -0,0 +1,100 @@
|
||||
# GLOSSARY
|
||||
|
||||
|
||||
|
||||
**Application Programs**
|
||||
|
||||
In contrast to utility programs (see), application programs or applications are larger programs such as word processors which function interactively with the user.
|
||||
|
||||
|
||||
|
||||
**BDOS**
|
||||
|
||||
Basic Disk Operating System. The machine-independent, but usually processor-dependent, program which controls the interface between application programs and the machine-dependent hardware devices such as printers, disk drives, clocks, etc. It also establishes the concept of files on media and controls the opening, reading, writing, and closing of such constructs.
|
||||
|
||||
|
||||
|
||||
**BGii**
|
||||
|
||||
BackGrounder ii from Plu*Perfect Systems, a windowing task-switching system for CP/M users with hard or RAM disks.
|
||||
|
||||
|
||||
|
||||
**BIOS**
|
||||
|
||||
Basic Input/Output System. Machine-dependent routines which perform actual peripheral device control such as sending and receiving characters to the console, reading and writing to disk drives, etc.
|
||||
|
||||
|
||||
|
||||
**Bit**
|
||||
|
||||
BInary digiT. An element which can have only a single on or off state.
|
||||
|
||||
|
||||
|
||||
**Bit Map**
|
||||
|
||||
An array of bits used to represent or map large arrays of binary information in a compact form.
|
||||
|
||||
|
||||
|
||||
**Boot**
|
||||
|
||||
The term used for the starting sequence of a computer. Generally applies to starting from a "Cold," or power-off state, and includes the loading of Operating System, and configuration steps.
|
||||
|
||||
|
||||
|
||||
**Byte**
|
||||
|
||||
A grouping of eight bits.
|
||||
|
||||
|
||||
|
||||
**CPR**
|
||||
|
||||
Command Processor Replacement. Replaces CCP (see below). Example: ZCPR
|
||||
|
||||
|
||||
|
||||
**CCP**
|
||||
|
||||
Console Command Processor. The portion of the operating system that interprets user's commands and either executes them directly or loads application programs from disk for execution. The CCP may be overwritten by applications, and is reloaded by the "Warm Boot" function of the BIOS.
|
||||
|
||||
|
||||
|
||||
**Checksum**
|
||||
|
||||
An value which arithmetically summarizes the contents of a series of memory locations, and used to check the current contents for errors.
|
||||
|
||||
|
||||
|
||||
**Clock Driver**
|
||||
|
||||
A software link between a Non-banked ZSDOS and the clock on your system. The clock driver allows ZSDOS and its utilities to read the clock which is normally inherent in the B/P Bios.
|
||||
|
||||
|
||||
|
||||
**Command Script**
|
||||
|
||||
Sometimes called simply scripts, command scripts allow you to create a single command which issues other commands to perform a unique set of actions. CP/M submit files are one kind of command script familiar to all CP/M users. ZCPR also offers more sophisticated types of scripts such as aliases and command files (e.g., ALIAS.CMD).
|
||||
|
||||
|
||||
|
||||
**DateStamper**
|
||||
|
||||
A software package developed by Plu*Perfect Systems to allow time and date stamping of files. The Boot System uses an external module in the file LDDS.COM to implement DateStamper, while ZSDOS2 automatically supports this stamping method. DateStamper is unique among file stampers for microcomputers for two reasons: first, it maintains all file stamps within a file; second, it maintains stamps for create, access, and modify time/date for each file.
|
||||
|
||||
|
||||
|
||||
**DDT**
|
||||
|
||||
Dynamic Debugging Tool. A utility distributed with CP/M 2.2 which can display, disassemble, or alter disk files or areas of memory using opcodes or hexadecimal values.
|
||||
|
||||
|
||||
|
||||
**DOS**
|
||||
|
||||
Disk Operating System. Often used term for the BDOS, but generally refers to the aggregate of CCP, BDOS and BIOS.
|
||||
|
||||
|
||||
|
||||
@@ -62,9 +62,22 @@ ZCPR D&J User Manual. This manual supplements the ZCPR Manual.
|
||||
|
||||
|
||||
ZSDOS Manual ("ZSDOS Manual.pdf")
|
||||
ZSDOS Programmer's Manual ("ZSDOS Programmers Manual.pdf")
|
||||
---------------------------------
|
||||
|
||||
ZSDOS is the DOS portion of Z-System. This is the manual for ZSDOS
|
||||
1.x as included in RomWBW. The installation instructions can be
|
||||
ignored since that work has already been completed as part of the
|
||||
RomWBW distribution.
|
||||
|
||||
The ZSDOS Programmer's Manual is also included courtesy of Wayne
|
||||
Hortensius and Randy Merkel. This manual includes documentation of the
|
||||
ZSDOS BDOS API enhancements.
|
||||
|
||||
ZPM3 ("ZPM3.txt")
|
||||
-----------------
|
||||
|
||||
A Z80 coded CP/M 3.0 compatible BDOS replacement with ZCPR support.
|
||||
This minimal documentation is all that is provided with ZPM3.
|
||||
|
||||
-- WBW 8:38 AM 6/6/2025
|
||||
|
||||
483
Doc/CPM/ZPM3.txt
Normal file
483
Doc/CPM/ZPM3.txt
Normal file
@@ -0,0 +1,483 @@
|
||||
|
||||
Z P M 3 by Simeon Cran
|
||||
========================
|
||||
|
||||
A Z80 coded CP/M 3.0 compatible BDOS replacement.
|
||||
|
||||
The first public release: 27/3/92
|
||||
This document dated: 16/6/92
|
||||
|
||||
Distributed at: Z-Node 62 (Perth, Western Australia)
|
||||
V21,V22,V22bis 09 450 0200
|
||||
|
||||
|
||||
WELCOME TO ZPM3
|
||||
~~~~~~~~~~~~~~~
|
||||
Welcome to the best CP/M compatible operating system for Z80
|
||||
based computers with banked memory. The best? Yes, we believe so.
|
||||
CP/M 3.0 has had bad press, but the fact is that it is faster
|
||||
than CP/M 2.2 ever was, and it offered more integrated
|
||||
facilities. Perhaps it was all the Z80 replacement BDOSes for
|
||||
CP/M 2.2 which stole the limelight from CP/M 3.0, or was it just
|
||||
that few computers had the required banked memory?
|
||||
|
||||
Whatever the reason for CP/M 3.0's lack of success in the
|
||||
marketplace, there are still plenty of users who will stand by
|
||||
its wonderful facilities and speed. For those users ZPM3 provides
|
||||
the long awaited Z80 coded update.
|
||||
|
||||
ZPM3 offers all the good things that CP/M 3.0 does, and then it
|
||||
offers more. Because ZPM3 is written in Z80 code rather than the
|
||||
8080 code of CP/M 3.0, it can do everything that CP/M 3.0 does,
|
||||
but in much less space. With the extra space recovered, ZPM3
|
||||
packs in a number of new facilities. Yet the whole package fits
|
||||
in exactly the same space as CP/M 3.0 so you can directly replace
|
||||
your old CP/M 3.0 BDOS with ZPM3 without a worry.
|
||||
|
||||
ZPM3 is also fast. Faster, in fact, than CP/M 3.0. This is
|
||||
possible because the rich Z80 instruction set allows many
|
||||
algorithms to be implemented more efficiently. In addition, the
|
||||
extra space available in ZPM3 has been put to use to further
|
||||
optimise the code. Lots of small optimisations smooth the
|
||||
execution flow, so ZPM3 becomes the fastest operating system on
|
||||
most banked CP/M computers.
|
||||
|
||||
|
||||
THE FEATURES
|
||||
~~~~~~~~~~~~
|
||||
ZPM3, in addition to complete CP/M 3.0 compatibility, offers the
|
||||
following features:
|
||||
|
||||
|
||||
Random Read Bug fixed.
|
||||
++++++++++++++++++++++
|
||||
Maybe you didn't know, but CP/M 3.0 has a bug. It affects random
|
||||
reads under very specific circumstances, and can result in a
|
||||
program thinking that you don't have some pieces of data in a
|
||||
file when in fact you do. The bug would occur very, very rarely,
|
||||
but it is real. ZPM3 finally squashes it.
|
||||
|
||||
|
||||
Protected SCB User code
|
||||
+++++++++++++++++++++++
|
||||
The System Control Block of CP/M 3.0 was a revolution at the
|
||||
time. ZCPR has a system environment and most other operating
|
||||
systems have other similar structures, but the SCB of CP/M 3.0
|
||||
was one of the very first.
|
||||
|
||||
Unfortunately, Digital Research never properly documented it, and
|
||||
some programmers found things out about it that weren't quite
|
||||
true and started programming accordingly. As well, because it is
|
||||
available in the TPA bank, runaway programs can overwrite it
|
||||
causing problems.
|
||||
|
||||
Mostly though, the SCB will survive, or at least any problems
|
||||
will be so obvious that the user will realise that a crash has
|
||||
occurred and will reboot. A real problem exists with the CP/M 3.0
|
||||
code however when the user value is written over with a value
|
||||
above 15. Many programs now directly write to this byte, and if
|
||||
they put a value in that is above 15, all sorts of havoc can
|
||||
happen with the disk system. Actually, CP/M 3.0 will handle user
|
||||
areas above 15 with this method, and all seems ok until the
|
||||
operating system mistakes one of these directory entries as an
|
||||
XFCB. Simply put, user areas above 15 must not be used with CP/M
|
||||
3.0.
|
||||
|
||||
ZPM3 has code which prevents these problems, making the system
|
||||
even more stable.
|
||||
|
||||
|
||||
Obsoleted Trap system.
|
||||
++++++++++++++++++++++
|
||||
One of the problems of the banked operating system was that it
|
||||
was possible to redirect the BIOS to code below common memory, in
|
||||
which case the banked BDOS could not access it. One solution is
|
||||
to call all BIOS code from common memory, but this involves a
|
||||
bank switch for every BIOS call, and this slows things down
|
||||
considerably.
|
||||
|
||||
CP/M 3.0 got around the problem by providing special code just
|
||||
below the SCB. If you redirected the BIOS, you also had to change
|
||||
this code which caused a bank switch when your new BIOS routine
|
||||
was called. When you removed the redirection, you also had to
|
||||
restore the special code.
|
||||
|
||||
This system has major drawbacks. For a start, if you redirect the
|
||||
BIOS, then another program redirects your redirection, then you
|
||||
remove your first redirection (along with the special code), the
|
||||
bank switch won't happen for the second redirection and the
|
||||
system will crash.
|
||||
|
||||
If a CP/M 2.2 program tried to do the redirection, it would know
|
||||
nothing about CP/M 3.0 and would not adjust the special code, so
|
||||
a crash would result in that case too.
|
||||
|
||||
The special code was called the "Trap System" as it was meant to
|
||||
trap redirection (as long as you set the trap). ZPM3 has
|
||||
eliminated the need for the traps. They are still there, and
|
||||
programs can still fiddle with them, but it doesn't matter how
|
||||
they are set, they are ignored. There is simply no need for them
|
||||
anymore. And this has been achieved without a performance
|
||||
penalty. In fact, in the case of a program which sets the traps
|
||||
but forgets to restore them, performance is now much better.
|
||||
|
||||
|
||||
Semi-Permanent Read Only status for drives.
|
||||
+++++++++++++++++++++++++++++++++++++++++++
|
||||
In recent years, a trend in CP/M 2.2 is to make drives which have
|
||||
been set read only to remain that way until explicitly changed by
|
||||
function 37. ZPM3 now adopts this logic. Previously a control-C
|
||||
would return a read only drive to read write. The advantage is
|
||||
that a program can now make a drive read only for a session and
|
||||
know that it will stay that way.
|
||||
|
||||
|
||||
ZCPR compatible function 152
|
||||
++++++++++++++++++++++++++++
|
||||
Function 152 is the CP/M 3.0 parser. It was a great innovation at
|
||||
the time as parsing is one of the more tedious aspects of
|
||||
programming for CP/M. Unfortunately, almost as soon as it
|
||||
appeared, it was made obsolete by the fact that it didn't handle
|
||||
references to user number (DU references). A line such as
|
||||
A:FILE.TYP would be correctly parsed, but A3:FILE.TYP would not.
|
||||
CP/M 3.0 programs would often parse the drive and user
|
||||
separately, then give function 152 the line without the DU:
|
||||
reference. All this extra work should not have been necessary if
|
||||
CP/M 3.0 had included user number parsing.
|
||||
|
||||
ZPM3 parses the user number, and goes even further by handling
|
||||
named directories for ZCPR. This is possible as long as you set a
|
||||
special word in the SCB which tells ZPM3 where to find the ZCPR
|
||||
system environment descriptor. ZCCP, a companion CCP for ZPM3,
|
||||
handles this automatically, but for Z3PLUS users, a special
|
||||
utility is available which automatically sets this word.
|
||||
|
||||
The result is that CP/M 3.0 programs will not balk at DU:
|
||||
references and ZPM3 aware programs can use the full DU: and DIR:
|
||||
facilities of function 152. It has also made the brilliant ZCCP
|
||||
code possible.
|
||||
|
||||
|
||||
New Functions 54 and 55
|
||||
+++++++++++++++++++++++
|
||||
Datestamps in CP/M 3.0 are wonderful, but difficult to
|
||||
manipulate. Two new functions make them easier to handle and at
|
||||
the same time give compatibility to Z80DOS aware programs.
|
||||
|
||||
Function 54 (Get Stamp) returns a Z80DOS compatible datestamp.
|
||||
Any program (such as many directory programs) which recognise the
|
||||
Z80DOS standard can make use of function 54. There is only one
|
||||
slight difference between Z80DOS datestamps and ZPM3's which you
|
||||
should be aware of. Z80DOS will return a correct datestamp after
|
||||
any successful open or search of any extent. ZPM3 can only return
|
||||
a correct datestamp after a successful open or search of the
|
||||
first extent of the file. This is because CP/M 3.0 datestamps are
|
||||
only saved for the first extents of each file, in order to
|
||||
provide the highest performance.
|
||||
|
||||
Even more interesting is Function 55 (Use Stamp) which provides a
|
||||
mechanism for changing datestamps on files. Trying to do this
|
||||
with CP/M 3.0 was virtually impossible because it involved direct
|
||||
sector writes. With Function 55 you can simply set the stamp and
|
||||
then write.
|
||||
|
||||
|
||||
Wheel protected files
|
||||
+++++++++++++++++++++
|
||||
If you are using a ZCPR system (ZCCP or Z3PLUS), ZPM3 has access
|
||||
to the wheel byte and supports wheel protected files. Such files
|
||||
act normally if the wheel is set (signifying a priveleged user),
|
||||
but if the wheel is not set, the files can not be changed. This
|
||||
is of most benefit to BBS systems. The implementation is
|
||||
virtually the same as most current Z80 CP/M 2.2 compatible
|
||||
BDOSes.
|
||||
|
||||
|
||||
Better error messages
|
||||
+++++++++++++++++++++
|
||||
CP/M 3.0 introduced the best error messages that CP/M had ever
|
||||
had. ZPM3 goes further. The main difference you will notice is
|
||||
that the user number as well as the drive is shown in the error
|
||||
message. This is invaluable in helping you identify which file
|
||||
might have caused a problem.
|
||||
|
||||
|
||||
Function 10 history buffer and improved editing.
|
||||
++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
Function 10 is used by the CCP to input command lines. Many other
|
||||
programs use function 10 for input.
|
||||
|
||||
CP/M 3.0 introduced a history buffer for function 10. You press
|
||||
control-W and you were returned the last command. It is a great
|
||||
facility, but because it only remembers one command it is rather
|
||||
limited. There have been RSXes written which give a much larger
|
||||
history buffer, but RSXes take up extra program memory so are
|
||||
undesirable.
|
||||
|
||||
ZPM3 gives a large (approximately 250 bytes) history buffer which
|
||||
can store multiple commands. It also makes very intelligent use
|
||||
of the buffer so that identical commands are not stored twice,
|
||||
and commands of less than three characters are not stored. The
|
||||
history buffer takes up no additional memory, and is always
|
||||
available.
|
||||
|
||||
For security, it is possible to clear the history buffer so that
|
||||
other users can not see what commands you have used.
|
||||
|
||||
The ZPM3 history buffer feature is so good, that for many users,
|
||||
the ZPM3 upgrade is completely justified by it.
|
||||
|
||||
As part of the history buffer system, ZPM3 also offers a facility
|
||||
called Automatic Command Prompting. This can be disabled, or can
|
||||
be made switchable from the keyboard. When it is on, ZPM3 tries
|
||||
to fill in the rest of your command based on what commands you
|
||||
used most recently. It is like magic, and can save you typing out
|
||||
complicated commands many times. In effect, it looks through the
|
||||
history buffer for you and finds the command it thinks you want.
|
||||
As you keep typing, if it turns out that the command doesn't
|
||||
match anymore, it will try to match another command, and if it
|
||||
can't, it lets you make the command by yourself. This facility is
|
||||
quite amazing to watch.
|
||||
|
||||
And to integrate the history buffer and the automatic command
|
||||
prompting, function 10 has the best command line editing you'll
|
||||
find anywhere. Most of the control keys do something when you are
|
||||
editing a function 10 line, and for the most part they mimic the
|
||||
standard WordStar/NewWord/ZDE functions. You can jump to
|
||||
different words in the command, delete individual words, delete
|
||||
individual letters, insert letters, and a whole lot more.
|
||||
|
||||
|
||||
Here is a list of what the various control keys do for function
|
||||
10:
|
||||
|
||||
A Move left one word
|
||||
B Go to the beginning or end of the line
|
||||
C Warm boot if at start of line, otherwise nothing
|
||||
D Go right one character
|
||||
E Go backwards one command in the history buffer
|
||||
F Go right one word
|
||||
G Delete current character
|
||||
H Destructive backspace
|
||||
I
|
||||
J Enter line
|
||||
K Delete all to the right
|
||||
L
|
||||
M Enter line
|
||||
N
|
||||
O
|
||||
P Toggle printing
|
||||
Q Toggle automatic command prompting (if enabled)
|
||||
R
|
||||
S Go left one character
|
||||
T Delete current word
|
||||
U Add current line to history buffer
|
||||
V Clear line and delete from history buffer
|
||||
W Go forwards one command in the history buffer
|
||||
X Delete all to the left
|
||||
Y Clear the whole line
|
||||
Z
|
||||
|
||||
|
||||
CPMLDR.REL bug fixed.
|
||||
+++++++++++++++++++++
|
||||
If you have ever tried to use the CPMLDR.REL code supplied with
|
||||
CP/M 3.0 to load a CPM3.SYS file larger than 16k, you have
|
||||
probably come across the CPMLDR.REL bug. The computer probably
|
||||
crashed, and you were left wondering what you did wrong in your
|
||||
bios.
|
||||
|
||||
Well CPMLDR.REL has a bug. To solve this for you ZPM3 comes with
|
||||
ZPM3LDR.REL which directly replaces CPMLDR.REL. It is also
|
||||
somewhat better in that all the messages, and the fcb for loading
|
||||
CPM3.SYS, are at the start of the file along with plenty of spare
|
||||
room. As a result you can easily patch the signon and error
|
||||
messages to say whatever you like and even change the FCB to load
|
||||
a file called something other than CPM3.SYS.
|
||||
|
||||
|
||||
|
||||
|
||||
All About the Random Read Bug.
|
||||
==============================
|
||||
Never heard of it? Well it's there in CP/M 3.0. I spent a lot of
|
||||
time trying to work out what it was and just why it was
|
||||
happening, and if you are interested, here are the details.
|
||||
|
||||
CP/M 3.0 uses the Record Count byte of an active FCB a little
|
||||
differently from the way CP/M 2.2 does. It is mentioned in the
|
||||
CP/M 3.0 manuals that the record count may contain numbers
|
||||
greater than 128, but in such a case it implies that the record
|
||||
count is really 128. CP/M 2.2 would not return record counts
|
||||
greater than 128.
|
||||
|
||||
The reason for the use of the record count in this way is to help
|
||||
speed up some of the logic used to find records in a file. It
|
||||
works very well for sequential access. When it comes to random
|
||||
access, the system has some failings.
|
||||
|
||||
The idea behind CP/M 3.0's unusual use of the record count is to
|
||||
keep the record count of the last logical extent of the current
|
||||
physical extent always in the Record Count byte. When accessing
|
||||
extents before the last one, bit 7 of the byte is set. That way
|
||||
it will always be at least 128 for logical extents before the
|
||||
last (which CP/M 3.0 translates to mean equal to 128), and the
|
||||
lower 7 bits are used as convenient storage for the record count
|
||||
of the last logical extent. This is particularly convenient
|
||||
because it means there is no need to go and read the directory
|
||||
entry again when it comes time to read the last logical extent.
|
||||
|
||||
I hope you have followed that! In sequential access, this scheme
|
||||
is great. The problem occurs with random access. In this case it
|
||||
is possible to access a logical extent which has no records in
|
||||
it. This could be any logical extent past the last one. In such a
|
||||
case the record count must be returned as 0 (which is correct).
|
||||
If we then go back to a previous logical extent in the same
|
||||
physical extent, CP/M 3.0 gets confused and assumes that there
|
||||
must be 128 records in that extent because the one we just came
|
||||
from had no records and we are now accessing an earlier extent.
|
||||
You're probably well and truly lost by now!
|
||||
|
||||
Anyhow, the assumption that CP/M 3.0 makes is quite wrong. The
|
||||
record count ends up being set to 128, a read is allowed to go
|
||||
ahead as if nothing was wrong, no error is returned, and the
|
||||
record count remains incorrectly set until a different physical
|
||||
extent is opened. The result could be chaos, but mostly it just
|
||||
means that a program returns the wrong information.
|
||||
|
||||
Remember, a logical extent is always 16k. A physical extent can
|
||||
be a multiple of 16k and is all the data described by one
|
||||
directory entry. If your system has physical extents which are
|
||||
16k, you would never have the problem because a new physical
|
||||
extent would be properly opened for every new logical extent that
|
||||
was accessed.
|
||||
|
||||
Typically though, a physical extent is 32k, so it holds 2 logical
|
||||
extents. The problem won't arise until the file grows past the
|
||||
32k mark in such a case. And when the file gets over 48k the
|
||||
problem can't occur again until it gets over 64k... and so on.
|
||||
Even then, it can only happen if reads are attempted to
|
||||
particular extents in a particular order. So you shouldn't be too
|
||||
surprised if the bug hasn't been too noticeable to you.
|
||||
|
||||
ZPM3 squashes the bug once and for all by using the correct
|
||||
logic. In the situation where the bug would normally occur, ZPM3
|
||||
makes sure it gets the correct record count information, and the
|
||||
reads return the correct record count every time.
|
||||
|
||||
If you are interested in seeing a demonstration of the bug in
|
||||
action (on CP/M 3.0) and comparing it with ZPM3, there is a file
|
||||
floating around various bulletin boards which contains
|
||||
demonstrations for the bug and an RSX to fix it. The RSX is a
|
||||
less than perfect way of overcoming the bug, although it seems to
|
||||
work. However, now that you have ZPM3, you don't need to worry.
|
||||
|
||||
|
||||
|
||||
|
||||
Other things you should know about ZPM3
|
||||
=======================================
|
||||
ZPM3 has worked on EVERY CP/M 3.0 system tried so far except one.
|
||||
This is a Bondwell computer, and as yet it isn't clear why it
|
||||
won't work. I will study the source code of its BIOS and come up
|
||||
with a fix shortly.
|
||||
|
||||
The MAKEDOS.COM utility is not perfect (as mentioned previously)
|
||||
and it seems that nobody has managed to get it to work with the
|
||||
Commodore C128 system. You must use the conventional method for
|
||||
installing ZPM3 on such systems.
|
||||
|
||||
If you have a computer that ZPM3 will not install on with MAKEDOS
|
||||
and you do not have access to the files required to do a
|
||||
conventional install, please contact me. I am interested in
|
||||
making ZPM3 as universal as possible and will help you to install
|
||||
it on your system.
|
||||
|
||||
The ESCAPE key is ignored by function 10. There has been some
|
||||
lively discussion about this but the decision is final: it stays
|
||||
ignored. Remember what function 10 is for and you will understand
|
||||
why I made it ignore the ESCAPE key. The argument against this
|
||||
has been from people who control their terminals from the command
|
||||
line. Apparently some people type in an escape sequence at the
|
||||
command line (which CP/M 3.0 will not output correctly anyhow
|
||||
(converting the escape character to ^[)) then press return to
|
||||
have the CCP echo back the line including the escape character.
|
||||
|
||||
Sorry folks, that is a KLUDGE in my books! Anybody using Z-System
|
||||
would of course use an ALIAS and ECHO to do this properly, but
|
||||
for those who will continue to complain that I have sacrificed
|
||||
CP/M 3.0 compatibility I am now including ECHOTERM.COM to solve
|
||||
your problems. Run it and whatever you type will be sent to the
|
||||
terminal correctly after you press RETURN. Press RETURN twice to
|
||||
exit the program.
|
||||
|
||||
And a reminder that the ability to put control characters into
|
||||
function 10 lines was always limited by the fact that some
|
||||
control keys were used to edit the command line. CP/M 3.0 added
|
||||
even more, and ZPM3 uses virtually all the control keys. The few
|
||||
that aren't used are ignored, and this is in fact a FEATURE which
|
||||
guarantees that unusable characters can't get into function 10
|
||||
lines by accident.
|
||||
|
||||
|
||||
|
||||
|
||||
LEGALS and SUCH
|
||||
===============
|
||||
The ZPM3 package is supplied free of charge, on the condition
|
||||
that you don't use it to make money. If you want to use it
|
||||
commercially you must contact me to get the OK (and negotiate our
|
||||
fee).
|
||||
|
||||
If you find anyone (except myself) charging money for ZPM3,
|
||||
please inform me!
|
||||
|
||||
Nobody is making any guarantees about this software. None at all.
|
||||
If it causes your house to burn down, or a divorce, or just a bad
|
||||
day, this is unfortunate, regrettable, but there is nothing that
|
||||
I can or will do about it. You have been warned.
|
||||
|
||||
The ZPM3 package must only be distributed in the form that you
|
||||
found it. Do not change or add anything. Don't even change it
|
||||
into a different type of archive. Just leave it alone. However
|
||||
you are free to distribute it to as many places and people that
|
||||
you can. Just don't charge for it.
|
||||
|
||||
|
||||
|
||||
If in using ZPM3 you find that it doesn't act as described,
|
||||
please forward the details to me so that either the ZPM3 code or
|
||||
the documentation can be changed. If you would like further
|
||||
details, please forward your specific questions to me. SJC.
|
||||
|
||||
|
||||
|
||||
|
||||
As a service to all our ZPM3 fans, the latest version of the ZPM3
|
||||
package can now be ordered. At this stage we can only supply IBM
|
||||
formatted 3.5 inch 720k disks, however if you are keen enough
|
||||
that shouldn't matter. ZPM3 remains free, however this service
|
||||
will cost you $15 Australian (for the disk, copying, postage and
|
||||
packing) to most places in the Western World (others by
|
||||
arrangement).
|
||||
|
||||
This is a good way to guarantee you have the latest version, and
|
||||
to guarantee that your package has not been corrupted by some
|
||||
unscrupulous person.
|
||||
|
||||
When we fill your order, we will make sure to include the latest
|
||||
demonstration copy of MYZ80 - the fastest and best Z80 emulator
|
||||
for IBM AT (and better) compatibles. MYZ80 can run ZPM3 with
|
||||
ease. It also handles ZCPR and CP/M 2.2. And yes, we do mean
|
||||
FASTEST.
|
||||
|
||||
Send your international money order to:
|
||||
|
||||
Software by Simeon
|
||||
ZPM3 Package
|
||||
2 Maytone Ave
|
||||
Killara NSW
|
||||
Australia 2071
|
||||
|
||||
Your order will be promptly filled.
|
||||
|
||||
BIN
Doc/CPM/ZSDOS Programmers Manual.pdf
Normal file
BIN
Doc/CPM/ZSDOS Programmers Manual.pdf
Normal file
Binary file not shown.
@@ -1,11 +1,45 @@
|
||||
Version 3.6
|
||||
-----------
|
||||
- RDG: Added VDA driver for Xosera FPGA-based VDC
|
||||
- MGG: Added COBOL language disk image
|
||||
- WDC: Added config options to PCF driver
|
||||
- WBW: Enabled dynamic CPU speed update on LCD screen
|
||||
- WBW: Improve LPT driver boot messaging when not detected (per Robb Bates)
|
||||
- WBW: Correct DS1307 boot date/time display (per Tadeusz Pycio)
|
||||
- WBW: Add -DELAY option to TUNE app (per Robb Bates)
|
||||
- RDG: Add online documentation site
|
||||
- WBW: Added enhanced Hi-Tech C Compiler files from Ladislau Szilagyi
|
||||
- WBW: Added boundary check to ram/rom disk driver
|
||||
- WBW: Per Peter Onion, switch KERMIT default file xfer mode to binary
|
||||
- J?L: Source for ZSDOS2 and BPBIOS Utilities (from disassembly)
|
||||
- WBW: Support ROM-based font storage
|
||||
- MAP: New Slice Inventory Rom App "S" display bootable slices, during boot
|
||||
- MAP: Device Inventory moved from HBIOS to Rom App, saving >1k space in HBIOS
|
||||
- MAP: Added disk image for all Infocom text adventure Games
|
||||
- M?R: Fixed formatting issue with SLABEL where Slice # < 10
|
||||
- WBW: Improved image creation process to allow user defined aggregates
|
||||
- WBW: Implemented config driven slice name and system image specification
|
||||
- D?N: Added native USB driver support (keyboard, floppy, mass storage)
|
||||
- MGG: Added sample program source files for all language disk iamges
|
||||
- WBW: Added support for S100 Dual CF Interface
|
||||
- WBW: Added support for S100 ESP32 SD Interface
|
||||
- MAP: User guide. Reorder sections around disk formatting
|
||||
- R?M: Randy Merkel provided ZSDOS Programmer's Manual as translated by Wayne Hortensius
|
||||
- WBW: Updated Cowgol disk image with latest COWFIX.COM from Ladislau Szilagyi
|
||||
- WBW: Preliminary support for S100 Computers Z80 CPU
|
||||
- HJB: Added MSX platform
|
||||
- M?R: Update Timer app with "zero" option
|
||||
- HJB: Update PPIDE driver, add support for MSX BEER IDE interface
|
||||
- HJB: Added loader for MSX
|
||||
- HJB: Added IDE driver master media detect option
|
||||
- WBW: Add support for S100 Serial I/O DLP Serial connection
|
||||
- P?D: Generate compressed ROM for EaZyZ80 512
|
||||
- DDW: Added support for the 'N8PC' platform. Includes support for the M6242 RTC chip
|
||||
- JMD: Added VGMINFO application
|
||||
- WBW: Created SCSI Driver derived from code from Jay Cotton
|
||||
- WBW: Add official RC2014 platform (derived from RCZ80)
|
||||
- D?N: Added improved TMS Driver hardware/configuration detection and reporting
|
||||
- WBW: Removed driver module INIT lists, replaced with init phase system
|
||||
|
||||
Version 3.5.1
|
||||
-------------
|
||||
@@ -76,7 +110,7 @@ Version 3.5
|
||||
- WBW: Add options to TUNE/HBIOS to force detection of MSX and RC AY/YM standard PSG ports
|
||||
- MAP: Added /B=OPTIONS for automated drive assignment to ASSIGN.COM
|
||||
- WBW: Added TE Editor (Ladislau Szilagyi)
|
||||
- WBW: Refrech Cowgol disk image (Ladislau Szilagyi)
|
||||
- WBW: Refresh Cowgol disk image (Ladislau Szilagyi)
|
||||
|
||||
Version 3.4
|
||||
-----------
|
||||
|
||||
BIN
Doc/Language/Cowgol Compiler Manual.pdf
Normal file
BIN
Doc/Language/Cowgol Compiler Manual.pdf
Normal file
Binary file not shown.
99
Doc/Language/HI-TECH Z80 C Compiler Messages.txt
Normal file
99
Doc/Language/HI-TECH Z80 C Compiler Messages.txt
Normal file
@@ -0,0 +1,99 @@
|
||||
1 "dimension required"
|
||||
2 "functions can't return arrays"
|
||||
3 "functions can't return functions"
|
||||
4 "can't have array of functions"
|
||||
5 "argument redeclared: %s"
|
||||
6 "not an argument: %s"
|
||||
7 "undefined struct/union: %s"
|
||||
8 "can't have array of functions"
|
||||
9 "only functions may be void"
|
||||
10 "functions can't return arrays"
|
||||
11 "declarator too complex"
|
||||
12 "no identifier in declaration"
|
||||
13 "can't initialize arg"
|
||||
14 "argument redeclared: %s"
|
||||
15 "bad storage class"
|
||||
16 "can't mix proto and non-proto args"
|
||||
17 "type specifier reqd. for proto arg"
|
||||
18 "can't initialise auto aggregates"
|
||||
19 "integer expression required"
|
||||
20 "undefined enum tag: %s"
|
||||
21 "integer constant expected"
|
||||
22 "bad bitfield type"
|
||||
23 "members cannot be functions"
|
||||
24 "struct/union redefined: %s"
|
||||
25 "can't be unsigned"
|
||||
26 "can't be short"
|
||||
27 "can't be long"
|
||||
28 "can't be register"
|
||||
29 "inconsistent type"
|
||||
30 "bad storage class"
|
||||
31 "storage class illegal"
|
||||
32 "inconsistent storage class"
|
||||
33 "illegal initialisation"
|
||||
34 "only register storage class allowed"
|
||||
35 "too much indirection"
|
||||
36 "argument list conflicts with prototype"
|
||||
37 "identifier redefined: %s"
|
||||
38 "not a label identifier: %s"
|
||||
39 "'case' not in switch"
|
||||
40 "'default' not in switch"
|
||||
41 "default case redefined"
|
||||
42 "inappropriate break/continue"
|
||||
43 "illegal type for switch expression"
|
||||
44 "inappropriate 'else'"
|
||||
45 "illegal initialisation"
|
||||
46 "initialisation syntax"
|
||||
47 "illegal initialisation"
|
||||
48 "%s expected"
|
||||
49 "close error (disk space?)"
|
||||
50 "digit out of range"
|
||||
51 "hex digit expected"
|
||||
52 "exponent expected"
|
||||
53 "'.' expected after '..'"
|
||||
54 "char const too long"
|
||||
55 "illegal character (0%o)"
|
||||
56 "illegal conversion"
|
||||
57 "logical type required"
|
||||
58 "type conflict"
|
||||
59 "simple type required for %.3s"
|
||||
60 "integral type required"
|
||||
61 "illegal use of void expression"
|
||||
62 "void function cannot return value"
|
||||
63 "pointer required"
|
||||
64 "only lvalues may be assigned to or modified"
|
||||
65 "can't take this address"
|
||||
66 "can't take address of register variable"
|
||||
67 "undefined struct/union: %s"
|
||||
68 "struct/union member expected"
|
||||
69 "struct/union required"
|
||||
70 "illegal type for index expression"
|
||||
71 "not a variable identifier: %s"
|
||||
72 "undefined identifier: %s"
|
||||
73 "expression syntax"
|
||||
74 "illegal type for array dimension"
|
||||
75 "constant expression required"
|
||||
76 "too few arguments"
|
||||
77 "too many arguments"
|
||||
78 "function does not take arguments"
|
||||
79 "float param coerced to double"
|
||||
80 "non-void function returns no value"
|
||||
81 "Unreachable code"
|
||||
82 "implicit return at end of non-void function"
|
||||
83 "Can't create xref file %s"
|
||||
84 "implicit conversion of float to integer"
|
||||
85 "illegal conversion between pointer types"
|
||||
86 "illegal conversion of pointer to integer"
|
||||
87 "illegal conversion of integer to pointer"
|
||||
88 "%s() declared implicit int"
|
||||
89 "operands of %.3s not same type"
|
||||
90 "operands of %.3s not same pointer type"
|
||||
91 "function or function pointer required"
|
||||
92 "Can't create xref file %s"
|
||||
93 "close error (disk space?)"
|
||||
94 "Can't reopen %s"
|
||||
95 "can't open %s"
|
||||
96 "illegal '#' directive"
|
||||
97 "EOF in #asm"
|
||||
98 "Too many cases in switch"
|
||||
99 "unexpected EOF"
|
||||
@@ -11,45 +11,53 @@ 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)
|
||||
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)
|
||||
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)
|
||||
The Cowgol Lanaguage ("The Cowgol Language.pdf")
|
||||
Cowgol Compiler Manual ("Cowgol Compiler Manual.pdf")
|
||||
|
||||
--------------------------------------
|
||||
|
||||
Documentation for Cowgol Language included in the cowgol disk image
|
||||
Documentation for Cowgol Language included in the cowgol disk image.
|
||||
The Cowgol Language describes the Cowgol Language itself while the
|
||||
Cowgol Compiler Manual describes the compiler operation.
|
||||
|
||||
|
||||
HI-TECH C Compiler User Manual (HI-TECH Z80 C Compiler Manual.txt)
|
||||
HI-TECH C Compiler User Manual ("HI-TECH Z80 C Compiler Manual.txt")
|
||||
HI-TECH C Compiler Messages ("HI-TECH Z80 C Compiler Messages.txt")
|
||||
------------------------------------------------------------------
|
||||
|
||||
Official user manual for the HI-TECH C Compiler included in the
|
||||
hitechc disk image.
|
||||
hitechc disk image. The Compiler Messages file provides textual
|
||||
descriptions of all compiler error and warning codes. These textual
|
||||
messages have been omitted from the size optimized version of
|
||||
HI-TECH C found in User Area 1 of the disk image. See the ReadMe.txt
|
||||
file in the hitechc disk image for more information.
|
||||
|
||||
|
||||
Microsoft Basic-80 Reference Manual v5.0 (Microsoft Basic-80 Reference Manual v5.0.pdf)
|
||||
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)
|
||||
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)
|
||||
Z80 Assembler User Manual ("z80asm (SLR Systems).pdf")
|
||||
----------------------------------------------------
|
||||
|
||||
Official user manual for the Z80 Macro Assembler by SLR Systems
|
||||
|
||||
@@ -28,6 +28,7 @@ ChangeLog.txt
|
||||
Log of changes in RomWBW by version.
|
||||
|
||||
|
||||
RomWBW Introduction ("RomWBW Introduction.pdf")
|
||||
RomWBW User Guide ("RomWBW User Guide.pdf")
|
||||
RomWBW System Guide ("RomWBW System Guide.pdf")
|
||||
RomWBW Applications ("RomWBW Applications.pdf")
|
||||
@@ -84,4 +85,4 @@ UCSD p-System Users Manual ("UCSD p-System Users Manual.pdf")
|
||||
Official user manual for p-System operating system included with
|
||||
RomWBW.
|
||||
|
||||
--WBW 5:18 PM 6/14/2023
|
||||
--WBW 8:37 AM 6/6/2025
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
12
Dockerfile
12
Dockerfile
@@ -1,4 +1,4 @@
|
||||
FROM ubuntu:jammy-20240111 as basebuilder
|
||||
FROM ubuntu:jammy-20240111 AS basebuilder
|
||||
|
||||
# This docker file can be used to build a tool chain docker image for building RomWBW images.
|
||||
|
||||
@@ -10,7 +10,7 @@ FROM ubuntu:jammy-20240111 as basebuilder
|
||||
# After you have built the above image (called romwbw-chain), you can use it to compile and build the RomWBW images
|
||||
# as per the standard make scripts within RomWBW.
|
||||
# Start a new terminal, cd to where you have clone RomWBW, and then run this command:
|
||||
# docker run -v ${PWD}:/src/ --privileged=true -u $(id -u ${USER}):$(id -g ${USER}) -it romwbw-chain:latest
|
||||
# docker run --rm -v ${PWD}:/src/ --privileged=true -u $(id -u ${USER}):$(id -g ${USER}) -it romwbw-chain
|
||||
|
||||
# you can now compile and build the required images:
|
||||
|
||||
@@ -21,13 +21,11 @@ FROM ubuntu:jammy-20240111 as basebuilder
|
||||
# when finish, type 'exit' to return to back to your standard terminal session
|
||||
|
||||
LABEL Maintainer="Dean Netherton" \
|
||||
Description="spike to use clang for ez80 target"
|
||||
Description="RomWBW builder platform"
|
||||
|
||||
ENV DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
|
||||
RUN dpkg --add-architecture i386
|
||||
RUN sed -i 's/http:\/\/archive\.ubuntu\.com\/ubuntu/http:\/\/au.archive.ubuntu.com\/ubuntu/g' /etc/apt/sources.list
|
||||
RUN apt update -y
|
||||
RUN apt dist-upgrade -y
|
||||
RUN apt install -y --no-install-recommends cmake lzip ca-certificates mtools build-essential dos2unix libboost-all-dev texinfo texi2html libxml2-dev subversion bison flex zlib1g-dev m4 git wget dosfstools curl
|
||||
@@ -35,10 +33,10 @@ RUN apt install -y --no-install-recommends cmake lzip ca-certificates mtools bui
|
||||
RUN mkdir work
|
||||
WORKDIR /work
|
||||
|
||||
FROM basebuilder as main
|
||||
FROM basebuilder AS main
|
||||
|
||||
LABEL Maintainer="Dean Netherton" \
|
||||
Description="spike to build RomWBW"
|
||||
Description="RomWBW builder platform"
|
||||
|
||||
RUN mkdir /src
|
||||
WORKDIR /src/
|
||||
|
||||
7
Makefile
7
Makefile
@@ -1,7 +1,7 @@
|
||||
.PHONY: tools source clean clobber diff dist
|
||||
|
||||
.ONESHELL:
|
||||
.SHELLFLAGS = -cex
|
||||
.SHELLFLAGS = -ce
|
||||
|
||||
all: tools source
|
||||
|
||||
@@ -22,6 +22,11 @@ clobber: clean
|
||||
diff:
|
||||
$(MAKE) --directory Source diff
|
||||
|
||||
# Convert c code to assembly code
|
||||
transpile-c-code:
|
||||
@cd Source/HBIOS/ch376-native
|
||||
$(MAKE) -j
|
||||
|
||||
dist:
|
||||
$(MAKE) ROM_PLATFORM=dist
|
||||
$(MAKE) --directory Tools clean
|
||||
|
||||
@@ -8,10 +8,27 @@ release of RomWBW.
|
||||
- **Please** review the "Upgrading" Section of the RomWBW User Guide.
|
||||
|
||||
- The RomWBW ROM and the RomWBW disk images are intended to be a
|
||||
matched set. After upgrading your ROM, it is important to update
|
||||
the OS boot tracks of your disks as well as the RomWBW-specific
|
||||
applications. This is discussed in the "Upgrading" section of the
|
||||
RomWBW User Guide.
|
||||
matched set. After upgrading your ROM, you need to update your
|
||||
boot disk media by doing one of the following:
|
||||
|
||||
- Write a new disk image (typically hd1k_combo.img) onto your
|
||||
disk media (will overwrite existing data/files).
|
||||
- Update the boot tracks of the bootable OS images as described in
|
||||
the RomWBW User Guid.
|
||||
|
||||
## Version 3.6
|
||||
|
||||
### Upgrade Notes
|
||||
|
||||
- The FZ80 (S100 FPGA Z80) platform has been renamed to SZ80 (S100 Z80)
|
||||
and has two configurations. SZ80_std is for the generic S100
|
||||
Z80 CPU. SZ80_fpga is for the FPGA Z80 SBC.
|
||||
|
||||
### New Features
|
||||
|
||||
### New Hardware Support
|
||||
|
||||
- Support for MSX systems.
|
||||
|
||||
## Version 3.5.1
|
||||
|
||||
@@ -94,7 +111,6 @@ This is a patch release of v3.5.
|
||||
- Enhancements to ASSIGN command to automatically assign drives
|
||||
(Mark Pruden).
|
||||
|
||||
|
||||
### New Hardware Support
|
||||
|
||||
- NABU w/ RomWBW Option Board.
|
||||
|
||||
42
ReadMe.md
42
ReadMe.md
@@ -7,12 +7,12 @@
|
||||
**RomWBW Introduction** \
|
||||
Version 3.6 \
|
||||
Wayne Warthen ([wwarthen@gmail.com](mailto:wwarthen@gmail.com)) \
|
||||
28 May 2025
|
||||
06 Jan 2026
|
||||
|
||||
# Overview
|
||||
|
||||
RomWBW software provides a complete, commercial quality implementation
|
||||
of CP/M (and workalike) operating systems and applications for modern
|
||||
of CP/M (and work-alike) operating systems and applications for modern
|
||||
Z80/180/280 retro-computing hardware systems.
|
||||
|
||||
A wide variety of platforms are supported including those produced by
|
||||
@@ -49,7 +49,7 @@ Supported hardware features of RomWBW include:
|
||||
- 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
|
||||
- Video drivers including TMS9918, SY6545, MOS8563, HD6445, Xosera
|
||||
- Keyboard (PS/2) drivers via VT8242 or PPI interfaces
|
||||
- Real time clock drivers including DS1302, BQ4845
|
||||
- Support for CP/NET networking using Wiznet, MT011 or Serial
|
||||
@@ -80,7 +80,7 @@ Some of the included software:
|
||||
- Support for other operating systems, p-System, FreeRTOS, and FUZIX.
|
||||
- Programming Tools (Z80ASM, Turbo Pascal, Forth, Cowgol)
|
||||
- C Compiler’s including Aztec-C, and HI-TECH C
|
||||
- Microsoft Basic Compiler, and Microsoft Fortran
|
||||
- Microsoft Basic Compiler, Microsoft Fortran, and Microsoft COBOL
|
||||
- Some games such as Colossal Cave, Zork, etc
|
||||
- Wordstar Word processing software
|
||||
|
||||
@@ -191,6 +191,9 @@ documentation:
|
||||
discusses much of the internal design and construction of RomWBW. It
|
||||
includes a reference for the RomWBW HBIOS API functions.
|
||||
|
||||
An online HTML version of this documentation is hosted at
|
||||
<https://wwarthen.github.io/RomWBW>.
|
||||
|
||||
Each of the operating systems and ROM applications included with RomWBW
|
||||
are sophisticated tools in their own right. It is not reasonable to
|
||||
fully document their usage. However, you will find complete manuals in
|
||||
@@ -287,8 +290,12 @@ let me know if I missed you!
|
||||
|
||||
- Tasty Basic is a product of Dimitri Theulings.
|
||||
|
||||
- Dean Netherton contributed eZ80 CPU support, the sound driver
|
||||
interface, and the SN76489 sound driver.
|
||||
- Dean Netherton contributed multiple components:
|
||||
|
||||
- eZ80 CPU support
|
||||
- Sound driver infrastructure
|
||||
- SN76489 sound driver
|
||||
- Native USB driver (keyboard, floppy, mass storage)
|
||||
|
||||
- The RomWBW Disk Catalog document was produced by Mykl Orders.
|
||||
|
||||
@@ -304,8 +311,10 @@ let me know if I missed you!
|
||||
- significant content in the Disk Catalog and User Guide
|
||||
- creation of the Introduction and Hardware documents
|
||||
- Z3PLUS operating system disk image
|
||||
- COPYSL utility
|
||||
- SLABEL utility
|
||||
- Infocom text adventure game disk image
|
||||
- COPYSL, and SLABEL utilities
|
||||
- Display of bootable slices via “S” command during startup
|
||||
- Optimisations of HBIOS and CBIOS to reduce overall code size
|
||||
- a feature for RomWBW configuration by NVRAM
|
||||
- the /B bulk mode of disk assignment to the ASSIGN utility
|
||||
|
||||
@@ -340,6 +349,23 @@ let me know if I missed you!
|
||||
|
||||
- Les Bird has contributed support for the NABU w/ Option Board
|
||||
|
||||
- Rob Gowin created an online documentation site via MkDocs, and
|
||||
contributed a driver for the Xosera FPGA-based video controller.
|
||||
|
||||
- Jörg Linder has contributed disassembled and nicely commented source
|
||||
for ZSDOS2 and the BPBIOS utilities.
|
||||
|
||||
- Marshall Gates has contriubed sample program source files for all of
|
||||
the language disk images.
|
||||
|
||||
- Randy Merkel provided the ZSDOS Programmer’s Manual as translated by
|
||||
Wayne Hortensius.
|
||||
|
||||
- Henk Berends added support for the MSX platform.
|
||||
|
||||
- Jay Cotton provided the SCSI transport code upon which the SCSI driver
|
||||
is based.
|
||||
|
||||
## Related Projects
|
||||
|
||||
Outside of the hardware platforms adapted to RomWBW, there are a variety
|
||||
|
||||
42
ReadMe.txt
42
ReadMe.txt
@@ -1,6 +1,6 @@
|
||||
RomWBW Introduction
|
||||
Wayne Warthen (wwarthen@gmail.com)
|
||||
28 May 2025
|
||||
06 Jan 2026
|
||||
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@ OVERVIEW
|
||||
|
||||
|
||||
RomWBW software provides a complete, commercial quality implementation
|
||||
of CP/M (and workalike) operating systems and applications for modern
|
||||
of CP/M (and work-alike) operating systems and applications for modern
|
||||
Z80/180/280 retro-computing hardware systems.
|
||||
|
||||
A wide variety of platforms are supported including those produced by
|
||||
@@ -46,7 +46,7 @@ Supported hardware features of RomWBW include:
|
||||
- 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
|
||||
- Video drivers including TMS9918, SY6545, MOS8563, HD6445, Xosera
|
||||
- Keyboard (PS/2) drivers via VT8242 or PPI interfaces
|
||||
- Real time clock drivers including DS1302, BQ4845
|
||||
- Support for CP/NET networking using Wiznet, MT011 or Serial
|
||||
@@ -78,7 +78,7 @@ Some of the included software:
|
||||
- Support for other operating systems, p-System, FreeRTOS, and FUZIX.
|
||||
- Programming Tools (Z80ASM, Turbo Pascal, Forth, Cowgol)
|
||||
- C Compiler’s including Aztec-C, and HI-TECH C
|
||||
- Microsoft Basic Compiler, and Microsoft Fortran
|
||||
- Microsoft Basic Compiler, Microsoft Fortran, and Microsoft COBOL
|
||||
- Some games such as Colossal Cave, Zork, etc
|
||||
- Wordstar Word processing software
|
||||
|
||||
@@ -193,6 +193,9 @@ documentation:
|
||||
construction of RomWBW. It includes a reference for the RomWBW HBIOS
|
||||
API functions.
|
||||
|
||||
An online HTML version of this documentation is hosted at
|
||||
https://wwarthen.github.io/RomWBW.
|
||||
|
||||
Each of the operating systems and ROM applications included with RomWBW
|
||||
are sophisticated tools in their own right. It is not reasonable to
|
||||
fully document their usage. However, you will find complete manuals in
|
||||
@@ -294,8 +297,12 @@ let me know if I missed you!
|
||||
|
||||
- Tasty Basic is a product of Dimitri Theulings.
|
||||
|
||||
- Dean Netherton contributed eZ80 CPU support, the sound driver
|
||||
interface, and the SN76489 sound driver.
|
||||
- Dean Netherton contributed multiple components:
|
||||
|
||||
- eZ80 CPU support
|
||||
- Sound driver infrastructure
|
||||
- SN76489 sound driver
|
||||
- Native USB driver (keyboard, floppy, mass storage)
|
||||
|
||||
- The RomWBW Disk Catalog document was produced by Mykl Orders.
|
||||
|
||||
@@ -311,8 +318,10 @@ let me know if I missed you!
|
||||
- significant content in the Disk Catalog and User Guide
|
||||
- creation of the Introduction and Hardware documents
|
||||
- Z3PLUS operating system disk image
|
||||
- COPYSL utility
|
||||
- SLABEL utility
|
||||
- Infocom text adventure game disk image
|
||||
- COPYSL, and SLABEL utilities
|
||||
- Display of bootable slices via “S” command during startup
|
||||
- Optimisations of HBIOS and CBIOS to reduce overall code size
|
||||
- a feature for RomWBW configuration by NVRAM
|
||||
- the /B bulk mode of disk assignment to the ASSIGN utility
|
||||
|
||||
@@ -347,6 +356,23 @@ let me know if I missed you!
|
||||
|
||||
- Les Bird has contributed support for the NABU w/ Option Board
|
||||
|
||||
- Rob Gowin created an online documentation site via MkDocs, and
|
||||
contributed a driver for the Xosera FPGA-based video controller.
|
||||
|
||||
- Jörg Linder has contributed disassembled and nicely commented source
|
||||
for ZSDOS2 and the BPBIOS utilities.
|
||||
|
||||
- Marshall Gates has contriubed sample program source files for all of
|
||||
the language disk images.
|
||||
|
||||
- Randy Merkel provided the ZSDOS Programmer’s Manual as translated by
|
||||
Wayne Hortensius.
|
||||
|
||||
- Henk Berends added support for the MSX platform.
|
||||
|
||||
- Jay Cotton provided the SCSI transport code upon which the SCSI driver
|
||||
is based.
|
||||
|
||||
|
||||
Related Projects
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# RomWBW HBIOS CP/M FAT Utility ("FAT.COM")
|
||||
|
||||
Author: Wayne Warthen \
|
||||
Updated: 6-May-2024
|
||||
Updated: 27-Aug-2025
|
||||
|
||||
This application allows copying files between CP/M filesystems and FAT
|
||||
filesystems (DOS, Windows, Mac, Linux, etc.). The application runs on
|
||||
@@ -142,10 +142,10 @@ creation.
|
||||
|
||||
| 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) |
|
||||
| 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 |
|
||||
@@ -153,6 +153,7 @@ creation.
|
||||
| | | 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) |
|
||||
| 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 |
|
||||
| 6-May-2024 | v1.1.0 | improve floppy format boot record |
|
||||
| 27-Aug-2025 | v1.2.0 | update location of RomWBW IDENT pointer |
|
||||
|
||||
Binary file not shown.
File diff suppressed because it is too large
Load Diff
@@ -31,7 +31,7 @@ STKSIZ .EQU $FF
|
||||
;
|
||||
; HBIOS SYSTEM CALLS AND ID STRING ADDRESS
|
||||
;
|
||||
ROMWBW_ID .EQU $FFFE ; ROMWBW ID STRING ADDRESS
|
||||
ROMWBW_ID .EQU $FFFC ; ROMWBW ID STRING ADDRESS
|
||||
HBIOS_SYS .EQU $FFF0 ; HBIOS SYSCALL ADDRESS
|
||||
|
||||
H_SYSGET .EQU $F8 ; GET SYSTEM INFO
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -12,6 +12,7 @@
|
||||
; 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
|
||||
; WBW 2025-12-04: Add support for S100 MS-DOS Support Board
|
||||
;
|
||||
;=======================================================================
|
||||
;
|
||||
@@ -29,6 +30,9 @@ 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
|
||||
; S100 MS-DOS Support Board
|
||||
iocmd_s100 .equ $64 ; PS/2 controller command port address
|
||||
iodat_s100 .equ $60 ; PS/2 controller data port address
|
||||
|
||||
;
|
||||
cpumhz .equ 8 ; for time delay calculations (not critical)
|
||||
@@ -94,6 +98,8 @@ setup1:
|
||||
jr z,setup_duo
|
||||
cp '4' ; RC2014 EP/Sally
|
||||
jr z,setup_rc
|
||||
cp '5' ; S100
|
||||
jr z,setup_s100
|
||||
cp 'X'
|
||||
jr z,exit
|
||||
jr setup
|
||||
@@ -130,6 +136,14 @@ setup_rc:
|
||||
ld de,str_rc
|
||||
jr setup2
|
||||
;
|
||||
setup_s100:
|
||||
ld a,iocmd_s100
|
||||
ld (iocmd),a
|
||||
ld a,iodat_s100
|
||||
ld (iodat),a
|
||||
ld de,str_s100
|
||||
jr setup2
|
||||
;
|
||||
setup2:
|
||||
call prtstr
|
||||
call crlf2
|
||||
@@ -1452,18 +1466,20 @@ delay1:
|
||||
; Constants
|
||||
;=======================================================================
|
||||
;
|
||||
str_banner .db "PS/2 Keyboard/Mouse Information v0.9, 10-Jun-2024",0
|
||||
str_banner .db "PS/2 Keyboard/Mouse Information v1.0, 4-Dec-2025",0
|
||||
str_hwmenu .db "PS/2 Controller Port Options:\r\n\r\n"
|
||||
.db " 1 - Nhyodyne\r\n"
|
||||
.db " 2 - Rhyophyre\r\n"
|
||||
.db " 3 - Duodyne\r\n"
|
||||
.db " 4 - RC2014\r\n"
|
||||
.db " 5 - S100 MS-DOS Support Board\r\n"
|
||||
.db " X - Exit Application\r\n"
|
||||
.db "\r\nSelection? ",0
|
||||
str_mbc .db "Nhyodyne",0
|
||||
str_rph .db "Rhyophyre",0
|
||||
str_duo .db "Duodyne",0
|
||||
str_rc .db "RC2014 (Saly)",0
|
||||
str_s100 .db "S100 (MS-DOS Support Board)",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"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
IDENT .EQU $FFFE ; loc of RomWBW HBIOS ident ptr
|
||||
IDENT .EQU $FFFC ; loc of RomWBW HBIOS ident ptr
|
||||
;
|
||||
BF_SYSVER .EQU $F1 ; BIOS: VER function
|
||||
BF_SYSGET .EQU $F8 ; HBIOS: SYSGET function
|
||||
@@ -7,6 +7,6 @@ BF_SND .EQU $50
|
||||
BF_SNDRESET .EQU BF_SND + 0 ; RESET SOUND SYSTEM
|
||||
BF_SNDVOL .EQU BF_SND + 1 ; REQUEST SOUND VOL - L CONTAINS VOLUME (255 MAX, 0 SILENT) - SCALED AS REQUIRED BY DRIVER (EG: MAPS TO JUST 4 BIT RESOLUTION FOR SN76489)
|
||||
BF_SNDPRD .EQU BF_SND + 2 ; REQUEST SOUND PERIOD - HL CONTAINS DRIVER SPECIFIC VALUE
|
||||
BF_SNDNOTE .EQU BF_SND + 3 ; REQUEST NOTE - L CONTAINS NOTE - EACH VALUE IS QUARTER NOTE
|
||||
BF_SNDNOTE .EQU BF_SND + 3 ; REQUEST NOTE - L CONTAINS NOTE - EACH VALUE IS AN EIGHTH TONE
|
||||
BF_SNDPLAY .EQU BF_SND + 4 ; INITIATE THE REQUESTED SOUND COMMAND
|
||||
BF_SNDQUERY .EQU BF_SND + 5 ; E IS SUBFUNCTION
|
||||
|
||||
@@ -446,7 +446,7 @@ IDBIO:
|
||||
;
|
||||
IDBIO1:
|
||||
; Check for RomWBW (HBIOS)
|
||||
LD HL,($FFFE) ; HL := HBIOS ident location
|
||||
LD HL,($FFFC) ; HL := HBIOS ident location
|
||||
LD A,'W' ; First byte of ident
|
||||
CP (HL) ; Compare
|
||||
JR NZ,IDBIO2 ; Not HBIOS
|
||||
|
||||
@@ -7,6 +7,8 @@ set TASMTABS=%TOOLS%\tasm32
|
||||
|
||||
tasm -t80 -g3 -fFF -dWBW vgmplay.asm vgmplay.com vgmplay.lst || exit /b
|
||||
tasm -t80 -g3 -fFF -dWBW ymfmdemo.asm ymfmdemo.com ymfmdemo.lst || exit /b
|
||||
tasm -t80 -g3 -fFF -dWBW vgminfo.asm vgminfo.com vgminfo.lst || exit /b
|
||||
|
||||
copy /Y vgmplay.com ..\..\..\Binary\Apps\ || exit /b
|
||||
copy /Y vgminfo.com ..\..\..\Binary\Apps\ || exit /b
|
||||
copy /Y Tunes\*.vgm ..\..\..\Binary\Apps\Tunes\ || exit /b
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
OBJECTS = vgmplay.com
|
||||
OBJECTS = vgmplay.com vgminfo.com
|
||||
DEST = ../../../Binary/Apps
|
||||
TOOLS = ../../../Tools
|
||||
OTHERS = *.LST
|
||||
@@ -13,6 +13,9 @@ vgmplay.com: $(DEPS)
|
||||
ym2612.com:
|
||||
$(TASM) -dWBW ymfmdemo.asm ymfmdemo.com ymfmdemo.lst
|
||||
|
||||
vgminfo.com:
|
||||
$(TASM) -dWBW vgminfo.asm vgminfo.com vgminfo.lst
|
||||
|
||||
all::
|
||||
mkdir -p $(DEST)/Tunes
|
||||
cp Tunes/*.vgm $(DEST)/Tunes
|
||||
|
||||
854
Source/Apps/VGM/vgminfo.asm
Normal file
854
Source/Apps/VGM/vgminfo.asm
Normal file
@@ -0,0 +1,854 @@
|
||||
;------------------------------------------------------------------------------
|
||||
; VGM File Info Display for CP/M
|
||||
;------------------------------------------------------------------------------
|
||||
;
|
||||
; Scans all .VGM files in current directory and displays chip information
|
||||
; in a formatted table
|
||||
;
|
||||
; (c) 2025 Joao Miguel Duraes
|
||||
; Licensed under the MIT License
|
||||
;
|
||||
; Version: 1.1 - 06-Dec-2025
|
||||
;
|
||||
; Assemble with:
|
||||
; TASM -80 -b vgminfo.asm vgminfo.com
|
||||
;
|
||||
;------------------------------------------------------------------------------
|
||||
|
||||
;------------------------------------------------------------------------------
|
||||
; CP/M definitions
|
||||
;------------------------------------------------------------------------------
|
||||
|
||||
BOOT .equ 0000H ; boot location
|
||||
BDOS .equ 0005H ; bdos entry point
|
||||
FCB .equ 005CH ; file control block
|
||||
FCBCR .equ FCB + 20H ; fcb current record
|
||||
BUFF .equ 0080H ; DMA buffer
|
||||
|
||||
PRINTF .equ 9 ; BDOS print string function
|
||||
OPENF .equ 15 ; BDOS open file function
|
||||
CLOSEF .equ 16 ; BDOS close file function
|
||||
READF .equ 20 ; BDOS sequential read function
|
||||
SETDMA .equ 26 ; BDOS set DMA address
|
||||
SFIRST .equ 17 ; BDOS search first
|
||||
SNEXT .equ 18 ; BDOS search next
|
||||
|
||||
CR .equ 0DH ; carriage return
|
||||
LF .equ 0AH ; line feed
|
||||
|
||||
;------------------------------------------------------------------------------
|
||||
; VGM Header offsets
|
||||
;------------------------------------------------------------------------------
|
||||
|
||||
DEBUG_SUM .equ 1 ; 1 = build with checksum support
|
||||
|
||||
VGM_IDENT .equ 00H ; "Vgm " identifier
|
||||
VGM_VERSION .equ 08H ; Version
|
||||
VGM_SN76489_CLK .equ 0CH ; SN76489 clock (4 bytes, little-endian)
|
||||
VGM_YM2612_CLK .equ 2CH ; YM2612 clock (4 bytes, little-endian)
|
||||
VGM_YM2151_CLK .equ 30H ; YM2151 clock (4 bytes, little-endian)
|
||||
VGM_DATAOFF .equ 34H ; VGM data offset (relative to 0x34)
|
||||
VGM_AY8910_CLK .equ 74H ; AY-3-8910 clock (4 bytes, little-endian)
|
||||
|
||||
;------------------------------------------------------------------------------
|
||||
; VGM Command codes (subset)
|
||||
;------------------------------------------------------------------------------
|
||||
|
||||
VGM_PSG1_W .equ 050H ; PSG (SN76489) write
|
||||
VGM_PSG2_W .equ 030H ; PSG #2 write
|
||||
VGM_YM26121_W .equ 052H ; YM2612 port 0 write
|
||||
VGM_YM26122_W .equ 053H ; YM2612 port 1 write
|
||||
VGM_YM26123_W .equ 0A2H ; YM2612 #2 port 0 write
|
||||
VGM_YM26124_W .equ 0A3H ; YM2612 #2 port 1 write
|
||||
VGM_YM21511_W .equ 054H ; YM2151 write
|
||||
VGM_YM21512_W .equ 0A4H ; YM2151 #2 write
|
||||
VGM_OPL2_W .equ 05AH ; YM3812 (OPL2) write
|
||||
VGM_OPL31_W .equ 05EH ; YMF262 (OPL3) port 0 write
|
||||
VGM_OPL32_W .equ 05FH ; YMF262 (OPL3) port 1 write
|
||||
VGM_AY_W .equ 0A0H ; AY-3-8910 write
|
||||
VGM_ESD .equ 066H ; End of sound data
|
||||
VGM_WNS .equ 061H ; Wait n samples
|
||||
VGM_W735 .equ 062H ; Wait 735 samples
|
||||
VGM_W882 .equ 063H ; Wait 882 samples
|
||||
|
||||
;------------------------------------------------------------------------------
|
||||
; Program Start
|
||||
;------------------------------------------------------------------------------
|
||||
|
||||
.ORG 100H
|
||||
|
||||
START: LD SP, STACK ; Setup stack
|
||||
|
||||
; Parse command tail for debug flags (e.g. "D" or "/D")
|
||||
CALL PARSE_DEBUG
|
||||
|
||||
; Display header
|
||||
LD DE, MSG_HEADER
|
||||
CALL PRTSTR
|
||||
LD DE, MSG_DIVIDER
|
||||
CALL PRTSTR
|
||||
|
||||
; Setup search for *.VGM files
|
||||
LD DE, SEARCH_FCB
|
||||
LD C, SFIRST
|
||||
CALL BDOS
|
||||
CP 0FFH ; No files found?
|
||||
JP Z, NO_FILES
|
||||
|
||||
FILE_LOOP:
|
||||
; A contains directory entry index (0-3)
|
||||
; Each entry is 32 bytes, so multiply by 32
|
||||
AND 03H ; Mask to 0-3
|
||||
RLCA
|
||||
RLCA
|
||||
RLCA
|
||||
RLCA
|
||||
RLCA ; Multiply by 32
|
||||
LD L, A
|
||||
LD H, 0
|
||||
LD DE, BUFF
|
||||
ADD HL, DE ; HL now points to directory entry
|
||||
|
||||
; Copy filename from directory entry to our FCB
|
||||
INC HL ; Skip user number
|
||||
LD DE, FILE_FCB+1 ; Destination
|
||||
LD BC, 11 ; 8+3 filename
|
||||
LDIR
|
||||
|
||||
; Open and process this file
|
||||
CALL PROCESS_FILE
|
||||
|
||||
; Search for next file
|
||||
LD DE, SEARCH_FCB
|
||||
LD C, SNEXT
|
||||
CALL BDOS
|
||||
CP 0FFH
|
||||
JP NZ, FILE_LOOP
|
||||
|
||||
; Done
|
||||
LD DE, MSG_DIVIDER
|
||||
CALL PRTSTR
|
||||
JP BOOT ; Exit to CP/M
|
||||
|
||||
NO_FILES: LD DE, MSG_NOFILES
|
||||
CALL PRTSTR
|
||||
JP BOOT
|
||||
|
||||
;------------------------------------------------------------------------------
|
||||
; Process a VGM file - read header and display info
|
||||
;------------------------------------------------------------------------------
|
||||
|
||||
PROCESS_FILE:
|
||||
; Reset FCB
|
||||
XOR A
|
||||
LD (FILE_FCB), A ; Default drive
|
||||
LD (FILE_FCB+12), A ; Clear extent
|
||||
LD (FILE_FCB+32), A ; Clear current record
|
||||
|
||||
; Open file
|
||||
LD DE, FILE_FCB
|
||||
LD C, OPENF
|
||||
CALL BDOS
|
||||
CP 0FFH
|
||||
RET Z ; Can't open, skip
|
||||
|
||||
; Set DMA to our buffer for first block
|
||||
LD DE, VGMBUF
|
||||
LD C, SETDMA
|
||||
CALL BDOS
|
||||
|
||||
; Read first 128 bytes (header)
|
||||
LD DE, FILE_FCB
|
||||
LD C, READF
|
||||
CALL BDOS
|
||||
OR A
|
||||
JR NZ, READ_DONE ; EOF or error
|
||||
|
||||
; Read second 128 bytes (to allow scanning right after header)
|
||||
LD DE, VGMBUF+128
|
||||
LD C, SETDMA
|
||||
CALL BDOS
|
||||
LD DE, FILE_FCB
|
||||
LD C, READF
|
||||
CALL BDOS
|
||||
|
||||
; Read third 128 bytes
|
||||
LD DE, VGMBUF+256
|
||||
LD C, SETDMA
|
||||
CALL BDOS
|
||||
LD DE, FILE_FCB
|
||||
LD C, READF
|
||||
CALL BDOS
|
||||
|
||||
; Read fourth 128 bytes
|
||||
LD DE, VGMBUF+384
|
||||
LD C, SETDMA
|
||||
CALL BDOS
|
||||
LD DE, FILE_FCB
|
||||
LD C, READF
|
||||
CALL BDOS
|
||||
|
||||
READ_DONE:
|
||||
|
||||
; Restore DMA
|
||||
LD DE, BUFF
|
||||
LD C, SETDMA
|
||||
CALL BDOS
|
||||
|
||||
; Close file
|
||||
LD DE, FILE_FCB
|
||||
LD C, CLOSEF
|
||||
CALL BDOS
|
||||
|
||||
; Check if valid VGM
|
||||
LD HL, VGMBUF
|
||||
LD A, (HL)
|
||||
CP 'V'
|
||||
RET NZ
|
||||
INC HL
|
||||
LD A, (HL)
|
||||
CP 'g'
|
||||
RET NZ
|
||||
INC HL
|
||||
LD A, (HL)
|
||||
CP 'm'
|
||||
RET NZ
|
||||
INC HL
|
||||
LD A, (HL)
|
||||
CP ' '
|
||||
RET NZ
|
||||
|
||||
; Display filename (exactly 8 chars from FCB)
|
||||
LD HL, FILE_FCB+1
|
||||
LD B, 8
|
||||
PRINT_NAME: LD A, (HL)
|
||||
CALL PRTCHR
|
||||
INC HL
|
||||
DJNZ PRINT_NAME
|
||||
|
||||
; Add 2-space gap
|
||||
LD A, ' '
|
||||
CALL PRTCHR
|
||||
LD A, ' '
|
||||
CALL PRTCHR
|
||||
|
||||
#if DEBUG_SUM
|
||||
; Compute and optionally print 512-byte checksum over VGMBUF
|
||||
CALL CALC_SUM512
|
||||
LD A, (DBG_SUM)
|
||||
OR A
|
||||
JR Z, PAD_DONE
|
||||
|
||||
; Print space + [HHLL] + space between filename and chips
|
||||
LD A, ' '
|
||||
CALL PRTCHR
|
||||
LD A, '['
|
||||
CALL PRTCHR
|
||||
LD A, (SUM_HI)
|
||||
CALL PRTHEX8
|
||||
LD A, (SUM_LO)
|
||||
CALL PRTHEX8
|
||||
LD A, ']'
|
||||
CALL PRTCHR
|
||||
LD A, ' '
|
||||
CALL PRTCHR
|
||||
#endif
|
||||
|
||||
PAD_DONE:
|
||||
|
||||
; Check and display chip info
|
||||
CALL CHECK_CHIPS
|
||||
|
||||
; New line
|
||||
CALL CRLF
|
||||
|
||||
RET
|
||||
|
||||
;------------------------------------------------------------------------------
|
||||
; Check which chips are used: hybrid approach
|
||||
; 1. Check header clocks to see which chip types are present
|
||||
; 2. Scan commands to detect multiple instances of same chip type
|
||||
;------------------------------------------------------------------------------
|
||||
|
||||
CHECK_CHIPS:
|
||||
; Initialize chip flags
|
||||
XOR A
|
||||
LD (CHIP_FLAGS), A
|
||||
LD (CHIP_TYPES), A ; Types present from header
|
||||
|
||||
; Check SN76489 clock (4 bytes at 0x0C)
|
||||
LD HL, VGMBUF+VGM_SN76489_CLK
|
||||
LD A, (HL)
|
||||
INC HL
|
||||
OR (HL)
|
||||
INC HL
|
||||
OR (HL)
|
||||
INC HL
|
||||
OR (HL)
|
||||
JR Z, CHK_YM2612_CLK
|
||||
LD A, (CHIP_TYPES)
|
||||
OR 01H ; bit 0 = SN76489 present
|
||||
LD (CHIP_TYPES), A
|
||||
|
||||
CHK_YM2612_CLK:
|
||||
; Check YM2612 clock (4 bytes at 0x2C)
|
||||
LD HL, VGMBUF+VGM_YM2612_CLK
|
||||
LD A, (HL)
|
||||
INC HL
|
||||
OR (HL)
|
||||
INC HL
|
||||
OR (HL)
|
||||
INC HL
|
||||
OR (HL)
|
||||
JR Z, CHK_YM2151_CLK
|
||||
LD A, (CHIP_TYPES)
|
||||
OR 02H ; bit 1 = YM2612 present
|
||||
LD (CHIP_TYPES), A
|
||||
|
||||
CHK_YM2151_CLK:
|
||||
; Check YM2151 clock (4 bytes at 0x30)
|
||||
LD HL, VGMBUF+VGM_YM2151_CLK
|
||||
LD A, (HL)
|
||||
INC HL
|
||||
OR (HL)
|
||||
INC HL
|
||||
OR (HL)
|
||||
INC HL
|
||||
OR (HL)
|
||||
JR Z, CHK_AY_CLK
|
||||
LD A, (CHIP_TYPES)
|
||||
OR 04H ; bit 2 = YM2151 present
|
||||
LD (CHIP_TYPES), A
|
||||
|
||||
CHK_AY_CLK:
|
||||
; Check AY-3-8910 clock (4 bytes at 0x74, only valid in VGM v1.51+)
|
||||
LD HL, VGMBUF+VGM_VERSION
|
||||
LD A, (HL) ; Get low byte of version
|
||||
CP 51H ; Check if >= 0x51 (v1.51)
|
||||
JR C, START_CMD_SCAN ; Skip if < v1.51
|
||||
INC HL
|
||||
LD A, (HL) ; Get high byte
|
||||
CP 01H ; Must be 0x01
|
||||
JR NZ, START_CMD_SCAN ; Skip if not v1.xx
|
||||
|
||||
LD HL, VGMBUF+VGM_AY8910_CLK
|
||||
LD A, (HL)
|
||||
INC HL
|
||||
OR (HL)
|
||||
INC HL
|
||||
OR (HL)
|
||||
INC HL
|
||||
OR (HL)
|
||||
JR Z, START_CMD_SCAN
|
||||
LD A, (CHIP_TYPES)
|
||||
OR 08H ; bit 3 = AY present
|
||||
LD (CHIP_TYPES), A
|
||||
|
||||
START_CMD_SCAN:
|
||||
; Clear AY flags if AY is not present in header
|
||||
LD A, (CHIP_TYPES)
|
||||
BIT 3, A ; Check if AY is present
|
||||
JR NZ, SCAN_CMDS ; If present, continue
|
||||
LD A, (CHIP_FLAGS)
|
||||
AND 3FH ; Clear bits 6 and 7 (AY flags)
|
||||
LD (CHIP_FLAGS), A
|
||||
SCAN_CMDS:
|
||||
; If chip type is present, scan commands to detect multiples
|
||||
; Set base flags from types
|
||||
LD A, (CHIP_TYPES)
|
||||
BIT 0, A
|
||||
JR Z, NO_SN_BASE
|
||||
LD A, (CHIP_FLAGS)
|
||||
OR 01H ; Set SN #1
|
||||
LD (CHIP_FLAGS), A
|
||||
NO_SN_BASE:
|
||||
LD A, (CHIP_TYPES)
|
||||
BIT 1, A
|
||||
JR Z, NO_YM2612_BASE
|
||||
LD A, (CHIP_FLAGS)
|
||||
OR 04H ; Set YM2612 #1
|
||||
LD (CHIP_FLAGS), A
|
||||
NO_YM2612_BASE:
|
||||
LD A, (CHIP_TYPES)
|
||||
BIT 2, A
|
||||
JR Z, NO_YM2151_BASE
|
||||
; Do NOT pre-mark YM2151 as used from the header alone.
|
||||
; YM2151 will only be marked used when a command is seen.
|
||||
NO_YM2151_BASE:
|
||||
; Do NOT pre-mark AY as used from the header alone.
|
||||
; AY will only be marked used when an 0xA0 command is seen.
|
||||
NO_AY_BASE:
|
||||
|
||||
COMPUTE_DATA_START:
|
||||
LD HL, (VGMBUF+VGM_DATAOFF)
|
||||
LD A, H
|
||||
OR L
|
||||
JR NZ, GOT_OFFSET
|
||||
LD HL, 000CH ; Default for VGM < 1.50 (0x40-0x34)
|
||||
GOT_OFFSET: LD DE, VGMBUF+VGM_DATAOFF
|
||||
ADD HL, DE ; HL = VGMBUF + 0x34 + offset
|
||||
|
||||
; Constrain to our 256-byte buffer
|
||||
LD DE, VGMBUF
|
||||
SBC HL, DE ; HL = offset from VGMBUF base
|
||||
ADD HL, DE ; restore HL absolute inside VGMBUF
|
||||
|
||||
; Scan up to 255 commands or until EOD
|
||||
LD C, 255
|
||||
SCAN_LOOP: LD A, (HL)
|
||||
INC HL
|
||||
|
||||
CP VGM_ESD
|
||||
JP Z, SCAN_DONE
|
||||
|
||||
CP VGM_PSG1_W
|
||||
JP NZ, CHK_PSG2
|
||||
LD A, (CHIP_FLAGS)
|
||||
OR 01H ; bit 0 = SN #1
|
||||
LD (CHIP_FLAGS), A
|
||||
INC HL ; Skip data byte
|
||||
JP SCAN_NEXT
|
||||
|
||||
CHK_PSG2: CP VGM_PSG2_W
|
||||
JP NZ, CHK_YM2612
|
||||
LD A, (CHIP_TYPES) ; Only if SN76489 is present
|
||||
BIT 0, A
|
||||
JR Z, SCAN_NEXT_1
|
||||
LD A, (CHIP_FLAGS)
|
||||
OR 02H ; bit 1 = SN #2
|
||||
LD (CHIP_FLAGS), A
|
||||
SCAN_NEXT_1: INC HL
|
||||
JP SCAN_NEXT
|
||||
|
||||
CHK_YM2612: CP VGM_YM26121_W
|
||||
JR Z, GOT_YM2612_1
|
||||
CP VGM_YM26122_W
|
||||
JR Z, GOT_YM2612_1
|
||||
CP VGM_YM26123_W
|
||||
JR Z, GOT_YM2612_2
|
||||
CP VGM_YM26124_W
|
||||
JP NZ, CHK_YM2151
|
||||
GOT_YM2612_2: LD A, (CHIP_TYPES) ; Only if YM2612 is present
|
||||
BIT 1, A
|
||||
JR Z, SCAN_NEXT_2
|
||||
LD A, (CHIP_FLAGS)
|
||||
OR 08H ; bit 3 = YM2612 #2
|
||||
LD (CHIP_FLAGS), A
|
||||
SCAN_NEXT_2: INC HL
|
||||
INC HL ; Skip 2 data bytes
|
||||
JP SCAN_NEXT
|
||||
GOT_YM2612_1: LD A, (CHIP_FLAGS)
|
||||
OR 04H ; bit 2 = YM2612 #1
|
||||
LD (CHIP_FLAGS), A
|
||||
INC HL
|
||||
INC HL
|
||||
JP SCAN_NEXT
|
||||
|
||||
CHK_YM2151: CP VGM_YM21511_W
|
||||
JR Z, GOT_YM2151_1
|
||||
CP VGM_YM21512_W
|
||||
JP NZ, CHK_AY
|
||||
LD A, (CHIP_TYPES) ; Only if YM2151 is present
|
||||
BIT 2, A
|
||||
JR Z, SCAN_NEXT_3
|
||||
LD A, (CHIP_FLAGS)
|
||||
OR 20H ; bit 5 = YM2151 #2
|
||||
LD (CHIP_FLAGS), A
|
||||
SCAN_NEXT_3: INC HL
|
||||
INC HL
|
||||
JP SCAN_NEXT
|
||||
GOT_YM2151_1: LD A, (CHIP_FLAGS)
|
||||
OR 10H ; bit 4 = YM2151 #1
|
||||
LD (CHIP_FLAGS), A
|
||||
INC HL
|
||||
INC HL
|
||||
JP SCAN_NEXT
|
||||
|
||||
CHK_AY: CP VGM_AY_W
|
||||
JP NZ, CHK_OPL2
|
||||
LD A, (CHIP_TYPES) ; Only if AY is present
|
||||
BIT 3, A
|
||||
JR Z, SCAN_SKIP_AY ; Skip if AY not present in header
|
||||
LD A, (HL) ; Get register/chip byte
|
||||
BIT 7, A ; Bit 7 = chip 2?
|
||||
JR Z, GOT_AY1
|
||||
LD A, (CHIP_FLAGS)
|
||||
OR 80H ; bit 7 = AY #2
|
||||
LD (CHIP_FLAGS), A
|
||||
JR SCAN_SKIP_AY
|
||||
GOT_AY1: LD A, (CHIP_FLAGS)
|
||||
OR 40H ; bit 6 = AY #1
|
||||
LD (CHIP_FLAGS), A
|
||||
SCAN_SKIP_AY: INC HL
|
||||
INC HL ; Skip 2 data bytes
|
||||
JP SCAN_NEXT
|
||||
|
||||
CHK_OPL2: CP VGM_OPL2_W
|
||||
JP NZ, CHK_OPL3
|
||||
; Mark OPL2 present
|
||||
LD A, (CHIP_TYPES)
|
||||
OR 010H ; bit 4 = OPL2
|
||||
LD (CHIP_TYPES), A
|
||||
INC HL ; skip register
|
||||
INC HL ; skip data
|
||||
JP SCAN_NEXT
|
||||
|
||||
CHK_OPL3: CP VGM_OPL31_W
|
||||
JR Z, GOT_OPL3
|
||||
CP VGM_OPL32_W
|
||||
JP NZ, CHK_WAIT
|
||||
GOT_OPL3: ; Mark OPL3 present
|
||||
LD A, (CHIP_TYPES)
|
||||
OR 020H ; bit 5 = OPL3
|
||||
LD (CHIP_TYPES), A
|
||||
INC HL ; skip register
|
||||
INC HL ; skip data
|
||||
JP SCAN_NEXT
|
||||
|
||||
CHK_WAIT: CP VGM_WNS
|
||||
JR NZ, CHK_W735
|
||||
INC HL
|
||||
INC HL ; Skip 2-byte wait value
|
||||
JP SCAN_NEXT
|
||||
|
||||
CHK_W735: CP VGM_W735
|
||||
JR Z, SCAN_NEXT
|
||||
CP VGM_W882
|
||||
JR Z, SCAN_NEXT
|
||||
|
||||
; Unknown command or short wait 0x70-0x7F -> just continue
|
||||
CP 70H
|
||||
JR C, SCAN_NEXT
|
||||
CP 80H
|
||||
JR NC, SCAN_NEXT
|
||||
|
||||
SCAN_NEXT: DEC C
|
||||
JP NZ, SCAN_LOOP
|
||||
|
||||
SCAN_DONE: ; Display chips found
|
||||
LD B, 0 ; Chip counter
|
||||
LD A, (CHIP_FLAGS)
|
||||
LD C, A ; Save flags
|
||||
|
||||
; SN76489
|
||||
AND 03H ; bits 0-1
|
||||
JP Z, NO_SN
|
||||
LD A, B
|
||||
OR A
|
||||
CALL NZ, PRINT_COMMA
|
||||
LD A, C
|
||||
AND 03H
|
||||
CP 03H ; Both chips?
|
||||
JR Z, SN_DUAL
|
||||
LD DE, MSG_SN76489
|
||||
CALL PRTSTR
|
||||
JR SN_DONE
|
||||
SN_DUAL: LD DE, MSG_SN76489X2
|
||||
CALL PRTSTR
|
||||
SN_DONE: INC B
|
||||
NO_SN:
|
||||
; YM2612
|
||||
LD A, C
|
||||
AND 0CH ; bits 2-3
|
||||
JR Z, NO_YM2612
|
||||
LD A, B
|
||||
OR A
|
||||
CALL NZ, PRINT_COMMA
|
||||
LD A, C
|
||||
AND 0CH
|
||||
CP 0CH ; Both chips?
|
||||
JR Z, YM2612_DUAL
|
||||
LD DE, MSG_YM2612
|
||||
CALL PRTSTR
|
||||
JR YM2612_DONE
|
||||
YM2612_DUAL: LD DE, MSG_YM2612X2
|
||||
CALL PRTSTR
|
||||
YM2612_DONE: INC B
|
||||
NO_YM2612:
|
||||
; YM2151
|
||||
LD A, C
|
||||
AND 30H ; bits 4-5
|
||||
JR Z, NO_YM2151
|
||||
LD A, B
|
||||
OR A
|
||||
CALL NZ, PRINT_COMMA
|
||||
LD A, C
|
||||
AND 30H
|
||||
CP 30H ; Both chips?
|
||||
JR Z, YM2151_DUAL
|
||||
LD DE, MSG_YM2151
|
||||
CALL PRTSTR
|
||||
JR YM2151_DONE
|
||||
YM2151_DUAL: LD DE, MSG_YM2151X2
|
||||
CALL PRTSTR
|
||||
YM2151_DONE: INC B
|
||||
NO_YM2151:
|
||||
; OPL2 (YM3812)
|
||||
LD A, (CHIP_TYPES)
|
||||
BIT 4, A
|
||||
JR Z, NO_OPL2
|
||||
LD A, B
|
||||
OR A
|
||||
CALL NZ, PRINT_COMMA
|
||||
LD DE, MSG_OPL2
|
||||
CALL PRTSTR
|
||||
INC B
|
||||
NO_OPL2:
|
||||
; OPL3 (YMF262)
|
||||
LD A, (CHIP_TYPES)
|
||||
BIT 5, A
|
||||
JR Z, NO_OPL3
|
||||
LD A, B
|
||||
OR A
|
||||
CALL NZ, PRINT_COMMA
|
||||
LD DE, MSG_OPL3
|
||||
CALL PRTSTR
|
||||
INC B
|
||||
NO_OPL3:
|
||||
; AY-3-8910
|
||||
LD A, C
|
||||
AND 0C0H ; bits 6-7
|
||||
JR Z, NO_AY
|
||||
LD A, B
|
||||
OR A
|
||||
CALL NZ, PRINT_COMMA
|
||||
LD A, C
|
||||
AND 0C0H
|
||||
CP 0C0H ; Both chips?
|
||||
JR Z, AY_DUAL
|
||||
LD DE, MSG_AY8910
|
||||
CALL PRTSTR
|
||||
JR AY_DONE
|
||||
AY_DUAL: LD DE, MSG_AY8910X2
|
||||
CALL PRTSTR
|
||||
AY_DONE: INC B
|
||||
NO_AY:
|
||||
; None
|
||||
LD A, B
|
||||
OR A
|
||||
RET NZ
|
||||
LD DE, MSG_UNKNOWN
|
||||
CALL PRTSTR
|
||||
RET
|
||||
|
||||
PRINT_COMMA: LD A, ','
|
||||
CALL PRTCHR
|
||||
LD A, ' '
|
||||
CALL PRTCHR
|
||||
RET
|
||||
|
||||
|
||||
;------------------------------------------------------------------------------
|
||||
; Parse CP/M command tail for debug flag (D or /D) -> sets DBG_SUM
|
||||
;------------------------------------------------------------------------------
|
||||
|
||||
PARSE_DEBUG: LD HL, BUFF ; CP/M command tail buffer
|
||||
LD A, (HL) ; length byte
|
||||
OR A
|
||||
RET Z ; empty tail, no flags
|
||||
|
||||
LD B, A ; B = remaining chars
|
||||
INC HL ; HL -> first character
|
||||
|
||||
PD_LOOP: LD A, (HL)
|
||||
CP ' ' ; skip spaces
|
||||
JR Z, PD_NEXT
|
||||
|
||||
CP '/'
|
||||
JR Z, PD_SLASH
|
||||
|
||||
CP 'D'
|
||||
JR Z, PD_SET
|
||||
CP 'd'
|
||||
JR Z, PD_SET
|
||||
JR PD_NEXT
|
||||
|
||||
PD_SLASH: ; look at next char for D/d
|
||||
INC HL
|
||||
DJNZ PD_CHECK2
|
||||
RET
|
||||
|
||||
PD_CHECK2: LD A, (HL)
|
||||
CP 'D'
|
||||
JR Z, PD_SET
|
||||
CP 'd'
|
||||
JR Z, PD_SET
|
||||
JR PD_NEXT_CONT
|
||||
|
||||
PD_NEXT: INC HL
|
||||
PD_NEXT_CONT: DJNZ PD_LOOP
|
||||
RET
|
||||
|
||||
PD_SET: LD A, 1
|
||||
LD (DBG_SUM), A
|
||||
RET
|
||||
|
||||
|
||||
;------------------------------------------------------------------------------
|
||||
; 512-byte checksum over VGMBUF (simple 16-bit sum)
|
||||
;------------------------------------------------------------------------------
|
||||
|
||||
CALC_SUM512: PUSH AF
|
||||
PUSH BC
|
||||
PUSH DE
|
||||
PUSH HL
|
||||
|
||||
LD HL, VGMBUF
|
||||
LD DE, 0200H ; 512 bytes
|
||||
XOR A
|
||||
LD (SUM_LO), A
|
||||
LD (SUM_HI), A
|
||||
|
||||
SUM_LOOP: LD A, (HL)
|
||||
INC HL
|
||||
LD B, A
|
||||
LD A, (SUM_LO)
|
||||
ADD A, B
|
||||
LD (SUM_LO), A
|
||||
LD A, (SUM_HI)
|
||||
ADC A, 0
|
||||
LD (SUM_HI), A
|
||||
DEC DE
|
||||
LD A, D
|
||||
OR E
|
||||
JR NZ, SUM_LOOP
|
||||
|
||||
POP HL
|
||||
POP DE
|
||||
POP BC
|
||||
POP AF
|
||||
RET
|
||||
|
||||
;------------------------------------------------------------------------------
|
||||
; Print A as two hex digits
|
||||
;------------------------------------------------------------------------------
|
||||
|
||||
PRTHEX8: PUSH AF
|
||||
PUSH BC
|
||||
|
||||
LD B, A ; Save original byte in B
|
||||
SRL A
|
||||
SRL A
|
||||
SRL A
|
||||
SRL A ; High nibble
|
||||
CALL PRTHEX_NIB
|
||||
|
||||
LD A, B
|
||||
AND 0FH ; Low nibble
|
||||
CALL PRTHEX_NIB
|
||||
|
||||
POP BC
|
||||
POP AF
|
||||
RET
|
||||
|
||||
PRTHEX_NIB: CP 0AH
|
||||
JR C, HEX_DIGIT
|
||||
ADD A, 'A' - 10
|
||||
JR PRTHEX_OUT
|
||||
HEX_DIGIT: ADD A, '0'
|
||||
PRTHEX_OUT: CALL PRTCHR
|
||||
RET
|
||||
|
||||
|
||||
;------------------------------------------------------------------------------
|
||||
; Print string pointed to by DE (terminated by 0)
|
||||
;------------------------------------------------------------------------------
|
||||
|
||||
PRTSTR: LD A, (DE)
|
||||
OR A
|
||||
RET Z
|
||||
CALL PRTCHR
|
||||
INC DE
|
||||
JR PRTSTR
|
||||
|
||||
;------------------------------------------------------------------------------
|
||||
; Print character in A
|
||||
;------------------------------------------------------------------------------
|
||||
|
||||
PRTCHR: PUSH BC
|
||||
PUSH DE
|
||||
PUSH HL
|
||||
LD E, A
|
||||
LD C, 2
|
||||
CALL BDOS
|
||||
POP HL
|
||||
POP DE
|
||||
POP BC
|
||||
RET
|
||||
|
||||
;------------------------------------------------------------------------------
|
||||
; Print CR/LF
|
||||
;------------------------------------------------------------------------------
|
||||
|
||||
CRLF: LD A, CR
|
||||
CALL PRTCHR
|
||||
LD A, LF
|
||||
CALL PRTCHR
|
||||
RET
|
||||
|
||||
;------------------------------------------------------------------------------
|
||||
; Messages
|
||||
;------------------------------------------------------------------------------
|
||||
|
||||
MSG_HEADER: .DB CR, LF
|
||||
.DB "VGM Music Chip Scanner v1.1 - 06-Dec-2025", CR, LF
|
||||
.DB "(c)2025 Joao Miguel Duraes - MIT License", CR, LF
|
||||
.DB CR, LF
|
||||
.DB "Filename Chips Used", CR, LF
|
||||
.DB 0
|
||||
|
||||
MSG_DIVIDER: .DB "======== =====================", CR, LF
|
||||
.DB 0
|
||||
|
||||
MSG_NOFILES: .DB "No .VGM files found in current directory", CR, LF
|
||||
.DB 0
|
||||
|
||||
MSG_SN76489: .DB "SN76489", 0
|
||||
MSG_SN76489X2: .DB "2xSN76489", 0
|
||||
MSG_YM2612: .DB "YM2612", 0
|
||||
MSG_YM2612X2: .DB "2xYM2612", 0
|
||||
MSG_YM2151: .DB "YM2151", 0
|
||||
MSG_YM2151X2: .DB "2xYM2151", 0
|
||||
MSG_OPL2: .DB "YM3812", 0
|
||||
MSG_OPL3: .DB "YMF262", 0
|
||||
MSG_AY8910: .DB "AY-3-8910", 0
|
||||
MSG_AY8910X2: .DB "2xAY-3-8910", 0
|
||||
MSG_UNKNOWN: .DB "Unknown/None", 0
|
||||
|
||||
;------------------------------------------------------------------------------
|
||||
; Data area
|
||||
;------------------------------------------------------------------------------
|
||||
|
||||
; Search FCB for *.VGM
|
||||
SEARCH_FCB: .DB 0 ; Default drive
|
||||
.DB '?','?','?','?','?','?','?','?' ; Filename (wildcard)
|
||||
.DB 'V','G','M' ; Extension
|
||||
.FILL 24, 0 ; Rest of FCB
|
||||
|
||||
; FCB for opening files
|
||||
FILE_FCB: .DB 0 ; Default drive
|
||||
.FILL 35, 0 ; Rest of FCB
|
||||
|
||||
DIR_CODE: .DB 0 ; Directory code from search
|
||||
CHIP_FLAGS: .DB 0 ; Detected chip flags
|
||||
; bit0 SN76489 #1, bit1 SN76489 #2
|
||||
; bit2 YM2612 #1, bit3 YM2612 #2
|
||||
; bit4 YM2151 #1, bit5 YM2151 #2
|
||||
; bit6 AY #1, bit7 AY #2
|
||||
CHIP_TYPES: .DB 0 ; Chip types present from header
|
||||
; bit0 SN76489, bit1 YM2612
|
||||
; bit2 YM2151, bit3 AY-3-8910
|
||||
; bit4 OPL2 (YM3812), bit5 OPL3 (YMF262)
|
||||
|
||||
SUM_LO: .DB 0 ; Low byte of 16-bit checksum
|
||||
SUM_HI: .DB 0 ; High byte of 16-bit checksum
|
||||
DBG_SUM: .DB 0 ; 0=disable checksum print, non-zero=enable
|
||||
|
||||
; Buffer for VGM header + first data sector (256 bytes)
|
||||
VGMBUF: .FILL 512, 0
|
||||
|
||||
; Stack space
|
||||
.FILL 64, 0
|
||||
STACK: .DW 0
|
||||
|
||||
.END
|
||||
88
Source/Apps/VGM/vgminfo.txt
Normal file
88
Source/Apps/VGM/vgminfo.txt
Normal file
@@ -0,0 +1,88 @@
|
||||
VGM File Info Scanner for CP/M
|
||||
===============================
|
||||
|
||||
A utility that scans all .VGM files in the current directory and
|
||||
displays a table showing which audio chips each file uses.
|
||||
|
||||
Version 1.1 uses a hybrid detection approach:
|
||||
- Checks VGM header clock values to detect chip types
|
||||
- Scans VGM command stream to detect multiple instances of same chip type
|
||||
|
||||
Usage:
|
||||
------
|
||||
|
||||
Simply run the program from a directory containing VGM files:
|
||||
|
||||
VGMINFO
|
||||
|
||||
No command line arguments are needed. The program will automatically scan
|
||||
all .VGM files in the current directory.
|
||||
|
||||
Output:
|
||||
-------
|
||||
|
||||
The program displays a formatted table with two columns:
|
||||
- Filename: The name of the VGM file
|
||||
- Chips Used: A comma-separated list of audio chips used in that file
|
||||
|
||||
Supported Chips:
|
||||
----------------
|
||||
|
||||
The program can detect the following audio chips:
|
||||
- SN76489 (PSG - Programmable Sound Generator)
|
||||
- YM2612 (FM Synthesis chip used in Sega Genesis/Mega Drive)
|
||||
- YM2151 (OPM - FM Operator Type-M)
|
||||
- YM3812 (OPL2 - FM synthesis chip)
|
||||
- YMF262 (OPL3 - Enhanced FM synthesis chip)
|
||||
- AY-3-8910 (PSG used in many arcade and home computers)
|
||||
|
||||
Example Output:
|
||||
---------------
|
||||
|
||||
VGM Music Chip Scanner v1.1
|
||||
|
||||
Filename Chips Used
|
||||
======== =====================
|
||||
BGM 2xAY-3-8910
|
||||
ENDING AY-3-8910
|
||||
INCHINA YM2612
|
||||
SHIRAKAW SN76489, YM2612
|
||||
STARTDEM 2xSN76489, AY-3-8910
|
||||
WONDER01 2xSN76489
|
||||
======== =====================
|
||||
|
||||
Notes:
|
||||
------
|
||||
|
||||
- The program reads the VGM file headers and scans up to 255 commands from
|
||||
the VGM data stream for accurate chip detection.
|
||||
|
||||
- Files that don't have a valid VGM header are silently skipped.
|
||||
|
||||
- Chip detection uses a hybrid approach:
|
||||
* VGM header clock values (offsets 0x0C, 0x2C, 0x30, 0x74) determine
|
||||
which chip types are present
|
||||
* Command stream scanning detects multiple instances (e.g., "2xSN76489")
|
||||
|
||||
- AY-3-8910 clock detection respects VGM version - only checked for v1.51+
|
||||
to avoid false positives from invalid header data in older VGM versions.
|
||||
|
||||
Building:
|
||||
---------
|
||||
|
||||
To rebuild from source:
|
||||
|
||||
build_vgminfo.cmd
|
||||
|
||||
Or manually with TASM:
|
||||
|
||||
tasm -t80 -b -g3 -fFF vgminfo.asm vgminfo.com
|
||||
|
||||
Author:
|
||||
-------
|
||||
|
||||
Created for RomWBW/CP/M systems
|
||||
Based on VGM format specification from vgmrips.net
|
||||
|
||||
An AI LLM was utilized in the creation of this
|
||||
application.
|
||||
@@ -239,7 +239,7 @@ IDBIO:
|
||||
;
|
||||
IDBIO1:
|
||||
; Check for RomWBW (HBIOS)
|
||||
LD HL,(0FFFEH) ; HL := HBIOS ident location
|
||||
LD HL,(0FFFCH) ; HL := HBIOS ident location
|
||||
LD A,'W' ; First byte of ident
|
||||
CP (HL) ; Compare
|
||||
JR NZ,IDBIO2 ; Not HBIOS
|
||||
|
||||
@@ -180,7 +180,7 @@ IDBIO:
|
||||
;
|
||||
IDBIO1:
|
||||
; Check for RomWBW (HBIOS)
|
||||
LD HL,(0FFFEH) ; HL := HBIOS ident location
|
||||
LD HL,(0FFFCH) ; HL := HBIOS ident location
|
||||
LD A,'W' ; First byte of ident
|
||||
CP (HL) ; Compare
|
||||
JR NZ,IDBIO2 ; Not HBIOS
|
||||
|
||||
@@ -175,7 +175,7 @@ IDBIO:
|
||||
;
|
||||
IDBIO1:
|
||||
; Check for RomWBW (HBIOS)
|
||||
LD HL,(0FFFEH) ; HL := HBIOS ident location
|
||||
LD HL,(0FFFCH) ; HL := HBIOS ident location
|
||||
LD A,'W' ; First byte of ident
|
||||
CP (HL) ; Compare
|
||||
JR NZ,IDBIO2 ; Not HBIOS
|
||||
|
||||
@@ -273,7 +273,7 @@ IDBIO:
|
||||
;
|
||||
IDBIO1:
|
||||
; Check for RomWBW (HBIOS)
|
||||
LD HL,(0FFFEH) ; HL := HBIOS ident location
|
||||
LD HL,(0FFFCH) ; HL := HBIOS ident location
|
||||
LD A,'W' ; First byte of ident
|
||||
CP (HL) ; Compare
|
||||
JR NZ,IDBIO2 ; Not HBIOS
|
||||
|
||||
@@ -38,6 +38,9 @@
|
||||
; 2024-12-17 [MAP] Added new /B=opt feaure to assign drives
|
||||
; 2024-12-21 [MAP] Added CBIOS heap estimation to /B to prevent
|
||||
; overflow when the drives are finally added
|
||||
; 2025-07-19 [D?N] Support for native USB drivers
|
||||
; 2025-08-09 [WBW] Support for ESPSD driver
|
||||
; 2025-11-10 [WBW] Support for SCSI driver
|
||||
;_______________________________________________________________________________
|
||||
;
|
||||
; ToDo:
|
||||
@@ -188,7 +191,7 @@ init:
|
||||
ldir ; do the copy
|
||||
;
|
||||
; determine end of CBIOS (assume HBIOS for now)
|
||||
ld hl,($FFFE) ; get proxy start address
|
||||
ld hl,($FFFC) ; get proxy start address
|
||||
ld (bioend),hl ; save as CBIOS end address
|
||||
;
|
||||
; check for UNA (UBIOS)
|
||||
@@ -1179,8 +1182,9 @@ makdphwbw: ; determine appropriate dpb (WBW mode, unit number in A)
|
||||
jr makdph0 ; jump ahead
|
||||
makdph00:
|
||||
ld e,MID_FD144 ; assume floppy
|
||||
cp DIODEV_FD ; floppy?
|
||||
jr z,makdph0 ; yes, jump ahead
|
||||
;cp DIODEV_FD ; floppy?
|
||||
bit 7,c ; floppy?
|
||||
jr nz,makdph0 ; yes, jump ahead
|
||||
ld e,MID_RF ; assume ram floppy
|
||||
cp DIODEV_RF ; ram floppy?
|
||||
jr z,makdph0 ; yes, jump ahead
|
||||
@@ -1560,7 +1564,7 @@ drvmap:
|
||||
jr nz,drvmapu ; do UNA mode drvmap
|
||||
;
|
||||
; determine device code by scanning for string
|
||||
ld b,16 ; device table always has 16 entries
|
||||
ld b,devcnt ; number of entries in devtbl
|
||||
ld c,0 ; c is used to track table entry num
|
||||
ld de,tmpstr ; de points to specified device name
|
||||
ld hl,devtbl ; hl points to first entry of devtbl
|
||||
@@ -1826,7 +1830,7 @@ prtdev:
|
||||
rst 08 ; call hbios, D := device, E := unit
|
||||
push de ; save results
|
||||
ld a,d ; device to A
|
||||
and $0F ; mask out undesired bits
|
||||
and $1F ; mask out undesired bits
|
||||
push hl ; save HL
|
||||
add a,a ; multiple A by two for word table
|
||||
ld hl,devtbl ; point to start of device name table
|
||||
@@ -2427,6 +2431,7 @@ devtbl: ; device table
|
||||
.dw dev04, dev05, dev06, dev07
|
||||
.dw dev08, dev09, dev10, dev11
|
||||
.dw dev12, dev13, dev14, dev15
|
||||
.dw dev16, dev17, dev18
|
||||
;
|
||||
devunk .db "?",0
|
||||
dev00 .db "MD",0
|
||||
@@ -2444,9 +2449,12 @@ dev11 .db "IMM",0
|
||||
dev12 .db "SYQ",0
|
||||
dev13 .db "CHUSB",0
|
||||
dev14 .db "CHSD",0
|
||||
dev15 .equ devunk
|
||||
dev15 .db "USB",0
|
||||
dev16 .db "ESPSD",0
|
||||
dev17 .db "SCSI",0
|
||||
dev18 .equ devunk
|
||||
;
|
||||
devcnt .equ 10 ; 10 devices defined
|
||||
devcnt .equ 19 ; 19 device types defined
|
||||
;
|
||||
udevram .db "RAM",0
|
||||
udevrom .db "ROM",0
|
||||
@@ -2464,13 +2472,13 @@ stack .equ $ ; stack top
|
||||
; Messages
|
||||
;
|
||||
indent .db " ",0
|
||||
msgban1 .db "ASSIGN v2.0 for RomWBW CP/M ",0
|
||||
msgban1 .db "ASSIGN v2.3 for RomWBW CP/M ",0
|
||||
msg22 .db "2.2",0
|
||||
msg3 .db "3",0
|
||||
msbban2 .db ", 21-Dec-2024",0
|
||||
msbban2 .db ",10-Dec-2025",0
|
||||
msghb .db " (HBIOS Mode)",0
|
||||
msgub .db " (UBIOS Mode)",0
|
||||
msgban3 .db "Copyright 2024, Wayne Warthen, GNU GPL v3",0
|
||||
msgban3 .db "Copyright 2025, Wayne Warthen, GNU GPL v3",0
|
||||
msguse .db "Usage: ASSIGN D:[=[{D:|<device>[<unitnum>]:[<slicenum>]}]][,...]",13,10
|
||||
.db " ex. ASSIGN (display all active assignments)",13,10
|
||||
.db " ASSIGN /? (display version and usage)",13,10
|
||||
|
||||
@@ -11,7 +11,8 @@
|
||||
; ----------------
|
||||
; 0.1 - Initial Version written by Mark Pruden
|
||||
; 0.2 - Added support for /v (verify) option.
|
||||
; 0.3 - refresh CP/M disk buffers after completion
|
||||
; 0.3 - Refresh CP/M disk buffers after completion
|
||||
; 0.4 - Correct slice fit within partition calculation
|
||||
; ----------------
|
||||
;
|
||||
.ORG 100H
|
||||
@@ -273,7 +274,7 @@ exit:
|
||||
; =========================================
|
||||
;
|
||||
msg_welcome:
|
||||
.DB "CopySlice v0.3 (RomWBW) March 2025 - M.Pruden", 13, 10, 0
|
||||
.DB "CopySlice v0.4 (RomWBW) December 2025 - M.Pruden", 13, 10, 0
|
||||
msg_overite_partition:
|
||||
.DB 13,10
|
||||
.DB "Warning: Copying to Slice 0 of hd512 media, "
|
||||
@@ -951,36 +952,36 @@ slicecalc3:
|
||||
|
||||
; add sps once again, to get Required (upper sector) needed
|
||||
add hl, bc
|
||||
JR NC, slicecalc4
|
||||
jr nc, slicecalc4
|
||||
inc de
|
||||
|
||||
slicecalc4:
|
||||
; DE : HL has the total Sector requirement
|
||||
|
||||
; subtract the total Media / Partition Sixe from the Capcity
|
||||
; we are not interested in the result, just the C Flag
|
||||
;
|
||||
or a ; clear cary flag
|
||||
;
|
||||
ld c, (ix + off_lbasize +0) ; capacity LSW
|
||||
ld b, (ix + off_lbasize +1) ; capacity LSW
|
||||
sbc hl, bc ; Requirement - Capacity LSW
|
||||
;
|
||||
ex de, hl ; Requirement MSW
|
||||
ld c, (ix + off_lbasize +2) ; capacity MSW
|
||||
ld b, (ix + off_lbasize +3) ; capacity MSW
|
||||
sbc hl, bc ; Requirement - Capacity MSW
|
||||
|
||||
; pop Sector Offset
|
||||
; de:hl has the required number of sectors (on media) for the slice
|
||||
push de ; save dsk_req (msw)
|
||||
push hl ; save dsk_req (lsw)
|
||||
;
|
||||
; check dsk_capacity >= cap_required, CF set on overflow
|
||||
; no need to save actual result
|
||||
or a ; clear carry for sbc
|
||||
ld l, (ix + off_lbasize + 0) ; capacity LSW
|
||||
ld h, (ix + off_lbasize + 1) ; capacity LSW
|
||||
pop bc ; required lsw
|
||||
sbc hl, bc ; capacity - required (lsw)
|
||||
ld l, (ix + off_lbasize + 2) ; capacity MSW
|
||||
ld h, (ix + off_lbasize + 3) ; capacity MSW
|
||||
pop bc ; required msw
|
||||
sbc hl, bc ; capacity - required (msw)
|
||||
;
|
||||
; restore starting offset sector
|
||||
pop de
|
||||
pop hl
|
||||
|
||||
; Require - Capacity - generates Cary if Capity > Require
|
||||
JR C, slicecalc5 ; C -> Require - Capacity : Require <= Capacity
|
||||
;
|
||||
; capacity - required -> generates no carry if capacity >= requirement
|
||||
jr nc, slicecalc5 ; if we have enough capacity
|
||||
or 0FFh ; otherwise signal not enough capacity
|
||||
RET
|
||||
ret
|
||||
|
||||
slicecalc5:
|
||||
|
||||
; add lba offset to DEHL to get slice offset, commented code above
|
||||
ld c, (ix + off_lbaoffset+0)
|
||||
ld b, (ix + off_lbaoffset+1)
|
||||
|
||||
@@ -88,6 +88,7 @@ History
|
||||
* v 0.1 Initial Release
|
||||
* v 0.2 Added the /v command option to read and verify after write
|
||||
* v 0.3 Refresh CP/M disk buffers after completion
|
||||
* v 0.4 Correct slice fit within partition calculation
|
||||
|
||||
Future
|
||||
------
|
||||
|
||||
@@ -29,7 +29,7 @@ bf_sysres_int .equ $00 ; reset hbios internal
|
||||
bf_sysres_warm .equ $01 ; warm start (restart boot loader)
|
||||
bf_sysres_cold .equ $02 ; cold start
|
||||
;
|
||||
ident .equ $FFFE ; loc of RomWBW HBIOS ident ptr
|
||||
ident .equ $FFFC ; loc of RomWBW HBIOS ident ptr
|
||||
;
|
||||
;=======================================================================
|
||||
;
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,299 +1,299 @@
|
||||
;==============================================================================
|
||||
; REBOOT - Allows the user to Cold or Warm Boot the RomWBW System
|
||||
; Version 1.0 12-October-2024
|
||||
;==============================================================================
|
||||
;
|
||||
; Author: MartinR (October 2024)
|
||||
; Based **very heavily** on code by Wayne Warthen (wwarthen@gmail.com)
|
||||
;______________________________________________________________________________
|
||||
;
|
||||
; Usage:
|
||||
; REBOOT [/C] [/W] [/?]
|
||||
; ex: REBOOT Display version and usage
|
||||
; REBOOT /? Display version and usage
|
||||
; REBOOT /C Cold boot RomWBW system
|
||||
; REBOOT /W Warm boot RomWBW system
|
||||
;
|
||||
; Operation:
|
||||
; Cold or warm boots a RomWBW system depending on the user option selected.
|
||||
;
|
||||
; This code will only execute on a Z80 CPU (or derivitive)
|
||||
;
|
||||
; This source code assembles with TASM V3.2 under Windows-11 using the
|
||||
; following command line:
|
||||
; tasm -80 -g3 -l REBOOT.ASM REBOOT.COM
|
||||
; ie: Z80 CPU; output format 'binary' named .COM (rather than .OBJ)
|
||||
; and includes a symbol table as part of the listing file.
|
||||
;______________________________________________________________________________
|
||||
;
|
||||
; Change Log:
|
||||
; 2024-09-11 [WBW] Release of RomWBW CPU Speed Selector v1.0 used as the basis
|
||||
; 2024-10-12 [MR ] Initial release of version 1.0
|
||||
;______________________________________________________________________________
|
||||
;
|
||||
; Include Files
|
||||
;
|
||||
#include "../../ver.inc" ; Used for building RomWBW
|
||||
#include "../../HBIOS/hbios.inc"
|
||||
|
||||
;#include "ver.inc" ; Used for testing purposes....
|
||||
;#include "hbios.inc" ; ....during code development
|
||||
;
|
||||
;===============================================================================
|
||||
;
|
||||
; General operational equates (should not requre adjustment)
|
||||
;
|
||||
stksiz .equ $40 ; Working stack size
|
||||
;
|
||||
restart .equ $0000 ; CP/M restart vector
|
||||
bdos .equ $0005 ; BDOS invocation vector
|
||||
;
|
||||
bf_sysreset .equ $F0 ; restart system
|
||||
bf_sysres_int .equ $00 ; reset hbios internal
|
||||
bf_sysres_warm .equ $01 ; warm start (restart boot loader)
|
||||
bf_sysres_cold .equ $02 ; cold start
|
||||
;
|
||||
ident .equ $FFFE ; loc of RomWBW HBIOS ident ptr
|
||||
;
|
||||
;===============================================================================
|
||||
;
|
||||
.org $0100 ; standard CP/M TPA executable
|
||||
;
|
||||
; setup stack (save old value)
|
||||
ld (stksav),sp ; save stack
|
||||
ld sp,stack ; set new stack
|
||||
;
|
||||
call crlf
|
||||
ld de,str_banner ; banner
|
||||
call prtstr
|
||||
;
|
||||
; initialization
|
||||
call init ; initialize
|
||||
jr nz,exit ; abort if init fails
|
||||
;
|
||||
call main ; do the real work
|
||||
;
|
||||
exit:
|
||||
; clean up and return to command processor
|
||||
call crlf ; formatting
|
||||
ld sp,(stksav) ; restore stack
|
||||
jp restart ; return to CP/M via restart
|
||||
;
|
||||
;
|
||||
;===============================================================================
|
||||
; Main Program
|
||||
;===============================================================================
|
||||
;
|
||||
; Initialization
|
||||
;
|
||||
init:
|
||||
; check for UNA (UBIOS)
|
||||
ld a,($FFFD) ; fixed location of UNA API vector
|
||||
cp $C3 ; jp instruction?
|
||||
jr nz,initwbw ; if not, not UNA
|
||||
ld hl,($FFFE) ; get jp address
|
||||
ld a,(hl) ; get byte at target address
|
||||
cp $FD ; first byte of UNA push ix instruction
|
||||
jr nz,initwbw ; if not, not UNA
|
||||
inc hl ; point to next byte
|
||||
ld a,(hl) ; get next byte
|
||||
cp $E5 ; second byte of UNA push ix instruction
|
||||
jr nz,initwbw ; if not, not UNA
|
||||
jp err_una ; UNA not supported
|
||||
;
|
||||
initwbw:
|
||||
; get location of config data and verify integrity
|
||||
ld hl,(ident) ; HL := adr or RomWBW HBIOS ident
|
||||
ld a,(hl) ; get first byte of RomWBW marker
|
||||
cp 'W' ; match?
|
||||
jp nz,err_inv ; abort with invalid config block
|
||||
inc hl ; next byte (marker byte 2)
|
||||
ld a,(hl) ; load it
|
||||
cp ~'W' ; match?
|
||||
jp nz,err_inv ; abort with invalid config block
|
||||
inc hl ; next byte (major/minor version)
|
||||
ld a,(hl) ; load it
|
||||
cp rmj << 4 | rmn ; match?
|
||||
jp nz,err_ver ; abort with invalid os version
|
||||
;
|
||||
initz:
|
||||
; initialization complete
|
||||
xor a ; signal success
|
||||
ret ; return
|
||||
;
|
||||
;
|
||||
;
|
||||
main:
|
||||
; skip to start of first command line parameter
|
||||
ld ix,$0081 ; point to start of parm area (past length byte)
|
||||
call nonblank ; skip to next non-blank char
|
||||
cp '/' ; option prefix?
|
||||
jr nz,usage ; display help info & exit if nothing to do
|
||||
;
|
||||
; process any options
|
||||
inc ix ; fetch next character and process
|
||||
ld a,(ix)
|
||||
call upcase ; ensure it's an upper case character
|
||||
cp 'C' ; if it's a 'C' then
|
||||
jr z,cboot ; do a cold boot.
|
||||
cp 'W' ; if it's a 'W' then
|
||||
jr z,wboot ; do a warm boot.
|
||||
cp '?' ; if it's a '?' then
|
||||
jr z,usage ; display usage info and exit.
|
||||
jr err_parm ; or not a recognised option, so report and exit.
|
||||
;
|
||||
; Handle Usage Information
|
||||
;
|
||||
usage:
|
||||
call crlf2 ; display the options for this utility
|
||||
ld de,str_usage
|
||||
call prtstr
|
||||
or $FF
|
||||
ret ; exit back out to CP/M CCP
|
||||
;
|
||||
; Handle Warm Boot
|
||||
;
|
||||
wboot:
|
||||
ld de,str_warmboot ; message
|
||||
call prtstr ; display it
|
||||
ld b,bf_sysreset ; system restart
|
||||
ld c,bf_sysres_warm ; warm start
|
||||
call $fff0 ; call hbios
|
||||
;
|
||||
; Handle Cold Boot
|
||||
;
|
||||
cboot:
|
||||
ld de,str_coldboot ; message
|
||||
call prtstr ; display it
|
||||
ld b,bf_sysreset ; system restart
|
||||
ld c,bf_sysres_cold ; cold start
|
||||
call $fff0 ; call hbios
|
||||
;
|
||||
;===============================================================================
|
||||
; Error Handlers
|
||||
;===============================================================================
|
||||
;
|
||||
err_una:
|
||||
ld de,str_err_una
|
||||
jr err_ret
|
||||
err_inv:
|
||||
ld de,str_err_inv
|
||||
jr err_ret
|
||||
err_ver:
|
||||
ld de,str_err_ver
|
||||
jr err_ret
|
||||
err_parm:
|
||||
ld de,str_err_parm
|
||||
jr err_ret
|
||||
|
||||
;
|
||||
err_ret:
|
||||
call crlf2
|
||||
call prtstr
|
||||
or $FF ; signal error
|
||||
ret
|
||||
;
|
||||
;===============================================================================
|
||||
; Utility Routines
|
||||
;===============================================================================
|
||||
;
|
||||
; Print character in A without destroying any registers
|
||||
;
|
||||
prtchr:
|
||||
push af
|
||||
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
|
||||
pop af
|
||||
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
|
||||
;
|
||||
; 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
|
||||
;
|
||||
; Get the next non-blank character from (ix)
|
||||
;
|
||||
nonblank:
|
||||
ld a,(ix) ; 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 ix ; if blank, increment character pointer
|
||||
jr nonblank ; and loop
|
||||
;
|
||||
; Convert character in A to uppercase
|
||||
;
|
||||
upcase:
|
||||
cp 'a' ; if below 'a'
|
||||
ret c ; ... do nothing and return
|
||||
cp 'z' + 1 ; if above 'z'
|
||||
ret nc ; ... do nothing and return
|
||||
res 5,a ; clear bit 5 to make lower case -> upper case
|
||||
ret ; and return
|
||||
;
|
||||
;===============================================================================
|
||||
; Constants
|
||||
;===============================================================================
|
||||
;
|
||||
str_banner .db "RomWBW Reboot Utility, Version 1.0, 12-Oct-2024\r\n"
|
||||
.db " Wayne Warthen (wwarthen@gmail.com) & MartinR",0
|
||||
;
|
||||
str_warmboot .db "\r\n\r\nWarm booting...\r\n",0
|
||||
str_coldboot .db "\r\n\r\nCold booting...\r\n",0
|
||||
;
|
||||
str_err_una .db " ERROR: UNA not supported by application",0
|
||||
str_err_inv .db " ERROR: Invalid BIOS (signature missing)",0
|
||||
str_err_ver .db " ERROR: Unexpected HBIOS version",0
|
||||
str_err_parm .db " ERROR: Parameter error (REBOOT /? for usage)",0
|
||||
;
|
||||
str_usage .db " Usage: REBOOT /? - Display this help info.\r\n"
|
||||
.db " REBOOT /W - Warm boot system\r\n"
|
||||
.db " REBOOT /C - Cold boot system\r\n"
|
||||
.db " Options are case insensitive.\r\n",0
|
||||
;
|
||||
;===============================================================================
|
||||
; Working data
|
||||
;===============================================================================
|
||||
;
|
||||
stksav .dw 0 ; stack pointer saved at start
|
||||
.fill stksiz,0 ; stack
|
||||
stack .equ $ ; stack top
|
||||
;
|
||||
;===============================================================================
|
||||
;
|
||||
;==============================================================================
|
||||
; REBOOT - Allows the user to Cold or Warm Boot the RomWBW System
|
||||
; Version 1.0 12-October-2024
|
||||
;==============================================================================
|
||||
;
|
||||
; Author: MartinR (October 2024)
|
||||
; Based **very heavily** on code by Wayne Warthen (wwarthen@gmail.com)
|
||||
;______________________________________________________________________________
|
||||
;
|
||||
; Usage:
|
||||
; REBOOT [/C] [/W] [/?]
|
||||
; ex: REBOOT Display version and usage
|
||||
; REBOOT /? Display version and usage
|
||||
; REBOOT /C Cold boot RomWBW system
|
||||
; REBOOT /W Warm boot RomWBW system
|
||||
;
|
||||
; Operation:
|
||||
; Cold or warm boots a RomWBW system depending on the user option selected.
|
||||
;
|
||||
; This code will only execute on a Z80 CPU (or derivitive)
|
||||
;
|
||||
; This source code assembles with TASM V3.2 under Windows-11 using the
|
||||
; following command line:
|
||||
; tasm -80 -g3 -l REBOOT.ASM REBOOT.COM
|
||||
; ie: Z80 CPU; output format 'binary' named .COM (rather than .OBJ)
|
||||
; and includes a symbol table as part of the listing file.
|
||||
;______________________________________________________________________________
|
||||
;
|
||||
; Change Log:
|
||||
; 2024-09-11 [WBW] Release of RomWBW CPU Speed Selector v1.0 used as the basis
|
||||
; 2024-10-12 [MR ] Initial release of version 1.0
|
||||
;______________________________________________________________________________
|
||||
;
|
||||
; Include Files
|
||||
;
|
||||
#include "../../ver.inc" ; Used for building RomWBW
|
||||
#include "../../HBIOS/hbios.inc"
|
||||
|
||||
;#include "ver.inc" ; Used for testing purposes....
|
||||
;#include "hbios.inc" ; ....during code development
|
||||
;
|
||||
;===============================================================================
|
||||
;
|
||||
; General operational equates (should not requre adjustment)
|
||||
;
|
||||
stksiz .equ $40 ; Working stack size
|
||||
;
|
||||
restart .equ $0000 ; CP/M restart vector
|
||||
bdos .equ $0005 ; BDOS invocation vector
|
||||
;
|
||||
bf_sysreset .equ $F0 ; restart system
|
||||
bf_sysres_int .equ $00 ; reset hbios internal
|
||||
bf_sysres_warm .equ $01 ; warm start (restart boot loader)
|
||||
bf_sysres_cold .equ $02 ; cold start
|
||||
;
|
||||
ident .equ $FFFC ; loc of RomWBW HBIOS ident ptr
|
||||
;
|
||||
;===============================================================================
|
||||
;
|
||||
.org $0100 ; standard CP/M TPA executable
|
||||
;
|
||||
; setup stack (save old value)
|
||||
ld (stksav),sp ; save stack
|
||||
ld sp,stack ; set new stack
|
||||
;
|
||||
call crlf
|
||||
ld de,str_banner ; banner
|
||||
call prtstr
|
||||
;
|
||||
; initialization
|
||||
call init ; initialize
|
||||
jr nz,exit ; abort if init fails
|
||||
;
|
||||
call main ; do the real work
|
||||
;
|
||||
exit:
|
||||
; clean up and return to command processor
|
||||
call crlf ; formatting
|
||||
ld sp,(stksav) ; restore stack
|
||||
jp restart ; return to CP/M via restart
|
||||
;
|
||||
;
|
||||
;===============================================================================
|
||||
; Main Program
|
||||
;===============================================================================
|
||||
;
|
||||
; Initialization
|
||||
;
|
||||
init:
|
||||
; check for UNA (UBIOS)
|
||||
ld a,($FFFD) ; fixed location of UNA API vector
|
||||
cp $C3 ; jp instruction?
|
||||
jr nz,initwbw ; if not, not UNA
|
||||
ld hl,($FFFE) ; get jp address
|
||||
ld a,(hl) ; get byte at target address
|
||||
cp $FD ; first byte of UNA push ix instruction
|
||||
jr nz,initwbw ; if not, not UNA
|
||||
inc hl ; point to next byte
|
||||
ld a,(hl) ; get next byte
|
||||
cp $E5 ; second byte of UNA push ix instruction
|
||||
jr nz,initwbw ; if not, not UNA
|
||||
jp err_una ; UNA not supported
|
||||
;
|
||||
initwbw:
|
||||
; get location of config data and verify integrity
|
||||
ld hl,(ident) ; HL := adr or RomWBW HBIOS ident
|
||||
ld a,(hl) ; get first byte of RomWBW marker
|
||||
cp 'W' ; match?
|
||||
jp nz,err_inv ; abort with invalid config block
|
||||
inc hl ; next byte (marker byte 2)
|
||||
ld a,(hl) ; load it
|
||||
cp ~'W' ; match?
|
||||
jp nz,err_inv ; abort with invalid config block
|
||||
inc hl ; next byte (major/minor version)
|
||||
ld a,(hl) ; load it
|
||||
cp rmj << 4 | rmn ; match?
|
||||
jp nz,err_ver ; abort with invalid os version
|
||||
;
|
||||
initz:
|
||||
; initialization complete
|
||||
xor a ; signal success
|
||||
ret ; return
|
||||
;
|
||||
;
|
||||
;
|
||||
main:
|
||||
; skip to start of first command line parameter
|
||||
ld ix,$0081 ; point to start of parm area (past length byte)
|
||||
call nonblank ; skip to next non-blank char
|
||||
cp '/' ; option prefix?
|
||||
jr nz,usage ; display help info & exit if nothing to do
|
||||
;
|
||||
; process any options
|
||||
inc ix ; fetch next character and process
|
||||
ld a,(ix)
|
||||
call upcase ; ensure it's an upper case character
|
||||
cp 'C' ; if it's a 'C' then
|
||||
jr z,cboot ; do a cold boot.
|
||||
cp 'W' ; if it's a 'W' then
|
||||
jr z,wboot ; do a warm boot.
|
||||
cp '?' ; if it's a '?' then
|
||||
jr z,usage ; display usage info and exit.
|
||||
jr err_parm ; or not a recognised option, so report and exit.
|
||||
;
|
||||
; Handle Usage Information
|
||||
;
|
||||
usage:
|
||||
call crlf2 ; display the options for this utility
|
||||
ld de,str_usage
|
||||
call prtstr
|
||||
or $FF
|
||||
ret ; exit back out to CP/M CCP
|
||||
;
|
||||
; Handle Warm Boot
|
||||
;
|
||||
wboot:
|
||||
ld de,str_warmboot ; message
|
||||
call prtstr ; display it
|
||||
ld b,bf_sysreset ; system restart
|
||||
ld c,bf_sysres_warm ; warm start
|
||||
call $fff0 ; call hbios
|
||||
;
|
||||
; Handle Cold Boot
|
||||
;
|
||||
cboot:
|
||||
ld de,str_coldboot ; message
|
||||
call prtstr ; display it
|
||||
ld b,bf_sysreset ; system restart
|
||||
ld c,bf_sysres_cold ; cold start
|
||||
call $fff0 ; call hbios
|
||||
;
|
||||
;===============================================================================
|
||||
; Error Handlers
|
||||
;===============================================================================
|
||||
;
|
||||
err_una:
|
||||
ld de,str_err_una
|
||||
jr err_ret
|
||||
err_inv:
|
||||
ld de,str_err_inv
|
||||
jr err_ret
|
||||
err_ver:
|
||||
ld de,str_err_ver
|
||||
jr err_ret
|
||||
err_parm:
|
||||
ld de,str_err_parm
|
||||
jr err_ret
|
||||
|
||||
;
|
||||
err_ret:
|
||||
call crlf2
|
||||
call prtstr
|
||||
or $FF ; signal error
|
||||
ret
|
||||
;
|
||||
;===============================================================================
|
||||
; Utility Routines
|
||||
;===============================================================================
|
||||
;
|
||||
; Print character in A without destroying any registers
|
||||
;
|
||||
prtchr:
|
||||
push af
|
||||
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
|
||||
pop af
|
||||
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
|
||||
;
|
||||
; 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
|
||||
;
|
||||
; Get the next non-blank character from (ix)
|
||||
;
|
||||
nonblank:
|
||||
ld a,(ix) ; 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 ix ; if blank, increment character pointer
|
||||
jr nonblank ; and loop
|
||||
;
|
||||
; Convert character in A to uppercase
|
||||
;
|
||||
upcase:
|
||||
cp 'a' ; if below 'a'
|
||||
ret c ; ... do nothing and return
|
||||
cp 'z' + 1 ; if above 'z'
|
||||
ret nc ; ... do nothing and return
|
||||
res 5,a ; clear bit 5 to make lower case -> upper case
|
||||
ret ; and return
|
||||
;
|
||||
;===============================================================================
|
||||
; Constants
|
||||
;===============================================================================
|
||||
;
|
||||
str_banner .db "RomWBW Reboot Utility, Version 1.0, 12-Oct-2024\r\n"
|
||||
.db " Wayne Warthen (wwarthen@gmail.com) & MartinR",0
|
||||
;
|
||||
str_warmboot .db "\r\n\r\nWarm booting...\r\n",0
|
||||
str_coldboot .db "\r\n\r\nCold booting...\r\n",0
|
||||
;
|
||||
str_err_una .db " ERROR: UNA not supported by application",0
|
||||
str_err_inv .db " ERROR: Invalid BIOS (signature missing)",0
|
||||
str_err_ver .db " ERROR: Unexpected HBIOS version",0
|
||||
str_err_parm .db " ERROR: Parameter error (REBOOT /? for usage)",0
|
||||
;
|
||||
str_usage .db " Usage: REBOOT /? - Display this help info.\r\n"
|
||||
.db " REBOOT /W - Warm boot system\r\n"
|
||||
.db " REBOOT /C - Cold boot system\r\n"
|
||||
.db " Options are case insensitive.\r\n",0
|
||||
;
|
||||
;===============================================================================
|
||||
; Working data
|
||||
;===============================================================================
|
||||
;
|
||||
stksav .dw 0 ; stack pointer saved at start
|
||||
.fill stksiz,0 ; stack
|
||||
stack .equ $ ; stack top
|
||||
;
|
||||
;===============================================================================
|
||||
;
|
||||
.end
|
||||
File diff suppressed because it is too large
Load Diff
@@ -4,6 +4,9 @@
|
||||
;==============================================================================
|
||||
;
|
||||
; Author: Mark Pruden
|
||||
;
|
||||
; This is a SUPERSET of INVNTSLC.ASM -> Please See this program also when
|
||||
; making changes, as code ( in routine prtslc: ) exists there also
|
||||
;______________________________________________________________________________
|
||||
;
|
||||
; Usage:
|
||||
@@ -32,6 +35,7 @@
|
||||
; table once (per device), and work out all the LBA's from this single read.
|
||||
; Note this doesnt omit the fact that the 3 rd sector of each slice wold need to be read regarless.
|
||||
; To slightly reduce some IO only slices < 64 are considered.
|
||||
; - Output formatting misaligned with storage units enumerated as greater than 9 (ie 2 digits)
|
||||
;
|
||||
; This code will only execute on a Z80 CPU (or derivitive)
|
||||
; This code requirs the use of HBIOS
|
||||
@@ -42,6 +46,7 @@
|
||||
; 2024-12-11 [MAP] Started - Reboot v1.0 used as the basis for this code
|
||||
; 2024-12-14 [MAP] Initial 0.9 alpha with basic working functionality
|
||||
; 2025-04-21 [MAP] Initial v1.0 release for distribution, fixing all issues
|
||||
; 2025-07-12 [MR] Minor tweak to partially tidy up output formatting
|
||||
;______________________________________________________________________________
|
||||
;
|
||||
; Include Files
|
||||
@@ -63,7 +68,7 @@ bf_sysreset .equ $F0 ; restart system
|
||||
bf_sysres_int .equ $00 ; reset hbios internal
|
||||
bf_sysres_warm .equ $01 ; warm start (restart boot loader)
|
||||
;
|
||||
ident .equ $FFFE ; loc of RomWBW HBIOS ident ptr
|
||||
ident .equ $FFFC ; loc of RomWBW HBIOS ident ptr
|
||||
;
|
||||
sigbyte1 .equ $A5 ; 1st sig byte boot info sector (bb_sig)
|
||||
sigbyte2 .equ $5A ; 2nd sig byte boot info sector (bb_sig)
|
||||
@@ -91,7 +96,7 @@ exit:
|
||||
jp restart ; return to CP/M via restart
|
||||
;
|
||||
;===============================================================================
|
||||
; Initialization
|
||||
; Initialisation
|
||||
;
|
||||
init:
|
||||
; check for UNA (UBIOS)
|
||||
@@ -208,10 +213,10 @@ prtslc2a:
|
||||
ld a,c ; slice number
|
||||
ld (currslice),a ; save slice number
|
||||
;
|
||||
push bc ; save loop
|
||||
push bc ; save loop counter
|
||||
call prtslc3 ; print detals of the slice
|
||||
pop bc ; restore loop
|
||||
ret nz ; if error dont continie
|
||||
pop bc ; restore loop counter
|
||||
ret nz ; if error don't continue
|
||||
;
|
||||
inc c ; next slice number
|
||||
djnz prtslc2a ; loop if more slices
|
||||
@@ -245,15 +250,25 @@ prtslc3:
|
||||
cp c ; compare
|
||||
jr nz,prtslc5 ; ignore missing signature and loop
|
||||
;
|
||||
; Print volume label string at HL, '$' terminated, 16 chars max
|
||||
; Print slice label string at HL, '$' terminated, 16 chars max
|
||||
ld a,(currunit)
|
||||
call prtdecb ; print unit number as decimal
|
||||
call pdot ; print a DOT
|
||||
ld a,(currslice)
|
||||
ld a, (currslice) ; fetch the current slice numeric
|
||||
call prtdecb
|
||||
;
|
||||
;-------------------------------------------------------------------------------
|
||||
; Added by MartinR, July 2025, to help neaten the output formatting.
|
||||
; Note - this is not a complete fix and will still result in misaligned output
|
||||
; where the unit number exceeds 9 (ie - uses 2 digits).
|
||||
cp 10 ; is it less than 10?
|
||||
ld a,' '
|
||||
jr nc,jr01 ; If not, then we don't need an extra space printed
|
||||
call cout ; print the extra space necessary
|
||||
jr01: call cout ; print a space
|
||||
call cout ; print a space
|
||||
call cout ; print a space
|
||||
;-------------------------------------------------------------------------------
|
||||
;
|
||||
ld hl,bb_label ; point to label
|
||||
call pvol ; print it
|
||||
call crlf
|
||||
@@ -435,6 +450,7 @@ pdot:
|
||||
;
|
||||
;-------------------------------------------------------------------------------
|
||||
; Print character in A without destroying any registers
|
||||
; Use CP/M BDOS function $02 - Console Output
|
||||
;
|
||||
prtchr:
|
||||
cout:
|
||||
@@ -684,7 +700,7 @@ diskwrite:
|
||||
;===============================================================================
|
||||
;
|
||||
str_banner .db "\r\n"
|
||||
.db "Slice Label, v1.0, April 2025 - M.Pruden",0
|
||||
.db "Slice Label, v1.1, July 2025 - M.Pruden",0
|
||||
;
|
||||
str_err_una .db " ERROR: UNA not supported by application",0
|
||||
str_err_inv .db " ERROR: Invalid BIOS (signature missing)",0
|
||||
@@ -703,7 +719,7 @@ str_usage .db "\r\n\r\n"
|
||||
.db " Options are case insensitive.\r\n",0
|
||||
;
|
||||
PRTSLC_HDR .TEXT "\r\n\r\n"
|
||||
.TEXT "Un.Sl Drive \r\n"
|
||||
.TEXT "Un.Sl Label \r\n"
|
||||
.TEXT "----- ----------------\r\n"
|
||||
.DB 0
|
||||
;
|
||||
|
||||
@@ -1,399 +1,399 @@
|
||||
;===============================================================================
|
||||
; STARTUP - Application run automatically at OS startup
|
||||
;
|
||||
;===============================================================================
|
||||
;
|
||||
; Author: Wayne Warthen (wwarthen@gmail.com)
|
||||
;_______________________________________________________________________________
|
||||
;
|
||||
; Usage:
|
||||
; MODE [/?]
|
||||
;
|
||||
; Operation:
|
||||
; Determines if STARTUP.CMD exists on startup drive, user 0. If it is
|
||||
; found, it is run via SUBMIT.
|
||||
;_______________________________________________________________________________
|
||||
;
|
||||
; Change Log:
|
||||
; 2017-12-01 [WBW] Initial release
|
||||
;_______________________________________________________________________________
|
||||
;
|
||||
; ToDo:
|
||||
; 1) Detect OS type (CP/M or ZSYS) and run different batch files as a result.
|
||||
;_______________________________________________________________________________
|
||||
;
|
||||
;===============================================================================
|
||||
; Definitions
|
||||
;===============================================================================
|
||||
;
|
||||
stksiz .equ $40 ; Working stack size
|
||||
;
|
||||
restart .equ $0000 ; CP/M restart vector
|
||||
bdos .equ $0005 ; BDOS invocation vector
|
||||
;
|
||||
ident .equ $FFFE ; loc of RomWBW HBIOS ident ptr
|
||||
;
|
||||
rmj .equ 2 ; intended CBIOS version - major
|
||||
rmn .equ 9 ; intended CBIOS version - minor
|
||||
;
|
||||
bf_cioinit .equ $04 ; HBIOS: CIOINIT function
|
||||
bf_cioquery .equ $05 ; HBIOS: CIOQUERY function
|
||||
bf_ciodevice .equ $06 ; HBIOS: CIODEVICE function
|
||||
bf_sysget .equ $F8 ; HBIOS: SYSGET function
|
||||
;
|
||||
;===============================================================================
|
||||
; Code Section
|
||||
;===============================================================================
|
||||
;
|
||||
.org $100
|
||||
;
|
||||
; setup stack (save old value)
|
||||
ld (stksav),sp ; save stack
|
||||
ld sp,stack ; set new stack
|
||||
;
|
||||
; initialization
|
||||
call init ; initialize
|
||||
jr nz,exit ; abort if init fails
|
||||
;
|
||||
; process
|
||||
call process ; do main processing
|
||||
jr nz,exit ; abort on error
|
||||
;
|
||||
exit: ; clean up and return to command processor
|
||||
call crlf ; formatting
|
||||
ld sp,(stksav) ; restore stack
|
||||
;jp restart ; return to CP/M via restart
|
||||
ret ; return to CP/M w/o restart
|
||||
;
|
||||
; Initialization
|
||||
;
|
||||
init:
|
||||
;
|
||||
initx
|
||||
; initialization complete
|
||||
xor a ; signal success
|
||||
ret ; return
|
||||
;
|
||||
; Process
|
||||
;
|
||||
process:
|
||||
; skip to start of first parm
|
||||
ld ix,$81 ; point to start of parm area (past len byte)
|
||||
call nonblank ; skip to next non-blank char
|
||||
jp z,runcmd ; no parms, do command processing
|
||||
;
|
||||
process1:
|
||||
; process options (if any)
|
||||
cp '/' ; option prefix?
|
||||
jp nz,erruse ; invalid option introducer
|
||||
call option ; process option
|
||||
ret nz ; some options mean we are done (e.g., "/?")
|
||||
inc ix ; skip option character
|
||||
call nonblank ; skip whitespace
|
||||
jr nz,process1 ; continue option checking
|
||||
jp runcmd ; end of parms, do cmd processing
|
||||
;
|
||||
;
|
||||
;
|
||||
runcmd:
|
||||
call ldfil ; load executable
|
||||
ret nz ; abort on error
|
||||
;
|
||||
xor a
|
||||
ret
|
||||
;
|
||||
; Load file for execution
|
||||
;
|
||||
ldfil:
|
||||
ld c,15 ; BDOS function: Open File
|
||||
ld de,fcb ; pointer to FCB
|
||||
call bdos ; do it
|
||||
inc a ; check for err, 0xFF --> 0x00
|
||||
jp z,errfil ; handle file not found err
|
||||
;
|
||||
ld c,16 ; BDOS function: Close File
|
||||
ld de,fcb ; pointer to FCB
|
||||
call bdos ; do it
|
||||
inc a ; check for err, 0xFF --> 0x00
|
||||
jp z,errfil ; handle file close err
|
||||
;
|
||||
xor a ; signal success
|
||||
ret ; done
|
||||
|
||||
|
||||
;
|
||||
; Handle options
|
||||
;
|
||||
option:
|
||||
;
|
||||
inc ix ; next char
|
||||
ld a,(ix) ; get it
|
||||
cp '?' ; is it a '?' as expected?
|
||||
jp z,usage ; yes, display usage
|
||||
jp errprm ; anything else is an error
|
||||
;
|
||||
; Display usage
|
||||
;
|
||||
usage:
|
||||
;
|
||||
call crlf ; formatting
|
||||
ld de,msgban ; point to version message part 1
|
||||
call prtstr ; print it
|
||||
call crlf2 ; blank line
|
||||
ld de,msguse ; point to usage message
|
||||
call prtstr ; print it
|
||||
or $FF ; signal no action performed
|
||||
ret ; and return
|
||||
;
|
||||
; 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
|
||||
;
|
||||
; Print a zero terminated string at (DE) without destroying any registers
|
||||
;
|
||||
prtstr:
|
||||
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
|
||||
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
|
||||
;
|
||||
; Get the next non-blank character from (HL).
|
||||
;
|
||||
nonblank:
|
||||
ld a,(ix) ; 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 ix ; if blank, increment character pointer
|
||||
jr nonblank ; and loop
|
||||
;
|
||||
; Convert character in A to uppercase
|
||||
;
|
||||
ucase:
|
||||
cp 'a' ; if below 'a'
|
||||
ret c ; ... do nothing and return
|
||||
cp 'z' + 1 ; if above 'z'
|
||||
ret nc ; ... do nothing and return
|
||||
res 5,a ; clear bit 5 to make lower case -> upper case
|
||||
ret ; and return
|
||||
;
|
||||
; 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
|
||||
;
|
||||
; Jump indirect to address in HL
|
||||
;
|
||||
jphl:
|
||||
jp (hl)
|
||||
;
|
||||
; Errors
|
||||
;
|
||||
erruse: ; command usage error (syntax)
|
||||
ld de,msguse
|
||||
jr err
|
||||
;
|
||||
errprm: ; command parameter error (syntax)
|
||||
ld de,msgprm
|
||||
jr err
|
||||
;
|
||||
errfil: ; STARTUP.CMD file not present
|
||||
ld de,msgfil
|
||||
jr err
|
||||
;
|
||||
err: ; print error string and return error signal
|
||||
call crlf ; print newline
|
||||
;
|
||||
err1: ; without the leading crlf
|
||||
call prtstr ; print error string
|
||||
;
|
||||
err2: ; without the string
|
||||
; call crlf ; print newline
|
||||
or $FF ; signal error
|
||||
ret ; done
|
||||
;
|
||||
;===============================================================================
|
||||
; Storage Section
|
||||
;===============================================================================
|
||||
;
|
||||
fcb .db 0 ; Drive code, 0 = current drive
|
||||
.db "START " ; File name, 8 chars
|
||||
.db "COM" ; File type, 3 chars
|
||||
.fill 36-($-fcb),0 ; zero fill remainder of fcb
|
||||
;
|
||||
cmdblk .db cmdlen ; length
|
||||
cmdtxt .db " B:SUBMIT START"
|
||||
.db 0 ; null terminator
|
||||
cmdlen .equ $ - cmdtxt
|
||||
cmdend .equ $
|
||||
;
|
||||
stksav .dw 0 ; stack pointer saved at start
|
||||
.fill stksiz,0 ; stack
|
||||
stack .equ $ ; stack top
|
||||
;
|
||||
; Messages
|
||||
;
|
||||
msgban .db "STARTUP v1.0, 01-Dec-2017",13,10
|
||||
.db "Copyright (C) 2017, Wayne Warthen, GNU GPL v3",0
|
||||
msguse .db "Usage: STARTUP [/?]",0
|
||||
msgprm .db "Parameter error (STARTUP /? for usage)",0
|
||||
msgfil .db "STARTUP.CMD file missing",0
|
||||
;
|
||||
.end
|
||||
;===============================================================================
|
||||
; STARTUP - Application run automatically at OS startup
|
||||
;
|
||||
;===============================================================================
|
||||
;
|
||||
; Author: Wayne Warthen (wwarthen@gmail.com)
|
||||
;_______________________________________________________________________________
|
||||
;
|
||||
; Usage:
|
||||
; MODE [/?]
|
||||
;
|
||||
; Operation:
|
||||
; Determines if STARTUP.CMD exists on startup drive, user 0. If it is
|
||||
; found, it is run via SUBMIT.
|
||||
;_______________________________________________________________________________
|
||||
;
|
||||
; Change Log:
|
||||
; 2017-12-01 [WBW] Initial release
|
||||
;_______________________________________________________________________________
|
||||
;
|
||||
; ToDo:
|
||||
; 1) Detect OS type (CP/M or ZSYS) and run different batch files as a result.
|
||||
;_______________________________________________________________________________
|
||||
;
|
||||
;===============================================================================
|
||||
; Definitions
|
||||
;===============================================================================
|
||||
;
|
||||
stksiz .equ $40 ; Working stack size
|
||||
;
|
||||
restart .equ $0000 ; CP/M restart vector
|
||||
bdos .equ $0005 ; BDOS invocation vector
|
||||
;
|
||||
ident .equ $FFFC ; loc of RomWBW HBIOS ident ptr
|
||||
;
|
||||
rmj .equ 2 ; intended CBIOS version - major
|
||||
rmn .equ 9 ; intended CBIOS version - minor
|
||||
;
|
||||
bf_cioinit .equ $04 ; HBIOS: CIOINIT function
|
||||
bf_cioquery .equ $05 ; HBIOS: CIOQUERY function
|
||||
bf_ciodevice .equ $06 ; HBIOS: CIODEVICE function
|
||||
bf_sysget .equ $F8 ; HBIOS: SYSGET function
|
||||
;
|
||||
;===============================================================================
|
||||
; Code Section
|
||||
;===============================================================================
|
||||
;
|
||||
.org $100
|
||||
;
|
||||
; setup stack (save old value)
|
||||
ld (stksav),sp ; save stack
|
||||
ld sp,stack ; set new stack
|
||||
;
|
||||
; initialization
|
||||
call init ; initialize
|
||||
jr nz,exit ; abort if init fails
|
||||
;
|
||||
; process
|
||||
call process ; do main processing
|
||||
jr nz,exit ; abort on error
|
||||
;
|
||||
exit: ; clean up and return to command processor
|
||||
call crlf ; formatting
|
||||
ld sp,(stksav) ; restore stack
|
||||
;jp restart ; return to CP/M via restart
|
||||
ret ; return to CP/M w/o restart
|
||||
;
|
||||
; Initialization
|
||||
;
|
||||
init:
|
||||
;
|
||||
initx
|
||||
; initialization complete
|
||||
xor a ; signal success
|
||||
ret ; return
|
||||
;
|
||||
; Process
|
||||
;
|
||||
process:
|
||||
; skip to start of first parm
|
||||
ld ix,$81 ; point to start of parm area (past len byte)
|
||||
call nonblank ; skip to next non-blank char
|
||||
jp z,runcmd ; no parms, do command processing
|
||||
;
|
||||
process1:
|
||||
; process options (if any)
|
||||
cp '/' ; option prefix?
|
||||
jp nz,erruse ; invalid option introducer
|
||||
call option ; process option
|
||||
ret nz ; some options mean we are done (e.g., "/?")
|
||||
inc ix ; skip option character
|
||||
call nonblank ; skip whitespace
|
||||
jr nz,process1 ; continue option checking
|
||||
jp runcmd ; end of parms, do cmd processing
|
||||
;
|
||||
;
|
||||
;
|
||||
runcmd:
|
||||
call ldfil ; load executable
|
||||
ret nz ; abort on error
|
||||
;
|
||||
xor a
|
||||
ret
|
||||
;
|
||||
; Load file for execution
|
||||
;
|
||||
ldfil:
|
||||
ld c,15 ; BDOS function: Open File
|
||||
ld de,fcb ; pointer to FCB
|
||||
call bdos ; do it
|
||||
inc a ; check for err, 0xFF --> 0x00
|
||||
jp z,errfil ; handle file not found err
|
||||
;
|
||||
ld c,16 ; BDOS function: Close File
|
||||
ld de,fcb ; pointer to FCB
|
||||
call bdos ; do it
|
||||
inc a ; check for err, 0xFF --> 0x00
|
||||
jp z,errfil ; handle file close err
|
||||
;
|
||||
xor a ; signal success
|
||||
ret ; done
|
||||
|
||||
|
||||
;
|
||||
; Handle options
|
||||
;
|
||||
option:
|
||||
;
|
||||
inc ix ; next char
|
||||
ld a,(ix) ; get it
|
||||
cp '?' ; is it a '?' as expected?
|
||||
jp z,usage ; yes, display usage
|
||||
jp errprm ; anything else is an error
|
||||
;
|
||||
; Display usage
|
||||
;
|
||||
usage:
|
||||
;
|
||||
call crlf ; formatting
|
||||
ld de,msgban ; point to version message part 1
|
||||
call prtstr ; print it
|
||||
call crlf2 ; blank line
|
||||
ld de,msguse ; point to usage message
|
||||
call prtstr ; print it
|
||||
or $FF ; signal no action performed
|
||||
ret ; and return
|
||||
;
|
||||
; 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
|
||||
;
|
||||
; Print a zero terminated string at (DE) without destroying any registers
|
||||
;
|
||||
prtstr:
|
||||
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
|
||||
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
|
||||
;
|
||||
; Get the next non-blank character from (HL).
|
||||
;
|
||||
nonblank:
|
||||
ld a,(ix) ; 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 ix ; if blank, increment character pointer
|
||||
jr nonblank ; and loop
|
||||
;
|
||||
; Convert character in A to uppercase
|
||||
;
|
||||
ucase:
|
||||
cp 'a' ; if below 'a'
|
||||
ret c ; ... do nothing and return
|
||||
cp 'z' + 1 ; if above 'z'
|
||||
ret nc ; ... do nothing and return
|
||||
res 5,a ; clear bit 5 to make lower case -> upper case
|
||||
ret ; and return
|
||||
;
|
||||
; 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
|
||||
;
|
||||
; Jump indirect to address in HL
|
||||
;
|
||||
jphl:
|
||||
jp (hl)
|
||||
;
|
||||
; Errors
|
||||
;
|
||||
erruse: ; command usage error (syntax)
|
||||
ld de,msguse
|
||||
jr err
|
||||
;
|
||||
errprm: ; command parameter error (syntax)
|
||||
ld de,msgprm
|
||||
jr err
|
||||
;
|
||||
errfil: ; STARTUP.CMD file not present
|
||||
ld de,msgfil
|
||||
jr err
|
||||
;
|
||||
err: ; print error string and return error signal
|
||||
call crlf ; print newline
|
||||
;
|
||||
err1: ; without the leading crlf
|
||||
call prtstr ; print error string
|
||||
;
|
||||
err2: ; without the string
|
||||
; call crlf ; print newline
|
||||
or $FF ; signal error
|
||||
ret ; done
|
||||
;
|
||||
;===============================================================================
|
||||
; Storage Section
|
||||
;===============================================================================
|
||||
;
|
||||
fcb .db 0 ; Drive code, 0 = current drive
|
||||
.db "START " ; File name, 8 chars
|
||||
.db "COM" ; File type, 3 chars
|
||||
.fill 36-($-fcb),0 ; zero fill remainder of fcb
|
||||
;
|
||||
cmdblk .db cmdlen ; length
|
||||
cmdtxt .db " B:SUBMIT START"
|
||||
.db 0 ; null terminator
|
||||
cmdlen .equ $ - cmdtxt
|
||||
cmdend .equ $
|
||||
;
|
||||
stksav .dw 0 ; stack pointer saved at start
|
||||
.fill stksiz,0 ; stack
|
||||
stack .equ $ ; stack top
|
||||
;
|
||||
; Messages
|
||||
;
|
||||
msgban .db "STARTUP v1.0, 01-Dec-2017",13,10
|
||||
.db "Copyright (C) 2017, Wayne Warthen, GNU GPL v3",0
|
||||
msguse .db "Usage: STARTUP [/?]",0
|
||||
msgprm .db "Parameter error (STARTUP /? for usage)",0
|
||||
msgfil .db "STARTUP.CMD file missing",0
|
||||
;
|
||||
.end
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -15,8 +15,7 @@ as needed. The RomWBW ASSIGN command is not supported. BPBIOS
|
||||
will boot from the first hard disk unit number you assign and
|
||||
always from the first slice.
|
||||
|
||||
BPBIOS does not yet understand the 1024 directory entry
|
||||
hard disk format. You must use the 512 directory entry
|
||||
format images.
|
||||
BPBIOS is hard-coded to use the 1024 directory entry hard disk
|
||||
format (hd1k). The hd512 format is not supported at all.
|
||||
|
||||
--WBW 1:25 PM 10/7/2021
|
||||
--WBW 5:04 PM 6/16/2025
|
||||
@@ -2,6 +2,7 @@
|
||||
setlocal
|
||||
|
||||
pushd ZCPR33 && call Build || exit /b & popd
|
||||
pushd UTIL && call Build || exit /b & popd
|
||||
|
||||
set TOOLS=..\..\Tools
|
||||
set PATH=%PATH%;%TOOLS%\zxcc;%TOOLS%\cpmtools;
|
||||
|
||||
@@ -11,3 +11,4 @@ if exist *.bak del *.bak
|
||||
if exist def-ww.lib del def-ww.lib
|
||||
|
||||
pushd ZCPR33 && call Clean.cmd & popd
|
||||
pushd UTIL && call Clean.cmd & popd
|
||||
|
||||
@@ -13,7 +13,7 @@ OTHERS = zcpr33.rel bp*.prn bp*.rel \
|
||||
|
||||
TOOLS = ../../Tools
|
||||
|
||||
SUBDIRS = ZCPR33
|
||||
SUBDIRS = ZCPR33 UTIL
|
||||
include $(TOOLS)/Makefile.inc
|
||||
|
||||
zcpr33.rel:
|
||||
|
||||
55
Source/BPBIOS/UTIL/Build.cmd
Normal file
55
Source/BPBIOS/UTIL/Build.cmd
Normal file
@@ -0,0 +1,55 @@
|
||||
@echo off
|
||||
setlocal
|
||||
|
||||
set TOOLS=..\..\..\Tools
|
||||
set PATH=%PATH%;%TOOLS%\zxcc;%TOOLS%\cpmtools;
|
||||
set CPMDIR80=%TOOLS%/cpm/
|
||||
|
||||
zxcc Z80ASM -BPBUILD/RFS || exit /b
|
||||
zxcc SLRNK -BPBUILD/N,/A:100,/D:23E0,BPBUILD,B:SLINK0,B:VLIBS/S,B:Z3LIBS/S,B:SYSLIBS/S,/E || exit /b
|
||||
|
||||
zxcc Z80ASM -BPCNFG/RFS || exit /b
|
||||
zxcc SLRNK -BPCNFG/N,/A:100,/D:3A55,BPCNFG,B:VLIBS/S,B:Z3LIBS/S,B:SYSLIBS/S,/E || exit /b
|
||||
|
||||
zxcc Z80ASM -BPSWAP/RFS || exit /b
|
||||
zxcc SLRNK -BPSWAP/N,/A:100,/D:0854,BPSWAP,B:VLIBS/S,B:Z3LIBS/S,B:SYSLIBS/S,/E || exit /b
|
||||
|
||||
zxcc Z80ASM -BPSYSGEN/RFS || exit /b
|
||||
zxcc SLRNK -BPSYSGEN/N,/A:100,/D:08CD,BPSYSGEN,B:Z3LIBS/S,B:SYSLIBS/S,/E || exit /b
|
||||
|
||||
zxcc Z80ASM -CONFZ4/RFS || exit /b
|
||||
zxcc SLRNK -CONFZ4/N,/A:100,/D:080A,CONFZ4,B:Z3LIBS/S,B:SYSLIBS/S,/E || exit /b
|
||||
|
||||
zxcc Z80ASM -HASHINI/RFS || exit /b
|
||||
zxcc SLRNK -HASHINI/N,/A:100,/D:09E5,HASHINI,B:Z3LIBS/S,B:SYSLIBS/S,/E || exit /b
|
||||
|
||||
zxcc Z80ASM -LDSYS/RFS || exit /b
|
||||
zxcc SLRNK -LDSYS/N,/A:100,/D:0CF8,LDSYS,B:VLIBS/S,B:Z3LIBS/S,B:SYSLIBS/S,/E || exit /b
|
||||
|
||||
zxcc Z80ASM -SHOWHD/RFS || exit /b
|
||||
zxcc SLRNK -SHOWHD/N,/A:100,/D:064D,SHOWHD,B:SYSLIBS/S,/E || exit /b
|
||||
|
||||
zxcc Z80ASM -SIZERAM/RFS || exit /b
|
||||
zxcc SLRNK -SIZERAM/N,/A:100,/D:0750,SIZERAM,B:VLIBS/S,B:Z3LIBS/S,B:SYSLIBS/S,/E || exit /b
|
||||
|
||||
zxcc Z80ASM -ZSCFG2/RFS || exit /b
|
||||
zxcc SLRNK -ZSCFG2/N,/A:100,/D:145E,ZSCFG2,B:VLIBS/S,B:Z3LIBS/S,B:SYSLIBS/S,/E || exit /b
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
:: zxcc Z80ASM
|
||||
:: zxcc ZMAC -zcpr33.z80 -/P || exit /b
|
||||
6
Source/BPBIOS/UTIL/Clean.cmd
Normal file
6
Source/BPBIOS/UTIL/Clean.cmd
Normal file
@@ -0,0 +1,6 @@
|
||||
@echo off
|
||||
setlocal
|
||||
|
||||
if exist *.com del *.com
|
||||
if exist *.lst del *.lst
|
||||
if exist *.rel del *.rel
|
||||
40
Source/BPBIOS/UTIL/Makefile
Normal file
40
Source/BPBIOS/UTIL/Makefile
Normal file
@@ -0,0 +1,40 @@
|
||||
OBJECTS = bpbuild.com bpcnfg.com bpswap.com bpsysgen.com confz4.com hashini.com \
|
||||
ldsys.com showhd.com sizeram.com zscfg2.com
|
||||
TOOLS = ../../../Tools
|
||||
# DEST = ..
|
||||
OTHERS = *.rel
|
||||
|
||||
include $(TOOLS)/Makefile.inc
|
||||
|
||||
%.rel: %.z80
|
||||
@$(ZXCC) $(CPM)/Z80ASM -$(basename $<)/RFS
|
||||
|
||||
bpbuild.com : bpbuild.rel
|
||||
$(ZXCC) $(CPM)/SLRNK -bpbuild/n,/a:100,/d:23e0,bpbuild,b:slink0,b:vlibs/s,b:z3libs/s,b:syslibs/s,/e
|
||||
|
||||
bpcnfg.com : bpcnfg.rel
|
||||
$(ZXCC) $(CPM)/SLRNK -bpcnfg/n,/a:100,/d:3a55,bpcnfg,b:vlibs/s,b:z3libs/s,b:syslibs/s,/e
|
||||
|
||||
bpswap.com : bpswap.rel
|
||||
$(ZXCC) $(CPM)/SLRNK -bpswap/n,/a:100,/d:0854,bpswap,b:vlibs/s,b:z3libs/s,b:syslibs/s,/e
|
||||
|
||||
bpsysgen.com : bpsysgen.rel
|
||||
$(ZXCC) $(CPM)/SLRNK -bpsysgen/n,/a:100,/d:08cd,bpsysgen,b:z3libs/s,b:syslibs/s,/e
|
||||
|
||||
confz4.com : confz4.rel
|
||||
$(ZXCC) $(CPM)/SLRNK -confz4/n,/a:100,/d:080a,confz4,b:z3libs/s,b:syslibs/s,/e
|
||||
|
||||
hashini.com : hashini.rel
|
||||
$(ZXCC) $(CPM)/SLRNK -hashini/n,/a:100,/d:09e5,hashini,b:z3libs/s,b:syslibs/s,/e
|
||||
|
||||
ldsys.com : ldsys.rel
|
||||
$(ZXCC) $(CPM)/SLRNK -ldsys/n,/a:100,/d:0cf8,ldsys,b:vlibs/s,b:z3libs/s,b:syslibs/s,/e
|
||||
|
||||
showhd.com : showhd.rel
|
||||
$(ZXCC) $(CPM)/SLRNK -showhd/n,/a:100,/d:064d,showhd,b:syslibs/s,/e
|
||||
|
||||
sizeram.com : sizeram.rel
|
||||
$(ZXCC) $(CPM)/SLRNK -sizeram/n,/a:100,/d:0750,sizeram,b:vlibs/s,b:z3libs/s,b:syslibs/s,/e
|
||||
|
||||
zscfg2.com : zscfg2.rel
|
||||
$(ZXCC) $(CPM)/SLRNK -zscfg2/n,/a:100,/d:145e,zscfg2,b:vlibs/s,b:z3libs/s,b:syslibs/s,/e
|
||||
2357
Source/BPBIOS/UTIL/bpbuild.z80
Normal file
2357
Source/BPBIOS/UTIL/bpbuild.z80
Normal file
File diff suppressed because it is too large
Load Diff
4539
Source/BPBIOS/UTIL/bpcnfg.z80
Normal file
4539
Source/BPBIOS/UTIL/bpcnfg.z80
Normal file
File diff suppressed because it is too large
Load Diff
483
Source/BPBIOS/UTIL/bpswap.z80
Normal file
483
Source/BPBIOS/UTIL/bpswap.z80
Normal file
@@ -0,0 +1,483 @@
|
||||
TITLE "Swap drives under B/P Bios"
|
||||
;************************************************************************
|
||||
;* B P S W A P *
|
||||
;* Swap two drive letters in a running B/P Bios system *
|
||||
;* by Harold F. Bower and Cameron W. Cotrill *
|
||||
;*----------------------------------------------------------------------*
|
||||
;* Disassembly: jxl Dec 2024 *
|
||||
;* public release 1.0 Apr 2025 *
|
||||
;* see remarks at the end *
|
||||
;*----------------------------------------------------------------------*
|
||||
;* LINK with Version 4 libraries: VLIB, Z3LIB, SYSLIB *
|
||||
;* *
|
||||
;* A>Z80ASM BPSWAP/RS *
|
||||
;* A>SLRNK BPSWAP/N,/A:100,/D:0854,BPSWAP,VLIBS/S,Z3LIBS/S,SYSLIBS/S,/E *
|
||||
;************************************************************************
|
||||
|
||||
VER EQU 10
|
||||
REV EQU ' '
|
||||
|
||||
DATE MACRO
|
||||
DEFB '31 Aug 92'
|
||||
ENDM
|
||||
|
||||
|
||||
CTRLC EQU 03H ; Control-C character
|
||||
BEL EQU 07H ; Bell character
|
||||
TAB EQU 09H ; Tab character
|
||||
LF EQU 0AH ; Line Feed character
|
||||
CR EQU 0DH ; Carriage Return character
|
||||
|
||||
CPMBIOS EQU 0 ; CP/M BIOS warm boot (JP)
|
||||
CPMBDOS EQU 5 ; CP/M BDOS entry point (JP)
|
||||
CPMFCB EQU 5CH ; CP/M standard FCB #1 (+1 filename, +9 filetype)
|
||||
CPMDMA EQU 80H ; CP/M standard DMA buffer
|
||||
|
||||
|
||||
; From VLIB Get..
|
||||
EXTRN VPRINT, Z3VINIT
|
||||
|
||||
; From Z3LIB Get..
|
||||
EXTRN GETNAME, PRTNAME, WHRENV
|
||||
|
||||
; From SYSLIB Get..
|
||||
EXTRN CRLF, CAPINE, COUT
|
||||
|
||||
|
||||
;::::: PROGRAM START
|
||||
|
||||
ORG 100H
|
||||
CSEG
|
||||
|
||||
|
||||
BPSWAP: JP START ; bypass header
|
||||
DEFB 'Z3ENV' ; this is a ZCPR3 utility
|
||||
DEFB 1 ; show external environment
|
||||
|
||||
ENVADR: DEFW 0 ; addr of Z3 environment
|
||||
|
||||
START: LD HL,(CPMBDOS) ; ##### BUG: should be CPMBDOS+1 ?
|
||||
CALL WHRENV ; find Z3 Environment Descriptor
|
||||
LD (ENVADR),HL ; store addr
|
||||
CALL Z3VINIT ; ..and init for Z3LIB routines
|
||||
CALL GETNAME ; get actual program name
|
||||
CALL GQFLAG
|
||||
AND A ; running in quiet mode ?
|
||||
JR NZ,START0 ; ..if so, skip over
|
||||
CALL VPRINT
|
||||
DEFB 1,'B/P Drive Swap',2,' V',VER/10+'0','.',VER MOD 10 + '0',', '
|
||||
DATE
|
||||
DEFB CR,LF
|
||||
DEFB 0
|
||||
|
||||
START0: LD (STACK),SP
|
||||
LD SP,STACK
|
||||
|
||||
; get first token from command line (in FCB #1)
|
||||
LD A,(CPMFCB+1) ; get char
|
||||
CP '/' ; is this a help request ?
|
||||
JP Z,HELP ; ..if so, show help screen
|
||||
LD HL,(CPMBIOS+1) ; get warm boot addr (BIOS fn #1)
|
||||
LD L,30*3 ; adjust ptr to fn #30
|
||||
LD A,(HL) ; check byte at ptr location
|
||||
CP 0C3H ; is it opcode 0xC3 (JP) ?
|
||||
JR NZ,E$BPBIO ; ..if not, jump error and exit
|
||||
CALL JUMPHL ; else, "call" B/P Bios fn #30 (RETBIO)
|
||||
LD (BPBASE),BC ; store B/P Bios base addr
|
||||
LD HL,-6 ; move ptr 6 bytes backward
|
||||
ADD HL,DE ; (signature string)
|
||||
LD A,(HL) ; get byte
|
||||
CP 'B' ; is it 'B' ?
|
||||
JR NZ,E$BPBIO ; ..if not, error and exit
|
||||
INC HL ; ptr fwd
|
||||
LD A,(HL) ; get byte
|
||||
CP '/' ; is it '/' ?
|
||||
JR NZ,E$BPBIO ; ..if not, error and exit
|
||||
INC HL ; ptr fwd
|
||||
LD A,(HL) ; get byte
|
||||
CP 'P' ; is it 'P' ?
|
||||
JR Z,EVALCMD ; ..if so, jump to continue
|
||||
; else, fall through (error and exit)
|
||||
|
||||
E$BPBIO: CALL VPRINT
|
||||
DEFB CR,LF,BEL,'+++ Not B/P Bios ... aborting +++',CR,LF
|
||||
DEFB 0
|
||||
JP EXIT
|
||||
|
||||
|
||||
; evaluate command line
|
||||
EVALCMD: LD HL,CPMDMA ; ptr to standard DMA buffer (holds command line)
|
||||
LD A,(HL) ; get length of first token
|
||||
INC HL ; +1
|
||||
CALL ADDHLA ; move ptr fwd
|
||||
LD (HL),0 ; set <NUL> terminator
|
||||
LD HL,CPMDMA+1 ; set ptr to start of string
|
||||
CALL FINDDRV ; find letter of first drive
|
||||
JR C,RUNIMOD ; ..if invalid/not found, switch to interactive mode
|
||||
LD (DRV1ST),A ; else, store # of first drive
|
||||
LD A,(HL) ; get following byte
|
||||
CALL EVALSEP ; is it a separator char ?
|
||||
JP C,M$ABORT ; ..if not, abort program
|
||||
CALL FINDDRV ; find letter of second drive
|
||||
JR C,RUNIM0 ; ..if invalid/not found, switch to interactive mode
|
||||
LD (DRV2ND),A ; else, store # of second drive
|
||||
LD A,(HL) ; get following byte
|
||||
CALL EVALSEP ; is it a separator char ?
|
||||
JP C,M$ABORT ; ..if not, abort program
|
||||
JR SWAPDRV ; else, jump to continue
|
||||
|
||||
|
||||
; run in interactive mode
|
||||
RUNIMOD: CALL VPRINT
|
||||
DEFB ' First Drive to Swap [A..P] : '
|
||||
DEFB 0
|
||||
CALL CAPINE ; get input
|
||||
CALL CRLF
|
||||
CP CTRLC ; is it <Ctrl-C> ?
|
||||
JP Z,M$ABORT ; ..if so, abort program
|
||||
CALL EVALDRV ; check if drive letter is valid (A..P)
|
||||
JR C,RUNIMOD ; ..if not, loop ask for new input
|
||||
LD (DRV1ST),A ; else, store drive #
|
||||
RUNIM0: CALL VPRINT
|
||||
DEFB ' Second Drive to Swap [A..P] : '
|
||||
DEFB 0
|
||||
CALL CAPINE ; get input
|
||||
CALL CRLF
|
||||
CP CTRLC ; is it <Ctrl-C> ?
|
||||
JP Z,M$ABORT ; ..if so, abort program
|
||||
CALL EVALDRV ; check if drive letter is valid (A..P)
|
||||
JR C,RUNIM0 ; ..if not, loop ask for new input
|
||||
LD (DRV2ND),A ; else, store drive #
|
||||
|
||||
|
||||
;::::: PROCESS
|
||||
|
||||
SWAPDRV: LD HL,(BPBASE) ; get B/P Bios base addr
|
||||
LD L,22*3 ; adjust ptr to fn #22 (DRVTBL)
|
||||
CALL JUMPHL ; ..and "call" fn
|
||||
PUSH HL ; save ptr to DRVTBL
|
||||
LD A,(DRV1ST) ; get # of first drive
|
||||
ADD A,A ; *2 for 16-bit entries
|
||||
CALL ADDHLA ; ..and move ptr fwd
|
||||
EX DE,HL ; swap regs
|
||||
POP HL ; restore ptr to DRVTBL
|
||||
LD A,(DRV2ND) ; get # of second drive
|
||||
ADD A,A ; *2
|
||||
CALL ADDHLA ; ..and move ptr fwd
|
||||
|
||||
; DE= addr DPH first drive
|
||||
; HL= addr DPH second drive
|
||||
LD C,(HL) ; swap addr's in DRVTBL using
|
||||
LD A,(DE) ; regs DE, HL as pointers
|
||||
LD (HL),A ; and regs A, C holding bytes to copy
|
||||
LD A,C
|
||||
LD (DE),A
|
||||
INC HL
|
||||
INC DE
|
||||
LD C,(HL)
|
||||
LD A,(DE)
|
||||
LD (HL),A
|
||||
LD A,C
|
||||
LD (DE),A
|
||||
LD HL,0
|
||||
LD (PDRVVCT),HL ; init new Drive Vector (pos) with 0x0000
|
||||
DEC HL
|
||||
LD (NDRVVCT),HL ; init new Drive Vector (neg) with 0xFFFF
|
||||
LD HL,(ENVADR) ; get ENV addr
|
||||
LD DE,52 ; offset to Drive Vector
|
||||
ADD HL,DE ; move ptr
|
||||
PUSH HL ; ..and save it
|
||||
LD E,(HL) ; get Drive Vector in DE
|
||||
INC HL
|
||||
LD D,(HL)
|
||||
LD A,(DRV1ST) ; get # of first drive
|
||||
CALL MKDRMSK ; get bit mask for first drive
|
||||
LD C,L ; ..and move it to BC
|
||||
LD B,H
|
||||
LD A,(DRV2ND) ; get # of second drive
|
||||
CALL MKDRMSK ; get bit mask for second drive
|
||||
EX DE,HL ; ..and move it to DE
|
||||
CALL MKVCMSK ; update new Drive Vector for first drive
|
||||
PUSH BC ; swap BC and DE
|
||||
PUSH DE
|
||||
POP BC
|
||||
POP DE
|
||||
CALL MKVCMSK ; update new Drive Vector for second drive
|
||||
|
||||
; (Stack) = addr of Drive Vector in ENV - PUSH HL
|
||||
; HL= current Drive Vector, DE= bit mask first drive, BC= bit mask second drive
|
||||
EX DE,HL ; swap regs (save current Drive Vector in DE)
|
||||
ADD HL,BC ; add/merge bit masks
|
||||
EX (SP),HL ; put merged mask on stack - used by SWAPDRX
|
||||
; get addr of Drive Vector in ENV
|
||||
PUSH HL ; ..and save it
|
||||
EX DE,HL ; swap regs back (current Drive Vector in HL)
|
||||
LD BC,(PDRVVCT) ; get new Drive Vector (pos)
|
||||
LD DE,(NDRVVCT) ; and (neg)
|
||||
LD A,L ; low byte of current Drive Vector
|
||||
AND E ; reset bit (neg)
|
||||
OR C ; set bit (pos)
|
||||
LD E,A ; ..and store result in E
|
||||
LD A,H ; high byte of current Drive Vector
|
||||
AND D ; reset bit (neg)
|
||||
OR B ; set bit (pos)
|
||||
LD D,A ; ..and store result in D
|
||||
POP HL ; get addr of Drive Vector in ENV
|
||||
LD (HL),E ; store new Drive Vector (low byte)
|
||||
INC HL
|
||||
LD (HL),D ; ..and high byte
|
||||
CALL GQFLAG
|
||||
OR A ; check quiet flag
|
||||
JR NZ,SWAPDRX ; ..if quiet mode, skip over
|
||||
CALL VPRINT
|
||||
DEFB ' ...Drives '
|
||||
DEFB 0
|
||||
LD A,(DRV1ST) ; get # of first drive
|
||||
ADD A,'A' ; make ascii letter
|
||||
CALL COUT ; ..and display it
|
||||
CALL VPRINT
|
||||
DEFB ': and '
|
||||
DEFB 0
|
||||
LD A,(DRV2ND) ; get # of second drive
|
||||
ADD A,'A' ; make ascii letter
|
||||
CALL COUT ; ..and display it
|
||||
CALL VPRINT
|
||||
DEFB ': exchanged',CR,LF
|
||||
DEFB 0
|
||||
|
||||
; exit function
|
||||
SWAPDRX: POP DE ; restore merged bit masked 1st+2nd drive
|
||||
LD C,37 ; BDOS fn #37 Reset Drive(s)
|
||||
CALL CPMBDOS
|
||||
JP EXIT
|
||||
|
||||
|
||||
M$ABORT: CALL VPRINT
|
||||
DEFB ' ...aborting...',CR,LF
|
||||
DEFB 0
|
||||
JP EXIT
|
||||
|
||||
|
||||
;::::: HELP SCREEN
|
||||
|
||||
HELP: CALL VPRINT
|
||||
DEFB CR,LF,1
|
||||
DEFB 0
|
||||
CALL PPRGNAM
|
||||
CALL VPRINT
|
||||
DEFB 2,' exchanges the logical definition '
|
||||
DEFB 'of two physical disk drives',CR,LF
|
||||
DEFB ' or partitions. Drive letters must be '
|
||||
DEFB 'in the range of "A"-"P".',CR,LF
|
||||
DEFB ' The program is re-executable under '
|
||||
DEFB 'ZCPR with the "GO" command',CR,LF,LF
|
||||
DEFB ' Syntax: '
|
||||
DEFB 0
|
||||
CALL PPRGNAM
|
||||
CALL VPRINT
|
||||
DEFB ' <Drv1>[:] <tab| |,> <Drv2>[:]',CR,LF,LF
|
||||
DEFB ' Examples:',CR,LF,' '
|
||||
DEFB 0
|
||||
CALL PPRGNAM
|
||||
CALL VPRINT
|
||||
DEFB ' A: E: - Exchange E drive with A',CR,LF
|
||||
DEFB ' '
|
||||
DEFB 0
|
||||
CALL PPRGNAM
|
||||
CALL VPRINT
|
||||
DEFB ' D,H - Exchange D drive with H',CR,LF
|
||||
DEFB ' '
|
||||
DEFB 0
|
||||
CALL PPRGNAM
|
||||
CALL VPRINT
|
||||
DEFB ' // - display this message',CR,LF
|
||||
DEFB 0
|
||||
|
||||
|
||||
;::::: EXIT PROGRAM
|
||||
|
||||
EXIT: LD SP,(STACK) ; restore stack
|
||||
RET ; ..and return to system
|
||||
|
||||
|
||||
;::::: SUPPORT FUNCTIONS
|
||||
|
||||
; "called" as a pseudo-routine that returns to caller
|
||||
; in: HL= target addr
|
||||
JUMPHL: JP (HL) ; jump to addr in HL regs
|
||||
|
||||
|
||||
; parse nul-terminated string skipping separator chars
|
||||
; then fall through and check/convert drive letter
|
||||
; in: HL= ptr to string
|
||||
; out: A= drive number (or <NUL> if invalid letter)
|
||||
; HL= ptr to byte after end of string
|
||||
; C-Flag set if <NUL> (end of string) reached
|
||||
FINDDRV: LD A,(HL) ; get byte
|
||||
INC HL ; move ptr fwd
|
||||
OR A ; check if <NUL> (zero) = end of string
|
||||
SCF ; prepare status indicator (C-Flag set)
|
||||
RET Z ; ..if <NUL> byte, return
|
||||
CALL EVALSEP ; check if byte is a separator
|
||||
JR NC,FINDDRV ; ..if so, get next char
|
||||
; else, fall through and check if letter is valid
|
||||
|
||||
|
||||
; evaluate if letter is a valid drive (A..P) and return as number
|
||||
; in: A= letter to check
|
||||
; out: A= drive number
|
||||
; C-Flag set if error, NC= ok
|
||||
EVALDRV: CP 'A' ; is it lower than ascii 'A' ?
|
||||
RET C ; ..return with C-Flag already set
|
||||
CP 'P'+1 ; is it greater than ascii 'P' ?
|
||||
CCF ; ..reverse C-Flag to set correct status
|
||||
RET C ; and return
|
||||
SUB 'A' ; else, convert to number
|
||||
RET
|
||||
|
||||
|
||||
; evaluate char in register A whether it is a separator
|
||||
; (space, comma, colon, tab, zero)
|
||||
; in: A= char
|
||||
; out: C-Flag set if not separator, NC= char is separator
|
||||
EVALSEP: CP ' ' ; is it <SP> ?
|
||||
RET Z
|
||||
CP ',' ; Comma ?
|
||||
RET Z
|
||||
CP ':' ; Colon ?
|
||||
RET Z
|
||||
CP TAB ; <TAB> ?
|
||||
RET Z
|
||||
OR A ; <NUL> (zero) ?
|
||||
RET Z
|
||||
SCF ; set C-Flag
|
||||
RET
|
||||
|
||||
|
||||
; make bit mask for specified drive #
|
||||
; position of 1-bit represents drive in 16-bit word (similar to Drive Vector)
|
||||
; in: A= drive number
|
||||
; out: HL= bit mask
|
||||
MKDRMSK: LD HL,1 ; set bit 0
|
||||
INC A ; ahead of loop, increase A
|
||||
MKDRMS0: DEC A ; decrease A
|
||||
RET Z ; ..if zero, finished
|
||||
ADD HL,HL ; *2 (shift 1-bit to next position)
|
||||
JR MKDRMS0 ; loop
|
||||
|
||||
|
||||
; make bit masks for new Drive Vector
|
||||
; maintaining a positive (bits set) map, and a negate version (bits reset)
|
||||
; in: HL= current Drive Vector (from ENV)
|
||||
; BC= bit mask w/ old position
|
||||
; DE= bit mask w/ new position
|
||||
MKVCMSK: PUSH BC ; save regs
|
||||
LD A,B
|
||||
AND H ; mask high byte
|
||||
LD B,A ; ..and store result back in B
|
||||
LD A,C
|
||||
AND L ; mask low byte
|
||||
OR B ; check if invalid (= zero), ie. not mapped in Vector
|
||||
POP BC ; restore regs
|
||||
JR Z,MKVCMS0 ; if invalid drive, jump
|
||||
|
||||
; drive at new position exists in Drive Vector - set bit
|
||||
PUSH HL
|
||||
LD HL,(PDRVVCT)
|
||||
LD A,H ; high byte first
|
||||
OR D ; ..merge with new position
|
||||
LD H,A ; and store result back in H
|
||||
LD A,L ; low byte
|
||||
OR E ; ..merge with new position
|
||||
LD L,A ; and store result back in L
|
||||
LD (PDRVVCT),HL ; save final result
|
||||
POP HL
|
||||
RET
|
||||
|
||||
; drive at new position does _not_ exist in Drive Vector - reset bit
|
||||
MKVCMS0: PUSH HL
|
||||
LD HL,(NDRVVCT)
|
||||
LD A,D ; get high byte of new position
|
||||
CPL ; invert it
|
||||
AND H ; reset corresponding bit
|
||||
LD H,A ; ..and store result in H
|
||||
LD A,E ; get low byte of new position
|
||||
CPL ; invert it
|
||||
AND L ; reset corresponding bit
|
||||
LD L,A ; ..and store result in L
|
||||
LD (NDRVVCT),HL ; save final result
|
||||
POP HL
|
||||
RET
|
||||
|
||||
|
||||
; get Quiet Flag from Z3 Environment
|
||||
; in: -
|
||||
; out: A= Quiet Flag, defaults to A= 0 (not quiet)
|
||||
GQFLAG: LD HL,(ENVADR) ; get ENV addr
|
||||
LD A,H ; check if invalid (= zero)
|
||||
OR L
|
||||
RET Z ; ..if so, return
|
||||
LD A,40 ; else, move ptr forward
|
||||
CALL ADDHLA ; to Quiet Flag
|
||||
LD A,(HL) ; get value
|
||||
RET ; ..and return
|
||||
|
||||
|
||||
; add A to HL (result in HL)
|
||||
ADDHLA: ADD A,L ; add L
|
||||
LD L,A ; store result in L
|
||||
RET NC ; ..if no overflow, return
|
||||
INC H ; else, increment H
|
||||
RET
|
||||
|
||||
|
||||
; print program name on CON: device
|
||||
; (either the actual name, or fallback to default)
|
||||
; only used by HELP
|
||||
PPRGNAM: LD A,(ENVADR+1) ; get high byte of ENVPTR
|
||||
OR A ; check if valid (<> zero)
|
||||
JP NZ,PRTNAME ; ..if so, display actual name
|
||||
; and let return from there
|
||||
CALL VPRINT ; else, display default
|
||||
DEFB 'BPSWAP'
|
||||
DEFB 0
|
||||
RET
|
||||
|
||||
|
||||
;:::::::::::::::::::::::::::::::::::::::::::::::::::::
|
||||
; VLIB - 0x0536
|
||||
; Z3LIB - 0x0757
|
||||
; SYSLIB - 0x0805
|
||||
; end addr 0x0854 (begin DSEG)
|
||||
;:::::::::::::::::::::::::::::::::::::::::::::::::::::
|
||||
|
||||
|
||||
;::::: RAM STORAGE
|
||||
|
||||
DSEG
|
||||
|
||||
PDRVVCT: DEFW 0 ; new Drive Vector
|
||||
; (positive notation, bit _set_ for existing drives)
|
||||
NDRVVCT: DEFW 0 ; new Drive Vector
|
||||
; (negative notation, bits _reset_ for existing drives)
|
||||
BPBASE: DEFW 0 ; B/P Bios base addr
|
||||
DRV1ST: DEFB 0 ; # of first drive
|
||||
DRV2ND: DEFB 0 ; # of second drive
|
||||
|
||||
DEFS 40H ; room for stack
|
||||
STACK: DEFW 0 ; stack storage location
|
||||
|
||||
END
|
||||
|
||||
|
||||
;************************************************************************
|
||||
; Remarks jxl:
|
||||
; BPSWAP.COM, included in available B/P Bios package(s), was dis-
|
||||
; assembled and extensively commented. Labels are up to seven chars long
|
||||
; to comply with M-REL standards. However, it is recommended to use SLR
|
||||
; tools that support labels up to sixteen chars.
|
||||
; In its current state, the compiled/linked file matches exactly the
|
||||
; original BPSWAP.COM, i.e. no changes to the source were made. There
|
||||
; seems to be one bug (marked with "##### BUG") at the beginning of the
|
||||
; program.
|
||||
;************************************************************************
|
||||
636
Source/BPBIOS/UTIL/bpsysgen.z80
Normal file
636
Source/BPBIOS/UTIL/bpsysgen.z80
Normal file
@@ -0,0 +1,636 @@
|
||||
TITLE "Write B/P Bios System to system tracks of a disk"
|
||||
;************************************************************************
|
||||
;* B P S Y S G E N *
|
||||
;* Copy B/P Bios based Operating System to system tracks *
|
||||
;* by Harold F. Bower and Cameron W. Cotrill *
|
||||
;*----------------------------------------------------------------------*
|
||||
;* Disassembly: jxl Dec 2024 *
|
||||
;* public release 1.0 Apr 2025 *
|
||||
;* see remarks at the end *
|
||||
;*----------------------------------------------------------------------*
|
||||
;* LINK with Version 4 libraries: VLIB, Z3LIB, SYSLIB *
|
||||
;* *
|
||||
;* A>Z80ASM BPSYSGEN/RS *
|
||||
;* A>SLRNK BPSYSGEN/N,/A:100,/D:08CD,BPSYSGEN,Z3LIBS/S,SYSLIBS/S,/E *
|
||||
;************************************************************************
|
||||
|
||||
VER EQU 10
|
||||
REV EQU ' '
|
||||
|
||||
DATE MACRO
|
||||
DEFB '31 Aug 92'
|
||||
ENDM
|
||||
|
||||
|
||||
CTRLC EQU 03H ; Control-C character
|
||||
BEL EQU 07H ; Bell character
|
||||
LF EQU 0AH ; Line Feed character
|
||||
CR EQU 0DH ; Carriage Return character
|
||||
|
||||
CPMBIOS EQU 0 ; CP/M BIOS warm boot (JP)
|
||||
CPMBDOS EQU 5 ; CP/M BDOS entry point (JP)
|
||||
CPMFCB EQU 5CH ; CP/M standard FCB #1 (+1 filename, +9 filetype)
|
||||
CPMFCB2 EQU 6CH ; CP/M standard FCB #2
|
||||
|
||||
; From Z3LIB Get..
|
||||
EXTRN GETNAME, PRTNAME, Z3INIT, WHRENV
|
||||
|
||||
; From SYSLIB Get..
|
||||
EXTRN PUTUD, GETUD, SUA, EPRINT, CRLF, CAPINE, CIN, COUT
|
||||
|
||||
|
||||
;::::: PROGRAM START
|
||||
|
||||
ORG 100H
|
||||
CSEG
|
||||
|
||||
|
||||
BPSYSGEN: JP START ; bypass header
|
||||
DEFB 'Z3ENV' ; this is a ZCPR3 utility
|
||||
DEFB 1 ; show external environment
|
||||
|
||||
ENVADR: DEFW 0 ; addr of Z3 environment
|
||||
|
||||
START: LD HL,(CPMBDOS+1) ; BDOS entry as starting point for Z3ENV search
|
||||
CALL WHRENV ; get Z3 Environment
|
||||
LD (ENVADR),HL ; ..store it
|
||||
CALL Z3INIT ; init ENV ptr for Z3LIB modules
|
||||
CALL GETNAME ; get actual program name
|
||||
CALL GETQFLG ; check ENV quiet flag
|
||||
AND A ; zero means 'verbose' i.e. not quiet
|
||||
JR NZ,START1 ; ..if quiet mode, skip msg
|
||||
START0: CALL EPRINT
|
||||
DEFB 'B/P SYSGEN Utility V',VER/10+'0','.',VER MOD 10 + '0',REV
|
||||
DATE
|
||||
DEFB CR,LF,LF
|
||||
DEFB 0
|
||||
|
||||
START1: CALL PUTUD ; currently logged in drive/user
|
||||
LD HL,RESDISK ; prepare exit with resetting disk system
|
||||
PUSH HL ; by putting addr of 'RESDISK' on stack
|
||||
LD HL,(CPMBIOS+1) ; get BIOS entry addr
|
||||
LD A,8*3 ; move forward to fn #9 SELDSK
|
||||
CALL ADDHLA
|
||||
LD DE,BIOSELD ; ptr to target addr
|
||||
LD BC,8*3 ; bytes to copy (8 JP instructions, 3 bytes each)
|
||||
LDIR ; ..copy
|
||||
|
||||
|
||||
; Evaluate command line (if invalid parameters, switch to interactive mode)
|
||||
EVALCMD: LD HL,CPMFCB ; set ptr to standard FCB #1
|
||||
LD A,(HL) ; get drive
|
||||
LD (SRCDRV),A ; ..and store it (SRC)
|
||||
INC HL ; move ptr forard
|
||||
LD A,(HL) ; get byte/char
|
||||
CP '/' ; is this a help request ?
|
||||
JP Z,HELP ; ..if so, jump display help
|
||||
; ..and quit (addr of exit routine on stack)
|
||||
|
||||
; syntax: BPSYSGEN [d:]fn[.ft] [d:]
|
||||
; drive #1 = source, drive #2 = destination
|
||||
LD A,(CPMFCB2) ; get first byte of standard FCB #2
|
||||
LD (DSTDRV),A ; store drive # (DEST)
|
||||
LD (DSTDR2),A ; ..and a copy (as indicator for cmdline input)
|
||||
LD B,A ; remember value
|
||||
LD A,(HL) ; get first char of filename in FCB #1
|
||||
CP ' ' ; is it <SP> ?
|
||||
JP NZ,SRCRD0 ; ..if not, jump read sys file
|
||||
LD A,B ; else, restore char (from FCB #2)
|
||||
AND A ; is it <NUL> ?
|
||||
JP NZ,SRCREAD ; ..if not, jump read sys tracks
|
||||
; else, no source specified in command line
|
||||
; (switch to interactive mode)
|
||||
LD A,(SRCDRV) ; get source drive number
|
||||
LD (DSTDRV),A ; ..and overwrite destination drive number
|
||||
|
||||
|
||||
;::::: SOURCE DRIVE
|
||||
|
||||
; interactive mode
|
||||
SRCINP: CALL EPRINT
|
||||
DEFB 'Source Drive (CR to skip)? '
|
||||
DEFB 0
|
||||
CALL CAPINE ; get user input
|
||||
CALL CRLF
|
||||
CP CR ; is it <CR> ?
|
||||
JP Z,SRCRD1 ; ..if so, skip
|
||||
SUB 40H ; else, convert ascii to number
|
||||
LD (SRCDRV),A ; ..and store it
|
||||
CALL EPRINT
|
||||
DEFB 'Place source disk in drive '
|
||||
DEFB 0
|
||||
LD A,(SRCDRV) ; get source drive number
|
||||
ADD A,40H ; convert to ascii
|
||||
CALL COUT ; ..and display it
|
||||
CALL EPRINT
|
||||
DEFB ': and press return to continue...'
|
||||
DEFB 0
|
||||
SRCINP0: CALL CIN ; get input
|
||||
CP CTRLC ; is it <Ctrl-C> ?
|
||||
RET Z ; ..if so, return
|
||||
CP CR ; <CR> ?
|
||||
JR NZ,SRCINP0 ; ..if not, loop ask for new input
|
||||
CALL CRLF
|
||||
|
||||
|
||||
; start reading
|
||||
SRCREAD: CALL RDTRACK ; read system tracks of source disk
|
||||
JR SRCRD1 ; ..and skip over
|
||||
SRCRD0: CALL RDFILE ; read system file
|
||||
SRCRD1: CALL CHKSYS ; check if a valid system was loaded/read
|
||||
; (fn _not_ implemented, simply returns)
|
||||
JP NZ,E$NOSYS ; ..if not, jump error and exit
|
||||
LD A,(DSTDRV) ; get # of destination disk
|
||||
AND A
|
||||
JP NZ,DSTINP0 ; ..if not empty (= zero), jump to continue
|
||||
; else, fall through and ask user
|
||||
|
||||
|
||||
;::::: DESTINATION DRIVE
|
||||
|
||||
; interactive mode
|
||||
DSTINP: CALL EPRINT
|
||||
DEFB CR,LF,'Destination Drive (^C quits)? '
|
||||
DEFB 0
|
||||
CALL CAPINE ; get user input
|
||||
CP CTRLC ; is it <Ctrl-C> ?
|
||||
RET Z ; ..if so, return
|
||||
SUB 40H ; else, convert ascii to number
|
||||
LD (DSTDRV),A ; ..and store it
|
||||
CALL CRLF
|
||||
DSTINP0: LD A,(DSTDR2) ; get copy of # destination disk
|
||||
AND A ; check if valid
|
||||
JR NZ,DSTWRIT ; ..if so, running in command line mode
|
||||
; ..continue writing to destination immediately
|
||||
; else, fall through and ask user for input
|
||||
CALL EPRINT
|
||||
DEFB 'Place destination disk in drive '
|
||||
DEFB 0
|
||||
LD A,(DSTDRV) ; get destination drive number
|
||||
ADD A,40H ; convert to ascii
|
||||
CALL COUT ; ..and display it
|
||||
CALL EPRINT
|
||||
DEFB ': and press return to continue...'
|
||||
DEFB 0
|
||||
DSTINP1: CALL CIN ; get input
|
||||
CP CTRLC ; is it <Ctrl-C> ?
|
||||
RET Z ; ..if so, return
|
||||
CP CR ; <CR> ?
|
||||
JR NZ,DSTINP1 ; ..if not, loop ask for new input
|
||||
CALL CRLF
|
||||
|
||||
|
||||
; start writing
|
||||
; exit through "RET", addr of RESDISK routine is on stack
|
||||
DSTWRIT: CALL WRTRACK
|
||||
CALL GETQFLG
|
||||
AND A ; check if quiet flag is set
|
||||
RET NZ ; ..if not (= verbose), exit program
|
||||
LD A,(DSTDR2) ; else, get copy of # dest. disk (indicator cmdline mode)
|
||||
AND A ; check if valid
|
||||
RET NZ ; ..if not, exit program
|
||||
JP DSTINP ; else, loop ask for input
|
||||
|
||||
|
||||
; initiate a reset of disk system when returning to system
|
||||
RESDISK: LD C,13 ; BDOS fn #13 (reset disk system)
|
||||
CALL CPMBDOS
|
||||
JP GETUD ; set Drive/User and let return from there
|
||||
|
||||
|
||||
;::::: HELP SCREEN
|
||||
|
||||
HELP: CALL PRGNAME
|
||||
CALL EPRINT
|
||||
DEFB ' Places a copy of the operating '
|
||||
DEFB 'system onto the system',CR,LF
|
||||
DEFB ' tracks of a drive on the system.',CR,LF,LF
|
||||
DEFB ' Syntax: '
|
||||
DEFB 0
|
||||
CALL PRGNAME
|
||||
CALL EPRINT
|
||||
DEFB ' [DIR:[Ufn.Ft]] [D:]',CR,LF,LF
|
||||
DEFB ' Examples:',CR,LF,LF
|
||||
DEFB ' '
|
||||
DEFB 0
|
||||
CALL PRGNAME
|
||||
CALL EPRINT
|
||||
DEFB ' - Execute in Interactive Mode',CR,LF
|
||||
DEFB ' '
|
||||
DEFB 0
|
||||
CALL PRGNAME
|
||||
CALL EPRINT
|
||||
DEFB ' A: - Prompt for Source, '
|
||||
DEFB 'Place System onto A',CR,LF
|
||||
DEFB ' '
|
||||
DEFB 0
|
||||
CALL PRGNAME
|
||||
CALL EPRINT
|
||||
DEFB ' B:ZSDOS64.COM - Get System from File, '
|
||||
DEFB 'Prompt for Drive',CR,LF
|
||||
DEFB ' '
|
||||
DEFB 0
|
||||
CALL PRGNAME
|
||||
CALL EPRINT
|
||||
DEFB ' A: B: - Copy System from Drive A '
|
||||
DEFB 'to Drive B',CR,LF
|
||||
DEFB ' '
|
||||
DEFB 0
|
||||
CALL PRGNAME
|
||||
CALL EPRINT
|
||||
DEFB ' // - display this help',CR,LF
|
||||
DEFB 0
|
||||
RET
|
||||
|
||||
|
||||
;::::: SUPPORT FUNCTIONS
|
||||
|
||||
; get Quiet Flag from Z3 Environment
|
||||
; in: -
|
||||
; out: A= Quiet Flag, defaults to A= 0 (not quiet)
|
||||
GETQFLG: LD HL,(ENVADR) ; get local ENVPTR
|
||||
LD A,H ; check if invalid (= zero)
|
||||
OR L
|
||||
RET Z ; ..if so, return
|
||||
LD A,40 ; else, move ptr forward
|
||||
CALL ADDHLA ; to Quiet Flag
|
||||
LD A,(HL) ; get value
|
||||
RET ; ..and return
|
||||
|
||||
|
||||
; print program name on CON: device
|
||||
; (either the actual name, or fallback to default)
|
||||
; only used by HELP
|
||||
PRGNAME: LD A,(ENVADR+1) ; get high byte of ENVPTR
|
||||
OR A ; check if valid (<> zero)
|
||||
JP NZ,PRTNAME ; ..if so, display actual name
|
||||
; and let return from there
|
||||
CALL EPRINT ; else, display default
|
||||
DEFB 'BPSYSGEN'
|
||||
DEFB 0
|
||||
RET
|
||||
|
||||
|
||||
; Read system tracks - source
|
||||
RDTRACK: LD A,(SRCDRV) ; get source drive
|
||||
CALL SELDRV ; and select it
|
||||
JP Z,E$SRC ; ..if error, jump
|
||||
LD (SRCDPH),HL ; store addr of DPH
|
||||
LD A,10 ; move forward to DPB addr
|
||||
CALL ADDHLA ; at DPH+10
|
||||
LD E,(HL) ; get DPB addr in DE
|
||||
INC HL
|
||||
LD D,(HL)
|
||||
EX DE,HL ; swap regs
|
||||
LD (SRCDPB),HL ; ..and store DPB addr
|
||||
LD E,(HL) ; get sectors per track in DE
|
||||
INC HL ; at DPB+0
|
||||
LD D,(HL)
|
||||
LD (SECTTRK),DE ; store value
|
||||
LD A,12 ; move forward to track offset
|
||||
CALL ADDHLA ; (beginning of directory) at DPB+13
|
||||
LD E,(HL) ; get track offset in DE
|
||||
INC HL
|
||||
LD D,(HL)
|
||||
LD A,D ; check upper nybble
|
||||
AND A ; is it zero ?
|
||||
JP NZ,RDTRK0 ; ..if not, jump to adjust
|
||||
OR E ; check lower nybble
|
||||
JP Z,E$NOSYS ; ..if also zero, jump to error and exit
|
||||
CP 4 ; check upper limit for # of system tracks
|
||||
JR C,RDTRK1 ; ..if within boundaries, skip over
|
||||
RDTRK0: LD DE,2 ; set (default) # of system tracks
|
||||
|
||||
RDTRK1: LD B,E ; trk offset in B (counter)
|
||||
LD DE,(SECTTRK) ; get sect/trk
|
||||
LD HL,0 ; set initial value
|
||||
RDTRK2: ADD HL,DE ; multiply by addition
|
||||
DJNZ RDTRK2 ; loop till done
|
||||
XOR A ; nullify A
|
||||
OR H ; check if H is zero
|
||||
JP NZ,E$NOSYS ; ..if not, jump error and exit
|
||||
PUSH HL ; save regs
|
||||
LD BC,0
|
||||
CALL BIOSTTR ; set track # 0
|
||||
POP HL ; restore regs
|
||||
LD C,H ; move # of sectors containing system
|
||||
LD B,L ; to BC (as counter)
|
||||
LD DE,0 ; set intial value
|
||||
LD HL,FILEBUF ; set target addr to file buffer
|
||||
; (at 0x0900, page-aligned after end of program)
|
||||
|
||||
RDTRK3: PUSH DE ; save regs
|
||||
PUSH BC
|
||||
PUSH HL
|
||||
LD HL,(SRCDPH) ; get addr of DPH
|
||||
LD E,(HL) ; get skew table ptr in DE
|
||||
INC HL
|
||||
LD D,(HL)
|
||||
CALL BIOSTRN ; translate logical sector # in BC
|
||||
LD B,H ; move physical sector # to BC
|
||||
LD C,L
|
||||
CALL BIOSTSE ; ..and set (physical) sector
|
||||
POP BC ; restore target addr
|
||||
PUSH BC
|
||||
CALL BIOSTDM ; set as DMA buffer addr
|
||||
CALL BIOREAD ; read one sector
|
||||
OR A ; check for error (A <> 0)
|
||||
JP NZ,E$READ ; ..if error, jump
|
||||
POP HL ; restore target addr
|
||||
LD DE,128 ; increase by 128 bytes (1 sector)
|
||||
ADD HL,DE
|
||||
POP BC ; restore regs / clear stack
|
||||
POP DE
|
||||
DEC B ; decrease counter
|
||||
RET Z ; ..if finished, return
|
||||
INC C
|
||||
LD A,C
|
||||
AND 00000011b ; mask lower 2 bits
|
||||
LD A,'.'
|
||||
CALL Z,COUT ; display progress every 4 sectors (0.5 kB)
|
||||
LD A,(SECTTRK)
|
||||
CP C ; max. # sect/trk reached ?
|
||||
JR NZ,RDTRK3 ; ..if not, loop
|
||||
INC DE ; increase trk counter
|
||||
LD C,0 ; reset sect counter
|
||||
PUSH DE ; save regs
|
||||
PUSH BC
|
||||
PUSH HL
|
||||
LD B,D ; copy trk # in BC
|
||||
LD C,E
|
||||
CALL BIOSTTR ; ..and set track #
|
||||
POP HL ; restore regs
|
||||
POP BC
|
||||
POP DE
|
||||
JR RDTRK3 ; loop
|
||||
|
||||
|
||||
; Read system file (img) - source
|
||||
RDFILE: LD A,(ENVADR+1) ; get base addr of ENV
|
||||
AND A ; check if invalid (= zero)
|
||||
JR Z,RDFIL0 ; ..if no ENV, skip over
|
||||
LD A,(CPMFCB+0DH) ; else, get user no from standard FCB #1
|
||||
CALL SUA ; ..and log in
|
||||
RDFIL0: LD DE,CPMFCB ; set ptr to standard FCB #1
|
||||
LD C,15 ; BDOS fn #15 Open File
|
||||
CALL BDOSSV
|
||||
JP Z,E$SOPEN
|
||||
LD HL,32 ; ptr to current record
|
||||
ADD HL,DE
|
||||
LD (HL),16 ; set # of current record
|
||||
; (skip 16 records = 2kB, MOVSYS boot loader code)
|
||||
LD HL,FILEBUF-128 ; set addr of file buffer (-128 ahead of loop)
|
||||
|
||||
RDFIL1: LD A,128 ; move forward by 128 bytes (1 sector)
|
||||
CALL ADDHLA
|
||||
EX DE,HL ; swap regs
|
||||
LD C,26 ; BDOS fn #26 Set DMA Address
|
||||
CALL BDOSSV
|
||||
EX DE,HL ; swap regs back
|
||||
LD C,20 ; BDOS fn #20 Read Sequentially
|
||||
CALL BDOSSV
|
||||
DEC A ; A= 1 returned means EOF, so decrease A
|
||||
JR Z,RDFIL1 ; ..if zero, continue with next sector
|
||||
LD C,16 ; BDOS fn #16 Close File
|
||||
JP BDOSSV
|
||||
|
||||
|
||||
; Write system tracks - destination
|
||||
WRTRACK: LD A,(DSTDRV) ; get destination drive
|
||||
CALL SELDRV ; and select it
|
||||
JP Z,E$DEST ; ..if error, jump and exit
|
||||
LD (DSTDPH),HL ; store addr of DPH
|
||||
LD A,10 ; move forward to DPB addr
|
||||
CALL ADDHLA ; at DPH+10
|
||||
LD E,(HL) ; get DPB addr in DE
|
||||
INC HL
|
||||
LD D,(HL)
|
||||
EX DE,HL ; swap regs
|
||||
LD (DSTDPB),HL ; ..and store DPB addr
|
||||
LD E,(HL) ; get sectors per track in DE
|
||||
INC HL ; at DPB+0
|
||||
LD D,(HL)
|
||||
LD (SECTTRK),DE ; store value
|
||||
LD A,12 ; move forward to track offset
|
||||
CALL ADDHLA ; (beginning of directory) at DPB+13
|
||||
LD E,(HL) ; get track offset in DE
|
||||
INC HL
|
||||
LD D,(HL)
|
||||
LD A,D ; check upper nybble
|
||||
AND A ; is it zero ?
|
||||
JP NZ,WRTRK0 ; ..if not, jump to adjust
|
||||
OR E ; check lower nybble
|
||||
JP Z,E$NOSYS ; ..if also zero, jump to error and exit
|
||||
CP 4 ; check upper limit for # of system tracks
|
||||
JR C,WRTRK1 ; ..if within boundaries, skip over
|
||||
|
||||
WRTRK0: LD DE,2 ; set (default) # of system tracks
|
||||
|
||||
WRTRK1: LD B,E ; trk offset in B (counter)
|
||||
LD DE,(SECTTRK) ; get sect/trk
|
||||
LD HL,0 ; set initial value
|
||||
WRTRK2: ADD HL,DE ; multiply by addition
|
||||
DJNZ WRTRK2 ; loop till done
|
||||
XOR A ; nullify A
|
||||
OR H ; check if H is zero
|
||||
JP NZ,E$NOSYS ; ..if not, jump error and exit
|
||||
PUSH HL ; save regs
|
||||
LD BC,0
|
||||
CALL BIOSTTR ; set track # 0
|
||||
POP HL ; save regs
|
||||
LD C,H ; move # of sectors containing system
|
||||
LD B,L ; to BC (as counter)
|
||||
LD DE,0 ; set initial value
|
||||
LD HL,FILEBUF ; set origin addr (file buffer)
|
||||
|
||||
WRTRK3: PUSH DE ; save regs
|
||||
PUSH BC
|
||||
PUSH HL
|
||||
LD HL,(DSTDPH) ; get addr of DPH
|
||||
LD E,(HL) ; get skew table ptr in DE
|
||||
INC HL
|
||||
LD D,(HL)
|
||||
CALL BIOSTRN ; translate logical sector # in BC
|
||||
LD B,H ; move physical sector # to BC
|
||||
LD C,L
|
||||
CALL BIOSTSE ; ..and set (physical) sector
|
||||
POP BC ; restore origin addr
|
||||
PUSH BC
|
||||
CALL BIOSTDM ; set as DMA buffer addr
|
||||
LD C,0
|
||||
CALL BIOWRIT ; write one sector
|
||||
OR A ; check for error (A <> 0)
|
||||
JP NZ,E$WRITE ; ..if error, jump
|
||||
POP HL ; restore origin addr
|
||||
LD DE,128 ; ..and increase by 128 bytes (1 sector)
|
||||
ADD HL,DE
|
||||
POP BC ; restore regs / clear stack
|
||||
POP DE
|
||||
DEC B ; decrease counter
|
||||
JR NZ,WRTRK4 ; ..if not finished, continue
|
||||
LD C,1 ; else, force write (flush to disk)
|
||||
JP BIOWRIT ; ..and let return from there
|
||||
|
||||
WRTRK4: INC C
|
||||
LD A,C
|
||||
AND 00000011b ; mask lower 2 bits
|
||||
LD A,'.'
|
||||
CALL Z,COUT ; display progress every 4 sectors (0.5 kB)
|
||||
LD A,(SECTTRK)
|
||||
CP C ; max. # sect/trk reached ?
|
||||
JR NZ,WRTRK3 ; ..if not, loop
|
||||
INC DE ; increase trk counter
|
||||
LD C,0 ; reset sect counter
|
||||
PUSH DE ; save regs
|
||||
PUSH BC
|
||||
PUSH HL
|
||||
LD B,D ; copy trk # in BC
|
||||
LD C,E
|
||||
CALL BIOSTTR ; ..and set track
|
||||
POP HL ; restore regs
|
||||
POP BC
|
||||
POP DE
|
||||
JR WRTRK3 ; loop
|
||||
|
||||
|
||||
; check if a valid B/P Bios was loaded
|
||||
; *** function not implemented ***
|
||||
; in: -
|
||||
; out: Z-Flag set if ok, NZ= error
|
||||
CHKSYS: XOR A ; always return Z-Flag set
|
||||
RET
|
||||
|
||||
|
||||
; select disk drive
|
||||
; in: A= drive number (one-based)
|
||||
; out: Z-Flag set if error
|
||||
SELDRV: DEC A ; -1 to comply with CP/M BIOS standards
|
||||
LD C,A
|
||||
LD E,0
|
||||
CALL BIOSELD ; call BIOS fn #9 directly
|
||||
LD A,H
|
||||
OR L
|
||||
RET
|
||||
|
||||
|
||||
; call BDOS saving regs BC, DE, HL
|
||||
; out: A= 0 and Z-Flag set if not found
|
||||
BDOSSV: PUSH BC
|
||||
PUSH DE
|
||||
PUSH HL
|
||||
CALL CPMBDOS
|
||||
INC A ; 0xFF --> 0x00 if not found
|
||||
POP HL
|
||||
POP DE
|
||||
POP BC
|
||||
RET
|
||||
|
||||
|
||||
; add A to HL (result in HL)
|
||||
ADDHLA: ADD A,L ; add L
|
||||
LD L,A ; store result in L
|
||||
RET NC ; ..if no overflow, return
|
||||
INC H ; else, increment H
|
||||
RET
|
||||
|
||||
|
||||
;::::: ERROR MESSAGES
|
||||
|
||||
; display msg on CON: then exit with warm boot
|
||||
E$READ: CALL EPRINT
|
||||
DEFB BEL,'*** Read error'
|
||||
DEFB 0
|
||||
JP EXIT
|
||||
|
||||
E$SRC: CALL EPRINT
|
||||
DEFB BEL,'*** Bad source!'
|
||||
DEFB 0
|
||||
JP EXIT
|
||||
|
||||
E$WRITE: CALL EPRINT
|
||||
DEFB BEL,'*** Write error'
|
||||
DEFB 0
|
||||
JP EXIT
|
||||
|
||||
E$DEST: CALL EPRINT
|
||||
DEFB BEL,'*** Bad destination!'
|
||||
DEFB 0
|
||||
JP EXIT
|
||||
|
||||
E$NOSYS: CALL EPRINT
|
||||
DEFB BEL,'*** No system!'
|
||||
DEFB 0
|
||||
JP EXIT
|
||||
|
||||
E$SOPEN: CALL EPRINT
|
||||
DEFB BEL,"*** Can't open source file!"
|
||||
DEFB 0
|
||||
|
||||
|
||||
;::::: EXIT PROGRAM
|
||||
|
||||
EXIT: CALL CRLF
|
||||
LD HL,0 ; set addr
|
||||
JP (HL) ; and jump to CP/M WBOOT
|
||||
|
||||
|
||||
;::::: BIOS JUMPS (for direct calls)
|
||||
|
||||
; area is filled with actual jumps at runtime
|
||||
; to call BIOS fn's directly
|
||||
BIOSELD: JP 0 ; fn #9 SELDSK select disk
|
||||
BIOSTTR: JP 0 ; fn #10 SETTRK set track
|
||||
BIOSTSE: JP 0 ; fn #11 SETSEC set sector
|
||||
BIOSTDM: JP 0 ; fn #12 SETDMA set buffer addr
|
||||
BIOREAD: JP 0 ; fn #13 READ read one sector
|
||||
BIOWRIT: JP 0 ; fn #14 WRITE write one sector
|
||||
BIOLIST: JP 0 ; fn #15 LISTST list status (not used)
|
||||
BIOSTRN: JP 0 ; fn #16 SECTRN sector translation
|
||||
|
||||
|
||||
|
||||
;::::: RAM STORAGE (not in DSEG !)
|
||||
|
||||
SECTTRK: DEFW 0 ; sectors per track (sect/trk), used for src+dst
|
||||
SRCDPH: DEFW 0 ; source: addr of Disk Parameter Header (DPH)
|
||||
SRCDPB: DEFW 0 ; source: addr of Disk Parameter Block (DPB)
|
||||
DSTDPH: DEFW 0 ; destination: addr of DPH
|
||||
DSTDPB: DEFW 0 ; destination: addr of DPB
|
||||
SRCDRV: DEFB 0 ; source: drive # (from standard FCB #1)
|
||||
DSTDRV: DEFB 0 ; destination drive #
|
||||
DSTDR2: DEFB 0 ; destination drive # (copy)
|
||||
; extracted from cmdline, used as indicator for run mode
|
||||
|
||||
|
||||
|
||||
;:::::::::::::::::::::::::::::::::::::::::::::::::::::
|
||||
; Z3LIB - 0x0735
|
||||
; SYSLIB - 0x07e3
|
||||
; end addr 0x08cc (DSEG Z3+SYS = 4 bytes)
|
||||
;:::::::::::::::::::::::::::::::::::::::::::::::::::::
|
||||
|
||||
; buffer start addr = 0x0900
|
||||
FILEBUF: EQU $+512-($-BPSYSGEN AND 255)
|
||||
|
||||
DSEG
|
||||
|
||||
END
|
||||
|
||||
|
||||
;************************************************************************
|
||||
; Remarks jxl:
|
||||
; BPSYSGEN.COM, included in available B/P Bios package(s), was dis-
|
||||
; assembled and extensively commented. Labels are up to seven chars long
|
||||
; to comply with M-REL standards. However, it is recommended to use SLR
|
||||
; tools that support labels up to sixteen chars.
|
||||
; In its current state, the compiled/linked file matches exactly the
|
||||
; original BPSYSGEN.COM, i.e. no changes to the source were made.
|
||||
; The program is pretty straightforward. It supports a command line
|
||||
; mode and an interactive mode. (Code portions for the latter are pretty
|
||||
; short.) Functionality to check if the running system is valid, was
|
||||
; not implemented. Since other B/P Bios tools perform such checks, this
|
||||
; is rather surprising.
|
||||
; An interesting approach was used to end the program and literally
|
||||
; return to the system. The address of RESDISK routine is pushed on the
|
||||
; stack at the very beginning.
|
||||
;************************************************************************
|
||||
489
Source/BPBIOS/UTIL/confz4.z80
Normal file
489
Source/BPBIOS/UTIL/confz4.z80
Normal file
@@ -0,0 +1,489 @@
|
||||
TITLE "ZCPR 4 Configuration Utility"
|
||||
;************************************************************************
|
||||
;* C O N F Z 4 *
|
||||
;* Configure ZCPR 4 options *
|
||||
;* by Harold F. Bower and Cameron W. Cotrill *
|
||||
;*----------------------------------------------------------------------*
|
||||
;* Disassembly: jxl Jan 2025 *
|
||||
;* public release 1.0 Apr 2025 *
|
||||
;* see remarks at the end *
|
||||
;*----------------------------------------------------------------------*
|
||||
;* LINK with Version 4 libraries: Z3LIB, SYSLIB *
|
||||
;* *
|
||||
;* A>Z80ASM CONFZ4/RS *
|
||||
;* A>SLRNK CONFZ4/N,/A:100,/D:080A,CONFZ4,Z3LIBS/S,SYSLIBS/S,/E *
|
||||
;************************************************************************
|
||||
|
||||
VER EQU 10
|
||||
REV EQU ' '
|
||||
|
||||
DATE MACRO
|
||||
DEFB '18 Nov 95'
|
||||
ENDM
|
||||
|
||||
|
||||
BEL EQU 07H ; Bell character
|
||||
BS EQU 08H ; Backspace character
|
||||
TAB EQU 09H ; Tab character
|
||||
LF EQU 0AH ; Line Feed character
|
||||
CR EQU 0DH ; Carriage Return character
|
||||
|
||||
CPMBIOS EQU 0 ; CP/M BIOS warm boot (JP)
|
||||
CPMBDOS EQU 5 ; CP/M BDOS entry point (JP)
|
||||
CPMFCB EQU 5CH ; CP/M standard FCB #1 (+1 filename, +9 filetype)
|
||||
CPMDMA EQU 80H ; CP/M standard DMA buffer
|
||||
|
||||
|
||||
; From Z3LIB Get..
|
||||
EXTRN GETNAME, PRTNAME, Z3INIT, WHRENV
|
||||
|
||||
; From SYSLIB Get..
|
||||
EXTRN EPRINT, CRLF, CAPIN, PA2HC, COUT
|
||||
|
||||
|
||||
;::::: PROGRAM START
|
||||
|
||||
ORG 100H
|
||||
CSEG
|
||||
|
||||
|
||||
CONFZ4: JP START ; bypass header
|
||||
DEFB 'Z3ENV' ; this is a ZCPR3 utility
|
||||
DEFB 1 ; show external environment
|
||||
|
||||
ENVADR: DEFW 0 ; addr of Z3 environment
|
||||
DEFW CONFZ4 ; type 4 filler
|
||||
|
||||
DEFB 'CONFZ41 ',0 ; configuration name
|
||||
|
||||
START: LD (STACK),SP
|
||||
LD SP,STACK
|
||||
CALL EPRINT
|
||||
DEFB 'B/P System Command Processor Configuration V'
|
||||
DEFB VER/10+'0','.',VER MOD 10 + '0',REV,' '
|
||||
DATE
|
||||
DEFB CR,LF
|
||||
DEFB 0
|
||||
|
||||
CALL INITZ3 ; find Z3ENV and check Wheel Byte
|
||||
CALL GETNAME ; get actual program name
|
||||
CALL CHKHLP ; check if help was requested
|
||||
SUB ' ' ; ##### convert to ... ??
|
||||
LD (UNUSED1),A ; ##### and store (not used at all)
|
||||
CALL CHKSYS ; check if running B/P Bios
|
||||
LD HL,(BPCNFG) ; addr CONFIG area
|
||||
INC HL ; move ptr fwd
|
||||
INC HL
|
||||
LD A,(HL) ; get option flags (OPTF1)
|
||||
AND 00000001B ; mask bit 0 (0= unbanked, 1= banked)
|
||||
LD (BPBNKD),A ; store indicator
|
||||
JR NZ,CHKXENV ; ..if banked, jump to continue
|
||||
CALL EPRINT ; else, display msg and exit
|
||||
DEFB CR,LF,'+++ Not Banked System..aborting...!',BEL
|
||||
DEFB 0
|
||||
JP EXIT
|
||||
|
||||
; check for extended environment
|
||||
CHKXENV: INC HL ; move ptr fwd
|
||||
INC HL
|
||||
INC HL
|
||||
LD A,(HL) ; get first system bank (SYSBNK)
|
||||
LD (SYSBNK),A ; store it
|
||||
LD HL,(ENVADR) ; addr ENV
|
||||
LD DE,8 ; offset to type
|
||||
ADD HL,DE ; move ptr
|
||||
BIT 7,(HL) ; check high bit (= 0x80+ for extended Z3ENV)
|
||||
JR NZ,CHKVERS ; ..if set, jump to continue
|
||||
CALL EPRINT
|
||||
DEFB CR,LF,'+++ Not Extended Environment..aborting..!',BEL
|
||||
DEFB 0
|
||||
JP EXIT
|
||||
|
||||
; check ZCPR version
|
||||
CHKVERS
|
||||
LD DE,55 ; offset addr CPR (8+55 = 63)
|
||||
ADD HL,DE ; move ptr
|
||||
LD E,(HL) ; get addr in DE
|
||||
INC HL
|
||||
LD D,(HL)
|
||||
LD HL,5 ; offset to version byte in ZCPR 4.x
|
||||
; (code starts with JP.., JR.., VERSION)
|
||||
ADD HL,DE ; move ptr
|
||||
LD A,(HL) ; get byte
|
||||
CP 41H ; is it 4.1 (or higher) ?
|
||||
JR NC,PVRSION ; ..if so, jump to continue
|
||||
PUSH AF ; else, display error msg and exit
|
||||
CALL EPRINT
|
||||
DEFB CR,LF,BEL,"+++ Can't Configure Vers : "
|
||||
DEFB 0
|
||||
POP AF
|
||||
CALL PA2HC
|
||||
CALL EPRINT
|
||||
DEFB ' of Command Processor!'
|
||||
DEFB 0
|
||||
JP EXIT
|
||||
|
||||
; display version
|
||||
PVRSION: PUSH AF
|
||||
CALL EPRINT
|
||||
DEFB CR,LF,' Configuring Options for CPR Version : '
|
||||
DEFB 0
|
||||
POP AF ; restore version #
|
||||
PUSH AF
|
||||
RRCA ; rotate upper nybble to lower
|
||||
RRCA ; (major version #)
|
||||
RRCA
|
||||
RRCA
|
||||
AND 00001111B ; mask lower nybble
|
||||
ADD A,'0' ; ..and convert to ascii
|
||||
CALL COUT ; display major version #
|
||||
LD A,'.'
|
||||
CALL COUT
|
||||
POP AF ; restore version #
|
||||
AND 00001111B ; mask lower nybble
|
||||
ADD A,'0' ; ..and convert to ascii
|
||||
CALL COUT ; display minor version #
|
||||
CALL CRLF
|
||||
LD DE,10 ; move forward by another 10 bytes
|
||||
ADD HL,DE ; (in Z40-1.Z80 three bytes are defined as 'Space
|
||||
; reserved for expansion' - this is the last byte)
|
||||
LD (PFLGADR),HL ; store addr
|
||||
|
||||
; branch interactive/cmdline mode
|
||||
LD A,(CPMFCB+1) ; get first char from cmdline
|
||||
CP ' ' ; is it <SP> ?
|
||||
JP NZ,EVALCMD ; ..if not, jump cmdline mode
|
||||
CALL EPRINT ; else, interactive mode
|
||||
DEFB CR,LF,'Turn Time ON in Prompt Line ([Y]/N)? : '
|
||||
DEFB 0
|
||||
CALL CAPIN ; get user input
|
||||
LD BC,0FE01H ; default to ON, European format
|
||||
; ( 11111110 00000001 B )
|
||||
CP 'N' ; is it 'N' ?
|
||||
JR NZ,RUNIMOD ; ..if not, skip over
|
||||
LD C,0 ; else, clear C (indicating OFF)
|
||||
|
||||
; run interactive mode
|
||||
RUNIMOD: CALL SETOPTB ; set byte
|
||||
CALL EPRINT
|
||||
DEFB CR,LF,'US (mm/dd/yy) or European (dd.mm.yy) Dates ([U]/E) : '
|
||||
DEFB 0
|
||||
CALL CAPIN ; get user input
|
||||
LD BC,0FD00H ; default to US format
|
||||
; ( 11111101 00000000 B )
|
||||
CP 'E' ; is it 'E' ?
|
||||
JR NZ,RUNIM0 ; ..if not, skip over
|
||||
LD C,00000010B ; else, set European format
|
||||
RUNIM0: CALL SETOPTB ; set byte
|
||||
JP EXIT
|
||||
|
||||
; evaluate command line
|
||||
EVALCMD: LD HL,CPMDMA
|
||||
LD A,(HL) ; get # of chars
|
||||
INC HL ; set ptr to start of cmdline
|
||||
PUSH HL ; save regs
|
||||
CALL ADDHLA ; move ptr to end of cmdline
|
||||
LD (HL),0 ; set <NUL> terminator
|
||||
POP HL ; restore start of cmdline
|
||||
CALL SKPWHSP ; skip any whitespace at the beginning
|
||||
LD A,(HL) ; get char
|
||||
CP '/' ; is it option char ?
|
||||
JR NZ,ECMD0 ; ..if not, skip over
|
||||
INC HL ; else, move ptr forward
|
||||
ECMD0: LD A,(HL) ; get byte
|
||||
OR A
|
||||
JR Z,ECMD1 ; ..if zero, jump and exit
|
||||
CALL CMPRMPT ; else, attempt processing option
|
||||
JR ECMD0 ; ..and loop
|
||||
|
||||
ECMD1: JP EXIT
|
||||
|
||||
|
||||
; cmdline: /T[+|-] Toggle Time in Prompt
|
||||
; option byte, bit 0 = 0 off / 1 on
|
||||
;
|
||||
; cmdline: /U /E US/Europe format
|
||||
; option byte, bit 1 = 0 US / 1 European
|
||||
|
||||
; process prompt on/off
|
||||
CMPRMPT: CP 'T' ; is char 'T' (Toggle) ?
|
||||
JR NZ,CMFORMT ; ..if not, try processing format option
|
||||
INC HL
|
||||
LD C,00000001B ; prepare for ON
|
||||
LD A,(HL) ; get next char
|
||||
CP '+' ; is it '+' ?
|
||||
JR Z,CMPRMP0 ; ..if so, skip over
|
||||
LD C,00000000B ; else, prepare for OFF
|
||||
CP '-' ; is it '-' ?
|
||||
JR NZ,CMFORMT ; ..if not, rather check format
|
||||
CMPRMP0: LD B,11111110B ; default to European format
|
||||
|
||||
CMSETOP: CALL SETOPTB ; set
|
||||
CMSETX: INC HL ; move ptr fwd
|
||||
RET ; ..and exit
|
||||
|
||||
; process format
|
||||
CMFORMT: LD B,11111101B ; default to ON (else, format wouldn't make sense)
|
||||
LD C,00000010B ; prepare for European
|
||||
CP 'E' ; is it 'E' ?
|
||||
JR Z,CMSETOP ; ..if so, set byte
|
||||
LD C,00000000B ; else, prepare for US
|
||||
CP 'U' ; is it 'U' ?
|
||||
JR Z,CMSETOP ; ..if so, set byte
|
||||
JR CMSETX ; jump exit
|
||||
|
||||
|
||||
; set option byte
|
||||
; in: B= format (US/European)
|
||||
; C= on/off
|
||||
SETOPTB: EX DE,HL ; swap regs (save HL)
|
||||
LD HL,(PFLGADR) ; addr of Prompt flag in ZCPR4 config area
|
||||
LD A,(HL) ; get byte
|
||||
AND B ; apply format setting
|
||||
OR C ; merge on/off setting
|
||||
LD (HL),A ; ..and save byte
|
||||
LD HL,010FH ; offset to option byte in SYSBNK
|
||||
CALL GETFRB ; get current setting
|
||||
AND B ; apply format setting
|
||||
OR C ; merge on/off setting
|
||||
CALL SETINB ; ..and write back
|
||||
EX DE,HL
|
||||
RET
|
||||
|
||||
|
||||
; check if help was requested
|
||||
; get first token from command line (in FCB #1)
|
||||
CHKHLP: LD HL,CPMFCB+1
|
||||
LD A,(HL) ; get char
|
||||
CP '/' ; is this a help request ?
|
||||
RET NZ ; ..if not, return
|
||||
INC HL ; move ptr fwd
|
||||
LD A,(HL) ; check following char
|
||||
CP '/' ; if it is also '/'
|
||||
RET NZ ; ..if not, return
|
||||
; else, fall through and show help screen
|
||||
|
||||
|
||||
;::::: HELP SCREEN
|
||||
|
||||
HELP: CALL EPRINT
|
||||
DEFB CR,LF,' '
|
||||
DEFB 0
|
||||
CALL PPRGNAM
|
||||
CALL EPRINT
|
||||
DEFB ' Configure Running B/P Command Processor Options.',CR,LF,LF
|
||||
DEFB ' Syntax:',CR,LF,' '
|
||||
DEFB 0
|
||||
CALL PPRGNAM
|
||||
CALL EPRINT
|
||||
DEFB ' - Configure in Interactive Mode',CR,LF,' '
|
||||
DEFB 0
|
||||
CALL PPRGNAM
|
||||
CALL EPRINT
|
||||
DEFB ' /T[+|-] - Toggle Time in Prompt [Set On/Off]',CR,LF,' '
|
||||
DEFB 0
|
||||
CALL PPRGNAM
|
||||
CALL EPRINT
|
||||
DEFB ' /E - Display Date in European (dd.mm.yy) form',CR,LF,' '
|
||||
DEFB 0
|
||||
CALL PPRGNAM
|
||||
CALL EPRINT
|
||||
DEFB ' /U - Display Date in US (mm/dd/yy) form',CR,LF,' '
|
||||
DEFB 0
|
||||
CALL PPRGNAM
|
||||
CALL EPRINT
|
||||
DEFB ' // - display this screen',CR,LF,LF
|
||||
DEFB ' Arguments may be combined as:',CR,LF,' '
|
||||
DEFB 0
|
||||
CALL PPRGNAM
|
||||
CALL EPRINT
|
||||
DEFB ' /T+U - Turn Time On, US-style Date Display',CR,LF,LF
|
||||
DEFB 'This program will only run in Banked B/P Systems.',CR,LF
|
||||
DEFB 0
|
||||
|
||||
|
||||
;::::: EXIT PROGRAM
|
||||
|
||||
EXIT: CALL CRLF
|
||||
LD SP,(STACK) ; restore stack
|
||||
RET ; ..and return to system
|
||||
|
||||
|
||||
;::::: SUPPORT FUNCTIONS
|
||||
|
||||
; init Z3ENV and check Wheel byte
|
||||
; if not successful, exit program
|
||||
INITZ3: LD HL,(CPMBDOS+1)
|
||||
CALL WHRENV ; find Z3 Environment Descriptor
|
||||
LD (ENVADR),HL ; store ENV addr
|
||||
LD A,H ; check if invalid (= zero)
|
||||
OR L
|
||||
JP Z,E$BPBIO ; ..if so, jump exit
|
||||
CALL Z3INIT ; init for Z3LIB routines
|
||||
LD A,41 ; offset to addr wheel byte (Z3WHL)
|
||||
CALL ADDHLA ; move ptr fwd
|
||||
LD E,(HL) ; get addr in DE
|
||||
INC HL
|
||||
LD D,(HL)
|
||||
EX DE,HL ; swap regs
|
||||
LD A,(HL) ; get value of wheel byte
|
||||
AND A ; check if zero
|
||||
RET NZ ; ..if not ON, return
|
||||
CALL EPRINT ; else, display message and exit
|
||||
DEFB BEL,CR,LF,'Must be wheel to Execute !',CR,LF
|
||||
DEFB 0
|
||||
JR EXIT
|
||||
|
||||
|
||||
; check if running under B/P Bios
|
||||
; if not, program is terminated
|
||||
CHKSYS: LD HL,(CPMBIOS+1) ; get warm boot addr (BIOS fn #1)
|
||||
LD L,30*3 ; adjust ptr to fn #30
|
||||
LD A,(HL) ; check byte at ptr location
|
||||
CP 0C3H ; is it opcode 0xC3 (JP) ?
|
||||
JR NZ,E$BPBIO ; ..if not, jump error and exit
|
||||
CALL JUMPHL ; else, "call" B/P Bios fn #30 (RETBIO)
|
||||
LD (BPADDR),BC ; store base addr of B/P Bios
|
||||
LD (BPCNFG),DE ; " config area addr
|
||||
LD HL,-6 ; move ptr 6 bytes backward
|
||||
ADD HL,DE ; (signature string)
|
||||
LD A,(HL) ; get byte
|
||||
CP 'B' ; is it 'B' ?
|
||||
JR NZ,E$BPBIO ; ..if not, jump error and exit
|
||||
INC HL
|
||||
LD A,(HL) ; get next byte
|
||||
CP '/' ; is it '/' ?
|
||||
JR NZ,E$BPBIO ; ..if not, jump error and exit
|
||||
INC HL
|
||||
LD A,(HL) ; and get next byte
|
||||
CP 'P' ; is it 'P' ?
|
||||
RET Z ; ..if so, return
|
||||
; else, fall through (error and exit)
|
||||
|
||||
|
||||
; error msg
|
||||
E$BPBIO: CALL EPRINT
|
||||
DEFB CR,LF,BEL,'Not B/P Bios, aborting...!',CR,LF
|
||||
DEFB 0
|
||||
RST 0
|
||||
|
||||
|
||||
; print program name on CON: device
|
||||
; (either the actual name, or fallback to default)
|
||||
; only used by HELP
|
||||
PPRGNAM: LD A,(ENVADR+1) ; get high byte of local ENVPTR
|
||||
OR A ; check if valid (<> zero)
|
||||
JP NZ,PRTNAME ; ..if so, display actual name
|
||||
; and let return from there
|
||||
CALL EPRINT ; else, display default
|
||||
DEFB 'SIZERAM' ; apparently wrong :-)
|
||||
DEFB 0
|
||||
RET
|
||||
|
||||
|
||||
; skip whitespace (<SP> or <TAB>)
|
||||
; in: HL= ptr to string
|
||||
; out: HL= ptr to first char <> whitespace
|
||||
SKPWHSP: DEC HL ; prior to loop, set ptr back
|
||||
SKPWH0: INC HL ; move ptr fwd
|
||||
LD A,(HL) ; get byte
|
||||
CP ' ' ; is it <SP> ?
|
||||
JR Z,SKPWH0 ; ..if so, loop
|
||||
CP TAB ; is it <TAB> ?
|
||||
JR Z,SKPWH0 ; ..if so, loop
|
||||
RET ; else, return
|
||||
|
||||
|
||||
; add A to HL (result in HL)
|
||||
ADDHLA: ADD A,L ; add L
|
||||
LD L,A ; store result in L
|
||||
RET NC ; ..if no overflow, return
|
||||
INC H ; else, increment H
|
||||
RET
|
||||
|
||||
|
||||
; the following routines rearrange Top of Stack by injecting an
|
||||
; intermediate return addr, and putting the Bios fn call on top
|
||||
; so that HL regs are preserved
|
||||
; order of steps:
|
||||
; [1] HL (= addr) is pushed onto stack
|
||||
; [2] intermediate return addr is swapped to Top of Stack
|
||||
; [3] HL (= addr) is pushed onto stack again
|
||||
; [4] Bios fn JP addr is swapped to Top of Stack
|
||||
; [5] Bios is "called" through RET, and returns to intermediate addr
|
||||
|
||||
; get byte from ram bank (in C) - in the form LD A,(HL)
|
||||
; in: HL= addr
|
||||
; out: A= byte
|
||||
GETFRB: PUSH BC
|
||||
PUSH HL ; save addr
|
||||
LD BC,(SYSBNK) ; C= System Bank, B= not used
|
||||
LD HL,GETFRB0 ; load return addr
|
||||
EX (SP),HL ; put it on stack
|
||||
PUSH HL ; save HL again (previous top of stack)
|
||||
LD HL,(BPADDR) ; get B/P Bios base addr
|
||||
LD L,35*3 ; adjust ptr to fn #35 (FRGETB)
|
||||
EX (SP),HL ; put addr on stack
|
||||
RET ; ..and "call" Bios fn through stack
|
||||
|
||||
GETFRB0: POP BC ; restore regs
|
||||
RET ; ..and finally return
|
||||
|
||||
; set byte in ram bank (in C) - in the form LD (HL),A
|
||||
; in: HL= addr, A= byte to set
|
||||
SETINB: PUSH BC
|
||||
PUSH HL ; save addr
|
||||
LD BC,(SYSBNK)
|
||||
LD HL,GETFRB0 ; load return addr
|
||||
EX (SP),HL ; put it on stack
|
||||
PUSH HL ; save HL again (previous top of stack)
|
||||
LD HL,(BPADDR) ; get B/P Bios base addr
|
||||
LD L,37*3 ; adjust ptr to fn #37 (FRPUTB)
|
||||
EX (SP),HL
|
||||
RET ; ..and "call" Bios fn through stack
|
||||
|
||||
|
||||
; "called" as a pseudo-routine that returns to caller
|
||||
; in: HL= target addr
|
||||
JUMPHL: JP (HL) ; jump to addr in HL regs
|
||||
|
||||
|
||||
;::::: RAM STORAGE (_no_ DSEG !)
|
||||
|
||||
PFLGADR: DEFW 0 ; addr of Prompt flag (last reserved option byte)
|
||||
SYSBNK: DEFB 0 ; beginning of System Bank(s)
|
||||
UNUSED1: DEFB 0 ; #####
|
||||
BPADDR: DEFW 0 ; base addr B/P Bios
|
||||
BPCNFG: DEFW 0 ; addr of B/P Bios CONFIG area
|
||||
BPBNKD: DEFB 0 ; indicator banked system
|
||||
; (bit 0 of OPTF1, 0= unbanked, 1= banked)
|
||||
|
||||
DEFS 30H ; room for stack
|
||||
STACK: DEFW 0 ; stack storage location
|
||||
|
||||
|
||||
END
|
||||
|
||||
|
||||
;:::::::::::::::::::::::::::::::::::::::::::::::::::::
|
||||
; Z3LIB - 0x06b4
|
||||
; SYSLIB - 0x0762
|
||||
; end addr 0x080a (begin DSEG of LIB's)
|
||||
;:::::::::::::::::::::::::::::::::::::::::::::::::::::
|
||||
|
||||
|
||||
;************************************************************************
|
||||
; Remarks jxl:
|
||||
; CONFZ4.COM, included in available B/P Bios package(s), was dis-
|
||||
; assembled and extensively commented. Labels are up to seven chars long
|
||||
; to comply with M-REL standards. However, it is recommended to use SLR
|
||||
; tools that support labels up to sixteen chars.
|
||||
; In its current state, the compiled/linked file matches exactly the
|
||||
; original CONFZ4.COM, i.e. no changes to the source were made. Possible
|
||||
; optimisations detected during disassembly are marked with "#####" in the
|
||||
; comment.
|
||||
; The program seems to be in an early stage as it does not comply with
|
||||
; general coding standards seen by HFB/CWC. For instance, no DSEG is used.
|
||||
; Only 2 options can be configured with this program. It is not known
|
||||
; whether provisions were made in ZCPR v4.1 for further options.
|
||||
;************************************************************************
|
||||
752
Source/BPBIOS/UTIL/hashini.z80
Normal file
752
Source/BPBIOS/UTIL/hashini.z80
Normal file
@@ -0,0 +1,752 @@
|
||||
TITLE "HASHINI Drive Utility"
|
||||
;************************************************************************
|
||||
;* H A S H I N I *
|
||||
;* Set Drive Volume Name and Init for File Stamps *
|
||||
;* by Harold F. Bower and Cameron W. Cotrill *
|
||||
;*----------------------------------------------------------------------*
|
||||
;* Disassembly: jxl Mar 2025 *
|
||||
;* public release 1.0 Apr 2025 *
|
||||
;* see remarks at the end *
|
||||
;*----------------------------------------------------------------------*
|
||||
;* LINK with Version 4 libraries: Z3LIB, SYSLIB *
|
||||
;* *
|
||||
;* A>Z80ASM HASHINI/RS *
|
||||
;* A>SLRNK HASHINI/N,/A:100,/D:09E5,HASHINI,Z3LIBS/S,SYSLIBS/S,/E *
|
||||
;************************************************************************
|
||||
|
||||
VER EQU 02
|
||||
REV EQU ' '
|
||||
|
||||
DATE MACRO
|
||||
DEFB '12 Sep 93'
|
||||
ENDM
|
||||
|
||||
|
||||
CTRLC EQU 03H ; Control-C character
|
||||
BEL EQU 07H ; Bell character
|
||||
BS EQU 08H ; Backspace character
|
||||
TAB EQU 09H ; Tab character
|
||||
LF EQU 0AH ; Line Feed character
|
||||
CR EQU 0DH ; Carriage Return character
|
||||
ESC EQU 1BH ; Escape character
|
||||
|
||||
CPMBIOS EQU 0 ; CP/M BIOS warm boot (JP)
|
||||
CPMBDOS EQU 5 ; CP/M BDOS entry point (JP)
|
||||
CPMFCB EQU 5CH ; CP/M standard FCB #1 (+1 filename, +9 filetype)
|
||||
CPMFCB2 EQU 6CH ; CP/M standard FCB #2
|
||||
CPMDMA EQU 80H ; CP/M standard DMA buffer
|
||||
|
||||
|
||||
; From Z3LIB Get..
|
||||
EXTRN GETNAME, PRTNAME, GETQUIET, Z3INIT
|
||||
|
||||
; From SYSLIB Get..
|
||||
EXTRN BLINE, EPRINT, CRLF, CAPIN, COUT, CODEND
|
||||
|
||||
|
||||
;::::: PROGRAM START
|
||||
|
||||
ORG 100H
|
||||
CSEG
|
||||
|
||||
|
||||
HASHINI: JP START ; bypass header
|
||||
DEFB 'Z3ENV' ; this is a ZCPR3 utility
|
||||
DEFB 1 ; show external environment
|
||||
DEFB 1
|
||||
|
||||
ENVADR: DEFW 0 ; addr of Z3 environment
|
||||
|
||||
DEFB 1
|
||||
DEFB 'HASHINI '
|
||||
DEFB 0
|
||||
|
||||
; config area (for ZNCFG.COM)
|
||||
CFGAREA: DEFB 0 ; default value for program quiet flag
|
||||
DEFB 0FFH
|
||||
|
||||
START: LD (STACK),SP ; save stack
|
||||
LD SP,STACK
|
||||
CALL Z3INIT ; init ENVPTR for Z3LIB routines
|
||||
CALL GETNAME ; get ptr to program name
|
||||
CALL GETQUIET ; check ENV quiet flag
|
||||
LD HL,CFGAREA ; ptr to config area
|
||||
OR (HL) ; merge flags (ENV + program)
|
||||
LD (PRGQFLG),A ; store program quiet flag
|
||||
CALL EPRINT
|
||||
DEFB CR,LF,'Initialize Volume Label and File Stamps Ver '
|
||||
DEFB VER/10+'0','.',VER MOD 10 + '0',REV,' '
|
||||
DATE
|
||||
DEFB CR,LF
|
||||
DEFB 0
|
||||
LD C,25 ; get current disk (BDOS fn #25)
|
||||
CALL CPMBDOS
|
||||
LD (OLDDRV),A ; remember drive #
|
||||
CALL EVALCMD ; evaluate command line
|
||||
JR INITWSPC
|
||||
|
||||
|
||||
;::::: MAIN LOOP
|
||||
|
||||
START0: LD SP,STACK ; reset stack pointer
|
||||
CALL EPRINT
|
||||
DEFB CR,LF,LF,'Initialize another Disk? (Y/[N]) : '
|
||||
DEFB 0
|
||||
CALL CINPUT ; get user input
|
||||
CP 'Y' ; is it 'Y' ?
|
||||
JP NZ,EXIT ; ..if not, jump to exit
|
||||
CALL SELODRV ; restore previously logged drive
|
||||
CALL CRLF
|
||||
OR 0FFH ; from now on run interactively
|
||||
|
||||
; init workspace (ram storage)
|
||||
INITWSPC: LD (RUNMODE),A ; store mode
|
||||
LD HL,WSPC ; clear workspace data area
|
||||
LD B,(STACK-WSPC)-3
|
||||
CALL FILLZ
|
||||
|
||||
|
||||
;::::: DISK DRIVE
|
||||
|
||||
GETDISK: LD A,(RUNMODE) ; get mode
|
||||
OR A ; running in cmdline mode ?
|
||||
JR Z,GETVOLN ; ..if so, drive is known, jump to continue
|
||||
|
||||
; interactive mode - ask for disk to initialize
|
||||
IMDISK: CALL EPRINT
|
||||
DEFB CR,LF,LF,'Initialize which Disk for '
|
||||
DEFB 0
|
||||
LD A,(STMPTYP) ; stamp format indicator
|
||||
OR A ; is it P2Dos ?
|
||||
JR NZ,IMDISK1 ; ..if not, jump to continue
|
||||
CALL EPRINT ; display chosen format
|
||||
DEFB 'P2DOS'
|
||||
DEFB 0
|
||||
JR IMDISK2 ; skip over
|
||||
IMDISK1: CALL EPRINT
|
||||
DEFB 'NZTIME'
|
||||
DEFB 0
|
||||
|
||||
IMDISK2: CALL EPRINT
|
||||
DEFB ' Date/Time Stamps? : '
|
||||
DEFB 0
|
||||
CALL CINPUT ; get user input
|
||||
CP 'A' ; disk drive letter must be
|
||||
JR C,IMDISK3 ; between 'A' and 'P'
|
||||
CP 'P'+1
|
||||
JR C,IMDISK4
|
||||
IMDISK3: CALL EPRINT ; else, notify user and loop
|
||||
DEFB BEL,BS,' ',BS
|
||||
DEFB 0
|
||||
JR IMDISK
|
||||
|
||||
IMDISK4: LD (CURRDSK),A ; store disk drive letter
|
||||
|
||||
|
||||
;::::: VOLUME NAME
|
||||
|
||||
GETVOLN: LD A,(VOLNAME)
|
||||
OR A
|
||||
JR NZ,IMVOLN3
|
||||
|
||||
; interactive mode - ask for volume name
|
||||
IMVOLN: CALL EPRINT
|
||||
DEFB CR,LF,'Enter Volume Name [1-11 chars] : '
|
||||
DEFB 0
|
||||
LD HL,CPMDMA ; set ptr to standard buffer
|
||||
LD (HL),11 ; prepare char count (max. 11 chars)
|
||||
XOR A ; clear A
|
||||
LD (CPMDMA+1),A ; prepare end-of-string
|
||||
DEC A ; let capitalize (A= non-zero)
|
||||
CALL BLINE ; get user input
|
||||
LD A,(HL) ; check char count
|
||||
OR A ; is it empty string (nothing entered) ?
|
||||
JR Z,IMVOLN ; ..if so, loop
|
||||
LD DE,VOLNAME ; point to volname buffer
|
||||
IMVOLN1: LD A,(HL) ; get char
|
||||
LDI ; ..and copy over
|
||||
OR A ; end of string ?
|
||||
JR NZ,IMVOLN1 ; ..if not, loop
|
||||
|
||||
IMVOLN3: LD A,(PRGQFLG) ; get program quiet flag
|
||||
OR A ; running in quiet mode ?
|
||||
JR Z,DSKPROC ; ..if so, skip over
|
||||
CALL EPRINT
|
||||
DEFB CR,LF,' Confirm Initialize Drive '
|
||||
DEFB 0
|
||||
LD A,(CURRDSK)
|
||||
CALL COUT
|
||||
CALL EPRINT
|
||||
DEFB ': (Y/[N]) '
|
||||
DEFB 0
|
||||
CALL CINPUT ; get user input
|
||||
CP 'Y'
|
||||
JP NZ,FINISH
|
||||
|
||||
|
||||
;::::: PROCESS DISK
|
||||
|
||||
DSKPROC: LD A,(CURRDSK) ; get current disk drive letter
|
||||
SUB 'A' ; make numeric
|
||||
PUSH AF ; save regs
|
||||
LD E,A ; drive # in E
|
||||
CALL BDSELD ; select disk drive (BDOS call)
|
||||
CALL EPRINT ; display warning
|
||||
DEFB BEL,CR,LF,'+++ Existing Files will be ERASED! +++'
|
||||
DEFB CR,LF,' --- Proceed anyway (Y/[N]) : '
|
||||
DEFB 0
|
||||
|
||||
CALL CINPUT ; get user input
|
||||
CP 'Y' ; is it 'Y' ?
|
||||
JP NZ,FINISH ; ..if not, jump to finish processing
|
||||
POP AF ; restore regs
|
||||
LD C,A ; drive # in C
|
||||
CALL BIOSELD ; select disk drive (BIOS call)
|
||||
LD A,H ; check if DPH addr is valid
|
||||
OR L
|
||||
JP Z,E$DRVILL ; ..if not, jump display error msg and exit
|
||||
|
||||
; get parameters of current disk drive
|
||||
LD E,(HL) ; get addr of skew table in DE
|
||||
INC HL
|
||||
LD D,(HL)
|
||||
LD (SKEWTBL),DE ; and store value
|
||||
LD DE,9
|
||||
ADD HL,DE ; move ptr fwd (to DPH+10)
|
||||
LD E,(HL) ; addr of DPB in DE
|
||||
INC HL
|
||||
LD D,(HL)
|
||||
PUSH DE ; move addr to IX
|
||||
POP IX
|
||||
|
||||
; ??? ##### CODEND not used
|
||||
CALL CODEND ; get first free memory page addr in HL
|
||||
|
||||
LD D,(IX+8) ; get DirMax in DE
|
||||
LD E,(IX+7) ; (max. dir entries -1)
|
||||
INC DE ; +1
|
||||
LD (DIRMAX),DE ; store value
|
||||
SRL D ; /2
|
||||
RR E
|
||||
SRL D ; /4
|
||||
RR E
|
||||
LD (STMPMAX),DE ; store value
|
||||
; (1 stamp dir entry for 4 file dir entries)
|
||||
LD BC,0
|
||||
LD HL,CPMDMA ; set to standard buffer
|
||||
PUSH DE ; save regs
|
||||
PUSH BC
|
||||
LD DE,VOLNAME ; ptr to volume name
|
||||
LD A,(DE) ; get char
|
||||
OR A ; is it zero ? (<NUL> means empty string)
|
||||
LD B,3*32 ; prepare counter for 3 stamp entries
|
||||
JR Z,MKSTMP ; ..if no volume name, jump to continue
|
||||
|
||||
; make a volume name entry
|
||||
; HL= ptr to standard buffer, DE= ptr to VOLNAME
|
||||
; B= char count, C= char
|
||||
LD (HL),020H ; set first byte of dir entry (user area)
|
||||
; to 0x20 - indicates time stamp
|
||||
INC HL ; move ptr fwd
|
||||
LD B,11 ; number of chars
|
||||
MKVOLN: LD A,(DE) ; get VOLNAME char in A
|
||||
LD C,' ' ; prepare for <NUL> byte
|
||||
OR A ; end of string ?
|
||||
JR Z,MKVOLN1 ; ..if so, skip over
|
||||
LD C,A ; else, get char in C
|
||||
INC DE ; move VOLNAME ptr forward
|
||||
MKVOLN1: LD (HL),C ; copy char to buffer
|
||||
INC HL ; move ptr fwd
|
||||
DJNZ MKVOLN ; loop till done
|
||||
LD B,32-12 ; clear remaining bytes of stamp entry
|
||||
CALL FILLZ
|
||||
LD B,2*32 ; fill next 2 stamp entries
|
||||
|
||||
; make a stamp entry and write to dir
|
||||
MKSTMP: LD A,0E5H ; CP/M default byte for free dir entries
|
||||
CALL FILLA ; fill stamp entries
|
||||
LD A,(STMPTYP) ; get chosen stamp format (0x00 = P2Dos, 0xFF = NZTime)
|
||||
OR A ; ..and check
|
||||
LD A,021H ; prepare for P2Dos
|
||||
JR Z,MKSTMP1 ; ..if so, skip over
|
||||
LD A,0A1H ; else, prepare for NZTime
|
||||
MKSTMP1: LD (HL),A ; store byte
|
||||
INC HL ; move ptr fwd
|
||||
LD B,32-1 ; ..and clear remaining bytes of stamp entry
|
||||
CALL FILLZ
|
||||
POP BC ; restore regs
|
||||
POP DE
|
||||
CALL PVBOSE ; if verbose mode, display msg
|
||||
DEFB CR,LF,'...Writing Initialized Directory...'
|
||||
DEFB 0
|
||||
|
||||
LD DE,0 ; initial start #
|
||||
LD (STMPCUR),DE ; set # of current stamp entry
|
||||
CALL WRSTMP ; ..and write stamp to directory
|
||||
LD HL,CPMDMA ; reset ptr to begin of standard buffer
|
||||
LD A,0E5H ; clear first part of stamp entry
|
||||
LD B,32
|
||||
CALL FILLA
|
||||
MKSTMP2: CALL WRSTMP ; ..and write next stamp entry
|
||||
LD HL,(STMPCUR) ; get current #
|
||||
LD DE,(STMPMAX) ; get max. #
|
||||
OR A ; clear flags
|
||||
SBC HL,DE ; check if all entries were written
|
||||
ADD HL,DE
|
||||
JR NZ,MKSTMP2 ; ..if not, loop
|
||||
LD BC,1 ; set C= 1 to indicate Directory Write (forced)
|
||||
CALL BIOWRIT ; ..and perform through BIOS
|
||||
JP DSKDONE
|
||||
|
||||
|
||||
; display help and exit
|
||||
HLPEXIT: XOR A ; clear A
|
||||
LD (RUNMODE),A ; ..and store mode (cmdline)
|
||||
JR HELP
|
||||
|
||||
E$DRVILL: CALL EPRINT ; display error msg and fall through
|
||||
DEFB CR,LF,LF,BEL,'Illegal drive name'
|
||||
DEFB 0
|
||||
|
||||
|
||||
;::::: HELP
|
||||
|
||||
HELP: CALL EPRINT
|
||||
DEFB CR,LF,'Usage: Set Drive Volume Name & '
|
||||
DEFB 'Initialize for P2Dos/NzTime file stamps',CR,LF,LF
|
||||
DEFB 'Syntax:',CR,LF,TAB
|
||||
DEFB 0
|
||||
CALL PPRGNAM
|
||||
CALL EPRINT
|
||||
DEFB ' [d:][volname] [/][P | Z | Q]',CR,LF
|
||||
DEFB 'Examples:',CR,LF,TAB
|
||||
DEFB 0
|
||||
CALL PPRGNAM
|
||||
CALL EPRINT
|
||||
DEFB TAB,'- Enter Interactive Mode',CR,LF,TAB
|
||||
DEFB 0
|
||||
CALL PPRGNAM
|
||||
CALL EPRINT
|
||||
DEFB ' /P',TAB,'- Init Drive interactively w/P2D stamps',CR,LF,TAB
|
||||
DEFB 0
|
||||
CALL PPRGNAM
|
||||
CALL EPRINT
|
||||
DEFB ' d:',TAB,'- Initialize drive "d" w/default Stamp',CR,LF,TAB
|
||||
DEFB 0
|
||||
CALL PPRGNAM
|
||||
CALL EPRINT
|
||||
DEFB ' d:name',TAB,'- Init drive "d" adding Vol ID "name"',CR,LF,TAB
|
||||
DEFB TAB,TAB,' file with default Stamps',CR,LF,TAB
|
||||
DEFB 0
|
||||
CALL PPRGNAM
|
||||
CALL EPRINT
|
||||
DEFB ' d: ZQ',TAB,'- Init drive "d" for NZTime Stamps',CR,LF,TAB
|
||||
DEFB TAB,TAB,' suppressing unneeded messages',CR,LF,TAB
|
||||
DEFB 0
|
||||
CALL PPRGNAM
|
||||
CALL EPRINT
|
||||
DEFB ' //',TAB,'- Display this message',CR,LF,LF
|
||||
DEFB 'Note: ZCNFG may be used to configure a flag to suppress',CR,LF
|
||||
DEFB ' drive confirmation prompt and status messages',CR,LF
|
||||
DEFB 0
|
||||
|
||||
JP FINISH
|
||||
|
||||
|
||||
; print program name on CON: device
|
||||
; (either the actual name, or fallback to default)
|
||||
; only used by HELP
|
||||
PPRGNAM: LD A,(ENVADR) ; get high byte of ENV ptr
|
||||
OR A ; check if valid (<> zero)
|
||||
JP NZ,PRTNAME ; ..if so, display actual name
|
||||
; and let return from there
|
||||
CALL EPRINT ; else, display default name
|
||||
DEFB 'HASHINI'
|
||||
DEFB 0
|
||||
RET
|
||||
|
||||
|
||||
; write a stamp entry to directory
|
||||
; in: IX= ptr DPB
|
||||
; STMPCUR= # of current stamp entry
|
||||
WRSTMP: PUSH BC ; save regs
|
||||
PUSH DE
|
||||
PUSH HL
|
||||
LD HL,0
|
||||
LD BC,(STMPCUR) ; get # of current stamp entry
|
||||
LD D,(IX+1) ; get sectors per track (DPB+0)
|
||||
LD E,(IX+0)
|
||||
LD A,17 ; set counter
|
||||
|
||||
; determine track # (in BC) and sector # (in HL)
|
||||
WRSTMP1: OR A ; clear flags
|
||||
SBC HL,DE ; divide by subtraction
|
||||
CCF ; inverse C-flag
|
||||
JR C,WRSTMP2
|
||||
ADD HL,DE ; compensate overflow
|
||||
OR A ; clear flags
|
||||
WRSTMP2: RL C ; divide BC by 2 (track #)
|
||||
RL B
|
||||
DEC A ; decrease counter
|
||||
JR Z,WRSTMP3 ; ..if zero, exit loop
|
||||
RL L ; else, also divide HL by 2 (sector #)
|
||||
RL H
|
||||
JR WRSTMP1 ; and continue
|
||||
|
||||
WRSTMP3: PUSH HL ; save (log.) sector #
|
||||
LD H,(IX+14) ; get track offset (# sys tracks)
|
||||
LD L,(IX+13)
|
||||
ADD HL,BC ; add to calculated track #
|
||||
LD B,H
|
||||
LD C,L
|
||||
CALL BIOSTTR ; set track
|
||||
POP BC ; restore (log.) sector #
|
||||
LD DE,(SKEWTBL) ; get addr of skew table
|
||||
CALL BIOSTRN ; translate logical to physical sector
|
||||
LD B,H
|
||||
LD C,L
|
||||
CALL BIOSTSE ; set (phys.) sector
|
||||
LD BC,CPMDMA ; set buffer addr
|
||||
CALL BIOSTDM
|
||||
LD BC,0 ; set C= 0 to indicate Unallocated Write
|
||||
CALL BIOWRIT ; ..and perform through BIOS
|
||||
OR A ; check for error
|
||||
JR Z,WRSTMPX ; ..if not, jump to exit subroutine
|
||||
CALL EPRINT ; else, display msg
|
||||
DEFB CR,LF,BEL,'Directory write error'
|
||||
DEFB 0
|
||||
JR FINISH
|
||||
|
||||
WRSTMPX: LD BC,(STMPCUR) ; get current stamp #
|
||||
INC BC ; increase
|
||||
LD (STMPCUR),BC ; ..and save again
|
||||
POP HL ; restore regs
|
||||
POP DE
|
||||
POP BC
|
||||
RET
|
||||
|
||||
|
||||
; select disk drive that was logged at start of program
|
||||
; using BIOS fn first, then BDOS fn
|
||||
SELODRV: LD A,(OLDDRV) ; get # of old logged disk drive
|
||||
LD C,A ; in C
|
||||
LD B,0
|
||||
PUSH BC ; save it
|
||||
LD DE,1 ; ??? ##### not necessary
|
||||
CALL BIOSELD ; select disk drive (through BIOS)
|
||||
POP DE ; restore drive # in E
|
||||
; ..and fall through
|
||||
|
||||
|
||||
; call BDOS fn #14 SELDSK
|
||||
; in: E= drive #
|
||||
BDSELD: LD C,14
|
||||
JP CPMBDOS ; jump BDOS and let return from there
|
||||
|
||||
|
||||
;::::: FINISH PROCESSING DISK
|
||||
|
||||
FINISH: CALL SELODRV ; restore previously logged drive
|
||||
; ..and fall through
|
||||
|
||||
DSKDONE: LD A,(CURRDSK)
|
||||
SUB 40H ; make numeric
|
||||
LD B,A ; use value as counter
|
||||
SCF ; set C-flag
|
||||
LD HL,0 ; start with all bits cleared
|
||||
DSKDN0: ADC HL,HL ; shift Carry bit into position
|
||||
DJNZ DSKDN0 ; loop till done
|
||||
EX DE,HL ; bit mask in DE (selected disk drive)
|
||||
LD C,37 ; BDOS fn #37 RESDSK reset disk system
|
||||
CALL CPMBDOS
|
||||
LD A,(RUNMODE) ; get mode
|
||||
OR A ; running in cmdline mode ?
|
||||
JP NZ,START0 ; ..if not, loop for next drive
|
||||
; else, fall through and exit
|
||||
|
||||
|
||||
;::::: EXIT PROGRAM
|
||||
|
||||
EXIT: LD SP,(STACK) ; restore stack
|
||||
RET ; ..and return to system
|
||||
|
||||
|
||||
;::::: SUPPORT FUNCTIONS
|
||||
|
||||
; EVALCMD Evaluate command line
|
||||
; based on tokens provided by CP/M parser in FCB #1/#2
|
||||
; in: A= # of current drive
|
||||
; out: A= 0x00 cmdline mode, 0xFF interactive mode
|
||||
; Syntax: [d:][volname] [/][P | Z | Q]
|
||||
EVALCMD: XOR A ; clear A
|
||||
LD (CURRDSK),A ; ..and variables
|
||||
LD (RUNMODE),A
|
||||
LD HL,CPMFCB ; set ptr to standard FCB #1
|
||||
LD A,(HL) ; get drive #
|
||||
OR A ; check if zero
|
||||
JR Z,ECMD1 ; ..if so, skip over
|
||||
ADD A,40H ; else, make ascii
|
||||
CP 'P'+1 ; check if valid
|
||||
JR NC,ECMD1 ; ..if not, skip over
|
||||
LD (CURRDSK),A ; else, save disk drive letter
|
||||
ECMD1
|
||||
INC HL ; move ptr fwd
|
||||
LD A,(HL) ; get char
|
||||
LD DE,VOLNAME ; ptr to buffer for volume name
|
||||
LD B,11 ; max. 11 chars
|
||||
CP ' ' ; is it <SP> ?
|
||||
JR Z,ECMD2 ; ..if so, jump to continue
|
||||
CP '/' ; is it option or help request ?
|
||||
JR NZ,ECMD1V ; ..if not, jump to copy volume name
|
||||
INC HL ; else, move ptr fwd
|
||||
CP (HL) ; and check next char
|
||||
JP Z,HLPEXIT ; ..if also '/', jump to display help
|
||||
JR ECMD3OPT ; else, this char indicates an option
|
||||
|
||||
; volume name found, copy it
|
||||
ECMD1V0: LD A,(HL) ; get char
|
||||
ECMD1V: CP ' ' ; is it <SP> ?
|
||||
JR Z,ECMD2 ; ..if so, jump to continue
|
||||
LD (DE),A ; save char in VOLNAME buffer
|
||||
INC DE ; move both ptr's forward
|
||||
INC HL
|
||||
DJNZ ECMD1V0 ; loop till done
|
||||
|
||||
; eval 2nd cmdline token (FCB #2)
|
||||
ECMD2: XOR A ; clear A
|
||||
LD (DE),A ; store in VOLNAME to indicate no name
|
||||
LD HL,CPMFCB2+1 ; set ptr to standard FCB #2, after drive letter
|
||||
LD A,(HL) ; get char
|
||||
CP '/' ; is it option or help request ?
|
||||
JR NZ,ECMD3OPT ; ..if not, letter must be an option, so skip over
|
||||
INC HL ; else, move ptr fwd
|
||||
CP (HL) ; and check next char
|
||||
JP Z,HLPEXIT ; ..if also '/', jump to display help
|
||||
|
||||
; eval option and done
|
||||
ECMD3OPT: CALL EVLOPT ; eval option
|
||||
RET NZ ; if error, switch to interactive mode and return
|
||||
; else, continue final check
|
||||
LD HL,CPMFCB ; set ptr to standard FCB #1
|
||||
LD A,(HL) ; get byte
|
||||
OR A ; is it zero ?
|
||||
JR Z,ECMDIM ; ..if so, jump done (interactive mode)
|
||||
INC HL ; move ptr fwd
|
||||
LD A,(HL) ; get char
|
||||
CP ' ' ; is it <SP> ?
|
||||
JR NZ,ECMDCM ; ..if not, jump done (cmdline mode)
|
||||
LD A,(CPMFCB2+1) ; get char of 2nd token
|
||||
CP ' ' ; is it <SP> ?
|
||||
JR NZ,ECMDCM ; ..if not, jump done (cmdline mode)
|
||||
; else, fall through (interactive mode)
|
||||
|
||||
ECMDIM: OR 0FFH ; set status (interactive mode)
|
||||
RET
|
||||
ECMDCM: XOR A ; set status (cmdline mode)
|
||||
RET
|
||||
|
||||
|
||||
; evaluate _one_ option on cmdline
|
||||
; in: HL= ptr to char (already behind a leading '/')
|
||||
; out: A= 0x00 cmdline mode, 0xFF interactive mode
|
||||
; Z-flag reset (NZ) in case of error, i.e. interactive mode
|
||||
; possible flags are /Q (quiet), /P (P2Dos stamps), /Z (NZTime stamps)
|
||||
EVLOPT: LD B,7 ; max. 7 chars
|
||||
|
||||
EVLOPTQ: LD A,(HL) ; get char
|
||||
CP 'Q' ; option /Q - quiet ?
|
||||
JR NZ,EVLOPTP ; ..if not, jump to check next option
|
||||
LD A,(PRGQFLG) ; get program quiet flag
|
||||
XOR 0FFH ; toggle
|
||||
LD (PRGQFLG),A ; ..and save back
|
||||
JR EVLONXT ; jump to continue
|
||||
|
||||
EVLOPTP: CP 'P' ; option /P - P2Dos stamps ?
|
||||
JR NZ,EVLOPTZ ; ..if not, jump to check next option
|
||||
XOR A ; clear A
|
||||
LD (STMPTYP),A ; ..and store stamp type
|
||||
JR EVLONXT ; jump to continue
|
||||
|
||||
EVLOPTZ: CP 'Z' ; option /Z - NZTime stamps ?
|
||||
JR NZ,EVLONX1 ; ..if not, jump to check for whitespace
|
||||
OR 0FFH ; set A= 0xFF
|
||||
LD (STMPTYP),A ; store stamp type
|
||||
; ..and fall through to read next char
|
||||
|
||||
EVLONXT: INC HL ; move ptr fwd
|
||||
LD A,(HL) ; get char
|
||||
; options are separated by whitespace
|
||||
EVLONX1: CP ' ' ; is it <SP> ?
|
||||
JR Z,EVLOXIT ; ..if so, jump to exit loop
|
||||
CP TAB ; is it <TAB> ?
|
||||
JR Z,EVLOXIT ; ..if so, jump to exit loop
|
||||
JR NZ,EVLOERR ; else, invalid option char found
|
||||
DJNZ EVLOPTQ ; loop till done
|
||||
|
||||
EVLOXIT: XOR A ; set return code 0x00 (clear A and flags)
|
||||
RET
|
||||
|
||||
EVLOERR: LD A,(PRGQFLG) ; get program quiet flag
|
||||
OR A ; running in verbose mode ?
|
||||
LD A,BEL
|
||||
CALL Z,COUT ; ..if so, notify user
|
||||
CALL EPRINT
|
||||
DEFB CR,LF,'+++ Unrecognized Option "'
|
||||
DEFB 0
|
||||
LD A,(HL)
|
||||
CALL COUT
|
||||
CALL EPRINT
|
||||
DEFB '" ... Setting Interactive'
|
||||
DEFB 0
|
||||
OR 0FFH ; set return code 0xFF
|
||||
RET
|
||||
|
||||
|
||||
; get console input
|
||||
; and check for abort request
|
||||
CINPUT: CALL CAPIN ; get char and capitalize
|
||||
CP CTRLC ; is it <Ctrl-C> ?
|
||||
JP Z,EXIT
|
||||
CP ESC ; is it <ESC> ?
|
||||
JP Z,EXIT
|
||||
CP 'a' ; below 'a' ? (not possible, CAPIN capitalizes)
|
||||
RET C
|
||||
CP 'z'+1 ; between lowercase 'a' and lowercase 'z' ?
|
||||
RET NC
|
||||
AND 01011111b ; remove bit 5 to capitalize
|
||||
RET
|
||||
|
||||
|
||||
; ##### unreferenced code (not used)
|
||||
; copy 32 (0x20) bytes from (HL) to (DE)
|
||||
LD B,32
|
||||
UNUSED1: LD A,(HL)
|
||||
LD (DE),A
|
||||
INC HL
|
||||
INC DE
|
||||
DJNZ UNUSED1
|
||||
RET
|
||||
; #####
|
||||
|
||||
|
||||
; fill memory with zero, or byte
|
||||
; in: A= byte
|
||||
; B= # of bytes
|
||||
; HL= target addr
|
||||
FILLZ: XOR A ; clear A
|
||||
FILLA: LD (HL),A ; store byte
|
||||
INC HL ; move ptr fwd
|
||||
DJNZ FILLA ; loop
|
||||
RET
|
||||
|
||||
|
||||
; verbose print - print string to CON: if quiet flag is off
|
||||
; in: (Stack) contains start addr of nul-terminated string
|
||||
PVBOSE: LD A,(PRGQFLG) ; get program quiet flag
|
||||
OR A ; running in verbose mode ?
|
||||
JP Z,EPRINT ; ..if so, jump to print and let return from there
|
||||
EX (SP),HL ; else, swap HL and top-of-stack
|
||||
PVBOSE0: LD A,(HL) ; get char
|
||||
INC HL ; move ptr fwd
|
||||
OR A ; is byte = zero ?
|
||||
JR NZ,PVBOSE0 ; ..if not, loop
|
||||
EX (SP),HL ; else, swap back
|
||||
RET
|
||||
|
||||
|
||||
; entry points for indirect BIOS calls
|
||||
; BC is loaded with absolute offset from WBOOT (fn #1)
|
||||
; to respective jump instruction, i.e. 3 bytes per fn
|
||||
BIOSELD: PUSH BC
|
||||
LD BC,3*8 ; fn #9 SELDSK select disk
|
||||
JR BIOSFN
|
||||
|
||||
BIOSTTR: PUSH BC
|
||||
LD BC,3*9 ; fn #10 SETTRK set track
|
||||
JR BIOSFN
|
||||
|
||||
BIOSTSE: PUSH BC
|
||||
LD BC,3*10 ; fn #11 SETSEC set sector
|
||||
JR BIOSFN
|
||||
|
||||
BIOSTDM: PUSH BC
|
||||
LD BC,3*11 ; fn #12 SETDMA set buffer addr
|
||||
JR BIOSFN
|
||||
|
||||
BIOREAD: PUSH BC
|
||||
LD BC,3*12 ; fn #13 READ read one sector (not used)
|
||||
JR BIOSFN
|
||||
|
||||
BIOWRIT: PUSH BC
|
||||
LD BC,3*13 ; fn #14 WRITE write one sector
|
||||
JR BIOSFN
|
||||
|
||||
BIOSTRN: PUSH BC
|
||||
LD BC,3*15 ; fn #16 SECTRN sector translation
|
||||
JR BIOSFN
|
||||
|
||||
|
||||
; call BIOS fn indirectly
|
||||
; in: BC= offset to fn in Bios jump table
|
||||
BIOSFN: EX (SP),HL ; swap HL and top-of-stack (= prev. BC)
|
||||
PUSH HL ; save HL (prev. BC)
|
||||
LD HL,(CPMBIOS+1) ; Bios base addr
|
||||
ADD HL,BC ; add offset to fn #
|
||||
POP BC ; restore BC
|
||||
EX (SP),HL ; swap HL and top-of-stack again
|
||||
RET ; "call" by returning to Bios fn
|
||||
|
||||
|
||||
UNUSED2:
|
||||
DEFB 0,0,0,0,0,0 ; ##### unreferenced chunk of data
|
||||
DEFB '!!!TIME&DAT' ; obviously not used
|
||||
DEFB 0,0,0,0,0,0,0,0
|
||||
DEFB 0,0,0,0,0,0,0,0
|
||||
DEFB 0,0,0,0,0,0,0,0
|
||||
|
||||
|
||||
;:::::::::::::::::::::::::::::::::::::::::::::::::::::
|
||||
; Z3LIB - 0x08a7
|
||||
; SYSLIB - 0x091a
|
||||
; end addr 0x09e5 (begin DSEG)
|
||||
;:::::::::::::::::::::::::::::::::::::::::::::::::::::
|
||||
|
||||
|
||||
DSEG
|
||||
|
||||
STMPTYP: DEFB 0 ; stamp type flag, 0x00 = P2Dos, 0xFF = NZTime
|
||||
PRGQFLG: DEFB 0 ; program quiet flag, 0x00 = verbose
|
||||
VOLNAME: DEFS 12 ; buffer for volume name, 11 bytes + <NUL> terminator
|
||||
|
||||
RUNMODE: DEFB 0 ; indicator, 0x00 = cmdline mode / 0xFF = interactive mode
|
||||
OLDDRV: DEFB 0 ; logged drive at program start
|
||||
CURRDSK: DEFB 0 ; current disk drive letter
|
||||
|
||||
WSPC: ; workspace starts here
|
||||
DIRMAX: DEFW 0 ; max. # of dir entries (from DPH +1)
|
||||
STMPMAX: DEFW 0 ; max. # of stamp entries (= DIRMAX / 4)
|
||||
STMPCUR: DEFW 0 ; current # of stamp entry (used as counter)
|
||||
SKEWTBL: DEFW 0 ; addr of skew table (from DPH)
|
||||
|
||||
DEFS 070H ; room for stack
|
||||
STACK: DEFW 0 ; stack storage location
|
||||
|
||||
END
|
||||
|
||||
|
||||
;************************************************************************
|
||||
; Remarks jxl:
|
||||
; HASHINI.COM, included in available B/P Bios package(s), was dis-
|
||||
; assembled and extensively commented. Labels are up to seven chars long
|
||||
; to comply with M-REL standards. However, it is recommended to use SLR
|
||||
; tools that support labels up to sixteen chars.
|
||||
; In its current state, the compiled/linked file matches exactly the
|
||||
; original SHOWHD.COM, i.e. no changes to the source were made. Possible
|
||||
; optimisations detected during disassembly are marked with "#####" in the
|
||||
; comment. It is fair to say that the program seems to be in an early
|
||||
; stage; as the version number indicates. Apparently, provisions were made
|
||||
; to test exitence, or even generate a DateStamper !!!TIME&.DAT file
|
||||
; (which is not the case right now.)
|
||||
; The program supports an interactive and a command line mode. Labels
|
||||
; start with "IM" to indicate code specifically for interactive mode.
|
||||
;************************************************************************
|
||||
640
Source/BPBIOS/UTIL/ldsys.z80
Normal file
640
Source/BPBIOS/UTIL/ldsys.z80
Normal file
@@ -0,0 +1,640 @@
|
||||
TITLE "B/P Bios System Loader"
|
||||
;************************************************************************
|
||||
;* L D S Y S *
|
||||
;* Load a B/P Bios based system into RAM memory for direct execution *
|
||||
;* by Harold F. Bower and Cameron W. Cotrill *
|
||||
;*----------------------------------------------------------------------*
|
||||
;* Disassembly: jxl Dec 2024 *
|
||||
;* public release 1.0 Apr 2025 *
|
||||
;* see remarks at the end *
|
||||
;*----------------------------------------------------------------------*
|
||||
;* LINK with Version 4 libraries: VLIB, Z3LIB, SYSLIB *
|
||||
;* *
|
||||
;* A>Z80ASM LDSYS/RS *
|
||||
;* A>SLRNK LDSYS/N,/A:100,/D:0CF8,LDSYS,VLIBS/S,Z3LIBS/S,SYSLIBS/S,/E *
|
||||
;************************************************************************
|
||||
|
||||
VER EQU 12
|
||||
REV EQU ' '
|
||||
|
||||
DATE MACRO
|
||||
DEFB '17 Jul 96'
|
||||
ENDM
|
||||
|
||||
|
||||
BEL EQU 07H ; Bell character
|
||||
LF EQU 0AH ; Line Feed character
|
||||
CR EQU 0DH ; Carriage Return character
|
||||
|
||||
CPMBDOS EQU 5 ; CP/M BDOS entry point (JP)
|
||||
CPMFCB EQU 5CH ; CP/M standard FCB #1 (+1 filename, +9 filetype)
|
||||
CPMDMA EQU 80H ; CP/M standard DMA buffer
|
||||
|
||||
|
||||
; From VLIB Get..
|
||||
EXTRN VPRINT, Z3VINIT
|
||||
|
||||
; From Z3LIB Get..
|
||||
EXTRN GETNAME, PRTNAME, ZFNAME, Z3LOG, WHRENV
|
||||
EXTRN GZMTOP ; ##### not used, but linked
|
||||
|
||||
; From SYSLIB Get..
|
||||
EXTRN PUTUD, GETUD, F$OPEN, F$READ, SETDMA, PFN3, PHL4HC, COUT, CODEND
|
||||
EXTRN F$CLOSE, CRLF ; ##### not used, but linked
|
||||
|
||||
|
||||
;::::: PROGRAM START
|
||||
|
||||
ORG 100H
|
||||
CSEG
|
||||
|
||||
|
||||
LDSYS: JP START ; bypass header
|
||||
DEFB 'Z3ENV' ; this is a ZCPR3 utility
|
||||
DEFB 1 ; show external environment
|
||||
|
||||
ENVADR: DEFW 0 ; addr of Z3 environment
|
||||
DEFW LDSYS ; type 4 filler
|
||||
|
||||
DEFB 'LDSYS ',0 ; configuration name
|
||||
|
||||
FTYPE: DEFB 'IMG' ; standard file type
|
||||
|
||||
START: LD (STACK),SP
|
||||
LD SP,STACK
|
||||
CALL PUTUD ; currently logged drive/user
|
||||
LD HL,(CPMBDOS+1)
|
||||
CALL WHRENV ; find Z3 Environment Descriptor
|
||||
PUSH AF
|
||||
LD (ENVADR),HL ; store ENV addr
|
||||
CALL Z3VINIT ; ..and init for Z3LIB routines
|
||||
CALL GETNAME ; get actual program name
|
||||
CALL VPRINT
|
||||
DEFB CR,LF,1,'B/P Bios System Loader',2,' Vers ',VER/10+'0','.'
|
||||
DEFB VER MOD 10 + '0',REV,' '
|
||||
DATE
|
||||
DEFB CR,LF,' Copyright (C) 1991,3 by H.F.Bower & C.W.Cotrill',CR,LF
|
||||
DEFB 0
|
||||
|
||||
; get first token from command line (in FCB #1)
|
||||
LD A,(CPMFCB+1)
|
||||
CP '/' ; is this a help request ?
|
||||
JP Z,HELP ; ..if so, jump display help screen
|
||||
POP AF
|
||||
JR Z,E$NOFIL ; else, jump error no file specified
|
||||
|
||||
LD HL,(ENVADR) ; get addr Z3ENV
|
||||
LD DE,70 ; offset to high byte BIOS addr
|
||||
ADD HL,DE ; move ptr
|
||||
LD H,(HL) ; get high byte of B/P Bios page addr
|
||||
LD L,30*3 ; ..and set low byte to fn #30
|
||||
LD A,(HL) ; check byte at ptr location
|
||||
CP 0C3H ; is it opcode 0xC3 (JP) ?
|
||||
JR NZ,E$NOFIL ; ..if not, jump error and exit
|
||||
CALL JUMPHL ; else, "call" B/P Bios fn #30 (RETBIO)
|
||||
LD HL,-6 ; move ptr 6 bytes backward
|
||||
ADD HL,DE ; (signature string)
|
||||
LD A,(HL) ; get byte
|
||||
CP 'B' ; is it 'B' ?
|
||||
JR NZ,E$NOFIL ; ..if not, jump error and exit
|
||||
INC HL ; ptr fwd
|
||||
LD A,(HL) ; get byte
|
||||
CP '/' ; is it '/' ?
|
||||
JR NZ,E$NOFIL ; ..if not, jump error and exit
|
||||
INC HL ; ptr fwd
|
||||
LD A,(HL) ; get byte
|
||||
CP 'P' ; is it 'P' ?
|
||||
JR NZ,E$NOFIL ; ..if not, jump error and exit
|
||||
LD DE,6 ; else, set ptr to OPTF1 (Bios Option Flags)
|
||||
ADD HL,DE ; at CONFIG+2
|
||||
BIT 7,(HL) ; check bit 7 (0= not locked, 1= locked, can't reload)
|
||||
JR Z,E$NOFIL ; ..if not set, skip over
|
||||
|
||||
|
||||
E$RUNBP: CALL VPRINT
|
||||
DEFB CR,LF,BEL,'*** Running Bios Cannot be Replaced ! ***',CR,LF
|
||||
DEFB 0
|
||||
JP EXIT
|
||||
|
||||
E$NOFIL: LD A,(CPMFCB+1)
|
||||
CP ' '
|
||||
JR NZ,EVALCMD
|
||||
CALL VPRINT
|
||||
DEFB ' *** No file specified ! ***',CR,LF,BEL
|
||||
DEFB 0
|
||||
|
||||
|
||||
;::::: EXIT PROGRAM
|
||||
|
||||
EXIT: CALL GETUD ; set previous drive/user
|
||||
LD SP,(STACK) ; set stack to initial location
|
||||
RET ; ..and return to system
|
||||
|
||||
|
||||
;::::: EVALUATE COMMAND LINE
|
||||
|
||||
EVALCMD: LD DE,CPMFCB
|
||||
LD HL,CPMDMA+1 ; set ptr to start of string
|
||||
ECMD1: LD A,(HL) ; get char
|
||||
INC HL ; move ptr fwd
|
||||
CP ' ' ; is it <SP> ?
|
||||
JR Z,ECMD1 ; ..if so, loop get next char
|
||||
DEC HL ; non-blank char found, move ptr back
|
||||
XOR A ; and nullify A
|
||||
CALL ZFNAME ; parse token into FCB
|
||||
JP NZ,E$AMBIG ; filename must be unambiguous, jump if error
|
||||
LD HL,9 ; move ptr to file type
|
||||
ADD HL,DE
|
||||
LD A,(HL) ; get char
|
||||
CP ' ' ; is it <SP> ?
|
||||
JR NZ,RDIMG ; ..if not, skip over
|
||||
PUSH DE ; else, save regs
|
||||
EX DE,HL ; swap regs
|
||||
LD HL,FTYPE ; ptr to standard file type
|
||||
LD BC,3 ; 3 chars
|
||||
LDIR ; ... and copy
|
||||
POP DE ; restore ptr to ZCPR3 FCB
|
||||
|
||||
|
||||
;::::: READ IMAGE FILE
|
||||
|
||||
RDIMG: CALL Z3LOG ; log in drive/user
|
||||
CALL F$OPEN ; attempt to open file
|
||||
OR A
|
||||
JP NZ,E$OPEN ; ..if error, jump error and exit
|
||||
CALL CODEND ; get first available page after code end
|
||||
LD (WSPCBEG),HL ; ..and store it
|
||||
RDIMG0: PUSH HL
|
||||
CALL SETDMA ; set DMA buffer addr (HL)
|
||||
LD DE,CPMFCB ; set standard FCB #1
|
||||
CALL F$READ ; read one sector (128 bytes)
|
||||
POP HL ; restore start addr
|
||||
JR NZ,RDIMG1 ; ..if end of file, jump exit loop
|
||||
LD DE,128 ; else, move buffer addr forward
|
||||
ADD HL,DE
|
||||
JR RDIMG0 ; ..and loop
|
||||
RDIMG1: CALL GETUD ; set previously logged drive/user
|
||||
CALL VPRINT
|
||||
DEFB CR,LF,' CCP starts at : '
|
||||
DEFB 0
|
||||
|
||||
|
||||
;::::: READ IMAGE HEADER
|
||||
|
||||
; header contains information at following offsets:
|
||||
; ZCPR CCP 0x10 (16) filename
|
||||
; 0x1B (27) Unbanked base addr, 0x1D (29) Unbanked size
|
||||
; 0x1F (31) Banked base addr, 0x22 (33) Banked size
|
||||
; ZSDOS 0x30 (48) filename
|
||||
; 0x3B (59) Unbanked base addr, 0x3D (61) Unbanked size
|
||||
; 0x3F (63) Banked base addr, 0x41 (65) Banked size
|
||||
; B/P Bios 0x50 (80) filename
|
||||
; 0x5B (91) Unbanked base addr, 0x5D (93) Unbanked size
|
||||
; 0x5F (95) Banked base addr, 0x62 (98) Banked size
|
||||
; 0x70 (112) IMG filename
|
||||
|
||||
RDHDR: LD DE,27 ; offset CCP Unbanked base addr
|
||||
CALL PSEGAS ; display addr and size of segment
|
||||
LD DE,33 ; offset CCP Banked size
|
||||
CALL GBYTEWS ; check if empty (0x0000)
|
||||
JR Z,RDHDR0 ; ..if so, skip over
|
||||
CALL VPRINT
|
||||
DEFB ' Banked Ccp at : '
|
||||
DEFB 0
|
||||
LD DE,31 ; offset to CCP Banked base addr
|
||||
CALL PSEGAS ; display addr and size
|
||||
RDHDR0: CALL VPRINT
|
||||
DEFB ' DOS starts at : '
|
||||
DEFB 0
|
||||
LD DE,59 ; offset to DOS Unbanked base addr
|
||||
CALL PSEGAS ; display addr and size of segment
|
||||
LD DE,65 ; offset to DOS Banked size
|
||||
CALL GBYTEWS ; check if empty (0x0000)
|
||||
JR Z,RDHDR1 ; ..if so, skip over
|
||||
CALL VPRINT
|
||||
DEFB ' Banked Dos at : '
|
||||
DEFB 0
|
||||
LD DE,63 ; offset to DOS Banked base addr
|
||||
CALL PSEGAS ; display addr and size
|
||||
RDHDR1: CALL VPRINT
|
||||
DEFB ' BIOS starts at : '
|
||||
DEFB 0
|
||||
LD DE,91 ; offset to B/P Bios Unbanked base addr
|
||||
CALL PSEGAS ; display addr and size of segment
|
||||
LD DE,97 ; offset to B/P Bios Banked size
|
||||
CALL GBYTEWS ; check if empty (0x0000)
|
||||
JR Z,LDSEG ; ..if so, skip over
|
||||
CALL VPRINT
|
||||
DEFB ' Banked Bios at : '
|
||||
DEFB 0
|
||||
LD DE,95 ; offset to B/P Bios Banked base addr
|
||||
CALL PSEGAS ; display addr and size
|
||||
|
||||
|
||||
;::::: LOAD SYSTEM SEGMENTS
|
||||
|
||||
LDSEG: CALL VPRINT
|
||||
DEFB CR,LF,' ...installing '
|
||||
DEFB 0
|
||||
CALL CHKBNKD ; check options flag if banked system
|
||||
JR Z,LDSEG0 ; ..if not, skip over
|
||||
CALL VPRINT
|
||||
DEFB 'Banked '
|
||||
DEFB 0
|
||||
LDSEG0: CALL VPRINT
|
||||
DEFB 'System',CR,LF,LF
|
||||
DEFB 0
|
||||
|
||||
LDSEG1: DI ; disable interrupts
|
||||
LD HL,(WSPCBEG) ; get addr WSPC area
|
||||
LD DE,100H ; + 100H to account for file base
|
||||
ADD HL,DE
|
||||
|
||||
; ZCPR Unbanked portion
|
||||
LD (CCPUSTRT),HL ; store start in WSPC area
|
||||
LD DE,27 ; file offset to ZCPR Unbanked base addr
|
||||
CALL G2WRDWS
|
||||
LD (CCPUSIZ),BC ; store size
|
||||
LD (CCPUADR),DE ; store base addr
|
||||
LD HL,(CCPUSTRT) ; get start in WSPC
|
||||
PUSH HL
|
||||
ADD HL,BC ; calc end / start of ZSDOS Unbanked portion
|
||||
LD (DOSUSTRT),HL ; ..and store it
|
||||
POP HL ; restore start
|
||||
LDIR ; copy ZCPR Unbanked
|
||||
; from img file to target addr
|
||||
|
||||
; ZCPR Banked portion
|
||||
LD DE,31 ; offset to ZCPR Banked base addr
|
||||
CALL G2WRDWS
|
||||
LD (CCPBSIZ),BC ; store size
|
||||
LD (CCPBADR),DE ; store base addr
|
||||
LD HL,(DOSUSTRT) ; get previously calc'd end
|
||||
LD (CCPBSTRT),HL ; ..and store it as Banked start in WSPC
|
||||
LD A,B ; check if size is zero
|
||||
OR C
|
||||
JR Z,LDSEG2 ; ..if so, skip over
|
||||
ADD HL,BC ; else, calc new start of ZSDOS Unbanked
|
||||
LD (DOSUSTRT),HL ; ..and update it
|
||||
|
||||
; ZSDOS Unbanked portion
|
||||
LDSEG2: LD DE,59 ; offset to ZSDOS Unbanked base addr
|
||||
CALL G2WRDWS ; DE= base addr, BC= size
|
||||
LD (DOSUSIZ),BC ; store size
|
||||
LD HL,(DOSUSTRT) ; get ZSDOS Unbanked start in WSPC area
|
||||
PUSH HL
|
||||
ADD HL,BC ; calc end / start of B/P Bios Unbanked portion
|
||||
LD (BIOUSTRT),HL ; ..and store it
|
||||
POP HL ; restore start
|
||||
LDIR ; copy ZSDOS Unbanked
|
||||
; from img file to target addr
|
||||
|
||||
; ZSDOS Banked portion
|
||||
LD DE,63 ; offset to ZSDOS Banked base addr
|
||||
CALL G2WRDWS
|
||||
LD (DOSBSIZ),BC ; store size
|
||||
LD (DOSBADR),DE ; store base addr
|
||||
LD HL,(BIOUSTRT) ; get previously calc'd end
|
||||
LD (DOSBSTRT),HL ; ..and store it as Banked start in WSPC
|
||||
LD A,B ; check if size is zero
|
||||
OR C
|
||||
JR Z,LDSEG3 ; ..if so, skip over
|
||||
ADD HL,BC ; else, calc new start of B/P Bios Unbanked
|
||||
LD (BIOUSTRT),HL ; ..and update it
|
||||
|
||||
; B/P Bios Unbanked portion
|
||||
LDSEG3: LD DE,91 ; offset to B/P Bios Unbanked base addr
|
||||
CALL G2WRDWS
|
||||
LD (BIOUSIZ),BC ; store size
|
||||
LD (BIOUADR),DE ; store base addr
|
||||
LD HL,(BIOUSTRT) ; get start in WSPC area
|
||||
PUSH HL
|
||||
ADD HL,BC ; calc end / beginning of Banked portion
|
||||
LD (BIOBSTRT),HL ; ..and store it
|
||||
POP HL ; restore start
|
||||
LDIR ; copy B/P Bios Unbanked
|
||||
; from img file to target addr
|
||||
|
||||
; B/P Bios Banked portion
|
||||
LD DE,95 ; offset to B/P Bios Banked base addr
|
||||
CALL G2WRDWS
|
||||
LD (BIOBSIZ),BC ; store size
|
||||
LD (BIOBADR),DE ; store base addr
|
||||
|
||||
; use B/P Bios functions at new location (Unbanked portion was just loaded)
|
||||
LD HL,(BIOUADR) ; get (new) B/P Bios base addr
|
||||
LD L,82h ; offset to TPABNK in config area
|
||||
LD A,(HL) ; get value
|
||||
LD L,27*3 ; offset to B/P Bios fn #27 (SELMEM)
|
||||
CALL JUMPHL ; "call" fn
|
||||
LD HL,CCPBSIZ ; ptr to stored ZCPR Banked size
|
||||
CALL LDBNKD
|
||||
LD HL,DOSBSIZ ; ptr to stored ZSDOS Banked size
|
||||
CALL LDBNKD
|
||||
LD HL,BIOBSIZ ; ptr to stored B/P Bios Banked size
|
||||
CALL LDBNKD
|
||||
|
||||
; Z3ENV Descriptor
|
||||
LD BC,(WSPCBEG) ; get (new) B/P Bios base addr
|
||||
LD HL,155 ; offset to addr of Z3 Environment Descriptor
|
||||
ADD HL,BC ; in B/P Bios config area (CONFIG+26)
|
||||
LD E,(HL) ; get addr in DE
|
||||
INC HL
|
||||
LD D,(HL)
|
||||
LD HL,128 ; offset from start of WSPC area (img file)
|
||||
ADD HL,BC
|
||||
LD BC,128 ; bytes to copy
|
||||
LDIR
|
||||
|
||||
; boot new system
|
||||
LD SP,80H ; set stack pointer to default
|
||||
XOR A ; nullify A
|
||||
; ..and fall through, initiating a cold boot
|
||||
|
||||
|
||||
;::::: SUPPORT FUNCTIONS
|
||||
|
||||
; call B/P Bios function (at new base addr in RAM)
|
||||
; in: A= offset to JP (fn # *3)
|
||||
BIOSFN: LD HL,(BIOUADR) ; get (new) B/P Bios base addr
|
||||
LD L,A ; adjust to JP of fn #
|
||||
; ..and fall through
|
||||
|
||||
|
||||
; "called" as a pseudo-routine that returns to caller
|
||||
; in: HL= target addr
|
||||
JUMPHL: JP (HL) ; jump to addr in HL regs
|
||||
|
||||
|
||||
; load banked portions of (new) system from WSPC area to SYSBNK
|
||||
; segment information is stored as consecutive 16-bit words
|
||||
; in the order <size> <base addr> <start addr in WSPC>
|
||||
; in: HL= ptr to <size>
|
||||
; uses B/P Bios functions at new location (Unbanked portion)
|
||||
LDBNKD: LD C,(HL) ; get <size> low byte
|
||||
LD A,C
|
||||
INC HL ; move ptr fwd
|
||||
LD B,(HL) ; get <size> high byte
|
||||
INC HL ; ptr fwd
|
||||
OR B ; check if <size> is zero
|
||||
RET Z ; ..if so, return
|
||||
|
||||
PUSH BC ; save regs
|
||||
PUSH HL
|
||||
LD HL,(BIOUADR) ; get (new) B/P Bios base addr
|
||||
LD L,82H ; offset to TPABNK in config area
|
||||
LD C,(HL) ; get value
|
||||
INC HL ; move ptr to SYSBNK
|
||||
LD B,(HL) ; get value
|
||||
LD A,29*3 ; offset to B/P Bios fn #29 (XMOVE)
|
||||
CALL BIOSFN
|
||||
POP DE ; restore regs, DE now ptr to <base addr>
|
||||
POP BC
|
||||
LD HL,(BIOUADR) ; get (new) B/P Bios base addr
|
||||
LD L,25*3 ; offset to B/P Bios fn #25 (MOVE)
|
||||
PUSH HL ; put on stack, so it is called at return
|
||||
; and let Bios routine return to initial caller
|
||||
EX DE,HL ; swap regs
|
||||
LD E,(HL) ; get <base addr> in DE
|
||||
INC HL
|
||||
LD D,(HL)
|
||||
INC HL
|
||||
LD A,(HL)
|
||||
INC HL
|
||||
LD H,(HL) ; get <start addr in WSPC> in HL
|
||||
LD L,A
|
||||
RET ; ..and call B/P Bios fn #25 (MOVE)
|
||||
; to copy banked segment to SYSBNK
|
||||
|
||||
|
||||
; get _two_ consecutive 16-bit words from offset addr in WSPC area
|
||||
; in: DE= offset
|
||||
; out: DE= first value (at addr)
|
||||
; BC= second value (at addr+2)
|
||||
; HL= ptr to high byte of second value in WSPC area
|
||||
; uses BC, DE, HL
|
||||
G2WRDWS: CALL G1WRDWS ; get first word in HL
|
||||
EX DE,HL ; swap regs
|
||||
INC HL ; move ptr fwd
|
||||
LD C,(HL) ; get second word in BC
|
||||
INC HL
|
||||
LD B,(HL)
|
||||
RET
|
||||
|
||||
|
||||
; print base addr and size of system segment ton CON:
|
||||
; in: DE= offset in WSPC area
|
||||
PSEGAS: CALL G1WRDWS ; get 16-bit word (in HL) at offset (in DE)
|
||||
CALL PHL4HC ; ..and print to CON: as hex digits
|
||||
EX DE,HL ; swap regs
|
||||
INC HL ; move ptr fwd
|
||||
LD E,(HL) ; get next 16-bit word in DE
|
||||
INC HL
|
||||
LD D,(HL)
|
||||
CALL VPRINT
|
||||
DEFB ' ('
|
||||
DEFB 0
|
||||
EX DE,HL ; swap regs
|
||||
CALL PHL4HC ; print value (now in HL) to CON: as hex digits
|
||||
CALL VPRINT
|
||||
DEFB 'H Bytes)',CR,LF
|
||||
DEFB 0
|
||||
RET
|
||||
|
||||
|
||||
; get _one_ 16-bit word from offset addr in WSPC area
|
||||
; in: DE= offset
|
||||
; out: HL= value
|
||||
; DE= ptr to high byte in WSPC area
|
||||
G1WRDWS: LD HL,(WSPCBEG) ; addr WSPC area
|
||||
ADD HL,DE ; add offset
|
||||
LD E,(HL) ; get low byte at ptr addr in E
|
||||
INC HL
|
||||
LD D,(HL) ; get high byte at ptr addr in D
|
||||
EX DE,HL ; swap regs
|
||||
RET
|
||||
|
||||
|
||||
; get byte from offset addr in WSPC area
|
||||
; in: DE= offset
|
||||
; out: A= value, Z-Flag set if following byte is eqal
|
||||
; HL= ptr to next byte in WSPC area
|
||||
GBYTEWS: LD HL,(WSPCBEG) ; addr WSPC area
|
||||
ADD HL,DE ; add offset
|
||||
LD A,(HL) ; get byte
|
||||
INC HL ; move ptr fwd
|
||||
OR (HL) ; check if next byte has same value
|
||||
RET
|
||||
|
||||
|
||||
; check if img file contains a banked system
|
||||
; in: -
|
||||
; out: Z-Flag set for Unbanked Bios, NZ= Banked
|
||||
CHKBNKD: LD HL,(WSPCBEG) ; addr WSPC area
|
||||
INC H ; + 100H to account for file base
|
||||
EX DE,HL ; swap regs, DE holds result over next calc's
|
||||
LD BC,29 ; offset to ZCPR Unbanked size
|
||||
CALL SEGTSIZ ; ..add ZCPR size(s) to DE
|
||||
LD BC,61 ; offset to ZSDOS Unbanked size
|
||||
CALL SEGTSIZ ; ..add ZSDOS size(s) to DE
|
||||
LD HL,128 ; DE= offset to beginning of B/P Bios in
|
||||
ADD HL,DE ; img file, move fwd by 128 more bytes
|
||||
LD A,(HL) ; get B/P Bios options flag OPTF1 (at CONFIG+2)
|
||||
AND 00000001b ; check bit 0, and set Z-Flag accordingly
|
||||
RET
|
||||
|
||||
|
||||
; get total size of a system segment (add Unbanked and Banked sizes)
|
||||
; in: BC= offset in WSPC area to Unbanked size
|
||||
; out: DE= sum of segment sizes
|
||||
SEGTSIZ: LD HL,(WSPCBEG) ; addr WSPC area
|
||||
ADD HL,BC ; add offset
|
||||
LD C,(HL) ; get 16-bit word in BC
|
||||
INC HL ; (Unbanked size)
|
||||
LD B,(HL)
|
||||
EX DE,HL ; swap regs
|
||||
ADD HL,BC ; add retrieved value
|
||||
EX DE,HL ; ..and swap regs back
|
||||
INC HL ; move ptr 3 bytes fwd
|
||||
INC HL
|
||||
INC HL
|
||||
LD C,(HL) ; get 16-bit value in BC
|
||||
INC HL ; (Banked size)
|
||||
LD B,(HL)
|
||||
EX DE,HL ; swap regs
|
||||
ADD HL,BC ; add retrieved value
|
||||
EX DE,HL ; ..and swap regs back
|
||||
RET
|
||||
|
||||
|
||||
;::::: ERROR MESSAGES
|
||||
|
||||
E$AMBIG: CALL VPRINT
|
||||
DEFB CR,LF,BEL,' --- Ambiguous File: '
|
||||
DEFB 0
|
||||
JR E$FNAME
|
||||
|
||||
E$OPEN: CALL VPRINT
|
||||
DEFB CR,LF,BEL,' --- Error Opening: '
|
||||
DEFB 0
|
||||
|
||||
E$FNAME: LD DE,CPMFCB+1 ; ptr to file name in standard FCB #1
|
||||
CALL PFN3 ; print it
|
||||
JP EXIT
|
||||
|
||||
|
||||
;::::: HELP SCREEN
|
||||
|
||||
HELP: CALL VPRINT
|
||||
DEFB CR,LF,1
|
||||
DEFB 0
|
||||
CALL PPRGNAM
|
||||
CALL VPRINT
|
||||
DEFB 2,' Loads and executes a System image prepared by',CR,LF
|
||||
DEFB ' BPBUILD containing a B/P Bios.',CR,LF,LF
|
||||
DEFB ' Syntax:',CR,LF
|
||||
DEFB ' '
|
||||
DEFB 0
|
||||
CALL PPRGNAM
|
||||
CALL VPRINT
|
||||
DEFB ' // - print this message',CR,LF
|
||||
DEFB ' '
|
||||
DEFB 0
|
||||
CALL PPRGNAM
|
||||
CALL VPRINT
|
||||
DEFB ' [du|dir:]name[.typ] - load system image',CR,LF,LF
|
||||
DEFB ' File Type Defaults to "'
|
||||
DEFB 0
|
||||
LD HL,FTYPE ; ptr to default file type
|
||||
LD B,3 ; # of chars
|
||||
HELP0: LD A,(HL) ; get char
|
||||
INC HL ; move ptr fwd
|
||||
CALL COUT ; display char on CON:
|
||||
DJNZ HELP0 ; ..and loop
|
||||
CALL VPRINT
|
||||
DEFB '" if not explicitly entered',CR,LF,LF
|
||||
DEFB 'NOTE: This utility will NOT load a system '
|
||||
DEFB 'if the "Lock" bit in',CR,LF
|
||||
DEFB 'the Option Byte (Bit 7 of CONFIG+2) is Set to "1"',CR,LF
|
||||
DEFB 0
|
||||
JP EXIT
|
||||
|
||||
|
||||
; print program name on CON: device
|
||||
; (either the actual name, or fallback to default)
|
||||
; only used by HELP
|
||||
PPRGNAM: LD A,(ENVADR+1) ; get high byte of ENVPTR
|
||||
OR A ; check if valid (<> zero)
|
||||
JP NZ,PRTNAME ; ..if so, display actual name
|
||||
; and let return from there
|
||||
CALL VPRINT ; else, display default
|
||||
DEFB 'LDSYS'
|
||||
DEFB 0
|
||||
RET
|
||||
|
||||
|
||||
;:::::::::::::::::::::::::::::::::::::::::::::::::::::
|
||||
; VLIB - 0x06db
|
||||
; Z3LIB - 0x08fc
|
||||
; SYSLIB - 0x0bcf
|
||||
; end addr 0x0bf8 (begin DSEG)
|
||||
;:::::::::::::::::::::::::::::::::::::::::::::::::::::
|
||||
|
||||
|
||||
;::::: RAM STORAGE
|
||||
|
||||
DSEG
|
||||
|
||||
WSPCBEG: DEFW 0 ; begin of workspace
|
||||
; (first available page, returned by CODEND)
|
||||
|
||||
; addresses of new system as extracted from img file
|
||||
; first _Unbanked_, then _Banked_
|
||||
BIOUADR: DEFW 0 ; B/P Bios Unbanked base addr
|
||||
CCPUADR: DEFW 0 ; ZCPR Unbanked base addr
|
||||
CCPUSTRT: DEFW 0 ; start in WSPC area
|
||||
CCPUSIZ: DEFW 0 ; size
|
||||
DOSUSTRT: DEFW 0 ; ZSDOS Unbanked start
|
||||
DOSUSIZ: DEFW 0 ; size
|
||||
BIOUSTRT: DEFW 0 ; B/P Bios Unbanked start
|
||||
BIOUSIZ: DEFW 0 ; size
|
||||
|
||||
CCPBSIZ: DEFW 0 ; ZCPR Banked size
|
||||
CCPBADR: DEFW 0 ; base addr
|
||||
CCPBSTRT: DEFW 0 ; start
|
||||
DOSBSIZ: DEFW 0 ; ZSDOS Banked size
|
||||
DOSBADR: DEFW 0 ; base addr
|
||||
DOSBSTRT: DEFW 0 ; start
|
||||
BIOBSIZ: DEFW 0 ; B/P Bios Banked size
|
||||
BIOBADR: DEFW 0 ; base addr
|
||||
BIOBSTRT: DEFW 0 ; start
|
||||
|
||||
|
||||
DEFW GZMTOP ; reference Z3LIB/SYSLIB routines, so they are linked
|
||||
DEFW F$CLOSE
|
||||
DEFW CRLF
|
||||
|
||||
DEFS 30H-6 ; room for stack
|
||||
; -6 to account for above ref's
|
||||
STACK: DEFW 0 ; stack storage location
|
||||
|
||||
END
|
||||
|
||||
|
||||
;************************************************************************
|
||||
; Remarks jxl:
|
||||
; LDSYS.COM, included in available B/P Bios package(s), was dis-
|
||||
; assembled and extensively commented. Labels are unique up to the seventh
|
||||
; character to comply with M-REL standards. However, it is recommended to
|
||||
; use SLR tools that support labels up to sixteen chars.
|
||||
; In its current state, the compiled/linked file _almost_ matches the
|
||||
; original LDSYS.COM with the exception of Z3LIB routine GZMTOP, and
|
||||
; SYSLIB routines F$CLOSE and CRLF. Even though they are part of the
|
||||
; original program, they are neither needed nor referenced. This seems
|
||||
; to indicate that other versions of the LIB's were used. To reproduce
|
||||
; the original program, the above mentioned routines are referenced (in
|
||||
; stack area) to have them included when linking.
|
||||
;
|
||||
; As a byproduct of the disassembly, the structure of a B/P Bios image
|
||||
; file was documented. This file contains an excerpt.
|
||||
;************************************************************************
|
||||
409
Source/BPBIOS/UTIL/showhd.z80
Normal file
409
Source/BPBIOS/UTIL/showhd.z80
Normal file
@@ -0,0 +1,409 @@
|
||||
TITLE "B/P Bios HD drive partition display"
|
||||
;************************************************************************
|
||||
;* S H O W H D *
|
||||
;* Display DPH and DPB data for making B/P HD Partition data the same *
|
||||
;* by Harold F. Bower and Cameron W. Cotrill *
|
||||
;*----------------------------------------------------------------------*
|
||||
;* Disassembly: jxl Jan 2025 *
|
||||
;* public release 1.0 Apr 2025 *
|
||||
;* see remarks at the end *
|
||||
;*----------------------------------------------------------------------*
|
||||
;* LINK with Version 4 libraries: SYSLIB *
|
||||
;* *
|
||||
;* A>Z80ASM SHOWHD/RS *
|
||||
;* A>SLRNK SHOWHD/N,/A:100,/D:064D,SHOWHD,SYSLIBS/S,/E *
|
||||
;************************************************************************
|
||||
|
||||
VER EQU 10
|
||||
REV EQU ' '
|
||||
|
||||
DATE MACRO
|
||||
DEFB '2 Nov 91'
|
||||
ENDM
|
||||
|
||||
|
||||
CTRLC EQU 03H ; Control-C character
|
||||
BEL EQU 07H ; Bell character
|
||||
TAB EQU 09H ; Tab character
|
||||
LF EQU 0AH ; Line Feed character
|
||||
CR EQU 0DH ; Carriage Return character
|
||||
ESC EQU 1BH ; Escape character
|
||||
|
||||
CPMBIOS EQU 0 ; CP/M BIOS warm boot (JP)
|
||||
CPMFCB EQU 5CH ; CP/M standard FCB #1 (+1 filename, +9 filetype)
|
||||
|
||||
|
||||
; For SYSLIB make visible...
|
||||
PUBLIC COUT
|
||||
|
||||
; From SYSLIB Get..
|
||||
EXTRN EPRINT, BOUT, CAPINE, PAFDC, PHLFDC, PA2HC
|
||||
|
||||
|
||||
;::::: PROGRAM START
|
||||
|
||||
ORG 100H
|
||||
CSEG
|
||||
|
||||
|
||||
SHOWHD: JP START ; bypass header
|
||||
DEFB 'Z3ENV' ; this is (not really) a Z3CPR utility
|
||||
DEFB 1 ; show external environment
|
||||
|
||||
ENVADR: DEFW 0 ; addr of Z3 environment
|
||||
|
||||
START: LD (STACK),SP
|
||||
LD SP,STACK
|
||||
CALL EPRINT
|
||||
DEFB CR,LF,'Show Hard Drive Partition Data - '
|
||||
DATE
|
||||
DEFB CR,LF
|
||||
DEFB 0
|
||||
|
||||
LD A,(CPMFCB+1) ; check first char of cmdline
|
||||
CP '/' ; is this a help request ?
|
||||
JP Z,HELP ; ..if so, jump
|
||||
|
||||
START0: CALL EPRINT
|
||||
DEFB CR,LF,'Enter Drive Letter [A..P] : '
|
||||
DEFB 0
|
||||
CALL CAPINE ; get user input
|
||||
CP CTRLC ; is it <Ctrl-C> ?
|
||||
JP Z,0 ; ..abort
|
||||
CP ESC ; is it <ESC> ?
|
||||
JP Z,0 ; ..abort
|
||||
CP 'A' ; below ascii 'A' ?
|
||||
JR C,START0 ; ..if so, loop ask for new input
|
||||
CP 'P'+1 ; greater than ascii 'P' ?
|
||||
JR NC,START0 ; ..if so, loop ask for new input
|
||||
LD (DRLTR),A ; store drive letter
|
||||
|
||||
CALL EPRINT
|
||||
DEFB CR,LF,LF,'Drive: '
|
||||
DEFB 0
|
||||
CALL COUT ; display drive
|
||||
CALL EPRINT
|
||||
DEFB CR,LF,TAB,'DPH Info',TAB,TAB,'BPCNFG Info',CR,LF
|
||||
DEFB 0
|
||||
|
||||
CALL GDPHADR ; get DPH addr for selected Disk drive
|
||||
LD (DPHADR),HL ; ..and store it
|
||||
LD A,H ; check if invalid (= zero)
|
||||
OR L
|
||||
JR NZ,PDSKDAT ; ..if not, skip over
|
||||
CALL EPRINT
|
||||
DEFB CR,LF,BEL,'+++ Invalid Drive : '
|
||||
DEFB 0
|
||||
LD A,(DRLTR) ; get drive letter
|
||||
CALL COUT ; ..and display it
|
||||
JP START0 ; then loop to ask for new input
|
||||
|
||||
|
||||
;::::: DISPLAY DISK DRIVE DATA
|
||||
|
||||
PDSKDAT: LD DE,10 ; offset in DPH to DPB addr
|
||||
ADD HL,DE
|
||||
LD E,(HL) ; DPB addr in DE
|
||||
INC HL
|
||||
LD D,(HL)
|
||||
EX DE,HL ; swap regs
|
||||
LD (DPBADR),HL ; ..and store DPB addr
|
||||
CALL EPRINT
|
||||
DEFB CR,LF,LF,' Sectors/Track = '
|
||||
DEFB 0
|
||||
LD E,(HL) ; get Sect/Trk from DPB in DE
|
||||
INC HL
|
||||
LD D,(HL)
|
||||
INC HL
|
||||
EX DE,HL ; swap regs
|
||||
CALL PHLFDC ; ..and display (as decimal)
|
||||
SRL H ; divide by 2
|
||||
RR L
|
||||
SRL H ; .. /4
|
||||
RR L
|
||||
SRL H ; .. /8
|
||||
RR L
|
||||
LD (KBTRK),HL ; store kByte/Trk
|
||||
EX DE,HL ; swap regs
|
||||
CALL P2TAB
|
||||
CALL EPRINT
|
||||
DEFB '(same)',CR,LF,' Blk Shift Fctr = '
|
||||
DEFB 0
|
||||
LD A,(HL) ; get next byte from DPB (= BSH, Block Shift Factor)
|
||||
INC HL ; move ptr fwd
|
||||
CALL PAFDC ; display BSH
|
||||
CALL P2TAB
|
||||
SUB 3 ; BSH -3
|
||||
LD B,A ; use as counter for multiplication
|
||||
LD (BSH3),A ; ..and also store it
|
||||
LD A,1 ; set initial value
|
||||
JR Z,PBLKSIZ ; if BSH -3 = 0, skip over
|
||||
|
||||
BLKSZLP: ADD A,A ; *2
|
||||
DJNZ BLKSZLP ; loop
|
||||
|
||||
PBLKSIZ: CALL PAFDC ; display block size
|
||||
; (BSH= 3 -> 1k, 4 -> 2k, ... 8 -> 32k)
|
||||
CALL EPRINT
|
||||
DEFB 'k/Block',CR,LF,' Block Mask = '
|
||||
DEFB 0
|
||||
LD A,(HL) ; next byte from DPB (= BSM, Block Mask)
|
||||
INC HL
|
||||
CALL PAFDC ; ..display it
|
||||
CALL EPRINT
|
||||
DEFB CR,LF,' Extent Mask = '
|
||||
DEFB 0
|
||||
LD A,(HL) ; next byte from DPB (= EXM, Extent Mask)
|
||||
INC HL
|
||||
CALL PAFDC ; ..display it
|
||||
CALL EPRINT
|
||||
DEFB CR,LF,' Disk Blocks-1 = '
|
||||
DEFB 0
|
||||
LD E,(HL) ; next 16-bit value from DPB in DE
|
||||
INC HL ; (= Disk Size in BLS units -1)
|
||||
LD D,(HL)
|
||||
INC HL
|
||||
EX DE,HL ; swap regs
|
||||
CALL PHLFDC ; display value
|
||||
CALL P2TAB
|
||||
INC HL ; +1 (= Disk Size)
|
||||
LD A,(BSH3) ; get BSH-3
|
||||
LD B,A ; set as initial loop counter
|
||||
OR A ; check if zero (means single density 1k/block)
|
||||
LD A,0 ; nullify A
|
||||
JR Z,PDSKCAP ; ..if already zero, no more calc needed
|
||||
|
||||
DSKCLP: ADD HL,HL ; double HL (2, 4, 8 etc. k/block)
|
||||
ADC A,0 ; a power-of-two multiple
|
||||
DJNZ DSKCLP ; ..and loop
|
||||
LD (DCAPH),A ; store disk capacity in kByte
|
||||
LD (DCAPML),HL ; as 24-bit value
|
||||
|
||||
PDSKCAP: CALL PDSKSZ ; ..and display it
|
||||
CALL EPRINT
|
||||
DEFB 'k Total ('
|
||||
DEFB 0
|
||||
PUSH DE
|
||||
LD DE,(KBTRK) ; kByte/Trk
|
||||
LD HL,(DCAPML) ; disk capacity in kByte
|
||||
LD A,(DCAPH)
|
||||
LD BC,-1 ; set initial counter value
|
||||
OR A
|
||||
|
||||
DSKTRLP: INC BC ; increase counter (quotient)
|
||||
SBC HL,DE ; divide by subtraction
|
||||
SBC A,0 ; check for underflow
|
||||
JR NC,DSKTRLP ; ..and loop while more to go
|
||||
|
||||
LD H,B ; result in HL
|
||||
LD L,C
|
||||
CALL PHLFDC ; ..display it
|
||||
CALL EPRINT
|
||||
DEFB ' Tracks)'
|
||||
DEFB 0
|
||||
POP DE ; restore DPB ptr
|
||||
EX DE,HL ; swap to HL
|
||||
CALL EPRINT
|
||||
DEFB CR,LF,' Max Dirs - 1 = '
|
||||
DEFB 0
|
||||
LD E,(HL) ; get next 16-bit value from DPB in DE
|
||||
INC HL ; (= Dir Max -1)
|
||||
LD D,(HL)
|
||||
INC HL
|
||||
EX DE,HL ; swap regs
|
||||
CALL PHLFDC ; ..and display value
|
||||
CALL P2TAB
|
||||
INC HL ; +1 (= Dir Max)
|
||||
CALL PHLFDC ; ..and display, too
|
||||
EX DE,HL
|
||||
CALL EPRINT
|
||||
DEFB ' Dir Entries',CR,LF,' Alloc bytes = '
|
||||
DEFB 0
|
||||
LD A,(HL) ; next byte from DPB (= AL0, Allocation byte 0)
|
||||
INC HL
|
||||
LD D,(HL) ; (= AL1, Allocation byte 1)
|
||||
INC HL
|
||||
CALL PA2HC ; display AL0 as hex
|
||||
CALL EPRINT
|
||||
DEFB 'H, '
|
||||
DEFB 0
|
||||
LD A,D ; AL1 in A
|
||||
CALL PA2HC ; ..and display as hex
|
||||
CALL EPRINT
|
||||
DEFB 'H',CR,LF,' Check Size = '
|
||||
DEFB 0
|
||||
LD E,(HL) ; next 16-bit value from DPB in DE
|
||||
INC HL ; (= CKS, Check Size)
|
||||
LD D,(HL)
|
||||
INC HL
|
||||
EX DE,HL ; swap regs
|
||||
CALL PHLFDC ; display value
|
||||
EX DE,HL ; swap regs back
|
||||
CALL EPRINT
|
||||
DEFB CR,LF,' Track Offset = '
|
||||
DEFB 0
|
||||
LD E,(HL) ; next 16-bit value from DPB in DE
|
||||
INC HL ; (= Track Offset)
|
||||
LD D,(HL)
|
||||
INC HL
|
||||
EX DE,HL ; swap regs
|
||||
CALL PHLFDC ; display value
|
||||
EX DE,HL ; swap regs back
|
||||
CALL P2TAB
|
||||
CALL EPRINT
|
||||
DEFB '(same)',CR,LF
|
||||
DEFB 0
|
||||
JP 0 ; and exit with Warm Boot
|
||||
|
||||
|
||||
; print 2 tabs on CON:
|
||||
P2TAB: PUSH AF
|
||||
LD A,TAB ; <TAB> in A
|
||||
CALL COUT ; display on CON:
|
||||
CALL COUT ; 2x
|
||||
POP AF ; restore
|
||||
RET
|
||||
|
||||
|
||||
;::::: HELP
|
||||
|
||||
HELP
|
||||
CALL EPRINT
|
||||
DEFB CR,LF,'SHOWHD - Display DPH and DPB data for '
|
||||
DEFB 'specified drive for making B/P',CR,LF
|
||||
DEFB ' Hard Drive Partition data the same as '
|
||||
DEFB 'an operating system.',CR,LF,LF
|
||||
DEFB ' Syntax:',CR,LF,LF
|
||||
DEFB TAB,'SHOWHD <-- Execute program interactively',CR,LF
|
||||
DEFB TAB,'SHOWHD // <-- Display this message',CR,LF
|
||||
DEFB 0
|
||||
LD SP,(STACK)
|
||||
RET
|
||||
|
||||
|
||||
;::::: SUPPORT FUNCTIONS
|
||||
|
||||
; get addr of Disk Parameter Header (DPH)
|
||||
; in: Disk drive letter in mem variable
|
||||
; out: HL= addr DPH
|
||||
GDPHADR: LD HL,(CPMBIOS+1) ; addr Bios fn #1 (WBOOT)
|
||||
LD L,9*3 ; adjust ptr to fn #9 (SELDSK)
|
||||
LD A,(DRLTR) ; get drive letter
|
||||
SUB 'A' ; ..and convert to number
|
||||
LD C,A ; copy to reg. C (for Bios call)
|
||||
LD E,0
|
||||
JP (HL) ; "call" Bios fn #9 and let return from there
|
||||
; (SELDSK returns DPH addr in HL)
|
||||
|
||||
|
||||
; print disk size to CON: (capacity of a drive in kB)
|
||||
; output as decimal with provision for 3-byte values - see ZXD21.Z80 PRBIG
|
||||
; in: 24-bit value to print in A,H,L
|
||||
PDSKSZ: PUSH DE ; save regs
|
||||
PUSH BC
|
||||
EX AF,AF' ; swap AF
|
||||
PUSH AF ; save it
|
||||
EX AF,AF' ; ..and swap back
|
||||
LD B,0
|
||||
LD C,-1 ; set initial result
|
||||
LD DE,86A0H ; 100,000 = 0x0186A0, set lower 2 bytes
|
||||
OR A ; clear C-Flag
|
||||
PDSKSZ0: INC C ; accumulate count
|
||||
SBC HL,DE ; subtract lower 2 bytes
|
||||
SBC A,1 ; ..and upper byte
|
||||
JR NC,PDSKSZ0 ; loop till done
|
||||
ADD HL,DE ; adjust underflow
|
||||
ADC A,1
|
||||
CALL PHLD1
|
||||
LD DE,10000 ; print 10000's
|
||||
CALL PHLD
|
||||
LD DE,1000 ; print 1000's
|
||||
CALL PHLD
|
||||
LD DE,100 ; print 100's
|
||||
CALL PHLD
|
||||
LD DE,10 ; print 10's
|
||||
CALL PHLD
|
||||
LD A,L ; print 1's
|
||||
CALL PHLD2
|
||||
POP AF ; restore regs
|
||||
EX AF,AF' ; swap
|
||||
POP BC ; ..and also restore other regs
|
||||
POP DE
|
||||
RET
|
||||
|
||||
|
||||
; print content of HL to CON: as decimal
|
||||
; divide HL by DE, convert remainder to ascii digit and print it
|
||||
; (similar to SYSLIB's PHLFDC/PHDC1 - see ZXD21.Z80 DECDSP)
|
||||
; in: HL= value, DE= divisor
|
||||
PHLD: LD C,-1 ; set initial count
|
||||
OR A ; clear C-Flag
|
||||
PHLD0: INC C ; accumulate count
|
||||
SBC HL,DE ; divide by subtraction
|
||||
SBC A,0
|
||||
JR NC,PHLD0 ; ..and loop while more to go
|
||||
ADD HL,DE ; compensate underflow
|
||||
ADC A,0
|
||||
PHLD1: EX AF,AF' ; swap to retain flags
|
||||
LD A,C ; get result (quotient)
|
||||
OR A ; is it zero ?
|
||||
JR NZ,PHLD2 ; ..if not, skip over
|
||||
OR B ; get prior digit print flag
|
||||
JR Z,PHLD3 ; ..if anything printed yet, jump
|
||||
XOR A ; else, print a zero
|
||||
PHLD2: ADD A,'0' ; convert to ascii
|
||||
LD B,A ; remember for next loop
|
||||
CALL COUT ; ..and display it
|
||||
PHLD3: EX AF,AF' ; swap regs back
|
||||
RET
|
||||
|
||||
|
||||
; intercept COUT to re-route SYSLIB calls to to BOUT
|
||||
; --> declare COUT as PUBLIC, and do _not_ import from SYSLIB
|
||||
COUT: JP BOUT
|
||||
|
||||
|
||||
;:::::::::::::::::::::::::::::::::::::::::::::::::::::
|
||||
; SYSLIB - 0x0530
|
||||
; end addr 0x064d (begin DSEG)
|
||||
;:::::::::::::::::::::::::::::::::::::::::::::::::::::
|
||||
|
||||
|
||||
;::::: RAM STORAGE
|
||||
|
||||
DSEG
|
||||
|
||||
KBTRK: DEFW 0 ; kByte/Trk (Sect/Trk divided by 8)
|
||||
BSH3: DEFB 0 ; BSH -3 (Block Shift Factor -3)
|
||||
|
||||
; disk capacity as 24-bit value
|
||||
DCAPH: DEFB 0 ; high byte
|
||||
DCAPML: DEFW 0 ; middle and low byte
|
||||
|
||||
DRLTR: DEFB 0 ; drive letter (entered by user)
|
||||
DPHADR: DEFW 0 ; addr DPH (not used)
|
||||
DPBADR: DEFW 0 ; addr DPB (not used)
|
||||
|
||||
DEFS 30H ; room for stack
|
||||
STACK: DEFW 0 ; stack storage location
|
||||
|
||||
END
|
||||
|
||||
|
||||
;************************************************************************
|
||||
; Remarks jxl:
|
||||
; SHOWHD.COM, included in available B/P Bios package(s), was dis-
|
||||
; assembled and extensively commented. Labels are up to seven chars long
|
||||
; to comply with M-REL standards. However, it is recommended to use SLR
|
||||
; tools that support labels up to sixteen chars.
|
||||
; In its current state, the compiled/linked file matches exactly the
|
||||
; original SHOWHD.COM, i.e. no changes to the source were made.
|
||||
;
|
||||
; The program is not very complex. However, one thing might be worth
|
||||
; to be pointed out: SYSLIB's routine COUT is replaced with an own
|
||||
; implementation. While it is just a re-routing to another SYSLIB routine,
|
||||
; it shows how simply this can be achieved. Bear in mind that _all_
|
||||
; SYSLIB routines calling COUT would now call the local implementation
|
||||
; instead. With this technique existing routines can be modified without
|
||||
; rewriting them entirely.
|
||||
;************************************************************************
|
||||
546
Source/BPBIOS/UTIL/sizeram.z80
Normal file
546
Source/BPBIOS/UTIL/sizeram.z80
Normal file
@@ -0,0 +1,546 @@
|
||||
TITLE "B/P Bios RAM size display"
|
||||
;************************************************************************
|
||||
;* S I Z E R A M *
|
||||
;* Determine size and location of (banked) Memory *
|
||||
;* by Harold F. Bower and Cameron W. Cotrill *
|
||||
;*----------------------------------------------------------------------*
|
||||
;* Disassembly: jxl Dec 2024 *
|
||||
;* public release 1.0 Apr 2025 *
|
||||
;* see remarks at the end *
|
||||
;*----------------------------------------------------------------------*
|
||||
;* LINK with Version 4 libraries: VLIB, Z3LIB, SYSLIB *
|
||||
;* *
|
||||
;* A>Z80ASM SIZERAM/RS *
|
||||
;* A>SLRNK SIZERAM/N,/A:100,/D:0750,SIZERAM,VLIBS/S,Z3LIBS/S,SYSLIBS/S,/E *
|
||||
;************************************************************************
|
||||
|
||||
VER EQU 12
|
||||
REV EQU ' '
|
||||
|
||||
DATE MACRO
|
||||
DEFB '30 Aug 01'
|
||||
ENDM
|
||||
|
||||
|
||||
BEL EQU 07H ; Bell character
|
||||
LF EQU 0AH ; Line Feed character
|
||||
CR EQU 0DH ; Carriage Return character
|
||||
|
||||
CPMBIOS EQU 0 ; CP/M BIOS warm boot (JP)
|
||||
CPMBDOS EQU 5 ; CP/M BDOS entry point (JP)
|
||||
CPMFCB EQU 5CH ; CP/M standard FCB #1 (+1 filename, +9 filetype)
|
||||
|
||||
|
||||
; From Z3LIB Get..
|
||||
EXTRN GETNAME, PRTNAME, Z3INIT, WHRENV
|
||||
|
||||
; From SYSLIB Get..
|
||||
EXTRN EPRINT, CRLF, PAFDC, PHLFDC, COUT, CODEND
|
||||
|
||||
|
||||
;::::: PROGRAM START
|
||||
|
||||
ORG 100H
|
||||
CSEG
|
||||
|
||||
|
||||
SIZERAM: JP START ; bypass header
|
||||
DEFB 'Z3ENV' ; this is a ZCPR3 utility
|
||||
DEFB 1 ; show external environment
|
||||
|
||||
ENVADR: DEFW 0 ; addr of Z3 environment
|
||||
DEFW SIZERAM ; type 4 filler
|
||||
|
||||
DEFB 'SIZERAM ',0 ; configuration name
|
||||
|
||||
START: LD (STACK),SP
|
||||
LD SP,STACK
|
||||
CALL EPRINT
|
||||
DEFB 'B/P Banked RAM Sizing Utility V',VER/10+'0','.'
|
||||
DEFB VER MOD 10 + '0',REV,' '
|
||||
DATE
|
||||
DEFB CR,LF
|
||||
DEFB 0
|
||||
CALL CHKZ3E ; check if Z3 Environment is valid
|
||||
CALL GETNAME ; get actual program name
|
||||
CALL CHKHELP ; check cmdline for help request
|
||||
CALL CHKSYS ; check if running under B/P Bios
|
||||
CALL M$BVER ; display version # msg
|
||||
LD HL,(BPCNFG) ; get addr of config area
|
||||
INC HL ; move ptr fwd
|
||||
INC HL
|
||||
LD A,(HL) ; get OPTF1 (option flag at CONFIG+2)
|
||||
AND 00000001b ; mask bit 0
|
||||
LD (BPBNKD),A ; ..and store it
|
||||
JP NZ,BNKDSYS ; if banked, jump to continue
|
||||
|
||||
|
||||
;::::: NON-BANKED SYSTEM
|
||||
|
||||
NBNKSYS: INC HL ; move ptr to TPABNK in config area
|
||||
INC HL
|
||||
CALL EPRINT
|
||||
DEFB CR,LF,LF,'Non-Banked System using TPA Banks = '
|
||||
DEFB 0
|
||||
LD A,(HL) ; get value
|
||||
PUSH AF
|
||||
CALL PAFDC ; ..and display
|
||||
LD A,'/'
|
||||
CALL COUT
|
||||
POP AF ; restore value
|
||||
INC A ; increase it
|
||||
CALL PAFDC ; ..and display
|
||||
CALL CRLF
|
||||
JP EXIT
|
||||
|
||||
|
||||
;::::: BANKED SYSTEM
|
||||
|
||||
BNKDSYS: INC HL ; move ptr to UABNK in config area
|
||||
LD DE,UABNK ; ..and make local copies
|
||||
LD BC,5 ; (5 bytes, UABNK..MAXBNK)
|
||||
LDIR
|
||||
CALL CODEND ; get first available page after code end
|
||||
LD (WSPCBEG),HL ; and store it
|
||||
EX DE,HL ; swap regs
|
||||
|
||||
; memory read/write tests for all ram banks at addr 0x0000
|
||||
; building a map in WSPC area: b1= zero if no bank found, b2= initially read byte
|
||||
|
||||
; test #1: 0x00/0xFF byte - iterate over banks in forward order
|
||||
LD HL,0 ; set addr 0x0000
|
||||
LD C,0 ; start with bank #0 (TPA)
|
||||
MEMRW: CALL GETFRB ; get byte
|
||||
LD B,A ; store in B
|
||||
CPL ; invert (complement) byte
|
||||
CALL SETINB ; write it back
|
||||
CALL GETFRB ; read again
|
||||
CPL ; ..and invert
|
||||
XOR B ; xor'd with initially read byte
|
||||
JR NZ,MEMRW0 ; ..if no match, skip over
|
||||
LD A,B ; get initially read byte
|
||||
CALL SETINB ; write it
|
||||
CALL GETFRB ; and read again
|
||||
SUB B ; subtract initially read byte
|
||||
JR NZ,MEMRW0 ; ..if not zero, skip over
|
||||
|
||||
; injected opcode 0xF6 (OR n) to skip following XOR A
|
||||
DEFB 0F6h ; = OR 0AFH (write non-zero)
|
||||
MEMRW0: XOR A ; nullify A
|
||||
LD (DE),A ; store in WSPC area
|
||||
INC DE ; move ptr fwd
|
||||
LD A,B ; get initially read byte
|
||||
LD (DE),A ; store it, too
|
||||
INC DE ; move ptr fwd
|
||||
INC C ; bank # +1
|
||||
JR NZ,MEMRW ; ..loop till all possible (256 / 0x100) banks tested
|
||||
|
||||
; test #2: write no. in each bank (iterate backward), then read and compare (forward)
|
||||
DEC C ; correct bank # (loop was 1 ahead)
|
||||
MEMWRB: DEC DE ; move ptr back
|
||||
DEC DE
|
||||
LD A,(DE) ; get byte
|
||||
OR A ; check if bank exists
|
||||
JR Z,MEMWRB0 ; ..if not, skip over
|
||||
LD A,C ; else, get bank #
|
||||
CALL SETINB ; and write in bank
|
||||
MEMWRB0: LD A,C ; get bank #
|
||||
SUB 1 ; -1
|
||||
LD C,A ; set bank #
|
||||
JR NC,MEMWRB ; ..if not below zero, loop
|
||||
INC C ; correct bank #
|
||||
|
||||
MEMRDB: LD A,(DE) ; get byte from WSPC area
|
||||
OR A ; check if bank exists
|
||||
JR Z,MEMRDB0 ; ..if not, skip over
|
||||
CALL GETFRB ; read byte from bank
|
||||
CP C ; compare to bank #
|
||||
JR Z,MEMRDB0 ; ..if match, skip over
|
||||
XOR A ; else, set <NUL> as indicator
|
||||
LD (DE),A ; that bank doesn't exist
|
||||
MEMRDB0: INC DE ; move ptr fwd
|
||||
INC DE
|
||||
INC C ; bank # +1
|
||||
JR NZ,MEMRDB ; ..loop till all possible (256 / 0x100) banks tested
|
||||
|
||||
; restore bytes initially read in all banks
|
||||
LD DE,(WSPCBEG) ; set ptr to start of WSPC addr
|
||||
MEMRST: LD A,(DE) ; get byte
|
||||
OR A ; check bank exists
|
||||
JR Z,MEMRST0 ; ..if not, skip over
|
||||
INC DE ; move ptr fwd
|
||||
LD A,(DE) ; get initially read byte
|
||||
CALL SETINB ; ..and restore it
|
||||
INC DE ; ptr fwd
|
||||
JR MEMRST1 ; skip over
|
||||
MEMRST0: INC DE ; ptr fwd
|
||||
INC DE
|
||||
MEMRST1: INC C ; bank # +1
|
||||
JR NZ,MEMRST ; loop till done
|
||||
; ..then fall through to display collected data
|
||||
|
||||
|
||||
; display information for Banked System
|
||||
; detect ranges of continuous ram banks
|
||||
;
|
||||
; HL= ptr in WSPC area
|
||||
; C= counter (up) bank #, B= counter (down) for outer loop
|
||||
; D= bank # begin of range, E= bank # end of range
|
||||
LD BC,0
|
||||
LD HL,(WSPCBEG) ; set ptr to start of WSPC addr
|
||||
BRANGLP: LD A,(HL) ; get byte
|
||||
OR A ; check bank exists
|
||||
JR NZ,BRANGE ; ..if so, skip over
|
||||
INC HL ; else, use a shorter loop
|
||||
INC HL ; ..move ptr fwd
|
||||
INC C ; ..and bank #
|
||||
JR NZ,BRANGLP ; loop until max. reached (256 / 0x100)
|
||||
JR PCNFIG ; else, display Bios config report
|
||||
|
||||
BRANGE: LD D,C ; store start of range (bank # in D)
|
||||
BRANG0: INC HL ; ptr fwd
|
||||
INC HL
|
||||
INC C ; bank # +1
|
||||
JR NZ,BRANG1 ; ..if not max., skip over
|
||||
DEC B
|
||||
JR PBRANG ; else, display bank ranges
|
||||
|
||||
BRANG1: LD A,(HL) ; get byte
|
||||
OR A ; check bank exists
|
||||
JR NZ,BRANG0 ; ..if so, loop
|
||||
; else, fall through
|
||||
|
||||
; display collected information
|
||||
PBRANG: LD E,C ; get current bank # in E
|
||||
DEC E ; loop is ahead, so -1
|
||||
CALL EPRINT
|
||||
DEFB CR,LF,'RAM Banks '
|
||||
DEFB 0
|
||||
LD A,D ; get begin of range
|
||||
CALL PAFDC ; ..and display it
|
||||
CALL EPRINT
|
||||
DEFB ' - '
|
||||
DEFB 0
|
||||
LD A,E ; get end of range
|
||||
CALL PAFDC ; ..and display it
|
||||
CALL EPRINT
|
||||
DEFB ' ('
|
||||
DEFB 0
|
||||
LD A,E ; get end of range
|
||||
INC A ; adjust for correct calc
|
||||
SUB D ; calc difference of begin/end
|
||||
PUSH HL
|
||||
LD L,A ; get value in L
|
||||
LD H,0 ; ..and multiply for display
|
||||
ADD HL,HL ; *2
|
||||
ADD HL,HL ; *4
|
||||
ADD HL,HL ; *8
|
||||
ADD HL,HL ; *16
|
||||
ADD HL,HL ; *32 (fixed bank size of 32k assumed)
|
||||
CALL PHLFDC ; ..and display
|
||||
POP HL
|
||||
CALL EPRINT
|
||||
DEFB 'k Bytes)'
|
||||
DEFB 0
|
||||
LD A,B ; check if more to go
|
||||
OR A
|
||||
JR Z,BRANGLP ; loop till done
|
||||
|
||||
; display information as stored in B/P Bios config area
|
||||
PCNFIG: CALL EPRINT
|
||||
DEFB CR,LF,LF,'Bios Reports:',CR,LF
|
||||
DEFB ' TPA Banks = '
|
||||
DEFB 0
|
||||
LD A,(TPABNK) ; get TPA bank #
|
||||
PUSH AF ; save regs
|
||||
CALL PAFDC ; and display it
|
||||
LD A,'/'
|
||||
CALL COUT
|
||||
POP AF ; restore value
|
||||
INC A ; +1 (TPA bank is build by 2 consecutive banks)
|
||||
; fixed size of 32k per bank is assumed
|
||||
CALL PAFDC ; and display it
|
||||
CALL EPRINT
|
||||
DEFB CR,LF,' System Bank = '
|
||||
DEFB 0
|
||||
LD A,(SYSBNK) ; get SYSTEM bank #
|
||||
CALL PAFDC ; and display it
|
||||
CALL EPRINT
|
||||
DEFB CR,LF,' User Bank = '
|
||||
DEFB 0
|
||||
LD A,(UABNK) ; get # of USER banks
|
||||
OR A
|
||||
JR NZ,PCNFIG0 ; ..if not zero, skip over
|
||||
CALL EPRINT
|
||||
DEFB '(None)'
|
||||
DEFB 0
|
||||
JR PCNFIG1
|
||||
PCNFIG0: CALL PAFDC ; display # of USER banks
|
||||
PCNFIG1: CALL EPRINT
|
||||
DEFB CR,LF,' RAM Disk Start = '
|
||||
DEFB 0
|
||||
LD A,(RAMBNK) ; get # of begin RAM Disk
|
||||
CALL PAFDC
|
||||
CALL EPRINT
|
||||
DEFB CR,LF,' Last Used Bank = '
|
||||
DEFB 0
|
||||
LD A,(MAXBNK) ; get max. available bank #
|
||||
CALL PAFDC
|
||||
CALL EPRINT
|
||||
DEFB CR,LF,LF,' -- Scan Complete.',CR,LF
|
||||
DEFB 0
|
||||
JP EXIT
|
||||
|
||||
|
||||
;::::: SUPPORT FUNCTIONS
|
||||
|
||||
; get first token from command line (in FCB #1)
|
||||
; and check if help was requested
|
||||
CHKHELP: LD HL,CPMFCB+1
|
||||
LD A,(HL) ; get byte
|
||||
CP '/' ; is this a help request ?
|
||||
RET NZ ; ..if not, return
|
||||
INC HL ; else, move ptr fwd
|
||||
LD A,(HL) ; and get next byte
|
||||
CP '/' ; is it also '/' ?
|
||||
RET NZ ; ..if not, return
|
||||
; else, fall through and display help
|
||||
|
||||
|
||||
;::::: HELP SCREEN
|
||||
|
||||
HELP: CALL EPRINT
|
||||
DEFB CR,LF,' '
|
||||
DEFB 0
|
||||
CALL PPRGNAM
|
||||
CALL EPRINT
|
||||
DEFB ' Determines location and Size of Banked Memory.',CR,LF
|
||||
DEFB ' (Only TPA Banks printed if Non-Banked)',CR,LF,LF
|
||||
DEFB ' Syntax:',CR,LF
|
||||
DEFB ' '
|
||||
DEFB 0
|
||||
CALL PPRGNAM
|
||||
CALL EPRINT
|
||||
DEFB ' - Print 32k RAM banks present and B/P Allocations',CR,LF
|
||||
DEFB ' '
|
||||
DEFB 0
|
||||
CALL PPRGNAM
|
||||
CALL EPRINT
|
||||
DEFB ' // - display this screen',CR,LF
|
||||
DEFB 0 ; fall through and exit
|
||||
|
||||
|
||||
;::::: EXIT PROGRAM
|
||||
|
||||
EXIT: CALL CRLF
|
||||
LD SP,(STACK) ; restore stack pointer
|
||||
RET ; ..and return to system
|
||||
|
||||
|
||||
;::::: SUPPORT FUNCTIONS
|
||||
|
||||
; check if running under ZCPR3 and status of wheel byte
|
||||
; terminate program if not succesful
|
||||
CHKZ3E: LD HL,(CPMBDOS+1)
|
||||
CALL WHRENV ; find Z3 Environment Descriptor
|
||||
LD (ENVADR),HL ; store ENV ptr
|
||||
LD A,H ; check if invalid (= zero)
|
||||
OR L
|
||||
JP Z,E$BPBIO ; ..if so, jump error and terminate
|
||||
CALL Z3INIT ; else, init for Z3LIB routines
|
||||
LD A,41 ; offset to addr of wheel byte (Z3WHL)
|
||||
CALL ADDHLA ; adjust ptr
|
||||
LD E,(HL) ; get addr in DE
|
||||
INC HL
|
||||
LD D,(HL)
|
||||
EX DE,HL ; swap regs
|
||||
LD A,(HL) ; get value of wheel byte
|
||||
AND A ; check if zero
|
||||
RET NZ ; ..if not (wheel on), return
|
||||
CALL EPRINT ; else, display message and exit
|
||||
DEFB BEL,CR,LF,'Must be wheel to Execute !',CR,LF
|
||||
DEFB 0
|
||||
JR EXIT
|
||||
|
||||
|
||||
; check if running under B/P Bios
|
||||
; if not, program is terminated
|
||||
CHKSYS: LD HL,(CPMBIOS+1) ; get warm boot addr (BIOS fn #1)
|
||||
LD L,30*3 ; adjust ptr to fn #30
|
||||
LD A,(HL) ; check byte at ptr location
|
||||
CP 0C3H ; is it opcode 0xC3 (JP) ?
|
||||
JR NZ,E$BPBIO ; ..if not, jump error and terminate
|
||||
CALL JUMPHL ; else, "call" B/P Bios fn #30 (RETBIO)
|
||||
LD (BPVERS),A ; store version of B/P Bios
|
||||
LD (BPADDR),BC ; " base addr
|
||||
LD (BPCNFG),DE ; " config area addr
|
||||
LD HL,-6 ; move ptr 6 bytes backward
|
||||
ADD HL,DE ; (signature string)
|
||||
LD A,(HL) ; get byte
|
||||
CP 'B' ; is it 'B' ?
|
||||
JR NZ,E$BPBIO ; ..if not, jump error and exit
|
||||
INC HL ; ptr fwd
|
||||
LD A,(HL) ; get byte
|
||||
CP '/' ; is it '/' ?
|
||||
JR NZ,E$BPBIO ; ..if not, jump error and exit
|
||||
INC HL ; ptr fwd
|
||||
LD A,(HL) ; get byte
|
||||
CP 'P' ; is it 'P' ?
|
||||
RET Z ; ..if so, return
|
||||
; else, fall through (error and exit)
|
||||
|
||||
|
||||
; msg aborting
|
||||
E$BPBIO: CALL EPRINT
|
||||
DEFB CR,LF,BEL,'Not B/P Bios, aborting...!',CR,LF
|
||||
DEFB 0
|
||||
RST 0
|
||||
|
||||
|
||||
; print program name on CON: device
|
||||
; (either the actual name, or fallback to default)
|
||||
; only used by HELP
|
||||
PPRGNAM: LD A,(ENVADR+1) ; get high byte of ENVPTR
|
||||
OR A ; check if valid (<> zero)
|
||||
JP NZ,PRTNAME ; ..if so, display actual name
|
||||
; ..and let return from there
|
||||
CALL EPRINT ; else, display default
|
||||
DEFB 'SIZERAM'
|
||||
DEFB 0
|
||||
RET
|
||||
|
||||
|
||||
; msg B/P Bios Vers x.x
|
||||
M$BVER: CALL EPRINT
|
||||
DEFB ' (B/P Bios Vers '
|
||||
DEFB 0
|
||||
LD A,(BPVERS) ; get version #
|
||||
RRCA ; reverse nybbles in A
|
||||
RRCA
|
||||
RRCA
|
||||
RRCA
|
||||
AND 00001111b ; mask lower nybble
|
||||
ADD A,'0' ; make it ascii
|
||||
CALL COUT ; ..and display
|
||||
LD A,'.'
|
||||
CALL COUT
|
||||
LD A,(BPVERS) ; get version #
|
||||
AND 00001111b ; mask lower nybble
|
||||
ADD A,'0' ; make it ascii
|
||||
CALL COUT ; ..and display
|
||||
CALL EPRINT
|
||||
DEFB ')',CR,LF
|
||||
DEFB 0
|
||||
RET
|
||||
|
||||
|
||||
; add A to HL (result in HL)
|
||||
ADDHLA: ADD A,L ; add L
|
||||
LD L,A ; store result in L
|
||||
RET NC ; ..if no overflow, return
|
||||
INC H ; else, increment H
|
||||
RET
|
||||
|
||||
|
||||
; the following routines rearrange Top of Stack by injecting an
|
||||
; intermediate return addr, and putting the Bios fn call on top
|
||||
; so that HL regs are preserved
|
||||
; order of steps:
|
||||
; [1] HL (= addr) is pushed onto stack
|
||||
; [2] intermediate return addr is swapped to Top of Stack
|
||||
; [3] HL (= addr) is pushed onto stack again
|
||||
; [4] Bios fn JP addr is swapped to Top of Stack
|
||||
; [5] Bios is "called" through RET, and returns to intermediate addr
|
||||
|
||||
; get byte from ram bank - in the form LD A,(HL)
|
||||
; in: C= bank #, HL= addr
|
||||
; out: A= byte
|
||||
GETFRB: PUSH BC
|
||||
PUSH HL ; save addr
|
||||
LD HL,GETFRB0 ; load return addr
|
||||
EX (SP),HL ; put it on stack
|
||||
PUSH HL ; save HL again (previous top of stack)
|
||||
LD HL,(BPADDR) ; get B/P Bios base addr
|
||||
LD L,35*3 ; adjust ptr to fn #35 (FRGETB)
|
||||
EX (SP),HL ; put addr on stack
|
||||
RET ; ..and "call" Bios fn through stack
|
||||
|
||||
GETFRB0: POP BC ; restore regs
|
||||
RET ; ..and finally return
|
||||
|
||||
; set byte in ram bank - in the form LD (HL),A
|
||||
; in: C= bank #, HL= addr, A= byte to set
|
||||
SETINB: PUSH BC
|
||||
PUSH HL ; save addr
|
||||
LD HL,GETFRB0 ; load return addr
|
||||
EX (SP),HL ; put it on stack
|
||||
PUSH HL ; save HL again (previous top of stack)
|
||||
LD HL,(BPADDR) ; get B/P Bios base addr
|
||||
LD L,37*3 ; adjust ptr to fn #37 (FRPUTB)
|
||||
EX (SP),HL ; put addr on stack
|
||||
RET ; ..and "call" Bios fn through stack
|
||||
|
||||
|
||||
; "called" as a pseudo-routine that returns to caller
|
||||
; in: HL= target addr
|
||||
JUMPHL: JP (HL) ; jump to addr in HL regs
|
||||
|
||||
|
||||
;::::: LOCAL DATA (not in DSEG)
|
||||
|
||||
WSPCBEG: DEFW 0 ; addr begin of workspace area
|
||||
; (first available page, returned by CODEND)
|
||||
|
||||
; data retrieved from running system
|
||||
BPVERS: DEFB 0 ; B/P Bios version
|
||||
BPADDR: DEFW 0 ; B/P Bios base addr
|
||||
BPCNFG: DEFW 0 ; addr of Config Area
|
||||
BPBNKD: DEFB 0 ; indicator banked system (bit 0 of OPTF1) --> not used
|
||||
|
||||
; local copies of RAM bank configuration
|
||||
UABNK: DEFB 0 ; beginning of User Bank(s)
|
||||
TPABNK: DEFB 0 ; TPA Bank
|
||||
SYSBNK: DEFB 0 ; beginning of System Bank(s)
|
||||
RAMBNK: DEFB 0 ; base bank # for Ram Disk
|
||||
MAXBNK: DEFB 0 ; highest permissible Bank #
|
||||
|
||||
|
||||
DEFS 30H ; room for stack
|
||||
STACK: DEFW 0 ; stack storage location
|
||||
|
||||
|
||||
;:::::::::::::::::::::::::::::::::::::::::::::::::::::
|
||||
; Z3LIB - 0x05ae
|
||||
; SYSLIB - 0x065c
|
||||
; end addr 0x0750 (begin DSEG)
|
||||
;:::::::::::::::::::::::::::::::::::::::::::::::::::::
|
||||
|
||||
|
||||
;::::: RAM STORAGE
|
||||
|
||||
DSEG
|
||||
|
||||
END
|
||||
|
||||
|
||||
;************************************************************************
|
||||
; Remarks jxl:
|
||||
; SIZERAM.COM, included in available B/P Bios package(s), was dis-
|
||||
; assembled and extensively commented. Labels are up to seven chars long
|
||||
; to comply with M-REL standards. However, it is recommended to use SLR
|
||||
; tools that support labels up to sixteen chars.
|
||||
; In its current state, the compiled/linked file matches exactly the
|
||||
; original INITRAM.COM, i.e. no changes to the source were made.
|
||||
;
|
||||
; The program uses an interesting technique to read and write data in
|
||||
; alternative ram banks utilizing B/P Bios functions no. 35 FRGETB and
|
||||
; no. 37 FRPUTB. Top of Stack is manipulated to keep registers intact
|
||||
; and "call" functions through a RET statement (instead of CALL.)
|
||||
; Another specialty which is worth mentioning: Routine MEMRW (memory
|
||||
; read/write) contains an "injected" opcode to alter the behaviour at
|
||||
; runtime. Otherwise a more complex logic and/or additional routine
|
||||
; would have been necessary.
|
||||
; Storage of local data is in CSEG (code segment), not DSEG. There
|
||||
; seems to be no particular reason for this. So, it can be assumed that
|
||||
; this just happened by mistake.
|
||||
;************************************************************************
|
||||
1323
Source/BPBIOS/UTIL/zscfg2.z80
Normal file
1323
Source/BPBIOS/UTIL/zscfg2.z80
Normal file
File diff suppressed because it is too large
Load Diff
1247
Source/BPBIOS/bpart.txt
Normal file
1247
Source/BPBIOS/bpart.txt
Normal file
File diff suppressed because it is too large
Load Diff
@@ -4,15 +4,15 @@ setlocal
|
||||
:: call BuildDoc || exit /b
|
||||
call BuildProp || exit /b
|
||||
call BuildShared || exit /b
|
||||
call BuildBP || exit /b
|
||||
call BuildImages || exit /b
|
||||
call BuildROM %* || exit /b
|
||||
call BuildZRC || exit /b
|
||||
call BuildZ1RCC || exit /b
|
||||
call BuildZZRCC || exit /b
|
||||
call BuildZRC512 || exit /b
|
||||
call BuildFZ80 || exit /b
|
||||
call BuildSZ80 || exit /b
|
||||
call BuildEZ512 || exit /b
|
||||
call BuildMSX || exit /b
|
||||
|
||||
if "%1" == "dist" (
|
||||
call Clean || exit /b
|
||||
|
||||
@@ -1,4 +0,0 @@
|
||||
@echo off
|
||||
setlocal
|
||||
|
||||
pushd BPBIOS && call Build || exit /b & popd
|
||||
@@ -1,4 +0,0 @@
|
||||
@echo off
|
||||
setlocal
|
||||
|
||||
pushd FZ80 && call Build || exit /b & popd
|
||||
4
Source/BuildMSX.cmd
Normal file
4
Source/BuildMSX.cmd
Normal file
@@ -0,0 +1,4 @@
|
||||
@echo off
|
||||
setlocal
|
||||
|
||||
pushd MSX && call Build || exit /b & popd
|
||||
4
Source/BuildSZ80.cmd
Normal file
4
Source/BuildSZ80.cmd
Normal file
@@ -0,0 +1,4 @@
|
||||
@echo off
|
||||
setlocal
|
||||
|
||||
pushd SZ80 && call Build || exit /b & popd
|
||||
@@ -8,8 +8,10 @@ pushd QPM && call Build || exit /b & popd
|
||||
pushd ZCPR && call Build || exit /b & popd
|
||||
pushd ZCPR-DJ && call Build || exit /b & popd
|
||||
pushd ZSDOS && call Build || exit /b & popd
|
||||
pushd ZSDOS2 && call Build || exit /b & popd
|
||||
pushd CPM3 && call Build || exit /b & popd
|
||||
pushd ZPM3 && call Build || exit /b & popd
|
||||
pushd BPBIOS && call Build || exit /b & popd
|
||||
pushd CPNET && call Build || exit /b & popd
|
||||
pushd pSys && call Build || exit /b & popd
|
||||
pushd Apps && call Build || exit /b & popd
|
||||
|
||||
@@ -3201,8 +3201,9 @@ MAKDPH0: ; HANDLE RAM/ROM
|
||||
CP DIODEV_MD ; RAM/ROM DISK?
|
||||
JR Z,MAKDPH0 ; HANDLE SPECIAL
|
||||
LD DE,DPB_FD144 ; PRELOAD FLOPPY DPB
|
||||
CP DIODEV_FD ; FLOPPY?
|
||||
JR Z,MAKDPH1 ; IF SO, PROCEED TO DPH CREATION
|
||||
;CP DIODEV_FD ; FLOPPY?
|
||||
BIT 7,C ; FLOPPY?
|
||||
JR NZ,MAKDPH1 ; IF SO, PROCEED TO DPH CREATION
|
||||
LD DE,DPB_RF ; PRELOAD RAM FLOPPY DPB
|
||||
CP DIODEV_RF ; RAM FLOPPY?
|
||||
JR Z,MAKDPH1 ; IF SO, PROCEED TO DPH CREATION
|
||||
@@ -3381,7 +3382,7 @@ DEVUNK .DB "UNK$"
|
||||
RST 08 ; CALL HBIOS
|
||||
LD A,D ; RESULTANT DEVICE TYPE
|
||||
PUSH DE ; NEED TO SAVE UNIT NUMBER (IN E)
|
||||
AND $0F ; ISOLATE DEVICE BITS
|
||||
AND $1F ; ISOLATE DEVICE BITS
|
||||
ADD A,A ; MULTIPLY BY TWO FOR WORD TABLE
|
||||
LD HL,DEVTBL ; POINT TO START OF DEVICE NAME TABLE
|
||||
CALL ADDHLA ; ADD A TO HL TO POINT TO TABLE ENTRY
|
||||
@@ -3407,6 +3408,7 @@ DEVTBL: ; DEVICE TABLE
|
||||
.DW DEV04, DEV05, DEV06, DEV07
|
||||
.DW DEV08, DEV09, DEV10, DEV11
|
||||
.DW DEV12, DEV13, DEV14, DEV15
|
||||
.DW DEV16, DEV17, DEV18
|
||||
;
|
||||
DEVUNK .DB "???$"
|
||||
DEV00 .DB "MD$"
|
||||
@@ -3424,7 +3426,10 @@ DEV11 .DB "IMM$"
|
||||
DEV12 .DB "SYQ$"
|
||||
DEV13 .DB "CHUSB$"
|
||||
DEV14 .DB "CHSD$"
|
||||
DEV15 .EQU DEVUNK
|
||||
DEV15 .DB "USB$"
|
||||
DEV16 .DB "ESPSD$"
|
||||
DEV17 .DB "SCSI$"
|
||||
DEV18 .EQU DEVUNK
|
||||
;
|
||||
#ENDIF
|
||||
;
|
||||
|
||||
@@ -38,7 +38,7 @@ It is an independent disassembly and reconstruction of CCP/BDOS.
|
||||
DRI CPM22PAT01 was already applied. Unclear why, but the BDOS
|
||||
source was checking for a blank instead of a ctrl-s in the
|
||||
KBSTAT routine. Ctrl-s seems to be correct based on all other
|
||||
BDOS images I have encountered. Also, these files imbed the
|
||||
BDOS images I have encountered. Also, these files embed the
|
||||
CP/M version number into the serial number fields. Other than
|
||||
this, they are byte identical to the OS2CCP/OS3BDOS images above.
|
||||
|
||||
@@ -51,17 +51,24 @@ BDOS22.ASM - Modified ORG & fix for ctrl-S
|
||||
CCPB03 & BDOSB01
|
||||
----------------
|
||||
|
||||
Sourced from N8VEM effort to create an enhanced
|
||||
variant of CP/M 2.2.
|
||||
These files were derived from a disassembly of the Jade DD CP/M-80
|
||||
image by William Beech in 1982.
|
||||
|
||||
It appears to be a disassembly and reconstruction of CCP/BDOS,
|
||||
but there are no comments attributing the work. DRI CPM22PAT01
|
||||
was already applied. The message string literals are all
|
||||
- Modified by Bill Beech for global CP/M size configuration
|
||||
and separate CCP and BDOSE 2013.
|
||||
|
||||
- Modified by Bill Beech for addition of MON
|
||||
command and display/change of user on command line
|
||||
1984. Also removed all SN checks.
|
||||
|
||||
Eventually modified as part of the N8VEM project and converted to
|
||||
the Z80 instruction set.
|
||||
|
||||
DRI CPM22PAT01 has been applied. The message string literals are all
|
||||
in CAPS in BDOS. Additionally, there is explicit filler of 0x55
|
||||
value bytes at the end of the CCP/BDOS files padding their
|
||||
length out to full page. Other than this, the BDOS
|
||||
is byte identical to the others above. CCP contains multiple
|
||||
enhancements and is, therefore, not identical to others.
|
||||
is byte identical to the others above.
|
||||
|
||||
CCPB03.ASM - Enhanced reassembly of CCP
|
||||
|
||||
|
||||
@@ -8,6 +8,7 @@ pushd QPM && call Clean.cmd & popd
|
||||
pushd ZCPR && call Clean.cmd & popd
|
||||
pushd ZCPR-DJ && call Clean.cmd & popd
|
||||
pushd ZSDOS && call Clean.cmd & popd
|
||||
pushd ZSDOS2 && call Clean.cmd & popd
|
||||
pushd CBIOS && call Clean.cmd & popd
|
||||
pushd CPM3 && call Clean.cmd & popd
|
||||
pushd ZPM3 && call Clean.cmd & popd
|
||||
@@ -25,3 +26,5 @@ pushd Doc && call Clean & popd
|
||||
pushd ZRC && call Clean & popd
|
||||
pushd Z1RCC && call Clean & popd
|
||||
pushd ZZRCC && call Clean & popd
|
||||
pushd MSX && call Clean & popd
|
||||
pushd EZ512 && call Clean & popd
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -14,7 +14,14 @@ $define{doc_sys}{[RomWBW System Guide]($doc_root$/RomWBW System Guide.pdf)}$
|
||||
$define{doc_apps}{[RomWBW Applications]($doc_root$/RomWBW Applications.pdf)}$
|
||||
$define{doc_catalog}{[RomWBW Disk Catalog]($doc_root$/RomWBW Disk Catalog.pdf)}$
|
||||
$define{doc_hardware}{[RomWBW Hardware]($doc_root$/RomWBW Hardware.pdf)}$
|
||||
|
||||
$ifdef{GFM}$
|
||||
$define{doc_intro}{[RomWBW Introduction](Introduction.md)}$
|
||||
$define{doc_user}{[RomWBW User Guide](UserGuide.md)}$
|
||||
$define{doc_sys}{[RomWBW System Guide](SystemGuide.md)}$
|
||||
$define{doc_apps}{[RomWBW Applications](Applications.md)}$
|
||||
$define{doc_catalog}{[RomWBW Disk Catalog](Catalog.md)}$
|
||||
$define{doc_hardware}{[RomWBW Hardware](Hardware.md)}$
|
||||
$endif$
|
||||
---
|
||||
title: $doc_product$ $doc_title$
|
||||
subtitle: $doc_ver$
|
||||
|
||||
@@ -70,11 +70,12 @@ disks should now be fully described.
|
||||
CP/M 3. Applications have been patched according to the DRI
|
||||
patch list.
|
||||
|
||||
- **ZPM3**: Digital Research CP/M-80 2.2 Distribution Files
|
||||
- **ZPM3**: ZPM3 Distribution Files
|
||||
|
||||
Documentation: *CPM Manual.pdf*
|
||||
Documentation: *ZPM3.txt*
|
||||
|
||||
These files are from Simeon Cran's ZPM3 operating system distribution.
|
||||
These files are from Simeon Cran's official distribution of ZPM3.
|
||||
All known patches have been applied.
|
||||
|
||||
`\clearpage`{=latex}
|
||||
|
||||
@@ -573,7 +574,7 @@ This is a generic ZPM3 adaptation for RomWBW.
|
||||
|
||||
The following files came from from Microcode Consulting. The official
|
||||
distribution files can be found on the Microcode Consulting website at
|
||||
[https://www.microcodeconsulting.com/z80/qpm.htm].
|
||||
<https://www.microcodeconsulting.com/z80/qpm.htm>.
|
||||
Also included in this image are debugz, and linkz frm the same company.
|
||||
|
||||
This disk includes the standard DRI CP/M 2.2 files in addition to the
|
||||
@@ -651,7 +652,7 @@ look a little strange depending on the terminal emulation you are using.
|
||||
|
||||
User area 4 contains a full implementation of the CP/NET 1.2 client
|
||||
provided by Doug Miller. Please refer to
|
||||
[https://github.com/durgadas311/cpnet-z80] for more information,
|
||||
<https://github.com/durgadas311/cpnet-z80> for more information,
|
||||
complete documentation and the latest source code.
|
||||
|
||||
Please refer to the RomWBW User Guide for instructions on installing
|
||||
@@ -666,12 +667,12 @@ The following are found in
|
||||
|
||||
| **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 |
|
||||
| CPN12SER.LBR | CP/NET 1.2 | CP/M 2.2 | RomWBW Serial Port |
|
||||
| CPN3SER.LBR | CP/NET 3 | CP/M 3 | RomWBW Serial Port |
|
||||
| `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 |
|
||||
| `CPN12SER.LBR` | CP/NET 1.2 | CP/M 2.2 | RomWBW Serial Port |
|
||||
| `CPN3SER.LBR` | CP/NET 3 | CP/M 3 | RomWBW Serial Port |
|
||||
|
||||
## General Purpose Applications
|
||||
|
||||
@@ -728,6 +729,7 @@ distribution. Some provide command line help themselves. Some are fairly obvio
|
||||
| `CRUNCH28.CFG` | | ZCNFG configuration file for CRUNCH & UNCR |
|
||||
| `DDTZ.COM` | | Z80 debug tool (modified to use RST 6) |
|
||||
| `DDTZ.DOC` | | Documentation for DDTZ |
|
||||
| `DOWNLOAD.COM` | Grant Searle | Grant Searle's DOWNLOAD, used by File Packager |
|
||||
| `EX.COM` | | Batch file processor (alternative to DRI SUBMIT) |
|
||||
| `FIND.COM` | Jay Cotton | Search all drives for a file () |
|
||||
| `GENHEX.COM` | | Generates an Intel Hex file from the input file |
|
||||
@@ -768,7 +770,7 @@ distribution. Some provide command line help themselves. Some are fairly obvio
|
||||
|
||||
## OS General Files
|
||||
|
||||
The following files are spcific files share across several OS's.
|
||||
The following files are specific files shared across several OS's.
|
||||
In general, there is no documentation for these applications included with
|
||||
the RomWBW distribution. Some provide command line help themselves.
|
||||
Some are fairly obvious.
|
||||
@@ -787,6 +789,7 @@ The following files are found in
|
||||
| `COPY.COM` | Z | File copier with ZSDOS date stamping awareness |
|
||||
| `COPY.CFG` | Z | ZCNFG configuration file for COPY application |
|
||||
| `EDITNDR.COM` | Z3 | Edit named directory register in memory. |
|
||||
| `HELLO.ASM` | CPM22 | Sample assembly language source file |
|
||||
| `HP-RPN.HLP` | Z3 | Help File for ZP.COM - HP RPN Calculators |
|
||||
| `HP-ZP.HLP` | Z3 | Help File for ZP.COM - HP ZP Calculators |
|
||||
| `KERCPM22.COM` | CPM22 | Kermit communication application |
|
||||
@@ -927,12 +930,12 @@ The following files are found in
|
||||
|
||||
| **File** | **Description** |
|
||||
|----------------|-----------------------------------------------------------|
|
||||
| HDIR.COM | |
|
||||
| R.COM | transfer files between the simulator and host file system |
|
||||
| RSETSIMH.COM | -- |
|
||||
| TIMER.COM | -- |
|
||||
| URL.COM | -- |
|
||||
| W.COM | transfer files between the simulator and host file system |
|
||||
| `HDIR.COM` | |
|
||||
| `R.COM` | transfer files between the simulator and host file system |
|
||||
| `RSETSIMH.COM` | -- |
|
||||
| `TIMER.COM` | -- |
|
||||
| `URL.COM` | -- |
|
||||
| `W.COM` | transfer files between the simulator and host file system |
|
||||
|
||||
## Testing Applications
|
||||
|
||||
@@ -975,11 +978,12 @@ The following files are found in
|
||||
| `TSTDSKNG.COM` | DSKY NEXT GENERATION TEST APPLICATION |
|
||||
| `VDCONLY.COM` | COLOR VDU TEST |
|
||||
| `VDCTEST.COM` | COLOR VDU TEST |
|
||||
| `Z80TYPE.COM` | Z80 Chip Variant Detection |
|
||||
| `ZEXALL.COM` | Z80 Instruction Set Exerciser |
|
||||
| `ZEXDOC.COM` | Z80 Instruction Set Exerciser |
|
||||
|
||||
And The following CPU Tests - Which are probably originally from this source.
|
||||
[https://github.com/raxoft/z80test]
|
||||
<https://github.com/raxoft/z80test>
|
||||
|
||||
| **File** | **Description** |
|
||||
|----------------|---------------------------------------------------------------|
|
||||
@@ -1002,7 +1006,7 @@ including MS-DOS, Apple II DOS 3.3 and PRoDOS, Commodore 64, Macintosh and
|
||||
Amiga. This disk contains the CP/M version of that compiler. A cross-compiler
|
||||
for MS-DOS or Windows XP is also available.
|
||||
|
||||
For full documentation, see [https://www.aztecmuseum.ca]
|
||||
For full documentation, see <https://www.aztecmuseum.ca>
|
||||
The user manual is available in the Doc/Language directory
|
||||
Aztec_C_1.06_User_Manual_Mar84.pdf
|
||||
|
||||
@@ -1048,38 +1052,79 @@ NOTE : The above is incomplete
|
||||
|
||||
The Cowgol 2.0 compiler and related tools.
|
||||
These files were provided by Ladislau Szilagyi and were sourced
|
||||
from his GitHub repository at [https://github.com/Laci1953/Cowgol_on_CP_M].
|
||||
from his GitHub repository at <https://github.com/Laci1953/Cowgol_on_CP_M>.
|
||||
|
||||
The primary distribution site for Cowgol 2.0 is at
|
||||
[https://github.com/davidgiven/cowgol].
|
||||
<https://github.com/davidgiven/cowgol>.
|
||||
The user manual is available in the Doc/Language directory
|
||||
Cowgol Language.pdf
|
||||
Cowgol Language.pdf.
|
||||
|
||||
The following files are found in
|
||||
|
||||
* /Source/Images/d_cowgol
|
||||
|
||||
| **File** | **Description** |
|
||||
|--------------|--------------------------------------------|
|
||||
| ADVENT.COW | Adventure game program source |
|
||||
| ADVENT.SUB | Submit file to build ADVENT |
|
||||
| ADVENT?.TXT | Adventure game program resource |
|
||||
| ADVMAIN.COW | Adventure game program source |
|
||||
| RAND.AS | Assembler Library File |
|
||||
| COWBE.COM | |
|
||||
| COWFE.COM | RomWBW specific (Memory Manage) version |
|
||||
| COWLINK.COM | |
|
||||
| DYNMSORT.COW | demonstrates a sort algorithm |
|
||||
| DYNMSORT.SUB | Submit file to build DYNMSORT |
|
||||
| HEXDUMP.COW | a simple hex dump utility, purely a Cowgol |
|
||||
| HEXDUMP.SUB | Submit file to build HEXDUMP |
|
||||
| HMERGES.C | C Library File |
|
||||
| XRND.AS | Assembler Library File |
|
||||
| - | - |
|
||||
| **File** | **Description** |
|
||||
|----------------|--------------------------------------------|
|
||||
| `$EXEC.COM` | HiTech C batch processor which launches the Cowgol toolchain executables |
|
||||
| `ADVENT.COW` | Adventure game program source |
|
||||
| `ADVENT.SUB` | SUBMIT file to build Adventure game |
|
||||
| `ADVENT?.TXT` | Adventure game program resources |
|
||||
| `ADVMAIN.COW` | Adventure game program source |
|
||||
| `ADVTRAV.COW` | Adventure game component source |
|
||||
| `ARGV.COH` | Cowgol include file providing command line argument processing |
|
||||
| `C.LIB` | HI-TECH C runtime library |
|
||||
| `CGEN.COM` | HiTech C compiler pass 2 |
|
||||
| `COMMFILE.COH` | Include file providing file I/O |
|
||||
| `COMMON.COH` | Include file providing common functions |
|
||||
| `COWBE.COM` | Cowgol back end which builds the cowgol object files (optimized) |
|
||||
| `COWFE.COM` | Cowgol front end which parses the source file (optimized) |
|
||||
| `COWFIX.COM` | Interface to Z80AS -- performs code optimizations |
|
||||
| `COWGOL.COH` | Include file providing standard Cowgol functions |
|
||||
| `COWGOL.COM` | Interprets the command line and generates $EXEC run requests (a variant of HiTech C.COM) |
|
||||
| `COWGOL.COO` | Cowgol object file with ??? |
|
||||
| `COWGOL.LIB` | ??? |
|
||||
| `COWGOLC.COH` | Cowgol include file providing ??? |
|
||||
| `COWLINK.COM` | Cowgol linker which binds all the cowgol object files and outputs a Z80 assembler file (optimized) |
|
||||
| `CPP.COM` | HiTech C pre-processor, modified to accept // style comments |
|
||||
| `DYNMSORT.COW` | Sort algorithm sample program source |
|
||||
| `DYNMSORT.SUB` | SUBMIT file to build DYNMSORT sample application |
|
||||
| `FACT.COW` | Factorial computation sample program source |
|
||||
| `FILE.COH` | Include file providing CP/M file processing support |
|
||||
| `FILEIO.COH` | Include file providing CP/M file processing support |
|
||||
| `HEXDUMP.COW` | Hex file dump sample source |
|
||||
| `HEXDUMP.SUB` | SUBMIT file to build HEXDUMP sample program |
|
||||
| `LIBBASIC.COH` | Include file providing ??? |
|
||||
| `LIBBIOS.COH` | Include file providing ??? |
|
||||
| `LIBCONIO.COH` | Include file providing console I/O |
|
||||
| `LIBFP.COH` | Include file providing floating point support |
|
||||
| `LIBR.COM` | HiTech object file librarian |
|
||||
| `LIBSTR.COH` | Include file providing string functions |
|
||||
| `LINK.COM` | HiTech linker which builds the final executable from object and library files |
|
||||
| `MALLOC.COH` | Include file providing dynamic memory management functions |
|
||||
| `MERGES.C` | Merge sort sample function C language source |
|
||||
| `MISC.COH` | Include file providing miscellaneous functions |
|
||||
| `MISC.COO` | Miscellaneous functions object file |
|
||||
| `MISC.COW` | Miscellaneous functions source file |
|
||||
| `OPTIM.COM` | HiTech C compiler optimizer |
|
||||
| `P1.COM` | HiTech C compiler first pass |
|
||||
| `RAND.AS` | Pseudo-random number generator source in assembly language |
|
||||
| `RANFILE.COH` | Include file providing random file access functions |
|
||||
| `RANFILE.COO` | Random file access functions object file |
|
||||
| `RANFILE.COW` | Random file access functions source file |
|
||||
| `README.TXT` | Cowgol disk image release notes |
|
||||
| `SEQFILE.COH` | Include file providing sequential file access functions |
|
||||
| `SEQFILE.COO` | Sequential file access functions object file |
|
||||
| `SEQFILE.COW` | Sequential file access functions source file |
|
||||
| `STDCOW.COH` | Include file providing standard library functions |
|
||||
| `STRING.COH` | Include file providing string functions |
|
||||
| `STRING.COO` | String functions object file |
|
||||
| `STRING.COW` | String functions source file |
|
||||
| `STRINGS.COH` | Include file implementing string functions |
|
||||
| `TESTAS.COW` | Assembly language interface sample program source |
|
||||
| `TESTAS.SUB` | SUBMIT file to build TESTAS sample program |
|
||||
| `Z80AS.COM` | Z80 assembler which assembles the output of COWFIX and other Z80 source files (see <https://github.com/Laci1953/Z80AS>) |
|
||||
|
||||
NOTE : The above is incomplete
|
||||
|
||||
## Microsoft Fortran 80 (Fortran)
|
||||
## Microsoft Fortran 80
|
||||
|
||||
| Floppy Disk Image: **fd_fortran.img**
|
||||
| Hard Disk Image: **hd_fortran.img**
|
||||
@@ -1114,12 +1159,12 @@ Zork 1 through 3, Planetfall and Hitchhiker's Guide to the Galaxy.
|
||||
Nemesis and Dungeon Master is a Rogue-like game released in 1981. It is playable
|
||||
on a text terminal using ASCII graphics to represent the dungeon. Only a few
|
||||
thousand copies of the game were ever made, making it very rare. See
|
||||
[http://crpgaddict.blogspot.com/2019/03/game-322-nemesis-1981.html]
|
||||
<http://crpgaddict.blogspot.com/2019/03/game-322-nemesis-1981.html>
|
||||
|
||||
Colossal Cave Adventure is a CP/M port of the 1976 classic game originally
|
||||
written by Will Crowther for the PDP-10 mainframe. See
|
||||
[https://en.wikipedia.org/wiki/Colossal_Cave_Adventure] and
|
||||
[https://if50.substack.com/p/1976-adventure]
|
||||
<https://en.wikipedia.org/wiki/Colossal_Cave_Adventure> and
|
||||
<https://if50.substack.com/p/1976-adventure>
|
||||
|
||||
The following files are found in
|
||||
|
||||
@@ -1136,31 +1181,196 @@ NOTE : The above is incomplete
|
||||
| Floppy Disk Image: **fd_hitechc.img**
|
||||
| Hard Disk Image: **hd_hitechc.img**
|
||||
|
||||
The HI-TECH C Compiler is a set of software which
|
||||
The HI-TECH C Compiler is a set of software which
|
||||
translates programs written in the C language to executable
|
||||
machine code programs. Versions are available which compile
|
||||
programs for operation under the host operating system, or
|
||||
which produce programs for execution in embedded systems
|
||||
without an operating system.
|
||||
|
||||
This is the Mar 21, 2023 update 17 released by Tony Nicholson who currently
|
||||
maintains HI-TECH C at [https://github.com/agn453/HI-TECH-Z80-C]
|
||||
This is the Jun 2, 2025 update 19 released by Tony Nicholson who
|
||||
currently maintains HI-TECH C at
|
||||
<https://github.com/agn453/HI-TECH-Z80-C>.
|
||||
|
||||
The manual is available in the Doc/Language directory,
|
||||
HI-TECH Z80 C Compiler Manual.txt
|
||||
HI-TECH Z80 C Compiler Manual.txt. A textual description of all error
|
||||
and warning messages is found in the same directory, HI-TECH Z80 C
|
||||
Compiler Messages.txt.
|
||||
|
||||
A good blog post about the HI-TECH C Compiler is available at
|
||||
[https://techtinkering.com/2008/10/22/installing-the-hi-tech-z80-c-compiler-for-cpm]
|
||||
<https://techtinkering.com/2008/10/22/installing-the-hi-tech-z80-c-compiler-for-cpm>.
|
||||
|
||||
User area 1 contains another complete copy of the HI-TECH C Compiler.
|
||||
It is identical to the copy in user area 0 except for the following files
|
||||
which were enhanced by Ladislau Szilagyi from his GitHub Repository at
|
||||
<https://github.com/Laci1953/HiTech-C-compiler-enhanced>. The files
|
||||
take advantage of additional banked memory using the RomWBW HBIOS API.
|
||||
As such, they require RomWBW to operate. They should be compatible with
|
||||
all CP/M and compatible operations systems provided in RomWBW.
|
||||
|
||||
The enhanced files are:
|
||||
|
||||
- `CGEN.COM`
|
||||
- `CPP.COM`
|
||||
- `OPTIM.COM`
|
||||
- `P1.COM`
|
||||
- `ZAS.COM`
|
||||
|
||||
A thread discussing this enhanced version of HI-TECH C is found at
|
||||
<https://groups.google.com/g/rc2014-z80/c/sBCCIpOnnGg>.
|
||||
|
||||
The following files are found in
|
||||
|
||||
* /Source/Images/d_hitechc
|
||||
|
||||
| **File** | **Description** |
|
||||
|----------|-----------------|
|
||||
| -- | -- |
|
||||
| **File** | **Description** |
|
||||
|----------------|--------------------------------------------|
|
||||
| `$EXEC.COM` | Compiler execution manager |
|
||||
| `ASSERT.H` | Language include file |
|
||||
| `C.COM` | Compiler invocation application (updated) |
|
||||
| `C309.COM` | Compiler invocation application (original) |
|
||||
| `CGEN.COM` | The code generator - produces assembler code |
|
||||
| `CONIO.H` | Language include file (see manual) |
|
||||
| `CPM.H` | Language include file (see manual) |
|
||||
| `CPP.COM` | Pre-processor - handles macros and conditional compilation |
|
||||
| `CREF.COM` | Produces cross-reference listings of C or assembler programs |
|
||||
| `CRTCPM.OBJ` | Startup Object File (standard) |
|
||||
| `CTYPE.H` | Language include file (see manual) |
|
||||
| `DEBUG.COM` | C Debugger (Z80) |
|
||||
| `DRTCPM.OBJ` | Startup Object File (???) |
|
||||
| `EXEC.H` | Language include file (see manual) |
|
||||
| `FLOAT.H` | Language include file (see manual) |
|
||||
| `HELLO.C` | Sample C source file |
|
||||
| `HITECH.H` | Language include file (see manual) |
|
||||
| `LIBC.LIB` | Standard C Runtime Library |
|
||||
| `LIBF.LIB` | Floating Point Library |
|
||||
| `LIBOVR.LIB` | Overlay Library |
|
||||
| `LIBR.COM` | Creates and maintains libraries of object modules |
|
||||
| `LIMITS.H` | Language include file (see manual) |
|
||||
| `LINQ.COM` | Link editor - links object files with libraries |
|
||||
| `MATH.H` | Language include file (see manual) |
|
||||
| `NRTCPM.OBJ` | Startup Object File (minimal getargs) |
|
||||
| `OBJTOHEX.COM` | Converts the output of LINK into the appropriate executable file format (e.g., .EXE or .PRG or .HEX) |
|
||||
| `OPTIM.COM` | Code improver - may optionally be omitted, reducing compilation time at a cost of larger, slower code produced |
|
||||
| `OPTIONS` | Compiler usage help file |
|
||||
| `OVERLAY.H` | Language include file |
|
||||
| `P1.COM` | The syntax and semantic analysis pass - writes intermediate code for the code generator to read |
|
||||
| `RRTCPM.OBJ` | Startup Object File (self relocating) |
|
||||
| `SETJMP.H` | Language include file (see manual) |
|
||||
| `SIGNAL.H` | Language include file (see manual) |
|
||||
| `STAT.H` | Language include file (see manual) |
|
||||
| `STDARG.H` | Language include file (see manual) |
|
||||
| `STDDEF.H` | Language include file (see manual) |
|
||||
| `STDINT.H` | Language include file (see manual) |
|
||||
| `STDIO.H` | Language include file (see manual) |
|
||||
| `STDLIB.H` | Language include file (see manual) |
|
||||
| `STRING.H` | Language include file (see manual) |
|
||||
| `SYMTOAS.COM` | Convert symbol file to assembler |
|
||||
| `SYS.H` | Language include file (see manual) |
|
||||
| `TIME.H` | Language include file (see manual) |
|
||||
| `UNIXIO.H` | Language include file (see manual) |
|
||||
| `ZAS.COM` | The assembler - in fact a general purpose macro assembler |
|
||||
|
||||
NOTE : The above is incomplete
|
||||
## Infocom (Text Adventure Games)
|
||||
|
||||
| Hard Disk Image: **hd_infocom.img**
|
||||
|
||||
A collection of all Official releases of the interactive fiction games
|
||||
produced by Infocom in the 1980's
|
||||
|
||||
The following files are found in
|
||||
|
||||
* /Source/Images/d_infocom
|
||||
|
||||
| **File** | **Description** |
|
||||
|--------------|----------------------------------------------------|
|
||||
| amfv.z4 | A Mind Forever Voyaging (*) |
|
||||
| arthur.z6 | Arthur - The Quest for Excalibur (*) |
|
||||
| ballyhoo.z3 | Ballyhoo |
|
||||
| beyond.z5 | Beyond Zork (*) |
|
||||
| border.z5 | Border Zone (*) |
|
||||
| bureau.z4 | Bureaucracy (*) |
|
||||
| cutthr.z3 | Cutthroats |
|
||||
| deadline.z3 | Deadline |
|
||||
| enchant.z3 | Enchanter |
|
||||
| h2g2.z3 | The Hitchhiker's Guide to the Galaxy |
|
||||
| hollyw.z3 | Hollywood Hijinx |
|
||||
| infidel.z3 | Infidel |
|
||||
| journey.z6 | Journey (*) |
|
||||
| leather.z3 | Leather Goddesses of Phobos |
|
||||
| lurking.z3 | The Lurking Horror |
|
||||
| moonmist.z3 | Moonmist |
|
||||
| nordbert.z4 | Nord and Bert Couldn't Make Head or Tail of It (*) |
|
||||
| planet.z3 | Planetfall |
|
||||
| plunder.z3 | Plundered Hearts |
|
||||
| readme.txt | Documentation about the Infocom games |
|
||||
| seastalk.z3 | Seastalker |
|
||||
| sherlock.z5 | Sherlock (*) |
|
||||
| shogun.z6 | Shogun (*) |
|
||||
| sorcerer.z3 | Sorcerer |
|
||||
| spellb.z3 | Spellbreaker |
|
||||
| starcros.z3 | Starcross |
|
||||
| stationf.z3 | Stationfall |
|
||||
| suspect.z3 | Suspect |
|
||||
| suspend.z3 | Suspended |
|
||||
| trinity.z4 | Trinity (*) |
|
||||
| wishb.z3 | Wishbringer |
|
||||
| witness.z3 | Witness |
|
||||
| zork0.z6 | Zork Zero (*) |
|
||||
| zork1.z3 | Zork I |
|
||||
| zork2.z3 | Zork II |
|
||||
| zork3.z3 | Zork III |
|
||||
| zorknote.txt | Documentation about terminal config of COM files |
|
||||
|
||||
The above games have been curated from here <https://eblong.com/infocom/>.
|
||||
Full game documentation can be found here <https://infodoc.plover.net/>
|
||||
|
||||
The game files are a virtual machine code commonly known as Z-Machine, they
|
||||
are portable and will run on any machine that has a Z-Machine interpreter.
|
||||
|
||||
* All the Z3 games come with the official CP/M interpreter (the `COM` file)
|
||||
version C last updated by Inforcom on 5th Feb 1985. You can simply run the
|
||||
game by running it from the `COM` program
|
||||
* All latter games Z4, Z5,.. and above, (Marked as * in the listing above)
|
||||
are more sophisticated and require a better interpreter. i.e. VEZZA.
|
||||
|
||||
#### VEZZA (User Area 15)
|
||||
|
||||
Vezza is a modern Infocom/Inform/Z-machine text adventure interpreter for 8 bit
|
||||
z80 based computers. What makes it modern is that it is written in hand-crafted
|
||||
z80 assembler for maximum speed, and can load not only the classics such as
|
||||
Zork 1,2 and 3 but also the later games.
|
||||
|
||||
It can run Z1 up to Z8 inform format interactive fiction game files. To run
|
||||
a game with Vezza just type Vezza followed by the game you want to run. e.g.
|
||||
|
||||
`VEZZA ZORK0.Z6`
|
||||
|
||||
**Note:** One of the bigger constraints is available RAM. An OS such as ZPM
|
||||
since it uses banked RAM does have a good amount of available RAM and was
|
||||
used to test these games work.
|
||||
|
||||
This tool is free but the developer accepts your support by letting
|
||||
you pay what you think is fair for the tool. If you find this useful
|
||||
consider donating at:
|
||||
|
||||
<https://sijnstra.itch.io/vezza>
|
||||
|
||||
You should (test and) choose one that works on you configuration,
|
||||
and best to copy and rename it as vezza.com
|
||||
|
||||
| **File** | **Description** |
|
||||
|--------------|-------------------------------------------------------------------|
|
||||
| vezza-B.com | 80x24, VT52 + Banked CP/M 3 |
|
||||
| vezza-FG.com | 80x25, VT100/ANSI (16 color) + CP/M 3 |
|
||||
| vezza-C2.com | 80x24, VT100 - CP/M 2.2 large memory, no timed input |
|
||||
| vezza-CC.com | 80x24, VT100 (256 colour) - CP/M 2.2 large memory, no timed input |
|
||||
| vezza-AV.com | 80x24, VT100 (16 colour) - CP/M 2.2 high RAM. |
|
||||
| vezza-AX.com | 80x25, VT100/ANSI (16 colour) - CP/M 2.2 high RAM. |
|
||||
| vezza-RW.com | 80x24, VT100 - CP/M 2.2 |
|
||||
|
||||
The above is a subset of available builds. The full repository including
|
||||
documentation is available at <https://gitlab.com/sijnstra1/vezza/>
|
||||
|
||||
## MSX ROMS
|
||||
|
||||
@@ -1170,7 +1380,7 @@ NOTE : The above is incomplete
|
||||
The collection of MSX ROMs (2 disks) as provided by Les Bird.
|
||||
These ROMs are "run" by using the
|
||||
appropriate variant of Les' MSX8 ROM loader. You can download the
|
||||
loader binaries from [https://github.com/lesbird/MSX8]. You will need
|
||||
loader binaries from <https://github.com/lesbird/MSX8>. You will need
|
||||
appropriate hardware to run the loader.
|
||||
|
||||
Please review the file ROMLIST.TXT for information on the current
|
||||
@@ -1206,33 +1416,33 @@ The manual can be found in the Docs/Language directory,
|
||||
Turbo_Pascal_Version_3.0_Reference_Manual_1986.pdf
|
||||
|
||||
A good overview of using Turbo Pascal in CP/M is available at
|
||||
[https://techtinkering.com/2013/03/05/turbo-pascal-a-great-choice-for-programming-under-cpm]
|
||||
<https://techtinkering.com/2013/03/05/turbo-pascal-a-great-choice-for-programming-under-cpm>
|
||||
|
||||
The following files are found in
|
||||
|
||||
* /Source/Images/d_tpascal
|
||||
|
||||
| **File** | **Description** |
|
||||
|--------------|--------------------------------|
|
||||
| ART.TXT | Part of the Example program |
|
||||
| SA.PAS | Example Program |
|
||||
| TINST.COM | Installation and Configuration |
|
||||
| TINST.DTA | Part of TINST |
|
||||
| TINST.MSG | Part of TINST |
|
||||
| TURBO.COM | The main Turbo Pascal program |
|
||||
| TURBO.MSG | Part of TURBO tascal |
|
||||
| TURBO.OVR | Part of TURBO tascal |
|
||||
| TURBOMSG.OVR | Part of TURBO tascal |
|
||||
| **File** | **Description** |
|
||||
|----------------|--------------------------------|
|
||||
| `ART.TXT` | Part of the Example program |
|
||||
| `SA.PAS` | Example Program |
|
||||
| `TINST.COM` | Installation and Configuration |
|
||||
| `TINST.DTA` | Part of TINST |
|
||||
| `TINST.MSG` | Part of TINST |
|
||||
| `TURBO.COM` | The main Turbo Pascal program |
|
||||
| `TURBO.MSG` | Part of TURBO Pascal |
|
||||
| `TURBO.OVR` | Part of TURBO Pascal |
|
||||
| `TURBOMSG.OVR` | Part of TURBO Pascal |
|
||||
|
||||
## WordStar 4
|
||||
## Word Processing
|
||||
|
||||
| Floppy Disk Image: **fd_ws4.img**
|
||||
| Hard Disk Image: **hd_ws4.img**
|
||||
| Floppy Disk Image: **fd_wp.img**
|
||||
| Hard Disk Image: **hd_wp.img**
|
||||
| Combo Disk Image: **Slice 5**
|
||||
|
||||
The following files are found in
|
||||
|
||||
* /Source/Images/d_ws4
|
||||
* /Source/Images/d_wp
|
||||
|
||||
| **File** | **Description** |
|
||||
|----------------|-----------------|
|
||||
@@ -1358,10 +1568,10 @@ The manual(s) are available in the Doc/Language directory,
|
||||
* Z80DIS User Manual (1985).pdf
|
||||
|
||||
A run through of using the assembler is available at
|
||||
[https://8bitlabs.ca/Posts/2023/05/20/learning-z80-asm]
|
||||
<https://8bitlabs.ca/Posts/2023/05/20/learning-z80-asm>
|
||||
|
||||
And another shorter, but shows linker usage guide
|
||||
[https://pollmyfinger.wordpress.com/2022/01/10/modular-retro-z80-assembly-language-programming-using-slr-systems-z80asm-and-srlnk/]
|
||||
<https://pollmyfinger.wordpress.com/2022/01/10/modular-retro-z80-assembly-language-programming-using-slr-systems-z80asm-and-srlnk/>
|
||||
|
||||
The following files are found in
|
||||
|
||||
@@ -1369,53 +1579,53 @@ The following files are found in
|
||||
|
||||
User Area 0 - Assembler
|
||||
|
||||
| **File** | **Description** |
|
||||
|-------------|---------------------------------------------|
|
||||
| 180FIG.COM | Configuration utility for SLR180.COM |
|
||||
| 8080.MAC | ? |
|
||||
| CONFIG.COM | Configuration utility for Z80ASM.COM |
|
||||
| CONFIGP.COM | Configuration utility for Z80ASMP.COM |
|
||||
| DUMP.* | Sample Program |
|
||||
| MAKESYM.COM | Symbol File .SYM file generation |
|
||||
| MAKESYM.DOC | Documentation for MAKESYM.COM |
|
||||
| SLR180.COM | HD64180 (Z180) Relocating Macro Assembler |
|
||||
| SLR180.DOC | Release Notes for SLR180.COM |
|
||||
| SLRMAC.COM | 8080 Relocating Macro Assembler |
|
||||
| SYNTAX.HLP | Documentation basic usage for all SLR Tools |
|
||||
| SYNTAX.TXT | Documentation basic usage for all SLR Tools |
|
||||
| TEST.* | Sample Program |
|
||||
| Z80ASM.COM | Z80 Relocating Macro Assembler |
|
||||
| Z80ASMP.COM | Z80 Relocating Macro Assembler (PLUS) |
|
||||
| Z80ASM.DOC | Release Notes for Z80ASM.COM |
|
||||
| **File** | **Description** |
|
||||
|---------------|---------------------------------------------|
|
||||
| `180FIG.COM` | Configuration utility for SLR180.COM |
|
||||
| `8080.MAC` | ? |
|
||||
| `CONFIG.COM` | Configuration utility for Z80ASM.COM |
|
||||
| `CONFIGP.COM` | Configuration utility for Z80ASMP.COM |
|
||||
| `DUMP.*` | Sample Program |
|
||||
| `MAKESYM.COM` | Symbol File .SYM file generation |
|
||||
| `MAKESYM.DOC` | Documentation for MAKESYM.COM |
|
||||
| `SLR180.COM` | HD64180 (Z180) Relocating Macro Assembler |
|
||||
| `SLR180.DOC` | Release Notes for SLR180.COM |
|
||||
| `SLRMAC.COM` | 8080 Relocating Macro Assembler |
|
||||
| `SYNTAX.HLP` | Documentation basic usage for all SLR Tools |
|
||||
| `SYNTAX.TXT` | Documentation basic usage for all SLR Tools |
|
||||
| `TEST.\*` | Sample Program |
|
||||
| `Z80ASM.COM` | Z80 Relocating Macro Assembler |
|
||||
| `Z80ASMP.COM` | Z80 Relocating Macro Assembler (PLUS) |
|
||||
| `Z80ASM.DOC` | Release Notes for Z80ASM.COM |
|
||||
|
||||
User Area 1 - Linker and Library Management
|
||||
|
||||
| **File** | **Description** |
|
||||
|--------------|-----------------------------------------------|
|
||||
| LNKFIG.COM | Configuration utility for SLRNK.COM |
|
||||
| NZLNKFIX.ZEX | ? |
|
||||
| SLRIB.COM | SuperLibrarian, library manager |
|
||||
| SLRNK.COM | SuperLinker, the main linker tool |
|
||||
| SLRNKP.COM | SuperLinker (PLUS) |
|
||||
| SLRNK.DOC | Release Notes for SLRNK.COM |
|
||||
| SLRNKFIX.ZEX | ? |
|
||||
| SYNTAX.HLP | Documentation basic usage for all SLR Tools |
|
||||
| SYNTAX.TXT | Documentation basic usage for all SLR Tools |
|
||||
| SYSSLR.REL | SYSLIB (older) Library compatible with SLR |
|
||||
| VSLR.REL | VLIB (older) Library compatible with SLR |
|
||||
| Z3SLR.REL | Z3LIB (older) Library compatible with SLR |
|
||||
| **File** | **Description** |
|
||||
|----------------|-----------------------------------------------|
|
||||
| `LNKFIG.COM` | Configuration utility for SLRNK.COM |
|
||||
| `NZLNKFIX.ZEX` | ? |
|
||||
| `SLRIB.COM` | SuperLibrarian, library manager |
|
||||
| `SLRNK.COM` | SuperLinker, the main linker tool |
|
||||
| `SLRNKP.COM` | SuperLinker (PLUS) |
|
||||
| `SLRNK.DOC` | Release Notes for SLRNK.COM |
|
||||
| `SLRNKFIX.ZEX` | ? |
|
||||
| `SYNTAX.HLP` | Documentation basic usage for all SLR Tools |
|
||||
| `SYNTAX.TXT` | Documentation basic usage for all SLR Tools |
|
||||
| `SYSSLR.REL` | SYSLIB (older) Library compatible with SLR |
|
||||
| `VSLR.REL` | VLIB (older) Library compatible with SLR |
|
||||
| `Z3SLR.REL` | Z3LIB (older) Library compatible with SLR |
|
||||
|
||||
User Area 2 - Disassembler
|
||||
|
||||
| **File** | **Description** |
|
||||
|--------------|----------------------------------|
|
||||
| README.22 | Documentation for Z80DIS |
|
||||
| Z80DIS.000 | Overlay File for Z80DIS.COM |
|
||||
| Z80DIS.001 | Overlay File for Z80DIS.COM |
|
||||
| Z80DIS.002 | Overlay File for Z80DIS.COM |
|
||||
| Z80DIS.COM | Z80DIS Disassembler main program |
|
||||
| Z80DIS22.DOC | Main Documentation for Z80DIS |
|
||||
| ZDINSTAL.COM | Instal and Config for Z80DIS.COM |
|
||||
| ZDINSTAL.DTA | Overlay file for ZDINSTAL.COM |
|
||||
| ZDINSTAL.MSG | Overlay file for ZDINSTAL.COM |
|
||||
| **File** | **Description** |
|
||||
|----------------|----------------------------------|
|
||||
| `README.22` | Documentation for Z80DIS |
|
||||
| `Z80DIS.000` | Overlay File for Z80DIS.COM |
|
||||
| `Z80DIS.001` | Overlay File for Z80DIS.COM |
|
||||
| `Z80DIS.002` | Overlay File for Z80DIS.COM |
|
||||
| `Z80DIS.COM` | Z80DIS Disassembler main program |
|
||||
| `Z80DIS22.DOC` | Main Documentation for Z80DIS |
|
||||
| `ZDINSTAL.COM` | Instal and Config for Z80DIS.COM |
|
||||
| `ZDINSTAL.DTA` | Overlay file for ZDINSTAL.COM |
|
||||
| `ZDINSTAL.MSG` | Overlay file for ZDINSTAL.COM |
|
||||
|
||||
|
||||
@@ -28,6 +28,7 @@ including RC26, RC40, RC80, and BP80.
|
||||
|
||||
| **Description** | **Bus** | **ROM Image File** | **Baud Rate** |
|
||||
|-------------------------------------------------------------|---------|------------------------------|--------------:|
|
||||
| [RC2014 Z80 CPU Module], 512K RAM/ROM | RCBus | RC2014_std.rom | 115200 |
|
||||
| [RCBus Z80 CPU Module], 512K RAM/ROM | RCBus | RCZ80_std.rom | 115200 |
|
||||
| [RCBus Z80 CPU Module (KIO)], 512K w/KIO | RCBus | RCZ80_kio_std.rom | 115200 |
|
||||
| [RCBus Z180 CPU Module (External)] | RCBus | RCZ180_ext_std.rom | 115200 |
|
||||
@@ -111,26 +112,31 @@ Others
|
||||
|
||||
| **Description** | **Bus** | **ROM Image File** | **Baud Rate** |
|
||||
|-------------------------------------------------------------|----------|-----------------------------|--------------:|
|
||||
| [Dyno Z180 SBC]^6^ | Dyno | DYNO_std.rom | 38400 |
|
||||
| [EP Mini-ITX Z180]^11^ | UEXT | EPITX_std.rom | 115200 |
|
||||
| [eZ80 for RCBus Module]^13^, 512K RAM/ROM | RCBus | RCEZ80_std.rom | 115200 |
|
||||
| [Genesis Z180 System]^12^ | STD | GMZ180_std.rom | 115200 |
|
||||
| [Heath H8 Z80 System]^10^ | H8 | HEATH_std.rom | 115200 |
|
||||
| [NABU w/ RomWBW Option Board]^10^ | NABU | NABU_std.rom | 115200 |
|
||||
| [S100 Computers Z180 SBC]^9^ | S100 | S100_std.rom | 57600 |
|
||||
| [S100 Computers FPGA Z80 SBC]^9^ | S100 | FZ80_std.rom | 9600 |
|
||||
| [UNA Hardware BIOS]^3^ | - | UNA_std.rom | - |
|
||||
| [Z80-Retro SBC]^8^ | - | Z80RETRO_std.rom | 38400 |
|
||||
| [Z180 Mark IV SBC]^3^ | ECB | MK4_std.rom | 38400 |
|
||||
| [Dyno Z180 SBC]^2^ | Dyno | DYNO_std.rom | 38400 |
|
||||
| [EP Mini-ITX Z180]^6^ | UEXT | EPITX_std.rom | 115200 |
|
||||
| [eZ80 for RCBus Module]^8^, 512K RAM/ROM | RCBus | RCEZ80_std.rom | 115200 |
|
||||
| [Genesis Z180 System]^7^ | STD | GMZ180_std.rom | 115200 |
|
||||
| [Heath H8 Z80 System]^5^ | H8 | HEATH_std.rom | 115200 |
|
||||
| [MSX]^9^ | MSX | MSX_std.rom | 115200 |
|
||||
| [N8 PC]^10^ | ISA | N8PC_std.rom | 38400 |
|
||||
| [NABU w/ RomWBW Option Board]^5^ | NABU | NABU_std.rom | 115200 |
|
||||
| [S100 Computers Z180 SBC]^4^ | S100 | SZ180_std.rom | 57600 |
|
||||
| [S100 Computers Z80 CPU]^4^ | S100 | SZ80_std.rom | 19200 |
|
||||
| [S100 Computers T35 FPGA Z80 SBC]^4^ | S100 | SZ80_t35.rom | 9600 |
|
||||
| [UNA Hardware BIOS]^1^ | - | UNA_std.rom | - |
|
||||
| [Z80-Retro SBC]^3^ | - | Z80RETRO_std.rom | 38400 |
|
||||
| [Z180 Mark IV SBC]^1^ | ECB | MK4_std.rom | 38400 |
|
||||
|
||||
| ^3^Designed by John Coffman
|
||||
| ^6^Designed by Steve Garcia
|
||||
| ^8^Designed by Peter Wilson
|
||||
| ^9^Designed by John Monahan
|
||||
| ^10^Designed by Les Bird
|
||||
| ^11^Designed by Alan Cox
|
||||
| ^12^Designed by Doug Jackson
|
||||
| ^13^Designed by Dean Netherton
|
||||
| ^1^Designed by John Coffman
|
||||
| ^2^Designed by Steve Garcia
|
||||
| ^3^Designed by Peter Wilson
|
||||
| ^4^Designed by John Monahan
|
||||
| ^5^Designed by Les Bird
|
||||
| ^6^Designed by Alan Cox
|
||||
| ^7^Designed by Doug Jackson
|
||||
| ^8^Designed by Dean Netherton
|
||||
| ^9^MSX Port by Henk Berends
|
||||
| ^10^Designed by Dan Werner
|
||||
|
||||
`\clearpage`{=latex}
|
||||
|
||||
@@ -414,14 +420,16 @@ of the SIO ports, for ease of use with modern computers.
|
||||
|
||||
`\clearpage`{=latex}
|
||||
|
||||
## S100 Computers FPGA Z80 SBC
|
||||
## S100 Computers
|
||||
|
||||
An FPGA Z80 based S100 SBC
|
||||
### S100 Computers Z80 CPU
|
||||
|
||||
* Creator: John Monahan |
|
||||
* Website: [S100 Computers FPGA Z80 SBC](http://www.s100computers.com/My%20System%20Pages/FPGA%20Z80%20SBC/FPGA%20Z80%20SBC.htm)
|
||||
Z80-based S100 Modular System
|
||||
|
||||
#### ROM Image File: FZ80_std.rom
|
||||
* Creator: John Monahan
|
||||
* Website: [S100 Computers Z80 CPU](http://www.s100computers.com/My%20System%20Pages/Z80%20Board/Z80%20CPU%20Board.htm)
|
||||
|
||||
#### ROM Image File: SZ80_std.rom
|
||||
|
||||
| | |
|
||||
|-------------------|---------------|
|
||||
@@ -429,7 +437,56 @@ An FPGA Z80 based S100 SBC
|
||||
| Default CPU Speed | 8.000 MHz |
|
||||
| Interrupts | None |
|
||||
| System Timer | None |
|
||||
| Serial Default | 9600 Baud |
|
||||
| Serial Default | 19200 Baud |
|
||||
| Memory Manager | SZ80 |
|
||||
| ROM Size | 0 KB |
|
||||
| RAM Size | 1024 KB |
|
||||
|
||||
#### Supported Hardware
|
||||
|
||||
- FP: LEDIO=5
|
||||
- DLPSER: IO=172
|
||||
- SCC MODE=SZ80, IO=160, CHANNEL A
|
||||
- SCC MODE=SZ80, IO=160, CHANNEL B
|
||||
- SCON: IO=0
|
||||
- ESPSD: IO=128, PRIMARY
|
||||
- ESPSD: IO=128, SECONDARY
|
||||
- MD: TYPE=RAM
|
||||
- PPIDE: MODE=S100A, IO=48, MASTER
|
||||
- PPIDE: MODE=S100A, IO=48, SLAVE
|
||||
- PPIDE: MODE=S100B, IO=48, MASTER
|
||||
- PPIDE: MODE=S100B, IO=48, SLAVE
|
||||
|
||||
#### Notes:
|
||||
|
||||
- Initial console will depend on the IOBYTE dip switch settings.
|
||||
See website for dip switch settings.
|
||||
|
||||
- Version 6.0 or greater of the S100 Z80 Monitor ROM is required to
|
||||
load and run RomWBW.
|
||||
|
||||
- RomWBW is loaded by the S100 monitor from either CF Card or SD Card.
|
||||
The CF/SD Card should be imaged using SZ80_std_hd1k_combo.img which
|
||||
includes RomWBW.
|
||||
|
||||
`\clearpage`{=latex}
|
||||
|
||||
### S100 Computers T35 FPGA Z80 SBC
|
||||
|
||||
A T35 FPGA Z80 based S100 SBC
|
||||
|
||||
* Creator: John Monahan
|
||||
* Website: [S100 Computers FPGA Z80 SBC](http://www.s100computers.com/My%20System%20Pages/FPGA%20Z80%20SBC/FPGA%20Z80%20SBC.htm)
|
||||
|
||||
#### ROM Image File: SZ80_t35.rom
|
||||
|
||||
| | |
|
||||
|-------------------|---------------|
|
||||
| Bus | S100 |
|
||||
| Default CPU Speed | 8.000 MHz |
|
||||
| Interrupts | None |
|
||||
| System Timer | None |
|
||||
| Serial Default | 19200 Baud |
|
||||
| Memory Manager | Z2 |
|
||||
| ROM Size | 0 KB |
|
||||
| RAM Size | 512 KB |
|
||||
@@ -438,19 +495,41 @@ An FPGA Z80 based S100 SBC
|
||||
|
||||
- FP: LEDIO=255
|
||||
- DS5RTC: RTCIO=104, IO=104
|
||||
- SSER: IO=52
|
||||
- LPT: MODE=S100, IO=199
|
||||
- FV: IO=192, KBD MODE=FV, KBD IO=3
|
||||
- TSER: IO=53
|
||||
- DLPSER: IO=172
|
||||
- SCC MODE=SZ80, IO=160, CHANNEL A
|
||||
- SCC MODE=SZ80, IO=160, CHANNEL B
|
||||
- LPT: MODE=T35, IO=199
|
||||
- TVGA: IO=192, KBD MODE=T35, KBD IO=3
|
||||
- KBD: ENABLED
|
||||
- SCON: IO=0
|
||||
- ESPSD: IO=128, PRIMARY
|
||||
- ESPSD: IO=128, SECONDARY
|
||||
- MD: TYPE=RAM
|
||||
- PPIDE: IO=48, MASTER
|
||||
- PPIDE: IO=48, SLAVE
|
||||
- SD: MODE=FZ80, IO=108, UNITS=2
|
||||
- PPIDE: MODE=STD, IO=48, MASTER
|
||||
- PPIDE: MODE=STD, IO=48, SLAVE
|
||||
- PPIDE: MODE=S100A, IO=56, MASTER
|
||||
- PPIDE: MODE=S100A, IO=56, SLAVE
|
||||
- PPIDE: MODE=S100B, IO=56, MASTER
|
||||
- PPIDE: MODE=S100B, IO=56, SLAVE
|
||||
- SD: MODE=T35, IO=108, UNITS=2
|
||||
|
||||
|
||||
#### Notes:
|
||||
|
||||
- Requires matching FPGA code
|
||||
- This RomWBW build is specifically for the Trion T35 based module on
|
||||
the S100 Z80 FPGA board. The Waveshare FPGA module is not supported
|
||||
at this time.
|
||||
|
||||
- Requires matching FPGA code, see
|
||||
[S100 Projects RomWBW T35 Project](https://github.com/s100projects/ROMWBW_T35).
|
||||
|
||||
- Initial console will depend on the IOBYTE dip switch settings.
|
||||
See website for dip switch settings.
|
||||
|
||||
- RomWBW is loaded by the S100 monitor from either CF Card or SD Card.
|
||||
The CF/SD Card should be imaged using SZ80_t35_hd1k_combo.img which
|
||||
includes RomWBW.
|
||||
|
||||
`\clearpage`{=latex}
|
||||
|
||||
@@ -577,6 +656,47 @@ It also has an interface to the RetroBrew bus (ECB) for access to additional per
|
||||
|
||||
`\clearpage`{=latex}
|
||||
|
||||
## MSX
|
||||
|
||||
Support for standard MSX hardware by Henk Berends
|
||||
|
||||
The default configuration is for a European MSX 2 (PAL) with international keyboard and 512KB RAM Mapper extension.
|
||||
|
||||
#### ROM Image File: MSX_std.rom
|
||||
|
||||
| | |
|
||||
|-------------------|---------------|
|
||||
| Bus | MSX |
|
||||
| Default CPU Speed | 3.579 MHz |
|
||||
| Interrupts | Mode 1 |
|
||||
| System Timer | TMS |
|
||||
| Serial Default | 115200 Baud |
|
||||
| Memory Manager | MSX |
|
||||
| ROM Size | 0 KB |
|
||||
| RAM Size | 448 KB |
|
||||
|
||||
#### Supported Hardware
|
||||
|
||||
- RP5C01: IO=180
|
||||
- UART: IO=128
|
||||
- UART: IO=136
|
||||
- TMS: MODE=MSXMKY, IO=152, SCREEN=80X24, KEYBOARD=MKY, INTERRUPTS ENABLED
|
||||
- MKY: IO=168
|
||||
- MD: TYPE=RAM
|
||||
- IDE: MODE=RC, IO=16, MASTER
|
||||
- IDE: MODE=RC, IO=16, SLAVE
|
||||
- PPIDE: MODE=MSX_BEER, IO=48, MASTER
|
||||
- PPIDE: MODE=MSX_BEER, NO SLAVE
|
||||
- AY38910: MODE=MSX, IO=160, CLOCK=1789772 HZ
|
||||
|
||||
#### Notes:
|
||||
|
||||
- MSX 1 can be used with the TMS VDP set to 40 columns mode.
|
||||
- Storage options are the BEER IDE and SODA IDE interfaces.
|
||||
- Serial option is a 16550 UART interface.
|
||||
|
||||
`\clearpage`{=latex}
|
||||
|
||||
## NABU w/ RomWBW Option Board
|
||||
|
||||
No modifications to the NABU motherboard needed. Leave the standard NABU ROM in its socket
|
||||
@@ -812,8 +932,101 @@ This configuration is for the N8-2312 and latter (4314) revisions
|
||||
|
||||
`\clearpage`{=latex}
|
||||
|
||||
## N8 PC
|
||||
|
||||
This is a variant of the N8 computer.
|
||||
|
||||
* Creator: Dan Werner
|
||||
* Project GitHub: [N8 PC](https://github.com/danwerner21/N8PC)
|
||||
|
||||
#### ROM Image File: N8PC_std.rom
|
||||
|
||||
| | |
|
||||
|-------------------|---------------|
|
||||
| Bus | ISA |
|
||||
| Default CPU Speed | 9.216 MHz |
|
||||
| Interrupts | None |
|
||||
| System Timer | Z180 |
|
||||
| Serial Default | 38400 Baud |
|
||||
| Memory Manager | N8 |
|
||||
| ROM Size | 512 KB |
|
||||
| RAM Size | 512 KB |
|
||||
|
||||
#### Supported Hardware
|
||||
|
||||
- PKD: IO=132, SIZE=8X1
|
||||
- M6242RTC: IO=160
|
||||
- ASCI: IO=64
|
||||
- ASCI: IO=65
|
||||
- TMS: MODE=N8PC, IO=152, SCREEN=80X24, KEYBOARD=KBD
|
||||
- KBD: ENABLED
|
||||
- MD: TYPE=RAM
|
||||
- MD: TYPE=ROM
|
||||
- FD: MODE=N8, IO=140, DRIVE 0, TYPE=3.5" HD
|
||||
- FD: MODE=N8, IO=140, DRIVE 1, TYPE=3.5" HD
|
||||
- PPIDE: MODE=STD, IO=132, MASTER
|
||||
- PPIDE: MODE=STD, IO=132, SLAVE
|
||||
- AY38910: MODE=N8, IO=156, CLOCK=3579545 HZ
|
||||
|
||||
#### Notes:
|
||||
|
||||
`\clearpage`{=latex}
|
||||
|
||||
## RCBus Z80
|
||||
|
||||
The RC2014 ROM is for the official RC2014 Kits by Spencer Owen.
|
||||
|
||||
* Creator: Spencer Owen
|
||||
* Google Groups: [RC2014-Z80](https://groups.google.com/g/rc2014-z80)
|
||||
* Github: [RC2014](https://github.com/RC2014Z80/RC2014)
|
||||
|
||||
### RC2014 Z80 CPU Module
|
||||
|
||||
Generic Rom Image.
|
||||
|
||||
#### ROM Image File: RC2014_std.rom
|
||||
|
||||
| | |
|
||||
|-------------------|---------------|
|
||||
| Bus | RCBus |
|
||||
| Default CPU Speed | 7.372 MHz |
|
||||
| Interrupts | Mode 1 |
|
||||
| System Timer | None |
|
||||
| Serial Default | 115200 Baud |
|
||||
| Memory Manager | Z2 |
|
||||
| ROM Size | 512 KB |
|
||||
| RAM Size | 512 KB |
|
||||
|
||||
#### Supported Hardware
|
||||
|
||||
- FP: LEDIO=0, SWIO=0
|
||||
- LCD: IO=218, SIZE=20X4
|
||||
- DSRTC: MODE=STD, IO=192
|
||||
- UART: IO=128
|
||||
- UART: IO=136
|
||||
- UART: IO=160
|
||||
- UART: IO=168
|
||||
- SIO MODE=RC, IO=128, CHANNEL A, INTERRUPTS ENABLED
|
||||
- SIO MODE=RC, IO=128, CHANNEL B, INTERRUPTS ENABLED
|
||||
- SIO MODE=RC, IO=132, CHANNEL A, INTERRUPTS ENABLED
|
||||
- SIO MODE=RC, IO=132, CHANNEL B, INTERRUPTS ENABLED
|
||||
- ACIA: IO=128, INTERRUPTS ENABLED
|
||||
- CH: IO=62
|
||||
- CH: IO=60
|
||||
- CHUSB: IO=62
|
||||
- CHUSB: IO=60
|
||||
- MD: TYPE=RAM
|
||||
- MD: TYPE=ROM
|
||||
- FD: MODE=RCWDC, IO=80, DRIVE 0, TYPE=3.5" HD
|
||||
- FD: MODE=RCWDC, IO=80, DRIVE 1, TYPE=3.5" HD
|
||||
- IDE: MODE=RC, IO=16, MASTER
|
||||
- IDE: MODE=RC, IO=16, SLAVE
|
||||
- PPIDE: IO=32, MASTER
|
||||
- PPIDE: IO=32, SLAVE
|
||||
- SD: MODE=PIO, IO=105, UNITS=1
|
||||
|
||||
`\clearpage`{=latex}
|
||||
|
||||
### RCBus Z80 CPU Module
|
||||
|
||||
Generic Rom Image.
|
||||
@@ -1136,7 +1349,8 @@ It is designed specifically for ROM-less RomWBW. HBIOS is loaded from disk at bo
|
||||
Eazy80-512 is Eazy80 rev2 pc board configured with 512K RAM to run RomWBW.
|
||||
The design was derived from modifications to Eazy80 Rev1 that supported RomWBW.
|
||||
|
||||
HBIOS is loaded from disk at boot by ROM monitor
|
||||
HBIOS is loaded from disk at boot by ROM monitor or via a a compressed
|
||||
ROM image.
|
||||
|
||||
(Not to be confused with EasyZ80)
|
||||
|
||||
@@ -1145,7 +1359,7 @@ HBIOS is loaded from disk at boot by ROM monitor
|
||||
* Retrobrew Wiki: [Eazy80 Rev2, Glue-less Configuration](https://www.retrobrewcomputers.org/doku.php?id=builderpages:plasmo:eazy80:eazy80rev2:eazy80rev2home)
|
||||
* Google Groups: [EaZy80, A Simple80 with KIO](https://groups.google.com/g/retro-comp/c/0cUDbZspHyQ)
|
||||
|
||||
#### ROM Image File: RCZ80_ez512_std.rom
|
||||
#### ROM Image File: RCZ80_ez512_std.rom
|
||||
|
||||
| | |
|
||||
|-------------------|---------------|
|
||||
@@ -1158,6 +1372,41 @@ HBIOS is loaded from disk at boot by ROM monitor
|
||||
| ROM Size | 0 KB |
|
||||
| RAM Size | 512 KB |
|
||||
|
||||
#### Compressed ROM Image File: RCZ80_ez512_std_64k.rom
|
||||
|
||||
The RomWBW utility program 'compress' is designed to squeeze the
|
||||
compiled RomWBW 128K file 'RCZ80_ez512_std.upd' into a 64K ROM. As there
|
||||
are many areas in RomWBW with repeating bytes of the same value, it is
|
||||
possible to compress the 128K file to fit into a 64K ROM.
|
||||
|
||||
The compression program looks for two or more consecutive bytes of the
|
||||
same value (any values of $00 to $FF). If it finds duplicates, it leaves
|
||||
two of the duplicate bytes followed by a byte count, n-1 (n <= $FF),
|
||||
where n is the total number of duplicates. If the program succeeds in
|
||||
compressing the input file to fit into the available space, the file
|
||||
'RCZ80_ez512_std_64k.rom' is constructed, along with a short Z80
|
||||
decompression program that will be stored in the last 256 bytes of the
|
||||
ROM. The constructed 64K file is saved and the unused storage space is
|
||||
output in bytes. Should compression fail to fit the input file into
|
||||
available space, only an error message and the overrun in bytes is
|
||||
output.
|
||||
|
||||
The decompression program, located at $FF00, is executed at startup via
|
||||
the 3-byte jump at location $0000, decompressing the stored code in ROM
|
||||
into the computer's RAM. When decompression finishes, control is passed
|
||||
to RAM location $0000, which in turn starts execution of RomWBW.
|
||||
|
||||
The 64K ROM Layout:
|
||||
|
||||
* The first 3 bytes are always $C3 $00 $FF, a jump to the Z80
|
||||
decompression code located at $FF00 in the ROM.
|
||||
|
||||
* Locations $0003 up to, and including, $FEFF are available to store
|
||||
the compressed 128K input file.
|
||||
|
||||
* Location $FF00 up to, and including, $FFFF, is where the Z80
|
||||
decompression program is stored.
|
||||
|
||||
#### Supported Hardware
|
||||
|
||||
- DSRTC: MODE=STD, IO=192
|
||||
@@ -1744,7 +1993,7 @@ as defined by the IEEE-696 specs.
|
||||
* Creator: John Monahan |
|
||||
* Website: [S100 Computers Z180 SBC](http://www.s100computers.com/My%20System%20Pages/Z180%20SBC/Z180%20SBC.htm)
|
||||
|
||||
#### ROM Image File: S100_std.rom
|
||||
#### ROM Image File: SZ180_std.rom
|
||||
|
||||
| | |
|
||||
|-------------------|---------------|
|
||||
@@ -1760,11 +2009,20 @@ as defined by the IEEE-696 specs.
|
||||
#### Supported Hardware
|
||||
|
||||
- INTRTC: ENABLED
|
||||
- DLPSER: IO=172
|
||||
- ASCI: IO=192, INTERRUPTS ENABLED
|
||||
- ASCI: IO=193, INTERRUPTS ENABLED
|
||||
- SCC MODE=SZ80, IO=160, CHANNEL A
|
||||
- SCC MODE=SZ80, IO=160, CHANNEL B
|
||||
- SCON: IO=0
|
||||
- ESPSD: IO=128, PRIMARY
|
||||
- ESPSD: IO=128, SECONDARY
|
||||
- MD: TYPE=RAM
|
||||
- MD: TYPE=ROM
|
||||
- PPIDE: MODE=S100A, IO=48, MASTER
|
||||
- PPIDE: MODE=S100A, IO=48, SLAVE
|
||||
- PPIDE: MODE=S100B, IO=48, MASTER
|
||||
- PPIDE: MODE=S100B, IO=48, SLAVE
|
||||
- SD: MODE=SC, IO=12, UNITS=1
|
||||
|
||||
#### Notes:
|
||||
@@ -2081,7 +2339,7 @@ Z180 CPU (eg. SC722) with 1MB linear memory (eg. SC721)
|
||||
- PPIDE: IO=32, SLAVE
|
||||
- SD: MODE=SC, IO=12, UNITS=1
|
||||
|
||||
\clearpage`{=latex}
|
||||
`\clearpage`{=latex}
|
||||
|
||||
## Z80-Retro SBC
|
||||
|
||||
@@ -2227,8 +2485,11 @@ may be discovered by RomWBW in your system.
|
||||
| PPPCON | ParPortProp Serial Console Interface |
|
||||
| PRPCON | PropIO Serial Console Interface |
|
||||
| SCON | S100 Console |
|
||||
| SIO | Zilog Serial Port Interface |
|
||||
| SIO | Zilog Serial Input/Output Controller (SIO) |
|
||||
| SCC | Zilog Serial Communications Controller (SCC) |
|
||||
| SSER | Simple Serial Interface |
|
||||
| TSER | Trion FPGA Serial Interface |
|
||||
| DLPSER | DLP USB Serial Interface |
|
||||
| UART | 16C550 Family Serial Interface |
|
||||
| USB-FIFO | FT232H-based ECB USB FIFO |
|
||||
| Z2U | Zilog Z280 CPU Built-in Serial Ports |
|
||||
@@ -2238,16 +2499,20 @@ discovers for the initial console. The following character devices are
|
||||
scanned in the order shown. The available character devices depend on
|
||||
the active platform and configuration.
|
||||
|
||||
#. SSER: Simple Serial Interface
|
||||
#. ASCI: Zilog Z180 CPU Built-in Serial Ports
|
||||
#. Z2U: Zilog Z280 CPU Built-in Serial Ports
|
||||
#. UART: 16C550 Family Serial Interface
|
||||
#. DUART: SCC2681 or compatible Dual UART
|
||||
#. SIO: Zilog Serial Port Interface
|
||||
#. SIO: Zilog Serial Port Interface (SIO)
|
||||
#. SCC: Zilog Serial Port Interface (SCC)
|
||||
#. EZ80UART: eZ80 Serial Port Interface
|
||||
#. ACIA: MC68B50 Asynchronous Communications Interface Adapter
|
||||
#. SSER: Simple Serial Interface
|
||||
#. TSER: Trion FPGA Serial Interface
|
||||
#. DLPSER: DLP USB Serial Interface
|
||||
#. USB-FIFO: FT232H-based ECB USB FIFO
|
||||
|
||||
|
||||
## Disk
|
||||
|
||||
| **ID** | **Description** |
|
||||
@@ -2266,6 +2531,8 @@ the active platform and configuration.
|
||||
| RF | RAM Floppy Disk Interface |
|
||||
| SD | SD Card Interface |
|
||||
| SYQ | Iomega SparQ Drive on PPI |
|
||||
| ESPSD | S100 ESP32-based SD Card Interface |
|
||||
| SCSI | 5380 SCSI Interface |
|
||||
|
||||
## Video
|
||||
|
||||
@@ -2273,12 +2540,13 @@ the active platform and configuration.
|
||||
|-----------|--------------------------------------------------------|
|
||||
| CVDU | MC8563-based Video Display Controller |
|
||||
| EF | EF9345 Video Display Controller |
|
||||
| FV | S100 FPGA Z80 Onboard VGA/Keyboard |
|
||||
| TVGA | S100 Trion FPGA Onboard VGA/Keyboard |
|
||||
| GDC | uPD7220 Video Display Controller |
|
||||
| TMS | TMS9918/38/58 Video Display Controller |
|
||||
| VDU | MC6845 Family Video Display Controller (*) |
|
||||
| VDU | MC6845 Family Video Display Controller (\*) |
|
||||
| VGA | HD6445CP4-based Video Display Controller |
|
||||
| VRC | VGARC Video Display Controller |
|
||||
| XOSERA | XOSERA FPGA-based Video Display Controller |
|
||||
|
||||
Note:
|
||||
|
||||
@@ -2317,9 +2585,13 @@ Note:
|
||||
| DSRTC | Maxim DS1302 Real-Time Clock w/ NVRAM |
|
||||
| EZ80RTC | eZ80 Real-Time Clock |
|
||||
| INTRTC | Interrupt-based Real Time Clock |
|
||||
| PCRTC | MC146818/DS1285/DS12885 PC style |
|
||||
| PCF | PCF8584-based I2C Real-Time Clock |
|
||||
| RP5C01 | Ricoh RPC01A Real-Time Clock w/ NVRAM |
|
||||
| SIMRTC | SIMH Simulator Real-Time Clock |
|
||||
| MMRTC | NS MM58167B Real-Time Clock (no NVRAM) |
|
||||
| DS12RTC | Dallas Semiconductor DS1288x Real-Time Clock w/ NVRAM |
|
||||
| M6242 | MSM6242 Real-Time Clock (no NVRAM) |
|
||||
|
||||
## DsKy (DiSplay KeYpad)
|
||||
|
||||
@@ -2403,3 +2675,4 @@ for more information on UNA.
|
||||
CP/M 3, ZPM3, and p-System.
|
||||
|
||||
- Some of the RomWBW-specific applications are not UNA compatible.
|
||||
|
||||
|
||||
@@ -1,410 +1,436 @@
|
||||
$define{doc_title}{Introduction}$
|
||||
$include{"Book.h"}$
|
||||
|
||||
# Overview
|
||||
|
||||
RomWBW software provides a complete, commercial quality
|
||||
implementation of CP/M (and workalike) operating systems and
|
||||
applications for modern Z80/180/280 retro-computing hardware systems.
|
||||
|
||||
A wide variety of platforms are supported including those
|
||||
produced by these developer communities:
|
||||
|
||||
* [RetroBrew Computers](https://www.retrobrewcomputers.org)
|
||||
(<https://www.retrobrewcomputers.org>)
|
||||
* [RC2014](https://rc2014.co.uk) (<https://rc2014.co.uk>), \
|
||||
[RC2014-Z80](https://groups.google.com/g/rc2014-z80)
|
||||
(<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
|
||||
$doc_hardware$ .
|
||||
|
||||
`\clearpage`{=latex}
|
||||
|
||||
# Description
|
||||
|
||||
## Primary Features
|
||||
|
||||
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/USB Card) and move it between systems transparently.
|
||||
|
||||
Supported hardware features of RomWBW include:
|
||||
|
||||
* Z80 Family CPUs including Z80, Z180, and Z280
|
||||
* Banked memory services for several banking designs
|
||||
* 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
|
||||
* Real time clock drivers including DS1302, BQ4845
|
||||
* Support for CP/NET networking using Wiznet, MT011 or Serial
|
||||
* Built-in VT-100 terminal emulation support
|
||||
|
||||
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, 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 addressable storage on a single device,
|
||||
with up to 128MB accessible at any one time.
|
||||
|
||||
## Included Software
|
||||
|
||||
Multiple disk images are provided in the distribution. Most disk
|
||||
images contain a complete, bootable, ready-to-run implementation of a
|
||||
specific operating system. A "combo" disk image contains multiple
|
||||
slices, each with a full operating system implementation. If you use
|
||||
this disk image, you can easily pick whichever operating system you
|
||||
want to boot without changing media.
|
||||
|
||||
Some of the included software:
|
||||
|
||||
* Operating Systems (CP/M 2.2, ZSDOS, NZ-COM, CP/M 3, ZPM3, Z3PLUS, QPM )
|
||||
* Support for other operating systems, p-System, FreeRTOS, and FUZIX.
|
||||
* Programming Tools (Z80ASM, Turbo Pascal, Forth, Cowgol)
|
||||
* C Compiler's including Aztec-C, and HI-TECH C
|
||||
* Microsoft Basic Compiler, and Microsoft Fortran
|
||||
* Some games such as Colossal Cave, Zork, etc
|
||||
* Wordstar Word processing software
|
||||
|
||||
Some of the provided software can be launched directly from the
|
||||
ROM firmware itself:
|
||||
|
||||
* System Monitor
|
||||
* Operating Systems (CP/M 2.2, ZSDOS)
|
||||
* ROM BASIC (Nascom BASIC and Tasty BASIC)
|
||||
* ROM Forth
|
||||
|
||||
A tool is provided that allows you to access a FAT-12/16/32 filesystem.
|
||||
The FAT filesystem may be coresident on the same disk media as RomWBW
|
||||
slices or on stand-alone media. This makes exchanging files with modern
|
||||
OSes such as Windows, MacOS, and Linux very easy.
|
||||
|
||||
`\clearpage`{=latex}
|
||||
|
||||
## ROM Distribution
|
||||
|
||||
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.
|
||||
|
||||
RomWBW is distributed as both source code and pre-built ROM and disk
|
||||
images.
|
||||
|
||||
The pre-built ROM images distributed with RomWBW are based on
|
||||
the default system configurations as determined by the hardware
|
||||
provider/designer. The pre-built ROM firmware images are generally
|
||||
suitable for most users.
|
||||
|
||||
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.
|
||||
|
||||
The asset named RomWBW-vX.X.X-Package.zip 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.
|
||||
|
||||
#### Distribution Directory Layout
|
||||
|
||||
The RomWBW distribution is a compressed zip archive file organized in
|
||||
a set of directories. Each of these directories has its own
|
||||
ReadMe.txt file describing the contents in detail. In summary, these
|
||||
directories are:
|
||||
|
||||
| **Directory** | **Description** |
|
||||
|--------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
||||
| **Binary** | The final output files of the build process are placed here. Most importantly, the ROM images with the file names ending in ".rom" and disk images ending in .img. |
|
||||
| **Doc** | Contains various detailed documentation, both RomWBW specifically as well as the operating systems and applications. |
|
||||
| **Source** | Contains the source code files used to build the software and ROM images. |
|
||||
| **Tools** | Contains the programs that are used by the build process or that may be useful in setting up your system. |
|
||||
|
||||
`\clearpage`{=latex}
|
||||
|
||||
#### Building from Source
|
||||
|
||||
It is also very easy to modify and build custom ROM
|
||||
images that fully tailor the firmware to your specific preferences.
|
||||
All tools required to build custom ROM firmware under Windows are
|
||||
included -- no need to install assemblers, etc. The firmware can also
|
||||
be built using Linux or MacOS after confirming a few standard tools
|
||||
have been installed.
|
||||
|
||||
## Installation & Operation
|
||||
|
||||
In general, installation of RomWBW on your platform is very simple. You
|
||||
just need to program your ROM with the correct ROM image from the RomWBW
|
||||
distribution. Subsequently, you can write disk images on your disk
|
||||
drives (IDE disk, CF Card, SD Card, etc.) which then provides even more
|
||||
functionality.
|
||||
|
||||
Complete instructions for installation and operation of RomWBW are found
|
||||
in the $doc_user$. It is also a good idea to review the [Release
|
||||
Notes](https://github.com/wwarthen/RomWBW/blob/master/RELEASE_NOTES.md)
|
||||
for helpful release-specific information.
|
||||
|
||||
## Documentation
|
||||
|
||||
There are several documents that form the core of the RomWBW documentation:
|
||||
|
||||
* $doc_user$ is the main user guide for RomWBW, it covers the major topics
|
||||
of how to install, manage and use RomWBW, and includes additional guidance
|
||||
to the use of some of the operating systems supported by RomWBW
|
||||
|
||||
* $doc_hardware$ contains a description of all the hardware platforms,
|
||||
and devices supported by RomWBW.
|
||||
|
||||
* $doc_apps$ is a reference for the ROM-hosted and OS-hosted applications
|
||||
created or customized to enhance the operation of RomWBW.
|
||||
|
||||
* $doc_catalog$ is a reference for the contents of the disk images
|
||||
provided with RomWBW, with a description of many of the files on each image
|
||||
|
||||
* $doc_sys$ discusses much of the internal design and construction
|
||||
of RomWBW. It includes a reference for the RomWBW HBIOS API
|
||||
functions.
|
||||
|
||||
Each of the operating systems and ROM applications included with RomWBW
|
||||
are sophisticated tools in their own right. It is not reasonable to
|
||||
fully document their usage. However, you will find complete manuals
|
||||
in PDF format in the Doc directory of the distribution. The intention
|
||||
of this documentation is to describe the operation of RomWBW and the ways in
|
||||
which it enhances the operation of the included applications and
|
||||
operating systems.
|
||||
|
||||
Since RomWBW is purely a software product for many different platforms,
|
||||
the documentation does **not** cover hardware construction,
|
||||
configuration, or troubleshooting -- please see your hardware provider
|
||||
for this information.
|
||||
|
||||
# Support
|
||||
|
||||
## Getting Assistance
|
||||
|
||||
The best way to get assistance with RomWBW or any aspect of the
|
||||
RetroBrew Computers projects is via one of the community forums:
|
||||
|
||||
* [RetroBrew Computers Forum](https://www.retrobrewcomputers.org/forum/)
|
||||
* [RC2014 Google Group](https://groups.google.com/forum/#!forum/rc2014-z80)
|
||||
* [retro-comp Google Group](https://groups.google.com/forum/#!forum/retro-comp)
|
||||
|
||||
Submission of issues and bugs are welcome at the
|
||||
[RomWBW GitHub Repository](https://github.com/wwarthen/RomWBW).
|
||||
|
||||
Also feel free to email $doc_author$ at [$doc_authmail$](mailto:$doc_authmail$).
|
||||
I am happy to provide support adapting RomWBW to new or modified systems
|
||||
|
||||
# Contributions
|
||||
|
||||
All source code and distributions are maintained on GitHub.
|
||||
Contributions of all kinds to RomWBW are very welcome.
|
||||
|
||||
## Acknowledgments
|
||||
|
||||
I want to acknowledge that a great deal of the code and inspiration
|
||||
for RomWBW has been provided by or derived from the work of others
|
||||
in the RetroBrew Computers Community. I sincerely appreciate all of
|
||||
their 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
|
||||
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.
|
||||
|
||||
* Douglas Goodall contributed code, time, testing, and advice in "the
|
||||
early days". He created an entire suite of application programs to
|
||||
enhance the use of RomWBW. Unfortunately, they have become unusable
|
||||
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.
|
||||
|
||||
* Spencer Owen created the RC2014 series of hobbyist kit computers
|
||||
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.
|
||||
|
||||
* Curt Mayer contributed the original Linux / MacOS build process.
|
||||
|
||||
* UNA BIOS and FDISK80 are the products of John Coffman.
|
||||
|
||||
* FLASH4 is a product of Will Sowerbutts.
|
||||
|
||||
* CLRDIR is a product of Max Scane.
|
||||
|
||||
* Tasty Basic is a product of Dimitri Theulings.
|
||||
|
||||
* Dean Netherton contributed eZ80 CPU support, the sound driver
|
||||
interface, and the SN76489 sound driver.
|
||||
|
||||
* 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 and Applications documents.
|
||||
|
||||
* Mark Pruden has made a wide variety of contributions including:
|
||||
- significant content in the Disk Catalog and User Guide
|
||||
- creation of the Introduction and Hardware documents
|
||||
- Z3PLUS operating system disk image
|
||||
- COPYSL utility
|
||||
- SLABEL utility
|
||||
- a feature for RomWBW configuration by NVRAM
|
||||
- the /B bulk mode of disk assignment to the ASSIGN utility
|
||||
|
||||
* 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
|
||||
|
||||
`\clearpage`{=latex}
|
||||
|
||||
## Related Projects
|
||||
|
||||
Outside of the hardware platforms adapted to RomWBW, there are a variety
|
||||
of projects that either target RomWBW specifically or provide
|
||||
a RomWBW-specific variation. These efforts are greatly appreciated
|
||||
and are listed below. Please contact the author if there are any other
|
||||
such projects that are not listed.
|
||||
|
||||
#### Z88DK
|
||||
|
||||
Z88DK is a software powerful development kit for Z80 computers
|
||||
supporting both C and assembly language. This kit now provides
|
||||
specific library support for RomWBW HBIOS. The Z88DK project is
|
||||
hosted at <https://github.com/z88dk/z88dk>.
|
||||
|
||||
#### Paleo Editor
|
||||
|
||||
Steve Garcia has created a Windows-hosted IDE that is tailored to
|
||||
development of RomWBW. The project can be found at
|
||||
<https://github.com/alloidian/PaleoEditor>.
|
||||
|
||||
#### Z80 fig-FORTH
|
||||
|
||||
Dimitri Theulings' implementation of fig-FORTH for the Z80 has a
|
||||
RomWBW-specific variant. The project is hosted at
|
||||
<https://github.com/dimitrit/figforth>.
|
||||
|
||||
#### Assembly Language Programming for the RC2014 Zed
|
||||
|
||||
Bruce Hall has written a very nice document that describes how to
|
||||
develop assembly language applications on RomWBW. It begins with the
|
||||
setup and configuration of a new RC2014 Zed system running RomWBW.
|
||||
It describes not only generic CP/M application development, but also
|
||||
RomWBW HBIOS programming and bare metal programming. The latest copy
|
||||
of this document is hosted at
|
||||
[http://w8bh.net/Assembly for RC2014Z.pdf](http://w8bh.net/Assembly%20for%20RC2014Z.pdf).
|
||||
|
||||
# Licensing
|
||||
|
||||
## License Terms
|
||||
|
||||
RomWBW is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
RomWBW is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with RomWBW. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
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 its intended
|
||||
licensing, please notify:
|
||||
|
||||
> $doc_author$ \
|
||||
> [$doc_authmail$](mailto:$doc_authmail$)
|
||||
|
||||
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 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
|
||||
composed of multiple components with different licenses. It is
|
||||
believed that in all such cases the licenses are compatible with
|
||||
GPL version 3.
|
||||
|
||||
RomWBW encourages code contributions from others. Contributors
|
||||
may assert their own copyright in their contributions by
|
||||
annotating the contributed source code appropriately. Contributors
|
||||
are further encouraged to submit their contributions via the RomWBW
|
||||
source code control system to ensure their contributions are clearly
|
||||
documented.
|
||||
|
||||
All contributions to RomWBW are subject to this license.
|
||||
$define{doc_title}{Introduction}$
|
||||
$include{"Book.h"}$
|
||||
|
||||
# Overview
|
||||
|
||||
RomWBW software provides a complete, commercial quality
|
||||
implementation of CP/M (and work-alike) operating systems and
|
||||
applications for modern Z80/180/280 retro-computing hardware systems.
|
||||
|
||||
A wide variety of platforms are supported including those
|
||||
produced by these developer communities:
|
||||
|
||||
* [RetroBrew Computers](https://www.retrobrewcomputers.org)
|
||||
(<https://www.retrobrewcomputers.org>)
|
||||
* [RC2014](https://rc2014.co.uk) (<https://rc2014.co.uk>), \
|
||||
[RC2014-Z80](https://groups.google.com/g/rc2014-z80)
|
||||
(<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
|
||||
$doc_hardware$ .
|
||||
|
||||
`\clearpage`{=latex}
|
||||
|
||||
# Description
|
||||
|
||||
## Primary Features
|
||||
|
||||
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/USB Card) and move it between systems transparently.
|
||||
|
||||
Supported hardware features of RomWBW include:
|
||||
|
||||
* Z80 Family CPUs including Z80, Z180, and Z280
|
||||
* Banked memory services for several banking designs
|
||||
* 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, Xosera
|
||||
* Keyboard (PS/2) drivers via VT8242 or PPI interfaces
|
||||
* Real time clock drivers including DS1302, BQ4845
|
||||
* Support for CP/NET networking using Wiznet, MT011 or Serial
|
||||
* Built-in VT-100 terminal emulation support
|
||||
|
||||
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, 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 addressable storage on a single device,
|
||||
with up to 128MB accessible at any one time.
|
||||
|
||||
## Included Software
|
||||
|
||||
Multiple disk images are provided in the distribution. Most disk
|
||||
images contain a complete, bootable, ready-to-run implementation of a
|
||||
specific operating system. A "combo" disk image contains multiple
|
||||
slices, each with a full operating system implementation. If you use
|
||||
this disk image, you can easily pick whichever operating system you
|
||||
want to boot without changing media.
|
||||
|
||||
Some of the included software:
|
||||
|
||||
* Operating Systems (CP/M 2.2, ZSDOS, NZ-COM, CP/M 3, ZPM3, Z3PLUS, QPM )
|
||||
* Support for other operating systems, p-System, FreeRTOS, and FUZIX.
|
||||
* Programming Tools (Z80ASM, Turbo Pascal, Forth, Cowgol)
|
||||
* C Compiler's including Aztec-C, and HI-TECH C
|
||||
* Microsoft Basic Compiler, Microsoft Fortran, and Microsoft COBOL
|
||||
* Some games such as Colossal Cave, Zork, etc
|
||||
* Wordstar Word processing software
|
||||
|
||||
Some of the provided software can be launched directly from the
|
||||
ROM firmware itself:
|
||||
|
||||
* System Monitor
|
||||
* Operating Systems (CP/M 2.2, ZSDOS)
|
||||
* ROM BASIC (Nascom BASIC and Tasty BASIC)
|
||||
* ROM Forth
|
||||
|
||||
A tool is provided that allows you to access a FAT-12/16/32 filesystem.
|
||||
The FAT filesystem may be coresident on the same disk media as RomWBW
|
||||
slices or on stand-alone media. This makes exchanging files with modern
|
||||
OSes such as Windows, MacOS, and Linux very easy.
|
||||
|
||||
`\clearpage`{=latex}
|
||||
|
||||
## ROM Distribution
|
||||
|
||||
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.
|
||||
|
||||
RomWBW is distributed as both source code and pre-built ROM and disk
|
||||
images.
|
||||
|
||||
The pre-built ROM images distributed with RomWBW are based on
|
||||
the default system configurations as determined by the hardware
|
||||
provider/designer. The pre-built ROM firmware images are generally
|
||||
suitable for most users.
|
||||
|
||||
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.
|
||||
|
||||
The asset named RomWBW-vX.X.X-Package.zip 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.
|
||||
|
||||
#### Distribution Directory Layout
|
||||
|
||||
The RomWBW distribution is a compressed zip archive file organized in
|
||||
a set of directories. Each of these directories has its own
|
||||
ReadMe.txt file describing the contents in detail. In summary, these
|
||||
directories are:
|
||||
|
||||
| **Directory** | **Description** |
|
||||
|--------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
||||
| **Binary** | The final output files of the build process are placed here. Most importantly, the ROM images with the file names ending in ".rom" and disk images ending in .img. |
|
||||
| **Doc** | Contains various detailed documentation, both RomWBW specifically as well as the operating systems and applications. |
|
||||
| **Source** | Contains the source code files used to build the software and ROM images. |
|
||||
| **Tools** | Contains the programs that are used by the build process or that may be useful in setting up your system. |
|
||||
|
||||
`\clearpage`{=latex}
|
||||
|
||||
#### Building from Source
|
||||
|
||||
It is also very easy to modify and build custom ROM
|
||||
images that fully tailor the firmware to your specific preferences.
|
||||
All tools required to build custom ROM firmware under Windows are
|
||||
included -- no need to install assemblers, etc. The firmware can also
|
||||
be built using Linux or MacOS after confirming a few standard tools
|
||||
have been installed.
|
||||
|
||||
## Installation & Operation
|
||||
|
||||
In general, installation of RomWBW on your platform is very simple. You
|
||||
just need to program your ROM with the correct ROM image from the RomWBW
|
||||
distribution. Subsequently, you can write disk images on your disk
|
||||
drives (IDE disk, CF Card, SD Card, etc.) which then provides even more
|
||||
functionality.
|
||||
|
||||
Complete instructions for installation and operation of RomWBW are found
|
||||
in the $doc_user$. It is also a good idea to review the [Release
|
||||
Notes](https://github.com/wwarthen/RomWBW/blob/master/RELEASE_NOTES.md)
|
||||
for helpful release-specific information.
|
||||
|
||||
## Documentation
|
||||
|
||||
There are several documents that form the core of the RomWBW documentation:
|
||||
|
||||
* $doc_user$ is the main user guide for RomWBW, it covers the major topics
|
||||
of how to install, manage and use RomWBW, and includes additional guidance
|
||||
to the use of some of the operating systems supported by RomWBW
|
||||
|
||||
* $doc_hardware$ contains a description of all the hardware platforms,
|
||||
and devices supported by RomWBW.
|
||||
|
||||
* $doc_apps$ is a reference for the ROM-hosted and OS-hosted applications
|
||||
created or customized to enhance the operation of RomWBW.
|
||||
|
||||
* $doc_catalog$ is a reference for the contents of the disk images
|
||||
provided with RomWBW, with a description of many of the files on each image
|
||||
|
||||
* $doc_sys$ discusses much of the internal design and construction
|
||||
of RomWBW. It includes a reference for the RomWBW HBIOS API
|
||||
functions.
|
||||
|
||||
An online HTML version of this documentation is hosted at
|
||||
<https://wwarthen.github.io/RomWBW>.
|
||||
|
||||
Each of the operating systems and ROM applications included with RomWBW
|
||||
are sophisticated tools in their own right. It is not reasonable to
|
||||
fully document their usage. However, you will find complete manuals
|
||||
in PDF format in the Doc directory of the distribution. The intention
|
||||
of this documentation is to describe the operation of RomWBW and the ways in
|
||||
which it enhances the operation of the included applications and
|
||||
operating systems.
|
||||
|
||||
Since RomWBW is purely a software product for many different platforms,
|
||||
the documentation does **not** cover hardware construction,
|
||||
configuration, or troubleshooting -- please see your hardware provider
|
||||
for this information.
|
||||
|
||||
# Support
|
||||
|
||||
## Getting Assistance
|
||||
|
||||
The best way to get assistance with RomWBW or any aspect of the
|
||||
RetroBrew Computers projects is via one of the community forums:
|
||||
|
||||
* [RetroBrew Computers Forum](https://www.retrobrewcomputers.org/forum/)
|
||||
* [RC2014 Google Group](https://groups.google.com/forum/#!forum/rc2014-z80)
|
||||
* [retro-comp Google Group](https://groups.google.com/forum/#!forum/retro-comp)
|
||||
|
||||
Submission of issues and bugs are welcome at the
|
||||
[RomWBW GitHub Repository](https://github.com/wwarthen/RomWBW).
|
||||
|
||||
Also feel free to email $doc_author$ at [$doc_authmail$](mailto:$doc_authmail$).
|
||||
I am happy to provide support adapting RomWBW to new or modified systems
|
||||
|
||||
# Contributions
|
||||
|
||||
All source code and distributions are maintained on GitHub.
|
||||
Contributions of all kinds to RomWBW are very welcome.
|
||||
|
||||
## Acknowledgments
|
||||
|
||||
I want to acknowledge that a great deal of the code and inspiration
|
||||
for RomWBW has been provided by or derived from the work of others
|
||||
in the RetroBrew Computers Community. I sincerely appreciate all of
|
||||
their 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
|
||||
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.
|
||||
|
||||
* Douglas Goodall contributed code, time, testing, and advice in "the
|
||||
early days". He created an entire suite of application programs to
|
||||
enhance the use of RomWBW. Unfortunately, they have become unusable
|
||||
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.
|
||||
|
||||
* Spencer Owen created the RC2014 series of hobbyist kit computers
|
||||
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.
|
||||
|
||||
* Curt Mayer contributed the original Linux / MacOS build process.
|
||||
|
||||
* UNA BIOS and FDISK80 are the products of John Coffman.
|
||||
|
||||
* FLASH4 is a product of Will Sowerbutts.
|
||||
|
||||
* CLRDIR is a product of Max Scane.
|
||||
|
||||
* Tasty Basic is a product of Dimitri Theulings.
|
||||
|
||||
* Dean Netherton contributed multiple components:
|
||||
- eZ80 CPU support
|
||||
- Sound driver infrastructure
|
||||
- SN76489 sound driver
|
||||
- Native USB driver (keyboard, floppy, mass storage)
|
||||
|
||||
* 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 and Applications documents.
|
||||
|
||||
* Mark Pruden has made a wide variety of contributions including:
|
||||
- significant content in the Disk Catalog and User Guide
|
||||
- creation of the Introduction and Hardware documents
|
||||
- Z3PLUS operating system disk image
|
||||
- Infocom text adventure game disk image
|
||||
- COPYSL, and SLABEL utilities
|
||||
- Display of bootable slices via "S" command during startup
|
||||
- Optimisations of HBIOS and CBIOS to reduce overall code size
|
||||
- a feature for RomWBW configuration by NVRAM
|
||||
- the /B bulk mode of disk assignment to the ASSIGN utility
|
||||
|
||||
* 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
|
||||
|
||||
* Rob Gowin created an online documentation site via MkDocs, and
|
||||
contributed a driver for the Xosera FPGA-based video
|
||||
controller.
|
||||
|
||||
* Jörg Linder has contributed disassembled and nicely commented
|
||||
source for ZSDOS2 and the BPBIOS utilities.
|
||||
|
||||
* Marshall Gates has contriubed sample program source files for all
|
||||
of the language disk images.
|
||||
|
||||
* Randy Merkel provided the ZSDOS Programmer's Manual as translated
|
||||
by Wayne Hortensius.
|
||||
|
||||
* Henk Berends added support for the MSX platform.
|
||||
|
||||
* Jay Cotton provided the SCSI transport code upon which the SCSI
|
||||
driver is based.
|
||||
|
||||
`\clearpage`{=latex}
|
||||
|
||||
## Related Projects
|
||||
|
||||
Outside of the hardware platforms adapted to RomWBW, there are a variety
|
||||
of projects that either target RomWBW specifically or provide
|
||||
a RomWBW-specific variation. These efforts are greatly appreciated
|
||||
and are listed below. Please contact the author if there are any other
|
||||
such projects that are not listed.
|
||||
|
||||
#### Z88DK
|
||||
|
||||
Z88DK is a software powerful development kit for Z80 computers
|
||||
supporting both C and assembly language. This kit now provides
|
||||
specific library support for RomWBW HBIOS. The Z88DK project is
|
||||
hosted at <https://github.com/z88dk/z88dk>.
|
||||
|
||||
#### Paleo Editor
|
||||
|
||||
Steve Garcia has created a Windows-hosted IDE that is tailored to
|
||||
development of RomWBW. The project can be found at
|
||||
<https://github.com/alloidian/PaleoEditor>.
|
||||
|
||||
#### Z80 fig-FORTH
|
||||
|
||||
Dimitri Theulings' implementation of fig-FORTH for the Z80 has a
|
||||
RomWBW-specific variant. The project is hosted at
|
||||
<https://github.com/dimitrit/figforth>.
|
||||
|
||||
#### Assembly Language Programming for the RC2014 Zed
|
||||
|
||||
Bruce Hall has written a very nice document that describes how to
|
||||
develop assembly language applications on RomWBW. It begins with the
|
||||
setup and configuration of a new RC2014 Zed system running RomWBW.
|
||||
It describes not only generic CP/M application development, but also
|
||||
RomWBW HBIOS programming and bare metal programming. The latest copy
|
||||
of this document is hosted at
|
||||
[http://w8bh.net/Assembly for RC2014Z.pdf](http://w8bh.net/Assembly%20for%20RC2014Z.pdf).
|
||||
|
||||
# Licensing
|
||||
|
||||
## License Terms
|
||||
|
||||
RomWBW is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
RomWBW is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with RomWBW. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
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 its intended
|
||||
licensing, please notify:
|
||||
|
||||
> $doc_author$ \
|
||||
> [$doc_authmail$](mailto:$doc_authmail$)
|
||||
|
||||
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 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
|
||||
composed of multiple components with different licenses. It is
|
||||
believed that in all such cases the licenses are compatible with
|
||||
GPL version 3.
|
||||
|
||||
RomWBW encourages code contributions from others. Contributors
|
||||
may assert their own copyright in their contributions by
|
||||
annotating the contributed source code appropriately. Contributors
|
||||
are further encouraged to submit their contributions via the RomWBW
|
||||
source code control system to ensure their contributions are clearly
|
||||
documented.
|
||||
|
||||
All contributions to RomWBW are subject to this license.
|
||||
|
||||
@@ -18,6 +18,10 @@ include $(TOOLS)/Makefile.inc
|
||||
|
||||
all :: deploy
|
||||
|
||||
clean ::
|
||||
rm -rf mkdocs
|
||||
rm -rf site
|
||||
|
||||
%.tmp : %.md
|
||||
gpp -o $@ -U "$$" "$$" "{" "}{" "}$$" "{" "}" "@@@" "" -M "$$" "$$" "{" "}{" "}$$" "{" "}" $<
|
||||
|
||||
@@ -31,11 +35,16 @@ all :: deploy
|
||||
pandoc $< -f markdown -t dokuwiki -s -o $@ --default-image-extension=pdf
|
||||
|
||||
%.gfm : %.tmp
|
||||
pandoc $< -f markdown -t gfm-yaml_metadata_block -s -o $@ --default-image-extension=pdf
|
||||
pandoc $< -f markdown -t gfm-yaml_metadata_block -s -o $@ --default-image-extension=svg
|
||||
|
||||
%.txt : %.tmp
|
||||
pandoc $< -f markdown -t plain -s -o $@ --default-image-extension=pdf
|
||||
|
||||
mkdocs/%.md : %.md
|
||||
-mkdir -p mkdocs
|
||||
gpp -DGFM -U "$$" "$$" "{" "}{" "}$$" "{" "}" "@@@" "" -M "$$" "$$" "{" "}{" "}$$" "{" "}" $< \
|
||||
| pandoc -f markdown -t gfm-yaml_metadata_block -s -o $@ --default-image-extension=svg
|
||||
|
||||
deploy :
|
||||
cp Introduction.gfm "../../ReadMe.md"
|
||||
cp Introduction.txt "../../ReadMe.txt"
|
||||
@@ -45,3 +54,10 @@ deploy :
|
||||
cp Applications.pdf "../../Doc/RomWBW Applications.pdf"
|
||||
cp Catalog.pdf "../../Doc/RomWBW Disk Catalog.pdf"
|
||||
cp Hardware.pdf "../../Doc/RomWBW Hardware.pdf"
|
||||
|
||||
deploy_mkdocs : mkdocs/Introduction.md mkdocs/UserGuide.md mkdocs/SystemGuide.md mkdocs/Applications.md \
|
||||
mkdocs/Catalog.md mkdocs/Hardware.md
|
||||
mkdir -p mkdocs/UserGuide/Graphics mkdocs/SystemGuide/Graphics
|
||||
cp mkdocs/Introduction.md mkdocs/README.md
|
||||
cp Graphics/*.svg mkdocs/UserGuide/Graphics
|
||||
cp Graphics/*.svg mkdocs/SystemGuide/Graphics
|
||||
|
||||
@@ -1,296 +0,0 @@
|
||||
$define{doc_title}{ReadMe}$
|
||||
$include{"Basic.h"}$
|
||||
|
||||
# Overview
|
||||
|
||||
RomWBW software provides a complete, commercial quality
|
||||
implementation of CP/M (and workalike) operating systems and
|
||||
applications for modern Z80/180/280 retro-computing hardware systems.
|
||||
|
||||
A wide variety of platforms are supported including those
|
||||
produced by these developer communities:
|
||||
|
||||
* [RetroBrew Computers](https://www.retrobrewcomputers.org)
|
||||
(<https://www.retrobrewcomputers.org>)
|
||||
* [RC2014](https://rc2014.co.uk) (<https://rc2014.co.uk>), \
|
||||
[RC2014-Z80](https://groups.google.com/g/rc2014-z80)
|
||||
(<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.
|
||||
|
||||
Supported hardware features of RomWBW include:
|
||||
|
||||
* Z80 Family CPUs including Z80, Z180, and Z280
|
||||
* Banked memory services for several banking designs
|
||||
* 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
|
||||
* Real time clock drivers including DS1302, BQ4845
|
||||
* Support for CP/NET networking using Wiznet, MT011 or Serial
|
||||
* Built-in VT-100 terminal emulation support
|
||||
|
||||
RomWBW is distributed as both source code and pre-built ROM and disk
|
||||
images. Some of the provided software can be launched directly from the
|
||||
ROM firmware itself:
|
||||
|
||||
* System Monitor
|
||||
* Operating Systems (CP/M 2.2, ZSDOS)
|
||||
* ROM BASIC (Nascom BASIC and Tasty BASIC)
|
||||
* ROM Forth
|
||||
|
||||
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, 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,
|
||||
with up to 128MB accessible at any one time.
|
||||
|
||||
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 fully tailor the firmware to your specific preferences.
|
||||
All tools required to build custom ROM firmware under Windows are
|
||||
included -- no need to install assemblers, etc. The firmware can also
|
||||
be built using Linux or MacOS after confirming a few standard tools
|
||||
have been installed.
|
||||
|
||||
Multiple disk images are provided in the distribution. Most disk
|
||||
images contain a complete, bootable, ready-to-run implementation of a
|
||||
specific operating system. A "combo" disk image contains multiple
|
||||
slices, each with a full operating system implementation. If you use
|
||||
this disk image, you can easily pick whichever operating system you
|
||||
want to boot without 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/USB Card) and move it between systems transparently.
|
||||
|
||||
A tool is provided that allows you to access a FAT-12/16/32 filesystem.
|
||||
The FAT filesystem may be coresident on the same disk media as RomWBW
|
||||
slices or on stand-alone media. This makes exchanging files with modern
|
||||
OSes such as Windows, MacOS, and Linux very easy.
|
||||
|
||||
# Acquiring RomWBW
|
||||
|
||||
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.
|
||||
|
||||
The asset named RomWBW-vX.X.X-Package.zip 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.
|
||||
|
||||
# Installation & Operation
|
||||
|
||||
In general, installation of RomWBW on your platform is very simple. You
|
||||
just need to program your ROM with the correct ROM image from the RomWBW
|
||||
distribution. Subsequently, you can write disk images on your disk
|
||||
drives (IDE disk, CF Card, SD Card, etc.) which then provides even more
|
||||
functionality.
|
||||
|
||||
Complete instructions for installation and operation of RomWBW are
|
||||
found in the $doc_user$. It is also a good idea to review the
|
||||
[Release Notes](https://github.com/wwarthen/RomWBW/blob/master/RELEASE_NOTES.md)
|
||||
for helpful release-specific information.
|
||||
|
||||
## Documentation
|
||||
|
||||
Documentation for $doc_product$ includes:
|
||||
|
||||
* $doc_intro$
|
||||
* $doc_user$
|
||||
* $doc_sys$
|
||||
* $doc_apps$
|
||||
* $doc_catalog$
|
||||
* $doc_hardware$
|
||||
|
||||
# Acknowledgments
|
||||
|
||||
I want to acknowledge that a great deal of the code and inspiration
|
||||
for RomWBW has been provided by or derived from the work of others
|
||||
in the RetroBrew Computers Community. I sincerely appreciate all of
|
||||
their 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
|
||||
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.
|
||||
|
||||
* Douglas Goodall contributed code, time, testing, and advice in "the
|
||||
early days". He created an entire suite of application programs to
|
||||
enhance the use of RomWBW. Unfortunately, they have become unusable
|
||||
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.
|
||||
|
||||
* Spencer Owen created the RC2014 series of hobbyist kit computers
|
||||
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.
|
||||
|
||||
* Curt Mayer contributed the original Linux / MacOS build process.
|
||||
|
||||
* UNA BIOS and FDISK80 are the products of John Coffman.
|
||||
|
||||
* FLASH4 is a product of Will Sowerbutts.
|
||||
|
||||
* CLRDIR is a product of Max Scane.
|
||||
|
||||
* Tasty Basic is a product of Dimitri Theulings.
|
||||
|
||||
* Dean Netherton contributed eZ80 CPU support, the sound driver
|
||||
interface, and the SN76489 sound driver.
|
||||
|
||||
* 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 and Applications documents.
|
||||
|
||||
* Mark Pruden has made a wide variety of contributions including:
|
||||
- significant content in the Disk Catalog and User Guide
|
||||
- creation of the Introduction and Hardware documents
|
||||
- Z3PLUS operating system disk image
|
||||
- COPYSL and SLABEL utility
|
||||
- a feature for RomWBW configuration by NVRAM
|
||||
- the /B bulk mode of disk assignment to the ASSIGN utility
|
||||
|
||||
* 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
|
||||
|
||||
RomWBW is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
RomWBW is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with RomWBW. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
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 its intended
|
||||
licensing, please notify:
|
||||
|
||||
> $doc_author$ \
|
||||
> [$doc_authmail$](mailto:$doc_authmail$)
|
||||
|
||||
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 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
|
||||
composed of multiple components with different licenses. It is
|
||||
believed that in all such cases the licenses are compatible with
|
||||
GPL version 3.
|
||||
|
||||
RomWBW encourages code contributions from others. Contributors
|
||||
may assert their own copyright in their contributions by
|
||||
annotating the contributed source code appropriately. Contributors
|
||||
are further encouraged to submit their contributions via the RomWBW
|
||||
source code control system to ensure their contributions are clearly
|
||||
documented.
|
||||
|
||||
All contributions to RomWBW are subject to this license.
|
||||
|
||||
# Getting Assistance
|
||||
|
||||
The best way to get assistance with RomWBW or any aspect of the
|
||||
RetroBrew Computers projects is via one of the community forums:
|
||||
|
||||
* [RetroBrew Computers Forum](https://www.retrobrewcomputers.org/forum/)
|
||||
* [RC2014 Google Group](https://groups.google.com/forum/#!forum/rc2014-z80)
|
||||
* [retro-comp Google Group](https://groups.google.com/forum/#!forum/retro-comp)
|
||||
|
||||
Submission of issues and bugs are welcome at the
|
||||
[RomWBW GitHub Repository](https://github.com/wwarthen/RomWBW).
|
||||
|
||||
Also feel free to email $doc_author$ at [$doc_authmail$](mailto:$doc_authmail$).
|
||||
@@ -346,6 +346,14 @@ The memory manager used is determined by the configuration choices
|
||||
that are part of a RomWBW build process. A given ROM can only have a
|
||||
single memory manager -- it is not selected dynamically.
|
||||
|
||||
The configuration variable `MEMMGR` sets the memory mannager used by
|
||||
the ROM build. It must be set to one of the above memory manager
|
||||
types. For example, for the Z2 memory manager, `MEMMGR` should be set
|
||||
to `MM_Z2`.
|
||||
|
||||
Note that the term memory manager (MM) and memory management unit (MMU)
|
||||
are used interchangeably in the documentation and code.
|
||||
|
||||
# Disk Layout
|
||||
|
||||
## Floppy Disk Layout
|
||||
@@ -651,8 +659,10 @@ latter version of the SBC.
|
||||
On systems with RTC devices (that have Non-Volatile RAM), RomWBW supports storing
|
||||
some limited configuration option options inside this RAM.
|
||||
|
||||
Several configuration options are currently supported; these are known as Switches.
|
||||
The following switch ID's are defined, and described in sections below.
|
||||
Several configuration options are currently supported; these are
|
||||
referred to as Switches. In this case the term Switches refers to "soft"
|
||||
switches stored in NVRAM, not physical panel switches. The following
|
||||
switch ID's are defined, and described in sections below.
|
||||
|
||||
| Switch Number | Name | Description |
|
||||
|---------------|--------------|-----------------------------------------------|
|
||||
@@ -675,6 +685,11 @@ the bytes in NVRAM to check for authenticity before using the configuration.
|
||||
The above data is copied into the HBIOS Configuration Block (HCB) at startup at
|
||||
the location starting at CB_SWITCHES.
|
||||
|
||||
Although the switch data is stored in NVRAM, it is intended that you
|
||||
use [SYSGET Subfunction 0xC0 -- Get Switches (SWITCH)] or
|
||||
[SYSSET Subfunction 0xC0 -- Set Switches (SWITCH)] to read or write
|
||||
the switch values described here.
|
||||
|
||||
### Boot Options (NVSW_BOOTOPTS)
|
||||
|
||||
16 bit Switch defining the ROM application or Disk device to boot if
|
||||
@@ -697,13 +712,15 @@ automatic booting is enabled.
|
||||
|
||||
### Status Reset (0xFF)
|
||||
|
||||
The Status Reset switch is not a general purpose switch, it is a control mechanism
|
||||
to allow the global status of all switches to be determined. The meaning of the switch
|
||||
is different for Read (Get Status) and Write (Reset NVRAM)
|
||||
The Status Reset switch is a virtual switch that does not have a
|
||||
corresponding stored value. It is a control mechanism to allow the
|
||||
global status of all switches to be determined. The meaning of the
|
||||
switch is different for Read (Get Status) and Write (Reset NVRAM)
|
||||
|
||||
#### GET (Get Status)
|
||||
|
||||
The read Get Status of switches. This returns very specific values from the function call.
|
||||
When the switch number 0xFF is read (using the Get Switches function),
|
||||
the status of the NVRAM switches will be returned as follows:
|
||||
|
||||
| Status | A Register | Z / NZ Flag |
|
||||
|----------------------------------------------|------------|--------------|
|
||||
@@ -713,8 +730,10 @@ The read Get Status of switches. This returns very specific values from the func
|
||||
|
||||
#### SET (Reset NVRAM)
|
||||
|
||||
Reset NVRAM to default values. This will wipe any existing data and set default
|
||||
values into NVRAM.
|
||||
When the switch number 0xFF is written (using the Set Switches
|
||||
function), the stored values of all switches will be reset to their
|
||||
default values. This will wipe any existing data and set default values
|
||||
into NVRAM.
|
||||
|
||||
# Driver Model
|
||||
|
||||
@@ -1080,6 +1099,9 @@ below enumerates their values.
|
||||
| DIODEV_SYQ | 0x0C | Syquest Sparq Disk | syq.asm |
|
||||
| DIODEV_CHUSB | 0x0D | CH375/376 USB Disk | ch.asm |
|
||||
| DIODEV_CHSD | 0x0E | CH375/376 SD Card | ch.asm |
|
||||
| DIODEV_USB | 0x0F | CH376 Native USB Device | ch376.asm |
|
||||
| DIODEV_ESPSD | 0x10 | S100 ESP32 SD Card | espsd.asm |
|
||||
| DIODEV_SCSI | 0x11 | 5380 SCSI Interface | scsi.asm |
|
||||
|
||||
A fixed set of media types are defined. The currently defined media
|
||||
types identifiers are listed below. Each driver will support one or
|
||||
@@ -1187,8 +1209,8 @@ point, all disk drivers support both LBA and CHS addressing.
|
||||
| E: Sector Count | |
|
||||
| HL: Buffer Address | |
|
||||
|
||||
Read Sector Count (E) sectors into the buffer located in Buffer Bank ID (D)
|
||||
at Buffer Address (HL) starting at the Current Sector. The returned
|
||||
Read Sector Count (E) sectors into the buffer located in Buffer Bank ID
|
||||
(D) at Buffer Address (HL) starting at the Current Sector. The returned
|
||||
Status (A) is a standard HBIOS result code.
|
||||
|
||||
The Current Sector is established by a prior DIOSEEK function call;
|
||||
@@ -1198,18 +1220,21 @@ successfully read. On error, the Current Sector will be the sector where
|
||||
the error occurred. Sectors Read (E) indicates the number of sectors
|
||||
successfully read.
|
||||
|
||||
A Sector Count of zero will result in no sectors being read and a
|
||||
status of success. The buffer will not be modified.
|
||||
|
||||
For buffers in the bottom 32KB ram, the Bank ID is used to identify the
|
||||
bank to use for the buffer. If the buffer is located in your current
|
||||
active bank, you will need to provide the current Bank ID, which can be
|
||||
obtained using [Function 0xF3 -- System Get Bank (SYSGETBNK)]. For
|
||||
buffers in the top 32K of memory the Bank ID is not strictly required as
|
||||
this memory is always mapped to the common bank.
|
||||
|
||||
The caller must ensure that the Buffer Address is large enough to
|
||||
contain all sectors requested. Disk data transfers will be faster if
|
||||
the buffer resides in the top 32K of memory because it avoids a
|
||||
double buffer copy.
|
||||
|
||||
Also for buffers in the top 32K of memory the Bank ID is not
|
||||
strictly required as this memory is alway mapped to the common bank.
|
||||
For buffers in the bottom 32KB ram, the Bank ID is used to identify
|
||||
the bank to use for the buffer. If you do not wih to use banked memory
|
||||
you will need to provide the current Bank ID, which can be obtained
|
||||
using [Function 0xF3 -- System Get Bank (SYSGETBNK)]
|
||||
|
||||
### Function 0x14 -- Disk Write (DIOWRITE)
|
||||
|
||||
| **Entry Parameters** | **Returned Values** |
|
||||
@@ -1220,9 +1245,9 @@ using [Function 0xF3 -- System Get Bank (SYSGETBNK)]
|
||||
| E: Sector Count | |
|
||||
| HL: Buffer Address | |
|
||||
|
||||
Write Sector Count (E) sectors from the buffer located in Buffer Bank ID (D)
|
||||
at Buffer Address (HL) starting at the Current Sector. The returned
|
||||
Status (A) is a standard HBIOS result code.
|
||||
Write Sector Count (E) sectors from the buffer located in Buffer Bank ID
|
||||
(D) at Buffer Address (HL) starting at the Current Sector. The
|
||||
returned Status (A) is a standard HBIOS result code.
|
||||
|
||||
The Current Sector is established by a prior DIOSEEK function call;
|
||||
however, multiple read/write/verify function calls can be made after a
|
||||
@@ -1231,6 +1256,16 @@ successfully written. On error, the Current Sector will be the sector
|
||||
where the error occurred. Sectors Written (E) indicates the number of
|
||||
sectors successfully written.
|
||||
|
||||
A Sector Count of zero will result in no sectors being written and a
|
||||
status of success. The buffer will not be modified.
|
||||
|
||||
For buffers in the bottom 32KB ram, the Bank ID is used to identify the
|
||||
bank to use for the buffer. If the buffer is located in your current
|
||||
active bank, you will need to provide the current Bank ID, which can be
|
||||
obtained using [Function 0xF3 -- System Get Bank (SYSGETBNK)]. For
|
||||
buffers in the top 32K of memory the Bank ID is not strictly required as
|
||||
this memory is always mapped to the common bank.
|
||||
|
||||
Disk data transfers will be faster if the buffer resides in the top 32K
|
||||
of memory because it avoids a double copy.
|
||||
|
||||
@@ -1408,6 +1443,9 @@ unit. The table below enumerates these values.
|
||||
| RTCDEV_DS7 | 0x04 | Maxim DS1307 PCF I2C RTC w/ NVRAM | ds7rtc.asm |
|
||||
| RTCDEV_RP5 | 0x05 | Ricoh RPC01A Real-Time Clock w/ NVRAM | rp5rtc.asm |
|
||||
| RTCDEV_EZ80 | 0x07 | eZ80 on-chip RTC | ez80rtc.asm |
|
||||
| RTCDEV_PC | 0x08 | MC146818/DS1285/DS12885 RTC w/ NVRAM | pcrtc.asm |
|
||||
| RTCDEV_MM | 0x09 | NS MM58167B RTC (no NVRAM) | mmrtc.asm |
|
||||
| RTCDEV_DS12 | 0x0A | DS1288x RTC w/NVRAM | ds12rtc.asm |
|
||||
|
||||
The time functions to get and set the time (RTCGTM and RTCSTM) require a
|
||||
6 byte date/time buffer in the following format. Each byte is BCD
|
||||
@@ -1519,9 +1557,9 @@ Work in progress, documentation required...
|
||||
Returns device information for the RTC unit. The Status (A) is a
|
||||
standard HBIOS result code.
|
||||
|
||||
Device Attribute (C) values are not yet defined. Device Type (D)
|
||||
indicates the specific hardware driver that handles the specified
|
||||
character unit. Values are listed at the start of this section. Device
|
||||
Device Attributes (C) values are not yet defined. Device Type (D)
|
||||
indicates the specific hardware driver that handles the RTC unit.
|
||||
Values are listed at the start of this section. Device
|
||||
Number (E) indicates the physical device number assigned per driver
|
||||
which is always 0 for RTC.
|
||||
|
||||
@@ -1756,14 +1794,17 @@ All video units are assigned a Device Type ID which indicates
|
||||
the specific hardware device driver that handles the unit. The table
|
||||
below enumerates their values.
|
||||
|
||||
| **Device Type** | **ID** | **Description** | **Driver** |
|
||||
|-----------------|-------:|------------------------------------------|------------|
|
||||
| VDADEV_VDU | 0x00 | MC6845 Family Video Display Controller | vdu.asm |
|
||||
| VDADEV_CVDU | 0x01 | MC8563-based Video Display Controller | cvdu.asm |
|
||||
| VDADEV_GDC | 0x02 | uPD7220 Video Display Controller | gdc.asm |
|
||||
| VDADEV_TMS | 0x03 | TMS9918/38/58 Video Display Controller | tms.asm |
|
||||
| VDADEV_VGA | 0x04 | HD6445CP4-based Video Display Controller | vga.asm |
|
||||
| VDADEV_VRC | 0x05 | VGARC | vrc.asm |
|
||||
| **Device Type** | **ID** | **Description** | **Driver** |
|
||||
|-----------------|-------:|--------------------------------------------|------------|
|
||||
| VDADEV_VDU | 0x00 | MC6845 Family Video Display Controller | vdu.asm |
|
||||
| VDADEV_CVDU | 0x01 | MC8563-based Video Display Controller | cvdu.asm |
|
||||
| VDADEV_GDC | 0x02 | uPD7220 Video Display Controller | gdc.asm |
|
||||
| VDADEV_TMS | 0x03 | TMS9918/38/58 Video Display Controller | tms.asm |
|
||||
| VDADEV_VGA | 0x04 | HD6445CP4-based Video Display Controller | vga.asm |
|
||||
| VDADEV_VRC | 0x05 | VGARC | vrc.asm |
|
||||
| VDADEV_EF | 0x06 | EF9345 | ef.asm |
|
||||
| VDADEV_TVGA | 0x07 | S100 TRION FPGA VGA | tvga.asm |
|
||||
| VDADEV_XOSERA | 0x08 | Xosera FPGA-based Video Display Controller | xosera.asm |
|
||||
|
||||
Depending on the capabilities of the hardware, the use of colors and
|
||||
attributes may or may not be supported. If the hardware does not support
|
||||
@@ -2264,16 +2305,16 @@ using values that correspond to musical notes. The frequency will be
|
||||
applied when the next SNDPLAY function is invoked. The returned Status
|
||||
(A) is a standard HBIOS result code.
|
||||
|
||||
The Note (HL) values correspond to quarter notes. Increasing/decreasing
|
||||
the value by 4 results in a full note increment/decrement.
|
||||
The Note (HL) values correspond to eighth tones. Increasing/decreasing
|
||||
the value by 8 results in a full tone increment/decrement.
|
||||
Increasing/decreasing the value by 48 results in a full octave
|
||||
increment/decrement. The value 0 corresponds to Bb/A# in octave 0.
|
||||
|
||||
The sound chip resolution and its oscillator limit the range and
|
||||
accuracy of the notes played. The typical range of the AY-3-8910 is six
|
||||
octaves: Bb2/A#2 to A7, where each value is a unique tone. Values above
|
||||
and below can still be played but each quarter tone step may not result
|
||||
in a note change.
|
||||
and below can still be played but each eighth tone step may not result
|
||||
in a tone change.
|
||||
|
||||
The following table shows the mapping of the Note (HL) value to the
|
||||
corresponding octave and note.
|
||||
@@ -2492,9 +2533,8 @@ If the Unit specified is not a hard disk the Media ID will be returned and
|
||||
the slice parameter ignored. If there is no media in device, or the slice
|
||||
number is invaid (Parameter Out Of Range) the function will return an error status.
|
||||
|
||||
**NOTE:
|
||||
This function was placed in HBIOS to be shared between the diffeent CP/M
|
||||
varients supported by RomWBW. It is not strictly a BIOS function,
|
||||
**NOTE:** This function was placed in HBIOS to be shared between the different CP/M
|
||||
variants supported by RomWBW. It is not strictly a BIOS function,
|
||||
and may be moved in future.
|
||||
|
||||
`\clearpage`{=latex}
|
||||
@@ -2570,14 +2610,14 @@ The hardware Platform (L) is identified as follows:
|
||||
| PLT_MBC | 13 | NHYODYNE MULTI-BOARD COMPUTER |
|
||||
| PLT_RPH | 14 | RHYOPHYRE GRAPHICS SBC |
|
||||
| PLT_Z80RETRO | 15 | Z80 RETRO COMPUTER |
|
||||
| PLT_S100 | 16 | S100 COMPUTERS Z180 |
|
||||
| PLT_SZ180 | 16 | S100 COMPUTERS Z180 |
|
||||
| PLT_DUO | 17 | DUODYNE Z80 SYSTEM |
|
||||
| PLT_HEATH | 18 | HEATHKIT H8 Z80 SYSTEM |
|
||||
| PLT_EPITX | 19 | Z180 MINI-ITX |
|
||||
| PLT_MON | 20 | MONSPUTER (DEPRECATED) |
|
||||
| PLT_GMZ180 | 21 | GENESIS Z180 SYSTEM |
|
||||
| PLT_NABU | 22 | NABU PC W/ ROMWBW OPTION BOARD |
|
||||
| PLT_FZ80 | 23 | S100 FPGA Z80 |
|
||||
| PLT_SZ80 | 23 | S100 COMPUTERS Z80 |
|
||||
| PLT_RCEZ80 | 24 | RCBUS W/ eZ80 |
|
||||
|
||||
For more information on these platforms see $doc_hardware$
|
||||
@@ -3110,6 +3150,9 @@ performed. It includes the Boot Bank ID (L), the Boot Disk Unit (D),
|
||||
and the Boot Disk Slice (E). The returned Status (A) is a standard
|
||||
HBIOS result code.
|
||||
|
||||
This information is recorded in the HCB. HCB_BOOTBID is set to the Boot
|
||||
Bank ID (L) and HCB_BOOTVOL is set to the BootDisk Unit/Slice (DE).
|
||||
|
||||
#### SYSSET Subfunction 0xF3 -- Set CPU Speed (CPUSPD)
|
||||
|
||||
| **Entry Parameters** | **Returned Values** |
|
||||
|
||||
@@ -340,14 +340,16 @@ enter the command followed by ***\<enter\>***.
|
||||
For example, typing `H<enter>` will display a short command summary:
|
||||
|
||||
```
|
||||
Boot [H=Help]: h
|
||||
Boot [H=Help]: H
|
||||
|
||||
L - List ROM Applications
|
||||
D - Device Inventory
|
||||
S - Slice Inventory
|
||||
R - Reboot System
|
||||
W - RomWBW Configure
|
||||
I <u> [<c>] - Set Console Interface/Baud Rate
|
||||
V [<n>] - View/Set HBIOS Diagnostic Verbosity
|
||||
N - Network Boot
|
||||
<u>[.<s>] - Boot Disk Unit/Slice
|
||||
```
|
||||
|
||||
@@ -366,7 +368,6 @@ ROM Applications:
|
||||
B: BASIC
|
||||
T: Tasty BASIC
|
||||
P: Play a Game
|
||||
N: Network Boot
|
||||
X: XModem Flash Updater
|
||||
U: User App
|
||||
```
|
||||
@@ -410,7 +411,6 @@ prompt:
|
||||
| BASIC | Microsoft ROM BASIC |
|
||||
| Tasty BASIC | Dimitri Theuling's Tiny BASIC implementation |
|
||||
| Play | A simple video game (requires ANSI terminal emulation) |
|
||||
| Network Boot | Boot system via Wiznet MT011 device |
|
||||
| Flash Update | Upload and flash a new ROMWBW image using xmodem |
|
||||
| User App | User written application placeholder |
|
||||
|
||||
@@ -992,10 +992,10 @@ whether you boot your OS from ROM or from the disk media itself.
|
||||
|
||||
## Drive Letter Assignment
|
||||
|
||||
In legacy CP/M operating systems only 16 drive letters (A:-P:) available
|
||||
to be assigned to disks Drive letters were generally mapped to disk
|
||||
In CP/M operating systems only 16 drive letters (A:-P:) available
|
||||
to be assigned to disks Drive letters were generally mapped to disk
|
||||
drives in a completely fixed way. For example, drive A: would **always**
|
||||
refer to the first floppy disk drive.
|
||||
refer to the first floppy disk drive.
|
||||
|
||||
RomWBW implements a much more flexible drive letter assignment mechanism
|
||||
so that any drive letter can dynamically be assigned to any disk device,
|
||||
@@ -1117,100 +1117,6 @@ starting the operating system. Even better, you can use an auto-submit
|
||||
batch file to customzie the assignments at startup without any user
|
||||
intervention.
|
||||
|
||||
## Disk Operations/Commands
|
||||
|
||||
With some understanding of how RomWBW presents disk space to the
|
||||
operating systems, we need to go over the options for actually setting
|
||||
up your disk(s) with content.
|
||||
|
||||
### Preparing Media for First Use
|
||||
|
||||
You can initialize the media in-place using your RomWBW system.
|
||||
Essentially, this means you are creating a set of blank directories on
|
||||
your disk so that files can be saved there.
|
||||
This is somewhat analogous to partitioning of a hard disk
|
||||
or doing a low level format of a floppy disk.
|
||||
|
||||
Initilizing a Floppy disk is covered in the section [Floppy Disk Formatting],
|
||||
or for a Hard disk the section [Hard Disk Preparation] covers the steps to
|
||||
manually setup a hard disk for first use.
|
||||
|
||||
### Clearing (Formatting) Drives
|
||||
|
||||
This is somewhat analogous to doing a FORMAT operation on other systems.
|
||||
|
||||
With RomWBW you use the `CLRDIR` command to do this.
|
||||
This command is merely "clearing out" the directory space of the drive
|
||||
referred to by a drive letter and setting up the new empty directory.
|
||||
|
||||
Refer to $doc_apps$ for more information on use of the `CLRDIR` command.
|
||||
|
||||
Since `CLRDIR` works on drive letters, make
|
||||
absolutely sure you know what media and slice are assigned to that
|
||||
drive letter before using `CLRDIR` because `CLRDIR` will wipe out any
|
||||
pre-existing contents of the slice.
|
||||
|
||||
After `CLRDIR` completes, the slice should be ready to use by the operating
|
||||
system via the drive letter assigned.
|
||||
Start by using the `DIR` command on the drive.
|
||||
This should return without error, but list no files.
|
||||
|
||||
Here is an example of using `CLRDIR`. In this example, the `ASSIGN`
|
||||
command is used to show the current drive letter assignments. Then
|
||||
the `CLRDIR` command is used to initialize the directory of drive 'G'
|
||||
which is slice 2 of hard disk device IDE0 ("IDE0:2").
|
||||
|
||||
```
|
||||
B>ASSIGN
|
||||
|
||||
A:=MD0:0
|
||||
B:=MD1:0
|
||||
C:=FD0:0
|
||||
D:=FD1:0
|
||||
E:=IDE0:0
|
||||
F:=IDE0:1
|
||||
G:=IDE0:2
|
||||
H:=IDE0:3
|
||||
|
||||
B>CLDIR G:
|
||||
CLRDIR Version 1.2B May 2024 by Max Scane
|
||||
|
||||
Warning - this utility will overwrite the directory sectors of Drive: G
|
||||
Type CAPITAL Y to proceed, any key other key to exit. Y
|
||||
Directory cleared.
|
||||
B>
|
||||
```
|
||||
|
||||
### Checking Disk Layout
|
||||
|
||||
If you are not sure which disk layout is used for your existing
|
||||
media, you can use the CP/M 2.2 `STAT` command to display information
|
||||
including the number of "32 Byte Directory Entries"
|
||||
for a drive letter on the corresponding hard disk.
|
||||
|
||||
- If it indicates 512, your disk layout is legacy (hd512).
|
||||
- If it indicates 1024, your disk layout is modern (hd1k).
|
||||
|
||||
Here is an example of checking the disk layout.
|
||||
|
||||
```
|
||||
B>STAT E:DSK:
|
||||
|
||||
E: Drive Characteristics
|
||||
65408: 128 Byte Record Capacity
|
||||
8176: Kilobyte Drive Capacity
|
||||
1024: 32 Byte Directory Entries
|
||||
0: Checked Directory Entries
|
||||
256: Records/ Extent
|
||||
32: Records/ Block
|
||||
64: Sectors/ Track
|
||||
2: Reserved Tracks
|
||||
```
|
||||
|
||||
It is critical that you include `DSK:` after the drive letter in the
|
||||
`STAT` command line. The important line to look at is labeled "32 Byte
|
||||
Directory Entries".
|
||||
|
||||
# Disk Types
|
||||
|
||||
## RAM & ROM Disks
|
||||
@@ -1335,14 +1241,14 @@ system.
|
||||
Two hard disk layout schemes exist:
|
||||
|
||||
* Modern (hd1k)
|
||||
* Legacy (hd512)
|
||||
* Classic (hd512)
|
||||
|
||||
You **cannot** mix disk layouts on a single disk device,
|
||||
however It is perfectly fine for one system to have
|
||||
multiple hard disks with different layouts -- each physical disk
|
||||
device is handled separately.
|
||||
|
||||
If you are setting up a new disk, the modern (hd1k) layout is
|
||||
If you are setting up a new disk, the Modern (hd1k) layout is
|
||||
recommended for the following reasons:
|
||||
|
||||
* Larger number of directory entries per filesystem
|
||||
@@ -1350,8 +1256,8 @@ recommended for the following reasons:
|
||||
* Reduces chances of data corruption
|
||||
* Each slice occupies exactly 8MB (an exact power of 2) in size
|
||||
|
||||
Both the legacy and modern disk layouts continue to be fully supported
|
||||
by RomWBW. There are no plans to deprecate the legacy layout.
|
||||
Both the classic and modern disk layouts continue to be fully supported
|
||||
by RomWBW. There are no plans to deprecate the classic layout.
|
||||
|
||||
#### Modern Layout
|
||||
|
||||
@@ -1368,14 +1274,14 @@ RomWBW does not support extended partitions -- only a single
|
||||
primary partition can be used.
|
||||
|
||||
The existence of a partition table entry for RomWBW on
|
||||
a hard disk makes it behave in the modern mode. Removing the RomWBW
|
||||
partition entry from a modern hard disk layout
|
||||
a hard disk makes it behaves in the modern disk layout mode.
|
||||
Removing the RomWBW partition entry from a modern hard disk layout
|
||||
will cause the existing data to be unavailable and/or corrupted
|
||||
|
||||
The CP/M filesystem in the slices of the modern disk layout
|
||||
contain 1024 directory entries.
|
||||
|
||||
#### Legacy Layout
|
||||
#### Classic Layout
|
||||
|
||||
Originally, RomWBW always used the very start of the hard disk media
|
||||
for the location of the slices. In this layout, slice 0 referred to
|
||||
@@ -1384,15 +1290,16 @@ chunk of ~8MB on the disk, and so on. The number of slices is limited
|
||||
to the size of the disk media -- if you attempted to read/write to a
|
||||
slice that would exceed the disk size, you would see I/O errors.
|
||||
|
||||
The legacy format takes steps to allow a partition table to still be
|
||||
The classic disk layout takes steps to allow a partition table to still be
|
||||
used for other types of filesystems such as DOS/FAT. It just does not
|
||||
use a partition table entry to determine the start of the RomWBW slices.
|
||||
|
||||
The lack of a RomWBW partition table entry will cause legacy behaviour.
|
||||
Adding a partition table entry on an existing legacy RomWBW hard disk
|
||||
The lack of a RomWBW partition table entry will cause the classic disk
|
||||
layout to be used.
|
||||
Adding a partition table entry on an existing classic RomWBW hard disk
|
||||
will cause the existing data to be unavailable and/or corrupted.
|
||||
|
||||
The CP/M filesystem in the slices of the legacy disk layout
|
||||
The CP/M filesystem in the slices of the classic disk layout
|
||||
contain 512 directory entries.
|
||||
|
||||
### Hard Disk Slices
|
||||
@@ -1466,9 +1373,9 @@ system.
|
||||
The exact number of CP/M filesystem slices that will fit on your
|
||||
specific physical hard disk can be determined as follows:
|
||||
|
||||
- For modern (hd1k) disk layouts, it is 1024KB + (slices * 8192KB).
|
||||
- For Modern (hd1k) disk layouts, it is 1024KB + (slices * 8192KB).
|
||||
Or equivalent to say 1MB + (slices * 8MB).
|
||||
- For legacy (hd512) disk layouts, it is slices * 8,320KB.
|
||||
- For Classic (hd512) disk layouts, it is slices * 8,320KB.
|
||||
|
||||
**WARNING**: In this document KB means 1024 bytes and MB means 1048576
|
||||
bytes (frequently expressed as KiB and MiB in modern terminology).
|
||||
@@ -1499,7 +1406,9 @@ There are two approaches to preparing disks for use by RomWBW.
|
||||
including files to a disk.
|
||||
|
||||
This section of the document describes the manual process of preparing
|
||||
empty disks that are ready for use by an operating system.
|
||||
empty disks that are ready for use by an operating system.
|
||||
This is somewhat analogous to partitioning and formatting of a hard disk
|
||||
or doing a low level format of a floppy disk.
|
||||
|
||||
Alternatively, you can use the pre-built RomWBW disk images to quickly
|
||||
create disk media that already has a large selection of files and
|
||||
@@ -1611,7 +1520,7 @@ This does not mean to imply it is the only possible way.
|
||||
|
||||
First you need to understand
|
||||
|
||||
* The disk layout approach (either hd1k or the legacy hd512).
|
||||
* The disk layout approach (either the Modern hd1k or the Classic hd512).
|
||||
See [Hard Disk Layouts] section if you are not sure.
|
||||
hd1k should be the preferred layout.
|
||||
* The number of 8MB slices that you want to allocate, preferred is 64 slices.
|
||||
@@ -1640,7 +1549,7 @@ The disk unit number was assigned at boot See [Device Unit Assignments]
|
||||
|
||||
Refer to $doc_apps$ for more information on use of the `FDISK80` utility.
|
||||
|
||||
If you want to use the legacy hd512 layout skip down to the [Legacy (hd512)] section
|
||||
If you want to use the Classic (hd512) layout skip down to the [Classic (hd512)] section
|
||||
|
||||
#### Modern (hd1k)
|
||||
|
||||
@@ -1702,14 +1611,14 @@ At this point, it is best to restart your system to make sure that
|
||||
the operating system is aware of the partition table updates. Start
|
||||
CP/M 2.2 or Z-System from ROM again.
|
||||
|
||||
#### Legacy (hd512)
|
||||
#### Classic (hd512)
|
||||
|
||||
At this point, use the `I` command to initialize (reset)
|
||||
the partition table to an empty state.
|
||||
|
||||
To use the hd512 layout, use `W` to write the empty table to the disk
|
||||
and exit. Remember that the lack of a partition for RomWBW implies the
|
||||
legacy (hd512) layout.
|
||||
Classic (hd512) layout.
|
||||
|
||||
At this point, it is best to restart your system to make sure that
|
||||
the operating system is aware of the partition table updates. Start
|
||||
@@ -1727,12 +1636,7 @@ You need to initialize each slice for CP/M to use it.
|
||||
This is somewhat analogous to doing a FORMAT operation on other systems,
|
||||
and is done using the `CLRDIR` command.
|
||||
|
||||
This is covered in the section [Clearing (Formatting) Drives]
|
||||
|
||||
**WARNING**: Earlier versions of the `CLRDIR` application do not
|
||||
appear to check for disk errors when it runs. If you attempt to run
|
||||
`CLRDIR` on a drive that is mapped to a slice that does not actually fit
|
||||
on the physical disk, it may behave erratically.
|
||||
This is covered in the next section [Clearing (Formatting) Drives]
|
||||
|
||||
Assuming you want to use additional slices, you should initialize them
|
||||
using the same process. You may need to reassign drive letters to
|
||||
@@ -1741,11 +1645,57 @@ You can use the `ASSIGN` command to handle this.
|
||||
|
||||
## Post Disk Preparation
|
||||
|
||||
Once a disk (either floppy or hard disk) has been initialised and
|
||||
formattted you may optionally;
|
||||
Once a disk has been initialised you may need to do one or more of the following;
|
||||
* Clear (Format) the drive
|
||||
* Make the disk bootable
|
||||
* Copy system (or other) files to the disk
|
||||
|
||||
### Clearing (Formatting) Drives
|
||||
|
||||
This is somewhat analogous to doing a FORMAT operation on other systems.
|
||||
|
||||
With RomWBW you use the `CLRDIR` command to do this.
|
||||
This command is merely "clearing out" the directory space of the drive
|
||||
referred to by a drive letter and setting up the new empty directory.
|
||||
|
||||
Refer to $doc_apps$ for more information on use of the `CLRDIR` command.
|
||||
|
||||
Since `CLRDIR` works on drive letters, make
|
||||
absolutely sure you know what media and slice are assigned to that
|
||||
drive letter before using `CLRDIR` because `CLRDIR` will wipe out any
|
||||
pre-existing contents of the slice.
|
||||
|
||||
After `CLRDIR` completes, the drive should be ready to use by the operating
|
||||
system via the drive letter assigned.
|
||||
Start by using the `DIR` command on the drive.
|
||||
This should return without error, but list no files.
|
||||
|
||||
Here is an example of using `CLRDIR`. In this example, the `ASSIGN`
|
||||
command is used to show the current drive letter assignments. Then
|
||||
the `CLRDIR` command is used to initialize the directory of drive 'G'
|
||||
which is slice 2 of hard disk device IDE0 ("IDE0:2").
|
||||
|
||||
```
|
||||
B>ASSIGN
|
||||
|
||||
A:=MD0:0
|
||||
B:=MD1:0
|
||||
C:=FD0:0
|
||||
D:=FD1:0
|
||||
E:=IDE0:0
|
||||
F:=IDE0:1
|
||||
G:=IDE0:2
|
||||
H:=IDE0:3
|
||||
|
||||
B>CLDIR G:
|
||||
CLRDIR Version 1.2B May 2024 by Max Scane
|
||||
|
||||
Warning - this utility will overwrite the directory sectors of Drive: G
|
||||
Type CAPITAL Y to proceed, any key other key to exit. Y
|
||||
Directory cleared.
|
||||
B>
|
||||
```
|
||||
|
||||
### Making a Disk Bootable
|
||||
|
||||
To make a disk bootable you will need to follow the specific instructions
|
||||
@@ -1776,6 +1726,38 @@ system and application files to your disks.
|
||||
Refer to [Transferring Files] for more information on getting
|
||||
files onto your disks.
|
||||
|
||||
### Checking Disk Layout
|
||||
|
||||
If you are not sure which disk layout is used for your existing
|
||||
media, you can use the CP/M 2.2 `STAT` command to display information
|
||||
including the number of "32 Byte Directory Entries"
|
||||
for a drive letter on the corresponding hard disk.
|
||||
|
||||
Note: For CP/M 3 the command is `SHOW [DRIVE]`
|
||||
|
||||
- If it indicates 512, your disk layout is Classic (hd512).
|
||||
- If it indicates 1024, your disk layout is Modern (hd1k).
|
||||
|
||||
Here is an example of checking the disk layout.
|
||||
|
||||
```
|
||||
B>STAT E:DSK:
|
||||
|
||||
E: Drive Characteristics
|
||||
65408: 128 Byte Record Capacity
|
||||
8176: Kilobyte Drive Capacity
|
||||
1024: 32 Byte Directory Entries
|
||||
0: Checked Directory Entries
|
||||
256: Records/ Extent
|
||||
32: Records/ Block
|
||||
64: Sectors/ Track
|
||||
2: Reserved Tracks
|
||||
```
|
||||
|
||||
It is critical that you include `DSK:` after the drive letter in the
|
||||
`STAT` command line. The important line to look at is labeled "32 Byte
|
||||
Directory Entries".
|
||||
|
||||
# Disk Images
|
||||
|
||||
Since it would be quite a bit of work to transfer over all the files you
|
||||
@@ -1806,12 +1788,13 @@ The following table shows the disk images available.
|
||||
| xxx_fortran.img | Microsoft Fortran-80 Compiler | No |
|
||||
| xxx_games.img | Games Disk for CP/M | No |
|
||||
| xxx_hitechc.img | HI-TECH Z80 CP/M C compiler | No |
|
||||
| xxx_infocom.img | Infocom Games Disk | No |
|
||||
| xxx_msxroms1.img | MSX ROMs Disk 1 | No |
|
||||
| xxx_msxroms2.img | MSX ROMs Disk 2 | No |
|
||||
| xxx_nzcom.img | NZCOM ZCPR 3.4 Operating System | Yes |
|
||||
| xxx_qpm.img | QPM Operating System | Yes |
|
||||
| xxx_tpascal.img | Borland Turbo Pascal Compiler | No |
|
||||
| xxx_ws4.img | WordStar v4 & ZDE Applications | No |
|
||||
| xxx_wp.img | WordStar v4 & ZDE Applications | No |
|
||||
| xxx_z80asm.img | Relocating macro assembler for CP/M | No |
|
||||
| xxx_zpm3.img | ZPM3 Operating System | Yes |
|
||||
| xxx_zsdos.img | ZCPR-DJ & ZSDOS 1.1 Operating System | Yes |
|
||||
@@ -1820,8 +1803,8 @@ You will find 3 sets of these .img files in the distribution. The
|
||||
"xxx" portion of the filename will be:
|
||||
|
||||
* "fd_" for a floppy image.
|
||||
* "hd1k_" for a modern layout hard disk image.
|
||||
* "hd512_" for a legacy layout hard disk image.
|
||||
* "hd1k_" for a Modern layout hard disk image.
|
||||
* "hd512_" for a Classic layout hard disk image.
|
||||
|
||||
In the case of xxx_dos65.img, only an hd512 variant is provided. This
|
||||
is a constraint of the DOS65 distribution.
|
||||
@@ -1895,7 +1878,7 @@ These partition sizes and locations were chosen to:
|
||||
The standard partition table table entries are:
|
||||
|
||||
+---------------------------------+-------------------------------+-------------------------------+
|
||||
| | **--- Modern (hd1k) ---** | **--- Legacy (hd512) ---** |
|
||||
| | **--- Modern (hd1k) ---** | **--- Classic (hd512) ---** |
|
||||
| +---------------+---------------+---------------+---------------+
|
||||
| | Byte(s) | Sector(s) | Byte(s) | Sector(s) |
|
||||
+=================================+==============:+==============:+==============:+==============:+
|
||||
@@ -1998,7 +1981,52 @@ that there are more disk (slice) images than the 6 that are included in
|
||||
the Combo Disk Images. These supplemental disk images are identified by
|
||||
looking for the files that start with hd1k_ or hd512_.
|
||||
|
||||
#### Adding Slices to Combo Image
|
||||
There are two approaches you can use to create custom hard disk
|
||||
images with multiple slices.
|
||||
|
||||
- You can add/modify a configuration file and run the RomWBW
|
||||
build process. This requires running the RomWBW build process, but
|
||||
will cause your custom hard disk images to be created with every
|
||||
build.
|
||||
|
||||
- You can manually combine the individual images using `COPY` (Windows)
|
||||
or `cat` (Linux/MacOS). This does not require running the RomWBW
|
||||
build process, but will require manually recreating your custom
|
||||
hard disk images when you upgrade to new releases of RomWBW.
|
||||
|
||||
The following sections provide more detail on each approach.
|
||||
|
||||
#### Building Custom Hard Disk Images
|
||||
|
||||
The RomWBW build process builds the disk images defined in the
|
||||
`Source/Images` directory. The resultant images are placed in the `Binary`
|
||||
directory and are ready to copy to your media.
|
||||
|
||||
These aggregate disk images are defined using .def files. You will see there
|
||||
is a combo.def file in the Images directory that defines the slices for the
|
||||
Combo disk image. You can create your own .def files as desired to
|
||||
automatically create custom aggregate disk images. When the RomWBW
|
||||
build process is run, it will automatically look for all .def files
|
||||
in the `Source/Images` directory and create aggregate disk images for
|
||||
each using the same base name as the .def file.
|
||||
|
||||
There is an example of this in the `Images` directory called
|
||||
`all.def.example`. You can remove the ".example" suffix so that the
|
||||
file is called `all.def`. Now, if you run the RomWBW build process, it
|
||||
will automatically generate `hd512_all.img` and `hd1k_all.img` files in
|
||||
the `/Binary` directory. This example creates an aggregate disk image
|
||||
with all of the possible slices.
|
||||
|
||||
You could also modify the contents of the Combo disk image by simply
|
||||
modifying the `combo.def` configuration file. However, it is recommended
|
||||
that you leave the Combo image alone and simply define your own.
|
||||
|
||||
NOTE: All of the `hd1k_xxx.img` aggregate disk image files created in
|
||||
this way (including the Combo disk image) will already be prefixed with
|
||||
`hd1k_prefix.dat`, so you do not need to add the prefix file. They are
|
||||
ready to write to your media.
|
||||
|
||||
#### Combining Hard Disk Images Manually
|
||||
|
||||
You can add slices to the Combo Disk Images simply by tacking
|
||||
slices onto the end. For example, if you want to add a slice
|
||||
@@ -2017,7 +2045,7 @@ Linus/MaxOS:
|
||||
Note that you **must** be sure to use either the hd1k_ or hd512_
|
||||
prefixed files together. You cannot mix them.
|
||||
|
||||
#### Creating a new Custom Image
|
||||
#### Creating a new Custom Image Manually
|
||||
|
||||
If you want to create a completely custom hard disk image that is not
|
||||
based on the existing combo image, you can generate a disk image entirely
|
||||
@@ -2446,6 +2474,7 @@ via the NZ-COM adaptation (see below).
|
||||
* [ZCPR Manual]($doc_root$/CPM/ZCPR Manual.pdf)
|
||||
* [ZCPR-DJ]($doc_root$/CPM/ZCPR-DJ.doc)
|
||||
* [ZSDOS Manual]($doc_root$/CPM/ZSDOS Manual.pdf)
|
||||
* [ZSDOS Programmer's Manual]($doc_root$/CPM/ZSDOS Programmers Manual.pdf)
|
||||
|
||||
#### Boot Disk
|
||||
|
||||
@@ -2526,6 +2555,7 @@ Manual.pdf" document in order to use this operating system effectively.
|
||||
* [NZCOM Users Manual]($doc_root$/CPM/NZCOM Users Manual.pdf)
|
||||
* [Z-System Users Guide]($doc_root$/CPM/Z-System Users Guide.pdf)
|
||||
* [ZCPR3.3 User Guide]($doc_root$/CPM/ZCPR3.3 User Guide.pdf)
|
||||
* [ZSDOS Programmer's Manual]($doc_root$/CPM/ZSDOS Programmers Manual.pdf)
|
||||
|
||||
#### Boot Disk
|
||||
|
||||
|
||||
16
Source/Doc/mkdocs.yml
Normal file
16
Source/Doc/mkdocs.yml
Normal file
@@ -0,0 +1,16 @@
|
||||
site_name: RomWBW Documentation V3.6
|
||||
repo_url: https://github.com/wwarthen/RomWBW
|
||||
edit_uri: ""
|
||||
docs_dir: mkdocs
|
||||
nav:
|
||||
- Introduction: Introduction.md
|
||||
- User Guide: UserGuide.md
|
||||
- System Guide: SystemGuide.md
|
||||
- Applications: Applications.md
|
||||
- Catalog: Catalog.md
|
||||
- Hardware: Hardware.md
|
||||
theme:
|
||||
name: mkdocs
|
||||
color_mode: auto
|
||||
user_color_mode_toggle: true
|
||||
navigation_depth: 3
|
||||
@@ -3,9 +3,13 @@ setlocal
|
||||
|
||||
set TOOLS=../../Tools
|
||||
|
||||
set PATH=%TOOLS%\srecord;%PATH%
|
||||
set PATH=%TOOLS%\zxcc;%TOOLS%\srecord;%TOOLS%\compress;%PATH%
|
||||
|
||||
for %%f in (..\..\Binary\RCZ80_ez512_*.rom) do call :build %%~nf
|
||||
set CPMDIR80=%TOOLS%/cpm/
|
||||
|
||||
zxcc z80asm -decomp/HL
|
||||
|
||||
for %%f in (..\..\Binary\RCZ80_ez512_*.upd) do call :build %%~nf
|
||||
|
||||
goto :eof
|
||||
|
||||
@@ -21,6 +25,17 @@ srec_cat temp.dat -binary -exclude 0x1F000 0x20000 ez512_mon.bin -binary -offset
|
||||
srec_cat temp.dat -binary -exclude 0x24000 0xA4000 ..\..\Binary\%1.rom -binary -offset 0x24000 -o temp.dat -binary
|
||||
move temp.dat ..\..\Binary\%1_hd1k_prefix.dat
|
||||
|
||||
copy /b ..\..\Binary\%1_hd1k_prefix.dat + ..\..\Binary\hd1k_cpm22.img + ..\..\Binary\hd1k_zsdos.img + ..\..\Binary\hd1k_nzcom.img + ..\..\Binary\hd1k_cpm3.img + ..\..\Binary\hd1k_zpm3.img + ..\..\Binary\hd1k_ws4.img ..\..\Binary\%1_hd1k_combo.img || exit /b
|
||||
copy /b ..\..\Binary\%1_hd1k_prefix.dat + ..\..\Binary\hd1k_cpm22.img + ..\..\Binary\hd1k_zsdos.img + ..\..\Binary\hd1k_nzcom.img + ..\..\Binary\hd1k_cpm3.img + ..\..\Binary\hd1k_zpm3.img + ..\..\Binary\hd1k_wp.img ..\..\Binary\%1_hd1k_combo.img || exit /b
|
||||
|
||||
::
|
||||
:: The following lines produce a 64K ROM that can be used in the EaZy80-512.
|
||||
:: In order to fit in the required 64K, TastyBASIC and the Game components
|
||||
:: are removed from the ROM. If the layout of the ROM components
|
||||
:: changes (see ..\Source\layout.inc), the address range that is carved
|
||||
:: out below may need to be adjusted.
|
||||
::
|
||||
srec_cat ..\..\Binary\%1.upd -binary -exclude 0x13700 0x14A00 -fill 0xC9 0x13700 0x14A00 -o temp.upd -binary
|
||||
compress temp.upd
|
||||
srec_cat decomp.hex -intel temp.upd.cmp -binary -offset 3 -o ..\..\Binary\%1_64k.rom -binary
|
||||
|
||||
goto :eof
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
@echo off
|
||||
setlocal
|
||||
|
||||
if exist *.upd del *.upd
|
||||
if exist *.cmp del *.cmp
|
||||
if exist *.hex del *.hex
|
||||
if exist *.lst del *.lst
|
||||
|
||||
@@ -1,13 +1,15 @@
|
||||
DEST=../../Binary
|
||||
OTHERS=*.hex *.upd *.cmp
|
||||
|
||||
HD1KIMGS = $(DEST)/hd1k_cpm22.img $(DEST)/hd1k_zsdos.img $(DEST)/hd1k_nzcom.img \
|
||||
$(DEST)/hd1k_cpm3.img $(DEST)/hd1k_zpm3.img $(DEST)/hd1k_ws4.img
|
||||
$(DEST)/hd1k_cpm3.img $(DEST)/hd1k_zpm3.img $(DEST)/hd1k_wp.img
|
||||
|
||||
ROMS := $(wildcard $(DEST)/RCZ80_ez512_*.rom)
|
||||
ROMS := $(patsubst $(DEST)/%.rom,%,$(ROMS))
|
||||
ROMS := $(wildcard $(DEST)/RCZ80_ez512_*.upd)
|
||||
ROMS := $(patsubst $(DEST)/%.upd,%,$(ROMS))
|
||||
|
||||
OBJECTS := $(patsubst %,%_hd1k_prefix.dat,$(ROMS))
|
||||
OBJECTS += $(patsubst %,%_hd1k_combo.img,$(ROMS))
|
||||
OBJECTS += $(patsubst %,%_64k.rom,$(ROMS))
|
||||
|
||||
TOOLS = ../../Tools
|
||||
|
||||
@@ -25,3 +27,14 @@ DIFFPATH = $(DIFFTO)/Binary
|
||||
|
||||
%_hd1k_combo.img: %_hd1k_prefix.dat $(HD1KIMGS)
|
||||
cat $^ > $@
|
||||
|
||||
# The following recipe produces a 64K ROM that can be used in the EaZy80-512.
|
||||
# In order to fit in the required 64K, TastyBASIC and the Game components
|
||||
# are removed from the ROM. If the layout of the ROM components
|
||||
# changes (see ..\Source\layout.inc), the address range that is carved
|
||||
# out below may need to be adjusted.
|
||||
|
||||
%_64k.rom: $(DEST)/%.upd decomp.hex
|
||||
srec_cat $< -binary -exclude 0x13700 0x14A00 -fill 0xC9 0x13700 0x14A00 -o temp.upd -binary
|
||||
$(COMPRESS) temp.upd
|
||||
srec_cat decomp.hex -intel temp.upd.cmp -binary -offset 3 -o $@ -binary
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user