Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

BIOS VGA mem, mode 12h

Status
Not open for further replies.

adholioshake

Programmer
Feb 9, 2003
136
Hi people.

I'm trying to figure out how the memory for screen mode 12h for BIOS screen-set call (ah=00h, int 10h) is organised.

It would seem that the first block of memory is a bitmap for whether the pixel is on or off - but how do you change the colour of that pixel?

I'm trying to rewrite the pset BIOS call (because it is insanely slow...).

Any info would be appreciated.

Adonai.

Don't hate the player - hate the game
 
Get a good book on VGA programming. The VGA card is a complicated thing (and you're right, the bios pixel drawer, while beautiful in that it always works in all DOS modes, is very slow indeed).
Michael Abrash's various books are good, and probably downloadable from somewhere.
The VGA has four lots of memory addressed in parallel through the same addresses, and uses ports to control which ones you write to, and how. It even has various different modes about how written bytes will be processed before they end up in the VGA memory. The complications are big but necessary; even in the early days, a true VGA card gave a screen that needed 256K (rather a lot in the 1Mb days of DOS) packed into a foot-print of only 64K.
 
I've got some of michael abrash's work: 'the black book' and 'zen of' graphics programming. They are very good, but mainly look at using mode 13h (as a 320x400) and mode X, but these concentrate on having 256 colours (which I'm not to bothered about...) and not resolution. If colours were the issue, I would look into VESA for graphics card rather than the memory adressing (back in the old days of DOS...)

I'll have a fish around in his notes looking for how to use the VGA ports for mode 13 hoping for a catch. But that would be the harder way I had assumed I didn't need to do.

Thanks for the reply, lionelhill. I'll post if I find out more. :)

Don't hate the player - hate the game
 
The black book's earlier chapters on data-flow through the VGA deal with the 16-colour stuff and the 4 planes. They're not exactly easy reading, but probably necessary. Good luck. It's fun, anyway. If I were you I'd draw out some diagrams of data-flow. The discussion in text doesn't make it so clear.
Anyone know whether it's still safe to assume all PCs have vesa compatibility?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top