diff --git a/Doc/ChangeLog.txt b/Doc/ChangeLog.txt index f4458345..94c3eb3d 100644 --- a/Doc/ChangeLog.txt +++ b/Doc/ChangeLog.txt @@ -17,6 +17,8 @@ Version 3.6 - MAP: Device Inventory moved from HBIOS to Rom App, saving >1k space in HBIOS - MAP: Added disk image for all Infocom text adventure Games - M?R: Fixed formatting issue with SLABEL where Slice # < 10 +- WBW: Improved image creation process to allow user defined aggregates +- WBW: Implemented config driven slice name and system image specification Version 3.5.1 ------------- diff --git a/Doc/RomWBW Applications.pdf b/Doc/RomWBW Applications.pdf index d9e577b8..451e3c74 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 1f364cd2..0c3ec782 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 6dc5fed5..c4017023 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 22e8838b..ae2d315f 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 4ca6592a..60f6c8ca 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 888915c4..7d242fad 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 a901941f..b6cd070e 100644 --- a/ReadMe.md +++ b/ReadMe.md @@ -1,433 +1,433 @@ - - - - - - -**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. + + + + + + +**RomWBW Introduction** \ +Version 3.6 \ +Wayne Warthen ([wwarthen@gmail.com](mailto:wwarthen@gmail.com)) \ +17 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 ce7b25e5..ba7a24b3 100644 --- a/ReadMe.txt +++ b/ReadMe.txt @@ -1,428 +1,443 @@ -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. +RomWBW Introduction +Wayne Warthen (wwarthen@gmail.com) +17 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/Build.cmd b/Source/Build.cmd index d258ef54..e654579f 100644 --- a/Source/Build.cmd +++ b/Source/Build.cmd @@ -4,7 +4,6 @@ setlocal :: call BuildDoc || exit /b call BuildProp || exit /b call BuildShared || exit /b -call BuildBP || exit /b call BuildImages || exit /b call BuildROM %* || exit /b call BuildZRC || exit /b diff --git a/Source/BuildBP.cmd b/Source/BuildBP.cmd deleted file mode 100644 index c1139fdd..00000000 --- a/Source/BuildBP.cmd +++ /dev/null @@ -1,4 +0,0 @@ -@echo off -setlocal - -pushd BPBIOS && call Build || exit /b & popd \ No newline at end of file diff --git a/Source/BuildShared.cmd b/Source/BuildShared.cmd index 698050f0..8d7afc47 100644 --- a/Source/BuildShared.cmd +++ b/Source/BuildShared.cmd @@ -11,6 +11,7 @@ pushd ZSDOS && call Build || exit /b & popd pushd ZSDOS2 && call Build || exit /b & popd pushd CPM3 && call Build || exit /b & popd pushd ZPM3 && call Build || exit /b & popd +pushd BPBIOS && call Build || exit /b & popd pushd CPNET && call Build || exit /b & popd pushd pSys && call Build || exit /b & popd pushd Apps && call Build || exit /b & popd diff --git a/Source/Images/Build.cmd b/Source/Images/Build.cmd index 5b9576df..24cc102e 100644 --- a/Source/Images/Build.cmd +++ b/Source/Images/Build.cmd @@ -1,92 +1,22 @@ @echo off setlocal -:: call BuildDisk.cmd bp hd wbw_hd1k ..\zsdos\zsys_wbw.sys -:: copy /b hd1k_prefix.dat + ..\..\Binary\hd1k_bp.img + ..\..\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_bp.img || exit /b -:: goto :eof - -echo. -echo Building Floppy Disk Images... -echo. -call BuildDisk.cmd cpm22 fd wbw_fd144 ..\cpm22\cpm_wbw.sys || exit /b -call BuildDisk.cmd zsdos fd wbw_fd144 ..\zsdos\zsys_wbw.sys || exit /b -call BuildDisk.cmd nzcom fd wbw_fd144 ..\zsdos\zsys_wbw.sys || exit /b -call BuildDisk.cmd cpm3 fd wbw_fd144 ..\cpm3\cpmldr.sys || exit /b -call BuildDisk.cmd zpm3 fd wbw_fd144 ..\zpm3\zpmldr.sys || exit /b -call BuildDisk.cmd z3plus fd wbw_fd144 ..\cpm3\cpmldr.sys || exit /b -call BuildDisk.cmd ws4 fd wbw_fd144 || exit /b -call BuildDisk.cmd qpm fd wbw_fd144 ..\qpm\qpm_wbw.sys || exit /b -call BuildDisk.cmd z80asm fd wbw_fd144 || exit /b -call BuildDisk.cmd aztecc fd wbw_fd144 || exit /b -call BuildDisk.cmd hitechc fd wbw_fd144 || exit /b -call BuildDisk.cmd tpascal fd wbw_fd144 || exit /b -call BuildDisk.cmd bascomp fd wbw_fd144 || exit /b -call BuildDisk.cmd cobol fd wbw_fd144 || exit /b -call BuildDisk.cmd fortran fd wbw_fd144 || exit /b -call BuildDisk.cmd games fd wbw_fd144 || exit /b -call BuildDisk.cmd cowgol fd wbw_fd144 || exit /b - -echo. -echo Building Hard Disk Images (512 directory entry format)... -echo. -call BuildDisk.cmd blank hd wbw_hd512 || exit /b -call BuildDisk.cmd cpm22 hd wbw_hd512 ..\cpm22\cpm_wbw.sys || exit /b -call BuildDisk.cmd zsdos hd wbw_hd512 ..\zsdos\zsys_wbw.sys || exit /b -call BuildDisk.cmd nzcom hd wbw_hd512 ..\zsdos\zsys_wbw.sys || exit /b -call BuildDisk.cmd cpm3 hd wbw_hd512 ..\cpm3\cpmldr.sys || exit /b -call BuildDisk.cmd zpm3 hd wbw_hd512 ..\zpm3\zpmldr.sys || exit /b -call BuildDisk.cmd z3plus hd wbw_hd512 ..\cpm3\cpmldr.sys || exit /b -call BuildDisk.cmd ws4 hd wbw_hd512 || exit /b -call BuildDisk.cmd dos65 hd wbw_hd512 ..\zsdos\zsys_wbw.sys || exit /b -call BuildDisk.cmd qpm hd wbw_hd512 ..\qpm\qpm_wbw.sys || exit /b -call BuildDisk.cmd z80asm hd wbw_hd512 || exit /b -call BuildDisk.cmd aztecc hd wbw_hd512 || exit /b -call BuildDisk.cmd hitechc hd wbw_hd512 || exit /b -call BuildDisk.cmd tpascal hd wbw_hd512 || exit /b -call BuildDisk.cmd bascomp hd wbw_hd512 || exit /b -call BuildDisk.cmd cobol hd wbw_hd512 || exit /b -call BuildDisk.cmd fortran hd wbw_hd512 || exit /b -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 Hard Disk Images (1024 directory entry format)... -echo. -call BuildDisk.cmd blank hd wbw_hd1k || exit /b -call BuildDisk.cmd cpm22 hd wbw_hd1k ..\cpm22\cpm_wbw.sys || exit /b -call BuildDisk.cmd zsdos hd wbw_hd1k ..\zsdos\zsys_wbw.sys || exit /b -call BuildDisk.cmd nzcom hd wbw_hd1k ..\zsdos\zsys_wbw.sys || exit /b -call BuildDisk.cmd cpm3 hd wbw_hd1k ..\cpm3\cpmldr.sys || exit /b -call BuildDisk.cmd zpm3 hd wbw_hd1k ..\zpm3\zpmldr.sys || exit /b -call BuildDisk.cmd z3plus hd wbw_hd1k ..\cpm3\cpmldr.sys || exit /b -call BuildDisk.cmd ws4 hd wbw_hd1k || exit /b -call BuildDisk.cmd qpm hd wbw_hd1k ..\qpm\qpm_wbw.sys || exit /b -call BuildDisk.cmd z80asm hd wbw_hd1k || exit /b -call BuildDisk.cmd aztecc hd wbw_hd1k || exit /b -call BuildDisk.cmd hitechc hd wbw_hd1k || exit /b -call BuildDisk.cmd tpascal hd wbw_hd1k || exit /b -call BuildDisk.cmd bascomp hd wbw_hd1k || exit /b -call BuildDisk.cmd cobol hd wbw_hd1k || exit /b -call BuildDisk.cmd fortran hd wbw_hd1k || exit /b -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 +SETLOCAL EnableDelayedExpansion 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 - -call BuildImg.cmd || exit /b +for %%f in (fd_*.txt) do ( + set Image=%%~nf + PowerShell -ExecutionPolicy Unrestricted .\BuildImg.ps1 fd144_!Image:fd_=! || exit /b +) + +for %%f in (hd_*.txt) do ( + set Image=%%~nf + PowerShell -ExecutionPolicy Unrestricted .\BuildImg.ps1 hd512_!Image:hd_=! || exit /b + PowerShell -ExecutionPolicy Unrestricted .\BuildImg.ps1 hd1k_!Image:hd_=! || exit /b +) + +for %%f in (*.def) do ( + PowerShell -ExecutionPolicy Unrestricted .\BuildDsk.ps1 hd512_%%~nf || exit /b + PowerShell -ExecutionPolicy Unrestricted .\BuildDsk.ps1 hd1k_%%~nf || exit /b +) diff --git a/Source/Images/BuildDisk.cmd b/Source/Images/BuildDisk.cmd deleted file mode 100644 index 4f865ae8..00000000 --- a/Source/Images/BuildDisk.cmd +++ /dev/null @@ -1,4 +0,0 @@ -@echo off -setlocal - -PowerShell -ExecutionPolicy Unrestricted .\BuildDisk.ps1 %* || exit /b \ No newline at end of file diff --git a/Source/Images/BuildDisk.ps1 b/Source/Images/BuildDisk.ps1 deleted file mode 100644 index 9f870713..00000000 --- a/Source/Images/BuildDisk.ps1 +++ /dev/null @@ -1,110 +0,0 @@ -Param($Disk, $Type="", $Format="", $SysFile="") - -$ErrorAction = 'Stop' - -$CpmToolsPath = '../../Tools/cpmtools' - -$env:PATH = $CpmToolsPath + ';' + $env:PATH - -if ($Type.Length -eq 0) -{ - Write-Error "No disk type specified!" -ErrorAction Stop - return -} - -if ($Format.Length -eq 0) -{ - Write-Error "No disk format specified!" -ErrorAction Stop - return -} - -switch ($Format) -{ - "wbw_fd144" - { - # 1.44MB Floppy Disk - $Desc = "1.44MB Floppy Disk" - $ImgFile = "fd144_${Disk}.img" - $CatFile = "fd144_${Disk}.cat" - $MediaID = 6 - $Size = 1440KB - } - - "wbw_hd512" - { - # 512 Directory Entry Hard Disk Format - $Desc = "Hard Disk (512 directory entry format)" - $ImgFile = "hd512_${Disk}.img" - $CatFile = "hd512_${Disk}.cat" - $MediaID = 4 - $Size = 8MB + 128KB - } - - "wbw_hd1k" - { - # 1024 Directory Entry Hard Disk Format - $Desc = "Hard Disk (1024 directory entry format)" - $ImgFile = "hd1k_${Disk}.img" - $CatFile = "hd1k_${Disk}.cat" - $MediaID = 10 - $Size = 8MB - } -} - -if (-not (Test-Path("d_${Disk}/"))) -{ - Write-Error "Source directory d_${Disk} for disk ${Disk} not found!" -ErrorAction Stop - return -} - -"Generating $Disk $Desc..." - -if ($SysFile.Length -gt 0) - { [byte[]]$SysImg = [System.IO.File]::ReadAllBytes($SysFile) } -else - { [byte[]]$SysImg = @() } - -$Image = ($SysImg + ([byte[]](0xE5) * ($Size - $SysImg.length))) - -# $Image[1410] = 0x4D -# $Image[1411] = 0x49 -# $Image[1412] = 0x44 -# $Image[1413] = $MediaID - -[System.IO.File]::WriteAllBytes($ImgFile, $Image) - -for ($Usr=0; $Usr -lt 16; $Usr++) -{ - if (Test-Path ("d_${Disk}/u${Usr}/*")) - { - $Cmd = "cpmcp -f $Format $ImgFile d_${Disk}/u${Usr}/*.* ${Usr}:" - $Cmd - Invoke-Expression $Cmd - if ($LASTEXITCODE -gt 0) {throw "Command returned exit code $LASTEXITCODE"} - } -} - -if (Test-Path("${Type}_${Disk}.txt")) -{ - foreach($Line in Get-Content "${Type}_${Disk}.txt") - { - $Spec = $Line.Trim() - if (($Spec.Length -gt 0) -and ($Spec.Substring(0,1) -ne "#")) - { - $Cmd = "cpmcp -f $Format $ImgFile ${Spec}" - $Cmd - Invoke-Expression $Cmd - if ($LASTEXITCODE -gt 0) {throw "Command returned exit code $LASTEXITCODE"} - } - } -} - -$Cmd = "cpmls -f $Format -D $ImgFile" -$Cmd -Invoke-Expression $Cmd > $CatFile - -"Moving image $ImgFile into output directory..." - -Move-Item $ImgFile -Destination "..\..\Binary\" -Force - -return \ No newline at end of file diff --git a/Source/Images/BuildDsk.ps1 b/Source/Images/BuildDsk.ps1 new file mode 100644 index 00000000..49d8d171 --- /dev/null +++ b/Source/Images/BuildDsk.ps1 @@ -0,0 +1,59 @@ +param([string]$Disk) + +# If a PowerShell exception occurs, just stop the script immediately. +$ErrorAction = 'Stop' + +# $ImgFile = "..\..\Binary\hd1k_" + $Image + ".img" + +$Format, $Def = $Disk.Split("_") + +$DefFile = $Def + ".def" + +$SliceList = @() + +ForEach ($Line in Get-Content $DefFile) +{ + $Line = $Line.Trim() + + if (($Line.Length -eq 0) -or ($Line[0] -eq "#")) + { + continue + } + + $SliceList += $Line +} + +$ImgFile = "..\..\Binary\" + $Disk + ".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 = "$env:ComSpec /c copy /b $FileList $ImgFile" +$Cmd +Invoke-Expression $Cmd + +exit 0 diff --git a/Source/Images/BuildImg.cmd b/Source/Images/BuildImg.cmd deleted file mode 100644 index 7931c5b9..00000000 --- a/Source/Images/BuildImg.cmd +++ /dev/null @@ -1,6 +0,0 @@ -@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 index 062ab03b..67f33445 100644 --- a/Source/Images/BuildImg.ps1 +++ b/Source/Images/BuildImg.ps1 @@ -3,64 +3,142 @@ param([string]$Image) # If a PowerShell exception occurs, just stop the script immediately. $ErrorAction = 'Stop' -$DefFile = $Image + ".def" +$CpmToolsPath = '../../Tools/cpmtools' -$ImgFile = "..\..\Binary\hd1k_" + $Image + ".img" +$env:PATH = $CpmToolsPath + ';' + $env:PATH +$Format, $Disk = $Image.Split("_") +$Format = "wbw_" + $Format +if ($Format.Length -eq 0) +{ + Write-Error "No disk format specified!" -ErrorAction Stop + return +} + +switch ($Format) +{ + "wbw_fd144" + { + # 1.44MB Floppy Disk + $Type = "fd" + $Desc = "1.44MB Floppy Disk" + $ImgFile = "fd144_${Disk}.img" + $CatFile = "fd144_${Disk}.cat" + $MediaID = 6 + $Size = 1440KB + } + + "wbw_hd512" + { + # 512 Directory Entry Hard Disk Format + $Type = "hd" + $Desc = "Hard Disk (512 directory entry format)" + $ImgFile = "hd512_${Disk}.img" + $CatFile = "hd512_${Disk}.cat" + $MediaID = 4 + $Size = 8MB + 128KB + } -$SliceList = @() + "wbw_hd1k" + { + # 1024 Directory Entry Hard Disk Format + $Type = "hd" + $Desc = "Hard Disk (1024 directory entry format)" + $ImgFile = "hd1k_${Disk}.img" + $CatFile = "hd1k_${Disk}.cat" + $MediaID = 10 + $Size = 8MB + } +} -ForEach ($Line in Get-Content $DefFile) +if (-not (Test-Path("d_${Disk}/"))) { - $Line = $Line.Trim() - - if (($Line.Length -eq 0) -or ($Line[0] -eq "#")) - { - continue - } - - $SliceList += $Line + Write-Error "Source directory d_${Disk} for disk ${Disk} not found!" -ErrorAction Stop + return } -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 +"Generating $Disk $Desc..." + +if (Test-Path("${Type}_${Disk}.txt")) +{ + foreach($Line in Get-Content "${Type}_${Disk}.txt") + { + $Spec = $Line.Trim() + if (($Spec.Length -gt 0) -and ($Spec.Substring(0,1) -eq '@')) + { + $Directive = $Spec.Substring(1); + $VarName, $VarVal = $Directive.Split("=") + Invoke-Expression "`$$VarName = $VarVal" + continue + } + } } -CreateImageFile "hd512" -CreateImageFile "hd1k" +# "Label: '$Label'" +# "SysImage: '$SysImage'" + +if ($SysImage.Length -gt 0) + { [byte[]]$SysImg = [System.IO.File]::ReadAllBytes($SysImage) } +else + { [byte[]]$SysImg = @() } + +$ImageBin = ($SysImg + ([byte[]](0xE5) * ($Size - $SysImg.length))) + +if ($Label.Length -gt 0) +{ + $LabelBytes = [System.Text.Encoding]::ASCII.GetBytes($Label) + $nLabel = 0; + for ($nImg = 0x5E7; $nImg -lt 0x5F7; $nImg++) + { + if ($nLabel -lt $Label.Length) + { + $ImageBin[$nImg] = $LabelBytes[$nLabel] + } + else + { + $ImageBin[$nImg] = [byte][char]'$' + } + $nLabel++ + } + $ImageBin[0x5F7] = [byte][char]'$' +} + +[System.IO.File]::WriteAllBytes($ImgFile, $ImageBin) + +for ($Usr=0; $Usr -lt 16; $Usr++) +{ + if (Test-Path ("d_${Disk}/u${Usr}/*")) + { + $Cmd = "cpmcp -f $Format $ImgFile d_${Disk}/u${Usr}/*.* ${Usr}:" + $Cmd + Invoke-Expression $Cmd + if ($LASTEXITCODE -gt 0) {throw "Command returned exit code $LASTEXITCODE"} + } +} + +if (Test-Path("${Type}_${Disk}.txt")) +{ + foreach($Line in Get-Content "${Type}_${Disk}.txt") + { + $Spec = $Line.Trim() + if (($Spec.Length -gt 0) -and ($Spec.Substring(0,1) -ne "#") -and ($Spec.Substring(0,1) -ne "@")) + { + $Cmd = "cpmcp -f $Format $ImgFile ${Spec}" + $Cmd + Invoke-Expression $Cmd + if ($LASTEXITCODE -gt 0) {throw "Command returned exit code $LASTEXITCODE"} + } + } +} + +$Cmd = "cpmls -f $Format -D $ImgFile" +$Cmd +Invoke-Expression $Cmd > $CatFile + +# "Moving image $ImgFile into output directory..." + +Move-Item $ImgFile -Destination "..\..\Binary\" -Force -exit 0 +return diff --git a/Source/Images/Makefile b/Source/Images/Makefile index 064e9842..5d454230 100644 --- a/Source/Images/Makefile +++ b/Source/Images/Makefile @@ -3,51 +3,40 @@ # SYSTEMS = ../CPM22/cpm_wbw.sys ../ZSDOS/zsys_wbw.sys ../QPM/qpm_wbw.sys ../CPM3/cpmldr.sys ../ZPM3/zpmldr.sys -FDIMGS = fd144_cpm22.img fd144_zsdos.img fd144_nzcom.img \ - fd144_cpm3.img fd144_zpm3.img fd144_ws4.img fd144_qpm.img \ - fd144_z3plus.img \ - fd144_z80asm.img fd144_aztecc.img fd144_hitechc.img \ - fd144_bascomp.img fd144_fortran.img fd144_games.img \ - fd144_tpascal.img fd144_cowgol.img fd144_cobol.img -HD512IMGS = hd512_cpm22.img hd512_zsdos.img hd512_nzcom.img \ - hd512_cpm3.img hd512_zpm3.img hd512_ws4.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_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 \ - hd1k_cpm3.img hd1k_zpm3.img hd1k_ws4.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_infocom.img \ - hd1k_cowgol.img hd1k_msxroms1.img hd1k_msxroms2.img \ - hd1k_cobol.img hd1k_blank.img -HD1KXIMGS += hd1k_bp.img +# OBJECTS = HD512PREFIX = HD1KPREFIX = hd1k_prefix.dat -OBJECTS = $(FDIMGS) -OBJECTS += $(HD512IMGS) $(HD512XIMGS) $(HD512PREFIX) -OBJECTS += $(HD1KIMGS) $(HD1KXIMGS) $(HD1KPREFIX) +# add base images used in *.def files -# OBJECTS = +FDIMGS = $(wildcard fd_*.txt) +FDIMGS := $(subst fd_,,$(FDIMGS)) +FDIMGS := $(addprefix fd144_,$(FDIMGS)) +FDIMGS := $(FDIMGS:.txt=.img) -# add base images used in *.def files +# $(info FDIMGS: $(FDIMGS)) + +HDIMGS = $(wildcard hd_*.txt) +HDIMGS := $(subst hd_,,$(HDIMGS)) +HDIMGS := $(addprefix hd512_,$(HDIMGS)) $(addprefix hd1k_,$(HDIMGS)) +HDIMGS := $(HDIMGS:.txt=.img) + +# $(info HDIMGS: $(HDIMGS)) + +BASEIMGS = $(shell grep -vEh "^\#" *.def) +BASEIMGS := $(addprefix hd512_,$(BASEIMGS)) $(addprefix hd1k_,$(BASEIMGS)) +BASEIMGS := $(addsuffix .img,$(BASEIMGS)) + +# $(info BASEIMGS: $(BASEIMGS)) -BASEIMG = $(shell grep -vEh "^\#" *.def) -BASEIMG := $(addprefix hd512_,$(BASEIMG)) $(addprefix hd1k_,$(BASEIMG)) -BASEIMG := $(addsuffix .img,$(BASEIMG)) -OBJECTS += $(BASEIMG) +DSKIMGS = $(wildcard *.def) +DSKIMGS := $(addprefix hd512_,$(DSKIMGS)) $(addprefix hd1k_,$(DSKIMGS)) +DSKIMGS := $(DSKIMGS:.def=.img) -TEMP = $(wildcard *.def) -TEMP := $(addprefix hd512_,$(TEMP)) $(addprefix hd1k_,$(TEMP)) -TEMP := $(TEMP:.def=.img) -OBJECTS += $(TEMP) +# $(info DSKIMGS: $(DSKIMGS)) +OBJECTS = $(FDIMGS) $(HDIMGS) $(DSKIMGS) $(HD512PREFIX) $(HD1KPREFIX) OTHERS = blank144 blankhd512 blankhd1k *.cat @@ -56,47 +45,27 @@ NODELETE = $(HD512PREFIX) $(HD1KPREFIX) DEST=../../Binary TOOLS = ../../Tools + + +# $(info OBJECTS: $(OBJECTS)) + include $(TOOLS)/Makefile.inc .SHELLFLAGS = -ce DIFFPATH = $(DIFFTO)/Binary -# 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) + @echo "Generating hd512 disk image ""$@"" using $^"; \ + files=`grep -vEh "^\s*\#" $^ | grep -vEh "^\s*$$" | tr -d '\r' | awk '{print "hd512_" $$0 ".img"}'`; \ + echo " " $${files}; \ + cat $(HD512PREFIX) $${files} > $@ 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} > $@ + @echo "Generating hd1k disk image ""$@"" using $^"; \ + files=`grep -vEh "^\s*\#" $^ | grep -vEh "^\s*$$" | tr -d '\r' | awk '{print "hd1k_" $$0 ".img"}'`; \ + echo " " $${files}; \ + cat $(HD1KPREFIX) $${files} > $@ # # this somewhat impenetrable and fragile code is used to build each of the images @@ -127,16 +96,8 @@ blankhd1k: @LC_ALL=en_US.US-ASCII tr '\000' '\345'