RomWBW v2.9.2 Baud Rate Changes

924 views
Skip to first unread message

Wayne Warthen

unread,
Jan 26, 2020, 4:10:01 PM1/26/20
to RC2014-Z80
Hi Folks,

I have just posted the latest pre-release of RomWBW v2.9.2 on GitHub at https://github.com/wwarthen/RomWBW/releases.  This happens quite frequently, but this particular pre-release includes a couple of changes that will cause you trouble if you are not expecting them.  So, I wanted to briefly post something to highlight them here:

First, the default baud rate for all RC2014 kits has been standardized at 115200 baud.  Previously, the Z80 variants were 115200 baud and the Z180 variants were 38400 baud.  Now, both the Z80 and Z180 platforms are all 115200 baud.  This removes an annoying inconsistency and really helps when switching between SCM and RomWBW.  Note that XModem will fail at 115200 baud unless your hardware flow control is working properly.  For all these platforms, it should work fine by default, so you should not see a problem.  If the platform supports it, you can always change the baud rate on the fly using the MODE command.  Also, the default baud rate can always be changed by creating a custom ROM.

Secondly, for those of you that have been using the pre-built floppy or hard disk images, I have overhauled the contents of these images.  In the past there were just 2 floppy and 2 hard disk images (fd0.img, fd1.img, hd0.img, and hd1.img) and the contents were pretty random.  Now you will find there are 6 disk images of each type.  Floppy images are named fd_*.img and hard disk images are named hd_*.img.  Each of the 6 variants have a specific purpose and the contents are appropriate for that purpose:
  • xx_cpm22.img: bootable generic DRI CP/M 2.2 with the standard DRI CP/M 2.2 files and RomWBW utilties.
  • xx_zsdos.img: bootable generic ZSDOS & ZCPR with the standard ZSDOS files, DRI CP/M 2.2 files, and RomWBW utilties.
  • xx_nzcom.img: bootable NZCOM distribution and RomWBW utilties.  Boots to ZSDOS, then you must configure NZCOM.
  • xx_cpm3.img: generic DRI CP/M 3 with the standard CP/M 3 files and RomWBW utilities.
  • xx_zpm3.img: ZPM3 and ZCCP with common ZCPR utilties, CP/M3 files, and RomWBW utilties.
  • xx_ws4.img: standard MicroPro WordStar 4 distribution.
The ReadMe.txt file in the Images directory of the distribution contains more information on the images.

Thanks,

Wayne

djrm

unread,
Jan 27, 2020, 6:32:39 PM1/27/20
to RC2014-Z80
On Sunday, 26 January 2020 21:10:01 UTC, Wayne Warthen wrote:
Hi Folks,

I have just posted the latest pre-release of RomWBW v2.9.2 on GitHub at https://github.com/wwarthen/RomWBW/releases.  This happens quite frequently, but this particular pre-release includes a couple of changes that will cause you trouble if you are not expecting them.  So, I wanted to briefly post something to highlight them here:


Greetings Wayne, nice to see development of the s/w continuing. The HBIOS changes lok useful and I want to upgrade my system. I've got the .com and .img files ready on one of the drives. When I run the .com file the Ed Brindley IDE drive is not seen, the RC2014 CF card is always seen. I have been looking to see if some default port addresses have changed but havn't found a list yet. Below are two boot sessions, the ROM version from my existing setup with CF and IDE showing, and the COM session with just the CF drives showing.

My system has a RC2014 LED I?O card, and a Ed Brindley sound card - could these be conflicting somehow? I'll try pulling them tomorrow to see if it helps.

ROM boot:

Enter code here...RetroBrew HBIOS v2.9.1-pre.5, 2018-06-11

RC2014 Z80 @ 7.372MHz
0 MEM W/S, 1 I/O W/S, INT MODE 1
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=384KB
IDE: IO=0x10 DEVICES=1
IDE0: 8BIT LBA BLOCKS=0x0001F400 SIZE=62MB
PPIDE: IO=0x20 DEVICES=2
PPIDE0: NO MEDIA
PPIDE1: LBA BLOCKS=0x000F45F0 SIZE=488MB

Unit        Device      Type              Capacity/Mode
----------  ----------  ----------------  --------------------
Disk 0      MD1:        RAM Disk          384KB,LBA
Disk 1      MD0:        ROM Disk          384KB,LBA
Disk 2      IDE0:       CompactFlash      62MB,LBA
Disk 3      PPIDE0:     Hard Disk         --
Disk 4      PPIDE1:     CompactFlash      488MB,LBA
Serial 0    SIO0:       RS-232            115200,8,N,1
Serial 1    SIO1:       RS-232            115200,8,N,1

RC2014 Z80 Boot Loader

Boot: (C)PM, (Z)System, (M)onitor,
      (L)ist disks, or Disk Unit # ===> LIST DEVICES

Disk Devices:

   0) MD1:
   1) MD0:
   2) IDE0:
   3) PPIDE0:
   4) PPIDE1:

Boot: (C)PM, (Z)System, (M)onitor,
      (L)ist disks, or Disk Unit # ===> 


COM Boot:
Enter code here...B>D:RC2014


RetroBrew HBIOS v2.9.2-pre.27, 2020-01-26

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

SIO0: IO=0x80 SIO MODE=115200,8,N,1
SIO1: IO=0x82 SIO MODE=115200,8,N,1
DSRTC: MODE=STD IO=0xC0 NOT PRESENT
MD: UNITS=2 ROMDISK=384KB RAMDISK=384KB
IDE: IO=0x10 DEVICES=1
IDE0: 8BIT LBA BLOCKS=0x0001F400 SIZE=62MB

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          384KB,LBA
Disk 1      MD0:        ROM Disk          384KB,LBA
Disk 2      IDE0:       CompactFlash      62MB,LBA


RC2014 Boot Loader

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

Boot Selection?

*** Invalid Selection ***

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

Boot Selection? 


I dont want to commit the new code to rom until I can get the IDE disk working. Any idea what the problem could be?
(I just tried pulling the sound card, it made no difference I could see)
Kind regards, David.

Tadeusz Pycio

unread,
Jan 27, 2020, 6:54:12 PM1/27/20
to RC2014-Z80

Hi, David.

Edit \Source\HBIOS\Config\RCZ80_std.asm

PPIDEENABLE    .SET    TRUE     (default is FALSE)

Wayne Warthen

unread,
Jan 27, 2020, 8:04:33 PM1/27/20
to RC2014-Z80
This is exactly correct.

I don't remember ever having PPIDE enabled in the standard RCZ80 builds.  Maybe you did a custom build to enable it a long time ago.

-Wayne 

djrm

unread,
Jan 28, 2020, 1:48:17 PM1/28/20
to RC2014-Z80
Hi Tadeusy, Wayne, Thanks for that vital information. 

I dont remember building the roms previously but perhaps I got one ready patched from someone else.
I have bought a new programmer since I had the last flash burned so I did a quick test with the .com file version and saw my drives recognised and then burned a new ROM.
When I boot any of the old system disks I am unable to see any files on the disks, however if I boot the ROM version of CP/M then I can see my old files on all devices.
I rad somewhere that the boot files need upgrading after an update, could this be the reason why?

Its nice to see some the monitor and Forth included in the boot images.
Thanks for the help, David.

Wayne Warthen

unread,
Jan 28, 2020, 1:57:04 PM1/28/20
to RC2014-Z80
You should definitely update the system tracks on your boot disks.  Use SYSCOPY to do that.  Something like:

B>SYSCOPY C:=ZSYS.SYS

This assume C: is the boot disk you want to update and that you are booting into ZSystem.

-Wayne

djrm

unread,
Jan 29, 2020, 6:17:01 PM1/29/20
to RC2014-Z80
On Tuesday, 28 January 2020 18:57:04 UTC, Wayne Warthen wrote:
You should definitely update the system tracks on your boot disks.  Use SYSCOPY to do that.  Something like:

B>SYSCOPY C:=ZSYS.SYS

This assume C: is the boot disk you want to update and that you are booting into ZSystem.

-Wayne

Everything looks to be working correctley now, with the added bonus of my 6850 ACIA being detected by ROMwbw at startup together with the SIO2, RC2014 compact flash, Brinbley IDE drive.
There is also a Brinbley sound card nad RC2014 led-button card which twinkles at power on, sweet.
I have made a dual format CF card and tried FAT.COM to transfer some files.
I'll try playing some tunes next and then try the z88dk enviorenment.
Thanks again, David.

Wayne Warthen

unread,
Jan 29, 2020, 6:24:14 PM1/29/20
to RC2014-Z80
Excellent.  I love to get reports of success!

djrm

unread,
Jan 31, 2020, 7:35:59 PM1/31/20
to RC2014-Z80


On Wednesday, 29 January 2020 23:24:14 UTC, Wayne Warthen wrote:
Excellent.  I love to get reports of success!


The sound card is working with tune.com, and I can now use the new x88dk to compile C code into a .com file to run on ROMwbw, I have imported som libraries too. hooray.

I have a SIO2 and ACIA serial devices in my ststem.
One remaining problem though is accesing the ACIA device, I think it should be the CP/M device UC1: but the system hangs when I access it. 
I'd like to be able to switch the console onto the ACIA - it has a ESP32 link on it to access the console remotely.
If I remove the SIO2 card things work fine on the ACIA as main console. I dont know what tests to do to try and diagnose this problem, any ideas?
I have been trying to send files to the UC1 device using pip. (UC2 is always the console, PTP: is the second SIO port)
is there a way to swap the order the ports are asigned?
Kind regards, David.

Wayne Warthen

unread,
Jan 31, 2020, 9:08:32 PM1/31/20
to RC2014-Z80
Hi David,

RomWBW maps the character devices it has available to this fixed set of devices defined by CP/M.  RomWBW uses the following mapping based on what I could find as typical mappings in classic systems.

COM0: = TTY:, RDR:, PUN:, LST:
COM1: = UC1:, PTR:, PTP:, LPT:
COM2: = UR1:, UP1:, UL1:
COM3: = UR2:, UP2:

Since your system has both an SIO and and ACIA, the SIO ports take priority, so they map as follows:

SIO0: = COM0:
SIO1: = COM1:
ACIA0: = COM2:

So, since the ACIA is on COM2:, you can refer to it in CP/M as UR1:, UP1:, or UL1:.  UC1: is on SIO1: which is the second SIO port.  Your system probably seemed to hang because there was nothing connected to the the second SIO port.

Thanks,

Wayne

djrm

unread,
Feb 1, 2020, 11:20:37 AM2/1/20
to RC2014-Z80
Hi Wayne,
Thanks for the clarification on the device naming, I was getting a bit mixed up but I had actually tied all the names I could see and nothing has helped to get the ACIA working.
I have checked the serial connections now without the ESP8266 and this hasnt helped, however ..

When the system boots it shows what appears to be an I/O address conflict where both the SIO and ACIA are using the same I/O port numbers,
This must surely be the problem, SIO0 and ACIA0 are both found at port 0x80
RetroBrew HBIOS v2.9.2-pre.27, 2020-01-28

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

SIO0: IO=0x80 SIO MODE=115200,8,N,1
SIO1: IO=0x82 SIO MODE=115200,8,N,1
ACIA0: IO=0x80 ACIA MODE=115200,8,N,1
DSRTC: MODE=STD IO=0xC0 NOT PRESENT
MD: UNITS=2 ROMDISK=384KB RAMDISK=384KB
IDE: IO=0x10 DEVICES=1
IDE0: 8BIT LBA BLOCKS=0x0001F400 SIZE=62MB
PPIDE: IO=0x20 DEVICES=2
PPIDE0: LBA BLOCKS=0x0001F480 SIZE=62MB
PPIDE1: NO MEDIA

Unit        Device      Type              Capacity/Mode
----------  ----------  ----------------  --------------------
Char 0      SIO0:       RS-232            115200,8,N,1
Char 1      SIO1:       RS-232            115200,8,N,1
Char 2      ACIA0:      RS-232            115200,8,N,1
Disk 0      MD1:        RAM Disk          384KB,LBA
Disk 1      MD0:        ROM Disk          384KB,LBA
Disk 2      IDE0:       CompactFlash      62MB,LBA
Disk 3      PPIDE0:     CompactFlash      62MB,LBA
Disk 4      PPIDE1:     Hard Disk         --


What are the reccomended I/O addresses for the serial port devices, I may need to tighten up the address range accepted on one or more of my cards.

The home made ACIA has only partial decoding and is active on 0x40 or 0x80
THis is done by swapping A6 and A7 address lines into CS1 and |CS2
The only other address line used is A0 for register select.
If I choose 0x40 then the system doesnt boot and lots of unexpected interrups are shown.
I think one of the other cards has some unused address decoding outputs which may help.
The RC2014 SIO2 also has limited decoding, I need to check the schematic to see the actual scheme in use..
I'll take out some of the other cards and see if it helps.

I seem to remember Steve Cousins made a nice chart showing the possible conflits, I need to study it.
Kind regards, David.

Wayne Warthen

unread,
Feb 1, 2020, 3:28:35 PM2/1/20
to RC2014-Z80
Yes, it looks like a port conflict.  The official SIO module will conflict with the official ACIA module if built normally.

RomWBW will find the ACIA at either 0x80 or 0x40.  If you modify the ACIA hardware so that is at port address 0x40, that should work (as long 0x40-0x7F does not conflict with anything else).

-Wayne

djrm

unread,
Feb 1, 2020, 4:53:11 PM2/1/20
to RC2014-Z80
Hi Wayne, Ive used some extra address decoding from the spares available in the CF module and made the ACIA appear at 0xA0, I can now write bytes in and out using the monitor.
The ROMwbw 'finds' the ACIA at 0xA0 thinkig it must really be at 0x80 but still tries to use it at 0x80, doh.

I'll try 0x40 but I think it may cause problems ...
ALternativly I'll rebuild the ROM, dont know just what to change though.
Can I poke something into ram to change the ACIA address in the bios table?

cheers, David.

djrm

unread,
Feb 1, 2020, 6:03:14 PM2/1/20
to RC2014-Z80


On Saturday, 1 February 2020 21:53:11 UTC, djrm wrote:
Hi Wayne, Ive used some extra address decoding from the spares available in the CF module and made the ACIA appear at 0xA0, I can now write bytes in and out using the monitor.
The ROMwbw 'finds' the ACIA at 0xA0 thinkig it must really be at 0x80 but still tries to use it at 0x80, doh.

I'll try 0x40 but I think it may cause problems ...
ALternativly I'll rebuild the ROM, dont know just what to change though.
Can I poke something into ram to change the ACIA address in the bios table?

cheers, David.

On Saturday, 1 February 2020 20:28:35 UTC, Wayne Warthen wrote:
Yes, it looks like a port conflict.  The official SIO module will conflict with the official ACIA module if built normally.

RomWBW will find the ACIA at either 0x80 or 0x40.  If you modify the ACIA hardware so that is at port address 0x40, that should work (as long 0x40-0x7F does not conflict with anything else).

-Wayne


Success, I removed the $20 I/O address offset from the ACIA detect function and changed the default address to 0xA0.
Now it works. Thanks for the help, David. 

djrm

unread,
Feb 3, 2020, 12:52:13 PM2/3/20
to RC2014-Z80
Off topic... now I have the serial ports working I was keen to try the sdcc compiler. The project I had in mind was to try to drive this old Afron Speech synthesizer module from the RC2014. The card uses the National Semiconductors VS1000 Digitalker chip together with a couple of roms holding the voice samples.The date on the roms is 1980, the date on the manual is 1981. In the box where two cards, A new S100 card without ROMS and VS1000 and this one with a simple 8 bit (parallel port interface. I bought it last year from a clearout sale and all I have heard until today was its signon message.

I have chosen to use the sound card i/o ports to drive it as they can be switched from output to input, this allows the status to be read which is essential to play multiple words with minimum delay between words.
I wanted to make this a command line tool to play the words given as arguments, but it seems that this isnt a feature available in the RC2014 sdcc crt (runtime) library.
There may be an enhanced crt version to allow the usual argc, argv parameters but I have not found it if it exists, or perhaps another target is needed.

I did find the port input and output functions available in the z80 header, there is a timer function there too which I used before I got the int wait feature working.
The sound card port input function seems to contadict the manual, I had to read a differant register to what I thought the manual said, the code works as it is now.

When the program runs is pprompts the user for words to say, the words should be seperated by space or ,.- SOmething odd happens when the seperator is a space and the prompt reappears.
I suspect some strtok shenanigans is causing this - perhaps scanf uses strtok for itself. I'll check the procedure on a PC some day.
To get it to speak I can type something like "R,C,Twenty,Fourteen", I lifted the word table from the xbeaver Afron simulation driver.

It looks like the C compiler will be quite useful for the RC2014, I'm wondering wether to use the parallel port to read the date from a timekkeeper ram chip or perhaps to add one into some memory mapped space somehow.
I'd like to drive a VFD display too. Source code attached below, hth.
Kind regards, David.

/*
 * Arfon speach synthesizer driver
 * uses RC2014 sound card i/o ports
 
 * Compiled to .com file with z88dk - sdcc
 * PS C:\z88dk\rc2014> zcc +rc2014 -subtype=hbios -v --list -m -SO3 --c-code-in-asm --opt-code-size -clib=sdcc_iy  --max-allocs-per-node200000 iotest.c -o iotest -create-app
 *  
 * D. Richards, Feb 2020
*/

#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <z80.h>


char * spk_dictionary[] = 
{
  "Digitalker",               /* 0 */
  "One",                      /* 1 */
  "Two",                      /* 2 */
  "Three",                    /* 3 */
  "Four",                     /* 4 */
  "Five",                     /* 5 */
  "Six",                      /* 6 */
  "Seven",                    /* 7 */
  "Eight",                    /* 8 */
  "Nine",                     /* 9 */

  "Ten",                      /* 10 */
  "Eleven",                   /* 11 */
  "Twelve",                   /* 12 */
  "Thirteen",                 /* 13 */
  "Fourteen",                 /* 14 */
  "Fifteen",                  /* 15 */
  "Sizteen",                  /* 16 */
  "Seventeen",                /* 17 */
  "Eighteen",                 /* 18 */
  "Ninteen",                  /* 19 */

  "Twenty",                   /* 20 */
  "Thirty",                   /* 21 */
  "Fourty",                   /* 22 */
  "Fifty",                    /* 23 */
  "Sixty",                    /* 24 */
  "Seventy",                  /* 25 */
  "Eighty",                   /* 26 */
  "Ninety",                   /* 27 */
  "Hundred",                  /* 28 */
  "Thousand",                 /* 29 */

  "Million",                  /* 30 */
  "Zero",                     /* 31 */
  "A",                        /* 32 */
  "B",                        /* 33 */
  "C",                        /* 34 */
  "D",                        /* 35 */
  "E",                        /* 36 */
  "F",                        /* 37 */
  "G",                        /* 38 */
  "H",                        /* 39 */

  "I",                        /* 40 */
  "J",                        /* 41 */
  "K",                        /* 42 */
  "L",                        /* 43 */
  "M",                        /* 44 */
  "N",                        /* 45 */
  "O",                        /* 46 */
  "P",                        /* 47 */
  "Q",                        /* 48 */
  "R",                        /* 49 */

  "S",                        /* 50 */
  "T",                        /* 51 */
  "U",                        /* 52 */
  "V",                        /* 53 */
  "W",                        /* 54 */
  "X",                        /* 55 */
  "Y",                        /* 56 */
  "Z",                        /* 57 */
  "Again",                    /* 58 */
  "Ampere",                   /* 59 */

  "And",                      /* 60 */
  "At",                       /* 61 */
  "Cancel",                   /* 62 */
  "Case",                     /* 63 */
  "Cent",                     /* 64 */
  "400Hz",                    /* 65 */
  "80Hz",                     /* 66 */
  " ",                        /* 67 */
  "  ",                       /* 68 */
  "   ",                      /* 69 */

  "    ",                     /* 70 */
  "     ",                    /* 71 */
  "Centi",                    /* 72 */
  "Check",                    /* 73 */
  "Comma",                    /* 74 */
  "Control",                  /* 75 */
  "Danger",                   /* 76 */
  "Degree",                   /* 77 */
  "Dollar",                   /* 78 */
  "Down",                     /* 79 */

  "Equal",                    /* 80 */
  "Error",                    /* 81 */
  "Feet",                     /* 82 */
  "Flow",                     /* 83 */
  "Fuel",                     /* 84 */
  "Gallon",                   /* 85 */
  "Go",                       /* 86 */
  "Gram",                     /* 87 */
  "Great",                    /* 88 */
  "Greater",                  /* 89 */

  "Have",                     /* 90 */
  "High",                     /* 91 */
  "Higher",                   /* 92 */
  "Hour",                     /* 93 */
  "In",                       /* 94 */
  "Inches",                   /* 95 */
  "Is",                       /* 96 */
  "It",                       /* 97 */
  "Kilo",                     /* 98 */
  "Left",                     /* 99 */


  "Less",                     /* 100 */
  "Lesser",                   /* 101 */
  "Limit",                    /* 102 */
  "Low",                      /* 103 */
  "Lower",                    /* 104 */
  "Mark",                     /* 105 */
  "Meter",                    /* 106 */
  "Mile",                     /* 107 */
  "Milli",                    /* 108 */
  "Minus",                    /* 109 */

  "Minute",                   /* 110 */
  "Near",                     /* 111 */
  "Number",                   /* 112 */
  "Of",                       /* 113 */
  "Off",                      /* 114 */
  "On",                       /* 115 */
  "Out",                      /* 116 */
  "Over",                     /* 117 */
  "Parenthesis",              /* 118 */
  "Percent",                  /* 119 */

  "Please",                   /* 120 */
  "Plus",                     /* 121 */
  "Point",                    /* 122 */
  "Pound",                    /* 123 */
  "Pulses",                   /* 124 */
  "Rate",                     /* 125 */
  "Re",                       /* 126 */
  "Ready",                    /* 127 */
  "Right",                    /* 128 */
  "s",                        /* 129 */

  "Second",                   /* 130 */
  "Set",                      /* 131 */
  "Space",                    /* 132 */
  "Speed",                    /* 133 */
  "Star",                     /* 134 */
  "Start",                    /* 135 */
  "Stop",                     /* 136 */
  "Than",                     /* 137 */
  "The",                      /* 138 */
  "Time",                     /* 139 */

  "Try",                      /* 140 */
  "Up",                       /* 141 */
  "Volt",                     /* 142 */
  "Weight"                    /* 143 */

};

#define SPK_DICTIONARY_COUNT ( sizeof( spk_dictionary ) / sizeof( char * )  )

void init(void)
{
  z80_outp(0xd8,0x07); // a & b outputs
  z80_outp(0xd0,0xc0);

  z80_outp(0xd8,0x0f); // clear b
  z80_outp(0xd0,0x00);

  z80_outp(0xd8,0x0e); // clear a
  z80_outp(0xd0,0x00);
}

void wait(void) // wait for Int after speach is finished
{
  int wd=0;
  int ia;

  z80_outp(0xd8,0x07); // select ddr register
  z80_outp(0xd0,0x80); // set a inputs, b outputs

  for(wd=0; wd<32000; wd++)
  {
    z80_outp(0xd8,0x0e);        // select a
    ia=z80_inp(0xd8);           // read a

    if(ia&0x80)                 // check for int high
    {
      break;
    }     
  }
  z80_outp(0xd8,0x07); // restor a & b as outputs
  z80_outp(0xd0,0xc0);
  return;
}

void say(int i) // send speach index, then strobe
{
  z80_outp(0xd8,0x0e);  // select a
  z80_outp(0xd0,0x00);  // set low

  z80_outp(0xd8,0x0f);  // select b
  z80_outp(0xd0,i);     // set key

  z80_outp(0xd8,0x0e);  // select a
  z80_outp(0xd0,0x01);  // set strobe

  wait();
}

int find(char * inword, int *key) // lookup index for word to say
{
  int i;
  int value;
  for(i=0; i<SPK_DICTIONARY_COUNT; i++)
  {
    // try to convert text to non zero integer
    value = (int) strtol(inword, (char **)NULL, 10);      
    if(value != 0)
    {
        *key = value;
        return 1;
    }
    // try to find word in dictionary  
    if(strcmp(spk_dictionary[i], inword)==0)
    {
      *key = i;
      return 1;
    }
  }
  return 0;
}

void main(void)
{
  char buffer[80];
  char * pch;
  int key=-1;

  init();               
  do 
  {
     printf("Words? ");
     scanf ("%s",buffer);
     pch = strtok (buffer,", .-");
     while (pch != NULL)
     {  
        if(find(pch, &key) == 1)
        {
          say(key);
        }
        pch = strtok (NULL, ", .-");
     }
  } while (key != 0);
        
}



Phillip Stevens

unread,
Feb 3, 2020, 8:13:00 PM2/3/20
to RC2014-Z80
djrm wrote:
Off topic... now I have the serial ports working I was keen to try the sdcc compiler.
I wanted to make this a command line tool to play the words given as arguments, but it seems that this isnt a feature available in the RC2014 sdcc crt (runtime) library.
There may be an enhanced crt version to allow the usual argc, argv parameters but I have not found it if it exists, or perhaps another target is needed.

You can include the input.h and use functions like those found in empire.c for example.
Note that you can't mix the sccz80 compiler in here because there is a L->R vararg issue.
You'll need to stick with using zsdcc which is R->L.

#include <input.h>

void INPUT(char *p, char *fmt, ...)
 
{
 va_list arg
;
 va_start
(arg, fmt);
 
 printf
("%s", p);
 in_wait_nokey
();
 
 fflush
(stdin);
 vscanf
(fmt, arg);
 
}

 
do
 
{
 INPUT
("Instructions? (y/n) ", "%2s", buf);
 
*buf = toupper(*buf);
 
}
 
while ((*buf != 'Y') && (*buf != 'N'));

 
do { INPUT("How many people are playing? ", "%d", &NP); } while ((NP < 0) || (NP > 6));
 
It looks like the C compiler will be quite useful for the RC2014.

You might want to try the +hbios target as an option. It calls the HBIOS API directly. Some of the generic C functions available are defined here in hbios.h.
But the standard I/O functions as part of the standard libraries are already available. i.e. printf() works as expected.
There's some more detail and examples on using HBIOS here.

Or use the +rc2014 -subtype=hbios option which allows you (us) to add RC2014 specifics such as I/O ports, to the standard HBIOS API calls.

Phillip

djrm

unread,
Feb 5, 2020, 3:48:24 PM2/5/20
to RC2014-Z80
Thanks for the tip Philip, I'll have a look at the example.
In the meantime I have built the application using the +cpm option and found that command line argument are available.
A minor change has allowed me to speak the words given as arguments in natural L to R order.
One odd thing though is that the arguments are all turned into upper case, but I can cope witht that.
I'll be trying to make a number to words converter for numbers and time next using the limited vocabulary available.
Thanks again, David.

positron (Jose L. Collado)

unread,
Feb 11, 2020, 12:27:02 PM2/11/20
to RC2014-Z80
Hi Wayne, thanks for the update. Regarding the floppy/hard disk image build process, the overhaul is welcome, very flexible and extendable. The only minor issue I found was that now it seems to need at least  PowerShell version 5.1 to run. I tried with my "retro" Windows 7 laptop that I use for electronics, embedded and retro-computing tasks, that has version 2 installed and got some compatibility errors, so I upgraded and all went fine.

Regrads. JL.

Wayne Warthen

unread,
Feb 11, 2020, 2:46:32 PM2/11/20
to RC2014-Z80
Well, that was not intended.  I don't have a simple way to test old version of Windows/PowerShell at the moment.  Not sure if you are still able to recreate the error messages, but that would be helpful if you can.  I will look into this as soon as I have a bit of time.

Thanks,

Wayne

Jose Luis Collado

unread,
Feb 11, 2020, 5:08:05 PM2/11/20
to rc201...@googlegroups.com
Hi Wayne, glad to help; I can´t recreate the exact error messages but I recall, from my short-term memory... that in both BuildFD.ps1 and BuildHD.ps1:
- It complained about the first line (parameter handling). I replaced it with simple args[0] and args[1] assignments for $Disk and $SysFile that worked ok but then...
- in line 22 and 54 Set-Content commands, it didn't recognize the -NoNewLine option, treating it as a nonexistent named parameter...
- in lines 51 and 52 Get-Content commands, it didn't recognize the -Raw option, also treating it as a nonexistent named parameter.

Cheers,
José Luis.


--
You received this message because you are subscribed to a topic in the Google Groups "RC2014-Z80" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/rc2014-z80/xUT8f5MvcQw/unsubscribe.
To unsubscribe from this group and all its topics, send an email to rc2014-z80+...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/rc2014-z80/5d7b8be6-9415-45fa-814e-f9ff6d394a7d%40googlegroups.com.

Wayne Warthen

unread,
Feb 11, 2020, 5:48:09 PM2/11/20
to RC2014-Z80
Thank you José.

I found a parameter that allows you to invoke different versions of PowerShell.  I was able to recreate the errors you describe.  I just checked in updated scripts that I believe will work fine under PowerShell versions 2.0 or greater now.  The changes were not as trivial as I would have hoped, so if anyone has trouble with the disk image building, please let me know.

I know you no longer have a way to test this, but if anyone else does, it would be appreciated.

Thanks!

Wayne
To unsubscribe from this group and all its topics, send an email to rc2014-z80+unsubscribe@googlegroups.com.

positron (Jose L. Collado)

unread,
Feb 12, 2020, 7:44:28 AM2/12/20
to RC2014-Z80
Wayne, when I get home this afternoon I can dust off another Win 7 laptop that surely has a very old PowerShell version and test your fix. Thanks again for your hard work addressing even the smallest issues in your excellent ROMWBW platform !

Cheers, JL.

positron (Jose L. Collado)

unread,
Feb 12, 2020, 5:13:38 PM2/12/20
to RC2014-Z80
Hi Wayne ! Well... good news and bad news...

Using PowerShell 2.0, prior compatibility errors don't show up anymore (good !), but now I get the following error:

C:\Users\Jose Luis\Downloads\RomWBW\Source\Images>Build
:
: Cleaning...
:
:
: Building Floppy Disk Images...
:
Generating Floppy Disk cpm22...
Adding System Image ..\cpm22\cpm_wbw.sys...
mkfs.cpm -f wbw_fd144 -b ..\cpm22\cpm_wbw.sys fd_cpm22.img
mkfs.cpm: can not open ..\cpm22\cpm_wbw.sys: No such file or directory
cpmcp -f wbw_fd144 fd_cpm22.img d_cpm22/u0/*.* 0:
cpmcp -f wbw_fd144 fd_cpm22.img d_cpm22/u1/*.* 1:
cpmcp -f wbw_fd144 fd_cpm22.img ../../Binary/Apps/assign.com 0:
cpmcp -f wbw_fd144 fd_cpm22.img ../../Binary/Apps/fat.com 0:
cpmcp -f wbw_fd144 fd_cpm22.img ../../Binary/Apps/fdu.com 0:
cpmcp -f wbw_fd144 fd_cpm22.img ../../Binary/Apps/format.com 0:
cpmcp -f wbw_fd144 fd_cpm22.img ../../Binary/Apps/mode.com 0:
cpmcp -f wbw_fd144 fd_cpm22.img ../../Binary/Apps/osldr.com 0:
cpmcp -f wbw_fd144 fd_cpm22.img ../../Binary/Apps/rtc.com 0:
cpmcp -f wbw_fd144 fd_cpm22.img ../../Binary/Apps/survey.com 0:
cpmcp -f wbw_fd144 fd_cpm22.img ../../Binary/Apps/syscopy.com 0:
cpmcp -f wbw_fd144 fd_cpm22.img ../../Binary/Apps/sysgen.com 0:
cpmcp -f wbw_fd144 fd_cpm22.img ../../Binary/Apps/talk.com 0:
cpmcp -f wbw_fd144 fd_cpm22.img ../../Binary/Apps/timer.com 0:
cpmcp -f wbw_fd144 fd_cpm22.img ../../Binary/Apps/xm.com 0:
cpmcp -f wbw_fd144 fd_cpm22.img ../../Binary/Apps/inttest.com 0:
cpmcp -f wbw_fd144 fd_cpm22.img ../../Binary/Apps/tune.com 3:
cpmcp -f wbw_fd144 fd_cpm22.img ../../Binary/Apps/Tunes/*.* 3:
Moving image fd_cpm22.img into output directory...
          ... and so on.

Maybe I'm wrong but I checked for the system image files and I couldn't find them in the intended directory or elsewhere in the distribution package. Your previous version of the Build script created them in a prior step after the Clean script; this step is missing in the new version. This looks like an easy fix.

Cheers, JL.

El martes, 11 de febrero de 2020, 19:48:09 (UTC-3), Wayne Warthen escribió:

Wayne Warthen

unread,
Feb 12, 2020, 6:10:48 PM2/12/20
to RC2014-Z80
Great news about PowerShell 2.0.  Thank you for confirming that is fixed.

I am perplexed by the new error though.  It does not look like anything related to PowerShell and, as you say, the file it wants "should" be there.

Can you confirm that you ran the "BuildShared.cmd" script from the Source directory prior to trying to build images?  The BuildShared.cmd script is what would create the file that seems to be missing.

I pulled a completely fresh copy of the source from GitHub.  The missing file seems to be created for me and the images creation is running without error.

Just to be sure we are doing the same thing, can you change directory to the Source directory, then run "BuildShared" followed by "BuildImages"?

Thanks,

Wayne

positron (Jose L. Collado)

unread,
Feb 13, 2020, 7:54:00 PM2/13/20
to RC2014-Z80
Hi Wayne, started over as you requested from the Source dir running BuildShared and then BuildImages (under the same PowerShell 2.0 platform) and now everything went ok, no errors. I must have messed up execution order (I also ran the BuildROM script) in my previous attempt.
Thanks and regards, JL.

Wayne Warthen

unread,
Feb 13, 2020, 8:05:04 PM2/13/20
to RC2014-Z80
Glad to hear it Jose.  Unfortunately, it is too easy to miss a step.  I need to think about that.

-Wayne
Reply all
Reply to author
Forward
0 new messages