PocketMatrix forums

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

GAPI HPC on J680

Does GAPI have any issues with the HP Jornada 680.
I am compiling Quake for CE2.11 HPC's using GAPI HPC. I compiles, shoves a nag-screen at you...then...nothing...we just get the nag-screen again and again. No sign of Quake! :evil: It all works fine on the emulator so it must be GAPI.
I have tried the GapiDemo2 Larry (the author of GAPI HPC) put with the lib files. That does not work either. I have also tried editing the demoso that it calls GXBeginDraw() and GXEndDraw() every time the display is updated. Still nothing. (Jornada's use a SH-3 cpu.)
I presume this means that GAPI is not finding the display memory address properly.

On the J680, there is a diagnostics utility. You can test the video ram there and it reports that it starts testing at b2000000. I tried hard-coding this. (A very long shot, I know!)

Any ideas?
I have heard that his GAPI library has problems with non-English devices. Is yours English? Are you sure your model is supported by his API?

Dan East
I've read somewhere that the 680 framebuffer address is 0x06130000... Maybe 0x86130000?

I'd really like to find out...
Im pretty sure my device is english.
Larry did say on his web-page that the 680/690 were compatible with his GAPI HPC.
Ok, Larry has a program that gets the video address and all for you. Get him to send you a copy, and then run it. Then while debugging (this is latter on) put a break point, where the vram pointer is returned, and compare the two (they should be identical). Oh, but before you do anything else, hardreset your device, and then try it. Many people have said that by doing this, their 710's start working with Quake, but after a softreset, larry's library screws up.
I've tried Hard-resetting the device, Quake still doesn't work.
If and when I get the program I will have a better idea of what is going on. From what I can make out, I am getting the same problem as on the German 720's.

Also ROB, You mentioned that you have a set of wrapper functions for GAPI HPC (so you can call them from 'C' code) I have got around this problem using extern 'C', and it seems to work but could you post them. I want to be 100% sure that they are not the problem.

I'll also post a ARM build. The 720 owners can test this (GAPI HPC works on those) and I will know if the problem is GAPI or not.
I've finally figured out a solution for Jornada 680.
First of all, I've found a video buffer address for this HPC. It's 0x06130000. But I'm afraid, it's not enough just to set
vbuff = (short *)(0x06130000);
instead of calling GXBeginDraw() (this approach works for Jornada 720 though).
Probably a more correct way is to patch gx.lib, which is used to compile Jornada 680 SH3 EXE, to support all the versions of the Jornada. I used this approach (but I patched EXE itself), so you can download the fixed EXE, which should work on all the devices.


So hard-coding it won't work. (I said it was a long shot!) Ok so I've got to hack the gx.lib im linking to. Can anyone point me in the right direction?
What exactly does GXBeginDraw() do? Does it just return the display ram address or does it actually do something to the display memory?
Ok, try this, first call GXBeginDraw(), and then set the hardcoded address. When I was working on making my own GAPI (never had the time to really finish it) I noticed that this would allow you to hardcode that address, and it would still work.
Code:
#include <windows.h>
#include <gx.h>
extern "C" int GXOpenDisplay_(HWND hwnd, int flags)
{
return GXOpenDisplay(hwnd, flags);

} /* GXOPENDISPLAY() */

extern "C" int GXCloseDisplay_(void)
{
return GXCloseDisplay();

} /* GXCLOSEDISPLAY() */

extern "C" void * GXBeginDraW(void)
{
return GXBeginDraw();

} /* GXBEGINDRAW() */

extern "C" int GXEndDraW(void)
{
return GXEndDraw();

} /* GXENDDRAW() */

extern "C" int GXOpenInput_(void)
{
return GXOpenInput();

} /* GXOPENINPUT() */

extern "C" int GXCloseInput_(void)
{
return GXCloseInput();

} /* GXCloseINPUT() */

extern "C" int GXSuspend_(void)
{
return GXSuspend();

} /* GXSUSPEND() */

extern "C" int GXResume_(void)
{
return GXResume();

} /* GXRESUME() */

extern "C" GXDisplayProperties GXGetDisplayProperties_()
{
/*GXDisplayProperties gxpx; (ROB) optimized a little
gxpx = GXGetDisplayProperties();
return gxpx;*/
return GXGetDisplayProperties();
} /* GXGETDISPLAYPROPERTIES() */

extern "C" GXKeyList GXGetDefaultKeys_(int ioptions)
{
return GXGetDefaultKeys(ioptions);

} /* GXGETDEFAULTKEYS() */


That is the glide wrapper I used with Quake and DL
Yup...that's near-as-damnit what I wrote. Tried compiling it with that instead. Same.