Voice-language config: opt-in console fallback, and stop the title on a bad config #1
No reviewers
Labels
No labels
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
gh-drakmor/pgo_stub!1
Loading…
Reference in a new issue
No description provided.
Delete branch "sparky3387/main"
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?
Rewritten after your review comment about the console language. The concern was right, so the console language is no longer used unless the config asks for it.
Default behaviour is byte-identical to 0.5 and console-independent. With no fourth config line, the installed and supported language sets are both the line 3 set,
sceSystemServiceParamGetIntis not called at all, and two consoles running the same package report the same masks. There is nothing left that can work on one console and not another by default.Language configuration
scePlayGoGetLanguageMask). Accepts names, a0x...mask, orall.0) — when1, the console's current system language is added to the supported set only (scePlayGoGetSupportedOptionalChunk). It is never added to the installed set. This is for engines that gate their own voice fallback on the supported list and treat a language that is neither installed nor supported as an error rather than a cue to fall back.The effective setting is written to the log as
console_language_fallback=, so a bug report identifies which mode a run used.Language-mask validation is unchanged from 0.5 —
SetLanguageMask,PrefetchOptionalChunk,RequestOptionalChunkandGetRequiredDiscstill reject masks outside the supported set withBAD_LANG_CONFIGURATION.Config errors stop the title
A line that is present and cannot be parsed no longer falls back to a default. Every value in this file changes what the stub reports, so a silent fallback means a title running on settings its author did not choose — the default 1000 chunks instead of the real layout, or every language reported as installed — which surfaces much later as a bug nobody can attribute.
Instead the stub shows a notification naming the line and the text that failed (
playgo_stub.dat line 3: "englsh_us" is not a language name), counts down 12 seconds, and closes the title.How the stop works, and what it costs. A title cannot reach
sceSystemServiceLoadExecfrom inside a module, so the IPMI request that export makes is reproduced: connect toSceLncService, invoke its LoadExec command. ShellCore kills the caller the moment it accepts, before it tries to launch anything, so the stop does not depend on the replacement process starting. The path passed is the config file itself — non-empty is all LoadExec requires, it is guaranteed to exist on this path, and it can never be spawned, so an accepted handover cannot become a relaunch loop.libSceIpmi, so the existing libSceLibcInternal stub generator gained a second table for the two IPMI entry points.libSceIpmi.prxto the module's NEEDED list, which the firmwarelibScePlayGo.prxdoes not have. The imports are weak with a NULL guard, so a substitute libSceIpmi that exports a different symbol set degrades instead of making the module unloadable..bssgrows by 62 KB (0x7f190→0x8e9a0) for the IPMI client storage, sized as the firmware sizes its own.scePlayGoInitializereturnsBAD_LANG_CONFIGURATION's siblingSCE_PLAYGO_ERROR_FATALrather than reporting settings nobody chose.exit()is not used anywhere.A missing file, or a missing line, is still not an error.
Config file comments
#starts a comment, and a blank or comment-only line does not consume one of the numbered lines, so values can be annotated without shifting what the following lines mean.This is a behaviour change for existing files. 0.5 tightened the parsers to reject trailing text, which silently broke the annotated
playgo_stub.dat.exampleshipped since 0.3 — used verbatim it parses as 1000 chunks and all languages, not80andenglish_us,french,german. Anyone whose.datstill carries those<---- number of chunksannotations gets a stopped title on the next launch rather than the wrong config they have been getting silently. The example is fixed and now uses#.Also included
Housekeeping for things 0.5 changed without meaning to: the
PS5in the README title and theBased on https://github.com/shadps4-emu/...attribution line are restored, the mixed line endings 0.5 introduced inlibrary.cpp,prx.vcxprojandlibScePlayGo.slnare normalised back to CRLF, andprx.vcxproj.useris untracked with a.gitignoreadded. Happy to split these into their own commit if you would rather review them separately. No version bump — that is your call.Testing
Built with the Prospero toolchain; dependency set unchanged apart from
libSceIpmi. Exercised on a real title (Spider-Man Remastered, whose dump shipssoundbank/wemsets for twelve languages with no en-GB among them): on an English (UK) console the stub reports en-GB supported but not installed, and the title falls back to its US English voice instead of playing silence. Config-error paths were tested against each of the four lines, including a deliberate typo run on hardware.Summary by CodeRabbit
New Features
all, comments, and blank lines in configuration files.Bug Fixes
Documentation
No actionable comments were generated in the recent review. 🎉
ℹ️ Recent review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Team
Run ID:
8bba9798-10ec-4268-a1b5-57146fbccdc3📥 Commits
Reviewing files that changed from the base of the PR and between
ab789816eeandf634fbe1bb.📒 Files selected for processing (1)
library.cpp🚧 Files skipped from review as they are similar to previous changes (1)
Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review.
📝 Walkthrough
Walkthrough
This PR adds console-language fallback, stricter PlayGo configuration parsing, fatal configuration handling with notification and title-stop requests, generated IPMI stubs, and related build and documentation updates.
Changes
PlayGo configuration and build integration
library.h,library.cpptools/make_playgo_libc_internal_stub.py,prx.vcxproj,libScePlayGo.slnREADME.md,playgo_stub.dat.example.gitignoreEstimated code review effort: 4 (Complex) | ~45 minutes
Merge Risk: ⚪ Minimal · up to
f634fThe configuration parser now rejects signed chunk counts as intended. No current merge-blocking risk is identified.
Sequence Diagram(s)
🚥 Pre-merge checks | ✅ 4 | ❌ 1
❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches
🧪 Generate unit tests (beta)
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
Comment
@coderabbitai helpto get the list of available commands.🧹 Nitpick comments (1)
🤖 Prompt for all review comments with AI agents
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID:
5164c21c-637d-4a6f-b52d-9318ceca1f0a📥 Commits
Reviewing files that changed from the base of the PR and between
b26083f64fand 38e18fb44737568f0f9dac8554b916f45b9f0cf2.📒 Files selected for processing (5)
README.mdlibrary.cpplibrary.hplaygo_stub.dat.exampleprx.vcxprojActionable comments posted: 1
🤖 Prompt for all review comments with AI agents
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Team
Run ID:
fe547c6a-6877-408c-974f-5e3b78b384ac📥 Commits
Reviewing files that changed from the base of the PR and between 38e18fb44737568f0f9dac8554b916f45b9f0cf2 and
ab789816ee.📒 Files selected for processing (8)
.gitignoreREADME.mdlibScePlayGo.slnlibrary.cppplaygo_stub.dat.exampleprx.vcxprojprx.vcxproj.usertools/make_playgo_libc_internal_stub.py💤 Files with no reviewable changes (1)
Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review.
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
A negative chunk count is silently clamped instead of being fatal.
strtoulaccepts a leading-and wraps the result. For a first line of-5,valuebecomes a large unsigned value,end != line,value != 0, and the trailing check passes. Line 447 then clamps it toSCE_PLAYGO_CHUNK_INDEX_MAX, so the stub reports the maximum chunk count and never callspg_config_fatal.This breaks the contract this PR adds.
README.mdline 100 states that a line which is present and wrong stops the title. The scenario-count check at line 758 already rejects negatives through itsvalue > 0xFFFFFFFFulbound, so line 1 is the only inconsistent case.Reject a leading sign before parsing.
🐛 Proposed fix to reject a signed chunk count
📝 Committable suggestion
🤖 Prompt for AI Agents
✅ Addressed in commit
f634fbeView 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.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.