202 lines
6.7 KiB
Plaintext
202 lines
6.7 KiB
Plaintext
|
|
||
|
Currently the XGA exists only in Microchannel versions.
|
||
|
|
||
|
All register accesses happen through a block of 16 registers starting
|
||
|
at a adapter dependant register (called xga in the following).
|
||
|
The register xga+0Ah works as an indexed register ie. xga+0Ah is the
|
||
|
index register and xga+0Bh is the data register.
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
xga+0: Operating Mode
|
||
|
bit 0 Set if VGA, clear if dual monitor.
|
||
|
2 Set if in an extended mode.
|
||
|
|
||
|
xga+1: Video Memory Aperture Control
|
||
|
0 disables 64k aperture
|
||
|
|
||
|
xga+4: Interrupt Enable
|
||
|
0 disables interrupts.
|
||
|
|
||
|
xga+5: Interrupt Status
|
||
|
bit 0 Start of blanking
|
||
|
writing 0FFh clears interrupts.
|
||
|
|
||
|
xga+6: Virtual Memory Control
|
||
|
|
||
|
xga+8: Video Memory Aperture Index.
|
||
|
bit 0-7 64k bank number.
|
||
|
|
||
|
xga+9: Memory Access Mode
|
||
|
set to 2 in 16 color modes, 3 in 256 color modes and
|
||
|
4 in 65536 color modes.
|
||
|
|
||
|
xga+Ah index 10h: Horizontal Total low.
|
||
|
bit 0-7 lower 8 bits of the total number of character clocks
|
||
|
in a scanline.
|
||
|
|
||
|
xga+Ah index 11h: Horizontal Total high.
|
||
|
bit 0-7 upper 8 bits of the total number of character clocks
|
||
|
in a scanline.
|
||
|
|
||
|
xga+Ah index 12h: Horizontal Displayed low.
|
||
|
bit 0-7 lower 8 bits of the number of displayed character clocks
|
||
|
in a scanline.
|
||
|
|
||
|
xga+Ah index 13h: Horizontal Displayed high.
|
||
|
bit 0-7 upper 8 bits of the number of displayed character clocks
|
||
|
in a scanline.
|
||
|
|
||
|
xga+Ah index 14h: Horizontal Blanking Start low.
|
||
|
bit 0-7 lower 8 bits of the count at which blanking starts.
|
||
|
|
||
|
xga+Ah index 15h: Horizontal Blanking Start high.
|
||
|
bit 0-7 upper 8 bits of the count at which blanking starts.
|
||
|
|
||
|
xga+Ah index 16h: Horizontal Blanking End low.
|
||
|
bit 0-7 lower 8 bits of the count at which blanking ends.
|
||
|
|
||
|
xga+Ah index 17h: Horizontal Blanking End high.
|
||
|
bit 0-7 upper 8 bits of the count at which blanking ends.
|
||
|
|
||
|
xga+Ah index 18h: Horizontal Sync Start low.
|
||
|
bit 0-7 lower 8 bits of the Horizontal Sync Start.
|
||
|
|
||
|
xga+Ah index 19h: Horizontal Sync Start high.
|
||
|
bit 0-7 upper 8 bits of the Horizontal Sync Start.
|
||
|
|
||
|
xga+Ah index 1Ah: Horizontal Sync End low.
|
||
|
bit 0-7 lower 8 bits of the Horizontal Sync End.
|
||
|
|
||
|
xga+Ah index 1Bh: Horizontal Sync End high.
|
||
|
bit 0-7 upper 8 bits of the Horizontal Sync End.
|
||
|
|
||
|
xga+Ah index 1Ch: Horizontal Sync Position.
|
||
|
bit 0-7 lower 8 bits of the Horizontal sync position.
|
||
|
|
||
|
xga+Ah index 1Eh: Horizontal Sync Position.
|
||
|
bit 0-7 upper 8 bits of the Horizontal sync position.
|
||
|
|
||
|
xga+Ah index 20h: Vertical Total low.
|
||
|
bit 0-7 lower 8 bits of the total number of scanlines.
|
||
|
|
||
|
xga+Ah index 21h: Vertical Total high.
|
||
|
bit 0-7 upper 8 bits of the total number of scanlines.
|
||
|
|
||
|
xga+Ah index 22h: Vertical Displayed End low.
|
||
|
bit 0-7 lower 8 bits of the number of displayed scanlines.
|
||
|
|
||
|
xga+Ah index 23h: Vertical Displayed End high.
|
||
|
bit 0-7 upper 8 bits of the number of displayed scanlines.
|
||
|
|
||
|
xga+Ah index 24h: Vertical Blanking Start low.
|
||
|
bit 0-7 lower 8 bits of the Vertical Blanking Start.
|
||
|
|
||
|
xga+Ah index 25h: Vertical Blanking Start high.
|
||
|
bit 0-7 upper 8 bits of the Vertical Blanking Start.
|
||
|
|
||
|
xga+Ah index 26h: Vertical Blanking End low.
|
||
|
bit 0-7 lower 8 bits of the Vertical Blanking End.
|
||
|
|
||
|
xga+Ah index 27h: Vertical Blanking End high.
|
||
|
bit 0-7 upper 8 bits of the Vertical Blanking End.
|
||
|
|
||
|
xga+Ah index 28h: Vertical Sync Start low.
|
||
|
bit 0-7 lower 8 bits of the Vertical Sync Start.
|
||
|
|
||
|
xga+Ah index 29h: Vertical Sync Start high.
|
||
|
bit 0-7 upper 8 bits of the Vertical Sync Start.
|
||
|
|
||
|
xga+Ah index 2Ah: Vertical Sync End.
|
||
|
bit 0-7 .
|
||
|
|
||
|
xga+Ah index 2Ch: Vertical Line Compare low.
|
||
|
bit 0-7 lower 8 bits of the Line Compare register.
|
||
|
|
||
|
xga+Ah index 2Dh: Vertical Line Compare high.
|
||
|
bit 0-7 upper 8 bits of the Line Compare register.
|
||
|
|
||
|
xga+Ah index 36h: Sprite Control.
|
||
|
|
||
|
xga+Ah index 40h: Start Address low.
|
||
|
bit 0-7 bit 0-7 of the display start address.
|
||
|
|
||
|
xga+Ah index 41h: Start Address middle.
|
||
|
bit 0-7 bit 8-15 of the display Start Address.
|
||
|
|
||
|
xga+Ah index 42h: Start Address high.
|
||
|
bit 0-7 bit 16-23 of the display Start Address.
|
||
|
|
||
|
xga+Ah index 43h: Pixel Map Width low.
|
||
|
bit 0-7 lower 8 bits of the Pixel Map Width.
|
||
|
|
||
|
xga+Ah index 44h: Pixel Map Width high.
|
||
|
bit 0-7 upper 8 bits of the Pixel Map Width.
|
||
|
|
||
|
xga+Ah index 50h: Display Mode 1.
|
||
|
7=800x600, Fh=1024x768 and C7h=640x480.
|
||
|
|
||
|
xga+Ah index 51h: Display Mode 2.
|
||
|
2=16 color mode, 3=256 color mode and 4=64k color mode.
|
||
|
|
||
|
xga+Ah index 52h: Monitor type.
|
||
|
bit 2 Clear if capable of 1024x768.
|
||
|
|
||
|
xga+Ah index 54h: Clock Select.
|
||
|
0=640x480, 1=800x600, Dh=1024x768 and 4=VGA.
|
||
|
|
||
|
xga+Ah index 55h: Border Color.
|
||
|
|
||
|
xga+Ah index 60h: Palette Address Index low.
|
||
|
bit 0-7 lower 8 bits of the Palette Address Index.
|
||
|
|
||
|
xga+Ah index 61h: Palette Address Index high.
|
||
|
bit 0-7 upper 8 bits of the Palette Address Index.
|
||
|
|
||
|
xga+Ah index 62h: Sprite Pre low.
|
||
|
bit 0-7 lower 8 bits of the Sprite Pre.
|
||
|
|
||
|
xga+Ah index 63h: Sprite Pre high.
|
||
|
bit 0-7 upper 8 bits of the Sprite Pre.
|
||
|
|
||
|
xga+Ah index 64h: Palette Access.
|
||
|
0 disables display, FFh enables display.
|
||
|
|
||
|
xga+Ah index 65h: Palette Data Port.
|
||
|
bit 0-7 Palette data is read and written to this port.
|
||
|
Each read or write of the register will increment the
|
||
|
palette address, first through the Red, Green Blue
|
||
|
cycle, and then increment the Palette Address Index.
|
||
|
|
||
|
xga+Ah index 66h: Palette Mode.
|
||
|
|
||
|
xga+Ah index 70h: External Clock.
|
||
|
|
||
|
|
||
|
Video Modes:
|
||
|
|
||
|
640x480 256 colors
|
||
|
640x480 65536 colors
|
||
|
800x600 16 colors
|
||
|
800x600 256 colors
|
||
|
800x600 65536 colors
|
||
|
1024x768 16 colors
|
||
|
1024x768 256 colors
|
||
|
|
||
|
|
||
|
All modes use a linear address mode, where bits 16-23 of the address
|
||
|
are in the Video Aperture Index register (xga+8), and the lower 16 bits
|
||
|
are the offset from 0A000:0.
|
||
|
|
||
|
In 16 color modes two pixels are stored in each byte. Even pixels are in
|
||
|
bits 0-3 and odd pixels in bits 4-7.
|
||
|
Address of pixel = (row *(pixels per row)+coloumn) /2.
|
||
|
|
||
|
In 256 color modes each pixel occupies a byte. The pixels are addressed
|
||
|
in linear fashion. Address of pixel = row *(pixels per row) + coloumn.
|
||
|
|
||
|
In 65536 color modes each pixel occupies two bytes.
|
||
|
Address of pixel = (row *(pixels per row)+coloumn)*2.
|
||
|
|