Previous Post

Status update from Nekotekina (2020-02-09)

Next Post
no preview
DESCRIPTION

Hello everyone,

Extremely sorry for the long delay since the last report. I've been working on various things but finding time to write about it is something I always fail to do.

Here are the changes I’ve made to the emulator since the last Patreon Report:

https://github.com/RPCS3/rpcs3/pull/6960 – This fixed a bug on RPCS3’s VFS (Virtual File System) reported by elad where clearing SysCache wasn’t working properly on Windows. We both worked on these functions, the root of the problem is that most unix systems (but not Windows) allow to remove opened files and it is still accessible, and only actually deleted once closed. On Windows, this is typically worked around by moving the file out of sight, simulating its deletion, and setting a flag to delete on close. This works well, but needs to take into account the directories which may be not empty based on such file remnants.

https://github.com/RPCS3/rpcs3/pull/6961 – Fixed network share locations on Windows. Its breakage was a side effect of long path support on windows, which uses a special-weird path format. Now I *hope* everything is OK. Also some other maintenance commits (mostly exception removal as I said in previous post that I was targeting removing exception from RPCS3).

https://github.com/RPCS3/rpcs3/pull/6969 — Make /dev_hdd1 (system cache) behaviour according to elad's tests. For instance, mounted cache persists after game launcher exec, fixing some games.

https://github.com/RPCS3/rpcs3/pull/6973 – Allow SSSE3 to be used in the AppImages in more cases, because a better workaround was found instead of just abandoning support of the newer instructions. The new workaround allows both old processors to run the code and newer processors to make use of instruction extensions like SSSE3.

https://github.com/RPCS3/rpcs3/pull/6982 – Before SPU LLVM compilation was moved to a separate thread, it made the SPU compilation process a lot smoother during gameplay, and also faster during boot-up time. This PR adds an SPU profiler (similar to already existing one) in that thread to figure out which functions to compile first. In some games, it allows smoother experience.

https://github.com/RPCS3/rpcs3/pull/6991 – Works around an LLVM bug that caused LLVM code on Zen 2 CPUs to be compiled for Zen 1 CPUs instead, not taking advantage of LLVM specific Zen 2 optimizations. This bug has now been fixed in LLVM itself (https://github.com/llvm/llvm-project/commit/ff75bf6ac93a9ef5a7d41f7645e02fde3e968ce1). 

https://github.com/RPCS3/rpcs3/pull/7005 – Fixed a slowdown originating from a bug investigated and reported by Niram7777. It was my mistake in not reading the API properly and also choosing wrong names for branch patchpoints, causing them to conflict and be deactivated, resulting in performance loss.

https://github.com/RPCS3/rpcs3/pull/7029 – Internal refactoring of SPU code. Although this doesn’t change anything for the end user, it has minor multiplication optimization for SPU by detecting 32-bit multiplication pattern (mpy32).

https://github.com/RPCS3/rpcs3/pull/7036 + https://github.com/RPCS3/rpcs3/pull/7040 + https://github.com/RPCS3/rpcs3/pull/7047 + https://github.com/RPCS3/rpcs3/pull/7052 + https://github.com/RPCS3/rpcs3/pull/7061 + https://github.com/RPCS3/rpcs3/pull/7065 – Cleans up old style C casts, replacing them for C++ casts on the entire RPCS3 codebase. The project is now compiled with a flag that throws an error during compilation if an old style C cast is used. C casts in C++ exist for backward compatibility with C/C++ subset, but also allow abominations when combined with some C++ features.

https://github.com/RPCS3/rpcs3/pull/7086 — warning cleanup and failed attempt to fix Intel Cascade Lake CPU errors.

https://github.com/RPCS3/rpcs3/pull/7088 – Finally fixes LLVM compilation on Intel Cascade Lake CPUs.

https://github.com/RPCS3/rpcs3/pull/7118 – Uses the FMA (fused multiply-add) Instruction Set with approximate xfloat on SPU LLVM when possible, improving performance and accuracy for modern processors.

https://github.com/RPCS3/rpcs3/pull/7128+ https://github.com/RPCS3/rpcs3/pull/7150 – Maintenance for sys_net changes which made use of WSAPoll. This function is too Special on Windows, so it needs careful checks for its arguments before it can be used.

https://github.com/RPCS3/rpcs3/pull/7142 – Implements PPU cache gz compression in order to save storage space for PPU recompiled code on cache. Old cache is not compressed, and is loaded as a form of backward compatibility and developer assist feature.

https://github.com/RPCS3/rpcs3/pull/7169 — Update ffmpeg to different fork which may be easier to maintain.

https://github.com/RPCS3/rpcs3/pull/7192 – Since a lot of people were not updating their MS C++ Redistributable to the 2019 version, and it’s not really needed for RPCS3 as long as you have the 2017 one installed, I’ve removed the need for having the most recent vcruntime library from the 2019 redistributable (with vcruntime140_1.dll one), allowing RPCS3 to use the existing 2017 runtime.

https://github.com/RPCS3/rpcs3/pull/7197 — Normalize internal VFS paths which can be read by cellFsGetPath function (so //dev_hdd0//./ becomes just /dev_hdd0/). Later tests showed it really happens that way.

https://github.com/RPCS3/rpcs3/pull/7199 — Added some support for mountpoint detection. On a PS3, a mountpoint is typically a first component of the path, like /dev_hdd0 or /dev_hdd1. Different mountpoints are typically different devices so they need different treatment. Like, you cannot just simply write files on Blu-Ray. It was a long time TODO.

https://github.com/RPCS3/rpcs3/pull/7208 — I wrote several software tests to check how the filesystem works on PS3 and made some minor adjustments accordingly. There are few more PRs that fix regressions and improve accuracy of various VFS areas.

https://github.com/RPCS3/rpcs3/pull/7281 — Along with sys_fs fixups, contains new experimental (unused at moment) API for atomic shared pointers. Standard (std) shared pointers properly support atomicity in C++20 and there is no guarantee of quality (lock-free) implementation even after C++20 is implemented, so I decided to write a simpler but reliable alternative.

https://github.com/RPCS3/rpcs3/pull/7229 — This continues my adventure with sys_fs, along with software testing (usually called hardware testing). I figured out that PS3 doesn't allow free space check from an arbitrary path (like Linux can, for example), and truncates it to the mountpoint. It simplifies things on Windows where long NTFS path support is missing an old 257 character path long is still in place. For example, on PS3 max path is 1023 characters, but we only need the mountpoint root to fit in 257 characters on Windows in order to be safe, which usually isn't a problem.

https://github.com/RPCS3/rpcs3/pull/7293 – Minor fixup for Megamouse's work of hot-changing config entries. Still WIP.

https://github.com/RPCS3/rpcs3/pull/7297+ https://github.com/RPCS3/rpcs3/pull/7299 – Properly support 0x0 opcode on SPU. The thing about it is that blank (zero) memory on SPU corresponds to a STOP instruction (which is also a "syscall" instruction by its usage). Since recompilers use zero check to detect whitespace, code with zero stop instruction cannot be compiled properly and needs special handling. I now added this handling for my own test, although I doubt it affected any game in the wild.

https://github.com/RPCS3/rpcs3/pull/7341 — This PR is mostly internal logging system maintenance. Fixes an old-style macro logging into a more modern style. Also allows all available log channels to be registered at startup, allowing the possibility to show them in the GUI to disable particular channels.

https://github.com/RPCS3/rpcs3/pull/7442 – Fat atomics are atomics fused with small mutex, occupying only 2 bits. It's not used anywhere and I haven't decided yet.

https://github.com/RPCS3/rpcs3/pull/7381 – This disables a buggy LLVM optimization that was causing a severe memory leak in some games such as Guitar Hero 5 when using SPU LLVM.

https://github.com/RPCS3/rpcs3/pull/7394 — Start switching to C++20 by allowing it to compile (it's not fully backward compatible with C++17).

https://github.com/RPCS3/rpcs3/pull/7399 — Use another C++20 feature [[likely]] and [[unlikely]] (already implemented in gcc 9) instead of ugly macro. Even though C++20 is not yet released, we can already take advantage of a few features that are already implemented on all mainstream compilers, such as new char type char8_t for UTF-8 support, or soon std::is_constant_evaluated.

Now I'll try to finish the initial C++20 transition, if it can be called like this, and merge some PRs. Further plans include great recompiler improvements, sys_net investigation.

Stay tuned for my next report.

Thanks for the support,

Nekotekina

Nekotekina PATREON 7 favs
VIEWS1
FILES1 file
POSTEDFeb 9, 2020
ARCHIVEDJun 10, 2026