I’ve written in the past about my adventures telnetting to BBSes from terminal programs running inside the Hatari emulator. I’ve made some changes in my process and I thought it would be good to explain everything, step-by-step. It’s not for the novice, but it is rewarding.
Besides Hatari and any ST software you want to run, you’ll need to install two things:
tcpser
socat
This tutorial is based on my experiences on the Mac. The instructions should translate well to Linux, but probably not Windows. The tutorial assumes that you are familiar with Hatari and know how to configure it for normal emulation. If you don’t, check out this guide to setting up Hatari.
I’ll explain how to install tcpser and socat, and then how to wire them together so your emulated Atari can telnet to a BBS.
Do you enjoy my retrocomputing tutorials on Break Into Chat? Please join my email list and stay in touch. 📬
1. Install tcsper
FozzTexx maintains a fork of tcpser that incorporates many updates and bug fixes. I have tried many flavors of tcpser over the years, and I have found FozzTexx’s to be the most reliable and compatible.
First you’ll want to clone FozzTexx’s repo:
git clone https://github.com/FozzTexx/tcpser.git
Then follow the instructions to compile an executable for your platform.
2. Install socat
If you have a Mac, you can easily install socat via Homebrew: brew install socat
On Linux, you can use your standard package manager (e.g. sudo apt-get install socat
)
Or, if you prefer, you can build socat from source, which you can download here.
3. Run tcpser
Open a couple tabs in the Terminal.
In the first tab, we will run tcpser, and we’ll configure it with a virtual serial port running at 19,200 bps.
tcpser -v 25232 -s 19200
Leave this tab open until you have finished your BBSing session.
4. Run socat
In the second terminal tab, let’s run socat, and tell it to pipe the input and output from port 25232 to a temporary FIFO file that Hatari will read.
socat PTY,link=/tmp/atari,raw,echo=0 TCP4:localhost:25232
(You can call your temp file /tmp/atari
or anything you want. Mine is /tmp/josh
)
Leave this tab open until you have finished your BBSing session.
5. Configure Hatari for modem emulation
In theory these settings can be edited in Hatari’s Preferences interface, but in practice it doesn’t work, because on a Mac you can’t navigate to the /tmp/
folder through Finder’s “choose” buttons.
Instead, let’s use a text editor (like Sublime Text) to edit your hatari.cfg
file. On the Mac, this file is located in ~/Library/"Application Support"/Hatari/
.
Scroll down to the [RS232]
section and change the lines to look like this (taking care to use the correct name for your temp file):
[RS232]
bEnableRS232 = FALSE
szOutFileName = /tmp/atari
szInFileName = /tmp/atari
bEnableSccB = FALSE
sSccBOutFileName = /dev/modem
Save and close the config file.
6. Run Hatari!
Fire up Hatari. Once you see your Atari ST desktop, load whatever ST terminal program you want to use. My personal favorites include ANSIterm, TAZ, and Freeze Dried Terminal. I also have been playing with the Thieves Guild front-end client.
Once your terminal of choice is open, set the baud rate to 19,200, and make sure it’s 8N1 (8 bits, no parity, one stop bit), although that’s pretty standard.
Now, we need to open Hatari’s preference panel and activate modem emulation. It’s important to do this LAST because Hatari’s serial emulation code doesn’t work well with the way Macs and other BSD-type OSes handle file locking. Hatari will sometimes freeze on the Mac if you start the modem emulation too soon. (2022 Update: Serial emulation is no longer problematic on Macs with Hatari v2.4.0 and later)
So, open Hatari’s preferences, choose the “Peripheral” tab, and click the “Enable RS232 Emulation” checkbox. Then click “OK” to close the preferences dialog box.
7. “Dial” out
ANSIterm and some other terminals will opens directly into an “online” mode, where you can type commands to the modem. In the old days, we might have typed something like atdt555-5555
to connect to a BBS at the phone number 555-5555.
Very few BBSes today use modems and phone lines. Instead they are on the internet, and users connect to them via telnet.
So, what we’ll do today is “dial” an IP address. This step will require some research: You’ll need to lookup the IP address for the BBS you want to visit.
For purposes of this tutorial, we’ll connect to Dark Force BBS, which as of this writing is at 173.80.217.46 on a nonstandard port (520). So our AT command would be:
atdt173.80.217.46:520
Type that in to ANSIterm and press “Return.” With luck you’ll see “CONNECT 19200” followed by the BBS’s logon screen!
(If you see “NO CARRIER,” that may mean something went wrong — but it could also mean that the BBS is busy and has no extra connections available. Double-check your AT command and make sure you didn’t mis-type.)
Have any questions or comments? Please share them in the comments below.
Share your thoughts!