bdm2/drivers/hgc1280/HGC1280.info
Pascal Haible 8/93
haible@izfm.uni-stuttgart.de

This file describes the technical specs I found out, mostly by
trial and error.

Card: Hyundai HGC-1280 Video Controller.
Monitor: Hyundai HMM-1900E 19-inch High Resolution Monochrome Monitor.

Resolution (officially) 1280x960x1bit, max. 1280x1024.
Max. virtual width 1472.

2 modes:
Mode: emulating Hercules
	(primary address)
	Ports 0x3B9 - 0x3B7
	Mem 0xB0000 - 0xBFFFF (64kBytes)
Mode: 'graphics mode only'
	(secondary address)
	Ports 0x390 - 0x397
	Mem 0xC8000 - 0xCFFFF (32kBytes)

The following might be valid only for the card jumpered to the secondary
address.

Mem window 0xC8000 - 0xCFFFF (32kBytes) is 2 separate read/write banks.
(On primary address: first Herc bank 0xB0000-0xB7FFF = 2 banks)

Visible lines are 1280 pixels (160 Byte) long. On the right side, further
32 bytes are read/write. By changing one of the regs, the visible area
can be shiftet right, but only by 24 bytes, i.e. to show pixels 192 - 1472.
This gives a virtual width of 1472.
The lines are aligned to 256 bytes.
Byte 196 - 255 are read/write, but they mirror parts of the visible line,
so they must not be written.

The video mem is divided in 16 banks to 16kB each. 2 of these banks can
be banked in the mem window.

Register level programming:
The HGC-1280 (in 'graphics only' mode) is programmed like a Hercules:
Base: 0x3B0 (primary) , 0x390 (secondary)
base+0	index port
base+1	data port
base+8	control port
base+10	crt status port
base+15	config port

registers: write register number to index port, read or write data from/to
data port.
register number: 0 to 63.

Registers:

default for 1280x960:
[cf. bdm2/drivers/hgc1280/hgc1280HW.h: hgcRegsGraf1280x1024[HGC_NUM_REGS]]
changes for 1280x1024:
reg 52:  61 -> 65
reg 54:  61 -> 65
reg 46: 195 -> 191

Hercules registers (0 - 18) are unused in 'graphics only' mode.
reg: def. for graph. - description
----------------------------------
39: 213 - mem organization
40:	- scan line timing
41:	- dto.
42: 138 - inc => displayed line starts 2 bytes later
43:  90 - dec => displayed line ends 2 bytes earlier
44:  33 - vert. timing
45:  16 - moves visible area horizontally -> panning;
	  dec => 2 bytes to the right.
46:	- vert. timing/position
47:	- vert. screen position in scan lines
48:	- ??
49:	- ??
50: 224	-
51:
52:	- vert. timing
53:	- vert. pos. within mem
54:  61 - bottom length in steps of 16 scan lines
55:  79 - 79->80 => bottom + 60 lines
56:	- don't set bit 4!! - total hang!
57,60,63 - not writable, zero (?)
61	- fixed 85 (?)

$XFree86: xc/programs/Xserver/hw/xfree86/mono/drivers/hgc1280/HGC1280.info,v 3.1 1995/01/28 16:04:31 dawes Exp $
$XConsortium: HGC1280.info,v 1.1 95/01/25 23:44:47 kaleb Exp $
