SC140, v1.0, Software, RomWBW

The recommended version of Wayne Warthen’s RomWBW for SC140 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 v3.0

The standard distribution of RomWBW for SC140 assumes a terminal is connected to serial port A. The default serial port settings are: 115200 baud, 8 data, 1 stop, no parity, no flow control. An FTDI serial to USB adapter is shown above, connected to serial port A.

An SD card is optional. If present, it should be connected as illustrated above.

At power up RomWBW initialises and displays self test result on the status LED. It also shows more detailed diagnostic information on the LEDs of a digital I/O module, if present and set to address 0x0D. It also outputs system information to the terminal.

Status LED

Following a reset, the status LED should light for a fraction of a second, then blink off for about half a second, then light again. This indicates the self test has passed.

Once an option is selected from the RomWBW startup menu the status LED turns off, but lights during access to storage devices.

Diagnostic display

The optional 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”.

Once an option is selected from the RomWBW startup menu the diagnostic LEDs turn off, but light during access to storage devices. Each drive is represented by its own LED.

System information

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

The first line shows the HBIOS version.

RomWBW HBIOS v3.0, 2020-03-27

Following this is the configuration name “SCZ180” 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).

SC130 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=0xC0 ASCI MODE=115200,8,N,1
ASCI1: IO=0xC1 ASCI MODE=115200,8,N,1
MD: UNITS=2 ROMDISK=384KB RAMDISK=384KB
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=SU08G BLOCKS=0x00ECE000 SIZE=7580MB

ASCI0/1 are the Z180’s serial ports.

DSRTC is the Real Time Clock. This is not included on the motherboard but could be added as an expansion module. Charge must be off.

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

IDE devices, such as the optional Compact Flash module, are shown.

PPIDE is the optional parallel port IDE drive.

SD is the SD card, if fitted to SC140’s SPI port.

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

Real Time Clock

A real time clock is not included on SC140. If it is included on a separate module (at I/O address 0x0C), RomWBW will detect it.

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 the RTC is assumed not tohave 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 v3.0 [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
    1932 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