Post Reply 
 
Thread Rating:
  • 1 Votes - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
What's with the ARM JIT for PPSSPP Why Is It Terrible?
04-19-2015, 05:45 PM
Post: #1
What's with the ARM JIT for PPSSPP Why Is It Terrible?
Hello guys, I was just wondering why the Android/IOS versions of PPSSPP were so damn bad?

I've read that the JIT for ARM processors is basic and that's why it's slow... But why is it so basic? Is it much harder to work on the ARM version than the x86-64 version? Or is it just that it's not been around for that long?

- Thanks
Find all posts by this user
Quote this message in a reply
04-22-2015, 01:58 PM (This post was last modified: 04-22-2015 02:03 PM by vitality19.)
Post: #2
RE: What's with the ARM JIT for PPSSPP Why Is It Terrible?
You should have started with "hello devs", only developers know the actual difficulty, there should be reasons for this, if you were one of them you would understand. My guess is it's not as easy as it's seems to be and it would take a lot their spare time (it's a hobby after all).

Samsung Captivate, Android 2.3.5 SAUROM, Corn Kernel v701
Fly Evo Chic 3, Android 4.4.2 Stock, improved stock kernel
Find all posts by this user
Quote this message in a reply
04-22-2015, 10:22 PM
Post: #3
RE: What's with the ARM JIT for PPSSPP Why Is It Terrible?
True true, but if it was just a hobby, then why would they only work on the x86 version so much and not the ARM port?
Find all posts by this user
Quote this message in a reply
04-23-2015, 01:46 AM
Post: #4
RE: What's with the ARM JIT for PPSSPP Why Is It Terrible?
I think you're working off old information. On most devices, including ARM devices, the slow part is your graphics driver and the graphics commands that are sent to it. Both jit compilation and execution, especially on modern ARM devices, are fairly fast. Of course, it depends on the game.

Of course, development of the x86 jit is easier when you're developing using an x86 machine.

As for iOS, that's so bad because there's very literally no one maintaining the code for it anymore. I do not even own a device that is capable of running even somewhat recent versions of iOS. Also, jit is automatically disabled when using PPSSPP on an iOS device that isn't jailbroken afaik, and I've heard that different jailbreaks can cause bugs, crashes, and possibly even poor performance. Really seems like a minefield I want to be absolutely nowhere near.

-[Unknown]
Find all posts by this user
Quote this message in a reply
04-23-2015, 02:12 AM
Post: #5
RE: What's with the ARM JIT for PPSSPP Why Is It Terrible?
Well, my phone has an ARM Cortex-A7 Quad core CPU that runs up to 1.40GHz
Mali-400MP GPU
1GB of RAM

Are these not good specifications for a phone to run PPSSPP? I have tried some games and it runs like crap, no matter what I do.
Find all posts by this user
Quote this message in a reply
04-23-2015, 04:00 AM (This post was last modified: 04-23-2015 04:01 AM by [Unknown].)
Post: #6
RE: What's with the ARM JIT for PPSSPP Why Is It Terrible?
Mali-400MP is one of the worst GPUs for PPSSPP unfortunately. It or its drivers can't cope with some of the shaders we try to create (not enough hardware registers, possibly?) and so it has to kick back into "slow mode" to be able to draw things properly. You probably see sometimes "falling back to software" that's what it shows when "slow mode" happens for the first time during a gameplay session.

1.4 Ghz isn't awesome, but it's probably not your limiting factor. Newer Malis (anything that isn't Mali-4xx) should be better.

A good heuristic to use is frameskip. Even if you max out frameskip (set it to e.g. 8 and turn off auto frameskip), the jit still runs 100%.

In other words, let me explain it like this. First, turn on the FPS display. Let's assume in a game you're getting 50% speed, stutters, bad audio, etc. because it can't keep up.

If setting frameskip to 8 only makes the graphics update slower, but it's still at 50% speed, the audio still stutters, etc. then you are somehow CPU limited. There's a decent chance that jit optimizations (if we could find good ones) might help at least a little.

If setting frameskip to 8 increases the speed %, then it's increasing because it's drawing less. That's the only thing frameskip skips - drawing. Obviously, the graphics will be unplayably bad (you'll be getting like 7 FPS even at 100% speed with frameskip = 8). But if the audio is better and the speed % is better, then drawing is the problem, not the jit.

Mobile drivers are often very very bad. And slow. It's a big problem, especially when trying to emulate games that interacted with a very light layer (on the PSP) which was pretty fast. Our best hope right now is Vulkan, which may let us have much more direct, much more efficient access to the GPU hardware (through a thinner driver, although still not as thin as the PSP's) - allowing us to circumvent the slow, buggy mobile GPU drivers.

But... unfortunately, the Mali-400 will probably never be graced with Vulkan drivers, because it's an older GPU. I'm sorry to say, but I really don't know what we can do for that GPU.

There are some games, especially 2D games, which may be able to run okay with auto frameskip 1 or 2. You'll need "slow effects" disabled, and probably also the "alpha test disable" hack. There will be graphical glitches with those settings.

-[Unknown]
Find all posts by this user
Quote this message in a reply
04-23-2015, 10:28 AM
Post: #7
RE: What's with the ARM JIT for PPSSPP Why Is It Terrible?
I find it funny how I'm always stuck with the crappiest phone. No updates, no custom ROMs, no recovery, and a shitty GPU.

I don't understand how Samsung gets away with making poor GPU drivers for their phones, they should be ashamed of that. You don't see that kind of thing on laptop and desktop computers.
Find all posts by this user
Quote this message in a reply
05-10-2015, 04:21 PM (This post was last modified: 05-10-2015 06:31 PM by vitality19.)
Post: #8
RE: What's with the ARM JIT for PPSSPP Why Is It Terrible?
(04-23-2015 02:12 AM)Anubis2048 Wrote:  Well, my phone has an ARM Cortex-A7 Quad core CPU that runs up to 1.40GHz
Mali-400MP GPU
1GB of RAM

Are these not good specifications for a phone to run PPSSPP? I have tried some games and it runs like crap, no matter what I do.

I recently bought Fly Evo Chic 3 (Chinese phone) with the same specs mentioned above except mali-400 mp2 and 1.3 ghz mediatek 6582m and resolution 960*540 that is almost exactly *2 PSP (resolution can influence fps so I tried to find a compromise while choosing), I also have old galaxy s single core with power vr 540 which stangely enough runs much better with an older firmware 2.3.3 and a custom kernel that adds 4-5 fps (cyanogen mod runs the same as this stock), the latest 2.3.5 is much slower even with custom kernel - hence the buggy drivers. I had a choice between mali-400 mp2 and power vr 544, so I chose the first cause I already have power vr and I heard that this gpu has some nasty bugs and the resolution was too big for these chinese power vr phones. As expected after testing several "heavy" games I found out that the new phone performs much better with Android 4.4.2 stock (+10 fps in tekken 5 practice mode, and a bit more with multi-threading), but I never experienced slow-mode with fall back to software, everything ran as it should, just faster than the old phone. Antutu benchmark gives me about 19000 points with the new phone.

Which games have you tested and what results did you get? I find it strange that it runs slow. Also what phone do you have exactly?

Samsung Captivate, Android 2.3.5 SAUROM, Corn Kernel v701
Fly Evo Chic 3, Android 4.4.2 Stock, improved stock kernel
Find all posts by this user
Quote this message in a reply
05-10-2015, 07:11 PM
Post: #9
RE: What's with the ARM JIT for PPSSPP Why Is It Terrible?
Sounds like you might have a better driver that doesn't have these issues, potentially. That's good to know, there was some thought it was a hardware limitation.

Or maybe the mp2 fixed it, maybe it's only the -400 and -450 that have the problem.

-[Unknown]
Find all posts by this user
Quote this message in a reply
05-10-2015, 07:32 PM
Post: #10
RE: What's with the ARM JIT for PPSSPP Why Is It Terrible?
(04-23-2015 04:00 AM)[Unknown] Wrote:  Mali-400MP is one of the worst GPUs for PPSSPP unfortunately.

Ok, if mali, power vr and adreno are bad (i mean drivers). Which are good then - those "exotic" gpus like videocore or vivante? These new tegra, mali and other gpus that cost lots of money, but nevertheless I think they are still limited by some degree like their predecessors cause of drivers.

I know this is some kind of marketing, but then who needs an expensive phone that should already run heavy psp games full speed and it doesn't cause it's bottlenecked by some crappy drivers. Companies don't bother improving drivers as their phones are intended for pure android games and not demanding emulators, and it's enough for them and for average user.

Samsung Captivate, Android 2.3.5 SAUROM, Corn Kernel v701
Fly Evo Chic 3, Android 4.4.2 Stock, improved stock kernel
Find all posts by this user
Quote this message in a reply
05-10-2015, 10:27 PM
Post: #11
RE: What's with the ARM JIT for PPSSPP Why Is It Terrible?
I have not encountered any issues like hw composer falling back to software renderer and graphics glitches when I tested ppsspp with my Galaxy s3(ppsspp ver 0.9).

The Galaxy s3 has a mali 400MP4 just like the Galaxy S2 although clocked higher.

Changing to a phone with adreno 320 though, gave me alot of headaches. My Oppo Find 5 with its snapdragon s4 failed to deliver as much as my sgs3 did in ppsspp. Some might say that it must be due to the higher resolution screen but I don't think so as even if I'm playing at 1x Buffered rendering, the Adreno 320 phone still struggles compared to my sgs3.

After reading a lot posts here in the forums, the sluggish performance I've observed is due to shitty Qualcomm drivers. I'm not updated though, in case Qualcomm have updated anything.

And finally, with Power VR. I have tested ppsspp with a phone using Imagination's G6430. Games runs great and it might be due to arm v8a improvements although I do experience graphics glitches in some games (transparent textures).

I've seen performance decline with the latest builds though. It might be due to ppsspp being more accurate or because there's no active maintainer for the iOS port. (Ppsspp tested with iphone 5s)

Ryzen 5 1600 @3.8Ghz
Sapphire Nitro+ RX480 @1.4Ghz
---------------------------------------------
Nokia 8 - Snapdragon 835
Find all posts by this user
Quote this message in a reply
05-11-2015, 07:37 AM (This post was last modified: 05-11-2015 08:19 AM by vitality19.)
Post: #12
RE: What's with the ARM JIT for PPSSPP Why Is It Terrible?
(05-10-2015 10:27 PM)tiktakt0w Wrote:  And finally, with Power VR. I have tested ppsspp with a phone using Imagination's G6430. Games runs great and it might be due to arm v8a improvements although I do experience graphics glitches in some games (transparent textures).

It runs great (even with bad drivers) cause it's a fairly new and expensive gpu with opengl 3.1 support and updated Android supprt. I was talking about older and cheaper gpus.

(05-10-2015 07:11 PM)[Unknown] Wrote:  Sounds like you might have a better driver that doesn't have these issues, potentially. That's good to know, there was some thought it was a hardware limitation.

Or maybe the mp2 fixed it, maybe it's only the -400 and -450 that have the problem.

-[Unknown]

I am not actually sure 100% if I have mali 400 mp2. Several sites suggest that the phone has this gpu and even this benchmarking site https://gfxbench.com/compare.jsp and http://en.wikipedia.org/wiki/MediaTek say that, but PPSSPP says that it's just mali-400 - maybe it just can't detect multi-core configurations. I believe there could be a driver limiting factor in Android version - the newer the version the better the driver.

Samsung Captivate, Android 2.3.5 SAUROM, Corn Kernel v701
Fly Evo Chic 3, Android 4.4.2 Stock, improved stock kernel
Find all posts by this user
Quote this message in a reply
05-11-2015, 03:27 PM
Post: #13
RE: What's with the ARM JIT for PPSSPP Why Is It Terrible?
(05-11-2015 07:37 AM)vitality19 Wrote:  It runs great (even with bad drivers) cause it's a fairly new and expensive gpu with opengl 3.1 support and updated Android supprt. I was talking about older and cheaper gpus.

I mentioned the G6430 because although it's new and much faster than previous iterations, poor alpha testing can still be observed with this gpu (Just like with older powervr models). It might due to the fact that Power VR gpu's are using TBDR (Unkown Brackets seemed to agree with this one). TBDR though, is a non issue outside of PPSSPP.

Quote:I am not actually sure 100% if I have mali 400 mp2. Several sites suggest that the phone has this gpu and even this benchmarking site https://gfxbench.com/compare.jsp and http://en.wikipedia.org/wiki/MediaTek say that, but PPSSPP says that it's just mali-400 - maybe it just can't detect multi-core configurations. I believe there could be a driver limiting factor in Android version - the newer the version the better the driver.
The Mediatek MT6582M has the Mali-400 MP2. And just as with your experience, I have also not experienced any issue with the Mali-400 in PPSSPP as well. The galaxy s3/s2 which I've tested has the MP4 variant though.

Ryzen 5 1600 @3.8Ghz
Sapphire Nitro+ RX480 @1.4Ghz
---------------------------------------------
Nokia 8 - Snapdragon 835
Find all posts by this user
Quote this message in a reply
05-11-2015, 06:14 PM (This post was last modified: 05-11-2015 06:29 PM by vitality19.)
Post: #14
RE: What's with the ARM JIT for PPSSPP Why Is It Terrible?
(05-11-2015 03:27 PM)tiktakt0w Wrote:  I mentioned the G6430 because although it's new and much faster than previous iterations, poor alpha testing can still be observed with this gpu (Just like with older powervr models). It might due to the fact that Power VR gpu's are using TBDR (Unkown Brackets seemed to agree with this one). TBDR though, is a non issue outside of PPSSPP.

Oh, I should have known this, there's this workaround option to disable alpha testing for power vr devices, how foolish of me. That's why I chose mali even though power vr 544 mp must be more powerful than mali 400 mp2.

(05-11-2015 03:27 PM)tiktakt0w Wrote:  The galaxy s3/s2 which I've tested has the MP4 variant though.

And could you tell me the results you got with these two phones? I'm interested to know to what degree mp4 is better than mp2 with PPSSPP.

Samsung Captivate, Android 2.3.5 SAUROM, Corn Kernel v701
Fly Evo Chic 3, Android 4.4.2 Stock, improved stock kernel
Find all posts by this user
Quote this message in a reply
05-11-2015, 09:43 PM (This post was last modified: 05-11-2015 10:03 PM by Teancum.)
Post: #15
RE: What's with the ARM JIT for PPSSPP Why Is It Terrible?
I've been looking at a new Smart TV computer, and the Rockchip RK3288 Cortex A17 (ad says the quad core is running at 1.7ghz) devices have the Mali T764 GPU. Will that give me stronger performance? I know a lot of guys are looking at tablets or phones, but I'm focused on getting a performance Android set-top box
Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump: