Page 1 of 1

Optional: ne2000 patch (WIP)

Posted: Sun 12 Oct, 2014 10:12 pm
by SA1988
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.

Re: Optional: ne2000 patch (WIP)

Posted: Mon 13 Oct, 2014 3:24 am
by ppgrainbow
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.

Re: Optional: ne2000 patch (WIP)

Posted: Mon 13 Oct, 2014 7:19 am
by SarahWalker
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.

Re: Optional: ne2000 patch (WIP)

Posted: Tue 14 Oct, 2014 10:53 pm
by nerd73
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.

Re: Optional: ne2000 patch (WIP)

Posted: Tue 21 Oct, 2014 11:44 am
by SA1988
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.

Re: Optional: ne2000 patch (WIP)

Posted: Tue 21 Oct, 2014 10:04 pm
by nerd73
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.

Re: Optional: ne2000 patch (WIP)

Posted: Tue 21 Oct, 2014 10:32 pm
by AnnaWu
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

Re: Optional: ne2000 patch (WIP)

Posted: Wed 22 Oct, 2014 1:25 am
by nerd73
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.

Re: Optional: ne2000 patch (WIP)

Posted: Sat 25 Oct, 2014 8:19 am
by SA1988
Finished updating my ne2000 patchset (for now)

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

Re: Optional: ne2000 patch (WIP)

Posted: Sat 25 Oct, 2014 10:40 pm
by ender
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.

Re: Optional: ne2000 patch (WIP)

Posted: Sat 25 Oct, 2014 10:58 pm
by nerd73
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.

Re: Optional: ne2000 patch (WIP)

Posted: Sun 26 Oct, 2014 7:48 pm
by ender
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).

Re: Optional: ne2000 patch (WIP)

Posted: Sun 26 Oct, 2014 8:41 pm
by nerd73
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.

Re: Optional: ne2000 patch (WIP)

Posted: Sun 26 Oct, 2014 8:53 pm
by ender
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).

Re: Optional: ne2000 patch (WIP)

Posted: Sun 26 Oct, 2014 9:24 pm
by nerd73
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.

Re: Optional: ne2000 patch (WIP)

Posted: Sun 26 Oct, 2014 9:36 pm
by SA1988
if you don't want to deal with winpcap's installer, use Wireshark (it includes the latest release of winpcap)

Re: Optional: ne2000 patch (WIP)

Posted: Sun 26 Oct, 2014 9:54 pm
by AnnaWu
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.

Re: Optional: ne2000 patch (WIP)

Posted: Sun 26 Oct, 2014 10:01 pm
by nerd73
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)

Re: Optional: ne2000 patch (WIP)

Posted: Sun 26 Oct, 2014 10:09 pm
by SA1988
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)

Re: Optional: ne2000 patch (WIP)

Posted: Sun 26 Oct, 2014 10:15 pm
by nerd73
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.

Re: Optional: ne2000 patch (WIP)

Posted: Sun 26 Oct, 2014 10:17 pm
by SA1988
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).

Re: Optional: ne2000 patch (WIP)

Posted: Sun 26 Oct, 2014 10:18 pm
by nerd73
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.

Re: Optional: ne2000 patch (WIP)

Posted: Sun 26 Oct, 2014 10:19 pm
by SA1988
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).

Re: Optional: ne2000 patch (WIP)

Posted: Sun 26 Oct, 2014 11:41 pm
by ender
Just installed Win98SE, network works for me:
Image

(ipconfig is present in Win98, but I encountered a glitch running it)

Re: Optional: ne2000 patch (WIP)

Posted: Mon 27 Oct, 2014 3:36 am
by therock247uk
/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.

Re: Optional: ne2000 patch (WIP)

Posted: Wed 29 Oct, 2014 6:13 pm
by amadama
Image

Works fantastic with Windows for Workgroups 3.11
Great patch! Great addition to a great emulator!
Thanks!

Re: Optional: ne2000 patch (WIP)

Posted: Wed 29 Oct, 2014 9:00 pm
by ender
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).

Re: Optional: ne2000 patch (WIP)

Posted: Fri 31 Oct, 2014 3:39 am
by amadama
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

Re: Optional: ne2000 patch (WIP)

Posted: Sun 16 Nov, 2014 1:53 pm
by SA1988
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.

Re: Optional: ne2000 patch (WIP)

Posted: Sat 29 Nov, 2014 8:11 am
by startmenu
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], "")