From 421e19255936458cac325f73edf4cb7db6ad6e68 Mon Sep 17 00:00:00 2001 From: Ralf Grillenberger Date: Sat, 5 Nov 2011 17:24:01 +0000 Subject: [PATCH] Consider parity when calculating the duration of a serial frame. E-mail report by MB. Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@3756 --- src/hardware/serialport/serialport.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/hardware/serialport/serialport.cpp b/src/hardware/serialport/serialport.cpp index 7694e1ac..884038b4 100644 --- a/src/hardware/serialport/serialport.cpp +++ b/src/hardware/serialport/serialport.cpp @@ -223,7 +223,8 @@ void CSerial::changeLineProperties() { else bitlen = (1000.0f/115200.0f)*(float)baud_divider; bytetime=bitlen*(float)(1+5+1); // startbit + minimum length + stopbit bytetime+= bitlen*(float)(LCR&0x3); // databits - if(LCR&0x4) bytetime+=bitlen; // stopbit + if(LCR&0x4) bytetime+=bitlen; // 2nd stopbit + if(LCR&0x8) bytetime+=bitlen; // parity #if SERIAL_DEBUG const char* const dbgtext[]={"none","odd","none","even","none","mark","none","space"};