Optional: ne2000 patch (WIP)

Discussion of development and patch submission.
SA1988
Posts: 196
Joined: Wed 30 Apr, 2014 9:38 am

Optional: ne2000 patch (WIP)

Postby SA1988 » Sun 12 Oct, 2014 10:12 pm

I know it isn't of high priority at the current time, but it would be good a suggestion for some users.

https://mega.co.nz/#!cMUy1Y4I!Q-CZToc76 ... JUFsJ2pkb4

Please notice that the patch is a WIP so don't be harsh.
User avatar
ppgrainbow
Posts: 399
Joined: Thu 04 Sep, 2014 7:03 am
Contact:

Re: Optional: ne2000 patch (WIP)

Postby ppgrainbow » Mon 13 Oct, 2014 3:24 am

The patch looks pretty good so far.

Even though the networking capabilities are not high priority, would it be also possible to implement SLiRP networking?

Bochs recently has SLiRP networking since Bochs 2.6.5 and it's working good so far.
SarahWalker
Site Admin
Posts: 1293
Joined: Thu 24 Apr, 2014 4:18 pm

Re: Optional: ne2000 patch (WIP)

Postby SarahWalker » Mon 13 Oct, 2014 7:19 am

When I said it was low priority, I meant I wasn't going to spend time on it. If you're going to develop this though, without me having to do anything, then I'm very happy to take the patches!

Couple of minor suggestions (based on a VERY quick look at the patch) :
* Can you ensure the files from QEMU are in their own directory, similar to how the DOSBox OPL code is?
* Please remove the whitespace changes from the patch. It's just noise, making it more difficult to see what you've changed.
nerd73
Posts: 106
Joined: Wed 24 Sep, 2014 11:16 pm

Re: Optional: ne2000 patch (WIP)

Postby nerd73 » Tue 14 Oct, 2014 10:53 pm

Finally, networking!
In case of that the CMPXCHG8B instruction is added, could both PNP and non-PNP versions be supported, XP only supports the PNP version, 2000 supports both.
SA1988
Posts: 196
Joined: Wed 30 Apr, 2014 9:38 am

Re: Optional: ne2000 patch (WIP)

Postby SA1988 » Tue 21 Oct, 2014 11:44 am

https://github.com/TC1995/src-9 placeholder, until it gets fully working (that is, connecting to the internet from within the emulator) and getting to the upstream one.
nerd73
Posts: 106
Joined: Wed 24 Sep, 2014 11:16 pm

Re: Optional: ne2000 patch (WIP)

Postby nerd73 » Tue 21 Oct, 2014 10:04 pm

SA1988 wrote:https://github.com/TC1995/src-9 placeholder, until it gets fully working (that is, connecting to the internet from within the emulator) and getting to the upstream one.


I cannot compile your build of PCem, the compiler crashes with a fatal error when ne2000.c (or .h) links to pcap.h, which does not exist.
AnnaWu
Posts: 34
Joined: Mon 12 May, 2014 6:10 pm
Location: Germany
Contact:

Re: Optional: ne2000 patch (WIP)

Postby AnnaWu » Tue 21 Oct, 2014 10:32 pm

WinPcap is necessary.
I guess you need the WinPcap Developer's Pack (WpdPack).
A note about it on the GitHub server can be helpful.

Image
nerd73
Posts: 106
Joined: Wed 24 Sep, 2014 11:16 pm

Re: Optional: ne2000 patch (WIP)

Postby nerd73 » Wed 22 Oct, 2014 1:25 am

AnnaWu wrote:WinPcap is necessary.
I guess you need the WinPcap Developer's Pack (WpdPack).
A note about it on the GitHub server can be helpful.

Image


Added WinPCap .h and .c files to the folder, still throws the error.
Still unable to get the thing to compile.
AnnaWu, send me the compiled version please.

More speciffically, I need a file called pcap/pcap.h (exactly like that)
Actually, just send me the exact source (including Pcap) that you compiled from AnnaWu.
SA1988
Posts: 196
Joined: Wed 30 Apr, 2014 9:38 am

Re: Optional: ne2000 patch (WIP)

Postby SA1988 » Sat 25 Oct, 2014 8:19 am

Finished updating my ne2000 patchset (for now)

https://mega.co.nz/#!QF11VJRD!uKJ7UiEQ2 ... EUyaPfO7yQ
User avatar
ender
Posts: 51
Joined: Tue 14 Oct, 2014 12:51 pm

Re: Optional: ne2000 patch (WIP)

Postby ender » Sat 25 Oct, 2014 10:40 pm

Here's my compile: http://eternallybored.org/misc/pcem/
Image

Set netinterface = 255 in pcem.cfg, run PCem.exe once (it'll exit immediately) and check pclog.txt for the list of your physical interfaces. Set netinterface to the number of physical interface you want to share with PCem before running it again.
nerd73
Posts: 106
Joined: Wed 24 Sep, 2014 11:16 pm

Re: Optional: ne2000 patch (WIP)

Postby nerd73 » Sat 25 Oct, 2014 10:58 pm

ender wrote:Here's my compile: http://eternallybored.org/misc/pcem/
Image

Set netinterface = 255 in pcem.cfg, run PCem.exe once (it'll exit immediately) and check pclog.txt for the list of your physical interfaces. Set netinterface to the number of physical interface you want to share with PCem before running it again.


For me it instantly crashes with no error log generated.
User avatar
ender
Posts: 51
Joined: Tue 14 Oct, 2014 12:51 pm

Re: Optional: ne2000 patch (WIP)

Postby ender » Sun 26 Oct, 2014 7:48 pm

Try to download again, I updated my compiler and recompiled (also made it unconditionally print the list of network interfaces; you can still set netinterface = 255 for PCem to exit after printing them though).
nerd73
Posts: 106
Joined: Wed 24 Sep, 2014 11:16 pm

Re: Optional: ne2000 patch (WIP)

Postby nerd73 » Sun 26 Oct, 2014 8:41 pm

ender wrote:Try to download again, I updated my compiler and recompiled (also made it unconditionally print the list of network interfaces; you can still set netinterface = 255 for PCem to exit after printing them though).


I got it all set up, but in 98SE, I cannot use the network at all.
User avatar
ender
Posts: 51
Joined: Tue 14 Oct, 2014 12:51 pm

Re: Optional: ne2000 patch (WIP)

Postby ender » Sun 26 Oct, 2014 8:53 pm

In Windows 2000, while the network card was detected automatically (by the Add New Hardware wizard), I had to set the IRQ myself (Windows defaulted to 3, while it was set to 10 in PCem).
nerd73
Posts: 106
Joined: Wed 24 Sep, 2014 11:16 pm

Re: Optional: ne2000 patch (WIP)

Postby nerd73 » Sun 26 Oct, 2014 9:24 pm

ender wrote:In Windows 2000, while the network card was detected automatically (by the Add New Hardware wizard), I had to set the IRQ myself (Windows defaulted to 3, while it was set to 10 in PCem).


I set the IRQ to 10 in 98SE, and the address to the correct one, so the drivers properly started.
But I can't browse my network nor the internet in PCem.
SA1988
Posts: 196
Joined: Wed 30 Apr, 2014 9:38 am

Re: Optional: ne2000 patch (WIP)

Postby SA1988 » Sun 26 Oct, 2014 9:36 pm

if you don't want to deal with winpcap's installer, use Wireshark (it includes the latest release of winpcap)
AnnaWu
Posts: 34
Joined: Mon 12 May, 2014 6:10 pm
Location: Germany
Contact:

Re: Optional: ne2000 patch (WIP)

Postby AnnaWu » Sun 26 Oct, 2014 9:54 pm

ender wrote:In Windows 2000, while the network card was detected automatically (by the Add New Hardware wizard), I had to set the IRQ myself (Windows defaulted to 3, while it was set to 10 in PCem).


On Win95 the same, NE2000 compatible card detected.
nerd73
Posts: 106
Joined: Wed 24 Sep, 2014 11:16 pm

Re: Optional: ne2000 patch (WIP)

Postby nerd73 » Sun 26 Oct, 2014 10:01 pm

AnnaWu wrote:
ender wrote:In Windows 2000, while the network card was detected automatically (by the Add New Hardware wizard), I had to set the IRQ myself (Windows defaulted to 3, while it was set to 10 in PCem).


On Win95 the same, NE2000 compatible card detected.


98SE same, but network can't be used for some strange reason:
Config:
SiS 496/497
Am5x86/P75
24 MB RAM
NE2000, IRQ 10, address 0x300
504 MB hard disk
98SE (no updates)
SA1988
Posts: 196
Joined: Wed 30 Apr, 2014 9:38 am

Re: Optional: ne2000 patch (WIP)

Postby SA1988 » Sun 26 Oct, 2014 10:09 pm

have you set the network interface number that matches the host number of your physical network interface? (No Microsoft Loopback or VMware or VirtualBox host-only interfaces)
nerd73
Posts: 106
Joined: Wed 24 Sep, 2014 11:16 pm

Re: Optional: ne2000 patch (WIP)

Postby nerd73 » Sun 26 Oct, 2014 10:15 pm

SA1988 wrote:have you set the network interface number that matches the host number of your physical network interface? (No Microsoft Loopback or VMware or VirtualBox host-only interfaces)


I set it to 3, which is my physical one (used by my actual networK).
Still not working.
SA1988
Posts: 196
Joined: Wed 30 Apr, 2014 9:38 am

Re: Optional: ne2000 patch (WIP)

Postby SA1988 » Sun 26 Oct, 2014 10:17 pm

nerd73 wrote:
SA1988 wrote:have you set the network interface number that matches the host number of your physical network interface? (No Microsoft Loopback or VMware or VirtualBox host-only interfaces)


I set it to 3, which is my physical one (used by my actual networK).
Still not working.


ok, have you manually set the IP address, DNS and Gateway as well inside the guests of PCem (Win98SE in your case, check winipcfg.exe to see the configuration of TCP/IP, which is vital for the Internet to work).
nerd73
Posts: 106
Joined: Wed 24 Sep, 2014 11:16 pm

Re: Optional: ne2000 patch (WIP)

Postby nerd73 » Sun 26 Oct, 2014 10:18 pm

SA1988 wrote:
nerd73 wrote:
SA1988 wrote:have you set the network interface number that matches the host number of your physical network interface? (No Microsoft Loopback or VMware or VirtualBox host-only interfaces)


I set it to 3, which is my physical one (used by my actual networK).
Still not working.


ok, have you manually set the IP address, DNS and Gateway as well inside the guests of PCem (Win98SE in your case, check winipcfg.exe to see the configuration of TCP/IP, which is vital for the Internet to work).


No. But I can use ipconfig to find those out.
SA1988
Posts: 196
Joined: Wed 30 Apr, 2014 9:38 am

Re: Optional: ne2000 patch (WIP)

Postby SA1988 » Sun 26 Oct, 2014 10:19 pm

ipconfig isn't on Win98SE, its functionality is in winipcfg (ipconfig is used on NT and successors, including Win7, 8, 8.1 and the in-development 10).
User avatar
ender
Posts: 51
Joined: Tue 14 Oct, 2014 12:51 pm

Re: Optional: ne2000 patch (WIP)

Postby ender » Sun 26 Oct, 2014 11:41 pm

Just installed Win98SE, network works for me:
Image

(ipconfig is present in Win98, but I encountered a glitch running it)
therock247uk
Posts: 29
Joined: Fri 25 Apr, 2014 2:55 pm

Re: Optional: ne2000 patch (WIP)

Postby therock247uk » Mon 27 Oct, 2014 3:36 am

/me wonders how hard it would be to made a slirp for pcem? or allowing it to work with wifi connections somehow: i read this http://www.vogons.org/viewtopic.php?f=3 ... ss#p242415 but i doubt its that easy.
amadama
Posts: 53
Joined: Mon 25 Aug, 2014 9:47 pm

Re: Optional: ne2000 patch (WIP)

Postby amadama » Wed 29 Oct, 2014 6:13 pm

Image

Works fantastic with Windows for Workgroups 3.11
Great patch! Great addition to a great emulator!
Thanks!
User avatar
ender
Posts: 51
Joined: Tue 14 Oct, 2014 12:51 pm

Re: Optional: ne2000 patch (WIP)

Postby ender » Wed 29 Oct, 2014 9:00 pm

Interesting, I haven't been able to get it to work with Windows 3.11 (neither with Microsoft TCP/IP-32, nor with Trumpet Winsock).
amadama
Posts: 53
Joined: Mon 25 Aug, 2014 9:47 pm

Re: Optional: ne2000 patch (WIP)

Postby amadama » Fri 31 Oct, 2014 3:39 am

Image

First make sure you have the right network configured in your pcem.cfg file.
Then, make sure your NE2000 is configured properly in Windows 3.11 (see screen above)
Also, make sure to use MS TCP32b.exe (the newest ver is found here: http://www.gaby.de/ftp/pub/win3x/tcp32b.exe
SA1988
Posts: 196
Joined: Wed 30 Apr, 2014 9:38 am

Re: Optional: ne2000 patch (WIP)

Postby SA1988 » Sun 16 Nov, 2014 1:53 pm

DHCP is fully supported. And remember, guys, this is ported directly from dosbox-x if the wrong irq is set and running successfully (without a yellow mark on win95) (like on PCem's config, irq10 as default, irq5, for example, as set on win95), that's normal, it happens on dosbox-x too, just manually select the irq matching the PCem's config one and you're up to go to the Internet :D.
startmenu
Posts: 103
Joined: Sat 29 Nov, 2014 7:39 am

Re: Optional: ne2000 patch (WIP)

Postby startmenu » Sat 29 Nov, 2014 8:11 am

SA1988 wrote:Finished updating my ne2000 patchset (for now)

https://mega.co.nz/#!QF11VJRD!uKJ7UiEQ2 ... EUyaPfO7yQ


I cannot compile this one. I commit this patch to Rev186 manually.
Maybe there's something wrong with this line in pc.c:

Code: Select all

network_card_current = config_get_int(NULL, "netcard", NE2000);


The compiler (GCC 4.8.1) said, error: expected expression before ')' token.

But when I made that line a comment, the compiler failed to link PCem.exe

Code: Select all

        gfxcard = config_get_int(NULL, "gfxcard", 0);
        video_speed = config_get_int(NULL, "video_speed", 3);
        sound_card_current = config_get_int(NULL, "sndcard", SB2);
   //network_card_current = config_get_int(NULL, "netcard", NE2000);

        p = (char *)config_get_string(NULL, "disc_a", "");
        if (p) strcpy(discfns[0], p);
        else   strcpy(discfns[0], "")

Return to “Development”

Who is online

Users browsing this forum: Bing [Bot] and 1 guest