VOGONS

Common searches


First post, by blava

User metadata
Rank Newbie
Rank
Newbie

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.

--- 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);
}