PocketMatrix forums

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

GAPI

is there a version of this that is fixed for the J525? I have noticed that most of the games that dont work on my device use this. When i tried out YAME, i worked ok with WindowsCE API but if i switched to GAPI then the colors messed up. And yes, i know that this doesnt fix the Jornada's color problem, but i just wondered if there was a better version of this for the J525 that worked better for 256 color. PLEASE DONT FLIP OUT ON ME, I KNOW I HAVE A BAD GAMING DEVICE!!!! :D I also dont know much about GAPI so this may be a very idiotic question!? :D
I remember seeing a headline on PocketGamer.org for a universal GX.DLL file that allowed greyscale devices to play color games and so forth. Search PocketGamer's archives for that news article, might help you out or atleast give you some hope that it's possible.
Why not just use a library such as easyce that does all the grunt work for you? GAPI is not necessarily designed as a graphics library for application developers, but rather as a platform on which application-oriented graphics libraries may be built.
im not developing with it, i want it for gaming. :D
but EASYCE uses GAPI, and GAPI isn't universal on all devices. Things like the black and white iPaq H3150 doesn't. There was, however, a rewritten GAPI that was universal on all devices and automatically downsampled the display color bits (or converted them) into a format that the older device could use.
I have not been able to find that so far. Do you have a link to it or anything??
I was just looking on PocketGamer, couldn't find it. No I don't have a link. Sorry
GAPI 1.2, should work fine on the Jornada 520 series. YameCE messes up colors on the Jornada 540 series too. It's just YameCE. Also, the reason alot of your games look shitty is because you are only using a 256 color screen. %99 percent of the games for Pocket PC are made to be viewed with a 16-bit (65,000+ color) screen. Even my Jornada 548 with it's 12-bit color screen is shitty.
Very few games have J525 support because it requires seperate bliting and pallete code.
I imagine that a gx.dll could be made that GXBeginDraw() gives a pointer to a 16bit backbuffer and GXEndDraw(); blits it to the real display buffer converting the color to 8bit. This would make current games written in 16bit work on 8bit displays, however there would be a memory and speed penalty.
In order for this technique to work with existing GAPI games, you'll need your version of gx.dll to also report that it is using a DMA buffer. This will force apps to at least call GXEndDraw each frame.

A number of games out there are poorly written and call GXBeginDraw once at the beginning of the app and cache the returned frame buffer pointer and don't call GXBeginDraw or GXEndDraw on a per frame basis.
Hmm...but by overwriting GX.dll, you wouldn't be able to use its functions...
I suppose you could just rename it and link dynmicly (as Dan did in PQ) (or hack a gx.lib file :? )

SH-3 and MIPS require you to use GXBeginDraw() and GXEndDraw() every frame. Look at the PQ sources, GXBeginDraw() is defined out on ARM builds...

Anything that works at all on the device will call GXBeginDraw() etc every frame. It's only on ARM that you can just write to a display address.

I think that GXBeginDraw() uses VirtualAlloc() to reserve the video address...
Mike Wagstaff · 18 Aug 2002, 03:46 UTC
Sorry, with regards to the suggestion of the universal gx.dll replacement, I'm afraid that the version that I think is being suggested was designed for mono devices only:
http://discussion.brighthand.com/showth ... adid=44427

I can't remember any other such replacement designed for the Jornada 525, nor any other software that might help. :(
Right, PQ does not call GxEndDraw each frame for ARM devices, except the modified iPaq 38xx version. The reason I went this route is because the Microsoft Docs specifically said that you shouldn't for performance reasons. However, I now know that it really depends on the DRAM flag.

From the document entitled "Animating Graphics" found in the Pocket PC SDK docs:

"Note Consider the performance cost of these calls when implementing them in your application, because they will typically be done 20 or 30 times per second. It is acceptable to draw several frames between the GXBeginDraw and GXEndDraw calls, but you must remember to call GXEndDraw in WM_KILLFOCUS if necessary."

Basically MS said that you only need to call GXEndDraw if your app loses activation.

Dan East
How about we just create DirectX for WinCE from scratch and be done with it? Who'll step up?
Already being done. It's called GapiDraw (http://www.gapidraw.com)
but that still uses GAPI. I mean something to take the place of GAPI that works on all devices under one build.

Meh, it's just a pipe dream. These are all proprietary PDA's after all. And why do we even play games on them anyway!? :|
It would do little good to create a 1:1 DirectDraw port without the proper hardware to support it...

What's really needed now is a device with a large enough frame buffer that supports hardware masked blits. Since each screen is 240x320x16bit = 150kb, both display and back buffer requires at least 300kb of space.

The latest ATI chip only has 384 kb or so available, which is too little to be of any real use. This is one reason why Microsoft simply cannot transfer DirectDraw to the PocketPC. No hardware support exists, and it's unlikely it will arrive within the next 6 months as well.

Going 100% Direct3D (which may be supported on some CE.net platforms - my guess is that some of the tablets will have it) is also not the way to go for 2D. Several graphics cards (such as the GeForce2MX) have issues with large texture transfers (something which is necessary if a full screen 2D image needs to be updated >30 fps). So even if it's perfectly possible to create 2D with Direct3D, it is not designed for it and will probably have issues.

Right now the best advice is to use a third party library such as PocketFrog or GapiDraw. GapiDraw will have hardware accelerated masked blits in the next version, PocketFrog will have some kind of hardware support in 1.0 or later.

/Johan
Well, games ARE what drive most markets forward, so it's a good thing for PPC too.
I want DirectDraw if for no other reason so that I can write to a common API in the SDK that is supported across all Pocket PC devices whether they have hardware support underneath or not.

I would be content to get flipping support and access to video memory on devices that don't have hardware blit accelerators.