diff --git a/Doc/ChangeLog.txt b/Doc/ChangeLog.txt index 407f55e3..e9a2ca8b 100644 --- a/Doc/ChangeLog.txt +++ b/Doc/ChangeLog.txt @@ -12,6 +12,10 @@ Version 3.6 - WBW: Added boundary check to ram/rom disk driver - WBW: Per Peter Onion, switch KERMIT default file xfer mode to binary - J?L: Source for ZSDOS2 and BPBIOS Utilities (from disassembly) +- WBW: Support ROM-based font storage +- MAP: New Slice Inventory Rom App "S" display bootable slices, during boot +- MAP: Device Inventory moved from HBIOS to Rom App, saving >1k space in HBIOS +- MAP: Added disk image for all Infocom text adventure Games Version 3.5.1 ------------- diff --git a/Doc/Language/Cowgol Compiler Manual.pdf b/Doc/Language/Cowgol Compiler Manual.pdf new file mode 100644 index 00000000..4b36f201 Binary files /dev/null and b/Doc/Language/Cowgol Compiler Manual.pdf differ diff --git a/Doc/Language/ReadMe.txt b/Doc/Language/ReadMe.txt index 7041a4d9..bd6ad74c 100644 --- a/Doc/Language/ReadMe.txt +++ b/Doc/Language/ReadMe.txt @@ -23,10 +23,14 @@ Borland TurboPascal User Manual ("Turbo_Pascal_Version_3.0_Reference_Manual_1986 Official user manual Borland TurboPascal included in the pascal disk image. -Cowgol Lanaguage ("Cowgol Language.pdf") +The Cowgol Lanaguage ("The Cowgol Language.pdf") +Cowgol Compiler Manual ("Cowgol Compiler Manual.pdf") + -------------------------------------- -Documentation for Cowgol Language included in the cowgol disk image +Documentation for Cowgol Language included in the cowgol disk image. +The Cowgol Language describes the Cowgol Language itself while the +Cowgol Compiler Manual describes the compiler operation. HI-TECH C Compiler User Manual ("HI-TECH Z80 C Compiler Manual.txt") diff --git a/Doc/RomWBW Applications.pdf b/Doc/RomWBW Applications.pdf index 1a567ec7..d9e577b8 100644 Binary files a/Doc/RomWBW Applications.pdf and b/Doc/RomWBW Applications.pdf differ diff --git a/Doc/RomWBW Disk Catalog.pdf b/Doc/RomWBW Disk Catalog.pdf index 77520646..1f364cd2 100644 Binary files a/Doc/RomWBW Disk Catalog.pdf and b/Doc/RomWBW Disk Catalog.pdf differ diff --git a/Doc/RomWBW Hardware.pdf b/Doc/RomWBW Hardware.pdf index f5593ca8..6dc5fed5 100644 Binary files a/Doc/RomWBW Hardware.pdf and b/Doc/RomWBW Hardware.pdf differ diff --git a/Doc/RomWBW Introduction.pdf b/Doc/RomWBW Introduction.pdf index 981eb067..22e8838b 100644 Binary files a/Doc/RomWBW Introduction.pdf and b/Doc/RomWBW Introduction.pdf differ diff --git a/Doc/RomWBW System Guide.pdf b/Doc/RomWBW System Guide.pdf index f57b9883..4ca6592a 100644 Binary files a/Doc/RomWBW System Guide.pdf and b/Doc/RomWBW System Guide.pdf differ diff --git a/Doc/RomWBW User Guide.pdf b/Doc/RomWBW User Guide.pdf index e5f887da..888915c4 100644 Binary files a/Doc/RomWBW User Guide.pdf and b/Doc/RomWBW User Guide.pdf differ diff --git a/ReadMe.md b/ReadMe.md index 2366e6e1..a901941f 100644 --- a/ReadMe.md +++ b/ReadMe.md @@ -1,431 +1,433 @@ - - - - - - -**RomWBW Introduction** \ -Version 3.6 \ -Wayne Warthen ([wwarthen@gmail.com](mailto:wwarthen@gmail.com)) \ -19 Jun 2025 - -# Overview - -RomWBW software provides a complete, commercial quality implementation -of CP/M (and work-alike) operating systems and applications for modern -Z80/180/280 retro-computing hardware systems. - -A wide variety of platforms are supported including those produced by -these developer communities: - -- [RetroBrew Computers](https://www.retrobrewcomputers.org) - () -- [RC2014](https://rc2014.co.uk) (), - [RC2014-Z80](https://groups.google.com/g/rc2014-z80) - () -- [Retro Computing](https://groups.google.com/g/retro-comp) - () -- [Small Computer Central](https://smallcomputercentral.com/) - () - -A complete list of the currently supported platforms is found in [RomWBW -Hardware](https://github.com/wwarthen/RomWBW/raw/master/Doc/RomWBW%20Hardware.pdf) -. - -# Description - -## Primary Features - -By design, RomWBW isolates all of the hardware specific functions in the -ROM chip itself. The ROM provides a hardware abstraction layer such that -all of the operating systems and applications on a disk will run on any -RomWBW-based system. To put it simply, you can take a disk (or CF/SD/USB -Card) and move it between systems transparently. - -Supported hardware features of RomWBW include: - -- Z80 Family CPUs including Z80, Z180, and Z280 -- Banked memory services for several banking designs -- Disk drivers for RAM, ROM, Floppy, IDE ATA/ATAPI, CF, SD, USB, Zip, - Iomega -- Serial drivers including UART (16550-like), ASCI, ACIA, SIO -- Video drivers including TMS9918, SY6545, MOS8563, HD6445, Xosera -- Keyboard (PS/2) drivers via VT8242 or PPI interfaces -- Real time clock drivers including DS1302, BQ4845 -- Support for CP/NET networking using Wiznet, MT011 or Serial -- Built-in VT-100 terminal emulation support - -A dynamic disk drive letter assignment mechanism allows mapping -operating system drive letters to any available disk media. -Additionally, mass storage devices (IDE Disk, CF Card, SD Card, etc.) -support the use of multiple slices (up to 256 per device). Each slice -contains a complete CP/M filesystem and can be mapped independently to -any drive letter. This overcomes the inherent size limitations in legacy -OSes and allows up to 2GB of addressable storage on a single device, -with up to 128MB accessible at any one time. - -## Included Software - -Multiple disk images are provided in the distribution. Most disk images -contain a complete, bootable, ready-to-run implementation of a specific -operating system. A “combo” disk image contains multiple slices, each -with a full operating system implementation. If you use this disk image, -you can easily pick whichever operating system you want to boot without -changing media. - -Some of the included software: - -- Operating Systems (CP/M 2.2, ZSDOS, NZ-COM, CP/M 3, ZPM3, Z3PLUS, QPM - ) -- Support for other operating systems, p-System, FreeRTOS, and FUZIX. -- Programming Tools (Z80ASM, Turbo Pascal, Forth, Cowgol) -- C Compiler’s including Aztec-C, and HI-TECH C -- Microsoft Basic Compiler, and Microsoft Fortran -- Some games such as Colossal Cave, Zork, etc -- Wordstar Word processing software - -Some of the provided software can be launched directly from the ROM -firmware itself: - -- System Monitor -- Operating Systems (CP/M 2.2, ZSDOS) -- ROM BASIC (Nascom BASIC and Tasty BASIC) -- ROM Forth - -A tool is provided that allows you to access a FAT-12/16/32 filesystem. -The FAT filesystem may be coresident on the same disk media as RomWBW -slices or on stand-alone media. This makes exchanging files with modern -OSes such as Windows, MacOS, and Linux very easy. - -## ROM Distribution - -The [RomWBW Repository](https://github.com/wwarthen/RomWBW) -() on GitHub is the official -distribution location for all project source and documentation. - -RomWBW is distributed as both source code and pre-built ROM and disk -images. - -The pre-built ROM images distributed with RomWBW are based on the -default system configurations as determined by the hardware -provider/designer. The pre-built ROM firmware images are generally -suitable for most users. - -The fully-built distribution releases are available on the [RomWBW -Releases Page](https://github.com/wwarthen/RomWBW/releases) -() of the repository. - -On this page, you will normally see a Development Snapshot as well as -recent stable releases. Unless you have a specific reason, I suggest you -stick to the most recent stable release. - -The asset named RomWBW-vX.X.X-Package.zip includes all pre-built ROM and -Disk images as well as full source code. The other assets contain only -source code and do not have the pre-built ROM or disk images. - -#### Distribution Directory Layout - -The RomWBW distribution is a compressed zip archive file organized in a -set of directories. Each of these directories has its own ReadMe.txt -file describing the contents in detail. In summary, these directories -are: - -| **Directory** | **Description** | -|----|----| -| **Binary** | The final output files of the build process are placed here. Most importantly, the ROM images with the file names ending in “.rom” and disk images ending in .img. | -| **Doc** | Contains various detailed documentation, both RomWBW specifically as well as the operating systems and applications. | -| **Source** | Contains the source code files used to build the software and ROM images. | -| **Tools** | Contains the programs that are used by the build process or that may be useful in setting up your system. | - -#### Building from Source - -It is also very easy to modify and build custom ROM images that fully -tailor the firmware to your specific preferences. All tools required to -build custom ROM firmware under Windows are included – no need to -install assemblers, etc. The firmware can also be built using Linux or -MacOS after confirming a few standard tools have been installed. - -## Installation & Operation - -In general, installation of RomWBW on your platform is very simple. You -just need to program your ROM with the correct ROM image from the RomWBW -distribution. Subsequently, you can write disk images on your disk -drives (IDE disk, CF Card, SD Card, etc.) which then provides even more -functionality. - -Complete instructions for installation and operation of RomWBW are found -in the [RomWBW User -Guide](https://github.com/wwarthen/RomWBW/raw/master/Doc/RomWBW%20User%20Guide.pdf). -It is also a good idea to review the [Release -Notes](https://github.com/wwarthen/RomWBW/blob/master/RELEASE_NOTES.md) -for helpful release-specific information. - -## Documentation - -There are several documents that form the core of the RomWBW -documentation: - -- [RomWBW User - Guide](https://github.com/wwarthen/RomWBW/raw/master/Doc/RomWBW%20User%20Guide.pdf) - is the main user guide for RomWBW, it covers the major topics of how - to install, manage and use RomWBW, and includes additional guidance to - the use of some of the operating systems supported by RomWBW - -- [RomWBW - Hardware](https://github.com/wwarthen/RomWBW/raw/master/Doc/RomWBW%20Hardware.pdf) - contains a description of all the hardware platforms, and devices - supported by RomWBW. - -- [RomWBW - Applications](https://github.com/wwarthen/RomWBW/raw/master/Doc/RomWBW%20Applications.pdf) - is a reference for the ROM-hosted and OS-hosted applications created - or customized to enhance the operation of RomWBW. - -- [RomWBW Disk - Catalog](https://github.com/wwarthen/RomWBW/raw/master/Doc/RomWBW%20Disk%20Catalog.pdf) - is a reference for the contents of the disk images provided with - RomWBW, with a description of many of the files on each image - -- [RomWBW System - Guide](https://github.com/wwarthen/RomWBW/raw/master/Doc/RomWBW%20System%20Guide.pdf) - discusses much of the internal design and construction of RomWBW. It - includes a reference for the RomWBW HBIOS API functions. - -An online HTML version of this documentation is hosted at -. - -Each of the operating systems and ROM applications included with RomWBW -are sophisticated tools in their own right. It is not reasonable to -fully document their usage. However, you will find complete manuals in -PDF format in the Doc directory of the distribution. The intention of -this documentation is to describe the operation of RomWBW and the ways -in which it enhances the operation of the included applications and -operating systems. - -Since RomWBW is purely a software product for many different platforms, -the documentation does **not** cover hardware construction, -configuration, or troubleshooting – please see your hardware provider -for this information. - -# Support - -## Getting Assistance - -The best way to get assistance with RomWBW or any aspect of the -RetroBrew Computers projects is via one of the community forums: - -- [RetroBrew Computers Forum](https://www.retrobrewcomputers.org/forum/) -- [RC2014 Google - Group](https://groups.google.com/forum/#!forum/rc2014-z80) -- [retro-comp Google - Group](https://groups.google.com/forum/#!forum/retro-comp) - -Submission of issues and bugs are welcome at the [RomWBW GitHub -Repository](https://github.com/wwarthen/RomWBW). - -Also feel free to email Wayne Warthen at . I am -happy to provide support adapting RomWBW to new or modified systems - -# Contributions - -All source code and distributions are maintained on GitHub. -Contributions of all kinds to RomWBW are very welcome. - -## Acknowledgments - -I want to acknowledge that a great deal of the code and inspiration for -RomWBW has been provided by or derived from the work of others in the -RetroBrew Computers Community. I sincerely appreciate all of their -contributions. The list below is probably missing many names – please -let me know if I missed you! - -- Andrew Lynch started it all when he created the N8VEM Z80 SBC which - became the first platform RomWBW supported. Some of his original code - can still be found in RomWBW. - -- Dan Werner wrote much of the code from which RomWBW was originally - derived and he has always been a great source of knowledge and advice. - -- Douglas Goodall contributed code, time, testing, and advice in “the - early days”. He created an entire suite of application programs to - enhance the use of RomWBW. Unfortunately, they have become unusable - due to internal changes within RomWBW. As of RomWBW 2.6, these - applications are no longer provided. - -- Sergey Kiselev created several hardware platforms for RomWBW including - the very popular Zeta. - -- David Giles created support for the Z180 CSIO which is now included SD - Card driver. - -- Phil Summers contributed the Forth and BASIC adaptations in ROM, the - AY-3-8910 sound driver, DMA support, and a long list of general code - and documentation enhancements. - -- Ed Brindley contributed some of the code that supports the RCBus - platform. - -- Spencer Owen created the RC2014 series of hobbyist kit computers which - has exponentially increased RomWBW usage. Some of his kits include - RomWBW. - -- Stephen Cousins has likewise created a series of hobbyist kit - computers at Small Computer Central and is distributing RomWBW with - many of them. - -- Alan Cox has contributed some driver code and has provided a great - deal of advice. - -- The CP/NET client files were developed by Douglas Miller. - -- Phillip Stevens contributed support for FreeRTOS. - -- Curt Mayer contributed the original Linux / MacOS build process. - -- UNA BIOS and FDISK80 are the products of John Coffman. - -- FLASH4 is a product of Will Sowerbutts. - -- CLRDIR is a product of Max Scane. - -- Tasty Basic is a product of Dimitri Theulings. - -- Dean Netherton contributed eZ80 CPU support, the sound driver - interface, and the SN76489 sound driver. - -- The RomWBW Disk Catalog document was produced by Mykl Orders. - -- Rob Prouse has created many of the supplemental disk images including - Aztec C, HiTech C, SLR Z80ASM, Turbo Pascal, Microsoft BASIC Compiler, - Microsoft Fortran Compiler, and a Games compendium. - -- Martin R has provided substantial help reviewing and improving the - User Guide and Applications documents. - -- Mark Pruden has made a wide variety of contributions including: - - - significant content in the Disk Catalog and User Guide - - creation of the Introduction and Hardware documents - - Z3PLUS operating system disk image - - COPYSL utility - - SLABEL utility - - a feature for RomWBW configuration by NVRAM - - the /B bulk mode of disk assignment to the ASSIGN utility - -- Jacques Pelletier has contributed the DS1501 RTC driver code. - -- Jose Collado has contributed enhancements to the TMS driver including - compatibility with standard TMS register configuration. - -- Kevin Boone has contributed a generic HBIOS date/time utility (WDATE). - -- Matt Carroll has contributed a fix to XM.COM that corrects the port - specification when doing a send. - -- Dean Jenkins enhanced the build process to accommodate the Raspberry - Pi 4. - -- Tom Plano has contributed a new utility (HTALK) to allow talking - directly to HBIOS COM ports. - -- Lars Nelson has contributed several generic utilities such as a - universal (OS agnostic) UNARC application. - -- Dylan Hall added support for specifying a secondary console. - -- Bill Shen has contributed boot loaders for several of his systems. - -- Laszlo Szolnoki has contributed an EF9345 video display controller - driver. - -- Ladislau Szilagyi has contributed an enhanced version of CP/M Cowgol - that leverages RomWBW memory banking. - -- Les Bird has contributed support for the NABU w/ Option Board - -- Rob Gowin created an online documentation site via MkDocs, and - contributed a driver for the Xosera FPGA-based video controller. - -- Jörg Linder has contributed disassembled and nicely commented source - for ZSDOS2 and the BPBIOS utilities. - -## Related Projects - -Outside of the hardware platforms adapted to RomWBW, there are a variety -of projects that either target RomWBW specifically or provide a -RomWBW-specific variation. These efforts are greatly appreciated and are -listed below. Please contact the author if there are any other such -projects that are not listed. - -#### Z88DK - -Z88DK is a software powerful development kit for Z80 computers -supporting both C and assembly language. This kit now provides specific -library support for RomWBW HBIOS. The Z88DK project is hosted at -. - -#### Paleo Editor - -Steve Garcia has created a Windows-hosted IDE that is tailored to -development of RomWBW. The project can be found at -. - -#### Z80 fig-FORTH - -Dimitri Theulings’ implementation of fig-FORTH for the Z80 has a -RomWBW-specific variant. The project is hosted at -. - -#### Assembly Language Programming for the RC2014 Zed - -Bruce Hall has written a very nice document that describes how to -develop assembly language applications on RomWBW. It begins with the -setup and configuration of a new RC2014 Zed system running RomWBW. It -describes not only generic CP/M application development, but also RomWBW -HBIOS programming and bare metal programming. The latest copy of this -document is hosted at [http://w8bh.net/Assembly for -RC2014Z.pdf](http://w8bh.net/Assembly%20for%20RC2014Z.pdf). - -# Licensing - -## License Terms - -RomWBW is free software: you can redistribute it and/or modify it under -the terms of the GNU General Public License as published by the Free -Software Foundation, either version 3 of the License, or (at your -option) any later version. - -RomWBW is distributed in the hope that it will be useful, but WITHOUT -ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for -more details. - -You should have received a copy of the GNU General Public License along -with RomWBW. If not, see . - -Portions of RomWBW were created by, contributed by, or derived from the -work of others. It is believed that these works are being used in -accordance with the intentions and/or licensing of their creators. - -If anyone feels their work is being used outside of its intended -licensing, please notify: - -> Wayne Warthen -> - -RomWBW is an aggregate work. It is composed of many individual, -standalone programs that are distributed as a whole to function as a -cohesive system. Each program may have its own licensing which may be -different from other programs within the aggregate. - -In some cases, a single program (e.g., CP/M Operating System) is -composed of multiple components with different licenses. It is believed -that in all such cases the licenses are compatible with GPL version 3. - -RomWBW encourages code contributions from others. Contributors may -assert their own copyright in their contributions by annotating the -contributed source code appropriately. Contributors are further -encouraged to submit their contributions via the RomWBW source code -control system to ensure their contributions are clearly documented. - -All contributions to RomWBW are subject to this license. + + + + + + +**RomWBW Introduction** \ +Version 3.6 \ +Wayne Warthen ([wwarthen@gmail.com](mailto:wwarthen@gmail.com)) \ +06 Jul 2025 + +# Overview + +RomWBW software provides a complete, commercial quality implementation +of CP/M (and work-alike) operating systems and applications for modern +Z80/180/280 retro-computing hardware systems. + +A wide variety of platforms are supported including those produced by +these developer communities: + +- [RetroBrew Computers](https://www.retrobrewcomputers.org) + () +- [RC2014](https://rc2014.co.uk) (), + [RC2014-Z80](https://groups.google.com/g/rc2014-z80) + () +- [Retro Computing](https://groups.google.com/g/retro-comp) + () +- [Small Computer Central](https://smallcomputercentral.com/) + () + +A complete list of the currently supported platforms is found in [RomWBW +Hardware](https://github.com/wwarthen/RomWBW/raw/master/Doc/RomWBW%20Hardware.pdf) +. + +# Description + +## Primary Features + +By design, RomWBW isolates all of the hardware specific functions in the +ROM chip itself. The ROM provides a hardware abstraction layer such that +all of the operating systems and applications on a disk will run on any +RomWBW-based system. To put it simply, you can take a disk (or CF/SD/USB +Card) and move it between systems transparently. + +Supported hardware features of RomWBW include: + +- Z80 Family CPUs including Z80, Z180, and Z280 +- Banked memory services for several banking designs +- Disk drivers for RAM, ROM, Floppy, IDE ATA/ATAPI, CF, SD, USB, Zip, + Iomega +- Serial drivers including UART (16550-like), ASCI, ACIA, SIO +- Video drivers including TMS9918, SY6545, MOS8563, HD6445, Xosera +- Keyboard (PS/2) drivers via VT8242 or PPI interfaces +- Real time clock drivers including DS1302, BQ4845 +- Support for CP/NET networking using Wiznet, MT011 or Serial +- Built-in VT-100 terminal emulation support + +A dynamic disk drive letter assignment mechanism allows mapping +operating system drive letters to any available disk media. +Additionally, mass storage devices (IDE Disk, CF Card, SD Card, etc.) +support the use of multiple slices (up to 256 per device). Each slice +contains a complete CP/M filesystem and can be mapped independently to +any drive letter. This overcomes the inherent size limitations in legacy +OSes and allows up to 2GB of addressable storage on a single device, +with up to 128MB accessible at any one time. + +## Included Software + +Multiple disk images are provided in the distribution. Most disk images +contain a complete, bootable, ready-to-run implementation of a specific +operating system. A “combo” disk image contains multiple slices, each +with a full operating system implementation. If you use this disk image, +you can easily pick whichever operating system you want to boot without +changing media. + +Some of the included software: + +- Operating Systems (CP/M 2.2, ZSDOS, NZ-COM, CP/M 3, ZPM3, Z3PLUS, QPM + ) +- Support for other operating systems, p-System, FreeRTOS, and FUZIX. +- Programming Tools (Z80ASM, Turbo Pascal, Forth, Cowgol) +- C Compiler’s including Aztec-C, and HI-TECH C +- Microsoft Basic Compiler, and Microsoft Fortran +- Some games such as Colossal Cave, Zork, etc +- Wordstar Word processing software + +Some of the provided software can be launched directly from the ROM +firmware itself: + +- System Monitor +- Operating Systems (CP/M 2.2, ZSDOS) +- ROM BASIC (Nascom BASIC and Tasty BASIC) +- ROM Forth + +A tool is provided that allows you to access a FAT-12/16/32 filesystem. +The FAT filesystem may be coresident on the same disk media as RomWBW +slices or on stand-alone media. This makes exchanging files with modern +OSes such as Windows, MacOS, and Linux very easy. + +## ROM Distribution + +The [RomWBW Repository](https://github.com/wwarthen/RomWBW) +() on GitHub is the official +distribution location for all project source and documentation. + +RomWBW is distributed as both source code and pre-built ROM and disk +images. + +The pre-built ROM images distributed with RomWBW are based on the +default system configurations as determined by the hardware +provider/designer. The pre-built ROM firmware images are generally +suitable for most users. + +The fully-built distribution releases are available on the [RomWBW +Releases Page](https://github.com/wwarthen/RomWBW/releases) +() of the repository. + +On this page, you will normally see a Development Snapshot as well as +recent stable releases. Unless you have a specific reason, I suggest you +stick to the most recent stable release. + +The asset named RomWBW-vX.X.X-Package.zip includes all pre-built ROM and +Disk images as well as full source code. The other assets contain only +source code and do not have the pre-built ROM or disk images. + +#### Distribution Directory Layout + +The RomWBW distribution is a compressed zip archive file organized in a +set of directories. Each of these directories has its own ReadMe.txt +file describing the contents in detail. In summary, these directories +are: + +| **Directory** | **Description** | +|----|----| +| **Binary** | The final output files of the build process are placed here. Most importantly, the ROM images with the file names ending in “.rom” and disk images ending in .img. | +| **Doc** | Contains various detailed documentation, both RomWBW specifically as well as the operating systems and applications. | +| **Source** | Contains the source code files used to build the software and ROM images. | +| **Tools** | Contains the programs that are used by the build process or that may be useful in setting up your system. | + +#### Building from Source + +It is also very easy to modify and build custom ROM images that fully +tailor the firmware to your specific preferences. All tools required to +build custom ROM firmware under Windows are included – no need to +install assemblers, etc. The firmware can also be built using Linux or +MacOS after confirming a few standard tools have been installed. + +## Installation & Operation + +In general, installation of RomWBW on your platform is very simple. You +just need to program your ROM with the correct ROM image from the RomWBW +distribution. Subsequently, you can write disk images on your disk +drives (IDE disk, CF Card, SD Card, etc.) which then provides even more +functionality. + +Complete instructions for installation and operation of RomWBW are found +in the [RomWBW User +Guide](https://github.com/wwarthen/RomWBW/raw/master/Doc/RomWBW%20User%20Guide.pdf). +It is also a good idea to review the [Release +Notes](https://github.com/wwarthen/RomWBW/blob/master/RELEASE_NOTES.md) +for helpful release-specific information. + +## Documentation + +There are several documents that form the core of the RomWBW +documentation: + +- [RomWBW User + Guide](https://github.com/wwarthen/RomWBW/raw/master/Doc/RomWBW%20User%20Guide.pdf) + is the main user guide for RomWBW, it covers the major topics of how + to install, manage and use RomWBW, and includes additional guidance to + the use of some of the operating systems supported by RomWBW + +- [RomWBW + Hardware](https://github.com/wwarthen/RomWBW/raw/master/Doc/RomWBW%20Hardware.pdf) + contains a description of all the hardware platforms, and devices + supported by RomWBW. + +- [RomWBW + Applications](https://github.com/wwarthen/RomWBW/raw/master/Doc/RomWBW%20Applications.pdf) + is a reference for the ROM-hosted and OS-hosted applications created + or customized to enhance the operation of RomWBW. + +- [RomWBW Disk + Catalog](https://github.com/wwarthen/RomWBW/raw/master/Doc/RomWBW%20Disk%20Catalog.pdf) + is a reference for the contents of the disk images provided with + RomWBW, with a description of many of the files on each image + +- [RomWBW System + Guide](https://github.com/wwarthen/RomWBW/raw/master/Doc/RomWBW%20System%20Guide.pdf) + discusses much of the internal design and construction of RomWBW. It + includes a reference for the RomWBW HBIOS API functions. + +An online HTML version of this documentation is hosted at +. + +Each of the operating systems and ROM applications included with RomWBW +are sophisticated tools in their own right. It is not reasonable to +fully document their usage. However, you will find complete manuals in +PDF format in the Doc directory of the distribution. The intention of +this documentation is to describe the operation of RomWBW and the ways +in which it enhances the operation of the included applications and +operating systems. + +Since RomWBW is purely a software product for many different platforms, +the documentation does **not** cover hardware construction, +configuration, or troubleshooting – please see your hardware provider +for this information. + +# Support + +## Getting Assistance + +The best way to get assistance with RomWBW or any aspect of the +RetroBrew Computers projects is via one of the community forums: + +- [RetroBrew Computers Forum](https://www.retrobrewcomputers.org/forum/) +- [RC2014 Google + Group](https://groups.google.com/forum/#!forum/rc2014-z80) +- [retro-comp Google + Group](https://groups.google.com/forum/#!forum/retro-comp) + +Submission of issues and bugs are welcome at the [RomWBW GitHub +Repository](https://github.com/wwarthen/RomWBW). + +Also feel free to email Wayne Warthen at . I am +happy to provide support adapting RomWBW to new or modified systems + +# Contributions + +All source code and distributions are maintained on GitHub. +Contributions of all kinds to RomWBW are very welcome. + +## Acknowledgments + +I want to acknowledge that a great deal of the code and inspiration for +RomWBW has been provided by or derived from the work of others in the +RetroBrew Computers Community. I sincerely appreciate all of their +contributions. The list below is probably missing many names – please +let me know if I missed you! + +- Andrew Lynch started it all when he created the N8VEM Z80 SBC which + became the first platform RomWBW supported. Some of his original code + can still be found in RomWBW. + +- Dan Werner wrote much of the code from which RomWBW was originally + derived and he has always been a great source of knowledge and advice. + +- Douglas Goodall contributed code, time, testing, and advice in “the + early days”. He created an entire suite of application programs to + enhance the use of RomWBW. Unfortunately, they have become unusable + due to internal changes within RomWBW. As of RomWBW 2.6, these + applications are no longer provided. + +- Sergey Kiselev created several hardware platforms for RomWBW including + the very popular Zeta. + +- David Giles created support for the Z180 CSIO which is now included SD + Card driver. + +- Phil Summers contributed the Forth and BASIC adaptations in ROM, the + AY-3-8910 sound driver, DMA support, and a long list of general code + and documentation enhancements. + +- Ed Brindley contributed some of the code that supports the RCBus + platform. + +- Spencer Owen created the RC2014 series of hobbyist kit computers which + has exponentially increased RomWBW usage. Some of his kits include + RomWBW. + +- Stephen Cousins has likewise created a series of hobbyist kit + computers at Small Computer Central and is distributing RomWBW with + many of them. + +- Alan Cox has contributed some driver code and has provided a great + deal of advice. + +- The CP/NET client files were developed by Douglas Miller. + +- Phillip Stevens contributed support for FreeRTOS. + +- Curt Mayer contributed the original Linux / MacOS build process. + +- UNA BIOS and FDISK80 are the products of John Coffman. + +- FLASH4 is a product of Will Sowerbutts. + +- CLRDIR is a product of Max Scane. + +- Tasty Basic is a product of Dimitri Theulings. + +- Dean Netherton contributed eZ80 CPU support, the sound driver + interface, and the SN76489 sound driver. + +- The RomWBW Disk Catalog document was produced by Mykl Orders. + +- Rob Prouse has created many of the supplemental disk images including + Aztec C, HiTech C, SLR Z80ASM, Turbo Pascal, Microsoft BASIC Compiler, + Microsoft Fortran Compiler, and a Games compendium. + +- Martin R has provided substantial help reviewing and improving the + User Guide and Applications documents. + +- Mark Pruden has made a wide variety of contributions including: + + - significant content in the Disk Catalog and User Guide + - creation of the Introduction and Hardware documents + - Z3PLUS operating system disk image + - Infocom text adventure game disk image + - COPYSL, and SLABEL utilities + - Display of bootable slices via “S” command during startup + - Optimisations of HBIOS and CBIOS to reduce overall code size + - a feature for RomWBW configuration by NVRAM + - the /B bulk mode of disk assignment to the ASSIGN utility + +- Jacques Pelletier has contributed the DS1501 RTC driver code. + +- Jose Collado has contributed enhancements to the TMS driver including + compatibility with standard TMS register configuration. + +- Kevin Boone has contributed a generic HBIOS date/time utility (WDATE). + +- Matt Carroll has contributed a fix to XM.COM that corrects the port + specification when doing a send. + +- Dean Jenkins enhanced the build process to accommodate the Raspberry + Pi 4. + +- Tom Plano has contributed a new utility (HTALK) to allow talking + directly to HBIOS COM ports. + +- Lars Nelson has contributed several generic utilities such as a + universal (OS agnostic) UNARC application. + +- Dylan Hall added support for specifying a secondary console. + +- Bill Shen has contributed boot loaders for several of his systems. + +- Laszlo Szolnoki has contributed an EF9345 video display controller + driver. + +- Ladislau Szilagyi has contributed an enhanced version of CP/M Cowgol + that leverages RomWBW memory banking. + +- Les Bird has contributed support for the NABU w/ Option Board + +- Rob Gowin created an online documentation site via MkDocs, and + contributed a driver for the Xosera FPGA-based video controller. + +- Jörg Linder has contributed disassembled and nicely commented source + for ZSDOS2 and the BPBIOS utilities. + +## Related Projects + +Outside of the hardware platforms adapted to RomWBW, there are a variety +of projects that either target RomWBW specifically or provide a +RomWBW-specific variation. These efforts are greatly appreciated and are +listed below. Please contact the author if there are any other such +projects that are not listed. + +#### Z88DK + +Z88DK is a software powerful development kit for Z80 computers +supporting both C and assembly language. This kit now provides specific +library support for RomWBW HBIOS. The Z88DK project is hosted at +. + +#### Paleo Editor + +Steve Garcia has created a Windows-hosted IDE that is tailored to +development of RomWBW. The project can be found at +. + +#### Z80 fig-FORTH + +Dimitri Theulings’ implementation of fig-FORTH for the Z80 has a +RomWBW-specific variant. The project is hosted at +. + +#### Assembly Language Programming for the RC2014 Zed + +Bruce Hall has written a very nice document that describes how to +develop assembly language applications on RomWBW. It begins with the +setup and configuration of a new RC2014 Zed system running RomWBW. It +describes not only generic CP/M application development, but also RomWBW +HBIOS programming and bare metal programming. The latest copy of this +document is hosted at [http://w8bh.net/Assembly for +RC2014Z.pdf](http://w8bh.net/Assembly%20for%20RC2014Z.pdf). + +# Licensing + +## License Terms + +RomWBW is free software: you can redistribute it and/or modify it under +the terms of the GNU General Public License as published by the Free +Software Foundation, either version 3 of the License, or (at your +option) any later version. + +RomWBW is distributed in the hope that it will be useful, but WITHOUT +ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +more details. + +You should have received a copy of the GNU General Public License along +with RomWBW. If not, see . + +Portions of RomWBW were created by, contributed by, or derived from the +work of others. It is believed that these works are being used in +accordance with the intentions and/or licensing of their creators. + +If anyone feels their work is being used outside of its intended +licensing, please notify: + +> Wayne Warthen +> + +RomWBW is an aggregate work. It is composed of many individual, +standalone programs that are distributed as a whole to function as a +cohesive system. Each program may have its own licensing which may be +different from other programs within the aggregate. + +In some cases, a single program (e.g., CP/M Operating System) is +composed of multiple components with different licenses. It is believed +that in all such cases the licenses are compatible with GPL version 3. + +RomWBW encourages code contributions from others. Contributors may +assert their own copyright in their contributions by annotating the +contributed source code appropriately. Contributors are further +encouraged to submit their contributions via the RomWBW source code +control system to ensure their contributions are clearly documented. + +All contributions to RomWBW are subject to this license. diff --git a/ReadMe.txt b/ReadMe.txt index 9e540b62..ce7b25e5 100644 --- a/ReadMe.txt +++ b/ReadMe.txt @@ -1,441 +1,428 @@ -RomWBW Introduction -Wayne Warthen (wwarthen@gmail.com) -19 Jun 2025 - - - - - - -OVERVIEW - - -RomWBW software provides a complete, commercial quality implementation -of CP/M (and work-alike) operating systems and applications for modern -Z80/180/280 retro-computing hardware systems. - -A wide variety of platforms are supported including those produced by -these developer communities: - -- RetroBrew Computers (https://www.retrobrewcomputers.org) -- RC2014 (https://rc2014.co.uk), - RC2014-Z80 (https://groups.google.com/g/rc2014-z80) -- Retro Computing (https://groups.google.com/g/retro-comp) -- Small Computer Central (https://smallcomputercentral.com/) - -A complete list of the currently supported platforms is found in RomWBW -Hardware . - - - -DESCRIPTION - - -Primary Features - -By design, RomWBW isolates all of the hardware specific functions in the -ROM chip itself. The ROM provides a hardware abstraction layer such that -all of the operating systems and applications on a disk will run on any -RomWBW-based system. To put it simply, you can take a disk (or CF/SD/USB -Card) and move it between systems transparently. - -Supported hardware features of RomWBW include: - -- Z80 Family CPUs including Z80, Z180, and Z280 -- Banked memory services for several banking designs -- Disk drivers for RAM, ROM, Floppy, IDE ATA/ATAPI, CF, SD, USB, Zip, - Iomega -- Serial drivers including UART (16550-like), ASCI, ACIA, SIO -- Video drivers including TMS9918, SY6545, MOS8563, HD6445, Xosera -- Keyboard (PS/2) drivers via VT8242 or PPI interfaces -- Real time clock drivers including DS1302, BQ4845 -- Support for CP/NET networking using Wiznet, MT011 or Serial -- Built-in VT-100 terminal emulation support - -A dynamic disk drive letter assignment mechanism allows mapping -operating system drive letters to any available disk media. -Additionally, mass storage devices (IDE Disk, CF Card, SD Card, etc.) -support the use of multiple slices (up to 256 per device). Each slice -contains a complete CP/M filesystem and can be mapped independently to -any drive letter. This overcomes the inherent size limitations in legacy -OSes and allows up to 2GB of addressable storage on a single device, -with up to 128MB accessible at any one time. - - -Included Software - -Multiple disk images are provided in the distribution. Most disk images -contain a complete, bootable, ready-to-run implementation of a specific -operating system. A “combo” disk image contains multiple slices, each -with a full operating system implementation. If you use this disk image, -you can easily pick whichever operating system you want to boot without -changing media. - -Some of the included software: - -- Operating Systems (CP/M 2.2, ZSDOS, NZ-COM, CP/M 3, ZPM3, Z3PLUS, QPM - ) -- Support for other operating systems, p-System, FreeRTOS, and FUZIX. -- Programming Tools (Z80ASM, Turbo Pascal, Forth, Cowgol) -- C Compiler’s including Aztec-C, and HI-TECH C -- Microsoft Basic Compiler, and Microsoft Fortran -- Some games such as Colossal Cave, Zork, etc -- Wordstar Word processing software - -Some of the provided software can be launched directly from the ROM -firmware itself: - -- System Monitor -- Operating Systems (CP/M 2.2, ZSDOS) -- ROM BASIC (Nascom BASIC and Tasty BASIC) -- ROM Forth - -A tool is provided that allows you to access a FAT-12/16/32 filesystem. -The FAT filesystem may be coresident on the same disk media as RomWBW -slices or on stand-alone media. This makes exchanging files with modern -OSes such as Windows, MacOS, and Linux very easy. - - -ROM Distribution - -The RomWBW Repository (https://github.com/wwarthen/RomWBW) on GitHub is -the official distribution location for all project source and -documentation. - -RomWBW is distributed as both source code and pre-built ROM and disk -images. - -The pre-built ROM images distributed with RomWBW are based on the -default system configurations as determined by the hardware -provider/designer. The pre-built ROM firmware images are generally -suitable for most users. - -The fully-built distribution releases are available on the RomWBW -Releases Page (https://github.com/wwarthen/RomWBW/releases) of the -repository. - -On this page, you will normally see a Development Snapshot as well as -recent stable releases. Unless you have a specific reason, I suggest you -stick to the most recent stable release. - -The asset named RomWBW-vX.X.X-Package.zip includes all pre-built ROM and -Disk images as well as full source code. The other assets contain only -source code and do not have the pre-built ROM or disk images. - -Distribution Directory Layout - -The RomWBW distribution is a compressed zip archive file organized in a -set of directories. Each of these directories has its own ReadMe.txt -file describing the contents in detail. In summary, these directories -are: - - ------------------------------------------------------------------------- - DIRECTORY DESCRIPTION - ----------- ------------------------------------------------------------- - BINARY The final output files of the build process are placed here. - Most importantly, the ROM images with the file names ending - in “.rom” and disk images ending in .img. - - DOC Contains various detailed documentation, both RomWBW - specifically as well as the operating systems and - applications. - - SOURCE Contains the source code files used to build the software and - ROM images. - - TOOLS Contains the programs that are used by the build process or - that may be useful in setting up your system. - ------------------------------------------------------------------------- - -Building from Source - -It is also very easy to modify and build custom ROM images that fully -tailor the firmware to your specific preferences. All tools required to -build custom ROM firmware under Windows are included – no need to -install assemblers, etc. The firmware can also be built using Linux or -MacOS after confirming a few standard tools have been installed. - - -Installation & Operation - -In general, installation of RomWBW on your platform is very simple. You -just need to program your ROM with the correct ROM image from the RomWBW -distribution. Subsequently, you can write disk images on your disk -drives (IDE disk, CF Card, SD Card, etc.) which then provides even more -functionality. - -Complete instructions for installation and operation of RomWBW are found -in the RomWBW User Guide. It is also a good idea to review the Release -Notes for helpful release-specific information. - - -Documentation - -There are several documents that form the core of the RomWBW -documentation: - -- RomWBW User Guide is the main user guide for RomWBW, it covers the - major topics of how to install, manage and use RomWBW, and includes - additional guidance to the use of some of the operating systems - supported by RomWBW - -- RomWBW Hardware contains a description of all the hardware platforms, - and devices supported by RomWBW. - -- RomWBW Applications is a reference for the ROM-hosted and OS-hosted - applications created or customized to enhance the operation of RomWBW. - -- RomWBW Disk Catalog is a reference for the contents of the disk images - provided with RomWBW, with a description of many of the files on each - image - -- RomWBW System Guide discusses much of the internal design and - construction of RomWBW. It includes a reference for the RomWBW HBIOS - API functions. - -An online HTML version of this documentation is hosted at -https://wwarthen.github.io/RomWBW. - -Each of the operating systems and ROM applications included with RomWBW -are sophisticated tools in their own right. It is not reasonable to -fully document their usage. However, you will find complete manuals in -PDF format in the Doc directory of the distribution. The intention of -this documentation is to describe the operation of RomWBW and the ways -in which it enhances the operation of the included applications and -operating systems. - -Since RomWBW is purely a software product for many different platforms, -the documentation does NOT cover hardware construction, configuration, -or troubleshooting – please see your hardware provider for this -information. - - - -SUPPORT - - -Getting Assistance - -The best way to get assistance with RomWBW or any aspect of the -RetroBrew Computers projects is via one of the community forums: - -- RetroBrew Computers Forum -- RC2014 Google Group -- retro-comp Google Group - -Submission of issues and bugs are welcome at the RomWBW GitHub -Repository. - -Also feel free to email Wayne Warthen at wwarthen@gmail.com. I am happy -to provide support adapting RomWBW to new or modified systems - - - -CONTRIBUTIONS - - -All source code and distributions are maintained on GitHub. -Contributions of all kinds to RomWBW are very welcome. - - -Acknowledgments - -I want to acknowledge that a great deal of the code and inspiration for -RomWBW has been provided by or derived from the work of others in the -RetroBrew Computers Community. I sincerely appreciate all of their -contributions. The list below is probably missing many names – please -let me know if I missed you! - -- Andrew Lynch started it all when he created the N8VEM Z80 SBC which - became the first platform RomWBW supported. Some of his original code - can still be found in RomWBW. - -- Dan Werner wrote much of the code from which RomWBW was originally - derived and he has always been a great source of knowledge and advice. - -- Douglas Goodall contributed code, time, testing, and advice in “the - early days”. He created an entire suite of application programs to - enhance the use of RomWBW. Unfortunately, they have become unusable - due to internal changes within RomWBW. As of RomWBW 2.6, these - applications are no longer provided. - -- Sergey Kiselev created several hardware platforms for RomWBW including - the very popular Zeta. - -- David Giles created support for the Z180 CSIO which is now included SD - Card driver. - -- Phil Summers contributed the Forth and BASIC adaptations in ROM, the - AY-3-8910 sound driver, DMA support, and a long list of general code - and documentation enhancements. - -- Ed Brindley contributed some of the code that supports the RCBus - platform. - -- Spencer Owen created the RC2014 series of hobbyist kit computers which - has exponentially increased RomWBW usage. Some of his kits include - RomWBW. - -- Stephen Cousins has likewise created a series of hobbyist kit - computers at Small Computer Central and is distributing RomWBW with - many of them. - -- Alan Cox has contributed some driver code and has provided a great - deal of advice. - -- The CP/NET client files were developed by Douglas Miller. - -- Phillip Stevens contributed support for FreeRTOS. - -- Curt Mayer contributed the original Linux / MacOS build process. - -- UNA BIOS and FDISK80 are the products of John Coffman. - -- FLASH4 is a product of Will Sowerbutts. - -- CLRDIR is a product of Max Scane. - -- Tasty Basic is a product of Dimitri Theulings. - -- Dean Netherton contributed eZ80 CPU support, the sound driver - interface, and the SN76489 sound driver. - -- The RomWBW Disk Catalog document was produced by Mykl Orders. - -- Rob Prouse has created many of the supplemental disk images including - Aztec C, HiTech C, SLR Z80ASM, Turbo Pascal, Microsoft BASIC Compiler, - Microsoft Fortran Compiler, and a Games compendium. - -- Martin R has provided substantial help reviewing and improving the - User Guide and Applications documents. - -- Mark Pruden has made a wide variety of contributions including: - - - significant content in the Disk Catalog and User Guide - - creation of the Introduction and Hardware documents - - Z3PLUS operating system disk image - - COPYSL utility - - SLABEL utility - - a feature for RomWBW configuration by NVRAM - - the /B bulk mode of disk assignment to the ASSIGN utility - -- Jacques Pelletier has contributed the DS1501 RTC driver code. - -- Jose Collado has contributed enhancements to the TMS driver including - compatibility with standard TMS register configuration. - -- Kevin Boone has contributed a generic HBIOS date/time utility (WDATE). - -- Matt Carroll has contributed a fix to XM.COM that corrects the port - specification when doing a send. - -- Dean Jenkins enhanced the build process to accommodate the Raspberry - Pi 4. - -- Tom Plano has contributed a new utility (HTALK) to allow talking - directly to HBIOS COM ports. - -- Lars Nelson has contributed several generic utilities such as a - universal (OS agnostic) UNARC application. - -- Dylan Hall added support for specifying a secondary console. - -- Bill Shen has contributed boot loaders for several of his systems. - -- Laszlo Szolnoki has contributed an EF9345 video display controller - driver. - -- Ladislau Szilagyi has contributed an enhanced version of CP/M Cowgol - that leverages RomWBW memory banking. - -- Les Bird has contributed support for the NABU w/ Option Board - -- Rob Gowin created an online documentation site via MkDocs, and - contributed a driver for the Xosera FPGA-based video controller. - -- Jörg Linder has contributed disassembled and nicely commented source - for ZSDOS2 and the BPBIOS utilities. - - -Related Projects - -Outside of the hardware platforms adapted to RomWBW, there are a variety -of projects that either target RomWBW specifically or provide a -RomWBW-specific variation. These efforts are greatly appreciated and are -listed below. Please contact the author if there are any other such -projects that are not listed. - -Z88DK - -Z88DK is a software powerful development kit for Z80 computers -supporting both C and assembly language. This kit now provides specific -library support for RomWBW HBIOS. The Z88DK project is hosted at -https://github.com/z88dk/z88dk. - -Paleo Editor - -Steve Garcia has created a Windows-hosted IDE that is tailored to -development of RomWBW. The project can be found at -https://github.com/alloidian/PaleoEditor. - -Z80 fig-FORTH - -Dimitri Theulings’ implementation of fig-FORTH for the Z80 has a -RomWBW-specific variant. The project is hosted at -https://github.com/dimitrit/figforth. - -Assembly Language Programming for the RC2014 Zed - -Bruce Hall has written a very nice document that describes how to -develop assembly language applications on RomWBW. It begins with the -setup and configuration of a new RC2014 Zed system running RomWBW. It -describes not only generic CP/M application development, but also RomWBW -HBIOS programming and bare metal programming. The latest copy of this -document is hosted at http://w8bh.net/Assembly for RC2014Z.pdf. - - - -LICENSING - - -License Terms - -RomWBW is free software: you can redistribute it and/or modify it under -the terms of the GNU General Public License as published by the Free -Software Foundation, either version 3 of the License, or (at your -option) any later version. - -RomWBW is distributed in the hope that it will be useful, but WITHOUT -ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for -more details. - -You should have received a copy of the GNU General Public License along -with RomWBW. If not, see https://www.gnu.org/licenses/. - -Portions of RomWBW were created by, contributed by, or derived from the -work of others. It is believed that these works are being used in -accordance with the intentions and/or licensing of their creators. - -If anyone feels their work is being used outside of its intended -licensing, please notify: - - Wayne Warthen - wwarthen@gmail.com - -RomWBW is an aggregate work. It is composed of many individual, -standalone programs that are distributed as a whole to function as a -cohesive system. Each program may have its own licensing which may be -different from other programs within the aggregate. - -In some cases, a single program (e.g., CP/M Operating System) is -composed of multiple components with different licenses. It is believed -that in all such cases the licenses are compatible with GPL version 3. - -RomWBW encourages code contributions from others. Contributors may -assert their own copyright in their contributions by annotating the -contributed source code appropriately. Contributors are further -encouraged to submit their contributions via the RomWBW source code -control system to ensure their contributions are clearly documented. - -All contributions to RomWBW are subject to this license. +RomWBW Introduction +Wayne Warthen (wwarthen@gmail.com) +06 Jul 2025 + + + + + + + +Overview + +RomWBW software provides a complete, commercial quality implementation +of CP/M (and work-alike) operating systems and applications for modern +Z80/180/280 retro-computing hardware systems. + +A wide variety of platforms are supported including those produced by +these developer communities: + +- RetroBrew Computers (https://www.retrobrewcomputers.org) +- RC2014 (https://rc2014.co.uk), + RC2014-Z80 (https://groups.google.com/g/rc2014-z80) +- Retro Computing (https://groups.google.com/g/retro-comp) +- Small Computer Central (https://smallcomputercentral.com/) + +A complete list of the currently supported platforms is found in RomWBW +Hardware . + +Description + +Primary Features + +By design, RomWBW isolates all of the hardware specific functions in the +ROM chip itself. The ROM provides a hardware abstraction layer such that +all of the operating systems and applications on a disk will run on any +RomWBW-based system. To put it simply, you can take a disk (or CF/SD/USB +Card) and move it between systems transparently. + +Supported hardware features of RomWBW include: + +- Z80 Family CPUs including Z80, Z180, and Z280 +- Banked memory services for several banking designs +- Disk drivers for RAM, ROM, Floppy, IDE ATA/ATAPI, CF, SD, USB, Zip, + Iomega +- Serial drivers including UART (16550-like), ASCI, ACIA, SIO +- Video drivers including TMS9918, SY6545, MOS8563, HD6445, Xosera +- Keyboard (PS/2) drivers via VT8242 or PPI interfaces +- Real time clock drivers including DS1302, BQ4845 +- Support for CP/NET networking using Wiznet, MT011 or Serial +- Built-in VT-100 terminal emulation support + +A dynamic disk drive letter assignment mechanism allows mapping +operating system drive letters to any available disk media. +Additionally, mass storage devices (IDE Disk, CF Card, SD Card, etc.) +support the use of multiple slices (up to 256 per device). Each slice +contains a complete CP/M filesystem and can be mapped independently to +any drive letter. This overcomes the inherent size limitations in legacy +OSes and allows up to 2GB of addressable storage on a single device, +with up to 128MB accessible at any one time. + +Included Software + +Multiple disk images are provided in the distribution. Most disk images +contain a complete, bootable, ready-to-run implementation of a specific +operating system. A “combo” disk image contains multiple slices, each +with a full operating system implementation. If you use this disk image, +you can easily pick whichever operating system you want to boot without +changing media. + +Some of the included software: + +- Operating Systems (CP/M 2.2, ZSDOS, NZ-COM, CP/M 3, ZPM3, Z3PLUS, + QPM ) +- Support for other operating systems, p-System, FreeRTOS, and FUZIX. +- Programming Tools (Z80ASM, Turbo Pascal, Forth, Cowgol) +- C Compiler’s including Aztec-C, and HI-TECH C +- Microsoft Basic Compiler, and Microsoft Fortran +- Some games such as Colossal Cave, Zork, etc +- Wordstar Word processing software + +Some of the provided software can be launched directly from the ROM +firmware itself: + +- System Monitor +- Operating Systems (CP/M 2.2, ZSDOS) +- ROM BASIC (Nascom BASIC and Tasty BASIC) +- ROM Forth + +A tool is provided that allows you to access a FAT-12/16/32 filesystem. +The FAT filesystem may be coresident on the same disk media as RomWBW +slices or on stand-alone media. This makes exchanging files with modern +OSes such as Windows, MacOS, and Linux very easy. + +ROM Distribution + +The RomWBW Repository (https://github.com/wwarthen/RomWBW) on GitHub is +the official distribution location for all project source and +documentation. + +RomWBW is distributed as both source code and pre-built ROM and disk +images. + +The pre-built ROM images distributed with RomWBW are based on the +default system configurations as determined by the hardware +provider/designer. The pre-built ROM firmware images are generally +suitable for most users. + +The fully-built distribution releases are available on the RomWBW +Releases Page (https://github.com/wwarthen/RomWBW/releases) of the +repository. + +On this page, you will normally see a Development Snapshot as well as +recent stable releases. Unless you have a specific reason, I suggest you +stick to the most recent stable release. + +The asset named RomWBW-vX.X.X-Package.zip includes all pre-built ROM and +Disk images as well as full source code. The other assets contain only +source code and do not have the pre-built ROM or disk images. + +Distribution Directory Layout + +The RomWBW distribution is a compressed zip archive file organized in a +set of directories. Each of these directories has its own ReadMe.txt +file describing the contents in detail. In summary, these directories +are: + + ------------------------------------------------------------------------- + Directory Description + ----------- ------------------------------------------------------------- + Binary The final output files of the build process are placed here. + Most importantly, the ROM images with the file names ending + in “.rom” and disk images ending in .img. + + Doc Contains various detailed documentation, both RomWBW + specifically as well as the operating systems and + applications. + + Source Contains the source code files used to build the software and + ROM images. + + Tools Contains the programs that are used by the build process or + that may be useful in setting up your system. + ------------------------------------------------------------------------- + +Building from Source + +It is also very easy to modify and build custom ROM images that fully +tailor the firmware to your specific preferences. All tools required to +build custom ROM firmware under Windows are included – no need to +install assemblers, etc. The firmware can also be built using Linux or +MacOS after confirming a few standard tools have been installed. + +Installation & Operation + +In general, installation of RomWBW on your platform is very simple. You +just need to program your ROM with the correct ROM image from the RomWBW +distribution. Subsequently, you can write disk images on your disk +drives (IDE disk, CF Card, SD Card, etc.) which then provides even more +functionality. + +Complete instructions for installation and operation of RomWBW are found +in the RomWBW User Guide. It is also a good idea to review the Release +Notes for helpful release-specific information. + +Documentation + +There are several documents that form the core of the RomWBW +documentation: + +- RomWBW User Guide is the main user guide for RomWBW, it covers the + major topics of how to install, manage and use RomWBW, and includes + additional guidance to the use of some of the operating systems + supported by RomWBW + +- RomWBW Hardware contains a description of all the hardware + platforms, and devices supported by RomWBW. + +- RomWBW Applications is a reference for the ROM-hosted and OS-hosted + applications created or customized to enhance the operation of + RomWBW. + +- RomWBW Disk Catalog is a reference for the contents of the disk + images provided with RomWBW, with a description of many of the files + on each image + +- RomWBW System Guide discusses much of the internal design and + construction of RomWBW. It includes a reference for the RomWBW HBIOS + API functions. + +An online HTML version of this documentation is hosted at +https://wwarthen.github.io/RomWBW. + +Each of the operating systems and ROM applications included with RomWBW +are sophisticated tools in their own right. It is not reasonable to +fully document their usage. However, you will find complete manuals in +PDF format in the Doc directory of the distribution. The intention of +this documentation is to describe the operation of RomWBW and the ways +in which it enhances the operation of the included applications and +operating systems. + +Since RomWBW is purely a software product for many different platforms, +the documentation does not cover hardware construction, configuration, +or troubleshooting – please see your hardware provider for this +information. + +Support + +Getting Assistance + +The best way to get assistance with RomWBW or any aspect of the +RetroBrew Computers projects is via one of the community forums: + +- RetroBrew Computers Forum +- RC2014 Google Group +- retro-comp Google Group + +Submission of issues and bugs are welcome at the RomWBW GitHub +Repository. + +Also feel free to email Wayne Warthen at wwarthen@gmail.com. I am happy +to provide support adapting RomWBW to new or modified systems + +Contributions + +All source code and distributions are maintained on GitHub. +Contributions of all kinds to RomWBW are very welcome. + +Acknowledgments + +I want to acknowledge that a great deal of the code and inspiration for +RomWBW has been provided by or derived from the work of others in the +RetroBrew Computers Community. I sincerely appreciate all of their +contributions. The list below is probably missing many names – please +let me know if I missed you! + +- Andrew Lynch started it all when he created the N8VEM Z80 SBC which + became the first platform RomWBW supported. Some of his original + code can still be found in RomWBW. + +- Dan Werner wrote much of the code from which RomWBW was originally + derived and he has always been a great source of knowledge and + advice. + +- Douglas Goodall contributed code, time, testing, and advice in “the + early days”. He created an entire suite of application programs to + enhance the use of RomWBW. Unfortunately, they have become unusable + due to internal changes within RomWBW. As of RomWBW 2.6, these + applications are no longer provided. + +- Sergey Kiselev created several hardware platforms for RomWBW + including the very popular Zeta. + +- David Giles created support for the Z180 CSIO which is now included + SD Card driver. + +- Phil Summers contributed the Forth and BASIC adaptations in ROM, the + AY-3-8910 sound driver, DMA support, and a long list of general code + and documentation enhancements. + +- Ed Brindley contributed some of the code that supports the RCBus + platform. + +- Spencer Owen created the RC2014 series of hobbyist kit computers + which has exponentially increased RomWBW usage. Some of his kits + include RomWBW. + +- Stephen Cousins has likewise created a series of hobbyist kit + computers at Small Computer Central and is distributing RomWBW with + many of them. + +- Alan Cox has contributed some driver code and has provided a great + deal of advice. + +- The CP/NET client files were developed by Douglas Miller. + +- Phillip Stevens contributed support for FreeRTOS. + +- Curt Mayer contributed the original Linux / MacOS build process. + +- UNA BIOS and FDISK80 are the products of John Coffman. + +- FLASH4 is a product of Will Sowerbutts. + +- CLRDIR is a product of Max Scane. + +- Tasty Basic is a product of Dimitri Theulings. + +- Dean Netherton contributed eZ80 CPU support, the sound driver + interface, and the SN76489 sound driver. + +- The RomWBW Disk Catalog document was produced by Mykl Orders. + +- Rob Prouse has created many of the supplemental disk images + including Aztec C, HiTech C, SLR Z80ASM, Turbo Pascal, Microsoft + BASIC Compiler, Microsoft Fortran Compiler, and a Games compendium. + +- Martin R has provided substantial help reviewing and improving the + User Guide and Applications documents. + +- Mark Pruden has made a wide variety of contributions including: + + - significant content in the Disk Catalog and User Guide + - creation of the Introduction and Hardware documents + - Z3PLUS operating system disk image + - Infocom text adventure game disk image + - COPYSL, and SLABEL utilities + - Display of bootable slices via “S” command during startup + - Optimisations of HBIOS and CBIOS to reduce overall code size + - a feature for RomWBW configuration by NVRAM + - the /B bulk mode of disk assignment to the ASSIGN utility + +- Jacques Pelletier has contributed the DS1501 RTC driver code. + +- Jose Collado has contributed enhancements to the TMS driver + including compatibility with standard TMS register configuration. + +- Kevin Boone has contributed a generic HBIOS date/time utility + (WDATE). + +- Matt Carroll has contributed a fix to XM.COM that corrects the port + specification when doing a send. + +- Dean Jenkins enhanced the build process to accommodate the Raspberry + Pi 4. + +- Tom Plano has contributed a new utility (HTALK) to allow talking + directly to HBIOS COM ports. + +- Lars Nelson has contributed several generic utilities such as a + universal (OS agnostic) UNARC application. + +- Dylan Hall added support for specifying a secondary console. + +- Bill Shen has contributed boot loaders for several of his systems. + +- Laszlo Szolnoki has contributed an EF9345 video display controller + driver. + +- Ladislau Szilagyi has contributed an enhanced version of CP/M Cowgol + that leverages RomWBW memory banking. + +- Les Bird has contributed support for the NABU w/ Option Board + +- Rob Gowin created an online documentation site via MkDocs, and + contributed a driver for the Xosera FPGA-based video controller. + +- Jörg Linder has contributed disassembled and nicely commented source + for ZSDOS2 and the BPBIOS utilities. + +Related Projects + +Outside of the hardware platforms adapted to RomWBW, there are a variety +of projects that either target RomWBW specifically or provide a +RomWBW-specific variation. These efforts are greatly appreciated and are +listed below. Please contact the author if there are any other such +projects that are not listed. + +Z88DK + +Z88DK is a software powerful development kit for Z80 computers +supporting both C and assembly language. This kit now provides specific +library support for RomWBW HBIOS. The Z88DK project is hosted at +https://github.com/z88dk/z88dk. + +Paleo Editor + +Steve Garcia has created a Windows-hosted IDE that is tailored to +development of RomWBW. The project can be found at +https://github.com/alloidian/PaleoEditor. + +Z80 fig-FORTH + +Dimitri Theulings’ implementation of fig-FORTH for the Z80 has a +RomWBW-specific variant. The project is hosted at +https://github.com/dimitrit/figforth. + +Assembly Language Programming for the RC2014 Zed + +Bruce Hall has written a very nice document that describes how to +develop assembly language applications on RomWBW. It begins with the +setup and configuration of a new RC2014 Zed system running RomWBW. It +describes not only generic CP/M application development, but also RomWBW +HBIOS programming and bare metal programming. The latest copy of this +document is hosted at http://w8bh.net/Assembly for RC2014Z.pdf. + +Licensing + +License Terms + +RomWBW is free software: you can redistribute it and/or modify it under +the terms of the GNU General Public License as published by the Free +Software Foundation, either version 3 of the License, or (at your +option) any later version. + +RomWBW is distributed in the hope that it will be useful, but WITHOUT +ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +more details. + +You should have received a copy of the GNU General Public License along +with RomWBW. If not, see https://www.gnu.org/licenses/. + +Portions of RomWBW were created by, contributed by, or derived from the +work of others. It is believed that these works are being used in +accordance with the intentions and/or licensing of their creators. + +If anyone feels their work is being used outside of its intended +licensing, please notify: + + Wayne Warthen + wwarthen@gmail.com + +RomWBW is an aggregate work. It is composed of many individual, +standalone programs that are distributed as a whole to function as a +cohesive system. Each program may have its own licensing which may be +different from other programs within the aggregate. + +In some cases, a single program (e.g., CP/M Operating System) is +composed of multiple components with different licenses. It is believed +that in all such cases the licenses are compatible with GPL version 3. + +RomWBW encourages code contributions from others. Contributors may +assert their own copyright in their contributions by annotating the +contributed source code appropriately. Contributors are further +encouraged to submit their contributions via the RomWBW source code +control system to ensure their contributions are clearly documented. + +All contributions to RomWBW are subject to this license. diff --git a/Source/Apps/slabel/slabel.asm b/Source/Apps/slabel/slabel.asm index 9fbf167a..dc4a524c 100644 --- a/Source/Apps/slabel/slabel.asm +++ b/Source/Apps/slabel/slabel.asm @@ -4,6 +4,9 @@ ;============================================================================== ; ; Author: Mark Pruden +; +; This is a SUPERSET of INVNTSLC.ASM -> Please See this program also when +; making changes, as code ( in routine prtslc: ) exists there also ;______________________________________________________________________________ ; ; Usage: diff --git a/Source/Doc/Applications.md b/Source/Doc/Applications.md index 4f3b9a14..5d881b33 100644 --- a/Source/Doc/Applications.md +++ b/Source/Doc/Applications.md @@ -56,8 +56,22 @@ User Guide, and for the sake of completeness there is some overlap here. When a RomWBW system is started the user is presented with a sign-on message at the default console detailing the RomWBW version and build date. The system follows this with the list of hardware that it has -discovered, a list of devices and the system units assigned to them, -before finally inviting the to select a boot device with the prompt: +discovered, a list of devices and the system units assigned to them. + +If autoboot is configured then the message (below) will count down +and once 0 is reached the system will automatically boot with the configured +options + +``` +AutoBoot in 3 Seconds ( aborts, now)... +``` + +Pressing `esc` - will bypass the auto boot process going immediately +to the `Boot` prompt, or pressing `enter` - will proceed with autoboot +immediately. Auto boot is configured using the `W` boot menu option. + +If autoboot is bypassed (or not configured) the user is asked to +select a boot device with the prompt: ``` Boot [H=Help]: @@ -74,18 +88,23 @@ Furthermore, a ROM application may also be started from this prompt. This start-up process is described in some detailed in the RomWBW User Guide, and there is some overlap here. -## Help +#### Help After pressing H or ? at the boot prompt the user will be presented with the following list of available commands: ``` -L - List ROM Applications -D - Device Inventory -R - Reboot System -I [] - Set Console Interface/Baud code -V [] - View/Set HBIOS Diagnostic Verbosity -[.] - Boot Disk Unit/Slice +Boot [H=Help]: H + + L - List ROM Applications + D - Device Inventory + S - Slice Inventory + R - Reboot System + W - RomWBW Configure + I [] - Set Console Interface/Baud code + V [] - View/Set HBIOS Diagnostic Verbosity + N - Network Boot + [.] - Boot Disk Unit/Slice ``` The function performed by each command is described below: @@ -102,24 +121,45 @@ D: system was started. +S: + +: Displays the list of disk Slices that contain a label indicating that + they may be bootable. See [SLABEL (Slice Label)] for more details about labels. + + R: : Will restart the system. Note that this does not reset hardware devices in the same way that power-on or pressing the reset button would. +W: + +: Runs the [SYSCONF (System Configuration)] utility allowing RomWBW + configuration stored in Non Volatile memory to be changed. + + I: : Allows the user to select the interface connected to the console, and optionally the Baud rate. This could be used to allow the system to be operated from a second console. + V: : Enables the display of invalid RomWBW HBIOS API calls. This option is very unlikely to be used by a user and is used for development purposes. + +N: + +: Boot into CP/M via an RCBus Wiznet MT011 network module if configured. + Section 10 of the $doc_user$ provides complete instructions for setting + up a CP/NET based network under RomWBW including network booting. + + And, finally, the system may be booted by specifying the unit number, and optional slice, separated by a period('.'), of where the disk operating system software is located - eg 2, 4.1, 5.3 @@ -127,7 +167,7 @@ system software is located - eg 2, 4.1, 5.3 Alternatively, a RomWBW ROM application may be started by pressing the appropriate key from the applications menu, shown in the following section. -## List ROM Applications +#### List ROM Applications If the user presses the L key at the Boot Loader prompt then the system will display the list of ROM applications that are built into RomWBW. If a command @@ -137,16 +177,19 @@ first displaying the menu. The ROM applications available from the boot prompt are: ``` -M: Monitor -C: CP/M 2.2 -Z: Z-System -B: BASIC -T: Tasty BASIC -F: Forth -P: Play a Game -N: Network Boot -X: XModem Flash Updater -U: User App +Boot [H=Help]: L + +ROM Applications: + + M: Monitor + Z: Z-System + C: CP/M 2.2 + F: Forth + B: BASIC + T: Tasty BASIC + P: Play a Game + X: XModem Flash Updater + U: User App ``` Each of these will now be described in greater detail. @@ -168,11 +211,11 @@ language and there is no ability to save to persistent storage (disks). The available memory area for programming is `0100h-EDFFh`. The following areas are reserved: -Memory Area | Function -------------|----------------------------------- -`0000-00FFh`| Jump and restart (RST) vectors -`EE00-FDFFh`| Monitor -`FE00-FFFFh`| HBIOS proxy +| Memory Area | Function | +|----------------|---------------------------------| +| `0000-00FFh` | Jump and restart (RST) vectors | +| `EE00-FDFFh` | Monitor | +| `FE00-FFFFh` | HBIOS proxy | The monitor uses a prompt in the format of `xx>` where xx is the RomWBW bank id number. For example, the prompt may look like this @@ -198,7 +241,7 @@ allow selecting alternate banks. There now follows a more detailed guide to using the RomWBW Monitor program: -### Command Summary +### Monitor Commands **`?`** - Will display a summary of the available commands. @@ -222,13 +265,13 @@ T xxxx - X-modem transfer to memory location xxxx X - Exit monitor ``` -### Cold Boot +#### Cold Boot **`B`** - Performs a cold boot of the RomWBW system. A complete re-initialization of the system is performed and the system returns to the Boot Loader prompt. -### Dump Memory +#### Dump Memory **`D xxxx [yyyy]`** - Dump memory from hex location xxxx to yyyy on the screen as lines of 16 hexadecimal bytes with their @@ -261,7 +304,7 @@ Example: `D 100 1FF` 01F0: 01 C5 01 F0 F8 CF E5 26 00 0E 0A CD 39 02 7D 3C .Å.ðøÏå&...Í9.}< ``` -### Fill Memory +#### Fill Memory **`F xxxx yyyy zz`** - Fill memory from hex xxxx to yyyy with a single value of zz over the full range. The Dump command @@ -269,7 +312,7 @@ can be used to confirm that the fill completed as expected. A good way to zero out memory areas before writing machine data for debug purposes. -### Halt System +#### Halt System **`H`** - Halt system. A Z80 HALT instruction is executed. The system remains in the halt state until the system is @@ -277,20 +320,20 @@ physically rebooted. Interrupts will not restart the system. On systems that support a HALT status LED, the LED will be illuminated. -### Input from Port +#### Input from Port **`I xxxx`** - Input data from port xxxx and display to the screen. This command is used to read values from hardware I/O ports and display the contents in hexadecimal. -### Keyboard Echo +#### Keyboard Echo **`K`** - Echo any key-presses from the terminal. Press 'ESC' key to quit. This facility provides that any key stroke sent to the computer will be echoed back to the terminal. File down loads will be echoed as well while this facility is ‘on’. -### Load Hex +#### Load Hex **`L`** - Load a Intel Hex data via the terminal program. The load address is defined in the hex file of the @@ -304,21 +347,21 @@ Keep in mind that this will be transient unless the system supports battery backed memory. Saving to memory drive is not supported. -### Move Memory +#### Move Memory **`M xxxx yyyy zzzz`** - Move hex memory block xxxx to yyyy to memory starting at hex location zzzz. Care should be taken to insure that there is enough memory at the destination so that code does not get over-written or memory wrapped around. -### Output to Port +#### Output to Port **`O xxxx yy`** - Output data byte xx to port xxxx. This command is used to send hexadecimal values to hardware I/O ports to verify their operation and is the companion to the I operation. Use clip leaded LEDs to confirm the data written. -### Program Memory +#### Program Memory **`P xxxx`** - Program memory location xxxx. This routine will allow you to program a hexadecimal value 'into memory starting @@ -333,7 +376,7 @@ remote computer. An excellent online resource for looking up opcodes for entry can be found here: . -### Run Program +#### Run Program **`R xxxx [[yy] [zzzz]]`** - Run program at location xxxx. If optional arguments yy and zzzz are entered they are loaded into the @@ -342,7 +385,7 @@ Monitor is saved on the stack so the program can return to the monitor. On return to the monitor, the contents of the A, HL, DE and BC registers are displayed. -### Set Bank +#### Set Bank **`S xx`** - Set the physical memory bank to the RomWBW Bank Id indicated by xx. Memory addresses @@ -367,12 +410,12 @@ Section 4 of the $doc_sys$ provides detail on how Bank Ids map to the physical memory of the system and also how specific banks are utilized by RomWBW. -### Undo Bank +#### Undo Bank **`U`** - Change the bank in memory back to the previously selected bank. This command should be used in conjunction with the S command. -### X-Modem Transfer +#### X-Modem Transfer **`T xxxx`** - Receive an X-modem file transfer and load it into memory starting at location xxxx. @@ -380,116 +423,10 @@ memory starting at location xxxx. 128 byte blocks and checksum mode is the only supported protocol. -### Exit Monitor +#### Exit Monitor **`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 a 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 writes 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 any 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 it 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 (`AUTO_CMD`) 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 | - -#### Boot Options (BO) - -This switch will define the boot command to be executed when auto boot is -enabled. When configured this replaces the (`AUTO_CMD`) variable -defined in the ROM build configuration. - -Making changes to boot options 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 BO D,2,14 | Set the default boot from Disk; Unit 2, Slice 14 | -| S BO 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 @@ -624,15 +561,15 @@ above. ### Structure of Forth source files -File | Description ---------------|----------------------------- -camel80.azm | Code Primitives - camel80d.azm | CPU Dependencies - camel80h.azm | High Level words - camel80r.azm | RomWBW additions -glosshi.txt | Glossary of high level words -glosslo.txt | Glossary of low level words -glossr.txt | Glossary of RomWBW additions +| File | Description | +|--------------|------------------------------| +| camel80.azm | Code Primitives | +| camel80d.azm | CPU Dependencies | +| camel80h.azm | High Level words | +| camel80r.azm | RomWBW additions | +| glosshi.txt | Glossary of high level words | +| glosslo.txt | Glossary of low level words | +| glossr.txt | Glossary of RomWBW additions | ### RomWBW Additions @@ -648,19 +585,17 @@ Extensions and changes to this implementation compared to the original distribut - James Bowman's double precision words have been added from his RC2014 version: . -Word | Syntax | Description ---------|----------------------------|--------------------------------- -D+ | d1 d2 -- d1+d2 | Add double numbers -2>R | d -- | 2 to R -2R> | d -- | fetch 2 from R -M*/ | d1 n2 u3 -- d=(d1*n2)/u3 | double precision mult. div -SVC | hl de bc n -- hl de bc af | Execute a RomWBW function -P! | n p -- | Write a byte to a I/O port -P@ | p -- n | Read a byte from and I/O port - -## Play a Game +| Word | Syntax | Description | +|------|----------------------------|-------------------------------| +| D+ | d1 d2 -- d1+d2 | Add double numbers | +| 2>R | d -- | 2 to R | +| 2R> | d -- | fetch 2 from R | +| M*/ | d1 n2 u3 -- d=(d1*n2)/u3 | double precision mult. div | +| SVC | hl de bc n -- hl de bc af | Execute a RomWBW function | +| P! | n p -- | Write a byte to a I/O port | +| P@ | p -- n | Read a byte from and I/O port | -### 2048 +## Play a Game (2048) 2048 is a puzzle game that can be both mindless and challenging. It appears deceptively simple but failure can creep up on you suddenly. @@ -735,44 +670,40 @@ This is how I lost this game: Press Q at any time to bring up the option to Quit or Restart the game. -## Network Boot - -If your RomWBW system is equipped with an RCBus MT011 module, it is -possible to boot into CP/M 2.2 directly from a CP/NET network server. -This means that the operating system will be loaded directly from the -network server and all of your drive letters will be provided by the -network server. - -This function requires substantial knowledge of CP/NET and it's -implementation within RomWBW. Section 10 of the $doc_user$ provides -complete instructions for setting up a CP/NET based network under RomWBW -including a section on network booting. - ## Xmodem Flash Updater -The RomWBW Xmodem flash updater provides the capability to update RomWBW from the boot loader using an x-modem file transfer. It offers similar capabilities to Will Sowerbutts FLASH4 utility except that the flashing process occurs during the file transfer. +The RomWBW Xmodem flash updater provides the capability to update RomWBW +from the boot loader using an x-modem file transfer. It offers similar +capabilities to Will Sowerbutts FLASH4 utility except that the flashing +process occurs during the file transfer. These are the key differences between the two methods are: -Xmodem Flash Updater | FLASH.COM (aka FLASH4) ---------------------------------|----------------- -Available from the boot loader | Well proven and tested -Xmodem transfer is integrated | Wider range of supported chips and hardware -Integrated checksum utilities | Wider range of supported platforms -Capability to copy a ROM image | Only reprograms sectors that have changed -More convenient one step process | Ability save and verify ROM images -No intermediate storage required | Progress display while flashing -. | Displays chip identification information -. | Faster file transfer - -The major disadvantages of the Updater is that it is new and relatively untested. There is the risk that a failed transfer will result in a partially flashed and unbootable ROM. There are some limitations on serial transfer speeds. - -The updater utility was initially intended to support the Retrobrew SBC-V2-005 platform using Atmel 39SF040 flash chips but has now been extended to be more generic in operation. +| Xmodem Flash Updater | FLASH.COM (aka FLASH4) | +|----------------------------------|----------------------------------------------| +| Available from the boot loader | Well proven and tested | +| Xmodem transfer is integrated | Wider range of supported chips and hardware | +| Integrated checksum utilities | Wider range of supported platforms | +| Capability to copy a ROM image | Only reprograms sectors that have changed | +| More convenient one step process | Ability save and verify ROM images | +| No intermediate storage required | Progress display while flashing | +| . | Displays chip identification information | +| . | Faster file transfer | + +The major disadvantages of the Updater is that it is new and relatively +untested. There is the risk that a failed transfer will result in a +partially flashed and unbootable ROM. There are some limitations on +serial transfer speeds. + +The updater utility was initially intended to support the Retrobrew SBC-V2-005 +platform using Atmel 39SF040 flash chips but has now been extended to be +more generic in operation. Supported flash chips are 39SF040, 29F040, AT49F040, AT29C040, M29F040 , MX29F040, A29010B, A29040B -The Atmel 39SF040 chip is recommended as it can erase and write 4Kb sectors. Other chips require the whole chip to be erased. +The Atmel 39SF040 chip is recommended as it can erase and write 4Kb sectors. +Other chips require the whole chip to be erased. ### Usage @@ -784,24 +715,40 @@ In most cases, completing a ROM update is a simple as: 4. Initiating an X-modem transfer of your ROM image on your console device 5. Selecting option R - Reboot -If your console device is not able to transfer a ROM image i.e. your console is a VDU then you will have to use the console options to identify which character-input/output device is to be used as the serial device for transfer. +If your console device is not able to transfer a ROM image i.e. your console +is a VDU then you will have to use the console options to identify which +character-input/output device is to be used as the serial device for transfer. -When your console is the serial device used for the transfer, no progress information is displayed as this would disrupt the x-modem file transfer. If you use an alternate character-input/output devices as the serial device for the transfer then progress information will be displayed on the console device. +When your console is the serial device used for the transfer, no progress +information is displayed as this would disrupt the x-modem file transfer. +If you use an alternate character-input/output devices as the serial device +for the transfer then progress information will be displayed on the console device. -Due to different platform processor speeds, serials speeds and flow control capabilities the default console or serial device speed may need to be reduced for a successful transfer and flash to occur. The **Set Console Interface/Baud code** option at the Boot Loader can be used to change the speed if required. Additionally, the Updater has options to set to and revert from a recommended speed. +Due to different platform processor speeds, serials speeds and flow +control capabilities the default console or serial device speed may +need to be reduced for a successful transfer and flash to occur. +The **Set Console Interface/Baud code** option at the Boot Loader can +be used to change the speed if required. Additionally, the Updater has +options to set to and revert from a recommended speed. See the RomWBW Applications guide for additional information on performing upgrades. ### Console Options + Option ( C ) - Set Console Device Option ( S ) - Set Serial Device -By default the updater assumes that the current console is a serial device and that the ROM file to be flashed will also be transferred across this device, so the Console and Serial device are both the same. +By default the updater assumes that the current console is a serial device +and that the ROM file to be flashed will also be transferred across this +device, so the Console and Serial device are both the same. -Either device can be can be change to another character-input/output device but the updater will always expect to receive the x-modem transfer on the **Serial Device** +Either device can be can be change to another character-input/output +device but the updater will always expect to receive the x-modem +transfer on the **Serial Device** -The advantage of transferring on a different device to the console is that progress information can be displayed during the transfer. +The advantage of transferring on a different device to the console +is that progress information can be displayed during the transfer. Option ( > ) - Set Recommended Baud Rate @@ -870,21 +817,32 @@ load CP/M and perform the normal x-modem / flash process to recover. Option ( 1 ) and ( 2 ) - Calculate and display CRC32 of 1st or 2nd 512k ROM. Option ( 3 ) - Calculate and display CRC32 of a 1024k (2x512Kb) ROM. -Can be used to verify if a ROM image has been transferred and flashed correctly. Refer to the Tera Term section below for details on configuring the automatic display of a files CRC after it has been transferred. +Can be used to verify if a ROM image has been transferred and flashed +correctly. Refer to the Tera Term section below for details on +configuring the automatic display of a files CRC after it has been +transferred. -In Windows, right clicking on a file should also give you a context menu option CRC SHA which will allow you to select a CRC32 calculation to be done on the selected file. +In Windows, right clicking on a file should also give you a context +menu option CRC SHA which will allow you to select a CRC32 calculation +to be done on the selected file. ### Tera Term macro configuration -Macros are a useful tool for automatic common tasks. There are a number of instances where using macros to facilitate the update process could be worthwhile if you are: +Macros are a useful tool for automatic common tasks. There are a +number of instances where using macros to facilitate the update +process could be worthwhile if you are: * Following the RomWBW development builds. * Doing lots of configuration changes. * Doing development on RomWBW drivers -Macros can be used to automate sending ROM updates or images and for my own purposed I have set up a separate macro for transferring each of the standard build ROM, my own custom configuration ROM and update ROM. +Macros can be used to automate sending ROM updates or images and +for my own purposed I have set up a separate macro for transferring +each of the standard build ROM, my own custom configuration ROM +and update ROM. -An example macro file to send an *.upd file, using checksum mode and display the crc32 value of the transmitted file: +An example macro file to send an *.upd file, using checksum mode +and display the crc32 value of the transmitted file: ``` Xmodem send, checksum, display crc32 @@ -896,39 +854,45 @@ messagebox inputstr 'crc32' ### Serial speed guidelines -As identified in the introduction, there are limitations on serial speed depending on processor speed and flow control settings. Listed below are some of the results identified during testing. - -Configuration | Processor Speed | Maximum Serial Speed ------------------------|-----------------|--------------------- -UART no flow control | 2MHz | 9600 -UART no flow control | 4MHz | 19200 -UART no flow control | 5MHz | 19200 -UART no flow control | 8MHz | 38400 -UART no flow control | 10MHz | 38400 -USB-fifo 2MHz+ | | n/a -ASCI no flow control | 18.432MHz | 9600 -ASCI with flow control | 18.432MHz | 38400 +As identified in the introduction, there are limitations on serial +speed depending on processor speed and flow control settings. +Listed below are some of the results identified during testing. + +| Configuration | Processor Speed | Maximum Serial Speed | +|------------------------|-----------------|----------------------| +| UART no flow control | 2MHz | 9600 | +| UART no flow control | 4MHz | 19200 | +| UART no flow control | 5MHz | 19200 | +| UART no flow control | 8MHz | 38400 | +| UART no flow control | 10MHz | 38400 | +| USB-fifo | 2MHz+ | n/a | +| ASCI no flow control | 18.432MHz | 9600 | +| ASCI with flow control | 18.432MHz | 38400 | The **Set Recommend Baud Rate** option in the Updater menu follows the following guidelines. -Processor Speed | Baud Rate -----------------|---------- -1MHz | 4800 -2-3MHz | 9600 -4-7MHz | 19200 -8-20MHz | 38400 +| Processor Speed | Baud Rate | +|-----------------|-----------| +| 1MHz | 4800 | +| 2-3MHz | 9600 | +| 4-7MHz | 19200 | +| 8-20MHz | 38400 | These can be customized in the updater.asm source code in the CLKTBL table if desired. Feedback to the RomWBW developers on these guidelines would be appreciated. ### Notes -All testing was done with Tera Term x-modem, Forcing checksum mode using macros was found to give the most reliable transfer. -Partial writes can be completed with 39SF040 chips. Other chips require entire flash to be erased before being written. -An SBC V2-005 MegaFlash or Z80 MBC required for 1mb flash support. The Updater assumes both chips are same type -Failure handling has not been tested. -Timing broadly calibrated on a Z80 SBC-v2 -Unabios not supported +Notes +* All testing was done with Tera Term x-modem, Forcing checksum mode + using macros was found to give the most reliable transfer. +* Partial writes can be completed with 39SF040 chips. Other chips + require entire flash to be erased before being written. +* An SBC V2-005 MegaFlash or Z80 MBC required for 1mb flash support. + The Updater assumes both chips are same type +* Failure handling has not been tested. +* Timing broadly calibrated on a Z80 SBC-v2 +* Unabios not supported ## User Application @@ -2192,6 +2156,146 @@ discover ports that are 'write-only'. `\clearpage`{=latex} +## SYSCONF (System Configuration) + +| SYSCONF | | +| --------------------|---| +| ROM-based |Yes| +| Disk-based |Yes| + +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 utility ('W' Menu option), and a CP/M application. +Noting however the CP/M application is not included on an disk image, it is found in +the `Binary/Applications` folder of the RomWBW distribution. + +The section "Setting NVRAM Options" in the $doc_user$ has additional information +on the use of NVRAM to set your system configuration. + +#### Syntax + +The application is an interactive application; it does not have a command line syntax. +Instead commands are executed from within the application in a command line structure. +`SYSCONF` command takes no arguments. + +| `SYSCONF` + +#### Usage + +When you first start the (`SYSCONF`) utility it will display the current switches +followed by a command listing. e.g. + +``` +RomWBW System Config Utility + +Current Configuration: + [BO] / Boot Options: ROM (App = "H") + [AB] / Auto Boot: Disabled + +Commands: + (P)rint - Display Current settings + (S)et {SW} {val}[,{val}[,{val}]]- Set a switch value(s) + (R)eset - Init NVRAM to Defaults + (H)elp [{SW}] - This help menu, or help on a switch + e(X)it - Exit Configuration + +$ +``` + +When you run (`SYSCONF`) for the first time the NVRAM will be uninitialised, and can +be initialised using the (R)eset command, which writes 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 any 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 it 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) | +| e(X)it | -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 (`AUTO_CMD`) 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 | + +#### Boot Options (BO) + +This switch will define the boot command to be executed when auto boot is +enabled. When configured this replaces the (`AUTO_CMD`) variable +defined in the ROM build configuration. + +Making changes to boot options 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 BO D,2,14 | Set the default boot from Disk; Unit 2, Slice 14 | +| S BO R,M | Set the default boot to be the (M)onitor Rom Application | + +#### Etymology + +The `SYSCONF` utility is an original product specific to RomWBW, source code is included. +`SYSCONF` was contributed by Mark Pruden. + +`\clearpage`{=latex} + ## SYSCOPY (System Copy) | SYSCOPY | | diff --git a/Source/Doc/Catalog.md b/Source/Doc/Catalog.md index 958d090d..3ca4f099 100644 --- a/Source/Doc/Catalog.md +++ b/Source/Doc/Catalog.md @@ -1121,7 +1121,7 @@ The following files are found in | `TESTAS.SUB` | SUBMIT file to build TESTAS sample program | | `Z80AS.COM` | Z80 assembler which assembles the output of COWFIX and other Z80 source files (see ) | -## Microsoft Fortran 80 (Fortran) +## Microsoft Fortran 80 | Floppy Disk Image: **fd_fortran.img** | Hard Disk Image: **hd_fortran.img** @@ -1267,6 +1267,107 @@ The following files are found in | `UNIXIO.H` | Language include file (see manual) | | `ZAS.COM` | The assembler - in fact a general purpose macro assembler | +## Infocom (Text Adventure Games) + +| Hard Disk Image: **hd_infocom.img** + +A collection of all Official releases of the interactive fiction games +produced by Infocom in the 1980's + +The following files are found in + +* /Source/Images/d_infocom + +| **File** | **Description** | +|--------------|----------------------------------------------------| +| amfv.z4 | A Mind Forever Voyaging (*) | +| arthur.z6 | Arthur - The Quest for Excalibur (*) | +| ballyhoo.z3 | Ballyhoo | +| beyond.z5 | Beyond Zork (*) | +| border.z5 | Border Zone (*) | +| bureau.z4 | Bureaucracy (*) | +| cutthr.z3 | Cutthroats | +| deadline.z3 | Deadline | +| enchant.z3 | Enchanter | +| h2g2.z3 | The Hitchhiker's Guide to the Galaxy | +| hollyw.z3 | Hollywood Hijinx | +| infidel.z3 | Infidel | +| journey.z6 | Journey (*) | +| leather.z3 | Leather Goddesses of Phobos | +| lurking.z3 | The Lurking Horror | +| moonmist.z3 | Moonmist | +| nordbert.z4 | Nord and Bert Couldn't Make Head or Tail of It (*) | +| planet.z3 | Planetfall | +| plunder.z3 | Plundered Hearts | +| readme.txt | Documentation about the Infocom games | +| seastalk.z3 | Seastalker | +| sherlock.z5 | Sherlock (*) | +| shogun.z6 | Shogun (*) | +| sorcerer.z3 | Sorcerer | +| spellb.z3 | Spellbreaker | +| starcros.z3 | Starcross | +| stationf.z3 | Stationfall | +| suspect.z3 | Suspect | +| suspend.z3 | Suspended | +| trinity.z4 | Trinity (*) | +| wishb.z3 | Wishbringer | +| witness.z3 | Witness | +| zork0.z6 | Zork Zero (*) | +| zork1.z3 | Zork I | +| zork2.z3 | Zork II | +| zork3.z3 | Zork III | +| zorknote.txt | Documentation about terminal config of COM files | + +The above games have been curated from here . +Full game documentation can be found here + +The game files are a virtual machine code commonly known as Z-Machine, they +are portable and will run on any machine that has a Z-Machine interpreter. + +* All the Z3 games come with the official CP/M interpreter (the `COM` file) + version C last updated by Inforcom on 5th Feb 1985. You can simply run the + game by running it from the `COM` program +* All latter games Z4, Z5,.. and above, (Marked as * in the listing above) + are more sophisticated and require a better interpreter. i.e. VEZZA. + +#### VEZZA (User Area 15) + +Vezza is a modern Infocom/Inform/Z-machine text adventure interpreter for 8 bit +z80 based computers. What makes it modern is that it is written in hand-crafted +z80 assembler for maximum speed, and can load not only the classics such as +Zork 1,2 and 3 but also the later games. + +It can run Z1 up to Z8 inform format interactive fiction game files. To run +a game with Vezza just type Vezza followed by the game you want to run. e.g. + +`VEZZA ZORK0.Z6` + +**Note:** One of the bigger constraints is available RAM. An OS such as ZPM +since it uses banked RAM does have a good amount of available RAM and was +used to test these games work. + +This tool is free but the developer accepts your support by letting +you pay what you think is fair for the tool. If you find this useful +consider donating at: + + + +You should (test and) choose one that works on you configuration, +and best to copy and rename it as vezza.com + +| **File** | **Description** | +|--------------|-------------------------------------------------------------------| +| vezza-B.com | 80x24, VT52 + Banked CP/M 3 | +| vezza-FG.com | 80x25, VT100/ANSI (16 color) + CP/M 3 | +| vezza-C2.com | 80x24, VT100 - CP/M 2.2 large memory, no timed input | +| vezza-CC.com | 80x24, VT100 (256 colour) - CP/M 2.2 large memory, no timed input | +| vezza-AV.com | 80x24, VT100 (16 colour) - CP/M 2.2 high RAM. | +| vezza-AX.com | 80x25, VT100/ANSI (16 colour) - CP/M 2.2 high RAM. | +| vezza-RW.com | 80x24, VT100 - CP/M 2.2 | + +The above is a subset of available builds. The full repository including +documentation is available at + ## MSX ROMS | Hard Disk Image: **hd_msxroms1.img** @@ -1329,7 +1430,7 @@ The following files are found in | `TURBO.OVR` | Part of TURBO Pascal | | `TURBOMSG.OVR` | Part of TURBO Pascal | -## WordStar 4 +## WordStar 4 (Word processor) | Floppy Disk Image: **fd_ws4.img** | Hard Disk Image: **hd_ws4.img** diff --git a/Source/Doc/Introduction.md b/Source/Doc/Introduction.md index 5f0cff1c..f0d84806 100644 --- a/Source/Doc/Introduction.md +++ b/Source/Doc/Introduction.md @@ -290,8 +290,10 @@ please let me know if I missed you! - significant content in the Disk Catalog and User Guide - creation of the Introduction and Hardware documents - Z3PLUS operating system disk image - - COPYSL utility - - SLABEL utility + - Infocom text adventure game disk image + - COPYSL, and SLABEL utilities + - Display of bootable slices via "S" command during startup + - Optimisations of HBIOS and CBIOS to reduce overall code size - a feature for RomWBW configuration by NVRAM - the /B bulk mode of disk assignment to the ASSIGN utility diff --git a/Source/Doc/UserGuide.md b/Source/Doc/UserGuide.md index fdb7c12f..23c68fd7 100644 --- a/Source/Doc/UserGuide.md +++ b/Source/Doc/UserGuide.md @@ -340,14 +340,16 @@ enter the command followed by ***\***. For example, typing `H` will display a short command summary: ``` -Boot [H=Help]: h +Boot [H=Help]: H L - List ROM Applications D - Device Inventory + S - Slice Inventory R - Reboot System W - RomWBW Configure I [] - Set Console Interface/Baud Rate V [] - View/Set HBIOS Diagnostic Verbosity + N - Network Boot [.] - Boot Disk Unit/Slice ``` @@ -366,7 +368,6 @@ ROM Applications: B: BASIC T: Tasty BASIC P: Play a Game - N: Network Boot X: XModem Flash Updater U: User App ``` @@ -410,7 +411,6 @@ prompt: | BASIC | Microsoft ROM BASIC | | Tasty BASIC | Dimitri Theuling's Tiny BASIC implementation | | Play | A simple video game (requires ANSI terminal emulation) | -| Network Boot | Boot system via Wiznet MT011 device | | Flash Update | Upload and flash a new ROMWBW image using xmodem | | User App | User written application placeholder | @@ -1806,6 +1806,7 @@ The following table shows the disk images available. | xxx_fortran.img | Microsoft Fortran-80 Compiler | No | | xxx_games.img | Games Disk for CP/M | No | | xxx_hitechc.img | HI-TECH Z80 CP/M C compiler | No | +| xxx_infocom.img | Infocom Games Disk | No | | xxx_msxroms1.img | MSX ROMs Disk 1 | No | | xxx_msxroms2.img | MSX ROMs Disk 2 | No | | xxx_nzcom.img | NZCOM ZCPR 3.4 Operating System | Yes | diff --git a/Source/HBIOS/Build.cmd b/Source/HBIOS/Build.cmd index 4fba30af..9eafe11b 100644 --- a/Source/HBIOS/Build.cmd +++ b/Source/HBIOS/Build.cmd @@ -71,7 +71,7 @@ if %Platform%==DUO ( ) :: -:: Bring the previously build font files into this directory +:: Bring the previously build font files into this directory :: copy ..\Fonts\font*.asm . || exit /b @@ -91,19 +91,32 @@ tasm -t%CPUType% -g3 -dAPPBOOT hbios.asm hbios_app.bin hbios_app.lst || exit /b call :asm dbgmon || exit /b call :asm romldr || exit /b +call :asm invntdev || exit /b +call :asm invntslc || exit /b call :asm eastaegg || exit /b call :asm nascom || exit /b :: call :asm tastybasic || exit /b call :asm game || exit /b call :asm usrrom || exit /b call :asm updater || exit /b - -:: call :asm fonts || exit /b +call :asm romfonts || exit /b :: 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 platform specific hardware monitor + +if %Platform%==S100 ( + zxcc slr180 -s100mon/fh || exit /b + zxcc mload25 -s100mon || exit /b + set HwMon=s100mon.com +) else ( + call :asm hwmon || exit /b + set HwMon=hwmon.bin +) + :: :: Create additional ROM bank images by assembling components into :: 32K chunks which can be concatenated later. Note that @@ -113,15 +126,7 @@ tasm -t%CPUType% -g3 -fFF -dCPM sysconf.asm sysconf.com sysconf_com.lst || exit copy /b romldr.bin + dbgmon.bin + ..\zsdos\zsys_wbw.bin + ..\cpm22\cpm_wbw.bin rom1.bin || exit /b copy /b ..\Forth\camel80.bin + nascom.bin + ..\tastybasic\src\tastybasic.bin + game.bin + eastaegg.bin + %NETBOOT% + updater.bin + sysconf.bin + usrrom.bin rom2.bin || exit /b - -if %Platform%==S100 ( - zxcc slr180 -s100mon/fh - zxcc mload25 -s100mon || exit /b - copy /b s100mon.com rom3.bin || exit /b -) else ( - copy nul rom3.bin -) - +copy /b %HwMon% + invntdev.bin + invntslc.bin + romfonts.bin rom3.bin copy /b romldr.bin + dbgmon.bin + ..\zsdos\zsys_wbw.bin appboot.bin || exit /b :: diff --git a/Source/HBIOS/Layout.txt b/Source/HBIOS/Layout.txt index 67b684a2..31923acf 100644 --- a/Source/HBIOS/Layout.txt +++ b/Source/HBIOS/Layout.txt @@ -3,66 +3,72 @@ Final Output Files ------------------ ROM Output File [512K] -> .rom - hbios_rom [32K] - OSIMG [32K] - OSIMG1 [32K] - OSIMG2 [32K] - romdisk - [384K] + HBIOS_ROM [32K] + ROM1 [32K] + ROM2 [32K] + ROM3 [32K] + ROMDISK [384K] (size varies with ROM in system) UPD Output File [128K] -> .upd - hbios_rom [32K] - OSIMG [32K] - OSIMG1 [32K] - OSIMG2 [32K] + HBIOS_ROM [32K] + ROM1 [32K] + ROM2 [32K] + ROM3 [32K] COM Output File -> .com - hbios_app [varies] - OSIMG_SMALL [32K] + HBIOS_APP [<32K] (size varies, no padding] + APPBOOT [ 20K] ------------------------- Intermediate Output Files ------------------------- -OSIMG [32K] -> osimg.bin - romldr [4K] - dbgmon [4K] - ZSYS (zcpr/zsdos/cbios) [12K] - CPM (ccp/bdos/cbios) [12K] +ROM1 [32K] -> rom1.bin + romldr [ 4K] + dbgmon [ 4K] + ZSYS [12K] (zcpr/zsdos/cbios) + CPM [12K] (ccp/bdos/cbios) -OSIMG_SMALL [20K] -> osimg_small.bin - romldr [4K] - dbgmon [4K] - ZSYS (zcpr/zsdos/cbios) [12K] - -OSIMG1 [32K] -> osimg1.bin +ROM2 [32K] -> rom2.bin camel80 [5.75K] - nascom [8K] - tastybasic [2.5K] + nascom [8.00K] + tastybasic [2.50K] game [2.25K] - eastaegg [0.5K] - netboot [4K] + eastaegg [0.50K] + netboot [4.00K] updater.bin [3.25K] - sysconf.bin [2K] - usrrom.bin [3.75K (padded)] + sysconf.bin [2.00K] + usrrom.bin [3.75K] + +ROM3 [32K] -> rom3.bin + hwmon [ 8.00K] + invntdev [ 2.75K] + invntslc [ 0.50K] + fonts [ 8.00K] + slack [12.75K] -OSIMG2 [32K] -> osimg2.bin - s100mon [8.25kb (optional)] - (OR) not populated +APPBOOT [20K] -> appboot.bin + romldr [ 4K] + dbgmon [ 4K] + ZSYS [12K] (zcpr/zsdos/cbios) CPM [12K] -> cpm.bin - ccp [2K] - bdos [3.5K] - cbios [6.5K] + ccp [2.0K] + bdos [3.5K] + cbios [6.5K] ZSYS [12K] -> zsys.bin - zcpr [2K] - zsdos [3.5K] - cbios [6.5K] + zcpr [2.0K] + zsdos [3.5K] + cbios [6.5K] ----------------- Compilation Units ----------------- +NOTE: The following need to be reviewed. They are probably out +of date. + hbios.asm -> hbios_rom.bin, hbios_app.bin std.asm ver.inc @@ -76,7 +82,7 @@ hbios.asm -> hbios_rom.bin, hbios_app.bin bcd.asm dsky.asm -romldr.asm -> romldr.bin: loader? +romldr.asm -> romldr.bin std.asm ver.inc hbios.inc @@ -125,18 +131,16 @@ tastybasic.asm -> tastybasic.bin .asm plt_.inc - ======================================================================= HBIOS Loading Modes: ROMBOOT: Startup from ROM Bank BID_BOOT APPBOOT: Startup as CP/M application - IMGBOOT: Startup from RAM Bank BID_USR + IMGBOOT: Startup from RAM Bank BID_USR (deprecated) ======================================================================= - If not (APPBOOT), include page 0 - Base Hardware Init - - Iff (ROMBOOT), init BBR - Install Proxy - Set CURBNK: @@ -149,6 +153,6 @@ HBIOS Loading Modes: - Copy OS Image to USR Bank - If (ROM_MODE), copy BID_OS:0 --> BID_USR:0 - - Else, copy BID_USR: --> BID_USR:0 + - Else, copy BID_BIOS: --> BID_USR:0 - Chain to BID_USR:0 diff --git a/Source/HBIOS/Makefile b/Source/HBIOS/Makefile index 34d56286..181cb0b2 100644 --- a/Source/HBIOS/Makefile +++ b/Source/HBIOS/Makefile @@ -5,7 +5,7 @@ MOREDIFF = game.bin hbios_rom.bin nascom.bin usrrom.bin \ DEST = ../../Binary TOOLS =../../Tools -OTHERS = *.img *.rom *.com *.upd *.bin *.hex cpm.sys zsys.sys Build.inc font*.asm *.dat hbios_env.sh netboot.mod +OTHERS = *.img *.rom *.com *.upd *.bin *.hex cpm.sys zsys.sys Build.inc font*.asm *.dat hbios_env.sh # DIFFMAKE = 1 @@ -25,7 +25,6 @@ include $(TOOLS)/Makefile.inc FONTS := font6x8c.asm font6x8u.asm font8x8c.asm font8x8u.asm \ font8x11c.asm font8x11u.asm font8x16c.asm font8x16u.asm - ifeq ($(CPUFAM),2) TASM=$(BINDIR)/uz80as -t hd64180 @@ -33,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 sysconf.bin sysconf.com usrrom.bin +DEPS=prereq dbgmon.bin romldr.bin nascom.bin tastybasic.bin invntdev.bin invntslc.bin game.bin eastaegg.bin updater.bin sysconf.bin sysconf.com usrrom.bin romfonts.bin ifeq ($(ROM_PLATFORM),UNA) ROMDEPS=romldr.bin dbgmon.bin @@ -44,9 +43,19 @@ else endif ifeq ($(ROM_PLATFORM),S100) - ROMDEPS += s100mon.bin + HWMON=s100mon.bin +else + HWMON=hwmon.bin +endif + +ifeq ($(ROM_PLATFORM),DUO) + NETBOOT=netboot-duo.mod +else + NETBOOT=netboot-mt.mod endif +DEPS += $(HWMON) $(NETBOOT) + ROMNAME=${ROM_PLATFORM}_${ROM_CONFIG} # $(info DEPS=$(DEPS)) @@ -61,18 +70,9 @@ ROMNAME=${ROM_PLATFORM}_${ROM_CONFIG} $(OBJECTS) : $(ROMDEPS) @cat romldr.bin dbgmon.bin ../ZSDOS/zsys_$(BIOS).bin ../CPM22/cpm_$(BIOS).bin >rom1.bin cat romldr.bin dbgmon.bin ../ZSDOS/zsys_$(BIOS).bin >appboot.bin - if [ $(ROM_PLATFORM) = DUO ] ; then \ - cat netboot-duo.mod >netboot.mod ; \ - else \ - cat netboot-mt.mod >netboot.mod ; \ - fi if [ $(ROM_PLATFORM) != UNA ] ; then \ - cat camel80.bin nascom.bin tastybasic.bin game.bin eastaegg.bin netboot.mod updater.bin sysconf.bin usrrom.bin >rom2.bin ; \ - if [ $(ROM_PLATFORM) = S100 ] ; then \ - cat s100mon.bin >rom3.bin ; \ - else \ - >rom3.bin ; \ - fi ; \ + cat camel80.bin nascom.bin tastybasic.bin game.bin eastaegg.bin $(NETBOOT) updater.bin sysconf.bin usrrom.bin >rom2.bin ; \ + cat $(HWMON) invntdev.bin invntslc.bin romfonts.bin >rom3.bin ; \ for f in hbios_rom.bin rom1.bin rom2.bin rom3.bin ; do \ srec_cat $$f -Binary -Crop 0 0x7FFF -Checksum_Negative_Big_Endian 0x7FFF 1 1 -o $$f -Binary ; \ done \ @@ -133,8 +133,13 @@ hbios_env.sh: hbios_env.com romldr.bin: build.inc dbgmon.bin: build.inc nascom.bin: build.inc +invntdev.bin: build.inc +invntslc.bin: build.inc eastaegg.bin: build.inc updater.bin: build.inc +romfonts.bin: build.inc +hwmon.bin: build.inc +s100mon.bin: build.inc dumps: for i in $(MOREDIFF) ; do \ diff --git a/Source/HBIOS/cfg_DUO.asm b/Source/HBIOS/cfg_DUO.asm index 431bcbb9..8bc8769e 100644 --- a/Source/HBIOS/cfg_DUO.asm +++ b/Source/HBIOS/cfg_DUO.asm @@ -71,6 +71,7 @@ INTMODE .SET 2 ; INTERRUPTS: 0=NONE, 1=MODE 1, 2=MODE 2, 3=MODE 3 (Z280) ; RAMSIZE .SET 512 ; SIZE OF RAM IN KB (MUST MATCH YOUR HARDWARE!!!) ROMSIZE .SET 512 ; SIZE OF ROM IN KB (MUST MATCH YOUR HARDWARE!!!) +ROMFONTS .SET TRUE ; LOAD FONTS FROM ROM APP_BNKS .SET $FF ; BANKS TO RESERVE FOR APP USE ($FF FOR AUTO SIZING) MEMMGR .SET MM_Z2 ; MEMORY MANAGER: MM_[SBC|Z2|N8|Z180|Z280|MBC|RPH|MON|EZ512] MPGSEL_0 .SET $50 ; Z2 MEM MGR BANK 0 PAGE SELECT REG (WRITE ONLY) diff --git a/Source/HBIOS/cfg_DYNO.asm b/Source/HBIOS/cfg_DYNO.asm index 2e7c2838..2e490248 100644 --- a/Source/HBIOS/cfg_DYNO.asm +++ b/Source/HBIOS/cfg_DYNO.asm @@ -71,6 +71,7 @@ INTMODE .SET 2 ; INTERRUPTS: 0=NONE, 1=MODE 1, 2=MODE 2, 3=MODE 3 (Z280) ; RAMSIZE .SET 512 ; SIZE OF RAM IN KB (MUST MATCH YOUR HARDWARE!!!) ROMSIZE .SET 512 ; SIZE OF ROM IN KB (MUST MATCH YOUR HARDWARE!!!) +ROMFONTS .SET TRUE ; LOAD FONTS FROM ROM APP_BNKS .SET $FF ; BANKS TO RESERVE FOR APP USE ($FF FOR AUTO SIZING) MEMMGR .SET MM_Z180 ; MEMORY MANAGER: MM_[SBC|Z2|N8|Z180|Z280|MBC|RPH|MON|EZ512] RAMBIAS .SET ROMSIZE ; OFFSET OF START OF RAM IN PHYSICAL ADDRESS SPACE diff --git a/Source/HBIOS/cfg_EPITX.asm b/Source/HBIOS/cfg_EPITX.asm index ff80c150..2c4ca360 100644 --- a/Source/HBIOS/cfg_EPITX.asm +++ b/Source/HBIOS/cfg_EPITX.asm @@ -71,6 +71,7 @@ INTMODE .SET 2 ; INTERRUPTS: 0=NONE, 1=MODE 1, 2=MODE 2, 3=MODE 3 (Z280) ; RAMSIZE .SET 512 ; SIZE OF RAM IN KB (MUST MATCH YOUR HARDWARE!!!) ROMSIZE .SET 512 ; SIZE OF ROM IN KB (MUST MATCH YOUR HARDWARE!!!) +ROMFONTS .SET TRUE ; LOAD FONTS FROM ROM APP_BNKS .SET $FF ; BANKS TO RESERVE FOR APP USE ($FF FOR AUTO SIZING) MEMMGR .SET MM_Z180 ; MEMORY MANAGER: MM_[SBC|Z2|N8|Z180|Z280|MBC|RPH|MON|EZ512] RAMBIAS .SET ROMSIZE ; OFFSET OF START OF RAM IN PHYSICAL ADDRESS SPACE diff --git a/Source/HBIOS/cfg_EZZ80.asm b/Source/HBIOS/cfg_EZZ80.asm index 6603d06c..d018867c 100644 --- a/Source/HBIOS/cfg_EZZ80.asm +++ b/Source/HBIOS/cfg_EZZ80.asm @@ -71,6 +71,7 @@ INTMODE .SET 1 ; INTERRUPTS: 0=NONE, 1=MODE 1, 2=MODE 2, 3=MODE 3 (Z280) ; RAMSIZE .SET 512 ; SIZE OF RAM IN KB (MUST MATCH YOUR HARDWARE!!!) ROMSIZE .SET 512 ; SIZE OF ROM IN KB (MUST MATCH YOUR HARDWARE!!!) +ROMFONTS .SET TRUE ; LOAD FONTS FROM ROM APP_BNKS .SET $FF ; BANKS TO RESERVE FOR APP USE ($FF FOR AUTO SIZING) MEMMGR .SET MM_Z2 ; MEMORY MANAGER: MM_[SBC|Z2|N8|Z180|Z280|MBC|RPH|MON|EZ512] MPGSEL_0 .SET $78 ; Z2 MEM MGR BANK 0 PAGE SELECT REG (WRITE ONLY) diff --git a/Source/HBIOS/cfg_FZ80.asm b/Source/HBIOS/cfg_FZ80.asm index 492efe5d..20df2770 100644 --- a/Source/HBIOS/cfg_FZ80.asm +++ b/Source/HBIOS/cfg_FZ80.asm @@ -71,6 +71,7 @@ INTMODE .SET 0 ; INTERRUPTS: 0=NONE, 1=MODE 1, 2=MODE 2, 3=MODE 3 (Z280) ; RAMSIZE .SET 512 ; SIZE OF RAM IN KB (MUST MATCH YOUR HARDWARE!!!) ROMSIZE .SET 0 ; SIZE OF ROM IN KB (MUST MATCH YOUR HARDWARE!!!) +ROMFONTS .SET TRUE ; LOAD FONTS FROM ROM APP_BNKS .SET $FF ; BANKS TO RESERVE FOR APP USE ($FF FOR AUTO SIZING) MEMMGR .SET MM_Z2 ; MEMORY MANAGER: MM_[SBC|Z2|N8|Z180|Z280|MBC|RPH|MON|EZ512] MPGSEL_0 .SET $78 ; Z2 MEM MGR BANK 0 PAGE SELECT REG (WRITE ONLY) diff --git a/Source/HBIOS/cfg_GMZ180.asm b/Source/HBIOS/cfg_GMZ180.asm index 99f5030c..a0d38d51 100644 --- a/Source/HBIOS/cfg_GMZ180.asm +++ b/Source/HBIOS/cfg_GMZ180.asm @@ -70,6 +70,7 @@ INTMODE .SET 2 ; INTERRUPTS: 0=NONE, 1=MODE 1, 2=MODE 2, 3=MODE 3 (Z280) ; RAMSIZE .SET 512 ; SIZE OF RAM IN KB (MUST MATCH YOUR HARDWARE!!!) ROMSIZE .SET 512 ; SIZE OF ROM IN KB (MUST MATCH YOUR HARDWARE!!!) +ROMFONTS .SET TRUE ; LOAD FONTS FROM ROM APP_BNKS .SET $FF ; BANKS TO RESERVE FOR APP USE ($FF FOR AUTO SIZING) MEMMGR .SET MM_Z180 ; MEMORY MANAGER: MM_[SBC|Z2|N8|Z180|Z280|MBC|RPH|MON|EZ512] RAMBIAS .SET ROMSIZE ; OFFSET OF START OF RAM IN PHYSICAL ADDRESS SPACE diff --git a/Source/HBIOS/cfg_HEATH.asm b/Source/HBIOS/cfg_HEATH.asm index 21f337d3..241b9ac2 100644 --- a/Source/HBIOS/cfg_HEATH.asm +++ b/Source/HBIOS/cfg_HEATH.asm @@ -71,6 +71,7 @@ INTMODE .SET 1 ; INTERRUPTS: 0=NONE, 1=MODE 1, 2=MODE 2, 3=MODE 3 (Z280) ; RAMSIZE .SET 512 ; SIZE OF RAM IN KB (MUST MATCH YOUR HARDWARE!!!) ROMSIZE .SET 512 ; SIZE OF ROM IN KB (MUST MATCH YOUR HARDWARE!!!) +ROMFONTS .SET TRUE ; LOAD FONTS FROM ROM APP_BNKS .SET $FF ; BANKS TO RESERVE FOR APP USE ($FF FOR AUTO SIZING) MEMMGR .SET MM_Z2 ; MEMORY MANAGER: MM_[SBC|Z2|N8|Z180|Z280|MBC|RPH|MON|EZ512] MPGSEL_0 .SET $78 ; Z2 MEM MGR BANK 0 PAGE SELECT REG (WRITE ONLY) diff --git a/Source/HBIOS/cfg_MASTER.asm b/Source/HBIOS/cfg_MASTER.asm index 99342f9c..03501fb5 100644 --- a/Source/HBIOS/cfg_MASTER.asm +++ b/Source/HBIOS/cfg_MASTER.asm @@ -71,6 +71,7 @@ INTMODE .EQU 0 ; INTERRUPTS: 0=NONE, 1=MODE 1, 2=MODE 2, 3=MODE 3 (Z280) ; RAMSIZE .EQU 512 ; SIZE OF RAM IN KB (MUST MATCH YOUR HARDWARE!!!) ROMSIZE .EQU 512 ; SIZE OF ROM IN KB (MUST MATCH YOUR HARDWARE!!!) +ROMFONTS .EQU TRUE ; LOAD FONTS FROM ROM APP_BNKS .EQU $FF ; BANKS TO RESERVE FOR APP USE ($FF FOR AUTO SIZING) MEMMGR .EQU MM_NONE ; MEMORY MANAGER: MM_[SBC|Z2|N8|Z180|Z280|MBC|RPH|MON|EZ512] RAMBIAS .EQU ROMSIZE ; OFFSET OF START OF RAM IN PHYSICAL ADDRESS SPACE @@ -462,6 +463,9 @@ AYMODE .EQU AYMODE_NONE ; AY: DRIVER MODE: AYMODE_[SCG|N8|RCZ80|RCZ180|MSX|LINC AY_FORCE .EQU FALSE ; AY: BYPASS AUTO-DETECT, FORCED PRESENT ; SPKENABLE .EQU FALSE ; SPK: ENABLE RTC LATCH IOBIT SOUND DRIVER (SPK.ASM) +SPKPORT .EQU RTCIO ; SPK: THE PORT WITH THE SPEAKER IO BIT +SPKSHADOW .EQU HB_RTCVAL ; SPK: THE SHADOW VALUE FOR THE PORT THAT HAS TO BE MAINTAINED +SPKMASK .EQU 00000100b ; SPK: THE BIT MASK TO ACTUALLY TOGGLE ; DMAENABLE .EQU FALSE ; DMA: ENABLE DMA DRIVER (DMA.ASM) DMABASE .EQU $E0 ; DMA: DMA BASE ADDRESS diff --git a/Source/HBIOS/cfg_MBC.asm b/Source/HBIOS/cfg_MBC.asm index fe907a30..e1ad3e1f 100644 --- a/Source/HBIOS/cfg_MBC.asm +++ b/Source/HBIOS/cfg_MBC.asm @@ -71,6 +71,7 @@ INTMODE .SET 0 ; INTERRUPTS: 0=NONE, 1=MODE 1, 2=MODE 2, 3=MODE 3 (Z280) ; RAMSIZE .SET 512 ; SIZE OF RAM IN KB (MUST MATCH YOUR HARDWARE!!!) ROMSIZE .SET 512 ; SIZE OF ROM IN KB (MUST MATCH YOUR HARDWARE!!!) +ROMFONTS .SET TRUE ; LOAD FONTS FROM ROM APP_BNKS .SET $FF ; BANKS TO RESERVE FOR APP USE ($FF FOR AUTO SIZING) MEMMGR .SET MM_MBC ; MEMORY MANAGER: MM_[SBC|Z2|N8|Z180|Z280|MBC|RPH|MON|EZ512] MPCL_RAM .SET $78 ; SBC MEM MGR RAM PAGE SELECT REG (WRITE ONLY) diff --git a/Source/HBIOS/cfg_MK4.asm b/Source/HBIOS/cfg_MK4.asm index a5de49b0..bd5795cd 100644 --- a/Source/HBIOS/cfg_MK4.asm +++ b/Source/HBIOS/cfg_MK4.asm @@ -71,6 +71,7 @@ INTMODE .SET 2 ; INTERRUPTS: 0=NONE, 1=MODE 1, 2=MODE 2, 3=MODE 3 (Z280) ; RAMSIZE .SET 512 ; SIZE OF RAM IN KB (MUST MATCH YOUR HARDWARE!!!) ROMSIZE .SET 512 ; SIZE OF ROM IN KB (MUST MATCH YOUR HARDWARE!!!) +ROMFONTS .SET TRUE ; LOAD FONTS FROM ROM APP_BNKS .SET $FF ; BANKS TO RESERVE FOR APP USE ($FF FOR AUTO SIZING) MEMMGR .SET MM_Z180 ; MEMORY MANAGER: MM_[SBC|Z2|N8|Z180|Z280|MBC|RPH|MON|EZ512] RAMBIAS .SET ROMSIZE ; OFFSET OF START OF RAM IN PHYSICAL ADDRESS SPACE diff --git a/Source/HBIOS/cfg_MON.asm b/Source/HBIOS/cfg_MON.asm index e8192fd6..2a0ae026 100644 --- a/Source/HBIOS/cfg_MON.asm +++ b/Source/HBIOS/cfg_MON.asm @@ -73,6 +73,7 @@ INTMODE .SET 2 ; INTERRUPTS: 0=NONE, 1=MODE 1, 2=MODE 2, 3=MODE 3 (Z280) ; RAMSIZE .SET 512 ; SIZE OF RAM IN KB (MUST MATCH YOUR HARDWARE!!!) ROMSIZE .SET 512 ; SIZE OF ROM IN KB (MUST MATCH YOUR HARDWARE!!!) +ROMFONTS .SET TRUE ; LOAD FONTS FROM ROM APP_BNKS .SET $FF ; BANKS TO RESERVE FOR APP USE ($FF FOR AUTO SIZING) MEMMGR .SET MM_MON ; MEMORY MANAGER: MM_[SBC|Z2|N8|Z180|Z280|MBC|RPH|MON|EZ512] ; diff --git a/Source/HBIOS/cfg_N8.asm b/Source/HBIOS/cfg_N8.asm index 5b948649..2915e2ec 100644 --- a/Source/HBIOS/cfg_N8.asm +++ b/Source/HBIOS/cfg_N8.asm @@ -71,6 +71,7 @@ INTMODE .SET 2 ; INTERRUPTS: 0=NONE, 1=MODE 1, 2=MODE 2, 3=MODE 3 (Z280) ; RAMSIZE .SET 512 ; SIZE OF RAM IN KB (MUST MATCH YOUR HARDWARE!!!) ROMSIZE .SET 512 ; SIZE OF ROM IN KB (MUST MATCH YOUR HARDWARE!!!) +ROMFONTS .SET TRUE ; LOAD FONTS FROM ROM APP_BNKS .SET $FF ; BANKS TO RESERVE FOR APP USE ($FF FOR AUTO SIZING) MEMMGR .SET MM_N8 ; MEMORY MANAGER: MM_[SBC|Z2|N8|Z180|Z280|MBC|RPH|MON|EZ512] RAMBIAS .SET 0 ; OFFSET OF START OF RAM IN PHYSICAL ADDRESS SPACE diff --git a/Source/HBIOS/cfg_NABU.asm b/Source/HBIOS/cfg_NABU.asm index 862e8234..f21d2bfe 100644 --- a/Source/HBIOS/cfg_NABU.asm +++ b/Source/HBIOS/cfg_NABU.asm @@ -71,6 +71,7 @@ INTMODE .SET 2 ; INTERRUPTS: 0=NONE, 1=MODE 1, 2=MODE 2, 3=MODE 3 (Z280) ; RAMSIZE .SET 512 ; SIZE OF RAM IN KB (MUST MATCH YOUR HARDWARE!!!) ROMSIZE .SET 512 ; SIZE OF ROM IN KB (MUST MATCH YOUR HARDWARE!!!) +ROMFONTS .SET TRUE ; LOAD FONTS FROM ROM APP_BNKS .SET $FF ; BANKS TO RESERVE FOR APP USE ($FF FOR AUTO SIZING) MEMMGR .SET MM_Z2 ; MEMORY MANAGER: MM_[SBC|Z2|N8|Z180|Z280|MBC|RPH|MON|EZ512] MPGSEL_0 .SET $78 ; Z2 MEM MGR BANK 0 PAGE SELECT REG (WRITE ONLY) diff --git a/Source/HBIOS/cfg_RCEZ80.asm b/Source/HBIOS/cfg_RCEZ80.asm index 069419c0..eaedc78c 100644 --- a/Source/HBIOS/cfg_RCEZ80.asm +++ b/Source/HBIOS/cfg_RCEZ80.asm @@ -69,6 +69,7 @@ INTMODE .SET 1 ; INTERRUPTS: 0=NONE, 1=MODE 1, 2=MODE 2, 3=MODE 3 (Z280) ; RAMSIZE .SET 512 ; SIZE OF RAM IN KB (MUST MATCH YOUR HARDWARE!!!) ROMSIZE .SET 512 ; SIZE OF ROM IN KB (MUST MATCH YOUR HARDWARE!!!) +ROMFONTS .SET TRUE ; LOAD FONTS FROM ROM APP_BNKS .SET $FF ; BANKS TO RESERVE FOR APP USE ($FF FOR AUTO SIZING) MEMMGR .SET MM_Z2 ; MEMORY MANAGER: MM_[SBC|Z2|N8|Z180|Z280|MBC|RPH|MON|EZ512] MPGSEL_0 .SET $78 ; Z2 MEM MGR BANK 0 PAGE SELECT REG (WRITE ONLY) diff --git a/Source/HBIOS/cfg_RCZ180.asm b/Source/HBIOS/cfg_RCZ180.asm index 7314bc00..b311a722 100644 --- a/Source/HBIOS/cfg_RCZ180.asm +++ b/Source/HBIOS/cfg_RCZ180.asm @@ -71,6 +71,7 @@ INTMODE .SET 2 ; INTERRUPTS: 0=NONE, 1=MODE 1, 2=MODE 2, 3=MODE 3 (Z280) ; RAMSIZE .SET 512 ; SIZE OF RAM IN KB (MUST MATCH YOUR HARDWARE!!!) ROMSIZE .SET 512 ; SIZE OF ROM IN KB (MUST MATCH YOUR HARDWARE!!!) +ROMFONTS .SET TRUE ; LOAD FONTS FROM ROM APP_BNKS .SET $FF ; BANKS TO RESERVE FOR APP USE ($FF FOR AUTO SIZING) MEMMGR .SET MM_Z180 ; MEMORY MANAGER: MM_[SBC|Z2|N8|Z180|Z280|MBC|RPH|MON|EZ512] RAMBIAS .SET ROMSIZE ; OFFSET OF START OF RAM IN PHYSICAL ADDRESS SPACE diff --git a/Source/HBIOS/cfg_RCZ280.asm b/Source/HBIOS/cfg_RCZ280.asm index 6d56c86b..f76a1ad6 100644 --- a/Source/HBIOS/cfg_RCZ280.asm +++ b/Source/HBIOS/cfg_RCZ280.asm @@ -71,6 +71,7 @@ INTMODE .SET 0 ; INTERRUPTS: 0=NONE, 1=MODE 1, 2=MODE 2, 3=MODE 3 (Z280) ; RAMSIZE .SET 512 ; SIZE OF RAM IN KB (MUST MATCH YOUR HARDWARE!!!) ROMSIZE .SET 512 ; SIZE OF ROM IN KB (MUST MATCH YOUR HARDWARE!!!) +ROMFONTS .SET TRUE ; LOAD FONTS FROM ROM APP_BNKS .SET $FF ; BANKS TO RESERVE FOR APP USE ($FF FOR AUTO SIZING) MEMMGR .SET MM_Z2 ; MEMORY MANAGER: MM_[SBC|Z2|N8|Z180|Z280|MBC|RPH|MON|EZ512] RAMBIAS .SET ROMSIZE ; OFFSET OF START OF RAM IN PHYSICAL ADDRESS SPACE diff --git a/Source/HBIOS/cfg_RCZ80.asm b/Source/HBIOS/cfg_RCZ80.asm index 729f96bb..e4ba044a 100644 --- a/Source/HBIOS/cfg_RCZ80.asm +++ b/Source/HBIOS/cfg_RCZ80.asm @@ -71,6 +71,7 @@ INTMODE .SET 1 ; INTERRUPTS: 0=NONE, 1=MODE 1, 2=MODE 2, 3=MODE 3 (Z280) ; RAMSIZE .SET 512 ; SIZE OF RAM IN KB (MUST MATCH YOUR HARDWARE!!!) ROMSIZE .SET 512 ; SIZE OF ROM IN KB (MUST MATCH YOUR HARDWARE!!!) +ROMFONTS .SET TRUE ; LOAD FONTS FROM ROM APP_BNKS .SET $FF ; BANKS TO RESERVE FOR APP USE ($FF FOR AUTO SIZING) MEMMGR .SET MM_Z2 ; MEMORY MANAGER: MM_[SBC|Z2|N8|Z180|Z280|MBC|RPH|MON|EZ512] MPGSEL_0 .SET $78 ; Z2 MEM MGR BANK 0 PAGE SELECT REG (WRITE ONLY) diff --git a/Source/HBIOS/cfg_RPH.asm b/Source/HBIOS/cfg_RPH.asm index 0998c00c..ff9edaf0 100644 --- a/Source/HBIOS/cfg_RPH.asm +++ b/Source/HBIOS/cfg_RPH.asm @@ -71,6 +71,7 @@ INTMODE .SET 2 ; INTERRUPTS: 0=NONE, 1=MODE 1, 2=MODE 2, 3=MODE 3 (Z280) ; RAMSIZE .SET 512 ; SIZE OF RAM IN KB (MUST MATCH YOUR HARDWARE!!!) ROMSIZE .SET 512 ; SIZE OF ROM IN KB (MUST MATCH YOUR HARDWARE!!!) +ROMFONTS .SET TRUE ; LOAD FONTS FROM ROM APP_BNKS .SET $FF ; BANKS TO RESERVE FOR APP USE ($FF FOR AUTO SIZING) MEMMGR .SET MM_RPH ; MEMORY MANAGER: MM_[SBC|Z2|N8|Z180|Z280|MBC|RPH|MON|EZ512] RAMBIAS .SET 0 ; OFFSET OF START OF RAM IN PHYSICAL ADDRESS SPACE diff --git a/Source/HBIOS/cfg_S100.asm b/Source/HBIOS/cfg_S100.asm index 8df8b29f..99b503b7 100644 --- a/Source/HBIOS/cfg_S100.asm +++ b/Source/HBIOS/cfg_S100.asm @@ -71,6 +71,7 @@ INTMODE .SET 2 ; INTERRUPTS: 0=NONE, 1=MODE 1, 2=MODE 2, 3=MODE 3 (Z280) ; RAMSIZE .SET 512 ; SIZE OF RAM IN KB (MUST MATCH YOUR HARDWARE!!!) ROMSIZE .SET 512 ; SIZE OF ROM IN KB (MUST MATCH YOUR HARDWARE!!!) +ROMFONTS .SET TRUE ; LOAD FONTS FROM ROM APP_BNKS .SET $FF ; BANKS TO RESERVE FOR APP USE ($FF FOR AUTO SIZING) MEMMGR .SET MM_Z180 ; MEMORY MANAGER: MM_[SBC|Z2|N8|Z180|Z280|MBC|RPH|MON|EZ512] RAMBIAS .SET ROMSIZE ; OFFSET OF START OF RAM IN PHYSICAL ADDRESS SPACE diff --git a/Source/HBIOS/cfg_SBC.asm b/Source/HBIOS/cfg_SBC.asm index 5c536e04..f0a2b488 100644 --- a/Source/HBIOS/cfg_SBC.asm +++ b/Source/HBIOS/cfg_SBC.asm @@ -71,6 +71,7 @@ INTMODE .SET 0 ; INTERRUPTS: 0=NONE, 1=MODE 1, 2=MODE 2, 3=MODE 3 (Z280) ; RAMSIZE .SET 512 ; SIZE OF RAM IN KB (MUST MATCH YOUR HARDWARE!!!) ROMSIZE .SET 512 ; SIZE OF ROM IN KB (MUST MATCH YOUR HARDWARE!!!) +ROMFONTS .SET TRUE ; LOAD FONTS FROM ROM APP_BNKS .SET $FF ; BANKS TO RESERVE FOR APP USE ($FF FOR AUTO SIZING) MEMMGR .SET MM_SBC ; MEMORY MANAGER: MM_[SBC|Z2|N8|Z180|Z280|MBC|RPH|MON|EZ512] MPCL_RAM .SET $78 ; SBC MEM MGR RAM PAGE SELECT REG (WRITE ONLY) diff --git a/Source/HBIOS/cfg_SCZ180.asm b/Source/HBIOS/cfg_SCZ180.asm index 1fca8ac5..86b4575a 100644 --- a/Source/HBIOS/cfg_SCZ180.asm +++ b/Source/HBIOS/cfg_SCZ180.asm @@ -71,6 +71,7 @@ INTMODE .SET 2 ; INTERRUPTS: 0=NONE, 1=MODE 1, 2=MODE 2, 3=MODE 3 (Z280) ; RAMSIZE .SET 512 ; SIZE OF RAM IN KB (MUST MATCH YOUR HARDWARE!!!) ROMSIZE .SET 512 ; SIZE OF ROM IN KB (MUST MATCH YOUR HARDWARE!!!) +ROMFONTS .SET TRUE ; LOAD FONTS FROM ROM APP_BNKS .SET $FF ; BANKS TO RESERVE FOR APP USE ($FF FOR AUTO SIZING) MEMMGR .SET MM_Z180 ; MEMORY MANAGER: MM_[SBC|Z2|N8|Z180|Z280|MBC|RPH|MON|EZ512] RAMBIAS .SET ROMSIZE ; OFFSET OF START OF RAM IN PHYSICAL ADDRESS SPACE diff --git a/Source/HBIOS/cfg_Z80RETRO.asm b/Source/HBIOS/cfg_Z80RETRO.asm index a24a05dc..06ef9954 100644 --- a/Source/HBIOS/cfg_Z80RETRO.asm +++ b/Source/HBIOS/cfg_Z80RETRO.asm @@ -71,6 +71,7 @@ INTMODE .SET 2 ; INTERRUPTS: 0=NONE, 1=MODE 1, 2=MODE 2, 3=MODE 3 (Z280) ; RAMSIZE .SET 512 ; SIZE OF RAM IN KB (MUST MATCH YOUR HARDWARE!!!) ROMSIZE .SET 512 ; SIZE OF ROM IN KB (MUST MATCH YOUR HARDWARE!!!) +ROMFONTS .SET TRUE ; LOAD FONTS FROM ROM APP_BNKS .SET $FF ; BANKS TO RESERVE FOR APP USE ($FF FOR AUTO SIZING) MEMMGR .SET MM_Z2 ; MEMORY MANAGER: MM_[SBC|Z2|N8|Z180|Z280|MBC|RPH|MON|EZ512] MPGSEL_0 .SET $60 ; Z2 MEM MGR BANK 0 PAGE SELECT REG (WRITE ONLY) diff --git a/Source/HBIOS/cfg_ZETA.asm b/Source/HBIOS/cfg_ZETA.asm index c0d737b7..5417ebd8 100644 --- a/Source/HBIOS/cfg_ZETA.asm +++ b/Source/HBIOS/cfg_ZETA.asm @@ -71,6 +71,7 @@ INTMODE .SET 0 ; INTERRUPTS: 0=NONE, 1=MODE 1, 2=MODE 2, 3=MODE 3 (Z280) ; RAMSIZE .SET 512 ; SIZE OF RAM IN KB (MUST MATCH YOUR HARDWARE!!!) ROMSIZE .SET 512 ; SIZE OF ROM IN KB (MUST MATCH YOUR HARDWARE!!!) +ROMFONTS .SET TRUE ; LOAD FONTS FROM ROM APP_BNKS .SET $FF ; BANKS TO RESERVE FOR APP USE ($FF FOR AUTO SIZING) MEMMGR .SET MM_SBC ; MEMORY MANAGER: MM_[SBC|Z2|N8|Z180|Z280|MBC|RPH|MON|EZ512] MPCL_RAM .SET $78 ; SBC MEM MGR RAM PAGE SELECT REG (WRITE ONLY) diff --git a/Source/HBIOS/cfg_ZETA2.asm b/Source/HBIOS/cfg_ZETA2.asm index 4280d684..15ac8659 100644 --- a/Source/HBIOS/cfg_ZETA2.asm +++ b/Source/HBIOS/cfg_ZETA2.asm @@ -71,6 +71,7 @@ INTMODE .SET 2 ; INTERRUPTS: 0=NONE, 1=MODE 1, 2=MODE 2, 3=MODE 3 (Z280) ; RAMSIZE .SET 512 ; SIZE OF RAM IN KB (MUST MATCH YOUR HARDWARE!!!) ROMSIZE .SET 512 ; SIZE OF ROM IN KB (MUST MATCH YOUR HARDWARE!!!) +ROMFONTS .SET TRUE ; LOAD FONTS FROM ROM APP_BNKS .SET $FF ; BANKS TO RESERVE FOR APP USE ($FF FOR AUTO SIZING) MEMMGR .SET MM_Z2 ; MEMORY MANAGER: MM_[SBC|Z2|N8|Z180|Z280|MBC|RPH|MON|EZ512] MPGSEL_0 .SET $78 ; Z2 MEM MGR BANK 0 PAGE SELECT REG (WRITE ONLY) diff --git a/Source/HBIOS/cvdu.asm b/Source/HBIOS/cvdu.asm index 2b5b6298..b432515f 100644 --- a/Source/HBIOS/cvdu.asm +++ b/Source/HBIOS/cvdu.asm @@ -50,11 +50,13 @@ CVDU_COLS .EQU 80 #IF (CVDUMON == CVDUMON_CGA) #DEFINE USEFONT8X8 #DEFINE CVDU_FONT FONT8X8 +CVDU_FONTID .EQU FONTID_8X8 #ENDIF ; #IF (CVDUMON == CVDUMON_EGA) #DEFINE USEFONT8X16 #DEFINE CVDU_FONT FONT8X16 +CVDU_FONTID .EQU FONTID_8X16 #ENDIF ; TERMENABLE .SET TRUE ; INCLUDE TERMINAL PSEUDODEVICE DRIVER @@ -105,6 +107,7 @@ CVDU_INIT1: CALL PRTDEC PRTS("KB$") CALL CVDU_LOADFONT ; LOAD FONT DATA FROM ROM TO CVDU STRORAGE + ; *** DIAGNOSE FONT LOAD ERROR HERE!!! *** CALL CVDU_VDAINI CALL KBD_INIT ; INITIALIZE KEYBOARD DRIVER @@ -494,48 +497,35 @@ CVDU_LOADFONT: LD HL,$2000 ; START OF FONT BUFFER LD C,18 ; UPDATE ADDRESS REGISTER PAIR CALL CVDU_WRX ; DO IT - -#IF USELZSA2 - LD (CVDU_STACK),SP ; SAVE STACK - LD HL,(CVDU_STACK) ; AND SHIFT IT - LD DE,$2000 ; DOWN 4KB TO - OR A ; CREATE A - SBC HL,DE ; DECOMPRESSION BUFFER - LD SP,HL ; HL POINTS TO BUFFER - EX DE,HL ; START OF STACK BUFFER - PUSH DE ; SAVE IT - LD HL,CVDU_FONT ; START OF FONT DATA - CALL DLZSA2 ; DECOMPRESS TO DE - POP HL ; RECALL STACK BUFFER POSITION -#ELSE - LD HL,CVDU_FONT ; START OF FONT DATA -#ENDIF - +; + LD A,CVDU_FONTID ; DESIRED FONT + CALL FNT_SELECT ; SELECT IT + RET NZ ; ERROR RETURN +; LD DE,$2000 ; LENGTH OF FONT DATA LD C,31 ; DATA REGISTER +; CVDU_LOADFONT1: - LD A,(HL) ; LOAD NEXT BYTE OF FONT DATA - CALL CVDU_WR ; WRITE IT +; DEC DE ; DECREMENT LOOP COUNTER #IF (CVDUMON == CVDUMON_CGA) ; SKIP ALTERNATING 8 BYTE PAIRS (SEE COMMENT ABOVE) + ; WE ONLY GET NEXT REAL FONT BYTE IF BIT 3 OF COUNTER IS SET. BIT 3,E ; BIT 3 CHANGES WITH EVERY 8 BYTES - JR Z,CVDU_LOADFONT2 ; WHEN ZERO, DON'T INC FONT PTR + CALL NZ,FNT_NEXT ; LOAD NEXT FONT BYTE ONLY IF BIT IS ON +#ELSE + CALL FNT_NEXT ; LOAD NEXT FONT BYTE #ENDIF - INC HL ; INCREMENT FONT DATA POINTER -CVDU_LOADFONT2: +; + CALL CVDU_WR ; WRITE IT LD A,D ; CHECK DE... OR E ; FOR COUNTER EXHAUSTED - JR NZ,CVDU_LOADFONT1 ; LOOP TILL DONE - -#IF USELZSA2 - LD HL,(CVDU_STACK) ; ERASE DECOMPRESS BUFFER - LD SP,HL ; BY RESTORING THE STACK - RET ; DONE -CVDU_STACK .DW 0 -#ELSE + JR Z,CVDU_LOADFONT3 ; BAIL OUT IF DONE + JR CVDU_LOADFONT1 ; LOOP TILL DONE +; +CVDU_LOADFONT3: + XOR A ; SIGNAL SUCCESS RET -#ENDIF ; ;---------------------------------------------------------------------- ; SET CURSOR POSITION TO ROW IN D AND COLUMN IN E diff --git a/Source/HBIOS/hbios.asm b/Source/HBIOS/hbios.asm index 07631237..d8b4bb86 100644 --- a/Source/HBIOS/hbios.asm +++ b/Source/HBIOS/hbios.asm @@ -1372,7 +1372,7 @@ HB_ENTRYTBL .EQU $ ; JP HB_START ; HBIOS INITIALIZATION JP HB_DISPATCH ; VECTOR TO DISPATCHER - JP PRTSUM + ; JP PRTSUM ; !!! DO NOT ADD ADDTIONAL VECTORS HERE WITHOUT ; CHECKING W/ WAYNE !!! ; @@ -2149,32 +2149,32 @@ CB_IDS: LD (HL),A ; POPULATE CB_BIDCOM ; DISABLED AT THIS POINT. ; #IF (CPUFAM != CPU_EZ80) -#IF ((INTMODE == 2) | ((INTMODE == 1) & (CPUFAM == CPU_Z180))) + #IF ((INTMODE == 2) | ((INTMODE == 1) & (CPUFAM == CPU_Z180))) ; SETUP Z80 IVT AND INT MODE 2 LD A,HBX_IVT >> 8 ; SETUP HI BYTE OF IVT ADDRESS LD I,A ; ... AND PLACE IT IN I REGISTER - #IF (CPUFAM == CPU_Z180) + #IF (CPUFAM == CPU_Z180) ; SETUP Z180 IVT XOR A ; SETUP LO BYTE OF IVT ADDRESS OUT0 (Z180_IL),A ; ... AND PLACE IN Z180 IL REGISTER - #ENDIF + #ENDIF - #IF (INTMODE == 2) + #IF (INTMODE == 2) IM 2 ; SWITCH TO INT MODE 2 + #ENDIF #ENDIF -#ENDIF ; -#IF (MEMMGR == MM_Z280) + #IF (MEMMGR == MM_Z280) ; NOW POINT TO RAM COPY OF Z280 INT/TRAP TABLE ; HL IS TOP 16 BITS OF PHYSICAL ADDRESS OF IVT ; IVT *MUST* BE ON A 4K BOUNDARY LD C,Z280_VPR LD HL,0 + (((PBANK(BID_BIOS) << 15) + Z280_IVT) >> 8) LDCTL (C),HL -#ENDIF + #ENDIF ; -#IF (INTMODE == 3) + #IF (INTMODE == 3) ; ; SETUP Z280 INT A FOR VECTORED INTERRUPTS LD HL,%0010000000000000 @@ -2184,7 +2184,7 @@ CB_IDS: LD (HL),A ; POPULATE CB_BIDCOM ; TRANSITION TO INTERRUPT MODE 3 IM 3 ; -#ENDIF + #ENDIF #ENDIF ; ;-------------------------------------------------------------------------------------------------- @@ -3721,12 +3721,7 @@ INITSYS3: LD DE,STR_BANNER ; POINT TO BANNER CALL NZ,WRITESTR ; OUTPUT IF CONSOLE MOVED ; -;-------------------------------------------------------------------------------------------------- -; PRINT DEVICE SUMMARY -;-------------------------------------------------------------------------------------------------- -; INITSYS3A: - CALL PRTSUM ; PRINT UNIT/DEVICE SUMMARY TABLE ; ;-------------------------------------------------------------------------------------------------- ; DIAGNOSTIC ROUTINES @@ -3850,6 +3845,13 @@ DBG_NOTE: ; TRANSITION TO USER LAND ;-------------------------------------------------------------------------------------------------- ; +; WE CAN GET HERE 2 WAYS. ON A COLD START, WE JUST FALL THROUGH FROM +; ABOVE. ON A WARM START, INITSYS4 IS INVOKED FROM SYS_RESWARM. +; REGISTER E IS SET TO INDICATE WHICH OF THESE IF OCCURRING SO THAT +; ROMLDR CAN BEHAVE AS APPROPRIATE. +; + LD E,START_COLD ; SIGNAL A COLD START +; INITSYS4: ; ; IF Z280, WE NEED TO SWITCH TO USER MODE NOW. @@ -3870,12 +3872,14 @@ INITSYS4: LD C,Z280_MSR ; MASTER STATUS REGISTER LD HL,$4000 | $0B ; USER MODE W/ NORMAL INT MASK LDCTL (C),HL ; DO IT +#ELSE + LD SP,HBX_LOC ; STACK JUST BELOW HBIOS PROXY #ENDIF ; DIAG(0) ; CLEAR BOOT DIAG LED(S) FPLEDS(DIAG_00) ; CLEAR FP LEDS ; -; CHAIN TO LOADER +; CHAIN TO ROM LOADER (ROMLDR) ; #IFDEF ROMBOOT LD A,BID_IMG0 ; CHAIN TO OS IMAGES BANK @@ -5406,21 +5410,8 @@ SYS_RESINT: SYS_RESWARM: ; CALL SYS_RESINT ; HBIOS INTERNAL RESET -; -#IF (MEMMGR == MM_Z280) - JP INITSYS4 -#ELSE - ; PERFORM BANK CALL TO OS IMAGES BANK IN ROM - LD SP,HBX_LOC ; STACK JUST BELOW HBIOS PROXY - #IFDEF APPBOOT - LD A,BID_AUX ; IF APPBOOT, CHAIN TO AUX BANK - #ELSE - LD A,BID_IMG0 ; ELSE CHAIN TO OS IMAGES BANK - #ENDIF - LD IX,0 ; ENTER AT ADDRESS 0 - CALL HBX_BNKCALL ; GO THERE - JR $ ; HALT WE SHOULD NEVER COME BACK! -#ENDIF + LD E,START_WARM ; SIGNAL A WARM START + JP INITSYS4 ; DO OUR NORMAL USER LAND STARTUP ; ; RESTART SYSTEM AS THOUGH POWER HAD JUST BEEN TURNED ON ; @@ -5469,7 +5460,7 @@ SYS_RESUSER: ; IN0 A,(Z180_ITC) ; GET ITC REGISTER XOR $80 ; PRECLEAR TRAP BIT - RET M ; IF TRAP BIT NOT SET, DONE + JP M,SYS_RESUSER3 ; IF TRAP BIT NOT SET, DONE ; ; HANDLE INVALID OPCODE DEC HL ; BACK UP TO OPCODE START @@ -5503,6 +5494,7 @@ SYS_RESUSER2: ; #ENDIF ; +SYS_RESUSER3: ; RESET ACTIVE VIDEO DISPLAY ATTACHED TO EMULATOR CALL TERM_RESET ; @@ -8302,217 +8294,210 @@ HB_CPUSPD2: RET ; AND DONE #ENDIF ; CPUFAM != CPU_EZ80 ; -HB_UTIL_END .EQU $ -; ;================================================================================================== -; DISPLAY SUMMARY OF ATTACHED UNITS/DEVICES +; FONT MANAGEMENT ROUTINES ;================================================================================================== ; -HB_PRTSUM_BEG .EQU $ +; SELECT A FONT BASED ON THE FONT ID PASSED IN REGISTER A. THIS WILL +; PREPARE TO STREAM FONT DATA VIA THE FNT_NEXT ROUTINE. USES AF, BC, +; DE, AND HL. RETURNS ZERO (ZF SET) FOR SUCCESS OR NON-ZERO (ZF CLEAR) +; IF FONT NOT FOUND. ; -PRTSUM: - CALL NEWLINE2 ; SKIP A LINE - LD DE,PS_STRHDR ; POINT TO HEADER - CALL WRITESTR ; PRINT IT +#IF ROMFONTS +FNT_BNKID .EQU FONTS_BNK +FNT_MAP .EQU FONTS_LOC +#ELSE +FNT_BNKID .EQU BID_BIOS +#ENDIF +; +FNT_SELECT: + ;;;CALL PC_SPACE ; ** DEBUG *** + ;;;CALL PRTHEXBYTE ; ** DEBUG *** + LD E,A ; DESIRED FONT ID TO E + LD A,FNT_BNKID ; FONT BANK ID TO A + LD (FNT_BID),A ; SAVE IN WORKING VARIABLE + LD D,FNT_BNKID ; D = BANK FOR FONT DATA + LD HL,FNT_MAP ; POINT TO START OF MAP +; + ; FONT MAP TABLE BEGINS WITH A 2 BYTE SIGNATURE. ATTEMPTING + ; TO DECOMPRESS INVALID DATA WOULD BE VERY BAD. + CALL FNT_BYTE ; FIRST SIGNATURE BYTE + ;;;CALL PC_SPACE ; ** DEBUG *** + ;;;CALL COUT ; ** DEBUG *** + INC HL ; BUMP PTR + CP 'F' ; SHOULD BE 'F' + JR NZ,FNT_SELECT_ERR ; IF MISMATCH, BAIL OUT W/ ERR + CALL FNT_BYTE ; SECOND SIGNATURE BYTE + ;;;CALL COUT ; ** DEBUG *** + INC HL ; BUMP PTR + CP 'M' ; SHOULD BE 'M' + JR NZ,FNT_SELECT_ERR ; IF MISMATCH, BAIL OUT W/ ERR +; +FNT_SELECT0: + CALL FNT_BYTE ; LOAD THE FONT ID FROM MAP + ;;;CALL PC_SPACE ; ** DEBUG *** + ;;;CALL PRTHEXBYTE ; ** DEBUG *** + AND $7F ; MASK OUT COMP INDICATOR + OR A ; CHECK FOR END OF TABLE + JR Z,FNT_SELECT_ERR ; IF SO, BAIL OUT W/ ERR + CP E ; CHECK FOR DESIRED FONT ID + JR Z,FNT_SELECT1 ; IF SO, LOCK IT IN + INC HL ; BUMP PAST FONT ID + INC HL ; BUMP TO + INC HL ; ... NEXT TABLE ENTRY + JR FNT_SELECT0 ; AND LOOP +; +FNT_SELECT1: + CALL FNT_BYTE ; GET FONT ID BYTE + PUSH AF ; SAVE IT + LD C,A ; SAVE IT IN E + INC HL ; BUMP PAST FONT ID + CALL FNT_BYTE ; LO BYTE OF ADDRESS + LD E,A ; PUT IN E + INC HL ; BUMP + CALL FNT_BYTE ; HI BYTE OF ADDRESS + LD D,A ; PUT IN D + EX DE,HL ; FULL ADDRESS TO HL +; +;;;#IF ROMFONTS +;;; CALL PC_SPACE ; ** DEBUG *** +;;; LD A,'R' ; ** DEBUG *** +;;; CALL COUT ; ** DEBUG *** +;;;#ELSE +;;; CALL PC_SPACE ; ** DEBUG *** +;;; LD A,'H' ; ** DEBUG *** +;;; CALL COUT ; ** DEBUG *** +;;;#ENDIF ; - LD C,BF_SYSGET_CIOCNT ; CHARACTER DEVICES - LD HL,PS_SERIAL - CALL PRT_ALLD + POP AF ; RECOVER FONT ID + AND $80 ; COMPRESSED FONT DATA? + JR Z,FNT_SELECT2 ; IF NOT, SKIP DECOMP ; - LD C,BF_SYSGET_DIOCNT ; DISK DRIVES - LD HL,PS_DISK - CALL PRT_ALLD +#IF ((CVDUENABLE | GDCENABLE | TMSENABLE | VGAENABLE | VRCENABLE) & USELZSA2) ; - LD C,BF_SYSGET_VDACNT ; VIDEO DEVICES - LD HL,PS_VIDEO - CALL PRT_ALLD +; DECOMPRESS THE FONT DATA. WE USURP $E000-$EFFF AS A BUFFER FOR THE +; DECOMPRESSED DATA. IF THE FONT DATA IS IN ROM, WE FIRST COPY THE +; COMPRESSED DATA TO $D000-DFFF. THE BUFFER SIZES ARE LARGE ENOUGH TO +; CONTAIN THE LARGEST FONT IN ITS DECOMPRESSED STATE. THE BUFFER +; LOCATIONS ARE SAFE DURING BOOT, BUT *NOT* FOR A RUNNING SYSTEM. SO, +; ANY FONT THAT MUST BE RELOADED AFTER BOOT WILL NEED TO BE SAVED IN +; DECOMPRESSED STATE! SPECIFICALLY THE 6X8 TMS FONT. ; - LD C,BF_SYSGET_SNDCNT ; SOUND DEVICES - LD HL,PS_SOUND - CALL PRT_ALLD - RET + ;;;LD A,'C' ; ** DEBUG *** + ;;;CALL COUT ; ** DEBUG *** ; -PRT_ALLD: - LD B,BF_SYSGET ; FUNC: SYSTEM INFO GET - RST 08 ; E := UNIT COUNT - LD B,E ; MOVE TO B FOR LOOP COUNT - LD A,E ; MOVE TO ACCUM - OR A ; SET FLAGS - RET Z ; IF NONE, JUST RETURN - LD C,0 ; C WILL BE UNIT INDEX -PRT_ALLD1: - PUSH BC ; SAVE LOOP CONTROL - PUSH DE - PUSH HL - CALL JPHL ; CALL THE ROUTINE PASSED IN HL - POP HL - POP DE - POP BC ; RESTORE LOOP CONTROL - INC C ; BUMP UNIT INDEX - DJNZ PRT_ALLD1 ; LOOP THRU ALL DEVICES - RET + #IF ROMFONTS + ; COPY THE COMPRESSED DATA FROM ROM TO RAM BUFFER + LD A,(FNT_BID) ; GET ROM FONT BANK ID + LD (HB_SRCBNK),A ; SETUP SOURCE BANK + LD A,BID_BIOS ; DEST BANK IS BIOS BANK + LD (HB_DSTBNK),A ; SETUP DESTINATION BANK + LD DE,$D000 ; PUT DEST IN DE + LD BC,$1000 ; BLINDLY COPY 4K + CALL HBX_BNKCPY ; COPY COMP FONT DATA TO RAM +; + ; DO THE DECOMPRESSION + LD HL,$D000 ; COMP BUF ADR TO HL + LD DE,$E000 ; DECOMP BUF ADR TO DE + CALL DLZSA2 ; DECOMPRESS + LD A,BID_BIOS ; BANK OF DECOMP BUF + LD (FNT_BID),A ; UPDATE FNT_BID + LD HL,$E000 ; DECOMP BUF ADR TO HL + #ELSE + LD DE,$E000 ; DECOMP BUF ADR TO DE + CALL DLZSA2 ; DECOMPRESS + LD HL,$E000 ; DECOMP BUF ADR TO HL + #ENDIF ; -; PRINT ONE LINE DISK UNIT/DEVICE INFO, DISK UNIT INDEX IN C -; -PS_DISK: - PUSH BC ; SAVE UNIT INDEX FOR LATER -; - ; UNIT COLUMN - PRTS("Disk $") - LD A,C ; MOVE UNIT NUM TO A - CALL PRTDECB ; PRINT IT - CP 10 ; CHECK FOR MULTIPLE DIGITS - CALL C,PC_SPACE ; EXTRA SPACE IF NEEDED - PRTS(" $") ; PAD TO NEXT COLUMN -; - ; DEVICE COLUMN - LD B,BF_DIODEVICE ; FUNC=GET DEVICE INFO, UNIT NUM STILL IN C - RST 08 ; DE:=DEVTYP/NUM, C:=DISK ATTRIBUTES - PUSH BC ; SAVE ATTRIBUTES - LD HL,PS_DDMD ; POINT TO DISK DEVICE TYPE NAME TABLE - CALL PS_PRTDEV ; PRINT DISK DEVICE NMEMONIC PADDED TO FIELD WIDTH - POP DE ; RECOVER ATTRIBUTES TO DE - PUSH DE ; SAVE ATTRIBUTES AGAIN - CALL PS_PRTDT ; PRINT DISK TYPE - POP DE ; RESTORE ATTRIBUTES - POP BC ; RESTORE UNIT NUM - CALL PS_PRTDC ; PRINT DISK CAPACITY +#ELSE + JR FNT_SELECT_ERR ; OOPS, CAN'T DECOMPRESS +#ENDIF ; - CALL NEWLINE +FNT_SELECT2: + LD (FNT_PTR),HL ; SAVE STARTING POINTER + ;;;LD A,(FNT_BID) ; ** DEBUG *** + ;;;CALL PC_SPACE ; ** DEBUG *** + ;;;CALL PRTHEXBYTE ; ** DEBUG *** + ;;;LD HL,(FNT_PTR) ; ** DEBUG *** + ;;;CALL PC_SPACE ; ** DEBUG *** + ;;;CALL PRTHEXWORDHL ; ** DEBUG *** + XOR A ; SIGNAL SUCCESS RET -; -; PRINT DISK TYPE (DISK ATTRIBUTE IN E) -; -PS_PRTDT: - LD A,E ; ATTRIBUTES TO A - BIT 7,A ; FLOPPY BIT SET? - LD HL,PS_DTFLOP ; ASSUME FLOPPY - JP NZ,PS_PRT18 ; IF FLOPPY, JUMP AHEAD - LD C,E - LD DE,PS_DTHARD - LD A,00001111B - CALL PRTIDXMSK - CALL PS_PAD18 ; PAD TO 18 SPACES + +FNT_SELECT_ERR: + OR $FF ; SIGNAL FAILURE RET ; -; PRINT DISK CAPACITY (UNIT IN C, ATTRIBUTE IN E) -; -PS_PRTDC: -; - LD A,E ; ATTRIBUTE TO ACCUM - BIT 7,A ; TEST FOR FLOPPY - JR NZ,PS_PRTDC2 ; HANDLE FLOPPY - AND $0F ; ISOLATE TYPE BITS - CP 4 ; ROM DISK? - JR Z,PS_PRTDC1 ; PRINT CAPACITY IN KB - CP 5 ; RAM DISK? - JR Z,PS_PRTDC1 ; PRINT CAPACITY IN KB - CP 7 ; FLASH DISK? - JR Z,PS_PRTDC1 ; PRINT CAPACITY IN KB -; - ; PRINT HARD DISK STORAGE SIZE IN MB - LD B,BF_DIOCAP ; HBIOS FUNC: GET CAPACTIY - RST 08 ; DE:HL := BLOCKS - JP NZ,PS_PRTNUL ; MEDIA PROBLEM - RES 7,D ; CLEAR LBA BIT - LD B,11 ; 11 BIT SHIFT TO CONVERT BLOCKS --> MB - CALL SRL32 ; RIGHT SHIFT - CALL PRTDEC32 ; PRINT DWORD IN DECIMAL - PRTS("MB$") ; PRINT SUFFIX - CALL PC_COMMA - PRTS("LBA$") ; FOR NOW, WE ASSUME HARD DISK DOES LBA - RET ; DONE +; RETURN THE NEXT BYTE OF FONT DATA IN REGISTER A. EACH CALL RETURNS +; THE NEXT BYTE OF DATA. THERE IS NO INDICATION OF THE END OF THE +; FONT DATA. THE CALLER CONTROLS NUMBER OF BYTES REQUESTED. +; ONLY REGISTER A IS MODIFIED. ; -PS_PRTDC1: - ; PRINT ROM/RAM DISK CAPACITY IN KB - LD B,BF_DIOCAP ; HBIOS FUNC: GET CAPACTIY - RST 08 ; DE:HL := BLOCKS - JP NZ,PS_PRTNUL ; MEDIA PROBLEM - RES 7,D ; CLEAR LBA BIT - LD B,1 ; 11 BIT SHIFT TO CONVERT BLOCKS --> MB - CALL SRL32 ; RIGHT SHIFT - CALL PRTDEC32 ; PRINT DWORD IN DECIMAL - PRTS("KB$") ; PRINT SUFFIX - CALL PC_COMMA - PRTS("LBA$") ; FOR NOW, WE ASSUME HARD DISK DOES LBA - RET ; DONE -; -PS_PRTDC2: - LD C,E ; ATTRIBUTE TO C FOR SAFE KEEPING -; - LD A,%00011000 ; DISPLAY FORM FACTOR - LD DE,PS_FLP_FSTR ; WHICH IS DEFINED IN - CALL PRTIDXMSK ; BITS 5 AND 6. -; - LD A,%00000100 ; DISPLAY SIDES - LD DE,PS_FLP_SSTR ; WHICH IS DEFINED - CALL PRTIDXMSK ; IN BIT 4 -; - LD A,%00000011 ; DISPLAY DENSITY - LD DE,PS_FLP_DSTR ; WHICH IS DEFINED IN - CALL PRTIDXMSK ; BITS 2 AND 3. +FNT_NEXT: + PUSH HL + LD HL,(FNT_PTR) + CALL FNT_BYTE + INC HL + LD (FNT_PTR),HL + POP HL + RET ; - CALL PC_COMMA - PRTS("CHS$") ; FOR NOW, WE ASSUME HARD DISK DOES LBA +; HELPER FUNCTION TO RETRIEVE A BYTE OF ROM FONT DATA FROM THE +; ROM FONT BANK. RETURNS BYTE FROM (FNT_BID:HL). RETURNS BYTE IN A. +; ALL OTHER REGSITERS UNCHANGED. ; +FNT_BYTE: +#IF (MEMMGR == MM_Z280) + ; THERE IS A DEFICIENCY IN HBX_PEEK FOR Z280 W/ MM_Z280. + ; IT WILL NOT WORK WHEN CALLED FROM Z280 SYSTEM MODE. + ; THIS SHOULD BE REVISITED. + ; + ; NOTE: WHEN WE GO TO RESTORE THE USER SPACE BANK, WE DON'T + ; REALLY HAVE A GOOD SOURCE OF WHAT BANK ID TO RESTORE IT TO. + ; IN THEORY, WE ARE BEING INVOKED EITHER DURING SYSTEM BOOT OR + ; VIA HB_INVOKE. DURING SYSTEM BOOT, THE USER BANK IS NOT + ; RELEVANT. FOR HB_INVOKE, THE PREVIOUS USER BANK WILL BE + ; RECORDED IN HB_INVBNK. SO, WE BLINDLY USE HB_INVBNK. THIS + ; WILL BE CORRECT WHEN INVOKED VIA HB_INVOKE AND SHOULD DO NO + ; HARM WHEN INVOKED DURING SYSTEM BOOT. THIS REALLY NEEDS TO + ; BE REVIEWED. + ; + LD A,(FNT_BID) ; GET THE FONT BANK ID + PUSH BC ; SAVE BC + PUSH HL ; SAVE HL + LD B,$00 ; POINT TO USER PDRS + CALL Z280_BNKSEL ; SELECT Z280 USER BANK + POP HL ; RECOVER HL + PUSH HL ; AND RESAVE IT + LDUP A,(HL) ; GET THE BYTE FROM USER SPACE + PUSH AF ; SAVE THE BYTE + LD A,(HB_INVBNK) ; GET PRIOR BANK (SEE NOTE ABOVE) + LD B,$00 ; POINT TO USER PDRS + CALL Z280_BNKSEL ; SELECT IT + POP AF ; RECOVER VALUE + POP HL ; RECOVER HL + POP BC ; RECOVER BC RET ; DONE -; -; PRINT ONE LINE SERIAL UNIT/DEVICE INFO, SERIAL UNIT INDEX IN C -; -PS_SERIAL: - PUSH BC ; SAVE UNIT INDEX FOR LATER -; - ; UNIT COLUMN - PRTS("Char $") - LD A,C ; MOVE UNIT NUM TO A - CALL PRTDECB ; PRINT IT, ASSUME SINGLE DIGIT - PRTS(" $") ; PAD TO NEXT COLUMN -; - ; DEVICE COLUMN - LD B,BF_CIODEVICE ; FUNC=GET DEVICE INFO, UNIT NUM STILL IN C - RST 08 ; DE:=DEVTYP/NUM, C:=DEVICE ATTRIBUTES - PUSH BC ; SAVE ATTRIBUTES - LD HL,PS_SDUART ; POINT TO SERIAL DEVICE TYPE NAME TABLE - CALL PS_PRTDEV ; PRINT SERIAL DEVICE NMEMONIC PADDED TO FIELD WIDTH - POP BC ; RECOVER ATTRIBUTES - PUSH BC ; SAVE ATTRIBUTES AGAIN - CALL PS_PRTST ; PRINT SERIAL TYPE - POP BC ; RESTORE ATTRIBUTES - POP DE ; RESTORE UNIT NUM TO E - CALL PS_PRTSC ; PRINT SERIAL CONFIG -; - CALL NEWLINE +#ELSE + PUSH DE + LD A,(FNT_BID) + LD D,A + CALL SYS_PEEK + LD A,E + POP DE RET +#ENDIF ; -; PRINT CHARACTER TYPE (SERIAL ATTRIBUTE IN C) +FNT_BID .DB 0 ; BANK CONTAINING FONT DATA +FNT_PTR .DW 0 ; POINTER TO NEXT BYTE OF DATA ; -PS_PRTST: - LD HL,PS_STPPT - BIT 6,C - JP NZ,PS_PRT18 ; PARALLEL TYPE? - LD HL,PS_STRS232 ; ASSUME RS-232 - BIT 7,C ; 0=RS-232, 1=TERMINAL - JP Z,PS_PRT18 ; HANDLE TERMINAL TYPE - LD HL,PS_STTERM ; TYPE IS TERMINAL - JP PS_PRT18 +HB_UTIL_END .EQU $ ; -; PRINT SERIAL CONFIG (UNIT IN E, ATTRIBUTE IN C) +;================================================================================================== +; DISPLAY SUMMARY OF ATTACHED UNITS/DEVICES +;================================================================================================== ; -PS_PRTSC: - BIT 6,C ; PARALLEL TYPE? - JR NZ,PSPRTPC0 - - BIT 7,C ; 0=RS-232, 1=TERMINAL - JP NZ,PS_PRTSC1 ; PRINT TERMINAL CONFIG -; - ; PRINT RS-232 CONFIG - LD B,BF_CIOQUERY ; HBIOS FUNC: GET CIO CONFIG - LD C,E ; SET SERIAL UNIT NUM - RST 08 ; DE:HL := BAUD RATE - LD A,D ; TEST FOR $FF - AND E - INC A ; SET Z IF DE == $FF - JP Z,PS_PRTNUL ; $FF == NO CONFIG DEFINED +HB_PRTSUM_BEG .EQU $ ; PS_PRTSC0: ; PRINT BAUD RATE @@ -8562,209 +8547,6 @@ PS_PRTSC0: ; RET ; -PSPRTPC0: - LD B,BF_CIOQUERY ; HBIOS FUNC: GET CIO CONFIG - LD C,E ; SET PARALLEL UNIT NUM - RST 08 ; DE:HL := I/O SETTING - LD A,D ; TEST FOR $FF - AND E - INC A ; SET Z IF DE == $FF - JP Z,PS_PRTNUL ; $FF == NO CONFIG DEFINED -; -PS_PRTPC0: - LD C,E ; DISPLAY PIO TYPE - LD A,11000000B ; WHICH IS DEFINE BY - LD DE,PIO_MODE_STR ; BITS 6 AND 7 - JP PRTIDXMSK -; RET ; TRICK RETURN -; -PS_PRTSC1: - ; PRINT TERMINAL CONFIG - LD A,C ; GET ATTRIBUTE VALUE - CP $BF ; NO ATTACHED VDA - JR Z,PS_PRTSC2 - PRTS("Video $") ; FORMATTING - AND $0F ; ISOLATE VIDEO UNIT NUM - CALL PRTDECB ; PRINT IT - CALL PC_COMMA -#IF (VDAEMU == EMUTYP_TTY) - PRTS("TTY$") -#ENDIF -#IF (VDAEMU == EMUTYP_ANSI) - PRTS("ANSI$") -#ENDIF - RET -; -PS_PRTSC2: - PRTS("Term Module$") - CALL PC_COMMA - PRTS("ANSI$") - RET -; -; PRINT ONE LINE VIDEO UNIT/DEVICE INFO, VIDEO UNIT INDEX IN C -; -PS_VIDEO: - PUSH BC ; SAVE UNIT INDEX FOR LATER -; - ; UNIT COLUMN - PRTS("Video $") - LD A,C ; MOVE UNIT NUM TO A - CALL PRTDECB ; PRINT IT, ASSUME SINGLE DIGIT - PRTS(" $") ; PAD TO NEXT COLUMN -; - ; DEVICE COLUMN - LD B,BF_VDADEV ; FUNC=GET DEVICE INFO, UNIT NUM STILL IN C - RST 08 ; DE:=DEVTYP/NUM, H:=DISK ATTRIBUTES - PUSH BC ; SAVE ATTRIBUTES - LD HL,PS_VDVDU ; POINT TO VIDEO DEVICE TYPE NAME TABLE - CALL PS_PRTDEV ; PRINT VIDEO DEVICE NMEMONIC PADDED TO FIELD WIDTH - POP DE ; RECOVER ATTRIBUTES - PUSH DE ; SAVE ATTRIBUTES AGAIN - CALL PS_PRTVT ; PRINT VIDEO TYPE - POP DE ; RESTORE ATTRIBUTES - POP BC ; RESTORE UNIT NUM - CALL PS_PRTVC ; PRINT VIDEO CONFIG -; - CALL NEWLINE - RET -; -; PRINT VIDEO TYPE (VIDEO ATTRIBUTE IN E) -; -PS_PRTVT: - LD HL,PS_VTCRT ; ASSUME CRT - JP PS_PRT18 ; PRINT -; -; PRINT VIDEO CONFIG (UNIT IN C, ATTRIBUTE IN E) -; -PS_PRTVC: - PRTS("Text$") - CALL PC_COMMA - LD B,BF_VDAQRY ; FUNC: QUERY FOR VDA CONFIG - RST 08 ; D:=ROWS, E:=COLS - LD A,E - CALL PRTDECB - LD A,'x' - CALL COUT - LD A,D - CALL PRTDECB - RET -; -; PRINT SOUND CONFIG -; -PS_SOUND: - PUSH BC - - ; UNIT COLUMN - PRTS("Sound $") - LD A,C ; MOVE UNIT NUM TO A - CALL PRTDECB ; PRINT IT - CP 10 ; CHECK FOR MULTIPLE DIGITS - CALL C,PC_SPACE ; EXTRA SPACE IF NEEDED - PRTS(" $") ; PAD TO NEXT COLUMN - - ; DEVICE COLUMN - - PUSH BC - LD E,C - XOR A - LD DE,PS_SDSND ; POINT TO DEVICE TYPE NAME TABLE - CALL PRTIDXDEA ; PRINT DEVICE NMEMONIC PADDED TO FIELD WIDTH - LD A,C ; MOVE UNIT NUM TO A - CALL PRTDECB ; PRINT IT - CALL PC_COLON - LD A,(PRTIDXCNT) - SUB 12-1 ; SUBTRACT FIELD WIDTH (LESS THE COLON) - NEG ; MAKE IT A POSITIVE NUMBER - CALL PS_PAD ; PAD AS NEEDED - POP BC - - ; DEVICE TYPE -; - LD B,BF_SNDQUERY ; FUNC=GET DEVICE INFO, UNIT NUM STILL IN C - LD E,BF_SNDQ_DEV - RST 08 - PUSH BC - LD A,B - LD DE,PS_SDSN76489 - CALL PRTIDXDEA - CALL PS_PAD18 - POP BC -; - ; DEVICE CHARACTERISTICS -; - LD B,BF_SNDQUERY ; FUNC=GET DEVICE INFO, UNIT NUM STILL IN C - LD E,BF_SNDQ_CHCNT - RST 08 - LD A,B - CALL PRTDECB - LD A,'+' - CALL COUT - LD A,C - CALL PRTDECB - PRTS(" CHANNELS$") - CALL NEWLINE -; - POP BC - RET -; -; PRINT DEVICE NMEMONIC, DEVTYP/NUM SPECIFIED IN DE -; -PS_PRTDEV: - EX DE,HL - LD A,H ; TYPE ID - CALL PRTIDXDEA ; PRINT TYPE LABEL - LD A,L ; UNIT NUMBER - CALL PRTDECB ; PRINT NUM, ASSUME 1 CHAR - CALL PC_COLON ; PRINT COLON - LD A,(PRTIDXCNT) - SUB 12-2+1 ; 12 CHAR FIELD - 1 POS FOR UNIT NUM AND 1 POS FOR COLON - NEG - CALL PS_PAD ; PAD N SPACES (SPECIFIED IN A) - RET -; -; PRINT DEVICE MNEMONIC, DEVTYP/NUM SPECIFIED IN DE -; -PS_PRTNUL: - LD HL,PS_STRNUL - ; FALL THRU TO PS_PRT -; -; PRINT STRING AT (HL), $ TERM, RETURN CHARS PRINTED IN C -; -PS_PRT: LD C,0 ; INIT CHAR COUNT -PS_PRT1: - LD A,(HL) ; GET CHAR - INC HL ; BUMP INDEX - CP '$' ; TERM? - RET Z ; IF SO, DONE - CALL COUT ; PRINT IT - INC C ; BUMP COUNTER - JR PS_PRT1 ; AND LOOP -; -; PAD 18 CHARACTER FIELD -; -PS_PAD18: - LD A,(PRTIDXCNT) - LD C,A - JR PS_PRT18A -; -; PRINT STRING AT HL IN 18 CHARACTER FIELD -; -PS_PRT18: - CALL PS_PRT ; PRINT $ TERM STRING AT (HL), C:=CHARS PRINTED -PS_PRT18A: - LD A,18 ; 18 CHAR FIELD - SUB C -; CALL PS_PAD ; PAD N SPACES (SPECIFIED IN A) -; -; PAD N SPACES SPECIFIED IN A -; -PS_PAD: LD B,A - LD A,' ' -PS_PAD1: - CALL COUT - DJNZ PS_PAD1 - RET -; HB_CPU_STR: .TEXT " Z80$" .TEXT " Z80180$" .TEXT " Z8S180-K$" @@ -8772,127 +8554,8 @@ HB_CPU_STR: .TEXT " Z80$" .TEXT " Z80280$" .TEXT " eZ80$" ; -PS_STRNUL .TEXT "--$" ; DISPLAY STRING FOR NUL VALUE -; -; DISK DEVICE STRINGS -; -PS_DDMD .TEXT "MD$" -PS_DDFD .TEXT "FD$" -PS_DDRF .TEXT "RF$" -PS_DDIDE .TEXT "IDE$" -PS_DDATAPI .TEXT "ATAPI$" -PS_DDPPIDE .TEXT "PPIDE$" -PS_DDSD .TEXT "SD$" -PS_DDPRPSD .TEXT "PRPSD$" -PS_DDPPPSD .TEXT "PPPSD$" -PS_DDHDSK .TEXT "HDSK$" -PS_DDPPA .TEXT "PPA$" -PS_DDIMM .TEXT "IMM$" -PS_DDSYQ .TEXT "SYQ$" -PS_DDCHUSB .TEXT "CHUSB$" -PS_DDCHSD .TEXT "CHSD$" -PS_DDCHNATUSB .TEXT "USB$" -; -; DISK TYPE STRINGS -; -PS_DTFLOP .TEXT "Floppy Disk$" -PS_DTHARD .TEXT "Hard Disk$" -PS_DTCF .TEXT "CompactFlash$" -PS_DTSD .TEXT "SD Card$" -PS_DTUSB .TEXT "USB Drive$" -PS_DTROM .TEXT "ROM Disk$" -PS_DTRAM .TEXT "RAM Disk$" -PS_DTFSH .TEXT "Flash ROM$" -PS_DTRF .TEXT "RAM Floppy$" -PS_DTCD .TEXT "CD-ROM$" -PS_DTCRT .TEXT "Cartridge$" -PS_DTOUSBSCI .TEXT "SCSI$" -PS_DTOUSBUFI .TEXT "UFI$" -PS_DTOTHER .TEXT "???$" - -; -; FLOPPY ATTRIBUTE STRINGS -; -PS_FLP_FSTR: .TEXT "8\",$" ; PS_FLP8 - .TEXT "5.25\",$" ; PS_FLP5 - .TEXT "3.5\",$" ; PS_FLP3 - .TEXT "???\",$" ; PS_FLPN -; -PS_FLP_SSTR: .TEXT "SS/$" ; PS_FLPSS - .TEXT "DS/$" ; PS_FLPDS -; -PS_FLP_DSTR: .TEXT "SD$" ; PS_FLPSD - .TEXT "DD$" ; PS_FLPDD - .TEXT "HD$" ; PS_FLPHD - .TEXT "ED$" ; PS_FLPED -; -; CHARACTER DEVICE STRINGS -; -PS_SDUART .TEXT "UART$" -PS_SDASCI .TEXT "ASCI$" -PS_SDTERM .TEXT "TERM$" -PS_SDPRPCON .TEXT "PRPCON$" -PS_SDPPPCON .TEXT "PPPCON$" -PS_SDSIO .TEXT "SIO$" -PS_SDACIA .TEXT "ACIA$" -PS_SDPIO .TEXT "PIO$" -PS_SDUF .TEXT "UF$" -PS_SDDUART .TEXT "DUART$" -PS_SDZ2U .TEXT "Z2U$" -PS_SDLPT .TEXT "LPT$" -PS_SDESPCON .TEXT "ESPCON$" -PS_SDESPSER .TEXT "ESPSER$" -PS_SDSCON .TEXT "SCON$" -PS_SDSSER .TEXT "SSER$" -PS_SDEZ80 .TEXT "EZ80$" -; -; CHARACTER SUB TYPE STRINGS -; -PS_STRS232 .TEXT "RS-232$" -PS_STTERM .TEXT "Terminal$" -PS_STPPT .TEXT "Parallel$" -; PS_STPARMAP .DB "NONENMNS" ; -; PARALLEL TYPE STRINGS -; -PIO_MODE_STR: .TEXT "Output$" - .TEXT "Input$" - .TEXT "Bidirectional$" - .TEXT "BitCtrl$" -; -; VIDEO DEVICE STRINGS -; -PS_VDVDU .TEXT "VDU$" -PS_VDCVDU .TEXT "CVDU$" -PS_VDGDC .TEXT "GDC$" -PS_VDTMS .TEXT "TMS$" -PS_VDVGA .TEXT "VGA$" -PS_VDVRC .TEXT "VRC$" -PS_VDEF .TEXT "EF$" -PS_VDFV .TEXT "FV$" -PS_VDXOSERA .TEXT "XOSERA$" -; -; VIDEO TYPE STRINGS -; -PS_VTCRT .TEXT "CRT$" -; -; SOUND DEVICE STRINGS -; -PS_SDSND .TEXT "SND$" -; -; SOUND TYPE STRINGS -; -PS_SDSN76489 .TEXT "SN76489$" -PS_SDAY38910 .TEXT "AY-3-8910$" -PS_SDBITMODE .TEXT "I/O PORT$" -PS_SDYM2612 .TEXT "YM2612$" -; -; 0 1 2 3 4 5 6 7 -; 01234567890123456789012345678901234567890123456789012345678901234567890123456789 -PS_STRHDR .TEXT "Unit Device Type Capacity/Mode\r\n" - .TEXT "---------- ---------- ---------------- --------------------\r\n$" -; HB_PRTSUM_END .EQU $ ; ;================================================================================================== @@ -9560,68 +9223,88 @@ ORG_FONTS .EQU $ ; MEMECHO "FONTS" ; -#IFDEF USEFONT6X8 -FONT6X8: +#IF !ROMFONTS ; -; FOR NOW, WE NEVER COMPRESS THE 6X8 FONT. SEE TMS DRIVER. +; HIGH BIT OF THE FONTID BYTE INDICATES THAT THE FONT DATA IS COMPRESSED ; - #IF USELZSA2 & FALSE - #INCLUDE "font6x8c.asm" + #IF USELZSA2 +FNT_CMPMASK .EQU $80 #ELSE - #INCLUDE "font6x8u.asm" +FNT_CMPMASK .EQU $00 #ENDIF +; +; FONT LOCATION MAP +; +FNT_MAP: + .DB 'F','M' ; TABLE SIGNATURE + #IFDEF USEFONT6X8 + ; FOR NOW, WE NEVER COMPRESS THE 6X8 FONT. SEE TMS DRIVER. +;;; .DB FONTID_6X8 | FNT_CMPMASK + .DB FONTID_6X8 + .DW FONT6X8 + #ENDIF +; + #IFDEF USEFONT8X8 + .DB FONTID_8X8 | FNT_CMPMASK + .DW FONT8X8 + #ENDIF +; + #IFDEF USEFONT8X11 + .DB FONTID_8X11 | FNT_CMPMASK + .DW FONT8X11 + #ENDIF +; + #IFDEF USEFONT8X16 + .DB FONTID_8X16 | FNT_CMPMASK + .DW FONT8X16 + #ENDIF +; + .DB 0 ; END OF TABLE +; + #IFDEF USEFONT6X8 +FONT6X8: +; +; FOR NOW, WE NEVER COMPRESS THE 6X8 FONT. SEE TMS DRIVER. +; + #IF USELZSA2 & FALSE + #INCLUDE "font6x8c.asm" + #ELSE + #INCLUDE "font6x8u.asm" + #ENDIF MEMECHO " 6X8" -#ENDIF + #ENDIF ; -#IFDEF USEFONT8X8 + #IFDEF USEFONT8X8 FONT8X8: ; - #IF USELZSA2 - #INCLUDE "font8x8c.asm" - #ELSE - #INCLUDE "font8x8u.asm" - #ENDIF + #IF USELZSA2 + #INCLUDE "font8x8c.asm" + #ELSE + #INCLUDE "font8x8u.asm" + #ENDIF MEMECHO " 8X8" -#ENDIF + #ENDIF ; -#IFDEF USEFONT8X11 + #IFDEF USEFONT8X11 FONT8X11: - #IF USELZSA2 - #INCLUDE "font8x11c.asm" - #ELSE - #INCLUDE "font8x11u.asm" - #ENDIF + #IF USELZSA2 + #INCLUDE "font8x11c.asm" + #ELSE + #INCLUDE "font8x11u.asm" + #ENDIF MEMECHO " 8X11" -#ENDIF + #ENDIF ; -#IFDEF USEFONT8X16 + #IFDEF USEFONT8X16 FONT8X16: - #IF USELZSA2 - #INCLUDE "font8x16c.asm" - #ELSE - #INCLUDE "font8x16u.asm" - #ENDIF + #IF USELZSA2 + #INCLUDE "font8x16c.asm" + #ELSE + #INCLUDE "font8x16u.asm" + #ENDIF MEMECHO " 8X16" -#ENDIF -; -#IFDEF USEFONTCGA -FONTCGA: - #IF USELZSA2 - #INCLUDE "fontcgac.asm" - #ELSE - #INCLUDE "fontcgau.asm" #ENDIF - MEMECHO " CGA" -#ENDIF ; -#IFDEF USEFONTVGARC -FONTVGARC: - #IF USELZSA2 - #INCLUDE "fontvgarcc.asm" - #ELSE - #INCLUDE "fontvgarcu.asm" - #ENDIF - MEMECHO " VGARC" #ENDIF ; SIZ_FONTS .EQU $ - ORG_FONTS diff --git a/Source/HBIOS/hwmon.asm b/Source/HBIOS/hwmon.asm new file mode 100644 index 00000000..9c7121ac --- /dev/null +++ b/Source/HBIOS/hwmon.asm @@ -0,0 +1,30 @@ +; +;============================================================================= +; HWMON.ASM - BARE METAL HARDWARE MONITOR +;============================================================================= +; +; THIS IS JUST A STUB FOR NOW. +; +#INCLUDE "std.asm" +; +; MONITOR WILL BE LOADED AT HWMON_LOC +; + .ORG HWMON_LOC +; +; IT IS CRITICAL THAT THE FINAL BINARY BE EXACTLY HWMON_SIZ BYTES. +; THIS GENERATES FILLER AS NEEDED. IT WILL ALSO FORCE AN ASSEMBLY +; ERROR IF THE SIZE EXCEEDS THE SPACE ALLOCATED. +; +SLACK .EQU (HWMON_END - $) +; +#IF (SLACK < 0) + .ECHO "*** HWMON IS TOO BIG!!!\n" + !!! ; FORCE AN ASSEMBLY ERROR +#ENDIF +; + .FILL SLACK,$00 + .ECHO "Hardware Monitor space remaining: " + .ECHO SLACK + .ECHO " bytes.\n" +; + .END diff --git a/Source/HBIOS/invntdev.asm b/Source/HBIOS/invntdev.asm new file mode 100644 index 00000000..164015b8 --- /dev/null +++ b/Source/HBIOS/invntdev.asm @@ -0,0 +1,712 @@ +;============================================================================== +; DEVIVE INVENTORY - Inventory Device +; Version June-2025 +;============================================================================== +; +; This was extracted from HBIOS and converted into a ROM Application +; +; This is a program CALLED from RomLoader, and is specific to RomWBW +;------------------------------------------------------------------------------ +; +; Change Log: +; 2025-06-30 [MAP] Initial Release copied from HBIOS.ASM +;______________________________________________________________________________ +; +; Include Files +; +#include "std.asm" ; standard RomWBW constants +; +;***************************************************************************** +; +; APPLICATION WILL WILL BE LOADED AT DEV_LOC. THEREFORE, THE CODE +; MUST "ORG" AT THIS ADDRESS. TO CHANGE THE LOAD LOCATION OF THIS +; CODE, YOU CAN UPDATE DEV_LOC IN LAYOUT.INC +; + .ORG DEV_LOC +; +;***************************************************************************** +; INIT CODE +;***************************************************************************** +; +; +;***************************************************************************** +; Main Code starts here +;***************************************************************************** +; +PRTSUM: + CALL NEWLINE2 ; SKIP A LINE + LD DE,PS_STRHDR ; POINT TO HEADER + CALL WRITESTR ; PRINT IT +; + LD C,BF_SYSGET_CIOCNT ; CHARACTER DEVICES + LD HL,PS_SERIAL + CALL PRT_ALLD +; + LD C,BF_SYSGET_DIOCNT ; DISK DRIVES + LD HL,PS_DISK + CALL PRT_ALLD +; + LD C,BF_SYSGET_VDACNT ; VIDEO DEVICES + LD HL,PS_VIDEO + CALL PRT_ALLD +; + LD C,BF_SYSGET_SNDCNT ; SOUND DEVICES + LD HL,PS_SOUND + CALL PRT_ALLD + RET +; +;***************************************************************************** +; Supporting Code Stars Here +;***************************************************************************** +; +PRT_ALLD: + LD B,BF_SYSGET ; FUNC: SYSTEM INFO GET + RST 08 ; E := UNIT COUNT + LD B,E ; MOVE TO B FOR LOOP COUNT + LD A,E ; MOVE TO ACCUM + OR A ; SET FLAGS + RET Z ; IF NONE, JUST RETURN + LD C,0 ; C WILL BE UNIT INDEX +PRT_ALLD1: + PUSH BC ; SAVE LOOP CONTROL + PUSH DE + PUSH HL + CALL JPHL ; CALL THE ROUTINE PASSED IN HL + POP HL + POP DE + POP BC ; RESTORE LOOP CONTROL + INC C ; BUMP UNIT INDEX + DJNZ PRT_ALLD1 ; LOOP THRU ALL DEVICES + RET +; +; PRINT ONE LINE DISK UNIT/DEVICE INFO, DISK UNIT INDEX IN C +; +PS_DISK: + PUSH BC ; SAVE UNIT INDEX FOR LATER +; + ; UNIT COLUMN + PRTS("Disk $") + LD A,C ; MOVE UNIT NUM TO A + CALL PRTDECB ; PRINT IT + CP 10 ; CHECK FOR MULTIPLE DIGITS + CALL C,PC_SPACE ; EXTRA SPACE IF NEEDED + PRTS(" $") ; PAD TO NEXT COLUMN +; + ; DEVICE COLUMN + LD B,BF_DIODEVICE ; FUNC=GET DEVICE INFO, UNIT NUM STILL IN C + RST 08 ; DE:=DEVTYP/NUM, C:=DISK ATTRIBUTES + PUSH BC ; SAVE ATTRIBUTES + LD HL,PS_DDMD ; POINT TO DISK DEVICE TYPE NAME TABLE + CALL PS_PRTDEV ; PRINT DISK DEVICE NMEMONIC PADDED TO FIELD WIDTH + POP DE ; RECOVER ATTRIBUTES TO DE + PUSH DE ; SAVE ATTRIBUTES AGAIN + CALL PS_PRTDT ; PRINT DISK TYPE + POP DE ; RESTORE ATTRIBUTES + POP BC ; RESTORE UNIT NUM + CALL PS_PRTDC ; PRINT DISK CAPACITY +; + CALL NEWLINE + RET +; +; PRINT DISK TYPE (DISK ATTRIBUTE IN E) +; +PS_PRTDT: + LD A,E ; ATTRIBUTES TO A + BIT 7,A ; FLOPPY BIT SET? + LD HL,PS_DTFLOP ; ASSUME FLOPPY + JP NZ,PS_PRT18 ; IF FLOPPY, JUMP AHEAD + LD C,E + LD DE,PS_DTHARD + LD A,00001111B + CALL PRTIDXMSK + CALL PS_PAD18 ; PAD TO 18 SPACES + RET +; +; PRINT DISK CAPACITY (UNIT IN C, ATTRIBUTE IN E) +; +PS_PRTDC: +; + LD A,E ; ATTRIBUTE TO ACCUM + BIT 7,A ; TEST FOR FLOPPY + JR NZ,PS_PRTDC2 ; HANDLE FLOPPY + AND $0F ; ISOLATE TYPE BITS + CP 4 ; ROM DISK? + JR Z,PS_PRTDC1 ; PRINT CAPACITY IN KB + CP 5 ; RAM DISK? + JR Z,PS_PRTDC1 ; PRINT CAPACITY IN KB + CP 7 ; FLASH DISK? + JR Z,PS_PRTDC1 ; PRINT CAPACITY IN KB +; + ; PRINT HARD DISK STORAGE SIZE IN MB + LD B,BF_DIOCAP ; HBIOS FUNC: GET CAPACTIY + RST 08 ; DE:HL := BLOCKS + JP NZ,PS_PRTNUL ; MEDIA PROBLEM + RES 7,D ; CLEAR LBA BIT + LD B,11 ; 11 BIT SHIFT TO CONVERT BLOCKS --> MB + CALL SRL32 ; RIGHT SHIFT + CALL PRTDEC32 ; PRINT DWORD IN DECIMAL + PRTS("MB$") ; PRINT SUFFIX + CALL PC_COMMA + PRTS("LBA$") ; FOR NOW, WE ASSUME HARD DISK DOES LBA + RET ; DONE +; +PS_PRTDC1: + ; PRINT ROM/RAM DISK CAPACITY IN KB + LD B,BF_DIOCAP ; HBIOS FUNC: GET CAPACTIY + RST 08 ; DE:HL := BLOCKS + JP NZ,PS_PRTNUL ; MEDIA PROBLEM + RES 7,D ; CLEAR LBA BIT + LD B,1 ; 11 BIT SHIFT TO CONVERT BLOCKS --> MB + CALL SRL32 ; RIGHT SHIFT + CALL PRTDEC32 ; PRINT DWORD IN DECIMAL + PRTS("KB$") ; PRINT SUFFIX + CALL PC_COMMA + PRTS("LBA$") ; FOR NOW, WE ASSUME HARD DISK DOES LBA + RET ; DONE +; +PS_PRTDC2: + LD C,E ; ATTRIBUTE TO C FOR SAFE KEEPING +; + LD A,%00011000 ; DISPLAY FORM FACTOR + LD DE,PS_FLP_FSTR ; WHICH IS DEFINED IN + CALL PRTIDXMSK ; BITS 5 AND 6. +; + LD A,%00000100 ; DISPLAY SIDES + LD DE,PS_FLP_SSTR ; WHICH IS DEFINED + CALL PRTIDXMSK ; IN BIT 4 +; + LD A,%00000011 ; DISPLAY DENSITY + LD DE,PS_FLP_DSTR ; WHICH IS DEFINED IN + CALL PRTIDXMSK ; BITS 2 AND 3. +; + CALL PC_COMMA + PRTS("CHS$") ; FOR NOW, WE ASSUME HARD DISK DOES LBA +; + RET ; DONE +; +; PRINT ONE LINE SERIAL UNIT/DEVICE INFO, SERIAL UNIT INDEX IN C +; +PS_SERIAL: + PUSH BC ; SAVE UNIT INDEX FOR LATER +; + ; UNIT COLUMN + PRTS("Char $") + LD A,C ; MOVE UNIT NUM TO A + CALL PRTDECB ; PRINT IT, ASSUME SINGLE DIGIT + PRTS(" $") ; PAD TO NEXT COLUMN +; + ; DEVICE COLUMN + LD B,BF_CIODEVICE ; FUNC=GET DEVICE INFO, UNIT NUM STILL IN C + RST 08 ; DE:=DEVTYP/NUM, C:=DEVICE ATTRIBUTES + PUSH BC ; SAVE ATTRIBUTES + LD HL,PS_SDUART ; POINT TO SERIAL DEVICE TYPE NAME TABLE + CALL PS_PRTDEV ; PRINT SERIAL DEVICE NMEMONIC PADDED TO FIELD WIDTH + POP BC ; RECOVER ATTRIBUTES + PUSH BC ; SAVE ATTRIBUTES AGAIN + CALL PS_PRTST ; PRINT SERIAL TYPE + POP BC ; RESTORE ATTRIBUTES + POP DE ; RESTORE UNIT NUM TO E + CALL PS_PRTSC ; PRINT SERIAL CONFIG +; + CALL NEWLINE + RET +; +; PRINT CHARACTER TYPE (SERIAL ATTRIBUTE IN C) +; +PS_PRTST: + LD HL,PS_STPPT + BIT 6,C + JP NZ,PS_PRT18 ; PARALLEL TYPE? + LD HL,PS_STRS232 ; ASSUME RS-232 + BIT 7,C ; 0=RS-232, 1=TERMINAL + JP Z,PS_PRT18 ; HANDLE TERMINAL TYPE + LD HL,PS_STTERM ; TYPE IS TERMINAL + JP PS_PRT18 +; +; PRINT SERIAL CONFIG (UNIT IN E, ATTRIBUTE IN C) +; +PS_PRTSC: + BIT 6,C ; PARALLEL TYPE? + JR NZ,PSPRTPC0 + + BIT 7,C ; 0=RS-232, 1=TERMINAL + JP NZ,PS_PRTSC1 ; PRINT TERMINAL CONFIG +; + ; PRINT RS-232 CONFIG + LD B,BF_CIOQUERY ; HBIOS FUNC: GET CIO CONFIG + LD C,E ; SET SERIAL UNIT NUM + RST 08 ; DE:HL := BAUD RATE + LD A,D ; TEST FOR $FF + AND E + INC A ; SET Z IF DE == $FF + JP Z,PS_PRTNUL ; $FF == NO CONFIG DEFINED +; +PS_PRTSC0: + ; PRINT BAUD RATE + PUSH DE ; PRESERVE DE + LD A,D + AND $1F ; ISOLATE ENCODED BAUD RATE + LD L,A ; PUT IN L + LD H,0 ; H IS ALWAYS ZERO + LD DE,75 ; BAUD RATE DECODE CONSTANT + CALL DECODE ; DE:HL := BAUD RATE + LD BC,HB_BCDTMP ; POINT TO TEMP BCD BUF + CALL BIN2BCD ; CONVERT TO BCD + CALL PRTBCD ; AND PRINT IN DECIMAL + POP DE ; RESTORE DE +; + ; PRINT DATA BITS + PUSH DE ; PRESERVE DE + CALL PC_COMMA ; FORMATTING + LD A,E ; GET CONFIG BYTE + AND $03 ; ISOLATE DATA BITS VALUE + ADD A,'5' ; CONVERT TO CHARACTER + CALL COUT ; AND PRINT + POP DE ; RESTORE DE +; + ; PRINT PARITY + PUSH DE ; PRESERVE DE + CALL PC_COMMA ; FORMATTING + LD A,E ; GET CONFIG BYTE + RRCA ; SHIFT RELEVANT BITS + RRCA ; ... + RRCA ; ... + AND $07 ; AND ISOLATE DATA BITS VALUE + LD HL,PS_STPARMAP ; CHARACTER LOOKUP TABLE + CALL ADDHLA ; APPLY OFFSET + LD A,(HL) ; GET CHARACTER + CALL COUT ; AND PRINT + POP DE ; RESTORE DE +; + ; PRINT STOP BITS + CALL PC_COMMA ; FORMATTING + LD A,E ; GET CONFIG BYTE + RRCA ; SHIFT RELEVANT BITS + RRCA ; ... + AND $01 ; AND ISOLATE DATA BITS VALUE + ADD A,'1' ; MAKE IT A CHARACTER + CALL COUT ; AND PRINT +; + RET +; +PSPRTPC0: + LD B,BF_CIOQUERY ; HBIOS FUNC: GET CIO CONFIG + LD C,E ; SET PARALLEL UNIT NUM + RST 08 ; DE:HL := I/O SETTING + LD A,D ; TEST FOR $FF + AND E + INC A ; SET Z IF DE == $FF + JP Z,PS_PRTNUL ; $FF == NO CONFIG DEFINED +; +PS_PRTPC0: + LD C,E ; DISPLAY PIO TYPE + LD A,11000000B ; WHICH IS DEFINE BY + LD DE,PIO_MODE_STR ; BITS 6 AND 7 + JP PRTIDXMSK +; RET ; TRICK RETURN +; +PS_PRTSC1: + ; PRINT TERMINAL CONFIG + LD A,C ; GET ATTRIBUTE VALUE + CP $BF ; NO ATTACHED VDA + JR Z,PS_PRTSC2 + PRTS("Video $") ; FORMATTING + AND $0F ; ISOLATE VIDEO UNIT NUM + CALL PRTDECB ; PRINT IT + CALL PC_COMMA +#IF (VDAEMU == EMUTYP_TTY) + PRTS("TTY$") +#ENDIF +#IF (VDAEMU == EMUTYP_ANSI) + PRTS("ANSI$") +#ENDIF + RET +; +PS_PRTSC2: + PRTS("Term Module$") + CALL PC_COMMA + PRTS("ANSI$") + RET +; +; PRINT ONE LINE VIDEO UNIT/DEVICE INFO, VIDEO UNIT INDEX IN C +; +PS_VIDEO: + PUSH BC ; SAVE UNIT INDEX FOR LATER +; + ; UNIT COLUMN + PRTS("Video $") + LD A,C ; MOVE UNIT NUM TO A + CALL PRTDECB ; PRINT IT, ASSUME SINGLE DIGIT + PRTS(" $") ; PAD TO NEXT COLUMN +; + ; DEVICE COLUMN + LD B,BF_VDADEV ; FUNC=GET DEVICE INFO, UNIT NUM STILL IN C + RST 08 ; DE:=DEVTYP/NUM, H:=DISK ATTRIBUTES + PUSH BC ; SAVE ATTRIBUTES + LD HL,PS_VDVDU ; POINT TO VIDEO DEVICE TYPE NAME TABLE + CALL PS_PRTDEV ; PRINT VIDEO DEVICE NMEMONIC PADDED TO FIELD WIDTH + POP DE ; RECOVER ATTRIBUTES + PUSH DE ; SAVE ATTRIBUTES AGAIN + CALL PS_PRTVT ; PRINT VIDEO TYPE + POP DE ; RESTORE ATTRIBUTES + POP BC ; RESTORE UNIT NUM + CALL PS_PRTVC ; PRINT VIDEO CONFIG +; + CALL NEWLINE + RET +; +; PRINT VIDEO TYPE (VIDEO ATTRIBUTE IN E) +; +PS_PRTVT: + LD HL,PS_VTCRT ; ASSUME CRT + JP PS_PRT18 ; PRINT +; +; PRINT VIDEO CONFIG (UNIT IN C, ATTRIBUTE IN E) +; +PS_PRTVC: + PRTS("Text$") + CALL PC_COMMA + LD B,BF_VDAQRY ; FUNC: QUERY FOR VDA CONFIG + RST 08 ; D:=ROWS, E:=COLS + LD A,E + CALL PRTDECB + LD A,'x' + CALL COUT + LD A,D + CALL PRTDECB + RET +; +; PRINT SOUND CONFIG +; +PS_SOUND: + PUSH BC + + ; UNIT COLUMN + PRTS("Sound $") + LD A,C ; MOVE UNIT NUM TO A + CALL PRTDECB ; PRINT IT + CP 10 ; CHECK FOR MULTIPLE DIGITS + CALL C,PC_SPACE ; EXTRA SPACE IF NEEDED + PRTS(" $") ; PAD TO NEXT COLUMN + + ; DEVICE COLUMN + + PUSH BC + LD E,C + XOR A + LD DE,PS_SDSND ; POINT TO DEVICE TYPE NAME TABLE + CALL PRTIDXDEA ; PRINT DEVICE NMEMONIC PADDED TO FIELD WIDTH + LD A,C ; MOVE UNIT NUM TO A + CALL PRTDECB ; PRINT IT + CALL PC_COLON + LD A,(PRTIDXCNT) + SUB 12-1 ; SUBTRACT FIELD WIDTH (LESS THE COLON) + NEG ; MAKE IT A POSITIVE NUMBER + CALL PS_PAD ; PAD AS NEEDED + POP BC + + ; DEVICE TYPE +; + LD B,BF_SNDQUERY ; FUNC=GET DEVICE INFO, UNIT NUM STILL IN C + LD E,BF_SNDQ_DEV + RST 08 + PUSH BC + LD A,B + LD DE,PS_SDSN76489 + CALL PRTIDXDEA + CALL PS_PAD18 + POP BC +; + ; DEVICE CHARACTERISTICS +; + LD B,BF_SNDQUERY ; FUNC=GET DEVICE INFO, UNIT NUM STILL IN C + LD E,BF_SNDQ_CHCNT + RST 08 + LD A,B + CALL PRTDECB + LD A,'+' + CALL COUT + LD A,C + CALL PRTDECB + PRTS(" CHANNELS$") + CALL NEWLINE +; + POP BC + RET +; +; PRINT DEVICE NMEMONIC, DEVTYP/NUM SPECIFIED IN DE +; +PS_PRTDEV: + EX DE,HL + LD A,H ; TYPE ID + CALL PRTIDXDEA ; PRINT TYPE LABEL + LD A,L ; UNIT NUMBER + CALL PRTDECB ; PRINT NUM, ASSUME 1 CHAR + CALL PC_COLON ; PRINT COLON + LD A,(PRTIDXCNT) + SUB 12-2+1 ; 12 CHAR FIELD - 1 POS FOR UNIT NUM AND 1 POS FOR COLON + NEG + CALL PS_PAD ; PAD N SPACES (SPECIFIED IN A) + RET +; +; PRINT DEVICE MNEMONIC, DEVTYP/NUM SPECIFIED IN DE +; +PS_PRTNUL: + LD HL,PS_STRNUL + ; FALL THRU TO PS_PRT +; +; PRINT STRING AT (HL), $ TERM, RETURN CHARS PRINTED IN C +; +PS_PRT: LD C,0 ; INIT CHAR COUNT +PS_PRT1: + LD A,(HL) ; GET CHAR + INC HL ; BUMP INDEX + CP '$' ; TERM? + RET Z ; IF SO, DONE + CALL COUT ; PRINT IT + INC C ; BUMP COUNTER + JR PS_PRT1 ; AND LOOP +; +; PAD 18 CHARACTER FIELD +; +PS_PAD18: + LD A,(PRTIDXCNT) + LD C,A + JR PS_PRT18A +; +; PRINT STRING AT HL IN 18 CHARACTER FIELD +; +PS_PRT18: + CALL PS_PRT ; PRINT $ TERM STRING AT (HL), C:=CHARS PRINTED +PS_PRT18A: + LD A,18 ; 18 CHAR FIELD + SUB C +; CALL PS_PAD ; PAD N SPACES (SPECIFIED IN A) +; +; PAD N SPACES SPECIFIED IN A +; +PS_PAD: LD B,A + LD A,' ' +PS_PAD1: + CALL COUT + DJNZ PS_PAD1 + RET +; +;***************************************************************************** +; Support Routines +;***************************************************************************** +; +; TODO Ideally we wouldnt import all these here, as they take up quite a +; bit of space. Util.asm needs to be broken up, or copy required code here +; +#include "util.asm" +#include "decode.asm" +#include "bcd.asm" +; +;======================================================================= +; Console character I/O helper routines (registers preserved) +;======================================================================= +; +#if (BIOS == BIOS_WBW) +; +; Output character from A +; +COUT: + ; Save all incoming registers + push af + push bc + push de + push hl +; + ; Output character to console via HBIOS + ld e,a ; output char to E + ld c,CIO_CONSOLE ; output to current HBIOS console + ld b,BF_CIOOUT ; HBIOS func: output char + rst 08 ; HBIOS outputs character +; + ; Restore all registers + pop hl + pop de + pop bc + pop af + ret +; +#endif +; +#if (BIOS == BIOS_UNA) +; +; Output character from A +; +COUT: + ; Save all incoming registers + push af + push bc + push de + push hl +; + ; Output character to console via UBIOS + ld e,a + ld bc,$12 + rst 08 +; + ; Restore all registers + pop hl + pop de + pop bc + pop af + ret +; +#endif +; +;=============================================================================== +; Static Strings and Data +;=============================================================================== +; +PS_STRNUL .TEXT "--$" ; DISPLAY STRING FOR NUL VALUE +; +; DISK DEVICE STRINGS +; +PS_DDMD .TEXT "MD$" +PS_DDFD .TEXT "FD$" +PS_DDRF .TEXT "RF$" +PS_DDIDE .TEXT "IDE$" +PS_DDATAPI .TEXT "ATAPI$" +PS_DDPPIDE .TEXT "PPIDE$" +PS_DDSD .TEXT "SD$" +PS_DDPRPSD .TEXT "PRPSD$" +PS_DDPPPSD .TEXT "PPPSD$" +PS_DDHDSK .TEXT "HDSK$" +PS_DDPPA .TEXT "PPA$" +PS_DDIMM .TEXT "IMM$" +PS_DDSYQ .TEXT "SYQ$" +PS_DDCHUSB .TEXT "CHUSB$" +PS_DDCHSD .TEXT "CHSD$" +PS_DDCHNATUSB .TEXT "USB$" +; +; DISK TYPE STRINGS +; +PS_DTFLOP .TEXT "Floppy Disk$" +PS_DTHARD .TEXT "Hard Disk$" +PS_DTCF .TEXT "CompactFlash$" +PS_DTSD .TEXT "SD Card$" +PS_DTUSB .TEXT "USB Drive$" +PS_DTROM .TEXT "ROM Disk$" +PS_DTRAM .TEXT "RAM Disk$" +PS_DTFSH .TEXT "Flash ROM$" +PS_DTRF .TEXT "RAM Floppy$" +PS_DTCD .TEXT "CD-ROM$" +PS_DTCRT .TEXT "Cartridge$" +PS_DTOUSBSCI .TEXT "SCSI$" +PS_DTOUSBUFI .TEXT "UFI$" +PS_DTOTHER .TEXT "???$" + +; +; FLOPPY ATTRIBUTE STRINGS +; +PS_FLP_FSTR: .TEXT "8\",$" ; PS_FLP8 + .TEXT "5.25\",$" ; PS_FLP5 + .TEXT "3.5\",$" ; PS_FLP3 + .TEXT "???\",$" ; PS_FLPN +; +PS_FLP_SSTR: .TEXT "SS/$" ; PS_FLPSS + .TEXT "DS/$" ; PS_FLPDS +; +PS_FLP_DSTR: .TEXT "SD$" ; PS_FLPSD + .TEXT "DD$" ; PS_FLPDD + .TEXT "HD$" ; PS_FLPHD + .TEXT "ED$" ; PS_FLPED +; +; CHARACTER DEVICE STRINGS +; +PS_SDUART .TEXT "UART$" +PS_SDASCI .TEXT "ASCI$" +PS_SDTERM .TEXT "TERM$" +PS_SDPRPCON .TEXT "PRPCON$" +PS_SDPPPCON .TEXT "PPPCON$" +PS_SDSIO .TEXT "SIO$" +PS_SDACIA .TEXT "ACIA$" +PS_SDPIO .TEXT "PIO$" +PS_SDUF .TEXT "UF$" +PS_SDDUART .TEXT "DUART$" +PS_SDZ2U .TEXT "Z2U$" +PS_SDLPT .TEXT "LPT$" +PS_SDESPCON .TEXT "ESPCON$" +PS_SDESPSER .TEXT "ESPSER$" +PS_SDSCON .TEXT "SCON$" +PS_SDSSER .TEXT "SSER$" +PS_SDEZ80 .TEXT "EZ80$" +; +; CHARACTER SUB TYPE STRINGS +; +PS_STRS232 .TEXT "RS-232$" +PS_STTERM .TEXT "Terminal$" +PS_STPPT .TEXT "Parallel$" +; +PS_STPARMAP .DB "NONENMNS" +; +; PARALLEL TYPE STRINGS +; +PIO_MODE_STR: .TEXT "Output$" + .TEXT "Input$" + .TEXT "Bidirectional$" + .TEXT "BitCtrl$" +; +; VIDEO DEVICE STRINGS +; +PS_VDVDU .TEXT "VDU$" +PS_VDCVDU .TEXT "CVDU$" +PS_VDGDC .TEXT "GDC$" +PS_VDTMS .TEXT "TMS$" +PS_VDVGA .TEXT "VGA$" +PS_VDVRC .TEXT "VRC$" +PS_VDEF .TEXT "EF$" +PS_VDFV .TEXT "FV$" +PS_VDXOSERA .TEXT "XOSERA$" +; +; VIDEO TYPE STRINGS +; +PS_VTCRT .TEXT "CRT$" +; +; SOUND DEVICE STRINGS +; +PS_SDSND .TEXT "SND$" +; +; SOUND TYPE STRINGS +; +PS_SDSN76489 .TEXT "SN76489$" +PS_SDAY38910 .TEXT "AY-3-8910$" +PS_SDBITMODE .TEXT "I/O PORT$" +PS_SDYM2612 .TEXT "YM2612$" +; +; 0 1 2 3 4 5 6 7 +; 01234567890123456789012345678901234567890123456789012345678901234567890123456789 +PS_STRHDR .TEXT "Unit Device Type Capacity/Mode\r\n" + .TEXT "---------- ---------- ---------------- --------------------\r\n$" +; +;=============================================================================== +; Working data +;=============================================================================== +; +HB_BCDTMP .FILL 5,0 ; BCD NUMBER STORAGE (TEMP) +; +;=============================================================================== +; +; IT IS CRITICAL THAT THE FINAL BINARY BE EXACTLY DEV_SIZ BYTES. +; THIS GENERATES FILLER AS NEEDED. IT WILL ALSO FORCE AN ASSEMBLY +; ERROR IF THE SIZE EXCEEDS THE SPACE ALLOCATED. +; +SLACK .EQU (DEV_END - $) +; +#IF (SLACK < 0) + .ECHO "*** INVENTORY SLICE IS TOO BIG!!!\n" + !!! ; FORCE AN ASSEMBLY ERROR +#ENDIF +; + .FILL SLACK,$00 + .ECHO "INVNTDEV Device Inventory space remaining: " + .ECHO SLACK + .ECHO " bytes.\n" +; +;=============================================================================== +; +.END diff --git a/Source/HBIOS/invntslc.asm b/Source/HBIOS/invntslc.asm new file mode 100644 index 00000000..652c273d --- /dev/null +++ b/Source/HBIOS/invntslc.asm @@ -0,0 +1,398 @@ +;============================================================================== +; SLICE INVENTORY - Inventory Slice +; Version June-2025 +;============================================================================== +; +; Author: Mark Pruden +; +; This is a SUBSET of SLABEL.ASM -> Please See this program also when +; making changes, as most of the code found here exists there also +; +; This is a program CALLED from RomLoader, and is specific to RomWBW +; +; See SLABEL.ASM for ALL other Notes about This program. +;------------------------------------------------------------------------------ +; +; Change Log: +; 2025-06-30 [MAP] Initial v1.0 release for distribution +;______________________________________________________________________________ +; +; Include Files +; +#include "./hbios.inc" +#include "./layout.inc" +;______________________________________________________________________________ +; +; General operational equates (should not requre adjustment) +; +sigbyte1 .equ $A5 ; 1st sig byte boot info sector (bb_sig) +sigbyte2 .equ $5A ; 2nd sig byte boot info sector (bb_sig) +; +labelterm .equ '$' ; terminating charater for disk label +; +;***************************************************************************** +; +; 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 SLC_LOC IN LAYOUT.INC +; + .ORG SLC_LOC +; +;***************************************************************************** +; Main Code (shared) starts here +;***************************************************************************** +; +; Print list of all slices +; +prtslc: + ld de,PRTSLC_HDR ; Header for list of Slices + call prtstr ; Print It + ; + ld bc,BC_SYSGET_DIOCNT ; FUNC: SYSTEM INFO GET DISK DRIVES + rst 08 ; E := UNIT COUNT + ; + ld b,e ; MOVE Disk CNT TO B FOR LOOP COUNT + ld c,0 ; C WILL BE UNIT INDEX +prtslc1: + ld a,b ; loop counter + or a ; set flags + ret z ; IF no more drives, finished + ; + ld a,c ; unit index + ld (currunit),a ; store the unit number + ; + push bc ; save loop vars + call prtslc2 ; for each disk Unit, print its details + pop bc ; restore loop variables + ; + inc c ; bump the unit number + djnz prtslc1 ; main disk loop + ; +prtslcfin: + ret ; loop has finished, RETURN +; +;***************************************************************************** +; Supporting Code Stars Here +;***************************************************************************** +; +; Print list of All Slices for a given Unit +; +prtslc2: + ; get the media infor + ld b,BF_DIOMEDIA ; get media information + ld e,1 ; with media discovery + rst 08 ; do media discovery + ret nz ; an error + ; + ld a,MID_HD ; hard disk + cp e ; is it hard disk + ret nz ; if not noting to do + ; + ; setup the loop + ld b,64 ; arbitrary (?) number of slices to check. + ; NOTE: could be higher, but each slice check has disk IO + ld c,0 ; starting at slice 0 +; +prtslc2a: + ld a,c ; slice number + ld (currslice),a ; save slice number + ; + push bc ; save loop + call prtslc3 ; print detals of the slice + pop bc ; restore loop + ret nz ; if error dont continie + ; + inc c ; next slice number + djnz prtslc2a ; loop if more slices + ; + ret ; return from Slice Loop +; +;------------------------------------------------------------------------------- +; Print details of a Slice for a given Unit/Slice +; +prtslc3: + ; get the details of the device / slice + ld a,(currunit) + ld d,a ; unit + ld a,(currslice) + ld e,a ; slice + ld b,BF_EXTSLICE ; EXT function to check compute slice offset + rst 08 ; noting this call checks partition table. + ret NZ ; an error, for lots of reasons, e.g. Slice not valid + ; + call thirdsector ; point to the third sector of partition + ; + call diskread ; do the sector read + ret nz ; read error. exit the slice loop + ; + ; Check signature + ld bc,(bb_sig) ; get signature read + ld a,sigbyte1 ; expected value of first byte + cp b ; compare + jr nz,prtslc5 ; ignore missing signature and loop + ld a,sigbyte2 ; expected value of second byte + cp c ; compare + jr nz,prtslc5 ; ignore missing signature and loop + ; + ; Print volume label string at HL, '$' terminated, 16 chars max + ld a,(currunit) + call prtdecb ; print unit number as decimal + call pdot ; print a DOT + ld a,(currslice) + call prtdecb + ld a,' ' + call cout ; print a space + call cout ; print a space + ld hl,bb_label ; point to label + call pvol ; print it + call crlf + ; +prtslc5: + xor a + ret +; +;------------------------------------------------------------------------------- +; Print volume label string at HL, '$' terminated, 16 chars max +; +pvol: + ld b,16 ; init max char downcounter +pvol1: + ld a,(hl) ; get next character + cp labelterm ; set flags based on terminator $ + inc hl ; bump pointer regardless + ret z ; done if null + call cout ; display character + djnz pvol1 ; loop till done + ret ; hit max of 16 chars +; +;------------------------------------------------------------------------------- +; advance the DE HL LBA sector by 2, ie third sector +; +thirdsector: + ld bc,2 ; sector offset + add hl,bc ; add to LBA value low word + jr nc,sectornum ; check for carry + inc de ; if so, bump high word +sectornum: + ld (lba),hl ; update lba, low word + ld (lba+2),de ; update lba, high word + ret +; +;=============================================================================== +; +; Read disk sector(s) +; DE:HL is LBA, B is sector count, C is disk unit +; +diskread: +; + ; Seek to requested sector in DE:HL + ld a,(currunit) + ld c,a ; from the specified unit + set 7,d ; set LBA access flag + ld b,BF_DIOSEEK ; HBIOS func: seek + rst 08 ; do it + ret nz ; handle error +; + ; Read sector(s) into buffer + ld a,(currunit) + ld c,a ; from the specified unit + ld e,1 ; read 1 sector + ld hl,(dma) ; read into info sec buffer + ld a,(BID_USR) ; get user bank to accum + ld d,a ; and move to D + ld b,BF_DIOREAD ; HBIOS func: disk read + rst 08 ; do it + ret ; and done +; +;***************************************************************************** +; SUPPORT ROUTINES +;***************************************************************************** +; +; Print a dot on console +; +pdot: + push af + ld a,'.' + call cout + pop af + ret +; +;------------------------------------------------------------------------------- +; Print character in A without destroying any registers +; NOTE THIS CODE IS SPECIFIC AS IT USES HBIOS DIRECTLY +; +prtchr: +cout: + push af ; save registers + push bc + push de + push hl + LD B,BF_CIOOUT + LD C,CIO_CONSOLE + LD E,A + RST 08 + pop hl ; restore registers + pop de + pop bc + pop af + ret +; +;------------------------------------------------------------------------------- +; Start a newline on console (cr/lf) +; +crlf2: + call crlf ; two of them +crlf: + push af ; preserve AF + ld a,13 ; + call prtchr ; print it + ld a,10 ; + call prtchr ; print it + pop af ; restore AF + ret +; +;------------------------------------------------------------------------------- +; Print a zero terminated string at (de) without destroying any registers +; +prtstr: + push af + push de +; +prtstr1: + ld a,(de) ; get next char + or a + jr z,prtstr2 + call prtchr + inc de + jr prtstr1 +; +prtstr2: + pop de ; restore registers + pop af + ret +; +;------------------------------------------------------------------------------- +; Print value of a in decimal with leading zero suppression +; +prtdecb: + push hl + push af + ld l,a + ld h,0 + call prtdec + pop af + pop hl + ret +; +;------------------------------------------------------------------------------- +; Print value of HL in decimal with leading zero suppression +; +prtdec: + push bc + push de + push hl + ld e,'0' + ld bc,-10000 + call prtdec1 + ld bc,-1000 + call prtdec1 + ld bc,-100 + call prtdec1 + ld c,-10 + call prtdec1 + ld e,0 + ld c,-1 + call prtdec1 + pop hl + pop de + pop bc + ret +prtdec1: + ld a,'0' - 1 +prtdec2: + inc a + add hl,bc + jr c,prtdec2 + sbc hl,bc + cp e + jr z,prtdec3 + ld e,0 + call cout +prtdec3: + ret +; +;=============================================================================== +; +PRTSLC_HDR .TEXT "\r\n\r\n" + .TEXT "Un.Sl Drive \r\n" + .TEXT "----- ----------------\r\n" + .DB 0 +; +;=============================================================================== +; Working data +;=============================================================================== +; +currunit .db 0 ; parameters for disk unit, current unit +currslice .db 0 ; parameters for disk slice, current slice +lba .dw 0, 0 ; lba address (4 bytes), of slice +; +BID_USR .db 0 ; Bank ID for user bank +dma .dw bl_infosec ; address for disk buffer +; +;=============================================================================== +; +; IT IS CRITICAL THAT THE FINAL BINARY BE EXACTLY SLC_SIZ BYTES. +; THIS GENERATES FILLER AS NEEDED. IT WILL ALSO FORCE AN ASSEMBLY +; ERROR IF THE SIZE EXCEEDS THE SPACE ALLOCATED. +; +SLACK .EQU (SLC_END - $) +; +#IF (SLACK < 0) + .ECHO "*** INVENTORY SLICE IS TOO BIG!!!\n" + !!! ; FORCE AN ASSEMBLY ERROR +#ENDIF +; + .FILL SLACK,$00 + .ECHO "INVNTSLC Slice Inventory space remaining: " + .ECHO SLACK + .ECHO " bytes.\n" +; +;=============================================================================== +; Disk Buffer +;=============================================================================== +; + ; define origin of disk buffer = 9000 + ; Note this shares SAME Buffer Address as ROMLDR + .org $9000 +; +; Below is copied from ROM LDR +; Boot info sector is read into area below. +; The third sector of a disk device is reserved for boot info. +; +bl_infosec .equ $ + .ds (512 - 128) +bb_metabuf .equ $ +bb_sig .ds 2 ; signature (0xA55A if set) +bb_platform .ds 1 ; formatting platform +bb_device .ds 1 ; formatting device +bb_formatter .ds 8 ; formatting program +bb_drive .ds 1 ; physical disk drive # +bb_lu .ds 1 ; logical unit (lu) + .ds 1 ; msb of lu, now deprecated + .ds (bb_metabuf + 128) - $ - 32 +bb_protect .ds 1 ; write protect boolean +bb_updates .ds 2 ; update counter +bb_rmj .ds 1 ; rmj major version number +bb_rmn .ds 1 ; rmn minor version number +bb_rup .ds 1 ; rup update number +bb_rtp .ds 1 ; rtp patch level +bb_label .ds 16 ; 16 character drive label +bb_term .ds 1 ; label terminator ('$') +bb_biloc .ds 2 ; loc to patch boot drive info +bb_cpmloc .ds 2 ; final ram dest for cpm/cbios +bb_cpmend .ds 2 ; end address for load +bb_cpment .ds 2 ; CP/M entry point (cbios boot) +; +;=============================================================================== + +.END diff --git a/Source/HBIOS/layout.inc b/Source/HBIOS/layout.inc index 2f7b5250..c2c7af62 100644 --- a/Source/HBIOS/layout.inc +++ b/Source/HBIOS/layout.inc @@ -76,6 +76,9 @@ MON_END .EQU MON_LOC + MON_SIZ ; ENDING ADDRESS OF RUNNING MONITOR MON_IMGLOC .EQU BNK_NXTLOC ; LOCATION OF BINARY LOAD IMAGE IN BANK BNK_NXTLOC .SET MON_IMGLOC + MON_SIZ ; IMG LOC OF NEXT COMPONENT ; +MON_DSKY .EQU MON_LOC + (0 * 3) ; MONITOR ENTRY (DSKY) +MON_SERIAL .EQU MON_LOC + (1 * 3) ; MONITOR ENTRY (SERIAL PORT) +; ZSYS_BNK .EQU BNK_CUR ZSYS_LOC .EQU CPM_LOC ; RUNNING LOCATION OF ZSYSTEM ZSYS_SIZ .EQU CPM_SIZ ; SIZE OF ZSYSTEM BINARY IMAGE @@ -184,9 +187,25 @@ HWMON_END .EQU HWMON_LOC + HWMON_SIZ HWMON_IMGLOC .EQU BNK_NXTLOC ; LOCATION OF BINARY LOAD IMAGE IN BANK BNK_NXTLOC .SET HWMON_IMGLOC + HWMON_SIZ ; IMG LOC OF NEXT COMPONENT ; +; Device Inventory Application +DEV_BNK .EQU BNK_CUR +DEV_LOC .EQU $0200 ; LOAD LOCATION +DEV_SIZ .EQU $0B00 ; SIZE OF IMAGE +DEV_END .EQU DEV_LOC + DEV_SIZ ; END LOCATION +DEV_IMGLOC .EQU BNK_NXTLOC ; LOCATION OF BINARY LOAD IMAGE IN BANK +BNK_NXTLOC .SET DEV_IMGLOC + DEV_SIZ ; IMG LOC OF NEXT COMPONENT +; +; Slice Inventory Application +SLC_BNK .EQU BNK_CUR +SLC_LOC .EQU $0200 ; LOAD LOCATION +SLC_SIZ .EQU $0200 ; SIZE OF IMAGE +SLC_END .EQU SLC_LOC + SLC_SIZ ; END LOCATION +SLC_IMGLOC .EQU BNK_NXTLOC ; LOCATION OF BINARY LOAD IMAGE IN BANK +BNK_NXTLOC .SET SLC_IMGLOC + SLC_SIZ ; IMG LOC OF NEXT COMPONENT +; FONTS_BNK .EQU BNK_CUR -FONTS_LOC .EQU $0000 -FONTS_SIZ .EQU $4000 +FONTS_LOC .EQU BNK_NXTLOC +FONTS_SIZ .EQU $2000 FONTS_END .EQU FONTS_LOC + FONTS_SIZ FONTS_IMGLOC .EQU BNK_NXTLOC ; LOCATION OF BINARY LOAD IMAGE IN BANK BNK_NXTLOC .SET FONTS_IMGLOC + FONTS_SIZ ; IMG LOC OF NEXT COMPONENT diff --git a/Source/HBIOS/romfonts.asm b/Source/HBIOS/romfonts.asm new file mode 100644 index 00000000..2cfd77be --- /dev/null +++ b/Source/HBIOS/romfonts.asm @@ -0,0 +1,135 @@ +; +;============================================================================= +; ROMFONTS.ASM - ROM HOSTED FONTS +;============================================================================= +; +; THIS ASSEMBLY IS PURELY A DATA ASSEMBLY USED TO INCLUDE THE ROM-HOSTED +; FONTS. +; +; FOR NOW, WE ARE JUST INCLUDING 3 FONTS AND THEY ARE NOT COMPRESSED. +; +#INCLUDE "std.asm" +; +COMP .EQU $80 ; BIT MASK FOR COMPRESSED FONT +RAW .EQU $00 ; BIT MASK FOR RAW FONT +; +; FONT INCLUSION CONTROLS. THE FMT_XXX SETTING CONTROLS WHETHER THE +; FONT DATA WILL BE COMPRESSED OR NOT. GENERALLY, COMPRESSED IS USED +; TO SAVE SPACE. THE 6X8 FONT IS AN EXCEPTION BECAUSE IT IS USED BY +; THE TMS DRIVER WHICH RELOADS THE FONT ON-THE-FLY DURING SYSTEM +; OPERATION. SEE TMS.ASM. +; +USEFONT6X8 .EQU TRUE +FMT_6X8 .EQU RAW +; +USEFONT8X8 .EQU TRUE +FMT_8X8 .EQU COMP +; +USEFONT8X11 .EQU TRUE +FMT_8X11 .EQU COMP +; +USEFONT8X16 .EQU TRUE +FMT_8X16 .EQU COMP +; + .ORG FONTS_LOC +; +; FONT LOCATION MAP +; + .DB 'F','M' ; TABLE SIGNATURE +#IF USEFONT6X8 + .DB FONTID_6X8 | FMT_6X8 + .DW FONT6X8 +#ENDIF +; +#IF USEFONT8X8 + .DB FONTID_8X8 | FMT_8X8 + .DW FONT8X8 +#ENDIF +; +#IF USEFONT8X11 + .DB FONTID_8X11 | FMT_8X11 + .DW FONT8X11 +#ENDIF +; +#IF USEFONT8X16 + .DB FONTID_8X16 | FMT_8X16 + .DW FONT8X16 +#ENDIF +; + .DB 0 ; END OF TABLE +; +; INCLUDE ACTUAL FONT FILES +; +#IF USEFONT6X8 + .ECHO "FONT6X8: " +FONT6X8: + #IF (FMT_6X8 == COMP) + .ECHO "COMPRESSED " + #INCLUDE "font6x8c.asm" + #ELSE + .ECHO "RAW " + #INCLUDE "font6x8u.asm" + #ENDIF + .ECHO $ - FONT6X8 + .ECHO " BYTES\n" +#ENDIF +; +#IF USEFONT8X8 + .ECHO "FONT8X8: " +FONT8X8: + #IF (FMT_8X8 == COMP) + .ECHO "COMPRESSED " + #INCLUDE "font8x8c.asm" + #ELSE + .ECHO "RAW " + #INCLUDE "font8x8u.asm" + #ENDIF + .ECHO $ - FONT8X8 + .ECHO " BYTES\n" +#ENDIF +; +#IF USEFONT8X11 + .ECHO "FONT8X11: " +FONT8X11: + #IF (FMT_8X11 == COMP) + .ECHO "COMPRESSED " + #INCLUDE "font8x11c.asm" + #ELSE + .ECHO "RAW " + #INCLUDE "font8x11u.asm" + #ENDIF + .ECHO $ - FONT8X11 + .ECHO " BYTES\n" +#ENDIF +; +#IF USEFONT8X16 + .ECHO "FONT8X16: " +FONT8X16: + #IF (FMT_8X16 == COMP) + .ECHO "COMPRESSED " + #INCLUDE "font8x16c.asm" + #ELSE + .ECHO "RAW " + #INCLUDE "font8x16u.asm" + #ENDIF + .ECHO $ - FONT8X16 + .ECHO " BYTES\n" +#ENDIF +; +; IT IS CRITICAL THAT THE FINAL BINARY BE EXACTLY USR_SIZ BYTES. +; THIS GENERATES FILLER AS NEEDED. IT WILL ALSO FORCE AN ASSEMBLY +; ERROR IF THE SIZE EXCEEDS THE SPACE ALLOCATED. +; +SLACK .EQU (FONTS_END - $) +; +#IF (SLACK < 0) + .ECHO "*** FONTS IS TOO BIG!!!\n" + !!! ; FORCE AN ASSEMBLY ERROR +#ENDIF +; + .FILL SLACK,$00 + .ECHO "FONTS space remaining: " + .ECHO SLACK + .ECHO " bytes.\n" +; + .END diff --git a/Source/HBIOS/romldr.asm b/Source/HBIOS/romldr.asm index b0217222..c438d74b 100644 --- a/Source/HBIOS/romldr.asm +++ b/Source/HBIOS/romldr.asm @@ -119,6 +119,7 @@ bid_cur .equ -1 ; used below to indicate current bank ; ; Note: at startup, we should not assume which bank we are operating in. ; + ld a,e ; save startup mode ; Relocate to start of common ram at $8000 ld hl,0 ld de,$8000 @@ -131,6 +132,7 @@ bid_cur .equ -1 ; used below to indicate current bank ; start: ld sp,bl_stack ; setup private stack + ld (startmode),a ; save startup mode call delay_init ; init delay functions ; ; Disable interrupts if IM1 is active because we are switching to page @@ -220,6 +222,20 @@ start2: ld (dskyact),a ; save it #endif +; +;======================================================================= +; Print Device List +;======================================================================= +; +#if (BIOS == BIOS_WBW) +; + ; We don't have a start mode for UNA. So, the device display + ; will only occur when selected from the menu. + ld a,(startmode) ; get start mode + cp START_COLD ; cold start? + call z,prtall ; if so, display Device List. +; +#endif ; ;======================================================================= ; Boot Loader Banner @@ -625,6 +641,10 @@ runcmd0: cp 'R' ; R = reboot system jp z,reboot ; if so, do it #if (BIOS == BIOS_WBW) + cp 'S' ; S = Slice Inventory + jp z,slclst ; if so, do it + cp 'W' ; W = Rom WBW NVR Config Rom App + jp z,nvrconfig ; if so, do it cp 'I' ; C = set console interface jp z,setcon ; if so, do it cp 'V' ; V = diagnostic verbosity @@ -632,18 +652,8 @@ runcmd0: #endif ; ; Attempt ROM application launch - ld ix,(ra_tbl_loc) ; point to start of ROM app tbl - ld c,a ; save command in C -runcmd1: - ld a,(ix+ra_conkey) ; get match char - and ~$80 ; clear "hidden entry" bit - cp c ; compare - jp z,romload ; if match, load it - ld de,ra_entsiz ; table entry size - add ix,de ; bump IX to next entry - ld a,(ix) ; check for end - or (ix+1) ; ... of table - jr nz,runcmd1 ; loop till done + call findcon ; find the application from console Key in A REG + jp z,romload ; if match found, then load it ; ; Attempt disk boot ld de,cmdbuf ; start of buffer @@ -858,8 +868,16 @@ dskycmd1: ; Display Help ; help: - ld hl,str_help ; point to help string + ld hl,str_help1 ; load first help string + call pstr ; display it + ld a,(bootmode) ; get boot mode + cp BM_ROMBOOT ; ROM boot? + jr nz,help1 ; if not, skip str_help2 + ld hl,str_help2 ; load second help string call pstr ; display it +help1: + ld hl,str_help3 ; load third help string + call pstr ; display it ret ; ; List ROM apps @@ -905,6 +923,18 @@ applst2: devlst: jp prtall ; do it ; +; Slice list +; +slclst: + ld a,'S' ; "S"lice Inv App + jp romcall ; Call a Rom App with Return +; +; RomWBW Config +; +nvrconfig: + ld a,'W' ; "W" Rom WBW Configure App + jp romcall ; Call a Rom App with Return +; ; Set console interface unit ; #if (BIOS == BIOS_WBW) @@ -1054,6 +1084,27 @@ reboot: #endif ; ;======================================================================= +; Call a ROM Application (with return) +; This is same as romload: but doesnt display load messages +; Intended for Utility applications (part of RomWBW) not third part apps +; these apps are on Help menu, hidden from Application List +; Parameters A - The app to call. +;======================================================================= +; +romcall: + call findcon ; find the application based on A reg + ret nz ; if not found then return to prompt +; + call romcopy ; Copy ROM App into working memory +; + ld l,(ix+ra_ent) ; HL := app entry address + ld h,(ix+ra_ent+1) ; IX register returned from findcon + jp (hl) ; call to the routine. + ; + ; NOTE It is assumed the Rom App should perform a RET, + ; returning control to the caller of this sub routine. +; +;======================================================================= ; Load and run a ROM application, IX=ROM app table entry ;======================================================================= ; @@ -1066,36 +1117,49 @@ romload: ld h,(ix+ra_name+1) call pstr ; - ;ld hl,msg_load ; point to load message - ;call dsky_show ; display message ld c,DSKY_MSG_LDR_LOAD ; point to load message call dsky_msg ; display message +; + call romcopy ; Copy ROM App into working memory + ld a,'.' ; dot character + call cout ; show progress +; + ld c,DSKY_MSG_LDR_GO ; point to go message + call dsky_msg ; display message +; + ld l,(ix+ra_ent) ; HL := app entry address + ld h,(ix+ra_ent+1) ; ... + jp (hl) ; go +; +;======================================================================= +; Routine - Copy Rom App from Rom to it's running location +; param : IX - Pointer to the Rom App to copy into RAM +;======================================================================= +; +romcopy: ; #if (BIOS == BIOS_WBW) ; - ; Copy image to it's running location ld a,(ix+ra_bnk) ; get image source bank id cp bid_cur ; special value? - jr nz,romload1 ; if not, continue + jr nz,romcopy1 ; if not, continue ld a,(bid_ldr) ; else substitute -romload1: +romcopy1: push af ; save source bank + ; ld e,a ; source bank to E ld d,BID_USR ; dest is user bank ld l,(ix+ra_siz) ; HL := image size ld h,(ix+ra_siz+1) ; ... ld b,BF_SYSSETCPY ; HBIOS func: setup bank copy rst 08 ; do it - ld a,'.' ; dot character - call cout ; show progress + ; ld e,(ix+ra_dest) ; DE := run dest adr ld d,(ix+ra_dest+1) ; ... ld l,(ix+ra_src) ; HL := image source adr ld h,(ix+ra_src+1) ; ... ld b,BF_SYSBNKCPY ; HBIOS func: bank copy rst 08 ; do it - ld a,'.' ; dot character - call cout ; show progress ; ; Record boot information pop af ; recover source bank @@ -1104,8 +1168,6 @@ romload1: ld b,BF_SYSSET ; HBIOS func: system set ld c,BF_SYSSET_BOOTINFO ; BBIOS subfunc: boot info rst 08 ; do it - ld a,'.' ; dot character - call cout ; show progress ; #endif ; @@ -1121,8 +1183,6 @@ romload1: ld bc,$01FB ; UNA func: set bank ld de,(bid_ldr) ; select user bank rst 08 ; do it - ld a,'.' ; dot character - call cout ; show progress ; ; Copy image to running location ld l,(ix+ra_src) ; HL := image source adr @@ -1132,15 +1192,11 @@ romload1: ld c,(ix+ra_siz) ; BC := image size ld b,(ix+ra_siz+1) ; ... ldir ; copy image - ld a,'.' ; dot character - call cout ; show progress ; ; Switch back to user bank ld bc,$01FB ; UNA func: set bank ld de,(bid_ldr) ; select user bank rst 08 ; do it - ld a,'.' ; dot character - call cout ; show progress ; ; Record boot information ld de,(bid_ldr) ; original bank @@ -1150,15 +1206,7 @@ romload1: ; #endif ; - ;ld hl,msg_go ; point to go message - ;call dsky_show ; display message - ld c,DSKY_MSG_LDR_GO ; point to go message - call dsky_msg ; display message -; - ld l,(ix+ra_ent) ; HL := app entry address - ld h,(ix+ra_ent+1) ; ... - jp (hl) ; go -; + ret ;======================================================================= ; Boot ROM Application ;======================================================================= @@ -1166,20 +1214,32 @@ romload1: ; Enter with ROM application menu selection (command) character in A ; romboot: + call findcon ; Match the application base on console command in A + jp z,romload ; if match application found then load it + ret ; no match, just return to - prompt: +; +;======================================================================= +; Find App For Console Command +; Pass in A, the console command character +; Return IX pointer, and Z if found; NZ if not found +;======================================================================= +; +findcon: call upcase ; force uppercase for matching ld ix,(ra_tbl_loc) ; point to start of ROM app tbl ld c,a ; save command char in C -romboot1: +findcon1: ld a,(ix+ra_conkey) ; get match char and ~$80 ; clear "hidden entry" bit cp c ; compare - jp z,romload ; if match, load it + ret z ; if matched, return ld de,ra_entsiz ; table entry size add ix,de ; bump IX to next entry ld a,(ix) ; check for end or (ix+1) ; ... of table - jr nz,romboot1 ; loop till done - ret ; no match, just return + jr nz,findcon1 ; loop if still more table entries + or 0ffh ; set NZ flag, signal not found + ret ; no match, and return ; ;======================================================================= ; Boot disk unit/slice @@ -1557,7 +1617,7 @@ s100mon1: ld ix,HWMON_IMGLOC ; execution resumes here jp HB_BNKCALL ; do it ; -str_smon .db "S100 Z180 Monitor",0 +str_smon .db "S100 Z180 Hardware Monitor",0 str_s100con .db "\r\n\r\nConsole on S100 Bus",0 ; #endif @@ -2267,12 +2327,11 @@ CST .equ cst ; ; Print list of all drives (WBW) ; -; Just invoke the existing HBIOS routine... +; Call the Rom App to perform this ; prtall: - ld a,BID_BIOS ; BIOS Bank please - ld ix,$0406 ; HBIOS PRTSUM vector - jp HB_BNKCALL ; do it + ld a,'D' ; "D"evice Inventory App + jp romcall ; Call a Rom App with Return ; #endif ; @@ -2280,6 +2339,8 @@ prtall: ; ; Print list of all drives (UNA) ; +; UNA has no place to put this in ROM, so it is done here. +; prtall: ld hl,str_devlst ; device list header string call pstr ; display it @@ -2534,16 +2595,35 @@ str_binfo5 .db "]",0 str_ldsec .db ", Sector 0x",0 str_diaglvl .db "\r\n\r\nHBIOS Diagnostic Level: ",0 ; -str_help .db "\r\n" +; +; Help text is broken into 3 pieces because an application mode boot +; does allow access to the ROM-hosted features. The str_help2 portion +; is only displayed for a ROM boot. +; +str_help1: + .db "\r\n" .db "\r\n L - List ROM Applications" + .db "\r\n [.] - Boot Disk Unit/Slice" + .db 0 +; +str_help2: +#if (BIOS == BIOS_WBW) + .db "\r\n N - Network Boot" +#endif .db "\r\n D - Device Inventory" - .db "\r\n R - Reboot System" #if (BIOS == BIOS_WBW) + .db "\r\n S - Slice Inventory" .db "\r\n W - RomWBW Configure" +#endif + .db 0 +; +str_help3: +#if (BIOS == BIOS_WBW) + .db "\r\n I [] - Set Console Interface/Baud Rate" .db "\r\n V [] - View/Set HBIOS Diagnostic Verbosity" #endif - .db "\r\n [.] - Boot Disk Unit/Slice" + .db "\r\n R - Reboot System" .db 0 ; ;======================================================================= @@ -2632,28 +2712,30 @@ ra_tbl: ; Name Key Dsky Bank Src Dest Size Entry ; --------- ------- ----- -------- ----- ------- ------- ---------- ra_ent(str_mon, 'M', KY_CL, MON_BNK, MON_IMGLOC, MON_LOC, MON_SIZ, MON_SERIAL) -ra_entsiz .equ $ - ra_tbl -#if (BIOS == BIOS_WBW) - #if (PLATFORM == PLT_S100) -ra_ent(str_smon, 'S', $FF, bid_cur, $8000, $8000, $0001, s100mon) - #endif -#endif +ra_entsiz .equ $ - ra_tbl +#if (BIOS == BIOS_WBW) + #if (PLATFORM == PLT_S100) +ra_ent(str_smon, 'O', $FF, bid_cur, $8000, $8000, $0001, s100mon) + #endif +#endif ra_ent(str_cpm22, 'C', KY_BK, CPM22_BNK, CPM22_IMGLOC, CPM_LOC, CPM_SIZ, CPM_ENT) ra_ent(str_zsys, 'Z', KY_FW, ZSYS_BNK, ZSYS_IMGLOC, CPM_LOC, CPM_SIZ, CPM_ENT) -#if (BIOS == BIOS_WBW) +#if (BIOS == BIOS_WBW) ra_ent(str_bas, 'B', KY_DE, BAS_BNK, BAS_IMGLOC, BAS_LOC, BAS_SIZ, BAS_LOC) ra_ent(str_tbas, 'T', KY_EN, TBC_BNK, TBC_IMGLOC, TBC_LOC, TBC_SIZ, TBC_LOC) ra_ent(str_fth, 'F', KY_EX, FTH_BNK, FTH_IMGLOC, FTH_LOC, FTH_SIZ, FTH_LOC) ra_ent(str_play, 'P', $FF, GAM_BNK, GAM_IMGLOC, GAM_LOC, GAM_SIZ, GAM_LOC) -ra_ent(str_net, 'N', $FF, NET_BNK, NET_IMGLOC, NET_LOC, NET_SIZ, NET_LOC) +ra_ent(str_net, 'N'+$80, $FF, NET_BNK, NET_IMGLOC, NET_LOC, NET_SIZ, NET_LOC) ra_ent(str_upd, 'X', $FF, UPD_BNK, UPD_IMGLOC, UPD_LOC, UPD_SIZ, UPD_LOC) -ra_ent(str_nvr, 'W'+$80, $FF, NVR_BNK, NVR_IMGLOC, NVR_LOC, NVR_SIZ, NVR_LOC) +ra_ent(str_blnk, 'W'+$80, $FF, NVR_BNK, NVR_IMGLOC, NVR_LOC, NVR_SIZ, NVR_LOC) +ra_ent(str_blnk, 'D'+$80, $FF, DEV_BNK, DEV_IMGLOC, DEV_LOC, DEV_SIZ, DEV_LOC) +ra_ent(str_blnk, 'S'+$80, $FF, SLC_BNK, SLC_IMGLOC, SLC_LOC, SLC_SIZ, SLC_LOC) ra_ent(str_user, 'U', $FF, USR_BNK, USR_IMGLOC, USR_LOC, USR_SIZ, USR_LOC) #endif #if (DSKYENABLE) ra_ent(str_dsky, 'Y'+$80, KY_GO, MON_BNK, MON_IMGLOC, MON_LOC, MON_SIZ, MON_DSKY) #endif -ra_ent(str_egg, 'E'+$80, $FF, EGG_BNK, EGG_IMGLOC, EGG_LOC, EGG_SIZ, EGG_LOC) +ra_ent(str_blnk, 'E'+$80, $FF, EGG_BNK, EGG_IMGLOC, EGG_LOC, EGG_SIZ, EGG_LOC) ; .dw 0 ; table terminator ; @@ -2678,9 +2760,8 @@ str_bas .db "BASIC",0 str_tbas .db "Tasty BASIC",0 str_play .db "Play a Game",0 str_upd .db "XModem Flash Updater",0 -str_nvr .db "RomWBW Configure", 0 str_user .db "User App",0 -str_egg .db "",0 +str_blnk .db "",0 str_net .db "Network Boot",0 str_switches .db "FP Switches = 0x",0 str_nvswitches .db "NV Switches Found",0 @@ -2707,6 +2788,7 @@ sps .dw 0 ; sectors per slice mediaid .db 0 ; media id ; bootmode .db 0 ; ROM, APP, or IMG boot +startmode .db 0 ; START_WARM or START_COLD ra_tbl_loc .dw 0 ; points to active ra_tbl bootunit .db 0 ; boot disk unit bootslice .db 0 ; boot disk slice diff --git a/Source/HBIOS/spk.asm b/Source/HBIOS/spk.asm index 3ceb148c..55c9eb63 100644 --- a/Source/HBIOS/spk.asm +++ b/Source/HBIOS/spk.asm @@ -1,6 +1,7 @@ ;====================================================================== ; -; BIT MODE SOUND DRIVER FOR SBC V2 USING BIT 0 OF RTC DRIVER +; BIT MODE SOUND DRIVER FOR USING 1 BIT OF AN IO PORT +; TAKING CARE NOT TO CHANGE OTHER BITS ; ;====================================================================== ; @@ -32,9 +33,7 @@ SP_IDAT .EQU 0 ; NO INSTANCE DATA ASSOCIATED WITH THIS DEVICE ; SP_TONECNT .EQU 1 ; COUNT NUMBER OF TONE CHANNELS SP_NOISECNT .EQU 0 ; COUNT NUMBER OF NOISE CHANNELS -; -SP_RTCIOMSK .EQU 00000100B -; + ; FOR OTHER DRIVERS, THE PERIOD VALUE FOR THE TONE IS STORED AT PENDING_PERIOD ; FOR THE SPK DRIVER THE ADDRESS IN THE TONE TABLE IS STORED IN PENDING_PERIOD ; @@ -43,9 +42,12 @@ SP_PENDING_VOLUME .DB 0 ; PENDING VOL (8 BITS) SP_PENDING_DURATION .DW 0 ; PENDING DURATION (16 BITS) SP_TBLRDY .DB 0 ; IF != 0, NOTE TABLE IS READY ; - DEVECHO "SPK: IO=" - DEVECHO RTCIO - DEVECHO "\n" + DEVECHO "SPK: IO=" + DEVECHO SPKPORT + DEVECHO " MASK=" + DEVECHO SPKMASK + DEVECHO "\n" + ; ;====================================================================== ; DRIVER INITIALIZATION @@ -59,9 +61,12 @@ SP_INIT: ; CALL NEWLINE ; ANNOUNCE DEVICE PRTS("SPK: IO=0x$") - LD A,RTCIO + LD A,SPKPORT CALL PRTHEXBYTE -; + PRTS(" MASK=0x$") + LD A,SPKMASK + CALL PRTHEXBYTE + ; CALL SP_SETTBL ; SETUP TONE TABLE CALL SP_RESET ; RESET PARAMETERS ; @@ -165,7 +170,7 @@ SP_QUERY_VOLUME: ; SP_QUERY_DEV: LD B, SNDDEV_BITMODE ; RETURN DEVICE IDENTIFIER - LD DE, (RTCIO*256)+SP_RTCIOMSK ; AND ADDRESS AND DATA PORT + LD DE, (SPKPORT*256)+SPKMASK ; AND ADDRESS AND DATA PORT XOR A RET ; @@ -283,7 +288,7 @@ SP_BEEPER: LD B,$00 LD IX,SPK_DLYADJ ; The base address of the timing loop. ADD IX,BC ; Alter the length of the timing loop. Use an earlier starting point for each '1' lost by taking INT (L/4). - LD A,(HB_RTCVAL) ; Fetch the present border colour from BORDCR and move it to bits 2, 1 and 0 of the A register. + LD A,(SPKSHADOW) ; Fetch the present border colour from BORDCR and move it to bits 2, 1 and 0 of the A register. ; ; The HL register holds the 'length of the timing loop' with 16 T states being used for each '1' in the L register and 1024 T states for each '1' in the H register. ; @@ -302,8 +307,9 @@ BE_H_L_LP: ; ; The loudspeaker is now alternately activated and deactivated. ; - XOR SP_RTCIOMSK ; Flip bit 2. - OUT (RTCIO),A ; Perform the 'OUT' operation, leaving other bits unchanged. + XOR SPKMASK ; Flip bit. + OUT (SPKPORT),A ; Perform the 'OUT' operation, leaving other bits unchanged. + LD B,H ; Reset the B register. LD C,A ; Save the A register. BIT 4,A ; Jump if at the half-cycle point. @@ -333,8 +339,8 @@ BE_END: ; leaves the bit set to the opposite value it started at. This ; ensures that the bit is properly reset to its original value. ; - LD A,(HB_RTCVAL) ; Get the current RTC latch value - OUT (RTCIO),A ; Set it + LD A,(SPKSHADOW) ; Get the current port value (typically RTC latch) + OUT (SPKPORT),A ; Set it ; RET ; ALWAYS EXITS WITH SUCCESS STATUS (A=0) ; @@ -356,7 +362,7 @@ SP_DEVICE: LD E,0 ; E := PHYSICAL UNIT LD C,$00 ; C := DEVICE TYPE LD H,0 ; H := 0, DRIVER HAS NO MODES - LD L,RTCIO ; L := BASE I/O ADDRESS + LD L,SPKPORT ; L := BASE I/O ADDRESS XOR A RET ; diff --git a/Source/HBIOS/std.asm b/Source/HBIOS/std.asm index ceec2404..e9d77ec3 100644 --- a/Source/HBIOS/std.asm +++ b/Source/HBIOS/std.asm @@ -80,6 +80,11 @@ BM_ROMBOOT .EQU 1 ; ROM BOOT BM_APPBOOT .EQU 2 ; APPLICATION BOOT BM_IMGBOOT .EQU 3 ; IMAGE BOOT (DEPRECATED) ; +; HBIOS STARTUP MODES +; +START_WARM .EQU 1 ; COLD START +START_COLD .EQU 2 ; WARM START +; ; MEMORY MANAGERS ; MM_NONE .EQU 0 @@ -330,11 +335,11 @@ SYQMODE_MG014 .EQU 2 ; RCBUS MG014 STYLE INTERFACE ; ; PCF CLOCK CHIP FREQUENCIES ; -PCFCLK_3 .EQU $00 ; 3 MHz +PCFCLK_3 .EQU $00 ; 3 MHz PCFCLK_443 .EQU $10 ; 4.43 MHz -PCFCLK_6 .EQU $14 ; 6 MHz -PCFCLK_8 .EQU $18 ; 8 MHz -PCFCLK_12 .EQU $1C ; 12 MHz +PCFCLK_6 .EQU $14 ; 6 MHz +PCFCLK_8 .EQU $18 ; 8 MHz +PCFCLK_12 .EQU $1C ; 12 MHz ; ; PCF TRANSMISSION FREQUENCIES ; @@ -553,11 +558,10 @@ V40X24 .EQU 7 ; EF9345 ; ; FONT IDS ; -FONTID_8X8 .EQU 1 -FONTID_8X11 .EQU 2 -FONTID_8X16 .EQU 3 -FONTID_CGA .EQU 4 -FONTID_VGARC .EQU 5 +FONTID_6X8 .EQU 1 +FONTID_8X8 .EQU 2 +FONTID_8X11 .EQU 3 +FONTID_8X16 .EQU 4 ; ; KEYBOARD LAYOUTS ; @@ -981,9 +985,7 @@ APP_BNKS .SET 0 ; #INCLUDE "layout.inc" ; -; -MON_DSKY .EQU MON_LOC + (0 * 3) ; MONITOR ENTRY (DSKY) -MON_SERIAL .EQU MON_LOC + (1 * 3) ; MONITOR ENTRY (SERIAL PORT) +; --------------------------- ; ; INTERRUPT MODE 2 SLOT ASSIGNMENTS ; diff --git a/Source/HBIOS/sysconf.asm b/Source/HBIOS/sysconf.asm index 81369f02..eb178ac3 100644 --- a/Source/HBIOS/sysconf.asm +++ b/Source/HBIOS/sysconf.asm @@ -8,7 +8,7 @@ ; and RomWBW Operation. Write to RTC NVRAM to store config ; is reliant on HBIOS ; -; NOTE: This program is built as both a CP/M COM and Rom WBW Applicaton +; NOTE: This program is built as both a CP/M COM and Rom WBW Application ; ; ROM APPLICATION THAT IS AUTOMATICALLY INCLUDED IN THE ROMWBW ROM. ; IT IS INVOKED FROM THE BOOT LOADER USING THE 'W' OPTION. (See RomLDR) @@ -18,7 +18,16 @@ ; BASED ON USEROM.ASM ; THANKS AND CREDIT TO MARTIN R. FOR PROVIDING THIS APPLICATION! ; Also Based on The Tasty Basic Configuration -; Utilitity function were also copied from RomLdr, Assign. +; Utility function were also copied from RomLdr, Assign. +; +;----------------------------------------------------------------------- +; +; Change Log: +; 2024-11-08 [MAP] Initial v1.0 release +; 2024-12-06 [WBW] Misc Fixes Improvements after initial release +; 2025-06-30 [MAP] 1.1 Changed to be invoked in CALL RET fashion from RomLdr +; +;----------------------------------------------------------------------- ; #include "../ver.inc" #include "hbios.inc" @@ -56,8 +65,9 @@ DEL .EQU 127 ; ASCII del/rubout .ORG NVR_LOC ; #ifdef ROMWBW + ; Reuse the stack provided by Rom LDR ; PLACE STACK AT THE TOP OF AVAILABLE RAM (JUST BELOW THE HBIOS PROXY). - LD SP,HBX_LOC + ; LD SP,HBX_LOC #endif #ifdef CPM ; setup stack (save old value) @@ -75,9 +85,10 @@ exit: ; call crlf ; formatting ; #ifdef ROMWBW - LD B,BF_SYSRESET ; SYSTEM RESTART - LD C,BF_SYSRES_WARM ; WARM START - RST 08 ; CALL HBIOS (DOES NOT RETURN) + RET ; Return to Rom LDR + ; LD B,BF_SYSRESET ; SYSTEM RESTART + ; LD C,BF_SYSRES_WARM ; WARM START + ; RST 08 ; CALL HBIOS (DOES NOT RETURN) #endif #ifdef CPM ; @@ -205,7 +216,7 @@ helpandloop: ; HELP MENU JR z,printmainhelp ; if empty line, print main help call upcase ; - ; the folloiwng is just testing a single charater + ; the following is just testing a single character cp 'A' ; Auto Boot help menu JP Z,HELP_AB cp 'B' ; Boot Options help menu @@ -234,7 +245,7 @@ setvalueandloop: JR z,setvalueerror ; if empty line, print ? call upcase ; - ; the folloiwng is just testing a single charater + ; the following is just testing a single character cp 'A' ; Auto Boot help menu JP Z,SET_AB cp 'B' ; Boot Options help menu @@ -265,7 +276,7 @@ PRT_STATUS: LD BC,BC_SYSGET_SWITCH LD D,$FF ; check for existence of switches RST 08 - JR NZ,STAT_NOTFOUND ; error means switchs are not enabled + JR NZ,STAT_NOTFOUND ; error means switches are not enabled ; ; print invdividual stats, on all per switch ; @@ -499,7 +510,7 @@ err_ret: ;======================================================================= ; str_banner .db "\r\n" - .db "RomWBW System Config Utility, Version 1.0 Nov-2024\r\n",0 + .db "RomWBW System Config Utility, Version 1.1 June-2025\r\n",0 ; MSG_MENU .DB "\r\n" .DB "Commands:\r\n" @@ -507,7 +518,7 @@ MSG_MENU .DB "\r\n" .DB " (S)et {SW} {val}[,{val}[,{val}]]- Set a switch value(s)\r\n" .DB " (R)eset - Init NVRAM to Defaults\r\n" .DB " (H)elp [{SW}] - This help menu, or help on a switch\r\n" - .DB " (Q)uit - Quit\r\n" + .DB " e(X)it - Exit Configuration\r\n" .DB 0 MSG_PROMPT: .DB "\r\n" .DB "$", 0 @@ -1015,7 +1026,7 @@ CIN: PUSH BC ; stksav .dw 0 ; stack pointer saved at start ; -cmdbuf: .FILL cmdmax,0 ; cmd inut buffer +cmdbuf: .FILL cmdmax,0 ; cmd input buffer ; .fill stksiz,0 ; stack stack .equ $ ; stack top diff --git a/Source/HBIOS/tms.asm b/Source/HBIOS/tms.asm index b31d063a..091509ca 100644 --- a/Source/HBIOS/tms.asm +++ b/Source/HBIOS/tms.asm @@ -310,6 +310,7 @@ TMS_INIT1: ; CALL TMS_CRTINIT ; SETUP THE TMS CHIP REGISTERS CALL TMS_LOADFONT ; LOAD FONT DATA FROM ROM TO TMS STRORAGE + ; *** DIAGNOSE FONT LOAD ERROR HERE!!! *** CALL TMS_CLEAR ; CLEAR SCREEN, HOME CURSOR #IF (TMSKBD == TMSKBD_PPK) CALL PPK_INIT ; INITIALIZE PPI KEYBOARD DRIVER @@ -794,43 +795,23 @@ TMS_LOADFONT: ; SYSTEM INITIALIZATION REQUIRES A LARGE DECOMPRESSION BUFFER THAT WE ; HAVE NO WAY TO ACCOMMODATE WITHOUT TRASHING OS/APP MEMORY. ; -#IF USELZSA2 & FALSE - LD (TMS_STACK),SP ; SAVE STACK - LD HL,(TMS_STACK) ; AND SHIFT IT - LD DE,$2000 ; DOWN 4KB TO - CCF ; CREATE A - SBC HL,DE ; DECOMPRESSION BUFFER - LD SP,HL ; HL POINTS TO BUFFER - EX DE,HL ; START OF STACK BUFFER - PUSH DE ; SAVE IT - LD HL,TMS_FONT ; START OF FONT DATA - CALL DLZSA2 ; DECOMPRESS TO DE - POP HL ; RECALL STACK BUFFER POSITION -#ELSE - LD HL,TMS_FONT ; START OF FONT DATA -#ENDIF + LD A,FONTID_6X8 ; WE WANT 6X8 + CALL FNT_SELECT ; SELECT IT + RET NZ ; ERROR RETURN ; ; FILL TMS_FNTVADDR BYTES FROM FONTDATA LD DE,TMS_FNTSIZE TMS_LOADFONT1: - LD A,(HL) + CALL FNT_NEXT ; NEXT FONT DATA BYTE EZ80_IO OUT (TMS_DATREG),A TMS_IODELAY ; DELAY - INC HL DEC DE LD A,D OR E JR NZ,TMS_LOADFONT1 -; -#IF USELZSA2 & FALSE - LD HL,(TMS_STACK) ; ERASE DECOMPRESS BUFFER - LD SP,HL ; BY RESTORING THE STACK - RET ; DONE -TMS_STACK .DW 0 -#ELSE + XOR A ; SIGNAL SUCCESS RET -#ENDIF ; ;---------------------------------------------------------------------- ; VIRTUAL CURSOR MANAGEMENT diff --git a/Source/HBIOS/util.asm b/Source/HBIOS/util.asm index 6d1ee813..d4e5d98c 100644 --- a/Source/HBIOS/util.asm +++ b/Source/HBIOS/util.asm @@ -54,20 +54,20 @@ PC_GT: LD A,'>' JR PC_PRTCHR -PC_LPAREN: - PUSH AF - LD A,'(' - JR PC_PRTCHR - -PC_RPAREN: - PUSH AF - LD A,')' - JR PC_PRTCHR - -PC_ASTERISK: - PUSH AF - LD A,'*' - JR PC_PRTCHR +;PC_LPAREN: +; PUSH AF +; LD A,'(' +; JR PC_PRTCHR +; +;PC_RPAREN: +; PUSH AF +; LD A,')' +; JR PC_PRTCHR +; +;PC_ASTERISK: +; PUSH AF +; LD A,'*' +; JR PC_PRTCHR PC_CR: PUSH AF @@ -383,12 +383,12 @@ PRTIDXCNT: ; ; ; -TSTPT: - PUSH DE - LD DE,STR_TSTPT - CALL WRITESTR - POP DE - JR REGDMP ; DUMP REGISTERS AND RETURN +;TSTPT: +; PUSH DE +; LD DE,STR_TSTPT +; CALL WRITESTR +; POP DE +; JR REGDMP ; DUMP REGISTERS AND RETURN ; ; ; @@ -479,7 +479,7 @@ RD_STACK .EQU $ ; ; STR_HALT .TEXT "\r\n\r\n*** System Halted ***$" -STR_TSTPT .TEXT "\r\n+++ TSTPT: $" +;STR_TSTPT .TEXT "\r\n+++ TSTPT: $" ;STR_AF .DB " AF=$" ;STR_BC .DB " BC=$" ;STR_DE .DB " DE=$" @@ -684,7 +684,7 @@ DLY16: CALL DLY8 ; 432 400 DLY8: CALL DLY4 ; 216 200 DLY4: CALL DLY2 ; 108 100 DLY2: CALL DLY1 ; 54 50 -DLY1: +DLY1: #IF (CPUFAM == CPU_EZ80) NOP NOP @@ -1107,14 +1107,14 @@ ADD32: INC DE RET ; -DEC32: - LD BC,1 -SUB32: - OR A - SBC HL,BC - RET NC - DEC DE - RET +;DEC32: +; LD BC,1 +;SUB32: +; OR A +; SBC HL,BC +; RET NC +; DEC DE +; RET ; ; INC32 (HL) ; INCREMENT 32 BIT BINARY AT ADDRESS diff --git a/Source/HBIOS/vga.asm b/Source/HBIOS/vga.asm index 563df03d..df4a8d96 100644 --- a/Source/HBIOS/vga.asm +++ b/Source/HBIOS/vga.asm @@ -51,6 +51,7 @@ VGA_SCANL .EQU 16 VGA_89BIT .EQU VGA_8BIT #DEFINE USEFONT8X16 #DEFINE VGA_FONT FONT8X16 +VGA_FONTID .EQU FONTID_8X16 #ENDIF #IF (VGASIZ=V80X30) VGA_ROWS .EQU 30 @@ -59,6 +60,7 @@ VGA_SCANL .EQU 16 VGA_89BIT .EQU VGA_8BIT #DEFINE USEFONT8X16 #DEFINE VGA_FONT FONT8X16 +VGA_FONTID .EQU FONTID_8X16 #ENDIF #IF (VGASIZ=V80X43) VGA_ROWS .EQU 43 @@ -67,6 +69,7 @@ VGA_SCANL .EQU 11 VGA_89BIT .EQU VGA_8BIT #DEFINE USEFONT8X11 #DEFINE VGA_FONT FONT8X11 +VGA_FONTID .EQU FONTID_8X11 #ENDIF #IF (VGASIZ=V80X60) VGA_ROWS .EQU 60 @@ -75,6 +78,7 @@ VGA_SCANL .EQU 8 VGA_89BIT .EQU VGA_8BIT #DEFINE USEFONT8X8 #DEFINE VGA_FONT FONT8X8 +VGA_FONTID .EQU FONTID_8X8 #ENDIF ; #IF VGA_CSTY=VGA_BLOK @@ -138,6 +142,7 @@ VGA_INIT1: ; HARDWARE INITIALIZATION CALL VGA_CRTINIT ; SETUP THE VGA CHIP REGISTERS CALL VGA_LOADFONT ; LOAD FONT DATA FROM ROM TO VGA STORAGE + ; *** DIAGNOSE FONT LOAD ERROR HERE!!! *** CALL VGA_VDAINI CALL KBD_INIT ; INITIALIZE KEYBOARD DRIVER @@ -550,52 +555,32 @@ VGA_CRTCDUMP1: VGA_LOADFONT: LD HL,$7000 | VGA_89BIT ; CLEAR FONT PAGE NUM CALL VGA_SETCFG - -#IF USELZSA2 - LD (VGA_STACK),SP ; SAVE STACK - LD HL,(VGA_STACK) ; AND SHIFT IT - LD DE,$2000 ; DOWN 4KB TO - OR A ; CREATE A - SBC HL,DE ; DECOMPRESSION BUFFER - LD SP,HL ; HL POINTS TO BUFFER - EX DE,HL ; START OF STACK BUFFER - PUSH DE ; SAVE IT - LD HL,VGA_FONT ; START OF FONT DATA - CALL DLZSA2 ; DECOMPRESS TO DE - POP HL ; RECALL STACK BUFFER POSITION -#ELSE - LD HL,VGA_FONT ; START OF FONT DATA -#ENDIF - +; + LD A,VGA_FONTID ; DESIRED FONT + CALL FNT_SELECT ; SELECT IT + RET NZ ; ERROR RETURN +; LD DE,$7000 ; PAGE 7 OF VIDEO RAM VGA_LOADFONT1: LD B,VGA_SCANL ; # BYTES FOR EACH CHAR VGA_LOADFONT2: - LD A,(HL) ; GET NEXT BYTE + CALL FNT_NEXT ; GET NEXT BYTE CALL VGA_MEMWR ; MEM(DE) := A - INC HL ; NEXT FONT BYTE INC DE ; NEXT MEM BYTE DJNZ VGA_LOADFONT2 - +; LD BC,16-VGA_SCANL ; MOVE TO NEXT EX DE,HL ; 16 BYTE ADD HL,BC ; CHARACTER EX DE,HL - +; LD A,D CP $80 ; CHECK FOR END JR NZ,VGA_LOADFONT1 ; LOOP LD HL,$7070 | VGA_89BIT ; SET FONT PAGE NUM TO 7 CALL VGA_SETCFG - -#IF USELZSA2 - LD HL,(VGA_STACK) ; ERASE DECOMPRESS BUFFER - LD SP,HL ; BY RESTORING THE STACK - RET ; DONE -VGA_STACK .DW 0 -#ELSE + XOR A RET -#ENDIF ; ;---------------------------------------------------------------------- ; SET CURSOR POSITION TO ROW IN D AND COLUMN IN E diff --git a/Source/HBIOS/vrc.asm b/Source/HBIOS/vrc.asm index c87051c6..740dba3d 100644 --- a/Source/HBIOS/vrc.asm +++ b/Source/HBIOS/vrc.asm @@ -23,6 +23,11 @@ VRC_COLS .EQU 64 ; #DEFINE USEFONT8X8 #DEFINE VRC_FONT FONT8X8 +VRC_FONTID .EQU FONTID_8X8 +; +;;;#DEFINE USEFONT6X8 +;;;#DEFINE VRC_FONT FONT6X8 +;;;VRC_FONTID .EQU FONTID_6X8 ; TERMENABLE .SET TRUE ; INCLUDE TERMINAL PSEUDODEVICE DRIVER KBDENABLE .SET TRUE ; INCLUDE KBD KEYBOARD SUPPORT @@ -70,6 +75,7 @@ VRC_INIT1: ; HARDWARE INITIALIZATION CALL VRC_CRTINIT ; SETUP THE VGARC CHIP REGISTERS CALL VRC_LOADFONT ; LOAD FONT DATA FROM ROM TO VGARC STORAGE + ; *** DIAGNOSE FONT LOAD ERROR HERE!!! *** CALL VRC_VDAINI ; RESET CALL KBD_INIT ; INITIALIZE KEYBOARD DRIVER @@ -273,67 +279,22 @@ VRC_CRTINIT: ;---------------------------------------------------------------------- ; VRC_LOADFONT: + LD A,VRC_FONTID ; DESIRED FONT ID + CALL FNT_SELECT ; SELECT IT + RET NZ ; ERROR RETURN ; -#IF USELZSA2 - LD (VRC_STACK),SP ; SAVE STACK - LD HL,(VRC_STACK) ; AND SHIFT IT - LD DE,$2000 ; DOWN 4KB TO - OR A ; CREATE A - SBC HL,DE ; DECOMPRESSION BUFFER - LD SP,HL ; HL POINTS TO BUFFER - EX DE,HL ; START OF STACK BUFFER - PUSH DE ; SAVE IT - LD HL,VRC_FONT ; START OF FONT DATA - CALL DLZSA2 ; DECOMPRESS TO DE - POP HL ; RECALL STACK BUFFER POSITION -#ELSE - LD HL,VRC_FONT ; START OF FONT DATA -#ENDIF -; -#IF 0 - ; THIS APPROACH TO LOADING FONTS IS BEST (FASTEST), BUT IS - ; CAUSING ARTIFACTS ON THE DISPLAYED FONTS WHEN RUN ON A - ; Z280. IT IS NOT CLEAR WHAT THE PROBLEM IS (POSSIBLY - ; Z280 BUG), BUT FOR NOW WE AVOID THIS AND USE AN - ; ALTERNATIVE APPROACH BELOW. - LD DE,0+(128*8)-1 ; LENGTH OF FONT DATA - 1 - ADD HL,DE ; ADD TO HL - LD BC,VRC_FONTBASE+3 ; WORK BACKWARDS - OTDR ; DO 4 PAGES - DEC C - OTDR - DEC C - OTDR - DEC C - OTDR - DEC C -#ENDIF -; -#IF 1 - ; ALTERNATIVE APPROACH TO LOADING FONTS. THIS ONE AVOIDS - ; THE USE OF OTDR WHICH SEEMS TO CAUSE PROBLEMS ON Z280. LD B,0 LD C,VRC_FONTBASE VRC_LOADFONT1: - LD A,(HL) + CALL FNT_NEXT OUT (C),A - INC HL INC B JR NZ,VRC_LOADFONT1 INC C LD A,C CP VRC_FONTBASE + 4 JR NZ,VRC_LOADFONT1 -#ENDIF -; -#IF USELZSA2 - LD HL,(VRC_STACK) ; ERASE DECOMPRESS BUFFER - LD SP,HL ; BY RESTORING THE STACK - RET ; DONE -VRC_STACK .DW 0 -#ELSE RET -#ENDIF ; ;---------------------------------------------------------------------- ; SET CURSOR POSITION TO ROW IN D AND COLUMN IN E diff --git a/Source/Images/Build.cmd b/Source/Images/Build.cmd index f39e916e..5b9576df 100644 --- a/Source/Images/Build.cmd +++ b/Source/Images/Build.cmd @@ -50,10 +50,11 @@ call BuildDisk.cmd games hd wbw_hd512 || exit /b call BuildDisk.cmd cowgol hd wbw_hd512 || exit /b call BuildDisk.cmd msxroms1 hd wbw_hd512 || exit /b call BuildDisk.cmd msxroms2 hd wbw_hd512 || exit /b +call BuildDisk.cmd infocom hd wbw_hd512 || exit /b -echo. -echo Building Combo Disk (512 directory entry format) Image... -copy /b ..\..\Binary\hd512_cpm22.img + ..\..\Binary\hd512_zsdos.img + ..\..\Binary\hd512_nzcom.img + ..\..\Binary\hd512_cpm3.img + ..\..\Binary\hd512_zpm3.img + ..\..\Binary\hd512_ws4.img ..\..\Binary\hd512_combo.img || exit /b +:: echo. +:: echo Building Combo Disk (512 directory entry format) Image... +:: copy /b ..\..\Binary\hd512_cpm22.img + ..\..\Binary\hd512_zsdos.img + ..\..\Binary\hd512_nzcom.img + ..\..\Binary\hd512_cpm3.img + ..\..\Binary\hd512_zpm3.img + ..\..\Binary\hd512_ws4.img ..\..\Binary\hd512_combo.img || exit /b echo. echo Building Hard Disk Images (1024 directory entry format)... @@ -78,12 +79,14 @@ call BuildDisk.cmd games hd wbw_hd1k || exit /b call BuildDisk.cmd cowgol hd wbw_hd1k || exit /b call BuildDisk.cmd msxroms1 hd wbw_hd1k || exit /b call BuildDisk.cmd msxroms2 hd wbw_hd1k || exit /b +call BuildDisk.cmd infocom hd wbw_hd1k || exit /b if exist ..\BPBIOS\bp*.rel call BuildDisk.cmd bp hd wbw_hd1k ..\zsdos\zsys_wbw.sys || exit /b copy hd1k_prefix.dat ..\..\Binary\ || exit /b -echo. -echo Building Combo Disk (1024 directory entry format) Image... -copy /b hd1k_prefix.dat + ..\..\Binary\hd1k_cpm22.img + ..\..\Binary\hd1k_zsdos.img + ..\..\Binary\hd1k_nzcom.img + ..\..\Binary\hd1k_cpm3.img + ..\..\Binary\hd1k_zpm3.img + ..\..\Binary\hd1k_ws4.img ..\..\Binary\hd1k_combo.img || exit /b +:: echo. +:: echo Building Combo Disk (1024 directory entry format) Image... +:: copy /b hd1k_prefix.dat + ..\..\Binary\hd1k_cpm22.img + ..\..\Binary\hd1k_zsdos.img + ..\..\Binary\hd1k_nzcom.img + ..\..\Binary\hd1k_cpm3.img + ..\..\Binary\hd1k_zpm3.img + ..\..\Binary\hd1k_ws4.img ..\..\Binary\hd1k_combo.img || exit /b +call BuildImg.cmd || exit /b diff --git a/Source/Images/BuildImg.cmd b/Source/Images/BuildImg.cmd new file mode 100644 index 00000000..7931c5b9 --- /dev/null +++ b/Source/Images/BuildImg.cmd @@ -0,0 +1,6 @@ +@echo off +setlocal + +for %%f in (*.def) do ( + PowerShell -ExecutionPolicy Unrestricted .\BuildImg.ps1 %%~nf || exit /b +) diff --git a/Source/Images/BuildImg.ps1 b/Source/Images/BuildImg.ps1 new file mode 100644 index 00000000..062ab03b --- /dev/null +++ b/Source/Images/BuildImg.ps1 @@ -0,0 +1,66 @@ +param([string]$Image) + +# If a PowerShell exception occurs, just stop the script immediately. +$ErrorAction = 'Stop' + +$DefFile = $Image + ".def" + +$ImgFile = "..\..\Binary\hd1k_" + $Image + ".img" + + + + +$SliceList = @() + +ForEach ($Line in Get-Content $DefFile) +{ + $Line = $Line.Trim() + + if (($Line.Length -eq 0) -or ($Line[0] -eq "#")) + { + continue + } + + $SliceList += $Line +} + +function CreateImageFile { + param ( + [string]$Format = "" # hd1k or hd512 + ) + + $ImgFile = "..\..\Binary\" + $Format + "_" + $Image + ".img" + + $FileList = "" + + "Generating $ImgFile using $DefFile..." + + ForEach ($Slice in $SliceList) + { + $File = "..\..\Binary\" + $Format + "_" + $Slice + ".img" + + if (!(Test-Path $File)) + { + "Slice input file """ + $File + """ not found!!!" + exit 1 + } + + if ($FileList.Length -gt 0) + { + $FileList += "+" + } + + $FileList += $File + } + + if ($Format -eq "hd1k") + { + $FileList = "hd1k_prefix.dat+" + $FileList + } + cmd.exe /c copy /b $FileList $ImgFile +} + +CreateImageFile "hd512" +CreateImageFile "hd1k" + +exit 0 diff --git a/Source/Images/Makefile b/Source/Images/Makefile index 3738e362..064e9842 100644 --- a/Source/Images/Makefile +++ b/Source/Images/Makefile @@ -14,7 +14,7 @@ HD512IMGS = hd512_cpm22.img hd512_zsdos.img hd512_nzcom.img \ HD512XIMGS = hd512_z80asm.img hd512_aztecc.img hd512_hitechc.img \ hd512_bascomp.img hd512_fortran.img hd512_games.img \ hd512_tpascal.img hd512_dos65.img hd512_qpm.img \ - hd512_z3plus.img \ + hd512_z3plus.img hd512_infocom.img \ hd512_cowgol.img hd512_msxroms1.img hd512_msxroms2.img \ hd512_cobol.img hd512_blank.img HD1KIMGS = hd1k_cpm22.img hd1k_zsdos.img hd1k_nzcom.img \ @@ -22,7 +22,7 @@ HD1KIMGS = hd1k_cpm22.img hd1k_zsdos.img hd1k_nzcom.img \ HD1KXIMGS = hd1k_z80asm.img hd1k_aztecc.img hd1k_hitechc.img \ hd1k_bascomp.img hd1k_fortran.img hd1k_games.img \ hd1k_tpascal.img hd1k_qpm.img \ - hd1k_z3plus.img \ + hd1k_z3plus.img hd1k_infocom.img \ hd1k_cowgol.img hd1k_msxroms1.img hd1k_msxroms2.img \ hd1k_cobol.img hd1k_blank.img HD1KXIMGS += hd1k_bp.img @@ -31,8 +31,23 @@ HD512PREFIX = HD1KPREFIX = hd1k_prefix.dat OBJECTS = $(FDIMGS) -OBJECTS += $(HD512IMGS) $(HD512XIMGS) hd512_combo.img $(HD512PREFIX) -OBJECTS += $(HD1KIMGS) $(HD1KXIMGS) hd1k_combo.img $(HD1KPREFIX) +OBJECTS += $(HD512IMGS) $(HD512XIMGS) $(HD512PREFIX) +OBJECTS += $(HD1KIMGS) $(HD1KXIMGS) $(HD1KPREFIX) + +# OBJECTS = + +# add base images used in *.def files + +BASEIMG = $(shell grep -vEh "^\#" *.def) +BASEIMG := $(addprefix hd512_,$(BASEIMG)) $(addprefix hd1k_,$(BASEIMG)) +BASEIMG := $(addsuffix .img,$(BASEIMG)) +OBJECTS += $(BASEIMG) + +TEMP = $(wildcard *.def) +TEMP := $(addprefix hd512_,$(TEMP)) $(addprefix hd1k_,$(TEMP)) +TEMP := $(TEMP:.def=.img) +OBJECTS += $(TEMP) + OTHERS = blank144 blankhd512 blankhd1k *.cat @@ -47,11 +62,41 @@ include $(TOOLS)/Makefile.inc DIFFPATH = $(DIFFTO)/Binary -hd512_combo.img: $(HD512PREFIX) $(HD512IMGS) - cat $^ > $@ - -hd1k_combo.img: $(HD1KPREFIX) $(HD1KIMGS) - cat $^ > $@ +# hd512_%.img: %.def $(HD512IMGS) $(HD512XIMGS) + +hd512_%.img: %.def + @echo "Making hd512 $^"; \ + file_list=""; \ + while read line; do \ + line=$$(echo "$${line}" | sed 's/^[[:space:]]*//;s/[[:space:]]*$$//') ; \ + if [ -z "$${line}" ]; then \ + continue; \ + fi; \ + if [ "`echo ""$${line}"" | awk '{print substr($$0,1,1);exit}'`" = "#" ]; then \ + continue; \ + fi; \ + file_list="$${file_list} hd512_$${line}.img"; \ + done < $^ ; \ + echo "$${file_list}"; \ + cat $${file_list} > $@ + +# hd1k_%.img: %.def $(HD1KIMGS) $(HD1KXIMGS) + +hd1k_%.img: %.def + @echo "Making hd1k $^"; \ + file_list=""; \ + while read line; do \ + line=$$(echo "$${line}" | sed 's/^[[:space:]]*//;s/[[:space:]]*$$//') ; \ + if [ -z "$${line}" ]; then \ + continue; \ + fi; \ + if [ "`echo ""$${line}"" | awk '{print substr($$0,1,1);exit}'`" = "#" ]; then \ + continue; \ + fi; \ + file_list="$${file_list} hd1k_$${line}.img"; \ + done < $^ ; \ + echo "$${file_list}"; \ + cat $(HD1KPREFIX) $${file_list} > $@ # # this somewhat impenetrable and fragile code is used to build each of the images diff --git a/Source/Images/all.def.example b/Source/Images/all.def.example new file mode 100644 index 00000000..2caed21b --- /dev/null +++ b/Source/Images/all.def.example @@ -0,0 +1,25 @@ +# This image definition shows how to generate +# an disk image containing all of the available +# slices. + +aztecc +bascomp +blank +cobol +cowgol +cpm22 +cpm3 +fortran +games +hitechc +infocom +msxroms1 +msxroms2 +nzcom +qpm +tpascal +ws4 +z3plus +z80asm +zpm3 +zsdos diff --git a/Source/Images/combo.def b/Source/Images/combo.def new file mode 100644 index 00000000..2dc41f15 --- /dev/null +++ b/Source/Images/combo.def @@ -0,0 +1,8 @@ +# This is the ubiquituous Combo image for RomWBW + +cpm22 +zsdos +nzcom +cpm3 +zpm3 +ws4 diff --git a/Source/Images/d_games/Readme.txt b/Source/Images/d_games/Readme.txt index 1a7de748..1ca1cbf8 100644 --- a/Source/Images/d_games/Readme.txt +++ b/Source/Images/d_games/Readme.txt @@ -2,6 +2,8 @@ This disk contains several games for CP/M including the Infocom games Zork 1 through 3, Planetfall and Hitchhiker's Guide to the Galaxy. +A complete collection of all infocom games is available on the separate +INFOCOM disk image Nemesis and Dungeon Master is a Rogue-like game released in 1981. It is playable on a text terminal using ASCII graphics to represent the dungeon. Only a few diff --git a/Source/Images/d_infocom/Readme.txt b/Source/Images/d_infocom/Readme.txt new file mode 100644 index 00000000..47aa9b70 --- /dev/null +++ b/Source/Images/d_infocom/Readme.txt @@ -0,0 +1,117 @@ + +===== INFOCOM GAMES ===== + +A collection of all official releases of the interactive fiction games +produced by Infocom in the 1980's. The copyright rests with Activision, +and since 2022 that transferred to Microsoft + +Game List follows including the revision number and release date + +amfv.z4 - (A Mind Forever Voyaging) - r77-s850814.z4 +arthur.z6 - (Arthur) - r74-s890714 +ballyhoo.z3 - (Ballyhoo) - r97-s851218 +beyond.z5 - (Beyond Zork) - r57-s871221 +border.z5 - (Border Zone) - r9-s871008 +bureau.z4 - (Bureaucracy) - r116-s870602 +cutthr.z3 - (Cutthroats) - r23-s840809 +deadline.z3 - (Deadline) - r27-s831005 +enchant.z3 - (Enchanter) - r29-s860820 +h2g2.z3 - (The Hitchhiker's Guide to the Galaxy) - r59-s851108 +hollyw.z3 - (Hollywood Hijinx) - r37-s861215 +infidel.z3 - (Infidel) - r22-s830916 +journey.z6 - (Journey) - r83-s890706 +leather.z3 - (Leather Goddesses of Phobos) - r59-s860730 +lurking.z3 - (The Lurking Horror) - r203-s870506 +moonmist.z3 - (Moonmist) - r9-s861022 +nordbert.z4 - (Nord and Bert Couldn't Make Head or Tail of It) - r19-s870722 +planet.z3 - (Planetfall) - r37-s851003 +plunder.z3 - (Plundered Hearts) - r26-s870730 +seastalk.z3 - (Seastalker) - r16-s850603 +sherlock.z5 - (Sherlock) - r26-s880127 +shogun.z6 - (Shogun) - r322-s890706 +sorcerer.z3 - (Sorcerer) - r15-s851108 +spellb.z3 - (Spellbreaker) - r87-s860904 +starcros.z3 - (Starcross) - r17-s821021 +stationf.z3 - (Stationfall) - r107-s870430 +suspect.z3 - (Suspect) - r14-s841005 +suspend.z3 - (Suspended) - r8-s840521 +trinity.z4 - (Trinity) - r12-s860926 +wishb.z3 - (Wishbringer) - r69-s850920 +witness.z3 - (Witness) - r22-s840924 +zork0.z6 - (Zork 0) - r393-s890714 +zork1.z3 - (Zork 1) - r88-s840726 +zork2.z3 - (Zork 2) - r48-s840904 +zork3.z3 - (Zork 3) - r17-s840727 + +The versions above are generally from the "Classic Text Adventure +Masterpieces" released by Activision in (1996) which is the source of +most modern releases. + +The version of Hitchhiker is the one that Douglas Adams postedon his web +site in the mid-90s. The BBC later posted an illustrated version based +on the same game file. + +The above games have been curated from here . +Full game documentation can be found here + +The game files are a virtual machine code commonly known as Z-Machine, they +are portable and will run on any machine that has a Z-Machine interpreter. + +All the Z3 games come with the official CP/M interpreter (Version C) last +updated by Inforcom on 5th Feb 1985 + +All latter games Z4, Z5,.. and above, are more sophisticated and require +a better interpreter. i.e. VEZZA. + +VEZZA + +Vezza is a modern Infocom/Inform/Z-machine text adventure interpreter for +8 bit z80 based computers. What makes it modern is that it is written in +hand-crafted z80 assembler for maximum speed, and can load not only the +classics such as Zork 1,2 and 3 but also the latter games. + +It can run Z1 up to Z8 inform format interactive fiction game files. To run +a game with Vezza just type Vezza followed by the game you want to run. e.g. + +`VEZZA ZORK0.Z6` + +**Note:** One of the bigger constraints is available RAM. An OS such as ZPM +since it uses banked RAM does have a good amount of available RAM and was +used to test these games work. + +This tool is free but the developer accepts your support by letting you +pay what you think is fair for the tool. If you find this useful consider +donating at: + +https://sijnstra.itch.io/vezza + +The following files are located in user area 15 + +Available builds (requires CP/M version 3 or compatible system): + vezza-b.com - 80x24 screen, vt52 + Banked CP/M 3 + vezza-FG.com - 80x30 screen, VT100/ANSI CP/M 3 (tested on Z80-MBC2 & FabGL) + +Other builds (Large memory CP/M 2.2, no timed input): + vezza-C2.com - 80x24 RunCPM VT100 - no colour + vezza-CC.com - 80x24 RunCPM VT100 with 256 ANSI colour codes + +Slow builds due to BIOS limitations (extra register presevation, less cache, +smaller memory build): + vezza-AV.com - CP/M 2.2 with VT100 codes plus 16 bit ANSI colour & high + RAM. Works on Agon Light CP/M 2.2 + Note: Issues with very high I/O such as screen animations + vezza-AX.com - CP/M 2.2 with VT100 codes plus 16 bit ANSI colour, high + RAM & FabGL Italic. Works on Agon Light CP/M 2.2 + Note: Issues with very high I/O such as screen animations + vezza-RW.com - CP/M 2.2 with VT100 codes plus 16 bit ANSI colour with low + RAM. Tested on RC 2014 SC-126 using TeraTerm + +You should (test and) choose one that works on you configuration, and +ideally copy and rename it as vezza.com, so the Alias COM files can find +and execute the game. + +The above is a subset of available builds. The full repository is available +at https://gitlab.com/sijnstra1/vezza/ + + + diff --git a/Source/Images/d_infocom/u0/AMFV.Z4 b/Source/Images/d_infocom/u0/AMFV.Z4 new file mode 100644 index 00000000..05e2518b Binary files /dev/null and b/Source/Images/d_infocom/u0/AMFV.Z4 differ diff --git a/Source/Images/d_infocom/u0/ARTHUR.Z6 b/Source/Images/d_infocom/u0/ARTHUR.Z6 new file mode 100644 index 00000000..a28c3d3e Binary files /dev/null and b/Source/Images/d_infocom/u0/ARTHUR.Z6 differ diff --git a/Source/Images/d_infocom/u0/BALLYHOO.COM b/Source/Images/d_infocom/u0/BALLYHOO.COM new file mode 100755 index 00000000..7328c178 Binary files /dev/null and b/Source/Images/d_infocom/u0/BALLYHOO.COM differ diff --git a/Source/Images/d_infocom/u0/BALLYHOO.Z3 b/Source/Images/d_infocom/u0/BALLYHOO.Z3 new file mode 100644 index 00000000..5b6fb026 Binary files /dev/null and b/Source/Images/d_infocom/u0/BALLYHOO.Z3 differ diff --git a/Source/Images/d_infocom/u0/BEYOND.Z5 b/Source/Images/d_infocom/u0/BEYOND.Z5 new file mode 100644 index 00000000..30d7905a Binary files /dev/null and b/Source/Images/d_infocom/u0/BEYOND.Z5 differ diff --git a/Source/Images/d_infocom/u0/BORDER.Z5 b/Source/Images/d_infocom/u0/BORDER.Z5 new file mode 100644 index 00000000..60c1f030 Binary files /dev/null and b/Source/Images/d_infocom/u0/BORDER.Z5 differ diff --git a/Source/Images/d_infocom/u0/BUREAU.Z4 b/Source/Images/d_infocom/u0/BUREAU.Z4 new file mode 100644 index 00000000..d52069a1 Binary files /dev/null and b/Source/Images/d_infocom/u0/BUREAU.Z4 differ diff --git a/Source/Images/d_infocom/u0/CUTTHR.COM b/Source/Images/d_infocom/u0/CUTTHR.COM new file mode 100755 index 00000000..fce3db86 Binary files /dev/null and b/Source/Images/d_infocom/u0/CUTTHR.COM differ diff --git a/Source/Images/d_infocom/u0/CUTTHR.Z3 b/Source/Images/d_infocom/u0/CUTTHR.Z3 new file mode 100644 index 00000000..a9d33fc7 Binary files /dev/null and b/Source/Images/d_infocom/u0/CUTTHR.Z3 differ diff --git a/Source/Images/d_infocom/u0/DEADLINE.COM b/Source/Images/d_infocom/u0/DEADLINE.COM new file mode 100755 index 00000000..3b3eb6ea Binary files /dev/null and b/Source/Images/d_infocom/u0/DEADLINE.COM differ diff --git a/Source/Images/d_infocom/u0/DEADLINE.Z3 b/Source/Images/d_infocom/u0/DEADLINE.Z3 new file mode 100644 index 00000000..ebbe2603 Binary files /dev/null and b/Source/Images/d_infocom/u0/DEADLINE.Z3 differ diff --git a/Source/Images/d_infocom/u0/ENCHANT.COM b/Source/Images/d_infocom/u0/ENCHANT.COM new file mode 100755 index 00000000..39264364 Binary files /dev/null and b/Source/Images/d_infocom/u0/ENCHANT.COM differ diff --git a/Source/Images/d_infocom/u0/ENCHANT.Z3 b/Source/Images/d_infocom/u0/ENCHANT.Z3 new file mode 100644 index 00000000..749a4d94 Binary files /dev/null and b/Source/Images/d_infocom/u0/ENCHANT.Z3 differ diff --git a/Source/Images/d_infocom/u0/H2G2.COM b/Source/Images/d_infocom/u0/H2G2.COM new file mode 100755 index 00000000..962f35e5 Binary files /dev/null and b/Source/Images/d_infocom/u0/H2G2.COM differ diff --git a/Source/Images/d_infocom/u0/H2G2.Z3 b/Source/Images/d_infocom/u0/H2G2.Z3 new file mode 100644 index 00000000..3a3e338e Binary files /dev/null and b/Source/Images/d_infocom/u0/H2G2.Z3 differ diff --git a/Source/Images/d_infocom/u0/HOLLYW.COM b/Source/Images/d_infocom/u0/HOLLYW.COM new file mode 100755 index 00000000..0b51176c Binary files /dev/null and b/Source/Images/d_infocom/u0/HOLLYW.COM differ diff --git a/Source/Images/d_infocom/u0/HOLLYW.Z3 b/Source/Images/d_infocom/u0/HOLLYW.Z3 new file mode 100644 index 00000000..9652a646 Binary files /dev/null and b/Source/Images/d_infocom/u0/HOLLYW.Z3 differ diff --git a/Source/Images/d_infocom/u0/INFIDEL.COM b/Source/Images/d_infocom/u0/INFIDEL.COM new file mode 100755 index 00000000..e5fc4e62 Binary files /dev/null and b/Source/Images/d_infocom/u0/INFIDEL.COM differ diff --git a/Source/Images/d_infocom/u0/INFIDEL.Z3 b/Source/Images/d_infocom/u0/INFIDEL.Z3 new file mode 100644 index 00000000..c31b145b Binary files /dev/null and b/Source/Images/d_infocom/u0/INFIDEL.Z3 differ diff --git a/Source/Images/d_infocom/u0/JOURNEY.Z6 b/Source/Images/d_infocom/u0/JOURNEY.Z6 new file mode 100644 index 00000000..d0952f11 Binary files /dev/null and b/Source/Images/d_infocom/u0/JOURNEY.Z6 differ diff --git a/Source/Images/d_infocom/u0/LEATHER.COM b/Source/Images/d_infocom/u0/LEATHER.COM new file mode 100755 index 00000000..110447c3 Binary files /dev/null and b/Source/Images/d_infocom/u0/LEATHER.COM differ diff --git a/Source/Images/d_infocom/u0/LEATHER.Z3 b/Source/Images/d_infocom/u0/LEATHER.Z3 new file mode 100644 index 00000000..76c5ea77 Binary files /dev/null and b/Source/Images/d_infocom/u0/LEATHER.Z3 differ diff --git a/Source/Images/d_infocom/u0/LURKING.COM b/Source/Images/d_infocom/u0/LURKING.COM new file mode 100755 index 00000000..8998179e Binary files /dev/null and b/Source/Images/d_infocom/u0/LURKING.COM differ diff --git a/Source/Images/d_infocom/u0/LURKING.Z3 b/Source/Images/d_infocom/u0/LURKING.Z3 new file mode 100644 index 00000000..a03dd600 Binary files /dev/null and b/Source/Images/d_infocom/u0/LURKING.Z3 differ diff --git a/Source/Images/d_infocom/u0/MOONMIST.COM b/Source/Images/d_infocom/u0/MOONMIST.COM new file mode 100755 index 00000000..2d665b4b Binary files /dev/null and b/Source/Images/d_infocom/u0/MOONMIST.COM differ diff --git a/Source/Images/d_infocom/u0/MOONMIST.Z3 b/Source/Images/d_infocom/u0/MOONMIST.Z3 new file mode 100644 index 00000000..0948e500 Binary files /dev/null and b/Source/Images/d_infocom/u0/MOONMIST.Z3 differ diff --git a/Source/Images/d_infocom/u0/NORDBERT.Z4 b/Source/Images/d_infocom/u0/NORDBERT.Z4 new file mode 100644 index 00000000..68368993 Binary files /dev/null and b/Source/Images/d_infocom/u0/NORDBERT.Z4 differ diff --git a/Source/Images/d_infocom/u0/PLANET.COM b/Source/Images/d_infocom/u0/PLANET.COM new file mode 100755 index 00000000..4d71bb49 Binary files /dev/null and b/Source/Images/d_infocom/u0/PLANET.COM differ diff --git a/Source/Images/d_infocom/u0/PLANET.Z3 b/Source/Images/d_infocom/u0/PLANET.Z3 new file mode 100644 index 00000000..c9d3489b Binary files /dev/null and b/Source/Images/d_infocom/u0/PLANET.Z3 differ diff --git a/Source/Images/d_infocom/u0/PLUNDER.COM b/Source/Images/d_infocom/u0/PLUNDER.COM new file mode 100755 index 00000000..15f55982 Binary files /dev/null and b/Source/Images/d_infocom/u0/PLUNDER.COM differ diff --git a/Source/Images/d_infocom/u0/PLUNDER.Z3 b/Source/Images/d_infocom/u0/PLUNDER.Z3 new file mode 100644 index 00000000..b5e076d3 Binary files /dev/null and b/Source/Images/d_infocom/u0/PLUNDER.Z3 differ diff --git a/Source/Images/d_infocom/u0/SEASTALK.COM b/Source/Images/d_infocom/u0/SEASTALK.COM new file mode 100755 index 00000000..62347efe Binary files /dev/null and b/Source/Images/d_infocom/u0/SEASTALK.COM differ diff --git a/Source/Images/d_infocom/u0/SEASTALK.Z3 b/Source/Images/d_infocom/u0/SEASTALK.Z3 new file mode 100644 index 00000000..a5d7c42b Binary files /dev/null and b/Source/Images/d_infocom/u0/SEASTALK.Z3 differ diff --git a/Source/Images/d_infocom/u0/SHERLOCK.Z5 b/Source/Images/d_infocom/u0/SHERLOCK.Z5 new file mode 100644 index 00000000..2f87cd86 Binary files /dev/null and b/Source/Images/d_infocom/u0/SHERLOCK.Z5 differ diff --git a/Source/Images/d_infocom/u0/SHOGUN.Z6 b/Source/Images/d_infocom/u0/SHOGUN.Z6 new file mode 100644 index 00000000..ac1b620a Binary files /dev/null and b/Source/Images/d_infocom/u0/SHOGUN.Z6 differ diff --git a/Source/Images/d_infocom/u0/SORCERER.COM b/Source/Images/d_infocom/u0/SORCERER.COM new file mode 100755 index 00000000..f90fbd39 Binary files /dev/null and b/Source/Images/d_infocom/u0/SORCERER.COM differ diff --git a/Source/Images/d_infocom/u0/SORCERER.Z3 b/Source/Images/d_infocom/u0/SORCERER.Z3 new file mode 100644 index 00000000..0925ddfc Binary files /dev/null and b/Source/Images/d_infocom/u0/SORCERER.Z3 differ diff --git a/Source/Images/d_infocom/u0/SPELLB.COM b/Source/Images/d_infocom/u0/SPELLB.COM new file mode 100755 index 00000000..86b887d0 Binary files /dev/null and b/Source/Images/d_infocom/u0/SPELLB.COM differ diff --git a/Source/Images/d_infocom/u0/SPELLB.Z3 b/Source/Images/d_infocom/u0/SPELLB.Z3 new file mode 100644 index 00000000..b4ba6fd2 Binary files /dev/null and b/Source/Images/d_infocom/u0/SPELLB.Z3 differ diff --git a/Source/Images/d_infocom/u0/STARCROS.COM b/Source/Images/d_infocom/u0/STARCROS.COM new file mode 100755 index 00000000..dc2b076e Binary files /dev/null and b/Source/Images/d_infocom/u0/STARCROS.COM differ diff --git a/Source/Images/d_infocom/u0/STARCROS.Z3 b/Source/Images/d_infocom/u0/STARCROS.Z3 new file mode 100644 index 00000000..71b419de Binary files /dev/null and b/Source/Images/d_infocom/u0/STARCROS.Z3 differ diff --git a/Source/Images/d_infocom/u0/STATIONF.COM b/Source/Images/d_infocom/u0/STATIONF.COM new file mode 100755 index 00000000..9ed4cf9a Binary files /dev/null and b/Source/Images/d_infocom/u0/STATIONF.COM differ diff --git a/Source/Images/d_infocom/u0/STATIONF.Z3 b/Source/Images/d_infocom/u0/STATIONF.Z3 new file mode 100644 index 00000000..f7bc4334 Binary files /dev/null and b/Source/Images/d_infocom/u0/STATIONF.Z3 differ diff --git a/Source/Images/d_infocom/u0/SUSPECT.COM b/Source/Images/d_infocom/u0/SUSPECT.COM new file mode 100755 index 00000000..3d929d07 Binary files /dev/null and b/Source/Images/d_infocom/u0/SUSPECT.COM differ diff --git a/Source/Images/d_infocom/u0/SUSPECT.Z3 b/Source/Images/d_infocom/u0/SUSPECT.Z3 new file mode 100644 index 00000000..b40920ec Binary files /dev/null and b/Source/Images/d_infocom/u0/SUSPECT.Z3 differ diff --git a/Source/Images/d_infocom/u0/SUSPEND.COM b/Source/Images/d_infocom/u0/SUSPEND.COM new file mode 100755 index 00000000..c32174c0 Binary files /dev/null and b/Source/Images/d_infocom/u0/SUSPEND.COM differ diff --git a/Source/Images/d_infocom/u0/SUSPEND.Z3 b/Source/Images/d_infocom/u0/SUSPEND.Z3 new file mode 100644 index 00000000..8bc66674 Binary files /dev/null and b/Source/Images/d_infocom/u0/SUSPEND.Z3 differ diff --git a/Source/Images/d_infocom/u0/TRINITY.Z4 b/Source/Images/d_infocom/u0/TRINITY.Z4 new file mode 100644 index 00000000..b5dfa4a0 Binary files /dev/null and b/Source/Images/d_infocom/u0/TRINITY.Z4 differ diff --git a/Source/Images/d_infocom/u0/WISHB.COM b/Source/Images/d_infocom/u0/WISHB.COM new file mode 100755 index 00000000..9717a1eb Binary files /dev/null and b/Source/Images/d_infocom/u0/WISHB.COM differ diff --git a/Source/Images/d_infocom/u0/WISHB.Z3 b/Source/Images/d_infocom/u0/WISHB.Z3 new file mode 100644 index 00000000..b3cc3b40 Binary files /dev/null and b/Source/Images/d_infocom/u0/WISHB.Z3 differ diff --git a/Source/Images/d_infocom/u0/WITNESS.COM b/Source/Images/d_infocom/u0/WITNESS.COM new file mode 100755 index 00000000..91636f53 Binary files /dev/null and b/Source/Images/d_infocom/u0/WITNESS.COM differ diff --git a/Source/Images/d_infocom/u0/WITNESS.Z3 b/Source/Images/d_infocom/u0/WITNESS.Z3 new file mode 100644 index 00000000..71b46590 Binary files /dev/null and b/Source/Images/d_infocom/u0/WITNESS.Z3 differ diff --git a/Source/Images/d_infocom/u0/ZORK0.Z6 b/Source/Images/d_infocom/u0/ZORK0.Z6 new file mode 100644 index 00000000..7ab221a1 Binary files /dev/null and b/Source/Images/d_infocom/u0/ZORK0.Z6 differ diff --git a/Source/Images/d_infocom/u0/ZORK1.COM b/Source/Images/d_infocom/u0/ZORK1.COM new file mode 100755 index 00000000..e8a9bfdb Binary files /dev/null and b/Source/Images/d_infocom/u0/ZORK1.COM differ diff --git a/Source/Images/d_infocom/u0/ZORK1.Z3 b/Source/Images/d_infocom/u0/ZORK1.Z3 new file mode 100644 index 00000000..2de2d996 Binary files /dev/null and b/Source/Images/d_infocom/u0/ZORK1.Z3 differ diff --git a/Source/Images/d_infocom/u0/ZORK2.COM b/Source/Images/d_infocom/u0/ZORK2.COM new file mode 100755 index 00000000..65c3c984 Binary files /dev/null and b/Source/Images/d_infocom/u0/ZORK2.COM differ diff --git a/Source/Images/d_infocom/u0/ZORK2.Z3 b/Source/Images/d_infocom/u0/ZORK2.Z3 new file mode 100644 index 00000000..635caaf2 Binary files /dev/null and b/Source/Images/d_infocom/u0/ZORK2.Z3 differ diff --git a/Source/Images/d_infocom/u0/ZORK3.COM b/Source/Images/d_infocom/u0/ZORK3.COM new file mode 100755 index 00000000..040debba Binary files /dev/null and b/Source/Images/d_infocom/u0/ZORK3.COM differ diff --git a/Source/Images/d_infocom/u0/ZORK3.Z3 b/Source/Images/d_infocom/u0/ZORK3.Z3 new file mode 100644 index 00000000..d02c9dbc Binary files /dev/null and b/Source/Images/d_infocom/u0/ZORK3.Z3 differ diff --git a/Source/Images/d_infocom/u0/ZORKNOTE.TXT b/Source/Images/d_infocom/u0/ZORKNOTE.TXT new file mode 100644 index 00000000..6601644e --- /dev/null +++ b/Source/Images/d_infocom/u0/ZORKNOTE.TXT @@ -0,0 +1,93 @@ + + Forward - MAP - July 2025 + + The following article describes how to configure the game Interpreters +(COM files) included with this distribution. Specifically this allows +the terminal control codes to be changed to your specific needs. + +Additional to the addresses below, the following address is relevant + +02D0h File name extension of the data file + must be 3 bytes long, fill with ascii spaces (20H) + +The following link containing the interpreter source code is also useful: +https://github.com/erkyrath/infocom-zcode-terps/blob/master/cpm80/zorkcpm.prn + +========================================================================= + + Customizing INFOCOM(tm) Games + notes on CP/M addresses + + I don't know wheather or not this is a duplicate effort, but since +I haven't found a similar listing....... + + When I first saw that Infocom was selling off all their CP/M compatible +games for only $14.95 I was overjoyed. Now I could buy all the titles that +I always wanted but could not really afford. Atlast, guilt free software. + + I ended up buying Zork1 for the Osborne I, Zork2 and Zork3 for the DEC +Rainbow, and Wishbringer for the Kaypro II. (My computer system is an Ampro +Little Board with Teac 55b and 55f drives. The terminal emulates a DEC +VT100. With my current hardware I can read or write to almost any 5.25" +format.) I thought everything was going to be so simple, use MULTIDSK and +MCOPY to transfer the programs to Ampro format and away I go! Wrong answer. +Although all the programs would execute, the terminal was confused beyond +belief. + + Some rainy day time with all the .com files and a trusty debugger +got me all the data I needed to unconfuse the terminal and allow me to +customize the display to just the way I wanted it. Now I'd like to 'share +the wealth' with anyone else bitten by the Infocom bug. + + The program starts off with an initial jump to 0200h, the start of +the actual program code. Next comes all the good stuff; + +0103h Charactors per line + a 78 charactor line is 4Eh + +0104h Lines per screen + a 23 line terminal (excluding status) is 17h + +0105h File name of the data file without file extent + must be 8 bytes long, fill with ascii spaces (20H) + if you have ZORK1.dat then 'ZORK1',20h,20h,20h goes here + +010Dh Screen LF after CR (1 = yes;0 = no) + +010Eh Printer LF after CR (1 = yes;0 = no) + +010Fh Inverse video offset + if you can add a 80h to the ascii charactor value to get + inverse video, this byte's for you + + The following strings start with a one byte charactor count, + the charactor string, and then a null fill (00H) + +0110h Terminal init. string + Clear screen, move cursor to lower left, set scroll region + VT100 = 12 1b 5b 32 4a 1b 5b 32 33 3b 31 48 1b 5b 32 3b 32 33 72 00 + +0131h Terminal reset string + Put everything back the way it was + +0152h Begin status line display + Move cursor to upper left and set video attribute (inverse, bold, etc) + +0173h End status line display + Move cursor to lower left and reset video attribute + +0194h Printer init. string + room for anything special you need to set up your printer + +0200h Start of the program code + + + I hope you have as much fun with the games as I have had, you can't +beat them at their close-out price. It's unfortunate that they have dropped +their CP/M support, I can't see buying a clone just to play with the +Leather Goddess. + + Gar Nelson + Olympia, Wa. + +GEnie address ==> G.NELSON diff --git a/Source/Images/d_infocom/u15/README.TXT b/Source/Images/d_infocom/u15/README.TXT new file mode 100644 index 00000000..8c2d55aa --- /dev/null +++ b/Source/Images/d_infocom/u15/README.TXT @@ -0,0 +1,8 @@ +VEZZA + +Please see official documentation at the following links + +https://sijnstra.itch.io/vezza + +https://gitlab.com/sijnstra1/vezza + diff --git a/Source/Images/d_infocom/u15/VEZZA-AV.COM b/Source/Images/d_infocom/u15/VEZZA-AV.COM new file mode 100644 index 00000000..e8d5c0ec Binary files /dev/null and b/Source/Images/d_infocom/u15/VEZZA-AV.COM differ diff --git a/Source/Images/d_infocom/u15/VEZZA-AX.COM b/Source/Images/d_infocom/u15/VEZZA-AX.COM new file mode 100644 index 00000000..ba3d7374 Binary files /dev/null and b/Source/Images/d_infocom/u15/VEZZA-AX.COM differ diff --git a/Source/Images/d_infocom/u15/VEZZA-B.COM b/Source/Images/d_infocom/u15/VEZZA-B.COM new file mode 100644 index 00000000..1627afca Binary files /dev/null and b/Source/Images/d_infocom/u15/VEZZA-B.COM differ diff --git a/Source/Images/d_infocom/u15/VEZZA-C2.COM b/Source/Images/d_infocom/u15/VEZZA-C2.COM new file mode 100644 index 00000000..fb5c80cf Binary files /dev/null and b/Source/Images/d_infocom/u15/VEZZA-C2.COM differ diff --git a/Source/Images/d_infocom/u15/VEZZA-CC.COM b/Source/Images/d_infocom/u15/VEZZA-CC.COM new file mode 100644 index 00000000..b5faea13 Binary files /dev/null and b/Source/Images/d_infocom/u15/VEZZA-CC.COM differ diff --git a/Source/Images/d_infocom/u15/VEZZA-FG.COM b/Source/Images/d_infocom/u15/VEZZA-FG.COM new file mode 100644 index 00000000..a3c2787b Binary files /dev/null and b/Source/Images/d_infocom/u15/VEZZA-FG.COM differ diff --git a/Source/Images/d_infocom/u15/VEZZA-RW.COM b/Source/Images/d_infocom/u15/VEZZA-RW.COM new file mode 100644 index 00000000..e8d5c0ec Binary files /dev/null and b/Source/Images/d_infocom/u15/VEZZA-RW.COM differ diff --git a/Source/Images/hd_infocom.txt b/Source/Images/hd_infocom.txt new file mode 100644 index 00000000..1a31ea4c --- /dev/null +++ b/Source/Images/hd_infocom.txt @@ -0,0 +1,4 @@ +# +# Add the ReadMe document +# +d_infocom/Readme.txt 0: diff --git a/Source/ver.inc b/Source/ver.inc index a1825ef0..46e1e428 100644 --- a/Source/ver.inc +++ b/Source/ver.inc @@ -2,7 +2,7 @@ #DEFINE RMN 6 #DEFINE RUP 0 #DEFINE RTP 0 -#DEFINE BIOSVER "3.6.0-dev.6+ch376native" +#DEFINE BIOSVER "3.6.0-dev.11+ch376native" #define rmj RMJ #define rmn RMN #define rup RUP diff --git a/Source/ver.lib b/Source/ver.lib index 8398f79f..484d264f 100644 --- a/Source/ver.lib +++ b/Source/ver.lib @@ -3,5 +3,5 @@ rmn equ 6 rup equ 0 rtp equ 0 biosver macro - db "3.6.0-dev.6+ch376native" + db "3.6.0-dev.11+ch376native" endm