xga programming?

Programming, for all ages and all languages.
Post Reply
wannabedeveloper
Posts: 8
Joined: Wed Mar 02, 2011 11:41 pm

xga programming?

Post by wannabedeveloper »

I have one quick question that I really need help on. How exactly do you "enter" xga mode? I know you're supposed to do something like "mov eax, value," but have no idea what that value is supposed to do (for a 1024x768x256 mode). I've even tried looking everywhere including going to Intel's site for info on my internal video driver (which is the Mobile Intel 915GM/GMS, 910GML Express Chipset Family).
User avatar
Combuster
Member
Member
Posts: 9301
Joined: Wed Oct 18, 2006 3:45 am
Libera.chat IRC: [com]buster
Location: On the balcony, where I can actually keep 1½m distance
Contact:

Re: xga programming?

Post by Combuster »

An XGA has never been a de-facto standard in graphics hardware. You need an actual XGA card to program it like an XGA, and the intel i8xx/i9xx isn't one of them.

Apart from that, there's an official manual available for the i965, and there's a less official reference for the XGA that is widely available. And if you are just looking for setting a particular resolution there's the many FAQ entries you already read because you know forum rules, so please do your homework first.
"Certainly avoid yourself. He is a newbie and might not realize it. You'll hate his code deeply a few years down the road." - Sortie
[ My OS ] [ VDisk/SFS ]
wannabedeveloper
Posts: 8
Joined: Wed Mar 02, 2011 11:41 pm

Re: xga programming?

Post by wannabedeveloper »

Combuster wrote:An XGA has never been a de-facto standard in graphics hardware. You need an actual XGA card to program it like an XGA, and the intel i8xx/i9xx isn't one of them.

Apart from that, there's an official manual available for the i965, and there's a less official reference for the XGA that is widely available. And if you are just looking for setting a particular resolution there's the many FAQ entries you already read because you know forum rules, so please do your homework first.
Thanks, but that brings up another question. The maximum resolution I can have then is by setting ax to 012h, which according to Ralf Brown should be 640x480x256. However when I set this mode I found out that I instead get 640x480 in MONO. Would it be possible to get 640x480x256 on my computer? I do know that it should be because I have a 15 year old DOS game that has that resolution and my computer can play it perfectly.
User avatar
turdus
Member
Member
Posts: 496
Joined: Tue Feb 08, 2011 1:58 pm

Re: xga programming?

Post by turdus »

VESA VBE is your friend.
You can query the modecode for each resolution with VBE ints. You should set a bit in the code to 1 to get linear framebuffer, and you'll be ok. No need to implementing ugly things like bankswitches that the old DOS game had to.
wannabedeveloper
Posts: 8
Joined: Wed Mar 02, 2011 11:41 pm

Re: xga programming?

Post by wannabedeveloper »

turdus wrote:VESA VBE is your friend.
You can query the modecode for each resolution with VBE ints. You should set a bit in the code to 1 to get linear framebuffer, and you'll be ok. No need to implementing ugly things like bankswitches that the old DOS game had to.
Thanks but unfortunately VESA requires you to pay money for it or something, and because I don't exactly have a large pool of money laying around, I can't do anything about that. The bank switching on the other hand sounds tough but much less expensive than "buying" this VESA, or buying a modern computer, so I'm going with that.
User avatar
Brynet-Inc
Member
Member
Posts: 2426
Joined: Tue Oct 17, 2006 9:29 pm
Libera.chat IRC: brynet
Location: Canada
Contact:

Re: xga programming?

Post by Brynet-Inc »

wannabedeveloper wrote:Thanks but unfortunately VESA requires you to pay money for it or something, and because I don't exactly have a large pool of money laying around, I can't do anything about that. The bank switching on the other hand sounds tough but much less expensive than "buying" this VESA, or buying a modern computer, so I'm going with that.
Nonsense, you can find the VBE specification online.. and even at vesa.org, if you register with them first.

http://www.vesa.org/vesa-standards/free-standards/
http://en.wikipedia.org/wiki/VESA_BIOS_Extensions
Image
Twitter: @canadianbryan. Award by smcerm, I stole it. Original was larger.
User avatar
Combuster
Member
Member
Posts: 9301
Joined: Wed Oct 18, 2006 3:45 am
Libera.chat IRC: [com]buster
Location: On the balcony, where I can actually keep 1½m distance
Contact:

Re: xga programming?

Post by Combuster »

wannabedeveloper wrote:The maximum resolution I can have then is by setting ax to 012h, which according to Ralf Brown should be 640x480x256
wannabedeveloper wrote:Thanks but unfortunately VESA requires you to pay money for it or something, and because I don't exactly have a large pool of money laying around, I can't do anything about that. The bank switching on the other hand sounds tough but much less expensive than "buying" this VESA, or buying a modern computer, so I'm going with that.
I wrote:please do your homework first.
Have you? </sarcasm>

Both Bankswitching and LFBs are part of VESA. "VBE specification" pops up the specification on google's front page, "VESA specification" comes with several pages that have the link to the specification. Most notably, wikipedia has links to all versions of the standard.
Ralph brown states something completely different than what you claim:
12h = G 80x30 8x16 640x480 16/256K
80x30 characters, 8x16 pixels per character, 640x480 pixels total, 16 colors selectable from 256 thousand (2^18). There's not even a 256 colours in there.
"Certainly avoid yourself. He is a newbie and might not realize it. You'll hate his code deeply a few years down the road." - Sortie
[ My OS ] [ VDisk/SFS ]
Post Reply