VOGONS


First post, by mbbrutman

User metadata
Rank Member
Rank
Member

I have used the H-A-L 9000 "megabuild" of DOSBox for years to help me with my mTCP work. Over the years DOSBox became my test platform of choice; I could easily move files into it and the environment is pretty faithful to real hardware; I rarely have surprises testing on real hardware after using DOSBox first. It also plays my favorite vintage game, PDTREK25.EXE, but that's a different story.

However, that build isn't maintained anymore and I'm about to be forced onto Windows 10 so the chances of it working are pretty low. I also want to keep current with DOSBox so using an ancient build is not compatible with that.

Has there been any discussion about formally adding Ethernet (NE2000 or other) support to DOSBox? I love the feature and I think it would be a great add. I know that I can always go the patch route, but I kind of have my hands full with mTCP and general vintage computer support activities (the PCjr page, VCFed.org, etc.) so taking on another project is out of the question for me. My alternatives are to start using VirtualBox or VMWare, and that's not terribly appealing to what I know DOSBox with Ethernet can do.

Thoughts?

Reply 1 of 7, by dreamer_

User metadata
Rank Member
Rank
Member

It seems like DOSBox-X includes NE2000 support, but I don't know what's state is it in. I recovered (some version) of this patch from the Wayback Machine, but Megabuild 6 is not buildable using modern C++ compiler any more (or at least not using GCC 9).

I would be ok with modernizing this patch (I'm not really sure why it uses libpcap instead of raw sockets; brief look at the code indicates, that it really needs some love) and carefully merging it to dosbox-staging master (at some point). Create a feature request or just send a PR if you're interested in that.

[edit]
If anyone's interested, I preserved source code of Megabuild 6 on branch vogons/hal9k-megabuild6-r3661. I can't pinpoint the proper revision to base individual patches from MB4 though 🙁

| ← Ceci n'est pas une pipe
dosbox-staging

Reply 2 of 7, by DosFreak

User metadata
Rank l33t++
Rank
l33t++

IIRC that patch relies on winpcap which is discontinued and according to rumours doesn't work well with Vista and above due to relying on NDIS 5.x while Vista and above are NDIS 6.x. Likely BS since I haven't seen any issues and the Winpcap documentation states otherwise.

Npcap is active, requires NDIS 6 so Vista and above but it's not open source and it does have license limitations.
https://raw.githubusercontent.com/nmap/npcap/master/LICENSE

Another issue with using pcap is with wifi, it doesn't work so slirp would be better.

Winpcap

Latest Stable Release: 4.1.3 The current and last WinPcap release version is 4.1.3. The 4.1.x versions contain the following imp […]
Show full quote

Latest Stable Release: 4.1.3
The current and last WinPcap release version is 4.1.3. The 4.1.x versions contain the following improvements:

Support for Windows XP, Vista, 2008, Windows 7, 2008R2 64 bit, Windows 8 and Server 2012
Allows remote capture to work with Wireshark
Based on libpcap 1.0
WinPcap 4.x does not support Windows 3.1, 95, 98, or ME.

Previous Stable Release: 3.1
This version contains substantial bug fixes and extensions above the 3.0 release:

based on libpcap 0.9.3, with many fixes and extensions above the older version
dial-up connections (e.g. PPP) can be captured on Windows 2000, Windows XP, and Windows Server 2003, as well as Windows 95, Windows 98, and Windows Me, which were supported by previous releases
"can't get a list of interfaces" error fixed

As with anything being added to DOSBox it's all about game support, host OS support, who is going to maintain it in DOSBox and whether it's worth adding a feature that is rarely needed for DOS games.

I will say that having users install a pcap driver every time they install DOSBox and/or DOSBox requiring it on execution or heck even having it enabled by default is not a good idea. Another not great idea is recommending people install a discontinued winpcap and I'm not sure how I feel about recommending using ncap for an open source project.

The original patch, pcem, dosbox-x all based their NE2000 support off of Bochs.

I believe pcem and qemu are possibly using libslirp https://gitlab.freedesktop.org/slirp/libslirp

It's possibly libslip is Vista+ as of the below commit.
https://gitlab.freedesktop.org/slirp/libslirp … 39112b6da25cc0d

inet_pton - Vista+
inet_ntop - Vista+

Mabye can be worked around by disabling IPV6 if <Vista or by using inet_ntoa instead unless Qbix wants to make DOSBox only work on Windows Vista and above. DOSBox doesn't need IPv6 anyway. The OS should provide IPv4 to DOSBox.

Slirp would be ideal since no pcap required and should work for gaming to connect to a remote server by default and then a port forward config setting to allow inbound. The only issue would be IPX to physical machines since SLIRP is TCP and UDP only. For any other use people would have to use pcap, be limited to wired and have to troubleshoot pcap issues.

Personally I'd like NE2000 support but it's a "nice to have" not a necessity.

DOSBox Compilation Guides
DosBox Feature Request Thread
PC Game Compatibility List
How To Ask Questions The Smart Way
Running DRM games offline

Reply 4 of 7, by Kisai

User metadata
Rank Member
Rank
Member

I think the generic NE2000 needs to be supported, but I also think we're dramatically overstating the requirements.

For DOS and Windows up to 95, IPX/SPX support was a native thing that could be installed, however when the Internet became a thing, there were bridge softwares like Kali. I think we should be taking the Kali approach here.

Have dosbox have a generic "network device" and then communicate over tcp/ip localhost to the kali-like service. It could the external thing can do whatever it wants to do with it. Instead of having people install pcap drivers, there's just an assumed server that the user can run themselves, and then dosbox doesn't keep asking for administrative privileges every time it wants to make a new connection to somewhere else on the internet.

The other option is to create a native IPX "client" inside dosbox, which would not work in Win95 since it would be a DOS service. Similar to what all this stuff does:
https://www.novell.com/coolsolutions/tools/13555.html , and probably most of it's unnecessary since we only need the IPX protocol in most cases and don't need any of the domain or novell server stuff. So a test case could be done where if the "ipx boot disk" works.

However that opens back the problem of dosbox asking for admin privileges every time it tries to access something on the internet.

In either case I think the pcap was just the "easy" solution, not the right solution. pcap lets you write stuff that can read or write to the ethernet controller on the system, it doesn't actually maintain separate state, so software that uses pcap is really listening to ALL ethernet traffic and thus can also write to ALL ethernet traffic and unnecessary unless your goal of using dosbox is using DOS based network security tools.

Like dosbox needs really only need IPX being emulated "enough" for games to communicate, but the discovery process for IPX and the "game lobby" in most games is undefined, so having dosbox able to just go "send all IPX traffic to (fixed ip address)" and then that program can discover the game being used and contact a machine on the internet or other local machines running the same bridge, or have an internet "game lobby" that simulates a IPX LAN. All stuff that isn't really in-scope for Dosbox. If people are hellbent on emulating a full NE2000 device so they can run Win95 games on dosbox... I really believe that is so far outside the scope of dosbox's design that no game is ever going to be released on GOG that way.

Reply 5 of 7, by Bruninho

User metadata
Rank Oldbie
Rank
Oldbie

For me, NE2000 with wifi support would be awesome. I have a dosbox instance with wfw 3.11 and some games, but I use it mainly for two things, web surfing (when it loads) and email (when I can get stunnel working).

I was bfcastello, now I am Bruninho! =]
"Design isn't just what it looks like and feels like. Design is how it works."
JOBS, Steve.

Reply 6 of 7, by BloodyCactus

User metadata
Rank Oldbie
Rank
Oldbie

ethernet with libpcap would be awesome. just not libslirp please. NE2000 is a standard-ish, its DP8390D that defines the IO spec.. shouldnt be too hard.... fifo queue, 2x dma buffers. code for dma/fifo etc already exist in dosbox for reference sake.

it might be too low level, but that way your not locking out non-ipx etc..

--/\-[ Stu : Bloody Cactus :: http://kråketær.com :: http://mega-tokyo.com ]-/\--

Reply 7 of 7, by Bruninho

User metadata
Rank Oldbie
Rank
Oldbie

except libpcap does not let us use the wifi of our computers...

I was bfcastello, now I am Bruninho! =]
"Design isn't just what it looks like and feels like. Design is how it works."
JOBS, Steve.