Jim Leonard wrote:
Mark Meiss wrote:
IF ParamStr (1) = '132x60' THEN i :=
268;
IF ParamStr (1) = '132x50' THEN i := 267;
IF ParamStr (1) = '132x43' THEN i := 266;
IF ParamStr (1) = '132x25' THEN i := 265;
IF ParamStr (1) = '080x60' THEN i := 264;
Just a quick note that you shouldn't actually implement VESA this way,
because the mode numbers are not guaranteed from card to card. The
proper way is to use VESA to query all of the modes, stuff results into
an array, iterate through the array to find what you're looking for, and
then set the mode with what you come up with.
... so long as there's a user override for when it goes wrong. There were some
really broken VESA implementations out there back in the day!
The last time I did anything serious with PC graphics programming under DOS, I
ended up going the loadable driver route - it was the driver which translated
requests to actual things happening on screen (and the reporting of board
modes) via a common API.
My main focus was graphics though, so I think the text APIs that I came up
with were reasonably primitive and didn't support attributes other than colour.
Implementation-wise, it wasn't too difficult to do - I tend to find that most
code (aside from things designed to be as fast as possible) naturally provides
API-like boundaries anyway, so it's not hard to abstract that out and parcel
it up into some sort of runtime-loadable module.
cheers
Jules