Browse Source

Merge pull request #22 from wwarthen/master

update to master
pull/107/head
Phillip Stevens 6 years ago
committed by GitHub
parent
commit
cb37a34c8b
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 1
      Doc/ChangeLog.txt
  2. BIN
      Doc/RomWBW Applications.pdf
  3. BIN
      Doc/RomWBW Architecture.pdf
  4. BIN
      Doc/RomWBW Getting Started.pdf
  5. 353
      ReadMe.md
  6. 370
      ReadMe.txt
  7. 1
      Source/Apps/Build.cmd
  8. 2
      Source/Apps/Makefile
  9. 1017
      Source/Apps/OSLdr.asm
  10. 27
      Source/Apps/RTC.asm
  11. 34
      Source/Apps/Tune/Tune.asm
  12. 2
      Source/CBIOS/cbios.asm
  13. 80
      Source/CPM22/loader.asm
  14. 85
      Source/CPM3/boot.z80
  15. 80
      Source/CPM3/loader.asm
  16. 68
      Source/Doc/Applications.md
  17. 19
      Source/Doc/Architecture.md
  18. 358
      Source/Doc/GettingStarted.md
  19. 2
      Source/HBIOS/Build.ps1
  20. 2
      Source/HBIOS/Build.sh
  21. 2
      Source/HBIOS/Config/RCZ180_ext.asm
  22. 2
      Source/HBIOS/Config/RCZ180_nat.asm
  23. 12
      Source/HBIOS/Config/RCZ80_kio.asm
  24. 2
      Source/HBIOS/Config/RCZ80_mt.asm
  25. 2
      Source/HBIOS/Config/RCZ80_std.asm
  26. 2
      Source/HBIOS/Config/SCZ180_126.asm
  27. 2
      Source/HBIOS/Config/SCZ180_130.asm
  28. 10
      Source/HBIOS/fd.asm
  29. 16
      Source/HBIOS/romldr.asm
  30. BIN
      Source/Images/Common/ZAP.COM
  31. 4
      Source/Images/d_bp.txt
  32. BIN
      Source/Images/d_bp/u0/COMPARE.COM
  33. BIN
      Source/Images/d_bp/u0/DDTZ.COM
  34. BIN
      Source/Images/d_bp/u0/NULU.COM
  35. BIN
      Source/Images/d_bp/u0/UNARC.COM
  36. BIN
      Source/Images/d_bp/u0/ZAP.COM
  37. BIN
      Source/Images/d_bp/u0/ZDE.COM
  38. BIN
      Source/RomDsk/ROM_1024KB/ZAP.COM
  39. BIN
      Source/RomDsk/ROM_512KB/ZAP.COM
  40. 80
      Source/ZPM3/loader.asm
  41. 82
      Source/ZSDOS/loader.asm

1
Doc/ChangeLog.txt

@ -51,6 +51,7 @@ Version 2.9.2
- WBW: Boot from any slice
- C?M: Added Unix build process
- PLS: FreeRTOS compatibility
- WWB: Removed OSLDR application (can't handle new OSes)
Version 2.9.1
-------------

BIN
Doc/RomWBW Applications.pdf

Binary file not shown.

BIN
Doc/RomWBW Architecture.pdf

Binary file not shown.

BIN
Doc/RomWBW Getting Started.pdf

Binary file not shown.

353
ReadMe.md

@ -3,7 +3,7 @@
## Z80/Z180 System Software
Version 2.9.2 Prerelease
Sunday 22 March 2020
Wednesday 25 March 2020
Wayne Warthen <wwarthen@gmail.com>
@ -111,21 +111,21 @@ directory contains the pre-built ROM and disk images. The ROM image
files all end in “.rom”. Based on the table below, **carefully** pick
the appropriate ROM image for your hardware.
| Platform | ROM Image File | Baud | Description |
| ------------- | --------------- | -----: | ----------------------------------------------- |
| SBC V1/V2 | SBC\_std.rom | 38400 | RetroBrew SBC v1 or v2 ECB Z80 |
| Zeta V1 | ZETA\_std.rom | 38400 | RetroBrew Zeta V1 Z80, ParPortProp (optional) |
| Zeta V2 | ZETA2\_std.rom | 38400 | RetroBrew Zeta V2 Z80, ParPortProp (optional) |
| N8 | N8\_std.rom | 38400 | RetroBrew N8 Z180, date code \>= 2312 |
| Mark IV | MK4\_std.rom | 38400 | RetroBrew Mark IV ECB Z180 |
| RC2014 Z80 | RCZ80\_std.rom | 115200 | RC2014 w/ Z80 CPU, requires 512K RAM/ROM module |
| RC2014 Z180\* | RCZ180\_ext.rom | 115200 | RC2014 w/ Z180 CPU & 512K banked RAM/ROM module |
| RC2014 Z180\* | RCZ180\_nat.rom | 115200 | RC2014 w/ Z180 CPU & 512K native RAM/ROM module |
| Easy Z80 | EZZ80\_std.rom | 115200 | Sergey Kiselev’s Easy Z80 |
| SC126 | SCZ180\_126.rom | 115200 | Stephen Cousin’s SC126 Z180 |
| SC130 | SCZ180\_130.rom | 115200 | Stephen Cousin’s SC130 Z180 |
| SC131 | SCZ180\_131.rom | 115200 | Stephen Cousin’s SC131 Z180 |
| Dyno | DYNO\_std.rom | 38400 | Steve Garcia’s Z180 Dyno Computer |
| Platform | ROM Image File | Baud | Description |
| --------- | --------------- | -----: | ----------------------------------------------- |
| SBC | SBC\_std.rom | 38400 | RetroBrew SBC v1 or v2 ECB Z80 |
| Zeta V1 | ZETA\_std.rom | 38400 | RetroBrew Zeta V1 Z80, ParPortProp (optional) |
| Zeta V2 | ZETA2\_std.rom | 38400 | RetroBrew Zeta V2 Z80, ParPortProp (optional) |
| N8 | N8\_std.rom | 38400 | RetroBrew N8 Z180, date code \>= 2312 |
| Mark IV | MK4\_std.rom | 38400 | RetroBrew Mark IV ECB Z180 |
| RC Z80 | RCZ80\_std.rom | 115200 | RC2014 w/ Z80 CPU, requires 512K RAM/ROM module |
| RC Z180\* | RCZ180\_ext.rom | 115200 | RC2014 w/ Z180 CPU & 512K banked RAM/ROM module |
| RC Z180\* | RCZ180\_nat.rom | 115200 | RC2014 w/ Z180 CPU & 512K native RAM/ROM module |
| Easy Z80 | EZZ80\_std.rom | 115200 | Sergey Kiselev’s Easy Z80 |
| SC126 | SCZ180\_126.rom | 115200 | Stephen Cousin’s SC126 Z180 |
| SC130 | SCZ180\_130.rom | 115200 | Stephen Cousin’s SC130 Z180 |
| SC131 | SCZ180\_131.rom | 115200 | Stephen Cousin’s SC131 Z180 |
| Dyno | DYNO\_std.rom | 38400 | Steve Garcia’s Z180 Dyno Computer |
\*The RC2014 Z180 requires a separate RAM/ROM memory module. There are
two types of these modules and you must pick the ROM for your type of
@ -165,120 +165,6 @@ disappear at the next power on (RAM is generally not persistent). Also
note that attempts to save files to the ROM disk (B:) will fail because
ROM is not writable.
# Upgrading
Upgrading to a newer release of RomWBW is essentially just a matter of
updating the ROM chip in your system. If you have spare ROM chips for
your system and a ROM programmer, it is always safest to retain your
existing, working ROM chip and program a new one with the new firmware.
If the new one fails to boot, you can easily return to the known working
ROM.
Prior to attempting to reprogram your actual ROM chip, you may wish to
“try” the upgrade. With RomWBW, you can upload a new system image
executable and load it from the command line. For each ROM image file
(.rom) in the Binary directory, you will also find a corresponding
application file (.com). For example, for SBC\_std.rom, there is also an
SBC\_std.com file. You can upload the .com file to your system using
XModem, then simply run the .com file. You will see your system go
through the normal startup process just like it was started from ROM.
However, your ROM has not been updated and the next time you boot your
system, it will revert to the system image contained in ROM. You may
find that you are unable to load the .com file because it is too large
to fit in available application RAM (TPA). Unfortunately, in this case,
you will not be able to use the .com file mechanism to start your
system.
If you do not have easy access to a ROM programmer, it is usually
possible to reprogram your system ROM using the FLASH utility from Will
Sowerbutts. This application, called FLASH.COM, can be found on the ROM
drive of any running system. In this case, you would need to transfer
the new ROM image (.rom) over to your system using XModem (or one of the
other mechanisms described in the Transferring Files section below). The
ROM image is too large to fit on your RAM drive, so you will need to
transfer it to a larger storage drive. Once the ROM image is on your
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
XMODEM v12.5 - 07/13/86
RBC, 28-Aug-2019 [WBW], ASCI
Receiving: E0:ROM.IMG
7312k available for uploads
File open - ready to receive
To cancel: Ctrl-X, pause, Ctrl-X
Thanks for the upload
E>flash write rom.img
FLASH4 by Will Sowerbutts <will@sowerbutts.com> version 1.2.3
Using RomWBW (v2.6+) bank switching.
Flash memory chip ID is 0xBFB7: 39F040
Flash memory has 128 sectors of 4096 bytes, total 512KB
Write complete: Reprogrammed 2/128 sectors.
Verify (128 sectors) complete: OK!
Obviously, there is some risk to this approach since any issues with the
programming or ROM image could result in a non-functional system.
To confirm your ROM chip has been successfully updated, restart your
system and boot an operating system from ROM. Do not boot from a disk
device yet. Review the boot messages to see if any issues have occurred.
Once you are satisfied that the ROM is working well, you will need to
update the system images and RomWBW custom applications on your disk
drives. The system images and custom applications are matched to the
RomWBW ROM firmware in use. If you attempt to boot a disk or run
applications that have not been updated to match the current ROM
firmware, you are likely to have odd problems.
The simplest way to update your disk media is to just use your modern
computer to overwrite the entire media with the latest disk image of
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 would need to upload it from the
distribution.
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
following applications are found on your ROM disk. Use COPY to copy them
over any older versions of the app on your disk:
- ASSIGN.COM
- SYSCOPY.COM
- MODE.COM
- FDU.COM (was FDTST.COM)
- OSLDR.COM
- FORMAT.COM
- XM.COM
- FLASH.COM
- FDISK80.COM
- TALK.COM
- RTC.COM
- TIMER.COM
- INTTEST.COM
For example: `B>COPY ASSIGN.COM C:`
Some RomWBW custom applications are too large to fit on the ROM disk. If
you are using any of these you will need to transfer them to your system
and then update all copies. These applications are found in the
Binary\\Apps directory of the distribution and in all of the disk
images.
- FAT.COM
- TUNE.COM
# General Usage
Each of the operating systems and ROM applications included with RomWBW
@ -484,19 +370,20 @@ the OS variants included with RomWBW.
The following custom applications are found on the ROM disk and are,
therefore, globally available.
| Application | Description |
| ----------- | ------------------------------------------------------------------------------------------------------------------------------------ |
| ASSIGN | Add, change, and delete drive letter assignments. Use ASSIGN /? for usage instructions. |
| SYSCOPY | Copy system image to a device to make it bootable. Use SYSCOPY with no parms for usage instructions. |
| FDU | Format and test floppy disks. Menu driven interface. |
| OSLDR | Load a new OS on the fly. For example, you can switch to Z-System when running CP/M. Use OSLDR with no parms for usage instructions. |
| FORMAT | Will someday be a command line tool to format floppy disks. Currently does nothing\! |
| MODE | Reconfigures serial ports dynamically. |
| XM | XModem file transfer program adapted to hardware. Automatically uses primary serial port on system. |
| FDISK80 | John Coffman’s Z80 hard disk partitioning tool. See documentation in Doc directory. |
| FAT | Access MS-DOS FAT filesystems from RomWBW (based on FatFs). |
| FLASH | Will Sowerbutts’ in-situ ROM programming utility. |
| CLRDIR | Initialize the directory area of a CP/M disk (Max Scane). |
| Application | Description |
| ----------- | ---------------------------------------------------------------------------------------------------- |
| ASSIGN | Add, change, and delete drive letter assignments. Use ASSIGN /? for usage instructions. |
| SYSCOPY | Copy system image to a device to make it bootable. Use SYSCOPY with no parms for usage instructions. |
| MODE | Reconfigures serial ports dynamically. |
| FDU | Format and test floppy disks. Menu driven interface. |
| FORMAT | Will someday be a command line tool to format floppy disks. Currently does nothing\! |
| XM | XModem file transfer program adapted to hardware. Automatically uses primary serial port on system. |
| FLASH | Will Sowerbutts’ in-situ ROM programming utility. |
| FDISK80 | John Coffman’s Z80 hard disk partitioning tool. See documentation in Doc directory. |
| TALK | Direct console I/O to a specified character device. |
| RTC | Manage and test the Real Time Clock hardware. |
| TIMER | Display value of running periodic system timer. |
| INTTEST | Test interrupt vector hooking. |
Some custom applications do not fit on the ROM disk. They are found on
the disk image files or the individual files can be found in the
@ -507,9 +394,8 @@ Binary\\Apps directory of the distribution.
| TUNE | Play .PT2, .PT3, .MYM audio files. |
| FAT | Access MS-DOS FAT filesystems from RomWBW (based on FatFs). |
There is additional documentation on some of these applications at the
[RomWBW Applications
Page](https://www.retrobrewcomputers.org/doku.php?id=software:firmwareos:romwbw:apps).
Additional documentation on all of these applications can be found in
“RomWBW Applications.pdf” in the Doc directory of the distribution.
# Using Disks
@ -818,6 +704,16 @@ usage (“CPM Manual.pdf”). If you are new to the CP/M world, I would
recommend using this CP/M variant to start with simply because it is the
most stable and you are less likely to encounter problems.
### Errata
- 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.
- Z-System applications will not run under CP/M 2.2. For example, the
`LDDS` date stamper with not run.
## ZSDOS 1.1
ZSDOS is the most popular non-DRI CP/M “clone” which is generally
@ -832,6 +728,13 @@ Additionally, the official documentation for Z-System is included in the
RomWBW distribution Doc directory (“ZSDOS Manual.pdf” and “ZCPR
Manual.pdf”).
### Errata
- Although most CP/M 2.2 applications will run under Z-System, some
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).
## NZCOM Automatic Z-System
NZCOM is a much further refined version of Z-System (ZCPR 3.4). NZCOM
@ -842,11 +745,16 @@ On the RomWBW NZCOM disk images, the boot OS is ZSDOS 1.1. After you
configure NZCOM, you can add a `PROFILE.SUB` file to automatically
launch NZCOM at boot.
To use, NZCOM, you must run through a simple configuration process. This
is well documented in the NZCOM manual in the “NZCOM Users Manual.pdf”
file in the RomWBW Doc directory. Additionally, there are instructions
for automatically launching NZCOM when the disk is booted under the host
OS via an auto command submission process.
NZCOM is not pre-configured. You must run through a simple configuration
process before loading it. Run MKZCM to do this.
NZCOM has substantially more functionality than CP/M or basic Z-System.
It is important to read the the “NZCOM Users Manual.pdf” file in the
RomWBW Doc directory.
### Errata
- There is no `DIR` command, you must use `SDZ` instead.
## Digital Research CP/M 3
@ -858,7 +766,13 @@ support tools and help system.
Note that to make a CP/M 3 boot disk, you actually place CPMLDR.SYS on
the system tracks of the disk. You do not place CPM3.SYS on the system
tracks.
tracks. `CPMLDR.SYS` chain loads `CPM3.SYS`.
### Errata
- CLRDIR is not working right under CP/M 3. It only partially clears
the disk sectors of the directory area. The extent of this issue has
not been evaluated, but it is not a RomWBW issue.
## Simeon Cran’s ZPM3
@ -868,12 +782,22 @@ ZCPR 3. Essentially, it has the features of and compatibility with both.
Like CP/M 3, to make ZPM3 boot disk, you put CPMLDR.SYS on the system
tracks of the disk.
### Errata
- CLRDIR is not working right under ZPM3. It only partially clears the
disk sectors of the directory area. The extent of this issue has not
been evaluated, but it is not a RomWBW issue.
- ZPMLDR is included with ZPM3, but it is not working correctly.
- The ZPM operatins system is contained in the file called CPM3.SYS
which is confusing, but it is the author’s intended way of using
ZPM3.
## FreeRTOS
Note that Phillip Stevens has also ported FreeRTOS to run under RomWBW.
FreeRTOS is not provided in the RomWBW distribution. FreeRTOS is
available under the [MIT licence](https://www.freertos.org/a00114.html)
and further general information is available at
Phillip Stevens has ported FreeRTOS to run under RomWBW. FreeRTOS is not
provided in the RomWBW distribution. FreeRTOS is available under the
[MIT licence](https://www.freertos.org/a00114.html) and further general
information is available at
[FreeRTOS](https://www.freertos.org/RTOS.html).
You can also contact Phillip for detailed information on the Z180
@ -1064,6 +988,123 @@ Please refer to the [UNA BIOS Firmware
Page](https://www.retrobrewcomputers.org/doku.php?id=software:firmwareos:una:start)
for more information on UNA.
# Upgrading
Upgrading to a newer release of RomWBW is essentially just a matter of
updating the ROM chip in your system. If you have spare ROM chips for
your system and a ROM programmer, it is always safest to retain your
existing, working ROM chip and program a new one with the new firmware.
If the new one fails to boot, you can easily return to the known working
ROM.
Prior to attempting to reprogram your actual ROM chip, you may wish to
“try” the upgrade. With RomWBW, you can upload a new system image
executable and load it from the command line. For each ROM image file
(.rom) in the Binary directory, you will also find a corresponding
application file (.com). For example, for SBC\_std.rom, there is also an
SBC\_std.com file. You can upload the .com file to your system using
XModem, then simply run the .com file. You will see your system go
through the normal startup process just like it was started from ROM.
However, your ROM has not been updated and the next time you boot your
system, it will revert to the system image contained in ROM.
There are two restrictions to be aware of related to loading a system
image as a .com application. First, this is only supported under
Z-System and CP/M 2.2. You must boot into one of these OSes before
attempting to launch the .com file. Second, you may find that you are
unable to load the .com file because it is too large to fit in available
application RAM (TPA). Your only recourse in this situation is to build
a custom ROM with fewer features.
If you do not have easy access to a ROM programmer, it is usually
possible to reprogram your system ROM using the FLASH utility from Will
Sowerbutts. This application, called FLASH.COM, can be found on the ROM
drive of any running system. In this case, you would need to transfer
the new ROM image (.rom) over to your system using XModem (or one of the
other mechanisms described in the Transferring Files section). The ROM
image is too large to fit on your RAM drive, so you will need to
transfer it to a larger storage drive. Once the ROM image is on your
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
XMODEM v12.5 - 07/13/86
RBC, 28-Aug-2019 [WBW], ASCI
Receiving: E0:ROM.IMG
7312k available for uploads
File open - ready to receive
To cancel: Ctrl-X, pause, Ctrl-X
Thanks for the upload
E>flash write rom.img
FLASH4 by Will Sowerbutts <will@sowerbutts.com> version 1.2.3
Using RomWBW (v2.6+) bank switching.
Flash memory chip ID is 0xBFB7: 39F040
Flash memory has 128 sectors of 4096 bytes, total 512KB
Write complete: Reprogrammed 2/128 sectors.
Verify (128 sectors) complete: OK!
Obviously, there is some risk to this approach since any issues with the
programming or ROM image could result in a non-functional system.
To confirm your ROM chip has been successfully updated, restart your
system and boot an operating system from ROM. Do not boot from a disk
device yet. Review the boot messages to see if any issues have occurred.
Once you are satisfied that the ROM is working well, you will need to
update the system images and RomWBW custom applications on your disk
drives. The system images and custom applications are matched to the
RomWBW ROM firmware in use. If you attempt to boot a disk or run
applications that have not been updated to match the current ROM
firmware, you are likely to have odd problems.
The simplest way to update your disk media is to just use your modern
computer to overwrite the entire media with the latest disk image of
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.
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
following applications are found on your ROM disk. Use COPY to copy them
over any older versions of the app on your disk:
- ASSIGN.COM
- SYSCOPY.COM
- MODE.COM
- FDU.COM (was FDTST.COM)
- FORMAT.COM
- XM.COM
- FLASH.COM
- FDISK80.COM
- TALK.COM
- RTC.COM
- TIMER.COM
- INTTEST.COM
For example: `B>COPY ASSIGN.COM C:`
Some RomWBW custom applications are too large to fit on the ROM disk. If
you are using any of these you will need to transfer them to your system
and then update all copies. These applications are found in the
Binary\\Apps directory of the distribution and in all of the disk
images.
- FAT.COM
- TUNE.COM
# RomWBW Distribution
All source code and distributions are maintained on GitHub. Code

370
ReadMe.txt

@ -3,7 +3,7 @@ RomWBW
Z80/Z180 System Software
Version 2.9.2 Prerelease
Sunday 22 March 2020
Wednesday 25 March 2020
Wayne Warthen wwarthen@gmail.com
@ -105,40 +105,41 @@ directory contains the pre-built ROM and disk images. The ROM image
files all end in “.rom”. Based on the table below, carefully pick the
appropriate ROM image for your hardware.
--------------------------------------------------------------------------
Platform ROM Image File Baud Description
---------- ---------------- -------- -------------------------------------
SBC V1/V2 SBC_std.rom 38400 RetroBrew SBC v1 or v2 ECB Z80
-------------------------------------------------------------------------
Platform ROM Image File Baud Description
---------- ----------------- -------- -----------------------------------
SBC SBC_std.rom 38400 RetroBrew SBC v1 or v2 ECB Z80
Zeta V1 ZETA_std.rom 38400 RetroBrew Zeta V1 Z80, ParPortProp
(optional)
Zeta V1 ZETA_std.rom 38400 RetroBrew Zeta V1 Z80, ParPortProp
(optional)
Zeta V2 ZETA2_std.rom 38400 RetroBrew Zeta V2 Z80, ParPortProp
(optional)
Zeta V2 ZETA2_std.rom 38400 RetroBrew Zeta V2 Z80, ParPortProp
(optional)
N8 N8_std.rom 38400 RetroBrew N8 Z180, date code >= 2312
N8 N8_std.rom 38400 RetroBrew N8 Z180, date code >=
2312
Mark IV MK4_std.rom 38400 RetroBrew Mark IV ECB Z180
Mark IV MK4_std.rom 38400 RetroBrew Mark IV ECB Z180
RC2014 Z80 RCZ80_std.rom 115200 RC2014 w/ Z80 CPU, requires 512K
RAM/ROM module
RC Z80 RCZ80_std.rom 115200 RC2014 w/ Z80 CPU, requires 512K
RAM/ROM module
RC2014 RCZ180_ext.rom 115200 RC2014 w/ Z180 CPU & 512K banked
Z180* RAM/ROM module
RC Z180* RCZ180_ext.rom 115200 RC2014 w/ Z180 CPU & 512K banked
RAM/ROM module
RC2014 RCZ180_nat.rom 115200 RC2014 w/ Z180 CPU & 512K native
Z180* RAM/ROM module
RC Z180* RCZ180_nat.rom 115200 RC2014 w/ Z180 CPU & 512K native
RAM/ROM module
Easy Z80 EZZ80_std.rom 115200 Sergey Kiselev’s Easy Z80
Easy Z80 EZZ80_std.rom 115200 Sergey Kiselev’s Easy Z80
SC126 SCZ180_126.rom 115200 Stephen Cousin’s SC126 Z180
SC126 SCZ180_126.rom 115200 Stephen Cousin’s SC126 Z180
SC130 SCZ180_130.rom 115200 Stephen Cousin’s SC130 Z180
SC130 SCZ180_130.rom 115200 Stephen Cousin’s SC130 Z180
SC131 SCZ180_131.rom 115200 Stephen Cousin’s SC131 Z180
SC131 SCZ180_131.rom 115200 Stephen Cousin’s SC131 Z180
Dyno DYNO_std.rom 38400 Steve Garcia’s Z180 Dyno Computer
--------------------------------------------------------------------------
Dyno DYNO_std.rom 38400 Steve Garcia’s Z180 Dyno Computer
-------------------------------------------------------------------------
*The RC2014 Z180 requires a separate RAM/ROM memory module. There are
two types of these modules and you must pick the ROM for your type of
@ -178,118 +179,6 @@ disappear at the next power on (RAM is generally not persistent). Also
note that attempts to save files to the ROM disk (B:) will fail because
ROM is not writable.
Upgrading
Upgrading to a newer release of RomWBW is essentially just a matter of
updating the ROM chip in your system. If you have spare ROM chips for
your system and a ROM programmer, it is always safest to retain your
existing, working ROM chip and program a new one with the new firmware.
If the new one fails to boot, you can easily return to the known working
ROM.
Prior to attempting to reprogram your actual ROM chip, you may wish to
“try” the upgrade. With RomWBW, you can upload a new system image
executable and load it from the command line. For each ROM image file
(.rom) in the Binary directory, you will also find a corresponding
application file (.com). For example, for SBC_std.rom, there is also an
SBC_std.com file. You can upload the .com file to your system using
XModem, then simply run the .com file. You will see your system go
through the normal startup process just like it was started from ROM.
However, your ROM has not been updated and the next time you boot your
system, it will revert to the system image contained in ROM. You may
find that you are unable to load the .com file because it is too large
to fit in available application RAM (TPA). Unfortunately, in this case,
you will not be able to use the .com file mechanism to start your
system.
If you do not have easy access to a ROM programmer, it is usually
possible to reprogram your system ROM using the FLASH utility from Will
Sowerbutts. This application, called FLASH.COM, can be found on the ROM
drive of any running system. In this case, you would need to transfer
the new ROM image (.rom) over to your system using XModem (or one of the
other mechanisms described in the Transferring Files section below). The
ROM image is too large to fit on your RAM drive, so you will need to
transfer it to a larger storage drive. Once the ROM image is on your
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
XMODEM v12.5 - 07/13/86
RBC, 28-Aug-2019 [WBW], ASCI
Receiving: E0:ROM.IMG
7312k available for uploads
File open - ready to receive
To cancel: Ctrl-X, pause, Ctrl-X
Thanks for the upload
E>flash write rom.img
FLASH4 by Will Sowerbutts <will@sowerbutts.com> version 1.2.3
Using RomWBW (v2.6+) bank switching.
Flash memory chip ID is 0xBFB7: 39F040
Flash memory has 128 sectors of 4096 bytes, total 512KB
Write complete: Reprogrammed 2/128 sectors.
Verify (128 sectors) complete: OK!
Obviously, there is some risk to this approach since any issues with the
programming or ROM image could result in a non-functional system.
To confirm your ROM chip has been successfully updated, restart your
system and boot an operating system from ROM. Do not boot from a disk
device yet. Review the boot messages to see if any issues have occurred.
Once you are satisfied that the ROM is working well, you will need to
update the system images and RomWBW custom applications on your disk
drives. The system images and custom applications are matched to the
RomWBW ROM firmware in use. If you attempt to boot a disk or run
applications that have not been updated to match the current ROM
firmware, you are likely to have odd problems.
The simplest way to update your disk media is to just use your modern
computer to overwrite the entire media with the latest disk image of
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 would need to upload it from the distribution.
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
following applications are found on your ROM disk. Use COPY to copy them
over any older versions of the app on your disk:
- ASSIGN.COM
- SYSCOPY.COM
- MODE.COM
- FDU.COM (was FDTST.COM)
- OSLDR.COM
- FORMAT.COM
- XM.COM
- FLASH.COM
- FDISK80.COM
- TALK.COM
- RTC.COM
- TIMER.COM
- INTTEST.COM
For example: B>COPY ASSIGN.COM C:
Some RomWBW custom applications are too large to fit on the ROM disk. If
you are using any of these you will need to transfer them to your system
and then update all copies. These applications are found in the
Binary\Apps directory of the distribution and in all of the disk images.
- FAT.COM
- TUNE.COM
General Usage
Each of the operating systems and ROM applications included with RomWBW
@ -495,38 +384,38 @@ the OS variants included with RomWBW.
The following custom applications are found on the ROM disk and are,
therefore, globally available.
--------------------------------------------------------------------------
-----------------------------------------------------------------------------
Application Description
------------- ------------------------------------------------------------
ASSIGN Add, change, and delete drive letter assignments. Use ASSIGN
/? for usage instructions.
------------- ---------------------------------------------------------------
ASSIGN Add, change, and delete drive letter assignments. Use ASSIGN /?
for usage instructions.
SYSCOPY Copy system image to a device to make it bootable. Use
SYSCOPY with no parms for usage instructions.
SYSCOPY Copy system image to a device to make it bootable. Use SYSCOPY
with no parms for usage instructions.
FDU Format and test floppy disks. Menu driven interface.
MODE Reconfigures serial ports dynamically.
OSLDR Load a new OS on the fly. For example, you can switch to
Z-System when running CP/M. Use OSLDR with no parms for
usage instructions.
FDU Format and test floppy disks. Menu driven interface.
FORMAT Will someday be a command line tool to format floppy disks.
Currently does nothing!
MODE Reconfigures serial ports dynamically.
XM XModem file transfer program adapted to hardware. Automatically
uses primary serial port on system.
XM XModem file transfer program adapted to hardware.
Automatically uses primary serial port on system.
FLASH Will Sowerbutts’ in-situ ROM programming utility.
FDISK80 John Coffman’s Z80 hard disk partitioning tool. See
documentation in Doc directory.
FAT Access MS-DOS FAT filesystems from RomWBW (based on FatFs).
TALK Direct console I/O to a specified character device.
FLASH Will Sowerbutts’ in-situ ROM programming utility.
RTC Manage and test the Real Time Clock hardware.
CLRDIR Initialize the directory area of a CP/M disk (Max Scane).
--------------------------------------------------------------------------
TIMER Display value of running periodic system timer.
INTTEST Test interrupt vector hooking.
-----------------------------------------------------------------------------
Some custom applications do not fit on the ROM disk. They are found on
the disk image files or the individual files can be found in the
@ -537,8 +426,8 @@ Binary\Apps directory of the distribution.
TUNE Play .PT2, .PT3, .MYM audio files.
FAT Access MS-DOS FAT filesystems from RomWBW (based on FatFs).
There is additional documentation on some of these applications at the
RomWBW Applications Page.
Additional documentation on all of these applications can be found in
“RomWBW Applications.pdf” in the Doc directory of the distribution.
Using Disks
@ -846,6 +735,16 @@ usage (“CPM Manual.pdf”). If you are new to the CP/M world, I would
recommend using this CP/M variant to start with simply because it is the
most stable and you are less likely to encounter problems.
Errata
- 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.
- Z-System applications will not run under CP/M 2.2. For example, the
LDDS date stamper with not run.
ZSDOS 1.1
ZSDOS is the most popular non-DRI CP/M “clone” which is generally
@ -858,6 +757,13 @@ Z-System Notes. Additionally, the official documentation for Z-System is
included in the RomWBW distribution Doc directory (“ZSDOS Manual.pdf”
and “ZCPR Manual.pdf”).
Errata
- Although most CP/M 2.2 applications will run under Z-System, some
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).
NZCOM Automatic Z-System
NZCOM is a much further refined version of Z-System (ZCPR 3.4). NZCOM
@ -868,11 +774,16 @@ On the RomWBW NZCOM disk images, the boot OS is ZSDOS 1.1. After you
configure NZCOM, you can add a PROFILE.SUB file to automatically launch
NZCOM at boot.
To use, NZCOM, you must run through a simple configuration process. This
is well documented in the NZCOM manual in the “NZCOM Users Manual.pdf”
file in the RomWBW Doc directory. Additionally, there are instructions
for automatically launching NZCOM when the disk is booted under the host
OS via an auto command submission process.
NZCOM is not pre-configured. You must run through a simple configuration
process before loading it. Run MKZCM to do this.
NZCOM has substantially more functionality than CP/M or basic Z-System.
It is important to read the the “NZCOM Users Manual.pdf” file in the
RomWBW Doc directory.
Errata
- There is no DIR command, you must use SDZ instead.
Digital Research CP/M 3
@ -884,7 +795,13 @@ support tools and help system.
Note that to make a CP/M 3 boot disk, you actually place CPMLDR.SYS on
the system tracks of the disk. You do not place CPM3.SYS on the system
tracks.
tracks. CPMLDR.SYS chain loads CPM3.SYS.
Errata
- CLRDIR is not working right under CP/M 3. It only partially clears
the disk sectors of the directory area. The extent of this issue has
not been evaluated, but it is not a RomWBW issue.
Simeon Cran’s ZPM3
@ -894,12 +811,21 @@ ZCPR 3. Essentially, it has the features of and compatibility with both.
Like CP/M 3, to make ZPM3 boot disk, you put CPMLDR.SYS on the system
tracks of the disk.
Errata
- CLRDIR is not working right under ZPM3. It only partially clears the
disk sectors of the directory area. The extent of this issue has not
been evaluated, but it is not a RomWBW issue.
- ZPMLDR is included with ZPM3, but it is not working correctly.
- The ZPM operatins system is contained in the file called CPM3.SYS
which is confusing, but it is the author’s intended way of using
ZPM3.
FreeRTOS
Note that Phillip Stevens has also ported FreeRTOS to run under RomWBW.
FreeRTOS is not provided in the RomWBW distribution. FreeRTOS is
available under the MIT licence and further general information is
available at FreeRTOS.
Phillip Stevens has ported FreeRTOS to run under RomWBW. FreeRTOS is not
provided in the RomWBW distribution. FreeRTOS is available under the MIT
licence and further general information is available at FreeRTOS.
You can also contact Phillip for detailed information on the Z180
implementation of FreeRTOS for RomWBW.
@ -1087,6 +1013,122 @@ support for VGA3 as soon as it reaches production status.
Please refer to the UNA BIOS Firmware Page for more information on UNA.
Upgrading
Upgrading to a newer release of RomWBW is essentially just a matter of
updating the ROM chip in your system. If you have spare ROM chips for
your system and a ROM programmer, it is always safest to retain your
existing, working ROM chip and program a new one with the new firmware.
If the new one fails to boot, you can easily return to the known working
ROM.
Prior to attempting to reprogram your actual ROM chip, you may wish to
“try” the upgrade. With RomWBW, you can upload a new system image
executable and load it from the command line. For each ROM image file
(.rom) in the Binary directory, you will also find a corresponding
application file (.com). For example, for SBC_std.rom, there is also an
SBC_std.com file. You can upload the .com file to your system using
XModem, then simply run the .com file. You will see your system go
through the normal startup process just like it was started from ROM.
However, your ROM has not been updated and the next time you boot your
system, it will revert to the system image contained in ROM.
There are two restrictions to be aware of related to loading a system
image as a .com application. First, this is only supported under
Z-System and CP/M 2.2. You must boot into one of these OSes before
attempting to launch the .com file. Second, you may find that you are
unable to load the .com file because it is too large to fit in available
application RAM (TPA). Your only recourse in this situation is to build
a custom ROM with fewer features.
If you do not have easy access to a ROM programmer, it is usually
possible to reprogram your system ROM using the FLASH utility from Will
Sowerbutts. This application, called FLASH.COM, can be found on the ROM
drive of any running system. In this case, you would need to transfer
the new ROM image (.rom) over to your system using XModem (or one of the
other mechanisms described in the Transferring Files section). The ROM
image is too large to fit on your RAM drive, so you will need to
transfer it to a larger storage drive. Once the ROM image is on your
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
XMODEM v12.5 - 07/13/86
RBC, 28-Aug-2019 [WBW], ASCI
Receiving: E0:ROM.IMG
7312k available for uploads
File open - ready to receive
To cancel: Ctrl-X, pause, Ctrl-X
Thanks for the upload
E>flash write rom.img
FLASH4 by Will Sowerbutts <will@sowerbutts.com> version 1.2.3
Using RomWBW (v2.6+) bank switching.
Flash memory chip ID is 0xBFB7: 39F040
Flash memory has 128 sectors of 4096 bytes, total 512KB
Write complete: Reprogrammed 2/128 sectors.
Verify (128 sectors) complete: OK!
Obviously, there is some risk to this approach since any issues with the
programming or ROM image could result in a non-functional system.
To confirm your ROM chip has been successfully updated, restart your
system and boot an operating system from ROM. Do not boot from a disk
device yet. Review the boot messages to see if any issues have occurred.
Once you are satisfied that the ROM is working well, you will need to
update the system images and RomWBW custom applications on your disk
drives. The system images and custom applications are matched to the
RomWBW ROM firmware in use. If you attempt to boot a disk or run
applications that have not been updated to match the current ROM
firmware, you are likely to have odd problems.
The simplest way to update your disk media is to just use your modern
computer to overwrite the entire media with the latest disk image of
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.
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
following applications are found on your ROM disk. Use COPY to copy them
over any older versions of the app on your disk:
- ASSIGN.COM
- SYSCOPY.COM
- MODE.COM
- FDU.COM (was FDTST.COM)
- FORMAT.COM
- XM.COM
- FLASH.COM
- FDISK80.COM
- TALK.COM
- RTC.COM
- TIMER.COM
- INTTEST.COM
For example: B>COPY ASSIGN.COM C:
Some RomWBW custom applications are too large to fit on the ROM disk. If
you are using any of these you will need to transfer them to your system
and then update all copies. These applications are found in the
Binary\Apps directory of the distribution and in all of the disk images.
- FAT.COM
- TUNE.COM
RomWBW Distribution
All source code and distributions are maintained on GitHub. Code

1
Source/Apps/Build.cmd

@ -16,7 +16,6 @@ call :asm SysCopy || goto :eof
call :asm Assign || goto :eof
call :asm Format || goto :eof
call :asm Talk || goto :eof
call :asm OSLdr || goto :eof
call :asm Mode || goto :eof
call :asm RTC || goto :eof
call :asm Timer || goto :eof

2
Source/Apps/Makefile

@ -1,5 +1,5 @@
OBJECTS = SysGen.com Survey.com \
SysCopy.com Assign.com Format.com Talk.com OSLdr.com Mode.com RTC.com \
SysCopy.com Assign.com Format.com Talk.com Mode.com RTC.com \
Timer.com IntTest.com
OTHERS = *.hex *.com
SUBDIRS = XM FDU FAT Tune

1017
Source/Apps/OSLdr.asm

File diff suppressed because it is too large

27
Source/Apps/RTC.asm

@ -1265,31 +1265,31 @@ RTC_UCL:
RET Z
CP 'H'
JR Z,RTC_TOP_LOOP_HELP
JP Z,RTC_TOP_LOOP_HELP
CP 'D'
JR Z,RTC_TOP_LOOP_DELAY
JP Z,RTC_TOP_LOOP_DELAY
CP 'B'
JR Z,RTC_TOP_LOOP_BOOT
JP Z,RTC_TOP_LOOP_BOOT
CP 'C'
JR Z,RTC_TOP_LOOP_CHARGE
JP Z,RTC_TOP_LOOP_CHARGE
CP 'N'
JR Z,RTC_TOP_LOOP_NOCHARGE
JP Z,RTC_TOP_LOOP_NOCHARGE
CP 'A'
JR Z,RTC_TOP_LOOP_START
JP Z,RTC_TOP_LOOP_START
CP 'S'
JP Z,RTC_TOP_LOOP_SET
CP 'I'
JR Z,RTC_TOP_LOOP_INIT
JP Z,RTC_TOP_LOOP_INIT
CP 'T'
JR Z,RTC_TOP_LOOP_TIME
JP Z,RTC_TOP_LOOP_TIME
LD DE,CRLF_MSG
LD C,09H ; CP/M write string to console call
@ -1309,6 +1309,16 @@ RTC_TOP_LOOP_DELAY:
JP RTC_TOP_LOOP_1
RTC_TOP_LOOP_BOOT:
LD DE,BOOTMSG ; BOOT message
LD C,9 ; BDOS string display function
CALL BDOS ; Do it
; WAIT FOR MESSAGE TO BE DISPLAYED
LD HL,10000
DELAY_LOOP: ; LOOP IS 26TS
DEC HL ; 6TS
LD A,H ; 4TS
OR L ; 4TS
JR NZ,DELAY_LOOP ; 12TS
LD A,BID_BOOT ; BOOT BANK
LD HL,0 ; ADDRESS ZERO
CALL HB_BNKCALL ; DOES NOT RETURN
@ -1685,6 +1695,7 @@ PLTERR .TEXT "\r\n\r\nUnknown/unsupported hardware platform, aborting...\r\n$"
UBERR .TEXT "\r\nUNA UBIOS is not currently supported, aborting...\r\n$"
HBTAG .TEXT "RomWBW HBIOS$"
UBTAG .TEXT "UNA UBIOS"
BOOTMSG .TEXT "\r\n\r\nRebooting...$"
PLT_SBC .TEXT ", SBC/Zeta RTC Latch Port 0x70\r\n$"
PLT_N8 .TEXT ", N8 RTC Latch Port 0x88\r\n$"
PLT_MK4 .TEXT ", Mark 4 RTC Latch Port 0x8A\r\n$"

34
Source/Apps/Tune/Tune.asm

@ -100,9 +100,19 @@ CFGSEL:
LD A,(PLT) ; Get platform id of loaded config
CP E ; Equal?
JR NZ,CFGSEL ; If no match keep trying
;
; Activate card if applicable
CALL SLOWIO ; Slow down I/O now
LD A,(ACR) ; Get ACR port address (if any)
INC A ; $FF -> $00 & set flags
JR Z,PROBE ; Skip ahead to probe if no ACR
DEC A ; Restore real ACR port address
LD C,A ; Put in C for I/O
LD A,$FF ; Value to activate card
OUT (C),A ; Write value to ACR
;
PROBE:
; Test for hardware (sound chip detection)
CALL SLOWIO
LD DE,(PORTS) ; D := RDAT, E := RSEL
LD C,E ; Port = RSEL
LD A,2 ; Register 2
@ -110,17 +120,16 @@ CFGSEL:
LD C,D ; Port = RDAT
LD A,$AA ; Value = $AA
OUT (C),A ; Write $AA to register 2
;LD C,E ; Port = RSEL
LD A,(RIN) ; Port = RIN
LD C,A ; ... to C
IN A,(C) ; Read back value in register 2
PUSH AF
CALL NORMIO
POP AF
;CALL PRTHEX ; *debug*
CP $AA ; Value as written?
JR NZ,CFGSEL ; If not, keep trying configs
JR Z,MAT ; Hardware matched!
CALL NORMIO ; Back to normal I/O speeds
JR CFGSEL ; And keep trying
;
MAT:
; Hardware matched!
CALL CRLF ; Formatting
LD DE,(DESC) ; Load hardware description pointer
CALL PRTSTR ; Print description
@ -150,15 +159,6 @@ SETDLY:
RR E ; ... for delay factor
EX DE,HL ; Move result to HL
LD (QDLY),HL ; Save result as quark delay factor
;
; Activate SCG card if applicable
LD A,(ACR)
CP $FF
JR Z,NOSCG
LD C,A
LD A,$FF
OUT (C),A
NOSCG:
;
; Clear heap storage
LD HL,HEAP ; Point to heap start
@ -766,7 +766,7 @@ FILTYP .DB 0 ; Sound file type (TYPPT2, TYPPT3, TYPMYM)
TMP .DB 0 ; work around use of undocumented Z80
;
MSGBAN .DB "Tune Player for RomWBW v2.3, 11-Feb-2020",0
MSGBAN .DB "Tune Player for RomWBW v2.4, 23-Mar-2020",0
MSGUSE .DB "Copyright (C) 2020, Wayne Warthen, GNU GPL v3",13,10
.DB "PTxPlayer Copyright (C) 2004-2007 S.V.Bulba",13,10
.DB "MYMPlay by Marq/Lieves!Tuore",13,10,13,10

2
Source/CBIOS/cbios.asm

@ -2277,7 +2277,7 @@ CLRRAM2:
CLRRAM3:
LD A,(BNKUSER) ; USR BANK (TPA)
CALL HB_BNKSEL ; SELECT BANK
EI ; RESUME INTRRUPTS
EI ; RESUME INTERRUPTS
#ENDIF
;
#ENDIF

80
Source/CPM22/loader.asm

@ -31,17 +31,16 @@ SYS_ENT .EQU $E600 ; SYSTEM (OS) ENTRY POINT ADDRESS
SYS_LOC .EQU $D000 ; STARTING ADDRESS TO LOAD SYSTEM IMAGE
SYS_END .EQU $FE00 ; ENDING ADDRESS OF SYSTEM IMAGE
;
BYT .EQU 1 ; used to describe METADATA_SIZE below
WRD .EQU 2
SEC_SIZE .EQU 512 ; DISK SECTOR SIZE
BLK_SIZE .EQU 128 ; OS BLOCK/RECORD SIZE
;
SECTOR_SIZE .EQU 512
BLOCK_SIZE .EQU 128
PREFIX_SIZE .EQU (3 * SECTOR_SIZE) ; 3 SECTORS
METADATA_SIZE .EQU BYT+WRD+(4*BYT)+16+BYT+WRD+WRD+WRD+WRD ; (as defined below)
PREFIX_SIZE .EQU (SEC_SIZE * 3) ; 3 SECTORS
;
PARTTBL_LOC .EQU $1BE
PARTTBL_SIZ .EQU $40
BOOTSIG_LOC .EQU $1FE
META_SIZE .EQU 32 ; SEE BELOW
META_LOC .EQU (PREFIX_SIZE - META_SIZE)
;
PT_LOC .EQU $1BE
PT_SIZ .EQU $40
;
;-------------------------------------------------------------------------------
; SECTOR 1
@ -52,7 +51,8 @@ BOOTSIG_LOC .EQU $1FE
;----------------------------------------------------------------------------
;
; THE FOLLOWING BOOTSTRAP CODE IS BUILT TO ASSUME IT WILL BE EXECUTED AT A STARTING
; ADDRESS OF $8000.
; ADDRESS OF $8000. THIS CODE IS *ONLY* FOR UNA. THE ROMWBW ROM BOOTLOADER
; USES THE METADATA TO LOAD THE OS DIRECTLY.
;
.ORG $8000
JR BOOT
@ -145,10 +145,10 @@ HEXASCII:
; CONVERT LOW NIBBLE OF A TO ASCII HEX
;
HEXCONV:
AND 0FH ;LOW NIBBLE ONLY
ADD A,90H
AND $0F ;LOW NIBBLE ONLY
ADD A,$90
DAA
ADC A,40H
ADC A,$40
DAA
RET
;
@ -163,17 +163,17 @@ STR_LOAD .DB "\r\nLoading",0
STR_DONE .DB "\r\n",0
STR_ERR .DB " Read Error!",0
;
.ORG $ - $8000 ; RESTORE ORG
.FILL PARTTBL_LOC - $ ; FILL TO START OF PARTITION TABLE
.ORG $ - $8000 ; BACK TO ABSOLUTE ADDRESS
;
.FILL PT_LOC - $,0 ; FILL TO START OF PARTITION TABLE
;
; RESERVE SPACE FOR STANDARD IBM-PC PARTITION TABLE. ALTHOUGH A
; PARTITION TABLE IS NOT RELEVANT FOR A FLOPPY DISK, IT DOES NO HARM.
; THE CONTENTS OF THE PARTITION TABLE MUST BE MANAGED BY FDISK80.
;
PARTTBL .FILL PARTTBL_SIZ,$00 ; PARTITION TABLE, FILL WITH ZEROES
PARTTBL .FILL PT_SIZ,0 ; PARTITION TABLE, FILL WITH ZEROES
;
; THE END OF THE FIRST SECTOR MUST CONTAIN THE TWO BYTE BOOT
; SIGNATURE.
; THE END OF THE FIRST SECTOR MUST CONTAIN THE TWO BYTE BOOT SIGNATURE.
;
BOOTSIG .DB $55,$AA ; STANDARD BOOT SIGNATURE
;
@ -184,7 +184,7 @@ BOOTSIG .DB $55,$AA ; STANDARD BOOT SIGNATURE
;
;----------------------------------------------------------------------------
;
.FILL 512,0 ; JUST FILL SECTOR WITH ZEROES
.FILL SEC_SIZE,0 ; JUST FILL SECTOR WITH ZEROES
;
;-------------------------------------------------------------------------------
; SECTOR 3
@ -193,36 +193,34 @@ BOOTSIG .DB $55,$AA ; STANDARD BOOT SIGNATURE
;
;----------------------------------------------------------------------------
;
.FILL 128 * 3,0 ; FIRST 384 BYTES ARE NOT YET DEFINED
.FILL (BLK_SIZE * 3),0 ; FIRST 384 BYTES ARE NOT YET DEFINED
;
; THE FOLLOWING TWO BYTES ARE AN ADDITIONAL SIGNATURE THAT IS VERIFIED BY
; SOME HARDWARE BIOSES.
;
PR_SIG .DB $5A,$A5 ; SIGNATURE GOES HERE
;
; FIRST CHUNK OF METADATA IMMEDIATELY FOLLOWS THE SIGNATURE BYTES
;
PR_PLATFORM .DB 0 ; PLATFORM ID (SEE STD.ASM)
PR_DEVICE .DB 0 ; ? (PROBABLY UNUSED)
PR_FORMATTER .DB 0,0,0,0,0,0,0,0 ; ? (PROBABLY UNUSED)
PR_DRIVE .DB 0 ; ? (PROBABLY UNUSED)
PR_LOG_UNIT .DW 0 ; ? (PROBABLY UNUSED)
;
; FILLER TO PLACE SECOND CHUNK OF METADATA AT THE END OF THE SECTOR
;
.FILL ((PREFIX_SIZE - METADATA_SIZE) - $),00H
.FILL (META_LOC - $),0
;
; SECOND CHUNK OF METADATA
; METADATA
;
PR_WP .DB 0 ; WRITE PROTECT BOOLEADN
PR_UPDSEQ .DW 0 ; PREFIX UPDATE SEQUENCE NUMBER (DEPRECATED?)
PR_VER .DB RMJ,RMN,RUP,RTP ; OS BUILD VERSION
PR_LABEL .DB "Unlabeled Drive ","$" ; DISK LABEL (EXACTLY 16 BYTES!!!)
.DW 0 ; DEPRECATED
PR_LDLOC .DW SYS_LOC ; ADDRESS TO START LOADING SYSTEM
PR_LDEND .DW SYS_END ; ADDRESS TO STOP LOADING SYSTEM
PR_ENTRY .DW SYS_ENT ; ADDRESS TO ENTER SYSTEM (OS)
PR_WP .DB 0 ; (1) WRITE PROTECT BOOLEAN
PR_UPDSEQ .DW 0 ; (2) PREFIX UPDATE SEQUENCE NUMBER (DEPRECATED?)
PR_VER .DB RMJ,RMN,RUP,RTP ; (4) OS BUILD VERSION
PR_LABEL .DB "Unlabeled Drive ","$" ; (17) DISK LABEL (EXACTLY 16 BYTES!!!)
.DW 0 ; (2) DEPRECATED
PR_LDLOC .DW SYS_LOC ; (2) ADDRESS TO START LOADING SYSTEM
PR_LDEND .DW SYS_END ; (2) ADDRESS TO STOP LOADING SYSTEM
PR_ENTRY .DW SYS_ENT ; (2) ADDRESS TO ENTER SYSTEM (OS)
;
#IF (META_SIZE != ($ - META_LOC))
.ECHO "META_SIZE VALUE IS WRONG!!!\r\n"
!!!
#ENDIF
;
#IF ($ != PREFIX_SIZE)
.ECHO "LOADER PREFIX IS WRONG SIZE!!!\r\n"
!!!
#ENDIF
;
.END
.END

85
Source/CPM3/boot.z80

@ -59,14 +59,15 @@ init$2:
call ?pmsg ; print it
; 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
ld a,d ; move boot unit to A
ld (@bootdu),a ; save it
ld a,e ; move boot slice to A
ld (@bootsl),a ; save it
ld bc,0F8E0h ; HBIOS func: get boot info
rst 08 ; do it, D := boot unit, E: := boot slice
ld a,d ; move boot unit to A
ld (@bootdu),a ; save it
ld a,e ; move boot slice to A
ld (@bootsl),a ; save it
call dinit
call clrram
ret
cinit:
@ -298,6 +299,75 @@ stpimg db 'W',~'W' ; marker
dw cbx ; address of cbios ext data
stpsiz equ $ - stpimg
cseg ; ram disk init must be done from resident memory
;
; Initialize ram disk by filling directory with 'e5' bytes
; Fill first 8k of ram disk track 1 with 'e5'
;
clrram:
di ; no interrupts
ld a,(0FFE0h) ; get current bank
push af ; save it
;ld a,(bnkramd) ; first bank of ram disk
ld a,080h ; first bank of ram disk
;call hb_bnksel ; select bank
call 0FFF3h ; select bank
; Check first 32 directory entries. If any start with an invalid
; value, init the ram disk. Valid entries are e5 (empty entry) or
; 0-15 (user number).
ld hl,0
ld de,32
ld b,32
clrram0:
ld a,(hl)
cp 0E5h
jr z,clrram1 ; e5 is valid
cp 16
jr c,clrram1 ; 0-15 is also valid
jr clrram2 ; invalid entry! jump to init
clrram1:
add hl,de ; loop for 32 entries
djnz clrram0
; jr clrram2 ; *debug*
jr clrram3 ; all entries valid, bypass init
clrram2:
ld hl,0 ; source adr for fill
ld bc,2000h ; length of fill is 8k
ld a,0E5h ; fill value
call fill ; do it
or 0ffh ; flag value for cleared
ld (clrflg),a ; save it
clrram3:
;ld a,(bnkuser) ; usr bank (tpa)
pop af ; recover original bank
;call hb_bnksel ; select bank
call 0FFF3h ; select bank
ei ; resume interrupts
ld a,(clrflg) ; get cleared flag
or a ; set flags
ld hl,clr$msg ; clear ram disk message
call nz,?pmsg ; print msg if true
ret
;
; Fill memory at hl with value a, length in bc. All regs used.
; Length *must* be greater than 1 for proper operation!!!
;
fill:
ld d,h ; set de to hl
ld e,l ; so destination equals source
ld (hl),a ; fill the first byte with desired value
inc de ; increment destination
dec bc ; decrement the count
ldir ; do the rest
ret ; return
cseg ; boot loading most be done from resident memory
; This version of the boot loader loads the CCP from a file
@ -569,6 +639,9 @@ read:
ld c,20
jp bdos
clrflg db 0 ; RAM disk cleared flag
clr$msg db 'RAM Disk Initialized',13,10,13,10,0
if zpm
signon$msg db 13,10,'ZPM3'

80
Source/CPM3/loader.asm

@ -31,17 +31,16 @@ 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
;
BYT .EQU 1 ; used to describe METADATA_SIZE below
WRD .EQU 2
SEC_SIZE .EQU 512 ; DISK SECTOR SIZE
BLK_SIZE .EQU 128 ; OS BLOCK/RECORD SIZE
;
SECTOR_SIZE .EQU 512
BLOCK_SIZE .EQU 128
PREFIX_SIZE .EQU (3 * SECTOR_SIZE) ; 3 SECTORS
METADATA_SIZE .EQU BYT+WRD+(4*BYT)+16+BYT+WRD+WRD+WRD+WRD ; (as defined below)
PREFIX_SIZE .EQU (SEC_SIZE * 3) ; 3 SECTORS
;
PARTTBL_LOC .EQU $1BE
PARTTBL_SIZ .EQU $40
BOOTSIG_LOC .EQU $1FE
META_SIZE .EQU 32 ; SEE BELOW
META_LOC .EQU (PREFIX_SIZE - META_SIZE)
;
PT_LOC .EQU $1BE
PT_SIZ .EQU $40
;
;-------------------------------------------------------------------------------
; SECTOR 1
@ -52,7 +51,8 @@ BOOTSIG_LOC .EQU $1FE
;----------------------------------------------------------------------------
;
; THE FOLLOWING BOOTSTRAP CODE IS BUILT TO ASSUME IT WILL BE EXECUTED AT A STARTING
; ADDRESS OF $8000.
; ADDRESS OF $8000. THIS CODE IS *ONLY* FOR UNA. THE ROMWBW ROM BOOTLOADER
; USES THE METADATA TO LOAD THE OS DIRECTLY.
;
.ORG $8000
JR BOOT
@ -145,10 +145,10 @@ HEXASCII:
; CONVERT LOW NIBBLE OF A TO ASCII HEX
;
HEXCONV:
AND 0FH ;LOW NIBBLE ONLY
ADD A,90H
AND $0F ;LOW NIBBLE ONLY
ADD A,$90
DAA
ADC A,40H
ADC A,$40
DAA
RET
;
@ -163,17 +163,17 @@ STR_LOAD .DB "\r\nLoading",0
STR_DONE .DB "\r\n",0
STR_ERR .DB " Read Error!",0
;
.ORG $ - $8000 ; RESTORE ORG
.FILL PARTTBL_LOC - $ ; FILL TO START OF PARTITION TABLE
.ORG $ - $8000 ; BACK TO ABSOLUTE ADDRESS
;
.FILL PT_LOC - $,0 ; FILL TO START OF PARTITION TABLE
;
; RESERVE SPACE FOR STANDARD IBM-PC PARTITION TABLE. ALTHOUGH A
; PARTITION TABLE IS NOT RELEVANT FOR A FLOPPY DISK, IT DOES NO HARM.
; THE CONTENTS OF THE PARTITION TABLE MUST BE MANAGED BY FDISK80.
;
PARTTBL .FILL PARTTBL_SIZ,$00 ; PARTITION TABLE, FILL WITH ZEROES
PARTTBL .FILL PT_SIZ,0 ; PARTITION TABLE, FILL WITH ZEROES
;
; THE END OF THE FIRST SECTOR MUST CONTAIN THE TWO BYTE BOOT
; SIGNATURE.
; THE END OF THE FIRST SECTOR MUST CONTAIN THE TWO BYTE BOOT SIGNATURE.
;
BOOTSIG .DB $55,$AA ; STANDARD BOOT SIGNATURE
;
@ -184,7 +184,7 @@ BOOTSIG .DB $55,$AA ; STANDARD BOOT SIGNATURE
;
;----------------------------------------------------------------------------
;
.FILL 512,0 ; JUST FILL SECTOR WITH ZEROES
.FILL SEC_SIZE,0 ; JUST FILL SECTOR WITH ZEROES
;
;-------------------------------------------------------------------------------
; SECTOR 3
@ -193,36 +193,34 @@ BOOTSIG .DB $55,$AA ; STANDARD BOOT SIGNATURE
;
;----------------------------------------------------------------------------
;
.FILL 128 * 3,0 ; FIRST 384 BYTES ARE NOT YET DEFINED
.FILL (BLK_SIZE * 3),0 ; FIRST 384 BYTES ARE NOT YET DEFINED
;
; THE FOLLOWING TWO BYTES ARE AN ADDITIONAL SIGNATURE THAT IS VERIFIED BY
; SOME HARDWARE BIOSES.
;
PR_SIG .DB $5A,$A5 ; SIGNATURE GOES HERE
;
; FIRST CHUNK OF METADATA IMMEDIATELY FOLLOWS THE SIGNATURE BYTES
;
PR_PLATFORM .DB 0 ; PLATFORM ID (SEE STD.ASM)
PR_DEVICE .DB 0 ; ? (PROBABLY UNUSED)
PR_FORMATTER .DB 0,0,0,0,0,0,0,0 ; ? (PROBABLY UNUSED)
PR_DRIVE .DB 0 ; ? (PROBABLY UNUSED)
PR_LOG_UNIT .DW 0 ; ? (PROBABLY UNUSED)
;
; FILLER TO PLACE SECOND CHUNK OF METADATA AT THE END OF THE SECTOR
;
.FILL ((PREFIX_SIZE - METADATA_SIZE) - $),00H
.FILL (META_LOC - $),0
;
; SECOND CHUNK OF METADATA
; METADATA
;
PR_WP .DB 0 ; WRITE PROTECT BOOLEADN
PR_UPDSEQ .DW 0 ; PREFIX UPDATE SEQUENCE NUMBER (DEPRECATED?)
PR_VER .DB RMJ,RMN,RUP,RTP ; OS BUILD VERSION
PR_LABEL .DB "Unlabeled Drive ","$" ; DISK LABEL (EXACTLY 16 BYTES!!!)
.DW 0 ; DEPRECATED
PR_LDLOC .DW SYS_LOC ; ADDRESS TO START LOADING SYSTEM
PR_LDEND .DW SYS_END ; ADDRESS TO STOP LOADING SYSTEM
PR_ENTRY .DW SYS_ENT ; ADDRESS TO ENTER SYSTEM (OS)
PR_WP .DB 0 ; (1) WRITE PROTECT BOOLEAN
PR_UPDSEQ .DW 0 ; (2) PREFIX UPDATE SEQUENCE NUMBER (DEPRECATED?)
PR_VER .DB RMJ,RMN,RUP,RTP ; (4) OS BUILD VERSION
PR_LABEL .DB "Unlabeled Drive ","$" ; (17) DISK LABEL (EXACTLY 16 BYTES!!!)
.DW 0 ; (2) DEPRECATED
PR_LDLOC .DW SYS_LOC ; (2) ADDRESS TO START LOADING SYSTEM
PR_LDEND .DW SYS_END ; (2) ADDRESS TO STOP LOADING SYSTEM
PR_ENTRY .DW SYS_ENT ; (2) ADDRESS TO ENTER SYSTEM (OS)
;
#IF (META_SIZE != ($ - META_LOC))
.ECHO "META_SIZE VALUE IS WRONG!!!\r\n"
!!!
#ENDIF
;
#IF ($ != PREFIX_SIZE)
.ECHO "LOADER PREFIX IS WRONG SIZE!!!\r\n"
!!!
#ENDIF
;
.END
.END

68
Source/Doc/Applications.md

@ -12,10 +12,10 @@ classoption:
- oneside
papersize: letter
geometry:
- top=1in
- bottom=1in
- left=1in
- right=1in
- top=1.5in
- bottom=1.5in
- left=1.5in
- right=1.5in
# - showframe
linestretch: 1.25
colorlinks: true
@ -69,7 +69,6 @@ found:
| SYSCOPY | Yes | Yes | Yes |
| MODE | Yes | Yes | Yes |
| FDU | Yes | Yes | Yes |
| OSLDR | Yes | Yes | Yes |
| FORMAT | Yes | Yes | Yes |
| XM | Yes | Yes | Yes |
| FLASH | Yes | Yes | Yes |
@ -402,63 +401,6 @@ provided in the RomWBW distribution.
`\clearpage`{=latex}
# OSLDR
RomWBW supports loading new operating systems on-the-fly. For example,
if CP/M 2.2 is currently running, you can load and run Z-System from
the command line. The `OSLDR` application provides this functionality.
## Syntax
`OSLDR [/F] `*`<osimg>`*` [`*`<hbiosimg>`*`]`
*`<osimg>`* is the name of a file containing an operating system image
*`<hbiosimg>`* is the name of a file containing an HBIOS firmware image
`/F` forces operation bypassing compatibility checking
## Usage
`OSLDR `*`<osimg>`* will read the specified file, confirm it is an
operating system image file, then load it as though it was being
booted. For example, `OSLDR ZSYS.SYS` would load the Z-System
operating system.
`OSLDR `*`<osimg>`* *`<hbiosimg>`* will first read and load the
specified *`<hbiosimg>`* file as a new HBIOS image and then read and
load the specified *`<osimg>`* file. HBIOS image can be produced by
the RomWBW build process, but they are not produced by default. You
are encouraged to contact Wayne Warthen for more information on this
capability.
## Notes
The primary function of `OSLDR` is to allow switching to a new
operating system while the system if running without a full reboot.
`OSLDR` is considered generally reliable for when used simply to load
a new operating system (one parameter). However, using it to load an
HBIOS image is considered experimental and should not be relied upon.
`OSLDR` can also be used to load "test" versions of operating systems
from files transferred to your system. This is especially useful in
when loading both an operating system and HBIOS image because you can
essentially simulate starting your system with new firmware without
reprogramming your ROM.
`OSLDR` attempts to check the file(s) specified for correctness before
loading them, but it is far from perfect. This application should be
used with caution and may not work in some cases that are hard to
define.
## Etymology
The `OSLDR` command is an original product and the source code is
provided in the RomWBW distribution.
`\clearpage`{=latex}
# FORMAT
This application is just a placeholder for a future version that will
@ -476,7 +418,7 @@ function beyond this display currently.
## Etymology
The `OSLDR` command is an original product and the source code is
The `FORMAT` command is an original product and the source code is
provided in the RomWBW distribution.
`\clearpage`{=latex}

19
Source/Doc/Architecture.md

@ -17,10 +17,10 @@ numbersections: true
secnumdepth: 1
papersize: letter
geometry:
- top=1in
- bottom=1in
- left=1in
- right=1in
- top=1.5in
- bottom=1.5in
- left=1.5in
- right=1.5in
# - showframe
# - pass
linestretch: 1.25
@ -1327,13 +1327,16 @@ The hardware platform is identified in L:
Id | Platform
-- | ---------------------------------------------------
1 | SBC V1 or V2
2 | ZETA
3 | ZETA 2
2 | Zeta
3 | Zeta V2
4 | N8
5 | MK4
5 | Mark IV
6 | UNA
7 | RC2014 w/ Z80
8 | RC2014 w/ Z180
8 | RC2014 w/ Z180 & banked memory module
9 | RC2014 w/ Z180 & linear memory module
10 | SCZ180 (SC126, SC130, SC131)
11 | Dyno
### Function 0xF2 -- System Set Bank (SYSSETBNK)

358
Source/Doc/GettingStarted.md

@ -14,10 +14,10 @@ classoption:
toc: true
papersize: letter
geometry:
- top=1in
- bottom=1in
- left=1in
- right=1in
- top=1.5in
- bottom=1.5in
- left=1.5in
- right=1.5in
# - showframe
linestretch: 1.25
colorlinks: true
@ -142,21 +142,21 @@ directory contains the pre-built ROM and disk images. The ROM image
files all end in ".rom". Based on the table below, **carefully** pick
the appropriate ROM image for your hardware.
| Platform | ROM Image File | Baud | Description |
| --------------| --------------------- | --------: | ------------------------------------------------ |
| SBC V1/V2 | SBC_std.rom | 38400 | RetroBrew SBC v1 or v2 ECB Z80 |
| Zeta V1 | ZETA_std.rom | 38400 | RetroBrew Zeta V1 Z80, ParPortProp (optional) |
| Zeta V2 | ZETA2_std.rom | 38400 | RetroBrew Zeta V2 Z80, ParPortProp (optional) |
| N8 | N8_std.rom | 38400 | RetroBrew N8 Z180, date code >= 2312 |
| Mark IV | MK4_std.rom | 38400 | RetroBrew Mark IV ECB Z180 |
| RC2014 Z80 | RCZ80_std.rom | 115200 | RC2014 w/ Z80 CPU, requires 512K RAM/ROM module |
| RC2014 Z180\* | RCZ180_ext.rom | 115200 | RC2014 w/ Z180 CPU & 512K banked RAM/ROM module |
| RC2014 Z180\* | RCZ180_nat.rom | 115200 | RC2014 w/ Z180 CPU & 512K native RAM/ROM module |
| Easy Z80 | EZZ80_std.rom | 115200 | Sergey Kiselev's Easy Z80 |
| SC126 | SCZ180_126.rom | 115200 | Stephen Cousin's SC126 Z180 |
| SC130 | SCZ180_130.rom | 115200 | Stephen Cousin's SC130 Z180 |
| SC131 | SCZ180_131.rom | 115200 | Stephen Cousin's SC131 Z180 |
| Dyno | DYNO_std.rom | 38400 | Steve Garcia's Z180 Dyno Computer |
| Platform | ROM Image File | Baud | Description |
| -------------- | ------------------------ | ----------: | ------------------------------------------------ |
| SBC | SBC_std.rom | 38400 | RetroBrew SBC v1 or v2 ECB Z80 |
| Zeta V1 | ZETA_std.rom | 38400 | RetroBrew Zeta V1 Z80, ParPortProp (optional) |
| Zeta V2 | ZETA2_std.rom | 38400 | RetroBrew Zeta V2 Z80, ParPortProp (optional) |
| N8 | N8_std.rom | 38400 | RetroBrew N8 Z180, date code >= 2312 |
| Mark IV | MK4_std.rom | 38400 | RetroBrew Mark IV ECB Z180 |
| RC Z80 | RCZ80_std.rom | 115200 | RC2014 w/ Z80 CPU, requires 512K RAM/ROM module |
| RC Z180\* | RCZ180_ext.rom | 115200 | RC2014 w/ Z180 CPU & 512K banked RAM/ROM module |
| RC Z180\* | RCZ180_nat.rom | 115200 | RC2014 w/ Z180 CPU & 512K native RAM/ROM module |
| Easy Z80 | EZZ80_std.rom | 115200 | Sergey Kiselev's Easy Z80 |
| SC126 | SCZ180_126.rom | 115200 | Stephen Cousin's SC126 Z180 |
| SC130 | SCZ180_130.rom | 115200 | Stephen Cousin's SC130 Z180 |
| SC131 | SCZ180_131.rom | 115200 | Stephen Cousin's SC131 Z180 |
| Dyno | DYNO_std.rom | 38400 | Steve Garcia's Z180 Dyno Computer |
\*The RC2014 Z180 requires a separate RAM/ROM memory module. There are
two types of these modules and you must pick the ROM for your type of
@ -196,123 +196,6 @@ to the RAM disk (A:) will disappear at the next power on (RAM is
generally not persistent). Also note that attempts to save files to
the ROM disk (B:) will fail because ROM is not writable.
# Upgrading
Upgrading to a newer release of RomWBW is essentially just a matter of
updating the ROM chip in your system. If you have spare ROM chips for
your system and a ROM programmer, it is always safest to retain your
existing, working ROM chip and program a new one with the new
firmware. If the new one fails to boot, you can easily return to the
known working ROM.
Prior to attempting to reprogram your actual ROM chip, you may wish to
"try" the upgrade. With RomWBW, you can upload a new system image
executable and load it from the command line. For each ROM image file
(.rom) in the Binary directory, you will also find a corresponding
application file (.com). For example, for SBC_std.rom, there is also
an SBC_std.com file. You can upload the .com file to your system using
XModem, then simply run the .com file. You will see your system go
through the normal startup process just like it was started from ROM.
However, your ROM has not been updated and the next time you boot your
system, it will revert to the system image contained in ROM. You may
find that you are unable to load the .com file because it is too large
to fit in available application RAM (TPA). Unfortunately, in this
case, you will not be able to use the .com file mechanism to start
your system.
If you do not have easy access to a ROM programmer, it is usually
possible to reprogram your system ROM using the FLASH utility from
Will Sowerbutts. This application, called FLASH.COM, can be found on the
ROM drive of any running system. In this case, you would need to
transfer the new ROM image (.rom) over to your system using XModem (or
one of the other mechanisms described in the Transferring Files
section below). The ROM image is too large to fit on your RAM drive,
so you will need to transfer it to a larger storage drive. Once the
ROM image is on your 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
XMODEM v12.5 - 07/13/86
RBC, 28-Aug-2019 [WBW], ASCI
Receiving: E0:ROM.IMG
7312k available for uploads
File open - ready to receive
To cancel: Ctrl-X, pause, Ctrl-X
Thanks for the upload
E>flash write rom.img
FLASH4 by Will Sowerbutts <will@sowerbutts.com> version 1.2.3
Using RomWBW (v2.6+) bank switching.
Flash memory chip ID is 0xBFB7: 39F040
Flash memory has 128 sectors of 4096 bytes, total 512KB
Write complete: Reprogrammed 2/128 sectors.
Verify (128 sectors) complete: OK!
```
Obviously, there is some risk to this approach since any issues with the
programming or ROM image could result in a non-functional system.
To confirm your ROM chip has been successfully updated, restart your
system and boot an operating system from ROM. Do not boot from a disk
device yet. Review the boot messages to see if any issues have
occurred.
Once you are satisfied that the ROM is working well, you will need to
update the system images and RomWBW custom applications on your disk
drives. The system images and custom applications are matched to the
RomWBW ROM firmware in use. If you attempt to boot a disk or run
applications that have not been updated to match the current ROM
firmware, you are likely to have odd problems.
The simplest way to update your disk media is to just use your modern
computer to overwrite the entire media with the latest disk image of 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 would need to
upload it from the distribution.
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
following applications are found on your ROM disk. Use COPY to copy
them over any older versions of the app on your disk:
* ASSIGN.COM
* SYSCOPY.COM
* MODE.COM
* FDU.COM (was FDTST.COM)
* OSLDR.COM
* FORMAT.COM
* XM.COM
* FLASH.COM
* FDISK80.COM
* TALK.COM
* RTC.COM
* TIMER.COM
* INTTEST.COM
For example: `B>COPY ASSIGN.COM C:`
Some RomWBW custom applications are too large to fit on the ROM disk.
If you are using any of these you will need to transfer them to your
system and then update all copies. These applications are found in
the Binary\\Apps directory of the distribution and in all of the disk
images.
* FAT.COM
* TUNE.COM
# General Usage
Each of the operating systems and ROM applications included with
@ -524,19 +407,20 @@ functional on all of the OS variants included with RomWBW.
The following custom applications are found on the ROM disk and are,
therefore, globally available.
| Application | Description |
| ----------- | -------------------------------------------------------------- |
| ASSIGN | Add, change, and delete drive letter assignments. Use ASSIGN /? for usage instructions. |
| Application | Description |
| ----------- | ---------------------------------------------------------------------------------------------------- |
| ASSIGN | Add, change, and delete drive letter assignments. Use ASSIGN /? for usage instructions. |
| SYSCOPY | Copy system image to a device to make it bootable. Use SYSCOPY with no parms for usage instructions. |
| FDU | Format and test floppy disks. Menu driven interface. |
| OSLDR | Load a new OS on the fly. For example, you can switch to Z-System when running CP/M. Use OSLDR with no parms for usage instructions. |
| FORMAT | Will someday be a command line tool to format floppy disks. Currently does nothing! |
| MODE | Reconfigures serial ports dynamically. |
| XM | XModem file transfer program adapted to hardware. Automatically uses primary serial port on system. |
| FDISK80 | John Coffman's Z80 hard disk partitioning tool. See documentation in Doc directory. |
| FAT | Access MS-DOS FAT filesystems from RomWBW (based on FatFs). |
| FLASH | Will Sowerbutts' in-situ ROM programming utility. |
| CLRDIR | Initialize the directory area of a CP/M disk (Max Scane). |
| MODE | Reconfigures serial ports dynamically. |
| FDU | Format and test floppy disks. Menu driven interface. |
| FORMAT | Will someday be a command line tool to format floppy disks. Currently does nothing! |
| XM | XModem file transfer program adapted to hardware. Automatically uses primary serial port on system. |
| FLASH | Will Sowerbutts' in-situ ROM programming utility. |
| FDISK80 | John Coffman's Z80 hard disk partitioning tool. See documentation in Doc directory. |
| TALK | Direct console I/O to a specified character device. |
| RTC | Manage and test the Real Time Clock hardware. |
| TIMER | Display value of running periodic system timer. |
| INTTEST | Test interrupt vector hooking. |
Some custom applications do not fit on the ROM disk. They are found on the
disk image files or the individual files can be found in the Binary\\Apps
@ -547,8 +431,8 @@ directory of the distribution.
| TUNE | Play .PT2, .PT3, .MYM audio files. |
| FAT | Access MS-DOS FAT filesystems from RomWBW (based on FatFs). |
There is additional documentation on some of these applications at the
[RomWBW Applications Page](https://www.retrobrewcomputers.org/doku.php?id=software:firmwareos:romwbw:apps).
Additional documentation on all of these applications can be found in
"RomWBW Applications.pdf" in the Doc directory of the distribution.
# Using Disks
@ -869,6 +753,16 @@ are new to the CP/M world, I would recommend using this CP/M variant
to start with simply because it is the most stable and you are less
likely to encounter problems.
### Errata
- 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.
- Z-System applications will not run under CP/M 2.2. For example,
the `LDDS` date stamper with not run.
## ZSDOS 1.1
ZSDOS is the most popular non-DRI CP/M "clone" which is generally
@ -883,6 +777,12 @@ Additionally, the official documentation for Z-System is included in
the RomWBW distribution Doc directory ("ZSDOS Manual.pdf" and "ZCPR
Manual.pdf").
### Errata
- Although most CP/M 2.2 applications will run under Z-System, some
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).
## NZCOM Automatic Z-System
NZCOM is a much further refined version of Z-System (ZCPR 3.4). NZCOM
@ -893,11 +793,16 @@ a host OS. On the RomWBW NZCOM disk images, the boot OS is ZSDOS 1.1.
After you configure NZCOM, you can add a `PROFILE.SUB` file to
automatically launch NZCOM at boot.
To use, NZCOM, you must run through a simple configuration process.
This is well documented in the NZCOM manual in the "NZCOM Users
Manual.pdf" file in the RomWBW Doc directory. Additionally, there are
instructions for automatically launching NZCOM when the disk is
booted under the host OS via an auto command submission process.
NZCOM is not pre-configured. You must run through a simple
configuration process before loading it. Run MKZCM to do this.
NZCOM has substantially more functionality than CP/M or basic
Z-System. It is important to read the the "NZCOM Users
Manual.pdf" file in the RomWBW Doc directory.
### Errata
- There is no `DIR` command, you must use `SDZ` instead.
## Digital Research CP/M 3
@ -909,7 +814,13 @@ support tools and help system.
Note that to make a CP/M 3 boot disk, you actually place CPMLDR.SYS
on the system tracks of the disk. You do not place CPM3.SYS on the
system tracks.
system tracks. `CPMLDR.SYS` chain loads `CPM3.SYS`.
### Errata
- CLRDIR is not working right under CP/M 3. It only partially clears
the disk sectors of the directory area. The extent of this issue
has not been evaluated, but it is not a RomWBW issue.
## Simeon Cran's ZPM3
@ -920,11 +831,20 @@ both.
Like CP/M 3, to make ZPM3 boot disk, you put CPMLDR.SYS on the system
tracks of the disk.
### Errata
- CLRDIR is not working right under ZPM3. It only partially clears
the disk sectors of the directory area. The extent of this issue
has not been evaluated, but it is not a RomWBW issue.
- ZPMLDR is included with ZPM3, but it is not working correctly.
- The ZPM operatins system is contained in the file called CPM3.SYS
which is confusing, but it is the author's intended way of using ZPM3.
## FreeRTOS
Note that Phillip Stevens has also ported FreeRTOS to run under
RomWBW. FreeRTOS is not provided in the RomWBW distribution. FreeRTOS
is available under the
Phillip Stevens has ported FreeRTOS to run under RomWBW. FreeRTOS is
not provided in the RomWBW distribution. FreeRTOS is available under
the
[MIT licence](https://www.freertos.org/a00114.html) and further general
information is available at
[FreeRTOS](https://www.freertos.org/RTOS.html).
@ -1119,6 +1039,126 @@ Please refer to the
[UNA BIOS Firmware Page](https://www.retrobrewcomputers.org/doku.php?id=software:firmwareos:una:start)
for more information on UNA.
# Upgrading
Upgrading to a newer release of RomWBW is essentially just a matter of
updating the ROM chip in your system. If you have spare ROM chips for
your system and a ROM programmer, it is always safest to retain your
existing, working ROM chip and program a new one with the new
firmware. If the new one fails to boot, you can easily return to the
known working ROM.
Prior to attempting to reprogram your actual ROM chip, you may wish to
"try" the upgrade. With RomWBW, you can upload a new system image
executable and load it from the command line. For each ROM image file
(.rom) in the Binary directory, you will also find a corresponding
application file (.com). For example, for SBC_std.rom, there is also
an SBC_std.com file. You can upload the .com file to your system using
XModem, then simply run the .com file. You will see your system go
through the normal startup process just like it was started from ROM.
However, your ROM has not been updated and the next time you boot your
system, it will revert to the system image contained in ROM.
There are two restrictions to be aware of related to loading a system
image as a .com application. First, this is only supported under
Z-System and CP/M 2.2. You must boot into one of these OSes before
attempting to launch the .com file. Second, you may find that you
are unable to load the .com file because it is too large to fit in
available application RAM (TPA). Your only recourse in this
situation is to build a custom ROM with fewer features.
If you do not have easy access to a ROM programmer, it is usually
possible to reprogram your system ROM using the FLASH utility from
Will Sowerbutts. This application, called FLASH.COM, can be found on the
ROM drive of any running system. In this case, you would need to
transfer the new ROM image (.rom) over to your system using XModem (or
one of the other mechanisms described in the Transferring Files
section). The ROM image is too large to fit on your RAM drive,
so you will need to transfer it to a larger storage drive. Once the
ROM image is on your 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
XMODEM v12.5 - 07/13/86
RBC, 28-Aug-2019 [WBW], ASCI
Receiving: E0:ROM.IMG
7312k available for uploads
File open - ready to receive
To cancel: Ctrl-X, pause, Ctrl-X
Thanks for the upload
E>flash write rom.img
FLASH4 by Will Sowerbutts <will@sowerbutts.com> version 1.2.3
Using RomWBW (v2.6+) bank switching.
Flash memory chip ID is 0xBFB7: 39F040
Flash memory has 128 sectors of 4096 bytes, total 512KB
Write complete: Reprogrammed 2/128 sectors.
Verify (128 sectors) complete: OK!
```
Obviously, there is some risk to this approach since any issues with the
programming or ROM image could result in a non-functional system.
To confirm your ROM chip has been successfully updated, restart your
system and boot an operating system from ROM. Do not boot from a disk
device yet. Review the boot messages to see if any issues have
occurred.
Once you are satisfied that the ROM is working well, you will need to
update the system images and RomWBW custom applications on your disk
drives. The system images and custom applications are matched to the
RomWBW ROM firmware in use. If you attempt to boot a disk or run
applications that have not been updated to match the current ROM
firmware, you are likely to have odd problems.
The simplest way to update your disk media is to just use your modern
computer to overwrite the entire media with the latest disk image of
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.
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
following applications are found on your ROM disk. Use COPY to copy
them over any older versions of the app on your disk:
* ASSIGN.COM
* SYSCOPY.COM
* MODE.COM
* FDU.COM (was FDTST.COM)
* FORMAT.COM
* XM.COM
* FLASH.COM
* FDISK80.COM
* TALK.COM
* RTC.COM
* TIMER.COM
* INTTEST.COM
For example: `B>COPY ASSIGN.COM C:`
Some RomWBW custom applications are too large to fit on the ROM disk.
If you are using any of these you will need to transfer them to your
system and then update all copies. These applications are found in
the Binary\\Apps directory of the distribution and in all of the disk
images.
* FAT.COM
* TUNE.COM
# RomWBW Distribution
All source code and distributions are maintained on GitHub. Code

2
Source/HBIOS/Build.ps1

@ -110,7 +110,7 @@ $ImgFile = "${OutDir}/${RomName}.img" # Final name of IMG image (memory loadable
if ($Platform -eq "UNA") {$Bios = 'una'} else {$Bios = 'wbw'}
# List of RomWBW proprietary apps to imbed in ROM disk.
$RomApps = "assign","fdu","format","mode","osldr","rtc","survey","syscopy","sysgen","talk","timer","xm","inttest"
$RomApps = "assign","fdu","format","mode","rtc","survey","syscopy","sysgen","talk","timer","xm","inttest"
""
"Building ${RomName} ${ROMSize}KB ROM configuration ${Config} for Z${CPUType}..."

2
Source/HBIOS/Build.sh

@ -57,7 +57,7 @@ else
BIOS=wbw
fi
Apps=(assign fdu format mode osldr rtc survey syscopy sysgen talk timer xm inttest)
Apps=(assign fdu format mode rtc survey syscopy sysgen talk timer xm inttest)
blankfile=Blank${romsize}KB.dat
romdiskfile=RomDisk.tmp

2
Source/HBIOS/Config/RCZ180_ext.asm

@ -42,4 +42,4 @@ 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 FALSE ; PPIDE: ENABLE PARALLEL PORT IDE DISK DRIVER (PPIDE.ASM)
PPIDEENABLE .SET TRUE ; PPIDE: ENABLE PARALLEL PORT IDE DISK DRIVER (PPIDE.ASM)

2
Source/HBIOS/Config/RCZ180_nat.asm

@ -42,4 +42,4 @@ 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 FALSE ; PPIDE: ENABLE PARALLEL PORT IDE DISK DRIVER (PPIDE.ASM)
PPIDEENABLE .SET TRUE ; PPIDE: ENABLE PARALLEL PORT IDE DISK DRIVER (PPIDE.ASM)

12
Source/HBIOS/Config/RCZ80_kio.asm

@ -22,9 +22,10 @@
; PLEASE REFER TO THE CUSTOM BUILD INSTRUCTIONS (README.TXT) IN THE SOURCE DIRECTORY (TWO
; DIRECTORIES ABOVE THIS ONE).
;
#include "cfg_rcz80.asm"
#DEFINE PLATFORM_NAME "RC2014 (KIO)"
;
#include "Config/RCZ80_std.asm"
;
CPUOSC .SET 7372800 ; CPU OSC FREQ IN MHZ
INTMODE .SET 2 ; INTERRUPTS: 0=NONE, 1=MODE 1, 2=MODE 2
;
KIOENABLE .SET TRUE ; ENABLE ZILOG KIO SUPPORT
@ -41,10 +42,3 @@ 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
SIO0BCLK .SET 1843200 ; SIO 0B: OSC FREQ IN HZ, ZP=2457600/4915200, RC/SMB=7372800
;
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 FALSE ; PPIDE: ENABLE PARALLEL PORT IDE DISK DRIVER (PPIDE.ASM)

2
Source/HBIOS/Config/RCZ80_mt.asm

@ -22,7 +22,7 @@
; PLEASE REFER TO THE CUSTOM BUILD INSTRUCTIONS (README.TXT) IN THE SOURCE DIRECTORY (TWO
; DIRECTORIES ABOVE THIS ONE).
;
#DEFINE PLATFORM_NAME "RC2014 (mt)"
#DEFINE PLATFORM_NAME "RC2014 (MT)"
;
#include "Config/RCZ80_std.asm"
;

2
Source/HBIOS/Config/RCZ80_std.asm

@ -35,4 +35,4 @@ 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 FALSE ; PPIDE: ENABLE PARALLEL PORT IDE DISK DRIVER (PPIDE.ASM)
PPIDEENABLE .SET TRUE ; PPIDE: ENABLE PARALLEL PORT IDE DISK DRIVER (PPIDE.ASM)

2
Source/HBIOS/Config/SCZ180_126.asm

@ -45,7 +45,7 @@ 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 FALSE ; PPIDE: ENABLE PARALLEL PORT IDE DISK DRIVER (PPIDE.ASM)
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

2
Source/HBIOS/Config/SCZ180_130.asm

@ -51,6 +51,6 @@ 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 FALSE ; PPIDE: ENABLE PARALLEL PORT IDE DISK DRIVER (PPIDE.ASM)
PPIDEENABLE .SET TRUE ; PPIDE: ENABLE PARALLEL PORT IDE DISK DRIVER (PPIDE.ASM)
;
SDENABLE .SET TRUE ; SD: ENABLE SD CARD DISK DRIVER (SD.ASM)

10
Source/HBIOS/fd.asm

@ -1296,9 +1296,13 @@ FC_PULSETC:
; SET FST_DOR FOR MOTOR CONTROL ON
;
FC_MOTORON:
LD BC,300H
; LD BC,10H
LD (FCD_IDLECNT),BC
; LD BC,300H
; LD BC,50H
; LD (FCD_IDLECNT),BC
LD A,(CB_CPUMHZ)
RLCA
LD (FCD_IDLECNT),A
#IF (FDTRACE >= 3)
LD DE,FDSTR_MOTON

16
Source/HBIOS/romldr.asm

@ -447,18 +447,32 @@ MENU_N .EQU ((MENU_E - MENU_S) / MENU_V) ; NUMBER OF MENU ITEMS
;
REBOOT:
;
#IF (BIOS == BIOS_WBW)
LD DE,STR_REBOOT ; POINT TO MESSAGE
CALL WRITESTR ; PRINT IT
;
; WAIT FOR MESSAGE TO BE DISPLAYED
LD HL,10000
REBOOT1: ; LOOP IS 26TS
DEC HL ; 6TS
LD A,H ; 4TS
OR L ; 4TS
JR NZ,REBOOT1 ; 12TS
;
#IF (BIOS == BIOS_WBW)
;
#IF (DSKYENABLE)
LD HL,MSG_BOOT ; POINT TO BOOT MESSAGE
CALL DSKY_SHOWSEG ; DISPLAY MESSAGE
#ENDIF
;
; SWITCH TO ROM BANK 0 AND JUMP TO ADDRESS 0
LD A,BID_BOOT ; BOOT BANK
LD HL,0 ; ADDRESS ZERO
CALL HB_BNKCALL ; DOES NOT RETURN
#ENDIF
;
#IF (BIOS == BIOS_UNA)
; SWITCH TO ROM BANK 0 AND JUMP TO ADDRESS 0
LD BC,$01FB ; UNA FUNC = SET BANK
LD DE,0 ; ROM BANK 0
RST 08 ; DO IT

BIN
Source/Images/Common/ZAP.COM

Binary file not shown.

4
Source/Images/d_bp.txt

@ -17,3 +17,7 @@
../BPBIOS/myterm.z3t 0:
../BPBIOS/Z34RCP11/z34rcp11.rel 0:rcp.zrl
../BPBIOS/NZFCP13/nzfcp13.rel 0:fcp.zrl
#
# Add Common Applications
#
Common/*.* 0:

BIN
Source/Images/d_bp/u0/COMPARE.COM

Binary file not shown.

BIN
Source/Images/d_bp/u0/DDTZ.COM

Binary file not shown.

BIN
Source/Images/d_bp/u0/NULU.COM

Binary file not shown.

BIN
Source/Images/d_bp/u0/UNARC.COM

Binary file not shown.

BIN
Source/Images/d_bp/u0/ZAP.COM

Binary file not shown.

BIN
Source/Images/d_bp/u0/ZDE.COM

Binary file not shown.

BIN
Source/RomDsk/ROM_1024KB/ZAP.COM

Binary file not shown.

BIN
Source/RomDsk/ROM_512KB/ZAP.COM

Binary file not shown.

80
Source/ZPM3/loader.asm

@ -31,17 +31,16 @@ 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
;
BYT .EQU 1 ; used to describe METADATA_SIZE below
WRD .EQU 2
SEC_SIZE .EQU 512 ; DISK SECTOR SIZE
BLK_SIZE .EQU 128 ; OS BLOCK/RECORD SIZE
;
SECTOR_SIZE .EQU 512
BLOCK_SIZE .EQU 128
PREFIX_SIZE .EQU (3 * SECTOR_SIZE) ; 3 SECTORS
METADATA_SIZE .EQU BYT+WRD+(4*BYT)+16+BYT+WRD+WRD+WRD+WRD ; (as defined below)
PREFIX_SIZE .EQU (SEC_SIZE * 3) ; 3 SECTORS
;
PARTTBL_LOC .EQU $1BE
PARTTBL_SIZ .EQU $40
BOOTSIG_LOC .EQU $1FE
META_SIZE .EQU 32 ; SEE BELOW
META_LOC .EQU (PREFIX_SIZE - META_SIZE)
;
PT_LOC .EQU $1BE
PT_SIZ .EQU $40
;
;-------------------------------------------------------------------------------
; SECTOR 1
@ -52,7 +51,8 @@ BOOTSIG_LOC .EQU $1FE
;----------------------------------------------------------------------------
;
; THE FOLLOWING BOOTSTRAP CODE IS BUILT TO ASSUME IT WILL BE EXECUTED AT A STARTING
; ADDRESS OF $8000.
; ADDRESS OF $8000. THIS CODE IS *ONLY* FOR UNA. THE ROMWBW ROM BOOTLOADER
; USES THE METADATA TO LOAD THE OS DIRECTLY.
;
.ORG $8000
JR BOOT
@ -145,10 +145,10 @@ HEXASCII:
; CONVERT LOW NIBBLE OF A TO ASCII HEX
;
HEXCONV:
AND 0FH ;LOW NIBBLE ONLY
ADD A,90H
AND $0F ;LOW NIBBLE ONLY
ADD A,$90
DAA
ADC A,40H
ADC A,$40
DAA
RET
;
@ -163,17 +163,17 @@ STR_LOAD .DB "\r\nLoading",0
STR_DONE .DB "\r\n",0
STR_ERR .DB " Read Error!",0
;
.ORG $ - $8000 ; RESTORE ORG
.FILL PARTTBL_LOC - $ ; FILL TO START OF PARTITION TABLE
.ORG $ - $8000 ; BACK TO ABSOLUTE ADDRESS
;
.FILL PT_LOC - $,0 ; FILL TO START OF PARTITION TABLE
;
; RESERVE SPACE FOR STANDARD IBM-PC PARTITION TABLE. ALTHOUGH A
; PARTITION TABLE IS NOT RELEVANT FOR A FLOPPY DISK, IT DOES NO HARM.
; THE CONTENTS OF THE PARTITION TABLE MUST BE MANAGED BY FDISK80.
;
PARTTBL .FILL PARTTBL_SIZ,$00 ; PARTITION TABLE, FILL WITH ZEROES
PARTTBL .FILL PT_SIZ,0 ; PARTITION TABLE, FILL WITH ZEROES
;
; THE END OF THE FIRST SECTOR MUST CONTAIN THE TWO BYTE BOOT
; SIGNATURE.
; THE END OF THE FIRST SECTOR MUST CONTAIN THE TWO BYTE BOOT SIGNATURE.
;
BOOTSIG .DB $55,$AA ; STANDARD BOOT SIGNATURE
;
@ -184,7 +184,7 @@ BOOTSIG .DB $55,$AA ; STANDARD BOOT SIGNATURE
;
;----------------------------------------------------------------------------
;
.FILL 512,0 ; JUST FILL SECTOR WITH ZEROES
.FILL SEC_SIZE,0 ; JUST FILL SECTOR WITH ZEROES
;
;-------------------------------------------------------------------------------
; SECTOR 3
@ -193,36 +193,34 @@ BOOTSIG .DB $55,$AA ; STANDARD BOOT SIGNATURE
;
;----------------------------------------------------------------------------
;
.FILL 128 * 3,0 ; FIRST 384 BYTES ARE NOT YET DEFINED
.FILL (BLK_SIZE * 3),0 ; FIRST 384 BYTES ARE NOT YET DEFINED
;
; THE FOLLOWING TWO BYTES ARE AN ADDITIONAL SIGNATURE THAT IS VERIFIED BY
; SOME HARDWARE BIOSES.
;
PR_SIG .DB $5A,$A5 ; SIGNATURE GOES HERE
;
; FIRST CHUNK OF METADATA IMMEDIATELY FOLLOWS THE SIGNATURE BYTES
;
PR_PLATFORM .DB 0 ; PLATFORM ID (SEE STD.ASM)
PR_DEVICE .DB 0 ; ? (PROBABLY UNUSED)
PR_FORMATTER .DB 0,0,0,0,0,0,0,0 ; ? (PROBABLY UNUSED)
PR_DRIVE .DB 0 ; ? (PROBABLY UNUSED)
PR_LOG_UNIT .DW 0 ; ? (PROBABLY UNUSED)
;
; FILLER TO PLACE SECOND CHUNK OF METADATA AT THE END OF THE SECTOR
;
.FILL ((PREFIX_SIZE - METADATA_SIZE) - $),00H
.FILL (META_LOC - $),0
;
; SECOND CHUNK OF METADATA
; METADATA
;
PR_WP .DB 0 ; WRITE PROTECT BOOLEADN
PR_UPDSEQ .DW 0 ; PREFIX UPDATE SEQUENCE NUMBER (DEPRECATED?)
PR_VER .DB RMJ,RMN,RUP,RTP ; OS BUILD VERSION
PR_LABEL .DB "Unlabeled Drive ","$" ; DISK LABEL (EXACTLY 16 BYTES!!!)
.DW 0 ; DEPRECATED
PR_LDLOC .DW SYS_LOC ; ADDRESS TO START LOADING SYSTEM
PR_LDEND .DW SYS_END ; ADDRESS TO STOP LOADING SYSTEM
PR_ENTRY .DW SYS_ENT ; ADDRESS TO ENTER SYSTEM (OS)
PR_WP .DB 0 ; (1) WRITE PROTECT BOOLEAN
PR_UPDSEQ .DW 0 ; (2) PREFIX UPDATE SEQUENCE NUMBER (DEPRECATED?)
PR_VER .DB RMJ,RMN,RUP,RTP ; (4) OS BUILD VERSION
PR_LABEL .DB "Unlabeled Drive ","$" ; (17) DISK LABEL (EXACTLY 16 BYTES!!!)
.DW 0 ; (2) DEPRECATED
PR_LDLOC .DW SYS_LOC ; (2) ADDRESS TO START LOADING SYSTEM
PR_LDEND .DW SYS_END ; (2) ADDRESS TO STOP LOADING SYSTEM
PR_ENTRY .DW SYS_ENT ; (2) ADDRESS TO ENTER SYSTEM (OS)
;
#IF (META_SIZE != ($ - META_LOC))
.ECHO "META_SIZE VALUE IS WRONG!!!\r\n"
!!!
#ENDIF
;
#IF ($ != PREFIX_SIZE)
.ECHO "LOADER PREFIX IS WRONG SIZE!!!\r\n"
!!!
#ENDIF
;
.END
.END

82
Source/ZSDOS/loader.asm

@ -1,5 +1,5 @@
;===============================================================================
; BL.ASM
; LOADER.ASM
;
; BOOTLOADER FOR ROMWBW DISK OPERATING SYSTEMS.
;
@ -31,17 +31,16 @@ SYS_ENT .EQU $E600 ; SYSTEM (OS) ENTRY POINT ADDRESS
SYS_LOC .EQU $D000 ; STARTING ADDRESS TO LOAD SYSTEM IMAGE
SYS_END .EQU $FE00 ; ENDING ADDRESS OF SYSTEM IMAGE
;
BYT .EQU 1 ; used to describe METADATA_SIZE below
WRD .EQU 2
SEC_SIZE .EQU 512 ; DISK SECTOR SIZE
BLK_SIZE .EQU 128 ; OS BLOCK/RECORD SIZE
;
SECTOR_SIZE .EQU 512
BLOCK_SIZE .EQU 128
PREFIX_SIZE .EQU (3 * SECTOR_SIZE) ; 3 SECTORS
METADATA_SIZE .EQU BYT+WRD+(4*BYT)+16+BYT+WRD+WRD+WRD+WRD ; (as defined below)
PREFIX_SIZE .EQU (SEC_SIZE * 3) ; 3 SECTORS
;
PARTTBL_LOC .EQU $1BE
PARTTBL_SIZ .EQU $40
BOOTSIG_LOC .EQU $1FE
META_SIZE .EQU 32 ; SEE BELOW
META_LOC .EQU (PREFIX_SIZE - META_SIZE)
;
PT_LOC .EQU $1BE
PT_SIZ .EQU $40
;
;-------------------------------------------------------------------------------
; SECTOR 1
@ -52,7 +51,8 @@ BOOTSIG_LOC .EQU $1FE
;----------------------------------------------------------------------------
;
; THE FOLLOWING BOOTSTRAP CODE IS BUILT TO ASSUME IT WILL BE EXECUTED AT A STARTING
; ADDRESS OF $8000.
; ADDRESS OF $8000. THIS CODE IS *ONLY* FOR UNA. THE ROMWBW ROM BOOTLOADER
; USES THE METADATA TO LOAD THE OS DIRECTLY.
;
.ORG $8000
JR BOOT
@ -145,10 +145,10 @@ HEXASCII:
; CONVERT LOW NIBBLE OF A TO ASCII HEX
;
HEXCONV:
AND 0FH ;LOW NIBBLE ONLY
ADD A,90H
AND $0F ;LOW NIBBLE ONLY
ADD A,$90
DAA
ADC A,40H
ADC A,$40
DAA
RET
;
@ -163,17 +163,17 @@ STR_LOAD .DB "\r\nLoading",0
STR_DONE .DB "\r\n",0
STR_ERR .DB " Read Error!",0
;
.ORG $ - $8000 ; RESTORE ORG
.FILL PARTTBL_LOC - $ ; FILL TO START OF PARTITION TABLE
.ORG $ - $8000 ; BACK TO ABSOLUTE ADDRESS
;
.FILL PT_LOC - $,0 ; FILL TO START OF PARTITION TABLE
;
; RESERVE SPACE FOR STANDARD IBM-PC PARTITION TABLE. ALTHOUGH A
; PARTITION TABLE IS NOT RELEVANT FOR A FLOPPY DISK, IT DOES NO HARM.
; THE CONTENTS OF THE PARTITION TABLE MUST BE MANAGED BY FDISK80.
;
PARTTBL .FILL PARTTBL_SIZ,$00 ; PARTITION TABLE, FILL WITH ZEROES
PARTTBL .FILL PT_SIZ,0 ; PARTITION TABLE, FILL WITH ZEROES
;
; THE END OF THE FIRST SECTOR MUST CONTAIN THE TWO BYTE BOOT
; SIGNATURE.
; THE END OF THE FIRST SECTOR MUST CONTAIN THE TWO BYTE BOOT SIGNATURE.
;
BOOTSIG .DB $55,$AA ; STANDARD BOOT SIGNATURE
;
@ -184,7 +184,7 @@ BOOTSIG .DB $55,$AA ; STANDARD BOOT SIGNATURE
;
;----------------------------------------------------------------------------
;
.FILL 512,0 ; JUST FILL SECTOR WITH ZEROES
.FILL SEC_SIZE,0 ; JUST FILL SECTOR WITH ZEROES
;
;-------------------------------------------------------------------------------
; SECTOR 3
@ -193,36 +193,34 @@ BOOTSIG .DB $55,$AA ; STANDARD BOOT SIGNATURE
;
;----------------------------------------------------------------------------
;
.FILL 128 * 3,0 ; FIRST 384 BYTES ARE NOT YET DEFINED
.FILL (BLK_SIZE * 3),0 ; FIRST 384 BYTES ARE NOT YET DEFINED
;
; THE FOLLOWING TWO BYTES ARE AN ADDITIONAL SIGNATURE THAT IS VERIFIED BY
; SOME HARDWARE BIOSES.
;
PR_SIG .DB $5A,$A5 ; SIGNATURE GOES HERE
;
; FIRST CHUNK OF METADATA IMMEDIATELY FOLLOWS THE SIGNATURE BYTES
;
PR_PLATFORM .DB 0 ; PLATFORM ID (SEE STD.ASM)
PR_DEVICE .DB 0 ; ? (PROBABLY UNUSED)
PR_FORMATTER .DB 0,0,0,0,0,0,0,0 ; ? (PROBABLY UNUSED)
PR_DRIVE .DB 0 ; ? (PROBABLY UNUSED)
PR_LOG_UNIT .DW 0 ; ? (PROBABLY UNUSED)
;
; FILLER TO PLACE SECOND CHUNK OF METADATA AT THE END OF THE SECTOR
;
.FILL ((PREFIX_SIZE - METADATA_SIZE) - $),00H
.FILL (META_LOC - $),0
;
; SECOND CHUNK OF METADATA
; METADATA
;
PR_WP .DB 0 ; WRITE PROTECT BOOLEADN
PR_UPDSEQ .DW 0 ; PREFIX UPDATE SEQUENCE NUMBER (DEPRECATED?)
PR_VER .DB RMJ,RMN,RUP,RTP ; OS BUILD VERSION
PR_LABEL .DB "Unlabeled Drive ","$" ; DISK LABEL (EXACTLY 16 BYTES!!!)
.DW 0 ; DEPRECATED
PR_LDLOC .DW SYS_LOC ; ADDRESS TO START LOADING SYSTEM
PR_LDEND .DW SYS_END ; ADDRESS TO STOP LOADING SYSTEM
PR_ENTRY .DW SYS_ENT ; ADDRESS TO ENTER SYSTEM (OS)
PR_WP .DB 0 ; (1) WRITE PROTECT BOOLEAN
PR_UPDSEQ .DW 0 ; (2) PREFIX UPDATE SEQUENCE NUMBER (DEPRECATED?)
PR_VER .DB RMJ,RMN,RUP,RTP ; (4) OS BUILD VERSION
PR_LABEL .DB "Unlabeled Drive ","$" ; (17) DISK LABEL (EXACTLY 16 BYTES!!!)
.DW 0 ; (2) DEPRECATED
PR_LDLOC .DW SYS_LOC ; (2) ADDRESS TO START LOADING SYSTEM
PR_LDEND .DW SYS_END ; (2) ADDRESS TO STOP LOADING SYSTEM
PR_ENTRY .DW SYS_ENT ; (2) ADDRESS TO ENTER SYSTEM (OS)
;
#IF (META_SIZE != ($ - META_LOC))
.ECHO "META_SIZE VALUE IS WRONG!!!\r\n"
!!!
#ENDIF
;
#IF ($ != PREFIX_SIZE)
.ECHO "LOADER PREFIX IS WRONG SIZE!!!\r\n"
!!!
#ENDIF
;
.END
.END

Loading…
Cancel
Save