Post Reply 
 
Thread Rating:
  • 3 Votes - 3.67 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Super Robot Wars Operation Extend
04-16-2014, 07:45 AM (This post was last modified: 06-23-2014 09:36 PM by LunaMoo.)
Post: #83
RE: Super Robot Wars Operation Extend
The heaviness in that game still bugs me as I hate to waste power when it doesn't feel necessary so I tested a few stuff, it happens mostly when selecting some of the units, including enemies, but not all, the only thing happening in the log then is creation of a new thread which was showing only once, however. Debug statistics shown the most active syscall all the time is sceKernelWaitSema and it get's multiplied by like 4 times during that extra heaviness.

With my limiting understanding this wait was just an empty load, so I go to that function and divided the wait by 4 basically changing:
Code:
int result = __KernelWaitSema(id, wantedCount, timeoutPtr, false);
to
Code:
int result = __KernelWaitSema(id, wantedCount/4, timeoutPtr, false);
A bucket of cold water - the game didn't boot thanks to failure with thread creation I made xD, however to my suprise when I loaded a savestate in-game the heavy moments were working as fast as the light ones were running before and everything else was lighter by 4 times as well.

I thought I found the culprit and instead of dividing the variable I wanted to cap it at some reasonable value, however even capping it to 1 didn't worked and from what I checked the wantedCount is actually always 1 in the first place. So basically I was just setting it to 0 and cut of some threads because of that.

I printed that function to test stuff and normally it's:
Code:
58:03:523 AnimeThread  W[KERNEL]: HLE\sceKernelSemaphore.cpp:411 00000000=sceKernelWaitSema(317, 1, 0)
58:03:523 MemPoolFreeT W[KERNEL]: HLE\sceKernelSemaphore.cpp:411 00000000=sceKernelWaitSema(317, 1, 0)
58:03:523 AnimeThread  W[KERNEL]: HLE\sceKernelSemaphore.cpp:411 00000000=sceKernelWaitSema(317, 1, 0)
58:03:523 MemPoolFreeT W[KERNEL]: HLE\sceKernelSemaphore.cpp:411 00000000=sceKernelWaitSema(317, 1, 0)
basically creating small ui image and freeing it constantly over and over again.

When I do set it to 0 it seems to only create the image:
Code:
56:05:651 AnimeThread  W[KERNEL]: HLE\sceKernelSemaphore.cpp:412 800201bd=sceKernelWaitSema(317, 0, 0)
56:05:651 AnimeThread  W[KERNEL]: HLE\sceKernelSemaphore.cpp:412 800201bd=sceKernelWaitSema(317, 0, 0)
56:05:651 AnimeThread  W[KERNEL]: HLE\sceKernelSemaphore.cpp:412 800201bd=sceKernelWaitSema(317, 0, 0)
56:05:651 AnimeThread  W[KERNEL]: HLE\sceKernelSemaphore.cpp:412 800201bd=sceKernelWaitSema(317, 0, 0)
possibly resulting in memory leak didn't really noticed, but also decreasing thread creation count which made the game much ligher.

Looking at the timestamps when printing this in the log, the game is really spammy with those two threads creation, it does it way more often than it should, GOW hack for fps didn't helped in this case at all, maybe because it already lags with just thread creation not the actual graphics or simply GOW hack fails totally here since it's 30fps game, not sure, it might be something else than GOW hack affects in the first place. My accident 4x speedup was still leaving the game spamming the thread way more than it should, so this game actually might actually be really light with a proper hack or fix. Don't really have much ideas how to do that myself through.

Blah this really feels like yet another proof that japanese game developers are lazy/suck at coding and depend too much on the hardware limitations. ;c


==================================================

Edit that might make some people happy:
Based on my findings above, I made an experimental speedhack for this game and now improved it, so another edit to clean up this post, anyway this doesn't require any coding tools or anything, it's just a simple cw cheat:
Code:
//warning: this is only for v1.08 jp, as far as I searched there are no english patches obtainable in legal way(through patches) yet, and I'll not be porting this to any weird, outdated-prepatched-pirated iso's flying around the net which some people here might have, please don't even ask me about it.
_C1 Speedhack v2
_L 0x200A56C8 0x00000000
_L 0x200A56A0 0x00000000
_L 0x200A5714 0x00000000
You'll have to restart emulation after activating this cheat/basically have it activated from the start, then load/start the game normally without using savestates. (You can use them later on ofc, just don't load any which were made before activating the cheat and restarting emulation as speedhack activated in-game, doesn't really give as much as it can.)

This cheat will boost the game speed by removing a few heavy functions which doesn't seem to have any actual use in the game other than making it much heavier than it should be(at least on ppsspp), counting the first version of this I tested this speedhack quite a lot already playing through few chapters in the game, often testing max speed going over 5 times what it previously was and in some moments where those removed functions were the only heavy thing even more. Suprisingly it doesn't cause any side effects, ofc there are some glitchy graphics in this game during battle animations, but this is not caused by the speedhack, it looks same in official version ~ just mentioning in case someone will actually play it for the first time with the speedhackTongue.

As far as I can tell it's completely free speedup. I'm not really sure why nothing I tried get's broken by this, but since it works soo well, I'm not gonna bother trying to figure out anymore. I think as long as the speedhack will work same way on arm, this game will be playable on mobiles now.Smile

Edit: The huge slowdown was fixed on latest version of ppsspp when this pull request was mergedSmile still leaving the speedhack here as while it's not needed anymore, still cuts cpu requirements by half in some places, might be usefull at least for android devices maybe not soo much for speed since people there are mostly limited by gpu, but at least for longer battery lifeSmile.

http://forums.ppsspp.org/showthread.php?tid=6594 - Custom PPSSPP Shaders!
http://forums.ppsspp.org/showthread.php?tid=3590&pid=117172#pid117172 - simple CE scripts to help creating CWCheats,
https://github.com/LunaMoo/PPSSPP_workarounds - CWCheat workarounds.
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Super Robot Wars Operation Extend - LunaMoo - 04-16-2014 07:45 AM

Forum Jump: