PocketMatrix forums

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

Message for Johan

Hi, Dunno if this is of any use to you at all but I have got an Orange C500 smartphone and was just playing about with some dev work.

Something i noticed is that when using the gapidraw eval the splash screen is fine on the device. it is only when the game code starts running that the graphics start flickering. Also if you slow the target FPS the flickering also slows down so it sounds like an issue with the screen refresh.

I know orange are apparently looking into this but just wondered if you had any idea why the spalsh screen is ok?

Well there ya go,

Cheers.

Matt
Croccy22
We are currently working with Orange to resolve this issue. We know the cause of it and right now it's just a matter of when a fix will be released.
Just out of interest what is causing the problem? or are you sworn to secrecy?

Matt
Croccy22
The C500 reports back that it uses a double buffered display (GXIsDisplayDRAMBuffer() returns TRUE), when it in fact is not double buffered. This issue is also seen on the Palmax @migo Pocket PC...

Basically GXIsDisplayDRAMBuffer() always returns TRUE if there is a file gxdma.dll available. HTC (who manufactured the phone) used the file gxdma.dll for other purposes, without considering that it may break GAPI compatibility...
The PocketTV Team · 23 Aug 2004, 16:33 UTC
Johan wrote:The C500 reports back that it uses a double buffered display (GXIsDisplayDRAMBuffer() returns TRUE), when it in fact is not double buffered. This issue is also seen on the Palmax @migo Pocket PC...

Basically GXIsDisplayDRAMBuffer() always returns TRUE if there is a file gxdma.dll available. HTC (who manufactured the phone) used the file gxdma.dll for other purposes, without considering that it may break GAPI compatibility...

Is that verified ?

i.e. can we use the address returned by GXBeginDraw, and not call GXEndDraw ?

Or is the raw buffer at another address ?
The PocketTV Team · 23 Aug 2004, 16:44 UTC
Another thing that compounds the issue on the SPV C500 is that calling GXOpenDisplay and GXCloseDisplay causes the frame buffer to be refreshed by GAPI, even if GXBeginDraw and GXEndDraw are not called.

I have never seen that on any other device using buffered GAPI. normally in case of DRAM buffer used by GAPI, the frame buffer is refreshed when GXEndDraw is called.

Here you can test: Just call GXOpenDisplay then GXCloseDisplay, and you will see that the frame buffer is refreshed (i.e. copied from the GAPI DRAM buffer).

This can compound the problem and cause some weird display bugs even in applications that are written correctly to handle GAPI with DRAM buffers.
The PocketTV Team · 23 Aug 2004, 17:04 UTC
The PocketTV Team wrote:Is that verified ?

i.e. can we use the address returned by GXBeginDraw, and not call GXEndDraw?


Yes, this confirmed :) :) :) :)

Also, don't call DXEndDraw, as it triggers a buffer update, and you don't want that.
Thanks for the info! The problem however is the dozen or so existing GapiDraw games for Microsoft Smartphone. It's not that easy to update them all... So Orange will probably do some changes to GAPI on the C500... Also, GapiDraw will only call GXEndDraw when the application is minimized or the display is closed.
The PocketTV Team · 23 Aug 2004, 22:57 UTC
Johan wrote:Thanks for the info! The problem however is the dozen or so existing GapiDraw games for Microsoft Smartphone. It's not that easy to update them all... So Orange will probably do some changes to GAPI on the C500... Also, GapiDraw will only call GXEndDraw when the application is minimized or the display is closed.
I'm sure HTC or Orange will come up with a firmware upgrade the fixes the problem.

But zillions of those phones have already been shipped with the bad firmware, and the fact is, very few users will upgrade their firmware (maybe 3-5% at most), unless the problem is a total show-stopper. So you'd better not count on it and update the game, or be ready for some customer support.

A quick fix is to detect "Typhoon" (the OEM string), and if GXIsDisplayDRAMBuffer returns TRUE on this device, tell people to install the firmware upgrade (when it becomes available) and exit.
The PocketTV Team wrote:A quick fix is to detect "Typhoon" (the OEM string), and if GXIsDisplayDRAMBuffer returns TRUE on this device, tell people to install the firmware upgrade (when it becomes available) and exit.


what if the fix will be to return the correct backbuffer address and GAPI will stay drambuffered? maybe they wanted drambuffering because the blitting they use is faster as direct memory access.
The PocketTV Team · 24 Aug 2004, 07:40 UTC
picard":9l2cj7e8]
I'm sure if there is a fix, it won't be be DRAM buffered. because there is no need to... as you can see, using the workaround.

HTC/Orange would be *really* stupid to implement a fix that would cause more problems! as you know, many games using GAPI do not work well when there is a DRAM buffer (because poor code design, in most cases, and never well tested in the case of DRAM buffers).
PocketTVTeam, I saw on modaco that you have found a work around for this. Could you explain with code examples if poss how to implement this into a GapiDraw Application.

For example how do you call GXBeginDraw and what do you do with the result and where would you put that code in a gapidraw application.

Cheers,

Matt
The PocketTV Team · 24 Aug 2004, 17:57 UTC
Croccy22 wrote:PocketTVTeam, I saw on modaco that you have found a work around for this. Could you explain with code examples if poss how to implement this into a GapiDraw Application.

For example how do you call GXBeginDraw and what do you do with the result and where would you put that code in a gapidraw application.

Sorry, we have no experience with GapiDraw, you should ask to someone who is familiar with GapiDraw.
Croccy22: Please wait until Orange responds officially to this issue. If they cannot release a fix in a timely manner we will release updates to the GapiDraw library that corrects this issue. It's nothing you can correct on a user-level with GapiApplication.
Ok cheers for the info,

It's just that PocketTVTeam does make a good point that not everyone applies the updates. So unless orange can release a forced update somehow then making the end user aware that they need to run the fix in order for a game to work will be a right pain.

So at the end of the day it may be worth finding a way to fix the issue in software as well.

I certainly don't fancy loads of e-mails flying back to me saying this game doesn't work on my phone can i have my money back :/

The main problem is a lot of people who use this phone never find out about the updates and stuff as they don't read the smartphone news sites, and orange won't do anything to advertise the fact there is a bug fix out apart from put a small news item on their site somewhere.

We as developers had a hard enough job with the original phones trying to get people to application unlock them so out games would run without spending hundreds of pounds and a lot of work getting the things signed. If we have to start talking all our 'customers' through how to get the update it's gonna be too much hassle releasing a game.

Cheers,
Matt
The PocketTV Team · 29 Aug 2004, 04:01 UTC
picard wrote:
maybe they wanted drambuffering because the blitting they use is faster as direct memory access.

Apparently that's not the case (you can run some test to convince yourself that using the DRAM buffer in that case is slower).

It's just a mistake that HTC made. That's not the first time they goof with GAPI, and probably not the last. Maybe some day they'll include a few games and video applications in their test suite!

We think that Orange will not be able to come-up with an Over The Air provisionning trick that will magically fix all their C500. Even if they do, the problem would remain in all the other C500 that are branded differently, like Qtek 8010 and iMate 3.

If Orange or HTC provide a firmware upgrade (the most likely scenario), only a small fraction of the C500 users will install the upgrade on their device (5% or less).

So we think the only viable solution for developers is to implement the workaround, regardless of what Orange or HTC do in the future. Also, developers should make sure that if Orange comes up with a fix, it will not "break" apps that use the workaround.

For example, applications should not use the C500 workaround if GXIsDisplayDRAMBuffer() actually returns 0 (no DRAM buffer).