Skip to content

Debug version now builds OK and all_source compiles#2343

Merged
TakaRikka merged 16 commits intozeldaret:mainfrom
LagoLunatic:debug
Mar 23, 2025
Merged

Debug version now builds OK and all_source compiles#2343
TakaRikka merged 16 commits intozeldaret:mainfrom
LagoLunatic:debug

Conversation

@LagoLunatic
Copy link
Copy Markdown
Contributor

All ShieldD errors fixed:

$ ninja
[1/1] PROGRESS
Progress:
  All: 9.65% matched, 0.00% linked (1 / 3201 files)
    Code: 1422620 / 14741676 bytes (20460 / 64457 functions)
    Data: 162968 / 4133020 bytes (3.94%)
  DOL: 13.38% matched, 0.00% linked (0 / 875 files)
    Code: 840048 / 6279040 bytes (11196 / 31033 functions)
    Data: 150432 / 1971544 bytes (7.63%)
  Modules: 6.88% matched, 0.00% linked (1 / 2326 files)
    Code: 582572 / 8462636 bytes (9264 / 33424 functions)
    Data: 12536 / 2161476 bytes (0.58%)
  TP Game Code: 7.50% matched, 0.00% linked (1 / 923 files)
    Code: 903952 / 12052876 bytes (12698 / 45761 functions)
    Data: 34248 / 3081100 bytes (1.11%)
  Core Engine: 24.43% matched, 0.00% linked (0 / 92 files)
    Code: 110668 / 453028 bytes (1332 / 2940 functions)
    Data: 25372 / 271100 bytes (9.36%)
  SDK: 55.56% matched, 0.00% linked (0 / 1164 files)
    Code: 103324 / 185972 bytes (2679 / 3168 functions)
    Data: 4712 / 11112 bytes (42.40%)
  Third Party: 29.78% matched, 0.00% linked (0 / 258 files)
    Code: 304676 / 1023000 bytes (3751 / 6955 functions)
    Data: 98636 / 251456 bytes (39.23%)

You could add ShieldD to github CI now if you want to track progress and catch future build errors, note that if you do the .dol needed in the build repo must be converted via this dtk build: https://github.com/encounter/decomp-toolkit/actions/runs/14001786651
By using the dtk elf2dol command on the debug .alf.

No match% regressions for retail (only difference is two funcs in vrbox2 increased in % after I messed with them in debug).

I didn't link anything besides f_pc_profile_lst because there are some weird issues that aren't resolved yet.

For example, d_a_andsw matches 100% now, but the linker isn't stripping out weak functions that are used in the TU, only ones that are unused. I tried various linker flags (e.g. code merging) but nothing seemed to help.

Also name mangling issues for weak functions in m_Do_mtx:
void* JGeometry::TVec3<float>::TVec3<float>(float, float, float)
vs
JGeometry::TVec3<float>::TVec3(float, float, float)

@TakaRikka TakaRikka merged commit 4dc0cd9 into zeldaret:main Mar 23, 2025
1 check passed
Stbn-antier pushed a commit to Stbn-antier/tp that referenced this pull request Mar 24, 2025
* Fix missing arg to JUT_ASSERT

* Fix some MWCC version diff errors

* Compile m_Do_ext, d_demo, actor_mng

* Add VSCode task to quickly switch between versions

* Unlink magLift for debug

* Update the hash of the debug dol

The old cbea5fa... hash here was for the dol generated by the alf2dol.py script, which produces incorrect alignment.

The dol with the new hash can be obtained by using `dtk elf2dol` to convert the debug .alf file to a dol.

The DOL now builds OK.

* Fix all debug REL dtor splits

All RELs now also build OK, meaning `ninja build/ShieldD/ok` now succeeds.

* Add genMessage declarations to all HIO subclasses

* Fixing more compilation errors

* m_Do_mtx 100% on debug

Cannot be linked due to weak function name mangling?

* Improve various matches

* Fix all remaining compilation errors

* Fix new compilation errors from main

* Fix retail regression

* Link f_pc_profile_lst
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