Post Reply 
 
Thread Rating:
  • 2 Votes - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
port for intel x86 android phones??
09-25-2013, 03:06 AM
Post: #76
RE: port for intel x86 android phones??
(09-24-2013 04:43 PM)ddsdadashi Wrote:  trying to build with icc:
I'm not familiar with android, but I managed to build ppsspp with icc for android. the startup guide of icc can be found here:
http://software.intel.com/sites/products...tarted.htm
so I just type how i build ppsspp with it.

1. modify the build.xml and custom_rules.xml because i'm using ant.
the build.xml missed a env variable for ndk, so add:
<property environment="env" />
<condition property="sdk.dir" value="${env.ANDROID_HOME}">
<isset property="env.ANDROID_HOME" />
</condition>
<condition property="ndk.dir" value="${env.NDK}">
<isset property="env.NDK" />
</condition>
in file custom_rules.xml:
<property name="ndkbuildopt" value=" V=1 -B NDK_TOOLCHAIN=icc APP_ABI=x86 APP_OPTIM:=release TARGET_PLATFORM:=android-14 LOCAL_LDFLAGS:=-static-intel"/>

2.modify the project.properties
change target=android-10 to android-14 because x86 are not supported in android 10

then type ant instrument, wait for job finished.
there are compiler warnings, but can be ignored safely, or you should edit the android.mk to remove the unsupported args.

the compilation gives me a startable apk, but not functional(complains about "Could not find executable disc0:/PSP_GAME/SYSDIR/BOOT.BIN"). so if anyone can help do some debug work?

contact me if anyone would like to help me upload the compiled apk to dropbox, which is inaccessable from where i am.
Find all posts by this user
Quote this message in a reply
09-25-2013, 05:33 AM
Post: #77
RE: port for intel x86 android phones??
Hmm, that's strange. Do you get the same error for a cso or an iso?

What if you try loading a prx? For example, one of the ones under pspautotests/tests/? It won't show anything amazing but if it runs, that helps us localize the problem.

-[Unknown]
Find all posts by this user
Quote this message in a reply
09-25-2013, 09:55 PM
Post: #78
RE: port for intel x86 android phones??
hey -[Unkown] I have seen that your commit to fix the last issues with android + x86 actually disables a part of the JIT, any way to help you debug that part?
Find all posts by this user
Quote this message in a reply
09-27-2013, 01:39 AM
Post: #79
RE: port for intel x86 android phones??
(09-25-2013 05:33 AM)[Unknown] Wrote:  Hmm, that's strange. Do you get the same error for a cso or an iso?

What if you try loading a prx? For example, one of the ones under pspautotests/tests/? It won't show anything amazing but if it runs, that helps us localize the problem.

-[Unknown]

the error shows when any iso was loaded, all of which are loaded fine with the ndk compiled ones. or , can you pm me your mail addr, so i can send you a copy to investigate.
Find all posts by this user
Quote this message in a reply
09-27-2013, 03:26 PM
Post: #80
RE: port for intel x86 android phones??
(09-25-2013 09:55 PM)YaPeL Wrote:  hey -[Unkown] I have seen that your commit to fix the last issues with android + x86 actually disables a part of the JIT, any way to help you debug that part?

Yes, the problem is the ABI. vrot uses sin/cos/etc. which aren't 100% trivial to implement in jit, so we're calling a function.

On Windows, at least, float arguments are passed on the stack, but it seems like it's different on Android. Possibly dropping an extern "C" on SinCosNegSin and SinCos might help, not really sure. Or, passing the parameter in a different way or aligning the stack or something.

Another option would be to write our own stub that implements these with our own ABI, although that's not completely trivial.... there are some approximations out there.

(09-27-2013 01:39 AM)ddsdadashi Wrote:  the error shows when any iso was loaded, all of which are loaded fine with the ndk compiled ones. or , can you pm me your mail addr, so i can send you a copy to investigate.

What do you mean by ndk compiled ones? I don't have an x86 phone so I'm not gonna be able to investigate very well.

-[Unknown]
Find all posts by this user
Quote this message in a reply
09-28-2013, 01:14 AM
Post: #81
RE: port for intel x86 android phones??
(09-27-2013 03:26 PM)[Unknown] Wrote:  
(09-25-2013 09:55 PM)YaPeL Wrote:  hey -[Unkown] I have seen that your commit to fix the last issues with android + x86 actually disables a part of the JIT, any way to help you debug that part?

Yes, the problem is the ABI. vrot uses sin/cos/etc. which aren't 100% trivial to implement in jit, so we're calling a function.

On Windows, at least, float arguments are passed on the stack, but it seems like it's different on Android. Possibly dropping an extern "C" on SinCosNegSin and SinCos might help, not really sure. Or, passing the parameter in a different way or aligning the stack or something.

Another option would be to write our own stub that implements these with our own ABI, although that's not completely trivial.... there are some approximations out there.

(09-27-2013 01:39 AM)ddsdadashi Wrote:  the error shows when any iso was loaded, all of which are loaded fine with the ndk compiled ones. or , can you pm me your mail addr, so i can send you a copy to investigate.

What do you mean by ndk compiled ones? I don't have an x86 phone so I'm not gonna be able to investigate very well.

-[Unknown]

ndk compiled ones means ppsspp compiled with android-ndk-r9, and the problem one was compiled with icc, which is expected to have a better performance.
Find all posts by this user
Quote this message in a reply
09-28-2013, 07:05 AM
Post: #82
RE: port for intel x86 android phones??
Ah, so gcc compiled ones. Well, I understand it's any iso, but prx's are not isos. They are loaded by slightly different code. If they show the same error message, it narrows down where the error can be quite a bit.

-[Unknown]
Find all posts by this user
Quote this message in a reply
10-02-2013, 07:53 AM (This post was last modified: 10-02-2013 07:54 AM by Tapou.)
Post: #83
RE: port for intel x86 android phones??
What's the extraction code ddsdadashi Ty....
Find all posts by this user
Quote this message in a reply
10-22-2013, 03:33 PM
Post: #84
RE: port for intel x86 android phones??
latest git version, it comes with a nice hack for our gpu, courtesy of Henrik

https://www.dropbox.com/s/8ykk7q2tb9kk792/ppssppx86.apk
Find all posts by this user
Quote this message in a reply
10-29-2013, 02:21 PM
Post: #85
RE: port for intel x86 android phones??
Hi,

I've got the same problem when recompiling with icc, .prx load seem to go fine but not iso/cso.

With gcc you can already get a big performance boost adding these cflags:
-mtune=atom -mfpmath=sse

On my atom Z2580 phone with frameskipping set to 1, Wipeout pure is working quite well with these !
Find all posts by this user
Quote this message in a reply
10-29-2013, 02:24 PM
Post: #86
RE: port for intel x86 android phones??
(10-29-2013 02:21 PM)xavier-hallade Wrote:  Hi,

I've got the same problem when recompiling with icc, .prx load seem to go fine but not iso/cso.

With gcc you can already get a big performance boost adding these cflags:
-mtune=atom -mfpmath=sse

On my atom Z2580 phone with frameskipping set to 1, Wipeout pure is working quite well with these !

in Android.mk, like this?

LOCAL_CFLAGS := -O3 -fsigned-char -Wall -Wno-multichar -Wno-psabi -Wno-literal-suffix -D__STDC_CONSTANT_MACROS -mtune=atom -mfpmath=sse
Find all posts by this user
Quote this message in a reply
10-29-2013, 02:33 PM
Post: #87
RE: port for intel x86 android phones??
It will work this way, but only if you compile just for x86.
Hence it's better if you put these in the x86 specific part that is already in the Android.mk, like this:
...
ifeq ($(TARGET_ARCH_ABI),x86)
LOCAL_CFLAGS := $(LOCAL_CFLAGS) -mtune=atom -mfpmath=sse -D_M_IX86
ARCH_FILES := \
...
Find all posts by this user
Quote this message in a reply
10-29-2013, 02:35 PM
Post: #88
RE: port for intel x86 android phones??
If you look in Locals.mk in android/jni, you'd see that we already specify -mtune=atom. I will add the other flag as well.
Find all posts by this user
Quote this message in a reply
10-30-2013, 12:58 AM
Post: #89
RE: port for intel x86 android phones??
Can anyone check if icc on Linux has the same issues? It probably will, if it does it'd probably be a lot easier to debug that way.

-[Unknown]
Find all posts by this user
Quote this message in a reply
10-30-2013, 01:08 PM (This post was last modified: 10-30-2013 06:47 PM by YaPeL.)
Post: #90
RE: port for intel x86 android phones??
(10-30-2013 12:58 AM)[Unknown] Wrote:  Can anyone check if icc on Linux has the same issues? It probably will, if it does it'd probably be a lot easier to debug that way.

-[Unknown]

I'm on linux, and I have icc instaled and configured, what do I need to change in ppsspp in order to use icc?

Edit:

ok I found how, I need to get a different ndk version because I'm getting a bunch of errors and its not supported by icc, will try it later on.
Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump: