Title is no joke - I finally got my nvidia 2D acceleration driver working! It took 3-4 days of solid work, but now I have hardware bitblitting and rectangle drawing. Hardware cursors soon to follow!
The screenshow below was generated by the following code (after switching modes with my VBE driver).
Code: Select all
// Pink background to make sure we see any effects - engine may accidentally blit black pixels for example, and we won't pick that
// up on a black background.
for (int x = 0; x < 512; x++)
{
for (int y = 0; y < 512; y++)
{
pFb->write16(0xF00F, (y * 1024 + x) * 2);
}
}
// Draw an image.
for (int x = 0; x < 128; x++)
{
for (int y = 256; y < 128+256; y++)
{
pFb->write16(0xFFFF, (y * 1024 + x) * 2);
}
}
// Card detection is done but not coded yet - hardcoded to the device class in my testbed.
Dma *pDma = new Dma(pRegs, pFb, NV30A, NV34, 0x300000 /* Card RAM - hardcoded for now */);
pDma->init();
pDma->screenToScreenBlit(0, 256, 400, 100, 100, 100);
pDma->fillRectangle(600, 600, 100, 100);
for(;;);
}
EDIT - linked to it instead because it's HUUGEE!!!
http://www.jamesmolloy.co.uk/rubbish-bin/nvidia1.jpg