home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Inside Multimedia 1996 September
/
IMM0996.ISO
/
driver
/
cirrus
/
6410lcd
/
disk1
/
clvga.xgi
< prev
next >
Wrap
Text File
|
1991-08-02
|
11KB
|
345 lines
/*
* @(#) clvga.xgi 1.0 91/08/01
*
* Copyright (C) The Santa Cruz Operation, 1989.
* This Module contains Proprietary Information of
* The Santa Cruz Operation, and should be treated as Confidential.
*
* Copyright (c) Cirrus Logic, Inc., 1991
*
*/
/* ************************************************************************* *
* CIRRUS/CLVGA.XGI - XEGIA(tm) GrafInfo File for Cirrus Logic VGA - 6410 *
* *
* LAST UPDATE: 1 August, 1991 by Cirrus Logic *
* *
* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - *
* *
* CIRRUS.CLVGA.VGA.640x480-16 VGA 640x480 16-color *
* CIRRUS.CLVGA.VGA.800x600-16 VGA 800x600 16-color *
* *
* ************************************************************************* */
/* ********************************************************************* */
VENDOR CIRRUS "Cirrus"
MODEL CLVGA "Logic VGA"
CLASS VGA "VGA"
MODE 640x480-16 "640x480 16-color" /* VGA 640x480 16 color */
MEMORY(0xA0000,0x10000); /* Base Address, Length */
PORT(0x3C2,0x3CA,0x3CC,0x3DA); /* General/External registers */
PORT(0x3C0,0x3C1); /* Attribute */
PORT(0x3C4,0x3C5); /* Sequencer */
PORT(0x3C7,0x3C8,0x3C9); /* Color registers */
PORT(0x3CE,0x3CF); /* Graphics */
PORT(0x3D4,0x3D5); /* CRTC */
PROCEDURE InitGraphics
{
DEVCLASS = 75;
DEVTYPE = 01;
DEVTECH = 0x0D; /* VGA */
PIXBYTES = 80;
PIXWIDTH = 640;
PIXHEIGHT = 480;
PIXRESX = 68;
PIXRESY = 68;
PIXBITS = 1;
PIXPLANES = 4;
MAPFLAGS = 0;
BASEADDRESS = 0xA0000;
INTERLEAVE = 1;
INTERSIZE = 80;
}
PROCEDURE SetGraphics
{
/* enable extended sequencer registers */
out(0x3CE,0xA); out(0x3CF,0xEC);
/* sequencer */
r0 = 0x1; /* reset */
r1 = 0x1;
r2 = 0xF;
r3 = 0x0;
r4 = 0x6;
bout(5, 0x3C4, 0x3C5);
/* misc output reg */
out(0x3C2,0xef);
/* select standard VGA clock frequency for 640x480 */
out(0x3CE, 0x84); out(0x3CF, 0x10);
/* remove sequencer reset */
r0 = 0x3;
bout(1,0x3C4,0x3C5);
/* unprotect crtc regs 0-7 */
out(0x3D4, 0x11); out(0x3D5, 0x20);
/* crtc */
r0 = 0x5f; r1 = 0x4f; r2 = 0x50; r3 = 0x82;
r4 = 0x54; r5 = 0x80; r6 = 0x0b; r7 = 0x3e;
r8 = 0; r9 = 0x40; r10 = 0; r11 = 0;
r12 = 0; r13 = 0; r14 = 0; r15 = 0;
r16 = 0xea; r17 = 0xac; r18 = 0xdf; r19 = 0x28;
r20 = 0; r21 = 0xe7; r22 = 0x04; r23 = 0xE3;
r24 = 0xFF;
bout( 25, 0x3d4, 0x3D5 );
/* graphics controller */
r0 = 0x0;
r1 = 0x0;
r2 = 0x0;
r3 = 0x0;
r4 = 0x0;
r5 = 0x0;
r6 = 0x5;
r7 = 0xF;
r8 = 0xFF;
bout( 9, 0x3CE, 0x3CF );
/* attribute controller */
in(r63,0x3DA); /* reset f/f */
/* palette */
r0 = 00; r1 = 01; r2 = 02; r3 = 03;
r4 = 04; r5 = 05; r6 = 0x14; r7 = 07;
r8 = 0x38; r9 = 0x39; r10 = 0x3A; r11 = 0x3B;
r12 = 0x3C; r13 = 0x3D; r14 = 0x3E; r15 = 0x3F;
/* attribute controller */
r16 = 01; r17 = 00; r18 = 0x0F; r19 = 00;
r20 = 0;
bout( 21, 0x3C0, 0x3C0 );
/* palette mask */
out( 0x3C6, 0xFF);
/* enable palette */
out( 0x3C0, 0x20);
/* protect extended regs */
out 0x3CE, 0xA out 0x3CF, 0xCE
}
PROCEDURE SetText
{
/* unprotect crtc regs 0-7 */
out( 0x3D4,0x11); out(0x3D5,0x20);
/* enable extended sequencer registers */
out(0x3CE,0xA); out(0x3CF,0xEC);
in(r63,0x3DA); /* reset attr F/F */
out(0x3C0,0); /* disable palette */
r0 = 0x01; r1 = 0x00; r2 = 0x03; r3 = 0x00; r4 = 0x02;
bout( 5, 0x3C4, 0x3C5 ) /* sequencer regs */
out(0x3C2,0x67); /* misc out reg */
/* set extended sequencer regs */
out(0x3CE, 0x84); out(0x3CF, 0x10);
r0=0x03; bout(1,0x3C4,0x3C5); /* sequencer enable */
/* unprotect crtc regs 0-7 */
out(0x3D4, 0x11); out(0x3D5, 0x20);
r0 = 0x5F; r1 = 0x4F; r2 = 0x50; r3 = 0x82; /* crtc */
r4 = 0x54; r5 = 0x80; r6 = 0x0b; r7 = 0x3e;
r8 = 0x00; r9 = 0x40; r10 = 0x00; r11 = 0x00;
r12 = 0x00; r13 = 0x00; r14 = 0x00; r15 = 0x00;
r16 = 0xea; r17 = 0xac; r18 = 0xdf; r19 = 0x28;
r20 = 0x00; r21 = 0xe7; r22 = 0x04; r23 = 0xe3;
r24 = 0xFF; bout(25,0x3D4,0x3D5);
out(0x3CC,0x00); out(0x3CA,0x01); /* graphics controller */
r0 = 0x00; r1 = 0x00; r2 = 0x00; r3 = 0x00;
r4 = 0x00; r5 = 0x10; r6 = 0x0E; r7 = 0x00;
r8 = 0xFF; bout(9,0x3CE,0x3CF);
in(r63,0x3DA); /* reset attr F/F */
r0 = 0x00; r1 = 0x01; r2 = 0x02; r3 = 0x03; /* palette */
r4 = 0x04; r5 = 0x05; r6 = 0x14; r7 = 0x07;
r8 = 0x38; r9 = 0x39; r10 = 0x3A; r11 = 0x3B;
r12 = 0x3C; r13 = 0x3D; r14 = 0x3E; r15 = 0x3F;
r16 = 0x0C; r17 = 0x00; r18 = 0x0F; r19 = 0x08; /* attr cntlr */
bout(20,0x3C0,0x3C0);
out(0x3C0,0x20); /* enable palette */
/* protect extended regs */
out 0x3CE, 0xA out 0x3CF, 0xCE
}
/* ********************************************************************* */
VENDOR CIRRUS "Cirrus"
MODEL CLVGA "Logic VGA"
CLASS VGA "VGA"
MODE 800x600-16 "800x600 16 color"
MEMORY(0xA0000,0x10000); /* Base Address, Length */
PORT(0x3C2,0x3CA,0x3CC,0x3DA); /* General/External registers */
PORT(0x3C0,0x3C1); /* Attribute */
PORT(0x3C4,0x3C5); /* Sequencer */
PORT(0x3C7,0x3C8,0x3C9); /* Color registers */
PORT(0x3CE,0x3CF); /* Graphics */
PORT(0x3D4,0x3D5); /* CRTC */
PROCEDURE InitGraphics
{
DEVCLASS = 99;
DEVTYPE = 01;
DEVTECH = 0x0D; /* VGA */
PIXBYTES = 100;
PIXWIDTH = 800;
PIXHEIGHT = 600;
PIXRESX = 64;
PIXRESY = 54;
PIXBITS = 1;
PIXPLANES = 4;
MAPFLAGS = 0;
BASEADDRESS = 0xA0000;
INTERLEAVE = 1;
INTERSIZE = 80;
PROCEDURE SetGraphics
{
/* enable extended sequencer registers */
out(0x3CE,0xA); out(0x3CF,0xEC);
/* sequencer */
r0 = 0x1; /* reset */
r1 = 0x1;
r2 = 0xF;
r3 = 0x0;
r4 = 0x6;
bout(5, 0x3C4, 0x3C5);
/* misc output reg */
out(0x3C2,0x2B);
/* set extended sequencer regs */
out(0x3CE, 0x84); out(0x3CF, 0x9C);
/* remove sequencer reset */
r0 = 0x3;
bout(1,0x3C4,0x3C5);
/* unprotect crtc regs 0-7 */
out(0x3D4, 0x11); out(0x3D5, 0x20);
/* crtc */
r0 = 0x7f; r1 = 0x63; r2 = 0x64; r3 = 0x82;
r4 = 0x6b; r5 = 0x1b; r6 = 0x72; r7 = 0xf0;
r8 = 0; r9 = 0x60; r10 = 0x0; r11 = 0x0;
r12 = 0; r13 = 0; r14 = 0; r15 = 0;
r16 = 0x5d; r17 = 0xa1; r18 = 0x57; r19 = 0x32;
r20 = 0x00; r21 = 0x5c; r22 = 0x70; r23 = 0xe3;
r24 = 0xFF;
bout( 25, 0x3d4, 0x3D5 );
/* graphics controller */
r0 = 0x0;
r1 = 0x0;
r2 = 0x0;
r3 = 0x0;
r4 = 0x0;
r5 = 0x0;
r6 = 0x5;
r7 = 0xF;
r8 = 0xFF;
bout( 9, 0x3CE, 0x3CF );
/* attribute controller */
in(r63,0x3DA); /* reset f/f */
/* palette */
r0 = 00; r1 = 01; r2 = 02; r3 = 03;
r4 = 04; r5 = 05; r6 = 0x14; r7 = 07;
r8 = 0x38; r9 = 0x39; r10 = 0x3A; r11 = 0x3B;
r12 = 0x3C; r13 = 0x3D; r14 = 0x3E; r15 = 0x3F;
/* attribute controller */
r16 = 01; r17 = 00; r18 = 0x0F; r19 = 00;
r20 = 0;
bout( 21, 0x3C0, 0x3C0 );
/* palette mask */
out( 0x3C6, 0xFF);
/* enable palette */
out( 0x3C0, 0x20);
/* protect extended regs */
out 0x3CE, 0xA out 0x3CF, 0xce
}
PROCEDURE SetText
{
/* unprotect crtc regs 0-7 */
out( 0x3D4,0x11); out(0x3D5,0x20);
/* enable extended sequencer registers */
out(0x3CE,0xA); out(0x3CF,0xEC);
in(r63,0x3DA); /* reset attr F/F */
out(0x3C0,0); /* disable palette */
r0 = 0x01; r1 = 0x00; r2 = 0x03; r3 = 0x00; r4 = 0x02;
bout( 5, 0x3C4, 0x3C5 ) /* sequencer regs */
out(0x3C2,0x67); /* misc out reg */
/* set extended sequencer regs */
out(0x3CE, 0x84); out(0x3CF, 0x10);
r0=0x03; bout(1,0x3C4,0x3C5); /* sequencer enable */
/* unprotect crtc regs 0-7 */
out(0x3D4, 0x11); out(0x3D5, 0x20);
r0 = 0x5F; r1 = 0x4F; r2 = 0x50; r3 = 0x82; /* crtc */
r4 = 0x54; r5 = 0x80; r6 = 0x0b; r7 = 0x3e;
r8 = 0x00; r9 = 0x40; r10 = 0x00; r11 = 0x00;
r12 = 0x00; r13 = 0x00; r14 = 0x00; r15 = 0x00;
r16 = 0xea; r17 = 0xac; r18 = 0xdf; r19 = 0x28;
r20 = 0x00; r21 = 0xe7; r22 = 0x04; r23 = 0xe3;
r24 = 0xFF; bout(25,0x3D4,0x3D5);
out(0x3CC,0x00); out(0x3CA,0x01); /* graphics controller */
r0 = 0x00; r1 = 0x00; r2 = 0x00; r3 = 0x00;
r4 = 0x00; r5 = 0x10; r6 = 0x0E; r7 = 0x00;
r8 = 0xFF; bout(9,0x3CE,0x3CF);
in(r63,0x3DA); /* reset attr F/F */
r0 = 0x00; r1 = 0x01; r2 = 0x02; r3 = 0x03; /* palette */
r4 = 0x04; r5 = 0x05; r6 = 0x14; r7 = 0x07;
r8 = 0x38; r9 = 0x39; r10 = 0x3A; r11 = 0x3B;
r12 = 0x3C; r13 = 0x3D; r14 = 0x3E; r15 = 0x3F;
r16 = 0x0C; r17 = 0x00; r18 = 0x0F; r19 = 0x08; /* attr cntlr */
bout(20,0x3C0,0x3C0);
out(0x3C0,0x20); /* enable palette */
/* protect extended regs */
out 0x3CE, 0xA out 0x3CF, 0xCE
}
/* End of File - CLVGA.XGI */