[comp.sources.d] Does MGR run on other systems besides Suns?

m2@insyte.UUCP (Mike Arena) (02/08/89)

I just got MGR off of comp.sources.unix and I've only seen mention of of
this working on Suns.  Does this run on other machines (like Apollos)?
Has anyone tried to port it to other machines?
-- 
Michael J. Arena  (617) 965 8450    | UUCP: ...harvard!linus!axiom!insyte!m2
Innovative Systems Techniques       |       ...harvard!necntc!lpi!insyte!m2
1 Gateway Center, Newton, MA 02158  | ARPA: insyte!m2@harvard.harvard.edu

sau@wind.bellcore.com (Stephen A Uhler) (02/10/89)

In article <213@insyte.UUCP> m2@insyte.UUCP (Mike Arena) writes:
>
>I just got MGR off of comp.sources.unix and I've only seen mention of of
>this working on Suns.  Does this run on other machines (like Apollos)?
>Has anyone tried to port it to other machines?

One of the original reasons I wrote MGR was to reduce our dependence on SUNS,
so some care was taken to make MGR portable, and not Sun specific.  However,
since I still have one, SUN's are still MGR's primary development platform.

I ported MGR to a home-made SYSTEM-V look alike in about a day, and a summer
student ported MGR to a MAC+ (running MAC-OS) in about a week.  In both cases
MGR was restructured to further isolate any system dependencies, hopefully
making the next port easier. Here are some pointers to get you started:

1) Hardware requirements
   - MGR assumes that data may be copied between the frame buffer
    (display memory) and main memory efficiently.  If your machine
    can't do this, you might be in for trouble.  Last I looked, MGR spent
    > 90% of its time updating, saving and restoring parts of the display.
    MGR's performance is directly proportional to the BitBlt speed of
    your machine.
   - MGR uses a 3-botton mouse.  If you don't have one you have to fake it.

2) Porting procedure
   - Write the routines to do BitBlits (i.e. blitlib.a).  If you have a 68020
     you can adapt the stuff in src/blit; if your computer provides BitBlt
     routines (it should), look at the stuff in src/pixrect for a model.
   - rewrite mouse_get(), the MGR mouse interface routine, or
     get a Mouse System's (or compatable) mouse, and plug it into the
     serial port, just to get going.
   - If you have 4.2ish Unix, turn off the sun specific KBD, and BELL compile
     options and you're about done.
	- If you have a SYSTEM-Vish Unix, you need to a) redo the terminal i/o stuff
     in set_mode.c, b) change getshell.c to use the local pseudo-tty and
     process group conventions and c) if you have select() fix mgr.c to use
     select properly or (yuk! no select) just poll all of the file descriptors
     in non-blocking mode, and use a 10th second read timeout on the keyboard
     (stdin) to keep from hogging all of the CPU. (I have a list of changes
     I made for my SYS_V port I can give you).
   - If you have a NON-UNIX machine, it still isn't too bad if you have
     a reasonable display, a mouse, can read and write files, and can deal
     with multiple file descriptors.