Browse Source

updates to dev

pull/191/head
Phillip Stevens 5 years ago
parent
commit
0d26818e81
  1. 8
      .gitignore
  2. 2
      Binary/Apps/Makefile
  3. 9
      Binary/Apps/ReadMe.txt
  4. 11
      Binary/CPM3/Clean.cmd
  5. 7
      Binary/CPM3/Makefile
  6. 17
      Binary/CPM3/ReadMe.txt
  7. 5
      Binary/Clean.cmd
  8. 6
      Binary/DiskList.txt
  9. 4
      Binary/Makefile
  10. 15
      Binary/ReadMe.txt
  11. 108
      Binary/RomList.txt
  12. 10
      Binary/ZPM3/Clean.cmd
  13. 7
      Binary/ZPM3/Makefile
  14. 17
      Binary/ZPM3/ReadMe.txt
  15. 45
      Doc/ChangeLog.txt
  16. 385
      Doc/Contrib/Flash4.txt
  17. 8
      Doc/FDU.txt
  18. BIN
      Doc/Hard Disk Anatomy.pdf
  19. BIN
      Doc/RomWBW Applications.pdf
  20. BIN
      Doc/RomWBW Architecture.pdf
  21. BIN
      Doc/RomWBW Disk Catalog.pdf
  22. BIN
      Doc/RomWBW Getting Started.pdf
  23. BIN
      Doc/SIO+CTC Baud Rate Options.pdf
  24. 19
      Makefile
  25. 154
      ReadMe.md
  26. 151
      ReadMe.txt
  27. 112
      Readme.unix
  28. 47
      Source/Apps/Assign.asm
  29. 44
      Source/Apps/FDU/FDU.asm
  30. 8
      Source/Apps/FDU/FDU.txt
  31. 29
      Source/Apps/RTC.asm
  32. 8
      Source/Apps/Survey.asm
  33. 13
      Source/Apps/SysCopy.asm
  34. 12
      Source/Apps/Timer.asm
  35. 6
      Source/Apps/Tune/Build.cmd
  36. 14
      Source/Apps/Tune/Makefile
  37. 719
      Source/Apps/Tune/Tune.asm
  38. 86
      Source/Apps/Tune/cli.inc
  39. 4
      Source/Apps/Tune/cpm.inc
  40. 15
      Source/Apps/Tune/hbios.inc
  41. 175
      Source/Apps/Tune/printing.inc
  42. 39
      Source/Apps/Tune/strings.inc
  43. 60
      Source/Apps/Tune/timing.inc
  44. 4
      Source/Apps/Tune/tune.inc
  45. 10
      Source/Apps/XM/Build.cmd
  46. 11
      Source/Apps/XM/Makefile
  47. 77
      Source/Apps/XM/XModem Xfer Anomaly.txt
  48. 97
      Source/Apps/XM/xmdm125.asm
  49. 938
      Source/Apps/XM/xmhb.180
  50. 920
      Source/Apps/XM/xmhb_old.180
  51. 156
      Source/BPBIOS/diskdefs
  52. 4
      Source/BuildZRC.cmd
  53. 969
      Source/CBIOS/cbios.asm
  54. 2
      Source/CBIOS/config.asm
  55. 12
      Source/CBIOS/util.asm
  56. 25
      Source/CPM3/Build.cmd
  57. 31
      Source/CPM3/Makefile
  58. 5
      Source/CPM3/bioskrnl.asm
  59. 784
      Source/CPM3/biosldr.z80
  60. 98
      Source/CPM3/boot.z80
  61. 630
      Source/CPM3/diskio.z80
  62. 8
      Source/CPM3/genbnk.dat
  63. 6
      Source/CPM3/loader.asm
  64. 3
      Source/CPM3/move.z80
  65. 3
      Source/CPM3/optzpm.lib
  66. 115
      Source/CPM3/util.z80
  67. 31
      Source/Doc/Applications.md
  68. 530
      Source/Doc/Architecture.md
  69. 830
      Source/Doc/Catalog.md
  70. 152
      Source/Doc/GettingStarted.md
  71. BIN
      Source/Doc/Graphics/Hard Disk Anatomy.vsd
  72. BIN
      Source/Doc/SIO+CTC Baud Rate Options.xlsx
  73. 4
      Source/Forth/Build.cmd
  74. 38
      Source/Forth/camel80.azm
  75. 73
      Source/Forth/camel80h.azm
  76. 32
      Source/HBIOS/API.txt
  77. 9
      Source/HBIOS/Build.ps1
  78. 14
      Source/HBIOS/Build.sh
  79. 2
      Source/HBIOS/Config/DYNO_std.asm
  80. 6
      Source/HBIOS/Config/EZZ80_std.asm
  81. 86
      Source/HBIOS/Config/EZZ80_tz80.asm
  82. 4
      Source/HBIOS/Config/MK4_std.asm
  83. 2
      Source/HBIOS/Config/N8_std.asm
  84. 13
      Source/HBIOS/Config/RCZ180_ext.asm
  85. 13
      Source/HBIOS/Config/RCZ180_nat.asm
  86. 48
      Source/HBIOS/Config/RCZ280_ext.asm
  87. 52
      Source/HBIOS/Config/RCZ280_nat.asm
  88. 36
      Source/HBIOS/Config/RCZ80_duart.asm
  89. 14
      Source/HBIOS/Config/RCZ80_kio.asm
  90. 10
      Source/HBIOS/Config/RCZ80_mt.asm
  91. 11
      Source/HBIOS/Config/RCZ80_std.asm
  92. 49
      Source/HBIOS/Config/RCZ80_zrc.asm
  93. 65
      Source/HBIOS/Config/SBC_max.asm
  94. 2
      Source/HBIOS/Config/SBC_simh.asm
  95. 4
      Source/HBIOS/Config/SBC_std.asm
  96. 12
      Source/HBIOS/Config/SCZ180_126.asm
  97. 14
      Source/HBIOS/Config/SCZ180_130.asm
  98. 10
      Source/HBIOS/Config/SCZ180_131.asm
  99. 56
      Source/HBIOS/Config/SCZ180_140.asm
  100. 2
      Source/HBIOS/Config/UNA_std.asm

8
.gitignore

@ -49,6 +49,9 @@ Source/Images/blankhd
Source/Prop/Spin/ParPortProp.list
Source/Prop/Spin/PropIO.list
Source/Prop/Spin/PropIO2.list
Source/Prop/ParPortProp.list
Source/Prop/PropIO.list
Source/Prop/PropIO2.list
Source/ZPM3/bnkbios3.spr
Source/ZPM3/gencpm.com
Source/ZPM3/gencpm.com
@ -79,6 +82,7 @@ Tools/unix/zx/zx
!Source/BPBIOS/Z34RCP11/cledsave.com
!Source/Fonts
!Source/Images/**/*.[Cc][Oo][Mm]
!Source/Images/hdnew_prefix.bin
!Source/RomDsk/**/*.[Cc][Oo][Mm]
!Source/UBIOS/FSFAT.BIN
!Source/UBIOS/UNA-BIOS.BIN
@ -86,6 +90,7 @@ Tools/unix/zx/zx
!Source/ZCPR-DJ/*.[Cc][Oo][Mm]
!Source/ZPM3/*.[Cc][Oo][Mm]
!Source/ZSDOS/*.[Cc][Oo][Mm]
!Source/ZRC/*.bin
!Tools/cpm/bin
!Tools/unix/zx
!Tools/zx
@ -94,3 +99,6 @@ Source/ZPM3/gencpm.com
Source/ZPM3/startzpm.com
Source/ZPM3/zccp.com
Source/ZPM3/zpmldr.com
Source/ZPM3/genbnk.dat
Source/ZSDOS/zsdos.err

2
Binary/Apps/Makefile

@ -7,4 +7,4 @@ all::
mkdir -p Tunes
clobber::
rm -f *.bin *.com *.img *.rom *.pdf *.log *.eeprom *.COM *.BIN Tunes/*.mym Tunes/*.pt?
@rm -f *.bin *.com *.img *.rom *.pdf *.log *.eeprom *.COM *.BIN Tunes/*.mym Tunes/*.pt?

9
Binary/Apps/ReadMe.txt

@ -11,4 +11,11 @@ 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.
files that can be played by the TUNE application.
All of these files are already included in the pre-built boot disk
images. They are also included on the ROM disk except for
FAT.COM, TUNE.COM, and the sample tune files in the Tunes directory.
If you upgrade your ROM to a new version, you should also copy
these files over to any hard disk images you are using.

11
Binary/CPM3/Clean.cmd

@ -0,0 +1,11 @@
@echo off
setlocal
if exist *.spr del *.spr
if exist *.com del *.com
if exist *.sys del *.sys
if exist *.pat del *.pat
if exist *.dat del *.dat
if exist *.1st del *.1st
if exist *.spr del *.spr
if exist *.pat del *.pat

7
Binary/CPM3/Makefile

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

17
Binary/CPM3/ReadMe.txt

@ -0,0 +1,17 @@
***********************************************************************
*** ***
*** R o m W B W ***
*** ***
*** Z80/Z180 System Software ***
*** ***
***********************************************************************
This directory contains the CP/M 3 system files for the RomWBW CP/M 3
adaptation. All of these files are already included on the CP/M 3
boot disk images. However if you are creating a CP/M 3 boot disk
manually, you should copy all of these files to the boot disk.
These files should also be copied to any CP/M 3 boot disks on your
system when you upgrade your ROM firmware. Some of these files
*must* match the version of the RomWBW firmware you are using for
proper operation of your system.

5
Binary/Clean.cmd

@ -2,11 +2,14 @@
setlocal
if exist *.bin del *.bin
if exist *.dat del *.dat
if exist *.com del *.com
if exist *.img del *.img
if exist *.rom del *.rom
if exist *.upd del *.upd
if exist *.pdf del *.pdf
if exist *.log del *.log
if exist *.eeprom del *.eeprom
setlocal & cd Apps && call Clean || exit /b 1 & endlocal
setlocal & cd CPM3 && call Clean || exit /b 1 & endlocal
setlocal & cd ZPM3 && call Clean || exit /b 1 & endlocal

6
Binary/DiskList.txt

@ -17,6 +17,12 @@ a floppy or hard/CF/SD disk. You can use your modern computer
media. The disk media will then be ready to use in your RomWBW
System.
WARNING: The hdnew_*.img disk images are part of a new disk
format that is a work in progress. Do not use these disk
images without knowing exactly what you are doing! The
hd_*.img disk images continue to be the images you should
be using under normal circumstances.
A description of the disk images is provided later in this file.
For more information on the creatioin of these images including
instructions for customizing them or creating your own, refer to

4
Binary/Makefile

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

15
Binary/ReadMe.txt

@ -42,6 +42,15 @@ MK4_custom.rom will be added to this directory.
Documentation of the pre-built ROM Images is contained in the
RomList.txt file in this directory.
ROM Firmware Update Images (<plt>_<cfg>.upd)
-------------------------------------
The files with a ".upd" extension are binary images identical to the
.rom files, but they only have the first 128K bytes. The first 128K
is the system image without the ROM disk contents. These files can be
used to update the system image without modifying the ROM disk
contents. Refer to the Getting Started document for more information.
ROM Executable Images (<plt>_<cfg>.com)
---------------------------------------
@ -92,6 +101,12 @@ 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.
WARNING: The hdnew_*.img disk images are part of a new disk
format that is a work in progress. Do not use these disk
images without knowing exactly what you are doing! The
hd_*.img disk images continue to be the images you should
be using under normal circumstances.
Documentation of the pre-built disk images is contained in the
DiskList.txt file in this directory.

108
Binary/RomList.txt

@ -34,7 +34,7 @@ image to use for each platform:
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
SC-series SC126, SC130, SC131
Easy Z80 EZZ180_std.rom
Dyno DYNO_std.rom
@ -52,11 +52,6 @@ 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.
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
@ -66,10 +61,10 @@ All of the standard ROM Images are configured for:
* 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.
automatically assigned at least 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
------------------------
@ -153,36 +148,35 @@ MK4 (MK4_std.rom):
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.
- Auto detects Serial I/O Module (ACIA), Dual Serial
Module (SIO/2), and EP Dual UART.
- 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
order of priority is UART, SIO, then ACIA.
- Baud rate is determined by hardware, but normally 115200.
- Auto support for RC2014 Compact Flash Module
- Auto 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
- Support for J.B. Lang TMS9918 video card may be enabled in config
- Support for PropIO V2 may be enabled in config (PRPENABLE). If
enabled, will auto-detect and install associated
video, keyboard and SD Card support if present.
RCZ80 w/ KIO (RCZ80_kio.rom):
- Assumes CPU oscillator of 7.3728 MHz
- Requires 512K RAM/ROM module
- Same as RCZ80_std
- 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
- SIO ports provided by KIO
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
- Auto support for RC2014 Compact Flash Module
- Auto 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
- Support for J.B. Lang TMS9918 video card 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
@ -190,25 +184,67 @@ RCZ180 (RCZ180_nat.rom & RCZ180_ext.rom):
addressing of memory, such as the SC119
- RCZ180_ext.rom uses external bank management to access
memory, such as the 512K RAM/ROM module.
- Support for PropIO V2 may be enabled in config (PRPENABLE). If
enabled, will auto-detect and install associated
video, keyboard and SD Card support if present.
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
RCZ280 (RCZ280_ext.rom):
- Assumes CPU oscillator of 24 MHz
- Bus clock will be 6 MHz, so does not match RC2014 standard!!!
- Requires 512K RAM/ROM module
- Auto detects Serial I/O Module (ACIA), Dual Serial
Module (SIO/2), and EP Dual UART.
- Console on whichever serial module is installed,
order of priority is UART, SIO, then ACIA.
- Baud rate is determined by hardware, but normally 115200.
- Auto support for RC2014 Compact Flash Module
- Auto 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
- Support for J.B. Lang TMS9918 video card may be enabled in config
- Support for PropIO V2 may be enabled in config (PRPENABLE). If
enabled, will auto-detect and install associated
video, keyboard and SD Card support if present.
RCZ280 (RCZ280_nat.rom):
- Assumes CPU oscillator of 24 MHz
- Bus clock will be 6 MHz, so does not match RC2014 standard!!!
- Requires native RAM/ROM module (linear memory)
- Interrupt Mode 3 only (no ACIA support possible)
- Auto detects Dual Serial Module (SIO/2), and EP Dual UART.
- Console on whichever serial module is installed,
order of priority is UART, then SIO.
- Baud rate is determined by hardware, but normally 115200.
- Auto support for RC2014 Compact Flash Module
- Auto 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
- Support for J.B. Lang TMS9918 video card may be enabled in config
- Support for PropIO V2 may be enabled in config (PRPENABLE). If
enabled, will auto-detect and install associated
video, keyboard and SD Card support if present.
SCZ180 (SCZ180_126.rom, SCZ180_130.rom, SCZ180_131.rom, SCZ140.rom):
- Same as RCZ180
- Adds auto support for SPI SD Card
- The 3 different variants of SCZ180 are provided to match the
3 corresponding systems (SC126, SC130, and SC131) designed by
Stephen Cousins.
3 corresponding systems (SC126, SC130, SC131, and SC140)
designed by Stephen Cousins.
- Support for PropIO V2 may be enabled in config (PRPENABLE). If
enabled, will auto-detect and install associated
video, keyboard and SD Card support if present.
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
- Auto support for RC2014 Compact Flash Module
- Auto support for RC2014 PPIDE Module
- Support for PropIO V2 may be enabled in config (PRPENABLE). If
enabled, will auto-detect and install associated
video, keyboard and SD Card support if present.
DYNO (DYNO_std.rom):
- Assumes CPU oscillator of 18.432 MHz

10
Binary/ZPM3/Clean.cmd

@ -0,0 +1,10 @@
@echo off
setlocal
if exist *.spr del *.spr
if exist *.com del *.com
if exist *.sys del *.sys
if exist *.pat del *.pat
if exist *.dat del *.dat
if exist *.zpm del *.zpm
if exist *.spr del *.spr

7
Binary/ZPM3/Makefile

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

17
Binary/ZPM3/ReadMe.txt

@ -0,0 +1,17 @@
***********************************************************************
*** ***
*** R o m W B W ***
*** ***
*** Z80/Z180 System Software ***
*** ***
***********************************************************************
This directory contains the ZPM3 system files for the RomWBW ZPM3
adaptation. All of these files are already included on the ZPM3
boot disk images. However if you are creating a CP/M 3 boot disk
manually, you should copy all of these files to the boot disk.
These files should also be copied to any ZPM3 boot disks on your
system when you upgrade your ROM firmware. Some of these files
*must* match the version of the RomWBW firmware you are using for
proper operation of your system.

45
Doc/ChangeLog.txt

@ -1,3 +1,22 @@
Version 3.1.1
-------------
- WBW: Version bumped due to pervasive changes
- WBW: Preliminary hard disk partition support (backward compatible)
- WBW: Change Propeller VGA signal timings to 60Hz refresh
- WBW: Enhanced SYSTEM RESET function to allow a warm start back to boot loader
- C?O: Add DUART driver
- WBW: Early Z280 support (requires 512K RAM/ROM board)
- HCS: ZRC memory manager support
- S?K: Support for Tiny Z80 by Sergey
- E?B: Support for v6 YM/AY sound card
- C?M: Support for RC2014 bus PropIO V2
- W?S: Updated FLASH software to v1.3.4
- PMS: Preliminary support for writing to FLASH ROMs
- PMS: Creation of process to update ROM system area w/o updating ROM disk contents
- PMS: Added "updater.asm" which allows uploading and updating ROM in one step
- WBW: Support for Z280 w/ native memory and interrupt mode 3
- WBW: Support for Z280 UART (interrupt driven only in interrupt mode 3)
Version 3.1
-----------
- WBW: Refactored ROM Loader
@ -6,6 +25,18 @@ Version 3.1
- WBW: Added support dual 16C550 UART on RC2014 platform
- WBW: Made .com images smaller (contain only Z-System now)
- WBW: Support automatic clock hardware detection and fallback
- WBW: Support use of CTC for SIO baud rate divisors
- WBW: Updated IDE and PPIDE drivers to improve old CF Card compatibility
- WBW: Support TIMER mode in CTC driver
- DEN: Added sound driver support
- DEN: Added SN76489 sound chip driver
- M?O: RomWBW Disk Catalog document
- DEN: Updated TMS to optionally trigger SYSTIMER interrupt (TMSTIMENABLE)
- J?M: Updated KERMIT applications with VT100 terminal support
- A?C: Added support for EPFDC
- PMS: Added AY driver with new sound API support
- DEN: Allow immediate autoboot startup
- DEN: Support for floppy device count parameter
Version 3.0.1
-------------
@ -99,7 +130,7 @@ Version 2.9.1
- 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
- S?K: 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
@ -277,7 +308,7 @@ Version 2.0
- DWG: Entire new suite of Apps written in Aztec C
- DWG: BANKER.COM - displays bank identification and version information
- DWG: CPMNAME.COM - displays CBIOS header data and SYSCFG data, names and vaues
- DWG: CHARS.COM - displays ascii map as reference
- DWG: CHARS.COM - displays ascii map as reference
- DWG: CLS.COM - clears screen
- DWG: LABEL.COM - displays and changes drive labels for drives with reserved tracks
- DWG: MAP.COM - like old map command, displays drives and logical unit labels and changes LU values
@ -309,7 +340,7 @@ Version 1.5.1
- WBW: Added ZSDOS clock drivers (see Support\Clock)
- WBW: Overhaul of ZSystem ROM Disk (see Doc\ZSystem.txt)
- WBW: Update PropIO ANSI emulation for compatiblity with ASSIGN
- DWG: Added version tags to all applications, and IDENT program to
- DWG: Added version tags to all applications, and IDENT program to
check version of utilities.
- DWG: Added MULTIFMT program which prepares new media for use by
initializing the metadata and clearing the directory sectors of
@ -319,8 +350,8 @@ Version 1.5.1
- DWG: ANALYSE and HELLO programs removed from ROM due space concerns
- DWG: Additional macro librarties added supporting program identification
(IDENTITY.LIB/ASM) and access to drive metadata (METADATA.LIB/ASM),
and realtime selection of logical units from within new application
programs (LOGICALS.LIB/ASM).
and realtime selection of logical units from within new application
programs (LOGICALS.LIB/ASM).
- DWG: Added TERM_VT52 for VDU compatbility, all apps now compliant
- DGG: Contributed Linux build (see Doc\BuildLinux.txt)
@ -348,7 +379,7 @@ Version 1.4
- DWG: Add various .SUB files used for application maintenance
- DWG: Enhanced utility building .SUB files to only contain libs utilitized
- DWG: Add BUILD.SUB to build all applications and DEVFILES.LBR
- DWG: Add/update RMAC macro libraries used in Apps -
- DWG: Add/update RMAC macro libraries used in Apps -
- DWG: BIOSHDR, STDLIB, STRCPY, STRLEN, CPMBIOS, CPMBDOS, TERMINAL, HARDWARE,
- DWG: CPMAPPL, GLOBALS, ATOI, LUBIND, APPLVERS, MEMORY(memcpy,memset), PORTAB
- DWG: Add/Repair BIOS support for Boot Drive login during CP/M Coldstart
@ -367,7 +398,7 @@ Version 1.4
- DWG: Add LABEL utility to insert label into drive/slice metadata
- DWG: Add 16 char label field to metadata
- DWG: ASSIGN utility displays and manipulates DPH/DPB & logical unit parameters
- DWG/WBW: Collaborated on design of Logical Unit DPH enhancemnt
- DWG/WBW: Collaborated on design of Logical Unit DPH enhancemnt
- WBW: Proposed MAP utility functionality
- WBW: Implement slice selection API for DSK devices
- WBW: Record boot drive in config memory at load time

385
Doc/Contrib/Flash4.txt

@ -1,186 +1,199 @@
FLASH4 (c) 2014 William R Sowerbutts <will@sowerbutts.com>
http://sowerbutts.com/8bit/
= Warning =
FLASH4 has been tested and confirmed working on:
* N8VEM SBCv2
* N8VEM N8-2312
* N8VEM Mark IV SBC
* DX-Designs P112
* ZETA SBC v2
However it remains somewhat experimental. If it works for you, please let me
know. If it breaks please also let me know so I can fix it!
= Introduction =
FLASH4 is a CP/M program which can read, write and verify Flash ROM contents to
or from an image file stored on a CP/M filesystem. It is intended for in-system
programming of Flash ROM chips on Z80 and Z180 systems.
FLASH4 aims to support a range of Flash ROM chips. Ideally I would like to
support all Flash ROM chips that are in use in Z80/Z180 N8VEM machines. If
FLASH4 does not support your chip please let me know and I will try to add
support.
When writing to the Flash ROM chip, FLASH4 will only reprogram the sectors
whose contents have changed. This helps to reduce wear on the flash memory,
makes the reprogram operation faster, and reduces the risk of leaving the
system unbootable if power fails during a reprogramming operation. FLASH4
always performs a full verify operation after writing to the chip to confirm
that the correct data has been loaded.
FLASH4 is reasonably fast. Reprogramming and verifying every sector on a 512KB
SST 39F040 chip takes 21 seconds on my Mark IV SBC, versus 45 seconds to
perform the same task using a USB MiniPro TL866 EEPROM programmer under Linux
on my PC. If only a subset of sectors require reprogramming FLASH4 will be
even faster.
FLASH4 works with binary ROM image files, it does not support Intel Hex format
files. Hex files can be easily converted to or from binaries using "hex2bin" or
the "srec_cat" program from SRecord:
$ srec_cat image.hex -intel -fill 0xFF 0 0x80000 -output image.bin -binary
$ srec_cat image.bin -binary -output image.hex -intel
FLASH4 can use several different methods to access the Flash ROM chip. The best
available method is determined automatically at run time. Alternatively you may
provide a command-line option to force the use of a specific method.
The first two methods use bank switching to map sections of the ROM into the
CPU address space. FLASH4 will detect the presence of RomWBW or UNA BIOS and
use the bank switching methods they provide.
On P112 systems the P112 B/P BIOS is detected and P112 bank switching is used.
If no bank switching method can be auto-detected, and the system has a Z180
CPU, FLASH4 will use the Z180 DMA engine to access the Flash ROM chip. This
does not require any bank switching but it is slower and will not work on all
platforms.
Z180 DMA access requires the flash ROM to be linearly mapped into the lower
region of physical memory, as it is on the Mark IV SBC (for example). The
N8-2312 has additional memory mapping hardware, consequently Z180 DMA access on
the N8-2312 is NOT SUPPORTED and if forced will corrupt the contents of RAM;
use one of the supported bank switching methods instead.
Z180 DMA access requires the Z180 CPU I/O base control register configured to
locate the internal I/O addresses at 0x40 (ie ICR bits IOA7, IOA6 = 0, 1).
= Usage =
The three basic operations are:
FLASH4 WRITE filename [options]
This will rewrite the flash ROM contents from the named file. The file size
must exactly match the size of the ROM chip. After the write operation, a
verify operation will be performed automatically.
FLASH4 VERIFY filename [options]
This will read out the flash ROM contents and report if it matches the contents
of the named file. The file size must exactly match the size of the ROM chip.
FLASH4 READ filename [options]
This will read out the entire flash ROM contents and write it to the named
file.
If your ROM chip is larger than the image you wish to write, use the "/PARTIAL"
(or "/P") command line option. To avoid accidentally flashing the wrong file,
the image file must be an exact multiple of 32KB in length. The portion of the
ROM not occupied by the image file is left either unmodified or erased.
If you are using an ROM/EPROM/EEPROM chip which cannot be programmed in-system,
FLASH4 will not be able to recognise it, however the software can still
usefully READ and VERIFY the chip. Use the "/ROM" command line option to enable
"READ" or "VERIFY" mode with unrecognised chips. This mode assumes a 512K ROM
is fitted; smaller ROMs will be treated as a 512K ROM with the data repated
multiple times -- with a 256K chip the data is repeated twice, four times for a
128K chip, etc.
One of the following optional command line arguments may be specified at the
end of the command line to force FLASH4 to use a particular method to access
the flash ROM chip:
BIOS interfaces:
/ROMWBW For ROMWBW BIOS version 2.6 and later
/ROMWBWOLD For ROMWBW BIOS version 2.5 and earlier
/UNABIOS For UNA BIOS
Direct hardware interfaces:
/Z180DMA For Z180 DMA
/P112 For DX-Designs P112
/N8VEMSBC For N8VEM SBC (v1, v2), Zeta (v1) SBC
If no option is specified FLASH4 attempts to determine the best available
method automatically.
= Supported chips and features =
FLASH4 will interrogate your flash ROM chip to identify it automatically.
FLASH4 assumes that you have a single flash ROM device and it is located at the
bottom of the physical memory map.
FLASH4 does not support setting or resetting the protection bits on individual
sectors within Flash ROM devices. If your Flash ROM chip has protected sectors
you will need to unprotect them by other means before FLASH4 can erase and
reprogram them.
AT29C series chips employ an optional "software data protection" feature. This
is supported by FLASH4 and is left activated after programming the chip to
prevent accidental reprogramming of sectors.
The following chips are supported:
AT29F010
AT29F040
M29F010
M29F040
MX29F040
SST 39F010
SST 39F020
SST 39F040
AT29C512
AT29C040
AT29C010
AT29C020
The following chips are supported but have unequal sector sizes; FLASH4 will
only erase and reprogram the entire chip at once rather than its normal
sector-by-sector operation:
AT49F001NT
AT49F001N
AT49F002N
AT49F002NT
AT49F040
If you use a flash ROM chip that is not listed above please email me
(will@sowerbutts.com) and I will try to add support for it.
= Compiling =
The software is written in a mix of C and assembler. It builds using the SDCC
toolchain and the SRecord tools. A Makefile is provided to build the executable
in Linux and I imagine it can be easily modified to build in Windows.
You may need to adjust the path to the SDCC libraries in the Makefile if your
sdcc installation is not in /usr/local
= License =
FLASH4 is licensed under the The GNU General Public License version 3 (see
included "LICENSE.txt" file).
FLASH4 is provided with NO WARRANTY. In no event will the author be liable for
any damages. Use of this program is at your own risk. May cause rifts in space
and time.
FLASH4 (c) 2014-2020 William R Sowerbutts <will@sowerbutts.com>
http://sowerbutts.com/8bit/
= Supported machines =
FLASH4 has been tested and confirmed working on:
* N8VEM SBCv2
* N8VEM SBCv2 MegaFlash
* N8VEM N8-2312
* N8VEM Mark IV SBC
* DX-Designs P112
* ZETA SBC v1
* ZETA SBC v2
* RC2014 with 512KB ROM 512KB RAM module
It should work on many other machines that run RomWBW or UNA BIOS. If you test
it on another machine please let me know the outcome.
= Introduction =
FLASH4 is a CP/M program which can read, write and verify Flash ROM contents to
or from an image file stored on a CP/M filesystem. It is intended for in-system
programming of Flash ROM chips on Z80 and Z180 systems.
FLASH4 aims to support a range of Flash ROM chips and machines. Ideally I would
like to support all Z80/Z180 machines. If FLASH4 does not support your machine
please let me know and I will try to add support.
When writing to the Flash ROM, FLASH4 will only reprogram the sectors whose
contents have changed. This helps to reduce wear on the flash memory, makes the
reprogram operation faster, and reduces the risk of leaving the system
unbootable if power fails during a reprogramming operation. FLASH4 always
performs a full verify operation after writing to the chip to confirm that the
correct data has been loaded.
FLASH4 is reasonably fast. Reprogramming and verifying every sector on a 512KB
SST 39F040 chip takes 21 seconds on my Mark IV SBC, versus 45 seconds to
perform the same task using a USB MiniPro TL866 EEPROM programmer under Linux
on my PC. If only a subset of sectors require reprogramming FLASH4 will be
even faster.
FLASH4 works with binary ROM image files, it does not support Intel Hex format
files. Hex files can be easily converted to or from binaries using "hex2bin" or
the "srec_cat" program from SRecord:
$ srec_cat image.hex -intel -fill 0xFF 0 0x80000 -output image.bin -binary
$ srec_cat image.bin -binary -output image.hex -intel
FLASH4 version 1.3 introduces support for programming multiple flash chips.
Some machines use multiple flash chips for larger ROM capacity, for example the
"Megaflash" version of the Retrobrew Computers SBC-V2 contains two 512KB flash
ROMs for a total of 1MB ROM. All flash chips in the system must be of the same
type.
FLASH4 can use several different methods to access the Flash ROM chips. The
best available method is determined automatically at run time. Alternatively
you may provide a command-line option to force the use of a specific method.
FLASH4 will detect the presence of RomWBW, UNA BIOS or P112 B/P BIOS and use
the bank switching methods they provide to map in the flash memory.
If no bank switching method can be auto-detected, and the system has a Z180
CPU, FLASH4 will use the Z180 DMA engine to access the Flash ROM chip. This
does not require any bank switching but it is slower and will not work on all
platforms.
Z180 DMA access requires the flash ROM to be linearly mapped into the lower
region of physical memory, as it is on the Mark IV SBC (for example). The
N8-2312 has additional memory mapping hardware, consequently Z180 DMA access on
the N8-2312 is NOT SUPPORTED and if forced will corrupt the contents of RAM;
use one of the supported bank switching methods instead.
Z180 DMA access requires the Z180 CPU I/O base control register configured to
locate the internal I/O addresses at 0x40 (ie ICR bits IOA7, IOA6 = 0, 1).
= Usage =
The three basic operations are:
FLASH4 WRITE filename [options]
FLASH4 VERIFY filename [options]
FLASH4 READ filename [options]
The WRITE command will rewrite the flash ROM contents from the named file. The
file size must exactly match the size of the ROM chip. After the WRITE
operation, a VERIFY operation will be performed automatically.
The VERIFY command will read out the flash ROM contents and report if it
matches the contents of the named file. The file size must exactly match the
size of the ROM chip.
The READ command will read out the entire flash ROM contents and write it to
the named file.
FLASH4 will auto-detect most parameters so additional options should not
normally be required.
The "/V" (verbose) option makes FLASH4 print one line per sector, giving a
detailed log of what it did.
The "/P" or "/PARTIAL" option can be used if your ROM chip is larger than the
image you wish to write and you only want to reprogram part of it. To avoid
accidentally flashing the wrong file, the image file must be an exact multiple
of 32KB in length. The portion of the ROM not occupied by the image file is
left either unmodified or erased.
The "/ROM" option can be used when you are using an ROM/EPROM/EEPROM chip which
cannot be programmed in-system and FLASH4 cannot recognise it. Only the "READ"
and "VERIFY" commands are supported with this option. This mode assumes a 512K
ROM is fitted, smaller ROMs will be treated as a 512KB ROM with the data
repeated multiple times.
One of the following optional command line arguments may be specified at the
end of the command line to force FLASH4 to use a particular method to access
the flash ROM chip:
BIOS interfaces:
/ROMWBW For ROMWBW BIOS version 2.6 and later
/ROMWBWOLD For ROMWBW BIOS version 2.5 and earlier
/UNABIOS For UNA BIOS
Direct hardware interfaces:
/Z180DMA For Z180 DMA
/P112 For DX-Designs P112
/N8VEMSBC For N8VEM SBC (v1, v2), Zeta (v1) SBC
If no option is specified FLASH4 attempts to determine the best available
method automatically.
If RomWBW 2.6+ is in use, and correctly configured, then multiple flash chips
can be detected automatically. Multiple chip operation can also be manually
enabled using the command line options "/1", "/2", "/3" etc up to "/9" to
specify the number of flash chips to program. All flash chips in the system
must be of the same type.
= Supported flash memory chips =
FLASH4 will interrogate your flash ROM chip to identify it automatically.
FLASH4 does not support setting or resetting the protection bits on individual
sectors within Flash ROM devices. If your Flash ROM chip has protected sectors
you will need to unprotect them by other means before FLASH4 can erase and
reprogram them.
AT29C series chips employ an optional "software data protection" feature. This
is supported by FLASH4 and is left activated after programming the chip to
prevent accidental reprogramming of sectors.
The following chips are fully supported and will be programmed sector by
sector:
AT29F010
AT29F040
M29F010
M29F040
MX29F040
SST 39F010
SST 39F020
SST 39F040
AT29C512
AT29C040
AT29C010
AT29C020
The following chips are supported, but have unequal sector sizes, so FLASH4
will only erase and reprogram the entire chip at once:
AT49F001N
AT49F001NT
AT49F002N
AT49F002NT
AT49F040
= Compiling =
The software is written in a mix of C and assembler. It builds using the SDCC
toolchain and the SRecord tools. SDCC 3.6 and 3.8 have been tested. A Makefile
is provided to build the executable in Linux and I imagine it can be easily
modified to build in Windows.
You may need to adjust the path to the SDCC libraries in the Makefile if your
installation is not in /usr/local or /usr
= License =
FLASH4 is licensed under the The GNU General Public License version 3 (see
included "LICENSE.txt" file).
FLASH4 is provided with NO WARRANTY. In no event will the author be liable for
any damages. Use of this program is at your own risk. May cause rifts in space
and time.

8
Doc/FDU.txt

@ -510,5 +510,11 @@ WW 9/5/2018: v5.3
operation.
- Added support for SmallZ80
WW 5/1/2020: v5.4
WW 1/5/2020: v5.4
- Added support for Dyno (based on work by Steve Garcia)
WW 4/29/2020: v5.5
- Added support for Etched Pixels FDC
WW 12/12/2020: v5.6
- Updated SmallZ80 support for new I/O map

BIN
Doc/Hard Disk Anatomy.pdf

Binary file not shown.

BIN
Doc/RomWBW Applications.pdf

Binary file not shown.

BIN
Doc/RomWBW Architecture.pdf

Binary file not shown.

BIN
Doc/RomWBW Disk Catalog.pdf

Binary file not shown.

BIN
Doc/RomWBW Getting Started.pdf

Binary file not shown.

BIN
Doc/SIO+CTC Baud Rate Options.pdf

Binary file not shown.

19
Makefile

@ -1,19 +1,18 @@
all:
cd Tools/unix ; make
cd Source ; make
cd Source/Images ; make
$(MAKE) --directory Tools/unix
$(MAKE) --directory Source
clean:
cd Tools/unix ; make clean
cd Source ; make clean
cd Binary ; make clean
$(MAKE) --directory Tools/unix clean
$(MAKE) --directory Source clean
$(MAKE) --directory Binary clean
clobber:
cd Tools/unix ; make clobber
cd Source ; make clobber
cd Binary ; make clobber
$(MAKE) --directory Tools/unix clobber
$(MAKE) --directory Source clobber
$(MAKE) --directory Binary clobber
rm -f typescript
diff:
cd Source ; make diff
$(MAKE) --directory Source diff

154
ReadMe.md

@ -3,7 +3,7 @@
## Z80/Z180 System Software
Version 3.1 Pre-release
Saturday 11 April 2020
Friday 15 January 2021
Wayne Warthen <wwarthen@gmail.com>
@ -37,7 +37,7 @@ General features include:
- Disk drivers for RAM, ROM, Floppy, IDE, CF, and SD
- Serial drivers including UART (16550-like), ASCI, ACIA, SIO
- Video drivers including TMS9918, SY6545, MOS8563, HD6445
- Real time clock drivers including DS1322, BQ4845
- Real time clock drivers including DS1302, BQ4845
- Multiple OS support including CP/M 2.2, ZSDOS, CP/M 3, ZPM3
- Built-in VT-100 terminal emulation support
@ -311,7 +311,7 @@ media. You can think of slices as a way to refer to any of the first 256
Of course, the problem is that CP/M-like operating systems have only 16
drive letters (A:-P:) available. Under the covers, RomWBW allows you to
use any drive letter to refer to any slice of any media. The `ASSIGN`
command is allows you to view or change the drive letter mappings at any
command allows you to view or change the drive letter mappings at any
time. At startup, the operating system will automatically allocate a
reasonable number of drive letters to the available storage devices. The
allocation will depend on the number of large storage devices available
@ -706,13 +706,17 @@ most stable and you are less likely to encounter problems.
### Notes
- You can change media, but it must be done while at the OS command
prompt and you **must** warm start CP/M by pressing ctrl-c. This is
a CP/M 2.2 constraint and is well documented in the DRI manuals.
- The original versions of DDT, DDTZ, and ZSID used the RST 38 vector
which conflicts with interrupt mode 1 use of this vector. The DDT,
DDTZ, and ZSID applications in RomWBW have been modified to use RTS
DDTZ, and ZSID applications in RomWBW have been modified to use RST
30 to avoid this issue.
- Z-System applications will not run under CP/M 2.2. For example, the
`LDDS` date stamper with not run.
`LDDS` date stamper will not run.
## ZSDOS 1.1
@ -735,6 +739,10 @@ Manual.pdf”).
of the ZSDOS paths and will fail in some scenarios (use `COPY`
instead).
- Although ZSDOS can recognize a media change in some cases, it will
not always work. You should only change media at a command prompt
and be sure to warm start the OS with a ctrl-c.
## NZCOM Automatic Z-System
NZCOM is a much further refined version of Z-System (ZCPR 3.4). NZCOM
@ -775,6 +783,16 @@ tracks. `CPMLDR.SYS` chain loads `CPM3.SYS`.
used to read the current date/time for file stamping, etc. You can
use the `RTC` app to set the RTC clock.
- The `COPYSYS` command described in the DRI CP/M 3 documentation is
not provided with RomWBW. The RomWBW `SYSCOPY` command is used
instead.
- Although CP/M 3 is generally able to run CP/M 2.2 programs, this is
not universally true. This is especially true of the utility
programs included with the operating system. For example, the
`SUBMIT` program of CP/M 3 is completely different from the `SUBMIT`
program of CP/M 2.2.
## Simeon Cran’s ZPM3
ZPM3 is an interesting combination of the features of both CP/M 3 and
@ -788,8 +806,9 @@ tracks of the disk.
- `ZPMLDR` is included with ZPM3, but it is not working correctly.
- The ZPM operating system is contained in the file called CPM3.SYS
which is confusing, but it is the author’s intended way of using
ZPM3.
which is confusing, but this is as intended by the ZPM3
distribution. I believe it was done this way to make it easier for
users to transition from CP/M 3 to ZPM3.
## FreeRTOS
@ -1019,7 +1038,7 @@ system, you can use the FLASH application to update your ROM. The
following is a typical example of transferring ROM image using XModem
and flashing the chip in-situ.
E>xm r rom.img
E>xm r rom.rom
XMODEM v12.5 - 07/13/86
RBC, 28-Aug-2019 [WBW], ASCI
@ -1031,7 +1050,7 @@ and flashing the chip in-situ.
Thanks for the upload
E>flash write rom.img
E>flash write rom.rom
FLASH4 by Will Sowerbutts <will@sowerbutts.com> version 1.2.3
Using RomWBW (v2.6+) bank switching.
@ -1060,12 +1079,76 @@ your choice. This process is described below in the Disk Images section.
If you wish to update existing disk media in your system, you need to
perform the following steps.
If the disk is bootable, you need to update the system tracks of the
disk. This is done using a SYSCOPY command such as `SYSCOPY
C:=B:ZSYS.SYS`. For a ZSDOS boot disk, use ZSYS.SYS. For a CP/M 2.2
disk, use CPM.SYS. For a CP/M 3 or ZPM3 disk, use CPMLDR.SYS. CPMLDR.SYS
is not provided on the ROM disk, so you will need to upload it from the
distribution.
If the disk is bootable, you need to update the system image on the disk
using the procedure described below corresponsing to the operating
system on your disk.
- **CP/M 2.2**
Boot to CP/M 2.2 from ROM, then use `SYSCOPY` to update the system
image on **all** CP/M 2.2 boot disks/slices. The CP/M 2.2 system
image is called CPM.SYS and is found on the ROM disk. For example:
`B>SYSCOPY C:=CPM.SYS`
- **ZSDOS**
Boot to Z-System from ROM, then use `SYSCOPY` to update the system
image on **all** ZSDOS boot disks/slices. The ZSDOS system image is
called ZSYS.SYS and is found on the ROM disk. For example:
`B>SYSCOPY C:=ZSYS.SYS`
- **NZCOM**
NZCOM runs on top of either CP/M 2.2 or ZSDOS. By default, the
RomWBW disk image for NZCOM uses ZSDOS. Follow the corresponding
procedure above to update the system image on the NZCOM boot
disks/slices.
- **CP/M 3**
CP/M 3 uses a multi-step boot process involving multiple files. The
CP/M 3 boot files are not included on the ROM disk due to space
constraints. You will need to transfer the files to your system from
the RomWBW distribution directory Binary\\CPM3.
After this is done, you will need to use `SYSCOPY` to place the CP/M
3 loader image on the boot tracks of all CP/M 3 boot disks/slices.
The loader image is called `CPMLDR.SYS`. You must then copy (at a
minimum) `CPM3.SYS` and `CCP.COM` onto the disk/slice. Assuming you
copied the CP/M 3 boot files onto your RAM disk at A:, you would
use:
A>B:SYSCOPY C:=CPMLDR.SYS
A>B:COPY CPM3.SYS C:
A>B:COPY CCP.COM C:
- **ZPM3**
ZPM3 uses a multi-step boot process involving multiple files. The
ZPM3 boot files are not included on the ROM disk due to space
constraints. You will need to transfer the files to your system from
the RomWBW distribution directory Binary\\ZPM3.
After this is done, you will need to use `SYSCOPY` to place the ZPM3
loader image on the boot tracks of all ZPM3 boot disks/slices. The
loader image is called `CPMLDR.SYS`. You must then copy (at a
minimum) `CPM3.SYS`, `ZCCP.COM`, `ZINSTAL.ZPM`, and `STARTZPM.COM`
onto the disk/slice. Assuming you copied the ZPM3 boot files onto
your RAM disk at A:, you would use:
A>B:SYSCOPY C:=CPMLDR.SYS
A>B:COPY CPM3.SYS C:
A>B:COPY ZCCP.COM C:
A>B:COPY ZINSTAL.ZPM C:
A>B:COPY STARTZPM.COM C:
You may be wondering if the references to `CPMLDR.SYS` and
`CPM3.SYS` are typos. They are not. ZPM3 uses the same loader image
as CPM3. The ZPM3 main system code file is called `CPM3.SYS` which
is the same name as CP/M 3 uses, but the file contents are not the
same.
Finally, if you have copies of any of the RomWBW custom applications on
your hard disk, you need to update them with the latest copies. The
@ -1096,6 +1179,36 @@ images.
- FAT.COM
- TUNE.COM
# System Update
If the system running ROMWBW utilizes the SST39SF040 Flash chip then it
is possible to do a System Update in place of a System Upgrade in some
cases.
A System Update would involve only updating the BIOS, ROM applications
and CP/M system.
A System Update may be more favorable than a System Upgrade in cases
such as:
- Overwriting of the ROM drive is not desired.
- Space is unavailable to hold a full ROMWBW ROM.
- To mimimize time taken to transfer and flash a full ROM.
- Configuration changes are only minor and do not impact disk
applications.
The ROMWBW build process generates a system upgrade file along with the
normal ROM image and can be identified by the extension “.upd”. It will
be 128Kb in size. In comparison the normal ROM image will have the
extension “.rom” and be 512Kb or 1024Kb in size.
Transferring and flashing the System Update is accomplished in the same
manner as described above in *Upgrading* with the required difference
being that the flash application needs to be directed to complete a
partial flash using the /p command line switch.
`E>flash write rom.upd /p`
# RomWBW Distribution
All source code and distributions are maintained on GitHub. Code
@ -1137,12 +1250,17 @@ applications are no longer provided.
driver.
- Ed Brindley contributed some of the code that supports the RC2014
platform.
- Phil Summers contributed Forth and BASIC in ROM as well as a long
list of general code enhancements.
- Phil Summers contributed Forth and BASIC in ROM, the AY-3-8910 sound
driver as well as a long list of general code enhancements.
- Phillip Stevens contributed support for FreeRTOS.
- Curt Mayer contributed the Linux / MacOS build process.
- UNA BIOS and FDISK80 is a product of John Coffman.
- UNA BIOS and FDISK80 are the products of John Coffman.
- FLASH4 is a product of Will Sowerbutts.
- CLRDIR is a product of Max Scane.
- Tasty Basic is a product of Dimitri Theulings.
- Dean Netherton contributed the sound driver interface and the
SN76489 sound driver.
- The RomWBW Disk Catalog document was produced by Mykl Orders.
Contributions of all kinds to RomWBW are very welcome.

151
ReadMe.txt

@ -3,7 +3,7 @@ RomWBW
Z80/Z180 System Software
Version 3.1 Pre-release
Saturday 11 April 2020
Friday 15 January 2021
Wayne Warthen wwarthen@gmail.com
@ -33,7 +33,7 @@ General features include:
- Disk drivers for RAM, ROM, Floppy, IDE, CF, and SD
- Serial drivers including UART (16550-like), ASCI, ACIA, SIO
- Video drivers including TMS9918, SY6545, MOS8563, HD6445
- Real time clock drivers including DS1322, BQ4845
- Real time clock drivers including DS1302, BQ4845
- Multiple OS support including CP/M 2.2, ZSDOS, CP/M 3, ZPM3
- Built-in VT-100 terminal emulation support
@ -325,7 +325,7 @@ media. You can think of slices as a way to refer to any of the first 256
Of course, the problem is that CP/M-like operating systems have only 16
drive letters (A:-P:) available. Under the covers, RomWBW allows you to
use any drive letter to refer to any slice of any media. The ASSIGN
command is allows you to view or change the drive letter mappings at any
command allows you to view or change the drive letter mappings at any
time. At startup, the operating system will automatically allocate a
reasonable number of drive letters to the available storage devices. The
allocation will depend on the number of large storage devices available
@ -737,13 +737,17 @@ most stable and you are less likely to encounter problems.
Notes
- You can change media, but it must be done while at the OS command
prompt and you must warm start CP/M by pressing ctrl-c. This is a
CP/M 2.2 constraint and is well documented in the DRI manuals.
- The original versions of DDT, DDTZ, and ZSID used the RST 38 vector
which conflicts with interrupt mode 1 use of this vector. The DDT,
DDTZ, and ZSID applications in RomWBW have been modified to use RTS
DDTZ, and ZSID applications in RomWBW have been modified to use RST
30 to avoid this issue.
- Z-System applications will not run under CP/M 2.2. For example, the
LDDS date stamper with not run.
LDDS date stamper will not run.
ZSDOS 1.1
@ -764,6 +768,10 @@ Notes
of the ZSDOS paths and will fail in some scenarios (use COPY
instead).
- Although ZSDOS can recognize a media change in some cases, it will
not always work. You should only change media at a command prompt
and be sure to warm start the OS with a ctrl-c.
NZCOM Automatic Z-System
NZCOM is a much further refined version of Z-System (ZCPR 3.4). NZCOM
@ -804,6 +812,15 @@ Notes
to read the current date/time for file stamping, etc. You can use
the RTC app to set the RTC clock.
- The COPYSYS command described in the DRI CP/M 3 documentation is not
provided with RomWBW. The RomWBW SYSCOPY command is used instead.
- Although CP/M 3 is generally able to run CP/M 2.2 programs, this is
not universally true. This is especially true of the utility
programs included with the operating system. For example, the SUBMIT
program of CP/M 3 is completely different from the SUBMIT program of
CP/M 2.2.
Simeon Cran’s ZPM3
ZPM3 is an interesting combination of the features of both CP/M 3 and
@ -817,8 +834,9 @@ Notes
- ZPMLDR is included with ZPM3, but it is not working correctly.
- The ZPM operating system is contained in the file called CPM3.SYS
which is confusing, but it is the author’s intended way of using
ZPM3.
which is confusing, but this is as intended by the ZPM3
distribution. I believe it was done this way to make it easier for
users to transition from CP/M 3 to ZPM3.
FreeRTOS
@ -1043,7 +1061,7 @@ system, you can use the FLASH application to update your ROM. The
following is a typical example of transferring ROM image using XModem
and flashing the chip in-situ.
E>xm r rom.img
E>xm r rom.rom
XMODEM v12.5 - 07/13/86
RBC, 28-Aug-2019 [WBW], ASCI
@ -1055,7 +1073,7 @@ and flashing the chip in-situ.
Thanks for the upload
E>flash write rom.img
E>flash write rom.rom
FLASH4 by Will Sowerbutts <will@sowerbutts.com> version 1.2.3
Using RomWBW (v2.6+) bank switching.
@ -1084,12 +1102,74 @@ your choice. This process is described below in the Disk Images section.
If you wish to update existing disk media in your system, you need to
perform the following steps.
If the disk is bootable, you need to update the system tracks of the
disk. This is done using a SYSCOPY command such as
SYSCOPY C:=B:ZSYS.SYS. For a ZSDOS boot disk, use ZSYS.SYS. For a CP/M
2.2 disk, use CPM.SYS. For a CP/M 3 or ZPM3 disk, use CPMLDR.SYS.
CPMLDR.SYS is not provided on the ROM disk, so you will need to upload
it from the distribution.
If the disk is bootable, you need to update the system image on the disk
using the procedure described below corresponsing to the operating
system on your disk.
- CP/M 2.2
Boot to CP/M 2.2 from ROM, then use SYSCOPY to update the system
image on all CP/M 2.2 boot disks/slices. The CP/M 2.2 system image
is called CPM.SYS and is found on the ROM disk. For example:
B>SYSCOPY C:=CPM.SYS
- ZSDOS
Boot to Z-System from ROM, then use SYSCOPY to update the system
image on all ZSDOS boot disks/slices. The ZSDOS system image is
called ZSYS.SYS and is found on the ROM disk. For example:
B>SYSCOPY C:=ZSYS.SYS
- NZCOM
NZCOM runs on top of either CP/M 2.2 or ZSDOS. By default, the
RomWBW disk image for NZCOM uses ZSDOS. Follow the corresponding
procedure above to update the system image on the NZCOM boot
disks/slices.
- CP/M 3
CP/M 3 uses a multi-step boot process involving multiple files. The
CP/M 3 boot files are not included on the ROM disk due to space
constraints. You will need to transfer the files to your system from
the RomWBW distribution directory Binary\CPM3.
After this is done, you will need to use SYSCOPY to place the CP/M 3
loader image on the boot tracks of all CP/M 3 boot disks/slices. The
loader image is called CPMLDR.SYS. You must then copy (at a minimum)
CPM3.SYS and CCP.COM onto the disk/slice. Assuming you copied the
CP/M 3 boot files onto your RAM disk at A:, you would use:
A>B:SYSCOPY C:=CPMLDR.SYS
A>B:COPY CPM3.SYS C:
A>B:COPY CCP.COM C:
- ZPM3
ZPM3 uses a multi-step boot process involving multiple files. The
ZPM3 boot files are not included on the ROM disk due to space
constraints. You will need to transfer the files to your system from
the RomWBW distribution directory Binary\ZPM3.
After this is done, you will need to use SYSCOPY to place the ZPM3
loader image on the boot tracks of all ZPM3 boot disks/slices. The
loader image is called CPMLDR.SYS. You must then copy (at a minimum)
CPM3.SYS, ZCCP.COM, ZINSTAL.ZPM, and STARTZPM.COM onto the
disk/slice. Assuming you copied the ZPM3 boot files onto your RAM
disk at A:, you would use:
A>B:SYSCOPY C:=CPMLDR.SYS
A>B:COPY CPM3.SYS C:
A>B:COPY ZCCP.COM C:
A>B:COPY ZINSTAL.ZPM C:
A>B:COPY STARTZPM.COM C:
You may be wondering if the references to CPMLDR.SYS and CPM3.SYS
are typos. They are not. ZPM3 uses the same loader image as CPM3.
The ZPM3 main system code file is called CPM3.SYS which is the same
name as CP/M 3 uses, but the file contents are not the same.
Finally, if you have copies of any of the RomWBW custom applications on
your hard disk, you need to update them with the latest copies. The
@ -1119,6 +1199,36 @@ Binary\Apps directory of the distribution and in all of the disk images.
- FAT.COM
- TUNE.COM
System Update
If the system running ROMWBW utilizes the SST39SF040 Flash chip then it
is possible to do a System Update in place of a System Upgrade in some
cases.
A System Update would involve only updating the BIOS, ROM applications
and CP/M system.
A System Update may be more favorable than a System Upgrade in cases
such as:
- Overwriting of the ROM drive is not desired.
- Space is unavailable to hold a full ROMWBW ROM.
- To mimimize time taken to transfer and flash a full ROM.
- Configuration changes are only minor and do not impact disk
applications.
The ROMWBW build process generates a system upgrade file along with the
normal ROM image and can be identified by the extension “.upd”. It will
be 128Kb in size. In comparison the normal ROM image will have the
extension “.rom” and be 512Kb or 1024Kb in size.
Transferring and flashing the System Update is accomplished in the same
manner as described above in Upgrading with the required difference
being that the flash application needs to be directed to complete a
partial flash using the /p command line switch.
E>flash write rom.upd /p
RomWBW Distribution
All source code and distributions are maintained on GitHub. Code
@ -1169,12 +1279,17 @@ applications are no longer provided.
driver.
- Ed Brindley contributed some of the code that supports the RC2014
platform.
- Phil Summers contributed Forth and BASIC in ROM as well as a long
list of general code enhancements.
- Phil Summers contributed Forth and BASIC in ROM, the AY-3-8910 sound
driver as well as a long list of general code enhancements.
- Phillip Stevens contributed support for FreeRTOS.
- Curt Mayer contributed the Linux / MacOS build process.
- UNA BIOS and FDISK80 is a product of John Coffman.
- UNA BIOS and FDISK80 are the products of John Coffman.
- FLASH4 is a product of Will Sowerbutts.
- CLRDIR is a product of Max Scane.
- Tasty Basic is a product of Dimitri Theulings.
- Dean Netherton contributed the sound driver interface and the
SN76489 sound driver.
- The RomWBW Disk Catalog document was produced by Mykl Orders.
Contributions of all kinds to RomWBW are very welcome.

112
Readme.unix

@ -1,49 +1,87 @@
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.
This tree now contains makefiles and tools to build on Linux and
macOS. Linux is rather more thoroughly tested compared to macOS.
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
.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".
By default, this will generate all of the standard configurations of
RomWBW for all platforms. If you just want to build the ROM for a
specific platform and configuration you can use
it assumes that you have some standard system tools and libraries installed
specifically: gcc, gnu make, libncurses
make ROM_PLATFORM=<platform> ROM_CONFIG=<config>
to build:
cd to the top directory and type make.
where <platform> is one of the supported platforms such as SBC, RCZ80,
etc. and <config> is a configuration of that platform. For example,
to build the "126" configuration of the "SCZ180" platform:
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.
make ROM_PLATFORM=SCZ180 ROM_CONFIG=126
these tools can run a windows-linux regression test, where all the binaries are
compared to a baseline windows build.
For macOS users, you may encounter a failure reading or writing files.
This is caused by protection features in macOS (at least, in Catalina)
that prevent programs built on your local system (unsigned) from
running. To disable this feature:
1) Make sure you exit System Preferences.
2) Open a terminal session and type the following. You will need to
authenticate with an admin account. sudo spctl --master-disable
3) Exit terminal
4) Go into System Preferences and choose Security and Privacy
5) Select the General tab if it isn't already selected
6) You should now see a third selection under
"Allow apps downloaded from:" of Anywhere - select this.
7) Now you can run the build successfully.
DISCLAIMER: You do this at your own risk. I highly recommend that you
return the settings back to normal immediately after doing a build.
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
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 macOS.
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.
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 the distributed version, and also has local hacks
for case insensitivity.
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.
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.
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.

47
Source/Apps/Assign.asm

@ -22,7 +22,11 @@
; 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
; 2019-12-24 [WBW] Fixed location of BIOS save area\
; 2020-04-29 [WBW] Updated for larger DPH (16 -> 20 bytes)
; 2020-05-06 [WBW] Add patch level to version compare
; 2020-05-10 [WBW] Set media change flag in XDPH for CP/M 3
; 2020-05-12 [WBW] Back out media change flag
;_______________________________________________________________________________
;
; ToDo:
@ -41,8 +45,7 @@ bdos .equ $0005 ; BDOS invocation vector
;
stamp .equ $40 ; loc of RomWBW CBIOS zero page stamp
;
rmj .equ 3 ; CBIOS version - major
rmn .equ 1 ; CBIOS version - minor
#include "../ver.inc"
;
;===============================================================================
; Code Section
@ -118,10 +121,14 @@ init:
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?
cp RMJ << 4 | RMN ; match?
jp nz,errver ; abort with invalid os version
inc hl ; bump past
inc hl ; ... version info
inc hl ; next byte (update/patch)
ld a,(hl) ; load it
and $F0 ; eliminate patch num
cp RUP << 4 ; match?
jp nz,errver ; abort with invalid os version
inc hl ; bump past version info
;
; dereference HL to point to CBIOS extension data
ld a,(hl) ; dereference HL
@ -546,7 +553,8 @@ dph_init2:
ld a,(hl) ; unit to A
push bc ; save loop control
push hl ; save drive map pointer
ld hl,16 ; size of a DPH structure
;ld hl,16 ; size of a DPH structure
ld hl,20 ; size of a DPH structure
call alloc ; allocate space for dph
jp c,instovf ; handle overflow error
push hl ; save DPH location
@ -771,6 +779,10 @@ instc2:
inc hl ; bump to slice field of DPH field
ld a,(de) ; get slice from mapwrk
ld (hl),a ; put slice into DPH field
; ld a,11 ; media byte is 11 bytes ahead
; call addhl ; bump HL to media byte adr
; or $FF ; use $FF to signify media change
; ld (hl),a ; set media flag byte
inc de ; bump to next mapwrk entry
inc de ; ...
inc de ; ...
@ -781,7 +793,7 @@ 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
ld de,$27 ; size of xdph
add hl,de ; bump to next dph
ld (dphadr),hl ; save it
pop de ; recover mapwrk entry adr
@ -794,6 +806,16 @@ instc3:
add hl,de ; HL := SELMEM func
ld a,1 ; bank 1 is tpa bank
call jphl
;
; set SCB drive door open flag
ld a,$54 ; SCB drive door opened flag
ld (scboff),a ; set offset parm
or $FF ; SCB operation, $FF = set
ld (scbop),a ; set operation parm
ld (scbval),a ; set value parm to $FF
ld c,$31 ; get/set system control block
ld de,scbpb ; scb parameter block adr
call bdos
;
call drvrst ; perform BDOS drive reset
;
@ -1822,6 +1844,11 @@ heaplim .dw 0 ; heap limit address
;
dirbuf .dw 0 ; directory buffer location
;
scbpb: ; BDOS SCB get/set parm block
scboff .db $54 ; media open door flag
scbop .db $FF ; set a byte
scbval .dw $FF ; value to set
;
mapwrk .fill (4 * 16),$FF ; working copy of drive map
;
devtbl: ; device table
@ -1866,10 +1893,10 @@ stack .equ $ ; stack top
; Messages
;
indent .db " ",0
msgban1 .db "ASSIGN v1.1a for RomWBW CP/M, 24-Dec-2019",0
msgban1 .db "ASSIGN v1.4 for RomWBW CP/M, 12-May-2020",0
msghb .db " (HBIOS Mode)",0
msgub .db " (UBIOS Mode)",0
msgban2 .db "Copyright 2019, Wayne Warthen, GNU GPL v3",0
msgban2 .db "Copyright 2020, 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

44
Source/Apps/FDU/FDU.asm

@ -45,6 +45,8 @@
; - USE EOT=R TO END R/W AFTER ONE SECTOR INSTEAD
; OF USING PULSE TC
; 2020-01-05: V5.4 ADDED SUPPORT FOR DYNO FDC
; 2020-04-29: v5.5 ADDED SUPPORT FOR ETCHED PIXELS FDC
; 2020-12-12: v5.6 UPDATED SMALLZ80 TO NEW I/O ADDRESSES
;
;_______________________________________________________________________________
;
@ -79,6 +81,7 @@ FDC_RCSMC .EQU 6
FDC_RCWDC .EQU 7
FDC_SMZ80 .EQU 8
FDC_DYNO .EQU 9
FDC_EPFDC .EQU 10
;
; FDC MODE
;
@ -213,7 +216,7 @@ INIT5:
XOR A
RET
STR_BANNER .DB "Floppy Disk Utility (FDU) v5.4, 05-jAN-2020$"
STR_BANNER .DB "Floppy Disk Utility (FDU) v5.6, 12-Dec-2020$"
STR_BANNER2 .DB "Copyright (C) 2020, Wayne Warthen, GNU GPL v3","$"
STR_HBIOS .DB " [HBIOS]$"
STR_UBIOS .DB " [UBIOS]$"
@ -284,6 +287,7 @@ FDCTBL: ; LABEL CONFIG DATA
.DW STR_RCWDC, CFG_RCWDC
.DW STR_SMZ80, CFG_SMZ80
.DW STR_DYNO, CFG_DYNO
.DW STR_EPFDC, CFG_EPFDC
FDCCNT .EQU ($-FDCTBL)/4 ; FD CONTROLLER COUNT
;
; FDC LABEL STRINGS
@ -298,6 +302,7 @@ STR_RCSMC .TEXT "RC-SMC$"
STR_RCWDC .TEXT "RC-WDC$"
STR_SMZ80 .TEXT "SMZ80$"
STR_DYNO .TEXT "DYNO$"
STR_EPFDC .TEXT "EPFDC$"
;
; FDC CONFIGURATION BLOCKS
;
@ -398,11 +403,11 @@ CFG_RCWDC:
.DB _PCAT ; MODE=
;
CFG_SMZ80:
.DB 044H ; FDC MAIN STATUS REGISTER
.DB 045H ; FDC DATA PORT
.DB 074H ; FDC MAIN STATUS REGISTER
.DB 075H ; FDC DATA PORT
.DB 0FFH ; DATA INPUT REGISTER
.DB 042H ; DIGITAL OUTPUT REGISTER (LATCH)
.DB 047H ; DCR
.DB 072H ; DIGITAL OUTPUT REGISTER (LATCH)
.DB 077H ; DCR
.DB 0FFH ; DACK
.DB 0FFH ; TERMINAL COUNT (W/ DACK)
.DB 0FFH ; PSEUDO DMA DATA PORT
@ -419,6 +424,17 @@ CFG_DYNO:
.DB 0FFH ; PSEUDO DMA DATA PORT
.DB _PCAT ; MODE=
;
CFG_EPFDC:
.DB 048H ; FDC MAIN STATUS REGISTER
.DB 049H ; FDC DATA PORT
.DB 0FFH ; DATA INPUT REGISTER
.DB 04AH ; DIGITAL OUTPUT REGISTER (LATCH)
.DB 04BH ; DCR
.DB 0FFH ; DACK
.DB 04CH ; TERMINAL COUNT (W/ DACK)
.DB 0FFH ; PSEUDO DMA DATA PORT
.DB _PCAT ; MODE=
;
FDCID .DB 0 ; FDC IDENTIFIER (0 INDEXED)
FDCBM .DB 0 ; FDC ID BITMAP
FDCLBL .DW 0 ; POINTER TO ACTIVE FDC LABEL STRING
@ -437,6 +453,7 @@ FSS_MENU:
.TEXT " (H) RC2014 WDC (SMB)\r\n"
.TEXT " (I) SmallZ80 Expansion\r\n"
.TEXT " (J) Dyno-Card FDC, D1030\r\n"
.TEXT " (K) RC2014 EPFDC\r\n"
.TEXT " (X) Exit\r\n"
.TEXT "=== OPTION ===> $\r\n"
;
@ -1517,6 +1534,7 @@ MD_MAP:
.DB %00000001 ; RCWDC POLL
.DB %00000001 ; SMZ80 POLL
.DB %00000001 ; DYNO POLL
.DB %00000001 ; EPFDC POLL
;
; MEDIA DESCRIPTION BLOCK
;
@ -1877,7 +1895,7 @@ FM_DRAW0B: ; ZETA, DIO3
LD A,(FST_DOR)
AND 00000010B
JR FM_DRAW1
FM_DRAW0C: ; DIDE, N8, ZETA2, RCWDC, SMZ80, DYNO
FM_DRAW0C: ; DIDE, N8, ZETA2, RCWDC, SMZ80, DYNO, EPFDC
LD A,(FST_DOR)
AND 11110000B
JR FM_DRAW1
@ -2030,7 +2048,7 @@ FM_MOTOR0B: ; ZETA, DIO3
LD A,(FST_DOR)
AND 00000010B
JR FM_MOTOR1
FM_MOTOR0C: ; DIDE, N8, ZETA2, RCWDC, SMZ80, DYNO
FM_MOTOR0C: ; DIDE, N8, ZETA2, RCWDC, SMZ80, DYNO, EPFDC
LD A,(FST_DOR)
AND 11110000B
JR FM_MOTOR1
@ -2769,7 +2787,7 @@ FC_INIT1: ; DIO
FC_INIT2: ; ZETA, DIO3
LD A,(FCD_DORB)
JR FC_INIT5
FC_INIT3: ; DIDE, N8, ZETA2, RCWDC, SMZ80, DYNO
FC_INIT3: ; DIDE, N8, ZETA2, RCWDC, SMZ80, DYNO, EPFDC
LD A,(FCD_DORC)
JR FC_INIT5
FC_INIT4: ; WDSMC
@ -2813,7 +2831,7 @@ FC_RESETFDC1: ; ZETA, DIO3, RCSMC
POP AF
OUT (C),A
JR FC_RESETFDC3
FC_RESETFDC2: ; DIDE, N8, ZETA2, RCWDC, SMZ80, DYNO
FC_RESETFDC2: ; DIDE, N8, ZETA2, RCWDC, SMZ80, DYNO, EPFDC
LD A,0
OUT (C),A
LD A,(FST_DOR)
@ -2840,7 +2858,7 @@ FC_PULSETC:
;RES 0,A
;OUT (C),A
;JR FC_PULSETC2
;FC_PULSETC1: ; DIDE, N8, ZETA2, RCWDC, SMZ80, DYNO
;FC_PULSETC1: ; DIDE, N8, ZETA2, RCWDC, SMZ80, DYNO, EPFDC
;LD C,(IY+CFG_TC)
;IN A,(C)
;JR FC_PULSETC2
@ -2872,7 +2890,7 @@ FC_MOTORON2: ; ZETA, DIO3
LD HL,FST_DOR ; POINT TO FDC_DOR
SET 1,(HL)
JR FC_MOTORON5
FC_MOTORON3: ; DIDE, N8, ZETA2, RCWDC, SMZ80, DYNO
FC_MOTORON3: ; DIDE, N8, ZETA2, RCWDC, SMZ80, DYNO, EPFDC
LD HL,FST_DOR ; POINT TO FDC_DOR
LD A,(HL) ; START WITH CURRENT DOR
AND 11111100B ; GET RID OF ANY ACTIVE DS BITS
@ -2936,7 +2954,7 @@ FC_MOTOROFF2: ; ZETA, DIO3
LD HL,FST_DOR ; POINT TO FDC_DOR
RES 1,(HL)
JR FC_MOTOROFF5
FC_MOTOROFF3: ; DIDE, N8, ZETA2, RCWDC, SMZ80, DYNO
FC_MOTOROFF3: ; DIDE, N8, ZETA2, RCWDC, SMZ80, DYNO, EPFDC
LD HL,FST_DOR ; POINT TO FDC_DOR
LD A,DORC_INIT
LD (HL),A
@ -3806,7 +3824,7 @@ DORB_BR500 .EQU 10100000B ; 500KBPS
;
DORB_INIT .EQU DORB_BR250
;
; *** DIDE/N8/ZETA2/RCWDC/SMZ80/DYNO ***
; *** DIDE/N8/ZETA2/RCWDC/SMZ80/DYNO/EPFDC ***
;
DORC_INIT .EQU 00001100B ; SOFT RESET INACTIVE, DMA ENABLED
;

8
Source/Apps/FDU/FDU.txt

@ -510,5 +510,11 @@ WW 9/5/2018: v5.3
operation.
- Added support for SmallZ80
WW 5/1/2020: v5.4
WW 1/5/2020: v5.4
- Added support for Dyno (based on work by Steve Garcia)
WW 4/29/2020: v5.5
- Added support for Etched Pixels FDC
WW 12/12/2020: v5.6
- Updated SmallZ80 support for new I/O map

29
Source/Apps/RTC.asm

@ -25,6 +25,8 @@
;
;[2020/02/02] v1.5 PMS Basic command line support
;
;[2020/05/15] v1.6 Added Warm Start option
;
; Constants
;
mask_data .EQU %10000000 ; RTC data line
@ -43,8 +45,14 @@ PORT_EZZ80 .EQU $C0 ; RTC port for EZZ80 (actually does not have one!!!)
BDOS .EQU 5 ; BDOS invocation vector
FCB .EQU 05CH ; Start of command line
BID_BOOT .EQU $00
HB_BNKCALL .EQU $FFF9
;BID_BOOT .EQU $00
;HB_BNKCALL .EQU $FFF9
BF_SYSRESET .EQU $F0 ; RESTART SYSTEM
BF_SYSRES_INT .EQU $00 ; RESET HBIOS INTERNAL
BF_SYSRES_WARM .EQU $01 ; WARM START (RESTART BOOT LOADER)
BF_SYSRES_COLD .EQU $02 ; COLD START
;
; Program
@ -1273,6 +1281,9 @@ RTC_UCL:
CP 'B'
JP Z,RTC_TOP_LOOP_BOOT
CP 'W'
JP Z,RTC_TOP_LOOP_WARMSTART
CP 'C'
JP Z,RTC_TOP_LOOP_CHARGE
@ -1320,9 +1331,15 @@ DELAY_LOOP: ; LOOP IS 26TS
OR L ; 4TS
JR NZ,DELAY_LOOP ; 12TS
; RESTART SYSTEM FROM ROM BANK 0, ADDRESS $0000
LD A,BID_BOOT ; BOOT BANK
LD HL,0 ; ADDRESS ZERO
CALL HB_BNKCALL ; DOES NOT RETURN
LD B,BF_SYSRESET ; SYSTEM RESTART
LD C,BF_SYSRES_COLD ; COLD START
CALL $FFF0 ; CALL HBIOS
RTC_TOP_LOOP_WARMSTART:
LD B,BF_SYSRESET ; SYSTEM RESTART
LD C,BF_SYSRES_WARM ; WARM START
CALL $FFF0 ; CALL HBIOS
RTC_TOP_LOOP_CHARGE:
LD DE,RTC_TOP_LOOP1_CHARGE
@ -1580,7 +1597,7 @@ RTC_HELP_MSG:
.DB 0Ah, 0Dh ; line feed and carriage return
.TEXT "RTC: Version 1.5"
.DB 0Ah, 0Dh ; line feed and carriage return
.TEXT "Commands: E)xit T)ime st(A)rt S)et R)aw L)oop C)harge N)ocharge D)elay I)nit G)et P)ut B)oot H)elp"
.TEXT "Commands: E)xit T)ime st(A)rt S)et R)aw L)oop C)harge N)ocharge D)elay I)nit G)et P)ut B)oot W)arm-start H)elp"
.DB 0Ah, 0Dh ; line feed and carriage return
.DB "$" ; Line terminator

8
Source/Apps/Survey.asm

@ -600,9 +600,11 @@ PORTLP:
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
; inactive port could return 0xFF or 0x78 or the port address
cmp c
jz nextpt
cpi 0FFh
jz nextpt
cpi 078h
jz nextpt
ISPORT:

13
Source/Apps/SysCopy.asm

@ -17,6 +17,7 @@
; Change Log:
; 2016-04-24 [WBW] Updated to preserve MBR partition table
; 2020-02-17 [WBW] Updated for CP/M 3
; 2020-05-16 [WBW] Fixed SPT for CP/M 3
;_______________________________________________________________________________
;
; ToDo:
@ -441,6 +442,16 @@ setdsk:
ld c,(hl)
inc hl
ld b,(hl) ; BC := sectors per track
; handle CP/M 3 physical sector size
ld a,(v3os) ; CP/M 3 or greater?
or a ; set flags
jr z,setdsk1 ; if not, continue
; adjust SPT for CP/M 3 physical sector size
srl b ; divide SPT by 4
rr c
srl b
rr c
setdsk1:
ld (actspt),bc ; save it
; ensure there are system tracks (verify that offset field in DPB is not zero)
ld de,12 ; offset field is 12 bytes into DPB
@ -952,7 +963,7 @@ bpb_hl .dw 0 ; reg HL
;
; Messages
;
msgban1 .db "SYSCOPY v2.0 for RomWBW CP/M, 17-Feb-2020$"
msgban1 .db "SYSCOPY v2.1 for RomWBW CP/M, 15-May-2020$"
msgv2 .db " (CP/M 2 Mode)$"
msgv3 .db " (CP/M 3 Mode)$"
msgban2 .db "Copyright 2020, Wayne Warthen, GNU GPL v3$"

12
Source/Apps/Timer.asm

@ -41,8 +41,11 @@ rmn .equ 1 ; intended CBIOS version - minor
;
bf_sysver .equ $F1 ; BIOS: VER function
bf_sysget .equ $F8 ; HBIOS: SYSGET function
bf_sysset .equ $F9 ; HBIOS: SYSGET function
bf_sysgettimer .equ $D0 ; TIMER subfunction
bf_syssettimer .equ $D0 ; TIMER subfunction
bf_sysgetsecs .equ $D1 ; SECONDS subfunction
bf_syssetsecs .equ $D1 ; SECONDS subfunction
;
;===============================================================================
; Code Section
@ -106,6 +109,15 @@ process00:
jr process00 ; continue looking for options
;
process0:
;
; Test of API function to set seconds value
;ld b,bf_sysset ; HBIOS SYSGET function
;ld c,bf_syssetsecs ; SECONDS subfunction
;ld de,0 ; set seconds value
;ld hl,1000 ; ... to 1000
;rst 08 ; call HBIOS, DE:HL := seconds value
;
; get and print seconds value
call crlf2 ; formatting
;
process1:

6
Source/Apps/Tune/Build.cmd

@ -5,9 +5,11 @@ set TOOLS=../../../Tools
set PATH=%TOOLS%\tasm32;%PATH%
set TASMTABS=%TOOLS%\tasm32
tasm -t180 -g3 -fFF Tune.asm Tune.com Tune.lst
tasm -t180 -g3 -fFF -dWBW Tune.asm Tune.com Tune.lst
tasm -t180 -g3 -fFF -dZX Tune.asm Tunezx.com Tunezx.lst
tasm -t180 -g3 -fFF -dMSX Tune.asm Tunemsx.com Tunemsx.lst
if errorlevel 1 goto :eof
copy /Y Tune.com ..\..\..\Binary\Apps\
copy /Y Tune*.com ..\..\..\Binary\Apps\
copy /Y Tunes\*.* ..\..\..\Binary\Apps\Tunes\

14
Source/Apps/Tune/Makefile

@ -1,11 +1,19 @@
OBJECTS = Tune.com
OBJECTS = Tune.com Tunezx.com Tunemsx.com
DEST = ../../../Binary/Apps
TOOLS = ../../../Tools
include $(TOOLS)/Makefile.inc
Tune.com: Tune.asm
$(TASM) Tune.asm Tune.com
DEPS := Tune.asm $(shell find . -name '*.inc')
Tune.com: $(DEPS)
$(TASM) -dWBW Tune.asm Tune.com Tune.lst
Tunezx.com: $(DEPS)
$(TASM) -dZX Tune.asm Tunezx.com Tunezx.lst
Tunemsx.com: $(DEPS)
$(TASM) -dMSX Tune.asm Tunemsx.com Tunemsx.lst
all::
mkdir -p $(DEST)/Tunes

719
Source/Apps/Tune/Tune.asm

File diff suppressed because it is too large

86
Source/Apps/Tune/cli.inc

@ -0,0 +1,86 @@
CLI_ABRT_IF_OPT_FIRST:
LD A, (FCB+1)
CP '-' ; OPTION FIRST OR - MISSING FILENAME?
JP Z, ERRCMD ; SHOW USAGE
RET
CLI_HAVE_HBIOS_SWITCH:
LD HL, CLIARGS ; TEST FOR --HBIOS ON COMMAND LINE
LD DE, HBIOSOPT
CALL STRINDEX
JR NZ, CLI_HAVE_HBIOS_SWITCH1
OR $FF ; MATCHED --HBIOS
LD (HBIOSMD), A
LD BC,(BF_SYSGET*256)+BF_SND
RST 08 ; CHECK WE HAVE
XOR A ; AT LEAST ONE
CP E ; SOUND DEVICE
RET NZ
JP ERRHW
CLI_HAVE_HBIOS_SWITCH1 ; NOT MATCHED --HBIOS
XOR A
LD (HBIOSMD), A
RET
CLI_ABRT_UNSUPPFILTYP:
PUSH AF
ISHBIOS
JR Z, CLI_ABRT_UNSUPPFILTYP1
POP AF
CP TYPMYM
RET NZ
ERRWITHMSG(MSGUNSUP) ; EXIT WITH UNSUPPORTED FILE TYPE MESSAGE
CLI_ABRT_UNSUPPFILTYP1:
POP AF
RET
CLI_OCTAVE_ADJST: ; SEARCH FOR OCTAVE ADJUSTMENT SWITCH (-n or +n)
LD HL, CLIARGS ; TEST FOR --HBIOS ON COMMAND LINE
LD DE, DOWN1
CALL STRINDEX
JR NZ, CLI_OCTAVE_ADJST1
LD A, -1
JR CLI_OCTAVE_ADJST5
CLI_OCTAVE_ADJST1:
LD HL, CLIARGS ; TEST FOR --HBIOS ON COMMAND LINE
LD DE, DOWN2
CALL STRINDEX
JR NZ, CLI_OCTAVE_ADJST2
LD A, -2
JR CLI_OCTAVE_ADJST5
CLI_OCTAVE_ADJST2:
LD HL, CLIARGS ; TEST FOR --HBIOS ON COMMAND LINE
LD DE, UP1
CALL STRINDEX
JR NZ, CLI_OCTAVE_ADJST3
LD A, 1
JR CLI_OCTAVE_ADJST5
CLI_OCTAVE_ADJST3:
LD HL, CLIARGS ; TEST FOR --HBIOS ON COMMAND LINE
LD DE, UP2
CALL STRINDEX
JR NZ, CLI_OCTAVE_ADJST4
LD A, 2
JR CLI_OCTAVE_ADJST5
CLI_OCTAVE_ADJST4:
LD A, 0
CLI_OCTAVE_ADJST5:
LD (OCTAVEADJ), A
RET
HBIOSOPT: .DB "--HBIOS", 0
DOWN1 .DB "-t1", 0 ; DOWN AN OCTAVE
DOWN2 .DB "-t2", 0 ; DOWN TWO OCTAVE
UP1 .DB "+t1", 0 ; UP AN OCTAVE
UP2 .DB "+t2", 0 ; UP TWO OCTAVE

4
Source/Apps/Tune/cpm.inc

@ -0,0 +1,4 @@
CLIARGS .EQU $81
RESTART .EQU $0000 ; CP/M restart vector
BDOS .EQU $0005 ; BDOS invocation vector
FCB .EQU $5C ; Location of default FCB

15
Source/Apps/Tune/hbios.inc

@ -0,0 +1,15 @@
IDENT .EQU $FFFE ; loc of RomWBW HBIOS ident ptr
;
RMJ .EQU 3 ; intended CBIOS version - major
RMN .EQU 1 ; intended CBIOS version - minor
;
BF_SYSVER .EQU $F1 ; BIOS: VER function
BF_SYSGET .EQU $F8 ; HBIOS: SYSGET function
;
BF_SND .EQU $50
BF_SNDRESET .EQU BF_SND + 0 ; RESET SOUND SYSTEM
BF_SNDVOL .EQU BF_SND + 1 ; REQUEST SOUND VOL - L CONTAINS VOLUME (255 MAX, 0 SILENT) - SCALED AS REQUIRED BY DRIVER (EG: MAPS TO JUST 4 BIT RESOLUTION FOR SN76489)
BF_SNDPRD .EQU BF_SND + 2 ; REQUEST SOUND PERIOD - HL CONTAINS DRIVER SPECIFIC VALUE
BF_SNDNOTE .EQU BF_SND + 3 ; REQUEST NOTE - L CONTAINS NOTE - EACH VALUE IS QUARTER NOTE
BF_SNDPLAY .EQU BF_SND + 4 ; INITIATE THE REQUESTED SOUND COMMAND
BF_SNDQUERY .EQU BF_SND + 5 ; E IS SUBFUNCTION

175
Source/Apps/Tune/printing.inc

@ -0,0 +1,175 @@
;
; Print character in A without destroying any registers
;
PRTCHR:
PUSH BC ; save registers
PUSH DE
PUSH HL
LD E,A ; character to print in E
LD C,$02 ; BDOS function to output a character
CALL BDOS ; do it
POP HL ; restore registers
POP DE
POP BC
RET
;
PRTDOT:
;
; shortcut to print a dot preserving all regs
PUSH AF ; save af
LD A,'.' ; load dot char
CALL PRTCHR ; print it
POP AF ; restore af
RET ; done
;
PRTCR:
;
; shortcut to print a carriage return preserving all regs
PUSH AF ; save af
LD A,13 ; load CR value
CALL PRTCHR ; print it
POP AF ; restore af
RET ; done
;
; Print a zero terminated string at (DE) without destroying any registers
;
PRTSTR:
PUSH 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

39
Source/Apps/Tune/strings.inc

@ -0,0 +1,39 @@
STRINDEX: ; SEARCH FOR STRING AT DE WITHIN STRING AT HL
LD B, 0
LD C, 0
TRYNEXT:
PUSH HL
PUSH DE
CALL STRCMP
POP DE
POP HL
RET Z
INC HL
INC BC
LD A, (HL)
OR A
JR NZ, TRYNEXT
OR $FF ; RETURN NZ
RET
STRCMP: ; COMPARE STRING AT HL WITH DE - RETURN Z IF LIKE
LD A, (DE)
OR A
RET Z
LD B, A
LD A, (HL)
OR A
JR NZ, STRCMP1
OR $FF ; END OF STRING HL - SO NOT FOUND
RET
STRCMP1
CP B
RET NZ
INC HL
INC DE
JR STRCMP

60
Source/Apps/Tune/timing.inc

@ -0,0 +1,60 @@
;
; Wait for quark play time. Can use hardware timer if
; supported by hardware or simple delay loop otherwise.
; Delay loop requires QDLY to be pre-set to to achieve
; optimal 20ms wait time.
;
WAITQ LD A,(WMOD) ; Get delay mode
OR A ; Set flags
JR Z,DLY ; Delay mode
;
; Timer loop
CALL TIM2 ; Read timer LSB into A
LD C,A ; Init prev value
TIM1 PUSH BC ; Save prev value
CALL TIM2 ; Read timer LSB into A
POP BC ; Recover prev value
CP C ; Compare to prev
RET NZ ; Done if changed
JR TIM1 ; Else, loop
;
TIM2 LD B,$F8 ; BIOS SYSGET function
LD C,$D0 ; TIMER sub-function
RST 08 ; Call BIOS
LD A,L ; MSB to A
RET ; Return to loop
;
; Delay spin loop (40 tstates per loop)
DLY LD BC,(QDLY) ; Load quark delay factor
DLY1 DEC BC ; [6]
NOP ; [4]
NOP ; [4]
NOP ; [4]
NOP ; [4]
LD A,B ; [4]
OR C ; [4]
JP NZ,DLY1 ; [10]
RET
;
; Test for timer running to determine if it can be used for delay
; Return string message in DE
; Assigned (WMOD) with 0 if no hardware time, 1 if hardware timer found
;
PROBETIMER:
LD B,BF_SYSGET ; HBIOS: GET function
LD C,$D0 ; TIMER subfunction
RST 08 ; DE:HL := current tick count
LD A,L ; DE:HL == 0?
OR H
OR E
OR D
LD A,0 ; Assume no timer
LD DE,MSGDLY ; Delay mode msg
JR Z,SETDLY ; If tick count is zero, no timer active
LD A,$FF ; Value for timer active
LD DE,MSGTIM ; Timer mode msg
SETDLY:
LD (WMOD),A ; Save wait mode
RET

4
Source/Apps/Tune/tune.inc

@ -0,0 +1,4 @@
#DEFINE ISHBIOS LD A, (HBIOSMD) \ OR A
#DEFINE PRTSTRDE(X) LD DE, X \ CALL PRTSTR
#DEFINE PRTCRLF CALL CRLF
#DEFINE ERRWITHMSG(X) LD DE, X \ JP ERR

10
Source/Apps/XM/Build.cmd

@ -10,13 +10,21 @@ set ZXLIBDIR=%TOOLS%\cpm\lib\
set ZXINCDIR=%TOOLS%\cpm\include\
zx mac xmdm125.asm $PO
zx slr180 -xmhb/HF
rem zx slr180 -xmuf/HF
zx mload25 XM=xmdm125,xmhb
rem zx slr180 -xmuf/HF
rem zx mload25 XMUF=xmdm125,xmuf
zx slr180 -xmhb_old/HF
zx mload25 XMOLD=xmdm125,xmhb_old
rem set PROMPT=[Build] %PROMPT%
rem %comspec%
copy /Y XM.com ..\..\..\Binary\Apps\
rem copy /Y XMUF.com ..\..\..\Binary\Apps\
copy /Y XMOLD.com ..\..\..\Binary\Apps\
rem pause

11
Source/Apps/XM/Makefile

@ -1,5 +1,5 @@
#OBJECTS = xm.com xmuf.com
OBJECTS = xm.com
OBJECTS = xm.com xmold.com
#OBJECTS += xmuf.com
DEST = ../../../Binary/Apps
TOOLS = ../../../Tools
OTHERS = *.hex
@ -9,5 +9,8 @@ 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
xmuf.com: xmdm125.hex xmuf.hex
$(ZXCC) $(CPM)/MLOAD25 XMUF=xmdm125,xmuf
xmold.com: xmdm125.hex xmhb_old.hex
$(ZXCC) $(CPM)/MLOAD25 XMOLD=xmdm125,xmhb_old

77
Source/Apps/XM/XModem Xfer Anomaly.txt

@ -0,0 +1,77 @@
XModem 12.5 & Tera Term Anomaly Analysis
----------------------------------------
Protocol Notes:
- During protocol startup, the receiver NAKs the sender repeatedly
to let the sender know it can start sending.
- Normally, the receiver sends a NAK character to ask the sender to
resend a packet.
- Prior to receiving the first packet, the receiver may send a "C"
or a "CK" instead of a NAK. This mechanism is used to inform the
sender that the receiver wants to use (C)RC error detection
instead of checksum error detection and optionally 1(K) packet sizes.
- After the first packet exchange, a NAK is always used to
request a packet be resent.
Anomalous Exchange Description:
XModem on RomWBW is being used to receive a file being sent
by Tera Term on a Windows PC...
- XModem is started in receive mode
- User starts process of selecting a file to send on Tera Term
- XModem begins sending "CK" sequences as described above
to wake up the sender
- Tera Term buffers incoming "CK" sequences while user is selecting
a file to send
- User completes file selection
- Tera Term receives the first "CK" which was buffered while user
was selecting a file
- Tera Term correctly receives the first "CK", sets itself to
use CRC and 1K packets, then sends the first packet
- While waiting for Tera Term to send the first packet, XModem
is repeatedly timing out and resending the "CK" sequence
- For each timeout, XModem spends 1 second flushing any incoming
characters from the sender (it assumes it is flushing line garbage).
- IFF the first packet from Tera Term starts to arrive during this
1 second flushing interval, XModem gobbles up and discards the
first packet sent by Tera Term
- XModem then sends a new "CK" because it is still waiting for the
first packet (having just flushed the actual first packet)
- Tera Term has already switched out of "first packet" mode and will
now only respond to an actual NAK character, so it ignores all of
the CKs send from XModem
- XModem continues to send CKs and Tera Term continues to ignore them
until XModem hits a retry threshold
- When XModem hits the retry threshold, it attempts to switch from
CRC to Checksum assuming the sender was not capable of using
CRCs
- XModem now sends a NAK character because that is what is used for
for first packet NAKing in Checksum mode
- Tera Term sees the NAK and resends the first packet, but appends a
CRC instead of a Checksum because Tera Term is still in CRC mode
- XModem fails the Tera Term first packet resends because it is
looking for a Checksum and Tera Term is appending CRCs.
- XModem eventually gives up.
Summary of failure:
If Tera Term happens to start sending the first packet during the
one second "flush" window of XModem, the exchange will fail during
the startup sequence.
Since the precise start timing of the first packet is dependent on
the time the user takes to select a file, the occurrence of the
failure is essentially random.
The timeout used by XModem is about 5 seconds followed by the 1
second line flush. So, there is a 1 in 6 chance that the protocol
will fail to startup successfully.
Mitigation:
- Modified the receive timeout recovery to *not* flush the incoming
buffer for one second. Flushing in this scenario makes no sense
anyway because a timeout just occurred meaning no data is being
received.

97
Source/Apps/XM/xmdm125.asm

@ -71,7 +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
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
@ -758,7 +758,10 @@ RECVOPT:MVI A,'K' ; First off, default to 1K mode
CALL RCVOPC ; Check 4th (or 5th) option
ENDIF
;
JMP OPTERR ; If 5th or 6th option, whoops!
; [WBW] Added to support port number
CALL RCVOPC ; Check 5th (or 6th) option
;
JMP OPTERR ; If 7th or 8th option, whoops!
;
RCVOPC: INX H ; Increment pointer to next character
MOV A,M ; Get option character HL points to
@ -790,7 +793,7 @@ CHK3RD: CPI 'X' ; Got an "X" for first option?
CHK4TH:
IF MBFMSG ; Allowing "RM" for message uploads?
CPI 'M' ; Got an "M" for message upload?
JNZ CHK5TH ; If not, bad option
JNZ CHK5TH ; Nope, try next
STA MSGFLG ; If "M", set MSGFLG
MVI A,'P' ; Also, set PRVTFL
STA PRVTFL
@ -804,11 +807,21 @@ CHK4TH:
CHK5TH:
IF NDESC ; Allowing "RN" to skip upload descript?
CPI 'N' ; Got an 'N'?
JNZ BADROP ; If nope, is NG..
JNZ CHK6TH ; Nope, try next
STA NDSCFL ; else set flag to skip descript phase
RET
ENDIF
;
CHK6TH:
; [WBW] Get target serial port (0-9 supported)
CPI '0'
JC BADROP ; If < 0, out of range
CPI '9' + 1
JNC BADROP ; If > 9, out of range
SUI '0' ; Make binary
STA PORT
RET
;
BADROP: POP PSW ; Restore stack
JMP OPTERR ; is bad option
;
@ -817,9 +830,10 @@ BADROP: POP PSW ; Restore stack
;
ALLSET: CALL GETCHR
CALL GETCHR
LDA PORT ; [WBW] Pass serial port to driver
CALL MINIT
STA CPUMHZ ; WBW: Save CPU speed from MINIT
SHLD RCVSCL ; WBW: Save rcv loop scalar from MINIT
STA CPUMHZ ; [WBW] Save CPU speed from MINIT
SHLD RCVSCL ; [WBW] Save rcv loop scalar from MINIT
;
; Jump to appropriate function
;
@ -920,7 +934,8 @@ SKSK2: CALL ILPRT
DB 'XMODEM L CAT.LBR CAT.COM send a file from a library'
DB CR,LF
DB 'XMODEM LK CAT.LBR CAT.COM send in 1k blocks',CR,LF
DB ' The ".LBR" file extension may be omitted',CR,LF,LF
DB ' The ".LBR" file extension may be omitted',CR,LF
DB ' Add "0"-"9" to specify serial port',CR,LF,LF
DB 'XMODEM R HELLO.DOC receive a file from you'
DB CR,LF
DB 'XMODEM RP HELLO.DOC receive in a private area'
@ -939,7 +954,8 @@ SKSK2: CALL ILPRT
;
IF NOT LUXMOD
DB ' Add "C" for forced checksum ("RC" "RPC")',CR,LF
DB ' Add "X" for forced 128 byte protocol ("RX" "RPX")'
DB ' Add "X" for forced 128 byte protocol ("RX" "RPX")',CR,LF
DB ' Add "0"-"9" to specify serial port'
DB CR,LF
DB ' "R" switches from CRC to checksum after 5 retries'
DB CR,LF,LF
@ -2214,13 +2230,13 @@ ILLDU: CALL ERXIT
RCVRECD:XRA A ; Initialize error count to zero
STA ERRCT
;
;WBW BEGIN: Be more patient waiting for host to start sending file
LDA FRSTIM ; WBW: Get first time flag
ORA A ; WBW: Set CPU flags
JNZ RCVRPT ; WBW: If not first time, bypass
MVI A,-10 ; WBW: Else increase error limit
STA ERRCT ; WBW: Save error new limit
;WBW END
; [WBW] BEGIN: Be more patient waiting for host to start sending file
LDA FRSTIM ; Get first time flag
ORA A ; Set CPU flags
JNZ RCVRPT ; If not first time, bypass
MVI A,-10 ; Else increase error limit
STA ERRCT ; Save error new limit
; [WBW] END
;
RCVRPT: IF CONFUN ; Check for function key?
CALL FUNCHK ; Yeah, why not?
@ -2233,7 +2249,7 @@ RCVRPT: IF CONFUN ; Check for function key?
ENDIF
;
;MVI B,10-1 ; 10-second timeout
MVI B,5-1 ; WBW: 5-second timeout
MVI B,5-1 ; [WBW] 5-second timeout
CALL RECV ; Get any character received
JC RCVSTOT ; Timeout
;
@ -2259,7 +2275,7 @@ RCVRPTB:CPI SOH ; 'SOH' for a 128-byte block?
RCVSERR:MVI B,1 ; Wait for 1 second
CALL RECV ; After last char. received
JNC RCVSERR ; Loop until sender done
LDA FRSTIM ; Is it the first time?
RCVSER1:LDA FRSTIM ; Is it the first time?
ORA A
MVI A,NAK
JNZ RCVSER2 ; If not first time, send NAK
@ -2320,7 +2336,9 @@ DELFILE:LXI D,FCB ; Point to file
;
; Timed out on receive
;
RCVSTOT:JMP RCVSERR ; Bump error count, etc.
;RCVSTOT:JMP RCVSERR ; Bump error count, etc.
; [WBW] Bypass line flush if error is timeout
RCVSTOT:JMP RCVSER1 ; Bump error count, etc.
;
; Got SOH or STX - get block number, block number complemented
;
@ -3457,9 +3475,18 @@ RSDMA: LXI D,TBUF ; Reset DMA address
WRERR: CALL RSDMA ; Reset DMA to normal
MVI C,CAN ; Cancel
CALL SEND ; Sender
; [WBW] BEGIN: RCVSABT does not return, so file write error
; message was never being displayed. Swapped things around
; to fix this.
; CALL RCVSABT ; Kill receive file
; CALL ERXIT ; Exit with msg:
; DB '++ Error writing file ++$'
; [WBW] -----
CALL ILPRT ; Dispaly error msg
DB CR,LF,'++ Error writing file ++',CR,LF,0
CALL RCVSABT ; Kill receive file
CALL ERXIT ; Exit with msg:
DB '++ Error writing file ++$'
; [WBW] END
;
; Receive a character - timeout time is in 'B' in seconds. Entry via
; 'RECVDG' deletes garbage characters on the line. For example, having
@ -3470,11 +3497,17 @@ RECVDG: CALL GETCHR
CALL GETCHR
;
RECV: PUSH D ; Save 'DE' regs.
;WBW BEGIN: Use dynamic CPU speed
;
; [WBW] BEGIN: Check immediately for char pending to avoid delay
CALL RCVRDY ; Input from modem ready
JZ MCHAR ; Got the character
; [WBW] END
;
; [WBW] BEGIN: Use dynamic CPU speed
; MVI E,MHZ ; Get the clock speed
LDA CPUMHZ ; Get the clock speed
MOV E,A ; Put speed in E
;WBW END
; [WBW] END
XRA A ; Clear the 'A' reg.
;
MSLOOP: ADD B ; Number of seconds
@ -3483,12 +3516,12 @@ MSLOOP: ADD B ; Number of seconds
MOV B,A ; Put total value back into 'B'
;
MSEC: IF NOT BYEBDOS
;WBW BEGIN: Use scalar passed in by patch
; [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
; [WBW] END
ENDIF
;
IF BYEBDOS
@ -3567,7 +3600,7 @@ CARCK2: LDA OPTSAV ; Get option
; Delay - 100 millisecond delay.
;
DELAY: PUSH B ; Save 'BC'
; WBW BEGIN: Use dynamic CPU speed
; [WBW] BEGIN: Use dynamic CPU speed
; Loop below is 105TS on Z80 and 96TS on Z180
; Approx 1024 iter per 100ms per MHz
; Loop time below extended to accommodate CPU speeds up to 64MHz
@ -3578,7 +3611,7 @@ DELAY: PUSH B ; Save 'BC'
RLC ; * 2, A now has MHz * 4
MOV B,A ; Use as high byte
MVI C,0 ; Zero low byte, BC now has MHz * 1024
; WBW END
; [WBW] END
DELAY2: DCX B ; Update count
MOV A,B ; Get MSP byte
ORA C ; Count = zero?
@ -3967,7 +4000,7 @@ INPUT: PUSH H ; Save current values
PUSH D
PUSH B
;
; WBW BEGIN: Use dynamic CPU speed
; [WBW] BEGIN: Use dynamic CPU speed
;INPUT1: LXI D,1200 ; Outer loop count (about 2 minutes)
;;
;INPUT2: LXI B,MHZ*100 ; Roughly 100 ms.
@ -3976,7 +4009,7 @@ INPUT1: LXI D,468 ; Outer loop count (about 2 minutes)
INPUT2: LDA CPUMHZ ; CPU MHz to A
MOV B,A ; Put in B
MVI C,0 ; Zero C, BC is now CPU MHz * 256, ~256ms
; WBW END
; [WBW] END
;
INPUT3: PUSH D ; Save the outer delay count
PUSH B ; Save the inner delay count
@ -5655,8 +5688,9 @@ 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: DB MHZ ; WBW: CPU speed in MHz
RCVSCL: DW SCL ; WBW: Recv loop scalar
CPUMHZ: DB MHZ ; [WBW] CPU speed in MHz
RCVSCL: DW SCL ; [WBW] Recv loop scalar
PORT: DB 0FFH ; [WBW] Target serial port, FFH=not specified
;
EOFLG: DB 0 ; 'EOF' flag (1=yes)
EOFCTR: DB 0 ; EOF send counter
@ -5685,7 +5719,8 @@ OLINE: DS 80 ; Temporary buffer to store line
ORG ($+127)/128*128
;
DBUF EQU $ ; 16-record disk buffer
STACK EQU DBUF-2 ; Save original stack address
;STACK EQU DBUF-2 ; Save original stack address
STACK EQU 0B000H ; [WBW] Above 8000h for HBIOS Fastpath
LOGBUF EQU DBUF+128 ; For use with LOGCAL
;
;-----------------------------------------------------------------------

938
Source/Apps/XM/xmhb.180

File diff suppressed because it is too large

920
Source/Apps/XM/xmhb_old.180

@ -0,0 +1,920 @@
;=======================================================================
;
; 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 6600 ; 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,13000 ; Receive loop timeout scalar
LD (RCVSCL),HL ; ... for UART RCVRDY timing
;
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:
LD HL,7500 ; Receive loop timeout scalar
LD (RCVSCL),HL ; ... for ASCI RCVRDY timing
;
; 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:
LD HL,12000 ; Receive loop timeout scalar
LD (RCVSCL),HL ; ... for UART RCVRDY timing
;
; 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,12000 ; Receive loop timeout scalar
LD (RCVSCL),HL ; ... for UART RCVRDY timing
;
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

156
Source/BPBIOS/diskdefs

@ -297,121 +297,169 @@ diskdef wbw_rom1024
os 2.2
end
# UNA 512KB ROM (128KB reserved, 384KB ROM Disk)
# RomWBW 720K floppy media
diskdef wbw_fd720
seclen 512
tracks 160
sectrk 9
blocksize 2048
maxdir 128
skew 0
boottrk 4
os 2.2
end
diskdef una_rom512
# RomWBW 1.44M floppy media
diskdef wbw_fd144
seclen 512
tracks 12
sectrk 64
tracks 160
sectrk 18
blocksize 2048
maxdir 256
skew 0
boottrk 0
boottrk 2
os 2.2
end
# UNA 512KB ROM (128KB reserved, 896KB ROM Disk)
# RomWBW 360K floppy media
diskdef wbw_fd360
seclen 512
tracks 80
sectrk 9
blocksize 2048
maxdir 128
skew 0
boottrk 4
os 2.2
end
diskdef una_rom1024
# RomWBW 1.20M floppy media
diskdef wbw_fd120
seclen 512
tracks 28
sectrk 64
tracks 160
sectrk 15
blocksize 2048
maxdir 256
skew 0
boottrk 0
boottrk 2
os 2.2
end
# RomWBW 8MB Hard Disk, LU 0-3
diskdef wbw_hd0
# RomWBW 8320KB Hard Disk Slice (512 directory entry format)
# Legacy format, 512 dir entries, 16,630 sectors / slice
diskdef wbw_hd512
seclen 512
tracks 65
sectrk 256
tracks 1040
sectrk 16
blocksize 4096
maxdir 512
skew 0
boottrk 1
boottrk 16
os 2.2
end
diskdef wbw_hd1
# First 4 slices of wbw_hd512
diskdef wbw_hd512_0
seclen 512
tracks 130
sectrk 256
tracks 1040
sectrk 16
blocksize 4096
maxdir 512
skew 0
boottrk 66
boottrk 16
os 2.2
end
diskdef wbw_hd2
diskdef wbw_hd512_1
seclen 512
tracks 195
sectrk 256
tracks 2080
sectrk 16
blocksize 4096
maxdir 512
skew 0
boottrk 131
boottrk 1056
os 2.2
end
diskdef wbw_hd3
diskdef wbw_hd512_2
seclen 512
tracks 260
sectrk 256
tracks 3120
sectrk 16
blocksize 4096
maxdir 512
skew 0
boottrk 196
boottrk 2096
os 2.2
end
# RomWBW 720K floppy media
diskdef wbw_fd720
diskdef wbw_hd512_3
seclen 512
tracks 160
sectrk 9
blocksize 2048
maxdir 128
tracks 4160
sectrk 16
blocksize 4096
maxdir 512
skew 0
boottrk 4
boottrk 3136
os 2.2
end
# RomWBW 1.44M floppy media
diskdef wbw_fd144
# RomWBW 8MB Hard Disk (1024 directory entry format)
# New format, 1024 dir entries, 16,384 sectors / slice
# Pure filesystem image, no MBR prefix
diskdef wbw_hd1024
seclen 512
tracks 160
sectrk 18
blocksize 2048
maxdir 256
tracks 1024
sectrk 16
blocksize 4096
maxdir 1024
skew 0
boottrk 2
os 2.2
end
# RomWBW 360K floppy media
diskdef wbw_fd360
# First 4 slices of wbw_hd1024
# Assumes 128KB prefix (256 sectors)
diskdef wbw_hd1024_0
seclen 512
tracks 80
sectrk 9
blocksize 2048
maxdir 128
tracks 1040
sectrk 16
blocksize 4096
maxdir 1024
skew 0
boottrk 4
boottrk 18
os 2.2
end
# RomWBW 1.20M floppy media
diskdef wbw_fd120
diskdef wbw_hd1024_1
seclen 512
tracks 160
sectrk 15
blocksize 2048
maxdir 256
tracks 2064
sectrk 16
blocksize 4096
maxdir 1024
skew 0
boottrk 2
boottrk 1042
os 2.2
end
diskdef wbw_hd1024_2
seclen 512
tracks 3112
sectrk 16
blocksize 4096
maxdir 1024
skew 0
boottrk 2066
os 2.2
end
diskdef wbw_hd1024_3
seclen 512
tracks 4136
sectrk 16
blocksize 4096
maxdir 1024
skew 0
boottrk 3114
os 2.2
end

4
Source/BuildZRC.cmd

@ -0,0 +1,4 @@
@echo off
setlocal
setlocal & cd ZRC && call Build || exit /b 1 & endlocal

969
Source/CBIOS/cbios.asm

File diff suppressed because it is too large

2
Source/CBIOS/config.asm

@ -8,7 +8,7 @@ DSKTRACE .EQU FALSE ; ENABLE TRACING OF CBIOS DISK FUNCTION CALLS
CPM_LOC .EQU $D000 ; LOCATION OF START OF CCP
;
#IFDEF PLTWBW
CPM_END .EQU $FE00 ; ROMWBW HBIOS PROXY OCCUPIES TOP 2 PAGES OF MEMORY
CPM_END .EQU $FE00 ; ROMWBW HBIOS PROXY OCCUPIES TOP $280 BYTES OF MEMORY
#ENDIF
;
#IFDEF PLTUNA

12
Source/CBIOS/util.asm

@ -430,3 +430,15 @@ PRTHEXBUF1:
INC DE
DJNZ PRTHEXBUF1
RET
;
; LEFT SHIFT DE:HL BY B BITS (B > 0)
;
RL32:
OR A ; CLEAR CARRY
RL L
RL H
RL E
RL D
DJNZ RL32
RET

25
Source/CPM3/Build.cmd

@ -17,15 +17,16 @@ echo.
echo *** CPM Loader ***
echo.
zx RMAC -CPMLDR
zx Z80ASM -UTIL/MF
copy optdsk.lib ldropts.lib
zx Z80ASM -BIOSLDR/MF
move /Y biosldr.rel biosldrd.rel
zx LINK -CPMLDRD[L100]=CPMLDR,BIOSLDRD
zx LINK -CPMLDRD[L100]=CPMLDR,BIOSLDRD,UTIL
move /Y cpmldrd.com cpmldr.bin
copy optcmd.lib ldropts.lib
zx Z80ASM -BIOSLDR/MF
move /Y biosldr.rel biosldrc.rel
zx LINK -CPMLDRC[L100]=CPMLDR,BIOSLDRC
zx LINK -CPMLDRC[L100]=CPMLDR,BIOSLDRC,UTIL
move /Y cpmldrc.com cpmldr.com
rem pause
@ -101,3 +102,23 @@ rem Loader
tasm -t80 -g3 -fFF loader.asm loader.bin loader.lst
copy /b loader.bin + cpmldr.bin cpmldr.sys
rem Copy OS files to Binary directory
copy cpmldr.com ..\..\Binary\CPM3
copy cpmldr.sys ..\..\Binary\CPM3
copy ccp.com ..\..\Binary\CPM3
copy gencpm.com ..\..\Binary\CPM3
copy genres.dat ..\..\Binary\CPM3
copy genbnk.dat ..\..\Binary\CPM3
copy bios3.spr ..\..\Binary\CPM3
copy bnkbios3.spr ..\..\Binary\CPM3
copy bdos3.spr ..\..\Binary\CPM3
copy bnkbdos3.spr ..\..\Binary\CPM3
copy resbdos3.spr ..\..\Binary\CPM3
copy cpm3res.sys ..\..\Binary\CPM3
copy cpm3bnk.sys ..\..\Binary\CPM3
copy gencpm.dat ..\..\Binary\CPM3
copy cpm3.sys ..\..\Binary\CPM3
copy readme.1st ..\..\Binary\CPM3
copy cpm3fix.pat ..\..\Binary\CPM3

31
Source/CPM3/Makefile

@ -4,11 +4,19 @@
#
# it does this by overriding OBJECTS in an invoked sub-make
#
OBJECTS = cpmldr.com cpmldr.sys cpm3res cpm3bnk zpmbios3 cpm3.sys gencpm.dat
OTHERS = cpmldr.rel biosldr.rel cpm3res.sys cpm3bnk.sys zpmbios3.spr loader.bin cpmldr.bin
OBJECTS = cpmldr.com cpmldr.sys cpm3res.sys cpm3bnk.sys zpmbios3
OBJECTS += ccp.com gencpm.com genres.dat genbnk.dat
OBJECTS += bdos3.spr bnkbdos3.spr resbdos3.spr
OBJECTS += readme.1st cpm3fix.pat cpm3.sys gencpm.dat
NOCOPY = zpmbios3
OTHERS = cpmldr.rel biosldr.rel cpm3res.sys cpm3bnk.sys loader.bin cpmldr.bin
OTHERS += biosldrc.rel biosldrd.rel
NODELETE = ccp.com gencpm.com genres.dat genbnk.dat bdos3.spr bnkbdos3.spr resbdos3.spr
NODELETE += readme.1st cpm3fix.pat
DEST = ../../Binary/CPM3
TOOLS = ../../Tools
include $(TOOLS)/Makefile.inc
export ZXINCDIR = ../
@ -25,11 +33,11 @@ DEFCPM3 = bnk
clean:: biosclean
@rm -f bios3.spr bnkbios3.spr zpmbios3.spr cpmldr.com gencpm.dat options.lib ldropts.lib
biosclean:
@rm -f $(BIOSOBJS)
cpm3res:
cpm3res.sys:
make biosclean
cp optres.lib options.lib
cp genres.dat gencpm.dat
@ -38,7 +46,7 @@ cpm3res:
mv cpm3.sys cpm3res.sys
rm gencpm.dat
cpm3bnk:
cpm3bnk.sys:
make biosclean
cp optbnk.lib options.lib
cp genbnk.dat gencpm.dat
@ -50,16 +58,14 @@ cpm3bnk:
zpmbios3:
make biosclean
cp optzpm.lib options.lib
cp genbnk.dat gencpm.dat
make OBJECTS=zpmbios3.spr
rm gencpm.dat
make OBJECTS=zpmbios3.spr DEST=
cpmldr.bin: biosldrd.rel cpmldr.rel
$(ZXCC) $(TOOLS)/cpm/bin/LINK -CPMLDRD[L100]=CPMLDR,BIOSLDRD
cpmldr.bin: biosldrd.rel cpmldr.rel util.rel
$(ZXCC) $(TOOLS)/cpm/bin/LINK -CPMLDRD[L100]=CPMLDR,BIOSLDRD,UTIL
mv cpmldrd.com cpmldr.bin
cpmldr.com: biosldrc.rel cpmldr.rel
$(ZXCC) $(TOOLS)/cpm/bin/LINK -CPMLDRC[L100]=CPMLDR,BIOSLDRC
cpmldr.com: biosldrc.rel cpmldr.rel util.rel
$(ZXCC) $(TOOLS)/cpm/bin/LINK -CPMLDRC[L100]=CPMLDR,BIOSLDRC,UTIL
mv cpmldrc.com cpmldr.com
biosldrc.rel: biosldr.z80 optcmd.lib
@ -89,3 +95,4 @@ gencpm.dat: gen$(DEFCPM3).dat
cpmldr.sys: loader.bin cpmldr.bin
cat loader.bin cpmldr.bin > $@

5
Source/CPM3/bioskrnl.asm

@ -507,6 +507,11 @@ seldsk:
mov a,m ! inx h ! mov h,m ! mov l,a ; get address of LOGIN routine
call ipchl ; call LOGIN
pop h ; recover DPH pointer
; WBW Start
ora a
rz ; successful return
lxi h,0 ; error occurred, clear HL
; WBW End
not$first$select:
ret

784
Source/CPM3/biosldr.z80

@ -4,6 +4,12 @@
maclib cpm3.lib
cseg
extrn phex16, phex8
extrn cin, cout
extrn crlf, crlf2
debug equ false
; BIOS Jump vector.
@ -51,109 +57,211 @@
jp 0 ; reserved for future expansion
jp 0 ; reserved for future expansion
boot:
if cmdline
mbrsec equ dtabuf
boot:
; The main module (cpmldr.asm) does not expect the
; boot call to use much stack. We use our own during
; this routine to avoid issues.
ld (stksav),sp
ld sp,stack
boot1:
ld de,msgunit
call writestr
call cin
push af
call cout
pop af
sub '0'
ld (unit),a
jr c,selerr
ld bc,0F810h ; HBIOS, get disk unit count
call 0FFF0h ; do it, E := disk unit count
ld a,(unit) ; get unit num back
cp e ; compare to entry
jr nc,selerr ; loop if too high
; Do the real work
call boot0
ld de,msgslc
call writestr
call cin
push af
call cout
pop af
sub '0'
ld (slice),a
jr c,selerr
cp 10
jr nc,selerr
; Restore original stack and return
ld sp,(stksav)
ret
jr boot2
boot0:
if cmdline
boot1:
; Get disk unit from user
ld de,msgunit ; disk unit prompt
call writestr ; display on console
call cin ; get a character
push af ; save it
call cout ; echo character
pop af ; restore it
sub '0' ; convert to binary
ld (unit),a ; save it
jr c,selerr ; loop if below 0 entered
ld bc,0F810h ; HBIOS, get disk unit count
call 0FFF0h ; do it, E := disk unit count
ld a,(unit) ; get unit num back
cp e ; compare to entry
jr nc,selerr ; loop if too high
; Get disk slice from user
ld de,msgslc ; slice prompt
call writestr ; display on console
call cin ; get a character
push af ; save it
call cout ; echo it
pop af ; restore it
sub '0' ; convert to binary
ld (slice),a ; save it
jr c,selerr ; loop if below 0 entered
cp 10 ; check for over 9
jr nc,selerr ; loop if over 9
ld de,msgcrlf ; linefeed
call writestr ; ... to console
jr boot2 ; boot w/ unit & slice
selerr:
ld de,msginv
call writestr
jr boot1
; Display invalid entry message and restart
ld de,msginv ; error message
call writestr ; display on console
jr boot1 ; loop
boot2:
ld de,crlf
call writestr
ld sp,(stksav)
; Record unit & slice w/ HBIOS
ld bc,0F9E0h ; HBIOS func: set boot info
ld a,(unit) ; get unit
ld d,a ; put in D
ld a,(slice) ; get slice
ld e,a ; put in E
ld l,0 ; Bank is always zero
call 0FFF0h ; do it
ld bc,0F9E0h ; HBIOS func: set boot info
ld a,(unit) ; get unit
ld d,a ; put in D
ld a,(slice) ; get slice
ld e,a ; put in E
ld l,0 ; Bank is always zero
call 0FFF0h ; do it
else
ld bc,0F8E0h ; HBIOS func: get boot info
call 0FFF0h ; do it, D := boot unit, E: := slice
ld a,d ; move unit to A
ld (unit),a ; save it
ld a,e ; move slice to A
ld (slice),a ; save it
; Get unit & slice from HBIOS
ld bc,0F8E0h ; HBIOS func: get boot info
call 0FFF0h ; do it, D := boot unit, E: := slice
ld a,d ; move unit to A
ld (unit),a ; save it
ld a,e ; move slice to A
ld (slice),a ; save it
endif
ld a,(unit) ; Get boot unit
ld c,a ; put in C
ld b,18h ; HBIOS Media function
ld e,1 ; Enable media check/discovery
call 0FFF0H ; HBIOS call
ld a,e ; Resultant media id to accum
or a ; Set flags
;halt
;
; !!! Need to do something on error !!!
;
ret z ; Bail out on error
; Check that drive actually exists
ld bc,0F810h ; HBIOS func: get disk count
call 0FFF0h ; do it, E=disk count
ld a,(unit) ; get boot disk unit
cp e ; compare to count
jp nc,err_nodisk ; handle no disk err
; Sense media to determine media format
ld a,(unit) ; Get boot unit
ld c,a ; put in C
ld b,18h ; HBIOS Media function
ld e,1 ; Enable media check/discovery
call 0FFF0H ; HBIOS call
jp nz,err_diskio ; handle error
ld a,e ; resultant media id to accum
ld (medid),a ; save media id
or a ; set flags, 0 is no media
jp z,err_diskio ; handle no media error
; Initialize slice start LBA & sectors per slice
ld hl,0 ; assume slice starts
ld (lba),hl ; ... at LBA offset
ld (lba+2),hl ; ... of zero
ld hl,16640 ; assume legacy value for
ld (sps),hl ; ... sectors per slice
; If not hard disk, skip partition & slice stuff
ld a,(medid) ; get media id
cp 4 ; hard disk?
jr nz,boot9 ; if not, jump ahead
; Read MBR
ld de,8000h ; LBA address zero
ld hl,0 ; ... to read first sector
ld bc,mbrsec ; read into MBR buffer
ld (dma),bc ; save
ld b,1 ; one sector
ld a,(unit) ; get bootunit
ld c,a ; put in C
call diskread ; do it, no return on err
; Check signature
ld hl,(mbrsec+1FEh) ; get signature
ld a,l ; first byte
cp 055h ; should be $55
jr nz,boot5 ; if not, no part table
ld a,h ; second byte
cp 0AAh ; should be $AA
jr nz,boot5 ; if not, no part table
; Search part table for CP/M entry (type 0x2E)
ld b,4 ; four entries in part table
ld hl,mbrsec+1BEh+4 ; offset of first part type
boot3:
ld a,(hl) ; get part type
cp 2Eh ; CP/M partition?
jr z,boot4 ; cool, grab the LBA offset
ld de,16 ; part table entry size
add hl,de ; bump to next part type
djnz boot3 ; loop thru table
jr boot5 ; too bad, no CP/M partition
boot4:
; Capture the starting LBA of the CP/M partition we found
ld de,4 ; LBA is 4 bytes after part type
add hl,de ; point to it
ld de,lba ; loc to store lba offset
ld bc,4 ; 4 bytes (32 bits)
ldir ; copy it
; For now, it is implied that a slice within a partition
; table will be in the "new" disk format. So, we now
; adjust the sectors per slice and media id.
; Use new slice format sectors per slice value
ld hl,16384 ; new sectors per slice
ld (sps),hl ; save it
; Update media id for new hard disk format
ld a,10 ; new media id
ld (medid),a ; save it
boot5:
; Adjust LBA offset based on target slice
ld a,(slice) ; get boot slice, A is loop cnt
ld hl,(lba) ; set DE:HL
ld de,(lba+2) ; ... to starting LBA
ld bc,(sps) ; sectors per slice
boot6:
or a ; set flags to check loop cntr
jr z,boot8 ; done if counter exhausted
add hl,bc ; add one slice to low word
jr nc,boot7 ; check for carry
inc de ; if so, bump high word
boot7:
dec a ; dec loop downcounter
jr boot6 ; and loop
boot8:
ld (lba),hl ; save new lba, low word
ld (lba+2),de ; save new lba, high word
boot9:
; Locate DPB corresponding to media id
ld hl,dpb$start - dpb$sz
ld de,dpb$sz
ld b,a ; loop count
dsk$login1:
add hl,de ; next dpb
djnz dsk$login1 ; loop as needed
; hl is ptr to desired dpb
ld de,dph0 ; load DPH pointer
ex de,hl ; de = DPB adr, hl = DPH adr
push de ; save DPB adr
ld de,12 ; offset of DPB in DPH
add hl,de ; hl = adr of DPB field in DPH
pop de ; recover DPB adr
ld (hl),e ; update LSB
inc hl
ld (hl),d ; udpate MSB
ld a,(medid) ; get media id
ld b,a ; to loop count
boot10:
add hl,de ; next dpb
djnz boot10 ; loop as needed
; Stuff DPB ptr (HL) into DPH
ld de,dph0 ; load DPH pointer
ex de,hl ; de = DPB adr, hl = DPH adr
push de ; save DPB adr
ld de,12 ; offset of DPB in DPH
add hl,de ; hl = adr of DPB field in DPH
pop de ; recover DPB adr
ld (hl),e ; update LSB
inc hl ; point to MSB
ld (hl),d ; update MSB
ret ; done
ret
wboot:
ld a,81H
halt
@ -162,15 +270,14 @@ const:
ld a,82H
halt
conin:
ld bc,0080H ; unit 80h (console), func 0 = CIN
call 0FFF0H
ld bc,0080h ; unit 80h (console), func 0 = CIN
call 0FFF0h ; do it
ld a,e ; put in C
ret ; done
conout:
ld e,c ; output character in E
ld bc,0180H ; unit 80h (console), func 1 = COUT
;rst 08 ; do it
call 0FFF0H
ret ; return
ld e,c ; output character in E
ld bc,0180h ; unit 80h (console), func 1 = COUT
jp 0FFF0h
list:
ld a,85H
halt
@ -195,63 +302,122 @@ setsec:
ld (sect),bc
ret
setdma:
if debug
push hl
push bc
pop hl
call crlf
call phex16
pop hl
endif
ld (dma),bc
ret
read:
ld a,(unit) ; get unit
ld c,a ; BIOS Disk Unit in C
ld b,12H ; HBIOS SEEK function
push bc ; save it
;push de ; save XDPH pointer
ld b,17h ; HBIOS DEVICE function
rst 08 ; Do it, D=device type
ld a,d ; put in accum
and 0F0h ; isolate high bits
ld b,1 ; assume it is floppy, 1 head bit
ld c,01h ; 1 bit head mask
cp 10h ; floppy?
jr z,seek0 ; yup, skip ahead
ld b,4 ; must be hard disk, 4 head bits
ld c,0Fh ; 4 bit head mask
seek0:
;pop de ; recover XDPH pointer
push bc ; save bc
ld a,(slice) ; get slice
ld e,a ; slice to E
ld h,65 ; number of tracks per slice
call mult8 ; HL now has track offset for slice
pop bc ; recover bc
push hl ; save track offset for now
ld hl,(trk) ; get track value
ld a,l ; lsb of track to a
and c ; apply mask
ld d,a ; save in d
seek1:
srl h ; shift one bit out
rr l ; ... of hl
djnz seek1 ; do all bits
ld a,(sect) ; get sector
ld e,a ; stuff it in e
ex de,hl ; de=track, hl=head/sect
ex (sp),hl ; save head/sect, hl = offset
add hl,de ; hl has final track value
pop de ; recover head/sect to de
pop bc ; recover function & unit
;rst 08 ; perform seek
call 0FFF0H
; Read Sector
ld b,13h ; HBIOS read
ld a,(unit) ; get boot unit
ld c,a ; put in C
ld hl,(dma) ; dma address
ld a,(0FFE0H) ; current bank
ld d,a ; ... to D
ld e,1 ; 1 sector
;rst 08
call 0FFF0H
if debug
call crlf
ld a,(unit)
call phex8
ld a,' '
call cout
ld hl,(trk)
call phex16
ld a,' '
call cout
ld hl,(sect)
call phex16
ld a,' '
call cout
ld hl,(lba+2)
call phex16
ld hl,(lba+0)
call phex16
ret
endif
; Check device type
ld a,(unit) ; get unit
ld c,a ; BIOS Disk Unit in C
ld b,17h ; HBIOS DEVICE function
rst 08 ; Do it, D=device type
ld a,d ; put in accum
and 0F0h ; isolate high bits
cp 10h ; floppy?
jr nz,read2 ; if not, do LBA i/o
; Floppy I/O
ld de,(sect) ; sector -> de, head(d) becomes zero
ld hl,(trk) ; track -> hl (low bit has head)
srl h ; shift head bit out of hl
rr l ; ... and into carry
rl d ; carry bit (head) into d
jr read3 ; do the disk i/o
; LBA I/O
read2:
ld hl,(trk) ; get track
ld de,0 ; clear hiword
ld b,4 ; x16 (16 spt assumed)
call rl32 ; do it
; combine with sector
ld a,(sect) ; get sector
or l ; combine
ld l,a ; and back to L
; add in lba offset
ld bc,(lba) ; lba offset loword
add hl,bc ; add to cur loword
ex de,hl ; swap
ld bc,(lba+2) ; lba offset hiword
adc hl,bc ; add w/ carry to cur hiword
ex de,hl ; swap back
set 7,d ; set lba access bit
read3:
if debug
ld a,' '
call cout
ex de,hl
call phex16
ex de,hl
call phex16
endif
; DE:HL has sector address to read (LBA or CHS)
ld a,(unit) ; get disk unit
ld c,a ; put in C
ld b,1 ; read 1 sector
jr diskread ; read sector and return
diskread:
; Read disk sector(s)
; DE:HL is LBA, B is sector count, C is disk unit
; Seek to requested sector in DE:HL
push bc ; save unit & count
ld b,012h ; HBIOS func: seek
call 0FFF0h ; do it
pop bc ; recover unit & count
jp nz,err_diskio ; handle error
; Read sector(s) into buffer
ld e,b ; transfer count
ld b,013h ; HBIOS func: disk read
ld hl,(dma) ; read into info sec buffer
ld a,(0FFE0h) ; get current bank
ld d,a ; put in D
call 0FFF0h ; do it
jp nz,err_diskio ; handle error
xor a ; signal success
ret ; and done
write:
ld a,8EH
halt
@ -291,10 +457,11 @@ flush:
halt
move:
ex de,hl ; we are passed source in DE and dest in HL
ldir ; use Z80 block move instruction
ex de,hl ; need next addresses in same regs
ret
; On input, DE=src, HL=dest
ex de,hl ; swap HL/DE for LDIR
ldir ; Z80 block move
ex de,hl ; swap back (required!)
ret ; done
time:
ld a,9AH
halt
@ -307,22 +474,21 @@ setbnk:
xmove:
ld a,9DH
halt
cin:
; input character from console via hbios
ld c,080H ; console unit to c
ld b,00H ; hbios func: input char
call 0FFF0H ; hbios reads character
ld a,e ; move character to a for return
ret
cout:
; output character to console via hbios
ld e,a ; output char to e
ld c,080H ; console unit to c
ld b,01H ; hbios func: output char
call 0FFF0H ; hbios outputs character
ret
;cin:
; ; Input character from console via HBIOS
; ld c,080H ; console unit to C
; ld b,00H ; HBIOS func: input char
; call 0FFF0H ; HBIOS reads character
; ld a,e ; To A for return
; ret ; done
;cout:
; ; Output character to console via HBIOS
; ld e,a ; output char to E
; ld c,080H ; console unit to C
; ld b,01H ; HBIOS func: output char
; jp 0FFF0H ; output & return
writestr:
push af
@ -339,153 +505,190 @@ writestr2:
pop af
ret
;
; multiply 8-bit values
; in: multiply h by e
; out: hl = result, e = 0, b = 0
;
mult8:
ld d,0
ld l,d
ld b,8
mult8_loop:
add hl,hl
jr nc,mult8_noadd
add hl,de
mult8_noadd:
djnz mult8_loop
ret
rl32:
; Left shift DE:HL by B bits (B > 0)
or a ; clear carry
rl l ; rotate L thru carry
rl h ; rotate H thru carry
rl e ; rotate E thru carry
rl d ; rotate D thru carry
djnz rl32 ; loop B times
ret ; done
err_nodisk:
ld hl,str_err_nodisk
jr err
err_noslice:
ld hl,str_err_noslice
jr err
err_diskio:
ld hl,str_err_diskio
jr err
err_sig:
ld hl,str_err_sig
jr err
err_api:
ld hl,str_err_api
jr err
err:
push hl
ld de,str_err_prefix
call writestr
pop de
call writestr
halt
str_err_prefix db "\r\n\r\n*** ","$"
str_err_nodisk db "Disk unit not available","$"
str_err_noslice db "Disk unit does not support slices","$"
str_err_diskio db "Disk I/O failure","$"
str_err_sig db "No system image on disk","$"
str_err_api db "HBIOS API failure","$"
msgunit db 13,10,13,10,'Boot CP/M 3 from Disk Unit: $'
msgslc db ' Slice: $'
msginv db 13,10,13,10,'*** Invalid Selection ***$'
crlf db 13,10,'$'
msgcrlf db 13,10,'$'
dpb$start:
dpb$rom: ; 384K ROM Drive
dw 64 ; spt: sectors per track
db 4 ; bsh: block shift factor
db 15 ; blm: block mask
db 1 ; exm: extent mask
dw 192 - 1 ; dsm: total storage in blocks - 1 = (384kb / 2k bls) - 1 = 191
dw 256 - 1 ; drm: dir entries - 1 = 256 - 1 = 255
db 11110000b ; al0: dir blk bit map, first byte
db 00000000b ; al1: dir blk bit map, second byte
dw 8000h ; cks: directory check vector size - permanent storage = 8000H
dw 0 ; off: reserved tracks = 16 trks * (16 trks * 16 heads * 16 secs * 512 bytes) = 128k
dw 64 ; spt: sectors per track
db 4 ; bsh: block shift factor
db 15 ; blm: block mask
db 1 ; exm: extent mask
dw 192 - 1 ; dsm: total storage in blocks - 1 = (384kb / 2k bls) - 1 = 191
dw 256 - 1 ; drm: dir entries - 1 = 256 - 1 = 255
db 11110000b ; al0: dir blk bit map, first byte
db 00000000b ; al1: dir blk bit map, second byte
dw 8000h ; cks: directory check vector size - permanent storage = 8000H
dw 0 ; off: reserved tracks = 16 trks * (16 trks * 16 heads * 16 secs * 512 bytes) = 128k
db 2 ; psh: 2 for 512 byte sectors
db 3 ; phm: (512 / 128) - 1
dpb$sz equ $ - dpb$start
dpb$ram: ; 256K RAM Drive
dw 64 ; spt: sectors per track
db 4 ; bsh: block shift factor
db 15 ; blm: block mask
db 1 ; exm: extent mask
dw 128 - 1 ; dsm: total storage in blocks - 1 = (256kb / 2k bls) - 1 = 127
dw 256 - 1 ; drm: dir entries - 1 = 256 - 1 = 255
db 11110000b ; al0: dir blk bit map, first byte
db 00000000b ; al1: dir blk bit map, second byte
dw 8000h ; cks: directory check vector size - permanent storage = 8000H
dw 0 ; off: reserved tracks = 16 trks * (16 trks * 16 heads * 16 secs * 512 bytes) = 128k
dw 64 ; spt: sectors per track
db 4 ; bsh: block shift factor
db 15 ; blm: block mask
db 1 ; exm: extent mask
dw 128 - 1 ; dsm: total storage in blocks - 1 = (256kb / 2k bls) - 1 = 127
dw 256 - 1 ; drm: dir entries - 1 = 256 - 1 = 255
db 11110000b ; al0: dir blk bit map, first byte
db 00000000b ; al1: dir blk bit map, second byte
dw 8000h ; cks: directory check vector size - permanent storage = 8000H
dw 0 ; off: reserved tracks = 16 trks * (16 trks * 16 heads * 16 secs * 512 bytes) = 128k
db 2 ; psh: 2 for 512 byte sectors
db 3 ; phm: (512 / 128) - 1
dpb$rf: ; 4MB RAM Floppy Drive
dw 64 ; spt: sectors per track
db 4 ; bsh: block shift factor
db 15 ; blm: block mask
db 0 ; exm: extent mask
dw 2047 ; dsm: total storage in blocks - 1 = (4mb / 2k bls) - 1 = 2047
dw 255 ; drm: dir entries - 1 = 256 - 1 = 255
db 11110000b ; al0: dir blk bit map, first byte
db 00000000b ; al1: dir blk bit map, second byte
dw 8000h ; cks: directory check vector size - permanent storage = 8000H
dw 0 ; off: reserved tracks = 0 trks
dw 64 ; spt: sectors per track
db 4 ; bsh: block shift factor
db 15 ; blm: block mask
db 0 ; exm: extent mask
dw 2047 ; dsm: total storage in blocks - 1 = (4mb / 2k bls) - 1 = 2047
dw 255 ; drm: dir entries - 1 = 256 - 1 = 255
db 11110000b ; al0: dir blk bit map, first byte
db 00000000b ; al1: dir blk bit map, second byte
dw 8000h ; cks: directory check vector size - permanent storage = 8000H
dw 0 ; off: reserved tracks = 0 trks
db 2 ; psh: 2 for 512 byte sectors
db 3 ; phm: (512 / 128) - 1
dpb$hd: ; 8MB Hard Disk Drive
dw 64 ; spt: sectors per track
db 5 ; bsh: block shift factor
db 31 ; blm: block mask
db 1 ; exm: extent mask
dw 2047 ; dsm: total storage in blocks - 1 = (8mb / 4k bls) - 1 = 2047
dw 511 ; drm: dir entries - 1 = 512 - 1 = 511
db 11110000b ; al0: dir blk bit map, first byte
db 00000000b ; al1: dir blk bit map, second byte
dw 8000h ; cks: directory check vector size - permanent storage = 8000H
dw 16 ; off: reserved tracks = 16 trks * (16 trks * 16 heads * 16 secs * 512 bytes) = 128k
dw 64 ; spt: sectors per track
db 5 ; bsh: block shift factor
db 31 ; blm: block mask
db 1 ; exm: extent mask
dw 2047 ; dsm: total storage in blocks - 1 = (8mb / 4k bls) - 1 = 2047
dw 512-1 ; drm: dir entries - 1 = 512 - 1 = 511
db 11110000b ; al0: dir blk bit map, first byte
db 00000000b ; al1: dir blk bit map, second byte
dw 8000h ; cks: directory check vector size - permanent storage = 8000H
dw 16 ; off: reserved tracks = 16 trks * (16 trks * 16 heads * 16 secs * 512 bytes) = 128k
db 2 ; psh: 2 for 512 byte sectors
db 3 ; phm: (512 / 128) - 1
dpb$fd720: ; 3.5" DS/DD Floppy Drive (720K)
dw 36 ; spt: sectors per track
db 4 ; bsh: block shift factor
db 15 ; blm: block mask
db 0 ; exm: extent mask
dw 350 ; dsm: total storage in blocks - 1 blk = ((720k - 18k off) / 2k bls) - 1 = 350
dw 127 ; drm: dir entries - 1 = 128 - 1 = 127
db 11000000b ; al0: dir blk bit map, first byte
db 00000000b ; al1: dir blk bit map, second byte
dw 32 ; cks: directory check vector size = 128 / 4
dw 4 ; off: reserved tracks = 4 trks * (512 b/sec * 36 sec/trk) = 18k
dw 36 ; spt: sectors per track
db 4 ; bsh: block shift factor
db 15 ; blm: block mask
db 0 ; exm: extent mask
dw 350 ; dsm: total storage in blocks - 1 blk = ((720k - 18k off) / 2k bls) - 1 = 350
dw 127 ; drm: dir entries - 1 = 128 - 1 = 127
db 11000000b ; al0: dir blk bit map, first byte
db 00000000b ; al1: dir blk bit map, second byte
dw 32 ; cks: directory check vector size = 128 / 4
dw 4 ; off: reserved tracks = 4 trks * (512 b/sec * 36 sec/trk) = 18k
db 2 ; psh: 2 for 512 byte sectors
db 3 ; phm: (512 / 128) - 1
dpb_fd144: ; 3.5" DS/HD Floppy Drive (1.44M)
dw 72 ; spt: sectors per track
db 4 ; bsh: block shift factor
db 15 ; blm: block mask
db 0 ; exm: extent mask
dw 710 ; dsm: total storage in blocks - 1 blk = ((1,440k - 18k off) / 2k bls) - 1 = 710
dw 255 ; drm: dir entries - 1 = 256 - 1 = 255
db 11110000b ; al0: dir blk bit map, first byte
db 00000000b ; al1: dir blk bit map, second byte
dw 64 ; cks: directory check vector size = 256 / 4
dw 2 ; off: reserved tracks = 2 trks * (512 b/sec * 72 sec/trk) = 18k
dw 72 ; spt: sectors per track
db 4 ; bsh: block shift factor
db 15 ; blm: block mask
db 0 ; exm: extent mask
dw 710 ; dsm: total storage in blocks - 1 blk = ((1,440k - 18k off) / 2k bls) - 1 = 710
dw 255 ; drm: dir entries - 1 = 256 - 1 = 255
db 11110000b ; al0: dir blk bit map, first byte
db 00000000b ; al1: dir blk bit map, second byte
dw 64 ; cks: directory check vector size = 256 / 4
dw 2 ; off: reserved tracks = 2 trks * (512 b/sec * 72 sec/trk) = 18k
db 2 ; psh: 2 for 512 byte sectors
db 3 ; phm: (512 / 128) - 1
dpb_fd360: ; 5.25" DS/DD Floppy Drive (360K)
dw 36 ; spt: sectors per track
db 4 ; bsh: block shift factor
db 15 ; blm: block mask
db 1 ; exm: extent mask
dw 170 ; dsm: total storage in blocks - 1 blk = ((360k - 18k off) / 2k bls) - 1 = 170
dw 127 ; drm: dir entries - 1 = 128 - 1 = 127
db 11110000b ; al0: dir blk bit map, first byte
db 00000000b ; al1: dir blk bit map, second byte
dw 32 ; cks: directory check vector size = 128 / 4
dw 4 ; off: reserved tracks = 4 trks * (512 b/sec * 36 sec/trk) = 18k
dpb_fd360: ; 5.25" DS/DD Floppy Drive (360K)
dw 36 ; spt: sectors per track
db 4 ; bsh: block shift factor
db 15 ; blm: block mask
db 1 ; exm: extent mask
dw 170 ; dsm: total storage in blocks - 1 blk = ((360k - 18k off) / 2k bls) - 1 = 170
dw 127 ; drm: dir entries - 1 = 128 - 1 = 127
db 11110000b ; al0: dir blk bit map, first byte
db 00000000b ; al1: dir blk bit map, second byte
dw 32 ; cks: directory check vector size = 128 / 4
dw 4 ; off: reserved tracks = 4 trks * (512 b/sec * 36 sec/trk) = 18k
db 2 ; psh: 2 for 512 byte sectors
db 3 ; phm: (512 / 128) - 1
dpb_fd120: ; 5.25" DS/HD Floppy Drive (1.2M)
dw 60 ; spt: sectors per track
db 4 ; bsh: block shift factor
db 15 ; blm: block mask
db 0 ; exm: extent mask
dw 591 ; dsm: total storage in blocks - 1 blk = ((1,200k - 15k off) / 2k bls) - 1 = 591
dw 255 ; drm: dir entries - 1 = 256 - 1 = 255
db 11110000b ; al0: dir blk bit map, first byte
db 00000000b ; al1: dir blk bit map, second byte
dw 64 ; cks: directory check vector size = 256 / 4
dw 2 ; off: reserved tracks = 2 trks * (512 b/sec * 60 sec/trk) = 15k
dw 60 ; spt: sectors per track
db 4 ; bsh: block shift factor
db 15 ; blm: block mask
db 0 ; exm: extent mask
dw 591 ; dsm: total storage in blocks - 1 blk = ((1,200k - 15k off) / 2k bls) - 1 = 591
dw 255 ; drm: dir entries - 1 = 256 - 1 = 255
db 11110000b ; al0: dir blk bit map, first byte
db 00000000b ; al1: dir blk bit map, second byte
dw 64 ; cks: directory check vector size = 256 / 4
dw 2 ; off: reserved tracks = 2 trks * (512 b/sec * 60 sec/trk) = 15k
db 2 ; psh: 2 for 512 byte sectors
db 3 ; phm: (512 / 128) - 1
dpb_fd111: ; 8" DS/DD Floppy Drive (1.11M)
dw 60 ; spt: sectors per track
db 4 ; bsh: block shift factor
db 15 ; blm: block mask
db 0 ; exm: extent mask
dw 569 ; dsm: total storage in blocks - 1 blk = ((1,155k - 15k off) / 2k bls) - 1 = 569
dw 255 ; drm: dir entries - 1 = 256 - 1 = 255
db 11110000b ; al0: dir blk bit map, first byte
db 00000000b ; al1: dir blk bit map, second byte
dw 64 ; cks: directory check vector size = 256 / 4
dw 2 ; off: reserved tracks = 2 trks * (512 b/sec * 60 sec/trk) = 15k
dw 60 ; spt: sectors per track
db 4 ; bsh: block shift factor
db 15 ; blm: block mask
db 0 ; exm: extent mask
dw 569 ; dsm: total storage in blocks - 1 blk = ((1,155k - 15k off) / 2k bls) - 1 = 569
dw 255 ; drm: dir entries - 1 = 256 - 1 = 255
db 11110000b ; al0: dir blk bit map, first byte
db 00000000b ; al1: dir blk bit map, second byte
dw 64 ; cks: directory check vector size = 256 / 4
dw 2 ; off: reserved tracks = 2 trks * (512 b/sec * 60 sec/trk) = 15k
db 2 ; psh: 2 for 512 byte sectors
db 3 ; phm: (512 / 128) - 1
dpb$hdnew: ; 8MB Hard Disk Drive (new format)
dw 64 ; spt: sectors per track
db 5 ; bsh: block shift factor
db 31 ; blm: block mask
db 1 ; exm: extent mask
dw 2048 - 1 - 4 ; dsm: total storage in blocks - 1 = 2048 - 1 - resvd tracks
dw 1024 - 1 ; drm: dir entries
db 11111111b ; al0: dir blk bit map, first byte
db 00000000b ; al1: dir blk bit map, second byte
dw 8000h ; cks: directory check vector size - permanent storage = 8000H
dw 2 ; off: reserved tracks
db 2 ; psh: 2 for 512 byte sectors
db 3 ; phm: (512 / 128) - 1
@ -493,13 +696,13 @@ dph0: dw 0 ; xlt, 0 means no translation
db 0,0,0,0,0,0,0,0,0 ; scratch (9 bytes)
db 0 ; mf: media flag
dw dpb$hd ; dpb
dw csvbuf ; csv:
dw alvbuf ; alv:
dw csvbuf ; csv:
dw alvbuf ; alv:
dw dirbcb ; dirbcb
dw dtabcb ; dtabcb
dw 0ffffh ; hash (disabled)
db 0 ; hbank
dtbl: dtbl dph0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
dirbcb: db 0ffh ; drv
@ -524,13 +727,32 @@ trk ds 2 ; current track
sect ds 2 ; current sector
dma ds 2 ; current DMA address
csvbuf ds 128 ; length (CSV) = ((DRM+1)/4)
alvbuf ds 512 ; length (ALV) = ((DSM+1)/4)
dirbuf ds 512 ; sector buffer
dtabuf ds 512 ; sector buffer
medid ds 1 ; media id
lba ds 4 ; current lba
sps ds 2 ; sectors per slice
ds 64
stack equ $
stksav dw 0
stksav ds 2
csvbufs equ 256
alvbufs equ 512
dirbufs equ 512
dtabufs equ 512
;csvbuf ds 256 ; length (CSV) = ((DRM+1)/4)
;alvbuf ds 512 ; length (ALV) = ((DSM+1)/4)
;dirbuf ds 512 ; sector buffer
;dtabuf ds 512 ; sector buffer
; Trying to save space. The loader must fit underneath
; the start of BNKBDOS3 and we have a big BNKBDOS because
; of all the disk allocations. Putting these buffers
; in upper memory actually helps quite a bit.
csvbuf equ 8000h
alvbuf equ csvbuf + csvbufs
dirbuf equ alvbuf + alvbufs
dtabuf equ dirbuf + dirbufs
end

98
Source/CPM3/boot.z80

@ -14,9 +14,12 @@
extrn @date,@hour,@min,@sec
extrn @srch1
extrn @hbbio
extrn addhla, bcd2bin, bin2bcd
extrn cout, phex8, phex16, crlf, crlf2
extrn addhla
;extrn phex16, phex8
;extrn cin, cout
;extrn crlf, crlf2
extrn bcd2bin, bin2bcd
include c:ver.lib
bdos equ 5
@ -41,7 +44,7 @@ tpa$bank equ 0
if banked
; Clone page zero from bank 0 to additional banks
ld b,3 ; last bank
ld b,4 ; last bank
ld c,0 ; src bank
init$2:
push bc ; save bank id's
@ -59,6 +62,23 @@ init$2:
ld hl,signon$msg ; signon message
call ?pmsg ; print it
; Check for HBIOS/CBIOS mismatch
ld b,0F1h ; hbios version
rst 08 ; do it, de=maj/min/up/pat
ld a,d ; a := maj/min
cp ((rmj << 4) | rmn) ; match?
jr nz,init$3 ; handle ver mismatch
ld a,e ; a := os up/pat
and 0F0h ; pat not included in match
cp (rup << 4) ; match?
jr nz,init$3 ; handle ver mismatch
jr init$4 ; all good, continue
init$3:
; display version mismatch
ld hl,vermis$msg ; version mismatch
call ?pmsg ; display it
init$4:
; Get boot disk unit and save it
ld bc,0F8E0h ; HBIOS func: get boot info
rst 08 ; do it, D := boot unit, E: := boot slice
@ -228,25 +248,26 @@ dinit6:
pop de ; restore drive list ptr
inc de ; increment active drive list ptr
djnz dinit6 ; loop as needed
ret
; zero out remaining dph table entries
ld a,16 ; dph table entries
sub l ; subtract entries used
ret z ; return if all entries used
ld b,a ; save as loop counter
ld a,l ; current dph to accum
rlca ; *2 for word entry
ld hl,@dtbl ; start of dtbl
call addhla ; hl now points to entry
dinit6a:
xor a ; zero accum
ld (hl),a ; zero lsb
inc hl ; next byte
ld (hl),a ; zero msb
inc hl ; next byte
djnz dinit6a
ret ; finished
; ; zero out remaining dph table entries
; ld a,16 ; dph table entries
; sub l ; subtract entries used
; ret z ; return if all entries used
; ld b,a ; save as loop counter
; ld a,l ; current dph to accum
; rlca ; *2 for word entry
; ld hl,@dtbl ; start of dtbl
; call addhla ; hl now points to entry
;
;dinit6a:
; xor a ; zero accum
; ld (hl),a ; zero lsb
; inc hl ; next byte
; ld (hl),a ; zero msb
; inc hl ; next byte
; djnz dinit6a
; ret ; finished
dinit7: ; process a unit (all slices)
ld e,0 ; initialize slice index
@ -380,18 +401,18 @@ fill:
?ldccp:
; Force CCP to use system boot drive as initial default
ld a,(@sysdr) ; get system boot drive
ld (@ccpdr),a ; set CCP current drive
;ld a,(@sysdr) ; get system boot drive
;ld (@ccpdr),a ; set CCP current drive
; First time, load the CCP.COM file into TPA
ld a,(@sysdr) ; get system boot drive
;ld (4),a ; save in page zero???
inc a ; drive + 1 for FCB
ld (ccp$fcb),a ; stuff into FCB
add 'A' - 1 ; drive letter
ld (ccp$msg$drv),a ; save for load msg
xor a
ld (ccp$fcb+15),a
;ld a,(@sysdr) ; get system boot drive
;;ld (4),a ; save in page zero???
;inc a ; drive + 1 for FCB
;ld (ccp$fcb),a ; stuff into FCB
;add 'A' - 1 ; drive letter
;ld (ccp$msg$drv),a ; save for load msg
;xor a
;ld (ccp$fcb+15),a
ld hl,0
ld (fcb$nr),hl
ld de,ccp$fcb
@ -670,6 +691,7 @@ read:
clrflg db 0 ; RAM disk cleared flag
clr$msg db 'RAM Disk Initialized',13,10,13,10,0
vermis$msg db 7,'*** WARNING: HBIOS/CBIOS Version Mismatch ***',13,10,13,10,0
if zpm
@ -677,16 +699,16 @@ signon$msg db 13,10,'ZPM3'
if banked
db ' [BANKED]'
endif
db ' on HBIOS v'
db ' for HBIOS v'
biosver
db 13,10,13,10,0
ccp$msg db 13,10,'BIOS Err on '
ccp$msg$drv db '?'
ccp$msg$drv db 'A'
db ': No ZCCP.COM file',0
ccp$fcb db 0,'ZCCP ','COM',0,0,0,0
ccp$fcb db 1,'ZCCP ','COM',0,0,0,0
ds 16
fcb$nr db 0,0,0
@ -696,16 +718,16 @@ signon$msg db 13,10,'CP/M v3.0'
if banked
db ' [BANKED]'
endif
db ' on HBIOS v'
db ' for HBIOS v'
biosver
db 13,10,13,10,0
ccp$msg db 13,10,'BIOS Err on '
ccp$msg$drv db '?'
ccp$msg$drv db 'A'
db ': No CCP.COM file',0
ccp$fcb db 0,'CCP ','COM',0,0,0,0
ccp$fcb db 1,'CCP ','COM',0,0,0,0
ds 16
fcb$nr db 0,0,0

630
Source/CPM3/diskio.z80

@ -37,7 +37,7 @@
extrn ?bnkxlt
;extrn phex8, cout
extrn phex8, cout
; CP/M 3 Disk definition macros
@ -60,113 +60,129 @@ bell equ 7
dw dsk$read
dw dsk$login
dw dsk$init
db 0,0 ; HBIOS Disk Unit/Slice (filled in at boot)
db 0FFh,0FFh ; HBIOS Disk Unit/Slice (filled in at boot)
dph0: dph 0,dpb$max ; Real DPB filled in at disk login
dw 0, 0 ; LBA Offset
dw dsk$write
dw dsk$read
dw dsk$login
dw dsk$init
db 0,0 ; HBIOS Disk Unit/Slice (filled in at boot)
db 0FFh,0FFh ; HBIOS Disk Unit/Slice (filled in at boot)
dph1: dph 0,dpb$max ; Real DPB filled in at disk login
dw 0, 0 ; LBA Offset
dw dsk$write
dw dsk$read
dw dsk$login
dw dsk$init
db 0,0 ; HBIOS Disk Unit/Slice (filled in at boot)
db 0FFh,0FFh ; HBIOS Disk Unit/Slice (filled in at boot)
dph2: dph 0,dpb$max ; Real DPB filled in at disk login
dw 0, 0 ; LBA Offset
dw dsk$write
dw dsk$read
dw dsk$login
dw dsk$init
db 0,0 ; HBIOS Disk Unit/Slice (filled in at boot)
db 0FFh,0FFh ; HBIOS Disk Unit/Slice (filled in at boot)
dph3: dph 0,dpb$max ; Real DPB filled in at disk login
dw 0, 0 ; LBA Offset
dw dsk$write
dw dsk$read
dw dsk$login
dw dsk$init
db 0,0 ; HBIOS Disk Unit/Slice (filled in at boot)
db 0FFh,0FFh ; HBIOS Disk Unit/Slice (filled in at boot)
dph4: dph 0,dpb$max ; Real DPB filled in at disk login
dw 0, 0 ; LBA Offset
dw dsk$write
dw dsk$read
dw dsk$login
dw dsk$init
db 0,0 ; HBIOS Disk Unit/Slice (filled in at boot)
db 0FFh,0FFh ; HBIOS Disk Unit/Slice (filled in at boot)
dph5: dph 0,dpb$max ; Real DPB filled in at disk login
dw 0, 0 ; LBA Offset
dw dsk$write
dw dsk$read
dw dsk$login
dw dsk$init
db 0,0 ; HBIOS Disk Unit/Slice (filled in at boot)
db 0FFh,0FFh ; HBIOS Disk Unit/Slice (filled in at boot)
dph6: dph 0,dpb$max ; Real DPB filled in at disk login
dw 0, 0 ; LBA Offset
dw dsk$write
dw dsk$read
dw dsk$login
dw dsk$init
db 0,0 ; HBIOS Disk Unit/Slice (filled in at boot)
db 0FFh,0FFh ; HBIOS Disk Unit/Slice (filled in at boot)
dph7: dph 0,dpb$max ; Real DPB filled in at disk login
dw 0, 0 ; LBA Offset
dw dsk$write
dw dsk$read
dw dsk$login
dw dsk$init
db 0,0 ; HBIOS Disk Unit/Slice (filled in at boot)
db 0FFh,0FFh ; HBIOS Disk Unit/Slice (filled in at boot)
dph8: dph 0,dpb$max ; Real DPB filled in at disk login
dw 0, 0 ; LBA Offset
dw dsk$write
dw dsk$read
dw dsk$login
dw dsk$init
db 0,0 ; HBIOS Disk Unit/Slice (filled in at boot)
db 0FFh,0FFh ; HBIOS Disk Unit/Slice (filled in at boot)
dph9: dph 0,dpb$max ; Real DPB filled in at disk login
dw 0, 0 ; LBA Offset
dw dsk$write
dw dsk$read
dw dsk$login
dw dsk$init
db 0,0 ; HBIOS Disk Unit/Slice (filled in at boot)
db 0FFh,0FFh ; HBIOS Disk Unit/Slice (filled in at boot)
dph10: dph 0,dpb$max ; Real DPB filled in at disk login
dw 0, 0 ; LBA Offset
dw dsk$write
dw dsk$read
dw dsk$login
dw dsk$init
db 0,0 ; HBIOS Disk Unit/Slice (filled in at boot)
db 0FFh,0FFh ; HBIOS Disk Unit/Slice (filled in at boot)
dph11: dph 0,dpb$max ; Real DPB filled in at disk login
dw 0, 0 ; LBA Offset
dw dsk$write
dw dsk$read
dw dsk$login
dw dsk$init
db 0,0 ; HBIOS Disk Unit/Slice (filled in at boot)
db 0FFh,0FFh ; HBIOS Disk Unit/Slice (filled in at boot)
dph12: dph 0,dpb$max ; Real DPB filled in at disk login
dw 0, 0 ; LBA Offset
dw dsk$write
dw dsk$read
dw dsk$login
dw dsk$init
db 0,0 ; HBIOS Disk Unit/Slice (filled in at boot)
db 0FFh,0FFh ; HBIOS Disk Unit/Slice (filled in at boot)
dph13: dph 0,dpb$max ; Real DPB filled in at disk login
dw 0, 0 ; LBA Offset
dw dsk$write
dw dsk$read
dw dsk$login
dw dsk$init
db 0,0 ; HBIOS Disk Unit/Slice (filled in at boot)
db 0FFh,0FFh ; HBIOS Disk Unit/Slice (filled in at boot)
dph14: dph 0,dpb$max ; Real DPB filled in at disk login
dw 0, 0 ; LBA Offset
dw dsk$write
dw dsk$read
dw dsk$login
dw dsk$init
db 0,0 ; HBIOS Disk Unit/Slice (filled in at boot)
db 0FFh,0FFh ; HBIOS Disk Unit/Slice (filled in at boot)
dph15: dph 0,dpb$max ; Real DPB filled in at disk login
dw 0, 0 ; LBA Offset
cseg ; DPB must be resident
@ -175,11 +191,12 @@ dpb$max:
db 5 ; bsh: block shift factor
db 31 ; blm: block mask
db 1 ; exm: extent mask
dw 2047 ; dsm: total storage in blocks - 1 = (8mb / 4k bls) - 1 = 2047
dw 511 ; drm: dir entries - 1 = 512 - 1 = 511
db 11110000b ; al0: dir blk bit map, first byte
dw 2048 - 1 ; dsm: total storage in blocks - 1 = (8mb / 4k bls) - 1 = 2047
dw 1024 - 1 ; drm: dir entries - 1
db 11111111b ; al0: dir blk bit map, first byte
db 00000000b ; al1: dir blk bit map, second byte
dw 64 ; cks: directory check vector size - 256 / 4
;dw 64 ; cks: directory check vector size - 256 / 4
dw 256 ; cks: directory check vector size - 1024 / 4
dw 0 ; off: reserved tracks = 16 trks * (16 trks * 16 heads * 16 secs * 512 bytes) = 128k
db 2 ; psh: 2 for 512 byte sectors
db 3 ; phm: (512 / 128) - 1
@ -194,7 +211,7 @@ dpb$rom: ; 384K ROM Drive
dw 256 - 1 ; drm: dir entries - 1 = 256 - 1 = 255
db 11110000b ; al0: dir blk bit map, first byte
db 00000000b ; al1: dir blk bit map, second byte
dw 8000h ; cks: directory check vector size - permanent storage = 8000H
dw 8040h ; cks: directory check vector size - permanent storage = 8000H
dw 0 ; off: reserved tracks = 16 trks * (16 trks * 16 heads * 16 secs * 512 bytes) = 128k
db 2 ; psh: 2 for 512 byte sectors
db 3 ; phm: (512 / 128) - 1
@ -209,7 +226,7 @@ dpb$ram: ; 256K RAM Drive
dw 256 - 1 ; drm: dir entries - 1 = 256 - 1 = 255
db 11110000b ; al0: dir blk bit map, first byte
db 00000000b ; al1: dir blk bit map, second byte
dw 8000h ; cks: directory check vector size - permanent storage = 8000H
dw 8040h ; cks: directory check vector size - permanent storage = 8000H
dw 0 ; off: reserved tracks = 16 trks * (16 trks * 16 heads * 16 secs * 512 bytes) = 128k
db 2 ; psh: 2 for 512 byte sectors
db 3 ; phm: (512 / 128) - 1
@ -219,25 +236,25 @@ dpb$rf: ; 4MB RAM Floppy Drive
db 4 ; bsh: block shift factor
db 15 ; blm: block mask
db 0 ; exm: extent mask
dw 2047 ; dsm: total storage in blocks - 1 = (4mb / 2k bls) - 1 = 2047
dw 255 ; drm: dir entries - 1 = 256 - 1 = 255
dw 2048 - 1 ; dsm: total storage in blocks - 1 = (4mb / 2k bls) - 1 = 2047
dw 256 - 1 ; drm: dir entries - 1 = 256 - 1 = 255
db 11110000b ; al0: dir blk bit map, first byte
db 00000000b ; al1: dir blk bit map, second byte
dw 8000h ; cks: directory check vector size - permanent storage = 8000H
dw 8040h ; cks: directory check vector size - permanent storage = 8000H
dw 0 ; off: reserved tracks = 0 trks
db 2 ; psh: 2 for 512 byte sectors
db 3 ; phm: (512 / 128) - 1
dpb$hd: ; 8MB Hard Disk Drive
dpb$hd: ; 8MB Hard Disk Drive w/ 512 dir entries
dw 64 ; spt: sectors per track
db 5 ; bsh: block shift factor
db 31 ; blm: block mask
db 1 ; exm: extent mask
dw 2047 ; dsm: total storage in blocks - 1 = (8mb / 4k bls) - 1 = 2047
dw 511 ; drm: dir entries - 1 = 512 - 1 = 511
dw 2048 - 1 ; dsm: total storage in blocks - 1 = (8mb / 4k bls) - 1 = 2047
dw 512 - 1 ; drm: dir entries - 1 = 512 - 1 = 511
db 11110000b ; al0: dir blk bit map, first byte
db 00000000b ; al1: dir blk bit map, second byte
dw 8000h ; cks: directory check vector size - permanent storage = 8000H
dw 8080h ; cks: directory check vector size - permanent storage = 8000H
dw 16 ; off: reserved tracks = 16 trks * (16 trks * 16 heads * 16 secs * 512 bytes) = 128k
db 2 ; psh: 2 for 512 byte sectors
db 3 ; phm: (512 / 128) - 1
@ -247,8 +264,8 @@ dpb$fd720: ; 3.5" DS/DD Floppy Drive (720K)
db 4 ; bsh: block shift factor
db 15 ; blm: block mask
db 0 ; exm: extent mask
dw 350 ; dsm: total storage in blocks - 1 blk = ((720k - 18k off) / 2k bls) - 1 = 350
dw 127 ; drm: dir entries - 1 = 128 - 1 = 127
dw 351 - 1 ; dsm: total storage in blocks - 1 blk = ((720k - 18k off) / 2k bls) - 1 = 350
dw 128 - 1 ; drm: dir entries - 1 = 128 - 1 = 127
db 11000000b ; al0: dir blk bit map, first byte
db 00000000b ; al1: dir blk bit map, second byte
dw 32 ; cks: directory check vector size = 128 / 4
@ -261,8 +278,8 @@ dpb_fd144: ; 3.5" DS/HD Floppy Drive (1.44M)
db 4 ; bsh: block shift factor
db 15 ; blm: block mask
db 0 ; exm: extent mask
dw 710 ; dsm: total storage in blocks - 1 blk = ((1,440k - 18k off) / 2k bls) - 1 = 710
dw 255 ; drm: dir entries - 1 = 256 - 1 = 255
dw 711 - 1 ; dsm: total storage in blocks - 1 blk = ((1,440k - 18k off) / 2k bls) - 1 = 710
dw 256 - 1 ; drm: dir entries - 1 = 256 - 1 = 255
db 11110000b ; al0: dir blk bit map, first byte
db 00000000b ; al1: dir blk bit map, second byte
dw 64 ; cks: directory check vector size = 256 / 4
@ -275,8 +292,8 @@ dpb_fd360: ; 5.25" DS/DD Floppy Drive (360K)
db 4 ; bsh: block shift factor
db 15 ; blm: block mask
db 1 ; exm: extent mask
dw 170 ; dsm: total storage in blocks - 1 blk = ((360k - 18k off) / 2k bls) - 1 = 170
dw 127 ; drm: dir entries - 1 = 128 - 1 = 127
dw 171 - 1 ; dsm: total storage in blocks - 1 blk = ((360k - 18k off) / 2k bls) - 1 = 170
dw 128 - 1 ; drm: dir entries - 1 = 128 - 1 = 127
db 11110000b ; al0: dir blk bit map, first byte
db 00000000b ; al1: dir blk bit map, second byte
dw 32 ; cks: directory check vector size = 128 / 4
@ -289,8 +306,8 @@ dpb_fd120: ; 5.25" DS/HD Floppy Drive (1.2M)
db 4 ; bsh: block shift factor
db 15 ; blm: block mask
db 0 ; exm: extent mask
dw 591 ; dsm: total storage in blocks - 1 blk = ((1,200k - 15k off) / 2k bls) - 1 = 591
dw 255 ; drm: dir entries - 1 = 256 - 1 = 255
dw 592 - 1 ; dsm: total storage in blocks - 1 blk = ((1,200k - 15k off) / 2k bls) - 1 = 591
dw 256 - 1 ; drm: dir entries - 1 = 256 - 1 = 255
db 11110000b ; al0: dir blk bit map, first byte
db 00000000b ; al1: dir blk bit map, second byte
dw 64 ; cks: directory check vector size = 256 / 4
@ -303,8 +320,8 @@ dpb_fd111: ; 8" DS/DD Floppy Drive (1.11M)
db 4 ; bsh: block shift factor
db 15 ; blm: block mask
db 0 ; exm: extent mask
dw 569 ; dsm: total storage in blocks - 1 blk = ((1,155k - 15k off) / 2k bls) - 1 = 569
dw 255 ; drm: dir entries - 1 = 256 - 1 = 255
dw 570 - 1 ; dsm: total storage in blocks - 1 blk = ((1,155k - 15k off) / 2k bls) - 1 = 569
dw 256 - 1 ; drm: dir entries - 1 = 256 - 1 = 255
db 11110000b ; al0: dir blk bit map, first byte
db 00000000b ; al1: dir blk bit map, second byte
dw 64 ; cks: directory check vector size = 256 / 4
@ -312,6 +329,20 @@ dpb_fd111: ; 8" DS/DD Floppy Drive (1.11M)
db 2 ; psh: 2 for 512 byte sectors
db 3 ; phm: (512 / 128) - 1
dpb$hdnew: ; 8MB Hard Disk Drive (new format)
dw 64 ; spt: sectors per track
db 5 ; bsh: block shift factor
db 31 ; blm: block mask
db 1 ; exm: extent mask
dw 2048 - 1 - 4 ; dsm: total storage in blocks - 1 = 2048 - 1 - resvd tracks
dw 1024 - 1 ; drm: dir entries
db 11111111b ; al0: dir blk bit map, first byte
db 00000000b ; al1: dir blk bit map, second byte
dw 8100h ; cks: directory check vector size - permanent storage = 8000H
dw 2 ; off: reserved tracks
db 2 ; psh: 2 for 512 byte sectors
db 3 ; phm: (512 / 128) - 1
dseg ; rest is banked
@ -370,48 +401,191 @@ dsk$login:
;ld a,'L'
;call cout
ld (curdph),de ; save working DPH
ex de,hl ; DPH adr to HL
dec hl ; point to slice
ld a,(hl) ; get slice
ld (slice),a ; save it
dec hl ; point to disk unit
ld a,(hl) ; get unit
ld (unit),a ; save it
inc a ; 0FFh -> 000h
jp z,err_ret ; bail out on no disk mapped here
;call media ; update DPH for media
;ret
push de ; save DPH ptr
media:
; Set retry address
ld hl,media
ld (retry$adr),hl
; check media
ld a,(@rdrv) ; get disk unit
;halt
ld c,a ; put in C
ld b,18h ; HBIOS Media function
ld e,1 ; Enable media check/discovery
;rst 08
call 0FFF0H ; HBIOS call
ld a,e ; Resultant media id to accum
or a ; Set flags
;halt
;
; !!! Need to do something on error !!!
;
jr nz,dsk$login0 ; continue if OK
pop de ; else error
ret ; return
; Sense media to determine media format
ld a,(unit) ; get disk unit
ld c,a ; put in C
ld b,18h ; HBIOS Media function
ld e,1 ; Enable media check/discovery
call 0FFF0H ; HBIOS call
jp nz,err_diskio ; handle error
ld a,e ; resultant media id to accum
ld (medid),a ; save media id
or a ; set flags, 0 is no media
jp z,err_nodisk ; handle no media error
; Initialize slice start LBA & sectors per slice
ld hl,0 ; assume slice starts
ld (lba),hl ; ... at LBA offset
set 7,h ; ... of zero
ld (lba+2),hl ; ... w/ LBA access
; Check device type
ld a,(unit) ; get disk unit
ld c,a ; put in C
ld b,17h ; HBIOS func: report device info
call 0FFF0h ; get unit info, device type in D
ld a,d ; device type -> A
and 0F0h ; isolate high bits
cp 10h ; floppy?
jr nz,media1 ; if not, do LBA I/O
ld hl,lba+3 ; point to high order byte
res 7,(hl) ; switch from LBA -> CHS
media1:
ld hl,16640 ; assume legacy value for
ld (sps),hl ; ... sectors per slice
; If not hard disk, skip partition & slice stuff
ld a,(medid) ; get media id
cp 4 ; hard disk?
jp nz,media9 ; if not, jump ahead
; Read MBR
ld de,8000h ; LBA address zero
ld hl,0 ; ... to read first sector
ld bc,mbrsec ; read into MBR buffer
ld (dma),bc ; save
ld a,(0FFE0h) ; get current HBIOS bank
ld (bank),a ; set DMA bank
ld a,(unit) ; get bootunit
ld c,a ; put in C
ld b,013h ; HBIOS func: disk read
call dsk$io ; do it
ret nz ; abort on error
; Check signature
ld hl,(mbrsec+1FEh) ; get signature
ld a,l ; first byte
cp 055h ; should be $55
jr nz,media5 ; if not, no part table
ld a,h ; second byte
cp 0AAh ; should be $AA
jr nz,media5 ; if not, no part table
; Search part table for CP/M entry (type 0x2E)
ld b,4 ; four entries in part table
ld hl,mbrsec+1BEh+4 ; offset of first part type
media3:
ld a,(hl) ; get part type
cp 2Eh ; CP/M partition?
jr z,media4 ; cool, grab the LBA offset
ld de,16 ; part table entry size
add hl,de ; bump to next part type
djnz media3 ; loop thru table
jr media5 ; too bad, no CP/M partition
media4:
; Capture the starting LBA of the CP/M partition we found
ld de,4 ; LBA is 4 bytes after part type
add hl,de ; point to it
ld de,lba ; loc to store lba offset
ld bc,4 ; 4 bytes (32 bits)
ldir ; copy it
dsk$login0:
; Check that requested slice is "inside" partition.
; Slice size is exactly 16,384 sectors (8mb), so we can just
; right shift partition sector count by 14 bits
ld e,(hl) ; HL points to first byte
inc hl ; ... of 32 bit partition
ld d,(hl) ; ... sector count,
inc hl ; ... load sector count
push de ; ... into DE:HL
ld e,(hl) ; ...
inc hl ; ...
ld d,(hl) ; ...
pop hl ; ... DE:HL = part size in sectors
ld b,2 ; DE = DE:HL >> 2 (tricky!)
call rl32 ; DE = slicecnt
ex de,hl ; HL = slicecnt
ld a,(slice) ; get target slice
ld c,a ; put in C
ld b,0 ; BC := requested slice #
scf ; set carry!
sbc hl,bc ; max slices - slice - 1
jp c,err_noslice ; slice too high, error exit
; For now, it is implied that a slice within a partition
; table will be in the "new" disk format. So, we now
; adjust the sectors per slice and media id.
; Use new slice format sectors per slice value
ld hl,16384 ; new sectors per slice
ld (sps),hl ; save it
; Update media id for new hard disk format
ld a,10 ; new media id
ld (medid),a ; save it
media5:
; Adjust LBA offset based on target slice
ld a,(slice) ; get slice, A is loop cnt
ld hl,(lba) ; set DE:HL
ld de,(lba+2) ; ... to starting LBA
ld bc,(sps) ; sectors per slice
boot6:
or a ; set flags to check loop cntr
jr z,boot8 ; done if counter exhausted
add hl,bc ; add one slice to low word
jr nc,boot7 ; check for carry
inc de ; if so, bump high word
boot7:
dec a ; dec loop downcounter
jr boot6 ; and loop
boot8:
set 7,d ; set LBA access flag
ld (lba),hl ; save new lba, low word
ld (lba+2),de ; save new lba, high word
media9:
; Locate DPB corresponding to media id
ld hl,dpb$start - dpb$sz
ld de,dpb$sz
ld b,a ; loop count
dsk$login1:
add hl,de ; next dpb
djnz dsk$login1 ; loop as needed
; hl is ptr to desired dpb
pop de ; restore DPH ptr
;halt
ex de,hl ; de = DPB adr, hl = DPH adr
push de ; save DPB adr
ld de,12 ; offset of DPB in DPH
add hl,de ; hl = adr of DPB field in DPH
pop de ; recover DPB adr
ld (hl),e ; update LSB
inc hl
ld (hl),d ; udpate MSB
ret ; done
ld a,(medid) ; get media id
ld b,a ; to loop count
media10:
add hl,de ; next dpb
djnz media10 ; loop as needed
; Stuff DPB ptr (HL) and LBA offset into DPH
; DPH: DPB @ +12, LBA @ +25
ld de,(curdph) ; load DPH pointer
ex de,hl ; de = DPB adr, hl = DPH adr
push de ; save DPB adr
ld de,12 ; offset of DPB in DPH
add hl,de ; hl = adr of DPB field in DPH
pop de ; recover DPB adr
ld (hl),e ; update LSB
inc hl ; point to MSB
ld (hl),d ; update MSB
ld de,12 ; 12 more bytes to LBA
add hl,de ; HL points to LBA offset field
ld de,lba ; DE points to LBA offset
ex de,hl ; swap for copy
ld bc,4 ; 4 bytes
ldir ; do it
xor a ; signal success
ret ; done
; disk READ and WRITE entry points.
@ -429,116 +603,115 @@ dsk$login1:
; if necessary, then return an error code in <A>
dsk$read:
; ld ix,30H
; halt
ld a,13h ; HBIOS disk read function
ld (func),a ; save it
jr dsk$rw ; common disk read/write code
;ld a,'R'
;call cout
dsk$write:
ld a,14h ; HBIOS disk write function
ld (func),a ; save it
jr dsk$rw ; common disk read/write code
push de ; save XDPH pointer
call dsk$seek ; disk seek
pop hl ; restore pointer to HL
ret nz ; abort on seek error
;
dec hl ; point to unit field of XDPH
dec hl
ld c,(hl) ; BIOS Disk Unit in C
ld b,13H ; HBIOS READ function
ld hl,(@dma) ; Dest buffer adr
dsk$rw:
; Common disk read/write routine
; Assumes func is set to HBIOS read or write
; Set retry address
ld hl,dsk$rw$retry
ld (retry$adr),hl
; Save XDPH address
ld (curdph),de ; save to curdph
dsk$rw$retry:
; Get LBA offset from DPH to DE:HL
ld hl,(curdph) ; HL := DPH adr
ld de,25 ; LBA value adr
add hl,de ; HL := LBA offset
ld e,(hl) ; lobyte of loword
inc hl ; bump
ld d,(hl) ; hibyte of loword
inc hl ; bump
push de ; save loword
ld e,(hl) ; lobyte of hiword
inc hl ; bump
ld d,(hl) ; hibyte of hiword
pop hl ; recover loword
bit 7,d ; LBA access bit set?
jr nz,dsk$rw2 ; if so, go to LBA I/O
; Floppy I/O
ld de,(@sect) ; sector -> de, head(d) becomes zero
ld hl,(@trk) ; track -> hl (low bit has head)
srl h ; shift head bit out of hl
rr l ; ... and into carry
rl d ; carry bit (head) into d
jr dsk$rw9 ; do the disk I/O
dsk$rw2:
; LBA I/O
push de ; save hiword of LBA
push hl ; save loword of LBA
; Get track and shift into correct bits
ld hl,(@trk) ; get track
ld de,0 ; clear hiword
ld b,4 ; x16 (16 spt assumed)
call rl32 ; do it
; Combine with sector
ld a,(@sect) ; get sector
or l ; combine
ld l,a ; and back to L
; Add in LBA offset
pop bc ; lba offset loword
add hl,bc ; add to cur loword
ex de,hl ; swap
pop bc ; lba offset hiword
adc hl,bc ; add w/ carry to cur hiword
ex de,hl ; swap back
dsk$rw9:
; DE:HL has sector address to read (LBA or CHS)
ld bc,(@dma) ; get dma address
ld (dma),bc ; save for dsk$io
if banked
ld a,(@dbnk) ; destination bank
call ?bnkxlt
ld a,(@dbnk) ; destination bank
call ?bnkxlt ; xlat to HBIOS
else
ld a,(0FFE0H) ; get current bank
ld a,(0FFE0H) ; get current bank
endif
ld d,a ; set desk bank
ld e,1 ; 1 sector
rst 08 ; do it
;call 0FFF0H
;call phex8
ret ; return
ld (bank),a
ld a,(func) ; get HBIOS func code
ld b,a ; put in B
ld a,(@rdrv) ; get disk unit
ld c,a ; put in C
;jr dsk$io ; fall thru to dsk$io!
dsk$io:
; Read/write a disk sector
; DE:HL is CHS/LBA, B is HBIOS func, C is disk unit
; Seek to requested sector in DE:HL
push bc ; save func & unit
ld b,012h ; HBIOS func: seek
call 0FFF0h ; do it
pop bc ; recover func & unit
jp nz,err_diskio ; handle error
; Read sector(s) into buffer
ld e,1 ; transfer count
ld hl,(dma) ; read into info sec buffer
ld a,(bank) ; HBIOS DMA bank
ld d,a ; put in D
call 0FFF0h ; do it
jp nz,err_diskio ; handle error
xor a ; signal success
ret ; and done
; lxi h,read$msg ; point at " Read "
; mvi a,88h ! mvi b,01h ; 1797 read + Z80DMA direction
; jmp rw$common
dsk$write:
;ld ix,32H
;halt
push de ; save XDPH pointer
call dsk$seek ; disk seek
pop hl ; restore pointer to XDPH
ret nz ; abort on seek error
;
dec hl ; point to unit field of XDPH
dec hl
ld c,(hl) ; BIOS Disk Unit in C
ld b,14H ; HBIOS WRITE function
ld hl,(@dma) ; Dest buffer adr
if banked
ld a,(@dbnk) ; destination bank
call ?bnkxlt
else
ld a,(0FFE0H) ; get current bank
endif
ld d,a ; set desk bank
ld e,1 ; 1 sector
rst 08 ; do it
;call 0FFF0H
ret ; return
; lxi h,write$msg ; point at " Write "
; mvi a,0A8h ! mvi b,05h ; 1797 write + Z80DMA direction
; ; jmp wr$common
dsk$seek:
dec de ; point to unit field of XDPH
dec de
ld a,(de) ; get it
ld c,a ; BIOS Disk Unit in C
ld b,12H ; HBIOS SEEK function
push bc ; save it
push de ; save XDPH pointer
ld b,17h ; HBIOS DEVICE function
rst 08 ; Do it, D=device type
ld a,d ; put in accum
and 0F0h ; isolate high bits
ld b,1 ; assume it is floppy, 1 head bit
ld c,01h ; 1 bit head mask
cp 10h ; floppy?
jr z,seek0 ; yup, skip ahead
ld b,4 ; must be hard disk, 4 head bits
ld c,0Fh ; 4 bit head mask
seek0:
pop de ; recover XDPH pointer
push bc ; save bc
inc de ; point to slice field of XDPH
ld a,(de) ; get it
ld e,a ; slice to E
ld h,65 ; number of tracks per slice
call mult8 ; HL now has track offset for slice
pop bc ; recover bc
push hl ; save track offset for now
ld hl,(@trk) ; get track value
ld a,l ; lsb of track to a
and c ; apply mask
ld d,a ; save in d
seek1:
srl h ; shift one bit out
rr l ; ... of hl
djnz seek1 ; do all bits
ld a,(@sect) ; get sector
ld e,a ; stuff it in e
ex de,hl ; de=track, hl=head/sect
ex (sp),hl ; save head/sect, hl = offset
add hl,de ; hl has final track value
pop de ; recover head/sect to de
pop bc ; recover function & unit
rst 08 ; perform seek
;call 0FFF0H
ret
;
; multiply 8-bit values
@ -557,6 +730,103 @@ mult8_noadd:
djnz mult8_loop
ret
rl32:
; Left shift DE:HL by B bits (B > 0)
or a ; clear carry
rl l ; rotate L thru carry
rl h ; rotate H thru carry
rl e ; rotate E thru carry
rl d ; rotate D thru carry
djnz rl32 ; loop B times
ret ; done
cin$echo: ; get console input, echo it, and shift to upper case
call ?const ; check for char
or a ; set flags
jr z,cin$echo1 ; nope, continue
call ?conin ; eat extraneous char
jr cin$echo ; and loop
cin$echo1:
call ?conin ; get char
push af ; save it
ld c,a ; put in C
call ?cono ; echo
pop af ; recover it
cp 'a' ; compare
ret c ; done if carry
sub 'a' - 'A' ; make upper case
ret ; and done
; call ?const ! ora a ! jz u$c1 ; see if any char already struck
; call ?conin ! jmp u$conin$echo ; yes, eat it and try again
;u$c1:
; call ?conin ! push psw
; mov c,a ! call ?cono
; pop psw ! cpi 'a' ! rc
; sui 'a'-'A' ; make upper case
; ret
err_nodisk:
ld hl,str_err_nodisk
jr err_perm
err_noslice:
ld hl,str_err_noslice
jr err_perm
err_perm:
call prt_err
jr err_ret
err_diskio:
cp -10 ; HBIOS read only error
jr z,err_rdonly ; if so, handle special
ld a,(@ermde) ; get error mode
cp 0FFh ; FFh means suppress
jr z,err_ret ; if so, go to err return
ld hl,str_err_diskio
call prt_err
ld hl,str_err_retry
call ?pmsg
call cin$echo
cp 'Y'
jr nz,err_ret ; return error to caller
ld hl,(retry$adr) ; get retry address
jp (hl) ; and go there
err_rdonly:
ld hl,str_err_rdonly
call prt_err
ld a,2 ; signal readonly media
ret
prt_err:
ld a,(@ermde) ; get error mode
cp 0FFh ; FFh means suppress
ret z ; if so, go to err return
push hl
call ?pderr
pop hl
jp ?pmsg
err_ret:
ld a,0FFh ; signal error
ret ; and done
str_err_retry db ", Retry (Y/N)?",0
str_err_nodisk db ", No disk",0
str_err_noslice db ", No slice",0
str_err_diskio db ", Disk I/O",0
str_err_rdonly db ", Read Only",0
str_err_prefix db 13,10,"BIOS Error: ",0
retry$adr dw ?wboot ; error retry address
curdph dw 0 ; working dph value
medid db 0 ; working media id value
unit db 0 ; working disk unit num
slice db 0 ; working slice num
lba dw 0,0 ; working lba
sps dw 0 ; sectors per slice
mbrsec ds 512 ; MBR sector buffer
dma dw 0 ; current DMA address
bank db 0 ; HBIOS DMA bank
func db 0 ; HBIOS function
;rw$common: ; seek to correct track (if necessary),
; ; initialize DMA controller,
; ; and issue 1797 command.

8
Source/CPM3/genbnk.dat

@ -8,12 +8,12 @@ MEMTOP = FD
BNKSWT = Y
COMBAS = 80
LERROR = Y
NUMSEGS = 03
NUMSEGS = 04
MEMSEG00 = 01,43,00
MEMSEG01 = 0E,72,02
MEMSEG02 = 01,7F,03
MEMSEG03 = 01,7F,04
MEMSEG04 = 00,C0,05
MEMSEG04 = 01,7F,05
MEMSEG05 = 00,C0,06
MEMSEG06 = 00,C0,07
MEMSEG07 = 00,C0,08
@ -57,7 +57,7 @@ ALTBNKSM = Y
ALTBNKSN = Y
ALTBNKSO = Y
ALTBNKSP = Y
NDIRRECA = 02
NDIRRECA = 08
NDIRRECB = 00
NDIRRECC = 00
NDIRRECD = 00
@ -73,7 +73,7 @@ NDIRRECM = 00
NDIRRECN = 00
NDIRRECO = 00
NDIRRECP = 00
NDTARECA = 02
NDTARECA = 10
NDTARECB = 00
NDTARECC = 00
NDTARECD = 00

6
Source/CPM3/loader.asm

@ -27,9 +27,13 @@
;
#INCLUDE "../ver.inc"
;
; BELOW, SYS_END MUST BE SET TO THE SIZE OF CPMLDR.BIN + SYS_LOC. IF
; THE SIZE OF CPMLDR.BIN CHANGES, SYS_SIZ MUST BE UPDATED!!!
;
SYS_SIZ .EQU $0F00 ; SIZE OF CPMLDR.BIN
SYS_ENT .EQU $0100 ; SYSTEM (OS) ENTRY POINT ADDRESS
SYS_LOC .EQU $0100 ; STARTING ADDRESS TO LOAD SYSTEM IMAGE
SYS_END .EQU $1480 ; ENDING ADDRESS OF SYSTEM IMAGE
SYS_END .EQU SYS_SIZ + SYS_LOC ; ENDING ADDRESS OF SYSTEM IMAGE
;
SEC_SIZE .EQU 512 ; DISK SECTOR SIZE
BLK_SIZE .EQU 128 ; OS BLOCK/RECORD SIZE

3
Source/CPM3/move.z80

@ -69,7 +69,8 @@ xbnkmov:
; 1: TPA BID_AUX 8Ch
; 2: BUFS BID_AUX-1 8Bh
; 3: BUFS BID_AUX-2 8Ah
; ...
; 4: BUFS BID_AUX-3 89h
; 5: BUFS BID_AUX-4 88h
;
; N.B., Below BID_AUX is considered RAM disk bank. Need to
; make sure RAM disk is kept small enough to stay below

3
Source/CPM3/optzpm.lib

@ -1,5 +1,4 @@
; global assembler options for BANKED BIOS
; with Boot Drive swapped into Drive A
; global assembler options for ZPM BIOS
true equ -1
false equ not true

115
Source/CPM3/util.z80

@ -1,9 +1,10 @@
title 'Utility module for RomWBW'
maclib options.lib
public addhla, bcd2bin, bin2bcd
public phex16, phex8, cout, crlf, crlf2
public addhla
public phex16, phex8
public cin, cout
public crlf, crlf2
public bcd2bin, bin2bcd
cseg
@ -14,45 +15,6 @@ addhla:
inc h
ret
bcd2bin:
; convert A from packed bcd to binary
push bc
ld c,a
and 0F0h
srl a
ld b,a
srl a
srl a
add a,b
ld b,a
ld a,c
and 0Fh
add a,b
pop bc
ret
bin2bcd:
; convert A from binary to packed bcd
push bc
ld b,10
ld c,-1
bin2bcd1:
inc c
sub b
jr nc,bin2bcd1
add a,b
ld b,a
ld a,c
add a,a
add a,a
add a,a
add a,a
or b
pop bc
ret
if 0
;
; Print the hex word value in HL
;
phex16:
@ -104,16 +66,29 @@ hexconv:
daa
ret
;
; input character to A
;
cin:
push bc
push de
push hl
ld bc,0080h
rst 08
ld a,e
pop hl
pop de
pop bc
ret
;
; output character from A
;
cout:
; save all incoming registers
push af
push bc
push de
push hl
ld e,a
ld bc,0100h
ld bc,0180h
rst 08
pop hl
pop de
@ -134,16 +109,44 @@ crlf:
call cout
pop af
ret
else
phex16:
phex8:
cout:
crlf2:
crlf:
halt
endif
;
; Convert A from packed BCD to binary
;
bcd2bin:
push bc
ld c,a
and 0F0h
srl a
ld b,a
srl a
srl a
add a,b
ld b,a
ld a,c
and 0Fh
add a,b
pop bc
ret
;
; Convert A from binary to packed BCD
;
bin2bcd:
push bc
ld b,10
ld c,-1
bin2bcd1:
inc c
sub b
jr nc,bin2bcd1
add a,b
ld b,a
ld a,c
add a,a
add a,a
add a,a
add a,a
or b
pop bc
ret
end

31
Source/Doc/Applications.md

@ -360,7 +360,7 @@ message.
## Etymology
The `SYSCOPY` command is an original product and the source code is
The `MODE` command is an original product and the source code is
provided in the RomWBW distribution.
`\clearpage`{=latex}
@ -521,15 +521,20 @@ This application is provided by Will Sowerbutts.
*`<filename>`* is the filename of the ROM image file
Options: (access method is auto-detected by default)
FLASH4 will auto-detect most parameters so additional options should not
normally be required.
Options:
| `/PARTIAL`: Allow flashing a large ROM from a smaller image file
| `/V`: Enable verbose output (one line per sector)
| `/P` or `/PARTIAL`: Allow flashing a large ROM from a smaller image file
| `/ROM`: Allow read-only use of unknown chip types
| `/Z180DMA`: Force Z180 DMA engine
| `/UNABIOS`: Force UNA BIOS bank switching
| `/ROMWBW`: Force RomWBW (v2.6+) bank switching
| `/ROMWBWOLD`: Force RomWBW (v2.5 and earlier) bank switching
| `/P112`: Force P112 bank switching
| `/N8VEMSBC`: Force N8VEM SBC (v1, v2), Zeta (v1) SBC bank switching
## Usage
@ -949,6 +954,24 @@ accurately pace the sound file output. If no system timer is
available, a delay loop is calculated instead. The delay loop will not
be as accurate as the system timer.
There are two modes of operations. A direct hardware interface for the
AY-3-8910 or YM2149 chips, or a compatibility layer thru HBIOS supporting
the SN76489 chip.
By default the application will attempt to interface directly to the sound
chip. The optional argument `--hbios` supplied after the filename, will
enable the application to use the HBIOS sound driver.
The HBIOS mode also support other switch as desribed below.
| Switch | Description |
| ----------- | ------------------------------------------------------ |
| `--hbios` | Utilise HBIOS' sound driver |
| `+t1` | Play tune an octave higher |
| `+t2` | Play tune two octaves higher |
| `-t1` | Play tune an octave lower |
| `-t2` | Play tune two octaves lower |
All RomWBW operating system boot disks include a selection of sound
files in user area 3.
@ -960,4 +983,4 @@ software was adapted and embedded from pre-existing sources. The YM
player code is from MYMPLAY 0.4 by Lieves!Tuore and the PT player code
is (c)2004-2007 S.V.Bulba <vorobey@mail.khstu.ru>.
The source code is provided in the RomWBW distribution.
The source code is provided in the RomWBW distribution.

530
Source/Doc/Architecture.md

@ -410,6 +410,28 @@ require double-buffering if the caller’s buffer is in the lower 32K of CPU
address space. For optimal performance, such buffers should be placed in
the upper 32K of CPU address space.
Error Codes
-----------
The following error codes are defined generically for all HBIOS functions.
Most function calls will return a result in register A.
_Code_ | _Meaning_
------ | ---------
0 | function succeeded
-1 | undefined error
-2 | function not implemented
-3 | invalid function
-4 | invalid unit numberr
-5 | out of memory
-6 | parameter out of range
-7 | media not present
-8 | hardware not present
-9 | I/O error
-10 | write request to read-only media
-11 | device timeout
-12 | invalid configuration
`\clearpage`{=latex}
Character Input/Output (CIO)
@ -536,6 +558,8 @@ unit. Register pair DE contains the line characteristics upon return.
| C: Serial Device Attributes
| D: Serial Device Type
| E: Serial Device Number
| H: Serial Device Unit Mode
| L: Serial Device Unit I/O Base Address
Reports information about the character device unit specified. Register C
indicates the device attributes: 0=RS-232 and 1=Terminal. Register D
@ -563,7 +587,7 @@ _Id_ | _Device Type / Driver_
Disk Input/Output (DIO)
-----------------------
Character input/output functions require that a character unit be specified
Disk input/output functions require that a disk unit be specified
in the C register. This is the logical disk unit number assigned during
the boot process that identifies all disk i/o devices uniquely.
@ -583,16 +607,18 @@ MID\_FD144 | 6 | 3.5" 1.44M Floppy
MID\_FD360 | 7 | 5.25" 360K Floppy
MID\_FD120 | 8 | 5.25" 1.2M Floppy
MID\_FD111 | 9 | 8" 1.11M Floppy
MID\_HDNEW | 10 | Hard Disk with 1024 Directory entries
### Function 0x10 -- Disk Status (DIOSTATUS)
| _Entry Parameters_
| B: 0x10
| C: Disk Device Unit ID
| _Exit Results_
| A: Status (0=OK, else error)
### Function 0x11 -- Disk Status (DIORESET)
### Function 0x11 -- Disk Reset (DIORESET)
| _Entry Parameters_
| B: 0x11
@ -643,6 +669,7 @@ determine if the device supports LBA addressing.
| _Entry Parameters_
| B: 0x13
| C: Disk Device Unit ID
| D: Bank ID
| E: Block Count
| HL: Buffer Address
@ -654,18 +681,18 @@ Read Block Count sectors to buffer address starting at current target
sector. Current sector must be established by prior seek function; however,
multiple read/write/verify function calls can be made after a seek
function. Current sector is incremented after each sector successfully
read. On error, current sector is sector is sector where error occurred.
read. On error, current sector is sector where error occurred.
Blocks read indicates number of sectors successfully read.
Caller must ensure: 1) buffer address is large enough to contain data for
all sectors requested, and 2) entire buffer area resides in upper 32K of
memory.
all sectors requested, and 2) does not cross a 32k memory bank boundary.
### Function 0x14 -- Disk Write (DIOWRITE)
| _Entry Parameters_
| B: 0x14
| C: Disk Device Unit ID
| D: Bank ID
| E: Block Count
| HL: Buffer Address
@ -677,12 +704,10 @@ Write Block Count sectors to buffer address starting at current target
sector. Current sector must be established by prior seek function; however,
multiple read/write/verify function calls can be made after a seek
function. Current sector is incremented after each sector successfully
written. On error, current sector is sector is sector where error occurred.
written. On error, current sector is sector where error occurred.
Blocks written indicates number of sectors successfully written.
Caller must ensure: 1) buffer address is large enough to contain data for
all sectors being written, and 2) entire buffer area resides in upper 32K
of memory.
Caller must ensure the source buffer does not cross a 32k memory bank boundary.
### Function 0x15 -- Disk Verify (DIOVERIFY)
@ -723,6 +748,8 @@ of memory.
| C: Attributes
| D: Device Type
| E: Device Number
| H: Disk Device Unit Mode
| L: Disk Device Unit I/O Base Address
Reports information about the character device unit specified. Register D
indicates the device type (driver) and register E indicates the physical
@ -739,9 +766,9 @@ Bit 7: 1=Floppy, 0=Hard Disk (or similar, e.g. CF, SD, RAM)
| Bits 1-0: Reserved
| If Hard Disk:
| Bit 6: Removable\
| Bit 6: Removable
| Bits: 5-3: Type (0=Hard, 1=CF, 2=SD, 3=USB,
| 4=ROM, 5=RAM, 6=RAMF, 7=Reserved)
| 4=ROM, 5=RAM, 6=RAMF, 7=FLASH)
| Bits 2-0: Reserved
Each disk device is handled by an appropriate driver (IDE, SD,
@ -792,7 +819,6 @@ function will return an error status.
| _Entry Parameters_
| B: 0x1A
| C: Disk Device Unit ID
| HL: Buffer Address
| _Exit Results_
| A: Status (0=OK, else error)
@ -912,6 +938,53 @@ to by HL. HL must point to a location in the top 32K of CPU address space.
Write the entire contents of the Non-Volatile RAM from the buffer pointed
to by HL. HL must point to a location in the top 32K of CPU address space.
### Function 0x26 -- RTC Get Alarm (RTCGETALM)
| _Entry Parameters_
| B: 0x26
| _Exit Results_
| A: Status (0=OK, else error)
Documentation required...
### Function 0x27 -- RTC Set Alarm (RTCSETALM)
| _Entry Parameters_
| B: 0x27
| _Exit Results_
| A: Status (0=OK, else error)
Documentation required...
### Function 0x28 -- RTC DEVICE (RTCDEVICE)
| _Entry Parameters_
| B: 0x28
| C: RTC Device Unit ID
| _Exit Results_
| A: Status (0=OK, else error)
| D: Device Type
| E: Device Number
| H: RTC Device Unit Mode
| L: RTC Device Unit I/O Base Address
Reports information about the RTC device unit specified. Register D
indicates the device type (driver) and register E indicates the physical
device number assigned by the driver.
Each RTC device is handled by an appropriate driver (DSRTC, BQRTC,
etc.) which is identified by a device type id from the table below.
**Type ID** | **Disk Device Type**
----------- | --------------------
0x00 | DS1302
0x10 | BQ4845P
0x20 | SIMH
0x30 | System Periodic Timer
`\clearpage`{=latex}
Video Display Adapter (VDA)
@ -1069,8 +1142,10 @@ Keyboard should be flushed.
| _Exit Results_
| A: Status (0=OK, else error)
| D=Device Type
| E=Device Number
| D: Device Type
| E: Device Number
| H: VDA Device Unit Mode
| L: VDA Device Unit I/O Base Address
Reports information about the video device unit specified.
@ -1292,6 +1367,244 @@ codes as described at the start of this section.
`\clearpage`{=latex}
Sound (SND)
------------
### Function 0x50 -- Sound Reset (SNDRESET)
| _Entry Parameters_
| B: 0x50
| C: Audio Device Unit ID
| _Exit Results_
| A: Status (0=OK, else error)
Reset the sound chip. Turn off all sounds and set volume on all
channels to silence.
### Function 0x51 -- Sound Volume (SNDVOL)
| _Entry Parameters_
| B: 0x51
| C: Audio Device Unit ID
| L: Volume (00=Silence, FF=Maximum)
| _Exit Results_
| A: Status (0=OK, else error)
This function sets the sound chip volume parameter. The volume will
be applied when the next SNDPLAY function is invoked.
Note that not all sounds chips implement 256 volume levels. The
driver will scale the volume to the closest possible level the
chip provides.
### Function 0x52 -- Sound Period (SNDPRD)
| _Entry Parameters_
| B: 0x52
| C: Audio Device Unit ID
| HL: Period
| _Returned Values_
| A: Status (0=OK, else error)
This function sets the sound chip period parameter. The period will
be applied when the next SNDPLAY function is invoked.
The period value is a driver specific value. To play standardized
notes, use the SNDNOTE function. A higher value will generate a lower
note. The maximum value that can be used is driver specific. If value
supplied is beyond driver capabilities, register A will be set to $FF.
### Function 0x53 -- Sound Note (SNDNOTE)
| _Entry Parameters_
| B: 0x53
| C: Audio Device Unit ID
| HL: Value of note to play
| _Returned Values_
| A: Status (0=OK, else error)
This function sets the sound chip period parameter with steps of quarter
of a semitone. The value of 0 (lowest) corresponds to Bb/A# in octave 0.
Increase by steps of 4 to select the next corresponding note.
Increase by steps of 48 to select the same note in next octave.
If the driver is able to generate the requested note, a success (0) is
returned, otherwise a non-zero error state will be returned.
The sound chip resolution and its oscillator limit the range and
accuracy of the notes played. The typically range of the AY-3-8910
is six octaves, Bb2/A#2-A7, where each value is a unique tone. Values
above and below can still be played but each quarter tone step may not
result in a note change.
The following table shows the mapping of the input value in HL
to the corresponding octave and note.
| Note | Oct 0 | Oct 1 | Oct 2 | Oct 3 | Oct 4 | Oct 5 | Oct 6 | Oct 7 |
|:----- | -----:| -----:| -----:| -----:| -----:| -----:| -----:| -----:|
| Bb/A# | 0 | 48 | 96 | 144 | 192 | 240 | 288 | 336 |
| B | 4 | 52 | 100 | 148 | 196 | 244 | 292 | 340 |
| C | 8 | 56 | 104 | 152 | 200 | 248 | 296 | 344 |
| C#/Db | 12 | 60 | 108 | 156 | 204 | 252 | 300 | 348 |
| D | 16 | 64 | 112 | 160 | 208 | 256 | 304 | 352 |
| Eb/D# | 20 | 68 | 116 | 164 | 212 | 260 | 308 | 356 |
| E | 24 | 72 | 120 | 168 | 216 | 264 | 312 | 360 |
| F | 28 | 76 | 124 | 172 | 220 | 268 | 316 | 364 |
| F#/Gb | 32 | 80 | 128 | 176 | 224 | 272 | 320 | 368 |
| G | 36 | 84 | 132 | 180 | 228 | 276 | 324 | 372 |
| Ab/G# | 40 | 88 | 136 | 184 | 232 | 280 | 328 | 376 |
| A | 44 | 92 | 140 | 188 | 236 | 284 | 332 | 380 |
### Function 0x54 -- Sound Play SNDPLAY)
| _Entry Parameters_
| B: 0x54
| C: Audio Device Unit ID
| D: Channel
| _Returned Values_
| A: Status (0=OK, else error)
This function applies the previously specified volume and period by
programming the sound chip with the appropriate values. The values
are applied to the specified channel of the chip.
For example, to play a specific note on Audio Device UNit 0,
the following HBIOS calls would need to be made:
```
HBIOS B=51 C=00 L=80 ; Set volume to half level
HBIOS B=53 C=00 L=69 ; Select Middle C (C4) assuming SN76489
HBIOS B=54 C=00 D=01 ; Play note on Channel 1
```
### Function 0x55 -- Sound Query (SNDQUERY)
| _Entry Parameters_
| B: 0x55
| C: Audio Device Unit ID
| E: Subfunction
| _Returned Values_
| A: Status (0=OK, else error)
This function will return the status of the current pending command or
key aspects of the specific Audio Device.
#### SNDQUERY Subfunction 0x01 -- Get count of audio channels supported (SNDQ_CHCNT)
| _Entry Parameters_
| B: 0x55
| E: 0x01
| _Returned Values_
| A: Status (0=OK, else error)
| B: Count of standard tone channels
| C: Count of noise tone channels
#### SNDQUERY Subfunction 0x02 -- Get current volume setting (SNDQ_VOL)
| _Entry Parameters_
| B: 0x55
| E: 0x02
| _Returned Values_
| A: Status (0=OK, else error)
| H: 0
| L: Current volume setting
#### SNDQUERY Subfunction 0x03 -- Get current period setting (SNDQ_PERIOD)
| _Entry Parameters_
| B: 0x55
| E: 0x03
| _Returned Values_
| A: Status (0=OK, else error)
| HL: Current period setting
#### SNDQUERY Subfunction 0x04 -- Get device details (SNDQ_DEV)
| _Entry Parameters_
| B: 0x55
| E: 0x04
| _Returned Values_
| A: Status (0=OK, else error)
| B: Driver identity
| HL: Driver specific port settings
| DE: Driver specific port settings
Reports information about the audio device unit specified.
Register B reports the audio device type (see below).
Registers HL and DE contain relevant port addresses for the hardware
specific to each device type.
The currently defined audio device types are:
AUDIO ID | Value | Device | Returned registers
-------------- | ----- | ---------- | --------------------------------------------
SND_SN76489 | 0x01 | SN76489 | E: Left channel port, L: Right channel port
SND_AY38910 | 0x02 | AY-3-8910 | D: Address port, E: Data port
SND_BITMODE | 0x03 | I/O PORT | D: Address port, E: Bit mask
### Function 0x56 -- Sound Duration (SNDDUR)
| _Entry Parameters_
| B: 0x56
| C: Audio Device Unit ID
| HL: Duration
| _Returned Values_
| A: Status (0=OK, else error)
This function sets the duration of the note to be played in milliseconds.
If the duration is set to zero, then the play function will operate in a non-blocking
mode. i.e. a tone will start playing and the play function will return. The tone will
continue to play until the next tone is played. I/O PORT are not compatible and will
not play a note if the duration is zero.
For other values, when a tone is played, it will play for the duration defined in HL
and then return.
### Function 0x57 -- Sound Device (SNDDEVICE)
| _Entry Parameters_
| B: 0x57
| C: Sound Device Unit Number
| _Exit Results_
| A: Status (0=OK, else error)
| D: Serial Device Type
| E: Serial Device Number
| H: Serial Device Unit Mode
| L: Serial Device Unit I/O Base Address
Reports information about the sound device unit specified. Register D
indicates the device type (driver) and register E indicates the physical
device number assigned by the driver.
Each character device is handled by an appropriate driver (AY38910, SN76489,
etc.). The driver can be identified by the Device Type. The assigned Device
Types are listed below.
_Id_ | _Device Type / Driver_
---- | ----------------------
0x00 | SN76489
0x10 | AY38910
0x20 | BITMODE
`\clearpage`{=latex}
System (SYS)
------------
@ -1299,13 +1612,47 @@ System (SYS)
| _Entry Parameters_
| B: 0xF0
| C: Subfunction (see below)
| _Exit Results_
| A: Status (0=OK, else error)
This function performs various forms of a system reset depending on
the value of the subfucntion. See subfunctions below.
#### SYSRESET Subfunction 0x00 -- Internal HBIOS Reset (RESINT)
| _Entry Parameters_
| BC: 0xF000
| _Returned Values_
| A: Status (0=OK, else error)
Perform a soft reset of HBIOS. Releases all HBIOS memory allocated by
current OS. Does not reinitialize physical devices.
#### SYSRESET Subfunction 0x01 -- Warm Start System (RESWARM)
| _Entry Parameters_
| BC: 0xF001
| _Returned Values_
| <none>
Warm start the system returning to the boot loader prompt. Does not
reinitialize physical devices.
#### SYSRESET Subfunction 0x02 -- Cold Start System (RESCOLD)
| _Entry Parameters_
| BC: 0xF002
| _Returned Values_
| <none>
Perform a system cold start (like a power on). All devices are
reinitialized.
### Function 0xF1 -- System Version (SYSVER)
| _Entry Parameters_
@ -1462,6 +1809,32 @@ available along with the registers/information returned.
| A: Status (0=OK, else error)
| E: Count of Serial Device Units
#### SYSGET Subfunction 0x01 -- Get Serial Unit Function (CIOFN)
| _Entry Parameters_
| BC: 0xF801
| D: CIO Function
| E: Unit
| _Returned Values_
| A: Status (0=OK, else error)
| HL: Driver Function Address
| DE: Unit Data Address
This function will lookup the actual driver function address and
unit data address inside the HBIOS driver. On entry, place the
CIO function number to lookup in D and the CIO unit number in E.
On return, HL will contain the address of the requested function
in the HBIOS driver (in the HBIOS bank). DE will contain the
associated unit data address (also in the HBIOS bank). See
Appendix A for details.
This function can be used to speed up HBIOS calls by looking up the
function and data address for a specific driver function. After this,
the caller can use interbank calls directly to the function in the
driver which bypasses the overhead of the normal function invocation
lookup.
#### SYSGET Subfunction 0x10 -- Get Disk Device Unit Count (DIOCNT)
| _Entry Parameters_
@ -1471,6 +1844,40 @@ available along with the registers/information returned.
| A: Status (0=OK, else error)
| E: Count of Disk Device Units
#### SYSGET Subfunction 0x11 -- Get Disk Unit Function (DIOFN)
| _Entry Parameters_
| BC: 0xF811
| D: DIO Function
| E: Unit
| _Returned Values_
| A: Status (0=OK, else error)
| HL: Driver Function Address
| DE: Unit Data Address
This function will lookup the actual driver function address and
unit data address inside the HBIOS driver. On entry, place the
DIO function number to lookup in D and the DIO unit number in E.
On return, HL will contain the address of the requested function
in the HBIOS driver (in the HBIOS bank). DE will contain the
associated unit data address (also in the HBIOS bank).
This function can be used to speed up HBIOS calls by looking up the
function and data address for a specific driver function. After this,
the caller can use interbank calls directly to the function in the
driver which bypasses the overhead of the normal function invocation
lookup.
#### SYSGET Subfunction 0x20 -- Get Disk Device Unit Count (RTCCNT)
| _Entry Parameters_
| BC: 0xF820
| _Returned Values_
| A: Status (0=OK, else error)
| E: Count of RTC Device Units
#### SYSGET Subfunction 0x40 -- Get Video Device Unit Count (VDACNT)
| _Entry Parameters_
@ -1480,6 +1887,67 @@ available along with the registers/information returned.
| A: Status (0=OK, else error)
| E: Count of Video Device Units
#### SYSGET Subfunction 0x41 -- Get Video Unit Function (VDAFN)
| _Entry Parameters_
| BC: 0xF841
| D: VDA Function
| E: Unit
| _Returned Values_
| A: Status (0=OK, else error)
| HL: Driver Function Address
| DE: Unit Data Address
This function will lookup the actual driver function address and
unit data address inside the HBIOS driver. On entry, place the
VDA function number to lookup in D and the VDA unit number in E.
On return, HL will contain the address of the requested function
in the HBIOS driver (in the HBIOS bank). DE will contain the
associated unit data address (also in the HBIOS bank). See
Appendix A for details.
This function can be used to speed up HBIOS calls by looking up the
function and data address for a specific driver function. After this,
the caller can use interbank calls directly to the function in the
driver which bypasses the overhead of the normal function invocation
lookup.
#### SYSGET Subfunction 0x50 -- Get Sound Device Unit Count (SNDCNT)
| _Entry Parameters_
| BC: 0xF850
| _Returned Values_
| A: Status (0=OK, else error)
| E: Count of Sound Device Units
#### SYSGET Subfunction 0x51 -- Get Sound Unit Function (SNDFN)
| _Entry Parameters_
| BC: 0xF851
| D: SND Function
| E: Unit
| _Returned Values_
| A: Status (0=OK, else error)
| HL: Driver Function Address
| DE: Unit Data Address
This function will lookup the actual driver function address and
unit data address inside the HBIOS driver. On entry, place the
SND function number to lookup in D and the SND unit number in E.
On return, HL will contain the address of the requested function
in the HBIOS driver (in the HBIOS bank). DE will contain the
associated unit data address (also in the HBIOS bank). See
Appendix A for details.
This function can be used to speed up HBIOS calls by looking up the
function and data address for a specific driver function. After this,
the caller can use interbank calls directly to the function in the
driver which bypasses the overhead of the normal function invocation
lookup.
#### SYSGET Subfunction 0xD0 -- Get Timer Tick Count (TIMER)
| _Entry Parameters_
@ -1488,6 +1956,7 @@ available along with the registers/information returned.
| _Returned Values_
| A: Status (0=OK, else error)
| DE:HL: Current Timer Tick Count Value
| C: Tick frequency (typically 50 or 60)
#### SYSGET Subfunction 0xD1 -- Get Seconds Count (SECONDS)
@ -1573,7 +2042,6 @@ available along with the registers/information used as input.
| _Returned Values_
| A: Status (0=OK, else error)
#### SYSSET Subfunction 0xE0 -- Set Boot Information (BOOTINFO)
| _Entry Parameters_
@ -1721,3 +2189,35 @@ On entry, register E must contain an index into the interrupt vector table
and register HL must contain the address of the new interrupt vector to
be inserted in the table at the index. On return, HL will contain the
previous address in the table at the index.
`\clearpage`{=latex}
### Appendix A Driver Instance Data fields
The following section outlines the read only data referenced by the
`SYSGET`, subfunctions `xxxFN` for specific drivers.
#### TMS9918 Driver:
| Name | Offset | Size (bytes)| Description |
|--------|--------|-------------|-------------|
| PPIA | 0 | 1 | PPI PORT A |
| PPIB | 1 | 1 | PPI PORT B |
| PPIC | 2 | 1 | PPI PORT C |
| PPIX | 3 | 1 | PPI CONTROL PORT |
| DATREG | 4 | 1 | IO PORT ADDRESS FOR MODE 0 |
| CMDREG | 5 | 1 | IO PORT ADDRESS FOR MODE 1 |
| The following are the register mirror values that HBIOS used for initialisation |
| REG. 0 | 6 | 1 | $00 - NO EXTERNAL VID
| REG. 1 | 7 | 1 | $50 or $70 - SET MODE 1 and interrupt if enabled |
| REG. 2 | 8 | 1 | $00 - PATTERN NAME TABLE := 0
| REG. 3 | 9 | 1 | $00 - NO COLOR TABLE
| REG. 4 | 10 | 1 | $01 - SET PATTERN GENERATOR TABLE TO $800
| REG. 5 | 11 | 1 | $00 - SPRITE ATTRIBUTE IRRELEVANT
| REG. 6 | 12 | 1 | $00 - NO SPRITE GENERATOR TABLE
| REG. 7 | 13 | 1 | $F0 - WHITE ON BLACK
| DCNTL* | 14 | 1 | Z180 DMA/WAIT CONTROL |
* ONLY PRESENT FOR Z180 BUILDS

830
Source/Doc/Catalog.md

@ -0,0 +1,830 @@
!include(Common.inc)
!def(document)(Disk Catalog)
!def(author)(Mykl Orders)
---
title: |
| !product
| Version !ver
|
| !document
author: !author (mailto:!authmail)
date: !date
institution: !orgname
documentclass: article
classoption:
- oneside
toc: true
papersize: letter
geometry:
- top=1.5in
- bottom=1.5in
- left=1.0in
- right=1.0in
# - showframe
linestretch: 1.25
colorlinks: true
fontfamily: helvet
fontsize: 12pt
header-includes:
- |
```{=latex}
\usepackage{fancyhdr}
\usepackage{xhfill}
\renewcommand*{\familydefault}{\sfdefault}
\setstretch{1.25} % for TOC
```
---
```{=latex}
\clearpage
\pagestyle{fancyplain}
\fancyhf{}
\pagenumbering{arabic}
\lhead{\fancyplain{}{\nouppercase{\footnotesize \bfseries \leftmark \hfill !product !document}}}
\lfoot{\small RetroBrew Computing Group ~~ {\xrfill[3pt]{1pt}[cyan]} ~~ \thepage}
```
`\clearpage`{=latex}
# RomWBW Distribution File Catalog
This document is a reference to the files found on the disk media
distributed with RomWBW. Specifically, RomWBW provides a set
of floppy and hard disk images in the Binary directory of the
distribution. The contents of these images is listed here.
The files on the disk images were sourced from a variety of locations.
The primary sources of these files are listed below. Note that the
primary documentation for each of these sources is listed. You are
strongly encouraged to refer to this documentation for more information
on using the applications and files listed.
## Sources
- **RomWBW**: RomWBW Custom Applications
Documentation: RomWBW Applications.pdf*
These files are custom applications built exclusively to enhance the
functionality of RomWBW. In some cases they are built from scratch
while others are customized versions of well known CP/M tools.
- **CPM22**: Digital Research CP/M-80 2.2 Distribution Files
Documentation: CPM Manual.pdf
These files are from the official Digital Research distribution
of CP/M 2.2. Applications have been patched according to the
DRI patch list.
- **ZSDOS**: ZSDOS 1.1 Disk Operating System Distribution Files
Documentation: *ZSDOS Manual.pdf*
These files are from the official ZSDOS 1.1 distribution. Some of
the files are redistributions of applications from other sources.
- **ZCPR**: ZCPR 1.0 Command Processor Distribution Files
Documentation: *ZCPR Manual.pdf*
These files are from the ZCPR 1.0 distribution.
- **NZCOM**: NZCOM Automatic Z-System Distribution Files
Documentation: *NZCOM Users Manual.pdf*
These files are from the last official release of NZCOM.
- **CPM3**: Digital Research CP/M 3 Distribution Files
Documentation: *CPM3 Users Guide.pdf*, *CPM3 System Guide.pdf*,
*CPM3 Programmers Guide.pdf*, *CPM3 Command Summary.pdf*
These files are from the official Digital Research distribution of
CP/M 3. Applications have been patched according to the DRI
patch list.
- **ZPM3**: Digital Research CP/M-80 2.2 Distribution Files
Documentation: *CPM Manual.pdf*
These files are from Simeon Cran's ZPM3 operating system distribution.
`\clearpage`{=latex}
# CPM 2.2 Boot Disk
| Floppy Disk Image: **fd_cpm22.img**
| Hard Disk Image: **hd_cpm22.img**
| Combo Disk Image: **Slice 0**
| **User 0** | **Source** | **Description** |
| -------------- | ---------- | ------------------------------------------------------------ |
| `ASM.COM` | CPM22 | DRI 8080 Assembler |
| `CR.COM` | -- | Crunch archiver |
| `DDT.COM` | CPM22 | DRI Dynamic Debugger |
| `DDTZ.DOC` | -- | Z80 replacement for DDT |
| `DIRX.COM` | -- | Directory lister with file sizes |
| `DUMP.COM` | CPM22 | DRI type contents of disk file in hex |
| `ED.COM` | CPM22 | DRI context editor |
| `KERMIT.COM` | -- | Generic CP/M 2.2 Kermit communication application |
| `LBREXT.COM` | -- | Extract library files |
| `LIB.COM` | -- | DRI Library manager |
| `LINK.COM` | -- | DRI CPM relocatable linker |
| `LOAD.COM` | -- | DRI hex file loader into memory |
| `MAC.COM` | -- | DRI CPM macro assembler |
| `MBASIC.COM` | -- | Microsoft Basic |
| `PIP.COM` | CPM22 | DRI Periperal Interchange Program |
| `PMARC.COM` | -- | LHA file compressor |
| `PMEXT.COM` | -- | Extractor for PMARC archives |
| `RMAC.COM` | -- | DRI Relocatable Macro Assembler |
| `STAT.COM` | CPM22 | DRI statistices about file storage and device assignment |
| `SUBMIT.COM` | CPM22 | DRI batch processor |
| `UNCR.COM` | -- | NZCOM Uncrunch decompression |
| `UNZIP.COM` | -- | Extractor for ZIP archives |
| `XSUB.COM` | CPM22 | DRI eXtended submit |
| `ZSID.COM` | -- | DRI Z80 symbolic instruction debugger |
| `ASSIGN.COM` | RomWBW | RomWBW Drive/Slice mapper |
| `FAT.COM` | RomWBW | RomWBW FAT filesystem access |
| `FDU.COM` | RomWBW | RomWBW Floppy Disk Utility |
| `FORMAT.COM` | RomWBW | RomWBW media formatter (placeholder) |
| `INTTEST.COM` | RomWBW | RomWBW Interrupt test |
| `MODE.COM` | RomWBW | RomWBW Modify serial port characteristics |
| `RTC.COM` | RomWBW | RomWBW Display and set RTC |
| `SURVEY.COM` | RomWBW | System survey |
| `SYSCOPY.COM` | RomWBW | RomWBW Read/write system boot image |
| `SYSGEN.COM` | RomWBW | DRI CPM SYSGEN to put CPM onto a new drive |
| `TALK.COM` | RomWBW | RomWBW Direct console I/O to a serial port |
| `TIMER.COM` | RomWBW | RomWBW Display timer tick counter |
| `TUNE.COM` | RomWBW | RomWBW Play PT or MYM sound files |
| `XM.COM` | RomWBW | RomWBW XMODEM file transfer |
| `CPM.SYS` | RomWBW | CPM2.2 system image |
| `CLRDIR.COM` | -- | Max Scane's disk directory cleaner |
| `COMPARE.COM` | -- | FoxHollow compare two files |
| `DDTZ.COM` | -- | Z80 replacement for DDT |
| `FDISK80.COM` | -- | John Coffman's Partition editor for FAT filesystem |
| `FLASH.COM` | -- | Will Sowerbutts' in-situ EEPROM programmer |
| `NULU.COM` | -- | NZCOM new library utility |
| `UNARC.COM` | -- | Extractor for ARC archives |
| `ZAP.COM` | -- | Disk editor/patcher |
| `ZDE.COM` | -- | Z-system display editor |
| `ZDENST.COM` | -- | ZDE Installer |
| **User 1** | **Source** | **Description** |
| -------------- | ---------- | ------------------------------------------------------------ |
| `SAMPKEY.DOC` | -- | ZDE Distribution File |
| `SAMPKEY.ZDK` | -- | ZDE Distribution File |
| `SAMPKEY.ZDT` | -- | ZDE Distribution File |
| `ZDE10.DOC` | -- | ZDE Distribution File |
| `ZDE10.FOR` | -- | ZDE Distribution File |
| `ZDE10.NEW` | -- | ZDE Distribution File |
| `ZDE10.QRF` | -- | ZDE Distribution File |
| `ZDE10.TOC` | -- | ZDE Distribution File |
| `ZDE13.FOR` | -- | ZDE Distribution File |
| `ZDE13.NEW` | -- | ZDE Distribution File |
| `ZDE16.COM` | -- | ZDE Distribution File |
| `ZDE16.DIR` | -- | ZDE Distribution File |
| `ZDE16.FIX` | -- | ZDE Distribution File |
| `ZDE16.FOR` | -- | ZDE Distribution File |
| `ZDE16.NEW` | -- | ZDE Distribution File |
| `ZDE16A.COM` | -- | ZDE Distribution File |
| `ZDE16A.PAT` | -- | ZDE Distribution File |
| `ZDENST16.COM` | -- | ZDE Distribution File |
| `ZDEPROP.DOC` | -- | ZDE Distribution File |
| `ZDEPROP.Z80` | -- | ZDE Distribution File |
| `ZDKCOM13.COM` | -- | ZDE Distribution File |
| `ZDKCOM13.DOC` | -- | ZDE Distribution File |
| **User 3** | **Source** | **Description** |
| -------------- | ---------- | ------------------------------------------------------------ |
| `ATTACK.PT3` | -- | Sound File |
| `BACKUP.PT3` | -- | Sound File |
| `BADMICE.PT3` | -- | Sound File |
| `DEMO.MYM` | -- | Sound File |
| `DEMO1.MYM` | -- | Sound File |
| `DEMO3.MYM` | -- | Sound File |
| `DEMO3MIX.MYM` | -- | Sound File |
| `DEMO4.MYM` | -- | Sound File |
| `HOWRU.PT3` | -- | Sound File |
| `ITERATN.PT3` | -- | Sound File |
| `LOOKBACK.PT3` | -- | Sound File |
| `LOUBOUTN.PT3` | -- | Sound File |
| `NAMIDA.PT3` | -- | Sound File |
| `RECOLL.PT3` | -- | Sound File |
| `SANXION.PT3` | -- | Sound File |
| `SYNCH.PT3` | -- | Sound File |
| `TOSTAR.PT3` | -- | Sound File |
| `VICTORY.PT3` | -- | Sound File |
| `WICKED.PT3` | -- | Sound File |
| `YEOLDE.PT3` | -- | Sound File |
| `YEOVIL.PT3` | -- | Sound File |
`\clearpage`{=latex}
# ZSDOS 1.1 Boot Disk
| Floppy Disk Image: **fd_zsdos.img**
| Hard Disk Image: **hd_zsdos.img**
| Combo Disk Image: **Slice 1**
| **User 0** | **Source** | **Description** |
| -------------- | ---------- | ------------------------------------------------------------ |
| `ASM.COM` | CPM22 | DRI 8080 Assembler |
| `CLOCKS.DAT` | ZSDOS | ZSDOS Library of clock drivers |
| `COPY.CFG` | ZSDOS | ZSDOS Configuration file for COPY.COM |
| `COPY.COM` | ZSDOS | ZSDOS File copier with file dates and archiving |
| `COPY.UPD` | ZSDOS | ZSDOS ??? |
| `CR.COM` | -- | Crunch archiver |
| `DATSWEEP.COM` | ZSDOS | ZSDOS Comprehensive file management utility |
| `DDT.COM` | CPM22 | DRI Dynamic Debugger |
| `DDTZ.DOC` | -- | Z80 replacement for DDT |
| `DIRX.COM` | -- | Directory lister with file sizes |
| `DSCONFIG.COM` | ZSDOS | ZSDOS DATSWEEP configuration tool |
| `DUMP.COM` | CPM22 | DRI type contents of disk file in hex |
| `ED.COM` | CPM22 | DRI context editor |
| `FA16.CFG` | ZSDOS | ZSDOS FILEATTR.COM v1.6 configuration file |
| `FA16.DOC` | ZSDOS | ZSDOS FILEATTR.COM v1.6 documentation |
| `FA16A.FOR` | ZSDOS | ZSDOS FILEATTR.COM v1.6a information |
| `FA16CFG.TXT` | ZSDOS | ZSDOS FILEATTR.COM v1.6 configuration instructions |
| `FILEATTR.COM` | ZSDOS | ZSDOS Modify file attributes |
| `FILEDATE.CFG` | ZSDOS | ZSDOS Configuration file for FILEDATE.COM |
| `FILEDATE.COM` | ZSDOS | ZSDOS Disk directory that allows sorting and selecting by date and name |
| `FILEDATE.COM` | ZSDOS | ZSDOS Disk directory that allows sorting and selecting by date and name |
| `INITDIR.CFG` | ZSDOS | ZSDOS Configuration file for INITDIR.COM |
| `INITDIR.COM` | ZSDOS | ZSDOS Prepare disks for P2DOS Stamps |
| `KERMIT.COM` | -- | Generic CP/M 2.2 Kermit communication application |
| `LBREXT.COM` | -- | Extract library files |
| `LDDS.COM` | ZSDOS | Clock driver |
| `LDNZT.COM` | ZSDOS | Clock driver |
| `LDP2D.COM` | ZSDOS | Clock driver |
| `LIB.COM` | -- | DRI Library manager |
| `LINK.COM` | -- | DRI CPM relocatable linker |
| `LOAD.COM` | -- | DRI hex file loader into memory |
| `MAC.COM` | -- | DRI CPM macro assembler |
| `MBASIC.COM` | -- | Microsoft Basic |
| `PIP.COM` | CPM22 | DRI Periperal Interchange Program |
| `PMARC.COM` | -- | LHA file compressor |
| `PMEXT.COM` | -- | Extractor for PMARC archives |
| `PUTBG.COM` | ZSDOS | ZSDOS Prepare disk for backgrounder |
| `PUTDS.COM` | ZSDOS | ZSDOS Prepare disk for datestamper |
| `RELOG.COM` | ZSDOS | ZSDOS relog disks after program that bypasses BDOS |
| `RMAC.COM` | -- | DRI Relocatable Macro Assembler |
| `SETTERM.COM` | ZSDOS | ZSDOS Installs terminal control codes into DateSamper utilities |
| `SETUPZST.COM` | ZSDOS | ZSDOS Select clock driver |
| `STAMPS.DAT` | ZSDOS | ZSDOS Library of stamping routines |
| `STAT.COM` | CPM22 | DRI statistices about file storage and device assignment |
| `SUBMIT.COM` | CPM22 | DRI batch processor |
| `SUPERSUB.COM` | ZSDOS | |
| `TD.CFG` | ZSDOS | ZSDOS Configuration file for TD.COM |
| `TD.COM` | ZSDOS | ZSDOS Time/Date utility |
| `TERMBASE.DAT` | ZSDOS | ZSDOS Terminal information library for SETTERM |
| `TESTCLOK.COM` | ZSDOS | ZSDOS Test various clock drivers |
| `UNCR.COM` | -- | NZCOM Uncrunch decompression |
| `UNZIP.COM` | -- | Extractor for ZIP archives |
| `XSUB.COM` | CPM22 | DRI eXtended submit |
| `ZCAL.COM` | ZSDOS | ZSDOS Show month calendar |
| `ZCNFG.COM` | ZSDOS | ZSDOS Configure various utilities |
| `ZCNFG24.CFG` | ZSDOS | ZSDOS Configuration file for ZCNFG.COM |
| `ZPATH.COM` | ZSDOS | ZSDOS Set BDOS and/or ZCPR command path |
| `ZSCONFIG.COM` | ZSDOS | ZSDOS Dynamically regulate many of ZSDOS features |
| `ZSID.COM` | -- | DRI Z80 symbolic instruction debugger |
| `ZSVSTAMP.COM` | ZSDOS | ZSDOS Save/restore file timestamp |
| `ZSVSTAMP.DOC` | ZSDOS | ZSDOS ZSVSTAMP.COM documentation |
| `ZXD.CFG` | ZSDOS | ZSDOS Configuration file for ZXD.COM |
| `ZXD.COM` | ZSDOS | ZSDOS Extended directory utility |
| `ASSIGN.COM` | RomWBW | RomWBW Drive/Slice mapper |
| `FAT.COM` | RomWBW | RomWBW FAT filesystem access |
| `FDU.COM` | RomWBW | RomWBW Floppy Disk Utility |
| `FORMAT.COM` | RomWBW | RomWBW media formatter (placeholder) |
| `INTTEST.COM` | RomWBW | RomWBW Interrupt test |
| `MODE.COM` | RomWBW | RomWBW Modify serial port characteristics |
| `RTC.COM` | RomWBW | RomWBW Display and set RTC |
| `SURVEY.COM` | RomWBW | System survey |
| `SYSCOPY.COM` | RomWBW | RomWBW Read/write system boot image |
| `SYSGEN.COM` | RomWBW | DRI CPM SYSGEN to put CPM onto a new drive |
| `TALK.COM` | RomWBW | RomWBW Direct console I/O to a serial port |
| `TIMER.COM` | RomWBW | RomWBW Display timer tick counter |
| `TUNE.COM` | RomWBW | RomWBW Play PT or MYM sound files |
| `XM.COM` | RomWBW | RomWBW XMODEM file transfer |
| `ZSYS.SYS` | RomWBW | ZSDOS system image |
| `CLRDIR.COM` | -- | Max Scane's disk directory cleaner |
| `COMPARE.COM` | -- | FoxHollow compare two files |
| `DDTZ.COM` | -- | Z80 replacement for DDT |
| `FDISK80.COM` | -- | John Coffman's Partition editor for FAT filesystem |
| `FLASH.COM` | -- | Will Sowerbutts' in-situ EEPROM programmer |
| `NULU.COM` | -- | NZCOM new library utility |
| `UNARC.COM` | -- | Extractor for ARC archives |
| `ZAP.COM` | -- | Disk editor/patcher |
| `ZDE.COM` | -- | Z-system display editor |
| `ZDENST.COM` | -- | ZDE Installer |
| **User 1** | **Source** | **Description** |
| -------------- | ---------- | ------------------------------------------------------------ |
| `SAMPKEY.DOC` | -- | ZDE Distribution File |
| `SAMPKEY.ZDK` | -- | ZDE Distribution File |
| `SAMPKEY.ZDT` | -- | ZDE Distribution File |
| `ZDE10.DOC` | -- | ZDE Distribution File |
| `ZDE10.FOR` | -- | ZDE Distribution File |
| `ZDE10.NEW` | -- | ZDE Distribution File |
| `ZDE10.QRF` | -- | ZDE Distribution File |
| `ZDE10.TOC` | -- | ZDE Distribution File |
| `ZDE13.FOR` | -- | ZDE Distribution File |
| `ZDE13.NEW` | -- | ZDE Distribution File |
| `ZDE16.COM` | -- | ZDE Distribution File |
| `ZDE16.DIR` | -- | ZDE Distribution File |
| `ZDE16.FIX` | -- | ZDE Distribution File |
| `ZDE16.FOR` | -- | ZDE Distribution File |
| `ZDE16.NEW` | -- | ZDE Distribution File |
| `ZDE16A.COM` | -- | ZDE Distribution File |
| `ZDE16A.PAT` | -- | ZDE Distribution File |
| `ZDENST16.COM` | -- | ZDE Distribution File |
| `ZDEPROP.DOC` | -- | ZDE Distribution File |
| `ZDEPROP.Z80` | -- | ZDE Distribution File |
| `ZDKCOM13.COM` | -- | ZDE Distribution File |
| `ZDKCOM13.DOC` | -- | ZDE Distribution File |
| **User 3** | **Source** | **Description** |
| -------------- | ---------- | ------------------------------------------------------------ |
| `ATTACK.PT3` | -- | Sound File |
| `BACKUP.PT3` | -- | Sound File |
| `BADMICE.PT3` | -- | Sound File |
| `DEMO.MYM` | -- | Sound File |
| `DEMO1.MYM` | -- | Sound File |
| `DEMO3.MYM` | -- | Sound File |
| `DEMO3MIX.MYM` | -- | Sound File |
| `DEMO4.MYM` | -- | Sound File |
| `HOWRU.PT3` | -- | Sound File |
| `ITERATN.PT3` | -- | Sound File |
| `LOOKBACK.PT3` | -- | Sound File |
| `LOUBOUTN.PT3` | -- | Sound File |
| `NAMIDA.PT3` | -- | Sound File |
| `RECOLL.PT3` | -- | Sound File |
| `SANXION.PT3` | -- | Sound File |
| `SYNCH.PT3` | -- | Sound File |
| `TOSTAR.PT3` | -- | Sound File |
| `VICTORY.PT3` | -- | Sound File |
| `WICKED.PT3` | -- | Sound File |
| `YEOLDE.PT3` | -- | Sound File |
| `YEOVIL.PT3` | -- | Sound File |
`\clearpage`{=latex}
# NZCOM Boot Disk
| Floppy Disk Image: **fd_nzcom.img**
| Hard Disk Image: **hd_nzcom.img**
| Combo Disk Image: **Slice 2**
| **User 0** | **Source** | **Description** |
| -------------- | ---------- | ------------------------------------------------------------ |
| `!(C)1988` | NZCOM | |
| `!NZ-COM` | NZCOM | |
| `!VERS--1.2H` | NZCOM | |
| `ALIAS.CMD` | NZCOM | NZCOM Aliases file for ARUNZ.COM |
| `ARUNZ.COM` | NZCOM | NZCOM Invoke an alias in ALIAS.CMD |
| `BGZRDS19.LBR` | NZCOM | |
| `CLEDINST.COM` | NZCOM | Command line editing and history shell installer |
| `CLEDSAVE.COM` | NZCOM | Write command line history to disk |
| `CONFIG.LBR` | NZCOM | |
| `COPY.COM` | NZCOM | ZSDOS File copier with file dates and archiving |
| `CPSET.COM` | NZCOM | NZCOM Create multiple definitions for CRT and PRT |
| `CRUNCH.COM` | NZCOM | NZCOM Text compression |
| `DOCFILES.LBR` | NZCOM | |
| `EDITNDR.COM` | NZCOM | NZCOM Associate names with directories |
| `FCP.LBR` | NZCOM | NZCOM ??? Flow control |
| `FF.COM` | NZCOM | NZCOM File finder |
| `HELP.COM` | NZCOM | DRI CPM+ |
| `HLPFILES.LBR` | NZCOM | |
| `IF.COM` | NZCOM | NZCOM Flow condition tester for FCP |
| `JETLDR.COM` | NZCOM | NZCOM General-purpose module loader |
| `KERMIT.COM` | -- | Generic CP/M 2.2 Kermit communication application |
| `LBREXT.COM` | NZCOM | Extract library files |
| `LBRHELP.COM` | NZCOM | |
| `LDIR.COM` | NZCOM | NZCOM Display the directory of a library |
| `LPUT.COM` | NZCOM | NZCOM Put files into a library |
| `LSH-HELP.COM` | NZCOM | |
| `LSH.COM` | NZCOM | |
| `LSH.WZ` | NZCOM | |
| `LSHINST.COM` | NZCOM | |
| `LX.COM` | NZCOM | NZCOM Extract and execute a memeber of a library |
| `MKZCM.COM` | NZCOM | NZCOM NZCOM system defining utility |
| `NAME.COM` | NZCOM | NZCOM Name a drive/user |
| `NZ-DBASE.INF` | NZCOM | NZCOM Dbase information |
| `NZBLITZ.COM` | NZCOM | |
| `NZBLTZ14.CFG` | NZCOM | |
| `NZBLTZ14.HZP` | NZCOM | |
| `NZCOM.COM` | NZCOM | NZCOM system loader from CP/M |
| `NZCOM.LBR` | NZCOM | NZCOM Library of NZCOM system modules |
| `NZCPR.LBR` | NZCOM | NZCOM Default command processor |
| `PATH.COM` | NZCOM | NZCOM Set/display command search path |
| `PUBLIC.COM` | NZCOM | |
| `PWD.COM` | NZCOM | |
| `RCP.LBR` | NZCOM | NZCOM Resident command package |
| `RELEASE.NOT` | NZCOM | |
| `SAINST.COM` | NZCOM | |
| `SALIAS.COM` | NZCOM | NZCOM Screen alias |
| `SAVENDR.COM` | NZCOM | NZCOM Save named directory assignments to a file |
| `SDZ.COM` | NZCOM | NZCOM Super directory |
| `SHOW.COM` | NZCOM | NZCOM Show resident commands |
| `SUB.COM` | NZCOM | |
| `SUBMIT.COM` | -- | DRI batch processor |
| `TCAP.LBR` | NZCOM | NZCOM Terminal capability descriptor library |
| `TCJ.INF` | NZCOM | |
| `TCJ25.WZ` | NZCOM | |
| `TCJ26.WZ` | NZCOM | |
| `TCJ27.WZ` | NZCOM | |
| `TCJ28.WZ` | NZCOM | |
| `TCJ29.WZ` | NZCOM | |
| `TCJ30.WZ` | NZCOM | |
| `TCJ31UPD.WZ` | NZCOM | |
| `TCJ32.WZ` | NZCOM | |
| `TCJ33UPD.WZ` | NZCOM | |
| `TCSELECT.COM` | NZCOM | NZCOM Create terminal capability file |
| `TY3ERA.COM` | NZCOM | NZCOM Type-3 transient program to erase a file |
| `TY3REN.COM` | NZCOM | NZCOM Type-3 transient program to rename a file |
| `TY4ERA.COM` | NZCOM | NZCOM Type-4 transient program to erase a file |
| `TY4REN.COM` | NZCOM | NZCOM Type-4 transient program to rename a file |
| `TY4SAVE.COM` | NZCOM | NZCOM Type-4 transient program to save memory to a file |
| `TY4SP.COM` | NZCOM | NZCOM Type-4 transient program ti display disk space |
| `UNCRUNCH.COM` | NZCOM | NZCOM Text decompressor |
| `VIEW.COM` | NZCOM | |
| `XTCAP.COM` | NZCOM | |
| `Z3LOC.COM` | NZCOM | NZCOM Display the addresses of the ZCPR3 CCP, BDOS, and BIOS |
| `Z3TCAP.TCP` | NZCOM | NZCOM Database of terminal descriptors |
| `ZCNFG.COM` | NZCOM | ZSDOS Configure various utilities |
| `ZERR.COM` | NZCOM | |
| `ZEX.COM` | NZCOM | NZCOM Memory-based batch processor |
| `ZF-DIM.COM` | NZCOM | NZCOM ZFILER shell for dim-video terminals |
| `ZF-REV.COM` | NZCOM | NZCOM ZFILER shell for reverse-video terminals |
| `ZFILEB38.LZT` | NZCOM | |
| `ZFILER.CMD` | NZCOM | NZCOM Macro script file for ZFILER |
| `ZHELPERS.LZT` | NZCOM | |
| `ZLT.COM` | NZCOM | |
| `ZNODES66.LZT` | NZCOM | |
| `ZSDOS.ZRL` | NZCOM | |
| `ZSYSTEM.IZF` | NZCOM | |
| `ASSIGN.COM` | RomWBW | RomWBW Drive/Slice mapper |
| `FAT.COM` | RomWBW | RomWBW FAT filesystem access |
| `FDU.COM` | RomWBW | RomWBW Floppy Disk Utility |
| `FORMAT.COM` | RomWBW | RomWBW media formatter (placeholder) |
| `INTTEST.COM` | RomWBW | RomWBW Interrupt test |
| `MODE.COM` | RomWBW | RomWBW Modify serial port characteristics |
| `RTC.COM` | RomWBW | RomWBW Display and set RTC |
| `SURVEY.COM` | RomWBW | System survey |
| `SYSCOPY.COM` | RomWBW | RomWBW Read/write system boot image |
| `SYSGEN.COM` | RomWBW | DRI CPM SYSGEN to put CPM onto a new drive |
| `TALK.COM` | RomWBW | RomWBW Direct console I/O to a serial port |
| `TIMER.COM` | RomWBW | RomWBW Display timer tick counter |
| `TUNE.COM` | RomWBW | RomWBW Play PT or MYM sound files |
| `XM.COM` | RomWBW | RomWBW XMODEM file transfer |
| `CPM.SYS` | RomWBW | |
| `ZSYS.SYS` | RomWBW | |
| `CLRDIR.COM` | -- | Max Scane's disk directory cleaner |
| `COMPARE.COM` | -- | FoxHollow compare two files |
| `DDTZ.COM` | -- | Z80 replacement for DDT |
| `FDISK80.COM` | -- | John Coffman's Partition editor for FAT filesystem |
| `FLASH.COM` | -- | Will Sowerbutts' in-situ EEPROM programmer |
| `NULU.COM` | -- | NZCOM new library utility |
| `UNARC.COM` | -- | Extractor for ARC archives |
| `ZAP.COM` | -- | Disk editor/patcher |
| `ZDE.COM` | -- | Z-system display editor |
| `ZDENST.COM` | -- | ZDE Installer |
| **User 3** | **Source** | **Description** |
| -------------- | ---------- | ------------------------------------------------------------ |
| `ATTACK.PT3` | -- | Sound File |
| `BACKUP.PT3` | -- | Sound File |
| `BADMICE.PT3` | -- | Sound File |
| `DEMO.MYM` | -- | Sound File |
| `DEMO1.MYM` | -- | Sound File |
| `DEMO3.MYM` | -- | Sound File |
| `DEMO3MIX.MYM` | -- | Sound File |
| `DEMO4.MYM` | -- | Sound File |
| `HOWRU.PT3` | -- | Sound File |
| `ITERATN.PT3` | -- | Sound File |
| `LOOKBACK.PT3` | -- | Sound File |
| `LOUBOUTN.PT3` | -- | Sound File |
| `NAMIDA.PT3` | -- | Sound File |
| `RECOLL.PT3` | -- | Sound File |
| `SANXION.PT3` | -- | Sound File |
| `SYNCH.PT3` | -- | Sound File |
| `TOSTAR.PT3` | -- | Sound File |
| `VICTORY.PT3` | -- | Sound File |
| `WICKED.PT3` | -- | Sound File |
| `YEOLDE.PT3` | -- | Sound File |
| `YEOVIL.PT3` | -- | Sound File |
`\clearpage`{=latex}
# CP/M 3 Boot Disk
| Floppy Disk Image: **fd_cpm3.img**
| Hard Disk Image: **hd_cpm3.img**
| Combo Disk Image: **Slice 3**
| **User 0** | **Source** | **Description** |
| -------------- | ---------- | ------------------------------------------------------------ |
| `DATE.COM` | CPM3 | DRI CPM+ Set or display the date and time |
| `DEVICE.COM` | CPM3 | DRI CPM+ Assign logical devices with one or more physical devices |
| `DIR.COM` | CPM3 | DRI CPM+ DIR with options |
| `DUMP.COM` | CPM3 | DRI type contents of disk file in hex |
| `ED.COM` | CPM3 | DRI context editor |
| `ERASE.COM` | CPM3 | DRI file deletion |
| `GENCOM.COM` | CPM3 | DRI CPM+ Generate special COM file with attached RSX files |
| `GET.COM` | CPM3 | DRI CPM+ Temporarily get console input form a disk file |
| `HELP.COM` | CPM3 | DRI CPM+ Display information on how to use commands |
| `HELP.HLP` | CPM3 | DRI CPM+ Databse of help information for HELP.COM |
| `HEXCOM.CPM` | CPM3 | DRI CPM+ Create a COM file from a nex file output by MAC |
| `INITDIR.COM` | CPM3 | DRI CPM+ Initializes a disk to allow time and date stamping |
| `KERMIT.COM` | -- | Generic CP/M 3 Kermit communication application |
| `PATCH.COM` | CPM3 | DRI CPM+ Display or install patch to the CPM+ system or command files |
| `PIP.COM` | CPM3 | DRI Periperal Interchange Program |
| `PUT.COM` | CPM3 | DIR CPM+ Temporarily redirect printer or console output to a disk file |
| `RENAME.COM` | CPM3 | DRI CPM+ Rename a file |
| `ROMWBW.TXT` | RomWBW | |
| `SAVE.COM` | CPM3 | DRI CPM+ Copy the contents of memory to a file |
| `SET.COM` | CPM3 | DIR CPM+ Set file options |
| `SETDEF.COM` | CPM3 | DIR CPM+ Set system options including the drive search chain |
| `SHOW.COM` | CPM3 | DIR CPM+ Display disk and drive statistics |
| `SUBMIT.COM` | CPM3 | DRI batch processor |
| `TYPE.COM` | CPM3 | DIR CPM+ Display the contents of an ASCII character file |
| `ZSID.COM` | CPM3 | DRI Z80 symbolic instruction debugger |
| `CPMLDR.COM` | RomWBW | DRI CPM 3.0 loader |
| `CPMLDR.SYS` | RomWBW | DRI CPM 3.0 loader |
| `CCP.COM` | CPM3 | DRI CPM+ Console Command Processor |
| `GENCPM.COM` | CPM3 | DRI CPM+ Create a memory image of CPM3.SYS |
| `GENRES.DAT` | RomWBW | |
| `GENBNK.DAT` | RomWBW | |
| `BIOS3.SPR` | RomWBW | DRI CPM+ GENCPM input file for non-banked BIOS |
| `BNKBIOS3.SPR` | RomWBW | DRI CPM+ GENCPM input file for banked BIOS |
| `BDOS3.SPR` | CPM3 | DRI CPM+ GENCPM input file for the non-banked BDOS |
| `BNKBDOS3.SPR` | CPM3 | DRI CPM+ GENCPM input file for banked BDOS |
| `RESBDOS3.SPR` | CPM3 | DRI CPM+ GENCPM input file for resident BDOS |
| `CPM3RES.SYS` | RomWBW | DRI CPM+ (non-banked) memory image |
| `CPM3BNK.SYS` | RomWBW | DRI CPM+ (banked) memory image |
| `GENCPM.DAT` | RomWBW | DRI CPM+ System generation tool data file |
| `CPM3.SYS` | RomWBW | DRI CPM+ (non-banked) memory image |
| `README.1ST` | CPM3 | |
| `CPM3FIX.PAT` | CPM3 | |
| `ASSIGN.COM` | RomWBW | RomWBW Drive/Slice mapper |
| `FAT.COM` | RomWBW | RomWBW FAT filesystem access |
| `FDU.COM` | RomWBW | RomWBW Floppy Disk Utility |
| `FORMAT.COM` | RomWBW | RomWBW media formatter (placeholder) |
| `INTTEST.COM` | RomWBW | RomWBW Interrupt test |
| `MODE.COM` | RomWBW | RomWBW Modify serial port characteristics |
| `RTC.COM` | RomWBW | RomWBW Display and set RTC |
| `SURVEY.COM` | RomWBW | System survey |
| `SYSCOPY.COM` | RomWBW | RomWBW Read/write system boot image |
| `SYSGEN.COM` | RomWBW | DRI CPM SYSGEN to put CPM onto a new drive |
| `TALK.COM` | RomWBW | RomWBW Direct console I/O to a serial port |
| `TIMER.COM` | RomWBW | RomWBW Display timer tick counter |
| `TUNE.COM` | RomWBW | RomWBW Play PT or MYM sound files |
| `XM.COM` | RomWBW | RomWBW XMODEM file transfer |
| `CLRDIR.COM` | -- | Max Scane's disk directory cleaner |
| `COMPARE.COM` | -- | FoxHollow compare two files |
| `DDTZ.COM` | -- | Z80 replacement for DDT |
| `FDISK80.COM` | -- | John Coffman's Partition editor for FAT filesystem |
| `FLASH.COM` | -- | Will Sowerbutts' in-situ EEPROM programmer |
| `NULU.COM` | -- | NZCOM new library utility |
| `UNARC.COM` | -- | Extractor for ARC archives |
| `ZAP.COM` | -- | Disk editor/patcher |
| `ZDE.COM` | -- | Z-system display editor |
| `ZDENST.COM` | -- | ZDE Installer |
| **User 3** | **Source** | **Description** |
| -------------- | ---------- | ------------------------------------------------------------ |
| `ATTACK.PT3` | -- | Sound File |
| `BACKUP.PT3` | -- | Sound File |
| `BADMICE.PT3` | -- | Sound File |
| `DEMO.MYM` | -- | Sound File |
| `DEMO1.MYM` | -- | Sound File |
| `DEMO3.MYM` | -- | Sound File |
| `DEMO3MIX.MYM` | -- | Sound File |
| `DEMO4.MYM` | -- | Sound File |
| `HOWRU.PT3` | -- | Sound File |
| `ITERATN.PT3` | -- | Sound File |
| `LOOKBACK.PT3` | -- | Sound File |
| `LOUBOUTN.PT3` | -- | Sound File |
| `NAMIDA.PT3` | -- | Sound File |
| `RECOLL.PT3` | -- | Sound File |
| `SANXION.PT3` | -- | Sound File |
| `SYNCH.PT3` | -- | Sound File |
| `TOSTAR.PT3` | -- | Sound File |
| `VICTORY.PT3` | -- | Sound File |
| `WICKED.PT3` | -- | Sound File |
| `YEOLDE.PT3` | -- | Sound File |
| `YEOVIL.PT3` | -- | Sound File |
`\clearpage`{=latex}
# ZPM3 Boot Disk
| Floppy Disk Image: **fd_zpm3.img**
| Hard Disk Image: **hd_zpm3.img**
| Combo Disk Image: **Slice 4**
| **User 0** | **Source** | **Description** |
| -------------- | ---------- | ------------------------------------------------------------ |
| `HELP.HLP` | ZPM3 | |
| `ROMWBW.TXT` | RomWBW | |
| `ZPMLDR.COM` | RomWBW | |
| `ZPMLDR.SYS` | RomWBW | |
| `CPMLDR.COM` | RomWBW | |
| `CPMLDR.SYS` | RomWBW | |
| `CPM3.SYS` | RomWBW | |
| `ZCCP.COM` | ZPM3 | |
| `ZINSTAL.ZPM` | ZPM3 | |
| `STARTZPM.COM` | ZPM3 | |
| `MAKEDOS.COM` | ZPM3 | |
| `GENCPM.DAT` | RomWBW | |
| `BNKBIOS3.SPR` | RomWBW | |
| `BNKBDOS3.SPR` | ZPM3 | |
| `RESBDOS3.SPR` | ZPM3 | |
| **User 3** | **Source** | **Description** |
| -------------- | ---------- | ------------------------------------------------------------ |
| `ATTACK.PT3` | -- | Sound File |
| `BACKUP.PT3` | -- | Sound File |
| `BADMICE.PT3` | -- | Sound File |
| `DEMO.MYM` | -- | Sound File |
| `DEMO1.MYM` | -- | Sound File |
| `DEMO3.MYM` | -- | Sound File |
| `DEMO3MIX.MYM` | -- | Sound File |
| `DEMO4.MYM` | -- | Sound File |
| `HOWRU.PT3` | -- | Sound File |
| `ITERATN.PT3` | -- | Sound File |
| `LOOKBACK.PT3` | -- | Sound File |
| `LOUBOUTN.PT3` | -- | Sound File |
| `NAMIDA.PT3` | -- | Sound File |
| `RECOLL.PT3` | -- | Sound File |
| `SANXION.PT3` | -- | Sound File |
| `SYNCH.PT3` | -- | Sound File |
| `TOSTAR.PT3` | -- | Sound File |
| `VICTORY.PT3` | -- | Sound File |
| `WICKED.PT3` | -- | Sound File |
| `YEOLDE.PT3` | -- | Sound File |
| `YEOVIL.PT3` | -- | Sound File |
| **User 10** | **Source** | **Description** |
| -------------- | ---------- | ------------------------------------------------------------ |
| `ALIAS.HLP` | -- | |
| `HP-RPN.HLP` | -- | |
| `HP-ZP.HLP` | -- | |
| `IF.HLP` | -- | |
| `MENU.HLP` | -- | |
| `VLU.HLP` | -- | |
| `ZFHIST.HLP` | -- | |
| `ZFILER.HLP` | -- | |
| `ZFMACRO.HLP` | -- | |
| `ZP.HLP` | -- | |
| **User 14** | **Source** | **Description** |
| -------------- | ---------- | ------------------------------------------------------------ |
| `COPY.CFG` | -- | |
| `ERASE.CFG` | -- | |
| `HELPC15.CFG` | -- | |
| `ZCNFG24.CFG` | -- | |
| `ZEX.CFG` | -- | |
| `ZF11.CFG` | -- | |
| `ZP17.CFG` | -- | |
| **User 15** | **Source** | **Description** |
| -------------- | ---------- | ------------------------------------------------------------ |
| `ALIAS.COM` | -- | |
| `ARUNZ.COM` | -- | |
| `COPY.COM` | -- | |
| `DATE.COM` | CPM3 | |
| `DEV.COM` | -- | |
| `DEVICE.COM` | CPM3 | |
| `DIR.COM` | CPM3 | |
| `DISKINFO.COM` | -- | |
| `DU.COM` | -- | |
| `DUMP.COM` | CPM3 | |
| `ED.COM` | CPM3 | |
| `ERASE.COM` | CPM3 | |
| `GENCOM.COM` | CPM3 | |
| `GENCPM.COM` | CPM3 | |
| `GET.COM` | CPM3 | |
| `GOTO.COM` | -- | |
| `HELP.COM` | CPM3 | |
| `HEXCOM.COM` | CPM3 | |
| `IF.COM` | -- | |
| `INITDIR.COM` | CPM3 | |
| `KERMIT.COM` | CPM3 | |
| `LBREXT.COM` | -- | |
| `LIB.COM` | -- | |
| `LINK.COM` | -- | |
| `LOADSEG.COM` | -- | |
| `MAC.COM` | -- | |
| `MBASIC.COM` | -- | |
| `NAMES.NDR` | -- | |
| `PATCH.COM` | CPM3 | |
| `PIP.COM` | CPM3 | |
| `PUT.COM` | CPM3 | |
| `REMOVE.COM` | -- | |
| `RENAME.COM` | CPM3 | |
| `RMAC.COM` | -- | |
| `RSXDIR.COM` | -- | |
| `SAINST.COM` | -- | |
| `SALIAS.COM` | -- | |
| `SAVE.COM` | CPM3 | |
| `SET.COM` | CPM3 | |
| `SETDEF.COM` | CPM3 | |
| `SETPATH.COM` | -- | |
| `SHOW.COM` | CPM3 | |
| `SUBMIT.COM` | CPM3 | |
| `TCAP.Z3T` | -- | |
| `TYPE.COM` | CPM3 | |
| `VERROR.COM` | -- | |
| `VLU.COM` | -- | |
| `XREF.COM` | -- | |
| `ZCNFG.COM` | -- | |
| `ZERASE.COM` | -- | |
| `ZEX.COM` | -- | |
| `ZFILER.COM` | -- | |
| `ZHELP.COM` | -- | |
| `ZP.COM` | -- | |
| `ZSHOW.COM` | -- | |
| `ZSID.COM` | -- | |
| `ZXD.COM` | -- | |
| `AUTOTOG.COM` | ZPM3 | |
| `CLRHIST.COM` | ZPM3 | |
| `SETZ3.COM` | ZPM3 | |
| `ASSIGN.COM` | RomWBW | |
| `FAT.COM` | RomWBW | |
| `FDU.COM` | RomWBW | |
| `FORMAT.COM` | RomWBW | |
| `INTTEST.COM` | RomWBW | |
| `MODE.COM` | RomWBW | |
| `RTC.COM` | RomWBW | |
| `SURVEY.COM` | RomWBW | |
| `SYSCOPY.COM` | RomWBW | |
| `SYSGEN.COM` | RomWBW | |
| `TALK.COM` | RomWBW | |
| `TIMER.COM` | RomWBW | |
| `TUNE.COM` | RomWBW | |
| `XM.COM` | RomWBW | |
| `CLRDIR.COM` | -- | |
| `COMP.COM` | -- | |
| `DDTZ.COM` | -- | |
| `FDISK80.COM` | -- | |
| `FLASH.COM` | -- | |
| `NULU.COM` | -- | |
| `TCVIEW.COM` | -- | |
| `UNARC.COM` | -- | |
| `Z3LOC.COM` | -- | |
| `ZAP.COM` | -- | |
| `ZDE.COM` | -- | |
| `ZDENST.COM` | -- | |
`\clearpage`{=latex}
# WordStar 4 Application Disk
| Floppy Disk Image: **fd_ws4.img**
| Hard Disk Image: **hd_ws4.img**
| Combo Disk Image: **Slice 5**
| **User 0** | **Source** | **Description** |
| -------------- | ---------- | ------------------------------------------------------------ |
| `ANAGRAM.COM` | WS4 | MicroPro WordStar 4 Distribution File |
| `CHAPTER1.DOC` | WS4 | MicroPro WordStar 4 Distribution File |
| `CHAPTER2.DOC` | WS4 | MicroPro WordStar 4 Distribution File |
| `CHAPTER3.DOC` | WS4 | MicroPro WordStar 4 Distribution File |
| `DIARY.DOC` | WS4 | MicroPro WordStar 4 Distribution File |
| `DICTSORT.COM` | WS4 | MicroPro WordStar 4 Distribution File |
| `FIND.COM` | WS4 | MicroPro WordStar 4 Distribution File |
| `HOMONYMS.TXT` | WS4 | MicroPro WordStar 4 Distribution File |
| `HYEXCEPT.TXT` | WS4 | MicroPro WordStar 4 Distribution File |
| `HYPHEN.COM` | WS4 | MicroPro WordStar 4 Distribution File |
| `LOOKUP.COM` | WS4 | MicroPro WordStar 4 Distribution File |
| `MAINDICT.CMP` | WS4 | MicroPro WordStar 4 Distribution File |
| `MARKFIX.COM` | WS4 | MicroPro WordStar 4 Distribution File |
| `MOVEPRN.COM` | WS4 | MicroPro WordStar 4 Distribution File |
| `PATCH.LST` | WS4 | MicroPro WordStar 4 Distribution File |
| `PRINT.TST` | WS4 | MicroPro WordStar 4 Distribution File |
| `READ.ME` | WS4 | MicroPro WordStar 4 Distribution File |
| `README.` | WS4 | MicroPro WordStar 4 Distribution File |
| `REVIEW.COM` | WS4 | MicroPro WordStar 4 Distribution File |
| `RULER.DOC` | WS4 | MicroPro WordStar 4 Distribution File |
| `SAMPLE1.DOC` | WS4 | MicroPro WordStar 4 Distribution File |
| `SAMPLE2.DOC` | WS4 | MicroPro WordStar 4 Distribution File |
| `SAMPLE3.DOC` | WS4 | MicroPro WordStar 4 Distribution File |
| `SPELL.COM` | WS4 | MicroPro WordStar 4 Distribution File |
| `TABLE.DOC` | WS4 | MicroPro WordStar 4 Distribution File |
| `TEXT.DOC` | WS4 | MicroPro WordStar 4 Distribution File |
| `TW.COM` | WS4 | MicroPro WordStar 4 Distribution File |
| `WC.COM` | WS4 | MicroPro WordStar 4 Distribution File |
| `WINSTALL.COM` | WS4 | MicroPro WordStar 4 Distribution File |
| `WORDFREQ.COM` | WS4 | MicroPro WordStar 4 Distribution File |
| `WS.COM` | WS4 | MicroPro WordStar 4 Distribution File |
| `WS.OVR` | WS4 | MicroPro WordStar 4 Distribution File |
| `WSCHANGE.COM` | WS4 | MicroPro WordStar 4 Distribution File |
| `WSCHANGE.OVR` | WS4 | MicroPro WordStar 4 Distribution File |
| `WSCHHELP.OVR` | WS4 | MicroPro WordStar 4 Distribution File |
| `WSHELP.OVR` | WS4 | MicroPro WordStar 4 Distribution File |
| `WSINDEX.XCL` | WS4 | MicroPro WordStar 4 Distribution File |
| `WSMSGS.OVR` | WS4 | MicroPro WordStar 4 Distribution File |
| `WSPRINT.OVR` | WS4 | MicroPro WordStar 4 Distribution File |
| `WSSHORT.OVR` | WS4 | MicroPro WordStar 4 Distribution File |

152
Source/Doc/GettingStarted.md

@ -67,7 +67,7 @@ General features include:
* Disk drivers for RAM, ROM, Floppy, IDE, CF, and SD
* Serial drivers including UART (16550-like), ASCI, ACIA, SIO
* Video drivers including TMS9918, SY6545, MOS8563, HD6445
* Real time clock drivers including DS1322, BQ4845
* Real time clock drivers including DS1302, BQ4845
* Multiple OS support including CP/M 2.2, ZSDOS, CP/M 3, ZPM3
* Built-in VT-100 terminal emulation support
@ -347,7 +347,7 @@ the first 256 8MB chunks of space on a single media.
Of course, the problem is that CP/M-like operating systems have only
16 drive letters (A:-P:) available. Under the covers, RomWBW allows
you to use any drive letter to refer to any slice of any media. The
`ASSIGN` command is allows you to view or change the drive letter
`ASSIGN` command allows you to view or change the drive letter
mappings at any time. At startup, the operating system will
automatically allocate a reasonable number of drive letters to the
available storage devices. The allocation will depend on the number of
@ -756,13 +756,18 @@ likely to encounter problems.
### Notes
- You can change media, but it must be done while at the OS
command prompt and you **must** warm start CP/M by pressing
ctrl-c. This is a CP/M 2.2 constraint and is well documented
in the DRI manuals.
- The original versions of DDT, DDTZ, and ZSID used the RST 38
vector which conflicts with interrupt mode 1 use of this vector.
The DDT, DDTZ, and ZSID applications in RomWBW have been modified
to use RTS 30 to avoid this issue.
to use RST 30 to avoid this issue.
- Z-System applications will not run under CP/M 2.2. For example,
the `LDDS` date stamper with not run.
the `LDDS` date stamper will not run.
## ZSDOS 1.1
@ -784,6 +789,10 @@ Manual.pdf").
may not work as expected. The best example is PIP which is not aware
of the ZSDOS paths and will fail in some scenarios (use `COPY` instead).
- Although ZSDOS can recognize a media change in some cases, it will not
always work. You should only change media at a command prompt and be
sure to warm start the OS with a ctrl-c.
## NZCOM Automatic Z-System
NZCOM is a much further refined version of Z-System (ZCPR 3.4). NZCOM
@ -824,6 +833,14 @@ system tracks. `CPMLDR.SYS` chain loads `CPM3.SYS`.
used to read the current date/time for file stamping, etc. You can
use the `RTC` app to set the RTC clock.
- The `COPYSYS` command described in the DRI CP/M 3 documentation is
not provided with RomWBW. The RomWBW `SYSCOPY` command is used instead.
- Although CP/M 3 is generally able to run CP/M 2.2 programs, this is
not universally true. This is especially true of the utility programs
included with the operating system. For example, the `SUBMIT` program
of CP/M 3 is completely different from the `SUBMIT` program of CP/M 2.2.
## Simeon Cran's ZPM3
ZPM3 is an interesting combination of the features of both CP/M 3 and
@ -838,7 +855,9 @@ tracks of the disk.
- `ZPMLDR` is included with ZPM3, but it is not working correctly.
- The ZPM operating system is contained in the file called CPM3.SYS
which is confusing, but it is the author's intended way of using ZPM3.
which is confusing, but this is as intended by the ZPM3 distribution.
I believe it was done this way to make it easier for users to transition
from CP/M 3 to ZPM3.
## FreeRTOS
@ -1072,7 +1091,7 @@ update your ROM. The following is a typical example of transferring
ROM image using XModem and flashing the chip in-situ.
```
E>xm r rom.img
E>xm r rom.rom
XMODEM v12.5 - 07/13/86
RBC, 28-Aug-2019 [WBW], ASCI
@ -1084,7 +1103,7 @@ To cancel: Ctrl-X, pause, Ctrl-X
Thanks for the upload
E>flash write rom.img
E>flash write rom.rom
FLASH4 by Will Sowerbutts <will@sowerbutts.com> version 1.2.3
Using RomWBW (v2.6+) bank switching.
@ -1115,12 +1134,81 @@ your choice. This process is described below in the Disk Images
section. If you wish to update existing disk media in your system, you
need to perform the following steps.
If the disk is bootable, you need to update the system tracks of the
disk. This is done using a SYSCOPY command such as `SYSCOPY
C:=B:ZSYS.SYS`. For a ZSDOS boot disk, use ZSYS.SYS. For a CP/M 2.2
disk, use CPM.SYS. For a CP/M 3 or ZPM3 disk, use CPMLDR.SYS.
CPMLDR.SYS is not provided on the ROM disk, so you will need to
upload it from the distribution.
If the disk is bootable, you need to update the system image on the
disk using the procedure described below corresponsing to the
operating system on your disk.
* **CP/M 2.2**
Boot to CP/M 2.2 from ROM, then use `SYSCOPY` to update the system
image on **all** CP/M 2.2 boot disks/slices. The CP/M 2.2 system image
is called CPM.SYS and is found on the ROM disk. For example:
`B>SYSCOPY C:=CPM.SYS`
* **ZSDOS**
Boot to Z-System from ROM, then use `SYSCOPY` to update the system
image on **all** ZSDOS boot disks/slices. The ZSDOS system image
is called ZSYS.SYS and is found on the ROM disk. For example:
`B>SYSCOPY C:=ZSYS.SYS`
* **NZCOM**
NZCOM runs on top of either CP/M 2.2 or ZSDOS. By default, the
RomWBW disk image for NZCOM uses ZSDOS. Follow the corresponding
procedure above to update the system image on the NZCOM boot
disks/slices.
* **CP/M 3**
CP/M 3 uses a multi-step boot process involving multiple files.
The CP/M 3 boot files are not included on the ROM disk due to
space constraints. You will need to transfer the files to your
system from the RomWBW distribution directory Binary\\CPM3.
After this is done, you will need to use `SYSCOPY` to place
the CP/M 3 loader image on the boot tracks of all CP/M 3
boot disks/slices. The loader image is called `CPMLDR.SYS`.
You must then copy (at a minimum) `CPM3.SYS` and `CCP.COM`
onto the disk/slice. Assuming you copied the CP/M 3 boot files
onto your RAM disk at A:, you would use:
```
A>B:SYSCOPY C:=CPMLDR.SYS
A>B:COPY CPM3.SYS C:
A>B:COPY CCP.COM C:
```
* **ZPM3**
ZPM3 uses a multi-step boot process involving multiple files.
The ZPM3 boot files are not included on the ROM disk due to
space constraints. You will need to transfer the files to your
system from the RomWBW distribution directory Binary\\ZPM3.
After this is done, you will need to use `SYSCOPY` to place
the ZPM3 loader image on the boot tracks of all ZPM3
boot disks/slices. The loader image is called `CPMLDR.SYS`.
You must then copy (at a minimum) `CPM3.SYS`, `ZCCP.COM`,
`ZINSTAL.ZPM`, and `STARTZPM.COM` onto the disk/slice.
Assuming you copied the ZPM3 boot files onto your RAM disk
at A:, you would use:
```
A>B:SYSCOPY C:=CPMLDR.SYS
A>B:COPY CPM3.SYS C:
A>B:COPY ZCCP.COM C:
A>B:COPY ZINSTAL.ZPM C:
A>B:COPY STARTZPM.COM C:
```
You may be wondering if the references to `CPMLDR.SYS` and
`CPM3.SYS` are typos. They are not. ZPM3 uses the same loader
image as CPM3. The ZPM3 main system code file is called `CPM3.SYS`
which is the same name as CP/M 3 uses, but the file contents are
not the same.
Finally, if you have copies of any of the RomWBW custom applications
on your hard disk, you need to update them with the latest copies. The
@ -1151,6 +1239,30 @@ images.
* FAT.COM
* TUNE.COM
# System Update
If the system running ROMWBW utilizes the SST39SF040 Flash chip then it is possible to do a System Update in place of
a System Upgrade in some cases.
A System Update would involve only updating the BIOS, ROM applications and CP/M system.
A System Update may be more favorable than a System Upgrade in cases such as:
- Overwriting of the ROM drive is not desired.
- Space is unavailable to hold a full ROMWBW ROM.
- To mimimize time taken to transfer and flash a full ROM.
- Configuration changes are only minor and do not impact disk applications.
The ROMWBW build process generates a system upgrade file along with the normal ROM image and can be identified by the
extension ".upd". It will be 128Kb in size. In comparison the normal ROM image will have the extension ".rom" and be
512Kb or 1024Kb in size.
Transferring and flashing the System Update is accomplished in the same manner as described above in *Upgrading* with
the required difference being that the flash application needs to be directed to complete a partial flash using the
/p command line switch.
`E>flash write rom.upd /p`
# RomWBW Distribution
All source code and distributions are maintained on GitHub. Code
@ -1191,12 +1303,17 @@ these applications are no longer provided.
driver.
* Ed Brindley contributed some of the code that supports the RC2014
platform.
* Phil Summers contributed Forth and BASIC in ROM as well as a long
list of general code enhancements.
* Phil Summers contributed Forth and BASIC in ROM, the AY-3-8910 sound
driver as well as a long list of general code enhancements.
* Phillip Stevens contributed support for FreeRTOS.
* Curt Mayer contributed the Linux / MacOS build process.
* UNA BIOS and FDISK80 is a product of John Coffman.
* UNA BIOS and FDISK80 are the products of John Coffman.
* FLASH4 is a product of Will Sowerbutts.
* CLRDIR is a product of Max Scane.
* Tasty Basic is a product of Dimitri Theulings.
* Dean Netherton contributed the sound driver interface and
the SN76489 sound driver.
* The RomWBW Disk Catalog document was produced by Mykl Orders.
Contributions of all kinds to RomWBW are very welcome.
@ -1209,6 +1326,7 @@ RetroBrew Computers projects is via the community forums:
* [RC2014 Google Group](https://groups.google.com/forum/#!forum/rc2014-z80)
* [retro-comp Google Group](https://groups.google.com/forum/#!forum/retro-comp)
Submission of issues and bugs are welcome at the [RomWBW GitHub Repository](https://github.com/wwarthen/RomWBW).
Submission of issues and bugs are welcome at the
[RomWBW GitHub Repository](https://github.com/wwarthen/RomWBW).
Also feel free to email !author at [!authmail](mailto:!authmail).

BIN
Source/Doc/Graphics/Hard Disk Anatomy.vsd

Binary file not shown.

BIN
Source/Doc/SIO+CTC Baud Rate Options.xlsx

Binary file not shown.

4
Source/Forth/Build.cmd

@ -11,7 +11,7 @@ set ZXBINDIR=%TOOLS%/cpm/bin/
set ZXLIBDIR=%TOOLS%/cpm/lib/
set ZXINCDIR=%TOOLS%/cpm/include/
zx zsm =camel80.azm
zx link -CAMEL80.BIN=CAMEL80
zx zsm =camel80.azm -/l
zx link -CAMEL80.BIN[L200]=CAMEL80

38
Source/Forth/camel80.azm

@ -1,15 +1,17 @@
CIODEV_CONSOLE EQU 0D0h
CIOIN EQU 00h ; CHARACTER INPUT
CIOOUT EQU 01h ; CHARACTER OUTPUT
CIOIST EQU 02h ; CHARACTER INPUT STATUS
BID_BOOT EQU 00h
HB_BNKCALL EQU 0fff9h
CIODEV_CONSOLE EQU 0D0h
CIOIN EQU 00h ; CHARACTER INPUT
CIOOUT EQU 01h ; CHARACTER OUTPUT
CIOIST EQU 02h ; CHARACTER INPUT STATUS
BF_SYSRESET EQU 0F0h ; RESTART SYSTEM
BF_SYSRES_WARM EQU 01h ; WARM START (RESTART BOOT LOADER)
; THE FOLLOWING NEED TO BE SYNCED WITH STD.ASM SO ROMLDR
; KNOWS WHERE THIS EXECUTES AT
FTH_SIZ EQU 1700h
FTH_LOC EQU 0200h
HB_LOC EQU 0FD80h
; Listing 2.
; ===============================================
@ -66,6 +68,14 @@ FTH_LOC EQU 0200h
; keywords are being passed in a
; macro.
; b1ackmai1er difficultylevelhigh@gmail.com
; 03-Dec 20 v1.02 Add James Bowmans double
; precision words as per RC2014
; version. Increase terminal
; input buffer (TIB) size.
; b1ackmai1er difficultylevelhigh@gmail.com
; 22-Jan 21 v1.02 Adjust for revised HBIOS
; proxy size.
; b1ackmai1er difficultylevelhigh@gmail.com
; ===============================================
; Macros to define Forth headers
; HEAD label,length,name,action
@ -131,9 +141,10 @@ nexthl MACRO
; RELOCATED ENTRY POINT
CSEG
.PHASE FTH_LOC
reset: ld hl,0FDFFh ; HBIOS address, rounded down
reset: ld hl,HB_LOC ; HBIOS address, rounded down
ld l,0 ; = end of avail.mem (EM)
dec h ; EM-100h
ld sp,hl ; = top of param stack
@ -148,15 +159,17 @@ reset: ld hl,0FDFFh ; HBIOS address, rounded down
jp COLD ; enter top-level Forth word
; Memory map:
; Terminal Input Buffer, 128 bytes
; FTH_LOC Forth kernel = starts after ROMLDR
; ? h Forth dictionary (user RAM)
; EM-400h Terminal Input Buffer, 512 bytes
; Below user area
; EM-200h User area, 128 bytes
; EM-180h Parameter stack, 128B, grows down
; EM-100h HOLD area, 40 bytes, grows down
; EM-0D8h PAD buffer, 88 bytes
; EM-80h Return stack, 128 B, grows down
; EM End of RAM = start of HBIOS
; EM=HB_LOC End of RAM = start of HBIOS
; See also the definitions of U0, S0, and R0
; in the "system variables & constants" area.
; A task w/o terminal input requires 200h bytes.
@ -332,10 +345,9 @@ KEY2: DW SAVEKEY,CFETCH,LIT,0,SAVEKEY,CSTORE
;X BYE i*x -- return to CP/M
head bye,3,bye,docode
LD A,BID_BOOT ; BOOT BANK
LD HL,0 ; ADDRESS ZERO
CALL HB_BNKCALL ; DOES NOT RETURN
HALT
LD B,BF_SYSRESET ; SYSTEM RESTART
LD C,BF_SYSRES_WARM ; WARM START
JP 0FFF0h ; CALL HBIOS
; STACK OPERATIONS ==============================

73
Source/Forth/camel80h.azm

@ -39,7 +39,7 @@
;Z tibsize -- n size of TIB
head TIBSIZE,7,TIBSIZE,docon
dw 124 ; 2 chars safety zone
dw 512-2 ; 2 chars safety zone
;X tib -- a-addr Terminal Input Buffer
; HEX 82 CONSTANT TIB CP/M systems: 126 bytes
@ -47,7 +47,7 @@
; head TIB,3,TIB,docon
; dw 82h
head TIB,3,TIB,douser
dw -80h
dw -512
;Z u0 -- a-addr current user area adrs
; 0 USER U0
@ -1011,6 +1011,75 @@ WDS1: DW DUP,COUNT,TYPE,SPACE,NFATOLFA,FETCH
DOTS1: DW II,FETCH,UDOT,LIT,-2,XPLUSLOOP,DOTS1
DOTS2: DW EXIT
;C D. d -- display d signed
head DDOT,2,D.,docolon
DW LESSNUM,DUP,TOR,DABS,NUMS
DW RFROM,SIGN,NUMGREATER,TYPE,SPACE,EXIT
;X D+ d1 d2 -- d1+d2 Add double numbers
head DPLUS,2,D+,docode
exx
pop bc ; BC'=d2lo
exx
pop hl ; HL=d1hi,BC=d2hi
exx
pop hl ; HL'=d1lo
add hl,bc
push hl ; 2OS=d1lo+d2lo
exx
adc hl,bc ; HL=d1hi+d2hi+cy
ld b,h
ld c,l
next
;C 2>R d -- 2 to R
head TWOTOR,3,2!>R,docolon
DW SWOP,RFROM,SWOP,TOR,SWOP,TOR,TOR,EXIT
;C 2R> d -- fetch 2 from R
head TWORFROM,3,2R!>,docolon
DW RFROM,RFROM,RFROM,SWOP,ROT,TOR,EXIT
TNEGATE:
call docolon
DW TOR,TWODUP,OR,DUP,qbranch,TNEG1,DROP,DNEGATE,lit,1
TNEG1:
DW RFROM,PLUS,NEGATE,EXIT
qtneg:
call docolon
DW ZEROLESS,qbranch,qtneg1,TNEGATE
qtneg1:
DW EXIT
TSTAR:
call docolon
DW TWODUP,XOR,TOR
DW TOR,DABS,RFROM,ABS
DW TWOTOR
DW RFETCH,UMSTAR,lit,0
DW TWORFROM,UMSTAR
DW DPLUS
DW RFROM
DW qtneg
DW EXIT
TDIV:
call docolon
DW OVER,TOR,TOR
DW DUP,qtneg
DW RFETCH,UMSLASHMOD
DW ROT,ROT
DW RFROM,UMSLASHMOD
DW NIP,SWOP
DW RFROM,ZEROLESS,qbranch,tdiv1,DNEGATE
tdiv1:
DW EXIT
;C M*/ d1 n2 u3 -- d=(d1*n2)/u3 double precision mult. div
head MSTARSLASH,3,M*/,docolon
DW TOR,TSTAR,RFROM,TDIV,EXIT
;Z COLD -- cold start Forth system
; UINIT U0 #INIT CMOVE init user area
; 80 COUNT INTERPRET interpret CP/M cmd

32
Source/HBIOS/API.txt

@ -45,14 +45,42 @@ GET ($F8):
BC=Function/Subfunction A=Result
E=Serial Unit Count
CIOFN ($01):
BC=Function/Subfunction A=Result
HL=Function Address
DE=Unit Data Address
DIOCNT ($10):
BC=Function/Subfunction A=Result
E=Disk Unit Count
DIOFN ($11):
BC=Function/Subfunction A=Result
HL=Function Address
DE=Unit Data Address
RTCCNT ($20):
BC=Function/Subfunction A=Result
E=RTC Unit Count
VDACNT ($40):
BC=Function/Subfunction A=Result
E=Video Unit Count
VDAFN ($41):
BC=Function/Subfunction A=Result
HL=Function Address
DE=Unit Data Address
SNDCNT ($50):
BC=Function/Subfunction A=Result
E=Sound Unit Count
SNDFN ($51):
BC=Function/Subfunction A=Result
HL=Function Address
DE=Unit Data Address
TIMER ($D0):
BC=Function/Subfunction A=Result
DE:HL=Timer Value (32 bit)
@ -239,6 +267,8 @@ DEVICE ($06):
D=Device Type
E=Device Number
C=Device Attributes
H=Device Mode
L=Base I/O Adr
Serial Device Attributes Byte:
7: 0=RS-232, 1=Terminal
@ -303,6 +333,8 @@ DEVICE ($17)
D=Device Type (MD, FD, IDE, etc.)
E=Device Number (0..n)
C=Device Attributes
H=Device Mode
L=Base I/O Adr
Report the Device Type (Floppy, IDE, SD, etc.) and Device Number. Call
does not perform any I/O and succeeds even if the device is in an error state.

9
Source/HBIOS/Build.ps1

@ -19,7 +19,7 @@ param([string]$Platform = "", [string]$Config = "", [string]$RomSize = "512", [s
# setup mechanism so that multiple configuration are not needed. When building for UNA, the pre-built
# UNA BIOS is simply imbedded, it is not built here.
#
$PlatformListZ80 = "SBC", "ZETA", "ZETA2", "RCZ80", "EZZ80", "UNA"
$PlatformListZ80 = "SBC", "ZETA", "ZETA2", "RCZ80", "RCZ280", "EZZ80", "UNA"
$PlatformListZ180 = "N8", "MK4", "RCZ180", "SCZ180", "DYNO"
#
@ -100,11 +100,12 @@ $env:PATH = $TasmPath + ';' + $CpmToolsPath + ';' + $env:PATH
# Initialize working variables
$OutDir = "../../Binary" # Output directory for final image file
$RomFmt = "wbw_rom${RomSize}" # Location of files to imbed in ROM disk
$BlankROM = "Blank${RomSize}KB.dat" # An initial "empty" image for the ROM disk of propoer size
$BlankROM = "Blank${RomSize}KB.dat" # An initial "empty" image for the ROM disk of proper size
$RomDiskFile = "RomDisk.tmp" # Temporary filename used to create ROM disk image
$RomFile = "${OutDir}/${RomName}.rom" # Final name of ROM image
$ComFile = "${OutDir}/${RomName}.com" # Final name of COM image (command line loadable HBIOS/CBIOS)
$ImgFile = "${OutDir}/${RomName}.img" # Final name of IMG image (memory loadable HBIOS/CBIOS image)
$UpdFile = "${OutDir}/${RomName}.upd" # Final name of System ROM image
# Select the proper CBIOS to include in the ROM. UNA is special.
if ($Platform -eq "UNA") {$Bios = 'una'} else {$Bios = 'wbw'}
@ -226,6 +227,9 @@ foreach ($App in $RomApps)
cpmcp -f $RomFmt $RomDiskFile ..\cpm22\cpm_${Bios}.sys 0:cpm.sys
cpmcp -f $RomFmt $RomDiskFile ..\zsdos\zsys_${Bios}.sys 0:zsys.sys
# Set all the files in the ROM disk image to read only for extra protection under flash file system.
cpmchattr -f $RomFmt $RomDiskFile r 0:*.*
#
# Finally, the individual binary components are concatenated together to produce
# the final images.
@ -240,6 +244,7 @@ if ($Platform -eq "UNA")
else
{
Concat 'hbios_rom.bin','osimg.bin','osimg1.bin','osimg.bin',$RomDiskFile $RomFile
Concat 'hbios_rom.bin','osimg.bin','osimg1.bin','osimg.bin' $UpdFile
Concat 'hbios_app.bin','osimg_small.bin' $ComFile
# Concat 'hbios_img.bin','osimg_small.bin' $ImgFile
}

14
Source/HBIOS/Build.sh

@ -4,6 +4,7 @@
set -e
CPMCP=../../Tools/`uname`/cpmcp
CPMCH=../../Tools/`uname`/cpmchattr
timestamp=$(date +%Y-%m-%d)
#timestamp="2020-02-24"
@ -13,9 +14,9 @@ if [ $1 == '-d' ] ; then
diffdir=$1
shift
if [ -f $diffdir/build.inc ] ; then
timestamp=$(grep TIMESTAMP $diffdir/build.inc | awk '{print $3}' | tr -d '\015"')
timestamp=$(grep TIMESTAMP $diffdir/build.inc | awk '{print $3}' | tr -d '\015"')
echo diff build using $timestamp
fi
fi
fi
# positional arguments
@ -65,7 +66,10 @@ romfmt=wbw_rom${romsize}
outdir=../../Binary
echo "creating empty rom disk of size $romsize in $blankfile"
LANG=en_US.US-ASCII tr '\000' '\345' </dev/zero | dd of=$blankfile bs=1024 count=`expr $romsize - 128`
#LANG=en_US.US-ASCII tr '\000' '\345' </dev/zero | dd of=$blankfile bs=1024 count=`expr $romsize - 128` 2>/dev/null
#LC_CTYPE=en_US.US-ASCII tr '\000' '\345' </dev/zero | dd of=$blankfile bs=1024 count=`expr $romsize - 128` 2>/dev/null
LC_ALL=en_US.US-ASCII tr '\000' '\345' </dev/zero | dd of=$blankfile bs=1024 count=`expr $romsize - 128`
hexdump $blankfile
cat <<- EOF > build.inc
; RomWBW Configured for $platform $config $timestamp
@ -141,12 +145,16 @@ echo "copying systems to $romdiskfile"
$CPMCP -f $romfmt $romdiskfile ../CPM22/cpm_$BIOS.sys 0:cpm.sys
$CPMCP -f $romfmt $romdiskfile ../ZSDOS/zsys_$BIOS.sys 0:zsys.sys
echo "setting files in the ROM disk image to read only"
$CPMCH -f $romfmt $romdiskfile r 0:*.*
if [ $platform = UNA ] ; then
cp osimg.bin $outdir/UNA_WBW_SYS.bin
cp $romdiskfile $outdir/UNA_WBW_ROM$romsize.bin
cat ../UBIOS/UNA-BIOS.BIN osimg.bin ../UBIOS/FSFAT.BIN $romdiskfile >$romname.rom
else
cat hbios_rom.bin osimg.bin osimg1.bin osimg.bin $romdiskfile >$romname.rom
cat hbios_rom.bin osimg.bin osimg1.bin osimg.bin >$romname.upd
cat hbios_app.bin osimg_small.bin > $romname.com
# cat hbios_img.bin osimg_small.bin > $romname.img
fi

2
Source/HBIOS/Config/DYNO_std.asm

@ -22,7 +22,7 @@
; PLEASE REFER TO THE CUSTOM BUILD INSTRUCTIONS (README.TXT) IN THE SOURCE DIRECTORY (TWO
; DIRECTORIES ABOVE THIS ONE).
;
#define BOOT_DEFAULT "H" ; DEFAULT BOOT LOADER CMD ON <CR> OR AUTO BOOT
#DEFINE BOOT_DEFAULT "H" ; DEFAULT BOOT LOADER CMD ON <CR> OR AUTO BOOT
;
#include "cfg_dyno.asm"
;

6
Source/HBIOS/Config/EZZ80_std.asm

@ -22,12 +22,16 @@
; PLEASE REFER TO THE CUSTOM BUILD INSTRUCTIONS (README.TXT) IN THE SOURCE DIRECTORY (TWO
; DIRECTORIES ABOVE THIS ONE).
;
#define BOOT_DEFAULT "H" ; DEFAULT BOOT LOADER CMD ON <CR> OR AUTO BOOT
#DEFINE BOOT_DEFAULT "H" ; DEFAULT BOOT LOADER CMD ON <CR> OR AUTO BOOT
;
#include "cfg_ezz80.asm"
;
CRTACT .SET FALSE ; ACTIVATE CRT (VDU,CVDU,PROPIO,ETC) AT STARTUP
;
CPUOSC .SET 10000000 ; CPU OSC FREQ IN MHZ
;
IDEENABLE .SET TRUE ; IDE: ENABLE IDE DISK DRIVER (IDE.ASM)
;
PPIDEENABLE .SET TRUE ; PPIDE: ENABLE PARALLEL PORT IDE DISK DRIVER (PPIDE.ASM)
;
PRPENABLE .SET FALSE ; PRP: ENABLE ECB PROPELLER IO BOARD DRIVER (PRP.ASM)

86
Source/HBIOS/Config/EZZ80_tz80.asm

@ -1,41 +1,45 @@
;
;==================================================================================================
; EASY Z80 STANDARD CONFIGURATION
;==================================================================================================
;
; THE COMPLETE SET OF DEFAULT CONFIGURATION SETTINGS FOR THIS PLATFORM ARE FOUND IN THE
; CFG_<PLT>.ASM INCLUDED FILE WHICH IS FOUND IN THE PARENT DIRECTORY. THIS FILE CONTAINS
; COMMON CONFIGURATION SETTINGS THAT OVERRIDE THE DEFAULTS. IT IS INTENDED THAT YOU MAKE
; YOUR CUSTOMIZATIONS IN THIS FILE AND JUST INHERIT ALL OTHER SETTINGS FROM THE DEFAULTS.
; EVEN BETTER, YOU CAN MAKE A COPY OF THIS FILE WITH A NAME LIKE <PLT>_XXX.ASM AND SPECIFY
; YOUR FILE IN THE BUILD PROCESS.
;
; THE SETTINGS BELOW ARE THE SETTINGS THAT ARE MOST COMMONLY MODIFIED FOR THIS PLATFORM.
; MANY OF THEM ARE EQUAL TO THE SETTINGS IN THE INCLUDED FILE, SO THEY DON'T REALLY DO
; ANYTHING AS IS. THEY ARE LISTED HERE TO MAKE IT EASY FOR YOU TO ADJUST THE MOST COMMON
; SETTINGS.
;
; N.B., SINCE THE SETTINGS BELOW ARE REDEFINING VALUES ALREADY SET IN THE INCLUDED FILE,
; TASM INSISTS THAT YOU USE THE .SET OPERATOR AND NOT THE .EQU OPERATOR BELOW. ATTEMPTING
; TO REDEFINE A VALUE WITH .EQU BELOW WILL CAUSE TASM ERRORS!
;
; PLEASE REFER TO THE CUSTOM BUILD INSTRUCTIONS (README.TXT) IN THE SOURCE DIRECTORY (TWO
; DIRECTORIES ABOVE THIS ONE).
;
#DEFINE PLATFORM_NAME "TINYZ80"
;
#include "cfg_ezz80.asm"
;
CPUOSC .SET 16000000 ; CPU OSC FREQ IN MHZ
;
IDEENABLE .SET TRUE ; IDE: ENABLE IDE DISK DRIVER (IDE.ASM)
;
PPIDEENABLE .SET TRUE ; PPIDE: ENABLE PARALLEL PORT IDE DISK DRIVER (PPIDE.ASM)
;
EIPCENABLE .SET TRUE ; EIPC: ENABLE Z80 EIPC (Z84C15) INITIALIZATION
;
CTCBASE .SET $10 ; CTC BASE I/O ADDRESS
LEDENABLE .SET TRUE ; ENABLES STATUS LED (SINGLE LED)
LEDPORT .SET $6E ; STATUS LED PORT ADDRESS
SIO0BASE .SET $18 ; SIO 0: REGISTERS BASE ADR
IDE0BASE .SET $90 ; IDE 0: IO BASE ADDRESS
;
;==================================================================================================
; EASY Z80 STANDARD CONFIGURATION
;==================================================================================================
;
; THE COMPLETE SET OF DEFAULT CONFIGURATION SETTINGS FOR THIS PLATFORM ARE FOUND IN THE
; CFG_<PLT>.ASM INCLUDED FILE WHICH IS FOUND IN THE PARENT DIRECTORY. THIS FILE CONTAINS
; COMMON CONFIGURATION SETTINGS THAT OVERRIDE THE DEFAULTS. IT IS INTENDED THAT YOU MAKE
; YOUR CUSTOMIZATIONS IN THIS FILE AND JUST INHERIT ALL OTHER SETTINGS FROM THE DEFAULTS.
; EVEN BETTER, YOU CAN MAKE A COPY OF THIS FILE WITH A NAME LIKE <PLT>_XXX.ASM AND SPECIFY
; YOUR FILE IN THE BUILD PROCESS.
;
; THE SETTINGS BELOW ARE THE SETTINGS THAT ARE MOST COMMONLY MODIFIED FOR THIS PLATFORM.
; MANY OF THEM ARE EQUAL TO THE SETTINGS IN THE INCLUDED FILE, SO THEY DON'T REALLY DO
; ANYTHING AS IS. THEY ARE LISTED HERE TO MAKE IT EASY FOR YOU TO ADJUST THE MOST COMMON
; SETTINGS.
;
; N.B., SINCE THE SETTINGS BELOW ARE REDEFINING VALUES ALREADY SET IN THE INCLUDED FILE,
; TASM INSISTS THAT YOU USE THE .SET OPERATOR AND NOT THE .EQU OPERATOR BELOW. ATTEMPTING
; TO REDEFINE A VALUE WITH .EQU BELOW WILL CAUSE TASM ERRORS!
;
; PLEASE REFER TO THE CUSTOM BUILD INSTRUCTIONS (README.TXT) IN THE SOURCE DIRECTORY (TWO
; DIRECTORIES ABOVE THIS ONE).
;
#DEFINE PLATFORM_NAME "TINYZ80"
;
#include "cfg_ezz80.asm"
;
CRTACT .SET FALSE ; ACTIVATE CRT (VDU,CVDU,PROPIO,ETC) AT STARTUP
;
CPUOSC .SET 16000000 ; CPU OSC FREQ IN MHZ
;
IDEENABLE .SET TRUE ; IDE: ENABLE IDE DISK DRIVER (IDE.ASM)
;
PPIDEENABLE .SET TRUE ; PPIDE: ENABLE PARALLEL PORT IDE DISK DRIVER (PPIDE.ASM)
;
EIPCENABLE .SET TRUE ; EIPC: ENABLE Z80 EIPC (Z84C15) INITIALIZATION
;
CTCBASE .SET $10 ; CTC BASE I/O ADDRESS
LEDENABLE .SET TRUE ; ENABLES STATUS LED (SINGLE LED)
LEDPORT .SET $6E ; STATUS LED PORT ADDRESS
SIO0BASE .SET $18 ; SIO 0: REGISTERS BASE ADR
IDE0BASE .SET $90 ; IDE 0: IO BASE ADDRESS
;
PRPENABLE .SET FALSE ; PRP: ENABLE ECB PROPELLER IO BOARD DRIVER (PRP.ASM)

4
Source/HBIOS/Config/MK4_std.asm

@ -22,7 +22,7 @@
; PLEASE REFER TO THE CUSTOM BUILD INSTRUCTIONS (README.TXT) IN THE SOURCE DIRECTORY (TWO
; DIRECTORIES ABOVE THIS ONE).
;
#define BOOT_DEFAULT "H" ; DEFAULT BOOT LOADER CMD ON <CR> OR AUTO BOOT
#DEFINE BOOT_DEFAULT "H" ; DEFAULT BOOT LOADER CMD ON <CR> OR AUTO BOOT
;
#include "cfg_mk4.asm"
;
@ -37,7 +37,7 @@ CVDUENABLE .SET TRUE ; CVDU: ENABLE CVDU VIDEO/KBD DRIVER (CVDU.ASM)
VGAENABLE .SET TRUE ; VGA: ENABLE VGA VIDEO/KBD DRIVER (VGA.ASM)
;
FDENABLE .SET FALSE ; FD: ENABLE FLOPPY DISK DRIVER (FD.ASM)
FDMODE .SET FDMODE_DIDE ; FD: DRIVER MODE: FDMODE_[DIO|ZETA|DIDE|N8|DIO3]
FDMODE .SET FDMODE_DIDE ; FD: DRIVER MODE: FDMODE_[DIO|ZETA|ZETA2|DIDE|N8|DIO3|RCSMC|RCWDC|DYNO|EPWDC]
;
IDEENABLE .SET TRUE ; IDE: ENABLE IDE DISK DRIVER (IDE.ASM)
;

2
Source/HBIOS/Config/N8_std.asm

@ -22,7 +22,7 @@
; PLEASE REFER TO THE CUSTOM BUILD INSTRUCTIONS (README.TXT) IN THE SOURCE DIRECTORY (TWO
; DIRECTORIES ABOVE THIS ONE).
;
#define BOOT_DEFAULT "H" ; DEFAULT BOOT LOADER CMD ON <CR> OR AUTO BOOT
#DEFINE BOOT_DEFAULT "H" ; DEFAULT BOOT LOADER CMD ON <CR> OR AUTO BOOT
;
#include "cfg_n8.asm"
;

13
Source/HBIOS/Config/RCZ180_ext.asm

@ -1,6 +1,6 @@
;
;==================================================================================================
; RC2014 Z180 STANDARD CONFIGURATION (EXTERNAL 512K RAM/ROM BANKED MEMORY MODULE)
; RC2014 Z180 STANDARD CONFIGURATION (EXTERNAL MMU ON 512K RAM/ROM BANKED MEMORY MODULE)
;==================================================================================================
;
; THE COMPLETE SET OF DEFAULT CONFIGURATION SETTINGS FOR THIS PLATFORM ARE FOUND IN THE
@ -22,10 +22,13 @@
; PLEASE REFER TO THE CUSTOM BUILD INSTRUCTIONS (README.TXT) IN THE SOURCE DIRECTORY (TWO
; DIRECTORIES ABOVE THIS ONE).
;
#define BOOT_DEFAULT "H" ; DEFAULT BOOT LOADER CMD ON <CR> OR AUTO BOOT
#DEFINE PLATFORM_NAME "RC2014 (EXT MMU)"
#DEFINE BOOT_DEFAULT "H" ; DEFAULT BOOT LOADER CMD ON <CR> OR AUTO BOOT
;
#include "cfg_rcz180.asm"
;
CRTACT .SET FALSE ; ACTIVATE CRT (VDU,CVDU,PROPIO,ETC) AT STARTUP
;
CPUOSC .SET 18432000 ; CPU OSC FREQ IN MHZ
;
MEMMGR .SET MM_Z2 ; MEMORY MANAGER: MM_[SBC|Z2|N8|Z180]
@ -39,9 +42,13 @@ ASCIENABLE .SET TRUE ; ASCI: ENABLE Z180 ASCI SERIAL DRIVER (ASCI.ASM)
ACIAENABLE .SET FALSE ; ACIA: ENABLE MOTOROLA 6850 ACIA DRIVER (ACIA.ASM)
SIOENABLE .SET FALSE ; SIO: ENABLE ZILOG SIO SERIAL DRIVER (SIO.ASM)
;
TMSENABLE .SET FALSE ; TMS: ENABLE TMS9918 VIDEO/KBD DRIVER (TMS.ASM)
;
FDENABLE .SET FALSE ; FD: ENABLE FLOPPY DISK DRIVER (FD.ASM)
FDMODE .SET FDMODE_RCWDC ; FD: DRIVER MODE: FDMODE_[DIO|ZETA|DIDE|N8|DIO3]
FDMODE .SET FDMODE_RCWDC ; FD: DRIVER MODE: FDMODE_[DIO|ZETA|ZETA2|DIDE|N8|DIO3|RCSMC|RCWDC|DYNO|EPWDC]
;
IDEENABLE .SET TRUE ; IDE: ENABLE IDE DISK DRIVER (IDE.ASM)
;
PPIDEENABLE .SET TRUE ; PPIDE: ENABLE PARALLEL PORT IDE DISK DRIVER (PPIDE.ASM)
;
PRPENABLE .SET FALSE ; PRP: ENABLE ECB PROPELLER IO BOARD DRIVER (PRP.ASM)

13
Source/HBIOS/Config/RCZ180_nat.asm

@ -1,6 +1,6 @@
;
;==================================================================================================
; RC2014 Z180 STANDARD CONFIGURATION (NATIVE Z180 LINEAR MEMORY)
; RC2014 Z180 STANDARD CONFIGURATION (NATIVE Z180 MMU W/ LINEAR MEMORY)
;==================================================================================================
;
; THE COMPLETE SET OF DEFAULT CONFIGURATION SETTINGS FOR THIS PLATFORM ARE FOUND IN THE
@ -22,10 +22,13 @@
; PLEASE REFER TO THE CUSTOM BUILD INSTRUCTIONS (README.TXT) IN THE SOURCE DIRECTORY (TWO
; DIRECTORIES ABOVE THIS ONE).
;
#define BOOT_DEFAULT "H" ; DEFAULT BOOT LOADER CMD ON <CR> OR AUTO BOOT
#DEFINE PLATFORM_NAME "RC2014 (NATIVE MMU)"
#DEFINE BOOT_DEFAULT "H" ; DEFAULT BOOT LOADER CMD ON <CR> OR AUTO BOOT
;
#include "cfg_rcz180.asm"
;
CRTACT .SET FALSE ; ACTIVATE CRT (VDU,CVDU,PROPIO,ETC) AT STARTUP
;
CPUOSC .SET 18432000 ; CPU OSC FREQ IN MHZ
;
MEMMGR .SET MM_Z180 ; MEMORY MANAGER: MM_[SBC|Z2|N8|Z180]
@ -39,9 +42,13 @@ ASCIENABLE .SET TRUE ; ASCI: ENABLE Z180 ASCI SERIAL DRIVER (ASCI.ASM)
ACIAENABLE .SET FALSE ; ACIA: ENABLE MOTOROLA 6850 ACIA DRIVER (ACIA.ASM)
SIOENABLE .SET FALSE ; SIO: ENABLE ZILOG SIO SERIAL DRIVER (SIO.ASM)
;
TMSENABLE .SET FALSE ; TMS: ENABLE TMS9918 VIDEO/KBD DRIVER (TMS.ASM)
;
FDENABLE .SET FALSE ; FD: ENABLE FLOPPY DISK DRIVER (FD.ASM)
FDMODE .SET FDMODE_RCWDC ; FD: DRIVER MODE: FDMODE_[DIO|ZETA|DIDE|N8|DIO3]
FDMODE .SET FDMODE_RCWDC ; FD: DRIVER MODE: FDMODE_[DIO|ZETA|ZETA2|DIDE|N8|DIO3|RCSMC|RCWDC|DYNO|EPWDC]
;
IDEENABLE .SET TRUE ; IDE: ENABLE IDE DISK DRIVER (IDE.ASM)
;
PPIDEENABLE .SET TRUE ; PPIDE: ENABLE PARALLEL PORT IDE DISK DRIVER (PPIDE.ASM)
;
PRPENABLE .SET FALSE ; PRP: ENABLE ECB PROPELLER IO BOARD DRIVER (PRP.ASM)

48
Source/HBIOS/Config/RCZ280_ext.asm

@ -0,0 +1,48 @@
;
;==================================================================================================
; RC2014 Z280 STANDARD CONFIGURATION (EXTERNAL MMU ON 512K RAM/ROM BANKED MEMORY MODULE)
;==================================================================================================
;
; THE COMPLETE SET OF DEFAULT CONFIGURATION SETTINGS FOR THIS PLATFORM ARE FOUND IN THE
; CFG_<PLT>.ASM INCLUDED FILE WHICH IS FOUND IN THE PARENT DIRECTORY. THIS FILE CONTAINS
; COMMON CONFIGURATION SETTINGS THAT OVERRIDE THE DEFAULTS. IT IS INTENDED THAT YOU MAKE
; YOUR CUSTOMIZATIONS IN THIS FILE AND JUST INHERIT ALL OTHER SETTINGS FROM THE DEFAULTS.
; EVEN BETTER, YOU CAN MAKE A COPY OF THIS FILE WITH A NAME LIKE <PLT>_XXX.ASM AND SPECIFY
; YOUR FILE IN THE BUILD PROCESS.
;
; THE SETTINGS BELOW ARE THE SETTINGS THAT ARE MOST COMMONLY MODIFIED FOR THIS PLATFORM.
; MANY OF THEM ARE EQUAL TO THE SETTINGS IN THE INCLUDED FILE, SO THEY DON'T REALLY DO
; ANYTHING AS IS. THEY ARE LISTED HERE TO MAKE IT EASY FOR YOU TO ADJUST THE MOST COMMON
; SETTINGS.
;
; N.B., SINCE THE SETTINGS BELOW ARE REDEFINING VALUES ALREADY SET IN THE INCLUDED FILE,
; TASM INSISTS THAT YOU USE THE .SET OPERATOR AND NOT THE .EQU OPERATOR BELOW. ATTEMPTING
; TO REDEFINE A VALUE WITH .EQU BELOW WILL CAUSE TASM ERRORS!
;
; PLEASE REFER TO THE CUSTOM BUILD INSTRUCTIONS (README.TXT) IN THE SOURCE DIRECTORY (TWO
; DIRECTORIES ABOVE THIS ONE).
;
#DEFINE BOOT_DEFAULT "H" ; DEFAULT BOOT LOADER CMD ON <CR> OR AUTO BOOT
;
#include "cfg_rcz280.asm"
;
CRTACT .SET FALSE ; ACTIVATE CRT (VDU,CVDU,PROPIO,ETC) AT STARTUP
;
CPUOSC .SET 24000000 ; CPU OSC FREQ IN MHZ
;
INTMODE .SET 1
;
Z280_MEMWAIT .SET 0 ; Z280: MEMORY WAIT STATES (0-3)
Z280_IOWAIT .SET 1 ; Z280: I/O WAIT STATES TO ADD ABOVE 1 W/S BUILT-IN (0-3)
Z280_INTWAIT .SET 0 ; Z280: INT ACK WAIT STATUS (0-3)
;
Z2UENABLE .SET TRUE ; Z2U: ENABLE Z280 UART SERIAL DRIVER (Z2U.ASM)
UARTENABLE .SET TRUE ; UART: ENABLE 8250/16550-LIKE SERIAL DRIVER (UART.ASM)
ACIAENABLE .SET TRUE ; ACIA: ENABLE MOTOROLA 6850 ACIA DRIVER (ACIA.ASM)
SIOENABLE .SET TRUE ; SIO: ENABLE ZILOG SIO SERIAL DRIVER (SIO.ASM)
;
IDEENABLE .SET TRUE ; IDE: ENABLE IDE DISK DRIVER (IDE.ASM)
;
PPIDEENABLE .SET TRUE ; PPIDE: ENABLE PARALLEL PORT IDE DISK DRIVER (PPIDE.ASM)
;
PRPENABLE .SET FALSE ; PRP: ENABLE ECB PROPELLER IO BOARD DRIVER (PRP.ASM)

52
Source/HBIOS/Config/RCZ280_nat.asm

@ -0,0 +1,52 @@
;
;==================================================================================================
; RC2014 Z280 STANDARD CONFIGURATION (NATIVE Z280 MMU W/ LINEAR MEMORY)
;==================================================================================================
;
; THE COMPLETE SET OF DEFAULT CONFIGURATION SETTINGS FOR THIS PLATFORM ARE FOUND IN THE
; CFG_<PLT>.ASM INCLUDED FILE WHICH IS FOUND IN THE PARENT DIRECTORY. THIS FILE CONTAINS
; COMMON CONFIGURATION SETTINGS THAT OVERRIDE THE DEFAULTS. IT IS INTENDED THAT YOU MAKE
; YOUR CUSTOMIZATIONS IN THIS FILE AND JUST INHERIT ALL OTHER SETTINGS FROM THE DEFAULTS.
; EVEN BETTER, YOU CAN MAKE A COPY OF THIS FILE WITH A NAME LIKE <PLT>_XXX.ASM AND SPECIFY
; YOUR FILE IN THE BUILD PROCESS.
;
; THE SETTINGS BELOW ARE THE SETTINGS THAT ARE MOST COMMONLY MODIFIED FOR THIS PLATFORM.
; MANY OF THEM ARE EQUAL TO THE SETTINGS IN THE INCLUDED FILE, SO THEY DON'T REALLY DO
; ANYTHING AS IS. THEY ARE LISTED HERE TO MAKE IT EASY FOR YOU TO ADJUST THE MOST COMMON
; SETTINGS.
;
; N.B., SINCE THE SETTINGS BELOW ARE REDEFINING VALUES ALREADY SET IN THE INCLUDED FILE,
; TASM INSISTS THAT YOU USE THE .SET OPERATOR AND NOT THE .EQU OPERATOR BELOW. ATTEMPTING
; TO REDEFINE A VALUE WITH .EQU BELOW WILL CAUSE TASM ERRORS!
;
; PLEASE REFER TO THE CUSTOM BUILD INSTRUCTIONS (README.TXT) IN THE SOURCE DIRECTORY (TWO
; DIRECTORIES ABOVE THIS ONE).
;
#DEFINE BOOT_DEFAULT "H" ; DEFAULT BOOT LOADER CMD ON <CR> OR AUTO BOOT
;
#include "cfg_rcz280.asm"
;
CRTACT .SET FALSE ; ACTIVATE CRT (VDU,CVDU,PROPIO,ETC) AT STARTUP
;
CPUOSC .SET 24000000 ; CPU OSC FREQ IN MHZ
;
MEMMGR .SET MM_Z280 ; MEMORY MANAGER: MM_[SBC|Z2|N8|Z180|Z280]
;
INTMODE .SET 3
;
Z280_MEMWAIT .SET 0 ; Z280: MEMORY WAIT STATES (0-3)
Z280_IOWAIT .SET 1 ; Z280: I/O WAIT STATES TO ADD ABOVE 1 W/S BUILT-IN (0-3)
Z280_INTWAIT .SET 0 ; Z280: INT ACK WAIT STATUS (0-3)
;
Z2UENABLE .SET TRUE ; Z2U: ENABLE Z280 UART SERIAL DRIVER (Z2U.ASM)
UARTENABLE .SET TRUE ; UART: ENABLE 8250/16550-LIKE SERIAL DRIVER (UART.ASM)
ACIAENABLE .SET TRUE ; ACIA: ENABLE MOTOROLA 6850 ACIA DRIVER (ACIA.ASM)
SIOENABLE .SET TRUE ; SIO: ENABLE ZILOG SIO SERIAL DRIVER (SIO.ASM)
;
IDEENABLE .SET TRUE ; IDE: ENABLE IDE DISK DRIVER (IDE.ASM)
;
PPIDEENABLE .SET TRUE ; PPIDE: ENABLE PARALLEL PORT IDE DISK DRIVER (PPIDE.ASM)
;
PRPENABLE .SET FALSE ; PRP: ENABLE ECB PROPELLER IO BOARD DRIVER (PRP.ASM)
;
Z2UOSCEXT .SET TRUE ; Z2U: USE EXTERNAL OSCILLATOR

36
Source/HBIOS/Config/RCZ80_duart.asm

@ -0,0 +1,36 @@
;
;==================================================================================================
; RC2014 Z80 CONFIGURATION W/ DUART
;==================================================================================================
;
; THE COMPLETE SET OF DEFAULT CONFIGURATION SETTINGS FOR THIS PLATFORM ARE FOUND IN THE
; CFG_<PLT>.ASM INCLUDED FILE WHICH IS FOUND IN THE PARENT DIRECTORY. THIS FILE CONTAINS
; COMMON CONFIGURATION SETTINGS THAT OVERRIDE THE DEFAULTS. IT IS INTENDED THAT YOU MAKE
; YOUR CUSTOMIZATIONS IN THIS FILE AND JUST INHERIT ALL OTHER SETTINGS FROM THE DEFAULTS.
; EVEN BETTER, YOU CAN MAKE A COPY OF THIS FILE WITH A NAME LIKE <PLT>_XXX.ASM AND SPECIFY
; YOUR FILE IN THE BUILD PROCESS.
;
; THE SETTINGS BELOW ARE THE SETTINGS THAT ARE MOST COMMONLY MODIFIED FOR THIS PLATFORM.
; MANY OF THEM ARE EQUAL TO THE SETTINGS IN THE INCLUDED FILE, SO THEY DON'T REALLY DO
; ANYTHING AS IS. THEY ARE LISTED HERE TO MAKE IT EASY FOR YOU TO ADJUST THE MOST COMMON
; SETTINGS.
;
; N.B., SINCE THE SETTINGS BELOW ARE REDEFINING VALUES ALREADY SET IN THE INCLUDED FILE,
; TASM INSISTS THAT YOU USE THE .SET OPERATOR AND NOT THE .EQU OPERATOR BELOW. ATTEMPTING
; TO REDEFINE A VALUE WITH .EQU BELOW WILL CAUSE TASM ERRORS!
;
; PLEASE REFER TO THE CUSTOM BUILD INSTRUCTIONS (README.TXT) IN THE SOURCE DIRECTORY (TWO
; DIRECTORIES ABOVE THIS ONE).
;
#DEFINE BOOT_DEFAULT "H" ; DEFAULT BOOT LOADER CMD ON <CR> OR AUTO BOOT
;
#DEFINE PLATFORM_NAME "RC2014 (DUART)"
;
#include "Config/RCZ80_std.asm"
;
CRTACT .SET FALSE ; ACTIVATE CRT (VDU,CVDU,PROPIO,ETC) AT STARTUP
;
DUARTENABLE .SET TRUE ; DUART: ENABLE 2681/2692 SERIAL DRIVER (DUART.ASM)
DUARTCNT .SET 1 ; DUART: NUMBER OF CHIPS TO DETECT (1-2)
;
PRPENABLE .SET FALSE ; PRP: ENABLE ECB PROPELLER IO BOARD DRIVER (PRP.ASM)

14
Source/HBIOS/Config/RCZ80_kio.asm

@ -22,25 +22,31 @@
; PLEASE REFER TO THE CUSTOM BUILD INSTRUCTIONS (README.TXT) IN THE SOURCE DIRECTORY (TWO
; DIRECTORIES ABOVE THIS ONE).
;
#define PLATFORM_NAME "RC2014 (KIO)"
#DEFINE PLATFORM_NAME "RC2014 (KIO)"
;
#define BOOT_DEFAULT "H" ; DEFAULT BOOT LOADER CMD ON <CR> OR AUTO BOOT
#DEFINE BOOT_DEFAULT "H" ; DEFAULT BOOT LOADER CMD ON <CR> OR AUTO BOOT
;
#include "Config/RCZ80_std.asm"
;
CRTACT .SET FALSE ; ACTIVATE CRT (VDU,CVDU,PROPIO,ETC) AT STARTUP
;
INTMODE .SET 2 ; INTERRUPTS: 0=NONE, 1=MODE 1, 2=MODE 2
;
KIOENABLE .SET TRUE ; ENABLE ZILOG KIO SUPPORT
;
CTCENABLE .SET TRUE ; ENABLE ZILOG CTC SUPPORT
CTCTIMER .SET TRUE ; ENABLE CTC PERIODIC TIMER
CTCBASE .SET KIOBASE+$04 ; CTC BASE I/O ADDRESS
;
ACIAENABLE .SET FALSE ; ACIA: ENABLE MOTOROLA 6850 ACIA DRIVER (ACIA.ASM)
;
SIOENABLE .SET TRUE ; SIO: ENABLE ZILOG SIO SERIAL DRIVER (SIO.ASM)
SIOCNT .SET 1 ; SIO: NUMBER OF CHIPS TO DETECT (1-2), 2 CHANNELS PER CHIP
SIO0MODE .SET SIOMODE_EZZ80 ; SIO 0: CHIP TYPE: SIOMODE_[RC|SMB|ZP|EZZ80]
SIO0MODE .SET SIOMODE_STD ; SIO 0: CHIP TYPE: SIOMODE_[STD|RC|SMB|ZP]
SIO0BASE .SET KIOBASE+$08 ; SIO 0: REGISTERS BASE ADR
SIO0CTCC .SET 0 ; SIO 0: CTC CHANNEL CLOCK SCALER, (0-3), -1 FOR NONE
SIO0ACLK .SET 1843200 ; SIO 0A: OSC FREQ IN HZ, ZP=2457600/4915200, RC/SMB=7372800
SIO0ACTCC .SET 0 ; SIO 0A: CTC CHANNEL 0=A, 1=B, 2=C, 3=D, -1 FOR NONE
SIO0BCLK .SET 1843200 ; SIO 0B: OSC FREQ IN HZ, ZP=2457600/4915200, RC/SMB=7372800
SIO0BCTCC .SET 1 ; SIO 0B: CTC CHANNEL 0=A, 1=B, 2=C, 3=D, -1 FOR NONE
;
PRPENABLE .SET FALSE ; PRP: ENABLE ECB PROPELLER IO BOARD DRIVER (PRP.ASM)

10
Source/HBIOS/Config/RCZ80_mt.asm

@ -22,11 +22,15 @@
; PLEASE REFER TO THE CUSTOM BUILD INSTRUCTIONS (README.TXT) IN THE SOURCE DIRECTORY (TWO
; DIRECTORIES ABOVE THIS ONE).
;
#define BOOT_DEFAULT "H" ; DEFAULT BOOT LOADER CMD ON <CR> OR AUTO BOOT
#DEFINE BOOT_DEFAULT "H" ; DEFAULT BOOT LOADER CMD ON <CR> OR AUTO BOOT
;
#define PLATFORM_NAME "RC2014 (MT)"
#DEFINE PLATFORM_NAME "RC2014 (MT)"
;
#include "Config/RCZ80_std.asm"
;
CRTACT .SET FALSE ; ACTIVATE CRT (VDU,CVDU,PROPIO,ETC) AT STARTUP
;
TMSENABLE .SET FALSE ; TMS: ENABLE TMS9918 VIDEO/KBD DRIVER (TMS.ASM)
TMSTIMENABLE .SET FALSE ; TMS: ENABLE TIMER INTERRUPTS (REQUIRES IM1)
;
SDENABLE .SET TRUE ; SD: ENABLE SD CARD DISK DRIVER (SD.ASM)
SDMODE .SET SDMODE_MT ; SD: DRIVER MODE: SDMODE_[JUHA|N8|CSIO|PPI|UART|DSD|MK4|SC|MT]

11
Source/HBIOS/Config/RCZ80_std.asm

@ -22,19 +22,26 @@
; PLEASE REFER TO THE CUSTOM BUILD INSTRUCTIONS (README.TXT) IN THE SOURCE DIRECTORY (TWO
; DIRECTORIES ABOVE THIS ONE).
;
#define BOOT_DEFAULT "H" ; DEFAULT BOOT LOADER CMD ON <CR> OR AUTO BOOT
#DEFINE BOOT_DEFAULT "H" ; DEFAULT BOOT LOADER CMD ON <CR> OR AUTO BOOT
;
#include "cfg_rcz80.asm"
;
CRTACT .SET FALSE ; ACTIVATE CRT (VDU,CVDU,PROPIO,ETC) AT STARTUP
;
CPUOSC .SET 7372800 ; CPU OSC FREQ IN MHZ
;
UARTENABLE .SET TRUE ; UART: ENABLE 8250/16550-LIKE SERIAL DRIVER (UART.ASM)
ACIAENABLE .SET TRUE ; ACIA: ENABLE MOTOROLA 6850 ACIA DRIVER (ACIA.ASM)
SIOENABLE .SET TRUE ; SIO: ENABLE ZILOG SIO SERIAL DRIVER (SIO.ASM)
;
TMSENABLE .SET FALSE ; TMS: ENABLE TMS9918 VIDEO/KBD DRIVER (TMS.ASM)
TMSTIMENABLE .SET FALSE ; TMS: ENABLE TIMER INTERRUPTS (REQUIRES IM1)
;
FDENABLE .SET FALSE ; FD: ENABLE FLOPPY DISK DRIVER (FD.ASM)
FDMODE .SET FDMODE_RCWDC ; FD: DRIVER MODE: FDMODE_[DIO|ZETA|DIDE|N8|DIO3]
FDMODE .SET FDMODE_RCWDC ; FD: DRIVER MODE: FDMODE_[DIO|ZETA|ZETA2|DIDE|N8|DIO3|RCSMC|RCWDC|DYNO|EPWDC]
;
IDEENABLE .SET TRUE ; IDE: ENABLE IDE DISK DRIVER (IDE.ASM)
;
PPIDEENABLE .SET TRUE ; PPIDE: ENABLE PARALLEL PORT IDE DISK DRIVER (PPIDE.ASM)
;
PRPENABLE .SET FALSE ; PRP: ENABLE ECB PROPELLER IO BOARD DRIVER (PRP.ASM)

49
Source/HBIOS/Config/RCZ80_zrc.asm

@ -0,0 +1,49 @@
;
;==================================================================================================
; RC2014 Z80 ZRC CONFIGURATION
;==================================================================================================
;
; THE COMPLETE SET OF DEFAULT CONFIGURATION SETTINGS FOR THIS PLATFORM ARE FOUND IN THE
; CFG_<PLT>.ASM INCLUDED FILE WHICH IS FOUND IN THE PARENT DIRECTORY. THIS FILE CONTAINS
; COMMON CONFIGURATION SETTINGS THAT OVERRIDE THE DEFAULTS. IT IS INTENDED THAT YOU MAKE
; YOUR CUSTOMIZATIONS IN THIS FILE AND JUST INHERIT ALL OTHER SETTINGS FROM THE DEFAULTS.
; EVEN BETTER, YOU CAN MAKE A COPY OF THIS FILE WITH A NAME LIKE <PLT>_XXX.ASM AND SPECIFY
; YOUR FILE IN THE BUILD PROCESS.
;
; THE SETTINGS BELOW ARE THE SETTINGS THAT ARE MOST COMMONLY MODIFIED FOR THIS PLATFORM.
; MANY OF THEM ARE EQUAL TO THE SETTINGS IN THE INCLUDED FILE, SO THEY DON'T REALLY DO
; ANYTHING AS IS. THEY ARE LISTED HERE TO MAKE IT EASY FOR YOU TO ADJUST THE MOST COMMON
; SETTINGS.
;
; N.B., SINCE THE SETTINGS BELOW ARE REDEFINING VALUES ALREADY SET IN THE INCLUDED FILE,
; TASM INSISTS THAT YOU USE THE .SET OPERATOR AND NOT THE .EQU OPERATOR BELOW. ATTEMPTING
; TO REDEFINE A VALUE WITH .EQU BELOW WILL CAUSE TASM ERRORS!
;
; PLEASE REFER TO THE CUSTOM BUILD INSTRUCTIONS (README.TXT) IN THE SOURCE DIRECTORY (TWO
; DIRECTORIES ABOVE THIS ONE).
;
#DEFINE BOOT_DEFAULT "H" ; DEFAULT BOOT LOADER CMD ON <CR> OR AUTO BOOT
;
#include "cfg_rcz80.asm"
;
CRTACT .SET FALSE ; ACTIVATE CRT (VDU,CVDU,PROPIO,ETC) AT STARTUP
;
CPUOSC .SET 7372800 ; CPU OSC FREQ IN MHZ
;
MEMMGR .SET MM_ZRC ; MEMORY MANAGER: MM_[SBC|Z2|N8|Z180]
;
UARTENABLE .SET TRUE ; UART: ENABLE 8250/16550-LIKE SERIAL DRIVER (UART.ASM)
ACIAENABLE .SET TRUE ; ACIA: ENABLE MOTOROLA 6850 ACIA DRIVER (ACIA.ASM)
SIOENABLE .SET TRUE ; SIO: ENABLE ZILOG SIO SERIAL DRIVER (SIO.ASM)
;
TMSENABLE .SET FALSE ; TMS: ENABLE TMS9918 VIDEO/KBD DRIVER (TMS.ASM)
TMSTIMENABLE .SET FALSE ; TMS: ENABLE TIMER INTERRUPTS (REQUIRES IM1)
;
FDENABLE .SET FALSE ; FD: ENABLE FLOPPY DISK DRIVER (FD.ASM)
FDMODE .SET FDMODE_RCWDC ; FD: DRIVER MODE: FDMODE_[DIO|ZETA|ZETA2|DIDE|N8|DIO3|RCSMC|RCWDC|DYNO|EPWDC]
;
IDEENABLE .SET TRUE ; IDE: ENABLE IDE DISK DRIVER (IDE.ASM)
;
PPIDEENABLE .SET TRUE ; PPIDE: ENABLE PARALLEL PORT IDE DISK DRIVER (PPIDE.ASM)
;
PRPENABLE .SET FALSE ; PRP: ENABLE ECB PROPELLER IO BOARD DRIVER (PRP.ASM)

65
Source/HBIOS/Config/SBC_max.asm

@ -0,0 +1,65 @@
;
;==================================================================================================
; SBC MAXIMUM CONFIGURATION
;==================================================================================================
;
; THIS CONFIGURATION FILE IS *NOT* MEANT TO GENERATE A FUNCTIONAL ROM.
; IT IS USED TO HELP TEST BUILDS WITH MOST FEATURES ENABLED.
;
; THE COMPLETE SET OF DEFAULT CONFIGURATION SETTINGS FOR THIS PLATFORM ARE FOUND IN THE
; CFG_<PLT>.ASM INCLUDED FILE WHICH IS FOUND IN THE PARENT DIRECTORY. THIS FILE CONTAINS
; COMMON CONFIGURATION SETTINGS THAT OVERRIDE THE DEFAULTS. IT IS INTENDED THAT YOU MAKE
; YOUR CUSTOMIZATIONS IN THIS FILE AND JUST INHERIT ALL OTHER SETTINGS FROM THE DEFAULTS.
; EVEN BETTER, YOU CAN MAKE A COPY OF THIS FILE WITH A NAME LIKE <PLT>_XXX.ASM AND SPECIFY
; YOUR FILE IN THE BUILD PROCESS.
;
; THE SETTINGS BELOW ARE THE SETTINGS THAT ARE MOST COMMONLY MODIFIED FOR THIS PLATFORM.
; MANY OF THEM ARE EQUAL TO THE SETTINGS IN THE INCLUDED FILE, SO THEY DON'T REALLY DO
; ANYTHING AS IS. THEY ARE LISTED HERE TO MAKE IT EASY FOR YOU TO ADJUST THE MOST COMMON
; SETTINGS.
;
; N.B., SINCE THE SETTINGS BELOW ARE REDEFINING VALUES ALREADY SET IN THE INCLUDED FILE,
; TASM INSISTS THAT YOU USE THE .SET OPERATOR AND NOT THE .SET OPERATOR BELOW. ATTEMPTING
; TO REDEFINE A VALUE WITH .SET BELOW WILL CAUSE TASM ERRORS!
;
; PLEASE REFER TO THE CUSTOM BUILD INSTRUCTIONS (README.TXT) IN THE SOURCE DIRECTORY (TWO
; DIRECTORIES ABOVE THIS ONE).
;
#DEFINE BOOT_DEFAULT "H" ; DEFAULT BOOT LOADER CMD ON <CR> OR AUTO BOOT
;
#include "cfg_sbc.asm"
;
BATCOND .SET TRUE ; ENABLE LOW BATTERY WARNING MESSAGE
HBIOS_MUTEX .SET TRUE ; ENABLE REENTRANT CALLS TO HBIOS (ADDS OVERHEAD)
USELZSA2 .SET TRUE ; ENABLE FONT COMPRESSION
;
KIOENABLE .SET TRUE ; ENABLE ZILOG KIO SUPPORT
;
DIAGENABLE .SET TRUE ; ENABLES OUTPUT TO 8 BIT LED DIAGNOSTIC PORT
;
DSKYENABLE .SET TRUE ; ENABLES DSKY (DO NOT COMBINE WITH PPIDE)
;
DSRTCENABLE .SET TRUE ; DSRTC: ENABLE DS-1302 CLOCK DRIVER (DSRTC.ASM)
;
UARTENABLE .SET TRUE ; UART: ENABLE 8250/16550-LIKE SERIAL DRIVER (UART.ASM)
;
SIOENABLE .SET TRUE ; SIO: ENABLE ZILOG SIO SERIAL DRIVER (SIO.ASM)
;
VDUENABLE .SET TRUE ; VDU: ENABLE VDU VIDEO/KBD DRIVER (VDU.ASM)
CVDUENABLE .SET TRUE ; CVDU: ENABLE CVDU VIDEO/KBD DRIVER (CVDU.ASM)
TMSENABLE .SET TRUE ; TMS: ENABLE TMS9918 VIDEO/KBD DRIVER (TMS.ASM)
VGAENABLE .SET TRUE ; VGA: ENABLE VGA VIDEO/KBD DRIVER (VGA.ASM)
;
FDENABLE .SET TRUE ; FD: ENABLE FLOPPY DISK DRIVER (FD.ASM)
;
RFENABLE .SET TRUE ; RF: ENABLE RAM FLOPPY DRIVER
;
IDEENABLE .SET TRUE ; IDE: ENABLE IDE DISK DRIVER (IDE.ASM)
;
PPIDEENABLE .SET TRUE ; PPIDE: ENABLE PARALLEL PORT IDE DISK DRIVER (PPIDE.ASM)
;
SDENABLE .SET TRUE ; SD: ENABLE SD CARD DISK DRIVER (SD.ASM)
;
PRPENABLE .SET TRUE ; PRP: ENABLE ECB PROPELLER IO BOARD DRIVER (PRP.ASM)
;
AY38910ENABLE .SET TRUE ; AY: AY-3-8910 / YM2149 SOUND DRIVER

2
Source/HBIOS/Config/SBC_simh.asm

@ -22,7 +22,7 @@
; PLEASE REFER TO THE CUSTOM BUILD INSTRUCTIONS (README.TXT) IN THE SOURCE DIRECTORY (TWO
; DIRECTORIES ABOVE THIS ONE).
;
#define BOOT_DEFAULT "H" ; DEFAULT BOOT LOADER CMD ON <CR> OR AUTO BOOT
#DEFINE BOOT_DEFAULT "H" ; DEFAULT BOOT LOADER CMD ON <CR> OR AUTO BOOT
;
#DEFINE PLATFORM_NAME "SBC (simh)"
;

4
Source/HBIOS/Config/SBC_std.asm

@ -22,7 +22,7 @@
; PLEASE REFER TO THE CUSTOM BUILD INSTRUCTIONS (README.TXT) IN THE SOURCE DIRECTORY (TWO
; DIRECTORIES ABOVE THIS ONE).
;
#define BOOT_DEFAULT "H" ; DEFAULT BOOT LOADER CMD ON <CR> OR AUTO BOOT
#DEFINE BOOT_DEFAULT "H" ; DEFAULT BOOT LOADER CMD ON <CR> OR AUTO BOOT
;
#include "cfg_sbc.asm"
;
@ -33,7 +33,7 @@ CVDUENABLE .SET TRUE ; CVDU: ENABLE CVDU VIDEO/KBD DRIVER (CVDU.ASM)
VGAENABLE .SET TRUE ; VGA: ENABLE VGA VIDEO/KBD DRIVER (VGA.ASM)
;
FDENABLE .SET FALSE ; FD: ENABLE FLOPPY DISK DRIVER (FD.ASM)
FDMODE .SET FDMODE_DIO3 ; FD: DRIVER MODE: FDMODE_[DIO|ZETA|DIDE|N8|DIO3]
FDMODE .SET FDMODE_DIO3 ; FD: DRIVER MODE: FDMODE_[DIO|ZETA|ZETA2|DIDE|N8|DIO3|RCSMC|RCWDC|DYNO|EPWDC]
;
IDEENABLE .SET FALSE ; IDE: ENABLE IDE DISK DRIVER (IDE.ASM)
;

12
Source/HBIOS/Config/SCZ180_126.asm

@ -22,12 +22,14 @@
; PLEASE REFER TO THE CUSTOM BUILD INSTRUCTIONS (README.TXT) IN THE SOURCE DIRECTORY (TWO
; DIRECTORIES ABOVE THIS ONE).
;
#define PLATFORM_NAME "SC126"
#DEFINE PLATFORM_NAME "SC126"
;
#define BOOT_DEFAULT "H" ; DEFAULT BOOT LOADER CMD ON <CR> OR AUTO BOOT
#DEFINE BOOT_DEFAULT "H" ; DEFAULT BOOT LOADER CMD ON <CR> OR AUTO BOOT
;
#include "cfg_scz180.asm"
;
CRTACT .SET FALSE ; ACTIVATE CRT (VDU,CVDU,PROPIO,ETC) AT STARTUP
;
CPUOSC .SET 18432000 ; CPU OSC FREQ IN MHZ
;
Z180_CLKDIV .SET 1 ; Z180: CHK DIV: 0=OSC/2, 1=OSC, 2=OSC*2
@ -41,8 +43,10 @@ ASCIENABLE .SET TRUE ; ASCI: ENABLE Z180 ASCI SERIAL DRIVER (ASCI.ASM)
ACIAENABLE .SET FALSE ; ACIA: ENABLE MOTOROLA 6850 ACIA DRIVER (ACIA.ASM)
SIOENABLE .SET FALSE ; SIO: ENABLE ZILOG SIO SERIAL DRIVER (SIO.ASM)
;
TMSENABLE .SET FALSE ; TMS: ENABLE TMS9918 VIDEO/KBD DRIVER (TMS.ASM)
;
FDENABLE .SET FALSE ; FD: ENABLE FLOPPY DISK DRIVER (FD.ASM)
FDMODE .SET FDMODE_RCWDC ; FD: DRIVER MODE: FDMODE_[DIO|ZETA|DIDE|N8|DIO3]
FDMODE .SET FDMODE_RCWDC ; FD: DRIVER MODE: FDMODE_[DIO|ZETA|ZETA2|DIDE|N8|DIO3|RCSMC|RCWDC|DYNO|EPWDC]
;
IDEENABLE .SET TRUE ; IDE: ENABLE IDE DISK DRIVER (IDE.ASM)
;
@ -50,3 +54,5 @@ PPIDEENABLE .SET TRUE ; PPIDE: ENABLE PARALLEL PORT IDE DISK DRIVER (PPIDE.ASM)
;
SDENABLE .SET TRUE ; SD: ENABLE SD CARD DISK DRIVER (SD.ASM)
SDCNT .SET 1 ; SD: NUMBER OF SD CARD DEVICES (1-2), FOR DSD & SC ONLY
;
PRPENABLE .SET FALSE ; PRP: ENABLE ECB PROPELLER IO BOARD DRIVER (PRP.ASM)

14
Source/HBIOS/Config/SCZ180_130.asm

@ -22,12 +22,14 @@
; PLEASE REFER TO THE CUSTOM BUILD INSTRUCTIONS (README.TXT) IN THE SOURCE DIRECTORY (TWO
; DIRECTORIES ABOVE THIS ONE).
;
#define PLATFORM_NAME "SC130"
#DEFINE PLATFORM_NAME "SC130"
;
#define BOOT_DEFAULT "H" ; DEFAULT BOOT LOADER CMD ON <CR> OR AUTO BOOT
#DEFINE BOOT_DEFAULT "H" ; DEFAULT BOOT LOADER CMD ON <CR> OR AUTO BOOT
;
#include "cfg_scz180.asm"
;
CRTACT .SET FALSE ; ACTIVATE CRT (VDU,CVDU,PROPIO,ETC) AT STARTUP
;
CPUOSC .SET 18432000 ; CPU OSC FREQ IN MHZ
;
Z180_CLKDIV .SET 1 ; Z180: CHK DIV: 0=OSC/2, 1=OSC, 2=OSC*2
@ -43,12 +45,14 @@ DIAGENABLE .SET FALSE ; ENABLES OUTPUT TO 8 BIT LED DIAGNOSTIC PORT
DSRTCENABLE .SET FALSE ; DSRTC: ENABLE DS-1302 CLOCK DRIVER (DSRTC.ASM)
INTRTCENABLE .SET TRUE ; ENABLE PERIODIC INTERRUPT CLOCK DRIVER (INTRTC.ASM)
;
UARTENABLE .SET FALSE ; UART: ENABLE 8250/16550-LIKE SERIAL DRIVER (UART.ASM)
UARTENABLE .SET TRUE ; UART: ENABLE 8250/16550-LIKE SERIAL DRIVER (UART.ASM)
ASCIENABLE .SET TRUE ; ASCI: ENABLE Z180 ASCI SERIAL DRIVER (ASCI.ASM)
ACIAENABLE .SET FALSE ; ACIA: ENABLE MOTOROLA 6850 ACIA DRIVER (ACIA.ASM)
SIOENABLE .SET FALSE ; SIO: ENABLE ZILOG SIO SERIAL DRIVER (SIO.ASM)
;
FDENABLE .SET FALSE ; FD: ENABLE FLOPPY DISK DRIVER (FD.ASM)
TMSENABLE .SET FALSE ; TMS: ENABLE TMS9918 VIDEO/KBD DRIVER (TMS.ASM)
;
FDENABLE .SET FALSE ; FD: DRIVER MODE: FDMODE_[DIO|ZETA|ZETA2|DIDE|N8|DIO3|RCSMC|RCWDC|DYNO|EPWDC]
FDMODE .SET FDMODE_RCWDC ; FD: DRIVER MODE: FDMODE_[DIO|ZETA|DIDE|N8|DIO3]
;
IDEENABLE .SET TRUE ; IDE: ENABLE IDE DISK DRIVER (IDE.ASM)
@ -56,3 +60,5 @@ IDEENABLE .SET TRUE ; IDE: ENABLE IDE DISK DRIVER (IDE.ASM)
PPIDEENABLE .SET TRUE ; PPIDE: ENABLE PARALLEL PORT IDE DISK DRIVER (PPIDE.ASM)
;
SDENABLE .SET TRUE ; SD: ENABLE SD CARD DISK DRIVER (SD.ASM)
;
PRPENABLE .SET FALSE ; PRP: ENABLE ECB PROPELLER IO BOARD DRIVER (PRP.ASM)

10
Source/HBIOS/Config/SCZ180_131.asm

@ -22,12 +22,14 @@
; PLEASE REFER TO THE CUSTOM BUILD INSTRUCTIONS (README.TXT) IN THE SOURCE DIRECTORY (TWO
; DIRECTORIES ABOVE THIS ONE).
;
#define PLATFORM_NAME "SC131"
#DEFINE PLATFORM_NAME "SC131"
;
#define BOOT_DEFAULT "H" ; DEFAULT BOOT LOADER CMD ON <CR> OR AUTO BOOT
#DEFINE BOOT_DEFAULT "H" ; DEFAULT BOOT LOADER CMD ON <CR> OR AUTO BOOT
;
#include "cfg_scz180.asm"
;
CRTACT .SET FALSE ; ACTIVATE CRT (VDU,CVDU,PROPIO,ETC) AT STARTUP
;
CPUOSC .SET 18432000 ; CPU OSC FREQ IN MHZ
;
Z180_CLKDIV .SET 1 ; Z180: CHK DIV: 0=OSC/2, 1=OSC, 2=OSC*2
@ -49,10 +51,12 @@ ACIAENABLE .SET FALSE ; ACIA: ENABLE MOTOROLA 6850 ACIA DRIVER (ACIA.ASM)
SIOENABLE .SET FALSE ; SIO: ENABLE ZILOG SIO SERIAL DRIVER (SIO.ASM)
;
FDENABLE .SET FALSE ; FD: ENABLE FLOPPY DISK DRIVER (FD.ASM)
FDMODE .SET FDMODE_RCWDC ; FD: DRIVER MODE: FDMODE_[DIO|ZETA|DIDE|N8|DIO3]
FDMODE .SET FDMODE_RCWDC ; FD: DRIVER MODE: FDMODE_[DIO|ZETA|ZETA2|DIDE|N8|DIO3|RCSMC|RCWDC|DYNO|EPWDC]
;
IDEENABLE .SET FALSE ; IDE: ENABLE IDE DISK DRIVER (IDE.ASM)
;
PPIDEENABLE .SET FALSE ; PPIDE: ENABLE PARALLEL PORT IDE DISK DRIVER (PPIDE.ASM)
;
SDENABLE .SET TRUE ; SD: ENABLE SD CARD DISK DRIVER (SD.ASM)
;
PRPENABLE .SET FALSE ; PRP: ENABLE ECB PROPELLER IO BOARD DRIVER (PRP.ASM)

56
Source/HBIOS/Config/SCZ180_140.asm

@ -0,0 +1,56 @@
;
;==================================================================================================
; SC140 STANDARD CONFIGURATION
;==================================================================================================
;
; THE COMPLETE SET OF DEFAULT CONFIGURATION SETTINGS FOR THIS PLATFORM ARE FOUND IN THE
; CFG_<PLT>.ASM INCLUDED FILE WHICH IS FOUND IN THE PARENT DIRECTORY. THIS FILE CONTAINS
; COMMON CONFIGURATION SETTINGS THAT OVERRIDE THE DEFAULTS. IT IS INTENDED THAT YOU MAKE
; YOUR CUSTOMIZATIONS IN THIS FILE AND JUST INHERIT ALL OTHER SETTINGS FROM THE DEFAULTS.
; EVEN BETTER, YOU CAN MAKE A COPY OF THIS FILE WITH A NAME LIKE <PLT>_XXX.ASM AND SPECIFY
; YOUR FILE IN THE BUILD PROCESS.
;
; THE SETTINGS BELOW ARE THE SETTINGS THAT ARE MOST COMMONLY MODIFIED FOR THIS PLATFORM.
; MANY OF THEM ARE EQUAL TO THE SETTINGS IN THE INCLUDED FILE, SO THEY DON'T REALLY DO
; ANYTHING AS IS. THEY ARE LISTED HERE TO MAKE IT EASY FOR YOU TO ADJUST THE MOST COMMON
; SETTINGS.
;
; N.B., SINCE THE SETTINGS BELOW ARE REDEFINING VALUES ALREADY SET IN THE INCLUDED FILE,
; TASM INSISTS THAT YOU USE THE .SET OPERATOR AND NOT THE .EQU OPERATOR BELOW. ATTEMPTING
; TO REDEFINE A VALUE WITH .EQU BELOW WILL CAUSE TASM ERRORS!
;
; PLEASE REFER TO THE CUSTOM BUILD INSTRUCTIONS (README.TXT) IN THE SOURCE DIRECTORY (TWO
; DIRECTORIES ABOVE THIS ONE).
;
#DEFINE PLATFORM_NAME "SC140"
;
#include "cfg_scz180.asm"
;
CPUOSC .SET 18432000 ; CPU OSC FREQ IN MHZ
;
Z180_CLKDIV .SET 1 ; Z180: CHK DIV: 0=OSC/2, 1=OSC, 2=OSC*2
Z180_MEMWAIT .SET 0 ; Z180: MEMORY WAIT STATES (0-3)
Z180_IOWAIT .SET 1 ; Z180: I/O WAIT STATES TO ADD ABOVE 1 W/S BUILT-IN (0-3)
;
HBIOS_MUTEX .SET FALSE ; ENABLE REENTRANT CALLS TO HBIOS (ADDS OVERHEAD)
;
LEDENABLE .SET TRUE ; ENABLE STATUS LED (SINGLE LED)
;
DIAGENABLE .SET TRUE ; ENABLES OUTPUT TO 8 BIT LED DIAGNOSTIC PORT
;
DSRTCENABLE .SET TRUE ; DSRTC: ENABLE DS-1302 CLOCK DRIVER (DSRTC.ASM)
;
ASCIENABLE .SET TRUE ; ASCI: ENABLE Z180 ASCI SERIAL DRIVER (ASCI.ASM)
;
ACIAENABLE .SET FALSE ; ACIA: ENABLE MOTOROLA 6850 ACIA DRIVER (ACIA.ASM)
;
SIOENABLE .SET FALSE ; SIO: ENABLE ZILOG SIO SERIAL DRIVER (SIO.ASM)
;
FDENABLE .SET FALSE ; FD: ENABLE FLOPPY DISK DRIVER (FD.ASM)
FDMODE .SET FDMODE_RCWDC ; FD: DRIVER MODE: FDMODE_[DIO|ZETA|DIDE|N8|DIO3]
;
IDEENABLE .SET TRUE ; IDE: ENABLE IDE DISK DRIVER (IDE.ASM)
;
PPIDEENABLE .SET TRUE ; PPIDE: ENABLE PARALLEL PORT IDE DISK DRIVER (PPIDE.ASM)
;
SDENABLE .SET TRUE ; SD: ENABLE SD CARD DISK DRIVER (SD.ASM)

2
Source/HBIOS/Config/UNA_std.asm

@ -22,6 +22,6 @@
; PLEASE REFER TO THE CUSTOM BUILD INSTRUCTIONS (README.TXT) IN THE SOURCE DIRECTORY (TWO
; DIRECTORIES ABOVE THIS ONE).
;
#define BOOT_DEFAULT "H" ; DEFAULT BOOT LOADER CMD ON <CR> OR AUTO BOOT
#DEFINE BOOT_DEFAULT "H" ; DEFAULT BOOT LOADER CMD ON <CR> OR AUTO BOOT
;
#include "cfg_una.asm"

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

Loading…
Cancel
Save