home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / windows / x / 19304 < prev    next >
Encoding:
Internet Message Format  |  1992-11-18  |  11.3 KB

  1. Path: sparky!uunet!destroyer!ncar!noao!arizona!azhao
  2. From: azhao@cs.arizona.edu (Qiang Alex Zhao)
  3. Newsgroups: comp.windows.x
  4. Subject: Re: X11R5  Hi-Res mono patch?
  5. Message-ID: <26726@optima.cs.arizona.edu>
  6. Date: 18 Nov 92 22:16:10 GMT
  7. References: <BxxKFr.D74.2@cs.cmu.edu>
  8. Sender: news@cs.arizona.edu
  9. Followup-To: comp.windows.x
  10. Organization: Computer Science Dept, Univ of Arizona, Tucson
  11. Lines: 242
  12.  
  13. In article <BxxKFr.D74.2@cs.cmu.edu>, moody@e4.ius.cs.cmu.edu (James Moody) writes:
  14. |> I understand that a similar problem exits with the 24-bit sun displays, too.
  15. |> ...
  16.  
  17. Maybe you can take a look at the "multi-screen" X server?
  18.  
  19. ........................................................................
  20. Advantages:
  21.  
  22.   o Correct multi-screen support.
  23.  
  24.   o Might also get to use 24-bit frame buffers, but NOT in 24-bit mode.
  25.     I.e. we may be able to use our new color monitor in 24-bit mode,
  26.     which means more colors...
  27.  
  28.   o Built in support for *all* Sun keyboards including NumLock, CapsLock,
  29.     and Compose keys.  Credit to Martin Forssen for actually doing the
  30.     work.
  31.  
  32.   o Fixed a bug that caused a spurious abort when running via xdm.
  33.  
  34.   o Recognition of frame buffer emulation modes.  (from the author:
  35.     "You still have to set the driver/frame buffer into emulation
  36.     mode. I may 'fix' this someday, but real work keeps getting into
  37.     the way, and I don't have a cgeight, cgnine, or a cgtwelve to test
  38.     with anyway.")
  39.  
  40. The README follows:
  41. ........................................................................
  42. The R5 Xsun Multi-screen server is a general purpose replacement for the 
  43. MIT server/ddx/sun layer.  
  44.  
  45. This release *includes* the enhanced keyboard support written by Martin
  46. Forssen (maf@dtek.chalmers.se).  It is *already* built in.  It is not 
  47. necessary to apply the patch.  FYI, the original patch to the MIT sample 
  48. server is available separately from export.lcs.mit.edu (18.24.0.12), as 
  49. /contrib/sunkbd.tar.Z.
  50.  
  51. (Impatient?  Want to build now!  Build instructions are at the end of
  52. this file.)
  53.  
  54. It was written to fulfill the following requirements:
  55.  
  56. First, (and foremost) to support up to three of the same type of
  57. frame buffers on VME and S-Bus architectures.
  58.  
  59. Second, to simplify the interface to the frame buffers.
  60.  
  61. Perhaps it goes without saying, but the current implementation, as
  62. distributed by MIT, is a real jumble.  Or, if I may use Keith Packard's
  63. own term, crufty.  Adding support for new devices is less than easy.
  64. The code was not, IMHO clear or easy to follow, and there was a lot
  65. of redundant code spread across the various sunCG?C.c and sunBW2.c
  66. files, particularly in regard to mmap()'ing the frame buffer memory.
  67. There was also a lot of apparent disagreement about just how the
  68. frame buffer memory should be mmap()'ed.  It is still not clear to me
  69. that it is neccessarily correct, if it is wrong now, it is uniformly
  70. wrong :-) I believe that it should also, at this point, be much easier 
  71. to add new devices.
  72.  
  73.  
  74. Third, to eliminate the SunView support.
  75.  
  76. The King is dead.  Long live the King.  The X Window system has been
  77. with us long enough that most applications now have an X Window counterpart.
  78. If you're using all available frame buffers for X, it's probably unlikely
  79. that you're using SunView anyway.  If you need the SunView support,
  80. use the MIT incarnation of Xsun.  Is it just me, or does it not make
  81. sense to run Xsun on top of Sun's xnews?
  82.  
  83. =============================================================================
  84.  
  85. Things to know and miscellaneous notes:
  86.  
  87. In addition to adding multi-screen, you might also get to use your 
  88. 24-bit frame buffers, but NOT in 24-bit mode.  Generally, the device
  89. drivers support emulation of lesser devices, e.g. I know that the cgsix
  90. (GX) device driver will report that it emulates a cgfour, cgthree, and 
  91. a bwtwo.  But, with the GX supported, it should never be necessary to
  92. resort to emulation mode.  If the device you specify, either via XDEVICE, 
  93. -dev, or by the fallback to /dev/fb reports that it'll do cgthree emulation, 
  94. the server will try to treat the frame buffer as such.
  95.  
  96. XDEVICE environment variable.  Xsun will look here first to get the
  97.     device(s) to try; examples:  
  98.  
  99.     'setenv XDEVICE /dev/cgtwo0:/dev/cgtwo1' 
  100.     'setenv XDEVICE /dev/cgeight0'
  101.     'setenv XDEVICE /dev/cgthree0:/dev/cgsix0'
  102.     'setenv XDEVICE /dev/cgsix0:/dev/cgthree0'
  103.  
  104. -dev command line argument.  Xsun will look here second, and override
  105.     XDEVICE specified devices, to get the device(s) to try; examples:
  106.  
  107.     'Xsun -dev /dev/cgtwo0:/dev/cgtwo1'
  108.     'Xsun -dev /dev/cgeight0'
  109.     'Xsun -dev /dev/cgthree0:/dev/cgsix0'
  110.     'Xsun -dev /dev/cgsix0:/dev/cgthree0'
  111.  
  112. fallback list.  If neither of the two methods listed above are employed,
  113.     Xsun will resort to a fallback list of devices to try.  The list is:
  114.  
  115.     /dev/cgtwo0, /dev/cgtwo1, /dev/cgtwo2, /dev/cgthree0, /dev/cgthree1,
  116.     /dev/cgthree2, /dev/cgsix0, /dev/cgsix1, /dev/cgsix2, /dev/cgfour0,
  117.     /dev/bwtwo0, /dev/bwtwo1.
  118.  
  119.  
  120. cgfour note:
  121.     Some Suns are equipped with a mono frame buffer on the mother board.
  122.     All cgfours have an implicit mono frame buffer.  /dev/bwtwo0, I believe 
  123.     will find the mother board frame buffer rather than the cgfour mono 
  124.     plane.  In the absence of a real bwtwo, /dev/bwtwo0 will find the
  125.     cgfour mono plane.
  126.  
  127.     If you experience strange behaviour, i.e. you have a cgfour and the 
  128.     cursor appears to go off the side of the screen, override the
  129.     fallback list with either XDEVICE or -dev, e.g. 'Xsun -dev /dev/cgfour'
  130.  
  131.     Likely ways of having a bwtwo are: real bwtwo frame buffer in a
  132.     slot, real bwtwo frame buffer on the mother board (3/60 only),
  133.     or the cgfour emulates a bwtwo.  Real problems arise when you
  134.     have both a cgfour and another bwtwo.  What happens is that the
  135.     real bwtwo is assigned to /dev/bwtwo0, but this server expects
  136.     /dev/bwtwo0 to be the mono plane of the cgfour, when there is
  137.     one.  The consequences are, that dragging the pointer off the
  138.     edge of the screen causes the cgfour code to enable the mono
  139.     plane; that's okay when the /dev/bwtwo0 is using the cgfour
  140.     mono plane, but not okay when it's some other bwtwo, especially
  141.     if that other bwtwo isn't hooked up to a monitor.
  142.  
  143.     As there is no way to tell from software whether a given bwtwo
  144.     is real or emulated, it poses real problems with trying to
  145.     automagically set up the server to handle all the available
  146.     hardware correctly.  Possible work arounds are:
  147.       1) specify the device list with either -dev or XDEVICE.
  148.       2) specify -zaphod
  149.       3) ensure that /dev/bwtwo0 uses the cgfour:
  150.          'cd /dev;mv bwtwo0 bwtwo1;MAKEDEV bwtwo0' is alleged to work.
  151.  
  152. cgeight/cgnine/cgtwelve note:
  153.     Sun apparently has a program that will allow these devices to emulate
  154.     other "supported" devices.  MIT's Xsun check the emulation mode in
  155.     a sort of backward way, thus, a cgeight, emulating a cgfour would
  156.     be rejected, and would terminate claiming that no screens were found.
  157.     Needless to say, if a cgeight is found and is emulating a "supported"
  158.     device, it will be used.  Please note, that since I don't have any of 
  159.     these devices, I haven't tested this feature.
  160.  
  161. xdm note:
  162.     Running Xsun with xdm has a funny peculiar problem.  The keyboard
  163.     driver will erroneously report an unknown keyboard type within
  164.     750 milliseconds.  Normally this isn't a problem if you're running 
  165.     via xinit.  xdm, on the other hand, can (and does) terminate and 
  166.     re fork-and-exec the server fast enough to encounter this.  The poor 
  167.     server, thinks it's got an unknown keyboard type, aborts and leaves 
  168.     a spurious core file.  This timing problem was previously addressed 
  169.     in some other keyboard code.
  170.  
  171. Sun 386i note:
  172.     The source contains conditional compilation for building on Sun's
  173.     386 boxes, which eliminates support for devices that will never be
  174.     found on a Sun 386, and therefore, a smaller binary than might
  175.     otherwise be created.  Sun's 386 compiler has a severe bug and
  176.     will not generate correct code for mi/miscrinit.c, and cfb/cfbteblt8.c
  177.     You may overcome this flaw by compiling all the server code, or just 
  178.     these two files with gcc.  I have used both gcc-1.39 and gcc-1.40 with 
  179.     success.
  180.  
  181. Bug fixes to server/ddx/mi:
  182.     There is a bug in ddx/mi with regard to tracking the pointer across
  183.     multiple screens.  This apparently seems to only be a problem on
  184.     machines where there is no hardware cursor support.  This is true
  185.     of all the "supported" Sun frame buffers.  Three files are supplied
  186.     to fix the bug.  These files came from MIT, and, although the need
  187.     to make them "public fixes" might seem apparent to those of us using
  188.     multiple screens, MIT doesn't feel that the fixes, or the bug that
  189.     they fix are critical enough to warrant their inclusion into a public 
  190.     fix.  I've been told not to expect them to be official in any respect 
  191.     until R6.  If you disagree with this assessment, I encourage you to 
  192.     let MIT know.  Perhaps if enough people ask nicely, they'll make them 
  193.     official by distributing them in a public fix.
  194.  
  195.     If you don't want to install the three ddx/mi files, the multi-screen
  196.     feature will still work; you'll get apt to get some strange cursor
  197.     behavior, particularly if you warp the pointer from screen to screen.
  198.  
  199.  
  200. New constype.
  201.     The old constype was pretty nearly useless (apologies to the original 
  202.     author) and initial versions of the R5.Xsun.multi-screen didn't include 
  203.     it for that, and some other reasons.  The new constype probes for all 
  204.     the devices that Xsun supports, and reports any that it finds.
  205.  
  206.  
  207. Old kbd_mode.
  208.     Is included for completeness.
  209.  
  210.  
  211. Credits:
  212.     Thanks to George Ross (gdmr@dcs.edinburgh.ac.uk) for pointing
  213.     out that I broke the support for high resolution monochrome
  214.     monitors -- it's fixed now.
  215.  
  216.     Thanks to Jordan Hayes (jordan@moorenet.com) for pushing me to
  217.     include (and indirectly to rewrite) constype and kbd_mode.
  218.  
  219.     Thanks to Andrew McRae (andrew@megadata.mega.oz.au) for finding
  220.     a bug when used with Sun's SunOS GX patch -- it's fixed now.
  221.  
  222.     Thanks to Martin Forssen (maf@dtek.chalmers.se) and Ian Daniel
  223.     (daniel@europarc.xerox.com) for the enhanced keyboard support and
  224.     encouraging me to put it in, respectively.
  225.  
  226.  
  227. Followup thoughts:
  228.     If you're concerned, (and rightfully so) that I might have broken
  229.     something else, rest assured that: 1) I didn't change the way any of 
  230.     the critical mouse/keyboard handling stuff works.  2)  I've been
  231.     adding multi-screen support to Xsun since R3.  I have been running
  232.     this code since shortly after the public release of R5.  This code is 
  233.     also in wide use by numerous others, world-wide.
  234.  
  235.  
  236. Installation instructions:
  237.     'cd .../mit/server'
  238.     'mv ddx/sun ddx/sun.orig'
  239.     'mv ddx/mi/mieq.c ddx/mi/mieq.c.orig
  240.     'mv ddx/mi/mipointer.c ddx/mi/mipointer.c.orig
  241.     'mv ddx/mi/mipointrst.h ddx/mi/mipointrst.h.orig
  242.     'mv ../include/Sunkeysym.h ../include/Sunkeysym.h.orig'
  243.     'zcat R5.Xsun.multi-screen.tar | tar xvf -'
  244.     'make'
  245.  
  246. If you have any questions or comments, please send them to:
  247.  
  248. kaleb@thyme.jpl.nasa.gov
  249.  
  250. -- 
  251. = Qiang Alex Zhao                 ___       .             ______
  252.   Computer Science Dept          /   )     /|   )          __//  )
  253.   University of Arizona         /   /     /_|  / _        //    /_  _. ._
  254.   azhao@cs.arizona.edu         (__)(_o   /  (_(_(-'_)(   ((____/ (_(_(_(_)
  255.