From: leo@zelator.in-berlin.de (Stefan Hartmann)
Subject: 24 Bit Genoa 7900 board programing info
Organization: Puplic-Access-Xenix-System
Date: Sat, 19 Dec 92 15:07:55 GMT


Hi,
these are the programming infos on the Genoa 7900 ET4000 24 bit SVGA
truecolor card.
It tells you how to access the board and how to program the true color
modes.


============
7900bios.txt
============

GENOA VGA BIOS ENHANCEMENTS 

Additional Graphics BIOS functions call (INT 10H) have been added 
to the Genoa's 7000 series Super VGA boards of Model 7900 and 7900sx, 
in order to support the new enhanced features - 64K colors 5/6/5 format,  
256K colors 6/6/6 format and 16M colors 8/8/8 format.

(1) Set Modes,

   This call will attempt to set modes of 15 bits,16 bits/pixel HiColor 
   mode with the same Mode Number (in BL reg.) and X,Y Dimensions as the 
   previouly specified in 256-colors mode. Also, a new mode number 3EH 
   was added for 60x480x16M/256K colors mode.

   The call will fail if there is not an appropriate DAC present, not 
   enough memory or other hardware limitation.

   Input:
	for HiColor modes,
	AX = 10F0H
	BL = 2DH - 640 x 350 x 32K/64K Colors (Defaults to 5/5/5 format)
	   = 2EH - 640 x 480 x 32K/64K Colors (Defaults to 5/5/5 format)
	   = 2FH - 640 x 400 x 32K/64K Colors (Defaults to 5/5/5 format)
	   = 30H - 800 x 600 x 32K/64K Colors (Defaults to 5/5/5 format)

	* For 5/6/5 64K Colors mode setting, it is required to add 
	another call AX=10F2H as in paragraph (3) to change from 
	5/5/5 format to 5/6/5 format.

	and the new mode number 3EH for the 640 x 480 x 16M/256K Colors,
	AX = 10F0H
	BL = 3EH - 640 x 480 x 16 Million Colors (8/8/8 format) on 
		   Model 7900 or 640 x 480 x 256K Colors (6/6/6 format) 
		   on Model 7900sx

   Output:
	AL = 10H
	AH = 0 if succeeded,
	   <> 0  if failed

(2) Get DAC Type,

   Input:
	 AX = 10F1H

   Output:
	AX = 0010H
	BX = 0     Normal VGA DAC          16/256  colors
	   = 1     HiColor 5/5/5 format    16/256/32K  colors
	   = 2     HiColor 5/6/5 format    16/256/32K/64K  colors
	   = 0602H Special New DAC         16/256/32K/64K/256K  colors
	   = 0802H Special New DAC         16/256/32K/64K/16M  colors

	*Genoa's MultimediaVGA Model 7900 will return BX = 0802H 
	(8/8/8 format capability) and Model 7900sx will return 
	BX = 0602H (6/6/6 format capability).

(3) Get/Set DAC 5/5/5 or 5/6/5 Format,

   The mode set must be in HiColor modes (5/5/5 or 5/6/5) in order to 
   use this call to set format. This function call is not used in 
   16/256/256K/16M colors modes.

   Input:
	AX = 10F2H
	BL = 0  get current format
	   = 1  set 5/5/5 format
	   = 2  set 5/6/5 format

   Output:
	AL = 10H
	AH = 0  if succeeded,
	   <> 0  if failed

	BL = 0  if was not in 5/5/5 or 5/6/5 HiColor Mode
	   = 1  if now set in  HiColor 5/5/5 format
	   = 2  if now set in  HiColor 5/6/5 format

(4) Descriptions of Formats:

    a. 5/5/5 format,

	Bit   <15>   <14:10>   <9:5>    <4:0>
	      N/A      RED     GREEN    BLUE

    b. 5/6/5 format,

	Bit   <15:11>  <10:5>  <4:0>
	      RED      GREEN   BLUE

    c. 6/6/6 and 8/8/8 format,

	Every page (64KB) has 32 lines, every line uses 2KB address 
	space, the 33rd line pixel address is same as 1st line but 
	3CD reg = 11H to specify next page, total 480 lines will use 
	up to 15 pages of memory - 960KB.

	1st line,       with 3CD reg. = 00H

			   BLUE    GREEN   RED
	   1st pixel       A000:0  A000:1  A000:2
	   2nd pixel       A000:3  A000:4  A000:5
		.
		.
	   640 pixel       A000:77D  A000:77E  A000:77F
	   *address A000:780 - A000:7FF are not displayed on screen

	2nd line = 1st line address + 800H
	
			BLUE      GREEN     RED
	   1st pixel    A000:800  A000:801  A000:802
	   2nd pixel    A000:803  A000:804  A000:805
		.
		.
	   640 pixel    A000:F7D  A000:F7E  A000:F7F

	33rd line = 1st line address with 3CD reg. = 11H

			BLUE      GREEN     RED
	   1st pixel    A000:0    A000:1    A000:2
	   2nd pixel    A000:3    A000:4    A000:5
		.
		.
	   640 pixel    A000:77D  A000:77E  A000:77F



======
mapmem
======

==> DISPLAY MEMORY LAYOUT:

  DBDDDDDDDDDDD ZDDDDDDDDDD?
   3      A0000 3          3    24 BITS (16,777,721 COLORS) PER PEL.
   3            3          3    3 BYTES FROM 3 ADJACENT LINEAR MEMORY PER PEL.
  64K           3 Page 0   3    UPTO 16 PAGES (64KB EACH, 1MB TOTAL) AVAILABLE.
   3            3          3    FIRST PEL AT ADDRESS A00000 PAGE 0.
   3      AFFFF 3          3    EACH PAGE IS MAPPED INTO A0000-AFFFF.
  DABDDDDDDDDDD CDDDDDDDDDD4
    3     A0000 3          3
    3           3          3
   64K          3 Page 1   3
    3           3          3
    3     AFFFF 3          3
  DDADDDDDDDDDD CDDDDDDDDDD4
                3          3
                3    .     3
                3    .     3
                3    .     3
                3          3
  DBDDDDDDDDDDD CDDDDDDDDDD4
   3      A0000 3          3
   3            3          3
  64K           3 Page 14  3
   3            3          3
   3      AFFFF 3          3
  DABDDDDDDDDDD CDDDDDDDDDD4
    3     A0000 3          3
    3           3          3
   64K          3 Page 15  3    --> PAGE 15 IS NOT DISPLAYABLE
    3           3          3
    3     AFFFF 3          3
  DDADDDDDDDDDD @DDDDDDDDDDY

DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD
==> DISPLAY PAGE LAYOUT:

  PAGE_NUMBER = ROW_NUMBER / 32                         ; ROW = 0..479
  ROW_IN_PAGE = ROW_NUMBER MODULO 32                    ; 32 ROWS PER PAGE
  ROW_ADDRESS = A0000H + (ROW_IN_PAGE * 800H)           ; ROW OFFSET = 800H
  PEL_ADDRESS = ROW_ADDRESS + (COLUMN_NUMBER * 3)       ; COLUMN = 0..639

                3 COLUMN 0  3 COLUMN 1  3 . . . 3 COLMN 479 3      N/A      3
        OFFSETDD3 0 3 1 3 2 3 3 3 4 3 5 3       377D377E377F37803 . . . 37FF3
                3   3   3   3   3   3   3       3   3   3   3   3       3   3
    ROW   ADDR  ZDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDBDDDDDDDDDDDDDDD?
     0:  A0000  3 B   G   R 3 B   G   R 3 . . . 3 B   G   R 30000000000000003
     1:  A0800  3           3           3       3           30000000000000003
     2:  A1000  3     .     3     .     3   .   3     .     30000000000000003
     3:  A1800  3           3           3       3           30000000000000003
     .     .    3     .     3     .     3   .   3     .     3000000NOT0000003
     .     .    3           3           3       3           300DISPLAYABLE003
     .     .    3     .     3     .     3   .   3     .     30000000000000003
    28:  AE000  3           3           3       3           30000000000000003
    29:  AE800  3     .     3     .     3   .   3     .     30000000000000003
    30:  AF000  3           3           3       3           30000000000000003
    31:  AF800  3 B   G   R 3 B   G   R 3 . . . 3 B   G   R 30000000000000003
                @DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDADDDDDDDDDDDDDDDY


Thanks to:
John W. Temples , who made this files available to me and downloaded
it directly from the Genoa  BBS in California.

If you want to get a 7900 board, email me...

Best regards, Stefan Hartmann,c/o Gatz & Hartmann
email to: leo@zelator.in-berlin.de





-- 
 
*************************************************************
*  Stefan Hartmann, c/o Gatz & Hartmann                     *
*  Ingenieurbuero fuer Multimedia-Anwendungen               *
*  Fehrbelliner Str. 32                                     *
*  W-1000 Berlin 20, Germany                                *
*  This is how to contact us:                               *
*  EMAIL: leo@zelator.in-berlin.de                          *
Newsgroups: comp.graphics