home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Frostbyte's 1980s DOS Shareware Collection
/
floppyshareware.zip
/
floppyshareware
/
GLEN
/
INFOP140.ZIP
/
PAGE_06.INC
< prev
next >
Wrap
Text File
|
1990-11-12
|
19KB
|
627 lines
procedure page_06;
const
atividmons: array[0..15] of string[24] =
('EGA', 'analog monochrome', 'TTL monochrome', 'analog color',
'RGB color', 'Multisync or compatible', '(unknown)',
'PS/2 8514 or compatible', '(unknown)', 'NEC MultiSync 2A',
'Tatung OmniScan', 'NEC 3D or compatible', 'TVM 3M',
'NEC MultiSync XL/+/4D/5D', 'TVM 3A', 'TVM 2A');
trividmons: array [0..7] of string[17] =
('MDA', 'CGA', 'EGA', 'Digital multisync', 'VGA', '8514',
'SuperVGA', 'Analog multisync');
type
cardtype = (none, vesa, standard, paradise, video7, ati, ahead, cirrus,
cti, genoa, trident, tseng, zymos);
VESAitype = record
signature: array[0..3] of char;
version: word;
OEMnameOfs: word;
OEMnameSeg: word;
capabilities: array[0..3] of byte;
modesOfs: word;
modesSeg: word;
reserved: array[0..237] of byte;
end;
VESAmtype = record
modeattr: word;
winaattr: byte; {Window A attributes}
winbattr: byte; {Window B attributes}
wingran: word; {Window Granularity}
winsize: word; {Window Size}
winaseg: word; {Window A segment}
winbseg: word; {Window B segment}
posOfs: word; {Offset of Far call to positioning function}
posSeg: word; {Segment ..}
scansize: word; {Bytes per scan line}
{The following information is optional for VESA modes,
required for OEM modes}
pixwidth: word;
pixheight: word;
charwidth: byte;
charheight: byte;
memplanes: byte;
pixelbits: byte;
banks: byte;
memmodel: byte;
banksize: byte;
reserved: array[0..227] of byte;
end;
var
i : byte;
VGAbuf : array[$00..$10] of byte;
VESAinfo: VESAitype;
VESAmode: VESAmtype;
xbyte : byte;
xword1 : word;
xword2 : word;
xword3 : word;
xword4 : word;
vgacard: cardtype;
vidmem : word;
s: string;
c: char;
procedure captfont;
begin
caption1('Font Address');
writeln;
write('INT 1FH ');
segofs(longint(intvec[$1F]) shr 16, longint(intvec[$1F]) and $0000FFFF);
writeln
end; {captfont}
procedure showfont(a : byte);
const
fontnames: array [0..7] of string[12] = (
'INT 1FH ',
'INT 43H ',
'ROM 8x14 ',
'ROM 8x8 (lo)',
'ROM 8x8 (hi)',
'ROM 9x14 ',
'ROM 8x16 ',
'ROM 9x16 ');
begin
with regs do
begin
Write(fontnames[a], ' ');
AX:=$1130;
BH:=a;
intr($10, regs);
segofs(ES, BP);
writeln
end
end; {showfont}
procedure int101210;
const
memnames: array[0..3] of string[4] = ('64K', '128K', '192K', '256K');
begin
with regs do
begin
AH:=$12;
BL:=$10;
intr($10, regs);
caption2('Display type');
case BH of
$00 : writeln('color');
$01 : writeln('monochrome')
else
unknown('display', BH, 2)
end;
caption2('Memory');
if vidmem > 0 then
Writeln(vidmem, 'K')
else
if BL < 4 then
Writeln(memnames[BL], ' as determined from standard BIOS call')
else
unknown('size', BL, 2);
if vgacard = none then
begin
caption2('Feature bits');
writeln(bin4(CH and $0F));
caption2('DIP switches (EGA)');
writeln(bin4(CL and $0F))
end
end
end;
function readROM(seg, ofs: word; length: byte): string;
var
x: word;
s: string;
begin
s:='';
for x:=ofs to ofs + (length - 1) do
s:=s + Chr(Mem[seg:x]);
readROM:=s
end; {readROM}
procedure checking(s: string);
var
x, y: byte;
begin
x:=WhereX;
y:=WhereY;
ClrEol;
Write('Checking for ', s);
GotoXY(x, y);
end; {checking}
procedure cli;
inline($FA);
procedure sti;
inline($FB);
begin (* procedure page_06 *)
vgacard:=none;
caption2('Display adapter');
checking('VESA');
with regs do
begin
AX:=$4F00;
ES:=Seg(VESAinfo);
DI:=Ofs(VESAinfo);
Intr($10, regs);
s:='';
if (AL = $4F) and (AH = 0) and (VESAinfo.signature = 'VESA') then
begin
with VESAinfo do
begin
vgacard:=vesa;
ClrEol;
Writeln('VESA version ', Hi(version), decimal, Lo(version));
caption2('OEM ID');
xword1:=OEMnameSeg;
xword2:=OEMnameOfs;
s:='';
c:=Chr(Mem[xword1:xword2]);
while c <> #0 do
begin
Write(c);
s:=s + c;
Inc(xword2);
c:=Chr(Mem[xword1:xword2])
end;
caption3('Manufacturer');
if s = '761295520' then
Writeln('ATI')
else
dontknow
end;
caption1('Video modes supported:');
Writeln;
xword2:=VESAinfo.modesSeg;
xword3:=VESAinfo.modesOfs;
with VESAmode do
while MemW[xword2:xword3] <> $FFFF do
begin
xword1:=MemW[xword2:xword3];
AX:=$4F01;
CX:=xword1;
ES:=Seg(VESAmode);
DI:=Ofs(VESAmode);
Intr($10, regs);
if (AX = $004F) and (modeattr and 1 = 1) then
begin
pause3(4);
if endit then
Exit;
caption2('Number');
Write(hex(xword1, 4));
caption3('Mode');
if modeattr and 8 = 8 then
Write('Color ')
else
Write('Monochrome ');
if modeattr and $10 = $10 then
Write('graphics')
else
Write('text');
caption3('BIOS output support');
yesorno(modeattr and 4 = 4);
if modeattr and 2 = 2 then
begin
caption3('Screen size');
Write(pixwidth, 'x', pixheight);
caption3('Character size');
Write(charwidth, 'x', charheight);
caption3('Colors');
Writeln(exp((pixelbits * 1.0) * ln(2.0)):1:0);
caption3('Memory model');
case memmodel of
0: Write('Text');
1: Write('CGA');
2: Write('Hercules');
3: Write('4-plane');
4: Write('Packed-pixel');
5: Write('Nonchain 4');
6..$0F: Write('(reserved)');
else
Write('(unknown)')
end;
caption3('Memory planes');
Write(memplanes);
caption3('Memory banks');
Write(banks);
if banks > 1 then
begin
caption3('Bank size');
Write(banksize, 'K')
end;
Writeln;
end;
Writeln;
Inc(xword3, 2);
end;
end;
TextColor(LightGreen);
Write('The next screen will show standard information, so ');
pause1;
if endit then
Exit;
ClrScr;
caption2('Display adapter');
end;
end;
vgacard:=none;
vidmem:=0;
ClrEol;
case graphdriver of
CGA : begin
writeln('CGA');
captfont
end;
MCGA : begin
writeln('MCGA');
captfont;
showfont($01);
showfont($03);
showfont($04);
showfont($06)
end;
EGA..EGAmono : begin
writeln('EGA');
captfont;
showfont($01);
showfont($02);
showfont($03);
showfont($04);
showfont($05);
int101210;
xbyte:=mem[BIOSdseg : $0087];
caption2('Mode change preserves screen buffer');
yesorno(xbyte and $80 = $80);
caption2('EGA active');
yesorno(xbyte and $08 = $00);
caption2('Wait for display enable');
yesorno(xbyte and $04 = $04);
caption2('CGA cursor emulation');
yesorno(xbyte and $01 = $00);
(* PC Magazine 6:12 p.326 *)
caption2('Save area ');
xword1:=memw[BIOSdseg : $00AA];
xword2:=memw[BIOSdseg : $00A8];
segofs(xword1, xword2);
writeln;
(* PC Tech Journal 3:4 p.65 *)
caption2('Video parameter table ');
segofs(memw[xword1 : xword2 + 2], memw[xword1 : xword2]);
writeln;
caption2('Dynamic save area ');
xword3:=memw[xword1 : xword2 + 6];
xword4:=memw[xword1 : xword2 + 4];
if (xword3 > $0000) or (xword4 > $0000) then
begin
segofs(xword3, xword4);
writeln
end
else
writeln('(none)');
caption2('Auxiliary character generator');
xword3:=memw[xword1 : xword2 + 10];
xword4:=memw[xword1 : xword2 + 8];
if (xword3 > $0000) or (xword4 > $0000) then
begin
segofs(xword3, xword4);
writeln
end
else
writeln('(none)');
caption2('Graphics mode auxiliary table');
xword3:=memw[xword1 : xword2 + 14];
xword4:=memw[xword1 : xword2 + 12];
if (xword3 > $0000) or (xword4 > $0000) then
segofs(xword3, xword4)
else
write('(none)')
(* PC Tech Journal 3:4 p.67 *)
end;
hercmono : begin
writeln('Hercules or MDA');
captfont
end;
IBM8514 : begin
writeln('IBM 8514');
captfont
end;
ATT400 : begin
writeln('AT&T 400');
captfont
end;
VGA : begin
writeln('VGA');
vidmem:=0;
caption3('Chipset');
vgacard:=standard;
if vgacard = standard then
with regs do
begin
checking('Video 7');
AX:=$6F00;
BX:=0;
Intr($10, regs);
if BX = $5637 then
begin
vgacard:=video7;
ClrEol;
Write('Video 7');
AX:=$6F07;
Intr($10, regs);
if AL = $6F then
begin
vidmem:=256 * (AH and $7F);
caption3('memory type');
if AH and $80 = $80 then
Writeln('VRAM')
else
Writeln('DRAM')
end
else
vidmem:=256;
end;
end;
if vgacard = standard then
begin
checking('AHEAD');
s:=readROM($C000, $25, 5);
if s = 'AHEAD' then
begin
vgacard:=ahead;
ClrEol;
Writeln('Ahead');
end
end;
if vgacard = standard then
begin
checking('Cirrus');
if CirrusCK = 1 then
begin
vgacard:=cirrus;
ClrEol;
Write('Cirrus');
end;
end;
if vgacard = standard then
begin
checking('CTI');
with regs do
begin
AH:=$5F;
AL:=0;
Intr($10, regs);
if AL = $5F then
begin
ClrEol;
Write('CTI 82C45', CTICK);
vgacard:=CTI;
vidmem:=(BH * 256) + 256;
caption3('micro-channel');
yesorno2(CX and 2 = 2);
caption3('DAC size');
if CX and 1 = 1 then
Writeln('8-bit')
else
Writeln('6-bit');
end
end;
end;
if vgacard = standard then
begin
checking('Genoa');
xword2:=MemW[$C000:$37];
xword1:=MemW[$C000:$39];
s:=readROM(xword1, xword2, 4);
if s = #$77#$11#$99#$66 then
begin
vgacard:=genoa;
ClrEol;
Writeln('Genoa');
end
end;
if vgacard = standard then
begin
checking('Trident');
Port[$3C4]:=$0B;
xbyte:=Port[$3C5] and $0F;
if (xbyte >= 1) and (xbyte <= 2) then
begin
vgacard:=trident;
ClrEol;
Write('Trident ');
if xbyte = 1 then
Write('8800BR')
else
Write('8800CS');
with regs do
begin
AX:=$7000;
BX:=0;
Intr($10, regs);
if AL = $70 then
begin
caption3('Everex Card');
DX:=(DX and $FFF0) shr 4;
case DX of
$678: Write('Viewpoint');
$236: Write('Ultragraphics II');
$620: Write('Vision VGA');
$673: Write('EVGA')
else
dontknow2;
end; {case}
vidmem:=((CH shr 6) * 256) + 256;
caption3('Monitor');
if CL < 8 then
Writeln(trividmons[CL])
else
Writeln('(unknown) - ', CL);
end
end;
end;
end;
if vgacard = standard then
begin
checking('Tseng');
if tsengCK = 1 then
begin
ClrEol;
Writeln('Tseng');
vgacard:=tseng
end;
end;
if vgacard = standard then
begin
checking('ZyMOS');
if zymosCK = 2 then
begin
ClrEol;
Writeln('ZyMOS');
vgacard:=zymos
end;
end;
if vgacard = standard then
with regs do
begin
checking('ATI');
s:=readROM($C000, $31, 9);
if s = '761295520' then
begin
vgacard:=ati;
ClrEol;
Write('ATI');
caption3('Board');
s:=readROM($C000, $40, 2);
if s = '31' then
Write('VGAWonder');
if s = '32' then
Write('EGAWonder 800+');
caption3('Revision');
Write(Mem[$C000:$4C], decimal, Mem[$C000:$4D]);
caption3('gate version');
c:=Chr(Mem[$C000:$43]);
if c = '3' then
Writeln('2 w/ VRAM')
else
Writeln(c);
xbyte:=Mem[$C000:$42];
caption3('mouse port');
yesorno2(xbyte and 2 = 2);
caption3('microchannel');
yesorno2(xbyte and 8 = 8);
caption3('non-interlaced available');
yesorno(xbyte and 4 = 4);
xword1:=MemW[$C000:$10];
xbyte:=ATIinfo($BB, xword1);
caption3('monitor');
Writeln(atividmons[xbyte and $0F]);
xbyte:=xbyte and $20;
if xbyte = $20 then
vidmem:=512
else
vidmem:=256;
end;
end;
if vgacard = standard then
begin
checking('Paradise');
s:=readROM($C000, $7D, 4);
if s = 'VGA=' then
begin
vgacard:=paradise;
ClrEol;
Write('Western Digital/Paradise');
cli;
PortW[$3CE]:=$0B0F;
vidmem:=(Port[$3CF] shr 4) * word(64);
sti;
vidmem:=(vidmem div 256) * 256;
caption3('Frequencies are');
cli;
PortW[$3CE]:=$0F0F;
xbyte:=Port[$3CF];
sti;
if (xbyte and $80) = $80 then
Writeln('multi-sync')
else
Writeln('fixed-sync')
end;
end;
if vgacard = standard then
begin
ClrEol;
dontknow;
end;
captfont;
showfont($01);
showfont($02);
showfont($03);
showfont($04);
showfont($05);
showfont($06);
showfont($07);
int101210;
with regs do
begin
AX:=$1009;
ES:=seg(VGAbuf);
DX:=ofs(VGAbuf);
intr($10, regs)
end;
caption2('Palette registers');
for i:=$00 to $0F do
write(hex(VGAbuf[i], 2), ' ');
writeln;
caption2('Border color');
writeln(hex(VGAbuf[$10], 2));
caption2('Color page');
with regs do
begin
AX:=$101A;
intr($10, regs);
writeln('$', hex(BH, 2));
caption2('Paging mode');
case BL of
$00 : writeln('4 pages of 64 registers');
$01 : writeln('16 pages of 16 registers')
else
unknown('mode', BL, 2)
end
end
end;
PC3270 : begin
writeln('3270 PC');
captfont
end
else
unknown('adapter', graphdriver, 4)
end {case}
end; {page_06}