In prior blog posts I discussed two related topics, Neverwinter Nights and Resurrecting Modems. While I had been planning on revisiting the modem article with an actual solution that would allow the modem to connect to another modem or server remotely, I hesitated because I was consumed with doubt that I would be able to get the software side up and running. As far as Neverwinter Nights went, I assumed what I wrote was pretty much all that could be written. Just over six months later I would happily be proven very, very wrong. Let me talk about recent developments which allow both subjects to have new life today.
When I left off with the modem, I had some success connecting two modems together, through a telephone line simulator, and got them communicating through Battle Chess. But that was connecting two computers within reach, not the ultimate end goal. Still it was amazing to have a Tandy 1000 TX play a game against DOSBox running in an AMD 5800X3D-based computer.
Fortunately my friend Cloudschatze had created a solution, the DialPi script. DialPi turns a Raspberry Pi into a something like an ISP for modems. Any one of the normal non-Nano Pis should work, I had a Raspberry Pi Zero 2 W lying around so I used that. The setup process had a few bumps for someone like me who is not used to Linux, so let me describe the installation process:
First, I needed a Raspberry Pi, USB keyboard, a USB modem, a USB hub and at least an 8GiB microSD card. (It turned out I really did not need the Keyboard or the Hub.) The Pi Zeros use microUSB connectors, so I needed appropriate adapters for other sized USB connectors. I had to make sure to plug the hub into the port closer to the middle of the board, the port nearer the short edge is meant for powering up the Pi.
Second, I used Raspberry Pi Imager to install a Lite OS onto my microSD card. I chose the 32-bit OS because that could run on either the Pi Zero or the Pi Zero 2 and I own both. Once the installer finished writing the microSD I brought it over to the Pi, connected the hub and the other USB devices and provided power to the system and the hub. I choose the Lite version from the standard options and input a login username ("pi" was recommended so I used that) and password and things like time zone, Wi-Fi network SSID and Password, and keyboard country from the installer instead of later from the Pi OS' command line. I chose "legacy" OS option (Bookworm) as opposed to the current OS option ("Trixie") because Cloudschatze wrote his scripts for the legacy OS.
When I finished configuration, I installed the microSD card into the Pi and powered it on. Eventually I recalled the joys of SSH, which allows the user to access the Pi OS command line remotely. I still had ExtraPuTTY installed and it connected to the Pi easily (I used the host name instead of its internal IP address). That made it easy to copy and paste the wget command shown on the github page.
That command downloaded the dialpi.sh script and all its dependencies for me and set it up so DialPi's services would be running every time I booted the Pi. I only had to do this once. When the script has finished its business then I could leave the Pi alone. It does not need to be run again, even after the Pi is powered off.
This is the short version of the setup, in order to save space I left out the rather significant learning curve I had, being my first real taste of command-line Linux. With that I had the foundations in place to reach out to the wider world, but how I got there is software dependent.
Terminal Emulators
The first thing I did was to test my connection from my retro PC with a terminal emulator (telnet) program. I use ProComm v2.4.3 as a telnet program for vintage IBM PC compatible computers but many simpler terminal programs will do. The normal command to dial with a Hayes compatible modem is ATDT [telephone number]. With the (dumb) line simulator I just entered ATDT5551000. I heard the modem handshake sounds from the modem connected to the vintage system within two rings and eventually the Telnet Gateway prompt appeared. From here I could connect to a BBS or another domain which provided terminal services.
Neverwinter Nights Revival
Neverwinter Nights' servers shut down in 1997 and for the past 29 years the world has only been able to get just a taste of what the game was like through Neverwinter Nights "Offline". Recently, a VOGONS forum user named Robbo007 (Nightblade) announced Neverwinter Nights Revival, a project intended to recreate the NWN multiplayer experience as closely as possible as it was played before the servers shut down in 1997.
The project has its own webpage. It also has a functional backup of the Neverwinter Nights Archive site, something I did not have access to when I wrote my original blog post. The project is still in early stages and invitations to the server are by invitation only, as indicated in the announcement. You can play through a browser, through DOSBox or through a vintage system. If you wish to play elsewhere than a browser you will need a few files from the website in the NWNREV.ZIP archive and a copy of the NWN v2.2 client. The Offline version will not work!
NWN supported 4-color CGA graphics, 16-color Tandy graphics or 16-color EGA/VGA graphics and version 2.2 requires 640KiB of RAM and a 2400 baud or higher modem. It also supports PC Speaker or Tandy sound. There is no reason why it could not be run in a vintage computer which meets these specifications, modest though they are. With DOSBox all one really needs to do to get the program running is to set the dosbox.conf line serial1=modem.
From there one should use the NWNSETUP program to configure the settings before starting the game. There is a setting for DOSBox or a WiFi Modem. The Hall screen is where one logs into to read server notices and such and it can be set to show pictures in 320x200 graphics mode (4-colors or 16-colors) or 80-column text. Graphics and sound should be set appropriately. In DOSBox I currently recommend using EGA graphics with Tandy sound. In dosbox.conf this is done by setting tandy=on. You can use a Hercules Graphics Card through SIMCGA, best to set the Hall for Text with this option.
In order to get it working on a vintage computer, the WiModem232 Pro is the easiest way to get access and the NWNSETUP program has native support for it. I did not have a WiModem232 until about a week after NWN Revival launched, until then I was able to get access through the DialPi setup. However, with DialPi I had to use the "Manual - terminal, then sign on" option. When that box appears I had to dial into my DialPi with an ATDT command (entered in the black space below the text). That permitted me to connect to DialPI's "Telnet Gateway" where I entered the server name and port (nwnrevival.com 5000).
When I had figured all that out, I was frustrated to find that I still could not connect past the Hall area and into the game itself. It turns out that Telnet Gateway was sending telnet packets but NWN Revival expects "raw TCP" packets. The server's author sent me a replacement script for telnet_wrapper.sh which included an exception for nwnrevival.com to always use raw TCP packets. Once I implemented that (SSH via ExtraPuTTY was very helpful here) then I was able to get into the game proper. Cloudschatze has since modified his DialPi script to allow NWN to handle raw TCP packets.
The Adventurers' Hall is where you can begin creation of characters, up to 4 per account are supported, by giving them names. In the Hall you interact with your account name, in the game you interact with the character's name you assign when you create the character. The Hall has similar functions to the original Lord Nasher's Longue except that the interface looks very different from the original Windows 3.x-like AOL interface. The first time you log into your account the server may take some time to verify your password but you can have it save the password to your hard drive so that verification is instantaneous with later boots.
When you Enter the Realms, the actual game starts (be patient if you are running a slow system) and you can finish creating these characters as the Gold Box engine permits (rolling ability scores, hit points, starting gold). No manually setting ability scores or hit points, you must reroll if you do not like the scores given to you (use Alt + Y do make rerolling faster.)
The Offline version did not fully implement the chat function, so having experienced the chat with Revival I have a better understanding of how it worked. The chat function is used for the Help menu (press F1). Typing using letters and numbers on the keyboard inputs characters into the chat window but they are not sent until you hit Enter. You will not see the text you input into the chat, only other players can see it and vice versa. (It reminds me of modem usage with local echo turned off.) Public chat can only be seen by other characters up to three squares away. I am not sure how far private chat travels. Cloudschatze and I learned the limits of the chat function through trial and error, we were making 21st Century assumptions about a game whose engine was designed for a 286 PC. F4 pulls the chat window down, twice will practically fill the screen. F3 pushes the chat window up, twice will take it off the screen completely. If you use F5/F6 to cycle through all the players whom you have sent a private chat, you can talk to yourself and will see your text being sent back to you. F7/F8 shows everyone who you can chat with and F2 shows you everyone in the realm.
One annoying thing about the game is that in order use keyboard shortcuts for commands like Move, Aim and Encamp, you have to hold down Alt as you press the first letter of the command. Otherwise the game will put that input into the chat window. Another annoying thing is that the game does not allow the num lock to enter numbers, so you always have to enter quantityies with the number key row on the main portion of the keyboard.
When another player moves into your square, you can see them appear in the list of characters. You will not see them in the 3-D world view, but the game will notify you if of characters who are one square away. In other games this would be the party list, but in NWN everyone is wholly independent. You can View some of the other character's stats (Race/Class/Level(s)/HP/Weapon). The Follow command can be used from the View Menu to walk alongside that character. This makes you move in lockstep with the leader, but the leader should walk slowly because the follower can lose the tracking if there is a hiccup with the server data. If you lose your companion you can always ask them in chat for their coordinates. The follower can see when the leader is attacked and can choose to enter combat (or not.) When in combat, you will see screen focus on the other player when it is their turn to move.
It is important to note that in many MMORPGs group endeavors are optional. This is not really going to get you very far in NWN. AD&D 1st Edition is pretty brutal, it is not designed for solo play. By contrast, Bioware's 2002 Neverwinter Nights pretty much gave you your own character plus one henchman and you could very well win the single-player game with just two characters in the party. Fighter/Magic-Users will have the easiest time going alone at the low levels due to their ability to cast Sleep, but they will still hit a brick wall eventually as a solo experience. My first character, Fulk, had too few HP to be practical, so I made my second character, Berengar with more HP but one step down on the Exceptional Strength table. Fortunately death does not extract a heavy penalty in NWN, all that happens is you get booted back to the entrance of an area with 2 HP. Resting at one of the many inns only costs 1 Platinum Piece/5 Gold Pieces and you can rest until fully healed.
Nightblade, the server administrator, has given quests. The details of these can be obtained from Lord Nasher and from the Hall. These quests have been somewhat simple, as in "kill 10 enemies in this area" quests, but the new game is still very young at this point. Cloudschatze, being the overachiever that he is, (he's Ayreon in the screenshots above) has managed to be the first to complete every quest so far!
I played NWN Revival both with DOSBox and my Tandy 1000 TX. I am pleased to report that, after squashing a graphic bug in the chat function left over from the original v2.22 archive, this game is perfectly playable on the TX and its 8MHz 286. The game is best played on a Tandy due to the improved sound effects (and music when the game proper boots.) The Adventurers' Hall graphical interface only supported 4-colors on Tandy at first but Nightblade got a 16-color Tandy driver to work. Someone else tried it on an IBM PC/XT and reported NWN works there as well, but probably rather slowly. As of the newest NWN Revival version v1.4.0, support for packet drivers has been added, allowing you to connect directly via Ethernet or Wi-Fi (PicoMEM), which is as hassle free as it gets.
Battle Chess - More Work to be Done
When it comes to playing Battle Chess against another player remotely, you need to do some more work that cannot be done by DialPi at the moment. The player dialing out needs to know and enter the telephone number of the person on the other end of the line. More precisely they will need to be able to dial IP addresses.
Cloudschatze sent me a Patton SmartNode 4114 VoIP Media Gateway. This is a black box which has an Ethernet port and four telephone jacks. It acts to provide telephony services over the Internet. In other words, you connect a regular telephone line to one of the phone jacks, connect the box to the Internet and "magically" you can call other telephone numbers as if you were on a POTS (plain old telephone service) line. It can support fax machines and modems.
The "magic" comes in two parts. First is configuring the box for your network, which can be a lengthy and tedious process. It is not helped by all the technical jargon the configuration pages (accessed via browser) expects you to understand. Second, you need to have a backbone which permits you to access the public switched telephone network. This is not free, you have to have a VoIP service subscription and configured for the device.
After several evenings of attempts at configuration, he and I finally got our two Tandy 1000s (TX & TL/3) to talk to each other over modems. We found there is inherently more jitter and latency through a VoIP connection than a true analog connection. Different modems were better or worse at handling variances than others. My external U.S. Robotics 56K V.92 modem did exceptionally well. When Cloudschatze switched to a Courier modem, the Battle Chess connection was sufficiently stable to permit an uninterrupted game. NWN worked with its built-in terminal connection method like DialPi.
Eliminating the Analog Element - PiModem & WiModem 232 Pro
While we had a working solution, barely, there is no escaping the fact that VoIP does not work well with analog modems. In order to get the solution working Cloudschatze had to invest in and configure in an absurd amount of hardware for a hobbyist project. The telephone line simulator and the Patton VoIP box are not the cheapest devices around but are required if you are going to use a true analog modem.
But what if you cut out the analog modem and emulated one instead? There are real benefits to this approach. The hardware involved tends to become simpler and easier to obtain. Just as important you have eliminated the analog to digital and digital to analog conversion inherent when an analog modem attempts to communicate via VoIP. We have determined two methods that are not particularly expensive.
The first is PiModem, a project which purposes a Raspberry Pi to simulate a modem. Cloudschatze took out much of the work configuring PiModem with his PiModemBuilder script. It is setup like DialPi, but on the hardware side it needs a USB to Serial adapter instead of a USB modem. It also needs a Null-Modem cable or adapter, something I did not realize at first. The script has support for nwnrevival.com.
The script has an important helper command, pimodem-baud. This command sets the baud rate. We found that Battle Chess really works best when the modems are connecting at 300 baud, so set the PiModem to that rate. For IBM PCs and Tandy 1000s with an 8250 or 16450 UART, the 19200 baud rate will probably not be reliable unless flow control is enabled in the modem. 9600 should be fine for anything other than a PCjr. For NWN the configuration utility should be set to WiFi Modem or DOSBox with a high baud rate.
PiModem can "dial" server domains and IP addresses directly, but some games (like Battle Chess) may not passthrough that "number" correctly. PiModem has a phonebook.txt which can be edited to equate numbers to IPs or domain names.
One issue PiModem has with NWN is that the carrier line needs to be enabled ahead of running the program. Then, once NWN has been exited, the line should be disconnected. Cloudschatze had me create the following batch file to fix the issue:
ECHO AT&C0 > COM1
NWN.COM
ECHO AT&C1 > COM1
The third line enables flow control for 19200 baud rate. Name the batch file START.BAT similar to what other SSI AD&D games used. With that I had no trouble logging into the Hall and connecting to the Realm.
The second option is the WiModem232 Pro. This is a device which plugs into a serial port and acts like a modem, communicating over Wi-Fi. It is the least involved of all hardware setups discussed in this blog. A microUSB port is present for providing power to the unit but does not seem to have any other function. The serial port connector is a female DB-25, so you may need an adapter or a gender changer depending on port coming from the computer. If you use a cable or an adapter, make sure it is a straight through cable, not a null-modem cable. The WiModem has a built-in screen to indicate the status of the device to the user and has a button to reset the modem. There are status LEDs to show you the status of the modem and the state of the serial lines. If you have two WiModems they can connect two computers wirelessly with their null-modem mode.
The WiModem needs to be configured first to be setup on a Wi-Fi network. All configuration is done via entering commands in a terminal program. All commands are documented in the device's manual, found at the link above. Terminal programs come for just about every computer and they should be able to transmit the Hayes command set. One caveat is that the terminal program must be manually set to 300 baud because that is the default WiModem baud rate. If you do not see characters when you type in the terminal or see characters other than what you type in, you probably have a baud rate mismatch. With Procomm you use the Line Settings menu, which is accessed with Alt+P.
WPS allows a device to connect to a router without doing much typing but it can leave a network vulnerable during the period of time the router is looking to accept a new device, because it may not be yours. The other methods involve connecting the device temporarily to a PC or a smartphone and using a browser-based configuration utility or entering the SSID and password manually via a terminal. The device can scan also for SSIDs of available networks.
I tried to use my phone to setup the WiModem on my network but the phone's browser would not allow me to "push" the buttons on the configuration page. My PC was able to connect to the WiModem temporarily and the mouse pointer was able to click on the buttons in the configuration page. That successfully got the WiModem on my network.
NWN has a setting for the WiModem, so connecting with one is very easy. Make sure you set the baud rate to 9600. If you try 19200 baud on a 8250 or 16450-based UART, you will need to enable flow control on the modem first. Battle Chess requires the modem to be set to 300 baud.
Battle Chess tries to disable local echo by just sending ATE, which is valid according to Hayes but the WiModem did not recognize the command without a number on the end of it until a recent firmware update. For Battle Chess I was able to enter the Cloudschatze's IP address and port number following the ATDT, but if that does not work in another program, then you will need to set one of the phone book entries that the WiModem supports and use the number as an alias.
When acting as the host machine for a game like Battle Chess, the machine that "answers the call" (not the machine which dials out), the router must port forward the incoming port of the PiModem or WiModem (defaults to 6400) to the modem-simulator's internal IP address on the network. This means you must set a static IP for the PiModem or WiModem. The WiModem 232 Pro is definitely worth the $59.99 to avoid all the hassle of analog telephony hardware and configuration.
Final Thoughts
I think it can be agreed by most sane people that no one would want to connect via a modem if they did not have to. With the virtual disappearance of the traditional landline, analog modems do not work very well anymore and setting them up via various means to emulate the telephone network is rather difficult. However vintage multiplayer games often knew of no other method to play with people remotely, so you just cannot simply put an Ethernet card into your machine and call it a day. The WiModem is clearly the easiest device for modem play and affordable. If you want to play Neverwinter Nights Revival (and it could use quite a few more players), then you really need to find a way to get online.











No comments:
Post a Comment