supervga programming

Started by
9 comments, last by Xeee 22 years, 3 months ago
i''m still working with dos programming , and i don''t wanna change to win32 untill i master it . i made several games with bgi @ 640*480*16 colors , but these limits are annoying me , also i can feel that bgi is not the one for games (it is kinda slow , i don''t feel that any animation is smooth) , i wonder back in those days , how did they make things like prehistoric 1 and 2 , so i decided to make up my own library , but i faced a lot of problems , the first one is how to use int 10 with ax=4F05(CPU VIDEO MEMORY CONTROL) , VESA standards and so on ...... so i am asking for help , if there is anybody who made a svga library , i would b gratefull if he helps me . all i hope to reach is 800*600*265 or 800*600*65335 thanks for help . ...Xeee
xee..
Advertisement

There is Allegro, but it isn''t DOS only, it''s portable to Windows, Linux, BeOS and QNX.
It''s a game library so it does bitmaps, lighting, keyboard, mouse and joystick I/O, has datafile routines, midi and streaming sound for you.
It has also timers to do the timing
It''s homepage is on http://alleg.sourceforge.net
If you have questions about it then you ca look at the forums on www.allegro.cc or go to #allegro on EFnet

Hehe, this looks like an ad
Hope this helps, Allegro is really easy to use, even easier than SDL.
for BGI files, use VESA.H and VESA.BGI

I used if for HCAD in 1994 and it ran happily on at 8bitx1024x768.
Do a search on the net for it, the drivers should still be around somewhere. I used it with Borland C++ v2.0 (with the really cool IDE) for the 286 and it ran fine.


Beer - the love catalyst
good ol'' homepage
Beer - the love catalystgood ol' homepage
i think that you miss understood me , 3 or 4 months ago , i was looking for a better library , but now i wanna make mine , y not , if the mathematics is the problem , a friend of mine can help me , i wanna know how to make one , the problem is that i can''t write to anything other than the first 64K of the screen , i wanna know how to switch to another bank .(i''m using Direct memory access to A0000 , bios (WRITE GRAPHICS PIXEL) is very slow)
i know that A0000 is mapped to one of the banks representing the screen , how to map it to another one ???

...Xeee
xee..
about allegro , it works only on djgpp , right???
if it works on all compilers then i''ll use it but if it doesn''t i won''t .

...Xeee
xee..
If you are doing DOS graphics programming I would personally switch to DJGPP anyways...
Allegro works on just about any modern compiler, including Borland, MSVC, and GCC.
ReactOS - an Open-source operating system compatible with Windows NT apps and drivers
Since it''s xmas and I am feeling generous, I share my vesa library I have wrote back in the dos era. Hope this helps.

Here it is: vesa.rar. It uses Watcom C and Tasm.


--
bernie
www.bkgames.com
First, it would be best to switch to DJGPP. Dealing with hardware under DJGPP (protected mode) and real-mode compilers (like TurboC) is quite different, so there will be a slight learning curve.

There are plenty of resources on the web to help get you started, and www.delorie.com/djgpp/doc has some helpful documents.

For VESA, give http://www.inversereality.org/tutorials/graphics%20programming/graphicsprogramming.html a shot. The tutorials demonstrate graphics programming under DJGPP with C++.

You''ll probably want to familiarize yourself with protected mode concepts, such as selectors, and how DPMI works. Knowledge of assembly language will be helpful, but you should be able to get by even if you don''t have it.

---
Bart
----Bart
oh I see, you mean using the asm calls and stuff and memory copying.

Simple, on a screen such as vesa in 8bit, 1024x768, you have to write to the video memory in 12 seperate blocks of 65536, and stuff like that. It isn''t one large block of data in memory. Just lots of small ones. I forgot if you had to change the destination address or not, I don''t think you did but I think you had to change something to tell it which part to write too.

Just call the asm functions to set the display, then start playing with the memory addressing.


Beer - the love catalyst
good ol'' homepage
Beer - the love catalystgood ol' homepage

This topic is closed to new replies.

Advertisement