home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The World of Computer Software
/
World_Of_Computer_Software-02-386-Vol-2of3.iso
/
c
/
careyj.zip
/
MXVGA.ZIP
/
ODT.10
/
MXIC.XGI
< prev
Wrap
Text File
|
1991-05-28
|
15KB
|
663 lines
/* @(#)vga.xgi 3.2 9/8/89 16:30:29 */
/* ******************************************************************* *
* XEGIA(tm) GrafInfo File for *
* *
* Copyright (c) 1989 Metagraphics Software Corporation *
* 269 Mount Hermon Road, PO 66779, Scotts Valley, CA 95066 *
* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - *
* *
* ******************************************************************* */
/* **************************************************************** */
VENDOR MXIC "MXIC_VGA"
MODEL VGA "VGA"
CLASS SVGA "Super 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(0x3cE,0x3cF); /* Graphics */
PORT(0x3d4,0x3d5); /* CRTC */
PROCEDURE InitGraphics
{
DEVCLASS = 0x55;
DEVTYPE = 01;
DEVTECH = 02; /* VGA */
PIXBYTES = 100;
PIXWIDTH = 800;
PIXHEIGHT = 600;
PIXRESX = 64;
PIXRESY = 54;
PIXBITS = 1;
PIXPLANES = 4;
MAPFLAGS = 0;
BASEADDRESS = 0xA0000;
INTERLEAVE = 1;
INTERSIZE = 100;
}
PROCEDURE SetGraphics
{
/* sequencer */
r0 = 0x1; /* reset */
r1 = 0x1;
r2 = 0xF;
r3 = 0x0;
r4 = 0x6;
bout(5, 0x3c4, 0x3c5);
/* misc output reg */
out(0x3c2,0x0f);
/*
IF OSC EQ ENABLE
db 03h
ENDIF
IF ICS EQ ENABLE
db 0fh
ENDIF
IF MXCLK EQ ENABLE
db 0bh
ENDIF
*/
/* remove sequencer reset */
r0 = 0x3; bout(1,0x3c4,0x3c5);
/* unprotect crtc regs 0-7 */
out(0x3d4, 0x11); out(0x3d5, 0x0);
/* crtc */
r0 = 0x7b; r1 = 0x63; r2 = 0x64; r3 = 0x9e;
r4 = 0x69; r5 = 0x8f; r6 = 0x6f; r7 = 0xf0;
r8 = 0; r9 = 0x60; r10 = 0; r11 = 0;
r12 = 0; r13 = 0; r14 = 0; r15 = 0;
r16 = 0x58; r17 = 0x8e; r18 = 0x57; r19 = 0x32;
r20 = 0; r21 = 0x58; r22 = 0x6f; 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 attribute 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;
bout( 20, 0x3C0, 0x3C0 );
/* palette mask */
out( 0x3C6, 0xFF);
/* enable palette */
out( 0x3C0, 0x20);
/* set extended registers */
out( 0x3c4, 0xa7); /* unlock extended registers */
out( 0x3c5, 0x87);
out( 0x3c4, 0xc3);
out( 0x3c5, 0x20); /* BUS16EN,CFD2,1,0,EXT256MD,SEGON */
/* BUS16EN bit should be read back first */
out( 0x3c4, 0xc4);
out( 0x3c5, 0);
/*
IF OSC EQ ENABLE
dw 02c4h
ENDIF
IF ICS EQ ENABLE
dw 00c4h
ENDIF
IF MXCLK EQ ENABLE
dw 01c4h
ENDIF
*/
out(0x3c2,0x0f);
/*
IF OSC EQ ENABLE
db 03h
ENDIF
IF ICS EQ ENABLE
db 0fh
ENDIF
IF MXCLK EQ ENABLE
db 0bh
ENDIF
*/
out( 0x3c4, 0xf0);
out( 0x3c5, 0); /* EXTVGAMODE(0),MASKHIGH(0) */
/* SYNCVIDEO(0),INTERLACE(0) */
}
PROCEDURE SetText
{
/* unprotect crtc regs 0-7 */
out( 0x3D4,0x11); out(0x3D5,0x20);
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 */
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 = 0x55; r5 = 0x81; r6 = 0xBF; r7 = 0x1F;
r8 = 0x00; r9 = 0x4F; r10 = 0x0D; r11 = 0x0E;
r12 = 0x00; r13 = 0x00; r14 = 0x00; r15 = 0x00;
r16 = 0x9C; r17 = 0x8E; r18 = 0x8F; r19 = 0x28;
r20 = 0x1F; r21 = 0x96; r22 = 0xB9; r23 = 0xA3;
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 */
/* set extended registers */
out( 0x3c4, 0xa7); /* unlock extended registers */
out( 0x3c5, 0x87);
out( 0x3c4, 0xc3);
out( 0x3c5, 0xa0);
out( 0x3c4, 0xc4);
out( 0x3c5, 0xc0);
out(0x3C2,0x67);
out( 0x3c4, 0xf0);
out( 0x3c5, 0);
}
/* **************************************************************** */
VENDOR MXIC "MXIC_VGA"
MODEL VGA "VGA"
CLASS SVGA "Super VGA"
MODE 1024x768i-16 "1024x768i 16 color"
/* for interlaced monitor only */
MEMORY(0xa0000,0x20000); /* Base Address, Length */
PORT(0x3c2,0x3ca,0x3cc,0x3da); /* General/External registers */
PORT(0x3c0,0x3c1); /* Attribute */
PORT(0x3c4,0x3c5); /* Sequencer */
PORT(0x3cE,0x3cf); /* Graphics */
PORT(0x3d4,0x3d5); /* CRTC */
PORT(0X46e8,0x103);
PROCEDURE InitGraphics
{
DEVCLASS = 0x56;
DEVTYPE = 01;
DEVTECH = 02; /* VGA */
PIXBYTES = 128;
PIXWIDTH = 1024;
PIXHEIGHT = 768;
PIXRESX = 96;
PIXRESY = 96;
PIXBITS = 1;
PIXPLANES = 4;
MAPFLAGS = 0;
BASEADDRESS = 0xA0000;
INTERLEAVE = 1;
INTERSIZE = 128;
}
PROCEDURE SetGraphics
{
/* sequencer */
r0 = 0x1; /* reset */
r1 = 0x1;
r2 = 0xF;
r3 = 0x0;
r4 = 0x6;
bout(5, 0x3c4, 0x3c5);
/* misc output reg */
out(0x3c2,0x0f);
/*
IF OSC EQ ENABLE
db 0fh
ENDIF
IF ICS EQ ENABLE
db 07h
ENDIF
IF MXCLK EQ ENABLE
db 0fh
ENDIF
*/
/* remove sequencer reset */
r0 = 0x3; bout(1,0x3c4,0x3c5);
/* Feature Control registers */
out(0x3da, 0);
/* unprotect crtc regs 0-7 */
out(0x3d4, 0x11); out(0x3d5, 0x0);
/* crtc */
r0 = 0x99; r1 = 0x7f; r2 = 0x81; r3 = 0x9b;
r4 = 0x83; r5 = 0x10; r6 = 0x9d; r7 = 0x1f;
r8 = 0; r9 = 0x40; r10 = 0; r11 = 0;
r12 = 0; r13 = 0; r14 = 0; r15 = 0;
r16 = 0x84; r17 = 0x8c; r18 = 0x7f; r19 = 0x40;
r20 = 0; r21 = 0x84; r22 = 0x98; r23 = 0xe3;
r24 = 0xff;
bout( 25, 0x3d4, 0x3d5 );
/* graphics controller */
r0 = 0x0;
r1 = 0x0;
r2 = 0x0;
r3 = 0x0;
r4 = 0x0;
r5 = 0x0;
r6 = 0x1;
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;
bout( 20, 0x3c0, 0x3c0 );
/* palette mask */
out( 0x3c6, 0xff);
/* enable palette */
out( 0x3c0, 0x20);
/* set extended registers */
out( 0x3c4, 0xa7); /* unlock extended registers */
out( 0x3c5, 0x87);
out( 0x3c4, 0xc3);
out( 0x3c5, 0x44); /* BUS16EN,CFD2,1,0,EXT256MD,SEGON */
/* BUS16EN bit should be read back first */
out( 0x3c4, 0xc4);
out( 0x3c5, 0);
/*
IF OSC EQ ENABLE
dw 00c4h
ENDIF
IF ICS EQ ENABLE
dw 01c4h
ENDIF
IF MXCLK EQ ENABLE
dw 00c4h
ENDIF
*/
out(0x3C2,0x0f);
/*
IF OSC EQ ENABLE
db 0fh
ENDIF
IF ICS EQ ENABLE
db 07h
ENDIF
IF MXCLK EQ ENABLE
db 0fh
ENDIF
*/
out( 0x3c4, 0xf0);
out( 0x3c5, 0x0b); /* EXTVGAMODE(0),MASKHIGH(0) */
/* SYNCVIDEO(0),INTERLACE(0) */
}
PROCEDURE SetText
{
/* unprotect crtc regs 0-7 */
out( 0x3d4,0x11); out(0x3d5,0x20);
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 */
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 = 0x55; r5 = 0x81; r6 = 0xbf; r7 = 0x1f;
r8 = 0x00; r9 = 0x4f; r10 = 0x0d; r11 = 0x0e;
r12 = 0x00; r13 = 0x00; r14 = 0x00; r15 = 0x00;
r16 = 0x9c; r17 = 0x8e; r18 = 0x8f; r19 = 0x28;
r20 = 0x1f; r21 = 0x96; r22 = 0xb9; r23 = 0xa3;
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 */
/* set extended registers */
out( 0x3c4, 0xa7); /* unlock extended registers */
out( 0x3c5, 0x87);
out( 0x3c4, 0xc3);
out( 0x3c5, 0xa0);
out( 0x3c4, 0xc4);
out( 0x3c5, 0xc0);
out(0x3C2, 0x67);
out( 0x3c4, 0xf0);
out( 0x3c5, 0);
}
/* **************************************************************** */
VENDOR MXIC "MXIC_VGA"
MODEL VGA "VGA"
CLASS SVGA "Super VGA"
MODE 1024x768n-16 "1024x768n 16 color"
/* for interlaced monitor only */
MEMORY(0xa0000,0x20000); /* Base Address, Length */
PORT(0x3c2,0x3ca,0x3cc,0x3da); /* General/External registers */
PORT(0x3c0,0x3c1); /* Attribute */
PORT(0x3c4,0x3c5); /* Sequencer */
PORT(0x3cE,0x3cf); /* Graphics */
PORT(0x3d4,0x3d5); /* CRTC */
PORT(0X46e8,0x103);
PROCEDURE InitGraphics
{
DEVCLASS = 0x56;
DEVTYPE = 01;
DEVTECH = 02; /* VGA */
PIXBYTES = 128;
PIXWIDTH = 1024;
PIXHEIGHT = 768;
PIXRESX = 96;
PIXRESY = 96;
PIXBITS = 1;
PIXPLANES = 4;
MAPFLAGS = 0;
BASEADDRESS = 0xa0000;
INTERLEAVE = 1;
INTERSIZE = 128;
}
PROCEDURE SetGraphics
{
/* sequencer */
r0 = 0x1; /* reset */
r1 = 0x1;
r2 = 0xf;
r3 = 0x0;
r4 = 0x6;
bout(5, 0x3c4, 0x3c5);
/* misc output reg */
out(0x3c2,0x0b);
/*
IF OSC EQ ENABLE
db 0bh
ENDIF
IF ICS EQ ENABLE
db 0bh
ENDIF
IF MXCLK EQ ENABLE
db 0fh
ENDIF
*/
/* remove sequencer reset */
r0 = 0x3; bout(1,0x3c4,0x3c5);
/* Feature Control registers */
out(0x3da, 0);
/* unprotect crtc regs 0-7 */
out(0x3d4, 0x11); out(0x3d5, 0x0);
/* crtc */
r0 = 0xa2; r1 = 0x7f; r2 = 0x80; r3 = 0x85;
r4 = 0x87; r5 = 0x90; r6 = 0x2c; r7 = 0xfd;
r8 = 0; r9 = 0x60; r10 = 0; r11 = 0;
r12 = 0; r13 = 0; r14 = 0; r15 = 0;
r16 = 0x0f; r17 = 0x8c; r18 = 0xff; r19 = 0x40;
r20 = 0; r21 = 0x07; r22 = 0x26; r23 = 0xe3;
r24 = 0xff;
bout( 25, 0x3d4, 0x3d5 );
/* graphics controller */
r0 = 0x0;
r1 = 0x0;
r2 = 0x0;
r3 = 0x0;
r4 = 0x0;
r5 = 0x0;
r6 = 0x1;
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;
bout( 20, 0x3c0, 0x3c0 );
/* palette mask */
out( 0x3c6, 0xff);
/* enable palette */
out( 0x3c0, 0x20);
/* set extended registers */
out( 0x3c4, 0xa7); /* unlock extended registers */
out( 0x3c5, 0x87);
out( 0x3c4, 0xc3);
out( 0x3c5, 0x54); /* BUS16EN,CFD2,1,0,EXT256MD,SEGON */
/* BUS16EN bit should be read back first */
out( 0x3c4, 0xc4);
out( 0x3c5, 1);
/*
IF OSC EQ ENABLE
dw 00c4h
ENDIF
IF ICS EQ ENABLE
dw 01c4h
ENDIF
IF MXCLK EQ ENABLE
dw 01c4h
ENDIF
*/
out(0x3C2,0x0b);
/*
IF OSC EQ ENABLE
db 0bh
ENDIF
IF ICS EQ ENABLE
db 0bh
ENDIF
IF MXCLK EQ ENABLE
db 0fh
ENDIF
*/
out( 0x3c4, 0xf0);
out( 0x3c5, 0x08); /* EXTVGAMODE(0),MASKHIGH(0) */
/* SYNCVIDEO(0),INTERLACE(0) */
}
PROCEDURE SetText
{
/* unprotect crtc regs 0-7 */
out( 0x3d4,0x11); out(0x3d5,0x20);
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 */
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 = 0x55; r5 = 0x81; r6 = 0xbf; r7 = 0x1f;
r8 = 0x00; r9 = 0x4f; r10 = 0x0d; r11 = 0x0e;
r12 = 0x00; r13 = 0x00; r14 = 0x00; r15 = 0x00;
r16 = 0x9c; r17 = 0x8e; r18 = 0x8f; r19 = 0x28;
r20 = 0x1f; r21 = 0x96; r22 = 0xb9; r23 = 0xa3;
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 */
/* set extended registers */
out( 0x3c4, 0xa7); /* unlock extended registers */
out( 0x3c5, 0x87);
out( 0x3c4, 0xc3);
out( 0x3c5, 0xa0);
out( 0x3c4, 0xc4);
out( 0x3c5, 0xc0);
out(0x3C2, 0x67);
out( 0x3c4, 0xf0);
out( 0x3c5, 0);
}
/* End of File - VGA.XGI */