Generic Bitmapped Graphics device driver:
*****************************************

To compile this device driver you need Coherent 4.0, Device Driver Kit 2.0 and
a graphics card.

I am sorry but the nature of these modifications is such that human work is 
required.  Thus no makefile is provided.  It would be dangerous to modify some
of these files automatically.

This code was written by me with modifications by Vance Petree.  I release this
code to the public domain.  You can do whatever you like with it, though I 
would like you to keep our names on it please :-).  Udo Munk helped with some
clarifications in this readme file.

To compile and link:

First, you must edit /usr/include/sys/devices.h.  Change the existing line for 
major number 15 to:

#define BM_MAJOR	15	/* bit-mapped graphics device		*/

Now, copy bm.c and bm.h to /usr/sys/src.

Then copy mmas.s.diffs to /usr/sys/src.  Do

cd /usr/sys/src
patch < mmas.s.diffs

This will add lines to mmas.s for correction of some conflicts between the 
console driver and the graphics driver under Hercules.  These modifications are
by Vance Petree.  You can get patch from raven.alaska.edu, mwcbbs and from me.
The archive is called patch20.tar.Z.

Now add these lines to /usr/sys/Build:

	bm)
		OPTS=${OPTS}" ${K_OBJ}/bm.o"
		PATCH="${PATCH} drvl+300=bmcon"
		;;

Then add this line to /usr/sys/Makefile in the list of objects:

	$(K_OBJ)/bm.o

And add these lines to /usr/sys/Makefile:

$(K_OBJ)/bm.o: $(K_SRC)/bm.c \
	$(SYSINC)/coherent.h $(SYSINC)/reg.h \
	$(SYSINC)/con.h $(SYSINC)/devices.h \
	$(SYSINC)/stat.h $(USRINC)/errno.h
	$(CC) $(CFLAGS) -c -o $@ $(K_SRC)/bm.c

Now, you need to build a test kernel.  To do this for a system with non-scsi
hard drives and virtual consoles, type:

Build -ip at vt bm

Note that you must be root to run the Build script.  See your DDK manual for 
more details on the Build script.

Now, to test the test kernel, you must reboot.  While rebooting, hit <space>
to abort the autoboot.  Type 'coh.test'.  When booting you should notice the
message 'Generic Bitmapped Graphics driver loaded.' after the hard drive 
messages, etc.  If you see this then you have correctly built a new kernel.
If you don't see this message then something went wrong.  Repeat the above 
procedure or write to hcp@csx.cciw.ca for help.

Once you have booted with the driver present, create a new node for bm.  This 
is a character special device with major number 15 and minor number 0.  Thus:

mknod /dev/bm c 15 0

Note that you must be root to use mknod.

Now change the mode of /dev/bm to 666, with:

chmod 666 /dev/bm

Harry
hcp@csx.cciw.ca
