nullmodem transparent:1 output fix

Here you can discuss the development of patches.

nullmodem transparent:1 output fix

Postby blava » 2008-7-04 @ 06:39

dosbox nullmodem option always escapes 0xFF byte on output

I'm trying to get an old DOS program to talk to a perl program using a TCP socket.

DOS prog | dosbox | nullmodem | network | socket | perl prog

dosbox.conf
serial1=nullmodem port:8013 transparent:1 telnet:0

The perl prog opens a TCP socket to dosbox. Everything works fine unless the DOS prog sends 0xFF. The perl program receives two 0xFF.

The following change disables 0xFF escaping if transparent mode is true.

Works fine on Ubuntu Hardy though it should work on all platforms.

Code: Select all
--- old/src/hardware/serialport/nullmodem.cpp   2007-05-15 16:27:23.000000000 -1000
+++ new/src/hardware/serialport/nullmodem.cpp   2008-07-03 18:54:26.000000000 -1000
@@ -357,7 +357,7 @@
       setEvent(SERIAL_TX_EVENT, bytetime);
    }
    /*****************************/
-   if(val==0xff) WriteChar(0xff);
+   if (!transparent && (val==0xff)) WriteChar(0xff);
    
    WriteChar(val);
 }
blava
Newbie
 
Posts: 1
Joined: 2008-7-04 @ 05:59

Re: nullmodem transparent:1 output fix

Postby h-a-l-9000 » 2008-7-04 @ 18:35

Nice. Looks like you're the first who actually uses this :)
1+1=10
h-a-l-9000
DOSBox Author
 
Posts: 4512
Joined: 2005-2-23 @ 00:14

Re: nullmodem transparent:1 output fix

Postby Qbix » 2008-7-04 @ 20:11

*moved to patches*
Water flows down the stream
How to ask questions the smart way!
User avatar
Qbix
DOSBox Author
 
Posts: 10649
Joined: 2002-11-27 @ 14:50
Location: Fryslan


Return to DOSBox Patches

Who is online

Users browsing this forum: No registered users and 1 guest