home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
CD Shareware Masterblend
/
cdsharewaremasterblend.iso
/
utils
/
infoplus
/
page_06.pas
< prev
next >
Wrap
Pascal/Delphi Source File
|
1990-12-08
|
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;