PocketMatrix forums

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

GAPI Emulator and Jornada 720 arm

Hi, I've asked a similar question on the GapiDraw forum and had a good look at gapi emulators. To my surprise I realised I had a download in my 'samples' folder by none other than Thierry T.

I am writing a new game using PocketGL but would like to convert my existing game Space Treker written in PocketC to real C using one of the available toolkits. Currently my game works on every device due to the runtime method used by PocketC so many of my registered users have H/PC devices including the J720.

I have just purchased a J710 for road coding (editing only) so I'm in a position to turn out an H/PC version as well as PocketPC so long as I can get a working GAPI. Having seen that you implement PocketFrog using a GAPI emulator I wondered if anyone had looked at making it work on a Handheld like the Jornada 720?

Do you think it would be possible to get PocketFrog working on the H/PC format?
I would love to make PocketFrog work on H/PC devices. Thing is I don't have access to such a device.

Currently I can see 3 issues to be investigated:

1) Dependency on GX.DLL (GAPI). Is there a GAPI implementation available on the H/PC? If not, what is available to directly access the screen? In the end, it is entirely possible to use a DIB as a backbuffer and blit it to the display each frame. In that case, it would be important to know the color format of the display (as to optimize the blit). Also, what are the dimensions of the screen in pixels?

2) Dependency on AYGSHELL.DLL. This is used on PPC to switch to/from fullscreen mode. This can easily be solved by not using static linking to the DLL.

3) Dependency on IMGDECMP.DLL. This DLL is used on PPC to decompress images (JPG, GIF, BMP). Is it available on the H/PC? If so, what are the image formats supported? If not, we will have to find an alternative way of decompressing images (BMP is easy, JPG/GIF is more complicated, perhaps LIBJPG).
Conan · 24 May 2002, 19:11 UTC — GAPI on H/PC
Thanks for the reply. I will follow up on the questions you asked.

There is a GAPI for H/PC which came out in the middle of last year. It costs $ but I have not contacted the author directly to find out about licensing.

Re: Hardware I have an ARM, MIPS & SH3 H/PC
( 2 HPs & a Sharp ) and would be delighted to test & supply feedback.

Regards
Then let's start working on this together =)

$ for a GAPI implementation? That's crap... We should rather implement a generic GAPI implementation based on a simple 565 DIB that covers the entire screen. Assuming the display is in 565 format, the blit should be fast enough for real time games

Meanwhile, we should try to find more information about the display hardware used (frame buffer format and address).
Conan · 25 May 2002, 06:18 UTC — GAPI for Jornada 720
Here is some initial feedback
Handheld 2000 has imgdecmp.dll but I don't see aygshell.dll in /windows. As the web browser is so much better than on PocketPC image wise I assume the dll supports at least the same formats. I know that jpg & bmp work as Space Treker uses them & it runs fine. I will try gif.

The HPC GAPI implementation ($49) demo is used in the 720 port of EasyCe's Lemmings. It's a static .lib which is linked. No dll needed as far as I can see. Supports a number of HPC's. It can possibly be used to test the existing PocketFrog. I will look at the Lemmings code later to see how it differs from PocketPC.

I will find available developer resources from HP re: the 720 screen. It's got the same arm processor as the iPaq & a 65k color screen.

07:00am After lots of searches I found an aygshell.dll download for J720. The description says
a DLL file that goes in your "\Windows" directory, which can make some "Pocket PC" applications run on the 720. - it just adds do-nothing stubs for a couple of common Pocket PC function calls (power management, primarily) that do not exist on the Handheld PC.
Concerning AYGSHELL.DLL: I'd rather remove the dependancy on this DLL then having people download the stubbed version for HPC. This problem is solved.

IMGDECMP.DLL: excellent... I'm already using dynamic loading for this DLL so there shouldn't be any problem.

What's left: GAPI. Do you have this .LIB? It would probably be easy to reverse engineer the thing and figure out the actual frame buffer address. $49? What a ripoff!
Good news! Here is what I've found:


Well, I guess this is good news,
the vid buff on the 720 is at

vbuff = (short *)(0x82200000);


ref: http://forums.projectmayo.com/viewtopic ... 8&forum=23

Format seems to be 640 x 240 x 16 bpp (565?)(orientation "north"?)

Can you confirm that this is indeed the case? Would then be trivial to add support to PocketFrog.

Should PocketFrog support a screen of 320x240 or the whole 640x240? I guess it would be nice to have true windowed mode and let the programmer decide. Let me know what you think.

I would also need to know how to detect the Jornada 720. Is the OEMINFO string retrieved the same way it is on PPC or do I need to look into the registry?
Conan · 25 May 2002, 09:25 UTC — GAPI for Jornada 720 - PocketFrog
I have still to download the handheld SDK (assuming it's not on the original embedded VC++ CD) so I can't check OEMINFO / devide ID directly till I can make a little test app. It's a big download so I will need to wait until Monday when I am on a fast link. I will see if I can find a link.

Yes I have the .LIB & the text file explaining the minor header file differences. When I get time I will see how EasyCE handles it.

Do you want me to e-mail the lib or give you a link to the J720 lemmings which has everything? it's
http://www.johnlomax.com/720.htm
I assume this source shows most everything about the Jornada screen layout.

I would want to write games which used the whole screen 640x240. What I did with space treker was make 3 screen areas so that I could place them where I wanted on ppc & hpc so that way my game was fairly screen independant.
It seems there is no way to remove the dependency on AYGSHELL.DLL, as the CORELIB.DLL is linked to it. My guess is that a separate build will be needed for HPC to get rid of this dependency.

Anyone have more info on this AYGSHELL.DLL? Seems it's not available on HPC... There is a stubbed version, but I'd rather not use it?
I installed the HPC SDK and surprise: there is an emulator that comes with it!

The HPC seems to be based on Windows CE 2.11 (I didn't know that).

This solves the AYGSHELL.LIB issue as HPC's core library doesn't link to it.


From what I know,

Jornada 680 --> SH3 processor, display address/format is unknown.
Jornada 720 --> ARM processor, display address/format is known.

Is there any other model of HPC?
Conan · 27 May 2002, 07:14 UTC — Jornada 680/690 etc
Hi, The Jornada 720 is the first ARM based HPC. The new one is the 728 based on the 720.

The 680 and the 690 are both SH3. There are numerous HPC machines but HP have most of them.

There are several posts which I came across discussing screen layouts with some info. I think the 680 is discussed on PM. I will find them again. There's a list of devices & screen addresses in another post somewhere.

Many thanks
I've played with the HPC2000 SDK and managed to remove the static dependancy on AYGSHELL.DLL. But this was way too painfull (took me more then an hour!)

Basically, the problem is that the ATL implementation for the PocketPC links to AYGSHELL.LIB for a single function: SHDoneButton. (HPC2000 SDK doesn't). So I was thinking, let's recompile the project but with the HPC2000 as the target: surprise, they forgot to include "stddef.h" in the HPC2000 SDK (but it's there with HPC Pro and Pocket PC 2000/20002), so I simply copied this over (STLport needs it).

PocketFrog is also using a function in AYGSHELL.DLL: SHFullScreen. So what I did is a dynamic loader for the DLL that redirects the two calls.

But now I think this is the wrong approach (it's a little hard to setup the projects, the SDK needs to be modified, etc). If a game developper ever includes aygshell.h or ATLbase.h, aygshell.lib is going to be linked again and the game won't work on the HPC.

It would be much more simple to provide the AYGSHELL.DLL stub you were talking about. This way, no need to go through all the problems I had to go through.

What's left? Still need confirmation of the Jornada 720 frame buffer address and a way to detect it? Is the OEMINFO string available?
Conan · 29 May 2002, 07:02 UTC — OEM info
oops, I forgot I said I would do this. I will find out today.

Thanks for looking into this. If it works there will be many happy HPC users.

OK. OEM Info from SystemParametersInfo(SPI_GETOEMINFO on the Jornada 710/720 returns the following:-
<HP, Jornada 720, 9546, USEnglish, SAA>


So this is the same format as the existing Jornada's in PocketFrog's model table

Interesting that the 710 thinks it's a 720. The only difference is that the 710 has no internal Modem.

Re: aygshell I copied the PocketPC arm aygshell.lib to the Handheld 2000 lib folder on my PC and put the stub version of aygshell.dll in my Jormada 710 /windows folder. I then compiled a PocketPC version of bubbles ( had to comment out all sorts of menu & SIP stuff ) and this game runs on the J710 although the screen is not correct as the game is formatted for 320 x 240. So this shows that the aygshell stub version can be used but the existing download on the Jornada hacking page is for arm only so won't work on the J680/690.
Just won an auction for a J720 on EBay. I should receive it during the next week, so support should be in soon.
Conan · 24 Jun 2002, 17:37 UTC — Jornada 720 - a great device
Well done on your Auction success. My J710 came from a Yahoo auction. It's a really super machine. The keyboard is miles better than my old HP360lx HPC.

Not that I was expecting J720 support so soon but I have written my simple sprite demo so that it can work on a 240 high screen. Now I'm converting it to be more 'OO' before writing the chapter.