VOGONS

Common searches


DirectSerial patch

Topic actions

Reply 160 of 353, by h-a-l-9000

User metadata
Rank DOSBox Author
Rank
DOSBox Author

Only one patch file needed. Try this one.

(Apart from hopefully fixing the Linux errors it also allows the Windows directserial to use COM10+ and custom serial port device names)

Edit: remove "old" patch file

Last edited by h-a-l-9000 on 2006-09-10, 16:51. Edited 1 time in total.

Reply 161 of 353, by Pan

User metadata
Rank Newbie
Rank
Newbie

Thanks for the changes. This diff unfortunately also generates compile-time errors.

It's a bit longer this time.

hardware/serialport/libserial.a(serialport.o): In function `SERIALPORTS':
/tmp/dosbox/dosbox-cvs20060909/src/hardware/serialport/serialport.cpp:1138: unde fined reference to `CNullModem::CNullModem(unsigned int, CommandLine*)'
hardware/serialport/libserial.a(softmodem.o): In function `CSerialModem::EnterId leState()':
/tmp/dosbox/dosbox-cvs20060909/src/hardware/serialport/softmodem.cpp:246: undefi ned reference to `TCPClientSocket::~TCPClientSocket()'
/tmp/dosbox/dosbox-cvs20060909/src/hardware/serialport/softmodem.cpp:251: undefi ned reference to `TCPClientSocket::~TCPClientSocket()'
/tmp/dosbox/dosbox-cvs20060909/src/hardware/serialport/softmodem.cpp:257: undefi ned reference to `TCPClientSocket::~TCPClientSocket()'
/tmp/dosbox/dosbox-cvs20060909/src/hardware/serialport/softmodem.cpp:256: undefi ned reference to `TCPServerSocket::Accept()'
/tmp/dosbox/dosbox-cvs20060909/src/hardware/serialport/softmodem.cpp:260: undefi ned reference to `TCPServerSocket::TCPServerSocket(unsigned short)'
/tmp/dosbox/dosbox-cvs20060909/src/hardware/serialport/softmodem.cpp:263: undefi ned reference to `TCPServerSocket::~TCPServerSocket()'
hardware/serialport/libserial.a(softmodem.o): In function `CSerialModem::Reset() ':
/tmp/dosbox/dosbox-cvs20060909/src/hardware/serialport/softmodem.cpp:221: undefi ned reference to `TCPClientSocket::~TCPClientSocket()'
hardware/serialport/libserial.a(softmodem.o): In function `~CSerialModem':
/tmp/dosbox/dosbox-cvs20060909/src/hardware/serialport/softmodem.cpp:67: undefin ed reference to `TCPServerSocket::~TCPServerSocket()'
/tmp/dosbox/dosbox-cvs20060909/src/hardware/serialport/softmodem.cpp:68: undefin ed reference to `TCPClientSocket::~TCPClientSocket()'
/tmp/dosbox/dosbox-cvs20060909/src/hardware/serialport/softmodem.cpp:69: undefin ed reference to `TCPClientSocket::~TCPClientSocket()'
/tmp/dosbox/dosbox-cvs20060909/src/hardware/serialport/softmodem.cpp:67: undefin ed reference to `TCPServerSocket::~TCPServerSocket()'
/tmp/dosbox/dosbox-cvs20060909/src/hardware/serialport/softmodem.cpp:68: undefin ed reference to `TCPClientSocket::~TCPClientSocket()'
/tmp/dosbox/dosbox-cvs20060909/src/hardware/serialport/softmodem.cpp:69: undefin ed reference to `TCPClientSocket::~TCPClientSocket()'
/tmp/dosbox/dosbox-cvs20060909/src/hardware/serialport/softmodem.cpp:67: undefin ed reference to `TCPServerSocket::~TCPServerSocket()'
/tmp/dosbox/dosbox-cvs20060909/src/hardware/serialport/softmodem.cpp:68: undefin ed reference to `TCPClientSocket::~TCPClientSocket()'
/tmp/dosbox/dosbox-cvs20060909/src/hardware/serialport/softmodem.cpp:69: undefin ed reference to `TCPClientSocket::~TCPClientSocket()'
hardware/serialport/libserial.a(softmodem.o): In function `CSerialModem::EnterCo nnectedState()':
/tmp/dosbox/dosbox-cvs20060909/src/hardware/serialport/softmodem.cpp:280: undefi ned reference to `TCPServerSocket::~TCPServerSocket()'
hardware/serialport/libserial.a(softmodem.o): In function `CSerialModem::Dial(ch ar*)':
/tmp/dosbox/dosbox-cvs20060909/src/hardware/serialport/softmodem.cpp:177: undefi ned reference to `TCPClientSocket::TCPClientSocket(char const*, unsigned short)'
/tmp/dosbox/dosbox-cvs20060909/src/hardware/serialport/softmodem.cpp:179: undefi ned reference to `TCPClientSocket::~TCPClientSocket()'
hardware/serialport/libserial.a(softmodem.o): In function `CSerialModem::Timer2( )':
/tmp/dosbox/dosbox-cvs20060909/src/hardware/serialport/softmodem.cpp:687: undefi ned reference to `TCPClientSocket::ReceiveArray(unsigned char*, unsigned int*)'
/tmp/dosbox/dosbox-cvs20060909/src/hardware/serialport/softmodem.cpp:680: undefi ned reference to `TCPClientSocket::SendArray(unsigned char*, unsigned int)'
/tmp/dosbox/dosbox-cvs20060909/src/hardware/serialport/softmodem.cpp:700: undefi ned reference to `TCPServerSocket::Accept()'
collect2: ld returned 1 exit status
make[3]: *** [dosbox] Error 1

Commenting out the previous line you mentioned makes no difference here either.

Thanks

Reply 162 of 353, by Qbix

User metadata
Rank DOSBox Author
Rank
DOSBox Author

I think hal forgot to update the Makefile.am in src/hardware/serialport/
(just add the missing files to the list in there.)

Water flows down the stream
How to ask questions the smart way!

Reply 163 of 353, by Pan

User metadata
Rank Newbie
Rank
Newbie

Good call on that one. I'll know how to fix those type of errors in future 😀

Now it fails trying to find a header file that obviously isn't accessible from this location. It seems my system doesn't have that file installed anywhere presently. I do have nearly all of the SDL and SDL-dev packages installed (On Debian).

misc_util.cpp:2:17: error: sdl.h: No such file or directory
make[4]: *** [misc_util.o] Error 1

Any ideas on this one?

Thanks

Reply 164 of 353, by h-a-l-9000

User metadata
Rank DOSBox Author
Rank
DOSBox Author

I wonder if Dosbox could be compiled on Knoppix...

Edit: Didn't see your latest message so far.

Last edited by h-a-l-9000 on 2006-09-10, 16:49. Edited 1 time in total.

Reply 165 of 353, by DosFreak

User metadata
Rank l33t++
Rank
l33t++

Hal, you should check out MS VPC or Vmware Server. (Highly recommended to use Vmware if your going to use Linux....or anything else really).

I see no reason why DosBox wouldn't compile in Knoppix. Even if the proper tools like GCC aren't installed you can still install them anyway assuming you have enough RAM or another mount point.

How To Ask Questions The Smart Way
Make your games work offline

Reply 166 of 353, by h-a-l-9000

User metadata
Rank DOSBox Author
Rank
DOSBox Author

sdl.h actually isn't needed at that place. It's a leftover. I wonder what errors come up now 😉

@DosFreak: Sounds like hard work 🤣

Attachments

  • Filename
    nullmodem6.diff
    File size
    144.36 KiB
    Downloads
    72 downloads
    File license
    Fair use/fair dealing exception

Reply 168 of 353, by Pan

User metadata
Rank Newbie
Rank
Newbie

It doesn't matter anyway, diff6 compiles perfectly now 😀 I just gave the nullmodem code a try too and it works well in dosbox for what I had planned for it. So all's good on that front 😀

I personally use Qemu for OS virtualisation. It's not as good as Vmware performance-wise, but it's open-source and therefore less fiddly to get working. In my case, it's easier to install too since somebody at Debian packages it 😀 I find it quite reasonable to use though and could recommend it.

Thanks for your help anyway. I'll include this patch along with the JF2 one in a i386 Linux Dosbox build if I can find somewhere to store it 😀

Reply 169 of 353, by Banzai

User metadata
Rank Newbie
Rank
Newbie

HAL:

My initial tests show that so far, all of the programs I've tested run correctly under DOSBox! All (or almost all) of these fail to run under either VMWARE or VirtualPC! (Well, they would run, but the serial I/O was totally screwed).

This last patch has made migration away from 'real' 486 hardware possible, so now we can retire the rest of our DOS machines (and say good riddance to the DOS networking kludge we were forced to use).

We still get some overrun errors, but they don't seem to affect application program operation (I'll try to come up with something specific in a later post). Also, we have to use serial ports that have a real UART behind them; USB-based RS232 ports don't work, although that's not really a problem).

BTW-- You might consider deleting the part in code that selects one of the 'standard' baud rates. I removed this, just using the baud rate calculation and it works great (our applications use some really bizarre baud rates).

Also, have you considered possibly using a method to trap serial events that does not require polling? I think that would improve performance on slower machines.

Anyways, thanks so much for the work you've done. You came through when the 'commercial' guys fell flat on their asses!
😁 😁 😁

Reply 171 of 353, by h-a-l-9000

User metadata
Rank DOSBox Author
Rank
DOSBox Author

Thanks for the flowers 😀

> We still get some overrun errors
You could try if the file
http://home.arcor.de/h-a-l-9000/test/dosbox_sertest2.zip
with "serial1=directserial realport:comx rxdelay:20"
gets rid of these errors. (it waits up to 20 milliseconds before causing the overrun error, works good for nullmodem games, may help directserial apps too)

> USB-based RS232 ports don't work
May depend on the price of the adaptor too...

> You might consider deleting the part in code that selects one of the 'standard' baud rates.
That thing has a bug. Fixed it but I'll keep that code in some way as a template for other platforms that maybe don't support nonstandard baudrates.

> method to trap serial events that does not require polling?
I'm happy it works good so far 😉

Reply 172 of 353, by h-a-l-9000

User metadata
Rank DOSBox Author
Rank
DOSBox Author

I hope this will be finished at some point 🤣

Changes (those I remember):
serial port:
- simplify interruptism

directserial win32:
- add the rxdelay parameter
- allow for COM10 as well as nonstandard serial port names
- allow custom baud rates like 23040bps: they will be passed to the driver (which might or might not support them)

directserial posix:
new implementation of posix passthrough.
It is quite more complete than the patch on sourceforge and works on Linux.
Don't know if it works on mac or others too.

serial1=directserial realport:ttyS0
serial1=directserial realport:ttyUSB0

I haven't managed to install sdl_net on Linux so the modem part of the patch is untested (but nothing changed there).

Windows test build is here.
http://home.arcor.de/h-a-l-9000/test/dosbox_sertest4.zip

Attachments

  • Filename
    nullmodem7.diff
    File size
    165.56 KiB
    Downloads
    70 downloads
    File comment
    Source
    File license
    Fair use/fair dealing exception

Reply 175 of 353, by h-a-l-9000

User metadata
Rank DOSBox Author
Rank
DOSBox Author

The most interesting question is probably wether it compiles with SDL_net.
I hope the modem and nullmodem will work like they do on win32 (yeah maybe that's naive).

1+1=10

Reply 176 of 353, by Pan

User metadata
Rank Newbie
Rank
Newbie

Has the nullmodem code changed since nullmodem6.diff? It worked fine for the game I tried it on then.

Not sure about the modem, but I can test it if you want 😀 Is it the virtual implementation? The original Dosbox implementation for the game I was trying didn't work, but I might be able to try another game with it.

Compilation is easy. I'll give it a try along with testing the stuff above 😀

Reply 177 of 353, by h-a-l-9000

User metadata
Rank DOSBox Author
Rank
DOSBox Author

> Has the nullmodem code changed since nullmodem6.diff?
Well I think it didn't 😉

Nullmodem makes connections without parsing "telephone numbers"
Modem uses tel. numbers to connect

Modem is only needed if the game does not support already connected/nullmodem/serial link. With nullmodem you don't have to squeeze IP-addresses into the games input field.

1+1=10

Reply 178 of 353, by Pan

User metadata
Rank Newbie
Rank
Newbie

It's a bit confusing now, but are you talking about the direct serial/modem element or the virtual one? 😀

I don't know about the direct one, but the virtual modem and serial connections seem to work fine. We fixed the problems with the serial connection before while I was trying to get F1GP going, and although the modem emulation does not work on the same game, I fired up OMF and it seems to work fine with the modem code.

Haven't got around to compiling nullmodem7 yet, but I know nullmodem6 compiled fine 😀

Reply 179 of 353, by h-a-l-9000

User metadata
Rank DOSBox Author
Rank
DOSBox Author

> are you talking about the direct serial/modem element or the virtual one?

The modem I talk about here is the virtual one. Connecting a real modem to your computer to use it with Dosbox is a really special case for commercial equipment imo.

1+1=10