RomWBW on RC2014 Z80 system/SC126 with SC104 Dual Serial SIO/2 Module - Bad INT Report

146 views
Skip to first unread message

Jim McGinnis

unread,
Feb 2, 2020, 12:05:35 PM2/2/20
to retro...@googlegroups.com
Greetings!

I have been using KERMIT-80 V4.11 and C-Kermit 9.0.302 on Linux/Raspbian to send and receive files on various platforms including Altairduino and RC2014 Z80 platforms.
My difficulty arises when I try to use COM2: or COM3:

I receive the following report when the first character is received by the RC2014 system when IOBYTE ports are mapped to COM2:
"+++ BAD INT 00H: @0507[0044:0286:710D:0500:FEF4:EC20:11BC]"

I figure I am not configuring the build (RomWBW) correctly - missed a flag or switch or something during the re-build.


I can send data out of COM2:
But the first character the arrives on COM2: results in the BAD INT panic/report.

Any thoughts before I get dirty in debugging and code scanning???

I might add that the SC126 populated with the SC104 DUal Serial SIO/2 Module behaves the same when trying to use the added com ports.

I am failly sure this is something I missed.

Thanks

Jim


Here are some testing cases that are being used to drive the question above...
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

///////////////////////////////////////////////////////////////////////
RC2014 BOOT SNIPPETS
///////////////////////////////////////////////////////////////////////

RetroBrew HBIOS v2.9.2-pre.25, 2020-01-14

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
SIO2: IO=0x84 SIO MODE=115200,8,N,1
SIO3: IO=0x86 SIO MODE=115200,8,N,1

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      SIO2:       RS-232            115200,8,N,1
Char 3      SIO3:       RS-232            115200,8,N,1

RC2014 Boot Loader...

...CBIOS v2.9.2-pre.25 [WBW]


+++++++++++++++++++++++++++++++++++++++++++++
Hardware Modules Detected:
SIO0: and SIO1: RC2014 Dual Serial SIO/2 module.
SIO2: and SIO3: SC104 v1.0 Z80 SIO/2 module
+++++++++++++++++++++++++++++++++++++++++++++


>stat val:
Temp R/O Disk: d:=R/O
Set Indicator: d:filename.typ $R/O $R/W $SYS $DIR
Disk Status  : DSK: d:DSK:
User Status  : USR:
Iobyte Assign:
CON: = TTY: CRT: BAT: UC1:
RDR: = TTY: PTR: UR1: UR2:
PUN: = TTY: PTP: UP1: UP2:
LST: = TTY: CRT: LPT: UL1:


>stat dev:
CON: is TTY:
RDR: is PTR:
PUN: is PTP:
LST: is LPT:

+++++++++++++++++++++++++++++++++++++++++++++++++
NOTE: For all testing, the Baud Clock is set to 19,200
+++++++++++++++++++++++++++++++++++++++++++++++++

Info from Wayne indicates the following physical mappings...

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





==================================================================
TEST1 - SUCCESSFUL
Demo KERMIT-80 using COM1: (distant C-Kermit in SERVER mode)
==================================================================
// We can try UC1: or PTR: to map to COM1:
// Try UC1 first...

Kermit-80 v4.11 configured for Generic CP/M-80 with Generic (Dumb) CRT Terminal type selected...

Kermit-80   0C:>SET PARITY NONE
Kermit-80   0C:>SET FLOW OFF
Kermit-80   0C:>SET PORT UC1
Kermit-80   0C:>
Kermit-80   0C:>REMOTE DIRECTORY
<<DIRECTORY ./*>>
-rw-r--r--        56  2020-01-08 20:29:57  %%disk.
-rw-r--r--        56  2020-01-08 20:27:19  %%disk..~1~
-rw-r--r--      6578  2019-10-23 15:50:47  ASCII.H
-rw-------       315  2019-12-13 17:52:01  CLS.ASM
-rw-------      3968  2019-12-15 17:16:46  CREF80.COM
-rw-r--r--      4864  2009-10-30 18:57:20  DDT.COM
<<SNIP>>


// Try PTR next...

Kermit-80   0C:>set port ptr
Kermit-80   0C:>REMOTE HELP
<<REMOTE HELP>>
C-Kermit C-Kermit 9.0.302 OPEN SOURCE:, 20 Aug 2011, Linux

Client Command     Status        Description
 GET                Enabled       Transfer file(s) from server to client.
 SEND               Enabled       Transfer file(s) from client to server.
 MAIL               Enabled       Send file(s) as e-mail.
 REMOTE ASSIGN      Enabled       Assign value to server variable or macro.
 REMOTE CD          Enabled       Change server's directory.
 REMOTE COPY        Enabled       Copy a file on the server.
 REMOTE DELETE      Enabled       Delete a file on the server.
<<SNIP>>



==================================================================
TEST2 - FAILS

Attempt to use STAT to map RDR:->UR1: and PUN:->UP1: 
UR1: and UP1: are physically mapped by RomWBW to COM2:

Kermit configured to use PORT UR1, which implicates UR1: and UP1:
as rx and tx.

RomWBW physically maps UR1: and UP1: to COM2:
==================================================================

C>stat rdr:=ur1:
C>stat pun:=up1:
C>kermit
Kermit-80 v4.11 configured for Generic CP/M-80 with Generic (Dumb) CRT Terminal type selected

For help, type ? at any point in a command
Kermit-80   0C:>SET PARITY NONE
Kermit-80   0C:>SET FLOW OFF
Kermit-80   0C:>SET PORT UC1
Kermit-80   0C:>
Kermit-80   0C:>set port ur1
Kermit-80   0C:>rem dir help
+ Ip% @-#Y1D

+++ BAD INT 00H: @0507[0044:0286:710D:0500:FEF4:EC20:11BC]

+++ BAD INT 00H: @0507[0044:0286:710D:0500:FEF4:EC20:11BC]

+++ BAD INT 00H: @0507[0044:0286:710D:0500:FEF4:EC20:11BC]

+++ BAD INT 00H: @0507[0044:0286:710D:0500:FEF4:EC20:11BC]

+++ BAD INT 00H: @0507[0044:0286:710D:0500:FEF4:EC20:11BC]


// The SERVER received the REMOTE command and tried to send data
// back to KERMIT-80.


==================================================================
TEST3 - SUCCESSFUL
Attempt to use PIP to send plain text via UP1: (PUN:) to a term
UP1: is mapped to COM2: by RomWBW
==================================================================

Connect far end to Tera Term on RC2014 COM2: port

C> PIP PUN:=TESTFILE.TXT

Output appears on TT and ALSO on Local Console port.



==================================================================
TEST4 - UNSUCCESSFUL
Attempt to use KERMIT to receive plain text from UR1: (RDR:)
UR1: is mapped to COM2: by RomWBW
==================================================================

C>stat rdr:=ur1:
C>stat pun:=up1:
C>kermit
Kermit-80 v4.11 configured for Generic CP/M-80 with Generic (Dumb) CRT Terminal type selected

For help, type ? at any point in a command
Kermit-80   0C:>SET PARITY NONE
Kermit-80   0C:>SET FLOW OFF
Kermit-80   0C:>SET PORT UC1
Kermit-80   0C:>
Kermit-80   0C:>set port ur1
Kermit-80   0C:>CONNECT

// After the first character is sent from the distant TT session,
// the same interrupt panic occurs.

+++ BAD INT 00H: @0507[0044:0286:710D:0500:FEF4:EC20:11BC]

+++ BAD INT 00H: @0507[0044:0286:710D:0500:FEF4:EC20:11BC]

+++ BAD INT 00H: @0507[0044:0286:710D:0500:FEF4:EC20:11BC]

+++ BAD INT 00H: @0507[0044:0286:710D:0500:FEF4:EC20:11BC]



==================================================================
TEST5 - SUCCESSFUL
Attempt to use KERMIT to send plain text to UP1: (PUN:)
==================================================================

C>stat rdr:=ur1:
C>stat pun:=up1:
C>kermit
Kermit-80 v4.11 configured for Generic CP/M-80 with Generic (Dumb) CRT Terminal type selected

For help, type ? at any point in a command
Kermit-80   0C:>SET PARITY NONE
Kermit-80   0C:>SET FLOW OFF
Kermit-80   0C:>SET PORT UC1
Kermit-80   0C:>
Kermit-80   0C:>set port ur1
Kermit-80   0C:>CONNECT


All characters are sent successfully to the distant TT session.

^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Steve Cousins

unread,
Feb 2, 2020, 1:38:24 PM2/2/20
to retro-comp
Hi Jim

I think the problem may be an I/O address clash. 

The RC2014 SIO module does not fully decode the I/O address. It ignores A2. Therefore the I/O address range is 0x80 to 087 when ideally it should be 0x80 to 0x83.

SC104 SIO module does fully decode the I/O address and can be set to any 4-byte boundary. The recommended address for the second SIO module is 0x84 to 0x87 (which you have used).

So the problem is the RC2014 SIO will be correctly addressed at 0x80 to 0x83, but when RomWBW tries to access the SC104 SIO there is a clash between it and the RC2014 SIO module.

Two SC104 modules should work together without a problem.

You could alter your RomWBW to move the second SIO to an address outside the range 0x80 to 0x87, recompile, flash the chip, and hope my explanation is correct :)

Steve

Jim McGinnis

unread,
Feb 2, 2020, 1:48:24 PM2/2/20
to retro-comp
Thanks Steve!

I think I can make progress with your suggestions....

Thanks again!

Cheers
Jim


<<SNIP>>

Jim McGinnis

unread,
Feb 2, 2020, 2:07:07 PM2/2/20
to retro-comp
YES.  Once the address conflict was resolved, we are working just fine with the third and fourth serial port.

I need to either modify the RC2014 card or get a couple more SC104 cards!  ;-)

Cheers!

Jim

Jim McGinnis

unread,
Feb 2, 2020, 3:17:53 PM2/2/20
to retro...@googlegroups.com
I modified the RC2014 Dual Serial SIO/2 Card...

Wire: RC2014 Bus A2         ---> 74HCT04 (2A, Pin3)
Wire: 74HCT04 (2Y, Pin4)    ---> 74HCT138 (E3, Pin6)
Cut Trace: from 74HCT138 (E3, Pin6) to Vcc.

This forces A2 into the select logic. Works just fine.

Image below prior to Kapton tape application.
The trace cut is just about in the center of the image.



Cheers

Jim


Reply all
Reply to author
Forward
0 new messages