Jump to content
  • Advertisement

Archived

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

Quantum2005

Mode-changing without BIOS

This topic is 5824 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Does anyone know how to change the screen resolution and plot pixels in protected mode without using the BIOS? I''ve seen several sites say "you can program the VGA registers directly", but nothing that tells *how*.

Share this post


Link to post
Share on other sites
Advertisement
You can do this by programming the VGA I/O ports.
I haven''t got my old VGA book at hand right now, but if I remember the ports are in the range 0x3C0..0x3DF.
The ports can be programmed by using the inportb/outportb family of functions (inpb/outpb depending on the compiler), or IN/OUT assembler instructions.
I''m afraid I won''t be able to dig up some source at this point, the book is probably somewhere in a dusty corner

Share this post


Link to post
Share on other sites
If you know Spanish, I can send you a document explaining how to do it. Years ago I did a project for the University called something like "Programming VGA driver for a protected mode operating system".
Basically, all you need to do is to program 60/70 registers of de VGA card.
This document also explain other things like change default VGA card font, different write and read modes of the VGA cards...

Share this post


Link to post
Share on other sites
Fortunatly, I *do* know a bit of spanish. Not much, but hopefully enough to stumble through the code. Anything helps!

[edited by - Quantum2005 on December 6, 2002 4:35:58 PM]

Share this post


Link to post
Share on other sites
quote:
Original post by MattS423
Could you use DirectX? why do you need to get to the VGA registers?

Maybe he could use a Mac as well? Or how about J2ME and do it for a cell phone? Why does he need to do graphics at all?

Stop, think, THEN post.

Share this post


Link to post
Share on other sites
He doesn''t necessarly need to change it, but maybe there is a better way of doing it. thats all i''m saying.

Let''s not reinvent the wheel...

Share this post


Link to post
Share on other sites
quote:
Let''s not reinvent the wheel...


Yeah! Lets leave it square, and hope it rounds itself off while we slip a disk and suffer a hernia trying push it around!

Share this post


Link to post
Share on other sites
quote:
Original post by MattS423
He doesn''t necessarly need to change it, but maybe there is a better way of doing it. thats all i''m saying.

Let''s not reinvent the wheel...


Unfortunatly, I don''t have that luxury. The project I''m working on (probably should''ve said this in the first place) is a mini OS. I had simple graphics working in real mode using the following:

_setmode13h: ; VGA 320x200, 8bpp

mov ah,00
mov al,0x13
int 10h

ret


But now that I''m using protected mode, I can''t use the BIOS anymore.

Does anyone know the exact ports Prototype was talking about, and what to put into them? Also, it''d be nice to do SVGA modes as well, but I have a sneaking suspicion that that''s asking a bit much...

Share this post


Link to post
Share on other sites
You could look into DPMI, I''m trying to find info on that now... That may not be an option though I suppose... (Don''t have enough info to know yet.)

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!