PocketMatrix forums

A read-only archive of the PocketMatrix forums (2001–2014). Posting and accounts are closed.

GAPI in VGA

I'm using GAPI on my Dell Axim x50v, but I don't know how to get GAPI to run in VGA, instead of QVGA.

I added this resource to my project...
HI_RES_AWARE CEUX {1}

...which causes GetSystemMetrics to return the correct values.
GetSystemMetrics(SM_CXSCREEN); // returns 480
GetSystemMetrics(SM_CYSCREEN); // returns 640


But GAPI still runs in QVGA. GXGetDisplayProperties() returns these values.
cxWidth; // returns 240
cyHeight; // returns 320


What else do I have to do?
Thats because GAPI on PPCs is strictly a QVGA API, even on VGA devices.
Use the escape code GETRAWFRAMEBUFFER to get the framebuffer address of VGA devices.

You can still use GAPI in conjunction with GETRAWFRAMBUFFER to lock the hardware keys.

Tala
Just out of interest, how do VGA devices work?

Do they have two display modes, so when running older QVGA software, it runs fullscreen?

Also, can someone elaborate a bit on detecting a VGA device. Can you use GetSystemMetrics() for the display size?

Also, what about the 'GETRAWFRAMEBUFFER' method. How exactly is that used?

Thanks,

-Zak
Tala wrote:Thats because GAPI on PPCs is strictly a QVGA API, even on VGA devices.
Use the escape code GETRAWFRAMEBUFFER to get the framebuffer address of VGA devices.

You can still use GAPI in conjunction with GETRAWFRAMBUFFER to lock the hardware keys.

Tala


I have been trying to use the GETRAWFRAMEBUFFER escape function using my Dell Axim x50v but have a problem. I retrieve the RawFrameBufferInfo structure which appears to return with all the correct values. I try to render my backbuffer to the screen and all I get is black pixels no matter what color I write. I can see that I am painting into the correct positions on screen, I'm writing 16bit word values so why black.... black... always black!!

Any ideas anyone? :?
Do they have two display modes, so when running older QVGA software, it runs fullscreen?


In general they only have the VGA display mode. When running older software an additional compatibility layer is employed, which scales the QVGA buffer to the VGA frontbuffer.
The various GAPI tweaks however, switch the device into a real QVGA frontbuffer mode.

Can you use GetSystemMetrics() for the display size?


Yes. Note however, that GetSystemMetrics() return QVGA values for legacy applications even on VGA devices.

I try to render my backbuffer to the screen and all I get is black pixels no matter what color I write. I can see that I am painting into the correct positions on screen, I'm writing 16bit word values so why black.... black... always black!!


Thats strange. Can you read the correct values from the color buffer?
Also do you use GAPI and have any GAPI tweak installed?

Tala