Okay. I want to write to SVGA memory without using BIOS calls on my 486. I can do it great with int 10, but it's slow as all hell. What is happening is after I calculate the address for the VRAM, everything is getting modded into the top 64k of VRAM (one display pages worth, I guess). Imagine the 1024x768x256 screen sectioned into 12 horizontal bars, and anything that you write is put into the TOP one. ANyhow, I think this is because I'm not changing display pages. So I tried Three things:
1)
void Plot(x,y,Color)
int x,y,Color
{
int Page
long offset;
char far *address;
Page = y/64;
outport(0x3CD,Page);
offset = 1024*y + x;
address = (0xA0000000L + offset);
*address = Color;
}
2)
void Plot(x,y,Color)
int x,y,Color
{
int Page
long offset;
char far *address;
char far *PageAddress;
Page = y/64;
PageAddress = MK_FP(0000,0x462); /* The Low Memory address of the current
Page Number */
*PageAddress = Page;
offset = 1024*y + x;
address = (0xA0000000L + offset);
*address = Color;
}
3)
void Plot(x,y,Color)
int x,y,Color
{
int Page
long offset;
char far *address;
Page = y/64;
_AH = 5;
_AL = Page;
geninterrupt(0x10);
offset = 1024*y + x;
address = (0xA0000000L + offset);
*address = Color;
}
The Third one at least gave me some results - everything I had drawn got moved to the bottom half of the screen and above it was about 300 horizontal blue bars that flickered a lot. Any ideas? This is a Trident 8900 card w/ 1 meg VRAM on a 486/33 using Borland C++ 3.0. HELP ME DAMMIT! Can you tell I'm frustrated? YES!!!!
--
Greg Humphreys | "Playing not to win is like sleeping with your
gregh@alw.nih.gov | sister - sure, she's a great piece of tail,
| and she's got a bag full of goodies, but it's
(301) 402-1817 | just plain illegal." -Charlie Sheen, "Hotshots"