joncampbell123 / dosbox-x

DOSBox-X fork of the DOSBox project
GNU General Public License v2.0
2.83k stars 383 forks source link

problems with USB serial ports... #3624

Open AnotherMikeOnGitHub opened 2 years ago

AnotherMikeOnGitHub commented 2 years ago

Question

I have a multisite embedded process system that I have to support...
At some sites a proprietary program (that runs under MSDOS 6.22) communicates serially to an 8051 based embedded system. At other sites a different proprietary program (that runs under MSDOS 6.22) communicates serially to a 68HC11 based embedded system. The proprietary programs can access com1 to com4.

The desktop development system is 64 bit Win7. It has two hardware serial ports Com1 and Com2. 64 bit SLD1 Ver 0.84.0

The following works on the desktop hardware ports... It took a lot of research to find out what the real hardware IRQs are and then to find out how to convince DOSbox-x to use them - but they are now correct and working...

z:>serial com1: directserial realport:com1 IRQ:4 com2: directserial realport:com2 IRQ:3

I can connect a serial cable from either hardware com1 or com2 to either the embedded system and all works fine as long as I swap COM port numbers in the proprietary programs. Everything works as it should.

The deployed sites (2 currently, eventually 8) are 32 bit Win7 DOXbox-x 32 bit SLD1 Ver 0.83.22 on site

I have a test "deployed site" sitting next to the development system: A Win7 laptop with the 32bit DOSbox-x as mentioned above and one each of the 8051 and 68HC11 based embedded systems connected to USB serial port adapters that appear as Com1 and Com2.

I can connect two USB serial adapters to the 32bit deployed system and they show up as com1 and com2 using the exact same DOXbox serial commands above.

The embedded systems connected to com1 and com2 works just fine. I can swap com ports in the program and the cables and everything works as it should.

When I move one of the USB adapters that worked fine as com1 or com2 on the laptop to the desktop it shows up as com19.

This command set in the desktop development .conf file is accepted by DOSbox-x:

serial1 = directserial realport:com1 irq:4 serial2 = directserial realport:com2 irq:3 serial3 = directserial realport:com19

So the Com19 USB serial adapter SHOULD be usable as com3.

The embedded systems that work fine on hardware COM1 or com2 on the desktop or as USB COM1 or USB COM2 on the laptop does not work on com3.

What am I missing?

Maybe an extension to the serial command that interacts with Windows to get the comport parameters would make things easier? The syntax could be "serial3 = directserial USBport:com19"

Mike

Have you checked that no similar question(s) exist?

Code of Conduct & Contributing Guidelines

Torinde commented 2 years ago

The proprietary programs can access com1 to com4.

Have you tested that? Can you add a 3rd USB-COM adaptor to the laptop as COM3 and test?

AnotherMikeOnGitHub commented 2 years ago

I will do that and get back to you.