Archived

This topic is now archived and is closed to further replies.

co-co

Video Modes

Recommended Posts

Hi, I have many books on how to program game engines but they are all way too out dated. I want to know the Hex number to enter higher screen resolutions than 640x480 16color, or can I even do this the same way. I assume i can use the old code but change the screen resolution by entering some number like 0x15?? All the code for accessing video memory is written in assembly so I''m not too sure how to change it, I just know there''s a hex number to that decides the video mode. Also can anyone reccommend a game engine book that is new? That does not make use of api''s. Hope someone can help, thanks.

Share this post


Link to post
Share on other sites
You''re probably thinking of modes 13 and 12(? - not sure if it was 12) from the days of VGA. That just went up to 320x200x8 or 640x480x4, everything higher than that is not VGA and there is no standard way of using it. The best way to use higher resolutions is to use a graphics API like DirectDraw/Direct3D, OpenGL, SDL, Allegro, etc. Programming them is quite different from doing VGA programming, but the same principles still apply.

- JQ
Full Speed Games. Are back.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster

Yeah you took what i said the right way, that was a good answer. I know all the new graphics programming books are based on either direct3d/directdraw or opengl... i really don''t wanna get into that right now, i just want to set up a video mode 800 by 600 and creat my own functions for plotting pixels and doublbuffering and whatever else. I''m trying to create a 3d engine without the help of api''s

Share this post


Link to post
Share on other sites
Short Answer:
You *can''t* use 800x600 mode without resorting to an API (GDI/DX/OGL)

Long Answer:
You can, but you would have to write your own driver for every video card, since unlike VGA (max 640x480x4) the higher resolutions are not standardized. Since you barely understand the commands used to set a video mode in the first place I doubt you would be able to even try writing a driver, even *if* you had a full set of specs on how to interface with the video card (which you don''t).

Share this post


Link to post
Share on other sites
Harsh but so true.

It''s come to the point where we''re distancing ourselves from
the hardware. We''re interfacing with interfaces we used to create. Some day we''ll just be speaking to the computers and it''ll do what we want, not knowing how the heck it all happened.

I''ve started learning a bit of OpenGL but i hate api''s.

I heard DirectX is horribly made.
Is this true, or only for the older versions?

And i don''t know what GDI is.

Share this post


Link to post
Share on other sites
DX is good but it''s kind of a pain in the butt to learn from scratch. OGL is IMO a bit easier, and I''ve heard good things about SDL. If you want something easy to get into, try Allegro, it''s got a straighforward, old school feel to it.

Some people don''t like it, but I learned DX (DirectDraw anyway) with LaMothe''s Tricks of the Windows Game Programming Gurus. He teaches from a old-school DOS-style point of view. Supposedly the 2nd edition covers DX8.

Share this post


Link to post
Share on other sites
SDL is very good, it is basically a wrapper for many OS''s native graphics interfaces... And it is a lot nicer looking than most of those interfaces.


Anyway, it is very good, you can plot pixels if you want, and then build your own API from that.

Share this post


Link to post
Share on other sites
You could support VESA, which I believe is a standard for post-VGA cards.

These modes are still carried over in Dx - they call them Mode X, wherein the memory space of the cards is not linear. You have to switch banks to access different areas of the video card memory.


Whether DirectX is horrible or not depends on what exactly you talking about. From a beginner''s stand point it''s not intuitive to learn. If you were already familar with OLE or COM from writing normal windows applications, then it would make more sense. Subsequent version of DirectX have addressed problems with prior versions. Learning D3D8 seems more straight-forward than D3D5 or D3D7 (and I think Tricks is about 3 or 4).

Share this post


Link to post
Share on other sites
quote:
You could support VESA, which I believe is a standard for post-VGA cards.

These modes are still carried over in Dx - they call them Mode X, wherein the memory space of the cards is not linear. You have to switch banks to access different areas of the video card memory.


I thought Mode X was the unchained VGA mode (320x240x256)... Well, I guess it would kinda make sense to call the SVGA modes Mode X... But I don't see why DX would need to use bank-switching..

You should only have to do bank-switching in real mode, because of the 64k windows... Though you can map a linear framebuffer with DPMI.

[edited by - Xanth on December 25, 2002 11:56:47 AM]

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Ok that was a lot more info than i was looking for.
So SDL it is... Yeah, I just wanted basically a way to plot
pixels. I want to make a 3d engine even if it''s slow and choppy
and not compatible with mdl and bsp files (another area i havne''t discovered) I just want to do it for practice. So basically I want to plot pixels in a nicer (higher res, more color) mode than mode x or mode 13.

Is that Lamoth''s windows game programming book any good? I have a few lamoth''s books and i''m familiar with his way of teaching... all wich are dos C books. no windows object oriented stuff.

Also, I''ve been reading up on Assembly (very complex) because i''ve haerd that it''s faster in the long run for things you are going to do many MANY times, like plotting pixels and other stuff.

Thanks for the replies, so many API''s out there... where to begin!

Share this post


Link to post
Share on other sites
Ok that was a lot more info than i was looking for.
So SDL it is... Yeah, I just wanted basically a way to plot
pixels. I want to make a 3d engine even if it''s slow and choppy
and not compatible with mdl and bsp files (another area i havne''t discovered) I just want to do it for practice. So basically I want to plot pixels in a nicer (higher res, more color) mode than mode x or mode 13.

Is that Lamoth''s windows game programming book any good? I have a few lamoth''s books and i''m familiar with his way of teaching... all wich are dos C books. no windows object oriented stuff.

Also, I''ve been reading up on Assembly (very complex) because i''ve haerd that it''s faster in the long run for things you are going to do many MANY times, like plotting pixels and other stuff.

Thanks for the replies, so many API''s out there... where to begin!

Share this post


Link to post
Share on other sites