Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Path: utzoo!mnetor!seismo!lll-lcc!mordor!styx!lognet2!ames!ucbcad!ucbvax!sdcsvax!sdcc6!sdcc18!ee161aba
From: ee161aba@sdcc18.ucsd.EDU (David L. Smith)
Newsgroups: comp.sys.ibm.pc
Subject: Hercule Graphics Card settings
Message-ID: <601@sdcc18.ucsd.EDU>
Date: Thu, 8-Jan-87 23:21:23 EST
Article-I.D.: sdcc18.601
Posted: Thu Jan  8 23:21:23 1987
Date-Received: Fri, 9-Jan-87 06:17:23 EST
Organization: University of California, San Diego
Lines: 118


Several people have been looking for these parameters, so here are the 
parameters used on my hercules clone:

Graphics pages
B0000-B7FFFh   page 1
B8000-BFFFFh   page 2

I/O ports
03B4 - 6845 Index Register
03B5 - 6845 Data Register
03B8 - Display Mode Control Port
03BA - Display Status Port

6845 Registers
To access these, load the 6845 Index Register with the register number you wish
to access and then do something to the 6845 Data Register

0 - Total chars per row including SYNC less 1
1 - Number of visible chars per row
2 - Position of the first character during SYNC, less 1
3 - Number of characters during SYNC per row, less 1
4 - Number of rows less 1 including the row during vertical retrace
5 - Number of scans (row fractions) in addition to total number of rows
6 - Number of visible rows
7 - Row number to begin the retrace less 1.  (This will always last 16 scans)
8 - Always set to 2 (magic cookie)
9 - Number of scans per row, less 1
10 - First scan where the cursor will overlay a character
11 - last scan where the cursor will overlay a character
12 - Always set to 0
13 - Always set to 0
14 - Offset of the cursor position in the display buffer high
15 - Offset low
16 - Offset when light pen tripped high
17 - Offset low

(I have no better explanations for the 6845 registers, either find the chip
data or just follow the "standard settings" given further on)

Display Control Port (03B8)

Bit       Option
 0        Unused
 1        0 = text, 1= graphics (*BE SURE TO SET 6845 PARAMETERS when changing)
 2        Unused
 3        0 = Blank the screen, 1 turns it on
 4        Unused
 5        0 = No blinking, 1 = blinking on
 6        Unused
 7        0 = Use page 0, 1 = page 1

Display Status Port

Bit       Condition
 0        0 = Normal character, 1=SYNC (screen is temporarily blanked)
 1,2      Unused
 3        0 = dots off, 1= dots on
 4,5,6    Unused
 7        0 = Vertical retrace (screen is temporarily blanked) 0=active display

Configuration Switch (03BF) (Some cards may not have this)
 
 Bit      Option
  0       0 = inhibit graphics mode, 1 = allow graphics mode to be set
  1       0 = Mask page 1 (B8000-BFFFF) out of memory map and inhibit it's 
          selection.  1 = Put back in memory map and allow selection

  2-7     Unused




The text page occupies 4K, from B0000 - B0FFF

To place a character, use the formula

   character offset = 160*(line-1)+2*(column-1)
   attribute offset = 160*(line-1)+2*(column-1)+1                 
   (1<=line<=25) (1