Compare commits

...

860 Commits

Author SHA1 Message Date
Wayne Warthen
fb0dde5ef8 Update Generated Doc Files 2020-03-27 15:51:09 -07:00
Wayne Warthen
0451620de9 Merge pull request #108 from feilipu/master
ReadMe.md
2020-03-27 15:40:38 -07:00
Phillip Stevens
ef7bdc4b29 Update ReadMe.md 2020-03-28 09:30:20 +11:00
Phillip Stevens
f0ac9973d0 Update ReadMe.txt 2020-03-28 09:28:32 +11:00
Phillip Stevens
34fc468265 update ReadMe.md
Remove some odd `\`.
2020-03-28 09:21:33 +11:00
Phillip Stevens
0046ba9a2c Merge pull request #24 from wwarthen/master
update to master
2020-03-28 09:19:08 +11:00
Wayne Warthen
c37a97308e Update SD Card How-To
Thanks David!
2020-03-27 14:46:27 -07:00
Wayne Warthen
81390b846c Bump to Version 3.0 2020-03-27 10:38:38 -07:00
Wayne Warthen
c24dbb2b98 Merge pull request #107 from feilipu/master
config - doc / comment language consistency
2020-03-26 16:54:19 -07:00
Phillip Stevens
6726f1be88 cfg - mutex consistent config language 2020-03-27 10:04:25 +11:00
Phillip Stevens
be5a148d88 Merge pull request #23 from wwarthen/master
update to master
2020-03-27 09:52:31 +11:00
Wayne Warthen
e15546e051 Pre-release for Testing 2020-03-26 15:34:34 -07:00
Wayne Warthen
47774eacab Config File Tuning 2020-03-26 15:32:26 -07:00
Wayne Warthen
6092737c9c ZDE Upgrade
- Upgraded ZDE 1.6 -> 1.6a
2020-03-26 13:39:05 -07:00
Wayne Warthen
f2fb76341e Minor Changes
- Slight change to ZAP configuration
- Added ZSDOS.ZRL to NZCOM image
2020-03-26 10:28:09 -07:00
Phillip Stevens
cb37a34c8b Merge pull request #22 from wwarthen/master
update to master
2020-03-26 14:40:21 +11:00
Wayne Warthen
60c3ff8a41 Cleanup
- Fix SuperZAP to work under NZCOM and ZPM3
- Finalize standard config files
2020-03-25 19:54:55 -07:00
Wayne Warthen
0f37e64f35 Cleanup 2020-03-24 17:46:26 -07:00
Wayne Warthen
5244ea9e79 FD Motor Timeout
- Made FDC motor timeout smaller and more consistent across different speed CPUs
- Added "boot" messaging to RTC
2020-03-24 12:48:48 -07:00
Wayne Warthen
f11962ef8e Bug Fixes
- Init RAM disk at boot under CP/M 3
- Fix ACR activation in TUNE
2020-03-23 19:54:17 -07:00
Wayne Warthen
4862827058 Remove OSLDR
The OSLDR application was badly broken and almost impossible to fix with new expanded OS support.
2020-03-23 11:41:59 -07:00
Wayne Warthen
2150b04349 Documentation Cleanup 2020-03-22 16:24:37 -07:00
Phillip Stevens
001bbaaeec Merge pull request #21 from wwarthen/master
update to master
2020-03-23 09:54:56 +11:00
Wayne Warthen
04d5fcd9a4 Documentation Updates 2020-03-22 14:44:24 -07:00
Wayne Warthen
cc8d62969f Fix IM 0 Build Error in ACIA 2020-03-22 09:03:15 -07:00
Wayne Warthen
ee4855cd14 Documentation Cleanup 2020-03-22 08:40:06 -07:00
Wayne Warthen
ea600edcd2 Merge pull request #106 from feilipu/master
docs - a few updates
2020-03-22 07:40:44 -07:00
Phillip Stevens
1a60676f44 doc - a few random fixes 2020-03-22 15:01:07 +11:00
Phillip Stevens
5943b0c5e5 Merge pull request #20 from wwarthen/master
Documentation Updates
2020-03-22 14:01:11 +11:00
Wayne Warthen
77caac761f Documentation Updates 2020-03-21 17:59:45 -07:00
Phillip Stevens
df29795904 Merge pull request #19 from wwarthen/master
update to master
2020-03-21 20:49:22 +11:00
Wayne Warthen
5264f2f4d2 Documentation Updates 2020-03-20 10:44:53 -07:00
Wayne Warthen
cae65413ee Create Common.inc 2020-03-18 16:38:48 -07:00
Wayne Warthen
9a19ae21aa Documentation Updates 2020-03-18 15:31:37 -07:00
Wayne Warthen
a86411682b Documentation Updates 2020-03-18 11:41:51 -07:00
Wayne Warthen
77fd7f0e5d Documentation Update 2020-03-17 19:55:43 -07:00
Wayne Warthen
ac12f7fe1a Documentation Update 2020-03-17 12:03:16 -07:00
Wayne Warthen
508e766ea5 Documentation Cleanup 2020-03-16 19:27:09 -07:00
Wayne Warthen
3a10e437c8 Update util.z80 2020-03-15 14:07:19 -07:00
Wayne Warthen
a8d2f3bd39 Minor Bug Fixes
- Disk assignment edge case
- CP/M 3 accidental fall thru
- Cosmetic updates
2020-03-15 13:45:32 -07:00
Wayne Warthen
d1abba5378 Fix CONSOLE Constant
Rename CIODEV_CONSOLE constant to CIO_CONSOLE because it is a unit code, not a device type code.

Retabify TastyBasic.
2020-03-15 09:44:15 -07:00
Wayne Warthen
242a1ce108 Update vdu.asm
Removed a hack in VDU driver that has existed for 8 years.  :-)
2020-03-15 09:09:59 -07:00
Wayne Warthen
09c673fbd0 Update RomWBW Architecture
General refresh for v2.9.2
2020-03-14 21:44:51 -07:00
Wayne Warthen
bbd1ce6168 Config File Cleanups 2020-03-14 14:37:18 -07:00
Wayne Warthen
1bdf833e2c Build Script Cleanups 2020-03-14 12:06:56 -07:00
Wayne Warthen
daf0430c6f Prerelease 36
General cleanup
2020-03-14 10:50:34 -07:00
Wayne Warthen
06b685df21 GitHub CI Updates
Adds automation of build and release assets upon release.
2020-03-14 10:34:13 -07:00
Wayne Warthen
dfd70b8d63 Cleanup
Removed hack from Images Makefile.  Fixed use of DEFSERCFG in various places.
2020-03-13 10:45:33 -07:00
Phillip Stevens
b379b94f97 Merge pull request #18 from wwarthen/master
update to master
2020-03-13 11:56:10 +11:00
Wayne Warthen
00d204be75 Update Makefile
Remove ROM variants that just have the HBIOS MUTEX enabled.  Users can easily enable this in a custom build.
2020-03-12 17:24:59 -07:00
Wayne Warthen
3526355842 Merge pull request #104 from feilipu/master
hbios - remove mutex special files
2020-03-12 17:14:15 -07:00
Wayne Warthen
76510fee5c Create FAT.com
Completing change of case in extension of FAT.com.
2020-03-12 17:12:45 -07:00
Wayne Warthen
7daf65c01c Delete FAT.COM
Changing case of FAT.COM extension to lowercase.
2020-03-12 17:11:45 -07:00
Wayne Warthen
f036deef33 Misc. Cleanup
Includes some minor improvements to contents in some disk images.
2020-03-12 17:10:11 -07:00
Phillip Stevens
6f0940e4b5 HBIOS SCZ180 - adjust mutex comment 2020-03-13 09:22:32 +11:00
Phillip Stevens
97c533c7c5 HBIOS SCZ180 - remove mutex special files 2020-03-13 08:56:20 +11:00
Phillip Stevens
fdad9afc05 Merge pull request #17 from wwarthen/master
update to master
2020-03-13 08:44:49 +11:00
Wayne Warthen
db81d1a28b Add SC131 Support
Also cleaned up some ReadMe files.
2020-03-12 11:40:11 -07:00
Wayne Warthen
eb250cc178 Merge pull request #103 from b1ackmai1er/master
Nascom BASIC update
2020-03-09 20:14:22 -07:00
b1ackmai1er
d98ce895f8 Update nascom.asm
Fixup top screen line not showing
2020-03-08 22:50:02 +08:00
b1ackmai1er
b91871114a Update nascom.asm
Make CLS clear vdu screen
2020-03-08 20:48:56 +08:00
b1ackmai1er
aeb4bc6245 Update nascom.asm
Set default build. update initialization
2020-03-08 16:48:28 +08:00
b1ackmai1er
6b47216266 Merge branch 'master' of https://github.com/b1ackmai1er/RomWBW 2020-03-08 15:36:30 +08:00
b1ackmai1er
c7dbee6375 Update nascom.asm
Setup ECB-VDU build option, remove debug code
2020-03-08 15:35:58 +08:00
b1ackmai1er
de6069b7d0 Merge pull request #100 from wwarthen/master
Resync
2020-03-08 10:03:31 +08:00
Wayne Warthen
f9727ec384 Merge pull request #102 from feilipu/master
hbios - tmp stack tweak
2020-03-07 10:23:30 -08:00
b1ackmai1er
b939f9d4a3 Update nascom.asm
Optimization
2020-03-08 01:27:00 +08:00
Phillip Stevens
b59dc1cc14 Update hbios.asm
Comments on HBX_BUF usage.
2020-03-08 01:23:53 +11:00
Phillip Stevens
3fee1c5d20 hbios - temp stack tweak 2020-03-07 23:44:54 +11:00
Phillip Stevens
606fac6fa5 Merge pull request #16 from wwarthen/master
update to master
2020-03-07 23:24:59 +11:00
b1ackmai1er
8058a3c3e0 Update nascom.asm
Optimization
2020-03-07 13:49:53 +08:00
b1ackmai1er
b3731be4b1 Merge branch 'master' of https://github.com/b1ackmai1er/RomWBW 2020-03-07 10:40:27 +08:00
b1ackmai1er
52af91e066 Update nascom.asm
Cleanup
2020-03-07 10:40:16 +08:00
b1ackmai1er
280511b990 Merge pull request #99 from wwarthen/master
Resync
2020-03-07 09:46:17 +08:00
Wayne Warthen
83db582b92 Build Fixes 2020-03-06 17:21:48 -08:00
Wayne Warthen
490c865ea1 Build Test 2020-03-06 16:56:27 -08:00
Wayne Warthen
9fe5004756 Build Test 2020-03-06 16:40:47 -08:00
Wayne Warthen
86765620d7 Update Makefile 2020-03-06 15:55:30 -08:00
Wayne Warthen
02c051f47c Update Makefile 2020-03-06 14:56:48 -08:00
Wayne Warthen
2c2df76f15 Clean up
Make version include files common.
2020-03-06 14:23:55 -08:00
Wayne Warthen
1f6ef60599 IDE & PPIDE Cleanup 2020-03-06 11:36:17 -08:00
b1ackmai1er
85bc2c8792 Update nascom.asm
Optimization, cleanup, tabs and white spaces
2020-03-06 19:23:16 +08:00
b1ackmai1er
1131480f44 Merge pull request #98 from wwarthen/master
Finalize Pre-release 34
2020-03-06 13:52:23 +08:00
Phillip Stevens
b92352c480 Merge pull request #15 from wwarthen/master
Finalize Pre-release 34
2020-03-06 15:26:02 +11:00
Wayne Warthen
1831141abd Finalize Pre-release 34
Final support for FreeRTOS
2020-03-05 12:54:22 -08:00
b1ackmai1er
332831a8cc Initial Nascom basic ecb-vdu graphics
set and reset for 80x25b screen with 256 character mod
2020-03-05 21:53:22 +08:00
b1ackmai1er
0fc1ec5c93 Merge pull request #97 from wwarthen/master
Resync
2020-03-05 19:50:50 +08:00
Phillip Stevens
7c2fcf6e2a Merge pull request #14 from wwarthen/master
update to master
2020-03-05 14:45:50 +11:00
Wayne Warthen
8e99303e2f Add HBIOS MuTex 2020-03-04 16:42:06 -08:00
Wayne Warthen
a8357047b2 Update hbios.asm
Adjusted used of DI/EI for PEEK and POKE to regain a bit of INTSTK space.  Added code so that HB_INVBNK can be used as a flag indicating if HBIOS is active, $FF is inactive, anything else means active.
2020-03-04 13:00:35 -08:00
Wayne Warthen
995bb335b8 Merge pull request #100 from feilipu/master
hbios - wrap hbx_bnkcpy hbx_peek hbx_poke in di/ei
2020-03-04 11:13:29 -08:00
Phillip Stevens
f8d0fda179 hbios - adjust hbx_peek hbx_poke guards 2020-03-04 21:18:48 +11:00
b1ackmai1er
b801d793e6 Merge pull request #96 from wwarthen/master
Resync
2020-03-04 16:48:13 +08:00
Phillip Stevens
b45e531127 hbios - wrap hbx_bnkcpy 2020-03-04 18:33:19 +11:00
Phillip Stevens
7cef05148f Merge pull request #13 from wwarthen/master
update to master
2020-03-04 17:40:58 +11:00
Wayne Warthen
a207ede5be Update hbios.asm
Add improved interrupt protection to HBIOS PEEK, POKE, and BNKCPY functions.
2020-03-03 20:40:46 -08:00
Wayne Warthen
a40e7961a1 Build Process Updates
Minor udpates to build process to improve consistency between Windows and Mac/Linux builds.
2020-03-03 16:07:35 -08:00
Wayne Warthen
8b7c9e10c3 Update hbios.asm
Minor cosmetic changes.
2020-03-03 12:45:16 -08:00
Wayne Warthen
d1b96c340f Merge pull request #99 from feilipu/master
hbios - tidy TMPSTK
2020-03-03 10:59:18 -08:00
b1ackmai1er
cf4baa1270 Merge pull request #95 from wwarthen/master
Resync
2020-03-03 17:17:59 +08:00
Phillip Stevens
4eeba4e48b HBIOS - clean up TMPSTK 2020-03-03 18:53:59 +11:00
Wayne Warthen
f5c32423bc Update ReadMe.txt 2020-03-02 20:44:44 -08:00
Phillip Stevens
e7f9116c30 Merge pull request #12 from wwarthen/master
HBIOS Proxy Temp Stack Enhancement
2020-03-03 11:14:43 +11:00
Wayne Warthen
7c60884847 HBIOS Proxy Temp Stack Enhancement
Reuse the bounce buffer area as the temporary stack space required briefly in HBX_INVOKE when transitioning banks.  Increases size of temporary stack space to 64 bytes.
2020-03-02 15:01:25 -08:00
b1ackmai1er
d4f9ffbc6b Merge pull request #94 from wwarthen/master
Resync
2020-03-02 10:29:39 +08:00
Phillip Stevens
fbcaeeb6a2 Merge pull request #11 from wwarthen/master
update to master
2020-03-02 13:08:52 +11:00
Wayne Warthen
41ecdeccd0 cpmtools Update
Updated cpmtools applications (Windows only).  Removed hack in diskdefs that is no longer required.
2020-03-01 13:25:38 -08:00
Wayne Warthen
fb136ba200 Merge pull request #95 from electrified/modify-ignore
Make .gitignores for Tools/unix more specific
2020-03-01 13:06:30 -08:00
ed
81756bfb05 Make .gitignores for Tools/unix more specific 2020-03-01 11:21:14 +00:00
b1ackmai1er
31372884ea Merge pull request #93 from wwarthen/master
Update Build.sh
2020-03-01 16:48:08 +08:00
Wayne Warthen
b574faed39 Update Build.sh 2020-02-29 22:36:10 -08:00
b1ackmai1er
fdbb6752f9 Merge pull request #92 from wwarthen/master
Update Makefile
2020-03-01 14:20:14 +08:00
Wayne Warthen
462fe228aa Update Makefile 2020-02-29 21:00:32 -08:00
b1ackmai1er
462ceffeb7 Merge pull request #91 from wwarthen/master
Resync
2020-03-01 13:00:24 +08:00
Wayne Warthen
2bce5224f6 Create ReadMe.txt 2020-02-29 20:47:44 -08:00
Wayne Warthen
f888cc94ba Merge pull request #94 from vipoo/dean/linux-tweaks
Dean/linux tweaks
2020-02-29 20:36:57 -08:00
Wayne Warthen
51a1c6eb5b Merge pull request #93 from b1ackmai1er/master
Nascom manual update
2020-02-29 19:59:31 -08:00
Dean Netherton
a85f962a47 Fix issue with Apps/Tune not making
If dest directory does not exist, fails to make Apps
2020-03-01 14:07:51 +11:00
b1ackmai1er
052475d492 Update Microsoft NASCOM BASIC.docx
Nascom manual, text version by Jan S (full name unknown)
2020-03-01 10:23:24 +08:00
Dean Netherton
d211f0977d Fix to HBIOS/build.sh
When adding files to rom disk, if files were missing, it would error out.

It appears the intent is to skip non-existing files.

Updated to log out correctly for missing files - and continue operation.
2020-03-01 12:48:49 +11:00
Dean Netherton
81c4913c72 Build.sh: marked as executable
chmod +x Build.sh
2020-03-01 12:48:40 +11:00
Dean Netherton
462f786c18 Removed Tunes/clean.cmd and Tunes/ReadMe.txt - as make clean removes them 2020-03-01 12:45:05 +11:00
Dean Netherton
82a6e66269 Added an gitignore files to exclude generated files 2020-03-01 12:44:52 +11:00
b1ackmai1er
136a8365b1 Merge pull request #90 from wwarthen/master
Update for GitHub Build
2020-03-01 08:52:33 +08:00
Wayne Warthen
edca77176f Update for GitHub Build
Case issue in TASM includes showing up in GitHub build.  This should correct that.
2020-02-29 10:26:39 -08:00
b1ackmai1er
aba91a61a0 Merge pull request #89 from wwarthen/master
Resync
2020-02-29 16:02:07 +08:00
Wayne Warthen
3ac12fba98 Update Makefile 2020-02-28 22:01:39 -08:00
Wayne Warthen
4790b02168 Update Makefile 2020-02-28 21:42:32 -08:00
Wayne Warthen
efde97c169 Update Makefile 2020-02-28 21:35:02 -08:00
b1ackmai1er
8485115118 Merge pull request #88 from wwarthen/master
Resync
2020-02-29 13:31:15 +08:00
Wayne Warthen
2f21caca71 Update Makefile 2020-02-28 21:20:54 -08:00
Wayne Warthen
29457ea214 Update Makefile 2020-02-28 21:08:35 -08:00
Wayne Warthen
fd5a035453 Update Makefile 2020-02-28 20:55:58 -08:00
Wayne Warthen
d3d7225a79 Update Makefile 2020-02-28 20:45:22 -08:00
Wayne Warthen
d427fee7ee Update Makefile 2020-02-28 20:27:40 -08:00
Wayne Warthen
eebed062ad Update Makefile 2020-02-28 20:22:12 -08:00
Wayne Warthen
1b5420c33b Merge branch 'master' of https://github.com/wwarthen/RomWBW 2020-02-28 19:48:03 -08:00
Wayne Warthen
158658c3fc Update Makefile
Build all ROM variants by default in Linux/Mac build.
2020-02-28 19:47:33 -08:00
Wayne Warthen
def32eda19 Update build.yml
Added "make clean" which will remove temporary files without removing final binary outputs.
2020-02-28 19:34:37 -08:00
b1ackmai1er
41989e1151 Merge pull request #87 from wwarthen/master
Resync
2020-02-29 10:19:46 +08:00
Wayne Warthen
39a6474820 Merge branch 'master' of https://github.com/wwarthen/RomWBW 2020-02-28 16:02:16 -08:00
Wayne Warthen
ef1c610c58 Bump Pre-release Version 2020-02-28 16:02:13 -08:00
Wayne Warthen
07dd8eba32 Merge pull request #90 from electrified/master
Add github action for building RomWBW
2020-02-28 15:58:16 -08:00
ed
b60a3f95b8 Add github action for building RomWBW 2020-02-28 23:49:28 +00:00
Wayne Warthen
4cc218a450 UNA Catchup
UNA support was lacking some of the more recent behavior changes.  This corrects most of it.
2020-02-28 15:26:13 -08:00
b1ackmai1er
8f9e7f3990 Merge pull request #86 from wwarthen/master
Resync
2020-02-28 13:24:08 +08:00
Wayne Warthen
5f07834b47 Misc. Cleanup 2020-02-27 18:40:20 -08:00
Wayne Warthen
0fb8a2d2ff Update sd.asm
Back out hack for uz80as now that Curt fixed it.
2020-02-27 14:45:58 -08:00
Wayne Warthen
59d6099865 Update Makefile
Makefile enhancement to better handle ncurses library from Bob Dunlop.
2020-02-27 14:03:44 -08:00
b1ackmai1er
8ba8a3b43a Merge pull request #85 from wwarthen/master
Resync
2020-02-27 16:35:37 +08:00
Wayne Warthen
e0522bce3f Merge pull request #88 from cm68/master
uz80as expression parser fix for .db ~(1|2) != 0xfe
2020-02-26 16:32:13 -08:00
curt mayer
f8c4ee1183 added diff build option 2020-02-26 15:42:16 -08:00
curt mayer
fcc736bd45 fixed expression parser bug : ~(1|2) returned 0xfe 2020-02-26 15:05:26 -08:00
b1ackmai1er
56e75fc46e Merge pull request #84 from wwarthen/master
Misc. Cleanup
2020-02-26 16:34:36 +08:00
Wayne Warthen
b951a844ca Misc. Cleanup 2020-02-25 15:04:04 -08:00
b1ackmai1er
e6e0bb5287 Merge pull request #83 from wwarthen/master
Upgrade NZCOM to latest
2020-02-25 16:32:25 +08:00
Wayne Warthen
4add4bc237 Upgrade NZCOM to latest 2020-02-24 17:13:07 -08:00
b1ackmai1er
dc49632ddc Merge pull request #82 from wwarthen/master
Resync
2020-02-24 16:31:12 +08:00
Wayne Warthen
62fd42edc6 Merge pull request #86 from cm68/master
bit-identical with windows
2020-02-23 20:29:07 -08:00
curt mayer
621083947c clean, identical build. font source generator emitted .align. this does not match the windows build 2020-02-23 17:46:37 -08:00
curt mayer
9bc1af2f0f Merge remote-tracking branch 'upstream/master' 2020-02-23 15:07:55 -08:00
curt mayer
e73e0ba5f1 diff fixes 2020-02-23 15:04:52 -08:00
Wayne Warthen
c9571fb3ed Merge pull request #85 from cm68/master
fixes for blackmailer issue and hd64180
2020-02-23 12:52:16 -08:00
curt mayer
1db0b09378 added support for binary diff 2020-02-23 09:14:21 -08:00
curt mayer
4f824a04a8 added SBC_std.rom to default build 2020-02-22 22:49:27 -08:00
curt mayer
6ec8ca174f added N8 capability 2020-02-22 22:36:42 -08:00
curt mayer
1d5c5b39a5 default to hd64180 2020-02-22 22:35:29 -08:00
curt mayer
f6954a33a6 added align and 0x55 hex syntax 2020-02-22 22:34:42 -08:00
curt mayer
263de80c6c added code to handle multiple platform rom builds with rom size override 2020-02-22 21:47:02 -08:00
curt mayer
93bfdbc45d added clobber 2020-02-22 21:30:18 -08:00
curt mayer
27d8fb3ac1 removed strip. breaks on osx 2020-02-22 21:26:56 -08:00
curt mayer
32e34cb656 added lzsa 2020-02-22 21:25:35 -08:00
curt mayer
9799120899 added lzsa 2020-02-22 21:25:21 -08:00
curt mayer
6a1781b9ed diff soft failure and casefn speedup 2020-02-22 21:02:18 -08:00
curt mayer
68a9dea630 prerequisite verbosity 2020-02-22 21:01:25 -08:00
curt mayer
1bc9a0bcc3 install to ../HBIOS 2020-02-22 20:58:03 -08:00
curt mayer
915cc50228 this file is copied from optdsk.lib or optcmd.lib 2020-02-22 20:56:08 -08:00
curt mayer
5fe4a5db4c fixed build 2020-02-22 20:37:53 -08:00
curt mayer
dad5a2e004 added real cache validation 2020-02-22 19:58:59 -08:00
curt mayer
c28e80e836 added directory tag so . isn't matched all over the place 2020-02-22 19:23:46 -08:00
curt mayer
39822a9864 removed strip. breaks osx 2020-02-22 19:08:00 -08:00
curt mayer
3eebb5438b added directory mapping cache. if the same directory is being hit
as last run, we don't need to rebuild the map.  will likely break if
you are running more than one at a time, in that the cache will be
ineffective.  also, if the directory contents change, this will also break.
2020-02-22 19:04:00 -08:00
curt mayer
7707ea860d build fonts 2020-02-22 18:07:00 -08:00
curt mayer
52a692030e added rule for font source generation 2020-02-22 18:05:03 -08:00
b1ackmai1er
b662ee1aa2 Revert linux bin2asm font stuff 2020-02-23 09:55:46 +08:00
curt mayer
39f7403b78 added bin2asm for font file source creation 2020-02-22 17:50:14 -08:00
curt mayer
56f4b14ef6 Merge branch 'master' of https://github.com/cm68/RomWBW 2020-02-22 12:16:33 -08:00
curt mayer
363c844eec added tests 2020-02-22 12:15:46 -08:00
curt mayer
f6d979a084 fixed quoted double quote bug, added tests 2020-02-22 12:14:13 -08:00
b1ackmai1er
1d52dd7433 Add bin2asm for linus and update build to process font files under linix 2020-02-22 18:49:54 +08:00
curt mayer
349b3eb108 make compile shut up about conditionals 2020-02-21 10:10:46 -08:00
b1ackmai1er
26a24be24e Merge pull request #81 from wwarthen/master
Resync
2020-02-21 14:07:38 +08:00
Wayne Warthen
94d5c0f5ba Merge pull request #82 from cm68/master
clean build, bit-identical.
2020-02-20 18:45:32 -08:00
Wayne Warthen
d139b592ed Update sd.asm
Cosmetic fix.
2020-02-20 18:36:28 -08:00
curt mayer
088862634d Merge remote-tracking branch 'upstream/master' 2020-02-20 17:39:49 -08:00
curt mayer
c41d73b850 credit and primitive instructions 2020-02-20 17:29:56 -08:00
curt mayer
8cab372267 the windows build somehow thinks that these filesystems are cpm3. 2020-02-20 17:29:08 -08:00
Wayne Warthen
bc9d44b476 Multi-boot fixes 2020-02-20 17:17:44 -08:00
curt mayer
25ce672106 suppress warnings 2020-02-20 16:57:40 -08:00
curt mayer
1d149c3f75 added chmod for execution 2020-02-20 16:56:58 -08:00
curt mayer
a7bc7bb16f quiet clean 2020-02-20 16:56:23 -08:00
curt mayer
5e1022bb86 added hack to handle tunes 2020-02-20 16:55:40 -08:00
curt mayer
ec899e6920 clean diff 2020-02-20 16:55:09 -08:00
curt mayer
ab100bf3bc silenced clean 2020-02-20 16:29:26 -08:00
curt mayer
bac0c76a6d can't have non-tunes in Tunes 2020-02-20 15:45:09 -08:00
curt mayer
174722f387 added more diff support 2020-02-20 15:42:09 -08:00
curt mayer
3d916a90d4 avoid having any non-tunes in Tunes directory 2020-02-20 15:39:55 -08:00
curt mayer
8fc0274044 linux build using good defaults 2020-02-20 15:23:39 -08:00
curt mayer
a03d15fd2f handle .ds correctly, and forward refs in .if 2020-02-20 11:38:32 -08:00
curt mayer
2cc61c3804 slightly more verbose diff 2020-02-20 11:36:30 -08:00
curt mayer
c585594197 added extra rule for diffing 2020-02-20 11:35:46 -08:00
curt mayer
1c227f7270 removed extra HBIOS 2020-02-20 11:33:52 -08:00
curt mayer
1099b358a0 fixed 2 syntax errors that TASM allows 2020-02-20 11:33:11 -08:00
curt mayer
0264711f9f fix for TASM bug using single quote inside string 2020-02-20 11:32:10 -08:00
curt mayer
8fb73c95f4 coding changes for clean diff 2020-02-20 11:31:49 -08:00
curt mayer
9d37b4a59b fixed broken usage of .ds. should have been .fill 2020-02-20 11:29:04 -08:00
b1ackmai1er
ba29011021 Merge pull request #80 from wwarthen/master
Resync
2020-02-20 05:28:19 +08:00
Wayne Warthen
6ea1a8f840 Update biosldr.z80 2020-02-19 13:02:01 -08:00
Wayne Warthen
331cbce5c9 Update Clean.cmd 2020-02-19 11:08:39 -08:00
Wayne Warthen
a44572f9bf Merge pull request #81 from cm68/master
clean unix build after merge
2020-02-19 11:01:51 -08:00
curt mayer
41ed037935 fixes for make diff 2020-02-19 02:47:25 -08:00
b1ackmai1er
ad03d3e4ba Merge pull request #79 from wwarthen/master
Resync
2020-02-19 16:46:29 +08:00
curt mayer
c414664200 build fix for images 2020-02-19 00:17:58 -08:00
curt mayer
cdaf04eaed Merge remote-tracking branch 'upstream/master'
removed .gitignore
2020-02-18 23:10:43 -08:00
curt mayer
155959b430 clean merge 2020-02-18 23:06:53 -08:00
curt mayer
ae9ec4c1d8 clean build 2020-02-18 23:05:54 -08:00
curt mayer
d7232abb60 clean build 2020-02-18 22:03:23 -08:00
Wayne Warthen
2604212a97 Cleanup 2020-02-18 21:05:37 -08:00
Wayne Warthen
59ffef2bf2 Tweaks
A few things needed tweaking after the Unix build update.  No functional changes.
2020-02-18 18:30:17 -08:00
Wayne Warthen
3065c077be Merge pull request #80 from cm68/master
Makefiles and tooling for linux and os-x
2020-02-18 17:01:21 -08:00
curt mayer
22d4825e2c unneeded file 2020-02-18 15:31:55 -08:00
curt mayer
da9520466d Merge remote-tracking branch 'upstream/master' 2020-02-18 15:29:03 -08:00
curt mayer
7a4b88e7b5 added cpmldr.com 2020-02-18 14:57:29 -08:00
curt mayer
320c905578 name of zpmldr in target 2020-02-18 14:54:25 -08:00
curt mayer
050aa3096b more gitignore 2020-02-18 14:50:43 -08:00
curt mayer
c205e1b314 clean make?! 2020-02-18 14:49:28 -08:00
curt mayer
d31c146a7b simplified due to removal of install rule 2020-02-18 14:23:25 -08:00
curt mayer
b765749c3d removed install rule. confusing. 2020-02-18 14:22:45 -08:00
b1ackmai1er
5ada00af9f Merge pull request #78 from wwarthen/master
Resync
2020-02-19 06:12:38 +08:00
Wayne Warthen
88d7c37424 Boot from any slice 2020-02-18 14:08:21 -08:00
Wayne Warthen
2bfe845f6d Merge pull request #79 from b1ackmai1er/master
Supporting CP/M 3 Documentation
2020-02-18 10:32:02 -08:00
b1ackmai1er
08b4d10367 Update NASCOM Reference document 2020-02-18 21:11:02 +08:00
b1ackmai1er
3e9bbbffe3 Compressed pdfs 2020-02-18 20:10:04 +08:00
b1ackmai1er
bab0628f0a Merge branch 'master' of https://github.com/b1ackmai1er/RomWBW 2020-02-18 18:56:25 +08:00
b1ackmai1er
d0ee590a1c Supporting CP/M 3 Documentation
You may wish to include some or all of this.
2020-02-18 18:55:19 +08:00
b1ackmai1er
6d5a900c3e Merge pull request #77 from wwarthen/master
Load CP/M 3 from disk
2020-02-18 18:21:31 +08:00
Wayne Warthen
0510a02447 Load CP/M 3 from disk
Includes updated SYSCOPY application to put loader image on system tracks.
2020-02-17 15:58:17 -08:00
curt mayer
f4609159fc cpm22 paths 2020-02-17 02:11:54 -08:00
curt mayer
85967e46f3 images and prop eeprom 2020-02-17 02:04:18 -08:00
curt mayer
ac18ab9c19 cleanup after merge 2020-02-17 01:44:49 -08:00
curt mayer
0a52d6922e Merge branch 'master' of github.com:wwarthen/RomWBW 2020-02-16 23:23:53 -08:00
curt mayer
ed2f6097ef added bpsys.bak, a side-effect of windows build 2020-02-16 19:06:21 -08:00
curt mayer
f44288082c towards a clean make and 'git status' 2020-02-16 19:03:19 -08:00
curt mayer
964cc4b91a fixed include order dependency 2020-02-16 17:41:43 -08:00
curt mayer
81fe427352 fixed comment leadin 2020-02-16 17:40:51 -08:00
b1ackmai1er
e02bc96ce2 Merge pull request #76 from wwarthen/master
Resync
2020-02-15 13:45:11 +08:00
Wayne Warthen
437a0d39b7 BPBIOS system segment enhancements 2020-02-14 17:22:56 -08:00
Wayne Warthen
f6f995d407 Merge pull request #78 from b1ackmai1er/master
Update cbios.asm
2020-02-14 11:07:44 -08:00
b1ackmai1er
9452540c75 Update cbios.asm
Change RAMF to 512 directory entries as 4Mb drive space cannot be effectively used without   enough directory entries and extents to hold a large quantity of small files or a small qty of large files.
2020-02-14 23:32:48 +08:00
b1ackmai1er
f039b3b77e Merge pull request #75 from wwarthen/master
BPBIOS Updates
2020-02-14 18:52:59 +08:00
curt mayer
f30c0aa619 clean build try 2020-02-13 18:40:48 -08:00
curt mayer
628bd4f4b2 source order output 2020-02-13 18:40:27 -08:00
Wayne Warthen
3da911edf4 BPBIOS Updates 2020-02-13 16:01:19 -08:00
b1ackmai1er
7304c0c0d0 Merge pull request #74 from wwarthen/master
Resync
2020-02-13 17:05:28 +08:00
Wayne Warthen
84ce67a816 Update Tune.asm
Updated port addresses for Marten's sound card.
2020-02-12 15:23:17 -08:00
Wayne Warthen
e8e57e5e94 Update Tune.asm
TUNE app updated with more flexible hardware configuration detection.
2020-02-12 14:55:38 -08:00
Wayne Warthen
3f9b41e891 Create SC126_How-To_No_1_Serial_Comms_Using_Minicom.pdf
Thanks to David Reese for another userful How-To document.
2020-02-12 11:25:51 -08:00
b1ackmai1er
f91dfd7b69 Merge pull request #73 from wwarthen/master
Resync
2020-02-12 17:57:23 +08:00
Wayne Warthen
5d35a80cf7 Update romldr.asm 2020-02-11 19:31:30 -08:00
Wayne Warthen
a9b400f076 Update ide.asm
Cosmetic bug fix
2020-02-11 17:10:11 -08:00
Wayne Warthen
382b5594f0 Support multiple devices in IDE driver 2020-02-11 17:01:55 -08:00
Wayne Warthen
0445b3547c Adjust for older PowerShell versions 2020-02-11 14:44:32 -08:00
Wayne Warthen
608356cc9b Merge pull request #77 from b1ackmai1er/master
Add a user rom pack template to romldr
2020-02-11 11:29:36 -08:00
Wayne Warthen
2198918231 Create SC126_How-To_No_2_Preparing_an_SD_Card_for_Use_with_SC126_Rev_1-5.pdf
Thanks to David Reese for contributing this.
2020-02-11 11:26:14 -08:00
b1ackmai1er
09b967e82b Add a user rom pack template to romldr 2020-02-10 22:44:35 +08:00
Wayne Warthen
e81962f774 Merge pull request #76 from b1ackmai1er/master
Update romldr to support more than 9 drives.
2020-02-09 10:47:02 -08:00
b1ackmai1er
f552c83f23 Update romldr.asm
Update to cater for possibility of more than 9 drives being detected. Update menu system to support
2020-02-09 20:25:45 +08:00
b1ackmai1er
907b5d578e Merge pull request #72 from wwarthen/master
Resync
2020-02-09 09:11:34 +08:00
Wayne Warthen
461aaedd56 Update boot.z80
Bug fix
2020-02-08 16:23:17 -08:00
Wayne Warthen
8fd1fefdf9 New drive assignment logic to CP/M 3 2020-02-08 15:56:18 -08:00
b1ackmai1er
89b2489727 Merge pull request #71 from wwarthen/master
Drive letter assignment enhancement
2020-02-09 07:05:12 +08:00
Wayne Warthen
d8bbb1e8ca Drive letter assignment enhancement
Drive letters are now only pre-assigned to hard disk type devices that have media inserted.  Media can still be inserted on-the-fly and drive letters assigned using ASSIGN.
2020-02-08 14:24:36 -08:00
b1ackmai1er
941f958742 Merge pull request #70 from wwarthen/master
Build process cleanup
2020-02-08 15:05:49 +08:00
Wayne Warthen
ae287ca56d Build process cleanup 2020-02-07 17:26:17 -08:00
b1ackmai1er
57983b0a4f Merge pull request #69 from wwarthen/master
Resync
2020-02-08 08:53:26 +08:00
Wayne Warthen
f65e17f3ac Add SUBMIT.COM to NZCOM disk image 2020-02-07 13:33:30 -08:00
Wayne Warthen
15d607d686 Further PPIDE updates 2020-02-07 11:47:16 -08:00
Wayne Warthen
bd21224a9d Merge pull request #74 from b1ackmai1er/master
ppide update to begin support for multiple interfaces.
2020-02-07 11:19:25 -08:00
b1ackmai1er
b89e457414 Update game.asm
keypad and arrow keys
2020-02-07 14:33:21 +08:00
b1ackmai1er
7fb1a8851e Add ROM based game
Refer 2048game.com
Requires VT100 terminal.
2020-02-07 13:16:30 +08:00
b1ackmai1er
45fc44e59f Merge pull request #68 from wwarthen/master
Fix BPBIOS Disk I/O
2020-02-06 14:44:25 +08:00
b1ackmai1er
4ac878029d Update std.asm
Required by ppide.asm
2020-02-06 11:36:28 +08:00
curt mayer
2dc8e6bd12 works i think 2020-02-05 17:20:20 -08:00
Wayne Warthen
2c3ebee6ca Fix BPBIOS Disk I/O 2020-02-05 14:04:17 -08:00
b1ackmai1er
336393aad6 Update ppide.asm 2020-02-06 04:19:16 +08:00
b1ackmai1er
5df54bc6fd PPIDE updates 2020-02-06 04:06:44 +08:00
b1ackmai1er
c3ef70efc0 Update ppide.asm
Optimization
2020-02-06 03:10:26 +08:00
b1ackmai1er
684a209c84 Update ppide.asm
Optimization
2020-02-06 01:45:12 +08:00
b1ackmai1er
8a1ddec0f0 Update ppide.asm
Optimization
2020-02-05 23:07:04 +08:00
b1ackmai1er
a96e8e9ef0 Update ppide.asm
Initial multi device ppide
2020-02-05 19:26:24 +08:00
b1ackmai1er
71b7e9c8f5 Merge pull request #67 from wwarthen/master
Fix CP/M 3 floppy disk access
2020-02-05 14:36:57 +08:00
Wayne Warthen
6828269137 Fix CP/M 3 floppy disk access 2020-02-04 19:14:56 -08:00
b1ackmai1er
3eedd25b48 Merge pull request #66 from wwarthen/master
CP/M 3 Cleanup
2020-02-04 22:01:54 +08:00
Wayne Warthen
c83cd1cb2d CP/M 3 Cleanup 2020-02-03 19:18:25 -08:00
b1ackmai1er
227481f0b8 Merge pull request #65 from wwarthen/master
Resync
2020-02-04 07:05:39 +08:00
Wayne Warthen
48968766a0 Small CP/M 3 Update 2020-02-03 14:48:27 -08:00
Wayne Warthen
e7794723bf Merge pull request #73 from b1ackmai1er/master
Update rf.asm
2020-02-03 14:46:04 -08:00
b1ackmai1er
47bb48c8b4 Update rf.asm
Fix device selection for more than 2 devices
2020-02-03 20:40:59 +08:00
b1ackmai1er
7a4d42ba93 rf config updates 2020-02-03 14:09:39 +08:00
b1ackmai1er
32bdd461f6 Update rf.asm
Standardize init message. Allow for up to 4 devices and at non-consecutive addresses. Limit maximum number devices and with warning.
2020-02-03 13:46:48 +08:00
Wayne Warthen
c3f1123187 Merge pull request #72 from b1ackmai1er/master
Add basic command line support to RTC
2020-02-02 11:41:33 -08:00
b1ackmai1er
3a2ef5efdd Update RTC.asm
Add basic command line support. Commands T)ime, C)harge, N)ocharge , T)ime can now be invoked from the command line and exit. i.e. RTC /T displays time RTC /C turns charge on etc
2020-02-02 20:18:21 +08:00
curt mayer
389cd70e7e FDU alignment fix, verbose diff, don't build Tune 2020-01-31 23:02:53 -08:00
curt mayer
7b6faa3280 strange .DS stuff with 0x20 and 0x30 addresses. 2020-01-31 22:28:02 -08:00
curt mayer
0a6c226a5b added ability to have paths 2020-01-31 22:26:20 -08:00
curt mayer
c4c6b8a051 added more diff goodness 2020-01-31 22:25:43 -08:00
curt mayer
0e9894012b fixed output to match tasm's wierd .org usage 2020-01-31 22:23:14 -08:00
b1ackmai1er
0ef6074a6b Merge pull request #64 from wwarthen/master
Resync
2020-01-31 17:41:08 +08:00
curt mayer
9eab1f5e5b handling of no args 2020-01-30 18:03:29 -08:00
curt mayer
639a9c7459 clobber fix 2020-01-30 18:03:07 -08:00
curt mayer
c30c5a6437 build and diff fixes 2020-01-30 15:04:37 -08:00
curt mayer
917f21e468 added Propeller recipe 2020-01-30 15:02:44 -08:00
curt mayer
40663d7f3d syntax error fix. RST 38 is busted 2020-01-30 13:10:49 -08:00
curt mayer
adabd69598 more build fixes 2020-01-29 23:27:57 -08:00
curt mayer
f9126620c8 more build and clean fixes 2020-01-29 23:21:10 -08:00
Curt Mayer
b4c1ca7fcb more build fixes 2020-01-30 07:09:05 +00:00
Curt Mayer
ad35748d5c fixed some build problems 2020-01-30 07:00:33 +00:00
Curt Mayer
fac1974589 makefiles and tools for unix/osx build 2020-01-30 06:47:47 +00:00
Wayne Warthen
14e48f24b5 Cosmetic Cleanup 2020-01-29 15:17:15 -08:00
Wayne Warthen
6dcfb7b058 Merge pull request #71 from b1ackmai1er/master
ECB Cassette and Recovery Mode change
2020-01-29 15:03:33 -08:00
b1ackmai1er
c6f7d4d38a Fixup incorrect commit 2020-01-28 18:16:25 +08:00
b1ackmai1er
b75153d263 ECB Cassette and Recovery Mode change
Create an equate for changing baud rate through custom config rather than the driver.  Add recovermode mode option to use Ring indicator line.
2020-01-28 18:09:30 +08:00
b1ackmai1er
fdb5f82815 Merge pull request #63 from wwarthen/master
Finalize pre-release 27
2020-01-27 07:07:03 +08:00
Wayne Warthen
6950195741 Finalize pre-release 27
Default baud rate for RC and SC platforms with Z180 now 115200.
2020-01-26 12:46:51 -08:00
b1ackmai1er
d2ca0c35f1 Merge pull request #62 from wwarthen/master
Cosmetic Updates
2020-01-21 18:16:03 +08:00
Wayne Warthen
a6f6a9734a Cosmetic Updates 2020-01-20 14:34:43 -08:00
b1ackmai1er
207b3cebc5 Merge pull request #61 from wwarthen/master
Resync
2020-01-18 07:22:22 +08:00
Wayne Warthen
ae62931fbb Bump Version 2020-01-17 15:15:38 -08:00
Wayne Warthen
afd5c22264 Minor Cleanup 2020-01-17 15:06:57 -08:00
Wayne Warthen
825002c181 Merge pull request #69 from b1ackmai1er/master
Implement "safe mode" boot process
2020-01-17 14:26:09 -08:00
b1ackmai1er
60df79fa4d Implement "safe mode" boot process
Lots of ways this could be done. I have chosen to set it up so it just boots with a minimum driver set.

On SBC test  by setting BT_REC_TYPE to BT_REC_SBC02 and use the 1-bit jumper (crtact) jumper to enable.

Options for other platforms needs to be considered.
2020-01-17 16:36:44 +08:00
b1ackmai1er
424676c469 Merge pull request #60 from wwarthen/master
Resync
2020-01-17 10:23:54 +08:00
Wayne Warthen
11376d6d3d Minor Cleanup
Moved font compression tools under Tools directory.  Replaced lzsa app with the Win32 variant to ensure compatibility for all users.
2020-01-16 15:57:56 -08:00
Wayne Warthen
32210b399c Generate Bootable Disk Images
Disk images created as part of the build process can now be made bootable without requiring the user to run SYSCOPY.  Some of the disk images are now bootable.
2020-01-16 15:11:18 -08:00
Wayne Warthen
5b78631fdc Minor Cleanup 2020-01-16 14:00:05 -08:00
Wayne Warthen
285ad8f54c Merge pull request #68 from b1ackmai1er/master
Initial compressed fonts support
2020-01-16 13:51:52 -08:00
b1ackmai1er
c73e87c8c7 Visual guide to ROMWBW fonts 2020-01-16 20:35:12 +08:00
b1ackmai1er
99b5e4eec9 Add preparing fonts to build process 2020-01-16 14:13:39 +08:00
b1ackmai1er
31c917192d Update fonts.txt 2020-01-16 00:40:29 +08:00
b1ackmai1er
6a4723f2f5 Update cvdu.asm
Remove debug code
2020-01-15 18:05:42 +08:00
b1ackmai1er
350b99778b Update cvdu.asm
Remove debug code
2020-01-15 18:02:40 +08:00
b1ackmai1er
b2b07a9d6e Initial compressed fonts support
CVDU untested
2020-01-15 17:58:30 +08:00
b1ackmai1er
58f924cff4 Merge pull request #59 from wwarthen/master
Resync
2020-01-15 12:13:30 +08:00
Wayne Warthen
815c6c14a0 Image Disk BuildXX.ps1 update 2020-01-14 16:35:11 -08:00
Wayne Warthen
c77b9130f3 Merge pull request #67 from b1ackmai1er/master
Additional VGA mode and reworked fonts.
2020-01-14 16:04:23 -08:00
Wayne Warthen
082a2b7e99 Refinements to disk image building 2020-01-14 16:01:08 -08:00
b1ackmai1er
e58ff3fbd8 Merge pull request #58 from wwarthen/master
Disk image creation improvements
2020-01-14 18:35:55 +08:00
Wayne Warthen
04f0b785b5 Disk image creation improvements 2020-01-13 20:41:33 -08:00
b1ackmai1er
3f01182f92 Fixup incorrect push 2020-01-14 08:10:58 +08:00
b1ackmai1er
42efbcd553 Update font inclusion 2020-01-14 08:04:32 +08:00
b1ackmai1er
2c3e9ec365 Fix tms build 2020-01-14 07:25:38 +08:00
b1ackmai1er
83877497cc VGA, CVDU & Fonts update
Fonts renamed. TMS font flipped around to normal orientation. Font files trimmed to scanline length to save space. Fonts sharesd across devices where possible.
2020-01-13 22:58:56 +08:00
Phillip Stevens
0c70aadd46 Merge pull request #10 from wwarthen/master
update to master
2020-01-12 17:56:05 +11:00
b1ackmai1er
03bf58f64c Create font_8x8.asm 2020-01-12 13:37:12 +08:00
b1ackmai1er
d94d1f16dd Update vga.asm 2020-01-12 01:47:07 +08:00
b1ackmai1er
ad816cde01 Update vga.asm 2020-01-12 01:43:55 +08:00
b1ackmai1er
23d0061fb1 Fix Incorrect assembly vga buffer clear
Preliminary 80x60 format. Needs 8x8 font.
2020-01-12 01:41:20 +08:00
b1ackmai1er
3c0ad4816b Merge pull request #57 from wwarthen/master
Merge pull request #66 from b1ackmai1er/master
2020-01-11 10:12:13 +08:00
Wayne Warthen
3c01f5b037 Merge pull request #66 from b1ackmai1er/master
Add 80x43 video mode to VGA3 driver
2020-01-10 16:55:47 -08:00
b1ackmai1er
60f96f3244 Add cursor support fo VGA 80x43 mode
Align with VDU driver
2020-01-10 20:11:19 +08:00
b1ackmai1er
5bf4dbc30f minors 2020-01-10 17:32:27 +08:00
b1ackmai1er
4f798e2454 Revert "minors"
This reverts commit e6183cddec.
2020-01-10 17:22:59 +08:00
b1ackmai1er
e6183cddec minors 2020-01-10 17:22:31 +08:00
b1ackmai1er
5cda17b800 minors 2020-01-10 15:32:39 +08:00
b1ackmai1er
be45e63e90 minors 2020-01-10 11:40:56 +08:00
b1ackmai1er
da26366c0b Add 80x43 video mode to VGA3 driver
With associated font file
2020-01-10 11:26:31 +08:00
b1ackmai1er
677bbe18b2 Merge pull request #56 from wwarthen/master
Resync
2020-01-10 11:21:19 +08:00
Wayne Warthen
3280a71bbb Update ChangeLog.txt 2020-01-09 16:02:16 -08:00
Wayne Warthen
30cc54b9c3 Merge pull request #65 from b1ackmai1er/master
Add 80x30 screen format to VGA3 driver
2020-01-09 15:55:00 -08:00
b1ackmai1er
4b7f570947 Minors 2020-01-09 23:18:18 +08:00
b1ackmai1er
276de14ff6 Add 80x30 screen format to VGA3 driver 2020-01-09 23:06:01 +08:00
Phillip Stevens
43ac88c90b Merge pull request #9 from wwarthen/master
update to master
2020-01-09 09:09:25 +11:00
b1ackmai1er
8e86a65875 Merge pull request #55 from wwarthen/master
Resync
2020-01-08 16:39:54 +08:00
Wayne Warthen
27ea5e63c3 Merge pull request #64 from feilipu/master
HBIOS - sd.asm efficient byte mirror
2020-01-07 12:00:44 -08:00
Wayne Warthen
aa37affe34 Update bqrtc.asm
Minor enhancement.
2020-01-07 11:53:43 -08:00
Phillip Stevens
3d7e3cae6f more tabs 2020-01-07 19:45:54 +11:00
Phillip Stevens
f3d059d4d7 fix more tabs 2020-01-07 19:37:27 +11:00
Phillip Stevens
34540fff54 fix tabs 2020-01-07 19:36:06 +11:00
Phillip Stevens
57f54b325c HBIOS - sd.asm efficient byte mirror 2020-01-07 19:31:34 +11:00
b1ackmai1er
67e4c81676 Merge pull request #54 from wwarthen/master
Resync
2020-01-07 16:23:45 +08:00
Phillip Stevens
3a4f272a01 Merge pull request #8 from wwarthen/master
update to master
2020-01-07 18:52:37 +11:00
Wayne Warthen
485045408c Cleanup 2020-01-06 13:53:50 -08:00
Wayne Warthen
e9709fcde6 Floppy Driver fixes from Steve Garcia 2020-01-06 10:59:03 -08:00
b1ackmai1er
d8fa619c2e Merge pull request #53 from wwarthen/master
Preliminary support for Dyno Computer
2020-01-06 21:14:14 +08:00
Wayne Warthen
3c8cd5219e Preliminary support for Dyno Computer
Dyno Computer is the work of Steve Garcia and much of the code checked in is based on his work.
2020-01-05 15:26:08 -08:00
b1ackmai1er
745798def7 Merge pull request #52 from wwarthen/master
Overhaul disk image build process
2020-01-04 16:23:10 +08:00
Wayne Warthen
8bc4a40662 Overhaul disk image build process 2020-01-03 20:42:06 -08:00
b1ackmai1er
8124595a38 Merge pull request #51 from wwarthen/master
Resync
2020-01-03 19:58:40 +08:00
Wayne Warthen
5e4e098f64 CPM3/ZPM3 Cleanup 2019-12-29 16:27:25 -08:00
Wayne Warthen
625661714f CP/M 3 & ZPM3 Updates 2019-12-28 15:56:49 -08:00
Wayne Warthen
b10286422c Fix ASSIGN command
Also added a graphic that illustrates a hybrid CP/M & DOS hard disk.
2019-12-28 13:56:50 -08:00
b1ackmai1er
a3f093e254 Merge pull request #50 from wwarthen/master
CP/M 3 RTC Fix, ZPM3 Hard Disk Image
2019-12-07 15:15:51 +08:00
Wayne Warthen
64ab933492 CP/M 3 RTC Fix, ZPM3 Hard Disk Image 2019-12-05 12:08:44 -08:00
b1ackmai1er
5e8c2dfdc7 Merge pull request #49 from wwarthen/master
CP/M 3 RTC Support
2019-12-03 21:11:52 +08:00
Phillip Stevens
928c9fe3f5 Merge pull request #7 from wwarthen/master
update to master
2019-12-03 17:51:20 +07:00
Wayne Warthen
8799352a31 CP/M 3 RTC Support
CP/M 3 will now get current date/time from RTC.  Setting RTC from CP/M 3 is not finished.
2019-12-02 18:44:11 -08:00
b1ackmai1er
a2d06b849b Merge pull request #48 from wwarthen/master
Resync
2019-12-02 05:49:41 +08:00
Wayne Warthen
b635a601be Update ChangeLog.txt 2019-12-01 12:37:08 -08:00
Wayne Warthen
54ad5df47f Merge pull request #62 from b1ackmai1er/master
Tune defaults to .PT3 file type if none given
2019-12-01 12:29:35 -08:00
Wayne Warthen
2610fd5be7 Merge pull request #61 from feilipu/master
[hbios] dbgmon hxload rework
2019-12-01 12:25:33 -08:00
b1ackmai1er
5940292bb6 Update Tune.asm
Default to .PT3 file extension if non given.
2019-12-01 22:40:44 +08:00
Phillip Stevens
4beb1ba437 hbios - dbgmon more indentation 2019-11-30 22:17:48 +11:00
Phillip Stevens
6647cd6a05 hbios - dbgmon - fix indentation 2019-11-30 22:13:33 +11:00
Phillip Stevens
ab3882b489 hbios - dbgmon hxload typo 2019-11-30 21:53:44 +11:00
Phillip Stevens
c60c8394b3 hbios - dbgmon hxload 2019-11-30 20:53:49 +11:00
Phillip Stevens
922adde120 Merge pull request #6 from wwarthen/master
update to master
2019-11-28 12:12:37 +07:00
Wayne Warthen
2e39da65f4 Cleanup 2019-11-27 17:23:19 -08:00
Phillip Stevens
808b1b19a5 Merge pull request #5 from wwarthen/master
update to master
2019-11-25 20:11:59 +07:00
b1ackmai1er
913ca308d2 Merge pull request #47 from wwarthen/master
Resync
2019-11-25 17:20:00 +08:00
Wayne Warthen
2ebd800482 CTC Refactoring 2019-11-24 20:16:54 -08:00
Wayne Warthen
ae05aa499e Merge pull request #60 from b1ackmai1er/master
CTC timer support for ECB-SBC-V2 with ECB-Zilog-Peripherals board
2019-11-24 15:54:55 -08:00
b1ackmai1er
6d22708b66 ecb-sbc-v2 / ecb-zp ctc timer configuration
Correct instructions on jumpering.
2019-11-24 21:18:08 +08:00
b1ackmai1er
e2f066492f Create ctcstub.asm 2019-11-24 20:51:39 +08:00
b1ackmai1er
7917a0143a ecb-sbc-v2 ecb-zp ctc timer support 2019-11-24 20:49:51 +08:00
b1ackmai1er
c6e6ed89dc minor 2019-11-23 22:55:30 +08:00
b1ackmai1er
1ff1a70bfb Collection of minors 2019-11-23 17:31:16 +08:00
b1ackmai1er
81722bfa4d Merge pull request #46 from wwarthen/master
TUNE App Refinements
2019-11-22 16:29:27 +08:00
Wayne Warthen
1d542d88bc TUNE App Refinements 2019-11-21 16:27:00 -08:00
b1ackmai1er
da1761b7c1 Merge pull request #45 from wwarthen/master
Resync
2019-11-18 19:29:52 +08:00
Wayne Warthen
bd8d059f32 Cleanup 2019-11-17 21:31:07 -08:00
Wayne Warthen
dc6ecfd9e3 CP/M 3 Support in ASSIGN 2019-11-17 17:35:11 -08:00
Phillip Stevens
7436c165a5 Merge pull request #4 from wwarthen/master
upstream master
2019-11-16 15:21:02 +11:00
b1ackmai1er
c47611525f Merge pull request #44 from wwarthen/master
Resync
2019-11-16 11:38:45 +08:00
Wayne Warthen
659f60c23b Cleanup Timer & Clock Multiplier Code 2019-11-15 16:29:27 -08:00
Wayne Warthen
b87f7b6e89 Merge pull request #58 from feilipu/master
hbios - z180 CMR/CCR config
2019-11-15 14:12:45 -08:00
b1ackmai1er
871520cef7 Merge pull request #43 from wwarthen/master
Resync
2019-11-15 18:57:53 +08:00
Phillip Stevens
084df830ef hbios - z180 TASM equality check 2019-11-15 19:14:43 +11:00
Phillip Stevens
326ee0ae67 hbios - z180 CMR/CCR testing 2019-11-15 11:56:24 +11:00
Phillip Stevens
fc760e90e0 hbios - z180 CMR/CCR order 2019-11-15 11:46:20 +11:00
Phillip Stevens
c0ca96cb96 hbios - z180 CMR/CCR config 2019-11-15 11:40:50 +11:00
Phillip Stevens
1fac76f80c Merge pull request #3 from wwarthen/master
update to upstream master
2019-11-15 10:45:55 +11:00
Wayne Warthen
18f78cfd3e Merge pull request #57 from feilipu/master
hbios - z180 - tidy prt0 setting
2019-11-14 11:35:41 -08:00
b1ackmai1er
ba24d578f6 Merge pull request #42 from wwarthen/master
Resync
2019-11-14 21:50:19 +08:00
Phillip Stevens
294b42f5a4 scz180 white space 2019-11-14 23:25:16 +11:00
Phillip Stevens
fa7eb7f916 scz180 revert fast for pr 2019-11-14 23:22:11 +11:00
Phillip Stevens
446d969779 hbios - use z180 instructions 2019-11-14 23:00:35 +11:00
Wayne Warthen
b7ad90c245 Cleanup 2019-11-12 18:52:33 -08:00
Phillip Stevens
9e815edc29 Merge pull request #2 from wwarthen/master
update to master pre.20
2019-11-12 18:24:44 +11:00
Wayne Warthen
5d03973e80 Cleanup 2019-11-11 20:38:17 -08:00
Phillip Stevens
1d2f74b5b0 scz180 - config fast 2019-11-12 13:53:37 +11:00
Phillip Stevens
6c3f632990 Merge pull request #1 from wwarthen/master
update to master
2019-11-12 11:32:09 +11:00
b1ackmai1er
9ad14e2392 Merge pull request #41 from wwarthen/master
Resync
2019-11-11 21:21:54 +08:00
Wayne Warthen
8f2754b0f7 Minor Cleanup 2019-11-10 18:59:43 -08:00
Wayne Warthen
04f374a4da Misc Cleanup 2019-11-10 11:57:04 -08:00
Wayne Warthen
9895c4d47d Merge pull request #54 from feilipu/master
hbios - system ticks
2019-11-10 11:21:30 -08:00
Phillip Stevens
976ef858d0 hbios - fix HB_SECTCK setting 2019-11-10 15:29:16 +11:00
Phillip Stevens
6cb051ec52 hbios - z180 PRT0 configuration again 2019-11-09 20:51:29 +11:00
Phillip Stevens
d78229a875 hbios - z180 PRT0 configuration 2019-11-09 20:36:52 +11:00
Phillip Stevens
8fb0d9019b hbios - optimise INC32HL 2019-11-09 18:44:06 +11:00
Phillip Stevens
6ab3ecd0cc hbios - sys/time.h functions 2019-11-09 18:32:08 +11:00
b1ackmai1er
a22ac6beab Merge pull request #40 from wwarthen/master
Add Seconds Counter to HBIOS
2019-11-09 13:16:51 +08:00
Wayne Warthen
dc9dd8e8ca Add Seconds Counter to HBIOS 2019-11-08 13:14:28 -08:00
b1ackmai1er
9d25a7663d Merge pull request #39 from wwarthen/master
Update sd.asm
2019-10-29 22:21:20 +08:00
Wayne Warthen
019ae62c2a Update sd.asm
Refinements to sd.asm for RC2014 WizNet Module (SDMODE_MT).
2019-10-26 16:51:42 -07:00
b1ackmai1er
b0226fe1e8 Merge pull request #37 from wwarthen/master
Resync
2019-10-22 16:25:37 +08:00
Wayne Warthen
96fd7b1808 CP/M 3 Minor Build Cleanup 2019-10-21 12:58:43 -07:00
Wayne Warthen
7290a52cf7 Update sd.asm
MT011 updates
2019-10-21 12:48:46 -07:00
Wayne Warthen
0e9edd0874 Merge pull request #52 from b1ackmai1er/NASCOM-VDU-GRAPHICS
Nascom vdu graphics
2019-10-20 16:03:05 -07:00
b1ackmai1er
11857925d2 Update vdu.asm 2019-10-20 22:43:13 +08:00
b1ackmai1er
36e2a0b6ec Merge pull request #36 from wwarthen/master
Resync
2019-10-20 11:22:58 +08:00
b1ackmai1er
bcb16757bb Update vdu.asm 2019-10-20 11:18:45 +08:00
b1ackmai1er
5db3d11b9a ECB-VDU, NASCOM updates
Implement HBIOS cursor setting function VDU_VDASCS for ECB-VDU
2019-10-20 11:15:07 +08:00
Wayne Warthen
b7d928d043 Merge pull request #51 from b1ackmai1er/master
ECB-VDU: Add cursor style options
2019-10-19 12:06:28 -07:00
b1ackmai1er
0b84b88f57 Merge pull request #35 from b1ackmai1er/NASCOM-VDU-GRAPHICS
ECB-VDU: Add cursor style options
2019-10-19 20:31:47 +08:00
b1ackmai1er
ab305429fb Add cursor style options 2019-10-19 20:07:00 +08:00
Wayne Warthen
391997ee09 Merge pull request #50 from b1ackmai1er/master
Forth and NASCOM BASIC updates
2019-10-18 19:17:57 -07:00
b1ackmai1er
1ee2167c2a camel Forth build changes and fixes
;   19-Oct 19 v1.02 Convert to zsm assembler which
;                   identified and fixed incorrect
;                   case conversion when lowercase
;                   keywords are being passed in a
;                   macro. Remove Z80MR assembler
2019-10-19 09:09:59 +08:00
b1ackmai1er
8c8c09097d Merge pull request #34 from wwarthen/master
SDMODE_MT Updates
2019-10-19 07:54:17 +08:00
Wayne Warthen
45b27c34ed SDMODE_MT Updates 2019-10-18 16:13:57 -07:00
b1ackmai1er
cc1a39ebd7 Merge pull request #33 from wwarthen/master
Resync
2019-10-18 15:29:17 +08:00
Wayne Warthen
2d2cb3d8ea Shift Register SPI WIZNET for RC2014 2019-10-17 16:18:40 -07:00
Wayne Warthen
2430231dc1 More CP/M 3 Refinements 2019-10-17 15:02:07 -07:00
b1ackmai1er
2ec195b9e8 Merge pull request #32 from wwarthen/master
Incremental CP/M 3 Improvements
2019-10-17 19:58:19 +08:00
Wayne Warthen
5617d6b27e Incremental CP/M 3 Improvements 2019-10-16 17:12:06 -07:00
b1ackmai1er
c15ae9670a Merge pull request #31 from wwarthen/master
Resync
2019-10-16 20:35:23 +08:00
Wayne Warthen
f98b97e20a Rename DISKDEFS to diskdefs 2019-10-15 15:05:53 -07:00
Wayne Warthen
1e47726176 Rename DISKDEFS to diskdefs 2019-10-15 14:51:41 -07:00
b1ackmai1er
3bdcf371d1 Merge pull request #30 from wwarthen/master
Fix CPM3 Build
2019-10-16 05:46:30 +08:00
Wayne Warthen
a4f2cd8c11 Fix CPM3 Build
Credit to Phil Summers for finding the missing diskdefs files.
2019-10-15 14:21:10 -07:00
b1ackmai1er
b0995506ef Merge pull request #29 from wwarthen/master
Preliminary CP/M 3
2019-10-15 17:39:35 +08:00
Wayne Warthen
57c87db9a1 Preliminary CP/M 3 2019-10-14 16:30:19 -07:00
b1ackmai1er
d56c9baccf Nascom BASIC clear screen changed to use VT100 escape sequences 2019-10-13 21:13:04 +08:00
b1ackmai1er
147fadefd9 NASCOM BASIC Summary 2019-10-13 19:54:46 +08:00
b1ackmai1er
b9a21ae296 Nascom BASIC long error messages
Add an option for  more descriptive error messages
i.e NF error becomes NEXT without FOR
New behaviour is now default
2019-10-13 17:14:20 +08:00
b1ackmai1er
768a459565 Merge pull request #28 from wwarthen/master
Cleanup
2019-10-13 00:38:02 +08:00
Wayne Warthen
bfbf6e7dcf Cleanup 2019-10-11 17:53:34 -07:00
b1ackmai1er
8f4a3112d1 Merge pull request #27 from wwarthen/master
Resync
2019-10-12 08:36:54 +08:00
Wayne Warthen
d12ed64fd6 Merge pull request #49 from b1ackmai1er/master
Add sound to Nascom BASIC for SBC-V2-003
2019-10-11 17:05:54 -07:00
Wayne Warthen
18bc22fd3e Update FAT Application 2019-10-11 16:53:31 -07:00
b1ackmai1er
56d0c81af8 Update nascom.asm
Cleanup
2019-10-12 06:16:36 +08:00
b1ackmai1er
1628c51bd6 Update nascom.asm
Remove debug code
2019-10-12 01:28:06 +08:00
b1ackmai1er
e92da9b2db Merge branch 'master' of https://github.com/b1ackmai1er/RomWBW 2019-10-12 01:04:21 +08:00
b1ackmai1er
dc0411746e Update nascom.asm 2019-10-12 00:56:15 +08:00
b1ackmai1er
27fd30ef5f Merge pull request #26 from wwarthen/master
Update FAT.COM
2019-10-11 14:46:53 +08:00
Wayne Warthen
26a4abd3f5 Update FAT.COM
Adds MD and FORMAT commands
2019-10-10 18:57:20 -07:00
b1ackmai1er
1d5cd55452 Merge pull request #25 from wwarthen/master
Support Secondary SPI on SC126
2019-10-10 19:40:31 +08:00
Wayne Warthen
bd2fc6dbfe Support Secondary SPI on SC126 2019-10-09 15:37:21 -07:00
b1ackmai1er
b4e5839681 Merge pull request #24 from wwarthen/master
Resync
2019-10-09 18:20:21 +08:00
Wayne Warthen
af2a9a7110 Bump Version 2019-10-08 16:45:11 -07:00
Wayne Warthen
4485e0e932 Cleanup 2019-10-08 16:39:22 -07:00
Wayne Warthen
1c57cae1ed Update FAT Application 2019-10-08 16:34:35 -07:00
b1ackmai1er
b498f5a744 Merge pull request #23 from wwarthen/master
Cleanup
2019-10-07 12:22:26 +08:00
Wayne Warthen
782bcba9f7 Cleanup 2019-10-05 13:58:30 -07:00
b1ackmai1er
98bec91318 Merge pull request #22 from wwarthen/master
Finalize SCZ180 Configurations
2019-10-03 11:14:27 +08:00
Wayne Warthen
57dabc1ab5 Finalize SCZ180 Configurations 2019-10-02 08:45:11 -07:00
b1ackmai1er
99311e4820 Merge pull request #21 from wwarthen/master
Resync
2019-10-02 09:51:45 +08:00
Wayne Warthen
dcfdc4fc36 Merge pull request #48 from sccousins/master
Change status LED use hbios.asm for SC126/130
2019-10-01 15:54:49 -07:00
sccousins
bf7470d712 Update hbios.asm 2019-10-01 18:23:43 +01:00
b1ackmai1er
3865aaad83 Merge pull request #20 from wwarthen/master
Status LED Support
2019-10-01 10:55:59 +08:00
Wayne Warthen
8d96efb6f5 Status LED Support 2019-09-30 17:22:02 -07:00
b1ackmai1er
88940645c0 Merge pull request #19 from wwarthen/master
Dynamic DS-1302 Detection
2019-09-30 13:32:40 +08:00
Wayne Warthen
341c55945c Dynamic DS-1302 Detection 2019-09-29 14:33:40 -07:00
b1ackmai1er
866449c8ee Merge pull request #18 from wwarthen/master
Resync
2019-09-29 10:29:56 +08:00
Wayne Warthen
ff851d36d6 Diagnostic LED Refinements 2019-09-28 16:01:49 -07:00
Wayne Warthen
183ddeac5f Diag LED Enhancement
Diagnostic LEDs will now show disk activity by disk unit number.
2019-09-27 17:16:00 -07:00
Wayne Warthen
cc38eef867 KIO Cleanup 2019-09-23 18:49:33 -07:00
b1ackmai1er
a6f95d70d5 Merge pull request #17 from wwarthen/master
Resync
2019-09-22 14:46:34 +08:00
Wayne Warthen
b819360605 Make ZCAL Y2K Compliant
Credit to Nick Brok
2019-09-21 17:30:58 -07:00
Wayne Warthen
ee04d84abd Fix Z180 CPU Speed Setup 2019-09-20 21:54:04 -07:00
b1ackmai1er
f77072fbd2 Update nascom.asm 2019-09-17 22:43:52 +08:00
b1ackmai1er
fa34bcbea3 Merge pull request #16 from wwarthen/master
Resync
2019-09-16 17:02:27 +08:00
Wayne Warthen
21b231bced Create RCZ80_kio.asm 2019-09-15 16:18:42 -07:00
Wayne Warthen
0fb98bc071 KIO Support 2019-09-15 16:13:50 -07:00
b1ackmai1er
ea8dad4220 Update nascom.asm 2019-09-15 23:12:18 +08:00
b1ackmai1er
8b1f7dcba0 Update nascom.asm
Install frequency table as part of cold boot initialization
2019-09-15 19:42:17 +08:00
b1ackmai1er
587a618400 Update nascom.asm
Populate  the frequency table with duration
2019-09-15 16:44:41 +08:00
b1ackmai1er
c57c3527d2 Update nascom.asm
Add code to start calculating duration based on clock frequency provided by hbios
2019-09-15 12:12:18 +08:00
b1ackmai1er
6c48811167 Update nascom.asm 2019-09-08 00:06:19 +08:00
b1ackmai1er
642953eaf1 Update nascom.asm
Add PLAY duration operand
2019-09-07 21:09:00 +08:00
b1ackmai1er
7033755762 Update nascom.asm
Add PLAY a note
2019-09-07 17:09:36 +08:00
b1ackmai1er
fdb4304f70 Merge pull request #15 from wwarthen/master
Resync
2019-09-07 17:07:23 +08:00
Wayne Warthen
0bdecc9a4a Floppy Fix
Floppy I/O was failing for slower CPUs when the timer interrupts were active.  Now fixed.

Credit to Jorge Jorge Rodrigues for finding this problem and pointing me in the right direction for the fix.
2019-09-06 15:47:46 -07:00
b1ackmai1er
988bf98d4a Merge pull request #14 from wwarthen/master
Resync
2019-09-05 16:32:20 +08:00
Wayne Warthen
8c0c75253e Z180 Variant CPU Speed Handling
Check Z180 CPU variant when attempting to change CPU speed multipliers and handle appropriately.
2019-09-04 20:46:29 -07:00
Wayne Warthen
d55bd64d6b Merge pull request #46 from b1ackmai1er/master
spk.asm developement
2019-09-04 12:02:52 -10:00
b1ackmai1er
21568a4b8d spk.asm developement
Run time adjustement of  tone frequencies for different cpu frequencies with the limitation that rounded down frequency is used. i.e. 4Mhz clock measured at 3.988Mhz will setup tone frequencies based on 3MHz cpu.
2019-09-04 20:37:32 +08:00
b1ackmai1er
f8b50f66ec Merge pull request #13 from wwarthen/master
Resync
2019-09-04 16:14:22 +08:00
Wayne Warthen
b856a1a529 Disk I/O to/from Banked Memory
Supports double-buffered disk i/o to read/write to/from any memory bank specified.

NOTE:  Disk I/O will be temporarily slower than normal because all I/O is being forced thru double-buffering for testing.
2019-09-03 15:12:56 -07:00
Wayne Warthen
5eee238729 Merge pull request #45 from b1ackmai1er/master
Enhance spk.asm to be able to play note
2019-09-03 11:28:51 -10:00
b1ackmai1er
474626b779 Merge branch 'master' of https://github.com/b1ackmai1er/RomWBW 2019-09-03 20:41:47 +08:00
b1ackmai1er
52c7b7f25c Enhance spk.asm to be able to play note 2019-09-03 20:40:54 +08:00
b1ackmai1er
4d51086cd1 Merge pull request #12 from wwarthen/master
Resync
2019-09-03 20:34:55 +08:00
Wayne Warthen
a473c5c221 Minor Updates 2019-09-01 18:54:13 -07:00
Wayne Warthen
381d62a733 Update API.txt 2019-09-01 13:25:30 -07:00
Wayne Warthen
d5206276a8 Merge pull request #44 from b1ackmai1er/master
Refactor of device summary
2019-09-01 10:04:51 -10:00
b1ackmai1er
0307fe1aa9 Refactor of device summary cleanup 2019-09-01 21:51:31 +08:00
b1ackmai1er
4cc4fc0ffe Refactor of device summary floppy 2019-09-01 15:36:04 +08:00
b1ackmai1er
a3a4e84965 Refactor of device summary 2019-09-01 13:55:28 +08:00
b1ackmai1er
d478b3382e Merge pull request #11 from wwarthen/master
Resync
2019-08-31 19:37:14 +08:00
Wayne Warthen
b8930bd10a Cleanup 2019-08-29 12:36:54 -07:00
b1ackmai1er
d700a1bd1a Merge pull request #10 from wwarthen/master
Resync
2019-08-29 16:33:24 +08:00
Wayne Warthen
72fe10c00a Low Battery Test Refinements 2019-08-28 20:44:31 -07:00
Wayne Warthen
b3568c0142 Update xmhb.180
Additional cleanup of ASCI driver code.
2019-08-28 16:54:16 -07:00
Wayne Warthen
a7bd07b3ce Delete WSCHHELP.OVR
Make room in 1MB ROM disk image for FAT.COM.
2019-08-28 14:36:32 -07:00
Wayne Warthen
8a5ff459a7 Merge pull request #42 from b1ackmai1er/master
DS1210 Battery Low message on boot
2019-08-24 15:27:31 -10:00
b1ackmai1er
bff6e20946 DS1210 Battery Low message on boot
Remove debug code.
Resolve issue with battery status being lost on stack.
Battery status variable moved to DSRTC driver.
Fix build failures for DSRTCENABLE=FALSE (spk.asm requires dsrtc)
2019-08-24 13:41:02 +08:00
b1ackmai1er
f323246d4f Preliminary DS1210 batter low code
Battery state currently not being saved and recalled correctly
2019-08-24 07:21:40 +08:00
b1ackmai1er
c969e46519 Merge pull request #9 from wwarthen/master
Resync
2019-08-19 17:16:38 +08:00
Wayne Warthen
1c42ea0a7c Bug Fixes 2019-08-18 18:28:18 -07:00
Wayne Warthen
49b2255020 Merge pull request #41 from b1ackmai1er/master
Fix for usb-fifo boot display
2019-08-18 08:07:34 -07:00
b1ackmai1er
03c6cf9d51 Update dsrtc.asm
Make it easier to define customer battery or supercapacitor charge rates.
2019-08-18 21:07:06 +08:00
b1ackmai1er
a9780aa8be Fix for usb-fifo boot display 2019-08-18 20:22:04 +08:00
b1ackmai1er
9ec3d258bd Merge pull request #8 from wwarthen/master
Resync
2019-08-18 19:24:46 +08:00
Wayne Warthen
29d3476d68 Update ChangeLog.txt 2019-08-17 20:09:01 -07:00
Wayne Warthen
e4eee85274 ASCI Driver Interrupt Support
Also refactored XModem overlay
2019-08-17 20:08:34 -07:00
Wayne Warthen
5f7a396ced Add FAT ReadMe 2019-08-16 12:07:42 -07:00
Wayne Warthen
aeccf550e3 Add FAT.COM 2019-08-16 11:54:47 -07:00
Wayne Warthen
c8c1dd9c10 Merge pull request #40 from b1ackmai1er/master
xmodem for usb-fifo
2019-08-16 11:28:03 -07:00
b1ackmai1er
2398b48e29 xmodem for usb-fifo
Generates xmuf.com for usb-fifo file transfer. Is not included in the ROM drive build.
2019-08-16 23:20:00 +08:00
b1ackmai1er
88f45a4166 Merge pull request #7 from wwarthen/master
Configuration Files Cleanup
2019-08-16 19:17:20 +08:00
Wayne Warthen
522b72d9df Configuration Files Cleanup 2019-08-15 18:10:07 -07:00
b1ackmai1er
51cb56b064 Merge pull request #6 from wwarthen/master
Resync
2019-08-13 21:13:07 +08:00
Wayne Warthen
09044d1959 Add SC126 Platform 2019-08-11 18:39:03 -07:00
Wayne Warthen
38820a4f89 Merge pull request #39 from b1ackmai1er/master
Fix USB-FIFO build for other ECB platforms
2019-08-10 15:56:35 -07:00
b1ackmai1er
b96c87baf9 Update plt_n8.inc
Fix N8 build with ECB-FIFO
2019-08-10 19:43:39 +08:00
b1ackmai1er
d426e16216 Update plt_mk4.inc
Fix MkIV build with ECB-FIFO
2019-08-10 19:35:05 +08:00
b1ackmai1er
f613520ee9 Merge pull request #5 from wwarthen/master
Resync
2019-08-10 14:09:52 +08:00
Wayne Warthen
56c5710b3f Fix DPB selection in ASSIGN 2019-08-07 12:17:07 -07:00
Wayne Warthen
0b661442c5 SIO & ACIA Driver Updates 2019-08-04 17:51:29 -07:00
Wayne Warthen
d589a215ad Merge pull request #38 from b1ackmai1er/master
usb-fifo driver et al
2019-08-04 15:03:45 -07:00
b1ackmai1er
a8b0e9848b Create ReadMe.txt 2019-08-04 20:40:44 +08:00
b1ackmai1er
0031151008 Merge branch 'master' of https://github.com/b1ackmai1er/RomWBW 2019-08-04 20:32:11 +08:00
b1ackmai1er
8a560bfbbb Resync 2019-08-04 20:29:29 +08:00
b1ackmai1er
5417ae2155 Merge pull request #4 from wwarthen/master
Resync
2019-08-04 20:22:50 +08:00
b1ackmai1er
65bce62b26 Resync 2019-08-04 20:22:12 +08:00
b1ackmai1er
d22d83f2c8 Update hbios.asm
Fixup misisng driver
2019-08-04 19:48:26 +08:00
b1ackmai1er
12c99e9144 Resync 2019-08-04 19:30:52 +08:00
b1ackmai1er
a3844a0149 Resync 2019-08-04 19:03:16 +08:00
b1ackmai1er
cf9d077057 Resync 2019-08-04 18:36:06 +08:00
b1ackmai1er
7c622942e7 Update std.asm
Add support for changing default console through config.
2019-08-04 17:41:01 +08:00
b1ackmai1er
d89d68e816 Update usbfifo.asm
Add cable disconnect recognition
2019-08-04 15:29:43 +08:00
b1ackmai1er
8c49962102 Add capability to change which console is default 2019-08-04 02:32:51 +08:00
b1ackmai1er
ea4aea46d4 usb-fifo Update config files for other builds 2019-07-28 20:35:03 +08:00
b1ackmai1er
19033c018d Update usbfifo.asm
Cleanup
2019-07-28 19:56:47 +08:00
b1ackmai1er
32bdecb828 Add usb-fifo driver 2019-07-28 16:06:36 +08:00
Wayne Warthen
086957fd3f SIO Fixes 2019-07-23 18:16:30 -07:00
Wayne Warthen
7eeea3684b Update ReadMe.txt 2019-07-22 17:56:55 -07:00
Wayne Warthen
6f16fdc9d5 Support Multiple SIO Modules
Updated SIO driver to handle multiple SIO modules w/ auto-detect and protection for phantom ports.
2019-07-22 17:54:37 -07:00
Wayne Warthen
dcc1bd8cb7 Improved SD Error Messaging
Convert SD error to NO MEDIA when initial command fails.
2019-07-16 15:31:45 -07:00
Wayne Warthen
b85eda9649 Handle SPI w/ No Pullups
Updated SD driver to handle newer SD card adapters which omit the pullup resistors in the SD Card spec.
2019-07-15 12:38:11 -07:00
b1ackmai1er
c210b5941e Update pio.asm 2019-07-15 22:44:18 +08:00
b1ackmai1er
de72e05a45 Merge branch 'master' of https://github.com/b1ackmai1er/RomWBW 2019-07-15 19:06:55 +08:00
Wayne Warthen
31b2192f22 RTC Port Shadow Register
Implemented a shadow copy of the RTC port value to enable multiple drivers to share the port without causing side effects to other drivers that use other bits of the RTC port.
2019-07-14 14:00:00 -07:00
b1ackmai1er
2480976308 Update pio.asm
Major restructure
2019-07-14 20:38:51 +08:00
Wayne Warthen
5958f7760e Add SC126 DSRTC Support
Updated DSRTC support to avoid mangling bits used for other purposes in RTC latch port.
2019-07-12 15:17:29 -07:00
Wayne Warthen
9a3e3e443c SC126 Diag Port
Make diagnostic port existence and port address configurable.
2019-07-11 19:25:40 -07:00
b1ackmai1er
056f8eab5f Merge pull request #3 from wwarthen/master
Resync
2019-06-22 11:30:04 +08:00
Wayne Warthen
784fd1f433 Merge branch 'master' of https://github.com/wwarthen/RomWBW 2019-06-21 14:17:59 -07:00
Wayne Warthen
293ca770de SC126 Support and SIO Update 2019-06-21 14:17:46 -07:00
Wayne Warthen
64203d4796 Merge pull request #35 from b1ackmai1er/master
Invalid BIOS (signature missing)
2019-06-10 15:16:11 -07:00
b1ackmai1er
1ca508dc2e Invalid BIOS (signature missing)
DS1210 datasheet "The fourth function the DS1210 performs is a battery status warning so that potential data loss is avoided. Each time that the circuit is powered up the battery voltage is checked with a precision comparator. If the battery voltage is less than 2.0 volts, the second memory cycle is inhibited.  Battery status can, therefore, be determined by performing a read cycle after power-up to any location in memory, verifying that memory location content. A subsequent write cycle can then be executed to the same memory location altering the data. If the next read cycle fails to verify the written data, then the batteries are less than 2.0V and data is in danger of being corrupted"

This also works:

	LD	HL,HBX_IMG-2
	LD	DE,HBX_LOC-2
	LD	BC,HBX_SIZ+2
	LDIR

Regards Phil
2019-06-10 22:54:24 +08:00
b1ackmai1er
260d7c0054 Merge branch 'master' of https://github.com/b1ackmai1er/RomWBW 2019-06-10 22:33:46 +08:00
Wayne Warthen
b0aab772ef Finalize v2.9.1 2019-06-03 16:13:46 -07:00
b1ackmai1er
b560f1d3a9 Resync 2019-05-30 19:31:00 +08:00
b1ackmai1er
ca3ba80fd8 Merge pull request #2 from wwarthen/master
Resync
2019-05-30 06:08:31 +08:00
Wayne Warthen
3a1e9f3b72 Cleanup 2019-05-29 14:57:56 -07:00
Wayne Warthen
8197caa4ef Merge pull request #34 from b1ackmai1er/master
Add debugging module mio
2019-05-29 14:41:08 -07:00
b1ackmai1er
c39c27009b Add debugging module mio
Cached debug out
2019-05-28 18:59:17 +08:00
Wayne Warthen
9a15a1796d Merge pull request #33 from b1ackmai1er/master
Additional German Keyboard mapping
2019-05-27 11:52:14 -07:00
b1ackmai1er
4a2dfd7f4a Additional German Keyboard mapping 2019-05-27 17:36:41 +08:00
Wayne Warthen
fa7ae387bf Cleanup 2019-05-26 12:56:24 -07:00
Wayne Warthen
bfc0fa8345 Cleanup 2019-05-26 12:42:56 -07:00
Wayne Warthen
f9c82467cb Merge pull request #32 from b1ackmai1er/master
Add German keyboard layout to ppk and kbd
2019-05-26 12:24:51 -07:00
b1ackmai1er
03fc29d297 Fix local variables in macros
Underscore breaks local variable use in pio driver
2019-05-26 14:10:00 +08:00
b1ackmai1er
ccf8d06c8f Add German keyboard layout to ppk and kbd
From Joachim - joachim.liebold@arcor.de
2019-05-26 10:41:36 +08:00
Wayne Warthen
f624082a62 Finalize v0.9.1-pre.15 2019-05-25 16:52:53 -07:00
b1ackmai1er
cffd109179 Merge pull request #1 from wwarthen/master
Resync
2019-05-25 12:22:49 +08:00
Wayne Warthen
346b190f97 Minor Cleanup 2019-05-24 18:13:21 -07:00
Wayne Warthen
aaaac827d1 Merge pull request #31 from b1ackmai1er/master
Display Z180 processor type at boot.
2019-05-24 16:47:33 -07:00
b1ackmai1er
4860cd945f Update hbios.asm 2019-05-23 23:21:48 +08:00
b1ackmai1er
6106e1600f Update hbios.asm 2019-05-22 21:50:11 +08:00
b1ackmai1er
2d8cd1538f Update hbios.asm 2019-05-22 21:39:26 +08:00
Wayne Warthen
824580de66 Merge pull request #30 from wwarthen/dev
Dev
2019-05-18 11:24:27 -07:00
Wayne Warthen
9cde0994fc Merge pull request #29 from b1ackmai1er/dev
Add  N8 Beep
2019-05-18 11:18:42 -07:00
b1ackmai1er
9e5f7331b1 Add N8 Beep 2019-05-18 15:45:24 +08:00
Wayne Warthen
5551fb9df1 Cleanup IntTest 2019-05-15 21:39:21 -07:00
Wayne Warthen
af892d719c Native RC Z180 & Interrupt Framework Improvements
- Added official support for Steve Cousin's RC2014 Z180 + Native Memory modules (SC111 & SC119).  Thanks to Steve for his assistance with this.
- Improved interrupt framework to remove need to extra stubs for each IM2 interrupt handler.
2019-05-15 15:30:29 -07:00
Wayne Warthen
7121a62b36 Update Doc 2019-05-10 18:33:20 -07:00
Wayne Warthen
68d02e5572 Improvements to INTTEST 2019-05-10 18:07:27 -07:00
Wayne Warthen
040337eaf4 Finalize v2.9.1-pre.13 2019-05-08 18:20:06 -07:00
Wayne Warthen
5196a56267 Support LBA Access for Floppy Devices 2019-05-06 19:26:59 -07:00
Wayne Warthen
e3805d4138 Minor Cleanup 2019-04-22 16:03:02 -07:00
Wayne Warthen
b334a4224d Fix CTC Support 2019-04-21 13:38:31 -07:00
Wayne Warthen
dcbda8806e Add CTC Timer Support
Add periodic timer interrupt support for CTC platforms Easy Z80 and Zeta 2.  Includes watchdog servicing for Easy Z80.  Default interrupt mode for Easy Z80 and Zeta 2 is now IM2.
2019-04-20 15:55:25 -07:00
Wayne Warthen
8fa9ef8d06 Fix Minor Build Issue
Recent addition of PIO driver caused breakage in some builds.  Default config files updated to fix this.
2019-04-19 11:21:38 -07:00
Wayne Warthen
97dbc7847b Minor Fixes
Revert interrupt processing bank id and SLR180 application.
2019-04-10 11:46:12 -07:00
Wayne Warthen
f0c62ceef1 Merge branch 'master' of https://github.com/wwarthen/RomWBW 2019-04-09 15:39:03 -07:00
Wayne Warthen
efad064619 CPM Build Tools Updates
Updated a few of the CP/M binaries used in the build process.
2019-04-09 15:38:49 -07:00
Wayne Warthen
1f3d2a7611 Merge pull request #27 from b1ackmai1er/master
PIO driver
2019-04-09 15:31:56 -07:00
b1ackmai1er
57ac1ca1fb Fix IM2 assembly error. Add 2nd PIO on ECP-ZP 2019-04-09 23:29:19 +08:00
b1ackmai1er
21acf463ba Delete pio.asm 2019-04-09 23:28:06 +08:00
b1ackmai1er
8d3c7a1859 Delete hbios.asm 2019-04-09 23:27:54 +08:00
b1ackmai1er
328453309a Fix IM2 assembly error. Add 2nd PIO on ECB-ZP 2019-04-09 23:26:55 +08:00
b1ackmai1er
6606baebe9 Fix IM2 assembly error. Add second ECB-ZP PIO chip. 2019-04-09 23:25:57 +08:00
b1ackmai1er
4594e990a6 PIO Updates 2019-04-08 20:12:35 +08:00
b1ackmai1er
1e7e28a065 Delete pio.asm 2019-04-08 20:11:59 +08:00
b1ackmai1er
56150ef85f PIO Updates 2019-04-08 20:11:24 +08:00
b1ackmai1er
de208491dc PIO build 2019-04-05 22:55:59 +08:00
b1ackmai1er
b9b1fecbfa Merge pull request #1 from wwarthen/master
Resync
2019-04-02 20:13:30 +08:00
Wayne Warthen
580d4ddf25 DDT & DDTZ Update
DDT & DDTZ updated with versions that use RST 30 instead of RST 38 to avoid conflicts with IM 1 interrupts.
2019-03-26 17:01:45 -07:00
Wayne Warthen
35d3408ab6 Floppy Driver Updates
Minor fixes in fd.asm.
2019-03-16 16:41:37 -07:00
Wayne Warthen
dcd4a5a8f1 Easy Z80 Platform
Make Easy Z80 a separate platform.
2019-03-15 15:16:49 -07:00
Wayne Warthen
dd4c51db97 Merge pull request #26 from wwarthen/master
Refresh Development Branch
2019-03-12 14:51:46 -07:00
Wayne Warthen
a6cc5c0986 Merge pull request #25 from b1ackmai1er/master
SIO & VDU updates
2019-03-12 14:44:34 -07:00
b1ackmai1er
c79d497063 VDU mode updates 2019-03-12 23:02:03 +08:00
b1ackmai1er
8d30252044 Add missing baud rate 2019-03-12 22:47:40 +08:00
Wayne Warthen
20c291dea2 VDU Driver Enhancements
VDU driver enhanced to support alternate screen simensions, provided by Phil Summers
2019-03-05 21:05:08 -08:00
Wayne Warthen
b79c1e7a2f Minor Easy Z80 Tweaks
Modified naming convention from EZ80 to EZZ80 to avoid confusion with Zilog eZ80 processor.
2019-03-04 21:33:44 -08:00
Wayne Warthen
825c2d340b Merge pull request #24 from skiselev/master
Add support for Easy Z80
2019-02-28 20:40:57 -08:00
Sergey Kiselev
810beae712 Eazy Z80: Specify SIO clock frequency
Signed-off-by: Sergey Kiselev <skiselev@gmail.com>
2019-02-27 10:13:41 -08:00
Sergey Kiselev
7ba9bd6e67 Add support for Eazy Z80
Signed-off-by: Sergey Kiselev <skiselev@gmail.com>
2019-02-27 09:38:05 -08:00
Wayne Warthen
9c43e63d1b ROM Loader INT Management
Modified ROM Loader to leave interrupts active when launching target image.
2019-02-20 11:46:29 -08:00
Wayne Warthen
0fe4c5e6f8 Finalize v2.9.1 Prerelease 9
Stability fixes.
2019-02-19 13:41:14 -08:00
Wayne Warthen
931d33eb11 Finalize v2.9.1 Prerelease 8
Fix possible int mode 1 processing paging conflicts.
2019-02-18 15:16:30 -08:00
Wayne Warthen
6f712f4f01 Minor Updates 2018-12-24 14:39:47 -08:00
Wayne Warthen
8d0e25c8a6 Merge pull request #23 from dimitrit/master
Update Tasty Basic
2018-12-24 10:51:14 -08:00
dimitrit
5c4bf2ad89 Update Tasty Basic 2018-12-23 18:47:52 +00:00
Wayne Warthen
92bdce5eb1 Small PPIDE Driver Fix
Remove use of IDE NOP command during probe.
2018-12-12 15:37:24 -08:00
Wayne Warthen
d7f68775ce Various Cleanup 2018-11-26 20:49:22 -08:00
Wayne Warthen
877d868745 Refactoring 2018-11-20 19:29:23 -08:00
Wayne Warthen
82e7b3d813 Refactor DSKY Monitor 2018-11-17 16:10:22 -08:00
Wayne Warthen
c6a3750ea5 Update Doc/ChangeLog.txt 2018-11-14 15:34:42 -08:00
Wayne Warthen
fd5636229d Monitor and RomLdr Updates 2018-11-14 15:27:51 -08:00
Wayne Warthen
a69a1cc930 Merge pull request #21 from b1ackmai1er/master
Update to support romldr loading ROMs at 200h. nascom basic, forth etc.
2018-11-10 12:39:56 -08:00
b1ackmai1er
fd41ef179e Update to support romldr loading ROMs at 200h. nascom basic, forth etc. 2018-11-10 16:06:07 +08:00
b1ackmai1er
2a4455aa9c Update to org 200h 2018-11-10 16:00:06 +08:00
Wayne Warthen
7ed82106a3 Merge pull request #20 from b1ackmai1er/master
Romldr now uses one routine to execute code.
2018-11-09 11:50:53 -08:00
b1ackmai1er
982744b6c9 Tidy up Romldr 2018-11-10 01:13:32 +08:00
b1ackmai1er
cccf49d8bd Delete romldr.asm 2018-11-10 01:12:45 +08:00
b1ackmai1er
082c101845 Tidy up Romldr 2018-11-10 01:10:48 +08:00
b1ackmai1er
c8ba301d45 Romldr now uses one routine to execute code. 2018-11-10 00:17:15 +08:00
b1ackmai1er
2701c43161 Merge pull request #3 from wwarthen/master
Resync
2018-11-09 16:32:04 +08:00
Wayne Warthen
dd73ec092b Finish DBGMON and Cleanup 2018-11-08 18:21:26 -08:00
Wayne Warthen
03fd4f030b More DBGMON Refinements 2018-11-08 12:20:33 -08:00
Wayne Warthen
2c8399dfcf More DBGMON Cleanup 2018-11-08 12:04:28 -08:00
Wayne Warthen
229f040d43 Merge pull request #19 from b1ackmai1er/master
RTC now has reboot option. Previous reboot.com code to be removed
2018-11-08 11:44:30 -08:00
b1ackmai1er
b2788ca1ee Add add reboot option, code optimization. As part of reverting reboot.com.
RTC does not use HBIOS RTC functions.
2018-11-08 11:37:40 +08:00
b1ackmai1er
2dbc4f9a9d Update Build.ps1 2018-11-08 11:31:33 +08:00
b1ackmai1er
2fac781a0a Update Build.cmd 2018-11-08 11:29:30 +08:00
b1ackmai1er
07ebb83cac Delete reboot.asm 2018-11-08 11:28:21 +08:00
b1ackmai1er
52aff2a304 Merge pull request #2 from wwarthen/master
Resync
2018-11-08 09:42:08 +08:00
Wayne Warthen
53286700f7 Rearranged OSIMG ROM bank
The OSIMG bank needed more space allocated to ROMLDR.
2018-11-07 16:10:16 -08:00
Wayne Warthen
c3a9624040 Merge pull request #18 from b1ackmai1er/master
Force DS1302 charging at reboot.
2018-11-07 12:42:44 -08:00
b1ackmai1er
1dbc6ea740 Add a command to return to bootldr 2018-11-07 16:25:37 +08:00
b1ackmai1er
26dea9aa33 Add a command to return to bootldr 2018-11-07 16:24:14 +08:00
b1ackmai1er
d686f982cc Add a command to return to bootldr 2018-11-07 16:21:10 +08:00
b1ackmai1er
7cdad0b4ed Add option to force DS1302 RTC to turn on super caps and battery recharging at boot. 2018-11-07 15:15:12 +08:00
b1ackmai1er
04084b31aa Merge pull request #1 from wwarthen/master
Resync
2018-11-07 12:56:53 +08:00
Wayne Warthen
48fa2a027d Merge pull request #17 from b1ackmai1er/master
Further optimizations to romldr and update to documentation.
2018-11-06 19:52:26 -08:00
Wayne Warthen
8586202ae2 Minor Cleanup 2018-11-06 19:51:20 -08:00
b1ackmai1er
445943d253 Include some information on included ROM software. 2018-11-07 11:48:35 +08:00
b1ackmai1er
1682a41e40 Fix DSKY menu option 2018-11-07 10:30:49 +08:00
b1ackmai1er
7c302ba456 Add Reboot menu option. Some optimizations of error message display 2018-11-07 09:44:23 +08:00
b1ackmai1er
ab32774e68 Update layout documentation with recent ROM changes 2018-11-07 08:51:59 +08:00
Wayne Warthen
2633a7711d Merge pull request #16 from b1ackmai1er/master
CamelForth ROMWBW
2018-11-06 14:33:23 -08:00
b1ackmai1er
e2400a535c Updated to DSKY and BootAuto in romldr
Still more work to be done. Enabling DSKY make the bin file to large for the allocated ROM space.
2018-11-06 21:16:03 +08:00
b1ackmai1er
42cf223f4e Unified Menu structure for romldr to ease intergration of ROMs 2018-11-06 16:01:14 +08:00
b1ackmai1er
5f1c2a3e8c Update to build CamelForth 2018-11-05 16:53:18 +08:00
b1ackmai1er
0838624a79 Assembler for Camel Forth 2018-11-05 16:51:06 +08:00
b1ackmai1er
9fad7db460 CamelForth ROMWBW updated to finish on page ending 2018-11-05 16:33:58 +08:00
b1ackmai1er
5f7f902ba1 CamelForth ROMWBW in OSIMG1 2018-11-05 16:31:07 +08:00
b1ackmai1er
9bc2cb5328 CamelForth ROMWBW first working version 2018-11-05 14:43:38 +08:00
b1ackmai1er
e95eb28fe6 First version with HBIOS Character IO (but not working) 2018-11-05 13:31:13 +08:00
b1ackmai1er
518478c793 Fix some mangling I did t- returned to original 2018-11-04 11:42:44 +08:00
b1ackmai1er
f77eedf4b4 Forth BIN file gets copied to HBIOS directory for assembly into ROM 2018-11-04 11:38:05 +08:00
b1ackmai1er
b5703e8177 First build with Forth to ROM (still CP/M version) 2018-11-04 11:36:10 +08:00
b1ackmai1er
a97284c18d Delete camel80.hex 2018-11-04 11:11:32 +08:00
b1ackmai1er
6703f3b74c Delete camel80.bin 2018-11-04 11:11:18 +08:00
b1ackmai1er
22f30c06f7 Delete camel80.prn 2018-11-04 11:10:47 +08:00
b1ackmai1er
60cfebfcfa Initial CamelForth commit 2018-11-04 11:09:09 +08:00
b1ackmai1er
f2892e5927 Create readme.z80 2018-11-04 11:07:49 +08:00
Wayne Warthen
4cc4d83ef9 Merge pull request #15 from b1ackmai1er/master
Move along, nothing to see here
2018-10-30 15:32:53 -07:00
b1ackmai1er
f45e316a8c Move along, nothing to see here 2018-10-30 23:01:42 +08:00
Wayne Warthen
2c5f0ee332 Merge pull request #14 from b1ackmai1er/master
Add BASIC support through usage of empty ROM bank
2018-10-29 20:50:28 -07:00
b1ackmai1er
164627f794 Ensure we have all Nascom changes 2018-10-30 06:03:19 +08:00
b1ackmai1er
39b7b08932 Cleanup, get ready for merge. No PIO support yet 2018-10-30 06:00:57 +08:00
b1ackmai1er
127d5bc676 Delete romldr.asm 2018-10-30 05:59:27 +08:00
b1ackmai1er
5b1348d123 Delete hbios.asm 2018-10-30 05:59:13 +08:00
b1ackmai1er
2f9cd64489 Delete cfg_sbc.asm 2018-10-30 05:58:59 +08:00
b1ackmai1er
81eacdda24 Cleanup, get ready for merge. No PIO support yet 2018-10-30 05:57:19 +08:00
b1ackmai1er
c33adf6cf7 Move and align buffers and stack to end of RAM 2018-10-29 23:21:22 +08:00
b1ackmai1er
d29ce909a0 Fix I/O, buffers and stack 2018-10-28 22:57:28 +08:00
b1ackmai1er
aaf957af4e Update build process to build additonal ROM image 2018-10-28 18:02:06 +08:00
b1ackmai1er
eb107c9b54 Update build process to build additonal ROM image 2018-10-28 15:33:44 +08:00
b1ackmai1er
40b40b7fa5 Support for additional rom options including Nascom and Tasty BASIC 2018-10-28 14:39:20 +08:00
b1ackmai1er
a28bfc157b Extend serial device type to support 4 devices including parallel port device. 2018-10-07 17:11:52 +08:00
b1ackmai1er
9d372a54cc Delete hbios.asm 2018-10-07 17:10:55 +08:00
b1ackmai1er
b5b29fcb32 Delete hbios.inc 2018-10-07 17:10:41 +08:00
b1ackmai1er
f7fc9dc564 Delete pio.asm 2018-10-07 17:10:15 +08:00
b1ackmai1er
e15c2201ee Add Bi-Directional port type to CharIO Parallel port type 2018-10-07 16:53:01 +08:00
b1ackmai1er
a69218877c Extend serial device type to support 4 devices including parallel port device. 2018-10-07 15:45:46 +08:00
b1ackmai1er
f4953e6394 Framework for Parallel port driver for ECB-Zilog-Peripherals & ECB-4PIO 2018-10-06 23:53:11 +08:00
Wayne Warthen
b6ca264e88 Add SmallZ80 Support to FDU 2018-09-28 17:46:18 -07:00
Wayne Warthen
3279f78ced Update Changelog 2018-09-28 09:08:38 -07:00
Wayne Warthen
00935edaa1 Merge pull request #13 from b1ackmai1er/master
Display more config info at DS1302 RTC initialization
2018-09-28 07:35:55 -07:00
b1ackmai1er
97e9339bc9 Display more config info at DS1302 RTC initialization
For systems which use Super capacitor or rechargable battery, trickle charge status is displayed. Good for users with ECB-RAMF for example. Trickle charge can be turned on/off with the RTC.COM utility and the status set will now be display at boot time.
2018-09-28 19:01:48 +08:00
Wayne Warthen
6fb53c08d5 Merge pull request #12 from b1ackmai1er/master
Display more config info at ECB-RAMF initialization
2018-09-27 19:12:37 -07:00
b1ackmai1er
f7cf537454 Display more config info at ECB-RAMF initialization 2018-09-27 20:59:37 +08:00
Wayne Warthen
83bc6af3a6 Update Architecture Document 2018-09-02 17:55:31 -07:00
Wayne Warthen
f5294a19d7 Preliminary Support for Interrupt Management API 2018-08-28 18:55:31 -07:00
Wayne Warthen
5b08693ba2 Beep Support Updates 2018-08-21 16:45:22 -07:00
Wayne Warthen
b084b075e6 Merge pull request #10 from b1ackmai1er/master
Add startup beep support for SBC V2 using PSG on TMS or bit port on SBC RTC
2018-08-21 13:09:48 -07:00
b1ackmai1er
78267d5111 Beep support and cleanup 2018-08-20 19:42:28 +08:00
b1ackmai1er
f982a5e67b Fix to enable PSG without TMS 2018-08-20 19:40:39 +08:00
b1ackmai1er
b4a7805033 Changes to support SBC beep 2018-08-20 17:59:52 +08:00
b1ackmai1er
6bec8936a9 Changes to support SBC beep 2018-08-20 17:56:22 +08:00
b1ackmai1er
67deaf3949 Changes to support SBC beep 2018-08-20 17:52:07 +08:00
b1ackmai1er
0f6f1077c5 Changes to support SBC beep 2018-08-20 17:49:05 +08:00
b1ackmai1er
1d59af182e Changes to support SBC beep 2018-08-20 17:45:32 +08:00
b1ackmai1er
060418d5d9 Add supporting definitions for beep sound 2018-08-20 17:02:58 +08:00
b1ackmai1er
64901dcbbb Add beep driver for PSG and IOPort 2018-08-20 16:58:45 +08:00
b1ackmai1er
2e8d44d005 Add beep on boot 2018-08-20 16:56:05 +08:00
b1ackmai1er
c99293d94e Merge pull request #1 from wwarthen/master
Resync to master
2018-08-04 09:14:00 +08:00
Wayne Warthen
64f2e37ffb Add IM0 Mode to ACIA Driver 2018-08-03 16:46:44 -07:00
Wayne Warthen
716ee19f6c Merge pull request #9 from b1ackmai1er/master
Fixed wrong port address, cleanups and move big conditional structure to external file.
2018-08-03 12:02:58 -07:00
b1ackmai1er
1fc2017db5 Fix typo. 2018-08-03 22:45:13 +08:00
b1ackmai1er
e7cc7906c5 Fixes to port address and cleanups 2018-08-03 22:40:07 +08:00
b1ackmai1er
41c5eba034 Delete sio.asm 2018-08-03 22:38:58 +08:00
b1ackmai1er
f66b6f155e Fixes port address and cleanups 2018-08-03 22:37:17 +08:00
b1ackmai1er
add0f3df07 Separate the baud encoding conditional for readability 2018-08-03 19:46:24 +08:00
Wayne Warthen
34f55f6024 Fix Bug in SIO Driver Update 2018-08-02 15:10:46 -07:00
Wayne Warthen
331760cd5c Add IM0 Mode to SIO Driver 2018-08-02 14:51:18 -07:00
Wayne Warthen
42ad81285f Minor Cleanup 2018-08-01 16:36:04 -07:00
Wayne Warthen
14f73f3dd2 Merge pull request #8 from b1ackmai1er/master
SBC V2 - Zilog Peripherals support using RC2014 driver.
Credit to Phil Summers for this work.
2018-07-31 17:47:45 -07:00
b1ackmai1er
e768dc2d5f Add data bit setting support 2018-07-31 23:24:40 +08:00
b1ackmai1er
d0ee99fff2 Inline the serial format code and add stop bit setting 2018-07-30 23:14:15 +08:00
b1ackmai1er
1b565de9ce Fix incorrect equate causing RC build failure 2018-07-30 18:28:01 +08:00
b1ackmai1er
0a324564d5 Fix bad equate causing RC build to fail 2018-07-30 18:23:10 +08:00
b1ackmai1er
206b3ffcd2 Add configurable baud rate through mode.com 2018-07-29 23:09:58 +08:00
b1ackmai1er
398dec28e9 Add basic support for configurable port and baud 2018-07-29 17:34:20 +08:00
b1ackmai1er
0e8b6aecb7 Delete sio.asm 2018-07-29 17:31:27 +08:00
b1ackmai1er
5d0906aef6 Add basic support for configurable port and baud 2018-07-29 17:30:02 +08:00
b1ackmai1er
f1448fde6e Add basic support for configurable port and baud 2018-07-29 17:12:04 +08:00
b1ackmai1er
6d7ac7a06c Add Config defaults for multiplatform SIO 2018-07-29 16:23:56 +08:00
b1ackmai1er
0010dc8c81 Add Config defaults for multiplatform SIO 2018-07-29 15:46:46 +08:00
b1ackmai1er
d93a85c1d4 Add equated for configurable SIO platform and and missing serial baud rate equates 2018-07-29 15:05:56 +08:00
b1ackmai1er
490e3e49f8 Add definable base address for SIO 2018-07-29 14:48:01 +08:00
b1ackmai1er
0a2654a761 Add definable base address for SIO 2018-07-29 14:33:56 +08:00
Wayne Warthen
ae2c3b113c Fixed MODE Command Bug
Credit to Phil Summers
2018-07-24 14:12:19 -07:00
Wayne Warthen
d43ef1728c Update RomList 2018-06-06 11:55:43 -07:00
Wayne Warthen
cb9ead08c7 Finalize support for RC180 platform 2018-06-06 11:45:10 -07:00
Wayne Warthen
e0509aafe1 Minor Cleanup 2018-05-24 10:18:06 -07:00
Wayne Warthen
99b8409738 Added Diagnostic Port Support 2018-05-24 09:28:21 -07:00
Wayne Warthen
05641bdec0 RC180 Platform and XM Bug Fix
- Added RC180 platform (not tested!)
- Fixed file send problem in XModem on RC2014
- Added NZCOM distribution files to hard disk 0, slice 2
2018-05-21 16:18:54 -07:00
Wayne Warthen
b09f30ed41 PPIDE Driver Fix
Fixed missing DRV/HD register setup for writes in PPIDE driver.
2018-05-03 12:39:51 -07:00
Wayne Warthen
e1d2eb1ecd Comments in PowerShell Build Script 2018-05-02 15:04:47 -07:00
Wayne Warthen
2872381c7d Handle LST: better
- LST: auto mapped to second serial port if available
- Minor updates to Prop ANSI emulation
2018-05-01 09:10:12 -07:00
Wayne Warthen
1f594e1004 Finalize v2.9.1-pre.1 2018-04-19 19:56:20 -07:00
Wayne Warthen
0834762f6e Add BEL functionality from Michael Schweikert
Added BEL functionality to Propeller-based consoles
Build directory cleanup
2018-03-12 16:24:46 -07:00
Wayne Warthen
091d171f02 Finalize v2.9.1 Prerelease 0
Added character attributes on propeller-based consoles.
2018-03-11 17:35:04 -07:00
Wayne Warthen
86b11cca5f Minor SD driver fix
Fix SD driver to build properly when IDE driver is not in use.
2018-02-27 12:45:25 -08:00
Wayne Warthen
2232c87fdb Update Win32DiskImager to v1.0 2018-01-29 12:11:29 -08:00
Wayne Warthen
82619da3fd Add TUNE application
The TUNE application replaces the previous PTXPLAY application and now
supports MYM sounds files in addition to PT2 and PT3.
2018-01-28 17:22:48 -08:00
Wayne Warthen
aef2561f2a Merge pull request #6 from electrified/add-rc2014-rtc-support
Add support for DS1302 clock on RC2014
2018-01-27 11:34:12 -08:00
Ed
dc26d38a36 Add support for DS1302 clock on RC2014 2018-01-27 17:35:03 +00:00
Wayne Warthen
55d7b5e80e Finalize v2.9.0 2018-01-26 16:17:30 -08:00
Wayne Warthen
231239f43f Finalize v2.9.0 Prerelease 0
- New function dispatching logic
- Refactored interrupt management
2018-01-16 16:30:37 -08:00
Wayne Warthen
5fc01b4100 Finalize RC2014 floppy updates
RC2014 floppy controller support completed and tested for Scott Baker
SMC and WDC controller modules.  FDU application updated as well.
2018-01-08 16:45:43 -08:00
Wayne Warthen
768e41c933 New disk driver interface logic 2018-01-07 15:04:00 -08:00
Wayne Warthen
cedb584722 Merge pull request #5 from electrified/fix-rc2014-cf-config
CF IDE mode setting was being written to PPIDE variable in RC2014 standard config
2018-01-07 08:50:50 -08:00
ed
234bb0bbe5 IDE mode setting was being written to PPIDE variable in RC2014
standard config
2018-01-07 10:41:03 +00:00
Wayne Warthen
fb63612ebf RC2014 Floppy
- Support for RC2014 SMB Floppy (WDC & SMC), but not yet tested.
- Final work on Multi-Sector I/O
2018-01-01 16:12:12 -08:00
Wayne Warthen
c9869344e2 Disk Driver Multi-Sector I/O
Added multi-sector I/O to all disk drivers.
Added SMB variant to PPIDE driver.
2017-12-29 16:57:06 -08:00
Wayne Warthen
409c306474 Update Survey App
Updated SURVEY app to properly handle Z80 16 bit I/O port addressing.
Minor improvements to FDU.
2017-12-17 14:53:11 -08:00
Wayne Warthen
05376b6173 FDU App Updates
- Improve read/write sector performance in FDU to avoid spurious overrun
errors.
- Fix boot loader under UNA
2017-12-16 16:45:28 -08:00
Wayne Warthen
09d0e3754f Fix Boot Loader for UNA 2017-12-12 19:49:14 -08:00
Wayne Warthen
feee56990a Finalize 2.8.6
- Support for RC2014
- Handle IDE disk spinup without timing out
2017-12-10 19:54:34 -08:00
Wayne Warthen
b02d9bf1fa Finalize v2.8.6-pre.1 2017-12-06 13:11:56 -08:00
Wayne Warthen
984a4c6ff3 Fix Build Script Issue 2017-12-03 18:04:19 -08:00
Wayne Warthen
99ec7049f7 Implement Auto PROFILE.SUB Execution on Boot
Updated CBIOS to look for PROFILE.SUB on the boot drive and SUBMIT it
automatically at cold boot if it exists.  Also patched SUBMIT.COM to
force temporary file onto A: to ensure immediate execution of SUBMITed
files.
2017-12-03 15:17:44 -08:00
Wayne Warthen
4a9d3c654f Modify RTC.COM to dynamically adjust to hardware
RTC.COM is now one application instead of one per hardware platform.  It
adjusts to the running platform by querying HBIOS for the active
platform.
2017-11-29 18:39:49 -08:00
Wayne Warthen
c171dd329d Add Support for PPIDE on RC2014 2017-11-28 17:30:41 -08:00
Wayne Warthen
584c3b0aa3 Fix DSD Detection 2017-11-26 21:21:46 -08:00
Wayne Warthen
a2cfb95574 Merge pull request #4 from electrified/adjustments-for-scott-bakers-sio
Adjust port mapping for Scott Baker's SIO board
2017-11-26 19:21:33 -08:00
Ed
46b74f8e94 Adjust port mapping for Scott Baker's SIO board 2017-11-26 17:47:55 +00:00
Wayne Warthen
d27fa8a587 Add Option for SMB SIO Module 2017-11-24 21:02:32 -08:00
Wayne Warthen
4579b1fd9c Merge pull request #3 from electrified/ppide-fix
Don't care if disabling 8-bit transfers fails on 16-bit drives
2017-11-24 08:20:04 -08:00
Ed
8e7f41cd08 Don't care if disabling 8-bit transfers fails on 16-bit drives 2017-11-23 23:03:55 +00:00
Wayne Warthen
4c91264062 Update Documentation Files
Updated ReadMe files to reflect addition of RC2014 platform.
2017-11-22 13:41:23 -08:00
Wayne Warthen
366bb7301f Propagate IDE Fix to PPIDE
Credit to Ed Brindley
2017-11-22 13:26:40 -08:00
Wayne Warthen
9635d5933e Finalize v2.8.6 Prerelease 0
Adds ACIA support
Adds IM1 interrupt chaining
Fixes IDE SETFEAT issue
2017-11-21 17:04:23 -08:00
Wayne Warthen
ad55977d4a Fix IDE Detection on RC2014 2017-11-09 14:12:10 -08:00
Wayne Warthen
8863b071da XMODEM Bug Fixes 2017-11-09 12:10:22 -08:00
Wayne Warthen
a60eb57a47 Add RC2014 Support to XMODEM App 2017-11-08 19:11:15 -08:00
Wayne Warthen
51a33aaf0b SIO Driver Interrupt Based Receive 2017-11-07 18:21:11 -08:00
Wayne Warthen
a5bb6a2b7e Preliminary RC2014 Support 2017-11-05 18:12:02 -08:00
Wayne Warthen
7014a33285 Finalize 2.8.5
Clean up support in TMS driver for SCG board.
2017-10-09 15:31:23 -07:00
Wayne Warthen
e8d9671753 Finalize v2.8.4
Small bug fixes
2017-09-03 17:22:53 -07:00
Wayne Warthen
8deca61094 Enhanced FDU
FD renamed to FDU and enhanced to select FDC at startup to eliminate
multiple build variations.
2017-09-02 15:43:02 -07:00
Wayne Warthen
d5936b7fb5 Minor App Updates
Improve handling of UNA in XModem and MODE commands.
2017-08-28 17:15:28 -07:00
1690 changed files with 132422 additions and 36301 deletions

31
.github/workflows/commit.yml vendored Normal file
View File

@@ -0,0 +1,31 @@
name: Commit Build
on:
push:
branches:
- master
tags-ignore:
- v*
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: rlespinasse/github-slug-action@1.1.0
- uses: actions/checkout@v2
- name: Build
run: |
sudo apt-get install libncurses-dev
make
make clean
rm -rf .git*
- name: Upload Artifact
uses: actions/upload-artifact@v1
with:
name: RomWBW-${{env.GITHUB_REF_SLUG}}-${{env.GITHUB_SHA_SHORT}}
path: .

51
.github/workflows/release.yml vendored Normal file
View File

@@ -0,0 +1,51 @@
name: Release Build
on:
release:
types: published
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Create Package Label
run: |
LABEL=`echo "$GITHUB_REF" | sed "s|^refs/tags/||"`
echo "::set-env name=PKGLBL::$LABEL"
- name: Display Diagnostics
run: |
echo PKGLBL: "$PKGLBL"
echo Upload URL: "${{github.event.release.upload_url}}"
echo GITHUB_TOKEN: "${{secrets.GITHUB_TOKEN}}"
- name: Build
run: |
sudo apt-get install libncurses-dev
make
make clean
rm -rf .git*
- name: Upload Artifact
uses: actions/upload-artifact@v1
with:
name: RomWBW-${{env.PKGLBL}}-Package
path: .
- name: Create Package Archive
run: |
zip -r Package.zip .
- name: Upload Release Asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
with:
upload_url: ${{github.event.release.upload_url}}
asset_path: Package.zip
asset_name: RomWBW-${{env.PKGLBL}}-Package.zip
asset_content_type: application/zip

96
.gitignore vendored Normal file
View File

@@ -0,0 +1,96 @@
# Not sure what patterns to apply
# So ignoring all generated files explicitly
**/*.[Bb][Ii][Nn]
**/*.[Cc][Oo][Mm]
**/*.[Rr][Oo][Mm]
**/*.com
**/*.eeprom
**/*.hex
**/*.img
**/*.lib
**/*.lst
**/*.o
**/*.prn
**/*.rel
**/*.sym
**/*.sys
**/*.tmp
**/*/font*.asm
Binary/**/*.mym
Binary/**/*.pt3
Source/**/eeprom
Source/Apps/Assign.com
Source/Apps/FDU/FDU.COM
Source/Apps/Format.com
Source/Apps/IntTest.com
Source/Apps/Mode.com
Source/Apps/OSLdr.com
Source/Apps/RTC.com
Source/Apps/SysCopy.com
Source/Apps/SysGen.com
Source/Apps/Talk.com
Source/Apps/Timer.com
Source/Apps/Tune/Tune.com
Source/BPBIOS/bpsys.bak
Source/BPBIOS/bpsys.dat
Source/BPBIOS/def-ww.lib
Source/CPM3/bios3.spr
Source/CPM3/bnkbios3.spr
Source/CPM3/gencpm.dat
Source/CPM3/options.lib
Source/CPM3/zpmbios3.spr
Source/HBIOS/Blank512KB.dat
Source/HBIOS/build.inc
Source/Images/blank144
Source/Images/blankhd
Source/Prop/Spin/ParPortProp.list
Source/Prop/Spin/PropIO.list
Source/Prop/Spin/PropIO2.list
Source/ZPM3/bnkbios3.spr
Source/ZPM3/gencpm.com
Source/ZPM3/gencpm.com
Source/ZPM3/gencpm.dat
Tools/Linux
Tools/Darwin
Tools/unix/bin2asm/bin2asm
Tools/unix/cpmtools/cpmchattr
Tools/unix/cpmtools/cpmchmod
Tools/unix/cpmtools/cpmcp
Tools/unix/cpmtools/cpmls
Tools/unix/cpmtools/cpmrm
Tools/unix/cpmtools/fsck.cpm
Tools/unix/cpmtools/fsed.cpm
Tools/unix/cpmtools/mkfs.cpm
Tools/unix/lzsa/lzsa
Tools/unix/uz80as/uz80as
Tools/unix/zx/config.h
Tools/unix/zx/zx
!Source/ver.lib
!Source/Apps/FAT/FAT.COM
!Source/BPBIOS/bpbuild.com
!Source/BPBIOS/movp112.com
!Source/BPBIOS/Z34RCP11/cledinst.com
!Source/BPBIOS/Z34RCP11/cledsave.com
!Source/Fonts
!Source/Images/**/*.[Cc][Oo][Mm]
!Source/RomDsk/**/*.[Cc][Oo][Mm]
!Source/UBIOS/FSFAT.BIN
!Source/UBIOS/UNA-BIOS.BIN
!Source/ZCCP/*.[Cc][Oo][Mm]
!Source/ZCPR-DJ/*.[Cc][Oo][Mm]
!Source/ZPM3/*.[Cc][Oo][Mm]
!Source/ZSDOS/*.[Cc][Oo][Mm]
!Tools/cpm/bin
!Tools/unix/zx
!Tools/zx
Source/ZPM3/gencpm.com
Source/ZPM3/startzpm.com
Source/ZPM3/zccp.com
Source/ZPM3/zpmldr.com

6
Binary/Apps/Clean.cmd Normal file
View File

@@ -0,0 +1,6 @@
@echo off
setlocal
if exist *.com del *.com
if exist Tunes\*.pt? del Tunes\*.pt?
if exist Tunes\*.mym del Tunes\*.mym

10
Binary/Apps/Makefile Normal file
View File

@@ -0,0 +1,10 @@
TOOLS = ../../Tools
MOREDIFF := $(shell $(TOOLS)/unix/casefn.sh *.com Tunes/*)
include $(TOOLS)/Makefile.inc
all::
mkdir -p Tunes
clobber::
rm -f *.bin *.com *.img *.rom *.pdf *.log *.eeprom *.COM *.BIN Tunes/*.mym Tunes/*.pt?

14
Binary/Apps/ReadMe.txt Normal file
View File

@@ -0,0 +1,14 @@
***********************************************************************
*** ***
*** R o m W B W ***
*** ***
*** Z80/Z180 System Software ***
*** ***
***********************************************************************
This directory contains the executable application files that
are specific to RomWBW. The source for these applications is found
in the Source\Apps directory of the distribution.
The Tunes subdirectory contains some sample ProTracker and MYM sound
files that can be played by the TUNE application.

View File

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

View File

@@ -1,8 +1,12 @@
@echo off
setlocal
if exist *.bin del *.bin
if exist *.com del *.com
if exist *.img del *.img
if exist *.rom del *.rom
if exist *.pdf del *.pdf
if exist *.log del *.log
if exist *.eeprom del *.eeprom
if exist *.eeprom del *.eeprom
setlocal & cd Apps && call Clean || exit /b 1 & endlocal

167
Binary/DiskList.txt Normal file
View File

@@ -0,0 +1,167 @@
***********************************************************************
*** ***
*** R o m W B W ***
*** ***
*** Z80/Z180 System Software ***
*** ***
***********************************************************************
This directory ("Binary") is part of the RomWBW System Software
distribution archive. Refer to the ReadMe.txt file in this
directory for more information on the overall contents of the
directory.
RomWBW includes a set of disk images that are ready to copy onto
a floppy or hard/CF/SD disk. You can use your modern computer
(Windows/Linux/Mac) to copy the disk image file onto your disk
media. The disk media will then be ready to use in your RomWBW
System.
A description of the disk images is provided later in this file.
For more information on the creatioin of these images including
instructions for customizing them or creating your own, refer to
the ReadMe.txt file in the Source\Images directory.
Installing Images
-----------------
The following instructions apply to Windows computers. Alternatively,
you can use the "dd" command on Linux or Mac.
First of all, a MAJOR WARNING!!!! The tools described below are
quite capable of obliterating your running Windows system drive. Use
with extreme caution and make sure you have backups.
To install a floppy image on floppy media, you can use the tool
called RaWriteWin. This tool is included in the Tools directory of
the distribution. This tool will write your floppy image (fd_xxx.img)
to a floppy disk using a raw block transfer. The tool is GUI based
and it's operation is self explanatory.
To install a hard disk image on a CF card or SD card, you must have
the appropriate media card slot on your computer. If you do, you can
use the tool called Win32DiskImager. This tool is also included in
the Tools directory of the distribution. It will write your
hard disk image (hd_xxx.img) to the designated media card. This tool
is also GUI based and self explanatory.
The use of the SIMH emulator is outside of the scope of this document.
However, if you use SIMH, you will find that you can attach the hard
disk images to the emulator with lines such as the following in your
SIMH configuration file:
| attach hdsk0 hd_cpm22.img
| set hdsk0 format=HDSK
| set hdsk0 geom=T:2048/N:256/S:512
| set hdsk0 wrtenb
Making Disk Images Bootable
---------------------------
The Operating System disk images below are ready to boot by the
RomWBW Boot Loader. However, if you update your RomWBW ROM, then
you should also update the system tracks of your bootable disk
images. You would use SYSCOPY to do this. SYSCOPY can also be
used to make a disk bootable if it is not already bootable.
You would use a command like the following to make drive C bootable:
| B>SYSCOPY C:=CPM.SYS
The system file to use depends on the operating system you are trying
to boot from the slice you are initializing with SYSCOPY:
CP/M 2.2 - cpm.sys
ZSDOS 1.1 - zsys.sys
CP/M 3 - cpmldr.sys
ZPM3 - cpmldr.sys
Slices
------
A RomWBW CP/M filesystem is fixed at 8MB. This is because it is the
largest size filesystem supported by all common CP/M variants. Since
all modern hard disks (including SD Cards and CF Cards) are much
larger than 8MB, RomWBW supports the concept of "slices". This
simply means that you can concatenate multiple CP/M filesystems (up
to 256 of them) on a single physical hard disk and RomWBW will allow
you to assign drive letters to them and treat them as multiple
independent CP/M drives.
With the exception of the hd_combo image, each of the disk images
includes a single CP/M file system (i.e., a single slice). However,
you can easily create a multi-slice disk image by merely concatenating
multiple images together. For example, if you wanted to create a 2
slice disk image that has ZSDOS in the first slice and Wordstar in
the second slice, you could use the following command from a Windows
command prompt:
| C:\RomWBW\Binary>copy /b hd_zsdos.img + hd_ws.img hd_multi.img
You can now write hd_multi.img onto your SD or CF Card and you will
have ZSDOS in the first slice and Wordstar in the second slice.
The hd_combo disk image is an example of this. It contains several
slices in one image file. The contents of this special disk image
are described below.
The concept of slices applies ONLY to hard disks. Floppy disks are
not large enough to support multiple slices.
Disk Image Contents
-------------------
What follows is a brief description of the contents of the
disk images automatically provided in the RomWBW distribution.
Note that all of the OS images include the RomWBW custom
support apps.
cpm22 - DRI CP/M 2.2 (Bootable Floppy and Hard Disk)
Standard DRI CP/M 2.2 distribution files along with a few commonly
used utilities.
zsdos - ZCPR1 + ZSDOS 1.1 (Bootable Floppy and Hard Disk)
Contains ZCPR1 and ZSDOS 1.1. This is roughly equivalent to the
ROM boot contents, but provides a full set of the applications
and related files that would not all fit on the ROM drive.
nzcom - NZCOM (Bootable Floppy and Hard Disk)
Standard NZCOM distribution. Note that you will need to run the
NZCOM setup before this will run properly. You will need
to refer to the NZCOM documentation.
cpm3 - DRI CP/M3 (Bootable Floppy and Hard Disk)
Standard DRI CP/M 3 adaptation for RomWBW that is ready to run.
It can be started by running CPMLDR.
zpm3 - ZPM3 (Bootable Floppy and Hard Disk)
Simeon Cran's ZCPR 3 compatible OS for CP/M 3 adapted for RomWBW and
ready to run. It can be started by running CPMLDR (which seems
wrong, but ZPMLDR is somewhat broken).
ws4 - WordStar 4 (Floppy and Hard Disk)
Micropro Wordstar 4 full distribution. This image is not bootable
and is intended to be added as an additional slice to an OS image.
bp - BPBIOS (Hard Disk only)
Adaptation of BPBIOS for RomWBW. This is NOT complete and NOT
useable in it's current state.
combo - Multi-Boot Combination (Bootable Hard Disk)
A pre-created combo image that contains the following slices. The
slices are identical to the individual images listed above.
Slice 0: cpm22 (bootable)
Slice 1: zsdos (bootable)
Slice 2: nzcom (bootable)
Slice 3: cpm3 (bootable)
Slice 4: zpm3 (bootable)
Slice 5: ws4 (not bootable)

8
Binary/Makefile Normal file
View File

@@ -0,0 +1,8 @@
TOOLS = ../Tools
MOREDIFF := $(shell $(TOOLS)/unix/casefn.sh *.img *.rom *.com *.eeprom)
SUBDIRS = Apps
include $(TOOLS)/Makefile.inc
clobber::
rm -f *.bin *.com *.img *.rom *.pdf *.log *.eeprom

View File

@@ -17,21 +17,30 @@ released the directory is populated with the default output files.
However, the output of custom builds will be placed in this directory
as well.
If you only see a few files in this directory, then you downloaded
just the source from GitHub. To retrieve the full release download
package, go to https://github.com/wwarthen/RomWBW. On this page,
look for the text "XX releases" where XX is a number. Click on this
text to go to the releases page. On this page, you will see the
latest releases listed. For each release, you will see a package
file called something like "RomWBW-2.9.0-Package.zip". Click on the
package file for the release you want to download.
ROM Firmware Images (<plt>_<cfg>.rom)
-------------------------------------
The files with a ".rom" extension are binary images ready to program
into an appropriate PROM. These files are named with the format
<plt>_<cfg>.rom. <plt> refers to the primary platform such as Zeta,
N8, Mark IV, etc. <cfg> refers to the specific configuration. When
released, there will be a standard configuration ("std") for each
N8, Mark IV, etc. <cfg> refers to the specific configuration. In
general, there will be a standard configuration ("std") for each
platform. So, for example, the file called MK4_std.rom is a ROM
image for the Mark IV with the standard configuration. If a custom
configuration called "custom" is created and built, a new file called
MK4_custom.rom will be added to this directory.
Documentation of the pre-built ROM Images is contained in the
RomList.txt file.
RomList.txt file in this directory.
ROM Executable Images (<plt>_<cfg>.com)
---------------------------------------
@@ -39,22 +48,16 @@ ROM Executable Images (<plt>_<cfg>.com)
When a ROM image (".rom") is created, an executable version of the
ROM is also created. These files have the same naming convention as
the ROM Image files, but have the extension ".com". These files can
be copied to a working system and run like a normal application.
be copied to a working system and run like a normal CP/M application.
When run on the target system, they install in RAM just like they had
been programmed into the ROM. This allows a new ROM build to be
tested without reprogramming the actual ROM.
been loaded from ROM. This allows a new ROM build to be tested
without reprogramming the actual ROM.
ROM Binary Images (<plt>_<cfg>.img)
-----------------------------------
Also when a ROM image is created, a third variation of the ROM is
created again with the same naming convention, but with the extension
of .img. These files are similar to the .com files in that they can
be used to test a ROM build without actually programming a new ROM.
The .img files are specifically for loading via UNA from a FAT file
system. The functionality of the UNA FAT file system loader is
beyond the scope of this document.
WARNING: In a few cases the .com file is too big to load. If you get
a message like "Full" or "BAD LOAD" when trying to load one of the
.com files, it is too big. In these cases, you will not be able to
test the ROM prior to programming it.
VDU ROM Image (vdu.rom)
-----------------------
@@ -63,7 +66,7 @@ The VDU video board requires a dedicated onboard ROM containing the
font data. The "vdu.rom" file contains the binary data to program
onto that chip.
Disk Images (fd*.img, hd*.img)
Disk Images (fd_*.img, hd_*.img)
------------------------------
RomWBW includes a mechanism for generating floppy disk and hard disk
@@ -74,23 +77,28 @@ RomWBW-based system.
Essentially, these files contain prepared floppy and hard disk images
with a large set of programs and related files. By copying the
contents of these files to appropriate media as described below, you
can quickly create ready-to-use media.
can quickly create ready-to-use media. Win32DiskImager or
RawWriteWin can be used to copy images directly to media. These
programs are included in the RomWBW Tools directory.
The fd*.img files are floppy disk images. They are sized for 1.44MB
The fd_*.img files are floppy disk images. They are sized for 1.44MB
floppy media and can be copied to actual floppy disks using
RawWriteWin (as long as you have access to a floppy drive on your
Windows computer). The resulting floppy disks will be usable on any
RomWBW-based system with floppy drive(s).
Likewise, the hd*.img files are hard disk images. Each file is
Likewise, the hd_*.img files are hard disk images. Each file is
intended to be copied to the start of any type of hard disk media
(typically a CF Card or SD Card). The resulting media will be usable
on any RomWBW-based system that accepts the corresponding media type.
Note that the contents of the floppy/hard disk images are created by
Documentation of the pre-built disk images is contained in the
DiskList.txt file in this directory.
The contents of the floppy/hard disk images are created by
the BuildImages.cmd script in the Source directory. Additional
information on how to generate custom disk images is found in the
Source\Images directory.
Source\Images ReadMe.txt file.
Propeller ROM Images (*.eeprom)
-------------------------------
@@ -105,3 +113,10 @@ indicates which file targets each of the Propeller board variants:
Refer to the board documentation of the boards for more information
on how to program the EEPROMs on these boards.
Apps Directory
--------------
The Apps subdirectory contains the executable application files that
are specific to RomWBW. The source for these applications is found
in the Source\Apps directory of the distribution.

View File

@@ -6,68 +6,84 @@
*** ***
***********************************************************************
This directory ("Binary") is part of the RomWBW System Software
distribution archive. Refer to the ReadMe.txt file in this
directory for more information on the overall contents of the
This directory ("Binary") is part of the RomWBW System Software
distribution archive. Refer to the ReadMe.txt file in this
directory for more information on the overall contents of the
directory.
When distributed, RomWBW contains a set of pre-built ROM images that
are ready to program onto the EEPROM of any of the Z80/Z180 based
RetroBrew Computers CPU boards. Additionally, any custom built ROM
When distributed, RomWBW contains a set of pre-built ROM images that
are ready to program onto the EEPROM of any of the Z80/Z180 based
RetroBrew Computers CPU boards. Additionally, any custom built ROM
images will be placed in this directory.
All of the pre-built ROM images are 512KB. This size is compatible
with all of the Z80/Z180 systems. Some systems can accept different
size ROM images. Creating alternative sizes requires a custom ROM
All of the pre-built ROM images are 512KB. This size is compatible
with all of the Z80/Z180 systems. Some systems can accept different
size ROM images. Creating alternative sizes requires a custom ROM
build (see ReadMe.txt in the Source directory).
It is critical that the right ROM Imgae be selected for the target
platform being used. The table below indicates the correct ROM
It is critical that the right ROM Imgae be selected for the target
platform being used. The table below indicates the correct ROM
image to use for each platform:
SBC V1/V2 SBC_std.rom
SBC SimH SBC_simh.rom
Zeta V1 ZETA_std.rom
Zeta V2 ZETA2_std.rom
N8 N8_std.rom
Mark IV MK4_std.rom
RC2014 w/ Z80 RCZ80_std.rom
RC2014 w/ Z180 RCZ180_nat.rom (native Z180 memory addressing)
RC2014 w/ Z180 RCZ180_ext.rom (external 512K RAM/ROM module)
SC-series SC126, SC130
Easy Z80 EZZ180_std.rom
Dyno DYNO_std.rom
You will find there is one additional ROM image called
"UNA_std.rom". This ROM image is an UNA-based RomWBW ROM image. As
such, this ROM image can be used on any Z80/Z180 platform supported
by John Coffman's UNA BIOS. Refer to RetroBrew Computers Wiki for
You will find there is one additional ROM image called
"UNA_std.rom". This ROM image is an UNA-based RomWBW ROM image. As
such, this ROM image can be used on any Z80/Z180 platform supported
by John Coffman's UNA BIOS. Refer to RetroBrew Computers Wiki for
more information on UNA hardware support.
For each of the ROM Images (".rom"), there are corresponding files
with the extensions of ".com" and ".img". The .com variant can be
copied to a functional RomWBW-based system and executed like a
normal application under CP/M or Z-System. This will load the new
ROM on-the-fly. It is an excellent way to test a ROM Image before
actually burning it. Similarly, the .img files can be loaded using
For each of the ROM Images (".rom"), there are corresponding files
with the extensions of ".com" and ".img". The .com variant can be
copied to a functional RomWBW-based system and executed like a
normal application under CP/M or Z-System. This will load the new
ROM on-the-fly. It is an excellent way to test a ROM Image before
actually burning it. Similarly, the .img files can be loaded using
the UNA FAT loader for testing.
All of the standard ROM Images are configured with:
WARNING: In a few cases the .com file is too big to load. If you get
a message like "Full" or "BAD LOAD" when trying to load one of the
.com files, it is too big. In these cases, you will not be able to
test the ROM prior to programming it.
All of the standard ROM Images are configured for:
- 512KB ROM Disk
- 512KB RAM Disk
- 38.4Kbps baud serial console
- 38.4Kbps baud serial console (*)
- Auto-discovery of all serial ports
All hard disk type devices (IDE, PPIDE, CF Card, SD Card) will be
automatically assigned two drive letters per device. The drive
letters will refer to the first 2 slices of the device. The ASSIGN
command can be used to display and reassign drives to disk devices
* RC2014 and Stephen Cousins' kits run at 115,200Kbps baud
All hard disk type devices (IDE, PPIDE, CF Card, SD Card) will be
automatically assigned two drive letters per device. The drive
letters will refer to the first 2 slices of the device. The ASSIGN
command can be used to display and reassign drives to disk devices
and slices as desired.
Standard ROM Image Notes
------------------------
The standard ROM images will detect and install support for certain
devices and peripherals that are on-board or frequently used with
each platform as documented below. If the device or peripheral is
not detected at boot, the ROM will simply bypass support
The standard ROM images will detect and install support for certain
devices and peripherals that are on-board or frequently used with
each platform as documented below. If the device or peripheral is
not detected at boot, the ROM will simply bypass support
appropriately.
SBC:
- Includes support for PPIDE/CF Card(s) connected to on-board
SBC (SBC_std.rom):
- CPU speed is detected at startup
- Console on onboard UART serial port at 38400 baud
- Includes support for PPIDE/CF Card(s) connected to on-board
parallel port.
- Includes support for CVDU and VGA3 boards. If detected at
startup, support for video and keyboard is installed
@@ -83,7 +99,14 @@ SBC:
circuit which is likely to cause system instability. SBC
V2 does not have this issue.
ZETA/ZETA2:
SBC (SBC_simh.rom):
- SBC variant customized to run under SimH
- Implments two emulated SimH hard disk images
- Uses SimH RTC
ZETA (ZETA_std.rom):
- CPU speed is detected at startup
- Console on onboard UART serial port at 38400 baud
- Includes support for on-board floppy disk controller and
two attached floppy disks.
- Auto-detects ParPortProp and includes support for it if it
@@ -93,7 +116,22 @@ ZETA/ZETA2:
on-board serial port, if JP1 is open, console will go to
ParPortProp video and keyboard ports.
N8:
ZETA2 (ZETA2_std.rom):
- CPU speed is detected at startup
- Console on onboard UART serial port at 38400 baud
- Includes support for on-board floppy disk controller and
two attached floppy disks.
- Auto-detects ParPortProp and includes support for it if it
is attached.
- Uses CTC to generate periodic timer interrupts.
- If ParPortProp is installed, initial console output is
determined by JP1. If JP1 is shorted, console will go to
on-board serial port, if JP1 is open, console will go to
ParPortProp video and keyboard ports.
N8 (N8_std.rom):
- CPU speed is detected at startup
- Console on Z180 onboard primary ASCI serial port at 38400 baud
- Includes support for on-board floppy disk controller and
two attached floppy disks.
- Includes support for on-board TMS9918 video and keyboard
@@ -101,11 +139,80 @@ N8:
- Includes support for on-board SD Card as hard disk and
assumes a production level N8 board (date code >= 2312).
MK4:
MK4 (MK4_std.rom):
- CPU speed is detected at startup
- Console on Z180 onboard primary ASCI serial port at 38400 baud
- Includes support for on-board IDE port (CF Card via adapter).
- Includes support for on-board SD Card port.
- Auto-detects PropIO or PropIO V2 and installs associated
video, keyboard and SD Card support if present.
- Includes support for CVDU and VGA3 boards. If detected at
startup, support for video and keyboard is installed
including VT-100/ANSI terminal emulation.
including VT-100/ANSI terminal emulation.
RCZ80 (RCZ80_std.rom):
- Assumes CPU oscillator of 7.3728 MHz
- Requires 512K RAM/ROM module
- Auto detects Serial I/O Module (ACIA) and Dual Serial
Module (SIO/2). Either one may be used.
- Console on whichever serial module is installed,
but will use the SIO/2 if both are installed. Baud
rate is determined by hardware, but normally 115200.
- Includes support for RC2014 Compact Flash Module
- Support for RC2014 PPIDE Module may be enabled in config
- Support for Scott Baker SIO board may be enabled in config
- Support for Scott Baker floppy controllers (SMC & WDC) may
be enabled in config
RCZ80 w/ KIO (RCZ80_kio.rom):
- Assumes CPU oscillator of 7.3728 MHz
- Requires 512K RAM/ROM module
- Requires KIO module
- Console on KIO primary serial port at 115200 baud
- Includes support for RC2014 Compact Flash Module
- Includes support for RC2014 PPIDE Module
- Support for Scott Baker SIO board may be enabled in config
- Support for Scott Baker floppy controllers (SMC & WDC) may
be enabled in config
RCZ180 (RCZ180_nat.rom & RCZ180_ext.rom):
- Assumes CPU oscillator of 18.432 MHz
- Console on Z180 onboard primary ASCI serial port at 115200 baud
- Includes support for RC2014 Compact Flash Module
- Includes support for RC2014 PPIDE Module
- Support for alternative serial modules may be enabled in config
- Support for Scott Baker floppy controllers (SMC & WDC) may
be enabled in config
- You must pick the _nat or _ext variant depending on which
memory module you are using:
- RCZ180_nat.rom uses the built-in Z180 memory manager
for use with memory modules allow direct physical
addressing of memory, such as the SC119
- RCZ180_ext.rom uses external bank management to access
memory, such as the 512K RAM/ROM module.
SCZ180 (SCZ180_126.rom, SCZ180_130.rom, SCZ180_131.rom):
- Assumes CPU oscillator of 18.432 MHz
- Console on Z180 onboard primary ASCI serial port at 115200 baud
- Includes support for RC2014 Compact Flash Module
- Includes support for RC2014 PPIDE Module
- Support for alternative serial modules may be enabled in config
- Support for Scott Baker floppy controllers (SMC & WDC) may
be enabled in config
- The 3 different variants of SCZ180 are provided to match the
3 corresponding systems (SC126, SC130, and SC131) designed by
Stephen Cousins.
EZZ80 (EZZ80_std.rom):
- Assumes CPU oscillator of 10.000 MHz
- Console on primary SIO serial port at 115200 baud
- Includes support for on-board SIO
- Includes support for RC2014 Compact Flash Module
- Includes support for RC2014 PPIDE Module
DYNO (DYNO_std.rom):
- Assumes CPU oscillator of 18.432 MHz
- Console on Z180 onboard serial ports at 38400 baud
- Includes support for BQ4842 RTC
- Includes support for onboard PPIDE
- Support for Dyno floppy controllers may be enabled in config

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
Doc/CPM3 System Guide.pdf Normal file

Binary file not shown.

BIN
Doc/CPM3 Users Guide.pdf Normal file

Binary file not shown.

View File

@@ -1,3 +1,126 @@
Version 3.0.0
-------------
- WBW: v2.9.2 -> 3.0 version upgrade due to scope of changes
Version 2.9.2
-------------
- PMS: Fixed DS1210-related issue resulting in "Invalid BIOS" errors
- SCC: Support for SC126 motherboard
- WBW: Enable Auto-CTS/DCD in SIO driver for pacing output data
- WBW: Support missing pull-up resistors on SPI SD adapter boards (common)
- WBW: Support two SIO modules w/ auto-detection
- PMS: Support ECB USB-FIFO board
- WBW: Fixed ASSIGN issue with incorrect DPB selection
- WBW: Add RC2014 Z180 AY sound support to TUNE app
- WBW: Add RC2014 AY sound support to AY driver
- WBW: Add SC126 platform
- WBW: Config files cleanup
- WBW: Add interrupt support to ASCI driver
- WBW: Refactored XModem overlay, merged USB-FIFO support
- PMS: Added DS1210 low battery detection/message
- PMS: Added note playing ability to SPK driver
- WBW: Support disk I/O to any memory bank
- WBW: Fix floppy I/O error on slow CPUs w/ ints active (credit Jorge Rodrigues)
- WBW: Support for KIO chip (based on board by Tom Szolyga)
- N?B: Made ZCAL Y2K compliant
- WBW: Show disk activity on diagnostic LEDs
- WBW: DSRTC now detects DS-1302 presence dynamically
- WBW: SC126 platform renamed to SCZ180 w/ configs for SC126, SC130
- WBW: Add status LED support
- WBW: Add support for secondry SPI (SD Card) on SC126
- PMS: Add sound support to NASCOM BASIC
- WBW: Updated FAT to add MD and FORMAT commands
- WBW: Add CP/M 3 (experimental)
- M?T: Support Shift register SPI WIZNET for RC2014
- PLS: Added seconds register in HBIOS
- WBW: More flexible table-driven config in TUNE.COM
- PMS: Added timer support for Zilog Peripherals ECB Board
- PLS: Enhanced Intel Hex Load in dbgmon
- WBW: Overhaul disk image creation
- WBW: Added support for Dyno platform (based on work by Steve Garcia)
- SLG: Added support for BQ4845 RTC (bqrtc.asm)
- PMS: Added 80x30 video mode to VGA3 driver
- PMS: Added 80x43 video mode
- PMS: Added font compression option
- PMS: Added a "safe mode" startup w/ minimal device support
- WBW: Switch RC/SC Z180 platforms to 115,200 default baud rate
- PMS: Enhanced PPIDE driver to handle multiple PPI interfaces
- PMS: Added a ROM based game
- WBW: Only assign drive letters to hard disk devices with media
- WBW: Enhanced IDE driver to handle multiple IDE interfaces
- D?R: Contributed SC126 How-To: Preparing a MicroSD Card to Transfer Files to/from a Linux System
- PMS: Updated romldr to handle more than 9 drives
- PMS: Added "user" rom module template
- PMS: Added CP/M 3 manuals
- WBW: Boot from any slice
- C?M: Added Unix build process
- PLS: FreeRTOS compatibility
- WWB: Removed OSLDR application (can't handle new OSes)
Version 2.9.1
-------------
- E?B: Added support for RC2014 RTC
- WBW: Converted PTXPLAY to TUNE (now plays PT2/PT3/MYM sounds files)
- WBW: Updated Win32DiskImager to v1.0
- WBW: Implemented character attributes on Propeller based consoles
- MS: Added support for BEL function in Propeller based consoles
- WBW: Support additional escape sequences in Propeller console ANSI emulation
- WBW: Map LPT: to second serial port, UL1: to third serial port
- WBW: Update default IOBYTE so that LST:=LPT: by default
- WBW: Fixed missing drive/head setup for writes in PPIDE
- WBW: Fixed XModem HBIOS console driver for file send operations
- WBW: Preliminary support for RC180 platform (Z180 module in RC2014)
- WBW: Added NZCOM distribution files to third slice of hard disk image
- WBW: Fixed getnum32 bug in MODE command (found by Phil Summers)
- PMS: Added serial support for Zilog Peripherals Baord
- WBW: Added preliminary support for interrupt management API
- PMS: Improved boot messages in RAM-Floppy driver
- PMS: Added charge setting display to RTC boot messages
- WBW: Add SmallZ80 support to FDU
- WBW: Refactored Debug Monitor w/ improved syntax parsing and help
- PMS: Added Forth, Nascom BASIC, and Tasty BASIC to ROM
- PMS: Refactored ROM Loader to support more ROM images, now table driven
- WBW: Refactored DSKY code
- SK: Initial support for Easy Z80
- PMS: Enhance VDU driver to support alternative screen dimensions
- WBW: DDT and DDTZ modified to use RST 30 instead of RST 38 to avoid conflicts with IM 1 interrupts
- WBW: Added timer interrupt support for CTC under Zeta 2 and Easy Z80
- WBW: Support LBA style access in floppy driver
- WBW: Added beta version of FAT filesystem utility (copy, dir, del, ren)
- SCC: Added support for native memory addressing on Z180-based RC2014
- PMS: Dynamically discover and display processor type at boot
- J?L: Added German keyboard support to PPK and KBD drivers
Version 2.9.0
-------------
- WBW: Implemented multi-sector I/O in all disk drivers
- WBW: Added support for RC2014 SMB Floppy controller modules (SMC and WDC)
- WBW: New function dispatching for character/disk/video drivers
- WBW: Updated FDU app to support RC2014 floppy controllers
- WBW: Added TIMER app to display system timer value
- WBW: Refactored interrupt management code
- WBW: Added PTXPLAY application and sample tunes
Version 2.8.6
-------------
- WBW: Added support for RC2014 (SIO and ACIA drivers primarily)
- WBW: Automatically detect and run PROFILE.SUB on boot drive if it exists
- WBW: Fixed Dual SD Board detection
- WBW: Added console support to XModem (for RC2014 primarily)
- E?B: Fixed IDE/PPIDE when used with non-CF drives
- WBW: Patched SUBMIT.COM so that it always puts temp file on A: for immediate execution
- WBW: Accommodate spin up time for true IDE hard disks (IDE or PPIDE)
Version 2.8.5
-------------
- WBW: Cleaned up support in TMS driver for SCG board
Version 2.8.4
-------------
- WBW: FD.COM renamed to FDU.COM and integrated with build
- WBW: FDU.COM enhanced to select FDC hardare at startup to
eliminate multiple versions.
Version 2.8.3
-------------
- WBW: Added MODE command

BIN
Doc/Contrib/DSKY.pdf Normal file

Binary file not shown.

View File

@@ -1,429 +0,0 @@
================================================================
FDTST v3.1 for N8VEM DISKIO / DISKIO V3 / ZETA / DIDE / N8
================================================================
Updated JuLY 1, 2012
by Wayne Warthen (wwarthen@gmail.com)
Application to test the hardware functionality of the Floppy Disk
Controller (FDC) on the ECB DISK I/O, DISK I/O V3, ZETA SBC,
Dual IDE w/ Floppy, or N8 board.
The intent is to provide a testbed that allows direct testing
of all possible media types and modes of access. The application
supports read, write, and format by sector, track, and disk as
well as a random read/write test.
The application supports access modes of polling, interrupt,
INT/WAIT, and DRQ/WAIT. At present, it supports 3.5" media at DD (720KB) and
HD (1.44MB) capacities. It also now supports 5.25" media (720KB and 1.2MB)
and 8" media (1.11MB) as well. Additonal media will be added when I have
time and access to required hardware. Not all modes are supported
on all platforms and some modes are experimental in all cases.
In many ways this application is merely reinventing the wheel and
performs functionality similer to existing applications, but I have
not seen any other applications for DISK I/O that provide this range
of functionality.
While the application is now almost entirely new code, I would like to
acknowledge that much was derived from the previous work of Andrew Lynch
and Dan Werner. I also want to credit Sergio Gimenez with testing the 5.25"
drive support and Jim Harre with testing the 8" drive support. Thanks!
General Usage
-------------
In general, usage is self explanatory. The main menu allows you to set
the unit, media, and mode to test. These settings MUST match your
situation. Read, write, format, and verify functions are provided. A sub-menu
will allow you to choose sector, track, disk, or random tests.
The verify function requires a little explanation. It will take the contents
of the buffer, save it, and compare it to the selected sectors. So, you
must ensure that the sectors to be verified already have been written
with the same pattern as the buffer contains. I typically init the buffer
to a pattern, write the pattern to the entire disk, then verify the entire
disk.
Another submenu is provided for FDC commands. This sub-menu allows you to
send low-level commands directly to FDC. You MUST know what you are doing
to use this sub-menu. For example, in order to read a sector using this
sub-menu, you will need to perform specify, seek, sense int, and read
commands specifying correct values (nothing is value checked in this menu).
Required Hardware/BIOS
----------------------
Of course, the starting point is one of the support hardware platforms.
You need to start with either an N8VEM SBC, backplane, and ECB DISK I/O
card or a Zeta SBC. Additionally, a floppy drive connected via an
appropriate cable:
DISKIO - no twist in cable, drive unit 0/1 must be selected by jumper on drive
ZETA - cable with twist, unit 0 after twist, unit 1 before twist
DIDE/N8 - cable with twist, unit 0 before twist, unit 1 after twist
It is preferable that the BIOS you use does not have DISK I/O support
enabled since the application assumes it has complete control of the
DISK I/O hardware.
The DISK I/O should be jumpered as follows:
J1: depends on use of interrupt modes (see interrupt modes below)
J2: pins 1-2, & 3-4 jumpered
J3: hardware dependent timing for DMA mode (see DMA modes below)
J4: pins 2-3 jumpered
J5: off
J6: pins 2-3 jumpered
J7: pins 2-3 jumpered
J8: off
J9: off
J10: off
J11: off
J12: off
Note that J1 can be left on even when not using interrupt modes. As
long as the BIOS is OK with it, that is fine. Note also that J3 is
only relevant for DMA modes, but also can be left in place when
using other modes.
The DISK I/O V3 should be jumpered at the default settings:
JP2: 3-4
JP3: 1-2 for int mode support, otherwise no jumper
JP4: 1-2, 3-4
JP5: 1-2
JP6: 1-2
JP7: 1-2, 3-4
Zeta does not have any relevant jumper settings.
DIDE should be jumpered as follows:
K3 (DT/R or /RD): /RD
P5 (bd ID): 1-2, 3-4 (for $20-$3F port range)
There are no specific N8 jumper settings, but the default
I/O range starting at $80 is assumed in the published code.
Modes of Operation
------------------
You can select the following test modes. Please refer to the chart
that follows to determine which modes should work with combinations
of Z80 CPU speed and media format.
Polling: Traditional polled input/output. Works well and very reliable
including timeouts and good error recovery. Also, the slowest performance
which precludes it from being used with 1.44MB floppy on a 4MHz Z80.
This is definitely the mode you want to get working before any others.
It does not require J1 (interrupt enable) on DISK I/O and does not care about
the setting of J3.
Interrupt: Input/output is interrupt driven. Works pretty well, but
is not able to recover from some errors. For example, if there is
no disk in the drive, this mode will just hang until a disk is inserted.
This mode REQUIRES that interrupts be enabled on the DISK I/O via
jumper at J1. On Zeta it requires the INT/NMI jumper be set for
INT. Mode not supported on DIDE or N8. Some BIOS variants will not
handle interrupts during boot.
Fast Interrupt: As above, but sacrifices additional reliability for
faster operation. This mode will allow a 1.44MB floppy to work
with a 4MHz Z80 CPU. However, if any errors occur (even a transient
read error which is not unusual), this mode will hang. As above
you MUST have the appropriate jumpers for DISKIO and Zeta. DIDE
does not support this mode.
INT/WAIT: Same as Fast Interrupt, but uses CPU wait instead of
actual interrupt. Subject to all the same issues as Fast
Interrupt, but does not need J1 shorted. J3 is irrelevant.
This mode is available on only on DISKIO (and not DISKIO V3).
DRQ/WAIT: Uses pseudo DMA to handle input/output. Does not require that
interrupts (J1) be enabled on the DISK I/O. However, it is subject to
all of the same reliability issues as "Fast Interrupt". This
mode is known to not work on N8VEM DISKIO!!! It is included
for testing only. It is dependent on setting of J3. This
mode is NOT available on Zeta, DIDE, N8, or DISKIO V3.
The chart below attempts to describe the combinations that
work for me. By far, the most reliable mode is Polling,
but it requires 8MHz CPU for HD disks.
DRQ/WAIT --------------------------------+
INT/WAIT -----------------------------+ |
Fast Interrupt --------------------+ | |
Interrupt ----------------------+ | | |
Polling ---------------------+ | | | |
| | | | |
CPU Speed --------------+ | | | | |
| | | | | |
| | | | | |
3.5" DD (720K) ------ 4MHz Y Y Y Y X
8MHz+ Y Y Y Y X
3.5" HD (1.44M) ----- 4MHz N N Y Y X
8MHz+ Y Y Y Y X
5.25" DD (360K) ----- 4MHz Y Y Y Y X
8MHz+ Y Y Y Y X
5.25" HD (1.2M) ----- 4MHz N N Y Y X
8MHz+ Y Y Y Y X
8" DD (1.11M) ------- 4MHz N N Y Y X
8MHz+ Y Y Y Y X
Y = Yes, works
N = No, does not work
X = Experimental, probably won't work
Tracing
-------
Command/result activity to/from the FDC will be written out
if the trace setting is changed from '00' to '01' in setup.
Additionally, if a command failure is detected on any
command, that specific comand and results are written
regardless of the trace setting.
The format of the line written is:
<OPERATION>: <COMMAND BYTES> --> <RESULT BYTES> [<RESULT>]
For example, this is the output of a normal read operation:
READ: 46 01 00 00 01 02 09 1B FF --> 01 00 00 00 00 02 02 [OK]
Please refer to the i8272 data sheet for information on the
command and result bytes.
Note that the sense interrupt command can return a non-OK
result. This is completely normal in some cases. It is
necessary to "poll" the drive for seek status using
sense interrupt. If there is nothing to report, then
the result will be INVALID COMMAND. Additionally,
during a recalibrate operation, it may be necessary to
issue the command twice because the command will only step
the drive 77 times looking for track 0, but the head may be
up to 80 tracks away. In this case, the first recalibrate
fails, but the second should succeed. Here is what this
would look like if trace is turned on:
RECALIBRATE: 07 01 --> <EMPTY> [OK]
SENSE INTERRUPT: 08 --> 80 [INVALID COMMAND]
...
...
...
SENSE INTERRUPT: 08 --> 80 [INVALID COMMAND]
SENSE INTERRUPT: 08 --> 71 00 [ABNORMAL TERMINATION]
RECALIBRATE: 07 01 --> <EMPTY> [OK]
SENSE INTERRUPT: 08 --> 21 00 [OK]
Another example is when the FDC has just been reset. In
this case, you will see up to 4 disk change errors. Again
these are not a real problem and to be expected.
When tracing is turned off, the application tries to be
intelligent about error reporting. The specific errors
from sense interrupt documented above will be suppressed
because they are not a real problem. All other
errors will be displayed.
Error Handling
--------------
There is no automated error retry logic. This is very
intentional since the point is to expose the controller
and drive activity. Any error detected will result in
a prompt to abort, retry, or continue. Note that some
number of errors is considered normal for this
technology. An occasional error would not necessarily
be considered a problem.
CPU Speed
---------
I distribute the binary version of the application optimized for
20MHz CPUs. There is a configuration variable called CPUFREQ
at the top of the source file. Ideally, you should build
with that set appropriately. However, I have found that the
default build setting of 20MHz seems to work for 4-20MHz CPUs.
Interleave
----------
The format command now allows the specification of a sector
interleave. It is almost always the case that the optimal
interleave will be 2 (meaning 2:1).
360K Media
----------
The 360K media definition should work well for true 360K
drives. However, it will generally not work
with 1.2M drives. This is because these drives spin at 360RPM
instead of the 300RPM speed of true 360K drives. Additionally,
1.2M drives are 80 tracks and 360K drives are 40 tracks and, so
far, there is no mechanism in FDTST to "double step" as a way
to use 40 track media in 80 track drives.
With this said, it is possible to configure some 1.2M 5.25" drives
to automatically spin down to 300RPM based on a density select
signal (DENSEL). This signal is asserted by FDTST for 360K
media, so IF you have configured your drive to react to this
signal correctly, you will be able to use the 360K media defintion.
Most 1.2M 5.25" drives are NOT configured this way by default.
TEAC drives are generally easy to modify and have been tested by
the author and do work in this manner. Note that this does not
address the issue of double stepping above; you will just be
using the first 40 of 80 tracks.
Support
-------
I am happy to answer questions as fast and well as I am able.
Best contact is wwarthen@gmail.com or post something on the
N8VEM Google Group https://groups.google.com/forum/#!forum/n8vem.
Changes
-------
WW 8/12/2011
Removed call to pulse TC in the FDC initialization
after determining that it periodically caused the FDC to write
bad sectors. I am mystified by this, but definitely found it
to be true. Will revisit at some point -- probably a timing
issue between puslsing TC and whatever happens next.
Non-DMA mode was being set incorrectly for FAST-DMA mode.
It was set for non-DMA even though we were doing DMA. It is
interesting that it worked fine anyway. Fixed it anyway.
DIO_SETMEDIA was not clearing DCD_DSKRDY as it should. Fixed.
WW 8/26/2011: v1.1
Added support for Zeta. Note that INT/WAIT and DRQ/WAIT are
not available on Zeta. Note that Zeta provides the ability
to perform a reset of the FDC independent of a full CPU
reset. This is VERY useful and the FDC is reset anytime
a drive reset is required.
Added INT/WAIT support.
WW 8/28/2011: V1.2
All changes in this version are Zeta specific. Fixed FDC reset
logic and motor status display for Zeta (code from Sergey).
Modified Zeta disk change display to include it in the
command output line. This makes more sense because a command
must be issued to select the desired drive first. You can
use the SENSE INT command id you want to check the disk
change value at any time. It will also be displayed with
any other command output display.
WW 9/1/2011: V1.3
Added CPUFREQ configuration setting to tune
delays based on cpu speed. The build app
is set for 8MHz which also seems to work well
for 4MHz CPU's. Faster CPU speeds will
probably require tuning this setting.
WW 9/5/2011: V1.4
Changed the polling execution routines to utilize CPUFREQ
variable to optimize timeout counter. Most importantly,
this should allow the use of faster CPUs (like 20MHz).
WW 9/19/2011: V1.5
Zeta changes only. Added a call to FDC RESET after any
command failure. This solves an issue where the drive
remains selected if a command error occurs. Also
added FDC RESET to FDC CONTROL menu.
WW 10/7/2011: V2.0
Added support for DIDE. Only supports polling IO and it
does not appear any other modes are possible given the
hardware constraints.
WW 10/13/2011: V2.1
Modified to support N8. N8 is essentially identical to
Dual IDE. The only real change is the IO addresses. In
theory, I should be able to support true DMA on N8 and
will work on that.
WW 10/20/2011: v2.2
I had some problems with the results being read were
sometimes missing a byte. Fixed this by taking a more
strict approach to watching the MSR for the exact
bits that are expected.
WW 10/22/2011: V2.3
After spending a few days trying to track down an
intermittent data corruption issue with my Dual IDE
board, I added a verify function. This helped
me isolate the problem very nicely (turned out to
be interference from the bus monitor).
WW 11/25/2011: V2.4
Preliminary support for DISKIO V3. Basically just
assumed that it operates just like the Zeta. Needs
to be verified with real hardware as soon as I can.
WW 1/9/2012: V2.5
Modified program termination to use CP/M reset
call so that a warm start is done and all
drives are logged out. This is important
because media may have been formatted during
the program execution.
WW 2/6/2012: v2.6
Added support for 5.25" drives as tested by
Sergio.
WW 4/5/2012: v2.7
Added support for 8" drives as tested by
Jim Harre.
WW 4/6/2012: v2.7a
Fixed issue with media selection menu to remove
duplicate entries.
WW 4/8/2012: v2.7b
Corrected the handling of the density select
signal.
WW 5/22/2012: v2.8
Added new media definitions (5.25", 320K)
WW 6/1/2012: v2.9
Added interleave capability on format
WW 6/5/2012: v3.0
Documentation cleanup
WW 7/1/2012: v3.1
Modified head load time (HLT) for 8" media based on
YD-180 spec. Now set to 50ms.

View File

@@ -1,45 +0,0 @@
Assembling the RomWBW firmware under Linux.
Note: Updated on 6/25/2013 to eliminate the need for the separate Linux
makefile. The standard makefile now has conditionals to allow it to be
used under Windows or Linux (I hope) --WW
This method has been used under Ubuntu Linux and may have to be adapted for
other distributions. It is a bit more involved than the Windows procedure.
What you need
You will need the TASM assembler, make, dos2unix and cpmtools.
The TASM assembler is shareware and the Linux version is only available as
source code from the Author. I found one bug during compiling version 3.2 for
Ubuntu. In /src/tasm.c change the reference CLK_TIC to CLOCKS_PER_SEC.
After compiling install the tasm executable to /usr/local/bin and the table
files to /usr/local/lib. If you choose to place them somewhere else you will
have to edit the "makefile.linux" file to suit.
The make, dos2unix and cpmtools packages are found in the Linux repository and
installed as for any other package.
Before assembly
Some changes need to be made to cater for the differences between Linux and the
DOS/Windows environments. The examples below refer to the /RomWBW/current
directory, you'll have to allow for the stable or branches directories if used.
These are all done from a terminal. (: is end of the command prompt)
1. Go to the RomWBW Source directory.e.g.
:cd /n8vem/RomWBW/current/Source
2. The Linux version of TASM can't handle the CR-LF line endings. So from the
command prompt use dos2unix to convert all the source files.
:~/RomWBW/current/Source dos2unix -f *.asm *.inc *.z80 *.lib diskdefs
3. You'll have to alter the disk definitions for the cpmtools package to cater
for the new roms. Easiest way is to copy the one given in the source over the
old. This must be done as superuser.
:~/RomWBW/current/Source sudo cp diskdefs /etc/cpmtools/diskdefs
4. From now on it's the same as using the DOS/Windows instructions in Build.txt.
Make any last changes, go to the Source directory and make
:~/RomWBW/current/Source make clean ; make
DGG

Binary file not shown.

View File

@@ -1,19 +0,0 @@
The table below can be used to determine the correct value for CLKDIV AND CNTLB
in an Z180 (N8) configuration file. OSC Freq refers to the hardware clock
oscillator frequency you are using. You can then choose a CLKDIV value which
will result in the CPU speed (frequency) shown below the oscillator frequency.
Using your oscillator frequency (OSC) and chosen value for CLKDIV, you can
use the appropriate column to derive values to use for CNTLB for different
baud rates.
----- CLKDIV = 0 ----- ----- CLKDIV = 1 -----
OSC Freq (MHz) 6.144 12.288 18.432 6.144 12.288 18.432
CPU Freq (MHz) 3.072 6.144 9.216 6.144 12.288 18.432
1200 baud 04H 05H 24H 05H 06H 25H
2400 baud 03H 04H 23H 04H 05H 24H
4800 baud 02H 03H 22H 03H 04H 23H
9600 baud 01H 02H 21H 02H 03H 22H
19200 baud 00H 01H 20H 01H 02H 21H
38400 baud --- 00H --- 00H 01H 20H

View File

@@ -1,3 +1,9 @@
ZSDOS Adaptation Notes for RomWBW
---------------------------------
Wayne Warthen
wwarthen@gmail.com
This file is a log of the work done to adapt the ZSDOS distribution to the N8VEM platforms under RomWBW. I strongly recommend reviewing the zsdos.pdf file in the Doc directory.
The starting point was the general public release of ZSDOS that is generally available. The first line of the README file is "ZSDOS-GP. General Public Release of the ZSDOS 1.x Operating System."
@@ -26,6 +32,8 @@ The remainder of this document details the changes I made as I went along. In a
6. Updated FILEATTR to v1.6A. Original FILEATTR.CFG was invalid. FILEATTR.CFG replaced with FA16.CFG. Added associated files FA16.DOC, FA16A.FOR, FA16CFG.TXT.
7. ZCAL patched to be Y2K compliant. Contributed by Nick Brok.
Usage Notes
-----------

564
Doc/DDTZ.doc Normal file
View File

@@ -0,0 +1,564 @@
DDTZ v2.7
by C.B. Falconer
edited by George A. Havach
Introduction:
============
DDTZ v2.7 is a complete replacement for DDT, Digital Research's
famous Dynamic Debugging Tool, with improved functionality, bug
extermination, and full Z80 support. In general, DDTZ is fully
compatible with the original utility, but it has extra and
extended commands and many fewer quirks. All Z80-specific
instructions can be (dis)assembled, though in Intel rather then
Zilog format. Furthermore, DDTZ will correctly trace ('T' and 'U'
commands) both 8080 and Z80 instructions, depending on which CPU
is operating. On startup, the program announces which CPU it is
running on.
DDTZ v2.7 now handles the 64180 added opcodes. It does NOT test
for a 64180 CPU, since this cannot be done without executing
illegal Z80 instructions, which in turn will crash some
simulators. However v2.7 does not execute any 64180 instructions
internally, only in the subject program.
This issue supplies the "M" version assembled, to avoid errors
when switching between MSDOS and CPM systems. The command table
is updated accordingly. Most CPM users are also MSDOS users, but
not vice-versa.
The program is invoked by typing
ddtz<ret>
or
ddtz [d:]filespec<ret>
In the second form, DDTZ will load the specified file into
memory starting at 0100H, unless it's a .HEX file that sets its
own load address. Besides reporting the NEXT free address and
the PC (program counter) after a successful load, DDTZ also shows
the number of memory pages needed for a SAVE. Instead of having
to write all this down, just use the 'X' command at any time to
redisplay these three values for the current application.
NOTE: loading more code above the NEXT pointer revises these
values.
As in DDT, when a program is loaded above the area holding the
'A' and 'U' (and now 'W') command code, these commands are
disabled, and the extra memory is released to the user. Thus,
DDTZ can occupy as little as 3K total memory space. Unlike DDT,
however, DDTZ will not overwrite itself or the system on program
loads (except .HEX files).
At initialization, the stack pointer (SP) points to a return to
DDTZ, just like for the CCP. Thus, programs that normally return
to the CCP will be returned to DDTZ. The 'B' command
reinitializes this condition.
The intercept vector copies the BDOS version number, etc., so
an object program does not know that DDTZ is running (except
for BIOS-BDOS vector size). Thus, programs that check the version
number should execute correctly under DDTZ.
All input parameters can now be entered in any of three formats:
(1) hexadecimal (as in DDT),
(2) decimal, by adding a leading '#' character,
(3) ASCII, by enclosing between either single or double
quotes; either one or two characters are allowed.
Leading blanks in command lines and parameters are absorbed.
Either a comma or a (single) space is a valid delimiter.
Either uppercase or lowercase input is accepted.
The default command (for anything not otherwise recognizable)
is 'H'. This allows convenient calculation, along with the other
features described below. So, to convert a number, just enter
it!
As in DDT, the prompt character is '-', and the only error
message is the query ('?'), which generally kicks you back to
command mode.
New Commands (Over DDT):
=======================
NOTE: letters in parenthesis, e.g. "(U)", show the equivalent
command for DDTZM version (compatible with MSDOS debug).
@ Sets or shows (with no parameter) the internally stored
"base" value. Also used with the 'S' and 'D' commands as
an optional parameter (though without the '@') to display
memory from an arbitrary base marker (offset). When set to
zero (the default), it does not affect any screen displays.
B B)egin: resets the USER stack pointer to its initial value,
such that any program that exits by an RET will return to
DDTZ. DDTZ provides a default stack space of
approximately 24 bytes for user programs.
C C)ompare first_address,last_address,against_address: shows
all the byte differences between two memory areas, in the
format
XXXX aa YYYY bb
where XXXX and YYYY are the comparative memory addresses,
and aa and bb are the corresponding byte values. Can be
used to verify the identity of two files by first
loading them into different memory areas with the 'R'
command (see below).
W Write: stores the modified memory area to disk under the
(K) filename specified by the 'I' command, overwriting the
original file from which it was loaded (the user is queried
before doing so). By default, the image of memory from
0100H through the "NEXT" value -1 is saved. "K first_addr,
last_address" overrides this and allows writing ANY memory
area to a file. Almost a necessity for CPM 3.0 (no SAVE!).
K)eep on DDTZ
X eXamine: redisplays the "NEXT PC SAVE" report at any time.
(Q) Q)uery size on DDTZ.
S S)earch first_address, last_addr, value: searches the
(W) specified memory area for the value (a 16-bit word, not a
byte) and shows the locations of all such. Very useful for
finding CALL's or JMP's to a particular address, etc.
W)here on DDTZ
Y Y)our_option parm1,parm2,address: executes an arbitrary
routine at the specified address, with the BC and DE
registers set to parm1 and parm2, respectively.
Z Displays (but does not alter) the Z80's alternate register
set, including the index registers (disabled if running on
an 8080). On Z80's, automatically included as the last
part of the display by the 'X' command.
Based (Offset) Displays:
=======================
The 'D' and 'E' commands can use a stored base value (offset),
as set by the '@' command. The current @ value may be
overridden for a single execution of these commands by adding the
base as an extra parameter in the command line. The effect is
to add this value to the first/last address and display
accordingly. The address listing on the left becomes XXXX:YYYY,
where XXXX is the offset address and YYYY is the actual memory
address being displayed. For example, if you have a data area
located at 42B7H and wish to preserve easy access, just enter
"@42b7". Now, "d0,3f" will dump memory starting at 4237H.
Further Changes from DDT:
========================
A A)ssemble now accepts the full Z80 as well as 8080
instruction set, although it expects them in Intel rather
than Zilog format (see notes below under the 'L'
command). When in doubt, see the mnemnonic list below.
D D)isplay or D)ump will accept an optional third parameter
to set the base value for a single execution only. Format
has been cleaned up.
H H)ex_arithmetic on two values also shows their
difference in decimal. With only one value, converts to
hexadecimal, decimal, and ASCII (low-order byte only).
N N)ame now allows drive specification (d:...) and sets up
(I) the complete command line, including both FCB's (at
addresses 005CH and 006CH). The tail (stored at 0081H up)
is NOT upshifted.
I)nput on DDTZ
U U)nassemble now displays the raw hexcode, especially handy
(L) when examining non-code areas. Intel (8080 style) mnemonics
are used, so some disassembled instructions may look
strange. E.g., the Z80's 'IN B,(C)' and 'OUT (C),B' become
'INP B' and 'OUTP B', respectively; 'LD (nnnn),BC' becomes
'SBCD nnnn', 'ADD IX, BC' becomes 'DADX B', and 'JP (IX)'
becomes 'PCIX'.
L)ist on DDTZ
L L)oad now permits loading a file into memory with an
(R) offset, which is added to the default load address of
0100H. When reading in a .HEX file with a preset bias,
the 'R' command will not transfer control to an invalid
execution point. Another execution of the 'R' command will
reread the input file, e.g.:
n blah<ret>
l<ret>
...modify the code and generally mess about...
l<ret>
The original file is reloaded, and the modifications are
removed.
R)ead on DDTZ
E E)nter, like D)isplay, now accepts an optional second
(S) parameter to set the base value for a single execution
only.
S)ubstitute or S)et on DDTZ
T T)rap/trace on termination now shows the complete CPU
state. Traps and traces no longer lock up when a user RST
7 instruction is executed. Tracing of BDOS/BIOS calls is
heavily trun cated, avoiding clutter and preventing system
crashes.
NOTE: Most of the UNDOCUMENTED Z80 op-codes are handled. Others
can crash the system.
R R)egisters also shows what two-byte values the HL and SP
(X) registers are actually pointing to. On Z80's, displays the
alternate register set.
eX)amine on DDTZ
NOTE: Any use of the 'W' or 'L' command resets the system DMA
transfer address to the standard default value of 0080H.
; This is the output of DDTZ when disassembling OPTYPE.TRY
NOP LDA 06A4 MOV M,H
LXI B,06A4 DCX SP MOV M,L
STAX B INR A HLT
INX B DCR A MOV M,A
INR B MVI A,20 MOV A,B
DCR B CMC MOV A,C
MVI B,20 MOV B,B MOV A,D
RLC MOV B,C MOV A,E
EXAF MOV B,D MOV A,H
DAD B MOV B,E MOV A,L
LDAX B MOV B,H MOV A,M
DCX B MOV B,L MOV A,A
INR C MOV B,M ADD B
DCR C MOV B,A ADD C
MVI C,20 MOV C,B ADD D
RRC MOV C,C ADD E
DJNZ 0134 MOV C,D ADD H
LXI D,06A4 MOV C,E ADD L
STAX D MOV C,H ADD M
INX D MOV C,L ADD A
INR D MOV C,M ADC B
DCR D MOV C,A ADC C
MVI D,20 MOV D,B ADC D
RAL MOV D,C ADC E
JR 0134 MOV D,D ADC H
DAD D MOV D,E ADC L
LDAX D MOV D,H ADC M
DCX D MOV D,L ADC A
INR E MOV D,M SUB B
DCR E MOV D,A SUB C
MVI E,20 MOV E,B SUB D
RAR MOV E,C SUB E
JRNZ 0134 MOV E,D SUB H
LXI H,06A4 MOV E,E SUB L
SHLD 06A4 MOV E,H SUB M
INX H MOV E,L SUB A
INR H MOV E,M SBB B
DCR H MOV E,A SBB C
MVI H,20 MOV H,B SBB D
DAA MOV H,C SBB E
JRZ 0134 MOV H,D SBB H
DAD H MOV H,E SBB L
LHLD 06A4 MOV H,H SBB M
DCX H MOV H,L SBB A
INR L MOV H,M ANA B
DCR L MOV H,A ANA C
MVI L,20 MOV L,B ANA D
CMA MOV L,C ANA E
JRNC 0134 MOV L,D ANA H
LXI SP,06A4 MOV L,E ANA L
STA 06A4 MOV L,H ANA M
INX SP MOV L,L ANA A
INR M MOV L,M XRA B
DCR M MOV L,A XRA C
MVI M,20 MOV M,B XRA D
STC MOV M,C XRA E
JRC 0134 MOV M,D XRA H
DAD SP MOV M,E XRA L
XRA M JPE 06A4 SLAR M
XRA A XCHG SLAR A
ORA B CPE 06A4 SRAR B
ORA C XRI 20 SRAR C
ORA D RST 5 SRAR D
ORA E RP SRAR E
ORA H POP PSW SRAR H
ORA L JP 06A4 SRAR L
ORA M DI SRAR M
ORA A CP 06A4 SRAR A
CMP B PUSH PSW SLLR B
CMP C ORI 20 SLLR C
CMP D RST 6 SLLR D
CMP E RM SLLR E
CMP H SPHL SLLR H
CMP L JM 06A4 SLLR L
CMP M EI SLLR M
CMP A CM 06A4 SLLR A
RNZ CPI 20 SRLR B
POP B RST 7 SRLR C
JNZ 06A4 RLCR B SRLR D
JMP 06A4 RLCR C SRLR E
CNZ 06A4 RLCR D SRLR H
PUSH B RLCR E SRLR L
ADI 20 RLCR H SRLR M
RST 0 RLCR L SRLR A
RZ RLCR M BIT 0,B
RET RLCR A BIT 0,C
JZ 06A4 RRCR B BIT 0,D
CZ 06A4 RRCR C BIT 0,E
CALL 06A4 RRCR D BIT 0,H
ACI 20 RRCR E BIT 0,L
RST 1 RRCR H BIT 0,M
RNC RRCR L BIT 0,A
POP D RRCR M BIT 1,B
JNC 06A4 RRCR A BIT 1,C
OUT 20 RALR B BIT 1,D
CNC 06A4 RALR C BIT 1,E
PUSH D RALR D BIT 1,H
SUI 20 RALR E BIT 1,L
RST 2 RALR H BIT 1,M
RC RALR L BIT 1,A
EXX RALR M BIT 2,B
JC 06A4 RALR A BIT 2,C
IN 20 RARR B BIT 2,D
CC 06A4 RARR C BIT 2,E
SBI 20 RARR D BIT 2,H
RST 3 RARR E BIT 2,L
RPO RARR H BIT 2,M
POP H RARR L BIT 2,A
JPO 06A4 RARR M BIT 3,B
XTHL RARR A BIT 3,C
CPO 06A4 SLAR B BIT 3,D
PUSH H SLAR C BIT 3,E
ANI 20 SLAR D BIT 3,H
RST 4 SLAR E BIT 3,L
RPE SLAR H BIT 3,M
PCHL SLAR L BIT 3,A
BIT 4,B RES 3,D SET 2,H
BIT 4,C RES 3,E SET 2,L
BIT 4,D RES 3,H SET 2,M
BIT 4,E RES 3,L SET 2,A
BIT 4,H RES 3,M SET 3,B
BIT 4,L RES 3,A SET 3,C
BIT 4,M RES 4,B SET 3,D
BIT 4,A RES 4,C SET 3,E
BIT 5,B RES 4,D SET 3,H
BIT 5,C RES 4,E SET 3,L
BIT 5,D RES 4,H SET 3,M
BIT 5,E RES 4,L SET 3,A
BIT 5,H RES 4,M SET 4,B
BIT 5,L RES 4,A SET 4,C
BIT 5,M RES 5,B SET 4,D
BIT 5,A RES 5,C SET 4,E
BIT 6,B RES 5,D SET 4,H
BIT 6,C RES 5,E SET 4,L
BIT 6,D RES 5,H SET 4,M
BIT 6,E RES 5,L SET 4,A
BIT 6,H RES 5,M SET 5,B
BIT 6,L RES 5,A SET 5,C
BIT 6,M RES 6,B SET 5,D
BIT 6,A RES 6,C SET 5,E
BIT 7,B RES 6,D SET 5,H
BIT 7,C RES 6,E SET 5,L
BIT 7,D RES 6,H SET 5,M
BIT 7,E RES 6,L SET 5,A
BIT 7,H RES 6,M SET 6,B
BIT 7,L RES 6,A SET 6,C
BIT 7,M RES 7,B SET 6,D
BIT 7,A RES 7,C SET 6,E
RES 0,B RES 7,D SET 6,H
RES 0,C RES 7,E SET 6,L
RES 0,D RES 7,H SET 6,M
RES 0,E RES 7,L SET 6,A
RES 0,H RES 7,M SET 7,B
RES 0,L RES 7,A SET 7,C
RES 0,M SET 0,B SET 7,D
RES 0,A SET 0,C SET 7,E
RES 1,B SET 0,D SET 7,H
RES 1,C SET 0,E SET 7,L
RES 1,D SET 0,H SET 7,M
RES 1,E SET 0,L SET 7,A
RES 1,H SET 0,M DADX B
RES 1,L SET 0,A DADX D
RES 1,M SET 1,B LXI X,06A4
RES 1,A SET 1,C SIXD 06A4
RES 2,B SET 1,D INX X
RES 2,C SET 1,E DADX X
RES 2,D SET 1,H LIXD 06A4
RES 2,E SET 1,L DCX X
RES 2,H SET 1,M INR [X+05]
RES 2,L SET 1,A DCR [X+05]
RES 2,M SET 2,B MVI [X+05],20
RES 2,A SET 2,C DADX SP
RES 3,B SET 2,D MOV B,[X+05]
RES 3,C SET 2,E MOV C,[X+05]
MOV D,[X+05] DSBC B DADY B
MOV E,[X+05] SBCD 06A4 DADY D
MOV H,[X+05] NEG LXI Y,06A4
MOV L,[X+05] RETN SIYD 06A4
MOV [X+05],B IM0 INX Y
MOV [X+05],C LDIA DADY Y
MOV [X+05],D INP C LIYD 06A4
MOV [X+05],E OUTP C DCX Y
MOV [X+05],H DADC B INR [Y+05]
MOV [X+05],L LBCD 06A4 DCR [Y+05]
MOV [X+05],A RETI MVI [Y+05],2
MOV A,[X+05] LDRA DADY SP
ADD [X+05] INP D MOV B,[Y+05]
ADC [X+05] OUTP D MOV C,[Y+05]
SUB [X+05] DSBC D MOV D,[Y+05]
SBB [X+05] SDED 06A4 MOV E,[Y+05]
ANA [X+05] IM1 MOV H,[Y+05]
XRA [X+05] LDAI MOV L,[Y+05]
ORA [X+05] INP E MOV [Y+05],B
CMP [X+05] OUTP E MOV [Y+05],C
POP X DADC D MOV [Y+05],D
XTIX LDED 06A4 MOV [Y+05],E
PUSH X IM2 MOV [Y+05],H
PCIX LDAR MOV [Y+05],L
SPIX INP H MOV [Y+05],A
RLCR [X+05] OUTP H MOV A,[Y+05]
RRCR [X+05] DSBC H ADD [Y+05]
RALR [X+05] shld 06A4 ADC [Y+05]
RARR [X+05] RRD SUB [Y+05]
SLAR [X+05] INP L SBB [Y+05]
SRAR [X+05] OUTP L ANA [Y+05]
SRLR [X+05] DADC H XRA [Y+05]
BIT 0,[X+05] lhld 06A4 ORA [Y+05]
BIT 1,[X+05] RLD CMP [Y+05]
BIT 2,[X+05] INP M POP Y
BIT 3,[X+05] OUTP M XTIY
BIT 4,[X+05] DSBC SP PUSH Y
BIT 5,[X+05] SSPD 06A4 PCIY
BIT 6,[X+05] INP A SPIY
BIT 7,[X+05] OUTP A RLCR [Y+05]
RES 0,[X+05] DADC SP RRCR [Y+05]
RES 1,[X+05] LSPD 06A4 RALR [Y+05]
RES 2,[X+05] LDI RARR [Y+05]
RES 3,[X+05] CCI SLAR [Y+05]
RES 4,[X+05] INI SRAR [Y+05]
RES 5,[X+05] OTI SRLR [Y+05]
RES 6,[X+05] LDD BIT 0,[Y+05]
RES 7,[X+05] CCD BIT 1,[Y+05]
SET 0,[X+05] IND BIT 2,[Y+05]
SET 1,[X+05] OTD BIT 3,[Y+05]
SET 2,[X+05] LDIR BIT 4,[Y+05]
SET 3,[X+05] CCIR BIT 5,[Y+05]
SET 4,[X+05] INIR BIT 6,[Y+05]
SET 5,[X+05] OTIR BIT 7,[Y+05]
SET 6,[X+05] LDDR RES 0,[Y+05]
SET 7,[X+05] CCDR RES 1,[Y+05]
INP B INDR RES 2,[Y+05]
OUTP B OTDR RES 3,[Y+05]
RES 4,[Y+05] SET 0,[Y+05] SET 4,[Y+05]
RES 5,[Y+05] SET 1,[Y+05] SET 5,[Y+05]
RES 6,[Y+05] SET 2,[Y+05] SET 6,[Y+05]
RES 7,[Y+05] SET 3,[Y+05] SET 7,[Y+05]
; These are the result of disassembling 64180OPS.TRY
; These opcodes are available ONLY on the 64180 CPU
; DDTZ will both assemble and disassemble these.
IN0 B,20 TST E MLT B
OUT0 20,B IN0 H,20 MLT D
TST B OUT0 20,H TSTI 20
IN0 C,20 TST H MLT H
OUT0 20,C IN0 L,20 TSIO 20
TST C OUT0 20,L SLP
IN0 D,20 TST L MLT SP
OUT0 20,D TST M OTIM
TST D IN0 A,20 OTDM
IN0 E,20 OUT0 20,A OIMR
OUT0 20,E TST A ODMR
; The following are UNDOCUMENTED z80 opcodes from XTDOPS.TRY.
; DDTZ will disassemble these, but will not assemble them.
; They use xh/xl (or yh/yl) as separate byte registers.
; Use these at your own risk.
INRX H ACXR H MOVY H,B
DCRX H ACXR L MOVY H,C
MVIX H,20 SUXR H MOVY H,D
INRX L SUXR L MOVY H,E
DCRX L SBXR H MOVY H,A
MVIX L,20 SBXR L MOVY L,B
MOVX B,H NDXR H MOVY L,C
MOVX B,L NDXR L MOVY L,D
MOVX C,H XRXR H MOVY L,E
MOVX C,L XRXR L MOVY L,A
MOVX D,H ORXR H MOVY A,H
MOVX D,L ORXR L MOVY A,L
MOVX E,H CPXR H ADYR H
MOVX E,L CPXR L ADYR L
MOVX H,B INRY H ACYR H
MOVX H,C DCRY H ACYR L
MOVX H,D MVIY H,20 SUYR H
MOVX H,E INRY L SUYR L
MOVX H,A DCRY L SBYR H
MOVX L,B MVIY L,20 SBYR L
MOVX L,C MOVY B,H NDYR H
MOVX L,D MOVY B,L NDYR L
MOVX L,E MOVY C,H XRYR H
MOVX L,A MOVY C,L XRYR L
MOVX A,H MOVY D,H ORYR H
MOVX A,L MOVY D,L ORYR L
ADXR H MOVY E,H CPYR H
ADXR L MOVY E,L CPYR L
Command Summary:
===============
DDTZM command DDTZ command
============= ============
@ (base)
A)ssemble first_address A
B)egin {i.e., initialize stack and return} B
C)ompare first_address,last_address,against_address C
D)ump first_address[,last_address[,base]] D
E)nter_in_memory first_address[,base] S)ubstitute
F)ill first_address,last_address,value F
G)o_to [address][,trap1[,trap2]] G
H)ex_arithmetic value1(,value2) H
L)oad_file (offset) R)ead
M)ove first_address,last_address,destination M
N)nput FCBs_command_line I)nput
Q)uit (not avail)
R)egister examine/change [register|flag] X)amine
S)earch first_address,last_address,word W)hereis
T)race_execution [count] T
Untrace_execution [count] (i.e. do count instr) U)ntrace
U)nassemble_code first_address[,last_address] L)ist code
W)rite [first_address,last_address] K)eep
X)amine {i.e. display memory parameters for application} Q)uery
Y)our_option BC:=parm1,DE:=parm2,call_address Y
Z)80_register_display Z
If you find this program useful, contributions will be gratefully
accepted and will encourage further development and release of
useful CPM programs. My practice is to include source.
C.B. Falconer
680 Hartford Turnpike,
Hamden, Conn. 06517 (203) 281-1438
DDTZ and its associated documentation and other files are
copyright (c) 1980-1988 by C.B. Falconer. They may be freely
copied and used for non-commercial purposes ONLY.
ôÙ

514
Doc/FDU.txt Normal file
View File

@@ -0,0 +1,514 @@
================================================================
Floppy Disk Utility (FDU) v5.3 for RetroBrew Computers
Disk IO / Zeta / Dual-IDE / N8 / RC2014 / SmallZ80 / Dyno
================================================================
Updated January 5, 2020
by Wayne Warthen (wwarthen@gmail.com)
Application to test the hardware functionality of the Floppy
Disk Controller (FDC) on the ECB DISK I/O, DISK I/O V3, ZETA
SBC, Dual IDE w/ Floppy, or N8 board.
The intent is to provide a testbed that allows direct testing
of all possible media types and modes of access. The
application supports read, write, and format by sector, track,
and disk as well as a random read/write test.
The application supports access modes of polling, interrupt,
INT/WAIT, and DRQ/WAIT. At present, it supports 3.5" media at
DD (720KB) and HD (1.44MB) capacities. It also now supports
5.25" media (720KB and 1.2MB) and 8" media (1.11MB) as well.
Additional media will be added when I have time and access to
required hardware. Not all modes are supported on all
platforms and some modes are experimental in all cases.
In many ways this application is merely reinventing the wheel
and performs functionality similar to existing applications,
but I have not seen any other applications for RetroBrew
Computers hardware that provide this range of functionality.
While the application is now almost entirely new code, I would
like to acknowledge that much was derived from the previous
work of Andrew Lynch and Dan Werner. I also want to credit
Sergio Gimenez with testing the 5.25" drive support and Jim
Harre with testing the 8" drive support. Support for Zeta 2
comes from Segey Kiselev. Thanks!
General Usage
-------------
In general, usage is self explanatory. At invocation, you
must select the floppy disk controller (FDC) that you are
using. Subsequently, the main menu allows you to set the
unit, media, and mode to test. These settings MUST match your
situation. Read, write, format, and verify functions are
provided. A sub-menu will allow you to choose sector, track,
disk, or random tests.
The verify function requires a little explanation. It will
take the contents of the current in-memory disk buffer, save
it, and compare it to the selected sectors. So, you must
ensure that the sectors to be verified already have been
written with the same pattern as the buffer contains. I
typically init the buffer to a pattern, write the pattern to
the entire disk, then verify the entire disk.
Another submenu is provided for FDC commands. This sub-menu
allows you to send low-level commands directly to FDC. You
*must* know what you are doing to use this sub-menu. For
example, in order to read a sector using this sub-menu, you
will need to perform specify, seek, sense int, and read
commands specifying correct values (nothing is value checked
in this menu).
Required Hardware/BIOS
----------------------
Of course, the starting point is to have a supported hardware
configuration. The following Z80 / Z180 based CPU boards are
supported:
- SBC V1/2
- Zeta
- Zeta 2
- N8
- Mark IV
- RC2014 w/ SMC
- RC2014 w/ WDC
- SmallZ80
- Dyno
You must be using either a RomWBW or UBA based OS version.
You must have one of the following floppy disk controllers:
- Disk IO ECB Board FDC
- Disk IO 3 ECB Board FDC
- Dual-IDE ECB Board FDC
- Zeta SBC onboard FDC
- Zeta 2 SBC onboard FDC
- N8 SBC onboard FDC
- RC2014 Scott Baker SMC-based Floppy Module
- RC2014 Scott Baker WDC-based Floppy Module
Finally, you will need a floppy drive connected via an
appropriate cable:
Disk IO - no twist in cable, drive unit 0/1 must be selected by jumper on drive
DISK IO 3, Zeta, Zeta 2, RC2014, Dyno - cable with twist, unit 0 after twist, unit 1 before twist
DIDE, N8, Mark IV, SmallZ80 - cable with twist, unit 0 before twist, unit 1 after twist
Note that FDU does not utilize your systems ROM or OS to
access the floppy system. FDU interacts directly with
hardware. Upon exit, you may need to reset your OS to get the
floppy system back into a state that is expected.
The Disk I/O should be jumpered as follows:
J1: depends on use of interrupt modes (see interrupt modes below)
J2: pins 1-2, & 3-4 jumpered
J3: hardware dependent timing for DMA mode (see DMA modes below)
J4: pins 2-3 jumpered
J5: off
J6: pins 2-3 jumpered
J7: pins 2-3 jumpered
J8: off
J9: off
J10: off
J11: off
J12: off
Note that J1 can be left on even when not using interrupt
modes. As long as the BIOS is OK with it, that is fine. Note
also that J3 is only relevant for DMA modes, but also can be
left in place when using other modes.
The Disk I/O 3 board should be jumpered at the default settings:
JP2: 3-4
JP3: 1-2 for int mode support, otherwise no jumper
JP4: 1-2, 3-4
JP5: 1-2
JP6: 1-2
JP7: 1-2, 3-4
Zeta & Zeta 2 do not have any relevant jumper settings. The
hardwired I/O ranges are assumed in the code.
The Dual-IDE board should be jumpered as follows:
K3 (DT/R or /RD): /RD
P5 (bd ID): 1-2, 3-4 (for $20-$3F port range)
There are no specific N8 jumper settings, but the default
I/O range starting at $80 is assumed in the published code.
The RC2014 Scott Baker SMC-based floppy module should be jumpered
for I/O base address 0x50 (SV1: 11-12), JP1 (TS) shorted,
JP2 (/FAULT) shorted, JP3 (MINI): 2-3, JP4 (/DC/RDY): 2-3.
The RC2014 Scott Baker WDC-based floppy module should be jumpered
for I/O base address 0x50 (SV1: 11-12), JP1 (/DACK): 1-2,
JP2 (TC): 2-3.
SmallZ80 does not have any relevant jumper settings. The
hardwired I/O ranges are assumed in the code.
Dyno does not have any relevant jumper settings. The
hardwired I/O ranges are assumed in the code.
Modes of Operation
------------------
You can select the following test modes. Please refer to the
chart that follows to determine which modes should work with
combinations of Z80 CPU speed and media format.
WARNING: In general, only the polling mode is considered fully
reliable. The other modes are basically experimental and
should only be used if you know exactly what you are doing.
Polling: Traditional polled input/output. Works well and very
reliable with robust timeouts and good error recovery. Also,
the slowest performance which precludes it from being used
with 1.44MB floppy on a 4MHz Z80. This is definitely the mode
you want to get working before any others. It does not require
J1 (interrupt enable) on DISK I/O and does not care about the
setting of J3.
Interrupt: Relies on FDC interrupts to determine when a byte
is ready to be read/written. It does *not* implement a
timeout during disk operations. For example, if there is no
disk in the drive, this mode will just hang until a disk is
inserted. This mode *requires* that the host has interrupts
active using interrupt mode 1 (IM1) and interrupts attached to
the FDC controller. The BIOS must be configured to handle
these interrupts safely.
Fast Interrupt: Same as above, but sacrifices additional
reliability for faster operation. This mode will allow a
1.44MB floppy to work with a 4MHz Z80 CPU. However, if any
errors occur (even a transient read error which is not
unusual), this mode will hang. The same FDC interrupt
requirements as above are required.
INT/WAIT: Same as Fast Interrupt, but uses CPU wait instead of
actual interrupt. This mode is exclusive to the original Disk
IO board. It is subject to all the same issues as Fast
Interrupt, but does not need J1 shorted. J3 is irrelevant.
DRQ/WAIT: Uses pseudo DMA to handle input/output. Does not
require that interrupts (J1) be enabled on the DISK I/O.
However, it is subject to all of the same reliability issues
as "Fast Interrupt". This mode is exclusive to the original
Disk IO board. At present, the mode is *not* implemented!
The chart below attempts to describe the combinations that
work for me. By far, the most reliable mode is Polling, but
it requires 8MHz CPU for HD disks.
DRQ/WAIT --------------------------------+
INT/WAIT -----------------------------+ |
Fast Interrupt --------------------+ | |
Interrupt ----------------------+ | | |
Polling ---------------------+ | | | |
| | | | |
CPU Speed --------------+ | | | | |
| | | | | |
| | | | | |
3.5" DD (720K) ------ 4MHz Y Y Y Y X
8MHz+ Y Y Y Y X
3.5" HD (1.44M) ----- 4MHz N N Y Y X
8MHz+ Y Y Y Y X
5.25" DD (360K) ----- 4MHz Y Y Y Y X
8MHz+ Y Y Y Y X
5.25" HD (1.2M) ----- 4MHz N N Y Y X
8MHz+ Y Y Y Y X
8" DD (1.11M) ------- 4MHz N N Y Y X
8MHz+ Y Y Y Y X
Y = Yes, works
N = No, does not work
X = Experimental, probably won't work
Tracing
-------
Command/result activity to/from the FDC will be written out if
the trace setting is changed from '00' to '01' in setup.
Additionally, if a command failure is detected on any command,
that specific comand and results are written regardless of the
trace setting.
The format of the line written is:
<OPERATION>: <COMMAND BYTES> --> <RESULT BYTES> [<RESULT>]
For example, this is the output of a normal read operation:
READ: 46 01 00 00 01 02 09 1B FF --> 01 00 00 00 00 02 02 [OK]
Please refer to the i8272 data sheet for information on the
command and result bytes.
Note that the sense interrupt command can return a non-OK
result. This is completely normal in some cases. It is
necessary to "poll" the drive for seek status using sense
interrupt. If there is nothing to report, then the result
will be INVALID COMMAND. Additionally, during a recalibrate
operation, it may be necessary to issue the command twice
because the command will only step the drive 77 times looking
for track 0, but the head may be up to 80 tracks away. In
this case, the first recalibrate fails, but the second should
succeed. Here is what this would look like if trace is turned
on:
RECALIBRATE: 07 01 --> <EMPTY> [OK]
SENSE INTERRUPT: 08 --> 80 [INVALID COMMAND]
...
...
...
SENSE INTERRUPT: 08 --> 80 [INVALID COMMAND]
SENSE INTERRUPT: 08 --> 71 00 [ABNORMAL TERMINATION]
RECALIBRATE: 07 01 --> <EMPTY> [OK]
SENSE INTERRUPT: 08 --> 21 00 [OK]
Another example is when the FDC has just been reset. In this
case, you will see up to 4 disk change errors. Again these
are not a real problem and to be expected.
When tracing is turned off, the application tries to be
intelligent about error reporting. The specific errors from
sense interrupt documented above will be suppressed because
they are not a real problem. All other errors will be
displayed.
Error Handling
--------------
There is no automated error retry logic. This is very
intentional since the point is to expose the controller and
drive activity. Any error detected will result in a prompt to
abort, retry, or continue. Note that some number of errors is
considered normal for this technology. An occasional error
would not necessarily be considered a problem.
CPU Speed
---------
Starting with v5.0, the application adjusts it's timing loops
to the actual system CPU speed by querying the BIOS for the
current CPU speed.
Interleave
----------
The format command now allows the specification of a sector
interleave. It is almost always the case that the optimal
interleave will be 2 (meaning 2:1).
360K Media
----------
The 360K media definition should work well for true 360K
drives. However, it will generally not work with 1.2M
drives. This is because these drives spin at 360RPM instead
of the 300RPM speed of true 360K drives. Additionally, 1.2M
drives are 80 tracks and 360K drives are 40 tracks and, so
far, there is no mechanism in FD to "double step" as a way to
use 40 track media in 80 track drives.
With this said, it is possible to configure some 1.2M 5.25"
drives to automatically spin down to 300RPM based on a density
select signal (DENSEL). This signal is asserted by FD for
360K media, so IF you have configured your drive to react to
this signal correctly, you will be able to use the 360K media
defintion. Most 1.2M 5.25" drives are NOT configured this way
by default. TEAC drives are generally easy to modify and have
been tested by the author and do work in this manner. Note
that this does not address the issue of double stepping above;
you will just be using the first 40 of 80 tracks.
Support
-------
I am happy to answer questions as fast and well as I am able.
Best contact is wwarthen@gmail.com or post something on the
RetroBrew Computers Forum
https://www.retrobrewcomputers.org/forum/.
Changes
-------
WW 8/12/2011
Removed call to pulse TC in the FDC initialization after
determining that it periodically caused the FDC to write bad
sectors. I am mystified by this, but definitely found it to
be true. Will revisit at some point -- probably a timing
issue between puslsing TC and whatever happens next.
Non-DMA mode was being set incorrectly for FAST-DMA mode. It
was set for non-DMA even though we were doing DMA. It is
interesting that it worked fine anyway. Fixed it anyway.
DIO_SETMEDIA was not clearing DCD_DSKRDY as it should. Fixed.
WW 8/26/2011: v1.1
Added support for Zeta. Note that INT/WAIT and DRQ/WAIT are
not available on Zeta. Note that Zeta provides the ability to
perform a reset of the FDC independent of a full CPU reset.
This is VERY useful and the FDC is reset anytime a drive reset
is required.
Added INT/WAIT support.
WW 8/28/2011: V1.2
All changes in this version are Zeta specific. Fixed FDC
reset logic and motor status display for Zeta (code from
Sergey).
Modified Zeta disk change display to include it in the command
output line. This makes more sense because a command must be
issued to select the desired drive first. You can use the
SENSE INT command id you want to check the disk change value
at any time. It will also be displayed with any other command
output display.
WW 9/1/2011: V1.3
Added CPUFREQ configuration setting to tune delays based on
cpu speed. The build app is set for 8MHz which also seems to
work well for 4MHz CPU's. Faster CPU speeds will probably
require tuning this setting.
WW 9/5/2011: V1.4
Changed the polling execution routines to utilize CPUFREQ
variable to optimize timeout counter. Most importantly, this
should allow the use of faster CPUs (like 20MHz).
WW 9/19/2011: V1.5
Zeta changes only. Added a call to FDC RESET after any
command failure. This solves an issue where the drive remains
selected if a command error occurs. Also added FDC RESET to
FDC CONTROL menu.
WW 10/7/2011: V2.0
Added support for DIDE. Only supports polling IO and it does
not appear any other modes are possible given the hardware
constraints.
WW 10/13/2011: V2.1
Modified to support N8. N8 is essentially identical to Dual
IDE. The only real change is the IO addresses. In theory, I
should be able to support true DMA on N8 and will work on that.
WW 10/20/2011: v2.2
I had some problems with the results being read were sometimes
missing a byte. Fixed this by taking a more strict approach
to watching the MSR for the exact bits that are expected.
WW 10/22/2011: V2.3
After spending a few days trying to track down an intermittent
data corruption issue with my Dual IDE board, I added a verify
function. This helped me isolate the problem very nicely
(turned out to be interference from the bus monitor).
WW 11/25/2011: V2.4
Preliminary support for DISKIO V3. Basically just assumed
that it operates just like the Zeta. Needs to be verified
with real hardware as soon as I can.
WW 1/9/2012: V2.5
Modified program termination to use CP/M reset call so that a
warm start is done and all drives are logged out. This is
important because media may have been formatted during the
program execution.
WW 2/6/2012: v2.6
Added support for 5.25" drives as tested by Sergio.
WW 4/5/2012: v2.7
Added support for 8" drives as tested by Jim Harre.
WW 4/6/2012: v2.7a
Fixed issue with media selection menu to remove duplicate
entries.
WW 4/8/2012: v2.7b
Corrected the handling of the density select signal.
WW 5/22/2012: v2.8
Added new media definitions (5.25", 320K).
WW 6/1/2012: v2.9
Added interleave capability on format.
WW 6/5/2012: v3.0
Documentation cleanup.
WW 7/1/2012: v3.1
Modified head load time (HLT) for 8" media based on YD-180
spec. Now set to 50ms.
WW 6/17/2013: v3.2
Cleaned up SRT, HLT, and HUT values.
SK 2/10/2015: v3.3
Added Zeta SBC v2 support (Sergey Kiselev)
WW 3/25/2015: v4.0
Renamed from FDTST --> FD
WW 9/2/2017: v5.0
Renamed from FD to FDU.
Added runtime selection of FDC hardware.
Added runtime timing adjustment.
WW 12/16/2017: v5.1
Improved polling version of read/write to fix occasional overrun errors.
WW 1/8/2018: v5.2
Added support for RC2014 hardware:
- Scott Baker SMC 9266 FDC module
- Scott Baker WDC 37C65 FDC module
WW 9/5/2018: v5.3
- Removed use of pulsing TC to end R/W operations after one sector and
instead set EOT = R (sector number) so that after desired sector is
read, R/W stops with end of cylinder error which is a documented
method for controling number of sectors R/W. This specific termination
condition is no longer considered an error, but a successful end of
operation.
- Added support for SmallZ80
WW 5/1/2020: v5.4
- Added support for Dyno (based on work by Steve Garcia)

BIN
Doc/Hard Disk Anatomy.pdf Normal file

Binary file not shown.

BIN
Doc/NZCOM Users Manual.pdf Normal file

Binary file not shown.

View File

@@ -10,31 +10,84 @@ This directory ("Doc") is part of the RomWBW System Software
distribution archive. It contains documentation for components of
the system.
CPM Manual:
CPM Manual ("CPM Manual.pdf")
-----------------------------
The original DRI CP/M 2.x Operating System Manual. This should be
considered the primary reference for system operation. The section
on CP/M 2 Alteration can be ignored since this work has already been
completed as part of the RomWBW distribution.
FDisk Manual:
CPM3 Command Summary ("CPM3 Command Summary.pdf")
CPM3 Programmer's Guide ("CPM3 Programmers Guide.pdf")
CPM3 System Guide ("CPM3 System Guide.pdf")
CPM3 User's Guide ("CPM3 Users Guide.pdf")
------------------------------------------------------
The original DRI CP/M 3.0 Operating System Documentation Set. This
should be considered the primary reference for CP/M 3 system operation.
DDTZ Manual ("DDTZ.doc")
------------------------
Manual for the DDTZ v2.7 debug tool included on the ROM drive.
FDisk Manual ("FDisk Manual.pdf")
---------------------------------
The operational manual for John Coffman's hard disk partitioning
program. This program is included in RomWBW as FDISK80.
RomWBW Architecture:
Floppy Disk Utility Documentation ("FDU.tst")
---------------------------------------------
Operational documentation for the RomWBW FDU application.
Hard Disk Anatomy ("Hard Disk Anatomy.pdf")
-------------------------------------------
Diagram of a CP/M & MS-DOS (FAT) hybrid hard disk layout.
NZCOM User's Manual ("NZCOM Users Manual.pdf")
----------------------------------------------
NZCOM operating system operation manual.
RomWBW Architecture ("RomWBW Architecture.pdf")
-----------------------------------------------
Document describing the architecture of the RomWBW HBIOS. It
includes reference information for the HBIOS calls.
ZCPR Manual:
Z180 ASCI Baud Rate Options ("Z180 ASCI Baud Rate Options.pdf")
---------------------------------------------------------------
The Z180 processor's ASCI serial ports have a limited set of
baud rate divisors. These divisors are relative to the CPU
clock rate. This document provides a list of the possible
baud rates for typical CPU clock rates.
ZCPR Manual ("ZCPR Manual.pdf")
-------------------------------
ZCPR is the command proccessor portion of Z-System. This is the
manual for ZCPR 1.x as included in RomWBW. The installation
instructions can be ignored since that work has already been
completed as part of the RomWBW distribution.
ZSDOS Manual:
ZSDOS Manual ("ZSDOS Manual.pdf")
---------------------------------
ZSDOS is the DOS portion of Z-System. This is the manual fo ZSDOS
1.x as included in RomWBW. The installation instructions can be

BIN
Doc/RomWBW Applications.pdf Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

165
Doc/Testing Notes.txt Normal file
View File

@@ -0,0 +1,165 @@
SIMH (X)
----
- Test UART driver
- Test HDSK driver
Zeta 1 (X)
------
- Test UART driver
- Test PPP detection (startup w/ and w/o PPP)
- Test boot to CRT
- Test PPPSD driver
- Test PPPCON driver (video & kbd)
- Test FD driver
- Test FDU app
Zeta 2 (X)
------
- Test UART driver
- Test PPP detection (startup w/ and w/o PPP)
- Test boot to CRT
- Test PPPSD driver
- Test PPPCON driver (video & kbd)
- Test FD driver
- Test FDU app
RC2014 (X)
------
- Test SIO driver (Serial Module)
- Test ACIA driver (Dual Serial Module)
- Test IDE driver (Compact Flash Module)
- Test PPIDE driver (IDE Module)
- Test FD driver (SMC and WDC)
- Test FDU app (SMC and WDC)
N8-2312 (X)
-------
- Test ASCI driver
- Test SD driver (CSIO mode)
- Test FD driver
- Test FDU app
- Test TMS driver (video & kbd)
N8-2511 ( )
-------
- Test ASCI driver
- Test SD driver (Juha mode)
- Test FD driver
- Test FDU app
- Test TMS driver (video & kbd)
SBC (X)
---
- Test UART driver
- Test PPIDE driver
- Test PPISD driver
- Test PRP detection
- Test boot to CRT console
MK4 (X)
---
- Test ASCI driver
- Test IDE driver
- Test SD driver
- Test PRP detection
RAMF (X)
----
- Test RAMF driver
PRP (X)
---
- Test PRPSD driver
- Test PRPCON driver (video & kbd)
SCG (X)
---
- Test TMS driver (video)
VDU (X)
---
- Test CVDU driver (video & kbd)
CVDU (X)
----
- Test CVDU driver (video & kbd)
VGA (X)
---
- Test VGA driver (video & kbd)
DIO (X)
---
- Test FD driver
- Test FDU app
- Test IDE driver
DIO3 (X)
----
- Test FD driver
- Test FDU app
- Test PPIDE driver
DIDE (X)
----
- Test FD driver
- Test FDU app
- Test IDE driver
DSD (X)
---
- Test SD driver
4UART (X)
-----
- Test UART driver
UNA (X)
---
- General Startup
- Boot from disk functionality
- Image loading
- Monitor
- XM app
- ASSIGN app
- MODE app
- SYSCOPY app
- OSLDR app
- FDU app
- FDISK80 app
GENERAL (X)
-------
- Boot to ROM
- Boot to Disk
- Boot to Monitor
- XM app
- XM port auto-detect
- ASSIGN app
- MODE app
- SYSCOPY app
- OSLDR app
- FDU app
- FDISK80 app
- TUNE app
RESULTS
-------
- Missing HBIOS startup banner (X)
- PANIC while printing Serial device inventory (X)
- Unexpected interrupt signals not handled well (X)
- Fix IT_??? usage (X)
- Fix HB_DI/HB_EI in PEEK/POKE/BNKCPY (X)
- Fix SIMH timer interrupt setup (X)
- Move DI/EI in PEEK/POKE/BNKCPY to API layer? (X)
- RETI vs. JP in page zero when INTMODE = 0 (X)
- Check interrupt stack space (X)
- If an early INT fires, we return with INTs enabled (not good) (X)
- PPPCON init should display ANSI 80x25 or similar (X)
- Add INT MODE X message to early boot messages (X)
- OSLDR fails when LDDS is loaded (X)
- Add "!!!" to force assembly error as needed ( )
- TIMER app should check for HBIOS active (X)
- Halt system after bad interrupt??? ( )
- Adapt and bundle PLAYER.COM (X)

Binary file not shown.

Binary file not shown.

19
Makefile Normal file
View File

@@ -0,0 +1,19 @@
all:
cd Tools/unix ; make
cd Source ; make
cd Source/Images ; make
clean:
cd Tools/unix ; make clean
cd Source ; make clean
cd Binary ; make clean
clobber:
cd Tools/unix ; make clobber
cd Source ; make clobber
cd Binary ; make clobber
rm -f typescript
diff:
cd Source ; make diff

1182
ReadMe.md Normal file

File diff suppressed because it is too large Load Diff

1347
ReadMe.txt

File diff suppressed because it is too large Load Diff

49
Readme.unix Normal file
View File

@@ -0,0 +1,49 @@
this tree now contains makefiles and tools to build on Linux and MacosX
Linux is rather more thoroughly tested compared to os-x.
to get here, TASM and the propeller generation tools needed to be replaced,
and since the unix filesystem is usually case-sensitive, and CP/M and windows
are not, the cpm tools were made case-insensitive.
TASM was replaced with uz80as, which implements a subset of TASM and fixes some
bugs. however, I needed to add some functionality to make it build the sources
as they exist in this tree. in particular, one thing to be very careful of is
that TASM is not entirely consistent with respect to the .DS directive.
it's usually a bad idea to mix .DS, .FILL, .DB with .ORG.
.DS n is best thought of as .ORG $ + n
.ORG changes the memory pointer, but does not change the file output point.
it works a lot more like M80, SLR* .phase
it assumes that you have some standard system tools and libraries installed
specifically: gcc, gnu make, libncurses
to build:
cd to the top directory and type make.
heavy use is made of make's include facility and pattern rules.
the master rule set is in Tools/Makefile.inc. changes here will affect
almost every Makefile, and where exceptions are needed, the overrides are
applied in the lower Makefiles.
these tools can run a windows-linux regression test, where all the binaries are
compared to a baseline windows build.
Credit:
uz80as was written by Jorge Giner Cordero, jorge.giner@hotmail.com,
and the original source can be found at https://github.com/jorgicor/uz80as
the propeller tools use bstc and openspin, parallax tools from
http://www.fnarfbargle.com/bst.html https://github.com/parallaxinc/OpenSpin
note that bst is not open source or even currently maintained, so I could
not generate a version for 64 bit osx.
cpmtools were the most current I could find, and it has been hacked to do
case-insensitivity. these are not marked, and are not extensive.
zx is from distributed version, and also has local hacks for case insensitivity.
both zx and cpmtools ship with an overly complicated makefile generation system
and this is ignored.
this whole linux build framework is the work of Curt Mayer, curt@zen-room.org.
use it for whatever you like; this is not my day job.

View File

@@ -20,6 +20,9 @@
; Change Log:
; 2016-03-21 [WBW] Updated for HBIOS 2.8
; 2016-04-08 [WBW] Determine key memory addresses dynamically
; 2019-08-07 [WBW] Fixed DPB selection error
; 2019-11-17 [WBW] Added preliminary CP/M 3 support
; 2019-12-24 [WBW] Fixed location of BIOS save area
;_______________________________________________________________________________
;
; ToDo:
@@ -38,14 +41,27 @@ bdos .equ $0005 ; BDOS invocation vector
;
stamp .equ $40 ; loc of RomWBW CBIOS zero page stamp
;
rmj .equ 2 ; CBIOS version - major
rmn .equ 8 ; CBIOS version - minor
rmj .equ 3 ; CBIOS version - major
rmn .equ 0 ; CBIOS version - minor
;
;===============================================================================
; Code Section
;===============================================================================
;
.org $100
;
; relocate to high memory
ld hl,image
ld de,$8000
ld bc,modsize
ldir
jp start
;
image .equ $
;
.org $8000
;
start:
;
; setup stack (save old value)
ld (stksav),sp ; save stack
@@ -83,6 +99,13 @@ init:
ld de,-3 ; adjustment for start of table
add hl,de ; HL now has start of table
ld (bioloc),hl ; save it
;
; get CP/M version and save it
ld c,$0C ; function number
call bdos ; do it, HL := version
ld (cpmver),hl ; save it
ld a,l ; low byte
cp $30 ; CP/M 3.0?
;
; get location of config data and verify integrity
ld hl,stamp ; HL := adr or RomWBW zero page stamp
@@ -122,6 +145,11 @@ init:
inc hl ; ... into DE to get
ld d,(hl) ; ... DPB map pointer
ld (dpbloc),de ; and save it
;
; test for CP/M 3 and branch if so
ld a,(cpmver) ; low byte of cpm version
cp $30 ; CP/M 3.0?
jp nc,initcpm3 ; handle CP/M 3.0 or greater
;
; make a local working copy of the drive map
ld hl,(maploc) ; copy from CBIOS drive map
@@ -192,6 +220,66 @@ initx:
xor a ; signal success
ret ; return
;
; CP/M 3 initialization
;
initcpm3:
ld hl,(bioloc)
ld de,22*3 ; offset of DRVTBL func
add hl,de ; HL := DRVTBL func
call jphl ; do it, HL := DRVTBL adr
ld (drvtbl),hl ; save it
;
; switch to sysbnk
ld hl,(bioloc)
ld de,27*3 ; offset of SELMEM func
add hl,de ; HL := SELMEM func
ld a,0 ; bank 0 is system bank
call jphl
;
; copy CP/M 3 drvtbl to drvmap working copy
ld hl,(drvtbl) ; get drive table in HL
ld de,mapwrk ; DE := working drive map
ld b,16
initc2:
push hl ; save drvtbl entry adr
ld a,(hl) ; deref HL to get DPH adr
inc hl ; ...
ld h,(hl) ; ...
ld l,a ; ...
ld a,l ; check for
or h ; ... zero
jr nz,initc3 ; if not zero, copy entry
inc de ; ... else bump past unit field
jr initc4 ; ... and continue without copying
initc3:
dec hl ; back up to
dec hl ; ... unit
ld a,(hl) ; get unit from drvtbl
ld (de),a ; save unit to drvmap
inc hl ; bump to slice
inc de ; bump to slice
ld a,(hl) ; get slice from drvtbl
ld (de),a ; save slice to drvmap
initc4:
inc de ; bump past slice
inc de ; skip
inc de ; ... dph
pop hl ; back to drvtbl entry
inc hl ; bump to
inc hl ; ... next drvtbl entry
djnz initc2
;
; switch back to tpabnk
ld hl,(bioloc)
ld de,27*3 ; offset of SELMEM func
add hl,de ; HL := SELMEM func
ld a,1 ; bank 1 is tpa bank
call jphl
;
; return success
xor a ; signal success
ret ; return
;
; Process command line
;
process:
@@ -373,9 +461,13 @@ devlstu1:
; Install the new drive map into CBIOS
;
install:
ld a,(cpmver) ; low byte of CP/M version
cp $30 ; CP/M 3.0?
jp nc,instcpm3 ; handle CP/M 3.0 or greater
;
; capture CBIOS snapshot and stack frame for error recovery
ld hl,(bioloc) ; start of CBIOS
ld de,$8000 ; save it here
ld de,$1000 ; save it here
ld bc,(biosiz) ; size of CBIOS
ldir ; save it
ld (xstksav),sp ; save stack frame
@@ -529,15 +621,21 @@ makdphuna1: ; handle ram/rom
ld e,2 ; otherwise, must be ram drive
jr makdph0 ; continue
;
makdphwbw: ; determine appropriate dpb (WBW mode)
makdphwbw: ; determine appropriate dpb (WBW mode, unit number in A)
;
ld c,a ; unit number to C
ld b,$17 ; HBIOS: Report Device Info
rst 08 ; call HBIOS, return w/ device type in D, physical unit in E
ld a,d ; device type to A
cp $00 ; ram/rom?
jr nz,makdph00 ; if not, skip ahead to other types
ld a,e ; physical unit number to A
ld e,1 ; assume rom
cp $00+0 ; rom?
cp $00 ; rom?
jr z,makdph0 ; yes, jump ahead
ld e,2 ; assume ram
cp $00+1 ; ram?
jr z,makdph0 ; yes, jump ahead
and $F0 ; ignore unit nibble now
ld e,2 ; otherwise ram
jr makdph0 ; jump ahead
makdph00:
ld e,6 ; assume floppy
cp $10 ; floppy?
jr z,makdph0 ; yes, jump ahead
@@ -580,27 +678,7 @@ makdph1:
dec de ; ... prefix data (cks & als buf sizes)
call makdph2 ; handle cks buf, then fall thru for als buf
ret nz ; bail out on error
;makdph2:
; ex de,hl ; point hl to cks/als size adr
; ld c,(hl) ; bc := cks/als size
; inc hl ; ... and bump
; ld b,(hl) ; ... past
; inc hl ; ... cks/als size
; ex de,hl ; bc and hl roles restored
; ld a,b ; check to see
; or c ; ... if bc is zero
; jr z,makdph3 ; if zero, bypass alloc, use zero for address
; call alloc ; alloc bc bytes, address returned in bc
; jp nz,instovf ; handle overflow error
;makdph3:
; ld (hl),c ; save cks/als buf
; inc hl ; ... address in
; ld (hl),b ; ... dph and bump
; inc hl ; ... to next dph entry
; xor a ; signal success
; ret
;
makdph2:
; DE = address of CKS or ALS buf to allocate
; HL = address of field in DPH to get allocated address
@@ -638,12 +716,96 @@ makdph3:
xor a ; signal success
ret
;
;
;
instcpm3:
;
; switch to sysbnk
ld hl,(bioloc)
ld de,27*3 ; offset of SELMEM func
add hl,de ; HL := SELMEM func
ld a,0 ; bank 0 is system bank
call jphl
;
; copy drvmap working copy to CP/M 3 drvtbl
ld hl,(drvtbl) ; get drvtbl address
ld a,(hl) ; deref HL to get DPH0 adr
inc hl ; ...
ld h,(hl) ; ...
ld l,a ; ...
ld (dphadr),hl ; save starting dphadr
ld hl,(drvtbl) ; get drive table in HL
ld de,mapwrk ; DE := working drive map
ld b,16
instc1:
ld a,(de) ; get unit field of mapwrk
inc a ; test for $FF
jr nz,instc2 ; if used, do copy
xor a ; zero accum
ld (hl),a ; zero lsb of drvtbl entry adr
inc hl ; move to msb
ld (hl),a ; zero msb of drvtbl entry adr
inc hl ; bump to start of next drvtbl entry
inc de ; bump to next mapwrk entry
inc de ; ...
inc de ; ...
inc de ; ...
jr instc3 ; resume loop without copy
;
instc2:
push hl ; save drvtbl entry adr
push de ; save mapwrk entry adr
ld de,(dphadr) ; get cur dph adr
ld (hl),e ; save dph adr to drvtbl
inc hl ; ...
ld (hl),d ; ...
ex de,hl ; dph adr to HL
pop de ; restore mapwrk entry adr
dec hl ; backup to unit
dec hl ; ...
ld a,(de) ; get unit from mapwrk
ld (hl),a ; put unit into DPH field
inc de ; bump to slice field of mapwrk
inc hl ; bump to slice field of DPH field
ld a,(de) ; get slice from mapwrk
ld (hl),a ; put slice into DPH field
inc de ; bump to next mapwrk entry
inc de ; ...
inc de ; ...
pop hl ; back to drvtbl entry
inc hl ; bump to
inc hl ; ... next drvtbl entry
instc3:
push hl ; save drvtbl entry adr
push de ; save mapwrk entry adr
ld hl,(dphadr) ; get cur dph address
ld de,$23 ; size of xdph
add hl,de ; bump to next dph
ld (dphadr),hl ; save it
pop de ; recover mapwrk entry adr
pop hl ; recover drvtbl entry adr
djnz instc1
;
; switch back to tpabnk
ld hl,(bioloc)
ld de,27*3 ; offset of SELMEM func
add hl,de ; HL := SELMEM func
ld a,1 ; bank 1 is tpa bank
call jphl
;
call drvrst ; perform BDOS drive reset
;
xor a ; signal success
ret
;
; Handle overflow error in installation
;
instovf:
; restore stack frame and CBIOS image
ld sp,(xstksav) ; restore stack frame
ld hl,$8000 ; start of CBIOS image buffer
ld hl,$1000 ; start of CBIOS image buffer
ld de,(bioloc) ; start of CBIOS
ld bc,(biosiz) ; size of CBIOS
ldir ; restore it
@@ -1636,6 +1798,9 @@ bioend .dw 0 ; CBIOS ending address
biosiz .dw 0 ; CBIOS size (in bytes)
maploc .dw 0 ; location of CBIOS drive map table
dpbloc .dw 0 ; location of CBIOS DPB map table
cpmver .dw 0 ; CP/M version
drvtbl .dw 0 ; CP/M 3 drive table address
dphadr .dw 0 ; CP/M 3 working value for DPH
;
drives:
dstdrv .db 0 ; destination drive
@@ -1701,10 +1866,10 @@ stack .equ $ ; stack top
; Messages
;
indent .db " ",0
msgban1 .db "ASSIGN v1.0c for RomWBW CP/M 2.2, 21-Apr-2016",0
msgban1 .db "ASSIGN v1.1a for RomWBW CP/M, 24-Dec-2019",0
msghb .db " (HBIOS Mode)",0
msgub .db " (UBIOS Mode)",0
msgban2 .db "Copyright 2016, Wayne Warthen, GNU GPL v3",0
msgban2 .db "Copyright 2019, 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
@@ -1728,5 +1893,7 @@ msgint .db "Multiple drive letters reference one filesystem, aborting!",0
msgnoa .db "Drive A: is unassigned, aborting!",0
msgdos .db "DOS error, return code=0x",0
msgmem .db " Disk Buffer Bytes Free",0
;
modsize .equ $ - start
;
.end

View File

@@ -2,6 +2,7 @@
setlocal
set TOOLS=../../Tools
set APPBIN=..\..\Binary\Apps
set PATH=%TOOLS%\tasm32;%TOOLS%\zx;%PATH%
@@ -15,12 +16,22 @@ call :asm SysCopy || goto :eof
call :asm Assign || goto :eof
call :asm Format || goto :eof
call :asm Talk || goto :eof
call :asm OSLdr || goto :eof
call :asm Mode || goto :eof
call :asm RTC || goto :eof
call :asm Timer || goto :eof
call :asm180 IntTest || goto :eof
zx Z80ASM -SYSGEN/F
setlocal & cd XM125 && call Build || exit /b 1 & endlocal
zx MAC SURVEY.ASM -$PO
zx MLOAD25 -SURVEY.COM=SURVEY.HEX
setlocal & cd XM && call Build || exit /b 1 & endlocal
setlocal & cd FDU && call Build || exit /b 1 & endlocal
setlocal & cd Tune && call Build || exit /b 1 & endlocal
setlocal & cd FAT && call Build || exit /b 1 & endlocal
copy *.com %APPBIN%\
goto :eof
@@ -28,4 +39,10 @@ goto :eof
echo.
echo Building %1...
tasm -t80 -g3 -fFF %1.asm %1.com %1.lst
goto :eof
goto :eof
:asm180
echo.
echo Building %1...
tasm -t180 -g3 -fFF %1.asm %1.com %1.lst
goto :eof

View File

@@ -4,5 +4,10 @@ setlocal
if exist *.bin del *.bin
if exist *.com del *.com
if exist *.lst del *.lst
if exist *.hex del *.hex
if exist *.prn del *.prn
setlocal & cd XM125 && call Clean || exit /b 1 & endlocal
setlocal & cd XM && call Clean || exit /b 1 & endlocal
setlocal & cd FDU && call Clean || exit /b 1 & endlocal
setlocal & cd Tune && call Clean || exit /b 1 & endlocal
setlocal & cd FAT && call Clean || exit /b 1 & endlocal

View File

@@ -0,0 +1,7 @@
@echo off
setlocal
REM FAT.com is currently distributed as a binary application, so
REM it is not built here.
copy /Y FAT.com ..\..\..\Binary\Apps\

View File

@@ -0,0 +1,5 @@
@echo off
setlocal
REM FAT.com is currently distributed as a binary application, so
REM we do not delete the .COM file.

BIN
Source/Apps/FAT/FAT.com Normal file

Binary file not shown.

674
Source/Apps/FAT/LICENSE.txt Normal file
View File

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

6
Source/Apps/FAT/Makefile Normal file
View File

@@ -0,0 +1,6 @@
OBJECTS = FAT.com
NODELETE = FAT.com
DEST = ../../../Binary/Apps
TOOLS=../../../Tools
include $(TOOLS)/Makefile.inc

101
Source/Apps/FAT/ReadMe.txt Normal file
View File

@@ -0,0 +1,101 @@
RomWBW HBIOS CP/M FAT Utility ("FAT.COM")
Author: Wayne Warthen
Updated: 11-Oct-2019
Application to manipulate and exchange files with a FAT (DOS)
filesystem. Runs on any HBIOS hosted CP/M implementation.
USAGE:
FAT DIR <path>
FAT COPY <src> <dst>
FAT REN <from> <to>
FAT DEL <path>[<file>|<dir>]
FAT MD <path>
FAT FORMAT <drv>
CP/M filespec: <d>:FILENAME.EXT (<d> is CP/M drive letter A-P)
FAT filespec: <u>:/DIR/FILENAME.EXT (<u> is disk unit #)
LICENSE:
GNU GPLv3 (see file LICENSE.txt)
NOTES:
- Partitioned or non-partitioned media is handled automatically.
A floppy drive is a good example of a non-partitioned FAT
filesystem and will be recognized. Larger media will typically
have a partition table which will be recognized by the
application to find the FAT filesystem.
- Although RomWBW-style CP/M media does not know anything about
partition tables, it is entirely possible to have media that
has both CP/M and FAT file systems on it. This is accomplished
by creating a FAT filesystem on the media that starts on a track
beyond the last track used by CP/M. Each CP/M slice on a
media will occupy a little over 8MB. So, make sure to start
your FAT partition beyond (slice count) * 8MB.
- The application infers whether you are attempting to reference
a FAT or CP/M filesystem via the drive specifier (char before ':').
A numeric drive character specifies the HBIOS disk unit number
for FAT access. An alpha (A-P) character indicates a CP/M
file system access targeting the specified drive letter. If there
is no drive character specified, the current CP/M filesystem and
current CP/M drive is assumed. For example:
"2:README.TXT" refers to FAT file README.TXT on disk unit #2
"C:README.TXT" refers to CP/M file README.TXT on CP/M drive C
"README.TXT" refers to CP/M file README.TXT on current CP/M drive
- Files with SYS, HIDDEN, or R/O only attributes are not given
any special treatment. Such files are found and processed
like any other file. However, any attempt to write to a
read-only file will fail and the application will abort.
- It is not currently possible to reference CP/M user areas other
than the current user. To copy files to alternate user areas,
you must switch to the desired user number first or use an
additional step to copy the file to the desired user area.
- Accessing FAT filesystems on a floppy requires the use of
RomWBW HBIOS v2.9.1-pre.13 or greater.
- Files written are not verified.
- Wildcard matching in FAT filesystems is a bit unusual as
implemented by FatFs. See FatFs documentation.
BUILD NOTES:
- Source is maintained on GitHub at https://github.com/wwarthen/FAT
- Application is based on FatFs. FatFs source is included.
- SDCC compiler is required to build (v3.9.0 known working).
- ZX CP/M emulator is required to build (from RomWBW distribution).
- See Build.cmd for sample build script under Windows. References
to SDCC and ZX must be updated for your environment.
- Note that ff.c (core FatFs code) generates quite a few compiler
warnings (all appear to be benign).
TO DO:
- Allow ^C to abort any operation in progress.
- Handle wildcards in destination, e.g.:
"FAT REN 2:/*.TXT 2:/*.BAK"
- Do something intelligent with R/O and SYS files on FAT
HISTORY:
2-May-2019: v0.9 (beta) initial release
7-May-2019: v0.9.1 (beta) added REN and DEL
8-May-2019: v0.9.2 (beta) handle file collisions w/ user prompt
8-Oct-2019: v0.9.3 (beta) fixed incorrect filename buffer size (MAX_FN)
10-Oct-2019: v0.9.4 (beta) upgraded to FatFs R0.13c
10-Oct-2019: v0.9.5 (beta) added MD (make directory)
10-Oct-2019: v0.9.6 (beta) added FORMAT
11-Oct-2019: v0.9.7 (beta) fix FORMAT to use existing partition table entries
add attributes to directory listing

13
Source/Apps/FDU/Build.cmd Normal file
View File

@@ -0,0 +1,13 @@
@echo off
setlocal
set TOOLS=../../../Tools
set PATH=%TOOLS%\tasm32;%PATH%
set TASMTABS=%TOOLS%\tasm32
tasm -t80 -b -fFF FDU.asm FDU.com FDU.lst
if errorlevel 1 goto :eof
copy /Y FDU.com ..\..\..\Binary\Apps\
copy /Y FDU.txt ..\..\..\Doc\

View File

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

4613
Source/Apps/FDU/FDU.asm Normal file

File diff suppressed because it is too large Load Diff

514
Source/Apps/FDU/FDU.txt Normal file
View File

@@ -0,0 +1,514 @@
================================================================
Floppy Disk Utility (FDU) v5.3 for RetroBrew Computers
Disk IO / Zeta / Dual-IDE / N8 / RC2014 / SmallZ80 / Dyno
================================================================
Updated January 5, 2020
by Wayne Warthen (wwarthen@gmail.com)
Application to test the hardware functionality of the Floppy
Disk Controller (FDC) on the ECB DISK I/O, DISK I/O V3, ZETA
SBC, Dual IDE w/ Floppy, or N8 board.
The intent is to provide a testbed that allows direct testing
of all possible media types and modes of access. The
application supports read, write, and format by sector, track,
and disk as well as a random read/write test.
The application supports access modes of polling, interrupt,
INT/WAIT, and DRQ/WAIT. At present, it supports 3.5" media at
DD (720KB) and HD (1.44MB) capacities. It also now supports
5.25" media (720KB and 1.2MB) and 8" media (1.11MB) as well.
Additional media will be added when I have time and access to
required hardware. Not all modes are supported on all
platforms and some modes are experimental in all cases.
In many ways this application is merely reinventing the wheel
and performs functionality similar to existing applications,
but I have not seen any other applications for RetroBrew
Computers hardware that provide this range of functionality.
While the application is now almost entirely new code, I would
like to acknowledge that much was derived from the previous
work of Andrew Lynch and Dan Werner. I also want to credit
Sergio Gimenez with testing the 5.25" drive support and Jim
Harre with testing the 8" drive support. Support for Zeta 2
comes from Segey Kiselev. Thanks!
General Usage
-------------
In general, usage is self explanatory. At invocation, you
must select the floppy disk controller (FDC) that you are
using. Subsequently, the main menu allows you to set the
unit, media, and mode to test. These settings MUST match your
situation. Read, write, format, and verify functions are
provided. A sub-menu will allow you to choose sector, track,
disk, or random tests.
The verify function requires a little explanation. It will
take the contents of the current in-memory disk buffer, save
it, and compare it to the selected sectors. So, you must
ensure that the sectors to be verified already have been
written with the same pattern as the buffer contains. I
typically init the buffer to a pattern, write the pattern to
the entire disk, then verify the entire disk.
Another submenu is provided for FDC commands. This sub-menu
allows you to send low-level commands directly to FDC. You
*must* know what you are doing to use this sub-menu. For
example, in order to read a sector using this sub-menu, you
will need to perform specify, seek, sense int, and read
commands specifying correct values (nothing is value checked
in this menu).
Required Hardware/BIOS
----------------------
Of course, the starting point is to have a supported hardware
configuration. The following Z80 / Z180 based CPU boards are
supported:
- SBC V1/2
- Zeta
- Zeta 2
- N8
- Mark IV
- RC2014 w/ SMC
- RC2014 w/ WDC
- SmallZ80
- Dyno
You must be using either a RomWBW or UBA based OS version.
You must have one of the following floppy disk controllers:
- Disk IO ECB Board FDC
- Disk IO 3 ECB Board FDC
- Dual-IDE ECB Board FDC
- Zeta SBC onboard FDC
- Zeta 2 SBC onboard FDC
- N8 SBC onboard FDC
- RC2014 Scott Baker SMC-based Floppy Module
- RC2014 Scott Baker WDC-based Floppy Module
Finally, you will need a floppy drive connected via an
appropriate cable:
Disk IO - no twist in cable, drive unit 0/1 must be selected by jumper on drive
DISK IO 3, Zeta, Zeta 2, RC2014, Dyno - cable with twist, unit 0 after twist, unit 1 before twist
DIDE, N8, Mark IV, SmallZ80 - cable with twist, unit 0 before twist, unit 1 after twist
Note that FDU does not utilize your systems ROM or OS to
access the floppy system. FDU interacts directly with
hardware. Upon exit, you may need to reset your OS to get the
floppy system back into a state that is expected.
The Disk I/O should be jumpered as follows:
J1: depends on use of interrupt modes (see interrupt modes below)
J2: pins 1-2, & 3-4 jumpered
J3: hardware dependent timing for DMA mode (see DMA modes below)
J4: pins 2-3 jumpered
J5: off
J6: pins 2-3 jumpered
J7: pins 2-3 jumpered
J8: off
J9: off
J10: off
J11: off
J12: off
Note that J1 can be left on even when not using interrupt
modes. As long as the BIOS is OK with it, that is fine. Note
also that J3 is only relevant for DMA modes, but also can be
left in place when using other modes.
The Disk I/O 3 board should be jumpered at the default settings:
JP2: 3-4
JP3: 1-2 for int mode support, otherwise no jumper
JP4: 1-2, 3-4
JP5: 1-2
JP6: 1-2
JP7: 1-2, 3-4
Zeta & Zeta 2 do not have any relevant jumper settings. The
hardwired I/O ranges are assumed in the code.
The Dual-IDE board should be jumpered as follows:
K3 (DT/R or /RD): /RD
P5 (bd ID): 1-2, 3-4 (for $20-$3F port range)
There are no specific N8 jumper settings, but the default
I/O range starting at $80 is assumed in the published code.
The RC2014 Scott Baker SMC-based floppy module should be jumpered
for I/O base address 0x50 (SV1: 11-12), JP1 (TS) shorted,
JP2 (/FAULT) shorted, JP3 (MINI): 2-3, JP4 (/DC/RDY): 2-3.
The RC2014 Scott Baker WDC-based floppy module should be jumpered
for I/O base address 0x50 (SV1: 11-12), JP1 (/DACK): 1-2,
JP2 (TC): 2-3.
SmallZ80 does not have any relevant jumper settings. The
hardwired I/O ranges are assumed in the code.
Dyno does not have any relevant jumper settings. The
hardwired I/O ranges are assumed in the code.
Modes of Operation
------------------
You can select the following test modes. Please refer to the
chart that follows to determine which modes should work with
combinations of Z80 CPU speed and media format.
WARNING: In general, only the polling mode is considered fully
reliable. The other modes are basically experimental and
should only be used if you know exactly what you are doing.
Polling: Traditional polled input/output. Works well and very
reliable with robust timeouts and good error recovery. Also,
the slowest performance which precludes it from being used
with 1.44MB floppy on a 4MHz Z80. This is definitely the mode
you want to get working before any others. It does not require
J1 (interrupt enable) on DISK I/O and does not care about the
setting of J3.
Interrupt: Relies on FDC interrupts to determine when a byte
is ready to be read/written. It does *not* implement a
timeout during disk operations. For example, if there is no
disk in the drive, this mode will just hang until a disk is
inserted. This mode *requires* that the host has interrupts
active using interrupt mode 1 (IM1) and interrupts attached to
the FDC controller. The BIOS must be configured to handle
these interrupts safely.
Fast Interrupt: Same as above, but sacrifices additional
reliability for faster operation. This mode will allow a
1.44MB floppy to work with a 4MHz Z80 CPU. However, if any
errors occur (even a transient read error which is not
unusual), this mode will hang. The same FDC interrupt
requirements as above are required.
INT/WAIT: Same as Fast Interrupt, but uses CPU wait instead of
actual interrupt. This mode is exclusive to the original Disk
IO board. It is subject to all the same issues as Fast
Interrupt, but does not need J1 shorted. J3 is irrelevant.
DRQ/WAIT: Uses pseudo DMA to handle input/output. Does not
require that interrupts (J1) be enabled on the DISK I/O.
However, it is subject to all of the same reliability issues
as "Fast Interrupt". This mode is exclusive to the original
Disk IO board. At present, the mode is *not* implemented!
The chart below attempts to describe the combinations that
work for me. By far, the most reliable mode is Polling, but
it requires 8MHz CPU for HD disks.
DRQ/WAIT --------------------------------+
INT/WAIT -----------------------------+ |
Fast Interrupt --------------------+ | |
Interrupt ----------------------+ | | |
Polling ---------------------+ | | | |
| | | | |
CPU Speed --------------+ | | | | |
| | | | | |
| | | | | |
3.5" DD (720K) ------ 4MHz Y Y Y Y X
8MHz+ Y Y Y Y X
3.5" HD (1.44M) ----- 4MHz N N Y Y X
8MHz+ Y Y Y Y X
5.25" DD (360K) ----- 4MHz Y Y Y Y X
8MHz+ Y Y Y Y X
5.25" HD (1.2M) ----- 4MHz N N Y Y X
8MHz+ Y Y Y Y X
8" DD (1.11M) ------- 4MHz N N Y Y X
8MHz+ Y Y Y Y X
Y = Yes, works
N = No, does not work
X = Experimental, probably won't work
Tracing
-------
Command/result activity to/from the FDC will be written out if
the trace setting is changed from '00' to '01' in setup.
Additionally, if a command failure is detected on any command,
that specific comand and results are written regardless of the
trace setting.
The format of the line written is:
<OPERATION>: <COMMAND BYTES> --> <RESULT BYTES> [<RESULT>]
For example, this is the output of a normal read operation:
READ: 46 01 00 00 01 02 09 1B FF --> 01 00 00 00 00 02 02 [OK]
Please refer to the i8272 data sheet for information on the
command and result bytes.
Note that the sense interrupt command can return a non-OK
result. This is completely normal in some cases. It is
necessary to "poll" the drive for seek status using sense
interrupt. If there is nothing to report, then the result
will be INVALID COMMAND. Additionally, during a recalibrate
operation, it may be necessary to issue the command twice
because the command will only step the drive 77 times looking
for track 0, but the head may be up to 80 tracks away. In
this case, the first recalibrate fails, but the second should
succeed. Here is what this would look like if trace is turned
on:
RECALIBRATE: 07 01 --> <EMPTY> [OK]
SENSE INTERRUPT: 08 --> 80 [INVALID COMMAND]
...
...
...
SENSE INTERRUPT: 08 --> 80 [INVALID COMMAND]
SENSE INTERRUPT: 08 --> 71 00 [ABNORMAL TERMINATION]
RECALIBRATE: 07 01 --> <EMPTY> [OK]
SENSE INTERRUPT: 08 --> 21 00 [OK]
Another example is when the FDC has just been reset. In this
case, you will see up to 4 disk change errors. Again these
are not a real problem and to be expected.
When tracing is turned off, the application tries to be
intelligent about error reporting. The specific errors from
sense interrupt documented above will be suppressed because
they are not a real problem. All other errors will be
displayed.
Error Handling
--------------
There is no automated error retry logic. This is very
intentional since the point is to expose the controller and
drive activity. Any error detected will result in a prompt to
abort, retry, or continue. Note that some number of errors is
considered normal for this technology. An occasional error
would not necessarily be considered a problem.
CPU Speed
---------
Starting with v5.0, the application adjusts it's timing loops
to the actual system CPU speed by querying the BIOS for the
current CPU speed.
Interleave
----------
The format command now allows the specification of a sector
interleave. It is almost always the case that the optimal
interleave will be 2 (meaning 2:1).
360K Media
----------
The 360K media definition should work well for true 360K
drives. However, it will generally not work with 1.2M
drives. This is because these drives spin at 360RPM instead
of the 300RPM speed of true 360K drives. Additionally, 1.2M
drives are 80 tracks and 360K drives are 40 tracks and, so
far, there is no mechanism in FD to "double step" as a way to
use 40 track media in 80 track drives.
With this said, it is possible to configure some 1.2M 5.25"
drives to automatically spin down to 300RPM based on a density
select signal (DENSEL). This signal is asserted by FD for
360K media, so IF you have configured your drive to react to
this signal correctly, you will be able to use the 360K media
defintion. Most 1.2M 5.25" drives are NOT configured this way
by default. TEAC drives are generally easy to modify and have
been tested by the author and do work in this manner. Note
that this does not address the issue of double stepping above;
you will just be using the first 40 of 80 tracks.
Support
-------
I am happy to answer questions as fast and well as I am able.
Best contact is wwarthen@gmail.com or post something on the
RetroBrew Computers Forum
https://www.retrobrewcomputers.org/forum/.
Changes
-------
WW 8/12/2011
Removed call to pulse TC in the FDC initialization after
determining that it periodically caused the FDC to write bad
sectors. I am mystified by this, but definitely found it to
be true. Will revisit at some point -- probably a timing
issue between puslsing TC and whatever happens next.
Non-DMA mode was being set incorrectly for FAST-DMA mode. It
was set for non-DMA even though we were doing DMA. It is
interesting that it worked fine anyway. Fixed it anyway.
DIO_SETMEDIA was not clearing DCD_DSKRDY as it should. Fixed.
WW 8/26/2011: v1.1
Added support for Zeta. Note that INT/WAIT and DRQ/WAIT are
not available on Zeta. Note that Zeta provides the ability to
perform a reset of the FDC independent of a full CPU reset.
This is VERY useful and the FDC is reset anytime a drive reset
is required.
Added INT/WAIT support.
WW 8/28/2011: V1.2
All changes in this version are Zeta specific. Fixed FDC
reset logic and motor status display for Zeta (code from
Sergey).
Modified Zeta disk change display to include it in the command
output line. This makes more sense because a command must be
issued to select the desired drive first. You can use the
SENSE INT command id you want to check the disk change value
at any time. It will also be displayed with any other command
output display.
WW 9/1/2011: V1.3
Added CPUFREQ configuration setting to tune delays based on
cpu speed. The build app is set for 8MHz which also seems to
work well for 4MHz CPU's. Faster CPU speeds will probably
require tuning this setting.
WW 9/5/2011: V1.4
Changed the polling execution routines to utilize CPUFREQ
variable to optimize timeout counter. Most importantly, this
should allow the use of faster CPUs (like 20MHz).
WW 9/19/2011: V1.5
Zeta changes only. Added a call to FDC RESET after any
command failure. This solves an issue where the drive remains
selected if a command error occurs. Also added FDC RESET to
FDC CONTROL menu.
WW 10/7/2011: V2.0
Added support for DIDE. Only supports polling IO and it does
not appear any other modes are possible given the hardware
constraints.
WW 10/13/2011: V2.1
Modified to support N8. N8 is essentially identical to Dual
IDE. The only real change is the IO addresses. In theory, I
should be able to support true DMA on N8 and will work on that.
WW 10/20/2011: v2.2
I had some problems with the results being read were sometimes
missing a byte. Fixed this by taking a more strict approach
to watching the MSR for the exact bits that are expected.
WW 10/22/2011: V2.3
After spending a few days trying to track down an intermittent
data corruption issue with my Dual IDE board, I added a verify
function. This helped me isolate the problem very nicely
(turned out to be interference from the bus monitor).
WW 11/25/2011: V2.4
Preliminary support for DISKIO V3. Basically just assumed
that it operates just like the Zeta. Needs to be verified
with real hardware as soon as I can.
WW 1/9/2012: V2.5
Modified program termination to use CP/M reset call so that a
warm start is done and all drives are logged out. This is
important because media may have been formatted during the
program execution.
WW 2/6/2012: v2.6
Added support for 5.25" drives as tested by Sergio.
WW 4/5/2012: v2.7
Added support for 8" drives as tested by Jim Harre.
WW 4/6/2012: v2.7a
Fixed issue with media selection menu to remove duplicate
entries.
WW 4/8/2012: v2.7b
Corrected the handling of the density select signal.
WW 5/22/2012: v2.8
Added new media definitions (5.25", 320K).
WW 6/1/2012: v2.9
Added interleave capability on format.
WW 6/5/2012: v3.0
Documentation cleanup.
WW 7/1/2012: v3.1
Modified head load time (HLT) for 8" media based on YD-180
spec. Now set to 50ms.
WW 6/17/2013: v3.2
Cleaned up SRT, HLT, and HUT values.
SK 2/10/2015: v3.3
Added Zeta SBC v2 support (Sergey Kiselev)
WW 3/25/2015: v4.0
Renamed from FDTST --> FD
WW 9/2/2017: v5.0
Renamed from FD to FDU.
Added runtime selection of FDC hardware.
Added runtime timing adjustment.
WW 12/16/2017: v5.1
Improved polling version of read/write to fix occasional overrun errors.
WW 1/8/2018: v5.2
Added support for RC2014 hardware:
- Scott Baker SMC 9266 FDC module
- Scott Baker WDC 37C65 FDC module
WW 9/5/2018: v5.3
- Removed use of pulsing TC to end R/W operations after one sector and
instead set EOT = R (sector number) so that after desired sector is
read, R/W stops with end of cylinder error which is a documented
method for controling number of sectors R/W. This specific termination
condition is no longer considered an error, but a successful end of
operation.
- Added support for SmallZ80
WW 5/1/2020: v5.4
- Added support for Dyno (based on work by Steve Garcia)

8
Source/Apps/FDU/Makefile Normal file
View File

@@ -0,0 +1,8 @@
OBJECTS = FDU.com
DOCS = FDU.txt
DEST = ../../../Binary/Apps
DOCDEST = ../../../Doc
TOOLS = ../../../Tools
include $(TOOLS)/Makefile.inc
%.com: USETASM=1

View File

@@ -30,8 +30,8 @@ bdos .equ $0005 ; BDOS invocation vector
;;
;stamp .equ $40 ; loc of RomWBW CBIOS zero page stamp
;
rmj .equ 2 ; CBIOS version - major
rmn .equ 8 ; CBIOS version - minor
rmj .equ 3 ; CBIOS version - major
rmn .equ 0 ; CBIOS version - minor
;
;===============================================================================
; Code Section
@@ -201,12 +201,12 @@ stksav .dw 0 ; stack pointer saved at start
.fill stksiz,0 ; stack
stack .equ $ ; stack top
;
msgban1 .db "FORMAT v0.1 for RomWBW CP/M 2.2, 24-Apr-2016",0
msgban1 .db "FORMAT v0.1a for RomWBW CP/M 2.2, 02-Sep-2017",0
msghb .db " (HBIOS Mode)",0
msgub .db " (UBIOS Mode)",0
msgban2 .db "Copyright 2016, Wayne Warthen, GNU GPL v3",0
msgban2 .db "Copyright (C) 2017, Wayne Warthen, GNU GPL v3",0
msguse .db "FORMAT command is not yet implemented!",13,10,13,10
.db "Use FD command to physically format floppy diskettes",13,10
.db "Use FDU command to physically format floppy diskettes",13,10
.db "Use CLRDIR command to (re)initialize directories",13,10
.db "Use SYSCOPY command to make disks bootable",13,10
.db "Use FDISK80 command to partition mass storage media",0

586
Source/Apps/IntTest.asm Normal file
View File

@@ -0,0 +1,586 @@
;===============================================================================
;
; INTTEST - Test HBIOS interrupt API functions
;
;===============================================================================
;
; Author: Wayne Warthen (wwarthen@gmail.com)
;_______________________________________________________________________________
;
; Usage:
; INTTEST
;_______________________________________________________________________________
;
;===============================================================================
; Definitions
;===============================================================================
;
stksiz .equ $40 ; Working stack size
;
restart .equ $0000 ; CP/M restart vector
bdos .equ $0005 ; BDOS invocation vector
;
bf_sysint .equ $FC ; INT function
;
bf_sysintinfo .equ $00 ; INT INFO subfunction
bf_sysintget .equ $10 ; INT GET subfunction
bf_sysintset .equ $20 ; INT SET subfunction
;
;===============================================================================
; 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:
call crlf ; formatting
ld de,msgban ; point to version message part 1
call prtstr ; print it
;
; relocate handler
ld hl,reladr
ld de,$8000
ld bc,hsiz
ldir
;
initx
; initialization complete
xor a ; signal success
ret ; return
;
; Process
;
process:
;
; Get info
;
call crlf2
ld de,msginfo ; message
call prtstr
;
ld b,bf_sysint ; INT function
ld c,bf_sysintinfo ; INFO subfunction
rst 08
ld a,d
ld (intmod),a ; save int mode
ld a,e
ld (veccnt),a ; save vector count
;
push de
call crlf
ld de,msgmode ; mode
call prtstr
pop de
push de
ld a,d ; interrupt mode
call prtdecb
call crlf
ld de,msgcnt ; count of vectors
call prtstr
pop de
ld a,e
call prtdecb
;
; Done if int mode is 0
;
ld a,(intmod)
or a
ret z
;
; List vectors
;
call crlf2
ld de,msglst
call prtstr
ld a,(veccnt) ; get count of vectors
or a
jr z,estidx ; bypass if nothing to list
ld b,a ; make it the loop counter
ld c,0 ; vector entry index
;
lstlp:
push bc
call crlf
ld a,' '
call prtchr
call prtchr
ld a,c
call prthex
ld a,':'
call prtchr
ld e,c
ld b,bf_sysint
ld c,bf_sysintget
rst 08
push hl
pop bc
call prthexword
pop bc
inc c
djnz lstlp
;
; Establish interrupt vector index to hook
;
estidx:
call crlf2
ld de,msgvec
call prtstr
call getbuf
ld hl,lnbuf+1
ld a,(hl) ; get line length
or a ; set flags
jr z,estidx ; nothing entered
ld b,a ; set b to line length
inc hl
call hexbyt
jr c,estidx
ld (vecidx),a
ld hl,veccnt ; check index against valid range
cp (hl)
jr nc,estidx ; vector index out of bounds
;
; Hook vector
;
call crlf2
ld de,msghk1
call prtstr
ld a,(vecidx)
call prthex
ld de,msghk2
call prtstr
ld a,$ff
ld (count),a ; set counter to max value
;
ld a,(intmod)
cp 1
jr z,hkim
cp 2
jr z,hkim
ret
;
; Setup interrupt handler
;
hkim:
ld hl,int ; pointer to my interrupt handler
ld b,bf_sysint
ld c,bf_sysintset ; set new vector
ld a,(vecidx) ; get vector idx
ld e,a ; put in E
di
rst 08 ; do it
ld (chain),hl ; save the chain address
ei ; interrupts back on
jr start
;
; Wait for counter to countdown to zero
;
start:
call crlf2
ld de,msgrun ; message
call prtstr
call crlf2
ld a,(count)
ld e,a
call prthex ; print it
ld a,13
call prtchr
loop:
call getchr ; check console
cp $1B ; <esc> to exit
jr z,unhook ; if so, bail out
ld a,(count) ; get current count value
cp e
jr z,loop
ld e,a
push af
call prthex ; print it
ld a,13
call prtchr
pop af
or a ; set flags
jr z,unhook ; done
jr loop ; and loop
;
; Unhook
;
unhook:
call crlf2
ld de,msgunhk
call prtstr
ld hl,(chain) ; original vector
ld b,bf_sysint
ld c,bf_sysintset ; set new vector
ld a,(vecidx) ; get vector idx
ld e,a ; put in E
di
rst 08 ; do it
ei ; interrupts back on
;
xor a ; signal success
ret ; done
;
; Get a character from console, return in A
; returs zero if nothing available
;
getchr:
push bc ; save registers
push de
push hl
ld e,$FF ; read a character
ld c,$06 ; BDOS direct i/o function
call bdos ; do it
pop hl ; restore registers
pop de
pop bc
ret
;
; Get console buffer
;
getbuf:
push bc
push de
push hl
ld de,lnbuf
ld c,$0A
call bdos
pop hl
pop de
pop bc
ret
;
; Print character in A without destroying any registers
;
prtchr:
push bc ; save registers
push de
push hl
ld e,a ; character to print in E
ld c,$02 ; BDOS function to output a character
call bdos ; do it
pop hl ; restore registers
pop de
pop bc
ret
;
prtdot:
;
; shortcut to print a dot preserving all regs
push af ; save af
ld a,'.' ; load dot char
call prtchr ; print it
pop af ; restore af
ret ; done
;
prtcr:
;
; shortcut to print a dot preserving all regs
push af ; save af
ld a,13 ; load CR value
call prtchr ; print it
pop af ; restore af
ret ; done
;
; Print a zero terminated string at (DE) without destroying any registers
;
prtstr:
push 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,(hl) ; load next character
or a ; string ends with a null
ret z ; if null, return pointing to null
cp ' ' ; check for blank
ret nz ; return if not blank
inc hl ; if blank, increment character pointer
jr nonblank ; and loop
;
; 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)
;
; Convert hex chars to a byte value.
; Enter with HL pointing to buffer with chars to convert
; and B containing number of chars. Returns value in A.
; CF set to indicate error (overflow or invalid char).
;
hexbyt:
ld c,0 ; working value starts at zero
hexbyt1:
sla c ; rotate low nibble to high
ret c
sla c
ret c
sla c
ret c
sla c
ret c
ld a,(hl) ; load next char
call hexnibl ; convert to binary
ret c ; abort on error
or c ; combine w/ working value
ld c,a ; and put back in c
inc hl ; next position
djnz hexbyt1 ; next character
ld a,c ; ret val to a
or a ; clear carry
ret
;
; Convert hex character at (HL) to binary value
; Set CF to indicate invalid character
;
hexnibl:
; handle '0'-'9'
cp '0'
jr c,hexnibl1 ; if < '0', out of range
cp '9'+1
jr nc,hexnibl1 ; if > '9', out of range
and $0F ; convert to binary value
ret ; and done
hexnibl1:
; handle 'A'-'F'
call ucase ; force upper case
cp 'A'
jr c,hexnibl2 ; if < 'A', out of range
cp 'F'+1
jr nc,hexnibl2 ; if > 'F', out of range
and $0F ; convert to binary value
add a,9 ;
ret ; and done
hexnibl2:
; invalid character
scf ; signal error
ret
;
;===============================================================================
; Storage Section
;===============================================================================
;
intmod .db 0 ; active interrupt mode
veccnt .db 0 ; count of ingterrupt vectors
vecidx .db 0 ; vector index to hook
lnbuf .db 10,0 ; 10 char BDOS line input buffer
.fill 10
;
stksav .dw 0 ; stack pointer saved at start
.fill stksiz,0 ; stack
stack .equ $ ; stack top
;
; Messages
;
msgban .db "INTTEST v1.2, 15-May-2019",13,10
.db "Copyright (C) 2019, Wayne Warthen, GNU GPL v3",0
msginfo .db "Interrupt information request...",0
msgmode .db " Active interrupt mode: ",0
msgcnt .db " Vector entries in use: ",0
msglst .db "Interrupt vector address list:",0
msghk1 .db "Hooking vector ",0
msghk2 .db "...",0
msgunhk .db "Unhooking vector...",0
msgrun .db "Interrupt countdown (press <esc> to exit)...",0
msgvec .db "Enter vector to hook (hex): ",0
;
;===============================================================================
; Interrupt Handler
;===============================================================================
;
reladr .equ $ ; relocation start adr
;
.org $8000 ; code will run here
;
int:
; count down to zero
ld a,(count) ; get current count value
or a ; test for zero
jr z,int1 ; if zero, leave it alone
dec a ; decrement
ld (count),a ; and save
int1:
xor a ; signal int has NOT been handled
; follow the chain...
ld hl,(chain) ; get chain adr
jp (hl) ; go there
; ret
;
chain .dw $0000 ; chain address
count .db 0 ; counter
;
hsiz .equ $ - $8000 ; size of handler to relocate
.end

14
Source/Apps/Makefile Normal file
View File

@@ -0,0 +1,14 @@
OBJECTS = SysGen.com Survey.com \
SysCopy.com Assign.com Format.com Talk.com Mode.com RTC.com \
Timer.com IntTest.com
OTHERS = *.hex *.com
SUBDIRS = XM FDU FAT Tune
DEST = ../../Binary/Apps
TOOLS =../../Tools
include $(TOOLS)/Makefile.inc
USETASM = 1
Survey.com: USETASM=0

View File

@@ -29,6 +29,8 @@
;
; Change Log:
; 2017-08-16 [WBW] Initial release
; 2017-08-28 [WBW] Handle UNACPM
; 2018-07-24 [WBW] Fixed bug in getnum23 routine (credit Phil Summers)
;_______________________________________________________________________________
;
; ToDo:
@@ -44,10 +46,10 @@ stksiz .equ $40 ; Working stack size
restart .equ $0000 ; CP/M restart vector
bdos .equ $0005 ; BDOS invocation vector
;
stamp .equ $40 ; loc of RomWBW CBIOS zero page stamp
ident .equ $FFFE ; loc of RomWBW HBIOS ident ptr
;
rmj .equ 2 ; intended CBIOS version - major
rmn .equ 8 ; intended CBIOS version - minor
rmj .equ 3 ; intended CBIOS version - major
rmn .equ 0 ; intended CBIOS version - minor
;
bf_cioinit .equ $04 ; HBIOS: CIOINIT function
bf_cioquery .equ $05 ; HBIOS: CIOQUERY function
@@ -85,28 +87,11 @@ exit: ; clean up and return to command processor
; Initialization
;
init:
;
; locate start of cbios (function jump table)
ld hl,(restart+1) ; load address of CP/M restart vector
ld de,-3 ; adjustment for start of table
add hl,de ; HL now has start of table
ld (bioloc),hl ; save it
;
; get location of config data and verify integrity
ld hl,stamp ; HL := adr or RomWBW zero page stamp
ld a,(hl) ; get first byte of RomWBW marker
cp 'W' ; match?
jp nz,errinv ; abort with invalid config block
inc hl ; next byte (marker byte 2)
ld a,(hl) ; load it
cp ~'W' ; match?
jp nz,errinv ; abort with invalid config block
inc hl ; next byte (major/minor version)
ld a,(hl) ; load it
cp rmj << 4 | rmn ; match?
jp nz,errver ; abort with invalid os version
inc hl ; bump past
inc hl ; ... version info
;
; check for UNA (UBIOS)
ld a,($FFFD) ; fixed location of UNA API vector
@@ -120,22 +105,38 @@ init:
ld a,(hl) ; get next byte
cp $E5 ; second byte of UNA push ix instruction
jr nz,initwbw ; if not, not UNA
;
; UNA initialization
ld hl,unamod ; point to UNA mode flag
ld (hl),$FF ; set UNA mode flag
ld a,$FF ; assume max units for UNA
ld a,2 ; *debug*
ld (comcnt),a ; ... and save it
jr initx ; UNA init done
;
initwbw:
; get count of serial units
; 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,errinv ; abort with invalid config block
inc hl ; next byte (marker byte 2)
ld a,(hl) ; load it
cp ~'W' ; match?
jp nz,errinv ; abort with invalid config block
inc hl ; next byte (major/minor version)
ld a,(hl) ; load it
cp rmj << 4 | rmn ; match?
jp nz,errver ; abort with invalid os version
;
; RomWBW initialization
ld b,bf_sysget ; BIOS SYSGET function
ld c,$00 ; CIOCNT subfunction
rst 08 ; E := serial device unit count
ld a,e ; count to A
ld (comcnt),a ; save it
;
initx: ; initialization complete
initx
; initialization complete
xor a ; signal success
ret ; return
;
@@ -215,9 +216,7 @@ comset1:
jr nc,comset1a ; ... to handle empty
;
call getnum32 ; get baud rate into DE:HL
;call crlf ; *debug*
;call prthex32 ; *debug*
jp c,errcfg ; Handle error
jp c,errcfg ; Handle overflow error
ld c,75 ; Constant for baud rate encode
call encode ; encode into C:4-0
jp nz,errcfg ; Error if encode fails
@@ -819,7 +818,7 @@ getnum32a:
cp '9' + 1 ; compare to ascii '9'
jr nc,getnum32c ; abort if above
;
; valid digit, multiply DE:BC by 10
; valid digit, multiply DE:HL by 10
; X * 10 = (((x * 2 * 2) + x)) * 2
push de
push hl
@@ -848,11 +847,13 @@ getnum32a:
ld l,a ; back to L
jr nc,getnum32b ; if no carry, done
inc h ; otherwise, bump H
jr nc,getnum32b ; if no carry, done
jr nz,getnum32b ; if no overflow, done
inc e ; otherwise, bump E
jr nc,getnum32b ; if no carry, done
jr nz,getnum32b ; if no overflow, done
inc d ; otherwise, bump D
ret c ; if overflow, ret w/ CF
jr nz,getnum32b ; if no overflow, done
scf ; set carry flag to indicate overflow
ret ; and return
;
getnum32b:
inc ix ; bump to next char
@@ -944,11 +945,11 @@ errprm: ; command parameter error (syntax)
ld de,msgprm
jr err
;
errinv: ; invalid CBIOS, zp signature not found
errinv: ; invalid HBIOS, signature not found
ld de,msginv
jr err
;
errver: ; CBIOS version is not as expected
errver: ; unsupported HBIOS version
ld de,msgver
jr err
;
@@ -969,7 +970,7 @@ errcfg: ; Invalid device configuration specified
jr err
;
err: ; print error string and return error signal
call crlf ; print newline
call crlf2 ; print newline
;
err1: ; without the leading crlf
call prtstr ; print error string
@@ -1018,18 +1019,18 @@ stack .equ $ ; stack top
; Messages
;
indent .db " ",0
msgban1 .db "MODE v1.0 for RomWBW CP/M 2.2, 22-Aug-2017",0
msgban1 .db "MODE v1.2, 24-Jul-2018",0
msghb .db " [HBIOS]",0
msgub .db " [UBIOS]",0
msgban2 .db "Copyright 2017, Wayne Warthen, GNU GPL v3",0
msgban2 .db "Copyright (C) 2017, Wayne Warthen, GNU GPL v3",0
msguse .db "Usage: MODE COM<n>: [<baud>[,<parity>[,<databits>[,<stopbits>]]]] [/P]",13,10
.db " ex. MODE /? (display version and usage)",13,10
.db " MODE (display config of all serial ports)",13,10
.db " MODE COM0: (display serial unit 0 config)",13,10
.db " MODE COM1: 9600,N,8,1 (set serial unit 1 config)",0
msgprm .db "Parameter error (MODE /? for usage)",0
msginv .db "Unexpected CBIOS (signature missing)",0
msgver .db "Unexpected CBIOS version",0
msginv .db "Invalid BIOS (signature missing)",0
msgver .db "Unexpected HBIOS version",0
msgdev .db "Invalid device name",0
msgnum .db "Unit or slice number invalid",0
msgunt .db "Invalid device unit number specified",0

File diff suppressed because it is too large Load Diff

1732
Source/Apps/RTC.asm Normal file

File diff suppressed because it is too large Load Diff

399
Source/Apps/Startup.asm Normal file
View File

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

725
Source/Apps/Survey.asm Normal file
View File

@@ -0,0 +1,725 @@
;***************************************;
; ;
; S U R V E Y ;
; ;
;***************************************;
;By Michael Friese 9/22/79
;* Lists Kbytes used and remaining plus number of files
; on all logged disks (up to 8)
;* Prints Memory map and synopsis of all machine memory
;* Lists all active I/O Ports
;* Uses disk allocation block for all disk calculations
;
;VERSION LIST - Most recent version first.
;
;16/Dec/17 - Handle 16-bit port addressing using
; Z80 IN A,(C) instruction. Wayne Warthen
;
;06/Jul/82 - Added Godbout DISK 1 equate and added SKIP equate
; Bill Bolton - Software Tools, Australia
;
;01/Jun/82 - Tidied up and fixed port display, added display
; of contents of low memory. David Bennett - Alfred
; Hospital, Australia
;
;29/Jun/80 - Added version number test and calculations for CP/M
; version 2 compatibility. This program should now work
; properly on all versions 1.4 and later. BRR
;
;28/Jun/80 - Added IMS400 equate (prevents Industrial Micro Systems
; controller from hanging up during port scan). BRR
;
;24/Jun/80 - Removed MACLIB statement, included required macros
; in source. Bruce R. Ratoff
;
;*******************************;
; SYSTEM MACROS ;
;*******************************;
;Increments 16 bit memory location X
INXI MACRO X
LOCAL JUST8
PUSH H
LXI H,X
INR M
JNZ JUST8
INX H
INR M
JUST8:
POP H
ENDM
;..............................................................
;
; SAVE MACRO SAVE SPECIFIED REGISTERS
;
; SAVE R1,R2,R3,R4
;
; R1-R4 MAY BE B,D,H OR PSW SAVED IN ORDER SPECIFIED
; IF REGS ARE OMITTED SAVE B,D AND H
;
SAVE MACRO R1,R2,R3,R4
IF NOT NUL R1&R2&R3&R4
IRP R,<<R1>,<R2>,<R3>,<R4>>
IF NUL R
EXITM
ENDIF
PUSH R
ENDM
ELSE
IRPC REG,BDH
PUSH REG
ENDM
ENDIF
ENDM
;
; . . . . . . . . . . . . . . . . . . . . . . . . . . . .
;
; RESTORE MACRO RESTORE REGISTERS (INVERSE OF SAVE)
;
; RESTORE R1,R2,R3,R4
;
; R1-R4 MAY BE B,D,H OR PSW RESTORED IN ORDER SPECIFIED
; IF REGS OMITTED RESTORE H,D AND B
;
RESTORE MACRO R1,R2,R3,R4
IF NOT NUL R1&R2&R3&R4
IRP R,<<R1>,<R2>,<R3>,<R4>>
IF NUL R
EXITM
ENDIF
POP R
ENDM
ELSE
IRPC REG,HDB
POP REG
ENDM
ENDIF
ENDM
;
;..............................................................
;
; CHAROUT MACRO CONSOLE OUTPUT FROM A
;
; CHAROUT ADDR
;
CHAROUT MACRO ADDR
IF NOT NUL ADDR
LDA ADDR
ENDIF
MVI C,2 ;;CONOUT
MOV E,A ;;CHAR TO E
CALL 5 ;;CALL BDOS
ENDM
;
;
;.............................................................
;
; DECOUT MACRO CONVERT A POSITIVE INTEGER TO DECIMAL AND OUTPUT
; TO THE CONSOLE.
;
; DECOUT ADDR
;
; IF ADDR OMITTED, NUMBER ASSUMED TO BE IN HL, ELSE LOADED TO HL
; LEADING ZEROS SUPRESSED. MAXIMUM NUMBER 65,767
;
DECOUT MACRO ADDR
LOCAL ENDDEC,DX
JMP ENDDEC
@DECOUT:
SAVE ;;PUSH STACK
LXI B,-10 ;;RADIX FOR CONVERSION
LXI D,-1 ;;THIS BECOMES NO DIVIDED BY RADIX
DX:
DAD B ;;SUBTRACT 10
INX D
JC DX
LXI B,10
DAD B ;;ADD RADIX BACK IN ONCE
XCHG
MOV A,H
ORA L ;;TEST FOR ZERO
CNZ @DECOUT ;;RECURSIVE CALL
MOV A,E
ADI '0' ;;CONVERT FROM BCD TO HEX
MOV E,A ;;TO E FOR OUTPUT
CHAROUT ;;CONSOLE OUTPUT
RESTORE ;;POP STACK
RET
ENDDEC:
DECOUT MACRO ?ADDR
IF NOT NUL ?ADDR
LHLD ?ADDR
ENDIF
CALL @DECOUT ;;CALL THE SUBROUTINE
ENDM
DECOUT ADDR
ENDM
;
;
;..............................................................
;
; HEXOUT MACRO CONVERT BINARY NO AND OUTPUT TO CONSOLE
;
; HEXOUT ADDR
;
; NUMBER ASSUMED IN A IF NO ARGUMENT
;
HEXOUT MACRO ADDR
LOCAL OUTCHR,HEXEND
JMP HEXEND
HEXPRN:
SAVE PSW
RRC
RRC
RRC
RRC ;;SHIFT RIGHT 4
CALL OUTCHR
RESTORE PSW
OUTCHR:
ANI 0FH ;;MASK 4 BITS
ADI 90H ;;ADD OFFSET
DAA ;;DEC ADJUST
ACI 40H ;;ADD OFFSET
DAA ;;DEC ADJUST
MOV E,A ;;TO E FOR OUTPUT
MVI C,2 ;;CONOUT
JMP 5 ;;CALL BDOS
HEXEND:
HEXOUT MACRO ?ADDR
IF NOT NUL ?ADDR
LDA ?ADDR
ENDIF
CALL HEXPRN
ENDM
HEXOUT ADDR
ENDM
;
;
;*******************************;
; SYSTEM EQUATES ;
;*******************************;
TRUE EQU -1
FALSE EQU NOT TRUE
TARBEL EQU FALSE ; Tarbell FDC dmb 31-may-82
IMS400 EQU FALSE ; Industrial Micro Systems FDC
GODBOUT EQU FALSE ; Godbout Disk 1 FDC
GODBAS EQU 0C0H ; Base of Godbout FDC
TARBAS EQU 0F8H ; Base of Tarbell
SKIP EQU TARBEL OR IMS400 OR GODBOUT ; Will be true
; if any skip needed
IF TARBEL
SKIPORT EQU TARBAS+4 ; Port # to skip if Tarbell FDC
ENDIF
IF IMS400
SKIPORT EQU 08FH ; Port # to skip if IMS FDC
ENDIF
IF GODBOUT
SKIPORT EQU GODBAS+1 ; Port # to skip if Disk 1 FDC
ENDIF
BDOS EQU 5 ; jump to BDOS
bios equ 0 ; jump to BIOS dmb 1-jun-82
CRLF EQU 0A0DH ; CR LF sequence
CRLFE EQU 8A0DH ; CR LF with EOL
EOL EQU 80H ; End of line
TAB EQU 'I'-40H ; Tab character
ESC EQU 1BH ; Escape character
TABS EQU 9 ; Tab columns
;***********************;
; MAIN PROGRAM ;
;***********************;
;
ORG 100H
;
START:
LXI H,0 ; Save stack pointer
DAD SP
SHLD OLDSP
LXI SP,FINIS+64
CALL TYPE ; Type initial CRLF
DB TAB,TAB,'*** System Survey (December 17) ***'
DW CRLF,CRLFE
;DISK SURVEY
LXI H,8 ; Init drive counter
MVI C,24 ; Get login vector
PUSH H
CALL BDOS
POP H
ROTBIT:
RAR ; RAR login bit to C
JNC NOTLOG ; Drive not logged
PUSH PSW ; Save login
PUSH H ; and counter
;Print drive letter
CALL TYPE
DB 'Drive'
DB ' '+EOL
MVI A,'A' ; Get ASCII bias
ADD H ; Add to drive #
MOV E,A ; Print drive letter
CALL TCHR
CALL TYPE ; and colon
DB ':',' '+EOL
POP H ; Restore drive #
PUSH H
;Print K already allocated
MOV E,H
MVI C,14 ; Log drive
CALL BDOS
MVI C,27 ; Index allocation vect
CALL BDOS
MOV L,A ; Put in decent regs
MOV H,B
PUSH H ; save for later
MVI C,12 ; get version #
CALL BDOS
MOV A,L ; zero if version 1
ORA A
JNZ V2X ; otherwise, use 2.x style params
LHLD BDOS+1 ; get vers 1 style params
MVI L,3CH
MOV A,M ; get block shift factor
STA BLKSHF
INX H
INX H
MOV L,M ; get max. block number
MVI H,0
SHLD MAXALL
MVI B,32 ; assume 32 bytes in block map
JMP GETALC ; continue
V2X:
MVI A,'?' ; Use wild user #
STA FCB ; in filename search
MVI C,31 ; Get 2.x parameter block
CALL BDOS
INX H
INX H
MOV A,M ; Get and save ablock shift factor
STA BLKSHF
INX H
INX H
INX H
MOV A,M ; Get maximum block number
INX H ; (double precision)
MOV H,M
MOV L,A
SHLD MAXALL
INX H
MVI B,3 ; map size is (MAXALL+1)/8
V2SH:
MOV A,H
ORA A ; do 16 bit right shift
RAR
MOV H,A
MOV A,L
RAR
MOV L,A
DCR B ; 3 times
JNZ V2SH
MOV B,L
LDA MAXALL ; allow for leftover bits if any
ANI 3
JZ GETALC
INR B
GETALC:
POP H
LXI D,0 ; Init group counter
NXBYTE:
MVI C,8 ; Bit counter for byte
MOV A,M ; Get map byte
NXBIT:
RAR ; Rotate to C
JNC NOBIT ; No group allocated
INX D ; Inc group counter
NOBIT:
DCR C ; Dec bit counter
JNZ NXBIT
INX H ; Index next byte
DCR B
JNZ NXBYTE
CALL SHF16
PUSH H
CALL BINDEC
CALL TYPE
DB 'K bytes in',' '+EOL
;Print number of files
LXI D,FCB ; Fake file cont block
MVI C,17 ; Search for 1st file
CALL BDOS
LXI H,0 ; File counter
LOOK:
CPI 255 ; Failure
JZ PFILE
ADD A ; File offset times 2
ADD A ; 4
ADD A ; 8
ADD A ; 16
ADD A ; 32
ADI 80H ; Make sure it's not a deleted file
MOV E,A
MVI D,0
LDAX D
CPI 0E5H
JZ LOOK1
INX H ; Bump file counter
LOOK1:
LXI D,FCB ; Restore FCB
MVI C,18 ; Look for addtl files
PUSH H ; Save file counter
CALL BDOS
POP H
JMP LOOK
PFILE:
CALL BINDEC ; Print # of files
CALL TYPE
DB ' files with',' '+EOL
;Print K remaining
LHLD MAXALL ; Get number of blocks
XCHG
INX D ; Inc for actual value
CALL SHF16
XCHG
POP H
MOV A,H ; Ones comp & move
CMA
MOV H,A
MOV A,L
CMA
MOV L,A
INX H ; Twos complement
DAD D ; and subtract
CALL BINDEC ; K remaining
CALL TYPE
DB 'K bytes remaining'
DW CRLFE
;Set up to print next drive
POP H ; Restore bit counter
POP PSW ; and bitmap byte
NOTLOG:
INR H ; Bump drive counter
DCR L ; Dec bit counter
JNZ ROTBIT
;MEMORY SURVEY
;Create header
MSURV:
CALL TYPE
DW CRLF
DB 'Memory map:'
DW CRLF
DB '0',TAB,'8',TAB,'16',TAB,'24',TAB,'32'
DB TAB,'40',TAB,'48',TAB,'56',TAB,'64'
DW CRLF
REPT 8
DB '|',TAB
ENDM
DB '|'
DW CRLF
db ' ' ; dmb 31-May-82
DB 'T'+EOL
LXI H,RAM
MVI M,LOW 1023 ; Init RAM counter
INX H
MVI M,HIGH 1023
MVI B,4 ; Clear ROM, EMP
CLREG:
INX H
MVI M,0
DCR B
JNZ CLREG
LXI H,1024 ; Init memory pointer
MVI C,63 ; K to be checked
;Start of analysis loop
BEGANA:
LXI D,1024 ; Byte counter
XRA A ; Clear flag bytes
STA RAMF
STA EMPF
ANALP:
MOV A,M ; Get test byte and
MOV B,A ; store for later
CMA
MOV M,A ; Put invertd tst byte
SUB M ; Check for good write
MOV M,B ; Restore orignl data
JNZ NOTMEM ; Wasn't good write
INXI RAM ; Bump memory counter
JMP NEXT ; To next byte
NOTMEM:
STA RAMF ; Not considered RAM
MVI A,0FFH ; Is it empty space?
SUB B
JNZ NOTEMP ; Inc ROM, set flag
LDA EMPF ; Any non empty space
ANA A ; before here?
JZ NEXT
JMP NOTEM ; To next byte
NOTEMP:
STA EMPF ; Set no empty flag
NOTEM:
INXI ROM
NEXT:
INX H ; Index next byte
DCX D ; Decrement K counter
XRA A
ORA D
ORA E
JNZ ANALP ; K counter not 0
PUSH B
PUSH H
LDA RAMF ; Is it RAM?
ANA A
JNZ NOTRAM ; No
dcr h ; drop H to make compares right
LDA BDOS+2 ; Is it under BDOS ?
CMP H
JC NOTTPA ; No
CALL TYPE ; Yes, it's TPA
DB 'T'+EOL
JMP NEXTK
NOTTPA:
lda bios+2 ; is it under bios ?
cmp h
jc nbdos
call type ; yes, it's BDOS
db 'C'+eol
jmp nextk
nbdos:
CALL TYPE ; Assume it's BIOS
DB 'B'+EOL
JMP NEXTK
;
NOTRAM:
LDA EMPF ; Is it empty?
ANA A
JZ NOMEM ; Yes, no memory
CALL TYPE ; No, must be ROM
DB 'R'+EOL
JMP NEXTK
NOMEM:
CALL TYPE
DB ' '+EOL
NEXTK:
POP H
POP B
DCR C ; Decrement K counter
JNZ BEGANA
CALL TYPE
DW CRLF
DB 'T=TPA',TAB,'C=CPM',TAB,'B=BIOS or unassigned'
DB TAB,'R=ROM or bad'
DW CRLFE
;
; contents of first page
call type
db 'BIOS at',' '+eol
hexout bios+2
hexout bios+1
call type
db tab,'iobyte',' '+eol
hexout bios+3
call type
db tab,'drive',' '+eol
hexout bios+4
call type
db tab,'BDOS at',' '+eol
hexout bdos+2
hexout bdos+1
call type
dw crlf,crlfe
;
;MEMORY SYNOPSIS
LHLD RAM
PUSH H ; Save RAM
CALL BINDEC ; Type RAM
CALL TYPE
DB ' Bytes RAM',TAB,TAB+EOL
LHLD ROM
PUSH H
CALL BINDEC ; Type ROM
CALL TYPE
DB ' Bytes ROM',TAB,TAB+EOL
LHLD BDOS+1
CALL BINDEC
CALL TYPE
DB ' Bytes in TPA'
DW CRLFE
POP D ; Get RAM
POP H ; Get RAM
DAD D ; Add 'em
PUSH H ; and save result
LXI D,0 ; Subtract from this
MOV A,H ; Complement 16 bits
CMA
MOV H,A
MOV A,L
CMA
MOV L,A ; 2s comp bias in D
DAD D ; Subtract
CALL BINDEC
CALL TYPE
DB ' Bytes Empty ',TAB+EOL
POP H ; Restore RAM+ROM
CALL BINDEC
CALL TYPE
DB ' Total Active Bytes'
DW CRLF,CRLF
;PORT SURVEY
DB 'Active I/O ports',':'+EOL
LXI H,1000H ; DELAY SO MESSAGE OUTPUT
PDLY:
DCX H ; DOESN'T GIVE A FALSE READING
MOV A,H ; ON CONSOLE STATUS PORT
ORA L
JNZ PDLY
LXI H,0 ; Init active port counter
mvi d,0 ; Init port counter
mvi e,0ffh ; init port group variable
PORTLP:
MOV A,D
IF SKIP ; Single port mask
CPI SKIPORT
JZ ISPORT ; Print mask port
ENDIF
mov c,a ; port number to reg c
mvi b,0 ; for 16 bit port addressing
db 0edh,078h ; z80: in a,(c)
; inactive port could return 0xFF or 0x78
CPI 0FFH
JZ NEXTPT
cpi 078h
jz nextpt
ISPORT:
mov a,d ; got a live one, probably
ani 0f0h ; is port in same group as last ?
cmp e
jz nocrlf
call type ; no, start a new line
dw crlfe
mov a,d ; save for next time
ani 0f0h
mov e,a
nocrlf:
MOV A,D ; Get port #
PUSH D
PUSH H
HEXOUT
POP H
POP D
INX H ; count another one found
call type
db ' '+eol
NEXTPT:
INR D ; Bump port counter
JNZ PORTLP ; Not done
CALL TYPE ; Done
DW CRLFE
CALL BINDEC
CALL TYPE ; Type Active Ports
DB ' Ports active'
DW CRLFE
CCP:
LHLD OLDSP
SPHL
RET
;***********************;
; SUBROUTINES ;
;***********************;
;Binary to decimal conversion
BINDEC:
DECOUT ; From LIB
RET
;Types a string of text terminated with bit 7 high
TYPE:
XTHL ; Get string address
PUSH D
TYPELP:
MOV A,M ; Get type data
MOV D,A ; Save for later
ANI 7FH ; Mask ASCII
MOV E,A
PUSH H
PUSH D
CALL TCHR
POP D
POP H
INX H
MVI A,EOL ; End of line bit
ANA D
JP TYPELP ; Not done
POP D
XTHL ; Get return address
RET
;Types a single character on console
TCHR:
MVI C,2
JMP BDOS
;Checks sectors per block and multiplies or divides block size
;Enter with data in D. Result returned in H,L
;
SHF16:
LDA BLKSHF ; Get shift factor (gives block size)
CPI 3 ; Is it 1K (std)?
JNZ NOT3
MOV L,E ; Yes, use present #
ZH:
MVI H,0
RET
;
NOT3:
CPI 2 ; Is it minifloppy?
JNZ NOT2
MOV A,E ; Yes, divide by 2
RRC
ANI 7FH
MOV L,A
JMP ZH
NOT2:
SUI 3 ; Must be something
MOV B,A ; larger like double
XCHG ; sided or double dens
BITSHF:
DAD H ; 16 bit 2^(B-1)
DCR B
JNZ BITSHF
RET
;***********************;
; DATA STORAGE ;
;***********************;
FCB: DB 0,'???????????',0,0,0 ; File control block
DS 17 ; Extra FCB workspace
OLDSP: DS 2 ; Old stack pointer
RAM: DS 2 ; RAM counter
ROM: DS 2 ; ROM counter
RAMF: DS 1 ; RAM good flag
EMPF: DS 1 ; Empty so far flag
BLKSHF: DS 1 ; block shift factor
MAXALL: DS 2 ; maximum block number
FINIS EQU $ ; End of program
END


View File

@@ -1,6 +1,6 @@
;===============================================================================
; SysCopy - Copy System Image to/from reserved tracks of disk for RomWBW
; adaptation of CP/M 2.2
; adaptation of CP/M 2.2 & CP/M 3
;===============================================================================
;
; Author: Wayne Warthen (wwarthen@gmail.com)
@@ -16,6 +16,7 @@
;
; Change Log:
; 2016-04-24 [WBW] Updated to preserve MBR partition table
; 2020-02-17 [WBW] Updated for CP/M 3
;_______________________________________________________________________________
;
; ToDo:
@@ -27,6 +28,9 @@
; Definitions
;===============================================================================
;
false .equ 0 ; define true
true .equ ~false ; define false
;
stksiz .equ $40 ; we are a stack pig
;
restart .equ $0000 ; CP/M restart vector
@@ -86,6 +90,18 @@ main:
init:
; add check for RomWBW?
;
; get OS version
ld c,12 ; BDOS get os version
call bdos ; do it, L=version
cp $30 ; Test for v3.0
jr c,init1 ; if <, pre v3.0
ld a,true ; OS v3.0 or above
ld (v3os),a ; save it
jr init2
init1:
ld a,false ; OS < v3.0
ld (v3os),a ; save it
init2:
; locate cbios function table address
ld hl,(restart+1) ; load address of CP/M restart vector
ld de,-3 ; adjustment for start of table
@@ -96,6 +112,20 @@ init:
call bdos ; invoke BDOS function
inc a ; 1-based index for fcb
ld (defdrv),a ; save it
; print version banner
call crlf ; formatting
ld de,msgban1 ; point to version message part 1
call prtstr ; print it
ld a,(v3os) ; get OS version flag
or a ; set flags
ld de,msgv2 ; point to V2 mode message
call z,prtstr ; if V2, say so
ld de,msgv3 ; point to V3 mode message
call nz,prtstr ; if V3, say so
call crlf ; formatting
ld de,msgban2 ; point to version message part 2
call prtstr ; print it
call crlf ; formatting
; return success
xor a
ret
@@ -237,7 +267,7 @@ wrfil1: ; create target file
; write the image
ld a,$15 ; setup for bdos write sequential
ld (rwfun),a ; save bdos function
ld a,(imgsiz) ; number of records to read
ld a,(imgsiz) ; number of records to write
ld (reccnt),a ; init record counter
ld hl,imgbuf ; start of buffer
ld (bufptr),hl ; init buffer pointer
@@ -292,10 +322,8 @@ rddsk:
call setdsk ; setup disk
ret nz ; abort on error
; set function to read
ld hl,(cbftbl) ; get address of CBIOS function table
ld a,$27 ; $27 is CBIOS READ entry offset
call addhl ; set HL to resultant entry point
ld (actfnc),hl ; save it
ld a,13 ; CBIOS func 13: Read
ld (actfnc),a ; save it
; read the header
ld a,12 ; start with 1536 byte header (12 records)
ld (reccnt),a ; initialize record counter
@@ -339,11 +367,10 @@ wrdsk:
ld hl,mbrbuf ; override to read
ld (bufptr),hl ; ... into MBR buffer
ld a,4 ; 4 records = 1 512 byte sector
ld (reccnt),a ; initialize record counter
; set function to read
ld hl,(cbftbl) ; get address of CBIOS function table
ld a,$27 ; $27 is CBIOS READ entry offset
call addhl ; set HL to resultant entry point
ld (actfnc),hl ; save it
ld a,13 ; CBIOS func 13: Read
ld (actfnc),a ; save it
; read the existing MBR into memory
call rwdsk ; read the sector
ret nz ; abort on error
@@ -366,10 +393,8 @@ wrdsk1: ; setup to write the image from memory to disk
call setdsk ; setup disk
ret nz ; abort on error
; set function to write
ld hl,(cbftbl) ; get address of CBIOS function table
ld a,$2A ; $2A is CBIOS WRITE entry offset
call addhl ; set HL to resultant entry point
ld (actfnc),hl ; save it
ld a,14 ; CBIOS func 14: Write
ld (actfnc),a ; save it
; setup the record count to write
ld a,(imgsiz) ; get previously recorded image size
ld (reccnt),a ; save it as pending record count
@@ -399,7 +424,8 @@ setdsk:
ld c,a ; move to c
ld e,0 ; treat as first select
call cbios ; invoke cbios with...
.db $1B ; SELDSK entry offset
;.db $1B ; SELDSK entry offset
.db 9 ; SELDSK entry offset
; check return (sets HL to DPH address)
ld a,h
or l
@@ -436,29 +462,47 @@ setdsk:
; Read or write (reccnt) sectors to/from disk via CBIOS
;
rwdsk:
ld hl,128 ; assume rec len for < CP/M 3
ld (reclen),hl ; and save it
ld a,(v3os) ; CP/M 3 or greater?
or a ; set flags
jr z,rwdsk0 ; if not, continue
; adjust reccnt, logical (128) to physical (512)
ld a,(reccnt) ; get pending rec cnt
add a,3 ; round up
srl a ; shift to
srl a ; ... divide by 4
ld (reccnt),a ; and resave it
ld hl,512 ; use physical rec len
ld (reclen),hl ; and save it
rwdsk0:
; setup to read/write a sector
ld bc,(acttrk) ; get active track
call cbios ; invoke cbios with...
.db $1E ; SETTRK entry offset
;.db $1E ; SETTRK entry offset
.db 10 ; SETTRK entry offset
ld bc,(actsec) ; get active sector
call cbios ; invoke cbios with...
.db $21 ; SETSEC entry offset
;.db $21 ; SETSEC entry offset
.db 11 ; SETSEC entry offset
ld bc,(bufptr) ; get active buffer pointer
call cbios ; invoke cbios with...
.db $24 ; SETDMA entry offset
;.db $24 ; SETDMA entry offset
.db 12 ; SETDMA entry offset
; read/write sector
ld a,(reccnt) ; get the pending record count
dec a ; last record?
ld c,2 ; allow cached writes by default
jr nz,rwdsk1 ; not last record, continue
ld c,1 ; last record, no caching please
rwdsk1: ld hl,(actfnc) ; load the CBIOS function vector
call jphl ; indirect call (read or write)
rwdsk1:
ld a,(actfnc)
call cbiosfn
or a ; set flags on return code
jp nz,errio ; if not zero, error abort
; adjust buffer pointer
ld hl,(bufptr) ; get buffer pointer
ld de,128 ; record length is 128 bytes
ld de,(reclen) ; get rec len
add hl,de ; adjust buffer ptr for next record
ld (bufptr),hl ; save it
; next sector
@@ -479,7 +523,7 @@ rwdsk1: ld hl,(actfnc) ; load the CBIOS function vector
rwdsk2: ld hl,reccnt
dec (hl) ; decrement pending record count
ret z ; if zero, done, return with Z set
jr rwdsk ; otherwise, loop
jr rwdsk0 ; otherwise, loop
;
jphl: jp (hl) ; indirect jump
;
@@ -656,6 +700,15 @@ chkfcb4:
or a ; set flags
ret
;
; Print dot
;
prtdot:
push af
ld a,'.'
call prtchr
pop af
ret
;
; Print character in A without destroying any registers
;
prtchr:
@@ -775,13 +828,37 @@ delim1:
;
cbios:
ex (sp),hl
ld a,(hl) ; get the function offset
ld a,(hl) ; get the function number
inc hl ; point past value following call instruction
ex (sp),hl ; put address back at top of stack and recover HL
cbiosfn:
; enter here if function already in reg A
ld (bpb_fn),a ; save function
;
ld a,(v3os) ; CP/M 3 or greater?
or a ; set flags
jr nz,cbios2 ; if >= V3, handle it
;
; CBIOS call for CP/M < v3
ld a,(bpb_fn) ; get pending function number
ld l,a ; function number to L
add a,l ; ... and multiply by 3 for
add a,l ; ... jump table offset
ld hl,(cbftbl) ; address of CBIOS function table to HL
call addhl ; determine specific function address
jp (hl) ; invoke CBIOS
;
cbios2:
; CBIOS call for CP/M v3 or greater
ld (bpb_bc),bc
ld (bpb_de),de
ld (bpb_hl),hl
ld c,50 ; direct bios call function number
ld de,bpb ; BIOS parameter block
jp bdos ; return via BDOS call
;
; Add the value in A to HL (HL := HL + A)
;
addhl:
@@ -862,10 +939,24 @@ actdsk .db 0 ; active disk no
acttrk .dw 0 ; active track
actsec .dw 0 ; active sector
actspt .dw 0 ; active sectors per track
actfnc .dw 0 ; active function (read or write)
actfnc .db 0 ; active cbios i/o function (read or write)
v3os .db 0 ; true ($FF) if OS v3.0 or greater
reclen .dw 0 ; active record length
;
bpb: ; BIOS parameter block for CP/M 3 BIOS calls
bpb_fn .db 0 ; function
bpb_a .db 0 ; reg A
bpb_bc .dw 0 ; reg BC
bpb_de .dw 0 ; reg DE
bpb_hl .dw 0 ; reg HL
;
; Messages
;
msgban1 .db "SYSCOPY v2.0 for RomWBW CP/M, 17-Feb-2020$"
msgv2 .db " (CP/M 2 Mode)$"
msgv3 .db " (CP/M 3 Mode)$"
msgban2 .db "Copyright 2020, Wayne Warthen, GNU GPL v3$"
msguse .db "Usage: SYSCOPY <dest>[=<source>]$"
msgamb .db "Ambiguous file specification not allowed$"
msgdlm .db "Invalid delimiter$"

495
Source/Apps/Timer.asm Normal file
View File

@@ -0,0 +1,495 @@
;===============================================================================
; TIMER - Display system timer value
;
;===============================================================================
;
; Author: Wayne Warthen (wwarthen@gmail.com)
;_______________________________________________________________________________
;
; Usage:
; TIMER [/C] [/?]
; ex: TIMER (display current timer value)
; TIMER /? (display version and usage)
; TIMER /C (display timer value continuously)
;
; Operation:
; Reads and displays system timer value.
;_______________________________________________________________________________
;
; Change Log:
; 2018-01-14 [WBW] Initial release
; 2018-01-17 [WBW] Add HBIOS check
; 2019-11-08 [WBW] Add seconds support
;_______________________________________________________________________________
;
; ToDo:
;_______________________________________________________________________________
;
;===============================================================================
; 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 3 ; intended CBIOS version - major
rmn .equ 0 ; intended CBIOS version - minor
;
bf_sysver .equ $F1 ; BIOS: VER function
bf_sysget .equ $F8 ; HBIOS: SYSGET function
bf_sysgettimer .equ $D0 ; TIMER subfunction
bf_sysgetsecs .equ $D1 ; SECONDS subfunction
;
;===============================================================================
; 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:
call crlf ; formatting
ld de,msgban ; point to version message part 1
call prtstr ; print it
;
call idbio ; identify active BIOS
cp 1 ; check for HBIOS
jp nz,errbio ; handle BIOS error
;
ld a,rmj << 4 | rmn ; expected HBIOS ver
cp d ; compare with result above
jp nz,errbio ; handle BIOS error
;
initx
; initialization complete
xor a ; signal success
ret ; return
;
; Process
;
process:
; look for start of parms
ld hl,$81 ; point to start of parm area (past len byte)
;
process00:
call nonblank ; skip to next non-blank char
jp z,process0 ; no more parms, go to display
;
; check for option, introduced by a "/"
cp '/' ; start of options?
jp nz,usage ; yes, handle option
call option ; do option processing
ret nz ; done if non-zero return
jr process00 ; continue looking for options
;
process0:
call crlf2 ; formatting
;
process1:
ld b,bf_sysget ; HBIOS SYSGET function
ld c,bf_sysgettimer ; TIMER subfunction
rst 08 ; call HBIOS, DE:HL := timer value
ld a,(first)
or a
ld a,0
ld (first),a
jr nz,process1a
; test for new value
ld a,(last) ; last LSB value to A
cp l ; compare to current LSB
jr z,process2 ; if equal, bypass display
process1a:
; save and print new value
ld a,l ; new LSB value to A
ld (last),a ; save as last value
call prtcr ; back to start of line
;call nz,prthex32 ; display it
call prthex32 ; display it
ld de,strtick ; tag
call prtstr ; display it
; get and print seconds value
ld b,bf_sysget ; HBIOS SYSGET function
ld c,bf_sysgetsecs ; SECONDS subfunction
rst 08 ; call HBIOS, DE:HL := seconds value
call prthex32 ; display it
ld a,'.' ; fraction separator
call prtchr ; print it
ld a,c ; get fractional component
call prthex ; print it
ld de,strsec ; tag
call prtstr ; display it
;
process2:
ld a,(cont) ; continuous display?
or a ; test for true/false
jr z,process3 ; if false, get out
;
ld c,6 ; BDOS: direct console I/O
ld e,$FF ; input char
call bdos ; call BDOS, A := char
or a ; test for zero
jr z,process1 ; loop until char pressed
;
process3:
xor a ; signal success
ret
;
; Handle special options
;
option:
;
inc hl ; next char
ld a,(hl) ; get it
or a ; zero terminator?
ret z ; done if so
cp ' ' ; blank?
ret z ; done if so
cp '?' ; is it a '?'?
jp z,usage ; yes, display usage
cp 'C' ; is it a 'C', continuous?
jp z,setcont ; yes, set continuous display
jp errprm ; anything else is an error
;
usage:
;
jp erruse ; display usage and get out
;
setcont:
;
or $FF ; set A to true
ld (cont),a ; and set continuous flag
jr option ; check for more option letters
;
; Identify active BIOS. RomWBW HBIOS=1, UNA UBIOS=2, else 0
;
idbio:
;
; Check for UNA (UBIOS)
ld a,($FFFD) ; fixed location of UNA API vector
cp $C3 ; jp instruction?
jr nz,idbio1 ; 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,idbio1 ; 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,idbio1 ; if not, not UNA, check others
;
ld bc,$04FA ; UNA: get BIOS date and version
rst 08 ; DE := ver, HL := date
;
ld a,2 ; UNA BIOS id = 2
ret ; and done
;
idbio1:
; Check for RomWBW (HBIOS)
ld hl,($FFFE) ; HL := HBIOS ident location
ld a,'W' ; First byte of ident
cp (hl) ; Compare
jr nz,idbio2 ; Not HBIOS
inc hl ; Next byte of ident
ld a,~'W' ; Second byte of ident
cp (hl) ; Compare
jr nz,idbio2 ; Not HBIOS
;
ld b,bf_sysver ; HBIOS: VER function
ld c,0 ; required reserved value
rst 08 ; DE := version, L := platform id
;
ld a,1 ; HBIOS BIOS id = 1
ret ; and done
;
idbio2:
; No idea what this is
xor a ; Setup return value of 0
ret ; and done
;
; Print character in A without destroying any registers
;
prtchr:
push bc ; save registers
push de
push hl
ld e,a ; character to print in E
ld c,$02 ; BDOS function to output a character
call bdos ; do it
pop hl ; restore registers
pop de
pop bc
ret
;
prtdot:
;
; shortcut to print a dot preserving all regs
push af ; save af
ld a,'.' ; load dot char
call prtchr ; print it
pop af ; restore af
ret ; done
;
prtcr:
;
; shortcut to print a dot preserving all regs
push af ; save af
ld a,13 ; load CR value
call prtchr ; print it
pop af ; restore af
ret ; done
;
; Print a zero terminated string at (DE) without destroying any registers
;
prtstr:
push 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,(hl) ; load next character
or a ; string ends with a null
ret z ; if null, return pointing to null
cp ' ' ; check for blank
ret nz ; return if not blank
inc hl ; if blank, increment character pointer
jr nonblank ; and loop
;
; 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
;
errbio: ; invalid BIOS or version
ld de,msgbio
jr err
;
err: ; print error string and return error signal
call crlf2 ; 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
;===============================================================================
;
last .db 0 ; last LSB of timer value
cont .db 0 ; non-zero indicates continuous display
first .db $FF ; first pass flag (true at start)
;
stksav .dw 0 ; stack pointer saved at start
.fill stksiz,0 ; stack
stack .equ $ ; stack top
;
; Messages
;
msgban .db "TIMER v1.1, 10-Nov-2019",13,10
.db "Copyright (C) 2019, Wayne Warthen, GNU GPL v3",0
msguse .db "Usage: TIMER [/C] [/?]",13,10
.db " ex. TIMER (display current timer value)",13,10
.db " TIMER /? (display version and usage)",13,10
.db " TIMER /C (display timer value continuously)",0
msgprm .db "Parameter error (TIMER /? for usage)",0
msgbio .db "Incompatible BIOS or version, "
.db "HBIOS v", '0' + rmj, ".", '0' + rmn, " required",0
strtick .db " Ticks, ",0
strsec .db " Seconds",0
;
.end

View File

@@ -0,0 +1,13 @@
@echo off
setlocal
set TOOLS=../../../Tools
set PATH=%TOOLS%\tasm32;%PATH%
set TASMTABS=%TOOLS%\tasm32
tasm -t180 -g3 -fFF Tune.asm Tune.com Tune.lst
if errorlevel 1 goto :eof
copy /Y Tune.com ..\..\..\Binary\Apps\
copy /Y Tunes\*.* ..\..\..\Binary\Apps\Tunes\

View File

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

View File

@@ -0,0 +1,50 @@
MYMPLAY 0.4 by Lieves!Tuore
This is just a quick project inspired
by discussion in comp.sys.msx.
STSound by Leonard/Oxygene is a player
for YM files, which are basically just
plain PSG register dumps. The format is
unfortunately not well suited for a
low-memory system like MSX1. Therefore,
I introduced a brand new fileformat
called MYM. It holds the same data but
compressed differently.
To convert between YM and MYM there's a
utility, YM2MYM. It packs a _raw_ YM
file to a MYM file. So before you start
to convert shitload of YM tunes, unpack
them with LHA first. Only YM2/YM3/YM3b
files can be converted at the moment.
Many new YM's are YM5, however.
The other files are MYM2YM for reverse
conversion and of course the player
itself (including the source). The
assembly source is for Table-driven
assembler (TASM), not GEN80, sorry
about that. I stripped the tailing 0's
from the final .COM file to make it
smaller (Now it IS small ;v)
Thanks to Spectrum and CPC fanatics
we now have version for both platforms
too. MSX version is the most "mature"
one at the moment, but let's see about
that...
Version 0.4 comes with an updated
YM2MYM converter that now recognizes
YM5 files. The actual MYMPlay is
better too, it takes 1.7kB less memory
so you can play bigger tunes (if any).
You'll find a pile of MYM tunes here:
ftp://ftp.kameli.net/pub/mym/
And the latest version of MYMPLAY here:
http://www.kameli.net/lt/
Marq/L!T, marq@iki.fi

12
Source/Apps/Tune/Makefile Normal file
View File

@@ -0,0 +1,12 @@
OBJECTS = Tune.com
DEST = ../../../Binary/Apps
TOOLS = ../../../Tools
include $(TOOLS)/Makefile.inc
Tune.com: Tune.asm
$(TASM) Tune.asm Tune.com
all::
mkdir -p $(DEST)/Tunes
cp Tunes/* $(DEST)/Tunes

View File

@@ -0,0 +1,113 @@
Universal PT2 and PT3 player for ZX Spectrum and MSX Release 1
(c)2004-2007 S.V.Bulba <vorobey@mail.khstu.ru>
http://bulba.untergrund.net/ (http://bulba.at.kz/)
Release date: 30 of April 2007
Common remarks
--------------
The project is a compact combination of two players: Vortex Tracker II v1.0 PT3
player for ZX Spectrum and Universal PT2 player for ZX Spectrum and MSX
computers. This player is a little slower than standalone players, but more
compact: less than 2K instead of 2.6K (1.6+1).
As bonus there are some additional functions (conditional assembly):
1) ROUT procedure for ZX or MSX;
2) positions counter at (START+11);
3) ability to change channels allocation during playing;
4) checking loop point;
5) disabling official identificator.
New for this release: added PT v3.7 features (commands 1.xx and 2.xx).
Project was compiled in assembler for Win32:
SjASM Z80 Assembler v0.39f
Copyright 2005 Sjoerd Mastijn
Files
-----
PTxPlay.asm - source Z80 assembler code.
PTxPlay.h - same text is prepared for Alasm.
PTxPlay.txt - same text is prepared for ZX Asm 3.10.
PTxPlay - assembled binary code block in minimal configuration for ZX Spectrum
with identificator to load at #C000 address, zeroes at end can be truncated.
Entry points
------------
Before playing at (START+10) set bit 1 for PT2 and reset for PT3 and call START
(loading) address. To detect module type you can use UniSearch by Spectre.
Player is not reallocable, so you need to assemble with other ORG value, if you
want to load code at other than #C000 address, also you can place VARS area to
any other address too. After calling START AY is stop any sounding. At START+10
is located SETUP byte, where bit 0 is used to control looping of melody. At any
time you can set bit 0 to disable loop. Bit 7 can be checked at any moment, it
is set after reaching end of module (finishing playing of last position). Bits
2 and 3 is used for setting channels allocation. Only first three combinations
of these bits are allowed: 0 - ABC, 1 - ACB, 2 - BAC. ABC is used to output
channels "as is". ACB swaps B and C, and BAC swaps A and B. So, any stereo
combinations can be heard: ABC-stereo for the most xUSSR ZX-clones, ACB - East
Europe ones, and BAC - ZS Scorpion 256K.
In current compilation module must be loaded after variables (by default). Of
course, you can change it in source or in assembled code. Also you can specify
module address in HL as follows:
LD HL,PT3ModuleAddress
XOR A ;PT3
LD (START+10),A
CALL START+3
By calling START you are proceeding INIT procedure, which analyzes module type
bit and prepares corresponding player branches, checks PT3 module version and
prepares corresponding note and volume tables (it is need for correct playing of
modules of different PT3 subversions). Also you can call START after stopping
playing to mute AY sound. In last case you can call START+8 to simple mute AY
sound, to continue playing simply continue calling START+5 as usually.
To play, call START+5 address each 1/50 of second (interrupt). Playing selects
right portamento algorithm for old (v3.5-) and new (v3.6+ or VT II) modules.
During running PLAY subprogram no any interrupts are expected, it is your task
to right call PLAY. For example, next example is totaly right:
CALL #C000 ;calling init
EI ;enable interrupts
_LP HALT ;wait for next interrupt
CALL #C005 ;call play, player uses 10500 tacts max,
;so no interrupt can be before next HALT
XOR A ;test keyboard
IN A,(#FE)
CPL
AND 15
JR Z,_LP
CALL #C008 ;mute AY sound (you can resume playing from current place)
RET
At START+11 current position byte can be placed (see conditional assembly keys).
To get common number of position, see module header or use UniSearch by Spectre.
Example of playing without loop:
LD A,1
LD (START+10),A
CALL START
EI
LOOP HALT
CALL START+5
LD A,(START+10)
RLA
JR NC,LOOP
RET
Read also all comments in source file.
Thanks to Andrey Bogdanovich aka Spectre for help and UniSearch; Ivan Roshin for
tone and volume tables generators; Alfonso D.C. aka Dioniso for info about MSX.
Sergey Bulba
19 of September 2004 - 30 of April 2007

2690
Source/Apps/Tune/Tune.asm Normal file

File diff suppressed because it is too large Load Diff

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -9,11 +9,14 @@ set ZXBINDIR=%TOOLS%\cpm\bin\
set ZXLIBDIR=%TOOLS%\cpm\lib\
set ZXINCDIR=%TOOLS%\cpm\include\
zx mac xmdm125
zx mac xmdm125.asm $PO
zx slr180 -xmhb/HF
rem zx slr180 -xmuf/HF
zx mload25 XM=xmdm125,xmhb
rem zx mload25 XMUF=xmdm125,xmuf
rem set PROMPT=[Build] %PROMPT%
rem %comspec%
move /Y XM.com ..
copy /Y XM.com ..\..\..\Binary\Apps\
rem copy /Y XMUF.com ..\..\..\Binary\Apps\

View File

@@ -4,4 +4,4 @@ setlocal
if exist *.hex del *.hex
if exist *.prn del *.prn
if exist *.lst del *.lst
if exist xm.com del xm.com
if exist *.com del *.com

13
Source/Apps/XM/Makefile Normal file
View File

@@ -0,0 +1,13 @@
#OBJECTS = xm.com xmuf.com
OBJECTS = xm.com
DEST = ../../../Binary/Apps
TOOLS = ../../../Tools
OTHERS = *.hex
include $(TOOLS)/Makefile.inc
xm.com: xmdm125.hex xmhb.hex
$(ZXCC) $(CPM)/MLOAD25 XM=xmdm125,xmhb
#xmuf.com: xmdm125.hex xmuf.hex
# $(ZXCC) $(CPM)/MLOAD25 XMUF=xmdm125,xmuf

View File

@@ -71,6 +71,7 @@ STX EQU 02H ; 'Start of header' for 1024 byte blocks
; Conditional equates - change to suit your system, then assemble
;
MHZ EQU 10 ; Clock speed, use integer (2,4,5,8, etc.)
SCL EQU 6600 ; WBW: Receive loop timeout scalar
CPM3 EQU NO ; Yes, if operating in CP/M v3.0 environment
STOPBIT EQU NO ; No, if using 1 stop bit, yes if using 2
BYEBDOS EQU NO ; Yes, if using BYE338-up, BYE501-up, or NUBYE
@@ -328,7 +329,7 @@ MAXMIN EQU 60 ; Minutes for maximum file transfer time.
; Length of external patch program. If over 128 bytes, get/set size
;
LARGEIO EQU YES ; Yes, if modem patch area over 128 bytes
LARSIZE EQU 100H ; If 'LARGEIO' set patch area size (bytes) here
LARSIZE EQU 500H ; If 'LARGEIO' set patch area size (bytes) here
;
;=======================================================================
;
@@ -817,7 +818,8 @@ BADROP: POP PSW ; Restore stack
ALLSET: CALL GETCHR
CALL GETCHR
CALL MINIT
STA CPUMHZ ; WBW: Update CPU speed from MINIT in A
STA CPUMHZ ; WBW: Save CPU speed from MINIT
SHLD RCVSCL ; WBW: Save rcv loop scalar from MINIT
;
; Jump to appropriate function
;
@@ -3472,7 +3474,12 @@ MSLOOP: ADD B ; Number of seconds
MOV B,A ; Put total value back into 'B'
;
MSEC: IF NOT BYEBDOS
LXI D,6600 ; 1 second DCR count
;WBW BEGIN: Use scalar passed in by patch
;LXI D,6600 ; 1 second DCR count
XCHG
LHLD RCVSCL ; Use scalar value from patch
XCHG
;WBW END
ENDIF
;
IF BYEBDOS
@@ -5639,7 +5646,8 @@ MSGFLG: DB 0 ; Message upload flag
SAVEHL: DW 0 ; Saves TBUF command line address
TOTERR: DW 0 ; Total errors for transmission attempt
VRECNO: DW 0 ; Virtual record # in 128 byte records
CPUMHZ: DW MHZ ; WBW: CPU speed in MHz, *word value*
CPUMHZ: DB MHZ ; WBW: CPU speed in MHz
RCVSCL: DW SCL ; WBW: Recv loop scalar
;
EOFLG: DB 0 ; 'EOF' flag (1=yes)
EOFCTR: DB 0 ; EOF send counter

908
Source/Apps/XM/xmhb.180 Normal file
View File

@@ -0,0 +1,908 @@
;=======================================================================
;
; XMHB.Z80 - XMODEM12 PATCH FILE FOR ROMWBW HBIOS
;
; Wayne Warthen - wwarthen@gmail.com
;
; 2018-06-06 WBW Added support for RC2014 w/ Z180
; 2019-08-17 WBW Refactored and merged Phil's ECB-FIFO support
; 2019-08-28 WBW Refactored ASCI support
;
;=======================================================================
;
ASEG
;
NO EQU 0
YES EQU NOT NO
;
ERRDET EQU NO ; detect parity/framing/overrun errs
;
BASE EQU 100H ; start of cp/m normal program area
;
BDOS EQU 00005H ; BDOS function dispatch vector
;
;=======================================================================
;
; Jump table: The jump table must be in exactly the same sequence as the
; one in XMODEM. Note the ORG of 103H - This jump table has no jump to
; 'BEGIN'.
;
ORG BASE + 3 ; start after 'JMP BEGIN'
;
JP CONOUT ; must be 00000h if not used, see below
JP MINIT ; initialization routine (if needed)
JP UNINIT ; undo whatever 'MINIT' did (or return)
JPTBL:
JP SENDR ; send character (via pop psw)
JP CAROK ; test for carrier
JP MDIN ; receive data byte
JP GETCHR ; get character from modem
JP RCVRDY ; check receive ready
JP SNDRDY ; check send ready
JP SPEED ; get speed value for file transfer time
JP EXTRA1 ; extra for custom routine
JP EXTRA2 ; extra for custom routine
JP EXTRA3 ; extra for custom routine
;
;-----------------------------------------------------------------------
;
; Output character to console
;
CONOUT EQU 0 ; not used
;
;-----------------------------------------------------------------------
;
; Initialize modem
;
; This procedure has been usurped to dynamically detect the type
; of system we are running on and install the *real* jump table
; entries as appropriate.
;
MINIT:
; Announce
LD DE,RBC ; RetroBrew Computers
LD C,9 ; BDOS string display function
CALL BDOS ; Do it
;
; Identify BIOS (RomWBW HBIOS or UNA UBIOS)
CALL IDBIO ; 1=HBIOS, 2=UBIOS
LD (BIOID),A ; Save it
DEC A ; Test for HBIOS
JR Z,HINIT ; Do HBIOS setup
DEC A ; Test for UBIOS
JR Z,UINIT ; Do UBIOS setup
;
; Neither UNA nor RomWBW
LD DE,ERR_BIO ; BIOS error message
LD C,9 ; BDOS string display function
CALL BDOS ; Do it
JP 0 ; Bail out!
;
MINIT_RET:
PUSH HL ; Save HL (JP table adr)
; Display port notification string
LD C,9 ; BDOS string display function
CALL BDOS ; Do it
;
; Newline
LD C,9 ; BDOS string display function
LD DE,CRLF ; Newline
CALL BDOS ; Do it
;
; Copy real vectors into active jump table
POP HL ; Recover HL
LD DE,JPTBL ; Real jump table is destination
LD BC,7 * 3 ; Copy 7 3-byte entries
LDIR ; Do the copy
;
; Return with CPU speed in A
LD A,(CPUSPD) ; A := CPU speed in MHz
LD HL,(RCVSCL) ; HL := receive scalar
RET ; and return
;
HINIT:
; Display RomWBW notification string
LD DE,HBTAG ; BIOS notification string
LD C,9 ; BDOS string display function
CALL BDOS ; Do it
;
; Get CPU speed from RomWBW HBIOS and save it
LD B,0F8H ; HBIOS SYSGET function 0xF8
LD C,0F0H ; CPUINFO subfunction 0xF0
RST 08 ; Do it, L := CPU speed in MHz
LD A,L ; Move it to A
LD (CPUSPD),A ; Save it
;
; Get HBIOS character 0 device type
LD B,006H ; HBIOS DEVICE function 0x06
LD C,000H ; HBIOS char 0 device
RST 08 ; Do it, D=device type
LD A,D ; Put result in A
CP 000H ; UART?
JP Z,U_INIT ; If so, do UART init
CP 010H ; ASCI?
JP Z,A_INIT ; If so, do ASCI init
CP 080H ; USB-FIFO?
JP Z,UF_INIT ; If so, do USB-FIFO init
JP H_INIT ; Otherwise, use HBIOS I/O
;
UINIT:
; Display UNA notification string
LD DE,UBTAG ; BIOS notification string
LD C,9 ; BDOS string display function
CALL BDOS ; Do it
;
; Get CPU speed from UNA and save it
LD C,0F8H ; UNA BIOS Get PHI function
RST 08 ; Returns speed in Hz in DE:HL
LD B,4 ; Divide MHz in DE:HL by 100000H
UINIT1:
SRL D ; ... to get approx CPU speed in
RR E ; ...MHz. Throw away HL, and
DJNZ UINIT1 ; ...right shift DE by 4.
INC E ; Fix up for value truncation
LD A,E ; Put in A
LD (CPUSPD),A ; Save it
;
; Check CPU, Z80=UART, Z180=ASCI
LD DE,00202H ; D := 2, E := 2
MLT DE ; DE := D * E == 4
BIT 2,E ; Bit 2 wil be set if mlt happend
JP Z,U_INIT ; UART initialization
JP A_INIT ; otherwise, ASCI
;
HWERR:
; Failed to identify target comm hardware
LD DE,ERR_HW ; Hardware error message
LD C,9 ; BDOS string display function
CALL BDOS ; Do it
JP 0 ; Bail out!
;
; Identify active BIOS. RomWBW HBIOS=1, UNA UBIOS=2, else 0
;
IDBIO:
;
; Check for UNA (UBIOS)
LD A,(0FFFDH) ; fixed location of UNA API vector
CP 0C3H ; jp instruction?
JR NZ,IDBIO1 ; if not, not UNA
LD HL,(0FFFEH) ; get jp address
LD A,(HL) ; get byte at target address
CP 0FDH ; first byte of UNA push ix instruction
JR NZ,IDBIO1 ; if not, not UNA
INC HL ; point to next byte
LD A,(HL) ; get next byte
CP 0E5H ; second byte of UNA push ix instruction
JR NZ,IDBIO1 ; if not, not UNA, check others
LD A,2 ; UNA BIOS id = 2
RET ; and done
;
IDBIO1:
; Check for RomWBW (HBIOS)
LD HL,(0FFFEH) ; HL := HBIOS ident location
LD A,'W' ; First byte of ident
CP (HL) ; Compare
JR NZ,IDBIO2 ; Not HBIOS
INC HL ; Next byte of ident
LD A,~'W' ; Second byte of ident
CP (HL) ; Compare
JR NZ,IDBIO2 ; Not HBIOS
LD A,1 ; HBIOS BIOS id = 1
RET ; and done
;
IDBIO2:
; No idea what this is
XOR A ; Setup return value of 0
RET ; and done
;
;-----------------------------------------------------------------------
;
; Uninitialize modem
;
UNINIT:
LD A,(BIOID)
CP 1 ; Is HBIOS?
JR Z,H_UNINIT ; Handle HBIOS
CP 2 ; Is UBIOS?
JR Z,U_UNINIT ; Handle UBIOS
RET ; Just return
;
H_UNINIT:
; HBIOS: Reset character device 0
LD B,04H ; HBIOS CIOINIT function 0x04
LD C,0 ; Unit = 0
LD DE,-1 ; Reset w/ current settings
RST 08 ; Do it
RET ; not initialized, so no 'UN-INITIALIZE'
;
U_UNINIT:
; UBIOS: Reset character device 0
LD C,10H ; UNA INIT function 0x10
LD B,0 ; Unit = 0
LD DE,-1 ; Reset w/ current settings
RST 08 ; Do it
RET ; not initialized, so no 'UN-INITIALIZE'
;
;-----------------------------------------------------------------------
;
; The following are all dummy routines that are unused because MINIT
; dynamically installs the real jump table.
;
SENDR:
CAROK:
MDIN:
GETCHR:
RCVRDY:
SNDRDY:
SPEED:
EXTRA1:
EXTRA2:
EXTRA3:
RET
;
BIOID DB 0 ; BIOS ID, 1=HBIOS, 2=UBIOS
CPUSPD DB 10 ; CPU speed in MHz
RCVSCL DW 2800 ; RECV loop timeout scalar
;
RBC DB "RBC, 28-Aug-2019$"
;
U_LBL DB ", UART$"
A_LBL DB ", ASCI$"
S_LBL DB ", SIO$"
H_LBL DB ", COM$"
UF_LBL DB ", USB-FIFO$"
;
UBTAG DB " [UNA]$"
HBTAG DB " [WBW]$"
;
CRLF DB 13, 10, "$"
;
ERR_BIO DB 13, 10, 13, 10, "++ Unknown BIOS ++", 13, 10, "$"
ERR_HW DB 13, 10, 13, 10, "++ Unknown Hardware ++", 13, 10, "$"
;
;=======================================================================
;=======================================================================
;
; 8250-like UART @ Port 68H
;
;=======================================================================
;=======================================================================
;
; UART port constants
;
U_BASE EQU 68H ; UART base port
U_DATP EQU U_BASE + 0 ; data in port
U_DATO EQU U_BASE + 0 ; data out port
U_CTLP EQU U_BASE + 5 ; control/status port
U_SNDB EQU 20H ; bit to test for send ready
U_SNDR EQU 20H ; value when ready to send
U_RCVB EQU 01H ; bit to test for receive ready
U_RCVR EQU 01H ; value when ready to receive
U_PARE EQU 04H ; bit for parity error
U_OVRE EQU 02H ; bit for overrun error
U_FRME EQU 08H ; bit for framing error
U_ERRS EQU U_FRME | U_OVRE | U_PARE
;
; Following jump table is dynamically patched into real jump
; table at program startup. See MINIT above. Note that only a
; subset of the jump table is overlaid (SENDR to SPEED).
;
U_JPTBL:
JP U_SENDR ; send character (via pop psw)
JP U_CAROK ; test for carrier
JP U_MDIN ; receive data byte
JP U_GETCHR ; get character from modem
JP U_RCVRDY ; check receive ready
JP U_SNDRDY ; check send ready
JP U_SPEED ; get speed value for file transfer time
;
;-----------------------------------------------------------------------
;
; UART initialization
;
U_INIT:
LD HL,U_JPTBL
LD DE,U_LBL
JP MINIT_RET
;
;-----------------------------------------------------------------------
;
; Send character on top of stack
;
U_SENDR:
POP AF ; get character to send from stack
OUT (U_DATO),A ; send to port
RET
;
;-----------------------------------------------------------------------
;
; Test and report carrier status, Z set if carrier present
;
U_CAROK:
XOR A ; not used, always indicate present
RET
;
;-----------------------------------------------------------------------
;
; Get a character (assume character ready has already been tested)
;
U_MDIN:
U_GETCHR:
IN A,(U_DATP) ; read character from port
RET
;
;-----------------------------------------------------------------------
;
; Test for character ready to receive, Z = ready
; Error code returned in A register
; *** Error code does not seem to be used ***
;
U_RCVRDY:
IN A,(U_CTLP) ; get modem status
;
IF ERRDET
;
; With error detection (slower)
PUSH BC ; save scratch register
PUSH AF ; save full status on stack
AND U_ERRS ; isolate line err bits
LD B,A ; save err status in B
POP AF ; get full status back
AND U_RCVB ; isolate ready bit
CP U_RCVR ; test it (set flags)
LD A,B ; get the error code back
POP BC ; restore scratch register
;
ELSE
;
; No error detection (faster)
AND U_RCVB ; isolate ready bit
CP U_RCVR ; test it (set flags)
LD A,0 ; report no line errors
;
ENDIF
;
RET
;
;-----------------------------------------------------------------------
;
; Test for ready to send a character, Z = ready
;
U_SNDRDY:
IN A,(U_CTLP) ; get status
AND U_SNDB ; isolate transmit ready bit
CP U_SNDR ; test for ready value
RET
;
;-----------------------------------------------------------------------
;
; Report baud rate (index into SPTBL returned in register A)
;
U_SPEED:
LD A,8 ; arbitrarily return 9600 baud
RET
;
;=======================================================================
;=======================================================================
;
; Z180 Primary ASCI
;
; - Port is determined dynamically in A_INIT
;
;=======================================================================
;=======================================================================
;
; ASCI port constants
;
A_DATP EQU 08H ; Z180 TSR - ASCI receive data port
A_DATO EQU 06H ; Z180 TDR - ASCI transmit data port
A_CTLP EQU 04H ; Z180 STAT - ASCI status port
A_CTL2 EQU 00H ; Z180 CNTLA - ASCI control port
;
A_SNDB EQU 02H ; Z180 STAT:TDRE - xmit data reg empty bit
A_SNDR EQU 02H ; Z180 STAT:TDRE - xmit data reg empty value
A_RCVB EQU 80H ; Z180 STAT:RDRF - rcv data reg full bit
A_RCVR EQU 80H ; Z180 STAT:RDRF - rcv data reg full value
A_PARE EQU 20H ; Z180 STAT:PE - parity error bit
A_OVRE EQU 40H ; Z180 STAT:OVRN - overrun error bit
A_FRME EQU 10H ; Z180 STAT:FE - framing error bit
A_ERRS EQU A_FRME | A_OVRE | A_PARE
;
A_BASE DB 00H ; internal IO base address for Z180
;
; Following jump table is dynamically patched over initial jump
; table at program startup. See MINIT above. Note that only a
; subset of the jump table is overlaid (SENDR to SPEED).
;
A_JPTBL:
JP A_SENDR ; send character (via pop psw)
JP A_CAROK ; test for carrier
JP A_MDIN ; receive data byte
JP A_GETCHR ; get character from modem
JP A_RCVRDY ; check receive ready
JP A_SNDRDY ; check send ready
JP A_SPEED ; get speed value for file transfer time
;
;-----------------------------------------------------------------------
;
; ASCI initialization
;
A_INIT:
; Test for location of Z180 internal registers
; and use appropriate I/O address.
LD B,0 ; set MSB for 16 bit I/O
LD C,040H|3FH ; internal registers @ 40H?
IN A,(C) ; read
CP 040H|01FH ; same value except for bit 5?
JR Z,A_INIT1 ; do ASCI init (port in C)
LD C,0C0H|3FH ; internal registers @ C0H?
IN A,(C) ; read
CP 0C0H|1FH ; same value except for bit 5?
JR Z,A_INIT1 ; do ASCI init (port in C)
JP HWERR ; unknown hardware error
;
A_INIT1:
LD A,C ; test port value to A
AND 0C0H ; only top two bits relevant
LD (A_BASE),A ; save it
ADD A,A_CTLP ; status port offset
LD C,A ; put in C for I/O
LD B,0 ; MSB for 16 bit I/O
XOR A ; clear interrupt enable flags
OUT (C),A ; do it
;
LD HL,A_JPTBL
LD DE,A_LBL
JP MINIT_RET
;
;-----------------------------------------------------------------------
;
; Send character on top of stack
;
A_SENDR:
EX (SP),HL ; save HL, HL := char to send
PUSH BC ; save scratch register
LD A,(A_BASE) ; IO base address
ADD A,A_DATO ; data out port offset
LD C,A ; put in C for I/O
LD B,0 ; MSB for 16 bit I/O
OUT (C),H ; send to port
POP BC ; restore scratch reg
POP HL ; restore HL
RET ; done
;
;-----------------------------------------------------------------------
;
; Test and report carrier status, Z set if carrier present
;
A_CAROK:
XOR A ; not used, always indicate present
RET
;
;-----------------------------------------------------------------------
;
; Get a character (assume character ready has already been tested)
;
A_MDIN:
A_GETCHR:
PUSH BC ; save scratch register
LD A,(A_BASE) ; IO base address
ADD A,A_DATP ; data in port offset
LD C,A ; put in C for I/O
LD B,0 ; MSB for 16 bit I/O
IN A,(C) ; read character from port
POP BC ; restore scratch reg
RET
;
;-----------------------------------------------------------------------
;
; Test for character ready to receive, Z = ready
; Error code returned in A register
; *** Error code does not seem to be used ***
;
A_RCVRDY:
PUSH BC ; save scratch register
LD A,(A_BASE) ; IO base address
ADD A,A_CTLP ; status port offset
LD C,A ; put in C for I/O
LD B,0 ; MSB for 16 bit I/O
IN A,(C) ; get modem status
PUSH AF ; save full status on stack
AND A_ERRS ; isolate line err bits
LD B,A ; save err status in B
; Z180 ASCI ports will stall if there are errors.
; Error bits are NOT cleared by merely reading
; the status register. Below, bit 3 of ASCI
; control register is written with a zero to
; clear error(s) if needed.
JR Z,A_RCVRDY2 ; if no errs, continue
PUSH BC ; save scratch reg
LD A,(A_BASE) ; IO base address
ADD A,A_CTL2 ; status port offset
LD C,A ; put in C for I/O
LD B,0 ; MSB for 16 bit I/O
IN A,(C) ; get current control reg value
AND 0F7H ; force err reset bit to zero
OUT (C),A ; write control register
POP BC ; restore scratch reg
;
A_RCVRDY2:
POP AF ; get full status back
AND A_RCVB ; isolate ready bit
CP A_RCVR ; test it (set flags)
LD A,B ; get the error code back
POP BC ; restore scratch register
RET
;
;-----------------------------------------------------------------------
;
; Test for ready to send a character, Z = ready
;
A_SNDRDY:
PUSH BC ; save scratch register
LD A,(A_BASE) ; IO base address
ADD A,A_CTLP ; status port offset
LD C,A ; put in C for I/O
LD B,0 ; MSB for 16 bit I/O
IN A,(C) ; get modem status
AND A_SNDB ; isolate transmit ready bit
CP A_SNDR ; test for ready value
POP BC ; restore scratch register
RET
;
;-----------------------------------------------------------------------
;
; Report baud rate (index into SPTBL returned in register A)
;
A_SPEED:
LD A,8 ; arbitrarily return 9600 baud
RET
;
;=======================================================================
;=======================================================================
;
; Zilog SIO @ Port 80H
;
;=======================================================================
;=======================================================================
;
; Currently assumes the port address and ordering conventions of the
; official RC2014 SIO module. Will not work with others such as EZZ80
; or ZP.
;
; SIO port constants
;
S_BASE EQU 80H ; SIO base port
S_DATP EQU S_BASE + 1 ; data in port
S_DATO EQU S_BASE + 1 ; data out port
S_CTLP EQU S_BASE + 0 ; control/status port
S_SNDB EQU 04H ; bit to test for send ready
S_SNDR EQU 04H ; value when ready to send
S_RCVB EQU 01H ; bit to test for receive ready
S_RCVR EQU 01H ; value when ready to receive
;
; Following jump table is dynamically patched into real jump
; table at program startup. See MINIT above. Note that only a
; subset of the jump table is overlaid (SENDR to SPEED).
;
S_JPTBL:
JP S_SENDR ; send character (via pop psw)
JP S_CAROK ; test for carrier
JP S_MDIN ; receive data byte
JP S_GETCHR ; get character from modem
JP S_RCVRDY ; check receive ready
JP S_SNDRDY ; check send ready
JP S_SPEED ; get speed value for file transfer time
;
;-----------------------------------------------------------------------
;
; SIO initialization
;
S_INIT:
; Suppress interrupts
LD A,01H ; WR1
OUT (S_CTLP),A ; Select WR1
XOR A ; No interrupts
OUT (S_CTLP),A ; Do it
;
LD HL,S_JPTBL
LD DE,S_LBL
JP MINIT_RET
;
;-----------------------------------------------------------------------
;
; Send character on top of stack
;
S_SENDR:
POP AF ; get character to send from stack
OUT (S_DATO),A ; send to port
RET
;
;-----------------------------------------------------------------------
;
; Test and report carrier status, Z set if carrier present
;
S_CAROK:
XOR A ; not used, always indicate present
RET
;
;-----------------------------------------------------------------------
;
; Get a character (assume character ready has already been tested)
;
S_MDIN:
S_GETCHR:
IN A,(S_DATP) ; read character from port
RET
;
;-----------------------------------------------------------------------
;
; Test for character ready to receive, Z = ready
; Error code returned in A register
; *** Error code does not seem to be used ***
;
S_RCVRDY:
;XOR A
;OUT (S_CTLP),A ; select WR0
IN A,(S_CTLP) ; get status
AND S_RCVB ; isolate ready bit
CP S_RCVR ; test it (set flags)
LD A,0 ; report no line errors
RET
;
;-----------------------------------------------------------------------
;
; Test for ready to send a character, Z = ready
;
S_SNDRDY:
;XOR A
;OUT (S_CTLP),A ; select WR0
IN A,(S_CTLP) ; get status
AND S_SNDB ; isolate ready bit
CP S_SNDR ; test it (set flags)
LD A,0 ; report no line errors
RET
;
;-----------------------------------------------------------------------
;
; Report baud rate (index into SPTBL returned in register A)
;
S_SPEED:
LD A,8 ; arbitrarily return 9600 baud
RET
;
;=======================================================================
;=======================================================================
;
; HBIOS Console (COM0:)
;
;=======================================================================
;=======================================================================
;
; Following jump table is dynamically patched over initial jump
; table at program startup. See MINIT above. Note that only a
; subset of the jump table is overlaid (SENDR to SPEED).
;
H_JPTBL:
JP H_SENDR ; send character (via pop psw)
JP H_CAROK ; test for carrier
JP H_MDIN ; receive data byte
JP H_GETCHR ; get character from modem
JP H_RCVRDY ; check receive ready
JP H_SNDRDY ; check send ready
JP H_SPEED ; get speed value for file transfer time
;
;-----------------------------------------------------------------------
;
; HBIOS initialization
;
H_INIT:
LD HL,1250 ; Smaller receive loop timeout scalar
LD (RCVSCL),HL ; ... to compensate for BIOS overhead
;
LD HL,H_JPTBL
LD DE,H_LBL
JP MINIT_RET
;
;-----------------------------------------------------------------------
;
; Send character on top of stack
;
H_SENDR:
POP AF ; get character to send from stack
PUSH BC
PUSH DE
PUSH HL
LD B,01H ; HBIOS OUT function
LD C,0 ; console is unit 0 by fiat
LD E,A ; character to E
RST 08 ; HBIOS call
POP HL
POP DE
POP BC
RET
;
;-----------------------------------------------------------------------
;
; Test and report carrier status, Z set if carrier present
;
H_CAROK:
XOR A ; not used, always indicate present
RET
;
;-----------------------------------------------------------------------
;
; Get a character (assume character ready has already been tested)
;
; This routine must NOT block.
;
H_MDIN:
H_GETCHR:
PUSH BC
PUSH DE
PUSH HL
LD B,02H ; HBIOS IST function
LD C,0 ; console is unit 0 by fiat
RST 08 ; HBIOS call, A := bytes pending
JR NZ,H_MDIN1 ; If char(s) waiting, go get it
XOR A ; otherwise, return null
JR H_MDIN2 ; and done
H_MDIN1:
LD B,00H ; HBIOS IN function
LD C,0 ; console is unit 0 by fiat
RST 08 ; HBIOS call
LD A,E ; byte received to A
H_MDIN2:
POP HL
POP DE
POP BC
RET
;
;-----------------------------------------------------------------------
;
; Test for character ready to receive, Z = ready
; Error code returned in A register
; *** Error code does not seem to be used ***
;
H_RCVRDY:
PUSH BC
PUSH DE
PUSH HL
LD B,02H ; HBIOS IST function
LD C,0 ; console is unit 0 by fiat
RST 08 ; HBIOS call, A := bytes pending
SUB 1 ; CF set IFF zero
RL A ; CF to bit 0 of A
AND 01H ; set Z flag as needed
LD A,0 ; report no line errors
POP HL
POP DE
POP BC
RET
;
;-----------------------------------------------------------------------
;
; Test for ready to send a character, Z = ready
;
H_SNDRDY:
PUSH BC
PUSH DE
PUSH HL
LD B,03H ; HBIOS OST function
LD C,0 ; console is unit 0 by fiat
RST 08 ; HBIOS call, A := xmit buf bytes avail
SUB 1 ; CF set IFF zero
RL A ; CF to bit 0 of A
AND 01H ; set Z flag as needed
POP HL
POP DE
POP BC
RET
;
;-----------------------------------------------------------------------
;
; Report baud rate (index into SPTBL returned in register A)
;
H_SPEED:
LD A,8 ; arbitrarily return 9600 baud
RET
;
;
;=======================================================================
;=======================================================================
;
; WILL SOWERBUTTS ECB USB-FIFO
;
;=======================================================================
;=======================================================================
;
UF_BASE EQU 0CH
UF_DATA EQU (UF_BASE+0)
UF_STATUS EQU (UF_BASE+1)
UF_SEND_IMM EQU (UF_BASE+2)
;
; Following jump table is dynamically patched over initial jump
; table at program startup. See MINIT above. Note that only a
; subset of the jump table is overlaid (SENDR to SPEED).
;
UF_JPTBL:
JP UF_SENDR ; send character (via pop psw)
JP UF_CAROK ; test for carrier
JP UF_MDIN ; receive data byte
JP UF_GETCHR ; get character from modem
JP UF_RCVRDY ; check receive ready
JP UF_SNDRDY ; check send ready
JP UF_SPEED ; get speed value for file transfer time
;
;-----------------------------------------------------------------------
;
; USB-FIFO initialization
;
UF_INIT:
LD HL,UF_JPTBL
LD DE,UF_LBL
JP MINIT_RET
;
;-----------------------------------------------------------------------
;
; Send character on top of stack
;
UF_SENDR:
POP AF ; get character to send from stack
OUT (UF_DATA),A ; WRITE TO FIFO
OUT (UF_SEND_IMM),A ; SEND IMMEDIATE
RET
;
;-----------------------------------------------------------------------
;
; Test and report carrier status, Z set if carrier present
;
UF_CAROK:
XOR A ; not used, always indicate present
RET
;
;-----------------------------------------------------------------------
;
; Get a character (assume character ready has already been tested)
;
; This routine must NOT block.
;
UF_MDIN:
UF_GETCHR:
IN A,(UF_DATA) ; GET CHAR
RET
;
;-----------------------------------------------------------------------
;
; Test for character ready to receive, Z = ready
; Error code returned in A register
; *** Error code does not seem to be used ***
;
UF_RCVRDY:
IN A,(UF_STATUS) ; B7=0 IF CHAR AVAIL, =1 IF NO CHAR.
RLCA ; B0=0 IF CHAR AVAIL, =1 IF NO CHAR.
AND 00000001B ; A=0, ZF=1 IF NO CHAR, A=1, ZF=0 IF CHAR AVAIL,
LD A,0
RET
;
;-----------------------------------------------------------------------
;
; Test for ready to send a character, Z = ready
;
UF_SNDRDY:
IN A,(UF_STATUS) ; Bit 0=0 IF SPACE AVAIL, =1 IF FULL
AND 00000001B ; A=0, ZF=1 IF SPACE AVAIL, A=1, ZF=0 IF FULL.
RET
;
;-----------------------------------------------------------------------
;
; Report baud rate (index into SPTBL returned in register A)
;
UF_SPEED:
LD A,8 ; arbitrarily return 9600 baud
RET
;
END

331
Source/Apps/XM/xmuf.180 Normal file
View File

@@ -0,0 +1,331 @@
;=======================================================================
;
; XMUF.Z80 - XMODEMXX PATCH FILE FOR ECB USB-FIFO
;
; Phil Summers - difficultylevelhigh@gmail.com
; Updated: 2019-08-16
;
;=======================================================================
;
; Overlay file is Z80, build with M80:
; M80 =XMHB
; L80 XMHB,XMHB/N/X/E
;
.Z80
ASEG
;
NO EQU 0
YES EQU NOT NO
;
ERRDET EQU NO ; detect parity/framing/overrun errs
;
BASE EQU 100H ; start of cp/m normal program area
;
BDOS EQU 00005H ; BDOS function dispatch vector
;
;=======================================================================
;
; Jump table: The jump table must be in exactly the same sequence as the
; one in XMODEM. Note the ORG of 103H - This jump table has no jump to
; 'BEGIN'.
;
ORG BASE + 3 ;start after 'JMP BEGIN'
;
JP CONOUT ;must be 00000h if not used, see below
JP MINIT ;initialization routine (if needed)
JP UNINIT ;undo whatever 'MINIT' did (or return)
JPTBL:
JP SENDR ;send character (via pop psw)
JP CAROK ;test for carrier
JP MDIN ;receive data byte
JP GETCHR ;get character from modem
JP RCVRDY ;check receive ready
JP SNDRDY ;check send ready
JP SPEED ;get speed value for file transfer time
JP EXTRA1 ;extra for custom routine
JP EXTRA2 ;extra for custom routine
JP EXTRA3 ;extra for custom routine
;
;-----------------------------------------------------------------------
;
; Output character to console
;
CONOUT EQU 0 ; not used
;
;-----------------------------------------------------------------------
;
; Initialize modem
;
; This procedure has been usurped to dynamically detect the type
; of system we are running on and install the *real* jump table
; entries as appropriate.
;
MINIT:
;
; Announce
LD DE,RBC ; RetroBrew Computers
LD C,9 ; BDOS string display function
CALL BDOS ; Do it
;
; Identify BIOS (RomWBW HBIOS or UNA UBIOS)
CALL IDBIO ; 1=HBIOS, 2=UBIOS
LD (BIOID),A ; Save it
DEC A ; Test for HBIOS
JR Z,HINIT ; Do HBIOS setup
DEC A ; Test for UBIOS
JR Z,UINIT ; Do UBIOS setup
;
; Neither UNA nor RomWBW
LD DE,BIOERR ; BIOS error message
LD C,9 ; BDOS string display function
CALL BDOS ; Do it
JP 0 ; Bail out!
;
HINIT:
;
; Display RomWBW notification string
LD DE,HBTAG ; BIOS notification string
LD C,9 ; BDOS string display function
CALL BDOS ; Do it
;
; Get platform id from RomWBW HBIOS and save it
LD B,0F1H ; HBIOS VER function 0xF1
LD C,0 ; Required reserved value
RST 08 ; Do it, L := Platform ID
LD A,L ; Move to A
LD (PLTID),A ; Save it
;
; Get CPU speed from RomWBW HBIOS and save it
LD B,0F8H ; HBIOS SYSGET function 0xF8
LD C,0F0H ; CPUINFO subfunction 0xF0
RST 08 ; Do it, L := CPU speed in MHz
LD A,L ; Move it to A
LD (CPUSPD),A ; Save it
JR MINIT1 ; Continue general initialization
;
UINIT:
;
; Display UNA notification string
LD DE,UBTAG ; BIOS notification string
LD C,9 ; BDOS string display function
CALL BDOS ; Do it
;
; Get CPU speed from UNA and save it
LD C,0F8H ; UNA BIOS Get PHI function
RST 08 ; Returns speed in Hz in DE:HL
LD B,4 ; Divide MHz in DE:HL by 100000H
UINIT1:
SRL D ; ... to get approx CPU speed in
RR E ; ...MHz. Throw away HL, and
DJNZ UINIT1 ; ...right shift DE by 4.
INC E ; Fix up for value truncation
LD A,E ; Put in A
LD (CPUSPD),A ; Save it
JR MINIT1 ; Continue general initialization
;
MINIT1:
LD HL,1250 ; Smaller receive loop timeout scalar
LD (RCVSCL),HL ; ... to compensate for BIOS overhead
LD HL,UF_JPTBL ; HBIOS jump table address
LD DE,USB_FIFO ; HBIOS console notification string
JR MINIT3 ; Complete the initialization
;
MINIT3:
PUSH HL ; Save HL
; Display port notification string
LD C,9 ; BDOS string display function
CALL BDOS ; Do it
;
; Newline
LD C,9 ; BDOS string display function
LD DE,CRLF ; Newline
CALL BDOS ; Do it
;
; Copy real vectors into active jump table
POP HL ; Recover HL
LD DE,JPTBL ; Real jump table is destination
LD BC,7 * 3 ; Copy 7 3-byte entries
LDIR ; Do the copy
;
; Return with CPU speed in A
LD A,(CPUSPD) ; A := CPU speed in MHz
LD HL,(RCVSCL) ; HL := receive scalar
RET ; and return
;
; Identify active BIOS. RomWBW HBIOS=1, UNA UBIOS=2, else 0
;
IDBIO:
;
; Check for UNA (UBIOS)
LD A,(0FFFDH) ; fixed location of UNA API vector
CP 0C3H ; jp instruction?
JR NZ,IDBIO1 ; if not, not UNA
LD HL,(0FFFEH) ; get jp address
LD A,(HL) ; get byte at target address
CP 0FDH ; first byte of UNA push ix instruction
JR NZ,IDBIO1 ; if not, not UNA
INC HL ; point to next byte
LD A,(HL) ; get next byte
CP 0E5H ; second byte of UNA push ix instruction
JR NZ,IDBIO1 ; if not, not UNA, check others
LD A,2 ; UNA BIOS id = 2
RET ; and done
;
IDBIO1:
; Check for RomWBW (HBIOS)
LD HL,(0FFFEH) ; HL := HBIOS ident location
LD A,'W' ; First byte of ident
CP (HL) ; Compare
JR NZ,IDBIO2 ; Not HBIOS
INC HL ; Next byte of ident
LD A,~'W' ; Second byte of ident
CP (HL) ; Compare
JR NZ,IDBIO2 ; Not HBIOS
LD A,1 ; HBIOS BIOS id = 1
RET ; and done
;
IDBIO2:
; No idea what this is
XOR A ; Setup return value of 0
RET ; and done
;
;
;
BIOID DB 0 ; BIOS ID, 1=HBIOS, 2=UBIOS
PLTID DB 0 ; Platform ID
CPUSPD DB 10 ; CPU speed in MHz
RCVSCL DW 2800 ; RECV loop timeout scalar
;
RBC DB "RBC, 16-Aug-2018$"
;
USB_FIFO DB ", USB-FIFO$"
;
UBTAG DB " [UNA]$"
HBTAG DB " [WBW]$"
;
CRLF DB 13, 10, "$"
;
BIOERR DB 13, 10, 13, 10, "++ Unknown BIOS ++", 13, 10, "$"
;
;-----------------------------------------------------------------------
;
; Uninitialize modem
;
UNINIT:
LD A,(BIOID)
CP 1 ; Is HBIOS?
RET NZ ; If not, just return
; Reset character device 0
LD B,04H ; HBIOS CIOINIT function 0x04
LD C,0 ; Unit = 0
LD DE,-1 ; Reset w/ current settings
RST 08 ; Do it
RET ; not initialized, so no 'UN-INITIALIZE'
;
;-----------------------------------------------------------------------
;
; The following are all dummy routines that are unused because MINIT
; dynamically installs the real jump table.
;
SENDR:
CAROK:
MDIN:
GETCHR:
RCVRDY:
SNDRDY:
SPEED:
EXTRA1:
EXTRA2:
EXTRA3:
RET
;
;=======================================================================
;=======================================================================
;
; WILL SOWERBUTTS ECB USB-FIFO
;
;=======================================================================
;=======================================================================
;
FIFO_BASE EQU 0CH
FIFO_DATA EQU (FIFO_BASE+0)
FIFO_STATUS EQU (FIFO_BASE+1)
FIFO_SEND_IMM EQU (FIFO_BASE+2)
;
; Following jump table is dynamically patched over initial jump
; table at program startup. See MINIT above. Note that only a
; subset of the jump table is overlaid (SENDR to SPEED).
;
UF_JPTBL:
JP UF_SENDR ;send character (via pop psw)
JP UF_CAROK ;test for carrier
JP UF_MDIN ;receive data byte
JP UF_GETCHR ;get character from modem
JP UF_RCVRDY ;check receive ready
JP UF_SNDRDY ;check send ready
JP UF_SPEED ;get speed value for file transfer time
;
;-----------------------------------------------------------------------
;
; Send character on top of stack
;
UF_SENDR:
POP AF ; get character to send from stack
OUT (FIFO_DATA),A ; WRITE TO FIFO
OUT (FIFO_SEND_IMM),A ; SEND IMMEDIATE
RET
;
;-----------------------------------------------------------------------
;
; Test and report carrier status, Z set if carrier present
;
UF_CAROK:
XOR A ; not used, always indicate present
RET
;
;-----------------------------------------------------------------------
;
; Get a character (assume character ready has already been tested)
;
; This routine must NOT block.
;
UF_MDIN:
UF_GETCHR:
IN A,(FIFO_DATA) ; GET CHAR
RET
;
;-----------------------------------------------------------------------
;
; Test for character ready to receive, Z = ready
; Error code returned in A register
; *** Error code does not seem to be used ***
;
UF_RCVRDY:
IN A,(FIFO_STATUS) ; B7=0 IF CHAR AVAIL, =1 IF NO CHAR.
RLCA ; B0=0 IF CHAR AVAIL, =1 IF NO CHAR.
AND 00000001B ; A=0, ZF=1 IF NO CHAR, A=1, ZF=0 IF CHAR AVAIL,
LD A,0
RET
;
;-----------------------------------------------------------------------
;
; Test for ready to send a character, Z = ready
;
UF_SNDRDY:
IN A,(FIFO_STATUS) ; Bit 0=0 IF SPACE AVAIL, =1 IF FULL
AND 00000001B ; A=0, ZF=1 IF SPACE AVAIL, A=1, ZF=0 IF FULL.
RET
;
;-----------------------------------------------------------------------
;
; Report baud rate (index into SPTBL returned in register A)
;
UF_SPEED:
LD A,8 ; arbitrarily return 9600 baud
RET
;
END

View File

@@ -1,361 +0,0 @@
;=======================================================================
;
; XMHB.Z80 - XMODEMXX PATCH FILE FOR ROMWBW HBIOS
;
; Wayne Warthen - wwarthen@gmail.com
; Updated: 2017-08-09
;
;=======================================================================
;
; Overlay file is Z80, build with M80:
; M80 =XMHB
; L80 XMHB,XMHB/N/X/E
;
.Z80
ASEG
;
NO EQU 0
YES EQU NOT NO
;
ERRDET EQU NO ; detect parity/framing/overrun errs
;
BASE EQU 100H ; start of cp/m normal program area
;
;=======================================================================
;
; Jump table: The jump table must be in exactly the same sequence as the
; one in XMODEM. Note the ORG of 103H - This jump table has no jump to
; 'BEGIN'.
;
ORG BASE + 3 ;start after 'JMP BEGIN'
;
JP CONOUT ;must be 00000h if not used, see below
JP MINIT ;initialization routine (if needed)
JP UNINIT ;undo whatever 'MINIT' did (or return)
JPTBL:
JP SENDR ;send character (via pop psw)
JP CAROK ;test for carrier
JP MDIN ;receive data byte
JP GETCHR ;get character from modem
JP RCVRDY ;check receive ready
JP SNDRDY ;check send ready
JP SPEED ;get speed value for file transfer time
JP EXTRA1 ;extra for custom routine
JP EXTRA2 ;extra for custom routine
JP EXTRA3 ;extra for custom routine
;
;-----------------------------------------------------------------------
;
; Output character to console
;
CONOUT EQU 0 ; not used
;
;-----------------------------------------------------------------------
;
; Initialize modem
;
; This procedure has been usurped to dynamically detect the type
; of system we are running on and install the *real* jump table
; entries as appropriate.
;
MINIT:
; Get system type
LD D,2
LD E,2
MLT DE
BIT 2,E ; bit 2 wil be set if mlt happend
LD HL,U_JPTBL ; assume Z80 (UART)
LD A,10 ; assume 10MHz CPU in case of Z80
JR Z,MINIT2 ; yes, Z80, do vector copy
LD HL,A_JPTBL ; otherwise Z180 (ASCI)
LD A,20 ; assume 20MHz CPU in case of Z180
;
MINIT2:
; Copy real vectors into active jump table
LD DE,JPTBL
LD BC,7 * 3 ; copy 7 3-byte entries
LDIR
;
; Check for UNA (UBIOS)
LD A,(0FFFDH) ; fixed location of UNA API vector
CP 0C3H ; jp instruction?
JR NZ,MINIT3 ; if not, not UNA
LD HL,(0FFFEH) ; get jp address
LD A,(HL) ; get byte at target address
CP 0FDH ; first byte of UNA push ix instruction
JR NZ,MINIT3 ; if not, not UNA
INC HL ; point to next byte
LD A,(HL) ; get next byte
CP 0E5H ; second byte of UNA push ix instruction
JR NZ,MINIT3 ; if not, not UNA
;
; Get CPU speed from UNA
LD C,0F8H ; UNA BIOS Get PHI function
RST 08 ; Returns speed in Hz in DE:HL
LD A,E ; Hack to get approx speed in MHz
SRL A ; ... by dividing by 1,048,576
SRL A ; ...
SRL A ; ...
SRL A ; ...
INC A ; Fix up for value truncation
RET ; done
;
MINIT3:
; Not UNA, use HBIOS for CPU speed lookup
LD B,0F8H ; HBIOS SYSGET function 0xF8
LD C,0F0H ; CPUINFO subfunction 0xF0
RST 08 ; do it, L := CPU speed in MHz
LD A,L ; move it to A
RET ; done
;
;-----------------------------------------------------------------------
;
; Uninitialize modem
;
UNINIT:
RET ; not initialized, so no 'UN-INITIALIZE'
;
;-----------------------------------------------------------------------
;
; The following are all dummy routines that are unused because MINIT
; dynamically installs the real jump table.
;
SENDR:
CAROK:
MDIN:
GETCHR:
RCVRDY:
SNDRDY:
SPEED:
EXTRA1:
EXTRA2:
EXTRA3:
RET
;
;=======================================================================
;=======================================================================
;
; Standard RBC Projects 8250-like UART port @ 68H
;
; Will be used for all RBC Z80 systems.
;
;=======================================================================
;=======================================================================
;
; UART port constants
;
U_BASE EQU 68H ; UART base port
U_DATP EQU U_BASE + 0 ; data in port
U_DATO EQU U_BASE + 0 ; data out port
U_CTLP EQU U_BASE + 5 ; control/status port
U_SNDB EQU 20H ; bit to test for send ready
U_SNDR EQU 20H ; value when ready to send
U_RCVB EQU 01H ; bit to test for receive ready
U_RCVR EQU 01H ; value when ready to receive
U_PARE EQU 04H ; bit for parity error
U_OVRE EQU 02H ; bit for overrun error
U_FRME EQU 08H ; bit for framing error
;
; Following jump table is dynamically patched into real jump
; table at program startup. See MINIT above. Note that only a
; subset of the jump table is overlaid (SENDR to SPEED).
;
U_JPTBL:
JP U_SENDR ; send character (via pop psw)
JP U_CAROK ; test for carrier
JP U_MDIN ; receive data byte
JP U_GETCHR ; get character from modem
JP U_RCVRDY ; check receive ready
JP U_SNDRDY ; check send ready
JP U_SPEED ; get speed value for file transfer time
;
;-----------------------------------------------------------------------
;
; Send character on top of stack
;
U_SENDR:
POP AF ; get character to send from stack
OUT (U_DATO),A ; send to port
RET
;
;-----------------------------------------------------------------------
;
; Test and rep;ort carrier status, Z set if carrier present
;
U_CAROK:
XOR A ; not used, always indicate present
RET
;
;-----------------------------------------------------------------------
;
; Get a character (assume character ready has already been tested)
;
U_MDIN:
U_GETCHR:
IN A,(U_DATP) ; read character from port
RET
;
;-----------------------------------------------------------------------
;
; Test for character ready to receive, Z = ready
; Error code returned in A register
; *** Error code does not seem to be used ***
;
U_RCVRDY:
IN A,(U_CTLP) ; get modem status
;
IF ERRDET
;
; With error detection (slower)
PUSH BC ; save scratch register
PUSH AF ; save full status on stack
AND U_FRME | U_OVRE | U_PARE ; isolate line err bits
LD B,A ; save err status in B
POP AF ; get full status back
AND U_RCVB ; isolate ready bit
CP U_RCVR ; test it (set flags)
LD A,B ; get the error code back
POP BC ; restore scratch register
;
ELSE
;
; No error detection (faster)
AND U_RCVB ; isolate ready bit
CP U_RCVR ; test it (set flags)
LD A,0 ; report no line errors
;
ENDIF
;
RET
;
;-----------------------------------------------------------------------
;
; Test for ready to send a character, Z = ready
;
U_SNDRDY:
IN A,(U_CTLP) ; get status
AND U_SNDB ; isolate transmit ready bit
CP U_SNDR ; test for ready value
RET
;
;-----------------------------------------------------------------------
;
; Report baud rate (index into SPTBL returned in regsiter A)
;
U_SPEED:
LD A,8 ; arbitrarily return 9600 baud
RET
;
;=======================================================================
;=======================================================================
;
; Standard RBC Projects Z180 primary ASCI port
;
; Will be used for all RBC Z180 systems.
;
;=======================================================================
;=======================================================================
;
; ASCI port constants
;
A_DATP EQU 48H ;Z180 TSR - ASCI receive data port
A_DATO EQU 46H ;Z180 TDR - ASCI transmit data port
A_CTLP EQU 44H ;Z180 STAT - ASCI status port
A_CTL2 EQU 40H ;Z180 CNTLA - ASCI control port
A_SNDB EQU 02H ;Z180 STAT:TDRE - xmit data reg empty bit
A_SNDR EQU 02H ;Z180 STAT:TDRE - xmit data reg empty value
A_RCVB EQU 80H ;Z180 STAT:RDRF - rcv data reg full bit
A_RCVR EQU 80H ;Z180 STAT:RDRF - rcv data reg full value
A_PARE EQU 20H ;Z180 STAT:PE - parity error bit
A_OVRE EQU 40H ;Z180 STAT:OVRN - overrun error bit
A_FRME EQU 10H ;Z180 STAT:FE - framing error bit
;
; Following jump table is dynamically patched over initial jump
; table at program startup. See MINIT above. Note that only a
; subset of the jump table is overlaid (SENDR to SPEED).
;
A_JPTBL:
JP A_SENDR ;send character (via pop psw)
JP A_CAROK ;test for carrier
JP A_MDIN ;receive data byte
JP A_GETCHR ;get character from modem
JP A_RCVRDY ;check receive ready
JP A_SNDRDY ;check send ready
JP A_SPEED ;get speed value for file transfer time
;
;-----------------------------------------------------------------------
;
; Send character on top of stack
;
A_SENDR:
POP AF ; get character to send from stack
OUT0 (A_DATO),A ; send to port
RET
;
;-----------------------------------------------------------------------
;
; Test and rep;ort carrier status, Z set if carrier present
;
A_CAROK:
XOR A ; not used, always indicate present
RET
;
;-----------------------------------------------------------------------
;
; Get a character (assume character ready has already been tested)
;
A_MDIN:
A_GETCHR:
IN0 A,(A_DATP) ; read character from port
RET
;
;-----------------------------------------------------------------------
;
; Test for character ready to receive, Z = ready
; Error code returned in A register
; *** Error code does not seem to be used ***
;
A_RCVRDY:
IN0 A,(A_CTLP) ; get modem status
PUSH BC ; save scratch register
PUSH AF ; save full status on stack
AND A_FRME | A_OVRE | A_PARE ; isolate line err bits
LD B,A ; save err status in B
; Z180 ASCI ports will stall if there are errors.
; Error bits are NOT cleared by merely reading
; the status register. Below, bit 3 of ASCI
; control register is written with a zero to
; clear error(s) if needed.
JP Z,A_RCVRDY2 ; if no errs, continue
IN0 A,(A_CTL2) ; get current control register
AND 0F7H ; force err reset bit to zero
OUT0 (A_CTL2),A ; write control register
A_RCVRDY2:
POP AF ; get full status back
AND A_RCVB ; isolate ready bit
CP A_RCVR ; test it (set flags)
LD A,B ; get the error code back
POP BC ; restore scratch register
RET
;
;-----------------------------------------------------------------------
;
; Test for ready to send a character, Z = ready
;
A_SNDRDY:
IN A,(A_CTLP) ; get status
AND A_SNDB ; isolate transmit ready bit
CP A_SNDR ; test for ready value
RET
;
;-----------------------------------------------------------------------
;
; Report baud rate (index into SPTBL returned in regsiter A)
;
A_SPEED:
LD A,8 ; arbitrarily return 9600 baud
RET
;
END

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