PCem TCP/IP Networking

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:

PCem Setup

  1. Start PCEM’s graphical interface.
  2. Click the “Host Configuration” button and ensure that SLiRP is available and selected, then click “OK”. If it is not available, recompile PCem with networking support and try again.
  3. Select the applicable machine entry.
  4. Click the “Configure” button.
  5. Select the “Networking” tab.
  6. Select the “Novell NE2000” option next to “Network”.
  7. Click the nearby “Configure” button and make note of the contents of the “Address” and “IRQ” fields – they will be needed later. By default, these are “0x300” and “10” respectively.
  8. Accept all changes.

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.

DOS Setup

Installing the Hardware

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:

  1. Obtain drivers for the emulated network card. Vogans maintains an archive of old drivers; I utilised this one.

  2. Extract the drivers on the MS-DOS disk somewhere, such as C:\NE2000\NE2000.COM.

  3. 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.

Bonus: Setting Up mTCP

  1. Download the latest release (2020-03-07 at the time of writing) and extract it on the MS-DOS disk somewhere, such as C:\MTCP.
  2. Copy C:\MTCP\Samples\sample.cfg to e.g. C:\MTCP\MTCP.CFG.
  3. Edit C:\MTCP\MTCP.CFG to configure the programs that need it or to set up static networking. Regardless, DHCP.EXE will write to this file as necessary.
  4. Edit C:\AUTOEXEC.BAT:

It should now be possible to make use of any of the tools in this suite.

Windows 95/98

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.

Windows Setup

Installing the Hardware

  1. Launch the applicable machine entry.
  2. Click Start -> Settings -> Control Panel.
  3. Run “Add New Hardware”.
  4. Click “Next” until the wizard attempts to detect new hardware, then select “No, the device isn’t in the list” and click “Next” again.
  5. Select “No, I want to select the hardware from a list” and click “Next”.
  6. Select “Network adapters” and click “Next”.
  7. Select “Novel/Anthem” and then “NE2000 Compatible”, then click “OK”. On the next screen, note that the settings are incorrect; this will be corrected momentarily. For now, click “Next” and then “Finish”.
  8. When prompted to reboot, decline. There’s two more major steps yet and it’s not necessary to reboot until everything is accomplished.

Configuring the Hardware

  1. Within Control Panel again, run “System”.
  2. Select the “Device Manager” tab.
  3. Select Network adapters -> NE2000 Compatible and click “Properties”.
  4. Select the “Resources” tab.
  5. Configure the “Interrupt Request” and “Input/Output Range” to match the PCem settings recorded previously (10 and 0x300 by default).
  6. Accept all changes, and again decline the reboot.

Configuring TCP/IP

  1. On the desktop, right-click on “Network Neighborhood” and select “Properties”.
  2. Click “Add…”.
  3. Select “Protocol” and click “Add…”.
  4. Select Microsoft -> TCP/IP and click “OK”.
  5. Accept all changes and reboot.
  6. When prompted for a password, press “Enter” or click “OK”.
  7. Right-click on “Network Neighborhood” and select “Properties” again.
  8. Reset “Primary Network Logon” to “Windows Logon” to remove the redundant login prompt. Click “OK” and decline the reboot.

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.

I came here to awoo at you

Back to main page