top of page

Herabuna USA

Public·2 members

Dosbox Configure Serial Port

Looking forward to some assistance in getting the serial ports working in DOSBox.I have set up the DOSBox config for serial ports as instructed with the following. serial1=directserial: realport:COM1 serial2=directserial: realport:COM2

Dosbox Configure Serial Port


The Lauer Software is adjusting the serial port like following:1313914:54:15DOSBox.exeIOCTL_SERIAL_SET_BAUD_RATESerial0SUCCESSRate: 384001314014:54:15DOSBox.exeIOCTL_SERIAL_CLR_RTSSerial0SUCCESS1314114:54:15DOSBox.exeIOCTL_SERIAL_CLR_DTRSerial0SUCCESS1314214:54:15DOSBox.exeIOCTL_SERIAL_SET_LINE_CONTROLSerial0SUCCESSStopBits: 1 Parity: EVEN WordLength: 8

After a while the serial port is set back to following:1960314:54:23DOSBox.exeIOCTL_SERIAL_SET_BAUD_RATESerial0SUCCESSRate: 96001960414:54:23DOSBox.exeIOCTL_SERIAL_CLR_RTSSerial0SUCCESS1960514:54:23DOSBox.exeIOCTL_SERIAL_CLR_DTRSerial0SUCCESS1960614:54:23DOSBox.exeIOCTL_SERIAL_SET_LINE_CONTROLSerial0SUCCESSStopBits: 1 Parity: EVEN WordLength: 8

Many USB serial ports do not support a 5 bits per byte configuration however whenconfiguring a serial port under DOS it is fairly common practice to simply set theserial ports LCR register to 0x80 to set the DLAB bit before setting the LCR to theactually desired value. This patch is a hack to work around the problem with theseadapters at the cost of disabling the 9600 baud 5.N,1 configuration.

Many USB serial ports do not support a 5 bits per byte configurationhowever whenconfiguring a serial port under DOS it is fairly common practice to simplyset theserial ports LCR register to 0x80 to set the DLAB bit before setting theLCR to theactually desired value. This patch is a hack to work around the problemwith theseadapters at the cost of disabling the 9600 baud 5.N,1 configuration.

Thank you for this Thomas, I definately am still interetsted in this but I couldn't get it to work. I am trying to get a old DOS program to talk to a hardware device using either 1200 or 2400 baud 8 N 1. Using my Dell Latitude laptop with a docking station that has a physical serial port as COM 1. I can sucessfully run the program using DOSBox and communicate to the device every time under both Windows 7 and Windows 10 using that physical COM port. However I am trying to get a USB -> Serial adapter working. The adapter is setup as COM 2 and using HyperTerminal the adapter works fine. But in DOSBox it does not communicate. I see both serial ports open on startup:

Yeah, I've had no luck with this patch either trying to get a old program that runs on 2400, 8, N, 1 working with multiple different USB adapters. I have a Dell Latitude with a Legacy Port Expander that provides a actual COM1 serial port (9 pin) and the program does work using DOSBOX through that, just not any USB adapters. However Dell like everyone else is getting away from legacy ports so its only a matter of time before thats not a option either.

ok dug down deep into all my archives to find a W2K Pro SP4 install (probably could have used XP too but 2k is far less relliant on ms ... using the free VMWare Player, W2K can be installed and runs most dos programs VMware allows adding h/w links plus has drag drop features that still work in 2k ... all round solution .... took all of 30minutes of default settings to install and get xtalk mk4 back up and running with a USB serial port .. there are some easy to follow youtube sessions on how to install win 2k in vmware plus if you look hard enough there are still W2K Iso files out there for download

Today I attempted to compile the current svn (r4225) using Visual Studio 2019 (using these instructions) and add the above patch in. To say it was a PITA is a understatment but thankfully years of VB development left me at least slightly prepared. I had to recompile fresh versions of SDL, curses, zlib, and libpng all using VS 2019. After lots of trail and error I got it to compile and now have a up-to-date DOSBox executable with this patch built in. However, for me, it didn't fix anything. I no longer get all the "desired serial port settings not supported" or "buffer overrun" errors but I also still don't get actual communication.

As many users have problems setting up directserial/modem connections, here's a short guide to getting Dosbox talk to the outside world. Since directserial/modem support is still being updated regularly, you need a recent CVS, links can be found in the Dosbox Development Forum (For the most recent Windows binaries see this page).

Only the settings of the first paragraph are really needed. The second paragraph specifies phonenumbers to be used with programs that don't support dots in between numbers. Which brings me to the next point: setting up a connection. On a second computer (or with a second instance of Dosbox, for testing) the same configuration is used. Start dosbox and the game you want to use the modem with (one side has to be configured for answering, the other dials). The number dialed should be the full IP address of the computer to which you want to connect (with dots). If it is not possible to dial such an address, you have to specify the address in the phone list (second paragraph of [serial] config) and simply dial x (where x is the number in the phonelist, eg 1 for phone1).

Ok, so much about modems. Directserial is a lot easier, as in most cases there's not much to be set up. The following configuration can be used to set up a directserial connection to the real COM1 of your computer (realport) which shows up in Dosbox as COM1 (ie serial1).

1)Check every line of dosbox.conf in the [serial] section. Small errors can be disastrous...If the modem is correctly set up, the dosbox console should have a line "MODEM: Port listener installed at port 23" in it on startup. For directserial, the corresponding line is "Serialport at xxx: Opening COMx"

Also, if the modem is initialized or dialing starts, there should be corresponding output on the console. If this is missing, either the modem is not correctly configured or the game/app is not yet supported.2)Check your firewall setup. Is Dosbox blocked? Are the modem ports blocked?3)Set core=normal, some games/apps have still problems with the dynamic core4)Make sure the com port isn't used my something else.5)Increase or decrease cycles.

There is a trick with games that don't like the modem and support direct serial connection. Use a modem terminal software to establish the connection, then tell the terminal to go to command line and run your game pretending to have a direct serial cable connection. It sometimes works.

The serial ports can be changed at runtime - type i.e.serial1 modemat the Dosbox command prompt to change to modem. Useful if you started Dosbox and realized that your conf has no modem set ?

I'm not at that work computer now but I brought the cable home to try on my PC at home. It's running XP and does have physical serial ports, Com1 & Com2. I installed the drive for the USB to Serial cable and it lists it in Windows Device Manager as being Com3. When trying your suggestion it only comes back with information for Com1 & Com2. Nothing about Com3 at all. Any ideas?

Try with a real (non-USB) serial port, could be it works then. Certain USB/serial cables have driver incompatibilities. If it still doesn't work try a CVS build or the one from my homepage, there have been some improvements since 0.72.There is also a chance it won't work at all...

So even though I'm using a USB to serial cable hooked to a modem the setting should use directserial instead of modem? If that is the case it brings me back to my original question of how to found out the USB port number and how to enter it exactly in the config file or even if that will work? And am I right in thinking that although device manager says it's on Com1 that is NOT the realport that I would enter into the config file?

I will try it on the real com port on my XP machine because I suppose I could buy a serial PCI card and put it in the PC to add the real serial ports. I spent $40 on this cable though so if at all possible I'd like to be able to use it.

I'm new to dosbox. I am trying some old program to work with dosbox. These one all use serial port (which can be changed inside the program but I didn't) and are made with old dos style (using int14) and they work on win32 (but not on win64 of course).I browsed the forum with no success (many old topics discorded).I want to use them in a new environment : ubuntu 18.04. But all my attempts are failed so I have some questions :Does serial port works on dosbox with Ubuntu ? I specify that I wrote in /dosbox-0.74.conf : serial1=directserial realport:ttyS0serial2=disabledserial3=disabledserial4=disabledI did also 'sudo adduser dialout' I monitored serial interface and nothing is going out.

DOSBox version 0.74Copyright 2002-2010 DOSBox Team, published under GNU GPL.---CONFIG:Loading primary settings from config file /home/panel/.dosbox/dosbox-0.74.confMIXER:Got different values from SDL: freq 44100, blocksize 512ALSA:Can't subscribe to MIDI port (65:0) nor (17:0)MIDI:Opened device:noneDOS keyboard layout loaded with main language code FR for layout fr 350c69d7ab