MGR for Linux

MGR for Linux

Post by Jim Winstead J » Thu, 30 Apr 1992 10:50:33



Well, seeing that everyone was talking about MGR and using it as
possible alternative to X and all that jazz, I decided to take a look
at the MGR port for Minix, and see how easy/hard it would be to adapt
for Linux.

So far, I've noticed one major sticking point, and a few minor ones.
The major one is the screen-handling code, of which I tried to use the
gasblit code, but there is a rather major sticking point - screen.h is
missing, and from the looks of it, screen.c won't work anyways.

Okay, so that part is either going to need to be rewritten, or I've
been taking a look at the code from the Xenix port of MGR.  Neither
option looks like very much fun, especially since I have little to no
experience with graphics programming.

A more minor sticking point is that most of the terminal stuff is
written to use the BSD sgttyb structures.  I've worked with some of it
to convert it to Linux/POSIX termios stuff, and that isn't that tough,
I'm just not overly familiar with how it all works.  (As a side note,
wouldn't it be nice if Linux supported _both_ methods?)

I don't have anything working yet, so I can't really say what other
problems there might be.  If someone has the know-how about how Linux
handles the screen and graphics, they would probably have a pretty
good shot at porting MGR.  The rest of the points are stuff like bcopy
vs memcpy and the like.

It looks very much like the xenix blit code is a bust, since it's
chewing away at my memory right now, with reckless abandon.  Sigh.
Maybe the gasblit stuff won't be too hard to adapt, but I'm not
familiar with how to switch the video mode, etc, under Linux.  Anyone?
--
Jim Winstead Jr. (CSci '95)    | "Catch a fish!"
Harvey Mudd College            |  -Geddy Lee,

Disclaimer: Mine, not theirs!  |   January 20, 1992

 
 
 

MGR for Linux

Post by Paul All » Fri, 01 May 1992 06:43:50



[...about porting MGR...]

|So far, I've noticed one major sticking point, and a few minor ones.
|The major one is the screen-handling code, of which I tried to use the
|gasblit code, but there is a rather major sticking point - screen.h is
|missing, and from the looks of it, screen.c won't work anyways.

The screen.h file is generated by the vgaregs.exe program under DOS.  I
thought that there was a generic one included in the Minix MGR
distribution, but I could be wrong.  Screen.c probably will need
adapting for Linux.

The file patches/vga.regs.help on tsx-11 contains a linux port of the
low-level vga stuff from the Minix version of MGR.  It needs more work,
I think, but it apparently is good enough to demonstrate graphics under
Linux.  I haven't had time to play with it yet, and so cannot say how
well it works, or even what version of Linux it was intended for.

|A more minor sticking point is that most of the terminal stuff is
|written to use the BSD sgttyb structures.  I've worked with some of it
|to convert it to Linux/POSIX termios stuff, and that isn't that tough,
|I'm just not overly familiar with how it all works.  

Yeah, this will need some work.  Minix was a V7 clone, so it's tty
interface will be different from Linux.  I ported some code that did
serial communication between Ultrix, SunOS, and Xenix a long time ago.
My cube-mates probably found me hard to live with while I was actually
in the throes of it, but the problem really boiled down to just
puzzling out what the calls did in one OS and translating it into an
equivalent operation in the other.  Frustrating, but not impossible.

Paul Allen


 
 
 

MGR for Linux

Post by Jim Winstead J » Fri, 01 May 1992 07:31:37




>The screen.h file is generated by the vgaregs.exe program under DOS.  I
>thought that there was a generic one included in the Minix MGR
>distribution, but I could be wrong.

No, no default one, and no obvious pointers to the vgaregs.exe
program, so I didn't know what to do.  I hate it when that happens.

Quote:>Screen.c probably will need adapting for Linux.

That's how it looks.  Screen.c depends on a couple of ioctl calls that
don't exist yet under Linux, and it looks like it won't be a whole lot
of fun implementing them.  We'll see how it goes, though.

Quote:>|A more minor sticking point is that most of the terminal stuff is
>|written to use the BSD sgttyb structures.

>Yeah, this will need some work.  Minix was a V7 clone, so it's tty
>interface will be different from Linux.  I ported some code that did
>serial communication between Ultrix, SunOS, and Xenix a long time ago.
>My cube-mates probably found me hard to live with while I was actually
>in the throes of it, but the problem really boiled down to just
>puzzling out what the calls did in one OS and translating it into an
>equivalent operation in the other.  Frustrating, but not impossible.

Yes, it's very annoying....  In many ways, I think the termios stuff
make a lot more sense, and is more logically broken down into more
component parts (iflags, oflags, cflags, lflags), but in some ways
that just makes it more of a pain in the rear to convert the sgtty
stuff.  If you have any sort of tips, feel free to forward them on....

Someone has expressed interest in creating a MGR for Linux mailing
list - anyone else interested?  I don't have the resources to set on
up currently, and other people have said 'no' to a Mail-Net channel,
so I'm not sure how this would pan out....
--
Jim Winstead Jr. (CSci '95)    | "Catch a fish!"
Harvey Mudd College            |  -Geddy Lee,

Disclaimer: Mine, not theirs!  |   January 20, 1992

 
 
 

MGR for Linux

Post by Douglas E. Qua » Fri, 01 May 1992 14:09:59



Quote:

>A more minor sticking point is that most of the terminal stuff is
>written to use the BSD sgttyb structures.  I've worked with some of it
>to convert it to Linux/POSIX termios stuff, and that isn't that tough,
>I'm just not overly familiar with how it all works.  (As a side note,
>wouldn't it be nice if Linux supported _both_ methods?)

This would be great, and it's doable.  I have been tempted to start on
it myself a few times, but each time I've been overcome by inertia.
There are some difficulties getting the POSIX and BSD stuff to coexist,
but it's not too hard to get 95% of it right, and for the other 5% folks
would just have to rewrite their source.

Essential BSD ioctls:

        TIOCGETP, TIOCSETP, TIOCSETN,   (gtty, stty)
        TIOCGETC, TIOCSETC,             (special chars such as INTR, QUIT)

There are others but these would do most of the job.

Problems:
I only forsee two problems.  One, CBREAK mode doesn't have an exact
equivalent in the POSIX tty driver.  I guess you check for VMIN=VTIME=0.
Two, getting the flags in <sgtty.h> to agree with <termios.h>.  Most of
the flags in <sgtty.h> have the same name in <termios.h> and this is
(or could be) a problem because the flags are in a short in struct sgttyb
and in a long in struct termios.

--
Doug Quale

 
 
 

MGR for Linux

Post by Stephen A Uhl » Thu, 07 May 1992 08:51:49



...

Quote:>Someone has expressed interest in creating a MGR for Linux mailing
>list - anyone else interested?  I don't have the resources to set on
>up currently, and other people have said 'no' to a Mail-Net channel,
>so I'm not sure how this would pan out....

I would certainly be interested in participating in this mailing list.  
Although I don't yet have LINUX running (a local 386 machine shortage),
I am pretty familiar with the MGR source code, and would be willing to
help out.

Stephen Uhler

 
 
 

MGR for Linux

Post by Stephen A Uhl » Thu, 07 May 1992 08:55:46




>>A more minor sticking point is that most of the terminal stuff is
>>written to use the BSD sgttyb structures.  I've worked with some of it
>>to convert it to Linux/POSIX termios stuff, and that isn't that tough,
...
>but it's not too hard to get 95% of it right, and for the other 5% folks
>would just have to rewrite their source.

...
I have the termio version of all of the tty stuff used in MGR, from a system
V.2 port I did in '86.  I'd be glad to dig it up if anyone would like

Stephen Uhler

 
 
 

MGR for Linux

Post by Jim Winstead J » Thu, 07 May 1992 09:58:00





>>>A more minor sticking point is that most of the terminal stuff is
>>>written to use the BSD sgttyb structures.  I've worked with some of it
>>>to convert it to Linux/POSIX termios stuff, and that isn't that tough,
>...
>>but it's not too hard to get 95% of it right, and for the other 5% folks
>>would just have to rewrite their source.

>...
>I have the termio version of all of the tty stuff used in MGR, from a system
>V.2 port I did in '86.  I'd be glad to dig it up if anyone would like

That would be great - if you could upload it to one of the Linux
archive sites, that would be really great.  (Perhaps just ftp.uu.net
or some other temporary repository, instead, since it's not real
useful outside of MGR porting, I would guess..)

On a related note, I've created a MGR channel on Mail-Net.  To join,

the first line, and send mail with 'X-Mn-Key: MGR' to post to the
list.  Instructions are available by mailing linux-activists-request
at the same site.

--
                                    +    Jim Winstead Jr. (CSci '95)
                                    |            Harvey Mudd College

                                    + This is all my words.  Honest!

 
 
 

MGR for Linux

Post by Ari Lemm » Mon, 11 May 1992 07:24:20



:   On a related note, I've created a MGR channel on Mail-Net.  To join,

                                                                ^^^^^^^
        Should be 'X-Mn-Admin: join MGR' ...

:                                      +    Jim Winstead Jr. (CSci '95)

        arl