4 serial ports?

562 views
Skip to first unread message

Anna Christina

unread,
Jul 2, 2019, 2:20:38 PM7/2/19
to RC2014-Z80
Hi,

I would like to add a second SIO/2 card (SC104, set to address 0x84) into my RC2014, so I could use the ports for:
- VGA VT100 terminal
- WiFi modem (internal at best)
- external RS232 port for typewriter printer

Which CP/M bios does handle 3 or 4 seral ports and maps them to which devices?

As I looked through the source code of RomWBW, I only saw mentions of SIOA & SIOB.

Any suggestions of what can be done here?

Thanks a lot!

Regards,
Anna

Jay Cotton

unread,
Jul 2, 2019, 2:39:09 PM7/2/19
to RC2014-Z80
I think you can assign the punch and reader to sio 2 and 3.

As to a driver, I think you are on your own there.  um maybe.

Do you use RomWbW ?  if so there may be a solution already in place.

jc

Anna Christina

unread,
Jul 15, 2019, 4:23:38 PM7/15/19
to RC2014-Z80
Am Dienstag, 2. Juli 2019 20:39:09 UTC+2 schrieb Jay Cotton:

Hi,

sorry for the late answer...
 
I think you can assign the punch and reader to sio 2 and 3.
As to a driver, I think you are on your own there.  um maybe.
Do you use RomWbW ?  if so there may be a solution already in place.

Yes, I use RomWBW.

I tried it today by putting in the standard SIO/2 card (IO port 0x80) and a SC104 SIO/2 card jumpered
to I/O port 0x84.

But RomWBW does not recognize the 3rd and 4th serial ports.

@Wayne:
Would it be possible to add a configuration option for a second SIO/2 card?

Regards,
Anna

Alan Cox

unread,
Jul 15, 2019, 5:09:01 PM7/15/19
to rc201...@googlegroups.com
> I tried it today by putting in the standard SIO/2 card (IO port 0x80) and a SC104 SIO/2 card jumpered
> to I/O port 0x84.
>
> But RomWBW does not recognize the 3rd and 4th serial ports.

The standard RC2014 SIO card doesn't decode A2. I found that out with
Fuzix and had to add code to teach it to spot mirrored SIO ports
versus two SIO cards. That was .. fun 8) Fortunately there is one
register you can safely write cookies to and read them back - the IRQ
vector, so I use that to tell if it's two cards or one.

I don't know if ROMWBW can handle that case but Fuzix will handle a
pair of cards *providing* they are both fully decoded.

Alan

Anna Christina

unread,
Jul 16, 2019, 4:47:08 AM7/16/19
to RC2014-Z80
Am Montag, 15. Juli 2019 23:09:01 UTC+2 schrieb Alan Cox:

Hallo Alan,
 
The standard RC2014 SIO card doesn't decode A2. I found that out with
Fuzix and had to add code to teach it to spot mirrored SIO ports
versus two SIO cards. That was .. fun 8) Fortunately there is one
register you can safely write cookies to and read them back - the IRQ
vector, so I use that to tell if it's two cards or one.

I don't know if ROMWBW can handle that case but Fuzix will handle a
pair of cards *providing* they are both fully decoded.
 
Oh thanks for pointing this out! I forgot about this problem...

I have a second SC104 that I just need to solder together and then I will try that.

Thank you!

Regards,
Anna

Wayne Warthen

unread,
Jul 16, 2019, 2:22:55 PM7/16/19
to RC2014-Z80
RomWBW could be easily modified to support a second serial port.  As Alan has pointed out, you just need to find a good IO address for it.

@Alan, does Fuzix already have a secondary IO address for this purpose?

Once there is clarity on the IO port address for the secondary card, I will add the support.

-Wayne 

Anna Christina

unread,
Jul 16, 2019, 2:54:53 PM7/16/19
to RC2014-Z80
Am Dienstag, 16. Juli 2019 20:22:55 UTC+2 schrieb Wayne Warthen:

Hallo Wayne,

RomWBW could be easily modified to support a second serial port.  As Alan has pointed out, you just need to find a good IO address for it.

That's great to hear! 

Once there is clarity on the IO port address for the secondary card, I will add the support.

At least I would use the I/O ports that are suggested in Steve Cousins'  SC104 documentation:

I'll attach a screenshot of the first addresses of page 35 of the PDF.

According to that guide, the first SIO/2 is on port 0x80 (0x80-0x83) and the second one would be on 0x84 (0x84-0x87).

Thank you for your great support!

Best regards,
Anna

sc104-ports.png

Alan Cox

unread,
Jul 16, 2019, 9:34:08 PM7/16/19
to rc201...@googlegroups.com
Fuzix  checks 0x80 and 0x84 for SIO and 0xC0 upwards for 16550A

Alan

--
You received this message because you are subscribed to the Google Groups "RC2014-Z80" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rc2014-z80+...@googlegroups.com.
To post to this group, send email to rc201...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/rc2014-z80/106a99e3-00aa-4de4-87ce-6748dc08977e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Wayne Warthen

unread,
Jul 17, 2019, 1:11:06 AM7/17/19
to RC2014-Z80
I don't see how 0x84 is going to work for the secondary module if your primary SIO module is a standard one from Spencer.  The standard SIO module appears at both 0x80 and 0x84 because of the lack of decoding of A2.  If your SC104 is configured for 0x84, it will conflict with the standard SIO module.  The only way that you could use 0x80 and 0x84 is if BOTH modules were SC104 boards which fully decode the IO base address.

I can use Alan's trick to determine if 0x84 is just a mirror of 0x80, but it is definitely not reasonable to combine the standard SIO module with the SC104 at 0x84.

-Wayne

Anna Christina

unread,
Jul 17, 2019, 3:48:35 AM7/17/19
to RC2014-Z80
Am Mittwoch, 17. Juli 2019 07:11:06 UTC+2 schrieb Wayne Warthen:

Hallo Wayne,
I don't see how 0x84 is going to work for the secondary module if your primary SIO module is a standard one from Spencer.  The standard SIO module appears at both 0x80 and 0x84 because of the lack of decoding of A2.  If your SC104 is configured for 0x84, it will conflict with the standard SIO module.  The only way that you could use 0x80 and 0x84 is if BOTH modules were SC104 boards which fully decode the IO base address.

I just finished soldering a second SC104 (it just needs cleaning and testing), so that I will use 2 SC104 boards and not the standard SIO/2 board.
So that should not be a problem.
(And I guess that the ports will be configurable before compiling, right?)
 
I can use Alan's trick to determine if 0x84 is just a mirror of 0x80, but it is definitely not reasonable to combine the standard SIO module with the SC104 at 0x84.

Thank you for the warning!

Best regards,
Anna

Alan Cox

unread,
Jul 17, 2019, 8:16:29 AM7/17/19
to rc201...@googlegroups.com
> I don't see how 0x84 is going to work for the secondary module if your primary SIO module is a standard one from Spencer. The standard SIO module appears at both 0x80 and 0x84 because of the lack of decoding of A2. If your SC104 is configured for 0x84, it will conflict with the standard SIO module. The only way that you could use 0x80 and 0x84 is if BOTH modules were SC104 boards which fully decode the IO base address.
>
> I can use Alan's trick to determine if 0x84 is just a mirror of 0x80, but it is definitely not reasonable to combine the standard SIO module with the SC104 at 0x84.

The allocations I followed were people's recommended ones for SIO
placement. I would always recommend the 16550A boards over the SIO
cards anyway personally. They have bigger FIFOs, they have their own
baud rate generator for speed, and they work with faster CPU cards.

Alan

Tadeusz Pycio

unread,
Jul 17, 2019, 10:37:03 AM7/17/19
to RC2014-Z80
I am currently waiting for a packet of XR88C681, I wonder if their FIFO will work better with Z80. Maybe this is a solution for a single 16C550 channel?

Alan Cox

unread,
Jul 17, 2019, 10:57:25 AM7/17/19
to rc201...@googlegroups.com
On Wed, 17 Jul 2019 at 15:37, Tadeusz Pycio <ta...@wp.pl> wrote:
>
> I am currently waiting for a packet of XR88C681, I wonder if their FIFO will work better with Z80. Maybe this is a solution for a single 16C550 channel?

I didn't realise 2681 style devices were still obtainable. They always
used to be the part of choice in S100 SBCs and slave systems because
you got two serial ports, GPIO and an interval timer on one device -
enough to handle the I/O, banking and glue and thus to run CP/M 3 or
MP/M.

Alan

Wayne Warthen

unread,
Jul 17, 2019, 8:54:39 PM7/17/19
to RC2014-Z80
Hi Anna,

I will work on adding the support for a second SIO module at 0x84.  I may need a few days because I am a bit busy at the moment.

The base I/O port address is currently defined in the platform configuration file.  In the case of RCZ80, the file is plt_rcz80.inc.  However, when I add the support for a secondary SIO module, I may move this definition to the sio.asm file.

-Wayne

Anna Christina

unread,
Jul 18, 2019, 6:12:02 AM7/18/19
to RC2014-Z80
Am Donnerstag, 18. Juli 2019 02:54:39 UTC+2 schrieb Wayne Warthen:

Hi Wayne,

I will work on adding the support for a second SIO module at 0x84.  I may need a few days because I am a bit busy at the moment.

No problem :) 

The base I/O port address is currently defined in the platform configuration file.  In the case of RCZ80, the file is plt_rcz80.inc.  However, when I add the support for a secondary SIO module, I may move this definition to the sio.asm file.

Okay, I would have suggested to define options in RCZ80_*.asm like "SIO2ENABLE .SET TRUE" to enable searching for the 3rd and 4th serial port.
And in plt_rcz80.inc could be "SIO2BASE .SET $84" to define the port.
Would it then be possible to override SIO2BASE in e.g. RCZ80_xyz.ASM?

If I understand it correctly, then at the moment the physical "device name" for SIOA is CRT: and SIOB is TTY:, is that right?
What device names would SIOC and SIOD get? 
And what would the default logical assignments be?

Thank you very much!

Regards,
Anna

Wayne Warthen

unread,
Jul 22, 2019, 9:17:06 PM7/22/19
to RC2014-Z80
OK, I have just checked in the changes to support multiple SIO modules.  You will need to check out the files from the master branch and do your own build at this point.

Under the default configuration, SIO modules will be detected at 0x80 and 0x84, which is the standard I guess.  The detection routine will handle 1 or 2 cards automatically.  It will also protect itself from being fooled by phantom I/O ports (using Alan's trick).

Using the standard config files, you can now configure the number of modules (1 or 2), the base I/O port address for each, and the mode for each.

If you have two SIO modules, you should now see 4 SIO ports SIO0 thru SIO3 at boot.  Below is the mapping of the SIO ports to CP/M 2 devices:

SIO0:
  • TTY:
SIO1:
  • UC1:
  • PTR:
  • PTP:
SIO2:
  • UR1:
  • UP1:
SIO3:
  • UR2:
  • UP2:

The mapping of these devices to CP/M logical devices CON:, RDR:, PUN:, and LST: can be controlled by the CP/M  IOBYTE which is managed by the STAT command.

If anyone gets a chance to check this out, please let me know if it works OK for you.

Thanks,

Wayne

Anna Christina

unread,
Jul 23, 2019, 3:38:15 PM7/23/19
to RC2014-Z80
Am Dienstag, 23. Juli 2019 03:17:06 UTC+2 schrieb Wayne Warthen:

Hallo Wayne,
OK, I have just checked in the changes to support multiple SIO modules.  You will need to check out the files from the master branch and do your own build at this point.

Thank you for that quick implementation!

I finished my second SC104, now my RC2014 has 2 SC104 modules.
I compiled the latest git version of RomWBW and started the .com binary - and it detects all 4 serial ports.
Then, I ran KERMIT and issued "set port ur1" - and I could talk to my WiFi modem on the second SC104 (while the console is displayed via the first SC104).
Very cool :)

Thank you very very much!

Oh, and btw: also the driver for smbaker's WDC floppy controller, that I also finished today, works :)

The mapping of these devices to CP/M logical devices CON:, RDR:, PUN:, and LST: can be controlled by the CP/M  IOBYTE which is managed by the STAT command.

I will have a further look into this, but at the moment, at least KERMIT works via UR1:
 
If anyone gets a chance to check this out, please let me know if it works OK for you.

The first test says that it works :)
If I run into a problem, I will tell :)

Best regards,
Anna

Wayne Warthen

unread,
Jul 23, 2019, 3:40:42 PM7/23/19
to RC2014-Z80
On Tuesday, July 23, 2019 at 12:38:15 PM UTC-7, Anna Christina wrote:
The first test says that it works :)

Very happy to hear it is all working.

-Wayne 
Reply all
Reply to author
Forward
0 new messages