home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Frostbyte's 1980s DOS Shareware Collection
/
floppyshareware.zip
/
floppyshareware
/
DOOG
/
INFOP131.ZIP
/
PAGE_06.INC
< prev
next >
Wrap
Text File
|
1990-09-04
|
14KB
|
456 lines
procedure page_06;
type
cardtype = (vesa, standard, paradise, video7, ati);
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;
saveattr, savex, savey: byte;
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);
begin
with regs do
begin
case a of
$00 : write('INT 1FH ');
$01 : write('INT 43H ');
$02 : write('ROM 8x14 ');
$03 : write('ROM 8x8 (lo)');
$04 : write('ROM 8x8 (hi)');
$05 : write('ROM 9x14 ');
$06 : write('ROM 8x16 ');
$07 : write('ROM 9x16 ')
end;
write(' ');
AX:=$1130;
BH:=a;
intr($10, regs);
segofs(ES, BP);
writeln
end
end; {showfont}
procedure int101210;
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 vgacard <> standard then
Writeln(vidmem, 'K')
else
case BL of
$00 : writeln('64K');
$01 : writeln('128K');
$02 : writeln('192K');
$03 : writeln('256K')
else
unknown('size', BL, 2)
end;
caption2('Feature bits');
writeln(bin4(CH and $0F));
caption2('DIP switches (EGA)');
writeln(bin4(CL and $0F))
end
end;
procedure searching;
begin
savex:=WhereX;
savey:=WhereY;
saveattr:=TextAttr;
TextColor(LightRed + Blink);
Write('** Searching for supported modes **');
TextAttr:=saveattr;
GotoXY(savex, savey);
end;
begin (* procedure page_06 *)
vgacard:=standard;
caption2('Display adapter');
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;
Writeln('VESA version ', Hi(version), Chr(country[9]), 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
Writeln('(unknown)');
end;
caption1('Video modes supported:');
Writeln;
searching;
with VESAmode do
for xword1:=$0000 to $7FFF do
begin
AX:=$4F01;
CX:=xword1;
ES:=Seg(VESAmode);
DI:=Ofs(VESAmode);
Intr($10, regs);
if (AX = $004F) and (modeattr and 1 = 1) then
begin
Write(' ');
GotoXY(savex, savey);
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
3: Write('Planar');
4: Write('Bit-packed');
else
Write('(unkown - ', hex(memmodel, 4), ')')
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;
searching
end;
end;
Write(' ');
GotoXY(savex, savey);
TextColor(LightGreen);
Write('The next screen will show standard information, so ');
pause1;
if endit then
Exit;
ClrScr;
caption2('Display adapter');
end;
end;
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');
caption3('Chipset');
vgacard:=standard;
with regs do
begin
AX:=$7F;
BH:=2;
Intr($10, regs);
if BH = $7F then
begin
vgacard:=paradise;
Write('Paradise');
vidmem:=word(64) * CH;
caption3('Frequencies are');
AX:=$7F;
BH:=$1F;
Intr($10, regs);
if (BL and $80) = $80 then
Writeln('multi-sync')
else
Writeln('fixed-sync')
end;
AX:=$6F00;
BX:=0;
Intr($10, regs);
if BX = $5637 then
begin
vgacard:=video7;
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;
s:='';
for xword1:=$31 to $39 do
s:=s + Chr(Mem[$C000:xword1]);
if s = '761295520' then
begin
vgacard:=ati;
Write('ATI');
s:=Chr(Mem[$C000:$40]) + Chr(Mem[$C000:$41]);
if s = '31' then
begin
xbyte:=Mem[$C000:$42];
caption3('mouse port');
yesorno2(xbyte and 2 = 2);
caption3('microchannel');
yesorno(xbyte and 8 = 8);
caption3(' non-interlaced 1024x768 available');
yesorno2(xbyte and 4 = 4);
xword1:=MemW[$C000:$10];
xbyte:=ATIinfo($BB, xword1) and $0F;
caption3('monitor');
case xbyte of
$0: Writeln('EGA');
$1: Writeln('analog monochrome');
$2: Writeln('TTL monochrome');
$3: Writeln('analog color');
$4: Writeln('RGB color');
$5: Writeln('Multisync or compatible');
$7: Writeln('PS/2 8514 or compatible');
$9: Writeln('NEC MultiSync 2A');
$A: Writeln('Tatung OmniScan');
$B: Writeln('NEC 3D or compatible');
$C: Writeln('TVM 3M');
$D: Writeln('NEC MultiSync XL/+/4D/5D');
$E: Writeln('TVM 3A');
$F: Writeln('TVM 2A');
else
Writeln('(unknown type - ', hex(xbyte, 2), ')');
end; {case}
xbyte:=ATIinfo($BB, xword1) and $20;;
if xbyte = $20 then
vidmem:=512
else
vidmem:=256;
end;
end;
end;
if vgacard = standard then
Writeln('(unknown)');
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}