PocketMatrix forums

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

Open/cross platform

cross platform... How many of you would port your games to an open platform?

for example:
if Pocket frog was on the Sharp zaurus? or a GAPI implementation... or do most of you use very hardware specific features w/o useing a library.

I am just looking at getting a the new zaurus coming out in Jan. and might port Pocket Frog or some other platform library...
I would definitely port my games, if PocketFrog was available.
I would think porting would be quite a bit of trouble thanks to the dependance on GAPI, and other Pocket PC specific tweaks/tricks/whatever you decide to call them that do not have an equivlent on the Zaurus.

While it would be a cool thing to see, I'm wary on how useful it'll be, considering even more the limited penetration of any Zaurus.

I'd much rather see a WINE type emulator for Linux (on iPaqs and Zaurus) personally ;P
WINE? no (it is a bloated Win32 impl.)

pocket frog uses GAPI on the PPC but on the Zaurus I could implement the same interfaces and OBJs... not that hard you know.

well I don't wan't to say it is easy either. It will take a lot of compatability testing etc.. to get it working. But at this point in the lifetime of mobile gaming it is about time we start to see a real cross platform library like Pocket Frog.

Sound would also be easy since FMOD is already ported and SDL works great too.
It wouldn't be a port of WINE, but using the same concept that WINE uses for emulation.

True about FMOD and SDL, but I'm still skeptical about how much use this would actually get, though it surely will make developers very tempting to use PocketFrog.
Isn't this why middleware is developed and used.
Eg: Renderware for GC/XBox/PS2.

I suppose it comes down to good program design, trying to keep platform specific code seperate and encapsulated, so that you can rewrite your low-level code while affecting the high-level code as little as possible.

I suppose this is where using libaries causes problems if it is not availble for the target platform you are porting to.
That is exactly what i am getting at... how do you guys code your prjs? do you separate platform code with game code? or for you non game devers too.
sponge wrote:
I would think porting would be quite a bit of trouble thanks to the dependance on GAPI, and other Pocket PC specific tweaks/tricks/whatever you decide to call them that do not have an equivlent on the Zaurus.

While it would be a cool thing to see, I'm wary on how useful it'll be, considering even more the limited penetration of any Zaurus.

I'd much rather see a WINE type emulator for Linux (on iPaqs and Zaurus) personally ;P


Nothing prevents you from downloading the WINE source code and compile it for ARM and XWindow.
Quantum wrote:
That is exactly what i am getting at... how do you guys code your prjs? do you separate platform code with game code? or for you non game devers too.


Ofcourse. Last game I did before I left for hi-tech was running on three platforms (XBox, PS2 and GameCube). Unfortunately, I left the company.. (too badly paid).
PDAFantast: I would think WINE is VERY x86 specific, as the apps are already for x86, just the API is being emulated.. I don't know, something about it just doesn't yell out EASY PORT to me.
sponge wrote:
PDAFantast: I would think WINE is VERY x86 specific, as the apps are already for x86, just the API is being emulated.. I don't know, something about it just doesn't yell out EASY PORT to me.


Bah.. ever heard of PE binaries compiled for ARM?
They come in several flavours and they're usually called PocketPC applications. :)
Well.. bah that's why I'm not a coder :P
Sharp Zaurus by default does not use X windows but Qt Embedded /Qtopia http://www.trolltech.com/products/qtopia/index.html.

This means, that you can't just port your apps to X lib and expect them to work on the Zaurus, you have to use Trolltech Qt Embedded SDK which is not free for commercial development ( it is available under GPL and proprietary license.)

I ported my game from Zaurus to GapiDraw http://www.warmi.net/pocketpc/anigma and the source code is available.

BTW. There is a small company specializing in porting PPC games to the Zaurus http://www.eongames.com/
There seems to be a lot of conversation on WINE here is the real world:

You can NOT just compile it on an ARM device.
You can NOT convert a binary to ARM because there are too many differences.
You don't want to run WINE because it require significant memory and speed... plus not all APIs are implemented meaning you will have to only use WINE libs not actual DLLs from windows (this is how most apps work).
You need to know that most of the WINE lib would not be usefull on a PDA as most apps use only a small portion of the Win32 APIs (ie WinCE apps).
You would need to recompile for a WINE implementation and probably have some separate and "special" code.
You would need to change many used calling convetions (linux is mostly C calling while Windows API is mostly Pascal).
Considerable testing would need to take place... the PC version still has bugs and that doesn't exclude new ones for a PPC port.
Wine is not optimized for speed but for compatability thus you will have quite a time optimizing programs to run at a respectable speed.
Wine is a large repository of source code... you would need at least 20 volunteers to cover most areas.


And finally .... I am not one of those volunteering people for insane projects... for now I am working on an emulator and I may port some stuff to the Zaurus to spawn some cross platform games but for now don't bet on anything soon. This thread was primarily a curiosuty... I am not worried about app support on the Zaurus. They have plenty. I was just thinking it would help if there was some bridge betwwen WinCE and other devices to allow a programmer to write for both easily.
Quantum: I'm not trying to suggest a port of WINE, I was merely saying the same concepts that it uses for it's emulation (for lack of better terms) might be feasible on the PPC. I do realize that an entire port of WINE will not work too great.
Yes, but it would be very difficult. The WINE project is fairly old, and is still far from perfect. And I wouldn't think a WinCE emulator running on Qtopia would have more developers going for it either...
Quantum wrote:
You can NOT just compile it on an ARM device.


Nobody said you should compile it ON an ARM device. You take a cross compile compiler and compile it FOR ARM/ELF binary format. Given that you get rid of the occasional assembly in the WINE source code, you're set :) Which is not an easy task.

Quantum wrote:
You can NOT convert a binary to ARM because there
are too many differences.


Who said anything about converting a Windows binary to ARM ? I said, you can use the PocketPC applications, which are using the PE format, which is the same the normal Windows executables and dll use. Ofcourse, the actual code is ARM, but you're going to run it on ARM so it doesn't matter.

Quantum wrote:
You don't want to run WINE because it require significant memory and speed... plus not all APIs are implemented meaning you will have to only use WINE libs not actual DLLs from windows (this is how most apps work).


Not only that, but certain dlls on PocketPC are not yet implemented. So, ofcourse, you might want to finish them to get anything going. Daunting task though. Aygshell.dll and gapi.dll is two of them,
just to start with.

Quantum wrote:
You need to know that most of the WINE lib would not be usefull on a PDA as most apps use only a small portion of the Win32 APIs (ie WinCE apps).


That's so much bullshit. Since WINE is implementing a superset of the Win32 API and not a subset and given the fact that PocketPC apps use a subset, well.. you figure out the maths.

Quantum wrote:
You would need to change many used calling convetions (linux is mostly C calling while Windows API is mostly Pascal).


Bah, also bullshit. Since you have an ARM PE binary, the imported DLLs table entries will be uniform in regards to caller/callee format.

Next time, read the PE binary format and start seeing the possibilities before discarding a project as impossible.

The only drawback is the fact that Zaurus uses QT instead of X, as someone here said earlier, but it's not generally a problem.

Having said all that and bashed you out :) , I do agree with you that such a project is nearly a Sisyfos task, with so many unresolved factors that it's not generally worth it, given the underdeveloped result. Porting the app from PocketPC to QT is much faster and cheaper.

I just wanted to prove that the project IS possible, but HUGE and not needed.
Quantum wrote:
You can NOT just compile it on an ARM device.


Nobody said you should compile it ON an ARM device. You take a cross compile compiler and compile it FOR ARM/ELF binary format. Given that you get rid of the occasional assembly in the WINE source code, you're set :) Which is not an easy task.

Quantum wrote:
You can NOT convert a binary to ARM because there
are too many differences.


Who said anything about converting a Windows binary to ARM ? I said, you can use the PocketPC applications, which are using the PE format, which is the same the normal Windows executables and dll use. Ofcourse, the actual code is ARM, but you're going to run it on ARM so it doesn't matter.

Quantum wrote:
You don't want to run WINE because it require significant memory and speed... plus not all APIs are implemented meaning you will have to only use WINE libs not actual DLLs from windows (this is how most apps work).


Not only that, but certain dlls on PocketPC are not yet implemented. So, ofcourse, you might want to finish them to get anything going. Daunting task though. Aygshell.dll and gapi.dll is two of them,
just to start with.

Quantum wrote:
You need to know that most of the WINE lib would not be usefull on a PDA as most apps use only a small portion of the Win32 APIs (ie WinCE apps).


That's so much bullshit. Since WINE is implementing a superset of the Win32 API and not a subset and given the fact that PocketPC apps use a subset, well.. you figure out the maths.

Quantum wrote:
You would need to change many used calling convetions (linux is mostly C calling while Windows API is mostly Pascal).


Bah, also bullshit. Since you have an ARM PE binary, the imported DLLs table entries will be uniform in regards to caller/callee format.

Next time, read the PE binary format and start seeing the possibilities before discarding a project as impossible.

The only drawback is the fact that Zaurus uses QT instead of X, as someone here said earlier, but it's not generally a problem.

Having said all that and bashed you out :) , I do agree with you that such a project is nearly a Sisyfos task, with so many unresolved factors that it's not generally worth it, given the underdeveloped result. Porting the app from PocketPC to QT is much faster and cheaper.

I just wanted to prove that the project IS possible, but HUGE and not needed.
ywhat i meant was compile for an ARM device... that problems come into play when you start messing with calling conventions and sometimes memory layout (not endianess but memory locations). It is very simple. besides most programs require a combination of WINE and Win32 dll's to run so you would need what I said above... a binary platform translation... it can be done on simple apps but not for complex and large x86 dlls. sorry if i sounded like i was flaming but the answer is it just should NOT be done because you would have to be insane enough to rewrite a huge portion of applications etc...


well anyway.. i see you point about WINE but I think a linked library would be a better choice.
now that i read you whole post the last 2 are misunderstood... I am saying that WINE has so many functions that you might as well just start over... there are too many things to change and most PPC apps don't use them.


as for calling convention... yes it IS hardcoded in WINE which would make build your app to run on it a big trick to overcome by keeping you original application code (no mods).

Just a note:
the standard Microsoft PE format would be useless it does not contain all the info all the time (not all header are used everywhere). and on top of that linux uses the ELF exec. format so you would need to build a custom exec. loader.

and please no more "b.s."... most of the time it is a misunderstanding not an idiot at the other end (excluding some of the people that have been banned in the past year). sorry if I sound conservative or something but i get tired of forums filled with junior high kid language and not a more professional atmosphere.
Quantum wrote:
now that i read you whole post the last 2 are misunderstood... I am saying that WINE has so many functions that you might as well just start over... there are too many things to change and most PPC apps don't use them.


Au contraire, Wine doesn't have all the necessary functions that one would need. Even if wine defines a superset of PPC apps API, it still doesn't implment for example aygshell.dll.

Quantum wrote:
as for calling convention... yes it IS hardcoded in WINE which would make build your app to run on it a big trick to overcome by keeping you original application code (no mods).


Yes, but you're missing the point here. Since the calling convention is standard Windows and the binary IS a "Windows PPC" application you don't need a convertion.

Quantum wrote:
Just a note:
the standard Microsoft PE format would be useless it does not contain all the info all the time (not all header are used everywhere). and on top of that linux uses the ELF exec. format so you would need to build a custom exec. loader.


Again, Windows CE PPC applications do use the PE format as does the normal desktop Windows applications... See where I'm getting at? Everything is in the PE format. Everything you will need for it to function. The only difference between a PPC ARM app and a Windows desktop app is that their binary executable code in the text sections are different :)

Also, you don't need a custom binary loader. The Wine will load your binary as is, since it's a valid PE file and that's how Wine loads the windows apps :)

Quantum wrote:
and please no more "b.s."... most of the time it is a misunderstanding not an idiot at the other end (excluding some of the people that have been banned in the past year). sorry if I sound conservative or something but i get tired of forums filled with junior high kid language and not a more professional atmosphere.


Sorry about that, that's my futile attempt to keep myself young :)
well no matter... the WINE project is great but I think if a protable library is built well (ie the unix MainWin or GTK etc...) then we won't have to worry about an API port.

The only draw back is that the PPC games will have to be written from the start to support it or modified. I looked at pocket frog for this very reason: It is very fast and already used by many.

I think the best solution would be for microsoft to support a more strict POSIX implementation of WinCE and start using the ELF exec format... but am I dreaming... this is Micro$oft I am talking about.