Skip to content

fix(pal,us2): name release level data by their level - #476

Merged
llesieur99 merged 2 commits into
OpenRAC:masterfrom
nickyyOO:fix/us2-visibomb-gun-gate
Nov 27, 2026
Merged

llesieur99 merged 2 commits into
OpenRAC:masterfrom
nickyyOO:fix/us2-visibomb-gun-gate

Conversation

@nickyyOO

Copy link
Copy Markdown
Contributor

Before: some of PAL's and USA v2.00's own level C named a level datum like an executable datum (D_PAL_XXXXXXXX, D_US2_XXXXXXXX). The OpenRAC port read such a name as v1.01's executable datum of that number, which the level keeps elsewhere. So these functions read the wrong word. In USA v2.00 the Visibomb Gun fired nothing: its added gate read 0x001B1BA0, not 0x001B1860.

After: each uses v1.01's level name of the same datum, or a level name of the release's own (D_PAL_L00_..., D_PAL_L05_...) where v1.01 has none. Fixed:

  • us2 visibomb_gun_update_us2: g_hero_scalar_transition_value (0x001B1860)
  • us2 L00_00432D98 page record f: g_prompt_bar_params_b (0x001AE1C0)
  • pal L00_00436E20: g_prompt_bar_params_a/b (0x001AE200/220)
  • pal L00_003FA3D0: g_vaporizer_trail_step_speed (0x001B09CC)
  • pal L01_0041B900: g_bobbing_amplitude (0x001B1A50)
  • pal L00_003EFC00: g_particle_params_a/b, D_PAL_L00_001B0800/0810
  • pal L05_0042C044: g_target_object, D_PAL_L05_001B1510

How: each address is checked against the function's code in the dumped PAL and v2.00 programs. Other hits of the same search were false alarms.

Tested: tests/check_repository.py, unittest (468 OK), progress.py --check, names.py check. OpenRAC hostgen for rac2-pal and rac2-ntsc2: only these files change, and they read what the disc forms.
Not tested: tools/build.py --version pal/us2 (no compiler here), no play test.

v2.00's visibomb_gun_update_us2 reads gp+0x2870 (level 0: 0x001B1860),
the same word visibomb_missile_update_us2 reads. It is v1.01's
g_hero_scalar_transition_value (D_L00_001B18E0), not an executable datum.

D_US2_001B1860 stated no level, so the port's release view turned it into
D_001B1860, v1.01's executable datum, which level 0 keeps at 0x001B1BA0.
The port read that word, found it set, and the gun never fired.

Checked: tests/check_repository.py, unittest (468 OK), progress.py --check;
OpenRAC hostgen for rac2-ntsc2 now reads OPENRAC_LDATA(0, 0x001B1860).
Not run: tools/build.py --version us2 (no compiler/dumps here).
Some of PAL's and USA v2.00's own level C named a level datum with an
executable name (D_PAL_XXXXXXXX, D_US2_XXXXXXXX). The disc forms the
stated address in these functions, but the port's release view read the
name as v1.01's executable datum of that number, which the level keeps
elsewhere.

Now each uses v1.01's level name of the same datum where one exists, and
a level name of the release's own otherwise:
- us2 L00_00432D98 (page record f): g_prompt_bar_params_a/b/c
  (port read 0x1AE500, disc 0x1AE1C0)
- pal L00_00436E20: g_prompt_bar_params_a/b (0x1AE500/520, disc 0x1AE200/220)
- pal L00_003FA3D0: g_vaporizer_trail_step_speed (0x1B0CCC, disc 0x1B09CC)
- pal L01_0041B900: g_bobbing_amplitude (0x1B2450, disc 0x1B1A50)
- pal L00_003EFC00: g_particle_params_a/b -> D_PAL_L00_001B0800/0810
  (0x1B0B00/B10, disc 0x1B0800/0810)
- pal L05_0042C044: g_target_object -> D_PAL_L05_001B1510 (0x1B1ED0, disc 0x1B1510)

Checked against each function's code in the dumped PAL and v2.00
programs. Other hits of the same search were false alarms (the port
already reads what the disc forms).

Checked: tests/check_repository.py, unittest (468 OK), progress.py
--check, names.py check. OpenRAC hostgen for rac2-pal and rac2-ntsc2:
only these files change. Not run: tools/build.py (no compiler here).
@bytematchdev

bytematchdev Bot commented Nov 27, 2026

Copy link
Copy Markdown

ByteMatch progress report

SCUS_972.68

Code matched 100.00% · 5.52 MB of 5.52 MB
Fuzzy match 100.00%
Functions 8,527 / 8,527
Units complete 1,127 / 1,127

No function changes.

SCKA_200.11

Code matched 62.70% · 3.46 MB of 5.52 MB
Fuzzy match 62.70%
Functions 7,296 / 8,545
Units complete 892 / 1,144

No function changes.

SCPS_150.56

Code matched 63.09% · 3.47 MB of 5.50 MB
Fuzzy match 63.09%
Functions 7,314 / 8,534
Units complete 894 / 1,140

No function changes.

SCES_516.07

Code matched 100.00% · 5.70 MB of 5.70 MB
Fuzzy match 100.00%
Functions 8,608 / 8,608
Units complete 1,359 / 1,359

No function changes.

SCUS_972.68_v2

Code matched 100.00% · 5.58 MB of 5.58 MB
Fuzzy match 100.00%
Functions 8,580 / 8,580
Units complete 1,288 / 1,288

No function changes.

Commit c1fb081 · Ratchet & Clank: Going Commando on ByteMatch

nickyyOO added a commit to nickyyOO/OpenRAC that referenced this pull request Nov 27, 2026
Moves the rac2-decomp pin to c1fb0816 (OpenRAC/rac2-decomp#476) and
rebuilds the tables made from its build: rac2-ntsc's derived names and
the PAL and v2.00 release tables. PICTURE_TOP moves into release.json
constants, so the generator keeps PAL's 16 lines.
@llesieur99
llesieur99 merged commit b56f1b6 into OpenRAC:master Nov 27, 2026
2 checks passed
llesieur99 pushed a commit to llesieur99/OpenRAC that referenced this pull request Nov 27, 2026
…C#1001)

* fix(hostgen): keep a release's own data names the table lacks

A release's own datum name (D_PAL_L00_001B0800) states its address in
that release. The release view left it as it was when the table had no
row for it, so hostgen found no address and skipped the function. Now it
loses its tag, like the table's own rows do.

* chore(import): rac2-decomp c1fb0816, release level data names

Moves the rac2-decomp pin to c1fb0816 (OpenRAC/rac2-decomp#476) and
rebuilds the tables made from its build: rac2-ntsc's derived names and
the PAL and v2.00 release tables. PICTURE_TOP moves into release.json
constants, so the generator keeps PAL's 16 lines.

* docs: regenerate the sources table for the rac2-decomp pin
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.

2 participants