With the attached patch DOSBox will support BREAK over nullmodem or modem (telnet) connections.

Tested with msKermit 3.15 connecting to the HP3000 emulator
(Alt-B, Ctrl-] L )

The DOS HP Terminal Program (Manual 24597-90002 Nov 1988) worked (Shift-Break)
as did HP AdvanceLink 2392 ~1986. (Alt-F1)

Using DOSBox

serial1 nullmodem server:127.0.0.1 port:1054

rather than

serial1 modem
and connecting with the Hayes style command.
ATD 127.0.0.1 port:1054

seemed to be more stable.
diff --git a/src/hardware/serialport/nullmodem.cpp 
b/src/hardware/serialport/nullmodem.cpp
index 2865073..396bf2e 100644
--- a/src/hardware/serialport/nullmodem.cpp
+++ b/src/hardware/serialport/nullmodem.cpp
@@ -177,8 +177,8 @@ Bits CNullModem::readChar() {
                // get the next char
                Bits rxchar = clientsocket->GetcharNonBlock();
                if (rxchar==0xff) return rxchar; // 0xff 0xff -> 0xff was meant
-               rxchar&0x1? setCTS(true) : setCTS(false);
-               rxchar&0x2? setDSR(true) : setDSR(false);
+               setCTS((rxchar&0x1) != 0);
+               setDSR((rxchar&0x2) != 0);
                if (rxchar&0x4) receiveByteEx(0x0,0x10);
                return -1;      // no "payload" received
        } else return rxchar;
@@ -561,8 +561,16 @@ Bits CNullModem::TelnetEmulation(Bit8u data) {
 /* setBreak(val) switches break on or off                                   **/
 /*****************************************************************************/
 
-void CNullModem::setBreak (bool /*value*/) {
-       CNullModem::setRTSDTR(getRTS(), getDTR());
+void CNullModem::setBreak (bool value) {
+       if (!clientsocket)
+           CNullModem::setRTSDTR(getRTS(), getDTR());
+       else if (value) {
+           Bit8u response[2];
+
+           response[0]=0xff;   /* IAC */
+           response[1]=243;    /* BREAK: NVT character BRK */
+           clientsocket->SendArray(response, 2);
+       }
 }
 
 /*****************************************************************************/
diff --git a/src/hardware/serialport/softmodem.cpp 
b/src/hardware/serialport/softmodem.cpp
index d135b8f..34d81a1 100644
--- a/src/hardware/serialport/softmodem.cpp
+++ b/src/hardware/serialport/softmodem.cpp
@@ -796,8 +796,17 @@ void CSerialModem::updateMSR() {
        // think it is not needed
 }
 
-void CSerialModem::setBreak(bool) {
+void CSerialModem::setBreak(bool value) {
        // TODO: handle this
+       if (!clientsocket)
+           ;   // TODO: handle this
+       else if (value) {
+           Bit8u response[2];
+
+           response[0]=0xff;   /* IAC */
+           response[1]=243;    /* BREAK: NVT character BRK */
+           clientsocket->SendArray(response, 2);
+       }
 }
 
 void CSerialModem::setRTSDTR(bool rts, bool dtr) {
_______________________________________________
Simh mailing list
[email protected]
http://mailman.trailing-edge.com/mailman/listinfo/simh

Reply via email to