Status Update & Saints Row 2? - March 2021
Added 2021-04-02 18:47:51 +0000 UTCHello! March was a rather busy month, as I managed to submit plenty of random contributions this time. No new SilentPatches were released, but since I am now playing through Yakuza 6 (and I'm enjoying it) it might change this month.
Without further ado, let's proceed to the list of things I made this month - and, even though it technically didn't happen I want to briefly clarify what exactly happened with Saints Row 2 on April Fools.
DuckStation
- Misc Qt stuff - another round of relatively boring fixes. I fixed a few minor UI issues and hooked up plurality wherever possible. What this means for the end-user is that proper plural/singular forms are now used in the GUI, including proper forms for languages that have more than one plural form (e.g. Polish).
- Update PL localization + fixes - a monthly translation pass with a few code fixes required to get the translation to work properly.
- Fix quick menu exit - recently, DuckStation added a "Quick Menu" as a part of the native UI, which essentially acts as an emulator's pause menu. However, attempting to bind this menu to Escape resulted in a range of issues. This PR fixes them.
- Achievements Login: Lock "Login" button if credentials are not entered - PR title explains it all :)
- Plurality for non-Qt messages - Part 2 of my plurality changes, setting them up for strings not controlled by Qt. With this PR merged, all strings requiring plurality (that I am aware of) use it properly.
Dolphin
- Fix shortcut creation - when I tried to create a desktop shortcut for a game called Kao the Kangaroo: Round 2, I noticed the shortcut wouldn't create as the semicolon character is not a valid file name character in Windows! I fixed that issue by deleting "illegal" characters from the shortcut name.
- WASAPI code improvements - my complete refactor of Dolphin's WASAPI backend. What makes this entry notable is that I first submitted this PR in... August 2019! It was finally merged on March 11, 2021.
Cxbx-Reloaded
- Fix XeUnloadSection erroneously zeroing memory - a PR fixing an error when unloading code sections dynamically at runtime. Zeroing the unloaded section was not accurate to the real Xbox behaviour and caused crashes inside BINK's code. Fixes Apex/Racing Evoluzione crashing before menus.
- Fix partition formatting & Further improve partition path functions - two PRs improving a previously glitched partition formatting feature. A bug in the directory removal code resulted in random failures and/or crashes, effectively requiring the user to keep trying to boot the game until it managed to wipe the entire directory.
- Vertex buffer cache improvements - further improvements to the vertex cache code. Dramatically improved performance in Group S Challenge (again).
- Use Win10 CPU Sets API where supported - this PR replaces (or rather, augments) the old affinity-based code pinning game threads to one CPU core with a new approach, based on the Windows 10-only CPU Sets functionality. Unlike thread affinities, CPU Sets allow us to reserve an entire physical core to the game threads and it ensures that threads not created by Cxbx-R (e.g. drivers/worker threads) will not steal time from that core either. On older Windows versions, the old affinity-based approach is still used.
PCSX2
- USB: Improve Force Feedback test so it doesn't block UI - PR fixing the last issue from a meta-issue I created a few months ago. I modified the FFB Test functionality to use timers instead of blocking the UI, so the interface remains responsive.
Saints Row 2?
Earlier yesterday, I came up with an excellent April Fools idea and tweeted a fake "framerate comparison" image from Saints Row 2. I've had my eyes on the upcoming official SR2 patch for a while and I wanted to see myself how bad the original PC port truly is. As you can see, it performs rather horrendously.
But then I got to think - what makes it run so badly? I haven't found any meaningful documentation on this, so I decided to take a quick look, and much to my surprise the game stressed out neither the CPU nor the GPU too much. Additionally, I heard framerates vary wildly depending on the PC configuration, and so I came up with a theory - could it be the game idling more than needed, as poorly made ports sometimes tend to? To verify this, I removed all Sleep calls in the game, and then...
This happened. Framerates doubled, and CPU usage spiked to 100% across all threads! This is enough proof that the game is inconsiderate about its thread scheduling and seems to rely on sleeping everywhere, as opposed to using proper synchronization primitives where needed.
That said, this will not evolve into a SilentPatch. I've been trying to reach out to IdolNinja and Volition in regards to the official patch for a while, and shortly after sending out this tweet I finally managed to get in touch. I've been informed that contrary to the popular belief, more than two people work on this project, as several programmers have been contracted, including an SR1 engine programmer. I approached thinking I'd be able to help out with the project, but now knowing they onboarded more people, I can safely say the project is in good hands. I'm looking forward to dissecting it after it's been released!
What's next?
- Yakuza 6 released recently, and it seems to be a far better port than 3/4/5, but it still has a few issues. I will be looking into those after I'm done with the story.
- Additionally, Yakuza 6 and Yakuza: LAD ship a full arcade version of Virtua Fighter 5 as a separate DLL! I'm extremely curious if it's possible to get it to run standalone, as that would be almost equivalent to a native PC port.