Skip to content

feat(cheats): convert community source freezes with ROM revision guards - #1052

Merged
JoeMatt merged 2 commits into
developfrom
codex/community-cheat-import
Oct 20, 2026
Merged

JoeMatt merged 2 commits into
developfrom
codex/community-cheat-import

Conversation

@JoeMatt

@JoeMatt JoeMatt commented Oct 20, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Community cheat authors currently have to rediscover or manually translate their memory freezes. Add an offline converter for a conservative subset of user-authored C cheat sources: grouped constant RAM writes, boolean toggles, and bounded integer loops become ordinary .cht entries. Unsupported operations are reported and omitted only with explicit --allow-partial; no script is compiled or executed.

Generated sets are disabled by default and bound to the supplied cartridge CRC32. The app blocks mismatched, unknown, malformed, or duplicate revision guards, including saved toggles, while preserving legacy unbound files and hardcore gating. Every combination of exported toggles is checked for equivalent final byte writes.

Refs #1050

Sources and limits

Only community-authored source files were used. No BigPEmu binary, SDK header, compiled script, or proprietary bundled script was inspected or used. The community repository has no stated license, so this PR includes neither its scripts nor a converted cheat pack. Committed fixtures are original synthetic sources. A community file crediting third-party bundled-script values was excluded from validation; the README records provenance and boundaries.

Local checks against matching private cartridges at community commit 24211503339a969f8494b8e189b8f2aa0cb9eba6 converted Kasumi Ninja 1/1, Atari Karts 2/3, and Doom 8/8 toggles. Hashes matched. Atari Karts' read/modify/write unlock setting was refused. These are conversion checks, not gameplay certification. RAM-dependent, parameter-valued, persistent, helper-function, and other unsupported behavior still needs manual porting; this is partial coverage of #1050.

Test plan

  • Host core built and full suite passed via DEVELOPER_DIR=/Library/Developer/CommandLineTools make TEST_EXPORTS=1 -j8 test; optional ROM/disc/tool checks explicitly skipped.
  • App and vj_cheats_test built with CMake; all 10 applicable app cheat CTests passed, including save-state/persistence/threaded paths.
  • App unit suite: 317 checks, zero failures. The same new tests against the old parser/manager fail 27 checks.
  • 22 synthetic converter/integration-runner tests pass with both installed pycparser and minimum supported 2.22; dedicated Python 3.10/3.13 CI added.
  • Synthetic source → .cht → actual app RAM: enabled writes succeed, disabled control stays unchanged, wrong revision refuses activation, and saved toggles stay blocked after a guard mismatch.
  • git diff --check; C89 lint N/A (no core C source changes; app C++ and Python only).
  • Local review using .github/skills/code-review/SKILL.md.

The community test job now fetches only the three reviewed author sources at a fixed commit, checks SHA256, and compares names, write counts, converted-code digests, unsupported reasons, and wrong-hash activation. Network/checksum failures fail CI; no ROM, SDK, compiled script or source artifact is required. Optional local cartridge-identity integration also passes. Future author-submitted repository catalog requirements are documented separately from this converter.

Branch base

  • Base is develop, branched from fresh libretro/develop in an isolated managed worktree.

Copilot AI balanced review requested due to automatic review settings October 20, 2026 19:44

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@JoeMatt JoeMatt linked an issue Oct 20, 2026 that may be closed by this pull request
1 task done
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 20, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-20T19:47:55.626049Z e6fa96e PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@JoeMatt JoeMatt self-assigned this Oct 20, 2026
@github-actions

github-actions Bot commented Oct 20, 2026 •

Copy link
Copy Markdown

Regression: linux-arm64

Regression Test Results

ROM Status Details Diff
jagniccc ✅ PASS 0 pixels differ -
yarc ✅ PASS 0 pixels differ -
jagniccc (determinism) ✅ PASS identical across runs -
yarc (determinism) ✅ PASS identical across runs -
jagniccc (frameskip) ✅ PASS skip=0 matches skip=3 -
yarc (frameskip) ✅ PASS skip=0 matches skip=3 -
jagniccc (save state) ✅ PASS round-trip matches -
yarc (save state) ✅ PASS round-trip matches -
jagniccc (rewind) ✅ PASS rewind matches -
yarc (rewind) ✅ PASS rewind matches -

Platform: Linux aarch64

Updated by CI at 2026-10-20T19:55:48.165Z

@github-actions

github-actions Bot commented Oct 20, 2026 •

Copy link
Copy Markdown

Regression: macos-arm64

Regression Test Results

ROM Status Details Diff
jagniccc ✅ PASS 0 pixels differ -
yarc ✅ PASS 0 pixels differ -
jagniccc (determinism) ✅ PASS identical across runs -
yarc (determinism) ✅ PASS identical across runs -
jagniccc (frameskip) ✅ PASS skip=0 matches skip=3 -
yarc (frameskip) ✅ PASS skip=0 matches skip=3 -
jagniccc (save state) ✅ PASS round-trip matches -
yarc (save state) ✅ PASS round-trip matches -
jagniccc (rewind) ✅ PASS rewind matches -
yarc (rewind) ✅ PASS rewind matches -

Platform: Darwin arm64

Updated by CI at 2026-10-20T19:55:12.666Z

@github-actions

Copy link
Copy Markdown

Regression: linux-x64

Regression Test Results

ROM Status Details Diff
jagniccc ✅ PASS 0 pixels differ -
yarc ✅ PASS 0 pixels differ -
jagniccc (determinism) ✅ PASS identical across runs -
yarc (determinism) ✅ PASS identical across runs -
jagniccc (frameskip) ✅ PASS skip=0 matches skip=3 -
yarc (frameskip) ✅ PASS skip=0 matches skip=3 -
jagniccc (save state) ✅ PASS round-trip matches -
yarc (save state) ✅ PASS round-trip matches -
jagniccc (rewind) ✅ PASS rewind matches -
yarc (rewind) ✅ PASS rewind matches -

Platform: Linux x86_64

Updated by CI at 2026-10-20T19:57:07.360Z

@github-actions github-actions Bot added ci CI, workflows, release automation documentation Docs, site, wiki, release notes labels Oct 20, 2026
@JoeMatt
JoeMatt merged commit abc9054 into develop Oct 20, 2026
32 of 57 checks passed
@JoeMatt
JoeMatt deleted the codex/community-cheat-import branch October 20, 2026 20:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci CI, workflows, release automation documentation Docs, site, wiki, release notes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[feat] Port Additional Cheat Codes

2 participants