5150: Setting up NIC (Network Interface Card) and mTCP

MAIN 5150 REFERENCE

Having an RJ45 NIC in the system is a game changer, since it allows easy access to the file system of other systems on the LAN (Local Area Network) or to use the 5150 to explore remote places of the internet (like modern telnets that emulate ANSI style BBSs, or IRC, or FTP for software or music repositories).

Networking in the mid-1980s with MS-DOS was rather rough: 10BASE-2, NetBIOS, LAN Manager, NetWare 86, NE1000’s. Terminators. All that probably still works, if you want to network a bunch of IBM PCs together. But I want to network with the integrated NIC on my modern 2019 motherboard, which uses RJ45, and go through a modern router to do so.

Well, turns out you can do that on an 8-bit ISA bus late model IBM PC 5150 from 1984…

The exact NIC I used is called “3COM Etherlink III 3C509B-TPO” and was made in 1999. But versions of this card seemed to have existed as early as 1994. We suspect “TPO” means “Twisted-Pair Only” (i.e. RJ45 twisted-pair connect is the only option on the backplate).

Image 1 - (BRAND NEW) 3COM Etherlink III 3C509B-TPO, ISA Network Interface Card - WARRANTY

Although this is a 16-bit ISA card, it will still work in the IBM PC’s 8-bit slots. I am not sure how or why. There are pins on the 16-bit portion of the card, but they may only be used for certain IRQ or addresses (I used IRQ 3 and Port 340h). I can fully report that this card works fine in the ISA 8-bit bus of the IBM PC 5150.

Other NIC cards can be used, but not all of them will work. Just make sure to find one with RJ45 style connector. The RJ45 connector type was not standardized until 1987. Before this, there was 10Base-2 with metal connectors similar to what is used in cable-TV (or some security camera screens), and nodes at the “end” of a network needed to have “terminators”; other systems like Commodore or ACORN had their own networking connector types; there was also 10Base-5 with a “parallel port” sort of looking connector. RJ45 really helped standardized all that.

If you find an older NIC that is 10Base-5, you might be able to use an adapter to RJ45. Try searching for something like “10Base-T RJ45 to 10Base-5 DB15M AUI Type Media Converter” or “Centrecom 210” which is a small device that can adapt over to RJ45 style connectors. [ thanks Brutman! ]

After installing the NIC hardware: it may come with its own driver disk, but they probably won’t be on 5.25″ disks, they probably won’t be 8088 executable builds anyway, and finding those drivers online already packaged in an Image may be difficult. You can try those if you have the means. Otherwise, don’t worry about any of that, and just use the “modified” real-mode 3COM drivers from NESTOR, available on github (that are verified 8088 compatible). Refer to: https://github.com/hackerb9/3C509B-nestor

The NESTOR README contains the link to prebuilt versions of the two programs to setup and run the driver: 3ccfg.exe and then 3c509.exe (I thought I’d have to build/compile these myself, but read carefully in the README and the links are there)

NOTE: 3ccfg.exe is a massive executable, which contains an elaborate GUI and thus requires the system to have over 256KB RAM in order to run it. My understanding is that 3ccfg “talks” directly to the network card to store its configuration, as no apparent file system based configuration file exists within the 3COM folder. All of that should normally make for a very tiny configuration executable, but it is because of this bulky GUI that the 3ccfg.exe requires a lot of resources to run. Since there is no independent/external configuration file to refer to, this program must be ran on the 5150 hardware itself (i.e. a system that can hold an ISA expansion card).

In the early days of the IBM PC 5150, a lot of devices still had to configured by physical jumpers on the circuit board. This was very tedious and error prone (for example, just accidentally dropping one of those black jumpers and losing it). As EPROMs became more affordable throughout the industry, more devices supporting being reprogrammable through software (and thus not needing to physically move jumper or dip switches around). One of the aspects of Windows 95 was to help better manage this and use PNP (Plug and Play) to deconflict devices automatically. It wasn’t perfect (for the first few years), resulting in many famous BSOD incidents (Blue Screen of Death), once even famously while Bill Gates was presenting Windows while on television. But things did get better, with the later release of Windows XP being relatively well received.


3COM CONFIGURATION

The 3COM network driver can be placed into its own “3COM” folder. I use a GO.BAT script to run it, where that script contains a reminder about what the command line parameter should be matched with. That is, the parameter passed to 3c509.com should match the value of PACKETINT setting in the MTCP.CFG.

It is possible to configure the NIC from the command line options of 3CCFG.EXE. But if you just run 3CCFG.EXE with no command line arguments, you do get a user interface (that also does have mouse support, if you load a mouse driver). One slightly confusing thing to note about this user interface: ALT+N is an option also, in order to get into the configuration category and use the arrow keys to adjust those settings. It’s not just the buttons that have hotkeys, but the whole configuration portion of the dialog also has its own hotkey.

The settings shown below are what I ended up using. I don’t think harm can be caused with the wrong settings, just that the machine might freeze when trying to do network-things, so then try different settings. But with both a SoundBlaster and XT-IDE equipped, the screenshot below shows the settings I am using for my IBM PC 5150: Interrupt 3, IO address 340h.


MTCP UTILITIES

Once you have the 3COM driver, next acquire the MTCP utilities from here. This is a wonderful set of tools by Michael Brutman to perform various TCP/IP functions from the MS-DOS command line (with also developer notes on how to integrate that functionality into your own software – networked real-mode PC-DOS 2.0 games can become a thing now!).

There are a couple setup-things to do for mTCP, so here is a quick tutorial:

  • Place all the MTCP files in a MTCP folder.
  • If you are using an XT-IDE, one way to do this is just attach the CF (CompactFlash) card via USB and copy the files there using a modern Windows 10 system.
  • If no XT-IDE, then using an HXC2001 floppy disk emulator with a custom disk image is another way (two images: boot disk in A: and the mTCP utilities in B:, a single HXC2001 floppy emulator can emulate two drives). Otherwise, one last resort is to ask someone (at a IBM PC related forum) to copy the mTCP files to a physical disk for you (and mail it to you).
  • Create the MTCP.CFG file (full example is further below with suggestions on how to edit a file)
  • Update AUTOEXEC.BAT to initialize MTCPCFG environment variable to point to the full path of the above MTCP.CFG file.
  • Example: MTCPCFG=C:\MTCP\MTCP.CFG
  • Create an FTPSRV sub-folder (if you plan on ever using the FTP Server feature)

A note about the PASSWORD.TXT file: In one of the screen shots above, the command “TYPE PASSWORD.TXT” was used to list the contents of the password file. The above is just an example of what that file should look like to allow an anonymous connection, and one “secured” connection (password and no access restriction). The MOTD.TXT file is optional (message of the day). You may want to disable the LOG.TXT or have autoexec.bat delete it on startup.

Again, refer to how to set your MTCP.CFG file (see below, then return back to this point). Once you think things are ready, I initialize mTCP like this:

C:
CD\MTCP
DHCP
SNTP -SET pool.ntp.org
DHCP

I use SNTP to initialize the local clock of DOS, since I don’t run any real-time clock expansion card. Because of a little quirk in IP assignments, you do have to run DHCP twice. The first time gets you on the network to lease an IP, but then that lease will expire as your clock suddenly shifts 40+ years into the future. The second DHCP then leases another IP (which most likely will be the same IP, when using a home network that doesn’t have a lot of devices coming and going). There is a way to setup a static IP if you’ve configured your router to do that.

NOTE: I put the above commands in a GO.BAT, then I “call” that batch from within autoexec.bat during startup (i.e. “cd \mtcp” then “call go.bat“; remember when calling a batch file from within a batch file, you need to use “call” command in order to return back to the original batch file that made the call).

Below is the MTCP.CFG contents that I use, for reference: (DR-DOS comes with an EDITOR.EXE program, use CTRL-K-CTRL-X to save your edits and quit the editor; MS-DOS should come with a similar EDIT.EXE program that will edit text files in a similar way ). Otherwise, search for “MS-DOS text file editor” for various other options.

If you have absolutely no editor available, one last brute force way to create files in MS-DOS is to use the “COPY CON” command. Type “copy con mtcp.cfg”, then from that point anything you type in the console will get to sent to the specified filename (mtcp.cfg). Press F6 when finished, to mark the end of the file and return to the MS-DOS prompt.

  • Remember PACKETINT needs to be set to the same parameter value that is passed to the 3COM driver when it is loaded.
DHCPVER DHCP Client version Mar  7 2020
TIMESTAMP ( 1630197282 ) Sat Aug 28 19:34:42 2021

# machine parameters
PACKETINT 0x60
MTU 1500
HOSTNAME PC5150

#IRCjr
ircjr_nick <somename>  <-- change this
ircjr_user <somename>  <-- change this
ircjr_name <somename>  <-- change this
ircjr_connect_timeout 10
ircjr_register_timeout 60

# FTP
ftp_connect_timeout 15
ftp_tcp_buffer 8192
ftp_file_buffer 16384
FTPSRV_EXCLUDE_DRIVES AB

# FTP server
FTPSRV_PASSWORD_FILE c:\mtcp\ftpsrv\password.txt
FTPSRV_LOG_FILE c:\mtcp\ftpsrv\log.txt
FTPSRV_MOTD_FILE c:\mtcp\ftpsrv\motd.txt

# DHCP
IPADDR 10.7.77.54
NETMASK 255.255.255.0
GATEWAY 10.7.77.1
NAMESERVER 10.7.77.1
LEASE_TIME 86393

  • I use this FTPSRV as a way to transfer files onto my 5150 XT-IDE fixed disk, without having to remove the CF (CompactFlash) card itself. CompactFlash is fairly reliable, but there is always some risk of damage or corruption when the card is removed or inserted into other USB readers.
  • So I prefer to try to minimize the number of times I relocate the CF card. If I’m moving a lot of files (across several folders), I’ll probably remove the CF (with the 5150 powered off) and use USB to transfer files over. But it is just a handful of files in the same folder, I’d rather use FTP.
  • Once the FTPSRV is up and running, listed below are typical commands from the other Windows machine to transfer files.

Once connected, the typical/standard FTP commands apply…

HASH         (enable display of a transfer rate status; it slows down the transfer a bit but helps notify that the transfer/connection are still active)
BINARY       (I always enable binary mode; it may be enabled by default)
PROMPT       (disable -- or toggle -- yes/no prompting during multi-file operations)
LCD \transfer   (usually this is not necessary, since I run FTP while within the folder that I want to transfer)
MPUT *.*     (*.* to just transfer all the files in the directory I am in)
(can use MGET to take files off of the 5150 and onto your local machine)

Remember to "CD" to the server folder you want to work with. For example,
dir
cd DRIVE_C
cd apps

Then issue the above commands.  Use LCD to change the local working directory.

And here is an example of what FTPSRV looks like when you run it (and the configuration is all setup correctly):

Leave a Reply