Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IPX emulation NE2000 bridge, so guest OSes can communicate using the IPX protocol through the NE2000 emulated network card to a IPX client/server connection established before BOOT #4263

Closed
2 tasks done
joncampbell123 opened this issue May 13, 2023 · 10 comments

Comments

@joncampbell123
Copy link
Owner

joncampbell123 commented May 13, 2023

Is your feature request related to a problem? Please describe.

There seems to be an interest linking together DOS and Windows 95/98 games that use IPX to communicate.

NE2000 emulation may not be very accommodating to that scenario, especially if the system in question is connected over wireless 802.11.

What you want

If IPX emulation is enabled, and NE2000 emulation is enabled, allow the dosbox.conf autoexec to first use the IPX command to set up a client or server connection to enable IPX emulation, and then boot into a guest OS which will then use the NE2000 emulation to talk to the network.

The idea is that, if enabled (by default?), NE2000 emulation would intercept any outgoing IPX packet from the guest OS and send it through the IPX emulation socket instead, and any IPX packet coming back through the same socket would be presented as incoming network traffic to the guest OS.

Then, all the user has to do is install the IPX networking driver in Windows 95/98/ME and games running on the guest OS can communicate via IPX to other running instances of DOSBox/DOSBox-X connected to the same IPX emulation server.

Describe alternatives you've considered

No response

Additional information

IPX is Ethernet frame type 0x8137 (https://en.wikipedia.org/wiki/EtherType#Values)

And the IPX protocol looks like this: https://en.wikipedia.org/wiki/Internetwork_Packet_Exchange

Have you checked that no similar feature request(s) exist?

  • I have searched and didn't find any similar feature request.

Code of Conduct & Contributing Guidelines

  • I agree to follow the code of conduct and the contributing guidelines.
@joncampbell123
Copy link
Owner Author

joncampbell123 commented May 13, 2023

For obvious reasons, the IPX interrupt set up for the DOS prompt will disappear, and IPX packet handling will not trigger the IPX interrupt anymore, when booting a guest OS.

@joncampbell123 joncampbell123 changed the title IPX emulation NE2000 bridge, so guest OSes can speak IPX via NE2000 to a IPX client/server connection established before BOOT IPX emulation NE2000 bridge, so guest OSes can commicate IPX through NE2000 to a IPX client/server connection established before BOOT May 13, 2023
@joncampbell123 joncampbell123 changed the title IPX emulation NE2000 bridge, so guest OSes can commicate IPX through NE2000 to a IPX client/server connection established before BOOT IPX emulation NE2000 bridge, so guest OSes can communicate using the IPX protocol through NE2000 to a IPX client/server connection established before BOOT May 13, 2023
@joncampbell123 joncampbell123 changed the title IPX emulation NE2000 bridge, so guest OSes can communicate using the IPX protocol through NE2000 to a IPX client/server connection established before BOOT IPX emulation NE2000 bridge, so guest OSes can communicate using the IPX protocol through the NE2000 emulated network card to a IPX client/server connection established before BOOT May 13, 2023
@joncampbell123
Copy link
Owner Author

Microsoft DirectPlay (another protocol supported by Windows 95/98 games) is not IPX. It is a proprietary protocol using UDP to communicate (https://en.wikipedia.org/wiki/DirectPlay). However today through the Open Specification Promise it is documented now: (https://learn.microsoft.com/en-us/openspecs/windows_protocols/mc-dpl4cs/10eeb2a2-da0e-4ce2-98dc-ba1a87092a68).

@joncampbell123
Copy link
Owner Author

Another idea: In the same style as how IPX connections are setup now, perhaps NE2000 emulation could have a backend where prior to BOOT, DOSBox either acts as an NE2000 server or connects to an NE2000 server in order to create a private "network" among DOSBox-X instances whether localhost or over the network.

@joncampbell123
Copy link
Owner Author

joncampbell123 commented May 13, 2023

Ewww.... is Windows 95 using the older Ethernet standard for the EtherType field? The one where values less than 1536 are the length of the packet rather than the type of ethernet packet? That's kind of a blocking issue here... how did OSes identify the packet type before it was a type field?

EDIT: It does use EtherType as expected when sending and receiving TCP/IP and UDP/IP packets... but apparently it uses the older "as a length" style when sending and receiving IPX and NetBEUI packets. Hm...

@joncampbell123
Copy link
Owner Author

Ok... so when the EtherType field is a length instead... you can identify IPX by whether the first 16 bits are 0xFFFF, and Windows 95 appears to try to feel for IPX clients using that but more often than not it appears to send packets this way with an additional 3 byte header, usually 0x0e 0x0e 0x03 after which the IPX packet is visible.

That 3 byte header is apparently an LLC encapsulation header: https://en.wikipedia.org/wiki/IEEE_802.2

@joncampbell123
Copy link
Owner Author

Apparently if you installed Microsoft's NetBEUI drivers, you'll also see packets with the length EtherType field and an LLC header of 0x0f 0x0f 0x03. So that's how you would identify NetBEUI should you want to do that.

@joncampbell123
Copy link
Owner Author

Problem: The IPX tunneling server is hardcoded around the assumption that IPX MAC addresses are always IP address and port number combined. If you don't follow that, problems happen, including an issue where the IPX server causes the client connection to see the packet it just sent out.

TODO:

  • If IPX server or client connection started, and NE2000 emulation is active, the MAC address used in IPX emulation needs to be the NE2000 MAC address, not the IP host+port scheme. To avoid problems, IPX emulation should revert to the original scheme if the NE2000 emulation is set to the default MAC address because it would otherwise cause IPX DOS gaming to stop working otherwise.
  • The IPX tunnelling server is very hardcoded around MAC address == IP host + port. The code needs to be updated to track the client IP host+port vs the IPX MAC address presented to the client so they can differ in any way they want. Then clients can register their NE2K card's MAC address instead of the IP host + port scheme. The registration scheme should require some additional nonstandard IPX field to be set to a magic value to allow this, because if the IPX server is hosted by any other DOSBox fork the MAC address scheme won't work properly.

IDEA:

  • Perhaps in future dev, the NE2000 Ethernet equivalent of the IPX tunnelling protocol could be set up so that DOSBox instances can use it to communicate in a sort of private LAN within the host network or localhost.

@joncampbell123
Copy link
Owner Author

Got it working.

WinPopup is happy.
Command & Conquer Windows 95 edition is happy.

By the way, the Windows 95 version of C&C will happily support IPX multiplayer with other Windows 95 and MS-DOS versions of the game over the LAN. Awesome.

@joncampbell123
Copy link
Owner Author

It works across Windows 95 and Windows 98 too.

You just have to make sure you install the IPX protocol drivers for Windows 98 because they're not there by default.

@Torinde
Copy link
Contributor

Torinde commented May 14, 2023

Potentially related ideas: dosbox-staging/dosbox-staging/issues/947, dosbox-staging/dosbox-staging/issues/1081

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants