Page 1 of 1

PQuake display mod

PostPosted: Oct 1, 2007 @ 9:45pm
by Yama
With limited knowledge in mobile game programming, I'm attempting to mod the pocketquake source to display correctly with a 320x240 portrait view. I took out the useless top menubar and the controls menu on the bottom, but am having issues getting the entire window to fit.

http://img248.imageshack.us/img248/8025/qvganj8.jpg

As you can see by the included image, the smartphone version is showing a partial window, centered. The PPC view is behaving as I expected with the window anchored on the top left. If the smartphone version was behaving the same way, it should anchor to the same spot and I wouldnt have a problem.

I am not sure what exactly the issue is, but my intuition makes me believe that the game is rendering correctly however the main window created after gx.dll is loaded in sys_win.c is the culprit, since all the resolution and window settings in vid_ppc.c have to do with the game rendering itself and not the host window... maybe.

If anyone has any idea what the problem is, speak up - I know quite a few people are experiencing this 'partial window' effect but no one has tried to fix it.

PostPosted: Oct 1, 2007 @ 10:50pm
by Kzinti
Older smarphontes had a 176x220 (or was it 176x224) window. To remain "backward compatible", GX.DLL (GAPI) on newer smartphones (240x320) will expose a 176x220 window and center it on the display.

This is exactly what you are witnessing: a 176x220 window centered on the 240x320 display.

One solution to your problem is to use PocketHAL =).

PostPosted: Oct 2, 2007 @ 2:25am
by Dan East
The "host window" has nothing to do with the game rendering. It renders directly to the display buffer via GAPI. In portrait mode it should be rendering something like 240x180, to maintain proper aspect ratio.
You will have to change both the vid settings, which determines how the Quake engine renders, as well as the GAPI blit code, which does the blit from Quake's palletized buffer to the display.

Dan East

PostPosted: Oct 2, 2007 @ 2:52am
by Yama
So I successfully got this working on the emulator.. however, running it on my motoQ just crashes. Isnt that just dandy.

http://img219.imageshack.us/img219/2319/damnpk2.jpg

No idea what it could be, and I'm tired of it already. Thanks for the help though.

PostPosted: Oct 2, 2007 @ 3:36am
by Kzinti
The Motorola Q is known to have certain problems with GAPI and GETRAWFRAMEBUFFER. See this thread:

http://www.modaco.com/GAPI-Motorola-Q-d ... 41988.html