This site is no longer active and is available for archival purposes only. Registration and login is disabled.

A Jornada 720 version using the new GAPI


Re: A Jornada 720 version using the new GAPI

Postby R0B » Jul 5, 2001 @ 5:05pm

That sounds great, thanks for you help.  I know that it uses GXBeginDraw to make the nag screen, but the question is, how many times does it call GXBeginDraw?  I am fairly sure that the 720 only requires one call, so after I get the rest of the gapi functions working, I will see if I can change that (if needed).  It may end up that the retail version is the only way however.  Lets keep our fingers crost.
"1011001010 NNNNNNNNNNOOOOOOOOOOOOOOOO!!!!!!" -Bender
User avatar
R0B
got muffins?
 
Posts: 1894
Joined: Jun 22, 2001 @ 12:04pm


Re: A Jornada 720 version using the new GAPI

Postby 999 » Jul 5, 2001 @ 5:50pm

I made a mention in a previous post that it'd be darn nice if Larry (the bitbank gapi author) donated a copy of his gapi to Dan or someone in the loop.<br><br>I also offered a free linkback to his site right next to the HPC PQ download link.<br><br>I'm hoping he'll take up on it, either to help establish the power of his gapi (Quake as a testament to it's ability would be great marketing), or just to play nice and help the CE programming community out there. <br><br>In either case, it was worth a shot, and in the end, I figure Chris can setup a Gapi donation of some sort.<br>
Image
999
pm Member
 
Posts: 1227
Joined: Jan 24, 2001 @ 11:48pm


Re: A Jornada 720 version using the new GAPI

Postby R0B » Jul 5, 2001 @ 5:58pm

After a long period of gazing sencelessly into the computer screen, and sveral restarts, I finally think I figured out the problem.  Ok, here are my facts.<br><br>1. Any GAPI refrence in sys_win.c or vid_ppc.c come up with an error. (Both are C file (*.c))<br><br>2. Just for fun I put in the call GXOpenInput() into PocketQuake.cpp and I recieved no error from this file (the other errors were still there, which might have caused this lack of error creating, but I dout it).<br><br>Conclusion GAPI for HPC's only works with C++.  If you have any other information please write it here.  I am now going to do some more experimenting to see what I come up with.  If I can't get it to work by the end of today I will email Larry and ask him about it.
"1011001010 NNNNNNNNNNOOOOOOOOOOOOOOOO!!!!!!" -Bender
User avatar
R0B
got muffins?
 
Posts: 1894
Joined: Jun 22, 2001 @ 12:04pm


Re: A Jornada 720 version using the new GAPI

Postby R0B » Jul 5, 2001 @ 6:58pm

Is there any way to declare a function in the main PocketQuake.cpp so it can be used by the other *.c files?
"1011001010 NNNNNNNNNNOOOOOOOOOOOOOOOO!!!!!!" -Bender
User avatar
R0B
got muffins?
 
Posts: 1894
Joined: Jun 22, 2001 @ 12:04pm


Re: A Jornada 720 version using the new GAPI

Postby Digby » Jul 5, 2001 @ 9:06pm

Rob,<br><br>You're in a bit of a pickle because Larry has exported the functions in the static library using their C++ mangled name.  I can tell you how to get around this, but from your programming skills it would take more time than I want to spend typing in this web form right now.  Contact me by e-mail  and I'll be happy to help you offline, but you really should ping Larry for help on this one first.  He should have typed the functions in his lib as extern "C" and then done the same in the header file (if being compiled under C++).  MS should have done the same with their GAPI Dll too.  I'll mention that to Bill the next time we're playing golf. ;)<br><br>Oh and I've read his docs with the library and I know why he put the nag dialog in GXBeginDraw.  He comes right out and tells everyone that they don't need to use GXOpenDisplay if you're using his library!  Of course he couldn't put the nag dialog in that function - no one will be using it now!  Ugh.<br><br>You'll need to use extern "C" with any C++ function you want to call from a C source file.  That prevents the C++ name mangling.<br><br>Here's a function Foo in some C++ source file:<br><br>extern "C" void Foo (int Bar)<br>{<br>   ...<br>}<br><br>Last modification: Digby - 07/05/01 at 18:06:48
Digby
pm Insider
 
Posts: 1011
Joined: Apr 29, 2001 @ 1:53pm


Re: A Jornada 720 version using the new GAPI

Postby Dan East » Jul 5, 2001 @ 9:39pm

If the linker cannot find a library file (in this case gx.lib), then it will fail immediately, as opposed to reporting all the individual functions that could not be resolved. So if it doesn't say "unable to open gx.lib" then it found it. As Digby said, there are different calling conventions used to reference function names and tokenize their parameters. Quake is in C, while Larry's library is in C++. If you take a look at the zlib.h header file you'll see:<br>[fixed]<br>#ifdef __cplusplus<br>extern "C" {<br>#endif<br>[/fixed]<br>That allows that C library to be used correctly with C++. You need to do the opposite, which would be something I would have to play around with to get to work (I don't exactly make C++ function calls from C every day). You can try specifying __stdcall in front of the function definitions in gx.h, but I don't know if that is the exact correct syntax.<br><br>Dan East
User avatar
Dan East
Site Admin
 
Posts: 5264
Joined: Jan 25, 2001 @ 5:19pm
Location: Virginia, USA


Re: A Jornada 720 version using the new GAPI

Postby Digby » Jul 5, 2001 @ 10:37pm

Digby
pm Insider
 
Posts: 1011
Joined: Apr 29, 2001 @ 1:53pm


Re: A Jornada 720 version using the new GAPI

Postby Fishd » Jul 6, 2001 @ 9:25am

Fishd
 


Re: A Jornada 720 version using the new GAPI

Postby Trarman » Jul 6, 2001 @ 10:54am

Trarman
 


Re: A Jornada 720 version using the new GAPI

Postby R0B » Jul 6, 2001 @ 10:58am

"1011001010 NNNNNNNNNNOOOOOOOOOOOOOOOO!!!!!!" -Bender
User avatar
R0B
got muffins?
 
Posts: 1894
Joined: Jun 22, 2001 @ 12:04pm


Re: A Jornada 720 version using the new GAPI

Postby Trarman » Jul 6, 2001 @ 11:55am

Trarman
 


Re: A Jornada 720 version using the new GAPI

Postby R0B » Jul 6, 2001 @ 11:56am

"1011001010 NNNNNNNNNNOOOOOOOOOOOOOOOO!!!!!!" -Bender
User avatar
R0B
got muffins?
 
Posts: 1894
Joined: Jun 22, 2001 @ 12:04pm


Re: A Jornada 720 version using the new GAPI

Postby John Lomax » Jul 6, 2001 @ 12:08pm

User avatar
John Lomax
pm Member
 
Posts: 185
Joined: May 16, 2001 @ 6:04pm


Re: A Jornada 720 version using the new GAPI

Postby R0B » Jul 6, 2001 @ 1:12pm

I would like to take this time to thank Larry greatly.  He has just sent me a set of C wrapper functions that he uses in his programs to interface to GAPI.  I haven't tested it yet, but it should work.  If it does, then PQ should be on the 720 before we know it.  Thanks Larry.Last modification: Rob - 07/06/01 at 10:12:38
"1011001010 NNNNNNNNNNOOOOOOOOOOOOOOOO!!!!!!" -Bender
User avatar
R0B
got muffins?
 
Posts: 1894
Joined: Jun 22, 2001 @ 12:04pm


Re: A Jornada 720 version using the new GAPI

Postby Digby » Jul 6, 2001 @ 1:55pm

Cool news Rob.  I just finished sending you instructions on how to do this via e-mail, but it sounds like you don't need it now.  Good luck.<br><br>
Digby
pm Insider
 
Posts: 1011
Joined: Apr 29, 2001 @ 1:53pm


PreviousNext

Return to Pocket Quake 1 and 2


Sort


Forum Description

Discuss Pocket Quake 1 and 2 by Dan East

Moderators:

Dan East, sponge, James S

Forum permissions

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum