VOGONS


First post, by InstantWare

User metadata
Rank Newbie
Rank
Newbie

I need a real dial-in modem connection to a remote MS-DOS host.

I would like to run the client within DOSBox running @ Mac OS X 10.4.10 on a PowerBook G4 which does have an internal modem.

I have installed DOSBox 0.71 and everything runs really nice, even the client program, except that I found no way how to make the connection to the internal modem.

According to all the documents, forum entries, how-toes, wiki pages, etc. that I found, regarding the above subject, there is no built-in way to do that with DOSBox @ Mac OS X.

Finally the following approach came to my mind, and before I sit down and spent the whole weekend for the implementation, I would like to ask the experts in this forum, whether that might be feasible:

1. using the DOSBox virtual modem to create an endpoint
listening at localhost on lets say port 1234

2. writing a small proxy socket daemon in C
which listens at localhost on lets say port 4321

Upon incomming connections, this proxy daemon
shall control the internal modem, which is supposed to
dial-in to the remote MS-DOS host.

3. All communication between the virtual modem of
DOSBox and the internal modem of the PowerBook
is handled by the proxy socket daemon.

Might this work?

Any better suggestions? serial1=/dev/cu.modem does nothing.

Many thanks for any help

Best regards

Rolf

Reply 1 of 8, by h-a-l-9000

User metadata
Rank DOSBox Author
Rank
DOSBox Author

Have a look at directserial_posix.cpp - depending on how similar the serial port stuff is for linux and mac you might get it working on mac without much effort.

1+1=10

Reply 2 of 8, by MiniMax

User metadata
Rank Moderator
Rank
Moderator

Maybe you already have all the bits and pieces on your Mac to do what you want InstantWare.

If you define a service using inetd (if it is still called that these days - check if you have an /etc/inet/inetd.conf file) using port 1234 and implement the service by starting cu (with what parameters, phone-numbers, etc that is needed), then you should be half-ways there.

DOSBox 60 seconds guide | How to ask questions
_________________
Lenovo M58p | Core 2 Quad Q8400 @ 2.66 GHz | Radeon R7 240 | LG HL-DT-ST DVDRAM GH40N | Fedora 32

Reply 3 of 8, by InstantWare

User metadata
Rank Newbie
Rank
Newbie

Many thanks for your response!

With Mac OS X 10.4, I can use xinetd which is an extended inetd, in that the parameters reside in separate configuration files, but it is basically the same.

I am somewhat familiar with this, because I set up a CVS server and customised finger daemons, by using the xinetd mechanism. So, I can follow you to the point, how to install any daemon which is listening on any port by the way of xinetd.

Rolf$ man cu
No manual entry for cu

However, you left me behind on the question, what tool, that comes included with Mac OS X, might act as a proxy between the virtual modem of DOSBox and the internal hardware modem.

Any pointers would be appreciated.

Best regards

Rolf

Reply 4 of 8, by MiniMax

User metadata
Rank Moderator
Rank
Moderator

See if you have tip instead of cu.

You can also try searching for that cu program - just because there is no manual page, doesn't mean the program can't be there:

$ find / -name cu -ls

Last edited by MiniMax on 2007-08-11, 00:20. Edited 1 time in total.

DOSBox 60 seconds guide | How to ask questions
_________________
Lenovo M58p | Core 2 Quad Q8400 @ 2.66 GHz | Radeon R7 240 | LG HL-DT-ST DVDRAM GH40N | Fedora 32

Reply 5 of 8, by InstantWare

User metadata
Rank Newbie
Rank
Newbie

Many thanks for your response. I got it to work with directserial_posix.cpp. Mac OS X is AFAIK fully POSIX compliant.

Here comes what I did:

1. installed libsdl and libsdl_net by the way of MacPorts
2. checked out the dosbox source from CVS
3. included in the darwin section of configure.in @ line 407

AC_DEFINE(C_DIRECTSERIAL, 1, [ Define to 1 if you want serial passthrough support (Win32, Posix and OS/2).])

4. edited directserial_posix.h @ line 28

#if defined(LINUX) || defined(MACOSX)

5. edited directserial_posix.cpp @ line 26

#if defined(LINUX) || defined(MACOSX)

6. at the commandline:

   cd dosbox
export CXXFLAG=-O3
./autogen.sh
./configure
./make
cd src

7. edited DOSBox Preferences

[serial]
serial1=directserial realport:cu.modem

8. started DOSBox from the command line

PBRJ:/Developer/DOSBox/dosbox/src Rolf$ dosbox
CONFIG:Loading primary settings from config file /Users/Rolf/Library/Preferences/DOSBox Preferences
MIDI:Opened device:coreaudio
Serial1: Opening /dev/cu.modem

In DOSBOX I started the connection tool and it simply recognized the modem.

Voila!

Problem Solved!

Thank you so much for your help.

Best regards

Rolf

Reply 6 of 8, by InstantWare

User metadata
Rank Newbie
Rank
Newbie

Thank you for your reply.

Tip is also not present. However, in the meantime I resolved the problem by recompiling dosbox with directserial_posix support as was suggested by h-a-l-9000.

That means, that there is no need for external proxy daemons for
making the internal modem of my PowerBook G4 work with DOSBox.

Best regards

Rolf

Reply 7 of 8, by MiniMax

User metadata
Rank Moderator
Rank
Moderator

Nice!! So perhaps that direct_serial stuff is safe to update with support with MacOSX.

DOSBox 60 seconds guide | How to ask questions
_________________
Lenovo M58p | Core 2 Quad Q8400 @ 2.66 GHz | Radeon R7 240 | LG HL-DT-ST DVDRAM GH40N | Fedora 32

Reply 8 of 8, by InstantWare

User metadata
Rank Newbie
Rank
Newbie

I am more than satisfied, not to say I am enthusiastic about the solution - it simply works.

BTW: Appearantly because I compiled dosbox now by myself by setting CXXFLAG=-O3, I experienced a performance boost of apprx. 25 % at my PowerBook G4 1.5 GHz compared to the DOSBox binary which is officially supplied.

It runs seemlessly at 10000 cycles while I could use DOSBox from the binary download only @ 7500 cycles.

So, for today, I am fine with everything.

Best regards

Rolf

Last edited by InstantWare on 2007-08-11, 18:43. Edited 1 time in total.