Coder Social home page Coder Social logo

wwarthen / romwbw Goto Github PK

View Code? Open in Web Editor NEW
307.0 45.0 91.0 168.5 MB

System Software for Z80/Z180/Z280 Computers

License: GNU Affero General Public License v3.0

Batchfile 0.91% Propeller Spin 3.46% PowerShell 0.10% Forth 0.06% TeX 0.08% Assembly 66.73% Scilab 0.06% C++ 6.54% C 13.82% HTML 4.16% Roff 1.82% Makefile 0.67% Shell 0.09% CMake 0.44% Max 0.04% NASL 0.04% Pascal 0.23% Pawn 0.01% Witcher Script 0.69% CSS 0.06%
romwbw z80 cpm disk-image zsdos cpm3 zpm nzcom rc2014 retrobrew

romwbw's Introduction

RomWBW ReadMe
Version 3.5
Wayne Warthen ([email protected])
03 May 2024

Overview

RomWBW software provides a complete, commercial quality implementation of CP/M (and workalike) 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:

A complete list of the currently supported platforms is found in the [Installation] section.

General features 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
  • Keyboard (PS/2) drivers via VT8242 or PPI interfaces
  • Real time clock drivers including DS1302, BQ4845
  • OSes: CP/M 2.2, ZSDOS, CP/M 3, NZ-COM, ZPM3, QPM, p-System, and FreeRTOS
  • Built-in VT-100 terminal emulation support

RomWBW is distributed as both source code and pre-built ROM and disk images. 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 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 accessible storage on a single device.

The pre-built ROM firmware images are generally suitable for most users. However, 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.

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.

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.

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.

Acquiring RomWBW

The RomWBW Repository (https://github.com/wwarthen/RomWBW) on GitHub is the official distribution location for all project source and documentation. 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. Expand the “Assets” drop-down for the release you want to download, then select the asset named RomWBW-vX.X.X-Package.zip. The Package asset 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.

All source code and distributions are maintained on GitHub. Code contributions are very welcome.

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.

Documentation

Documentation for RomWBW includes:

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 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.

  • 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

Contributions of all kinds to RomWBW are very welcome.

Licensing

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
[email protected]

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.

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:

Submission of issues and bugs are welcome at the RomWBW GitHub Repository.

Also feel free to email Wayne Warthen at [email protected].

romwbw's People

Contributors

b1ackmai1er avatar cm68 avatar cocoacrumbs avatar codorjan avatar danwerner21 avatar dimitrit avatar dnetherton avatar dylanhall avatar electrified avatar elevendroids avatar feilipu avatar fernandocarolo avatar jblang avatar lesbird avatar lynchaj avatar mlukasek avatar oholiab avatar rprouse avatar sccousins avatar skiselev avatar tomplano avatar vipoo avatar wwarthen avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

romwbw's Issues

Interrupts Disabled by Flash File System

With the Flash File System enabled, after accessing the ROM drive, interrupts appear to be left disabled.

The specific scenario I used was as follows:

  1. Boot SC126 with Flash File System enabled ROM
  2. Select SD Card boot to Z-System
  3. System starts Z-System and runs OK
  4. Do a directory of the ROM disk drive
  5. Directory prints to screen fine
  6. Keyboard input is no longer functional

On the SC126 (and any other Z180 platform), the ASCI serial driver is interrupt driven.

-Wayne

Linux Build using Github Actions

As an experiment I forked the repo, and set up a Github Action to do a build, using the default Ubuntu container it suggests. It almost works! We could have a CI pipeline to automatically generate the release zips!

See here for the run: https://github.com/electrified/RomWBW/runs/473668770?check_suite_focus=true

It gets images phase and then it can't find mkfs.cpm it seems like $(BINDIR) is Linux when the tools are in Unix?

Also ZMAC's spinning baton generates 1000s of lines of output, so if we could somehow find a way to disable that....

Thanks for your work on this Curt and Wayne, this is awesome :)

make[2]: Entering directory '/home/runner/work/RomWBW/RomWBW/Source/Images'
Making Blank Floppy of size 1440k
tr: write error: Broken pipe
tr: write error
Making Blank Hd of size 8320k
tr: write error: Broken pipe
tr: write error
Generating fd_cpm22.img
copying system ../CPM22/cpm_wbw.sys to fd_cpm22.img
/bin/sh: 17: ../../Tools/Linux/mkfs.cpm: not found

profile.sub requires submit.com

HI Wayne,
I installed the fd_nzcom.img on my gotek floppy drive emulator and was pleased to see this boots from the main menu. I created my ZCPR profile (PMS) and setup NZCOM to startup automatically with my profile by adding NZCOM PMS the profile.sub file. However this fails to boot because SUBMIT.COM is not part of the image. Suggest adding submit.com to all images or change cbios to always look on B: for submit.com at boot. Or you may be happy with this being the way it is, with user installing if using the facility. Regards Phil

SD and IDE slices probblem

Hi Wayne,

As I boot directly to an IDE or SD device I see an empty directory. Booting from ROM (typing Z for zsdos) and I see the expected directory. What's wrong?
I did reserve slices with fdisk80 and made a fat partition.

Greetings,

Nick

z180 - illegal opcode trap handler

The z180 traps opcodes that are illegal, including those that are undocumented in the z80.
The trap is a RST 0 call, with the appropriate Z180_ITC trap flag set to enable the address of the trapped opcode(s) to be located.

Is it worth putting a trap function into the RST 0 handling for z180 builds?
This should at least take away some mystery for users as to why their Z80 code failed.

z88dk has an implementation of the trap code here, with a weak function for the user to implement their own trap handling.

I could write a PR based on this code if desired?

PPIDE drive init fails with non-compactflash drives

Hi Wayne.

First of all many thanks for RomWBW, it's great.

Now onto the problem. I'm happy to contribute a code fix, but wondered what the best way to proceed was.

The ppide driver doesn't seem to work with non-compactflash devices. This is due to if PPIDE8BIT is set to false, in PPIDE_INITDEV the set feature command is called with PPIDE_FEAT_DISABLE8BIT. The enable/disable 8 bit PIO transfer mode features are only supported on devices that support the CFA feature set and causes an error on the rotating disc IDE drives I've tried it on, resulting in the init bailing out.

Code is here: https://github.com/wwarthen/RomWBW/blob/master/Source/HBIOS/ppide.asm#L1005

I got the drive working by commenting out this part of the code.

The code could:

  • Detect if the CFE feature set is supported and only attempt to set feature if it is
  • Don't disable 8 bit mode if PPIDE8BIT is false. Drives start off in 16-bit mode, so I don't see the downside of this?
  • Not end the detection process if setting the feature flag fails

What do you think the best fix is?

Hardware is an RC2014 with my own 82c55 IDE adapter (https://github.com/electrified/rc2014-82c55-ide)

I've been looking at page 180 of the ATA spec for what features are supported etc: http://www.t13.org/documents/uploadeddocuments/docs2006/d1699r3f-ata8-acs.pdf

Best regards,
Ed

Flash File System

@b1ackmai1er

Going to open an issue to track testing of the Flash File System.

I have tested the latest Flash File System code on a few systems. Generally checking out OK. I have encountered a couple failures.

First, on a Z180 based system running at 36 MHz, the ROM was corrupted (log below). No issues at normal 18 MHz. While the ROM is reading fine at 36 MHz, it seems to fail to write at 36 MHz.

RomWBW HBIOS v3.1.1-pre.23, 2020-12-22

SC126 (wbw) Z8S180-N @ 36.860MHz IO=0xC0
1 MEM W/S, 2 I/O W/S, INT MODE 2
512KB ROM, 512KB RAM

AY: IO=0x68 NOT PRESENT
ASCI0: IO=0xC0 ASCI W/BRG MODE=115200,8,N,1
ASCI1: IO=0xC1 ASCI W/BRG MODE=115200,8,N,1
UART0: IO=0xA0 16550C MODE=115200,8,N,1
UART1: IO=0xA8 16550C MODE=115200,8,N,1
DSRTC: MODE=STD IO=0x0C Tue 2020-12-22 11:51:15 CHARGE=OFF
MD: FLASH=1 1=39F040 FLASH FILE SYSTEM ENABLED
MD: UNITS=2 ROMDISK=384KB RAMDISK=256KB
IDE: IO=0x10 MODE=RC
IDE0: NO MEDIA
IDE1: NO MEDIA
PPIDE: IO=0x20 PPI NOT PRESENT
SD: MODE=SC OPR=0x0C CNTR=0xCA TRDR=0xCB DEVICES=1
SD0: SDHC NAME=SE32G BLOCKS=0x03B72400 SIZE=30436MB

Unit        Device      Type              Capacity/Mode
----------  ----------  ----------------  --------------------
Char 0      ASCI0:      RS-232            115200,8,N,1
Char 1      ASCI1:      RS-232            115200,8,N,1
Char 2      UART0:      RS-232            115200,8,N,1
Char 3      UART1:      RS-232            115200,8,N,1
Disk 0      MD1:        RAM Disk          256KB,LBA
Disk 1      MD0:        Flash Drive       384KB,LBA
Disk 2      IDE0:       Hard Disk         --
Disk 3      IDE1:       Hard Disk         --
Disk 4      SD0:        SD Card           30436MB,LBA


SC126 (wbw) Boot Loader

Boot [H=Help]: z

Loading Z-System...

CBIOS v3.1.1-pre.23 [WBW]

Configuring Drives...

        A:=MD1:0
        B:=MD0:0
        C:=SD0:0
        D:=SD0:1
        E:=SD0:2
        F:=SD0:3
        G:=SD0:4
        H:=SD0:5
        I:=SD0:6
        J:=SD0:7

        1590 Disk Buffer Bytes Free

ZSDOS v1.1, 54.0K TPA

B>dir
  |  ASM     .COM  |  CLRDIR  .COM  |  COMPARE .COM  |  COPY    .CFG
  |  COPY    .COM  |  DDT     .COM  |  DDTZ    .COM  |  DUMP    .COM
  |  ED      .COM  |  FA16    .CFG  |  FDISK80 .COM  |  FILEATTR.COM
  |  FILEDATE.CFG  |  FILEDATE.COM  |  FLASH   .COM  |  INITDIR .CFG
  |  INITDIR .COM  |  LDDS    .COM  |  LDP2D   .COM  |  LINK    .COM
  |  LOAD    .COM  |  MBASIC  .COM  |  NULU    .COM  |  PIP     .COM
  |  PUTDS   .COM  |  RELOG   .COM  |  RMAC    .COM  |  STAT    .COM
  |  SUBMIT  .COM  |  SUPERSUB.COM  |  TD      .CFG  |  TD      .COM
  |  UNARC   .COM  |  XSUB    .COM  |  ZAP     .COM  |  ZCAL    .COM
  |  ZCNFG   .COM  |  ZCNFG24 .CFG  |  ZDE     .COM  |  ZPATH   .COM
  |  ZSCONFIG.COM  |  ZXD     .CFG  |  ZXD     .COM  |  ASSIGN  .COM
  |  FDU     .COM  |  FORMAT  .COM  |  MODE    .COM  |  RTC     .COM
  |  SURVEY  .COM  |  SYSCOPY .COM  |  SYSGEN  .COM  |  TALK    .COM
  |  TIMER   .COM  |  XM      .COM  |  INTTEST .COM  |  CPM     .SYS
  |  ZSYS    .SYS
B>copy zxd.cfg x.x
COPY  Version 1.72 (for ZSDOS)   17 Jul 93
Copying B0:ZXD     .CFG to B0:X       .X
 -> X       .X  ..Ok  Verify.. ..Bad
 1 Errors
B>dir
  |  S   .O  |  LDR .O  |  OPR .O  |  OY  .F
  |  OY  .O  |  D   .O  |  DZ  .O  |  UP  .O
  |  D   .O  |  A6  .F  |  DS8 .O  |  IETR.O
  |  IEAE.F  |  IEAE.O  |  LS  .O  |  NTI .F
  |  NTI .O  |  DS  .O  |  D2  .O  |  IK  .O
  |  OD  .O  |  BSC .O  |  UU  .O  |  I   .O
  |  UD  .O  |  EO  .O  |  MC  .O  |  TT  .O
  |  UMT .O  |  UESB.O  |  D   .F  |  D   .O
  |  NR  .O  |  SB  .O  |  A   .O  |  CL  .O
  |  CF  .O  |  CF2 .F  |  D   .O  |  PT  .O
  |  SOFG.O  |  X   .F  |  X   .O  |  SIN .O
  |  D   .O  |  OMT .O  |  OE  .O  |  T   .O
  |  UVY .O  |  YCP .O  |  YGN .O  |  AK  .O
  |  IE  .O  |  M   .O  |  NTS .O  |  P   .Y
  |  SS  .Y  |      .

Second failure was on my Mark IV system (running at 18 MHz). It fails to complete the boot into ZSDOS (or CP/M 2.2). However, CP/M 3 seems to work fine.

RomWBW HBIOS v3.1.1-pre.23, 2020-12-22

MARK IV (wbw) Z8S180-N @ 18.432MHz IO=0x40
0 MEM W/S, 2 I/O W/S, INT MODE 2
512KB ROM, 512KB RAM

AY: IO=0x9A
ASCI0: IO=0x40 ASCI W/BRG MODE=38400,8,N,1
ASCI1: IO=0x41 ASCI W/BRG MODE=38400,8,N,1
UART0: IO=0xC0 16650 MODE=38400,8,N,1
UART1: IO=0xC8 16650 MODE=38400,8,N,1
UART2: IO=0xD0 16650 MODE=38400,8,N,1
UART3: IO=0xD8 16650 MODE=38400,8,N,1
DSRTC: MODE=STD IO=0x8A Fri 2020-09-11 19:20:06 CHARGE=ON
CVDU: IO=0xE4 NOT PRESENT
VGA: IO=0xE2 NOT PRESENT
TMS: IO=0x98
MD: FLASH=1 1=39F040 FLASH FILE SYSTEM ENABLED
MD: UNITS=2 ROMDISK=384KB RAMDISK=256KB
FD: IO=0x2A UNITS=2
IDE: IO=0x80 MODE=MK4
IDE0: 8-BIT LBA BLOCKS=0x00773800 SIZE=3815MB
IDE1: NO MEDIA
IDE: IO=0x20 MODE=DIDE
IDE2: NO MEDIA
IDE3: NO MEDIA
IDE: IO=0x30 MODE=DIDE
IDE4: NO MEDIA
IDE5: NO MEDIA
SD: MODE=MK4 FAST OPR=0x89 CNTR=0x4A TRDR=0x4B DEVICES=1
SD0: SDSC NAME=SU02G BLOCKS=0x003AF000 SIZE=1886MB
PRP: IO=0xA8 F/W=0.97.0
PRPCON: 80X37 TEXT (ANSI)
PRPSD0: TYPE=SDHC BLOCKS=0x01DACC00 SIZE=15193MB

Unit        Device      Type              Capacity/Mode
----------  ----------  ----------------  --------------------
Char 0      ASCI0:      RS-232            38400,8,N,1
Char 1      ASCI1:      RS-232            38400,8,N,1
Char 2      UART0:      RS-232            38400,8,N,1
Char 3      UART1:      RS-232            38400,8,N,1
Char 4      UART2:      RS-232            38400,8,N,1
Char 5      UART3:      RS-232            38400,8,N,1
Char 6      TERM0:      Terminal          Video 0,ANSI
Char 7      PRPCON0:    Terminal          PropTerm,ANSI
Disk 0      MD1:        RAM Disk          256KB,LBA
Disk 1      MD0:        Flash Drive       384KB,LBA
Disk 2      FD0:        Floppy Disk       3.5",DS/HD,CHS
Disk 3      FD1:        Floppy Disk       3.5",DS/HD,CHS
Disk 4      IDE0:       CompactFlash      3815MB,LBA
Disk 5      IDE1:       Hard Disk         --
Disk 6      IDE2:       Hard Disk         --
Disk 7      IDE3:       Hard Disk         --
Disk 8      IDE4:       Hard Disk         --
Disk 9      IDE5:       Hard Disk         --
Disk 10     SD0:        SD Card           1886MB,LBA
Disk 11     PRPSD0:     SD Card           15193MB,LBA
Video 0     TMS0:       CRT               Text,40x24
Sound 0     SND0:       AY-3-8910         3+1 CHANNELS


MARK IV (wbw) Boot Loader

Boot [H=Help]: z

Loading Z-System...

CBIOS v3.1.1-pre.23 [WBW]

>>> PANIC: @8063[FB80:F600:3110:83D8:CFFC]  Continue? (Y/N):

unable to start COM version of hbios

Hi,

I am not 100% sure if its me or not - but with the latest version, I am not able to start the COM version of HBIOS -- produces no output

When i roll back to before commit 8ef4456, everthing works ok.

This weekend i had transitioned to a differnt board (first board i designed) - and am not sure if its something i have screwed up.

I see in the commit, there was code to manage interrupts during bankcpy/peek and poke, (now commented out) - i guess the code would only renable interrupts if not previously disabled.

Dean

hbios - z180 real time unix time - (enhancement)

I'd like to interface the HBIOS TIMER functions with the Y2K epoch (related to Unix Epoch). Whilst it is possible as stands, would it be possible to suggest some minor changes to the HBIOS TICKS implementation (on Z180)? These suggestions would make things much simpler.

If the suggestion is approved, I'll do a PR to suit.

  1. The Y2K Epoch is 32 bits, with the tick increment per second. -> Make the timer location 4+1 bytes, with the lowest byte measuring fractional seconds. Unix Epoch can then be loaded from RTC into the 4 bytes second counter with standard conversion code.

  2. Match the PRT0 tick rate to a binary multiple (i.e. 256Hz or 128Hz) and have the fractional second (1 byte) counter roll over to increment the second counter (4 bytes). -> Keeps the interrupt handling very simple (as it is now). Keep translation of fractional seconds to nanoeconds out of time critical code.

The outcome is to allow the z88dk sys/time.h unix like functions to easily connect into the HBIOS API.

Thoughts?

SC126 support seems broken for RTC

Unless I am missing someting the dsrtc code will write zero bits to the non RTC bits of the RTC bit bang register. On the SC126 two of those are \CS for the SPI devices so you will drive both device card selects which I wouldn't expect ends very well, especially as those bits then get left hanging selected.

Also the SC126 is different to the SC111 (aka current RC2014 Z180 config) in that it has this register difference and also register 0x0D, so it seems odd to make it the same platform id.

build errors on Lubuntu

I downloaded the dev branch zip file and expanded in my home directory on Lubuntu 20.04. Made sure gcc, gnu make, ncurses, and srecord was already installed. Tried make clean which worked. Then tried make and it got about halfway through and quit due to "permission denied" errors in Tools/Linux and Tools/unix.

I used "chmod 777 *" in both Tools/Linux and Tools/unix directories and then make succeeded but that is obviously not a long term solution. It looks like there is a permissions or groups related error in the make file. Below is a capture of the make output with the error so you can see what happened. Also noticed that after another make clean the next make succeeded without error so this maybe related to directory permissions.

make_results.txt

Enhancement ideas

Hi Wayne,

I have some ideas/desires for enhancement in RomWBW - specifically HBIOS - but i thought, I should just double check with you - and get your ok - instead of just throwing PRs at you.

  • (1) Extend the VDA driver interface to include a port query
  • (2) expose through hbios, the ability to call code in another bank - (HBX_BNKCALL)

Enhancement idea 1

In the sound driver, we had written a function to return the driver's specific ports. It be nice if we could get something similar for the video driver - this would allow applications to be agnostic of port mapping.

Issue is that the VDA's 16 functions range, only has one more entry available. We could use the last remaining entry - but then that kind of limits future expandability.

Perhaps we could use that last remaining entry ($4f), as a subfunction pattern of extended operations. This would make it inconsistent with how we did it in the sound driver. So the sound driver should probably be change to follow a similar pattern - so that there is consistency in approach for querying a driver's port and other potential future operations.

Enhancement idea 2:

The code to call another bank is there - and i did some spiking to prove the concept - where i installed relocatable code in a block allocated in the HBIOS' heap - then called it from my application. Wow - I can access another 10k+ of ram!

Cheers
Dean

Possible disk I/O problem.

Using the document "RomWBW Architecture" to write a disk sector dumper program.

I don't seem to be reading the sector. I see activity (PPIDE) light but all I get is zeros.

attached is a copy of the code. Perhaps there is a simple/obvious reason this does not work.
none of the functions return an error code, so they think they are working.

This code is z88dk sbcc targeted for rc2014 cpm.

/* read and dump in hex/ascii each sector on a track */

#include <stdio.h>

char Buffer[1024];
unsigned int RBC;
unsigned int RDE;
unsigned int RHL;
unsigned char RB;
unsigned char RC;
unsigned char RD;
unsigned char RE;
unsigned char RH;
unsigned char RL;

unsigned char ATTR;
unsigned char TYPE;
unsigned char DEVNUM;

#define WbwSEEK 0x12
#define WbwREAD 0x13
#define WbwDEVID 0x17

#define CHS 0
#define LBA 1

int error;

int
WbwDevId (int unit)
{
error = 0;
RB = WbwDEVID;
RC = unit;
printf ("Drive unit %d ", unit);
#asm
ld a, (_RB)
ld b, a
ld a, (_RC)
ld c, a
rst 8
ld (_error), a
ld a, c
ld (_ATTR), a
ld a, d
ld (_TYPE), a
ld a, e
ld (_DEVNUM), a
#endasm
if (ATTR & 0x80)
{ /* floppy /
printf (" floppy");
}
else
{ /
hard drive /
printf (" hard drive dev nr %d", DEVNUM);
switch ((TYPE & 0xf0) >> 4)
{
case 0:
printf (" memory disk");
break;
case 1:
printf (" floppy disk");
break;
case 2:
printf (" ram floppy");
break;
case 3:
printf (" IDE disk");
break;
case 4:
printf (" ATAPI disk");
break;
case 5:
printf (" PPIDE disk");
break;
case 6:
printf (" SD Card");
break;
case 7:
printf (" PropIO SD Card");
break;
case 8:
printf (" ParPortProp SD Card");
break;
case 9:
printf (" SIMH HDSK disk");
break; /
highly unlikely */
default:
printf (" unk ");
break;
}
if (ATTR & 0x40)
{
printf (" removable");
}
switch ((ATTR & 0x38) >> 3)
{
case 0:
printf (" hard");
break;
case 1:
printf (" cf");
break;
case 2:
printf (" sd");
break;
case 3:
printf (" usb");
break;
case 4:
printf (" rom");
break;
case 5:
printf (" ram");
break;
case 6:
printf (" ramf");
break;
default:
printf (" unknown");
break;
}
}
printf ("\n");
return error;

}

/* return the boot device unit number */
int
WbwBootDev ()
{
error = 0;
#asm
ld bc, #0xf8e0
rst 8
ld a, d
ld (_error), a
#endasm
return error;
}

int
WbwSeekDisk (int subf, int unit, int head, int sector, int track)
{
error = 0;

RB = WbwSEEK; /* function /
RC = unit; /
unit /
/
going for lba type seek /
if (subf == LBA)
{
RDE = 0x8000; /
sector /
RHL = sector; /
track */
}
else
{
RD = head;
RE = sector;
RHL = track;
}
#asm
ld a, (_RC)
ld c, a
ld a, (_RB)
ld b, a
ld de, (_RDE)
ld hl, (_RHL)
rst 8
ld (_error), a
#endasm
printf("Seek to %d\n",sector);
return error;
}

int
WbwReadDisk (int unit, int count, char *buff)
{
error = 0;

RB = WbwREAD;
RC = unit;
RE = count;
RHL = (unsigned int) buff;
printf ("read %d %d 0x%04x\n", RC, RE, RHL);
#asm
ld a, (_RC)
ld c, a
ld a, (_RB)
ld b, a
ld a, (_RE)
ld e, a
ld hl, (_RHL)
rst 8
ld (_error), a
ld a,e
ld (_RE),a
#endasm
printf("Blocks read %d\n",RE);
return error;
}

int
WbwSyscall (int func, int subf, int unit, int count, char *buff,
int head, int sector, int track)
{
if (func == WbwSEEK)
{
return (WbwSeekDisk (subf, unit, head, sector, track));
}
if (func == WbwREAD)
{
return (WbwReadDisk (unit, count, buff));
}
return -1;
}

Init ()
{
memset (Buffer, 0, 512);
}

Dump ()
{
/* use snap lib to dump the block */
snapmem (0, Buffer, 512, 1, "Disk Sector");

}

void
main ()
{
int i;
int err;
int drive;
int lba;
int nrecs;

Init ();
i = 0;
for (i = 0; i <= 4; i++)
{
WbwDevId (i);
}
printf ("Boot drive is: %d\n", WbwBootDev ());
printf ("Enter drive nr: ");
scanf ("%d", &drive);
printf("Start at LBA: ");
scanf("%d", &lba);
if (err = WbwSyscall (WbwSEEK, CHS, drive, 1, Buffer, 0, lba, 0))
{
printf ("Seek error:");
exit (0);
}
printf("How many sectors to dump: ");
scanf("%d",&nrecs);
for (i = 0; i < nrecs; i++)
{
if (err = WbwSyscall (WbwREAD, LBA, drive, 1, Buffer, 0, lba+i, 0))
{
printf ("Read error:");
exit (0);
}
Dump ();
}
}

DDT vs. DDTZ vs. DDTZ80

Hello everyone

I'm searching in the latest version of ROMWBW for a Z80 DDT version and found four different versions.
ddt.com ddtz.com ddtz27.com and final in MD0: ddtz80.com. The last one is this one with all the Z80
mnemonics (Assemble) but I'm confused about a lot of ddtz.com version in the source folder but all aren't with Z80 menmonics. I thought ddtz.com is the one with the Z80 assemble and disassemble code.

ACIA - RTS flow control bit not asserted

I'm digging in the ACIA code, and I think there is an issue with asserting RTS.

The code here, tries this.

	LD	A,(ACIA_CMD)		; CONFIG BYTE W/O RTS BIT
	OR	ACIA_RTSON		; SET RTS
	OUT	(C),A			; DO IT

but ACIA_RTSON looks like this.

ACIA_RTSON	.EQU	%00000000	; BIT MASK TO ASSERT RTS

so the code does nothing.

It should do something like

ACIA_RTSON	.EQU	%10111111	; BIT MASK TO ASSERT RTS
;
	LD	A,(ACIA_CMD)		; CONFIG BYTE W/O RTS BIT
	AND	ACIA_RTSON		; SET RTS
	OUT	(C),A			; DO IT

Thoughts?

There's a few other (unrelated) cleanups I'd also like to make.

For instance, the detection routine relies on the implementation (specifically the RC2014 ACIA Module with loose addressing) rather than characteristics of the ACIA device itself. I would like to change this to use the specific addresses nominated (0x80 and 0x40) and seek characteristics from the device. Perhaps adding build time config checks to avoid SIO clashes would be good too?

Should I do a PR?

RC2014 with SM Baker SIO-2 and CTC cards

It may be that I am being stupid here, but, with CTC enabled, port address of 0x40 set, SIO-2 enabled with the SIOMODE_SMB set as TRUE, CTCMODE is CTCMODE_RC, IM-2 correctly selected, then at no point is the SIO-B channel baud rate set in the CTC. Have checked the TO1 output with a scope and even poked through the monitor correct values into the CTC channel B and scoped the output pre (DC level) and post, whatever clock I had programmed as a value. Also, tried using mode com1: 115200 etc and no change to the CTC channel B TO1. Triggers are correctly set to the system clock.
Am I missing something in the conditional assembly files? I have been editing RC2014_std and RC2014_kio .asm files for the kio edit as below, KIO disabled as none in my system:

#DEFINE PLATFORM_NAME "RC2014 (KIO)"
;
#include "Config/RCZ80_std.asm"
;
INTMODE .SET 2 ; INTERRUPTS: 0=NONE, 1=MODE 1, 2=MODE 2
;
KIOENABLE .SET FALSE ; ENABLE ZILOG KIO SUPPORT
;
CTCENABLE .SET TRUE ; ENABLE ZILOG CTC SUPPORT
CTCBASE .SET $40 ; CTC BASE I/O ADDRESS
;
ACIAENABLE .SET FALSE ; ACIA: ENABLE MOTOROLA 6850 ACIA DRIVER (ACIA.ASM)
;
SIOENABLE .SET TRUE ; SIO: ENABLE ZILOG SIO SERIAL DRIVER (SIO.ASM)
SIOCNT .SET 1 ; SIO: NUMBER OF CHIPS TO DETECT (1-2), 2 CHANNELS PER CHIP
SIO0MODE .SET SIOMODE_SMB ; SIO 0: CHIP TYPE: SIOMODE_[RC|SMB|ZP|EZZ80]
SIO0BASE .SET $80 ; SIO 0: REGISTERS BASE ADR
SIO0CTCC .SET 0 ; SIO 0: CTC CHANNEL CLOCK SCALER, (0-3), -1 FOR NONE
SIO0ACLK .SET 7372800 ; SIO 0A: OSC FREQ IN HZ, ZP=2457600/4915200, RC/SMB=7372800
SIO0BCLK .SET 7372800 ; SIO 0B: OSC FREQ IN HZ, ZP=2457600/4915200, RC/SMB=7372800

and for the RC2014_std settings as below (just left the ACIA setting TRUE here as it is set FALSE in kio file).

#include "cfg_rcz80.asm"
;
CPUOSC .SET 7372800 ; CPU OSC FREQ IN MHZ
;
ACIAENABLE .SET TRUE ; ACIA: ENABLE MOTOROLA 6850 ACIA DRIVER (ACIA.ASM)
;
SIOENABLE .SET TRUE ; SIO: ENABLE ZILOG SIO SERIAL DRIVER (SIO.ASM)
;
FDENABLE .SET FALSE ; FD: ENABLE FLOPPY DISK DRIVER (FD.ASM)
FDMODE .SET FDMODE_RCWDC ; FD: DRIVER MODE: FDMODE_[DIO|ZETA|DIDE|N8|DIO3]
;
IDEENABLE .SET TRUE ; IDE: ENABLE IDE DISK DRIVER (IDE.ASM)
;
PPIDEENABLE .SET TRUE ; PPIDE: ENABLE PARALLEL PORT IDE DISK DRIVER (PPIDE.ASM)

hbios - PPIDE file copy

I'm using ChaN FAT file system, with a diskio driver to HBIOS. Using the relevant calls for the SD card interface I can successfully copy a file. Using the PPIDE (82C55) interface the SC130 system reboots during copying.

Not sure what is happening, but the monitor copy is attached below for reference.

I've attached a copy of the C code in fileCopyTest.c.

The functions calling HBIOS are f_read() and f_write(). These functions are implemented here, calling HBIOS functions via C wrappers in z88dk.

As noted, the code works perfectly for the HBIOS SD interface, and also works substantially correctly for the PPIDE interface, as sufficient correctness is present to successfully mount the drive, read directories, and open and create files. It seems only to fail when doing the actual copy process.

Wondering if you've any hints?
Or thoughts about where to look?

Phillip

RetroBrew HBIOS v2.9.2-pre.22, 2019-11-30

SC130 Z8S180-N @ 36.864MHz IO=0xC0
1 MEM W/S, 2 I/O W/S, INT MODE 2
512KB ROM, 512KB RAM

ASCI0: IO=0xC0 ASCI W/BRG MODE=115200,8,N,1
ASCI1: IO=0xC1 ASCI W/BRG MODE=115200,8,N,1
DSRTC: MODE=STD IO=0x0C NOT PRESENT
MD: UNITS=2 ROMDISK=384KB RAMDISK=384KB
PPIDE: IO=0x20 DEVICES=2
PPIDE0: LBA BLOCKS=0x0767D000 SIZE=60666MB
PPIDE1: NO MEDIA
SD: MODE=SC OPR=0x0C CNTR=0xCA TRDR=0xCB DEVICES=1
SD0: SDHC NAME=NCard BLOCKS=0x00779800 SIZE=3827MB

Unit        Device      Type              Capacity/Mode
----------  ----------  ----------------  --------------------
Char 0      ASCI0:      RS-232            115200,8,N,1
Char 1      ASCI1:      RS-232            115200,8,N,1
Disk 0      MD1:        RAM Disk          384KB,LBA
Disk 1      MD0:        ROM Disk          384KB,LBA
Disk 2      PPIDE0:     Hard Disk         60666MB,LBA
Disk 3      PPIDE1:     Hard Disk         --
Disk 4      SD0:        SD Card           3827MB,LBA


SC130 Boot Loader

ROM: (M)onitor (C)P/M (Z)-System (F)orth (B)ASIC (T)-BASIC  
Disk: (0)MD1 (1)MD0 (2)PPIDE0 (3)PPIDE1 (4)SD0 

Boot Selection? M

Loading Monitor...


Monitor Ready (H for Help)
>L

Loaded
>R100

FatFs.fs_type 3
FatFs.fsize 7640

Opening 4:random1.txt - Opened
Creating 4:random2.txt - Created

Copying...
Copied 1048576 bytes, the time taken was 44.8000 seconds

Monitor Ready (H for Help)
>L

Loaded
>R100

FatFs.fs_type 3
FatFs.fsize 15161

Opening 2:random1.txt - Opened
Creating 2:random2.txt - Created

Copying...

RetroBrew HBIOS v2.9.2-pre.22, 2019-11-30

SC130 Z8S180-N @ 36.864MHz IO=0xC0
1 MEM W/S, 2 I/O W/S, INT MODE 2
512KB ROM, 512KB RAM

ASCI0: IO=0xC0 ASCI W/BRG MODE=115200,8,N,1
ASCI1: IO=0xC1 ASCI W/BRG MODE=115200,8,N,1
DSRTC: MODE=STD IO=0x0C NOT PRESENT
MD: UNITS=2 ROMDISK=384KB RAMDISK=384KB
PPIDE: IO=0x20 DEVICES=2
PPIDE0: LBA BLOCKS=0x0767D000 SIZE=60666MB
PPIDE1: NO MEDIA
SD: MODE=SC OPR=0x0C CNTR=0xCA TRDR=0xCB DEVICES=1
SD0: SDHC NAME=NCard BLOCKS=0x00779800 SIZE=3827MB

Unit        Device      Type              Capacity/Mode
----------  ----------  ----------------  --------------------
Char 0      ASCI0:      RS-232            115200,8,N,1
Char 1      ASCI1:      RS-232            115200,8,N,1
Disk 0      MD1:        RAM Disk          384KB,LBA
Disk 1      MD0:        ROM Disk          384KB,LBA
Disk 2      PPIDE0:     Hard Disk         60666MB,LBA
Disk 3      PPIDE1:     Hard Disk         --
Disk 4      SD0:        SD Card           3827MB,LBA

SC130 Boot Loader

ROM: (M)onitor (C)P/M (Z)-System (F)orth (B)ASIC (T)-BASIC  
Disk: (0)MD1 (1)MD0 (2)PPIDE0 (3)PPIDE1 (4)SD0 

Boot Selection? M

Loading Monitor...

Monitor Ready (H for Help)
>

Retrieving hardware configuration information

Hi Wayne,

Hope all is well.

I have been away from RomWBW for a bit (the usual work demands)

I am trying to catchup with where we at with the ability to retrieve hardware configuration stuff. I am not sure i remember which approach you decieded to go with.

I would like to be able to access some hardware attributes. I had a look at the code and docs. And observed the following:

a. The TMS ports. I see code for the BF_VDAQRY function, returing the TMS_DATREG. It only returns one port - I guess the assumption other ports are assume to be incremented from this.

b. The SN76489 has a new function SN7_DEVICE - which returns the SN76489_PORT_LEFT. It does not return the right port number.

c. The AY driver has a similiar configuration.

d. The sound drivers also have a sub-function BF_SNDQUERY, that allows for the retriving of all io ports.

e. I see a new functions (VDAFN, SNDFN and similiar others for other devices)
These seem to return an address in DE for driver specific config. The Sound drivers are returning 0 and the TMS driver is returing the TMS_PPIx entries - but nothing else.

I may not have interpreted this right, and it may also be still under-development, so my questions below may be jumping the gun a bit:

  1. Is the expectation that all drivers will return key attributes through the xxxFN functions? With the other access methods deprecated?

  2. Should the TMS driver's data table also include TMS_DATREG and TMS_CMDREG

  3. The TMS driver also has a mirror of the internal registers TMS_INIT9918. It be nice to be able to read this also, so that i can determine if the interrupt line has been enabled or not. To avoid disabling that.

  4. Can the Sound drivers implement this fully to not only return the IO ports, but also clock frequency?

I am happy to help do some of the coding here - if this is what you want.

I have been playing with my fork of bbcbasic, and got it doing plotting lines and pixels through the TMS chip. It be nice to able to retrieve the IO ports from HBIOS, instead of having it hard-coded in the assembly. It be also nice to get information that would enable me to inject the right level of wait states for IO access.

The bbcbasic fork also uses the sound driver interface to enable full sound capability.

Cheers
Dean

N8 (4314) and PPIDE

Hi Wayne,

Can't make PPIDE work on N8 (4314).

I add to my config file

PPIDEENABLE .SET TRUE ; PPIDE: ENABLE PARALLEL PORT IDE DISK DRIVER (PPIDE.ASM)
PPIDE0A8BIT .SET TRUE ; PPIDE 0A (MASTER): 8 BIT XFER
PPIDE0B8BIT .SET TRUE ; PPIDE 0B (SLAVE): 8 BIT XFER
PPIDE0BASE .SET $80 ; PPIDE 1: PPI REGISTERS BASE ADR

I'm use some previous tested CF's with CF-IDE adapter, different tested ppi 8255. Double check all signal and pcb track.
also added wait states on IO and memory.
Without a result. The card is not determined at the start. Sometimes with different errors.
The question arose when I didn't find a file .\Doc\Testing Notes.txt
mention of the testing of the ppide. there's only this:

N8-2312 (X)

  • Test ASCI driver
  • Test SD driver (CSIO mode)
  • Test FD driver
  • Test FDU app
  • Test TMS driver (video & kbd)

Please say should PPIDE work on N8 with this BIOS ?

Thanks
Andrii

Sound Driver note/frequency mapping

Hi guys,

I just pull the latest code - wow 68 commits - gee - i was only away about a week!

Have observed some issues (used my test scripts - and tested on my rig) - not had a chance to fully investigate.

I notice there has been some changes for the AY driver's implemention of NOTE.

I am not sure i understand, and dont know what configuration i need to adjust to align with my configuration - because now I am out an octave... - it plays an octave lower, than the stated value in the docs. What would be the recommend approach to adjust this?

I see the code for AY note configuration has been inlined. If the two drivers need to be different - perhaps the code in audio.inc (which is only used by the SN driver now) needs to be also inlined?

I see there is a new function being built - SND_DURATION - a little confused, as I had built code for hanlding a duration model - got quite a ways with it. I didnt raise a PR with this change, as I thought it was decieded that this level of functionality didnt belong in the bios. Perhaps i misunderstood.

If you would like me to do any more testing - happy to, but I probably wont have time to do any more testing until the weekend

Cheers
Dean

TUNE.COM - YM2149 Sound board not recognized by ROMWBW in SC126

Hi Wayne, in my case, using the TUNE.COM CP/M program with the YM2149 board configured in the $60 IO address range for the SC126, the card is not recognized and defaults to the SCG adapter:


G>user 3
G>dir
G: ATTACK PT3 : BACKUP PT3 : BADMICE PT3 : DEMO MYM
G: DEMO1 MYM : DEMO3 MYM : DEMO3MIX MYM : DEMO4 MYM
G: HOWRU PT3 : ITERATN PT3 : LOOKBACK PT3 : LOUBOUTN PT3
G: NAMIDA PT3 : RECOLL PT3 : SANXION PT3 : SYNCH PT3
G: TOSTAR PT3 : TUNE COM : VICTORY PT3 : WICKED PT3
G: YEOLDE PT3 : YEOVIL PT3
G>tune demo4.mym

Tune Player for RomWBW v2.0, 28-Jan-2018
RetroBrew SCG ECB Adapter, delay mode

Hardware error, sound chip not detected!


I made a minor fix to the TUNE.ASM code in the Platform Id section (attached) and now it works (and sounds...) OK:`
tune-fix.txt


B>g:
G>user 3
G>tune attack.pt3

Tune Player for RomWBW v2.1a, 17-Nov-2019
SC Z180 w/ Ed Brindley Sound Module, delay mode

Playing... Done

G>
B>g:
G>user 3
G>tune attack.pt3

Tune Player for RomWBW v2.1a, 17-Nov-2019
SC Z180 w/ Ed Brindley Sound Module, delay mode

Playing... Done

G>


Could you please check if the fix is correct or I'm screwing up something with your code ? I also made some format changes just for my understanding of the code

Thanks and regards,
JL.

Question: osimg file size

Hi,
The file size of osimg and osimg are 34K and 33k resp in romWBW 3.01. Should it be in 32k chunks?.

configuring order of serial port detection / assignment

I would like to be able to modify the order of the assignments for the serial ports, by configuration.

The use case is to have an ACIA serial port emulation (providing a keyboard/VGA interface) appearing first as the boot console that a human can type into, and have additional serial ports appearing as later units.

The current boot message (after tweaking noted below) looks like this.

RomWBW HBIOS v3.1.1-pre.43, 2021-02-11

RC2014 Z80 @ 7.372MHz
0 MEM W/S, 1 I/O W/S, INT MODE 1, Z2 MMU
512KB ROM, 512KB RAM

ACIA0: IO=0x40 ACIA MODE=115200,8,N,1
SIO0: IO=0x80 SIO MODE=115200,8,N,1
SIO1: IO=0x82 SIO MODE=115200,8,N,1
MD: UNITS=2 ROMDISK=384KB RAMDISK=256KB
PPIDE: IO=0x20 PPI NOT PRESENT

Unit        Device      Type              Capacity/Mode
----------  ----------  ----------------  --------------------
Char 0      ACIA0:      RS-232            115200,8,N,1
Char 1      SIO0:       RS-232            115200,8,N,1
Char 2      SIO1:       RS-232            115200,8,N,1
Disk 0      MD1:        RAM Disk          256KB,LBA
Disk 1      MD0:        ROM Disk          384KB,LBA


RC2014 Boot Loader

Boot [H=Help]:

I get this after manually tweaking the ACIA/SIO order in hbios.asm in three places.
Line 1615
Line 1649
Line 2772

Is there an easier / better way to get this outcome?
Perhaps there could be a "BOOT_CONSOLE" configuration created somewhere?

Question - ACIA & bugfixes in pre.50 & pre.55

I'm having some issues with the RC2014 SIO + ACIA build in the most recent dev pre.58

This is all with BOOTCON set to 2, and one SIO configured and found.

One of my concerns is disabling interrupts in the dbgmon parser., which affects the UX Module ACIA Emulation. But, that's something I could/can fix. But, is there a bug fix necessary for what has been working for the past few years?

But my real concern is that the emulated ACIA doesn't show up in enumeration any more at 0x40.

And separately although a real ACIA is attached at 0x80 and seems to work properly at 0x40 (because build config unchanged from 0x40) it doesn't show up in enumeration either. See below dbgmon output on the ACIA serial port.

(A side issue that something that hasn't been enumerated shouldn't really be expected to exist, and therefore to work).

RomWBW HBIOS v3.1.1-pre.58, 2021-03-10

RC2014 Z80 @ 7.372MHz
0 MEM W/S, 1 I/O W/S, INT MODE 1, Z2 MMU
512KB ROM, 512KB RAM

SIO0: IO=0x80 SIO MODE=115200,8,N,1
SIO1: IO=0x82 SIO MODE=115200,8,N,1
MD: UNITS=2 ROMDISK=384KB RAMDISK=256KB
PPIDE: IO=0x20 PPI NOT PRESENT

Unit        Device      Type              Capacity/Mode
----------  ----------  ----------------  --------------------
Char 0      SIO0:       RS-232            115200,8,N,1
Char 1      SIO1:       RS-232            115200,8,N,1
Disk 0      MD1:        RAM Disk          256KB,LBA
Disk 1      MD0:        ROM Disk          384KB,LBA

RC2014 Boot Loader

Boot [H=Help]:

Is there some other changed behaviour along with the BOOTCON setting, that you've noticed?

zxd.cfg file problem

Hi Wayne,

I found another issue: This is the output from zcnfg.
I tried to change the date format.

` ZXD Configuration Options

            A)  Don't display Non-SYStem files                              
            B)  Don't display SYStem files                                  
            U)  List files in all User areas on disk                        
            H)  List in Horizontal file sequence                            
            F)  Send FormFeed at end of Printer List                        
                                                                            
            S)  Sort by File Type then Name                                 
                                                                            
            N)  Print File Specs with NO Dates                              
            W)  List only "Last Modified" Date/Times                        
            T)  List DateStamper File Stamps                                
            D)  Display Dates in US Format (MM/DD/YY)                       
            Y)  Blank Year digits if same as current                        

---------------------------- ZCNFG COMMANDS ----------------------------
/ Explain Options > Next Menu Esc Save Changes & eXit
? Explain Commands < Previous Menu ^C Quit with no changes

Which choice? D

                    ZXD Configuration Options                               
                                                                            
            A)  Don't display Non-SYStem files                              
            B)  Don't display SYStem files                                  
            U)  List files in all User areas on disk                        
            H)  List in Horizontal file sequence                            
            F)  Send FormFeed at end of Printer List                        
                                                                            
            S)  Sort by File Type then Name                                 
                                                                            
            N)  Print File Specs with NO Dates                              
            W)  List only "Last Modified" Date/Times                        
            T)  List DateStamper File Stamps                                
            D)  Display Dates in European (DD.MM.YY)                        
            Y)  Blank Year digits if same as current                        

---------------------------- ZCNFG COMMANDS ----------------------------
/ Explain Options > Next Menu Esc Save Changes & eXit
? Explain Commands < Previous Menu ^C Quit with no changes

Which choice?
A>zcnfg zxd.cfg

ZCNFG CONFIGURATION UTILITY, V2.4 (12/12/92)

BAD DATA IN A0:ZXD.CFG in the case table for menu #0 , item H

a> `

As you can see reopening causes an error in the config file.

Greetings,

Nick

SC126 Custom Build - Wrong serial baudrate when changing Z180_CLKDIV

Dear Wayne, following your very clear instructions, I managed to create a custom build for my SC126, that changes the Z180_CLKDIV value to 0 in order to divide the CLK frequency by 2 (needed to support the AY-3-8910 sound card).

I tested it successfully with the generated .COM CP/M program, but the console serial baudrate also changes to 19200 (half the default 38400). So I didn't proceed to flash the ROM.

I also tried to change the default baudrate, by altering the DEFSERCFG, ASCI0CFG and ASCI1CFG values with the corresponding SER_XXXXX_8N1 constant without any luck, it always is stuck at 19200.

I would appreciate if you can guide me so I can help troubleshooting and fixing this issue.

Thanks and regards,
Jose Luis.

dbgmon - understanding the environment - questions

Wayne,

trying to unwrap your quite complicated system, but I think I've gathered some facts that I'd like to test for correctness, and some questions about things that I don't fully understand.

After booting into the dbgmon (M at boot), it is running from 0xC000?
And, its formal size is 0x1000 so finishing at 0xCFFF ?

It looks like it is finished by 0xC960 or thereabouts, with the rest slack space?

Is the CP/M CCP/BDOS/BIOS pre-loaded from 0xD000?

Is the ROM switched out when the dbgmon is running, and therefore the code from 0x000 to 0x8000 is a RAM copy of HBIOS?
Or, is it something else, like a number of applications NASCOM BASIC, TASTYBASIC, EASTER EGG (Mandelbrot), or CAMEL FORTH?

Is it certain that the code from 0x0100 to 0xBFFF not used from the dbgmon?

On application exit assuming dbgmon is still existing, is the best thing to do to jump to MON_LOC+3 where JP UART_ENTRY is found?

If dbgmon is overwritten, is it simply best to set to bank 0 and RST 0 for exit?
Or, is there something nicer?

My "to do".

IF RAM is already switched in, and the Page0 is correctly loaded, things are pretty straightforward. For the "app" startup model for z88dk, I am planning to use 0x0100 as the origin, and through to 0xBFFF for the combined binary/data sections. If the monitor is finished by 0xD000 I could leave a hole in the allocation and continue through to 0xFDFF when the HBIOS shim starts, but I don't see a need to get fancy right now.

Or, I could just have the data/bss sections start at 0xD000 through to the shim.

When triggered by the dbgmon to run at 0x0100 the "app" would decompress its data sections, and reset the bss sections, and would run using the hbios function call at RST08 or 0xFFF0.

Using additional banks would be on the "to do" list for later.

IF ROM is still switched in and the dbg monitor is running while looking at ROM up to 0x8000, then somehow I'd have to get the RAM switched in, before the Hexload program could function to load the lower addresses (but I don't think this is the case).

Question: SYSGETBNK($F3) and SYSSETBNK($F2) RST 08 BIOS calls

When using these calls is it safe to use $SYSGETBNK and assume the BIOS bank is the next bank down?
(Using the SC126 Z180 board with 512k RAM & ROM )

If so, is the next bank below that free to use using $SYSSETBNK.
My use case is I have TurboDOS booting non-banked switched with access to all devices via the RST 08 bios calls.
I would like to set up a TurboDOS bank switch driver which calls $SYSGETBNK / $SYSSETBNK to access another 32K for a larger TPA.

Is this the correct direction or do I need to look at other BIOS calls?

Thanks for your assistance.

-jrl

Creating custom build for TMS9918 on RC2014

Hi Ya,

Not sure if this is the best place, or would it be perferred to post on the RC2014 google group?

Tonight i was playing around trying to get the RomWBW build to include the TMS9918 VDU driver, for my RC2014 build.

I added the following to the RCZ80_std config:

TMSENABLE .SET  TRUE   ; TMS: ENABLE TMS9918 VIDEO/KBD DRIVER (TMS.ASM)
TMSMODE   .EQU  TMSMODE_RC2014

In tms.ams, I added:

#IF (TMSMODE == TMSMODE_RC2014)
TMS_DATREG	.EQU	$BE		; READ/WRITE DATA
TMS_CMDREG	.EQU	$BF		; READ STATUS / WRITE REG SEL
TMS_PPIA	.EQU	0		; PPI PORT A
TMS_PPIB	.EQU	0		; PPI PORT B
TMS_PPIC	.EQU	0		; PPI PORT C
TMS_PPIX	.EQU	0		; PPI CONTROL PORT
#ENDIF

I assume the TMS_PPIx are for keyboard and not relevant for what i am trying to do.

I just used the rcz80_std.com version to test it out - and i notice that my video display now has a flashing cursor.

But when i tried to call the HBIOS function to write a char - I just get a panic -- and i have no idea how to debug this.

The code I tried was:

LD B, 47H
LD E, 67
LD C, 40H ; tried lots of things here - do not understand whats required here
RST 08

I am trying to do something that will not work - Am i completly misunderstanding this?
What value is required for C?
And in general, how might i debug/diagnose this?

And if you got this far - thanks for ready my question.
Dean

HBIOS function always returns an error

BF-DIOMEDIA returns an unexplained error.

TSTPT taken just before and after the HBIOS call for unit 3 (IDE secondary):

+++++ TSTPT: @D9B5[0064:1803:3001:FC1E:FDF4]
+++++ TSTPT: @D9B9[FEA0:C800:0000:19FD:FDF4]

Initially I PANICed on receiving this error. After removing the PANIC the media detection for all units went OK.

The disk config is:

MD: UNITS=2 ROMDISK=384KB RAMDISK=384KB
IDE: IO=0x10 MODE=RC
IDE0: 8-BIT LBA BLOCKS=0x0003C200 SIZE=120MB
IDE1: NO MEDIA
SD: MODE=SC OPR=0x0C CNTR=0xCA TRDR=0xCB DEVICES=1
SD0: SDSC NAME=SA01G BLOCKS=0x001E6000 SIZE=972MB

Unit Device Type Capacity/Mode


Char 0 ASCI0: RS-232 38400,8,N,1
Char 1 ASCI1: RS-232 38400,8,N,1
Disk 0 MD1: RAM Disk 384KB,LBA
Disk 1 MD0: ROM Disk 384KB,LBA
Disk 2 IDE0: Hard Disk 120MB,LBA
Disk 3 IDE1: Hard Disk --
Disk 4 SD0: SD Card 972MB,LBA

By the way,
Thanks for a great product!!
Steve Williams.

HBIOS/sd.asm should initialize CSIO to full speed regardless of whether there are SDCards present.

I'd like to request that CSIO get fully initialized regardless of whether any SDCards are initialized. From what I can tell, and observe, if no SDCards are inserted then the driver leaves the CSIO initialized at the slowest speed. Here is the situation that came up:

If a non-SDCard device is attached to the second CSIO device, instead of a second SDCard, then CSIO gets initialized differently if there is an SDCard or none. In these cases, a WizNet W5500 is attached to the second CSIO device.

While the network code could force-initialize CSIO to ensure it runs at full speed, this could possibly break the SDCard driver in the future - if there is ever a reason to use a different/custom speed. I'm not sure if this will ever be the case, but it might be nice to ensure that this common hardware (the CSIO) is only initialized once, and that initialization is not reversed by other code.

HBIOS/sd.asm uses OUT to access Z180 register, should be OUT0

When doing the final initialization of the CSIO, sd.asm does:

	CALL	SD_WAITTX		; MAKE SURE WE ARE DONE SENDING
	XOR	A			; ZERO MEANS MAX SPEED
	OUT	(Z180_CNTR),A		; NOW SET CSIO PORT

I'm not sure all the possible problems with using OUT here, but according to Z180 documentation, OUT0 should be used to access Z180 registers. It appears to work, in some cases, but it is not clear that one can depend on this always working.

This code is also inconsistent about using SD_CNTR vs. Z180_CNTR.

Question regarding Driver IO port mapping convention

I see a recent update for the TMS driver has changed the ports for RC platform - make sense. But when i loaded image on my unit, with alternative ports - i got PANICS - took me a little while to figure out what was the issue.

Given the configuration model for the driver at the moment (and i assume this pattern is applied for all drivers), I am not able to specify my port configuration in my custom config file (I have a RCZ80_dino.asm - config file - that i use to configure my specific build). I need adjust the code in the tms driver (and then make sure i dont include it accidentally in a commit/pr)

I am not sure with the limitation of TASM, how best to enable a feature - but I guess i it be nice for the TMS driver to use a custom port numbers, if specified, otherwise fall back to platforms default.

I am happy to adjust the code in the driver - (or I could just simply adjust the jumpers!) Just want to understand and get feedback about port configuration pattern implemented in RomWBW.

Cheers
Dean

Preliminary Z280 Support

I am working with Karl's Z280 board for RC2014. Goal is to get this board working in RomWBW in a minimal change mode. Supporting the Z280 built-in memory management turns out to be non-trivial. However, it looks like getting it to work with the RC2014 512K RAM/ROM board is straightforward because the memory banking is done on the RAM/ROM board. Once this is done, it will provide a nice launching point for supporting the Z280 MMU with linear physical memory.

hbios - freertos - scz180 - access to z180 interrupt table

I'm interested to use the PRT1 in the z180 to generate regular timing interrupts for my program. But I can't find in the documentation where the z180 interrupt address table is stored, or identify which (if any) HBIOS call is used to insert an interrupt handler into the z180 interrupt address table.

An alternative (perhaps supported?) would be to have the regular HBIOS tick (50Hz) call a function in my program on every tick. This would save consuming the PRT1 for essentially the same function that is provided by the HBIOS tick.

Any guidance on the best way to provide a timing interrupt within HBIOS?
Or, without breaking HBIOS?

The default 1Mb rom build for the SBC does not fit all files

Using command line: build sbc std 1024

cannot write: inttest.com, cpm.sys, zsys.sys

I checked if xmuf.com was the culprit but appears not to be.

I'm assuming the default build should fit all files, so maybe something needs to be removed.

Apologies in advance if it is something I have cause or missed :)

Regards Phil.

CLRDIR does not wait for response

Hi all,

As delivered, the compact flash card in de RC2014 hardware contains 8 slices.
They are assigned designations from C: to J:
C: through H: contain meaningfull files, whereas I: and J:, afaict, do not.
So I tried to prepare thos slices by using CLRDIR to have them ready to receive files.

This fails, because CLRDIR does not wait for this capital Y but shuts down immediately.

Am I missing something?

Gerard

CLRDIR_doesnt_wait

Errors when building for Zeta2

Hi there,

I (believe I) have followed the readme file correctly, but when I do the BuildRom step, it dies here:

tasm -t80 -g3 -dROMBOOT hbios.asm hbios_rom.bin hbios_rom.lst
TASM Z80 Assembler. Version 3.2 September, 2001.
Copyright (C) 2001 Squak Valley Software
tasm: pass 1 complete.
HBIOS PROXY STACK space: 34 bytes.
HBIOS INT space remaining: 158 bytes.
hbios.asm line 0896: Label not found: (PIO_4P)
hbios.asm line 0896: Label not found: (PIO_ZP)
hbios.asm line 1251: Label not found: (PIO_4P)
hbios.asm line 1251: Label not found: (PIO_ZP)
DSRTC occupies 471 bytes.
UART occupies 667 bytes.
PPP occupies 1400 bytes.
MD occupies 496 bytes.
FD occupies 2246 bytes.
hbios.asm line 2445: Label not found: (PIO_4P)
hbios.asm line 2445: Label not found: (PIO_ZP)
hbios.asm line 2445: Label not found: (PPI_SBC)
pio.asm line 0508: Label not found: (PIO_ZP)
pio.asm line 0512: Label not found: (PIO_4P)
pio.asm line 0520: Label not found: (PPI_SBC)
pio.asm line 0543: Label not found: (PIO_ZP)
pio.asm line 0586: Label not found: (PIO_4P)
PIO occupies 734 bytes.
HBIOS space remaining: 20806 bytes.
tasm: pass 2 complete.
tasm: Number of errors = 12
TASM returned exit code 1
At C:\tmp_nosync\Zeta2\RomWBW\Source\HBIOS\Build.ps1:122 char:29

  • . . . ($LASTEXITCODE -gt 0) {throw "TASM returned exit code $LASTEXITCODE"}
  •                        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : OperationStopped: (TASM returned exit code 1:String) [], RuntimeException
    • FullyQualifiedErrorId : TASM returned exit code 1

PS C:\tmp_nosync\Zeta2\RomWBW\Source>`

Not sure what to do to fix it.
I am building with the ZETA2_std configuration. All vanilla.

Thanks a lot!

Linux build issue

Hi Curt, Wayne,

I set up a linux box and am trying out your new build script.

First thing i notice is that "copying directory d_bp/u15" is very slow compared to other copies to the image. I know this is copying a lot of files compared to other images but u14 proceeds quickly then speed slows right down from start of u15 copy.

I do get an error:

/bin/sh: 1: cd: can't cd to /home/phillip/github/RomWBW/../RomWBW.windows

which appears to be coming from Tools/Makefile.inc

and the make process does not get to the HBIOS build process.

If I go to the HBIOS directory and start make I get the same error and the process does not complete.

Not sure if I'm doing something wrong (long time since I used linux) or this is a bug.

Also comes up in make clean.

This is the last output from make:

cat hd_cpm22.img hd_zsdos.img hd_nzcom.img hd_cpm3.img hd_zpm3.img hd_ws4.img hd_bp.img > hd_combo.img
copy fd_cpm22.img to ../../Binary
copy fd_zsdos.img to ../../Binary
copy fd_nzcom.img to ../../Binary
copy fd_cpm3.img to ../../Binary
copy fd_zpm3.img to ../../Binary
copy fd_ws4.img to ../../Binary
copy hd_cpm22.img to ../../Binary
copy hd_zsdos.img to ../../Binary
copy hd_nzcom.img to ../../Binary
copy hd_cpm3.img to ../../Binary
copy hd_zpm3.img to ../../Binary
copy hd_ws4.img to ../../Binary
copy hd_bp.img to ../../Binary
copy hd_combo.img to ../../Binary
make[2]: Leaving directory '/home/phillip/github/RomWBW/Source/Images'
make[1]: Leaving directory '/home/phillip/github/RomWBW/Source'
cd Source/Images ; make
make[1]: Entering directory '/home/phillip/github/RomWBW/Source/Images'
/bin/sh: 1: cd: can't cd to /home/phillip/github/RomWBW/../RomWBW.windows
copy fd_cpm22.img to ../../Binary
copy fd_zsdos.img to ../../Binary
copy fd_nzcom.img to ../../Binary
copy fd_cpm3.img to ../../Binary
copy fd_zpm3.img to ../../Binary
copy fd_ws4.img to ../../Binary
copy hd_cpm22.img to ../../Binary
copy hd_zsdos.img to ../../Binary
copy hd_nzcom.img to ../../Binary
copy hd_cpm3.img to ../../Binary
copy hd_zpm3.img to ../../Binary
copy hd_ws4.img to ../../Binary
copy hd_bp.img to ../../Binary
copy hd_combo.img to ../../Binary
make[1]: Leaving directory '/home/phillip/github/RomWBW/Source/Images'

phillip@phillip-GA-990FXA-UD3:/github/RomWBW$ cd Source/
phillip@phillip-GA-990FXA-UD3:
/github/RomWBW/Source$ cd HBIOS/
phillip@phillip-GA-990FXA-UD3:/github/RomWBW/Source/HBIOS$ make
/bin/sh: 1: cd: can't cd to /home/phillip/github/RomWBW/../RomWBW.windows
copy ZETA2_std.rom to ../../Binary
phillip@phillip-GA-990FXA-UD3:
/github/RomWBW/Source/HBIOS$

Z180 ICR *is* relocated

In z180.inc, you have a comment that the Z180 ICR is not relocated. I'm pretty sure this isn't true. I can't find anything in the Z180 docs confirming this, and my own experiments show that it is relocated:

Monitor Ready (H for Help)
>I FF
DF
>I 3F
78
>I 3F
78
>O 3F 0
>
>
>
>I 3F
78
>O FF 0

You can see that at FF, it is returning the expected value, and at 3F it isn't. When I write to 3F, it has no effect, serial is still working. When I write to FF, though, it moves the registers and serial stops working.

This currently has little practical impact since the register is never accessed again in RomWBW after being relocated, but if that changes in the future it would be a problem, and the comment might confuse people.

Where is the Output directory?

Hi,

There appears to be no Output directory and no Rom images. Either the directory is renamed, or missing.

Regards, Crawford

I/O Wait States on Z180

The ROMWBW code does the following to set up the Z180 wait states

; SET DESIRED WAIT STATES
LD	A,0 + (Z180_MEMWAIT << 6) | (Z180_IOWAIT << 4)
OUT0	(Z180_DCNTL),A

So Z180_IOWAIT is 0-3 meaning 1-4 wait states

In CFG_RCZ180 it says

Z180_IOWAIT .EQU 1 ; IO WAIT STATES TO INSERT (0-3)

However that actually inserts two wait states as the real range is 1-4. Two seems reasonable so is this just a documentation glitch ?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.