Page 1 of 1
xga programming?
Posted: Wed May 11, 2011 11:27 pm
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).
Re: xga programming?
Posted: Wed May 11, 2011 11:45 pm
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.
Re: xga programming?
Posted: Thu May 12, 2011 10:20 am
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.
Re: xga programming?
Posted: Thu May 12, 2011 2:04 pm
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.
Re: xga programming?
Posted: Thu May 12, 2011 10:51 pm
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.
Re: xga programming?
Posted: Thu May 12, 2011 11:02 pm
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
Re: xga programming?
Posted: Fri May 13, 2011 1:11 am
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.