emulator: enable red zone protection for Call of Duty: Black Ops II (#1752) #2431
No reviewers
Labels
No labels
bug
documentation
duplicate
enhancement
GPU
GUI
help wanted
question
Shaders
Video
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/KytyPS5--KytyPS5!2431
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-2431"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@HarrySpruce on GitHub · 2026-11-19 23:09 UTC · original
HarrySpruce:redzone-bo2→main· +29 −0 · 3 files · 1 commits · openBug: In Call of Duty: Black Ops II (PPSA34502) on Windows, every animated character explodes into spikes, in the menu background and in game (#1752).
--redzonefixes it, but nothing tells a user that this setting is the fix for this game.Cause (root-cause details in #1752): BO2 skins on the CPU. The 2-, 3- and 4-weight blend functions in eboot.bin (
0x9006780e0,0x9006785b0,0x900678af0) keep a1.0f x4vector and a mask belowrsp. Their output stores land on GPU-tracked pages, and Windows builds the exception frame for each tracking fault on the guest stack, overwriting those slots. I confirmed this with register and stack dumps taken at the faulting stores:[rsp-0x20]held zeros instead of1.0f x4.Change: a small Windows-only list of titles that need red zone protection, checked right after the title ID is read and before the ELF is loaded. When the running title is on the list and protection is off, it is turned on and the log says
Red zone protection enabled: required by PPSA34502. The default for every other title is unchanged, so this does not reopen the auto-on question from #1421. I have only listed the title I verified. Other reports (GTA V, Demon's Souls, Stray, ...) could be added the same way.Tested: Windows 11, i5-13600KF, RTX 4070, build
5ad27cdplus this change, launched without--redzone:The patching counts match a run with
--redzone, which renders the characters correctly in the menu and in game.AI-assisted: yes (diagnosis, code and description).
🤖 Generated with Claude Code
@coderabbitai[bot] on GitHub · 2026-11-19 23:14 UTC · original
No actionable comments were generated in the recent review.
Walkthrough
On Windows, the emulator checks the resolved title ID and enables red-zone protection when the title is PPSA34502 and protection is disabled. The configuration API sets the red-zone protection flag to true. Other platforms do not invoke the title-specific check.
Suggested reviewers:
nmzik,pipe530Change: Bug fix
Merge Risk:
Minimal · up to
b015dThis change automatically enables red-zone protection on Windows for Call of Duty: Black Ops II so that characters render correctly. Other titles and platforms are unaffected. No merge-blocking risk was identified.
Pre-merge checks:
4
Full details: Title check
Explanation
The title names the emulator, the feature (red zone protection), and the target game (Call of Duty: Black Ops II), which matches the main change: a Windows-only list that auto-enables red zone protection for PPSA34502. It is specific and conveys the primary change. Minor note: the title is 75 characters, which is acceptable but slightly long.
Full details: Description check
Explanation
The description is directly related to the changeset. It explains the bug (spiking animated characters in Call of Duty: Black Ops II on Windows), the root cause, the Windows-only title list that enables red zone protection for PPSA34502, the default behavior for other titles, and the testing performed. It matches the code changes in emulatorConfig and emulator.cpp.
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
Share
ac35b444-9299-49de-a72d-f407f0f0164dReviewing files that changed from the base of the PR and between
861b07b8bbandb015db65a6.src/common/emulatorConfig.cppsrc/common/emulatorConfig.hsrc/emulator.cppIncluded review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.