SC126, v1.0, Software, RomWBW

The recommended version of Wayne Warthen’s RomWBW for SC126 can be found here.

The very latest version, source code, and documentation for RomWBW can be found here.

Getting started with RomWBW

The following describes the use of RomWBW v2.9.2-pre.1, 2019-07-23

SC126 with digital I/O module (optional)

The standard distribution of RomWBW for SC126 assumes a terminal is connected to serial port A, as illustrated above. The default serial port settings are: 115200 baud, 8 data, 1 stop, no parity, no flow control.
Note: With RomWBW v2.x the baud rate is 38400 baud.

An SD card is optional. If present, it should be connected via a suitable adapter to SPI SD Card 1, as illustrated above.

At power-up RomWBW initialises and displays diagnostic information on SC126’s LED port (the green LEDs shown above). It also outputs system information to the terminal.

Diagnostic display

The diagnostic display should result in the LEDs each lighting in turn until all 8 are turned on. The LED display, shown in binary, goes through the following sequence:

  • 0000 0000 = State after hardware reset
    • Disable interrupts
  • 0000 0001 = Start of initialisation
    • Setup Z180 base address
  • 0000 0010
    • Setup Z180 registers
  • 0000 0011
    • Install HBIOS into RAM and transition to RAM
  • 0000 0111
    • Setup page zero interrupt vector
  • 0000 1111
    • Determine CPU type and speed
  • 0001 1111
    • Initialise heap storage
  • 0011 1111
    • Pre-console initialisation
  • 0111 1111
    • Output any cached debug text
    • Announce HBIOS and version
  • 1111 1111
    • Display system information

For full details see RomWBW source code, file “hbios.asm”.

System information

When RomWBW starts it will display something like this on the terminal:

The first line shows the HBIOS version.

RetroBrew HBIOS v2.9.2-pre.1, 2019-07-23

Following this is the platform name “RC2014” and the CPU details. This should say “Z8S180-K” or “Z8S180-N”, followed by the speed (18.432MHz) and the Z180 register base address (0xC0).

RC2014 Z8S180-K @ 18.432MHz IO=0xC0

The memory and I/O wait states are shown, each with a value of 0 to 3. Zero wait states is the fastest. Several wait states are added to I/O operations to increase the access time to something similar to a typical RC2014 bus. The interrupt mode is also shown, followed by memory size.

0 MEM W/S, 2 I/O W/S, INT MODE 2
512KB ROM, 512KB RAM

The next block is all the devices detected.

ASCI0: IO=0xC6,C8 MODE=115200,8,N,1
ASCI1: IO=0xC7,C9 MODE=115200,8,N,1
DSRTC: MODE=STD Sat 2019-08-03 11:37:17 CHARGE=OFF
MD: UNITS=2 ROMDISK=384KB RAMDISK=384KB
IDE: IO=0x10 DEVICES=1
IDE0: NO MEDIA
SD: MODE=SC126 FAST OPR=0x0C CNTR=0xCA TRDR=0xCB DEVICES=1
SD0: SDSC NAME=SU02G BLOCKS=0x003AF000 SIZE=1886MB

ASCI0/1 are the Z180’s serial ports.

DSRTC is the Real-Time Clock. The charge must be off.

MD is the memory device. There should be 2 units: ROMDISK and RAMDISK.

IDE devices, such as the optional Compact Flash module, are shown, followed by the SD card (connect to SC126’s SPI port 1).

This is followed by details of the storage devices and then the boot options.

Real-Time Clock

The real-time clock is managed with “RTC.COM” from CP/M. Start CP/M and type the command “RTC”.

To display the current time, press the “T” key.

Current time: 19-08-03 12:07:15-03

To enter the time and date, press the “I” key and enter the appropriate values. Each value is 2 digits, such as “07”. A 24-hour clock is used so hours can be from 00 to 23. The day of the week is in the range 01 (Sunday) to 07 (Saturday).

 Init date/time.
 YEAR:19
 MONTH:08
 DATE:03
 HOURS:12
 MINUTES:05
 SECONDS:00
 DAY:07
 RTC>s
 Set RTC time.

Now press the “S” key to set the time to the values entered above.

WARNING: Charge must be off as SC126 does not have a rechargeable battery.

Preparing an SD card

An SD card provides a number of logical drives. Before using a drive it must be prepared with “CLRDIR” from CP/M.

When CP/M starts it will list the available drives. In the example below the SD card has 4 drives (G: to J:).

Loading CP/M 80 v2.2…
 CBIOS v2.9.2-pre.1 [WBW]
 Configuring Drives…
 A:=MD1:0
    B:=MD0:0
    C:=IDE0:0
    D:=IDE0:1
    E:=IDE0:2
    F:=IDE0:3
    G:=SD0:0
    H:=SD0:1
    I:=SD0:2
    J:=SD0:3
 1935 Disk Buffer Bytes Free
 CP/M-80 v2.2, 54.0K TPA
 B>

Start CP/M and enter the command “CLRDIR H:”. To confirm you really do want to do this, press the “Y” key. Note, it has to be an upper case “Y”. The terminal should show something like this:

CLRDIR V-0.4 (06-Aug-2012) by Max Scane
 Warning - this utility will overwite the directory sectors of Drive: H:
 Type Y to proceed any key other key to exit. Y
 Directory cleared.

A simple way to test a drive is working properly is to do a copy with verify. For example:

 B>pip h:=B:*.*[v]
 COPYING -
 ASM.COM
 CLRDIR.COM
 COPY.CFG
 COPY.COM
 DDT.COM

Homebrew 8-bit retro computing