DOSBox-X on macOS Sierra: Networking?

Having problems with a specific game or application? Post your problems here!

Re: DOSBox-X on macOS Sierra: Networking?

Postby Dominus » 2019-1-31 @ 05:39

Same question as years ago, does Dosbox-x a patched libcap as that blog post suggests?
User avatar
Dominus
DOSBox Moderator
 
Posts: 7779
Joined: 2002-10-03 @ 09:54
Location: Ludwigsburg

Re: DOSBox-X on macOS Sierra: Networking?

Postby palxex » 2019-2-13 @ 12:14

In fact DOSBox-X cannot patch libpcap for macOS, since its compiled by aapl and only binary delivered.
But in fact we can emulate same modification by modify DOSBox-X code:
Code: Select all
diff --git a/src/hardware/ne2000.cpp b/src/hardware/ne2000.cpp
index 16703ea4e..d35ea7402 100644
--- a/src/hardware/ne2000.cpp
+++ b/src/hardware/ne2000.cpp
@@ -1666,7 +1666,7 @@ public:
             65536,            // portion of the packet to capture
                               // 65536 = whole packet
             true,    // promiscuous mode
-            -1,             // read timeout
+            2250,             // read timeout
             errbuf            // error buffer
             ) ) == NULL)

Dont' ask me why it works, or I will send PR 3 years before:) Its just a transform of the original patch.
palxex
Newbie
 
Posts: 5
Joined: 2003-10-12 @ 03:19

Re: DOSBox-X on macOS Sierra: Networking?

Postby bfcastello » 2019-2-15 @ 23:34

palxex wrote:In fact DOSBox-X cannot patch libpcap for macOS, since its compiled by aapl and only binary delivered.
But in fact we can emulate same modification by modify DOSBox-X code:
Code: Select all
diff --git a/src/hardware/ne2000.cpp b/src/hardware/ne2000.cpp
index 16703ea4e..d35ea7402 100644
--- a/src/hardware/ne2000.cpp
+++ b/src/hardware/ne2000.cpp
@@ -1666,7 +1666,7 @@ public:
             65536,            // portion of the packet to capture
                               // 65536 = whole packet
             true,    // promiscuous mode
-            -1,             // read timeout
+            2250,             // read timeout
             errbuf            // error buffer
             ) ) == NULL)

Dont' ask me why it works, or I will send PR 3 years before:) Its just a transform of the original patch.


OK, now how do I modify this? I went to the file and edited it manually. Then compiled dosbox-x. Then I ran Dosbox as root with a disk image of Win95 and was checking the console while the system booted. Network list addresses still came with no description, no device to use for.
bfcastello
Newbie
 
Posts: 45
Joined: 2017-9-07 @ 02:39

Re: DOSBox-X on macOS Sierra: Networking?

Postby palxex » 2019-2-16 @ 05:25

bfcastello wrote:
palxex wrote:In fact DOSBox-X cannot patch libpcap for macOS, since its compiled by aapl and only binary delivered.
But in fact we can emulate same modification by modify DOSBox-X code:
Code: Select all
diff --git a/src/hardware/ne2000.cpp b/src/hardware/ne2000.cpp
index 16703ea4e..d35ea7402 100644
--- a/src/hardware/ne2000.cpp
+++ b/src/hardware/ne2000.cpp
@@ -1666,7 +1666,7 @@ public:
             65536,            // portion of the packet to capture
                               // 65536 = whole packet
             true,    // promiscuous mode
-            -1,             // read timeout
+            2250,             // read timeout
             errbuf            // error buffer
             ) ) == NULL)

Dont' ask me why it works, or I will send PR 3 years before:) Its just a transform of the original patch.


OK, now how do I modify this? I went to the file and edited it manually. Then compiled dosbox-x. Then I ran Dosbox as root with a disk image of Win95 and was checking the console while the system booted. Network list addresses still came with no description, no device to use for.

I'm not sure the emulated NE2000 hardware could be detected by emulated windows, since I don't have one. What I could verify is FreeDOS fdnpkg/ping works - wattcp/mtcp stack both works, on packet driver.
Some point:
0. add [ne2000] block in dosbox.conf, remember the macaddr. my:
Code: Select all
[ne2000]
ne2000=true
nicbase=300
nicirq=3
macaddr=AC:DE:48:88:99:AA
realnic=en0

1. run with root.
2. passthrough an LAN interface like en0(realnic), WLAN never works.
3. ignore the "(no description)", as network already work.( on my machine, without this patch - like dosbox-x official macOS build, will complains 'Unable to open the interface: en0: BIOCSRTIMEOUT: Invalid argument.' after this line )
4. in DOSBox shell, run ne2000 packet driver(ne2000.com 0x60 3), and ensure the MAC got is same as step 0, not FF:FF:FF:FF:FF:FF ( on my machine without this patch will get it every time) - or the configuration FAILED, check dosbox-x build and/or your configuation again.
Once done, another limitation: direct IP access never works. for example, ping google.com will work and ping 192.168.1.1 will not. After compare to windows version, seems it's a limitation on root permission( normal run no such limit, run with administrator has ), but on macOS we don't have choise.
屏幕快照 2019-02-16 下午1.03.59.png

On Windows I'm not sure whether you need to manual load the packet driver and windows able to use it( either directly or via shims ), or Windows will able to install a NDIS driver for it. Good luck:)
found a tutorial on DOSBOX+Win95+NE2000: ftp://elanda.kiev.ua/Games/Arh/Zed/db/D ... e2000.html
palxex
Newbie
 
Posts: 5
Joined: 2003-10-12 @ 03:19

Re: DOSBox-X on macOS Sierra: Networking?

Postby bfcastello » 2019-2-17 @ 23:26

I am still getting FF:FF:FF:FF:FF:FF. Even when I run as sudo.

Unless I have compiled it wrong (both SDL1 and SDL2 versions of DosBox-X) I see no reason why it should fail on me.

Before I went for DOSBox, I tried VirtualBox 6.0.4, network does work there easily but the sound is terrible, choppy. Something is broken in VirtualBox's SB16 emulation.

It also works on VMWare Fusion (my fav option) but there is no sound (Fusion does not have SB16 emulation, only Ensoniq Audio PCI cards like the ES1371 and there is no Win 3.x drivers for these). I haven't tried QEMU because it looked far more complicated than DOSBox to set up.
bfcastello
Newbie
 
Posts: 45
Joined: 2017-9-07 @ 02:39

Re: DOSBox-X on macOS Sierra: Networking?

Postby palxex » 2019-2-18 @ 03:09

My compilation is SDL2. This patch works for me since Sierra, till Mojave - but I'm not sure whether it has relation with hardware, just tested on my mac mini 2012.
Could you upload your dosbox-x git hash, patched ne2000.cpp, config.log, dosbox.conf and `dosbox-x --debug` output for further analysis?
palxex
Newbie
 
Posts: 5
Joined: 2003-10-12 @ 03:19

Re: DOSBox-X on macOS Sierra: Networking?

Postby bfcastello » 2019-2-18 @ 13:17

palxex wrote:My compilation is SDL2. This patch works for me since Sierra, till Mojave - but I'm not sure whether it has relation with hardware, just tested on my mac mini 2012.
Could you upload your dosbox-x git hash, patched ne2000.cpp, config.log, dosbox.conf and `dosbox-x --debug` output for further analysis?


I had deleted the files thinking it wouldn't work, but I can compile again and try again just to get these files for you, after my work tonight.

But hum... git hash?
bfcastello
Newbie
 
Posts: 45
Joined: 2017-9-07 @ 02:39

Re: DOSBox-X on macOS Sierra: Networking?

Postby palxex » 2019-2-18 @ 13:32

By `git hash` I mean the git commit id:) Which resides on top of git log. I thought you clone the official dosbox-x github repo, if not, please tell me the source tarball name.
palxex
Newbie
 
Posts: 5
Joined: 2003-10-12 @ 03:19

Re: DOSBox-X on macOS Sierra: Networking?

Postby bfcastello » 2019-2-19 @ 01:13

bfcastello wrote:
palxex wrote:My compilation is SDL2. This patch works for me since Sierra, till Mojave - but I'm not sure whether it has relation with hardware, just tested on my mac mini 2012.
Could you upload your dosbox-x git hash, patched ne2000.cpp, config.log, dosbox.conf and `dosbox-x --debug` output for further analysis?


I had deleted the files thinking it wouldn't work, but I can compile again and try again just to get these files for you, after my work tonight.

But hum... git hash?


OK, I'm home, just sat in front of my computer right now. Let's see...

I cloned (and also tried downloading the tarball before) this one:
The 'master' branch, https://github.com/joncampbell123/dosbox-x and commit hash I think it is b6c1394 it seems.

I'll provide the other files in some minutes, need to try to compile again for the log and debug files. Where is the config.log ?
bfcastello
Newbie
 
Posts: 45
Joined: 2017-9-07 @ 02:39

Re: DOSBox-X on macOS Sierra: Networking?

Postby bfcastello » 2019-2-19 @ 03:35

palxex wrote:By `git hash` I mean the git commit id:) Which resides on top of git log. I thought you clone the official dosbox-x github repo, if not, please tell me the source tarball name.


Here are the files. https://we.tl/t-lIP5u5xw8y

I had trouble tonight trying to clone it, every time I tried it was returning an error, so I got the tarball and compiled.

I just couldn't get the dosbox --debug, No idea how to. Sry
bfcastello
Newbie
 
Posts: 45
Joined: 2017-9-07 @ 02:39

Previous

Return to DOSBox Games/Apps

Who is online

Users browsing this forum: No registered users and 1 guest