Can a terminal program in Hatari work with telnet BBS?

A forum about the Hatari ST/STE/Falcon emulator - the current version is v2.1.0

Moderators: simonsunnyboy, thothy, Moderator Team

User avatar
Kirkman
Obsessive compulsive Atari behavior
Obsessive compulsive Atari behavior
Posts: 123
Joined: Fri Sep 03, 2010 2:29 am

Can a terminal program in Hatari work with telnet BBS?

Postby Kirkman » Mon Dec 10, 2012 7:21 pm

I asked a similar question on stackoverflow, but I figured I'd ask here as well.

I use Hatari on a Mac. Since there are a number of Atari ST BBSes out there still today, I'd love to be able to connect to them using a VT-52 compatible Atari terminal program, like Freeze Dried Terminal, TAZ, or VanTerm.

But how can I get Hatari to work with telnet?

I see that Hatari offers RS232/serial emulation. The manual suggests writing Hatari RS232 input/output to a file like /dev/ttyS0.

And I found something called socat that lets you transfer data between various channels.

So: is there a way to make socat take a telnet session and pipe it into a file that can be read by Hatari's RS232 emulation?

Any ideas? I'm a unix novice, but I'd love to get this to work.

User avatar
Kirkman
Obsessive compulsive Atari behavior
Obsessive compulsive Atari behavior
Posts: 123
Joined: Fri Sep 03, 2010 2:29 am

Re: Can a terminal program in Hatari work with telnet BBS?

Postby Kirkman » Wed Dec 12, 2012 9:10 pm

I feel like I've *almost* got this worked out.

I stumbled across something tcpser4j, which I *believe* will do what I want (translate hayes modem -> telnet, enabling a terminal program to telnet). I finally have tcpser4j running on my Mac, but I'm just lacking one more piece to get it connected to Hatari.

If I can figure it out, I'll write it up here.

User avatar
Kirkman
Obsessive compulsive Atari behavior
Obsessive compulsive Atari behavior
Posts: 123
Joined: Fri Sep 03, 2010 2:29 am

Re: Can a terminal program in Hatari work with telnet BBS?

Postby Kirkman » Fri Dec 14, 2012 10:39 pm

I was able to get it to work. Using socat, Hatari can talk to tcpser4j, which handles the telnet. I wrote up an explanation here: http://breakintochat.com/blog/2012/12/1 ... -emulator/

User avatar
Eero Tamminen
Atari God
Atari God
Posts: 1650
Joined: Sun Jul 31, 2011 1:11 pm

Re: Can a terminal program in Hatari work with telnet BBS?

Postby Eero Tamminen » Mon Dec 17, 2012 6:19 pm

Kirkman wrote:I was able to get it to work. Using socat, Hatari can talk to tcpser4j, which handles the telnet. I wrote up an explanation here: http://breakintochat.com/blog/2012/12/1 ... -emulator/


Thanks, this looks cool! :-)

Have you tried playing any Atari multi-player games over the emulated R-S232?

If yes, have you had any problems with Hatari's RS-232 emulation?

User avatar
Kirkman
Obsessive compulsive Atari behavior
Obsessive compulsive Atari behavior
Posts: 123
Joined: Fri Sep 03, 2010 2:29 am

Re: Can a terminal program in Hatari work with telnet BBS?

Postby Kirkman » Mon Dec 17, 2012 8:25 pm

Eero Tamminen wrote:
Kirkman wrote:I was able to get it to work. Using socat, Hatari can talk to tcpser4j, which handles the telnet. I wrote up an explanation here: http://breakintochat.com/blog/2012/12/1 ... -emulator/


Thanks, this looks cool! :-)

Have you tried playing any Atari multi-player games over the emulated R-S232?

If yes, have you had any problems with Hatari's RS-232 emulation?


I have not, but only because I am unfamiliar with them... I never played any networked games back in the day.

I imagine it would work fine. You would probably need only socat to make the virtual serial connection between to machines.

User avatar
Eero Tamminen
Atari God
Atari God
Posts: 1650
Joined: Sun Jul 31, 2011 1:11 pm

Re: Can a terminal program in Hatari work with telnet BBS?

Postby Eero Tamminen » Fri Dec 21, 2012 3:07 pm

Kirkman wrote:You would probably need only socat to make the virtual serial connection between to machines.


For MIDI I've documented how to do that few years ago in doc/midi-linux.txt coming with Hatari. There are also scripts that can (at least under Linux) setup multiple local Hatari instances that are connected either by MIDI or serial over fifos. But I've tested it only locally and when there's a single person using all these instances, one isn't really able to do much simultenously (which might trigger the issues)...

User avatar
Kirkman
Obsessive compulsive Atari behavior
Obsessive compulsive Atari behavior
Posts: 123
Joined: Fri Sep 03, 2010 2:29 am

Re: Can a terminal program in Hatari work with telnet BBS?

Postby Kirkman » Fri May 24, 2013 2:22 am

Eero Tamminen wrote:
Kirkman wrote:I was able to get it to work. Using socat, Hatari can talk to tcpser4j, which handles the telnet. I wrote up an explanation here: http://breakintochat.com/blog/2012/12/1 ... -emulator/

Thanks, this looks cool! :-)
Have you tried playing any Atari multi-player games over the emulated R-S232?
If yes, have you had any problems with Hatari's RS-232 emulation?


Eero, I've been using my RS-232/telnet solution to try various terminal programs (ANSIterm, FzDT, VanTerm, etc). Generally speaking, they work. But there are some issues.

First let me describe my process:

1. Start tcpser4j. This is the program that watches for Hayes-style AT commands from a serial port, then turns it into a telnet connection.
2. Set socat to connect tcpser's port 25232 with the file /tmp/josh
3. Start Hatari.
4. Start terminal program.
5. Go to terminal's "online" mode.
6. Open Hatari preferences and enable RS232 emulation, using the /tmp/josh file.
7. Type "atdt darkforce" into terminal -- and boom, I'm connected.

The problem arises when I try to do step 6 sooner. For example, say I did it between steps 3-4 (right after launching Hatari). This almost *always* leads to a freeze when I start the terminal program, and I have to force-quit Hatari.

Until this week, that hadn't been an issue. So long as I remembered to wait to activate the RS232, things would be okay.

However this week I began testing a program I had never heard of before. It's a graphical front-end client for an Atari ST BBS game called "Thieves' Guild." It has the same problem I described above. I have to put the client into "online" mode before activating the RS232 port, or else it will freeze up. I *can* successfully call out to Dark Force from the TG client's online mode, using a Hayes-style "atdt darkforce" command.

The problem with that, though, is that this client has a "Call BBS" menu option. And I suspect it doesn't know it's connected to a BBS unless I use that "Call BBS" menu option. Consequently, the graphics and sound never activate when I launch the game on the BBS.

Is there anything I can do to help you figure out why Hatari freezes in these circumstances?

(I'd love to get this resolved, because I am really anxious to see what this TG client is like. I have a gut feeling it might be more impressive graphically than the many PC BBS game clients I have been trying in Dosbox recently).

Speaking of Dosbox, a second question for you. Dosbox has serial->telnet emulation built into it, to allow folks to dial out to BBSes using DOS terminal programs, etc. Could you graft the Dosbox serial->telnet code into Hatari?

User avatar
Eero Tamminen
Atari God
Atari God
Posts: 1650
Joined: Sun Jul 31, 2011 1:11 pm

Re: Can a terminal program in Hatari work with telnet BBS?

Postby Eero Tamminen » Fri May 24, 2013 7:17 pm

Kirkman wrote:The problem arises when I try to do step 6 sooner. For example, say I did it between steps 3-4 (right after launching Hatari). This almost *always* leads to a freeze when I start the terminal program, and I have to force-quit Hatari.

Until this week, that hadn't been an issue. So long as I remembered to wait to activate the RS232, things would be okay.

However this week I began testing a program I had never heard of before. It's a graphical front-end client for an Atari ST BBS game called "Thieves' Guild." It has the same problem I described above. I have to put the client into "online" mode before activating the RS232 port, or else it will freeze up. I *can* successfully call out to Dark Force from the TG client's online mode, using a Hayes-style "atdt darkforce" command.

The problem with that, though, is that this client has a "Call BBS" menu option. And I suspect it doesn't know it's connected to a BBS unless I use that "Call BBS" menu option. Consequently, the graphics and sound never activate when I launch the game on the BBS.

Is there anything I can do to help you figure out why Hatari freezes in these circumstances?


It sounds like something outside of Hatari. For example if fifos are used by the other programs in your procedure for emulating the serial connection, one end is frozen (by OS) until something connects to the other of the fifo. If separate fifos are used for serial input and output, there can be some dependency between this (I encountered this issue when writing the MIDI and RS-232 connection scripts in Hatari tools dir).

Kirkman wrote:(I'd love to get this resolved, because I am really anxious to see what this TG client is like. I have a gut feeling it might be more impressive graphically than the many PC BBS game clients I have been trying in Dosbox recently).

Speaking of Dosbox, a second question for you. Dosbox has serial->telnet emulation built into it, to allow folks to dial out to BBSes using DOS terminal programs, etc. Could you graft the Dosbox serial->telnet code into Hatari?


Sorry, not possible for several reasons:
* There's soon new Hatari release [1]
* I've recently started a new job and have time only for bug fixes
* While I look at most Hatari bugs, my main area in Hatari is its debugger, profiler and GEMDOS emulation

[1] New features are listed here:
http://hg.tuxfamily.org/mercurialroot/h ... -notes.txt

User avatar
DarkLord
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 4224
Joined: Mon Aug 16, 2004 12:06 pm
Location: Prestonsburg, KY - USA
Contact:

Re: Can a terminal program in Hatari work with telnet BBS?

Postby DarkLord » Wed Jun 05, 2013 8:02 pm

Kirkman wrote:
However this week I began testing a program I had never heard of before. It's a graphical front-end client for an Atari ST BBS game called "Thieves' Guild." It has the same problem I described above. I have to put the client into "online" mode before activating the RS232 port, or else it will freeze up. I *can* successfully call out to Dark Force from the TG client's online mode, using a Hayes-style "atdt darkforce" command.

The problem with that, though, is that this client has a "Call BBS" menu option. And I suspect it doesn't know it's connected to a BBS unless I use that "Call BBS" menu option. Consequently, the graphics and sound never activate when I launch the game on the BBS.


Hey, jump over to here:

viewtopic.php?f=3&t=25136

I started a new thread on the Thieves Guild. :)
Welcome To DarkForce! http://www.darkforce.org "The Fuji Lives.!"
Atari SW/HW based BBS - Telnet:darkforce-bbs.dyndns.org 520


Social Media

     

Return to “Hatari”

Who is online

Users browsing this forum: No registered users and 4 guests