Skip to content

cht: rejoin 848 PSX Game Buster codes fragmented into 4-char pieces - #1713

Open
ArjunKdaf wants to merge 1 commit into
libretro:masterfrom
ArjunKdaf:cht-fix-psx-gamebuster
Open

cht: rejoin 848 PSX Game Buster codes fragmented into 4-char pieces#1713
ArjunKdaf wants to merge 1 commit into
libretro:masterfrom
ArjunKdaf:cht-fix-psx-gamebuster

Conversation

@ArjunKdaf

Copy link
Copy Markdown
Contributor

848 codes across 95 PlayStation Game Buster files are split into four-character fragments — 8006+CE68+6400 where the canonical form is 8006CE68+6400.

None of them apply. PCSX-ReARMed hands the string to AddCheat, which needs an eight-digit address and a four-digit value; a four-digit fragment fails the address parse. Beetle PSX drops them on its token-length check. SwanStation loads them as no-ops.

The repair is mechanical: rejoin the first two fragments into the eight-digit address. No value is altered anywhere in this branch.

Tested on hardware

TrimUI handheld, PCSX-ReARMed, cht/Sony - PlayStation/Croc - Legend of the Gobbos (USA, Europe) (Game Buster).cht. Nothing in the file applied before the change. After it, "100 Diamonds" (80074BC0+0064), "Infinite Lives" (80075234+00FF) and "Six Gobbos Found" (80074BC8+0006) all apply.

What still does not work, and why it is not this change

I also tested Crash Bandicoot 2 - Cortex Strikes Back (USA, Europe) (Game Buster).cht. "Open all Levels" (8006CE74+43C8) works. "100 Lives", "All Crystals" and "All Gems" do not.

Those three carry values that look wrong for the game — "100 Lives" is +6400 where the equivalent code elsewhere in the corpus is +0064. That is a pre-existing defect in the source entries. This branch only rejoins addresses and never touches a value, so those codes were equally broken before; the difference is that previously they could not be parsed at all, so nothing in the file could be reached. Fixing their values needs a source, not a transform, and is not part of this change.

How I checked it

  • Re-implemented the address gate of PCSX-ReARMed's AddCheat and Beetle PSX's token-length check, then counted the patches that would actually apply across the changed files: PCSX 36 before / 1,273 after, Beetle 36 / 1,274, none lost.
  • External ground truth: 47 of the repaired codes have a sibling GameShark file for the same game that this branch does not touch. All 47 match their sibling exactly after the repair.
  • Audited the raw diff line by line: every changed line is a cheatN_code value. No files added or removed, no other keys touched.
  • Re-ran the fix over its own output: zero further changes.

These GameShark-family codes had their 12-hex-digit body split into 4-char
pieces (800E+3290+0003 instead of 800E3290+0003). No PlayStation core applies
any of them: PCSX-ReARMed rejects the entry because a 4-hex token can never
pass its address gate, Beetle PSX discards tokens that are neither 8 nor 12
chars, and SwanStation parses them into pure Nop instructions, so the cheat
appears to load and does nothing. Rejoined to the canonical AAAAAAAA+VVVV form
used by the other 20334 PSX codes. Digits are unchanged; every code rejoins to
an exact multiple of 12, and wildcards land only in value fields.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant