RPCS3 Progress Report: July 2018

综合技术 2018-08-19 阅读原文

This month has seen major improvements to the SPU LLVM recompiler and RSX emulation as well as implementation of new features such as a user manager and a refreshed UI design, among many other improvements and additions.

In addition to the following report, further details of Nekotekina and kd-11’s work during July and upcoming contributions can be found in their weekly reports on Patreon . This month’s Patreon reports are:

Status update from kd-11 (2018-07-05)

Status update from Nekotekina (2018-07-12)

Status update from kd-11 (2018-07-21)

Status update from Nekotekina (2018-07-30)

Table of Contents

On Git statistics, there have been 8 047 lines of code added and 4 671 removed through 135 commits by 12 authors.

Major RPCS3 Improvements

Asynchronous Shader Recompilation ( #4876 )

This month saw the implementation of Async shader recompilation by kd-11. An in-depth look into what this is and how it helps the emulator can be read at the blog posthere. To see a visual demonstration of how it improved the emulator, check out this video:

Vertex Program Decompiler and Analyzer Improvements ( #4844 )

While the async shader compiler was arguably the most notable improvement kd made this month, it wasn’t his first nor his only important batch of changes. At the very first week of July, he made major improvements to the vertex program decompiler and analyzer, resulting in more compact shaders and a decrease in the total number of shaders generated.

This change greatly improved titles where the shader compilation was prevalent and was the bottleneck, or where shader caches were unrealistically blown-up. Many indirect issues were caused by these, like games crashing due to being stalled for too long, or screen flickering due to the vast amount of cached shaders. With this, not only cache loading times, but also the compilation times have shortened, which, in combination with the async shader compiler that followed all this, means that shaders pose much less of an issue now to the end user than they used to.

These changes also meant that games which used to be crippled by shader compilation issues now fare much better, with some even changing categories:

Watch Dogs went from Intro to Ingame!

TMNT: Turtles In Time Re-Shelled improved dramatically!

And last but not least, these improvements got Sonic: Unleashed, Bleach: Soul Resurrección, Resistance 2 & 3 (with 2 getting it’s regression fixed) and Ratchet & Clank: A Crack In Time ingame! For further details, see them at thesection later down below.

SPU LLVM Improvements ( #4816 )

This month, Nekotekina brought us some significant improvements to the SPU LLVM recompiler. As he mentioned in his first Patreon post , compilation speed was (and is relatively still) a major issue. To alleviate this to some extent, among the many code simplifications, refactors, fixes, pattern detection and general analyzer improvements, he also switched over to the not yet released LLVM 7, with added modifications in RPCS3’s local fork on top of it. These not only yielded performance improvements, but also managed to further SPU LLVM’s accuracy as well, making titles such as F1 Race Stars, Dragon Ball Z: Burst Limit and SoulCalibur V finally support it.

For a technical explanation on what pattern detection is and how his improvements were made to LLVM, check out Nekotekina’s second Patreon post .

User Manager ( #4300 )

Back in March, mpm11011 opened a pull request with the idea of implementing a user manager into RPCS3. This functionality is present in the PlayStation 3, and allows for multiple users to manage their trophies, save data and PSN games separately on the same device. RPCS3 had support for trophies and save data but this was limited to a single user “00000001”. After 4 months of discussion, with contributions from Megamouse, the user manager was finally merged.

With this new user manager, which can be found at Manage -> User Accounts , users can not only view all existing accounts and their respective IDs but also create, rename, delete and toggle between active users when not ingame. The user manager allows a users to:

– segregate game saves for different users

– unlock trophies for different users

– have PSN games registered to different users

Given that RPCS3 does not support PSN, and probably won’t in the foreseeable future either, this is a pretty close approximation to the multi-user functionality of a real PS3 and a step forward in usability for the emulator. This will enable the same install of the emulator to be used by entirely separate people without risking their saves. So if you share a PC with siblings or other family members who want to play, this is great news for you!

Also, for some games such as Terraria, local split-screen multiplayer required different users to be logged in on the same system. With the implementation of user manager, it is now possible to correctly emulate this game mode. Sadly, even though the user manager works perfectly, graphical issues still prevent this game mode from being playable:

New GUI Design ( #4841 )

This month @DAGINATSUKO and Megamouse worked together to overhaul the RPCS3 GUI to look even better than before! The default hard-coded stylesheet has been replaced by DAGINATSUKO’s own stylesheet. This update brings refreshed icons for the toolbar, gives users the ability to style table items as well as the game grid by adding the object named “game_grid”. Along with these additions, this GUI update fixed certain issues such as the game icons being unnecessarily highlighted when their row was selected and an inaccuracy in the icon repaint method that caused a sub-pixel to be painted in the wrong color.

Also, to reduce complexity of the stylesheets, redundant features, such as the possibility to repaint the toolbar and it’s icons in the menu, were removed. For user who preferred the old look, fret not, the old style is still available in the form of the stylesheet “Classic (Bright)”.

Take a look at these comparative screenshots between the old and new designs:


Sonic Unleashed

Thanks to “Program Fixes” by kd-11 detailed above, Sonic Unleashed, a much loved game from the Sonic franchise, now goes ingame! While it does require a capable CPU to run, RPCS3 can outperform the physical console’s performance in several scenarios with near flawless graphics at 4K! To see just how good it works, check out this video:

Ratchet & Clank Future: A Crack In Time

Once again, due to the aforementioned improvements from kd-11 and “Ugh fix” from isJuhn, this title goes ingame for the first time! However, the game still crashes after a few minutes due to RSX IO memory errors.

Resistance 3

As hinted in previous month’s report, this AAA Playstation 3 exclusive goes ingame with good framerate and graphics. However, the game currently crashes after the initial tutorial area. Check out Resistance 3’s performance ingame in this video:

Bleach: Soul Resurrección

This month the PlayStation 3 exclusive, Bleach: Soul Resurrección, became fully playable. Thanks to the fixes by kd-11, the remaining texture issues were fixed and this title now runs with good performance and graphics.


This fan favorite console exclusive is now finally ingame! It’s worth noting however, that it still suffers from low performance and broken graphic on both renderers (with OpenGL being significantly worse off).

Knights Contract

This console exclusive title is now fully playable!

MotorStorm: Apocalypse

This PlayStation 3 exclusive title now goes ingame. However, this title suffers from low performance and few graphical issues preventing it from being fully playable.

Gundam Crossfire and Dynasty Warriors: Gundam Reborn

This month also saw 2 entries from the Gundam series reaching ingame: Mobile Suit Gundam: Crossfire, a PlayStation 3 exclusive, and Dynasty Warriors: Gundam Reborn, a console exclusive. The only issues remaining are Gundam Reborn being prone to crashes, and Gundam Crossfire suffering from low FPS due to requiring PPU Interpreter (fast) to work, making neither of them Playable just yet.

PixelJunk SideScroller

On the indie front, this fun little PlayStation 3 exclusive title now goes ingame. While this game has stable performance ingame, the menu suffers from graphical glitches that prevent it from being properly readable.


As always, this may not be a complete list of PRs or commits, nor does it necessarily list every single thing done by a given PR. For a full list, see PRs merged in July.


4816 – SPU LLVM improvements, see coverage in major improvements;

4867 – Enable cellSaveData to print SECUREFILE secureId in the log which can help in decrypting savedata; Minor enhancements to SPU and PPU LLVM code; Updating LLVM to address long pause/hang after loading PPU modules.


4844 – Improvements to the RSX vertex program decompiler and analyser, see coverage in major improvements;

4866 – Fixed a regression with OpenGL renderer that was introduced in last month’s “Simple” fix PR;

4869 – Improves vertex textures support by including dimensions other than 2D textures, optimizations for program state tracking and minor analyser enhancements which removes the spurious ‘analyser failed’ errors;

4876 – Implementation of asynchronous shader recompilation, see coverage in major improvements;

4902 – Fixed multi-remapped textures by removing static image-view pairings for regular texture uploads to enable the transition to a multiview format similar to implementation for render targets; Cleanup of OpenGL renderer to negate performance loss after the above async PR and implemented FIFO optimizations. This PR fixed lighting and textures of various titles such as One Piece: Pirate Warriors and Resistance 3 among many others!


4405 – Fixed a bug with different settings profiles; Added a dialog when using the settings dialog to enable the correction of broken settings in the config.yml; Implemented spinboxes for use in settings dialog; Allows the TTY log to auto-scroll similar to the normal log; Handled a fatal error when decrypting selfs and elfs; Use unique rrc capture names with timestamps, maintain a dedicated captures folder and direct the “Open RSX Capture” file dialog there; Added positioning options for the shader compilation hint to config.yml; Added positioning options for the performance overlay under the Emulator tab and color options to config.yml (allowed values are hex color codes in the form of #rrggbb, rrggbb, #rrggbbaa or rrggbbaa);

4531 – Merged the input device dialog into the pad settings dialog. All pads and pad profiles can now be easily configured through the different tabs in the new unified pad settings. Hooray!

4819 – Upgraded Appveyor to use Qt 5.11 on windows builds. Travis is still retained on 5.10;

4831 – Implemented sys_tty_read whereby the Qt TTY log now features an input line that can be used to write directly into the TTY input buffer. The user channel can be changed by right clicking the TTY log. It writes to all channels by default. This can be used to issue debug commands in some games and its addition fixes fatal crashes in games like “American McGee’s Alice”, making them proceed further, some even go ingame for the first time.

4839 – Added “Enable TSX instructions” option to the CPU tab. On older Haswell and Broadwell CPUs this has to be forced if supported and a dialog will warn users about it’s dangers. For all other’s who can use TSX this is a great way of testing games for differences and problems between the two paths; Added “SPU Block Size” to the CPU tab and “Spu Verification”, “Set DAZ and FTZ”, “Accurate GETLLAR”, “Accurate PUTLLUC” to the Debug tab; Moved the “Hook Static Functions” option to the Debug tab;

4841 – New GUI design, see coverage in major improvements;

4858 – Added the same configurable game icon background color to the trophy table that was already used in the game list;

4885 – Handled an upstream bug exclusive to Qt 5.11.1 that led to improperly read native event messages and game window issues. Also, edited the gitignore file to also ignore the TEST12345 folder, as it can be used by some games as well;

4898 – Added functionality for multiple pkg files to be bulk installed properly, as the pkg install dialog will now give two additional options, “Yes to all” and ”No to all” within a single dialog; RSX capture (rrc) files can now be replayed simply by dragging them with the mouse into RPCS3; Added missing tooltip of the new “Disable Async Shaders” option;

4933 – Improved the User Manager added in PR 4300 by fixing issues with the Login Button which was still clickable for logged in users; usernames always having the maximum of 16 characters in the view, leading to trailing whitespace; scanning of the home directory to ensure users with IDs<= 0 are not shown (similar to the PS3); allows renaming of old usernames. Also, added hotkeys such as F2 for Rename User, Delete for Delete User and Enter (or Return) for Login User. 4934 – Fixed minor issues with the new pad settings dialog after PR 4531 where pressing tab or the arrow keys while assigning buttons for keyboard input resulted in switching to the next player or handler instead and also, label sizes of the initial dead zone preview which were not uniform;

4944 – Addressed a regression where the trophy table in the trophy manager would display the wrong game whenever you dragged the mouse to other games while having the left mouse button clicked. Also, fixed an issue where RPCS3 would shut down completely if a rcc file was dropped into it while a game was running;

4946 – Fixes a glitch in the native UI’s save dialog where the title would not display the proper text at random, leading to confusion between saving, loading and deleting of the save games.


4820 – Improved accuracy of a few floating point instruction for SPU and PPU by changing the way values are being negated to have more accurate results;

4882 – Clang compilation fixes which allows RPCS3 to be compiled on more versions of Clang compiler;

4884 – Fixed incorrect values for floating point exception checks in SPU interpreter (precise);

4919 – Fixed inaccurate sum calculation caused by wrong type casts in vaddsws and vadduws instructions for PPU interpreter (precise).


4848 – Fixed a bug in cellSysCacheClear where the function would delete the cache folder itself and few additional quirks around it. This addressed the regressions in Beyond: Two Souls and Heavy Rain, and allowed SSX to go ingame for the first time!

4870 – Fixed a race condition when a barrier type MFC command was issued after an MFC stalled list in the same command tag group;

4881 – Clamps atomic MFC command’s address to a 128 byte boundary. This allows Blades of Time and Star Wars: The Force Unleashed to go ingame for the first time and facilitates future MFC optimizations knowing these MFC transfers are 128 byte aligned;

4903 – Added EFAULT checks in sys_time_get_current_time. This allowed The Sims 3 to reach intros!

4458 – Workaround for issues in HLE libvdec by stubbing unsupported video timebases. This allows few games such as Sonic The Hedgehog to work with default module settings.


4832 – Fixed a bug where cellGameDataCheckCreate2 would overwrite game data in PARAM.SFO with empty data. This addressed failed boots in few games such as Lair;

4855 – PPU analyser optimizations which fixes cases where a game would take over a minute to boot;

4872 – Fix “Not enough space in hard drive” errors which were caused by game developers multiplying amount of free kilobytes by 1024 to reach amount of free bytes in hard drive. Since RPCS3 fakes exactly 40GB, this would result with an overflow, returning a size of 0. By reducing it to 40GB – 1 kilobyte, the overflow result would be very large, and checks won’t fail.


4890 – Fixed an issue relating to Qt deploy for VS builds when the path to the project contains spaces.


4846 – Fixed an issue with the libxcb dynamic libraries, mainly libxcb-dri2.so, which made the Vulkan backend unavailable for users using Mesa version 18.1.1 and greater. This PR simply removes the libxcb dynamic libraries from the AppImage.


4842 – Fixed a bug relating to PPU LLVM introduced in “Kot fixes” PR, which was detailed in last month’s report. This allowed various Insomniac Games titles such as Ratchet & Clank – A Crack in Time, Into The Nexus, All 4 One and QForce; along with Resistance 3 and Fuse to progress further with PPU LLVM.


4430 – Implemented two unsafe memory read and write API functions, sys_dbg_read_process_memory and sys_dbg_write_process_memory, commonly used in homebrew to read and write from, and to protected memory.


4911 – Add a channel map to the PulseAudio backend to fix surround sound functionality.


4300 – Implementation of user manager along with Megamouse, see coverage in major improvements.

Closing Words

If you like in-depth technical reports, early access to information, or you simply want to contribute, consider becoming a patron! All donations are greatly appreciated. RPCS3 now has two full-time coders that greatly benefit from the continued support of over 800 generous patrons.

Also, come check out our YouTube channel and Discord to stay up-to-date with any big news.

This report was written by elad335, HerrHulaHoop, Megamouse, nitrohigito, twdarkeh.




GoSSIP-SJTU/Armariris: 孤挺花(Armariris) — LLVM... Armariris 孤挺花(Armariris) -- 由上海交通大学密码与计算机安全实验室维护的LLVM混淆框架 主要作者:f1ys0ar( https://github.com/flysoar/ ) 中文 孤挺花(Armariris): 基于LLVM的支持多平台多语言的混淆器...
扩展LLVM的Checked C使C语言的空间内存更安全... Checked C是由Microsoft Research组织开发的 开源、合作项目 ,它的目标是扩展C语言,方便程序员写出更为可靠的程序,不会出现类似缓存溢出、越界内存访问以及不正确的类型转换等问题。Checked C的代码可以和标准C代码共存,方便移植。 即将在IEEE...
issue #97: kernel 4.13, TLS, LLVM, Yarn, Vagrant, ... Welcome to cron.weekly issue #97 for Sunday, September 10th, 2017. Last week was an interesting issue, in the time between me writing and sen...
Adding a User Defined Function to Gandiva You’re probably already aware of the recently announced Gandiva Initiative for Apache Arrow , but for those who need a refresher this is the new e...
LLVM Developer Meeting 2016 22 March 2016 I had the pleasure of attending the LLVM Developer Meeting this year in Barcelona. Too much happened to describe it all, so I’ll ju...