VOGONS

Common searches


First post, by IBM Portable PC

User metadata
Rank Newbie
Rank
Newbie

I have no trouble using a Prolific PL2303 convertor under Raspbian on a Raspberry Pi B+ with DOSBox, however I cannot read the DCD (data carrier detect) modem carrier status signal.

In Linux, statserial /dev/ttyUSB0 clearly shows me the DCD transitions, however they are not making it through to DOSBox.

Surely some multplayer games etc require DCD?

I am using DOSBox for games, however I also have a DOS program called Probe that can control my radio scanner, it works fine, except for one function that uses DCD from the scanner to indicate a signal has been received on a given frequency as the scanner scans.

On a side note, I notice the DOSBox only appears to support 5 bit bytes on com ports?

Last edited by IBM Portable PC on 2015-11-03, 00:40. Edited 1 time in total.

Reply 1 of 10, by IBM Portable PC

User metadata
Rank Newbie
Rank
Newbie

I know this refers to the 5 bit topic, however I'm wondering if changing from 5 bits only would assist in reading DCD:

"Many USB serial ports do not support a 5 bits per byte configuration however when
configuring a serial port under DOS it is fairly common practice to simply set the
serial ports LCR register to 0x80 to set the DLAB bit before setting the LCR to the
actually desired value. This patch is a hack to work around the problem with these
adapters at the cost of disabling the 9600 baud 5.N,1 configuration."
http://sourceforge.net/p/dosbox/patches/249/

Last edited by IBM Portable PC on 2015-11-01, 21:20. Edited 1 time in total.

Reply 2 of 10, by IBM Portable PC

User metadata
Rank Newbie
Rank
Newbie

I see the some people have installed a real DOS in DOSBox such as M$DOS.

Obviously this cannot change the emulated COM port hardware, however would it not bypass some of the DOSBox code that talks to the emulated hardware?

Then the question is which DOS? PCDOS, DRDOS, FREEDOS? Perhaps one was better suited to software which relied on COM ports, such as BBS's?

Reply 3 of 10, by IBM Portable PC

User metadata
Rank Newbie
Rank
Newbie

I have now tried adjusting the cycles with no change, from as low as 50 up to 3500.

I am also going to try the Megabuild fork: http://home.arcor.de/h-a-l-9000/megabuild.html

I also ran two DOS serial port tools (ports.exe and mdr.exe) and both readily found a 16550A at 2f8 / IRQ3... I wonder if the 16550A FIFO buffer is affecting DCD?

Last edited by IBM Portable PC on 2015-11-07, 10:17. Edited 2 times in total.

Reply 6 of 10, by IBM Portable PC

User metadata
Rank Newbie
Rank
Newbie
mr_bigmouth_502 wrote:

Would PCem perhaps be a better option?

Unless I'm mistaken, PCem it won't run on ARM processors, like the one in my Raspberry Pi which runs DOSBox perfectly, except for my DCD assertion detection issue...

Reply 7 of 10, by IBM Portable PC

User metadata
Rank Newbie
Rank
Newbie
Tertz wrote:

I doubt this will help, but you may also try vDos as another build where people worked with compatibility.

I believe that VDos is for Windows only I.e. It won't run on my Rasperry Pi which I'm using for DOSBox.

https://www.vdos.info

Reply 8 of 10, by Tertz

User metadata
Rank Oldbie
Rank
Oldbie
IBM Portable PC wrote:

It won't run on my Rasperry Pi which I'm using for DOSBox.

VDos is open sourced and has port to OSX. Maybe there is or may be done a port for your case.

DOSBox CPU Benchmark
Yamaha YMF7x4 Guide

Reply 9 of 10, by IBM Portable PC

User metadata
Rank Newbie
Rank
Newbie

Well, I've been back on this issue and decided to take a look at the serial port code. I am not into C (yet) however, I can see that the DCD bit of the emulated 16550UART is at least considered,.. however it does not work for me.

/*****************************************************************************/
/* Modem Status Register (r) **/
/*****************************************************************************/
// Contains status of the control input lines (CD, RI, DSR, CTS) and
// their "deltas": if level changed since last read delta = 1.
// modified by:
// - real values
// - write operation to MCR in loopback mode
Bitu CSerial::Read_MSR () {
Bit8u retval=0;

if (loopback) {

if (rts) retval |= MSR_CTS_MASK;
if (dtr) retval |= MSR_DSR_MASK;
if (op1) retval |= MSR_RI_MASK;
if (op2) retval |= MSR_CD_MASK;

} else {

updateMSR();
if (cd) retval |= MSR_CD_MASK;
if (ri) retval |= MSR_RI_MASK;
if (dsr) retval |= MSR_DSR_MASK;
if (cts) retval |= MSR_CTS_MASK;

}
// new delta flags
if(d_cd) retval|=MSR_dCD_MASK;
if(d_ri) retval|=MSR_dRI_MASK;
if(d_cts) retval|=MSR_dCTS_MASK;
if(d_dsr) retval|=MSR_dDSR_MASK;

d_cd = false;
d_ri = false;
d_cts = false;
d_dsr = false;

clear (MSR_PRIORITY);
return retval;
http://sourceforge.net/p/dosbox/code-0/3843/t … alport.cpp#l837

I am still considering the Megabuilds fork, however I am lead to believe that compiling on Raspbian is an issue..

Reply 10 of 10, by IBM Portable PC

User metadata
Rank Newbie
Rank
Newbie

I have just loaded Megabuild on my Mac and can report that it DOES detect CD assertions correctly! 😀

I have some sort of timing issue, however I'm yet to adjust cycles etc and if successful, then I need to compile Megabuild in Raspbian...