docs: add an AI development skill for performance work and game reverse engineering (reference) #939
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!939
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/939/head"
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?
@chenxiao07 on GitHub · 2026-09-30 07:01 UTC · original
chenxiao07:docs/ai-optimization-skill→main· +373 −0 · 4 files · 1 commits · closed without mergingReference material: this does not have to be merged.
This PR adds documentation only: a Claude Code skill in
.claude/skills/ps5-emu-optimization/(four Markdown files, no code or build changes). It condenses what I learned while pushing Demon's Souls (PPSA01341) further on my fork with heavy AI assistance, as a follow-up to my earlier reference PR #599. On that branch and one machine (i9-14900K, RTX 5090, 2560x1440) the game went from about 21 fps to about 40 fps at a fixed spot (about 39 fps on average along a moving route), and multi-second shader stalls went away.What is in the skill
SKILL.md: where the time goes in an HLE PS5 emulator (the single thread that translates the graphics queue, per-dispatch fixed costs, guest-memory coherence, stutter as a separate problem); a measure-first method (a fixed scene, profiles symbolized with the exact build, a causal delay probe before any "saves X ms" claim, the upper bound first, a switch with a verify mode, same-process A/B, broad correctness checks, then keep or delete); rules that saved time; directions ranked by measured evidence; recurring bug classes.references/lessons.md: measured wins and failed ideas with numbers and reasons, so the failures are not retried blindly.references/measurement.md: benchmark harness, A/B protocol, noise levels, what counts as proof.references/reverse-engineering.md: guest address model, live disassembly, shader bundle and AGC header layout, game patches, crash triage.How it can be used
In
.claude/skills/, Claude Code picks it up automatically when someone asks for performance work, a benchmark or a crash investigation in this repository; people and other AI tools can read it as plain Markdown. Please feel free to move it (for example underdocs/), edit it, or just keep it as a reference and close this PR. My hope is to contribute to the project through AI-assisted development in a form that is useful to other contributors.Source code
The code behind these notes is on my personal branch: https://github.com/chenxiao07/KytyPS5/tree/experiment/perf-40fps-20260926 (an earlier snapshot is #599). It is a large, heavily AI-assisted branch on an older upstream base, and the
KYTY_*switches and scripts the skill mentions live there. With AI tools it may well be faster to reimplement an idea against current main than to port the code, but if any part helps, please cherry-pick or copy freely. I'd be glad if it is useful.AI assistance
The skill was drafted with Claude (Claude Code) from that branch's git history, experiment log and tooling; I directed the work and the experiments it summarizes. The numbers come from one machine and one game, so treat them as orders of magnitude.
@coderabbitai[bot] on GitHub · 2026-09-30 07:06 UTC · original
Navigate logical layers of code changes, visualize relationships, and explore their blast radius.
📝 Walkthrough
Walkthrough
Adds a PS5 emulator optimization skill and three reference guides. The material describes performance categories, measurement and verification procedures, reported optimization results, reverse-engineering workflows, and crash triage. It also documents unsuccessful approaches, recurring bug classes, and operational safeguards.
Priority: ⬇️ Low
Change: Other
Merge Risk: 🔵 Low · up to
aaa9eThe profiling guidance may misattribute callers and skew hot-function analysis, but this is limited to diagnostics and does not affect emulator runtime.
Architecture Summary
Architecture risk: 🔵 Low · up to
aaa9eThe changed surface does not map to a changed system, dependency edge, entrypoint, or external dependency.
Changed systems: None identified.
Architecture concerns
No architecture-level concerns identified.
Review details
Before / after behavior
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
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.@ -0,0 +20,4 @@`--regions` (executable regions), `--xref <addr>` (scan for rip-relative disp32 that resolve to thetarget; try instruction tails of +4/+5/+8).- Sample guest threads with pc + callers (the word at rsp is the likely caller: guest code has nounwind info) and bucket by 64-byte granule to find hot guest functions.@coderabbitai[bot] on GitHub · 2026-09-30 07:06 UTC · original
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
🔎 Supported by static analysis
🏁 Script executed:
Repository: KytyPS5/KytyPS5
Length of output: 3013
🏁 Script executed:
Repository: KytyPS5/KytyPS5
Length of output: 32224
🤖 get_repo_knowledge executed:
get_repo_knowledge KytyPS5/KytyPS5 /tmp/coderabbit-repo-knowledge/kytyps5-kytyps5-b6cddd0b/architectureLength of output: 18677
🏁 Script executed:
Repository: KytyPS5/KytyPS5
Length of output: 26588
Label
[rsp]as a heuristic caller candidate.After a guest function prologue adjusts
rsp,[rsp]can contain saved frame data or locals instead of the return address. Use a frame-pointer or unwind walk where available. Otherwise, validate stack-scanned candidates and describe the result as heuristic.Suggested fix
📝 Committable suggestion
@coderabbitai[bot] on GitHub · 2026-09-30 07:06 UTC · original · reviewed
Actionable comments posted: 1
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository: KytyPS5/KytyPS5/.coderabbit.yaml
Review profile: CHILL
Plan: Advanced
Run ID:
cd30f20b-7e1e-4213-8989-d6ef1afe626c📥 Commits
Reviewing files that changed from the base of the PR and between
05057c9441andaaa9e7cc75.📒 Files selected for processing (4)
.claude/skills/ps5-emu-optimization/SKILL.md.claude/skills/ps5-emu-optimization/references/lessons.md.claude/skills/ps5-emu-optimization/references/measurement.md.claude/skills/ps5-emu-optimization/references/reverse-engineering.mdIncluded review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 7 remain after this review.
Pull request closed