VESA Programming

Started by
6 comments, last by Leonid Shevtsov 21 years, 5 months ago
I''m writing a game with high resolution graphics under DOS and I need to know how to program the videocard with the VESA Standard supported. Can you help? I need only PutPixel and BitBLT
Advertisement
Unfortunately, if you are looking to switch into a high resolution video mode without making use of the BIOS interrupts you are gonna have a hell of a time. There is no standard for SVGA and each video card you encounter will use differant ports for setting a high resolution video mode. The highest you can get that is standardized is 640x480x4 I believe.

If you want to use the BIOS interrupts for doing it, it does support a few video chipsets and you will beable to enable your high resolution graphics through there but then you also need to know how the video card handles paging (you cant access abouve 64k of memory without paging the video card memory).

I was upset when I found all this out also but just make use with what ya got. If you get lucky, your video card distributer will also provide you with detailed technical documentation, mine didnt though.

Good luck
--Andrew

Steps to using VESA

1. Get back in time shed

2. Come back to the year 2002


Seriously though, you can download the VBE extensions from www.vesa.org. You have to use assembly to use them though.

http://www.vesa.org/vbe3.pdf\

This file has some sample source code for putpixel and for setting up the video mode.
hey, guess what, you''re in luck, i just so happen to have tutorials on ''em....

http://nomad.openglforums.com

i suggest looking into my windows tutorial also....

hope this helps!
Cool! A tutorial about VESA! But I''d like to add something right there. It could be important to know how to use selectors. It is really useful. I don''t know which compiler you use, but if you use DJGPP, you''ll need to use __djgpp_nearptr_enable() and """disable if you don''t use selectors. Theses functions are quite slow. And I''d say that it''s somewhat a "trouble-maker" programming. Anyway, try to find something on the net about selector. I hope you the best of the chances because I found nothing about it... I think it could be time to make a tutorial about this. anyway
Who cares if __djgpp_nearptr_enable is slow if you just do it once at the start of your program? (That was my method back in the day of VESA)
I know, but i am afraid of this!
It''s safer to use the farptr-funcs than nearptr. Nearptr is a lil'' bit faster, but you only need the functions when you transfer data from a buffer to the vid-mem. Just a compatibility-issue...

This topic is closed to new replies.

Advertisement