[comp.sys.atari.st] Setscreen

jdn@homxc.UUCP (01/28/87)

[]

I have a problem which should be a piece of cake
for you ST hackers out there.

I want to write a simple TOS terminal communications
program with a split screen.  In the upper half of the screen
I will display the input from the RS-232 port.  At the same time,
the user should be able to enter characters at the keyboard which
will be stored in a buffer for later transmission. I want to
display the typed data in the lower half of the screen while the
upper half is displaying the data received at the RS232 port.

What is the best way to do this?  I have been fidelling with the
Setscreen call, but my documentation (MWC + Abacus) lacks
sufficient information on the layout of the memory block passed to
this call.  In some of the source code I've seen, I've seen
Mallocs with a size of (32*1024) + 256.  I presume this maps to the
screen somehow, but what is  the precise mapping?  Can I mix the two
screens? For example, suppose I define screen2 as 16*1024 + 256.
Will this only print out in the upper (lower) half of the screen
while the other half remains intact?

Any info on this will be greatly appreciated. Thanks.

franco@iuvax.UUCP (01/28/87)

We in Bloomington have added a talk feature to the xmdm terminal
communications package developed at CWRU by Bammi.  If you want the
sources (a floppy's worth) send a disk to 

John Franco
2535 Spicewood Lane
Bloomington, IN 47401

and I will copy it for you.  Please specify that you want the sources
so that I know you are not after the STarter Kit.

sansom@trwrb.UUCP (01/30/87)

In article <1889@homxc.UUCP> jdn@homxc.UUCP (J.NAGY) writes:
>I have a problem which should be a piece of cake
>for you ST hackers out there.
>I want to write a simple TOS terminal communications
>program with a split screen.  In the upper half of the screen
>I will display the input from the RS-232 port.  At the same time,
>the user should be able to enter characters at the keyboard which
>will be stored in a buffer for later transmission. I want to
>display the typed data in the lower half of the screen while the
>upper half is displaying the data received at the RS232 port.
>What is the best way to do this?

What you want to do is possible (at least, I think it is ;-),
unfortunately, there is no easy way to do it.  The xbios Setscreen()
call will only allow you to change the entire screen's physical and/or
logical location in memory (it must be on a 256 byte boundry).  In
order to change the physical screen "on the fly" (that is, somewhere
between the top and bottom scan lines) you would need to change the
memory address the video scanner is using to scan the screen at the
instant (in the frame being drawn) you want your second screen to
appear.  This would involve extensive knowledge of the ST's video
chip (isn't it called the "shifter"?).  Unfortunately, again, there
has been no official documentation from Atari showing how to do this.
I imagine some individuals have managed to wrangle this info out of
Atari HQ, but I haven't (not that I've really tried).

Your best bet may be to do the screen manipulation yourself - either
using GEM & windows (slow), or TOS & the "glass terminal"/VT52 escape
sequences.  Good luck!

-Rich

-- 
 __________ ______ ____ _____ ___
/_________//___   ||__|/____|/__/   Richard E. Sansom
   ___    ____/  / ____________     TRW Electronics & Defense Sector
  /  /   /  /\  <  |    /|    /     One Space Park Drive, R3/1028
 /  /   /  /  \  \ |   / |   /      Redondo Beach, CA 90278
/__/   /__/    \__\|__/  |__/       ...{decvax,ucbvax,ihnp4}!trwrb!sansom

bammi@cwruecmp.UUCP (01/31/87)

In article <1571@trwrb.UUCP> sansom@trwrb.UUCP (Richard Sansom) writes:
>In article <1889@homxc.UUCP> jdn@homxc.UUCP (J.NAGY) writes:
>>I want to write a simple TOS terminal communications
>>program with a split screen.  In the upper half of the screen
>
>order to change the physical screen "on the fly" (that is, somewhere
>between the top and bottom scan lines) you would need to change the
>memory address the video scanner is using to scan the screen at the
>instant (in the frame being drawn) you want your second screen to

	I did reply to the origonal poster, and thought that this might be
of interest to others too. When using the screen in the glass tty mode,
you can change the size of the display on the fly. The integer (word) at
location -42 bytes (CELLSHIGH for those who have aline.h that i posted)
from the line A parameter block address (the address you get
in A0 after a Line A init) holds the value of Max number of character cell
high -1. So if you want a 15 line terminal you would write the value 14 into
this location. Then you would get a 15 line terminal that scrolls when to
write a CRLF at the end of the 15th line. This would make writing the split
screen a little easier, as you only have to manage the lower part yourself
with cursor control (which is presume would be assigned to the lower
bandwidth user input). Rich's idea about changing the screen location sounds
rather interesting too..
-- 
usenet: .....!decvax!cwruecmp!bammi		jwahar r. bammi
csnet:       bammi@case
arpa:        bammi%case@csnet-relay
compuServe:  71515,155