mmshah@athena.mit.edu (Milan M Shah) (03/04/91)
I got sick of the silly border (overscan) color feature of the VGA. Its epsecially annoying because I use a 'dos shell' to execute programs, and this always screws up the border color for a very disturbing look. So, after a lot of hacking, I have come up with a small (29 bytes when assembled!!) program that disables the border color altogether (ie, its always black). Of course, there's a catch. It works *only* on a Paradise VGA 1024 card based on the PVGA1B or Western Digital WE90C00 chipset. (from what I know, any card that is a Paradise / paradise clone made after 1986). Here is the assembly source for it. ;***************************************************************************** ; ;Author : Milan Shah ;Date : 3/3/91 ;Program to disable the border color on Paradise 1024 cards based on the ;Western Digital WD90C00 / Paradise PVGA 1B chipset ; ;***************************************************************************** _TEXT SEGMENT PUBLIC 'CODE' ASSUME CS:_TEXT,DS:_TEXT ASSUME ES:_TEXT,SS:_TEXT ORG 100H START: jmp main ;***************************************************************************** ; ; The following code was pieced together with information from 'Advanced ; Programmer's Guide to Super VGAs' by George Sutty and Steve Blair, Brady ; Books, Simon and Schuster. ; Relevant information: ; I/O port 3CEh is the index register and I/O port 3CFh is the data ; Relevant information: ; I/O port 3CEh is the index register and I/O port 3CFh is the data ; register for the Graphics Controller. Index 0Fh of this file is to be set ; to 05h to unlock extended registers. In addition, index 29H of the ; CRT Controller (Index at 3D4h, data at 3D5h) must be set to A5 to ; access indexes 2Ah - 30h of the CRT Controller registers. Index 2Eh of ; the CRT controller registers is Misc. Control 1. Bit 0 of Misc. Control ; 1 disables the border. ; ; To address index i of register file located at I/O port XXXh, first write ; out the index at XXXh, then read or write the data at XXX+1h. Can combine ; the two operations for a write by sending out the word dih to XXXh. Thus ; writing 050Fh at port 3CEh selects index 0Fh and writes 05h into the ; register at that index. MAIN: mov dx,03CEh ;Extended Register Locking register mov ax,050Fh ;Index 0Fh, data 05h out dx,ax ;unlock extended registers mov dx,03D4h ;Port address of Misc. Control1 Reg. mov ax,0A529h ;Unlock extended reg index 2A-30h out dx,ax mov al,2Eh ;Index 2Eh is Misc. Control Reg 1 out dx,al ;Tell PVGA we want to access it mov al,2Eh ;Index 2Eh is Misc. Control Reg 1 out dx,al ;Tell PVGA we want to access it mov dx,03D5h ;Get existing data in Misc Control 1 in al,dx or al,01h ;Disable the Border bit out dx,al ;Write Misc. Control 1 data int 20h ;Done _TEXT ENDS END START I assembled it with Tlink /t. Works like a charm on my machine (clone paradise 1024 card purchased about 2 years ago). If there's any interest, I can put the .com file somewhere. Milan .