ntakahas@langue.is.tsukuba.ac.jp (TAKAHASHI Naoto) (10/26/90)
Submitted-by: ntakahas@langue.is.tsukuba.ac.jp (TAKAHASHI Naoto) Posting-number: Volume 10, Issue 23 Archive-name: sun.serpatch/part01 [ moderator's note: This is a virtual repost of volume 9, issue 13. It contains patches for the Xsun X11R4 server to support the GC8 and 9 framebuffer. This is an updated version of that patch. It is not an official MIT patch, but its usefulness merits its posting. --dan ] Here is a new Xsun for CG8/CG9. Now you can draw on the monochome screen any time you want. And it works faster in text drawing and window moving. So put my previous server to /dev/null and use this. The patches should be applied to the MIT version of X11R4, not to my previous one. Hope you like it. TAKAHASHI Naoto Doctoral Program in Engineering, University of Tsukuba ntakahas@is.tsukuba.ac.jp ---------------------------------------------------------------------- #! /bin/sh # This is a shell archive. Remove anything before this line, then unpack # it by saving it into a file and typing "sh file". To overwrite existing # files, type "sh file -c". You can also feed this as standard input via # unshar, or by typing "sh <file", e.g.. If this archive is complete, you # will see the following message at the end: # "End of shell archive." # Contents: CHANGES README VERSION X.sample cg9.diff doit.sh # Wrapped by ntakahas@langue on Thu Oct 4 07:19:44 1990 PATH=/bin:/usr/bin:/usr/ucb ; export PATH if test -f 'CHANGES' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'CHANGES'\" else echo shar: Extracting \"'CHANGES'\" \(293 characters\) sed "s/^X//" >'CHANGES' <<'END_OF_FILE' X90/09/03 Complete two screen support. You are not bothered by X the `shade' of the monochrome screen any more. X X90/09/15 cfbmskbits.h was shaped up for 32bit/pixel. X pixrect code was inserted in cfbbitblt.c and sunInit.c. X X90/09/16 cfbtegblt.c and cfbbitblt.c were optimised for 32bit/pixel. END_OF_FILE if test 293 -ne `wc -c <'CHANGES'`; then echo shar: \"'CHANGES'\" unpacked with wrong size! fi # end of 'CHANGES' fi if test -f 'README' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'README'\" else echo shar: Extracting \"'README'\" \(2353 characters\) sed "s/^X//" >'README' <<'END_OF_FILE' XThis is my new version of the Xsun for CG8/CG9 24-bit colour boards. XCall this version 1.0 and forget about my previous patch. X XThe code was tested on the following platforms: X XSun4/330GXP SunOS 4.0.3 with Sun cc XSun4/110TC SunOS 4.1 with Sun cc XSun3/80 TFC SunOS 4.0.3 with gcc1.35, gcc1.37.1 X XIt supports CG8 and CG9 (and BW2, of course). Other colour boards, Xsuch as CG4 and CG6, are NOT supported. See the file named X.sample Xif you want your /usr/bin/X11 directory to be shared by both 8-bit Xcolour systems and 24-bit colour systems. X XLike a CG4 server, it has two screens: a colour screen (screen 0) and Xa monochrome screen (screen 1). The screens toggle when the mouse Xcursor goes off the side edges. X X XHOW TO MAKE X XThis patch should be applied to the MIT release of X11R4, not to my Xprevious patch. It seems that the official patch level does not Xmatter. X X1. Copy `cg8.diff', `cg9.diff', and `doit.sh' to $(TOP)/mit/server. X X2. cd to $(TOP)/mit/server. X X3. Run `doit.sh'. The patches will be applied and the sources will be Xcompiled automatically. X X4. Test the new Xsun by `xinit -- ./Xsun'. X X5. If everything seems OK, replace the old Xsun with the new one. X X XABOUT CLIENTS X XThis server is a TrueColor server. So the clients which dynamically Xchange the colormap do not work. X XMost of the MIT clients work fine. Unfortunately, however, some Xclients do not run with this server. Ico does not work when more than Xone colour is specified for -colors option. Xfade does not support Xthe TrueColor visual type. Xterm, xbiff, xclock, oclock, twm, xmag, Xetc. work fine. Xcolors is attractive. X XIf you are a twm user, do not forget to set XORvalue to 16777215 (= X2^24 - 1) in your .twmrc, or the window outlines for moving and Xresizing are not visible. X XUser contributed clients may or may not work. Xphoon works, but it Xtakes relatively long time to start up and to redraw the root window. XXothello works fine, except that when you play black your tile cannot Xbe seen until you put it on the board. Xtartan looks good. Emacs Xwith the X11 functionality works fine. Olwm works to some extent. X X XThis version is faster than my previous one, but I'm not satisfied Xwith the performance. Anyone is welcome to inprove it. X XEnjoy. X X- ntakahas X XTAKAHASHI Naoto XDoctoral Program in Engineering, University of Tsukuba Xntakahas@is.tsukuba.ac.jp END_OF_FILE if test 2353 -ne `wc -c <'README'`; then echo shar: \"'README'\" unpacked with wrong size! fi # end of 'README' fi if test -f 'VERSION' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'VERSION'\" else echo shar: Extracting \"'VERSION'\" \(32 characters\) sed "s/^X//" >'VERSION' <<'END_OF_FILE' XThis patch set is version 1.00. END_OF_FILE if test 32 -ne `wc -c <'VERSION'`; then echo shar: \"'VERSION'\" unpacked with wrong size! fi # end of 'VERSION' fi if test -f 'X.sample' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'X.sample'\" else echo shar: Extracting \"'X.sample'\" \(286 characters\) sed "s/^X//" >'X.sample' <<'END_OF_FILE' X#!/bin/sh X# If your /usr/bin/X11 directory is shared by both 8-bit colour systems X# and 24-bit colour systems, install the 24-bit server as /usr/bin/X11/Xsun24 X# and use this shell script as /usr/bin/X11/X Xif [ `constype` = rop -o `constype` = bw4 ]; then X Xsun24 $@ Xelse X Xsun $@ Xfi END_OF_FILE if test 286 -ne `wc -c <'X.sample'`; then echo shar: \"'X.sample'\" unpacked with wrong size! fi chmod +x 'X.sample' # end of 'X.sample' fi if test -f 'cg9.diff' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'cg9.diff'\" else echo shar: Extracting \"'cg9.diff'\" \(1842 characters\) sed "s/^X//" >'cg9.diff' <<'END_OF_FILE' Xdiff -arcN server/ddx/sun/Imakefile cg9/ddx/sun/Imakefile X*** server/ddx/sun/Imakefile Sun Sep 16 23:48:03 1990 X--- cg9/ddx/sun/Imakefile Sun Sep 16 23:44:03 1990 X*************** X*** 9,14 **** X--- 9,15 ---- X sunMouse.c \ X sunUtils.c \ X sunCG8C.c \ X+ sunCG9C.c \ X sunKeyMap.c X X SRCS = $(SRCS1) kbd_mode.c constype.c X*************** X*** 23,28 **** X--- 24,30 ---- X sunMouse.o \ X sunUtils.o \ X sunCG8C.o \ X+ sunCG9C.o \ X sunKeyMap.o X X INCLUDES = -I. -I../mfb -I../mi -I../../include -I$(INCLUDESRC) Xdiff -arcN server/ddx/sun/sunCG9C.c cg9/ddx/sun/sunCG9C.c X*** server/ddx/sun/sunCG9C.c Tue Sep 25 21:50:30 1990 X--- cg9/ddx/sun/sunCG9C.c Sun Sep 16 23:44:05 1990 X*************** X*** 444,450 **** X int fd; X struct fbtype fbType; X X! if ((fd = sunOpenFrameBuffer(FBTYPE_MEMCOLOR, &fbType, index, fbNum, X argc, argv)) < 0) X return FALSE; X X--- 444,450 ---- X int fd; X struct fbtype fbType; X X! if ((fd = sunOpenFrameBuffer(FBTYPE_SUNROP_COLOR, &fbType, index, fbNum, X argc, argv)) < 0) X return FALSE; X Xdiff -arcN server/ddx/sun/sunInit.c cg9/ddx/sun/sunInit.c X*** server/ddx/sun/sunInit.c Sun Sep 16 23:50:06 1990 X--- cg9/ddx/sun/sunInit.c Sun Sep 16 23:44:04 1990 X*************** X*** 59,64 **** X--- 59,65 ---- X extern int sunKbdProc(); X extern Bool sunBW2Probe(), sunBW2Create(); X extern Bool sunCG8CProbe(), sunCG8CCreate(); X+ extern Bool sunCG9CProbe(), sunCG9CCreate(); X extern void ProcessInputEvents(); X X extern void SetInputCheck(); X*************** X*** 103,108 **** X--- 104,110 ---- X sunFbDataRec sunFbData[] = { X sunBW2Probe, "/dev/bwtwo0", sunBW2Create, X sunCG8CProbe, "/dev/cgeight0", sunCG8CCreate, X+ sunCG9CProbe, "/dev/cgnine0", sunCG9CCreate, X sunBW2Probe, "/dev/bwtwo0", sunBW2Create, X }; X END_OF_FILE if test 1842 -ne `wc -c <'cg9.diff'`; then echo shar: \"'cg9.diff'\" unpacked with wrong size! fi # end of 'cg9.diff' fi if test -f 'doit.sh' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'doit.sh'\" else echo shar: Extracting \"'doit.sh'\" \(307 characters\) sed "s/^X//" >'doit.sh' <<'END_OF_FILE' X#!/bin/sh Xsed -e 's/CG4/CG8/g' -e 's/cg4/cg8/g' ddx/sun/sunCG4C.c > ddx/sun/sunCG8C.c Xpatch -p1 < cg8.diff Xif [ -f /usr/include/sundev/cg9reg.h ]; then X sed -e 's/CG8/CG9/g' -e 's/cg8/cg9/g' ddx/sun/sunCG8C.c > ddx/sun/sunCG9C.c X patch -p1 < cg9.diff Xfi Xmake Makefile Xmake Makefiles Xmake depend Xmake Xsun END_OF_FILE if test 307 -ne `wc -c <'doit.sh'`; then echo shar: \"'doit.sh'\" unpacked with wrong size! fi chmod +x 'doit.sh' # end of 'doit.sh' fi echo shar: End of shell archive. exit 0 dan ---------------------------------------------------- O'Reilly && Associates argv@sun.com / argv@ora.com Opinions expressed reflect those of the author only.