Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
2fae684
fix: let the overlay compile check pass when GNU as assembles either way
mateuszklysz Oct 16, 2026
d28bcc8
overlay: port 24 level functions from rac1-decomp
mateuszklysz Oct 16, 2026
1cbba75
overlay: port 7 more level functions from rac1-decomp
mateuszklysz Oct 16, 2026
ae9cf91
decomp: match render_capture_scrolling_text and vi_buf_restart_dma
mateuszklysz Oct 16, 2026
7769aa2
overlay: split the Hoven turret file and port two level functions
mateuszklysz Oct 16, 2026
fc688e6
overlay: port seven more level functions from rac1-decomp
mateuszklysz Oct 16, 2026
9ce0524
overlay: port six level functions paired through OpenRAC's US map
mateuszklysz Oct 16, 2026
2ff6477
overlay: port three more level functions paired through OpenRAC's US map
mateuszklysz Oct 16, 2026
863c6dc
decomp: match sceDbcCreateSocket
mateuszklysz Oct 16, 2026
de749fa
overlay: drop two stale port comments
mateuszklysz Oct 16, 2026
b6eb812
overlay: call each ported callee by the name its own file gives it
mateuszklysz Oct 16, 2026
fcd0f12
overlay: give each ported global the name and type the tree already uses
mateuszklysz Oct 16, 2026
76b7ca6
overlay: give each ported global the name and type the tree already uses
mateuszklysz Oct 16, 2026
8d633a2
overlay: one name and type per global in the remaining ported files
mateuszklysz Oct 16, 2026
2b7a0a5
overlay: name ported locals and offset fields by use instead of regis…
mateuszklysz Oct 16, 2026
864cc7e
overlay: use header names for the sound pool and level index in porte…
mateuszklysz Oct 16, 2026
a93752d
overlay: reuse the file's existing names for a few more ported globals
mateuszklysz Oct 16, 2026
0ce533f
overlay: reuse the file's existing names for more ported globals
mateuszklysz Oct 16, 2026
56e725f
overlay: reuse the file's existing name for the planet flag table
mateuszklysz Oct 16, 2026
2d6450d
overlay: plain labels for three more ported globals
mateuszklysz Oct 16, 2026
f42bcd6
docs: drop the port mention and the game folder
mateuszklysz Oct 16, 2026
5e32625
overlay: reuse each file's own names for a few more level globals
mateuszklysz Oct 16, 2026
8c1311a
overlay: one name per global in the l12 moby update file
mateuszklysz Oct 16, 2026
0328dd5
overlay: placement aliases instead of suffixed labels in shared entit…
mateuszklysz Oct 16, 2026
a46579c
overlay: reuse the file's own names for the walloper, plasmabot and s…
mateuszklysz Oct 16, 2026
fa584e7
overlay: use the hero and level table names in the hero idle, ship an…
mateuszklysz Oct 16, 2026
2bb443a
overlay: one name and type for the last ported globals
mateuszklysz Oct 16, 2026
2ac3943
chore: lower the known data label conflicts to 602
mateuszklysz Oct 16, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
</p>
<p align="center">
A work-in-progress, byte-matching decompilation of Ratchet &amp; Clank (2002) for PlayStation 2.<br>
Reconstructing the original game code in readable C, with a native Rust port as the long-term goal.
Reconstructing the original game code in readable C.
</p>

> [!NOTE]
Expand Down
4 changes: 2 additions & 2 deletions config/overlays/us/functions.tsv
Original file line number Diff line number Diff line change
Expand Up @@ -1431,7 +1431,7 @@ FUN_L00_0029b4d8 shared 420 f6bd7d4eb7e066c6 19 00:0029B4D8,01:002AF248,02:0029A
FUN_L00_0029b680 shared 1012 42ecfa94c474cf92 19 00:0029B680,01:002AF3F0,02:0029AE88,03:00287FC8,04:0028C578,05:002C3DD0,06:002A8778,07:002C2328,08:002A3AA0,09:002B7FD0,10:0028C180,11:002BE578,12:002B1F08,13:002A5D10,14:002A1A28,15:002895C8,16:002945F0,17:002938E0,18:0029B228
FUN_L00_0029ba78 shared 3024 ea879e90198c5508 19 00:0029BA78,01:002AF7E8,02:0029B280,03:002883C0,04:0028C970,05:002C41C8,06:002A8B70,07:002C2720,08:002A3E98,09:002B83C8,10:0028C578,11:002BE970,12:002B2300,13:002A6108,14:002A1E20,15:002899C0,16:002949E8,17:00293CD8,18:0029B620
FUN_L00_0029c648 shared 5244 6972649e56ecfe91 19 00:0029C648,01:002B03B8,02:0029BE50,03:00288F90,04:0028D540,05:002C4D98,06:002A9740,07:002C32F0,08:002A4A68,09:002B8F98,10:0028D148,11:002BF540,12:002B2ED0,13:002A6CD8,14:002A29F0,15:0028A590,16:002955B8,17:002948A8,18:0029C1F0
FUN_00238310 exe 528 e7b9592024c2ef78 19 00:0029DAC8,01:002B1838,02:0029D2D0,03:0028A410,04:0028E9C0,05:002C6218,06:002AABC0,07:002C4770,08:002A5EE8,09:002BA418,10:0028E5C8,11:002C09C0,12:002B4350,13:002A8158,14:002A3E70,15:0028BA10,16:00296A38,17:00295D28,18:0029D670 assembly/textbin/gameplay/vendor/render_capture_scrolling_text
FUN_00238310 exe 528 e7b9592024c2ef78 19 00:0029DAC8,01:002B1838,02:0029D2D0,03:0028A410,04:0028E9C0,05:002C6218,06:002AABC0,07:002C4770,08:002A5EE8,09:002BA418,10:0028E5C8,11:002C09C0,12:002B4350,13:002A8158,14:002A3E70,15:0028BA10,16:00296A38,17:00295D28,18:0029D670 gameplay/vendor/render_capture_scrolling_text
FUN_00238520 exe 268 09201b9e429a440f 19 00:0029DCD8,01:002B1A48,02:0029D4E0,03:0028A620,04:0028EBD0,05:002C6428,06:002AADD0,07:002C4980,08:002A60F8,09:002BA628,10:0028E7D8,11:002C0BD0,12:002B4560,13:002A8368,14:002A4080,15:0028BC20,16:00296C48,17:00295F38,18:0029D880 ui/text/update_scrolling_status_message
FUN_00238630 exe 88 9f7732daf2d50bb8 19 00:0029DDE8,01:002B1B58,02:0029D5F0,03:0028A730,04:0028ECE0,05:002C6538,06:002AAEE0,07:002C4A90,08:002A6208,09:002BA738,10:0028E8E8,11:002C0CE0,12:002B4670,13:002A8478,14:002A4190,15:0028BD30,16:00296D58,17:00296048,18:0029D990 gameplay/vendor/render_capture_effect_pass
FUN_00238688 exe 96 eece735c70eaf8fc 19 00:0029DE40,01:002B1BB0,02:0029D648,03:0028A788,04:0028ED38,05:002C6590,06:002AAF38,07:002C4AE8,08:002A6260,09:002BA790,10:0028E940,11:002C0D38,12:002B46C8,13:002A84D0,14:002A41E8,15:0028BD88,16:00296DB0,17:002960A0,18:0029D9E8 ui/menus/format_scaled_display_value
Expand Down Expand Up @@ -1860,7 +1860,7 @@ FUN_0023be20 exe 244 fa7c0cdffd0cf27f 19 00:002EF790,01:0031BCC8,02:002FE3F0,03:
FUN_0023bf18 exe 84 8d9715497dea8151 19 00:002EF888,01:0031BDC0,02:002FE4E8,03:002EF5F8,04:002F3620,05:0032D910,06:00318550,07:0032B538,08:00318EC8,09:00317948,10:002F8B18,11:0032AB00,12:003188C8,13:0031A260,14:00318DB0,15:002FAFA0,16:002F7A38,17:00302A80,18:00308C78 video/decoder/vi_buf_end_put
FUN_0023bf70 exe 508 efc91c0b417bd644 19 00:002EF8E0,01:0031BE18,02:002FE540,03:002EF650,04:002F3678,05:0032D968,06:003185A8,07:0032B590,08:00318F20,09:003179A0,10:002F8B70,11:0032AB58,12:00318920,13:0031A2B8,14:00318E08,15:002FAFF8,16:002F7A90,17:00302AD8,18:00308CD0 video/decoder/vi_buf_add_dma
FUN_0023c170 exe 272 a93436f5763282f2 19 00:002EFAE0,01:0031C018,02:002FE740,03:002EF850,04:002F3878,05:0032DB68,06:003187A8,07:0032B790,08:00319120,09:00317BA0,10:002F8D70,11:0032AD58,12:00318B20,13:0031A4B8,14:00319008,15:002FB1F8,16:002F7C90,17:00302CD8,18:00308ED0 video/decoder/vi_buf_stop_dma
FUN_0023c280 exe 824 fbf5afdb23892730 19 00:002EFBF0,01:0031C128,02:002FE850,03:002EF960,04:002F3988,05:0032DC78,06:003188B8,07:0032B8A0,08:00319230,09:00317CB0,10:002F8E80,11:0032AE68,12:00318C30,13:0031A5C8,14:00319118,15:002FB308,16:002F7DA0,17:00302DE8,18:00308FE0 assembly/textbin/video/decoder/vi_buf_restart_dma
FUN_0023c280 exe 824 fbf5afdb23892730 19 00:002EFBF0,01:0031C128,02:002FE850,03:002EF960,04:002F3988,05:0032DC78,06:003188B8,07:0032B8A0,08:00319230,09:00317CB0,10:002F8E80,11:0032AE68,12:00318C30,13:0031A5C8,14:00319118,15:002FB308,16:002F7DA0,17:00302DE8,18:00308FE0 video/decoder/vi_buf_restart_dma
FUN_0023c5b8 exe 88 8f29da4aa55c648f 19 00:002EFF28,01:0031C460,02:002FEB88,03:002EFC98,04:002F3CC0,05:0032DFB0,06:00318BF0,07:0032BBD8,08:00319568,09:00317FE8,10:002F91B8,11:0032B1A0,12:00318F68,13:0031A900,14:00319450,15:002FB640,16:002F80D8,17:00303120,18:00309318 video/decoder/vi_buf_delete
FUN_0023c610 exe 76 e57a0e9579deb0b4 19 00:002EFF80,01:0031C4B8,02:002FEBE0,03:002EFCF0,04:002F3D18,05:0032E008,06:00318C48,07:0032BC30,08:003195C0,09:00318040,10:002F9210,11:0032B1F8,12:00318FC0,13:0031A958,14:003194A8,15:002FB698,16:002F8130,17:00303178,18:00309370 video/decoder/vi_buf_count
FUN_0023c660 exe 84 cf13363f867141a2 19 00:002EFFD0,01:0031C508,02:002FEC30,03:002EFD40,04:002F3D68,05:0032E058,06:00318C98,07:0032BC80,08:00319610,09:00318090,10:002F9260,11:0032B248,12:00319010,13:0031A9A8,14:003194F8,15:002FB6E8,16:002F8180,17:003031C8,18:003093C0 video/decoder/vi_buf_flush
Expand Down
8 changes: 4 additions & 4 deletions config/us/recovered_names.json
Original file line number Diff line number Diff line change
Expand Up @@ -16525,8 +16525,8 @@
"logical_group_confidence": "unresolved"
},
{
"unit": "textbin/gameplay/vendor/render_capture_scrolling_text",
"source_path": "src/assembly/textbin/gameplay/vendor/render_capture_scrolling_text.c",
"unit": "gameplay/vendor/render_capture_scrolling_text",
"source_path": "src/gameplay/vendor/render_capture_scrolling_text.c",
"address": "0x00238310",
"current_name": "FUN_00238310",
"proposed_name": "render_capture_scrolling_text",
Expand Down Expand Up @@ -17564,8 +17564,8 @@
"logical_group_confidence": "medium"
},
{
"unit": "textbin/video/decoder/vi_buf_restart_dma",
"source_path": "src/assembly/textbin/video/decoder/vi_buf_restart_dma.c",
"unit": "video/decoder/vi_buf_restart_dma",
"source_path": "src/video/decoder/vi_buf_restart_dma.c",
"address": "0x0023c280",
"current_name": "FUN_0023c280",
"proposed_name": "vi_buf_restart_dma",
Expand Down
6 changes: 3 additions & 3 deletions config/us/rnc1.us.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -549,7 +549,7 @@ segments:
- [0x25624, textbin, text_gap_00124510_post_sdk_worker]
- [0x25628, c, sdk/library/sceDbcSetWorkAddr]
- [0x25694, textbin, text_gap_001246a8_post_sdk_worker]
- [0x25698, c, assembly/sdk/library/sceDbcCreateSocket]
- [0x25698, c, sdk/library/sceDbcCreateSocket]
- [0x25760, c, sdk/library/sceDbcGetDepNumber]
- [0x258a8, textbin, text_gap_001247e0_post_sdk_worker]
- [0x258b0, c, sdk/library/scedbcreceivedata]
Expand Down Expand Up @@ -2052,7 +2052,7 @@ segments:
- [0x138e4c, textbin, text_gap_00237ecc_after_fun_00237e90]
- [0x138e50, c, gameplay/vendor/fun_00237ed0]
- [0x139274, textbin, text_gap_002382f4_before_fun_00238310]
- [0x139290, c, assembly/textbin/gameplay/vendor/render_capture_scrolling_text]
- [0x139290, c, gameplay/vendor/render_capture_scrolling_text]
- [0x1394a0, c, ui/text/update_scrolling_status_message]
- [0x1395ac, textbin, text_gap_0023862c_before_fun_00238630]
- [0x1395b0, c, gameplay/vendor/render_capture_effect_pass]
Expand Down Expand Up @@ -2151,7 +2151,7 @@ segments:
- [0x13cef0, c, video/decoder/vi_buf_add_dma]
- [0x13d0ec, textbin, text_gap_0023c16c_before_fun_0023c170]
- [0x13d0f0, c, video/decoder/vi_buf_stop_dma]
- [0x13d200, c, assembly/textbin/video/decoder/vi_buf_restart_dma]
- [0x13d200, c, video/decoder/vi_buf_restart_dma]
- [0x13d538, c, video/decoder/vi_buf_delete]
- [0x13d590, c, video/decoder/vi_buf_count]
- [0x13d5dc, textbin, text_gap_0023c65c_before_fun_0023c660]
Expand Down
14 changes: 9 additions & 5 deletions configure.py
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,7 @@
"l11/gameplay/hero/0023c7a0.c",
"l11/gameplay/hero/00253a18.c",
"l11/gameplay/hero/hero_set_state.c",
"l12/gameplay/entities/003054b0.c",
"l12/gameplay/entities/hoven_turret.c",
"l12/gameplay/entities/platform.c",
"l12/gameplay/entities/water_reservoir.c",
Expand Down Expand Up @@ -301,7 +302,9 @@
"shared/audio/voices/00276368.c",
"shared/gameplay/camera/001fc008.c",
"shared/gameplay/camera/follow_camera_setup.c",
"shared/gameplay/camera/follow_camera_update.c",
"shared/gameplay/camera/init_camera_system.c",
"shared/gameplay/entities/00264e40.c",
"shared/gameplay/entities/00295100.c",
"shared/gameplay/entities/0029f990.c",
"shared/gameplay/entities/002aee30.c",
Expand Down Expand Up @@ -488,7 +491,7 @@
"assembly/textbin/rendering/effects/build_resident_indexed_texture_warp_meshes": (0x1D9A10, 0xDA990, 32),
"assembly/textbin/ui/map/draw_level_selection_map": (0x1DDE28, 0xDEDA8, 320),
"assembly/textbin/rendering/register_object_render_class": (0x1E1900, 0xE2880, 256),
"assembly/textbin/gameplay/vendor/render_capture_scrolling_text": (0x1E6018, 0xE6F98, 512),
"gameplay/vendor/render_capture_scrolling_text": (0x1E6018, 0xE6F98, 512),
"assembly/textbin/gameplay/vendor/render_vendor_capture_pass_sequence": (0x1E6218, 0xE7198, 96),
"textbin/render_vendor_capture_texture_overlays_pass": (0x1E6620, 0xE75A0, 64),
"textbin/rebuild_configured_text_label_list": (0x1E8728, 0xE96A8, 60),
Expand Down Expand Up @@ -2109,13 +2112,14 @@ def build_overlays() -> Path:
ninja_path = OVERLAYS_BUILD / "build.ninja"
ninja = ninja_syntax.Writer(open(str(ninja_path), "w"), width=9999)
# obj/ only checks that the file compiles as written; its code is never
# compared. -G0 keeps GNU as from relaxing bare symbol accesses, which
# it asserts on (tc-mips.c:11454) when one sits in a noreorder delay slot
# and an unsized symbol is loaded later in the same frag.
# compared. GNU as can assert (tc-mips.c:11454) on a bare symbol access
# in a noreorder delay slot, with -G0 on some files and without it on
# others, so a file passes when it assembles either way.
overlay_cc = f"{game_root}/ee-gcc -c {includes} {LANG_DEFINE} {COMPILER_FLAGS} $in -o $out"
ninja.rule(
"overlay-cc",
description="overlay-cc $in",
command=f"{game_root}/ee-gcc -c {includes} -Wa,-G0 {LANG_DEFINE} {COMPILER_FLAGS} $in -o $out",
command=f"{overlay_cc.replace(' -c ', ' -c -Wa,-G0 ', 1)} 2>/dev/null || {overlay_cc}",
)
ninja.rule(
"c-only",
Expand Down
7 changes: 0 additions & 7 deletions game/README.md

This file was deleted.

2 changes: 1 addition & 1 deletion include/rnc/ui/vendor/vendor_capture.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ struct CaptureBoundsAdjustment {
};

extern struct VendorItemPricing vendor_item_prices[43] __asm__("D_001DFFB0");
extern volatile s32 capture_glyph_coordinates[64] __asm__("D_001E6018");
extern s32 capture_glyph_coordinates[64] __asm__("D_001E6018");
extern s32 capture_glyph_advances[64] __asm__("D_001E6118");
extern struct CaptureBoundsAdjustment capture_bounds_adjustments[6] __asm__("D_001E6218");

Expand Down
2 changes: 1 addition & 1 deletion scripts/test_public_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -477,7 +477,7 @@ class DataDeclarationTests(unittest.TestCase):
"""No new data label may get a second type or name (scripts/data-decls.py)."""

# Labels that still disagree; lower it when you fix some, never raise it.
KNOWN_CONFLICTS = 610
KNOWN_CONFLICTS = 602

def test_no_new_conflicting_declarations(self):
decls = load_module("rnc_data_decls", ROOT / "scripts" / "data-decls.py")
Expand Down
61 changes: 0 additions & 61 deletions src/assembly/sdk/library/sceDbcCreateSocket.c

This file was deleted.

142 changes: 0 additions & 142 deletions src/assembly/textbin/video/decoder/vi_buf_restart_dma.c

This file was deleted.

Loading
Loading