joncampbell123 / dosbox-x

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

Serial port - nullmodem and modem not working on Mac #3534

Open ramboza opened 2 years ago

ramboza commented 2 years ago

Describe the bug

Serial port configurations regarding nullmodem or modem is not working on macOS version

Steps to reproduce the behaviour

To reproduce issue try to use

serial1 = modem or serial1 = nullmodem

parameters for any serialX port inside of [serial] configuration

Expected behavior

No response

What operating system(s) this bug have occurred on?

MacOS Monterey v12.4

What version(s) of DOSBox-X have this bug?

Dosbox-x: 0.83.25

Used configuration

options i tried:

[serial]
serial1 = modem
  or
serial1 = modem listenport:2323
  or
serial1 = nullmodem
  or 
serial1 = nullmodem server:127.0.0.1
  or
serial1 = nullmodem server:127.0.0.1
  or
serial1 = nullmodem port:3333
  or
serial1 = nullmodem server:127.0.0.1 port:3333

Output log

....
LOG: Invalid type for serial1 <<<< 
LOG: Serial2: BASE 2f8h
...

Additional information

No response

Have you checked that no similar bug report(s) exist?

Code of Conduct & Contributing Guidelines

rderooy commented 2 years ago

I think modem support requires SDL_net or SDL2_net and I suspect your build was generated without?

ramboza commented 2 years ago

Rderooy, thanks for hint !

Here is quick solution for MacOS and SDL2:

Inside of vs/sdlnet folder has saved SDL_net v1.x and extra script build-dosbox.sh to build it. The same story for SDL2_net...

  1. Download and extract official SDL2_net-2.0.1.tar.gz as new folder vs/sdl2net
  2. Make a copy of vs/sdlnet/build-dosbox.sh as vs/sdl2net/build-dosbox.sh
  3. Add following lines in the proj. root build-debug-macosx-sdl2

After line 20: ... echo Compiling our internal SDL 2.x (cd vs/sdl2 && ./build-dosbox.sh) || exit 1

fi

# prefer to compile against our own copy of SDLnet 1.x
echo Compiling our internal SDLnet 2.x
(cd vs/sdl2net && ./build-dosbox.sh) || exit
new="-I$top/vs/sdl2net/linux-host/include/SDL2 "
nld="-L$top/vs/sdl2net/linux-host/lib "
export CFLAGS="$new$CFLAGS -g3"
export LDFLAGS="$nld$LDFLAGS -g3"
export CPPFLAGS="$new$CPPFLAGS -g3"
export CXXFLAGS="$new$CXXFLAGS -g3"

In the end run build script and enjoy serial functionality again ! ;)

P.S. Can I do PR with this fix ?

rderooy commented 2 years ago

Sure, create a PR and submit it. But I am not the approver ;-)