Browse Source

Merge branch 'master' into master

pull/459/head
Wayne Warthen 1 year ago
committed by GitHub
parent
commit
f61d96bf93
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 2
      Doc/ChangeLog.txt
  2. BIN
      Doc/RomWBW Applications.pdf
  3. BIN
      Doc/RomWBW Disk Catalog.pdf
  4. BIN
      Doc/RomWBW Errata.pdf
  5. BIN
      Doc/RomWBW System Guide.pdf
  6. BIN
      Doc/RomWBW User Guide.pdf
  7. 5
      ReadMe.md
  8. 5
      ReadMe.txt
  9. 4
      Source/Build.cmd
  10. 2
      Source/CBIOS/cbios.asm
  11. 106
      Source/Doc/Applications.md
  12. 3
      Source/Doc/ReadMe.md
  13. 113
      Source/Doc/SystemGuide.md
  14. 105
      Source/Doc/UserGuide.md
  15. 11
      Source/HBIOS/Build.cmd
  16. 2
      Source/HBIOS/Clean.cmd
  17. 18
      Source/HBIOS/Makefile
  18. 7
      Source/HBIOS/Makefile.new
  19. 11
      Source/HBIOS/SysConfig/Build.cmd
  20. 6
      Source/HBIOS/SysConfig/Clean.cmd
  21. 12
      Source/HBIOS/SysConfig/Makefile
  22. 21
      Source/HBIOS/SysConfig/README.md
  23. 45
      Source/HBIOS/hbios.asm
  24. 129
      Source/HBIOS/romldr.asm
  25. 20
      Source/HBIOS/sysconf.asm
  26. 2
      Source/HBIOS/usrrom.asm
  27. 1
      Source/Images/hd_bp.txt
  28. 1
      Source/Images/hd_cpm22.txt
  29. 1
      Source/Images/hd_cpm3.txt
  30. 1
      Source/Images/hd_nzcom.txt
  31. 1
      Source/Images/hd_qpm.txt
  32. 1
      Source/Images/hd_z3plus.txt
  33. 1
      Source/Images/hd_zpm3.txt
  34. 1
      Source/Images/hd_zsdos.txt
  35. 2
      Source/Makefile
  36. 2
      Source/TastyBasic/src/romwbwio.asm

2
Doc/ChangeLog.txt

@ -47,7 +47,7 @@ Version 3.5
- MAP: Significant improvement in Disk Catalog document
- MAP: Added Disk Image for the Z3PLUS (Z-System for CP/M-Plus) os.
- H?H: Fix XModem 12.3 WRERR to put CAN char in proper register to send.
- MAP: Initial NVRAM configuration infrastructure
- MAP: Initial NVRAM configuration infrastructure, and boot device selection.
Version 3.4
-----------

BIN
Doc/RomWBW Applications.pdf

Binary file not shown.

BIN
Doc/RomWBW Disk Catalog.pdf

Binary file not shown.

BIN
Doc/RomWBW Errata.pdf

Binary file not shown.

BIN
Doc/RomWBW System Guide.pdf

Binary file not shown.

BIN
Doc/RomWBW User Guide.pdf

Binary file not shown.

5
ReadMe.md

@ -3,7 +3,7 @@
**RomWBW ReadMe** \
Version 3.5 \
Wayne Warthen ([wwarthen@gmail.com](mailto:wwarthen@gmail.com)) \
08 Nov 2024
01 Dec 2024
# Overview
@ -200,7 +200,8 @@ let me know if I missed you!
- Mark Pruden has also contributed a great deal of content to the Disk
Catalog, User Guide as well as contributing the disk image for the
Z3PLUS operating system, and the COPYSL utility.
Z3PLUS operating system, the COPYSL utility, and also implemented
feature for RomWBW configuration by NVRAM.
- Jacques Pelletier has contributed the DS1501 RTC driver code.

5
ReadMe.txt

@ -1,6 +1,6 @@
RomWBW ReadMe
Wayne Warthen (wwarthen@gmail.com)
08 Nov 2024
01 Dec 2024
@ -201,7 +201,8 @@ let me know if I missed you!
- Mark Pruden has also contributed a great deal of content to the Disk
Catalog, User Guide as well as contributing the disk image for the
Z3PLUS operating system, and the COPYSL utility.
Z3PLUS operating system, the COPYSL utility, and also implemented
feature for RomWBW configuration by NVRAM.
- Jacques Pelletier has contributed the DS1501 RTC driver code.

4
Source/Build.cmd

@ -5,8 +5,8 @@ setlocal
call BuildProp || exit /b
call BuildShared || exit /b
call BuildBP || exit /b
call BuildROM %* || exit /b
call BuildImages || exit /b
call BuildROM %* || exit /b
call BuildZRC || exit /b
call BuildZ1RCC || exit /b
call BuildZZRCC || exit /b
@ -15,4 +15,4 @@ call BuildFZ80 || exit /b
if "%1" == "dist" (
call Clean || exit /b
)
)

2
Source/CBIOS/cbios.asm

@ -78,7 +78,7 @@ MEMTOP .EQU $10000
#INCLUDE "../UBIOS/ubios.inc"
#ENDIF
;
.ORG CBIOS_LOC ; DEFINED IN STD.ASM
.ORG CBIOS_LOC ; DEFINED IN LAYOUT.INC
;
STACK .EQU CBIOS_END ; USE SLACK SPACE FOR STACK AS NEEDED
;

106
Source/Doc/Applications.md

@ -384,6 +384,112 @@ protocol.
**`X`** - Exit the monitor program back to the main boot menu.
## RomWBW System Configuration
System Configuration (`SYSCONF`) is a utility that allows system configuration to
be set, dynamically and stored in NVRAM provided by an RTC chip.
(`SYSCONF`) is both a ROM application ('W' Menu option), and a CP/M utility.
Noting however the CP/M utility is not included on an disk image, it is found in
the `Binary/Applications` folder of the RomWBW distribution.
The $doc_user$ has additional information on the use of NVRAM to set your
system configuration.
### Basic Operation
The application is an interactive application it does not have command line syntax.
Instead commands are executed from within the application in a command line structure.
When you first start the (`SYSCONF`) utility it will display the current switches
followed by a command listing.
When you first run the (`SYSCONF`) utility the NVRAM will be uninitialised, and can
be initialised using the (R)eset command, which write default values to NVRAM.
Updates are done immediately to NVRAM as you enter them, i.e. there is no confirm
changes step. If you make an incorrect changes you simply need to enter a new
command to set the Switch value correctly.
Once a change has been made it is available, however may not take effect until
the next system reboot. This is dependent on the Switch itself.
If no NVRAM is provided by your hardware then running this application will just
report the missing hardware and exit immediately.
To exit from the application use the (Q)uit command.
### Commands and Syntax
The following are the accepted commands, unless otherwise specified a "Space"
character is used to delimit parameters in the command.
| Command | Argument(s) | Description |
|------------|------------------|-----------------------------------------------|
| (P)rint | -none- | Display a list of the current switch value(s) |
| (S)et | {SW} {val},... | Sets an Switch {SW} with specific values(s) |
| (R)eset | -none- | Reset all setting to default |
| (H)elp | {SW} | Provides help on the syntax (values) |
| (Q)uit | -none- | Exit the application |
**Where**
| Argument | Description |
|-----------|----------------------------------------------------------------------|
| {SW} | Switch ID, typically this is 2 character name to identify the switch |
| {val},... | a "Comma" separated list of values to set into the switch |
### Switch Options
#### Auto Boot (AB)
This switch will define if the system will perform auto boot at the RomWBW boot prompt.
Enabling this will not prevent a user from typing a boot command, so long as the timeout is not
exceeded. When configured this replaces the (`BOOT_DEFAULT`) variable
defined in build configuration.
Making changes to auto boot has no affect until the next reboot.
**Arguments**
| Type | Arguments | Description |
|----------|------------|--------------------------------------------------------|
| Enable | 'E' | Auto Boot. eg. "E,10" will auto boot, after 10 seconds |
| | Timout | Timeout in seconds in the range 0-15, 0 = immediate |
| Disabled | 'D' | No Auto Boot. e.g. "D" will disable autoboot |
**Examples**
| Command | Description |
|-----------------------|---------------------------------------------------|
| S AB E,10 | Enable Auto Boot with 10 second delay |
| S AB D | Disable Auto Boot |
#### Default Boot (DB)
This switch will define the default boot command to be executed when pressing enter
at the RomWBW boot prompt. When configured this replaces the (`BOOT_TIMEOUT`) variable
defined in build configuration.
Making changes to auto boot has no affect until the next reboot.
**Arguments**
| Type | Arguments | Description |
|------|------------------|----------------------------------------------------------|
| Disk | 'D' | Disk Boot. eg. "D,2,14" will boot, disk unit 2, slice 14 |
| | Disk Unit Number | Unit number in the range 0-127 |
| | Disk Slice | Slice in the range 0-255, use 0 for floppy boot |
| ROM | 'R' | ROM App. e.g. "R,M" will boot the Monitor App |
| | Rom App Name | single character used on the Menu to identify the app |
**Examples**
| Command | Description |
|-------------|----------------------------------------------------------|
| S DB D,2,14 | Set the default boot from Disk; Unit 2, Slice 14 |
| S DB R,M | Set the default boot to be the (M)onitor Rom Application |
## CP/M 2.2
This option will boot the CP/M 2.2 disk operating system

3
Source/Doc/ReadMe.md

@ -191,7 +191,8 @@ please let me know if I missed you!
* Mark Pruden has also contributed a great deal of content to the
Disk Catalog, User Guide as well as contributing the disk image
for the Z3PLUS operating system, and the COPYSL utility.
for the Z3PLUS operating system, the COPYSL utility, and also
implemented feature for RomWBW configuration by NVRAM.
* Jacques Pelletier has contributed the DS1501 RTC driver code.

113
Source/Doc/SystemGuide.md

@ -518,6 +518,77 @@ port IDE interface drivers.
Platforms supporting this option currently are the MBC, Duodyne and
latter version of the SBC.
# Configuration
## RomWBW NVRAM Configuration
On systems with RTC devices (that have Non-Volatile RAM), RomWBW supports storing
some limited configuration option options inside this RAM.
Several configuration options are currently supported; these are known as Switches.
The following switch ID's are defined, and described in sections below.
| Switch Number | Name | Description |
|---------------|--------------|-----------------------------------------------|
| 0x00 | -reserved- | Reserved |
| 0x01 | Default Boot | Default boot, either a Rom App or Disk Boot |
| 0x02 | -n/a- | -n/a- high order byte of previous switch |
| 0x03 | Auto Boot | Automatically boot enabled without user input |
| 0x04 - 0xFE | -future- | Future general usage |
| 0xFF | Status Reset | Get Status or Reset Switches to Default |
RomWBW uses bytes located at the start of RTC NVRAM, and includes a Parity check of
the bytes in NVRAM to check for authenticity before using the configuration.
| NVRAM Byte | Name | Description |
|-------------|--------------|-----------------------------------|
| 0x00 | Header Byte | Header Signature Byte 'W' |
| 0x01 - 0x03 | Switch Data | Actual Switch Data |
| 0x04 | Parity Check | Parity byte to check authenticity |
The above data is copied into the HBIOS Configuration Block (HCB) at startup at
the location starting at CB_SWITCHES.
### Default Boot (NVSW_DEFBOOT)
16 bit Switch defining the default Rom application or Disk device to boot.
| Bit 15 | Bits 14-8 | Bits 7-0 |
|-------------|-------------------|--------------------|
| 1 = Rom App | -undefined- | App to Boot (Char) |
| 0 = Disk | Disk Unit (0-127) | Disk Slice (0-255) |
### Auto Boot (NVSW_AUTOBOOT)
8 bit Switch defining if the system should auto boot at startup.
| Bits 7-6 | Bit 5 | Bit 4 | Bits 3-0 |
|----------|------------------------|----------|--------------------------------------|
| -unused- | 1 = Auto Boot Enabled | -unused- | 0 = Immediate Boot with no delay |
| -unused- | 1 = Auto Boot Enabled | -unused- | (1-15) Timeout (seconds) before boot |
| -unused- | 0 = Auto Boot Disabled | -unused- | -undefined- |
### Status Reset (0xFF)
The Status Reset switch is not a general purpose switch, it is a control mechanism
to allow the global status of all switches to be determined. The meaning of the switch
is different for Read (Get Status) and Write (Reset NVRAM)
#### GET (Get Status)
The read Get Status of switches. This returns very specific values from the function call.
| Status | A Register | Z / NZ Flag |
|----------------------------------------------|------------|--------------|
| NVRAM does not exist | A=0 | NZ flag set |
| NVRAM exists, but has not been initialised | A=1 | NZ flag set |
| NVRAM exists, and has been fully initialised | A='W' | Z flag set |
#### SET (Reset NVRAM)
Reset NVRAM to default values. This will wipe any existing data and set default
values into NVRAM.
# Driver Model
The framework code for bank switching also allows hardware drivers to be
@ -2630,6 +2701,27 @@ the caller can use interbank calls directly to the function in the
driver which bypasses the overhead of the normal function invocation
lookup.
#### SYSGET Subfunction 0xC0 -- Get Switches (SWITCH)
| **Entry Parameters** | **Returned Values** |
|----------------------|---------------------|
| B: 0xF8 | A: Status |
| C: 0xC0 | HL: Switch Value |
| D: Switch Key | |
This function will return the current value (HL) of the switch (D) from NVRAM.
Switches may be returned as a 16 bit (HL) or 8 bit (L) value. It is up to the caller
to process the returned value correctly. Note for Switch 0xFF (status) the returned value
is primarily in the Status (A) register.
Errors are signalled in the return by setting the NZ flag. When set the
(A) register may contain an error code, but this code does not conform to RomWBW standard
Success is indicated by setting the Z flag
For a description of switches please see [RomWBW NVRAM Configuration]
#### SYSGET Subfunction 0xD0 -- Get Timer Tick Count (TIMER)
| **Entry Parameters** | **Returned Values** |
@ -2802,6 +2894,27 @@ sub-function value. The following lists the subfunctions available along
with the registers/information utilized. The Status (A) is a standard
HBIOS result code.
#### SYSSET Subfunction 0xC0 -- Set Switches (SWITCH)
| **Entry Parameters** | **Returned Values** |
|----------------------|---------------------|
| B: 0xF9 | A: Status |
| C: 0xC0 | |
| D: Switch Key | |
| HL: Switch Value | |
This function will set the value (HL) into the switch (D) and store it into NVRAM.
Switches may be passed as a 16 bit (HL) or 8 bit (L) value. It is up to the caller
to send the value correctly. Note for Switch 0xFF (reset) the value (HL) is ignored
Errors are signalled in the return by setting the NZ flag. When set the
(A) register may contain an error code, but this code does not conform to RomWBW standard
Success is indicated by setting the Z flag
For a description of switches please see [RomWBW NVRAM Configuration]
#### SYSSET Subfunction 0xD0 -- Set Timer Tick Count (TIMER)
| **Entry Parameters** | **Returned Values** |

105
Source/Doc/UserGuide.md

@ -897,7 +897,56 @@ Boot [H=Help]: r
Restarting System...
```
### Changing Console and Console speed
### Setting NVRAM Options
On systems with RTC devices (that have Non-Volatile RAM), RomWBW supports storing
some limited configuration option options inside this NVRAM.
Several configuration options are currently supported, these are known as Switches
* Specify Automatic boot at startup, after an optional delay (AB)
* Define the Default Disk or ROM App to be booted at startup (DB)
RomWBW uses bytes located at the start of RTC NVRAM, and includes a Parity check of
the bytes in NVRAM to check for authenticity before using the configuration.
Initially NVRAM has to be reset (with default values), before it can be used.
As well as setting defaults, it also writes the correct parity, and allows the
NVRAM to be accessed and to store RomWBW config.
This is an explicit step that must be done, as any existing data stored is overitten.
If you are using NVRAM for other purposes then you can continue to do so
so long as you do NOT perform this Reset step.
NVRAM may also need to be reset in these circumstances
* When there has been a loss of power to the NVRAM.
* When upgrading to a new RomWBW version, or a RomWBW version that has new switches.
* If the NVRAM has been overitten by another application.
If you want to continue to use NVRAM in your applications you may want to consider storing
your data above the RomWBW Switch data.
To configure these options an inbuilt ROM application is provided which can be accessed
by the command "`W`" from the RomWBW boot menu.
This application is also built as a CP/M utility, but is not included on an disk image,
it is found in the `Binary/Applications` folder of the RomWBW distribution.
For further guidance on using this application please see the section
"RomWBW System Configuration" in the $doc_apps$ document.
If your system has both a [Front Panel] as well as NVRAM, be aware that
the Front Panel switches take precedence over the NVRAM configuration
settings.
Note that the WizNet class of Network devices also contain NVRAM which is
entirely separate from the RomWBW configuration NVRAM described here. A
separate utility is used to set the WizNet NVRAM (see [CP/NET Client Setup]).
[RomWBW Applications]($doc_root$/RomWBW Applications.pdf)
### Changing Console and Console Speed
Your system can support a number of devices for the console. They may
be VDU type devices or serial devices. If you want to change which
@ -2288,12 +2337,21 @@ survive re-imaging, you **must** follow these rules:
This section covers techniques to copy partial images onto pre-existing media,
in effect performing a selective slice copy. These techniques currently **only** apply to
hd1k formatted media, which has a convienient 1MB size metric.
However adapting to hd512 is possible.
hd1k formatted media, which has a convenient 1MB size metric.
However adapting to hd512 is possible, but left to the user.
On Linux/MacOS the `dd` command can be used to write data in a controlled manner.
The `dd` command supports options to define precisly souce
and destination offsets and sizes to copy.
Although Windows does not have a native `dd` command, there are multiple
options for installing it including [MSYS2](https://www.msys2.org/),
[CygWin](https://www.cygwin.com/),
and [dd for Windows](http://www.chrysocome.net/dd).
**WARNING**: The `dd` command is a low-level utility that writes
directly to raw disk sectors with almost no safety checks. It is very
easy to corrupt a disk if this tool is used incorrectly.
The `dd` command supports options to define precisely source
and destination offsets and sizes to copy.
From the documentation of `dd` the following options are important.
```
@ -2365,6 +2423,27 @@ and 1 is the size of the partition table im megabytes.
Thus we are skipping 6 slices (in the combo image)
and writing to the 7th slice.
#### Example 3 : Copy image using partition
In the previous examples, the hard disk is addressed as a raw disk
device and we took steps to calculate the assumed start of the RomWBW
partition. However, as long as the hd1k format is in use, it is
also possible to just point `dd` directly to the partition itself.
To do this, you must first determine the name that your operating
system is using for the desired partition. Frequently, partitions
are named by simply adding a number after the name of the hard disk
device. For example, if the hard disk is /dev/sdg, the first
partition is frequently /dev/sdg1 or /dev/sdgp1.
Taking advantage of this, it is safer and easier to calculate the
offset of a slice within the partition. It is simply the slice
number \* 8MB. Example 2 above, could now be performed as:
```
Binary % sudo dd if=hd1k_games.img of=/dev/sdg1 seek=48 bs=1M
```
# Operating Systems
One of the primary goals of RomWBW is to expose a set of generic
@ -4237,6 +4316,11 @@ ALIAS facility.
p-System has its own startup command processing mechanism that is
covered in the p-System documentation.
## NVRAM Configuration
See section [Setting NVRAM Options] for information about how to
apply NVRAM configuration.
## ROM Customization
The pre-built ROM images are configured for the basic capabilities of
@ -4269,6 +4353,14 @@ Note that the ROM customization process does not apply to UNA. All
UNA customization is performed within the ROM setup script that is
built into the ROM.
## ROM User Application
The User App is provided as a way to access a custom written
ROM application. In the pre-built ROMs, selecting User App will just
return to the Boot Loader menu. If you are interested in creating a
custom application to run instead, review the "usrrom.asm" file in the
Source/HBIOS folder of the distribution.
# UNA Hardware BIOS
John Coffman has produced a new generation of hardware BIOS called
@ -4678,7 +4770,8 @@ please let me know if I missed you!
* Mark Pruden has also contributed a great deal of content to the
Disk Catalog, User Guide as well as contributing the disk image
for the Z3PLUS operating system, and the COPYSL utility.
for the Z3PLUS operating system, the COPYSL utility, and also
implemented feature for RomWBW configuration by NVRAM.
* Jacques Pelletier has contributed the DS1501 RTC driver code.

11
Source/HBIOS/Build.cmd

@ -89,10 +89,9 @@ call :asm usrrom || exit /b
call :asm updater || exit /b
call :asm imgpad2 || exit /b
::
:: Build components in Sub folders
::
pushd SysConfig && call Build || exit /b & popd
:: Sysconf builds as both BIN and COM files
tasm -t%CPUType% -g3 -fFF -dROMWBW sysconf.asm sysconf.bin sysconf_bin.lst || exit /b
tasm -t%CPUType% -g3 -fFF -dCPM sysconf.asm sysconf.com sysconf_com.lst || exit /b
::
:: Create additional ROM bank images by assembling components into
@ -102,7 +101,7 @@ pushd SysConfig && call Build || exit /b & popd
::
copy /b romldr.bin + dbgmon.bin + ..\zsdos\zsys_wbw.bin + ..\cpm22\cpm_wbw.bin osimg.bin || exit /b
copy /b ..\Forth\camel80.bin + nascom.bin + ..\tastybasic\src\tastybasic.bin + game.bin + eastaegg.bin + netboot.mod + updater.bin + SysConfig\sysconfig.bin + usrrom.bin osimg1.bin || exit /b
copy /b ..\Forth\camel80.bin + nascom.bin + ..\tastybasic\src\tastybasic.bin + game.bin + eastaegg.bin + netboot.mod + updater.bin + sysconf.bin + usrrom.bin osimg1.bin || exit /b
if %Platform%==S100 (
zxcc slr180 -s100mon/fh
@ -158,6 +157,8 @@ if exist %ROMName%.rom copy %ROMName%.rom ..\..\Binary || exit /b
if exist %ROMName%.upd copy %ROMName%.upd ..\..\Binary || exit /b
if exist %ROMName%.com copy %ROMName%.com ..\..\Binary || exit /b
if exist sysconf.com copy sysconf.com ..\..\Binary\Apps\ || exit /b
goto :eof
::

2
Source/HBIOS/Clean.cmd

@ -16,5 +16,3 @@ if exist build.inc del build.inc
if exist font*.asm del font*.asm
if exist build_env.cmd del build_env.cmd
if exist hbios_env.cmd del hbios_env.cmd
pushd SysConfig && call Clean & popd

18
Source/HBIOS/Makefile

@ -3,11 +3,9 @@ MOREDIFF = game.bin hbios_rom.bin nascom.bin usrrom.bin \
dbgmon.bin hbios_app.bin imgpad2.bin osimg1.bin osimg2.bin romldr.bin \
eastaegg.bin hbios_img.bin osimg.bin game.bin updater.bin usrrom.bin
# SUBDIRS = SysConfig
DEST = ../../Binary
TOOLS =../../Tools
OTHERS = *.img *.rom *.com *.upd *.bin *.hex cpm.sys zsys.sys Build.inc font*.asm *.dat hbios_env.sh \
SysConfig/*.com SysConfig/*.bin SysConfig/*.lst
OTHERS = *.img *.rom *.com *.upd *.bin *.hex cpm.sys zsys.sys Build.inc font*.asm *.dat hbios_env.sh
# DIFFMAKE = 1
@ -34,7 +32,7 @@ else ifeq ($(CPUFAM),3)
TASM=$(BINDIR)/uz80as -t z280
endif
DEPS=prereq dbgmon.bin romldr.bin nascom.bin tastybasic.bin game.bin eastaegg.bin updater.bin usrrom.bin imgpad2.bin
DEPS=prereq dbgmon.bin romldr.bin nascom.bin tastybasic.bin game.bin eastaegg.bin updater.bin sysconf.bin sysconf.com usrrom.bin imgpad2.bin
ifeq ($(ROM_PLATFORM),UNA)
ROMDEPS=romldr.bin dbgmon.bin
@ -63,7 +61,7 @@ $(OBJECTS) : $(ROMDEPS)
@cat romldr.bin dbgmon.bin ../ZSDOS/zsys_$(BIOS).bin ../CPM22/cpm_$(BIOS).bin >osimg.bin
cat romldr.bin dbgmon.bin ../ZSDOS/zsys_$(BIOS).bin >osimg_small.bin
if [ $(ROM_PLATFORM) != UNA ] ; then \
cat camel80.bin nascom.bin tastybasic.bin game.bin eastaegg.bin netboot.mod updater.bin SysConfig/sysconfig.bin usrrom.bin >osimg1.bin ; \
cat camel80.bin nascom.bin tastybasic.bin game.bin eastaegg.bin netboot.mod updater.bin sysconf.bin usrrom.bin >osimg1.bin ; \
if [ $(ROM_PLATFORM) = S100 ] ; then \
cat s100mon.bin >osimg2.bin ; \
else \
@ -89,7 +87,7 @@ $(OBJECTS) : $(ROMDEPS)
fi \
fi
prereq: $(FONTS) camel80.bin tastybasic.bin syscon
prereq: $(FONTS) camel80.bin tastybasic.bin
font%.asm:
cp ../Fonts/$@ .
@ -97,8 +95,12 @@ font%.asm:
camel80.bin:
cp ../Forth/$@ .
syscon:
$(MAKE) --directory SysConfig
sysconf.bin:
@$(TASM) -dROMWBW sysconf.asm sysconf.bin sysconf_bin.lst
sysconf.com:
@$(TASM) -dCPM sysconf.asm sysconf.com sysconf_com.lst
cp $@ $(DEST)/Apps
s100mon.bin:
$(ZXCC) $(CPM)/SLR180 -s100mon/FH

7
Source/HBIOS/Makefile.new

@ -41,9 +41,6 @@ camel80.bin:
tastybasic.bin:
cp ../TastyBasic/src/$@ .
sysconfig.bin:
cp SysConfig/$@ .
s100mon.bin:
$(ZXCC) $(CPM)/SLR180 -s100mon/FH
$(ZXCC) $(CPM)/MLOAD25 -s100mon.bin=s100mon
@ -103,8 +100,8 @@ UNA_%.osimg.bin: UNA_%.romldr.bin UNA_%.dbgmon.bin
%.osimg_small.bin: %.romldr.bin %.dbgmon.bin
cat $(*F).romldr.bin $(*F).dbgmon.bin ../ZSDOS/zsys_wbw.bin >$@
%.osimg1.bin: camel80.bin %.nascom.bin tastybasic.bin %.game.bin %.eastaegg.bin netboot.mod %.updater.bin sysconfig.bin %.usrrom.bin
cat camel80.bin $(*F).nascom.bin tastybasic.bin $(*F).game.bin $(*F).eastaegg.bin netboot.mod $(*F).updater.bin sysconfig.bin $(*F).usrrom.bin >$@
%.osimg1.bin: camel80.bin %.nascom.bin tastybasic.bin %.game.bin %.eastaegg.bin netboot.mod %.updater.bin sysconf.bin %.usrrom.bin
cat camel80.bin $(*F).nascom.bin tastybasic.bin $(*F).game.bin $(*F).eastaegg.bin netboot.mod $(*F).updater.bin sysconf.bin $(*F).usrrom.bin >$@
srec_cat $@ -Binary -Crop 0 0x7FFF -Checksum_Negative_Big_Endian 0x7FFF 1 1 -o $@ -Binary
S100_%.imgpad2.bin: s100mon.bin

11
Source/HBIOS/SysConfig/Build.cmd

@ -1,11 +0,0 @@
@echo off
setlocal
set TOOLS=../../../Tools
set PATH=%TOOLS%\tasm32;%PATH%
set TASMTABS=%TOOLS%\tasm32
tasm -t80 -g3 -fFF -dCPM sysconfig.asm sysconfig.com sysconfig.lst || exit /b
tasm -t80 -g3 -fFF -dROMWBW sysconfig.asm sysconfig.bin sysconfig.lst || exit /b
copy /Y sysconfig.com ..\..\..\Binary\Apps\ || exit /b

6
Source/HBIOS/SysConfig/Clean.cmd

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

12
Source/HBIOS/SysConfig/Makefile

@ -1,12 +0,0 @@
OBJECTS = sysconfig.com sysconfig.bin
DEST = ../../../Binary/Apps
NOCOPY = sysconfig.bin
TOOLS = ../../../Tools
include $(TOOLS)/Makefile.inc
USETASM=1
sysconfig.bin: TASMFLAGS=-dROMWBW
sysconfig.com: TASMFLAGS=-dCPM

21
Source/HBIOS/SysConfig/README.md

@ -1,21 +0,0 @@
# System Configuration
## Introduction
An utility applicaton that sets NVR Attributes that affect HBIOS and
RomWBW Operation. Write to RTC NVRAM to store config is reliant on HBIOS
## Building
TASM (Telemark Assembler) ([Anderson, 1998](##References)).
### RomWBW Version
Is part of the SBCv2 RomWBW distribution. And deployed as a Rom Application
It is included in Rom Bank 1
### CP/M Version
The resulting `sysconfig.com` command file can be run in CP/M.
It is copied in the Binary/Apps folder.

45
Source/HBIOS/hbios.asm

@ -3407,7 +3407,7 @@ NVR_INIT:
JR NZ, NVR_INIT_DEF ; failed to correclty read data
;
CALL NVSW_CHECKSUM ; checksum calc into A
LD HL,CB_SWITCHCK ; address of HCB value
LD HL,CB_SWITCHCK ; address of HCB switch checksum value
CP (HL) ; compare Caculated Check, with hcb Check Value
JR Z,NVR_INIT_END ; The same so success
NVR_INIT_DEF:
@ -5711,14 +5711,9 @@ SYS_GETFN:
; HL: SWITCH VALUE 8/16 BIT
;
SYS_GETSWITCH:
; PUSH DE
; CALL NVSW_CONFIG ; make sure shadow copy is inited
; POP DE ;
; RET NZ ; Configuration Failed, thus cant continue
;
LD A,D
CP $FF ; test if want to just get NVRAM status
JP Z,NVSW_STATUS ; Check the Status - Call and Return
JR Z,SYS_GETSWITCH3 ; Check the Status - Call and Return
;
CALL SWITCH_RES ; D SWITCH NUMBER -> OUT HL address, E FLAGS
RET NZ ; IF NZ FLAG SET THEN ISSUE
@ -5736,6 +5731,20 @@ SYS_GETSWITCH2:
LD L,C
XOR A ; signal success
RET
;
; Return Status
; A=0 if NVRAM does not exist. with NZ flag set
; A=1 if NVRAM exists, not inited. with NZ flag set
; A='W' if NVRAM is fully inited. with Z flag set
;
; Note the NZ flag can be used to detect and return an error condition
; where the NVRAM is not fully initialised
;
SYS_GETSWITCH3:
LD A,(CB_SWITCHES) ; the status byte
CP 'W' ; set NZ based on A = W
RET
;
#IF ((CPUFAM == CPU_EZ80) & (EZ80TIMER == EZ80TMR_FIRM))
; IMPLEMENTED IN EZ80DRV.ASM
;
@ -5988,12 +5997,16 @@ SYS_SET:
; HL: SWITCH VALUE 8/16 BIT
;
SYS_SETSWITCH:
CALL NVSW_STATUS ; Check the status of NV RAM
RET NZ ; IF NZ then we cant continue, return NZ at this point
LD A,(CB_SWITCHES) ; Check the basic status of NV RAM
CP 0 ; no nv ram is present. ( if = 0 )
JR Z,SWITCH_RES1 ; then we cant continue, return NZ at this point
;
LD A,D ; switch # argument
CP $FF ; test if want to reset NVRAM
JP Z,NVSW_RESET ; then perform reset function. CALL AND RETURN
;
CALL SYS_GETSWITCH3 ; Check the Full status of NV RAM
RET NZ ; is not fully initialised, so return
;
LD B,H ; move value to write into BC
LD C,L
@ -7585,20 +7598,6 @@ Z2DMAADR2:
; ROUTINES FOR NON VOLITILE (NVRAM) SWITCHES
;--------------------------------------------------------------------------------------------------
;
; Return Status
; A=0 if no NVRAM exists. with NZ flag set
; A=1 if NVRAM is present. with Z flag set
; A='W' if NVRAM is fullly inited. with Z flag set
; Note the NZ flag can be used to detect and return an error condition
;
NVSW_STATUS:
LD A,(CB_SWITCHES) ; the status byte
LD B,A ; save it
AND 1 ; applies to 'W' and $01 status, -> 1
CP 1 ; set NZ based on A = 1
LD A,B ; return the
RET
;
; RESET CONTENTS OF NVRAM, STORING INTO
; RETURN NONZERO IF WRITTEN - ZERO IF NOT WRITTEN
;

129
Source/HBIOS/romldr.asm

@ -249,13 +249,89 @@ nofp:
;
#endif
;
;=======================================================================
; INITIALISE BOOT PROMPT (acmd_*) FROM CONFIG
;=======================================================================
#if (BIOS == BIOS_WBW)
;
; NVRAM AUTO BOOT CONFIGURATION
;
nvrswitch:
ld bc,BC_SYSGET_SWITCH ; HBIOS SysGet NVRAM Switches
ld d,$FF ; get NVR Status - Is NVRam initialised
rst 08
cp 'W' ; is NV RAM fully inited.
jr NZ,nonvrswitch ; NOT So - Skip the int from nvram
nvrsw_def:
;
call nl ; display message to indicate switches found
ld hl,str_nvswitches
call pstr
;
ld bc,BC_SYSGET_SWITCH ; HBIOS SysGet NVRAM Switches
ld d,NVSW_DEFBOOT ; Read Default Boot (disk/Rom) switch
rst 08
ld a,h
and DBOOT_ROM ; Get the Default Boot from ROM Flag
jr nz,nvrsw_rom ; IF Set as ROM App BOOT, otherwise Disk
;
nvrsw_disk:
ld a,h ; (H contains the Disk Unit 0-127)
ld (bootunit),a ; copy the NVRam Unit and Slice
ld a,l ; (L contains the boot slice 0-255)
ld (bootslice),a ; directly into the selected boot
ld l,'~' ; We use the "~" char to signal, DISK BOOT
; setting it a the auto cmd (string/char)
nvrsw_rom:
ld h,0 ; Clear high orer byte, leaving L intact
ld (acmd),hl ; Load the Character into auto command
; Thus (acma) = L (the boot character)
; (acma+1) = H=0 (string terminator)
nvrsw_auto:
ld bc,BC_SYSGET_SWITCH ; HBIOS SysGet NVRAM Switches
ld d,NVSW_AUTOBOOT ; GET Autoboot switch
rst 08
ld a,l
and ABOOT_AUTO ; Get the autoboot flag
jr z,prompt ; not set, so directly prompt
;
or $FF ; auto cmd active value
ld (acmd_act),a ; set the auto command active flag
;
ld a,l ; the low order byte from SWITCHES
and ABOOT_TIMEOUT ; Mask out the Timeout
ld b,a ; timeout to high order B.C byte -> x 256
xor a
ld c,a ; and clear low order C byte
srl b ; Shift 2 right by 2 bits -> /4
rr c
srl b
rr c ; BC should now contain timeout * 64
ld (acmd_to),bc ; save auto cmd timeout 64ths of second
;
jr initautoboot ; init auto boot from NVRAM, ignore Build Config
;
nonvrswitch:
; no NVRAM switches found, or disabled, continue process from Build Config
#endif
;
#if (BOOT_TIMEOUT != -1)
;
; BUILD CONFIGURATION
;
; Initialize auto command timeout downcounter
or $FF ; auto cmd active value
ld (acmd_act),a ; set flag
ld bc,BOOT_TIMEOUT * 100 ; hundredths of seconds
ld bc,BOOT_TIMEOUT * 64 ; 1/64's of a second
ld (acmd_to),bc ; save auto cmd timeout
; fall through and initialise Auto boot.
#endif
;
;=======================================================================
; INIT AUTO BOOT - If autoboot was detected.
;=======================================================================
;
initautoboot:
; If timeout is zero, boot auto command immediately
ld a,b ; check for
or c ; ... zero
@ -264,10 +340,30 @@ nofp:
ld hl,str_autoboot ; auto command prefix
call pstr ; show it
call autocmd ; handle w/o prompt
jr reprompt ; restart w/ autocmd disable
#endif
jp reprompt ; restart w/ autocmd disable
;
;=======================================================================
; BOOT PROMPT
;=======================================================================
;
prompt:
; if autboot is active, notify user as a reminder
ld a,(acmd_act) ; get auto cmd active flag
or a ; active?
jr z,prompt2 ; bypass message if not active
ld hl,str_autoact1 ; message part 1
call pstr ; display it
ld bc,(acmd_to) ; get timeout
rl c ; seconds value to B
rl b
rl c
rl b
ld a,b ; move it to A
call prtdecb ; display it
ld hl,str_autoact2 ; message part 2
call pstr ; display it
;
prompt2:
ld hl,reprompt ; adr of prompt restart routine
push hl ; put it on stack
call nl2 ; formatting
@ -319,7 +415,6 @@ wtkey:
#endif
#endif
;
#if (BOOT_TIMEOUT != -1)
; check for timeout and handle auto boot here
ld a,(acmd_act) ; get auto cmd active flag
or a ; set flags
@ -330,16 +425,15 @@ wtkey:
jr z,autocmd ; if so, handle it
dec bc ; decrement
ld (acmd_to),bc ; resave it
ld de,625 ; 16us * 625 = 10ms
call vdelay ; 10ms delay
#endif
ld de,976 ; 16us * 976 -> 1/64th of a second.
call vdelay ; 15.6ms delay, 64 in 1 second
;
jr wtkey ; loop
;
reprompt:
xor a ; zero accum
ld (acmd_act),a ; set auto cmd inactive
jr prompt ; back to loader prompt
jp prompt ; back to loader prompt
;
clrbuf:
ld hl,cmdbuf
@ -451,6 +545,9 @@ runcmd:
ld a,(de) ; get character
call upcase ; make upper case
;
; Auto Command (probably) from NVR default Disk Boot
CP '~' ; We use the "~" char to signal, DISK
JP Z,diskboot ; noting the - (bootunit) (bootslice) have inited.
; Attempt built-in commands
cp 'H' ; H = display help
jp z,help ; if so, do it
@ -2298,8 +2395,13 @@ str_err_api .db "Unexpected hardware BIOS API failure",0
acmd .db BOOT_DEFAULT ; auto cmd string
.db 0
acmd_len .equ $ - acmd ; len of auto cmd
acmd_act .db $FF ; auto cmd active
acmd_to .dw BOOT_TIMEOUT ; auto cmd timeout
acmd_act .dw $00 ; inactive by default
#if (BOOT_TIMEOUT > 0)
acmd_to .dw BOOT_TIMEOUT * 64 ; auto cmd timeout (1/64's of sec)
#else
acmd_to .dw BOOT_TIMEOUT ; auto cmd timeout -1 DISABLE, 0 IMMEDIATE
#endif
;
;=======================================================================
; Strings
@ -2308,6 +2410,8 @@ acmd_to .dw BOOT_TIMEOUT ; auto cmd timeout
str_banner .db PLATFORM_NAME," Boot Loader",0
str_appboot .db " (App Boot)",0
str_autoboot .db "AutoBoot: ",0
str_autoact1 .db "\r\n\r\nAutoBoot in ",0
str_autoact2 .db " Seconds...",0
str_prompt .db "Boot [H=Help]: ",0
str_bs .db bs,' ',bs,0
str_reboot .db "\r\n\r\nRestarting System...",0
@ -2420,8 +2524,8 @@ ra_ent .equ 12
#defcont .dw p8
;
; Note: The formatting of the following is critical. TASM does not pass
; macro arguments well. Ensure std.asm holds the definitions for *_LOC,
; *_SIZ *_END and any code generated which does not include std.asm is
; macro arguments well. Ensure LAYOUT.INC holds the definitions for *_LOC,
; *_SIZ *_END and any code generated which does not include LAYOUT.INC is
; synced.
;
; Note: The loadable ROM images are placed in ROM banks BID_IMG0 and
@ -2490,6 +2594,7 @@ str_user .db "User App",0
str_egg .db "",0
str_net .db "Network Boot",0
str_switches .db "FP Switches = 0x",0
str_nvswitches .db "NV Switches Found",0
newcon .db 0
newspeed .db 0
;

20
Source/HBIOS/SysConfig/sysconfig.asm → Source/HBIOS/sysconf.asm

@ -20,8 +20,8 @@
; Also Based on The Tasty Basic Configuration
; Utilitity function were also copied from RomLdr, Assign.
;
#include "../../ver.inc"
#include "../hbios.inc"
#include "../ver.inc"
#include "hbios.inc"
;
;=======================================================================
;
@ -33,7 +33,7 @@ NVR_LOC .equ 0100h
#ifdef ROMWBW
;
#define PLATFORM "ROMWBW"
#include "../layout.inc"
#include "layout.inc"
#endif
;
;=======================================================================
@ -152,6 +152,7 @@ main:
call prtstr
;
CALL PRT_STATUS ; PRINT STATUS
RET NZ ; status failed complely, SO EXIT
ld de,MSG_MENU ; Print the Main Menu
CALL prtstr
;
@ -274,10 +275,22 @@ PRT_STATUS:
; end individual stats
;
CALL prtcrlf
XOR A ; success
RET
;
; Error status handling
;
STAT_NOTFOUND:
CP 0 ; if status is ZERO then this is fatal
JR Z,STAT_NOTFOUND1
LD de,MSG_NOTF
CALL prtstr
XOR A ; success
RET
STAT_NOTFOUND1:
LD de,MSG_NONVR ; print failure status
CALL prtstr
OR $FF ; failure
RET
;
; ======================================================================
@ -500,6 +513,7 @@ MSG_PROMPT: .DB "\r\n"
.DB "$", 0
MSG_STAT: .DB "\r\nCurrent Configuration: ",0
MSG_NOTF: .DB "Config Not Found.\r\n",0
MSG_NONVR: .DB "NVRAM Not Found. Exiting.\r\n",0
MSG_QUESTION .DB "\r\n?\r\n",0
;
;MSG_PAK: .DB "\r\nPress Any Key ...",0

2
Source/HBIOS/usrrom.asm

@ -45,7 +45,7 @@ COLS .EQU 8 ; NUMBER OF PIXEL COLUMNS PER CHARACTER
;
; APPLICATION WILL WILL BE LOADED AT USR_LOC. THEREFORE, THE CODE
; MUST "ORG" AT THIS ADDRESS. TO CHANGE THE LOAD LOCATION OF THIS
; CODE, YOU CAN UPDATE USR_LOC IN STD.ASM.
; CODE, YOU CAN UPDATE USR_LOC IN LAYOUT.INC
;
.ORG USR_LOC
;

1
Source/Images/hd_bp.txt

@ -24,7 +24,6 @@
../../Binary/Apps/mode.com 15:
../../Binary/Apps/rtc.com 15:
../../Binary/Apps/survey.com 15:
../../Binary/Apps/sysconfig.com 15:
../../Binary/Apps/syscopy.com 15:
../../Binary/Apps/sysgen.com 15:
../../Binary/Apps/talk.com 15:

1
Source/Images/hd_cpm22.txt

@ -20,7 +20,6 @@ d_cpm22/ReadMe.txt 0:
../../Binary/Apps/mode.com 0:
../../Binary/Apps/rtc.com 0:
../../Binary/Apps/survey.com 0:
../../Binary/Apps/sysconfig.com 0:
../../Binary/Apps/syscopy.com 0:
../../Binary/Apps/sysgen.com 0:
../../Binary/Apps/talk.com 0:

1
Source/Images/hd_cpm3.txt

@ -39,7 +39,6 @@ d_cpm3/ReadMe.txt 0:
../../Binary/Apps/mode.com 0:
../../Binary/Apps/rtc.com 0:
../../Binary/Apps/survey.com 0:
../../Binary/Apps/sysconfig.com 0:
../../Binary/Apps/syscopy.com 0:
#../../Binary/Apps/sysgen.com 0:
#../../Binary/Apps/talk.com 0:

1
Source/Images/hd_nzcom.txt

@ -35,7 +35,6 @@ d_zsdos/u0/*.DAT 15:
../../Binary/Apps/mode.com 15:
../../Binary/Apps/rtc.com 15:
../../Binary/Apps/survey.com 15:
../../Binary/Apps/sysconfig.com 15:
../../Binary/Apps/syscopy.com 15:
../../Binary/Apps/sysgen.com 15:
../../Binary/Apps/talk.com 15:

1
Source/Images/hd_qpm.txt

@ -24,7 +24,6 @@ d_cpm22/u0/*.* 0:
../../Binary/Apps/mode.com 0:
../../Binary/Apps/rtc.com 0:
../../Binary/Apps/survey.com 0:
../../Binary/Apps/sysconfig.com 0:
../../Binary/Apps/syscopy.com 0:
../../Binary/Apps/sysgen.com 0:
../../Binary/Apps/talk.com 0:

1
Source/Images/hd_z3plus.txt

@ -46,7 +46,6 @@ d_cpm3/u0/HELP.HLP 0:
../../Binary/Apps/mode.com 15:
../../Binary/Apps/rtc.com 15:
../../Binary/Apps/survey.com 15:
../../Binary/Apps/sysconfig.com 15:
../../Binary/Apps/syscopy.com 15:
../../Binary/Apps/sysgen.com 15:
../../Binary/Apps/talk.com 15:

1
Source/Images/hd_zpm3.txt

@ -45,7 +45,6 @@ d_cpm3/u0/HELP.HLP 0:
../../Binary/Apps/mode.com 15:
../../Binary/Apps/rtc.com 15:
../../Binary/Apps/survey.com 15:
../../Binary/Apps/sysconfig.com 15:
../../Binary/Apps/syscopy.com 15:
../../Binary/Apps/sysgen.com 15:
../../Binary/Apps/talk.com 15:

1
Source/Images/hd_zsdos.txt

@ -24,7 +24,6 @@ d_cpm22/u0/*.* 0:
../../Binary/Apps/mode.com 0:
../../Binary/Apps/rtc.com 0:
../../Binary/Apps/survey.com 0:
../../Binary/Apps/sysconfig.com 0:
../../Binary/Apps/syscopy.com 0:
../../Binary/Apps/sysgen.com 0:
../../Binary/Apps/talk.com 0:

2
Source/Makefile

@ -7,7 +7,7 @@
.ONESHELL:
.SHELLFLAGS = -ce
all: prop shared bp rom images zrc z1rcc zzrcc zrc512 fz80
all: prop shared bp images rom zrc z1rcc zzrcc zrc512 fz80
doc:
$(MAKE) --directory Doc $(ACTION)

2
Source/TastyBasic/src/romwbwio.asm

@ -31,7 +31,7 @@ BF_SYSRES_WARM .equ 01h ; warm start
;*************************************************************
;
; THE FOLLOWING NEED MUST BE SYNCED WITH STD.ASM SO ROMLDR
; THE FOLLOWING NEED MUST BE SYNCED WITH LAYOUT.INC SO ROMLDR
; KNOWS WHERE THIS EXECUTES AT
;
;*************************************************************

Loading…
Cancel
Save