Jump to content
IGNORED

Atari 8-bit as Linux terminal - what do i need?


oracle_jedi

Recommended Posts

I've seen a few articles on making an ST into a Linux terminal by connecting the ST to the PC's serial port and running a terminal service under Linux that presents a login to the serial port.

 

The Linux part is fairly straightforward and well documented.

 

But what would i need to do this on the Atari 8-bit side?

 

Do I need an 850 interface box, a cable and a copy of Ice-T? Is there a better solution?

What if I want to use an XEP80 interface for proper 80-column mode?

 

Has anyone done this? How did you do it?

 

Thanks

 

 

Graham

Link to comment
Share on other sites

An SIO2PC cable with R-verter/Bobverter/SX212 driver, or an 850 or P:R: Connection (remember those?)

 

...and Bobterm or Ice-T or whatever. Terminal software on the Atari side anyway... whether or not you use an XEP80 depends on whether it's supported by the terminal program.

 

On the Linux side, whatever set of directions you're following for setting up serial port logins with the ST will work fine for 8-bit, but... if you're using an SIO2PC, the carrier detect line isn't hooked up to anything, so you'll need to run your getty in "local" mode (for agetty, this is the -L option). If you're using an 850's first serial port, this shouldn't be necessary, but ports 2/3/4 don't have all the lines hooked up either... and remember an 850's 9-pin connector has a totally different pinout from a PC-style 9-pin RS232 port. Basically everything you need to know about the 850, you can find in the manual that came with it.

 

Ice-T does a pretty good job of software 80 column mode with VT100 emulation: I've gotten it to display the links browser, irssi IRC client, vim editor, and it even works with screen. If it locks up on you, reduce the baud rate. With an SIO2PC and the RVERTER.COM driver (from the Bobterm disk), I got 4800bps to work with most apps, 9600 wasn't reliable with anything... 2400 was rock-solid, but of course slow. I did hook up an 850 briefly, but I can't remember whether I even tried it at higher speeds.

 

With Bobterm you only get 40 columns (unless it supports the XEP80; I haven't got one to test with) and VT52 emulation. I got lynx (not links) to work in 40 columns with Bobterm (in bash: export TERM=vt52; export COLUMNS=40; export LINES=23), but it sometimes leaves junk on the screen when it should be clearing it. Unfortunately most IRC clients don't work with VT52 emulation (missing capability or two), but you might try rhapsody... and epic seems to work OK with TERM=dumb (though it's kind of a pain to actually use it that way).

 

BTW, I've forgotten how to type a ~ (tilde) in Bobterm...

 

Another thing to watch out for: if you use AtariSIO to load the terminal program, you'll have to "rmmod atarisio" before enabling the serial port login, and disable the serial login and "modprobe atarisio" again before running atariserver. Probably a good idea to use a shell script, something like:

 

#!/bin/sh

# run me as root

while true; do
  modprobe atarisio port=/dev/ttyS0
  atariserver bobterm.atr
  echo "Press Enter for serial login, or ^C to exit"
  read i
  rmmod atarisio
  sleep 1 # may not be necessary on all systems
  agetty -L ttyS0 4800 vt100 &
  # toggle_rts   # if using a smart/autosensing SIO2PC
  echo "Press Enter for atariserver, or ^C to exit"
  read i
  fuser -k /dev/ttyS0
  sleep 1
  fuser -k -9 /dev/ttyS0
done

 

If you're using an 850 or a plain "dumb" SIO2PC, it'll work as-is. If you've got a smart SIO2PC (like the ones Steve Tucker sells at atarimax.com), it monitors the state of the RTS line to decide whether to run in SIO2PC or 1050-2-PC/Prosystem mode... agetty will clear the RTS line, so you'll need a way to set it. I wrote a dumb little C program to do it:

 

/* Compile with:
gcc -o toggle_rts toggle_rts.c

Change PORT if necessary.
*/
#define PORT "/dev/ttyS0"

#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>

#include <stdio.h>
#include <stdlib.h>
#include <termios.h>
#include <errno.h>
#include <sys/ioctl.h>
#include <linux/serial.h>

int main() {
int fd, status;

fd = open(PORT, O_RDWR);
if(fd < 0) {
	perror(PORT);
	return 1;
}

ioctl(fd, TIOCMGET, &status);
if(status & TIOCM_RTS) {
	fprintf(stderr, "RTS set\n");
} else {
	fprintf(stderr, "RTS clear\n");
}
status &= ~TIOCM_RTS;
ioctl(fd, TIOCMSET, &status);
return 0;
}

 

This has to run *after* agetty starts... alternatively you could get the agetty source and patch it to set RTS after opening the port.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...