PocketMatrix forums

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

My game hangs on IPAQ!

Daywalker313 · 13 Jun 2002, 21:56 UTC
I've finisheed my first PPC game and it works well on both Cassiopeia and x86em but it seems to hang on IPAQs. Could anybody please try the game and give me some suggestions what could be wrong or give me some special hints I have to care about on an IPAQ?


Download:
http://www.pocketpc-spiele.de/lockpicking_download.php[/url]
I don't have time to take a look at your source (or is it just a binary for download?), but I'll throw the 3 biggies at you:

1) GAPI - if you're using GAPI the iPaq has substantially different display properties than other devices. The iPaq's properties are not intuitive (for example you actually begin writing to the display buffer at a value 1 line less than the address provided by GAPI, which also makes the buffer one line smaller relative to the display address).

2) Accessing memory past the end of an array. If you try to access elements past the end of an array then you will get varying results depending on the device.

3) Uninitialized memory. If you read vars that have never been initialzed then you will get "random" results depending on the device.

Dan East
Daywalker313 · 15 Jun 2002, 13:48 UTC
Ok, thanks for the reply. I'm not sure what is wrong because I'm only using GAPI for the FlipBuffers() function:


unsigned short BackBuffer[320*240];

Code:

void FlipBuffers()
{
Buffer = (unsigned short *)GXBeginDraw();
memcpy(Buffer,BackBuffer,153600);
GXEndDraw();
}

maybe I should use
Code:

memcpy(Buffer,BackBuffer,153120);

instead, but I don't have an IPAQ so I can't try it.
Yeah, you were writing past the end of the display's memory area. Also, the iPaq's screen is on its side. So if your backbuffer is not at the same orientation as the iPaq's display then you will get nothing but corrupted graphics.

You should take a look at one of the graphics libraries here at PM (like EasyCE / Overloaded, GapiDraw, PocketFrog, etc). Their purpose is to provide another layer of abstraction over GAPI just thick enough to mask all the device-specific quirks.

Dan East