Published: 2021/03/16
Last updated: 2021/03/17
I’ve found it a bit tricky in the past to find immediately-useful, textual information on how to set up TCP/IP Networking within PCem, so I’ve decided to compile it here. I primarily run GNU/Linux, but these instructions, to my knowledge, should be applicable to any supported operating system.
These instructions assume that any guest operating systems are already installed and configured for a single user.
First off, the high-level configuration:
Further instructions differ for each OS.
These instructions were tested on both MS-DOS 6.22 and SvarDOS 20210213, as my original intent was to test its interesting-looking “pkgnet” update system. I can’t seem to get that working without a lock-up, but it did make for an interesting testing ground. The instructions for both are identical.
Before anything else, prepare a method to transfer data to the DOS machine’s hard drive. The default .img format can be mounted using various external tools. On GNU/Linux, the mount(1) command can be used as such:
sudo mount -o umask=000,loop,offset=32256 ~/.pcem/hdd/DOS.img /mnt/DOS
The /mnt/DOS directory must exist beforehand. To unmount it:
sudo umount /mnt/DOS
Continuing on:
Obtain drivers for the emulated network card. Vogans maintains an archive of old drivers; I utilised this one.
Extract the drivers on the MS-DOS disk somewhere, such as C:\NE2000\NE2000.COM.
Edit C:\AUTOEXEC.BAT, adding a line to run the packet driver:
C:\NE2000\NE2000.COM 0x60 10 0x300
If you changed the device’s IRQ or address in PCem previously, adjust the latter two numbers respectively. The first number is the location in memory where the driver’s software interrupt resides.
This is sufficient to install the network card. However, because DOS does not have a native networking stack, you will find that individual programs require different sorts of configuration. Some, like elinks, bundle in their own stack and are self-sufficient, while the mTCP suite of tools require hand-configuration and a helper utility (DHCP.EXE in this case).
The joys of retrocomputing.
As the suite has some useful tools, and as this is a useful illustration, we may as well set up mTCP while we’re at it.
(Optional) Add the mTCP suite to your PATH:
PATH=%PATH%;C:\MTCP
Set the configuration file and (unless doing static networking) invoke DHCP.EXE:
SET MTCPCFG=C:\MTCP\MTCP.CFG
C:\MTCP\DHCP.EXE
It should now be possible to make use of any of the tools in this suite.
These instructions are primarily for Windows 98, but can be made to work in Windows 95 with minimal alterations to account for the slightly different user interface. Note also that you will need your Windows diskette/CD images mounted for driver installation.
It should now be possible to access the Internet. I would suggest configuring Internet Explorer (via “Internet Options” in Control Panel) to use a home page it can actually render, such as Wiby.