bdm2/README
Pascal Haible 8/93
haible@izfm.uni-stuttgart.de

1) What is bdm2?
----------------
This is my (hopefully) generic driver for banked dumb monochrome ('BDM')cards.
I wrote it for my Hyundai HGC-1280 (originally 1280x960, tweaked to 1280x1024).
It now supports the Sigma Designs L-View (LVA-PC-00SP0) and 
LaserView PLUS (LDA-1200). Currently untested (01Oct93).

2) What type of card is HGC-1280?
---------------------------------
***** Note: If anybody has 'real' info about this card (what I have is
*****       trial and error) PLEASE contact me.
The "Hyundai HGC-1280 Video Controller", to use with the
"Hyundai HMM-1900E 19-inch High Resolution Monochrome Monitor",
can be jumpered to two modes:
Mode: emulating Hercules
        Ports 0x3B9 - 0x3B7
        Mem 0xB0000 - 0xBFFFF (64kBytes)
Mode: 'graphics mode only'
        Ports 0x390 - 0x397
        Mem 0xC8000 - 0xCFFFF (32kBytes)

The restriction of the hgc1280 lowlevel driver to secondary address
has been liftet.

These 32kBytes are 2 separate read/write banks.
Though lines are 1280/8 = 160 Bytes long, they are aligned to 256 Byte.
In other words: there is a 96 Byte gap at the end of each line.

The 'Cornerstone Display Drivers' (for DOS) know this card as
"1280x960 Display System for the PC", BoardID 2.
See file bdm2/drivers/hgc1280/HGC1280.info for detailed info about this card.

3) How about performance?
-------------------------
I ran x11perf on bdm2/hgc1280 at 1280x1024 (virtual 1472x1024) and
on vga2/et4000 at 1024x768 (virtual 1472x1024).
Bdm2 reaches about 20% to 100% the speed of vga2/et4000, with many tests
at 40% to 70%.
The most noticable speed difference is with scrolling big areas:
scrolling 500x500 is at 41% (10.1/s),
Copy 500x500 from window to window is at 53% (9.0/s).
Nevertheless this is much better than what I got out of my first server.
Scrolling a xterm (font huge) resized to cover the hole visible screen
takes about 0.5s now compared to 5 seconds before I started optimizing.
There is probably nothing left to optimize for this hardware; I think
the biggest speed loss comes from the 8 bit bus of the card: running
x11perf on a switched out VT (writing to a pixmap instead of video mem)
speeds up x11perf by up to 8 times (!!).
Before I started working on the X server, I wrote a little graphics library
to test the card. I couldn't get the little loop that only filled the 160k
of visible screen mem with 0x0L faster than 0.3s.
Xbench test bitmapcopy400 (COPYPLANE BITMAP->SCREEN) has a max. of
4.4 MegaPixels/sec (ET4000 mono max. 5.6 MegaPixels/sec).
Very likely that hardware will not allow much more.

XSTONES:
card		ET4000 col.	ET4000 vga16	ET4000 mono	HGC-1280 mono
size		1024x768	800x600x50MHz	1024x768	1280x1024
virt.		1024x1024	800x600		1472x1024	1472x1024
-------------	---------	---------	---------	---------
lineStones	  73392		  27745		  24366		  7922
fillStones	   7297		   5591		  17330		  4424
blitStones	   2969		   6496		  14019		  4698
arcStones	1059390		 719489		1835344		869540
textStones	  63250		   2062		  47437		 24062
complexStones	  10718		   9542		  26013		  9281
-------------	-------		-------		-------		------
xStones		   9798		   4531		  24006		  7822

card		HGC-1280 mono	Sigma L-View mono
size		1280x1024	1664x1200
virt.		1472x1024	1664x1200
-------------	---------	---------
lineStones	   7922		  10086
fillStones	   4424		   5457
blitStones	   4698		   6017
arcStones	 869540		1083676
textStones	  24062		  32187
complexStones	   9281		  10339
-------------	-------		-------
xStones		   7822		   9825

4) Can I write another lowlevel driver for bdm2?
------------------------------------------------
You should be able to write a lowlevel driver for it if your card has
the following memory layout:
( X counts on the following layout:
	line 0:		int 0	int 1	int 2	int 3	...
	line 1:		int x	int x+1	int x+2 int x+3	...
	...)

within the int IMAGE_BYTE_ORDER = LSBFirst :
	int x = byte0 byte1 byte2 byte3

within the byte BITMAP_BYTE_ORDER = MSBFirst:
	byte x = bit7 bit6 bit5 ... bit0

These are the settings for X386MONOVGA in server/include/servermd.h,
if your card matches these, this allows coexistance of vga2 and bdm2
and gives you a dual headed server: the mouse pointer goes to the other
display when it reaches the border.
If your card has an other byte ordering, you might be able to build a
seperate server (without vga2) for it, but this might give you some
work and headache.

If you want to write another lowlevel driver for bdm2, contact
me for more info. If I have time and you give me good docs, I might even
write it for you.

August 1993

Pascal Haible
Schoenhuthweg 5
74523 Schwaebisch Hall

haible@izfm.uni-stuttgart.de
haible@sunserv.izfm.uni-stuttgart.de
