>by pkillo on 2008/6/10 20:46:40
>...
>@amigaksi: You can only use the writes to the address you're giving in real mode, at least on the x64 systems I've worked with. As far as I could tell while studying this very problem as an undergraduate, when you enter a 64-bit mode you lose that functionality. At that point you have to copy the VESA BIOS into RAM and set up an entry table for it, and then use its routines instead, iirc. So while you're right that under DOS you can do that, it's not really applicable to problems requiring the full resources of a modern PC.
There's an exported variable in Windows 3.x/'95/'98/'98SE/ME called _A000 that you need to import and that gives you the selector which maps to physical address A000:0000 and you use offsets as normal. I did this with the multimedia Gita CDROM (shown towards the end at
http://www.mpdos.com) and was able to write directly to the VGA memory in protected mode. As far as setting the mode, you can directly do the IN/OUTs to set the mode to avoid BIOS calls, but higher resolutions of SVGAs don't have standard IN/OUTs so you basically have to code for some of the popular cards or try your chances that at setting the mode via the VESA BIOS. As long as the routine does not use segments, you can call the routine in VESA BIOS directly from protected mode. The Gita CD does this as well and you can compare the frame rate speed of Windows API (SetDIBBitsToDevice) verses VESA modes.
The Gita CD uses the Windows resources normally for other things like sound, mouse, printing, etc.