#358 Video Parameters table missing entries

open
nobody
None
5
2012-09-07
2011-01-03
deathshadow
No

A lof ot protected mode software sets it's video mode without calling BIOS -- to do this it is often more convenient to check the ROM data table which contains all the register values needed to set a EGA/VGA to the desired mode.

It appears that the table provided by DOSBOX is incomplete and only provides data for modes 0x04,0x05,0x06,0x07,0x0D,0x0E, 0x11 and 0x12. All the other video modes provide no useful information.

The table I'm referring to is pointed to by the pointer that the BIOS save area pointer is pointing at... Lemme explain that in code:

program vidTable;
type
pVidModeTable=^vidModeTable;
vidModeTable=packed record
columns,
rows,
points:byte;
length:word;
sequencer:array[0..3] of byte;
misc:byte;
crtc:array[0..$18] of byte;
attr:array[0..$13] of byte;
gcr:array[0..8] of byte;
end;

var
biosDataPointer:pointer absolute $0040:$00A8;
data:pVidModeTable;

begin
data:=pVidModeTable(biosDataPointer^);
for t:=0 to $13 do begin
write('mode ',byte2hex(t),' - ');
write(data^.columns:4,' x',data^.rows:4,' - ');
write('PPL:',data^.points:3,' ');
writeln('Len:',data^.length:6,' ');
end;
end.

On a real EGA/VGA returns data for all video modes. Completely empty 0.74 and the current SVN.

Though if I force feed the correct values to the CRTC to set the mode manually it works, so at least that's something.

Discussion

  • c2woody
    c2woody
    2011-01-03

    The EGA table is correctly filled for 4,5,6,7,d,e,f,10,0,1,2,3 excluding non-present and CGA-emulation modes.

    The VGA table is correctly filled for 4,5,6,7,d,e,f,10,0/1,2/3,7,11,12,13 excluding non-present and CGA-emulation modes.

    If there's any game that uses any of the missing modes (though I have yet to see ANY pmode game that would switch modes by extracting any data from those tables) please post details.