hi i know it's a little bit strange
but does anyone know (has sources in asm) how to show a bitmap 24 bits or 64K under dos i know that i'll have to use VESA int (4fh int 10h)
but how do i read my bitmap and threat color
please help me...
Posted on 2004-08-26 17:05:04 by Thor0Asgard
You first have to learn what is the content of the info header. From then on, you can read any size bitmap in sections not exceeding 64k and transfer the data to the video memory.

The first part is well explained in numerous sources. Depending on which VESA mode you wish to use, the second part would require an entire book to explain all the details.

Posted on 2004-08-26 21:44:42 by Raymond
For Example a 1024x768 32 Bits
mode vesa 2 or 3 i gess 118h
Posted on 2004-08-27 10:18:02 by Thor0Asgard
You have to take care with "standardized" VESA modes, because they are not so exactly standardized. For example: I wrote a true color VESA driver in assembly language for Turbo Pascal, I made OBJ files, and I included them in Pascal EXEs. I handled it even the 24bit and 32bit problem.
Some videocards support only 24bit modes (like the Integrated Intel cards), others have both 24bit and 32bit modes. During the time of developing the driver, I encountered many difficulties with these mode numbers: THEY ARE NOT STANDARDIZED, one card has a particular mode assigned to a code, other has a completely different mode assigned to the same code.

I made the following solution: I interogate from the VESA Bios the list with all the codes, and after it I interogate the properties of each code, and I look after the true color modes (24 or 32 bit), this way I am not conserned about the codes incompatibility and the mode is detected automatically if it is under different code.
I wrote even a procedure that saves the screen to a BMP file. Maybe you can use it.

I uploaded all the project, there are 4 important files:
VESA.ASM - the VESA functions + Bresenham line drawing algorithm + rectangle + bar + text functions
MOUSE.ASM - the mouse support for the VESA.ASM
TRUEVESA.PAS - the Pascal unit for with the graphic functions even with clipping
TRUEMOUS.PAS - the unit for the mouse drivers

LEMBMP.PAS - the unit, which captures the screen and saves it to a BMP file.
TESTVESA is a program that tests the unit. The functions are quite fast, definitely faster than svga256.bgi, or the normal vga.bgi, you can change the video mode with CTRL+ or CTRL-

I'm sorry but the comments are written in hungarian, at that time I did not pay attention to write english comments.

Here's the archive
Posted on 2004-08-27 12:35:58 by bszente