mTCP / HTGET.EXE in DOSBox-X

147 views
Skip to first unread message

Dominic Raferd

unread,
Jul 22, 2022, 6:19:59 AM7/22/22
to mt...@googlegroups.com
It's great to have the new (2022-07-01) mTCP! Thanks Mike!

I am trying to get it working under DOSBox-X. I found instructions at
https://dosbox-x.com/wiki/Guide%3ASetting-up-networking-in-DOSBox%E2%80%90X#_locate_host_network_interface.

I successfully installed the NE2000.COM packet driver. DHCP.EXE runs and
reports success getting a (real) IP address. But when I then run
HTGET.EXE a Windows box appears saying 'BX_PANIC condition' and DOSBox-X
crashes.

BX_PANIC seems to be a message from NE2000.COM but I have no idea how to
get round it. Setting MTU 576 does not help. I have tried using a few
different packet drivers (and different physical network adapters on the
Host Windows 11 machine, though they are both a long way from an old
NE2000 - one is on-board Realtek RTL8111HN (1GB) and the other
Solarstorm SFN5161T (10GB) - but without success.

Any suggestions welcome.

Michael Brutman

unread,
Jul 22, 2022, 3:08:39 PM7/22/22
to mTCP
Was there anything else to the error message?  There should have been a line of output immediately before that describing the nature of the error.  (BX_PANIC can happen for many reasons.)

That being said, this is definitely from the NE2000 emulation code in DOSBox-X, and not from the packet driver.  BX_PANIC happens for all sorts of reasons; trying to write a register while the card is resetting, unaligned memory writes, using DMA incorrectly, etc.  I doubt there is anything that can be done in mTCP given that it's a problem between the packet driver and the emulated NE2000 hardware.  The best people to debug this are the DOSBox-X contributors.

I used to use DOSBox extensively with mTCP, but that was years ago.  (It was the "H-A-L 9000 megabuild" that patched the main DOSBox.)  I have not tested with DOSBox-X yet.


-Mike

Dominic Raferd

unread,
Jul 23, 2022, 2:26:04 AM7/23/22
to mt...@googlegroups.com
Thanks Mike, that make sense, I will take it up with the DOSBox-X people...

On 22/07/2022 20:08, Michael Brutman wrote:
> Was there anything else to the error message?  There should have been
> a line of output immediately before that describing the nature of the
> error.  (BX_PANIC can happen for many reasons.)
>
> That being said, this is definitely from the NE2000 emulation code in
> DOSBox-X, and not from the packet driver.  BX_PANIC happens for all
> sorts of reasons; trying to write a register while the card is
> resetting, unaligned memory writes, using DMA incorrectly, etc.  I
> doubt there is anything that can be done in mTCP given that it's a
> problem between the packet driver and the emulated NE2000 hardware. 
> The best people to debug this are the DOSBox-X contributors.
>
> I used to use DOSBox extensively with mTCP, but that was years ago. 
> (It was the "H-A-L 9000 megabuild" that patched the main DOSBox.)  I
> have not tested with DOSBox-X yet.
>
>
> -Mike
>
> On Friday, July 22, 2022 at 3:19:59 AM UTC-7 dom...@timedicer.co.uk
> wrote:
>
> It's great to have the new (2022-07-01) mTCP! Thanks Mike!
>
> I am trying to get it working under DOSBox-X. I found instructions at
> https://dosbox-x.com/wiki/Guide%3ASetting-up-networking-in-DOSBox%E2%80%90X#_locate_host_network_interface.
>
>
> I successfully installed the NE2000.COM <http://NE2000.COM> packet
> driver. DHCP.EXE runs and
> reports success getting a (real) IP address. But when I then run
> HTGET.EXE a Windows box appears saying 'BX_PANIC condition' and
> DOSBox-X
> crashes.
>
> BX_PANIC seems to be a message from NE2000.COM <http://NE2000.COM>
> but I have no idea how to
> get round it. Setting MTU 576 does not help. I have tried using a few
> different packet drivers (and different physical network adapters
> on the
> Host Windows 11 machine, though they are both a long way from an old
> NE2000 - one is on-board Realtek RTL8111HN (1GB) and the other
> Solarstorm SFN5161T (10GB) - but without success.
>
> Any suggestions welcome.
>
> --
> You received this message because you are subscribed to the Google
> Groups "mTCP" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to mtcp+uns...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/mtcp/26e2a3fd-dc3d-4a5f-8448-9b531a623667n%40googlegroups.com
> <https://groups.google.com/d/msgid/mtcp/26e2a3fd-dc3d-4a5f-8448-9b531a623667n%40googlegroups.com?utm_medium=email&utm_source=footer>.

Dominic Raferd

unread,
Jul 23, 2022, 12:48:49 PM7/23/22
to mt...@googlegroups.com
To complete this, I had some great help from @Jookia on the DOSBox-X
Discord channel and the problem is fixed with
https://github.com/joncampbell123/dosbox-x/pull/3643 (though not yet in
official version).

With this fix, HTGET.EXE now works happily in DOSBox-X with backend=pcap
(requires Wincap or Npcap installed on host), tested with 279MB
download.  Cool!

Example (extract of) settings in dosbox-x.conf (this supposes you have a
directory that is accessible as C:\VBDOSTMP from within DOSBox-X [via a
mount statement in autoexec section, not shown here] and that you have
put NE2000.COM as well as mTCP's DHCP.EXE and HTGET.EXE in that directory):

[ne2000]
ne2000  = true
nicbase = 300
nicirq  = 3
macaddr = AC:DE:48:88:99:AA
backend = pcap

[ethernet, pcap]
realnic = "Realtek PCIe GbE Family Controller #2"
timeout = default

[autoexec]
PATH=%PATH%;C:\VBDOSTMP
SET MTCPCFG=C:\VBDOSTMP\MTCP.CFG
ECHO MTU 576 >C:\VBDOSTMP\MTCP.CFG
ECHO PACKETINT 0x60 >>C:\VBDOSTMP\MTCP.CFG
NE2000.COM 0x60 3 0x300
DHCP.EXE
Reply all
Reply to author
Forward
0 new messages