Skip to content

Decompile some of UnkSystem1#28

Merged
Yanis002 merged 1 commit intozeldaret:mainfrom
Yanis002:unksystem1
Jan 21, 2026
Merged

Decompile some of UnkSystem1#28
Yanis002 merged 1 commit intozeldaret:mainfrom
Yanis002:unksystem1

Conversation

@Yanis002
Copy link
Collaborator

I didn't get far because I lost my motivation on UnkSystem1_ov000_Base::vfunc_04 and the other two functions (vfunc_10 and vfunc_14) are very big so it didn't motivate me much lol

As far as I can tell it's more related to BMG actually, I feel like it's some kind of system that is used to connect certain text events (like pressing OK) to actions, UnkSystem1_ov000_Base.mUnk_08 is a bitfield composed of the message index (lower bits) and I think the BMG file (the upper bits), and I tried to follow pointers in memory but it's very not consistent with the actual code so I'm extremely confused

When I follow the thing in the memory viewer I end up on the INF1 section of a BMG file (in this case it was select.bmg in my tests) but the structure is more consistent with the FLW1 section (aka offset 1 being a u8 and offset 2 being a u16) so I'm just lost, I guess it will be clearer once BMG stuff is decompiled more (but idk if I want to go inside that rabbit hole again lol)

Anyway, here's my little work, I didn't expect to give up so soon but I don't want to keep working on this for now

@decomp-dev
Copy link

decomp-dev bot commented Jan 21, 2026

Report for eur (47785bb - 18e7561)

📈 Matched code: 1.28% (+0.02%, +864 bytes)
📈 Linked code: 0.41% (+0.01%, +612 bytes)
📈 Matched data: 22.18% (+0.01%, +96 bytes)
📈 Linked data: 0.18% (+0.00%, +52 bytes)

✅ 21 new matches
Unit Item Bytes Before After
src/000_Second/UnkSystem1_Derived1 UnkSystem1_ov000_Derived1::vfunc_08(int) +108 0.00% 100.00%
src/000_Second/UnkSystem1_Base UnkSystem1_ov000_Base::func_ov000_02066a08(UnkStruct5*) +84 0.00% 100.00%
src/000_Second/UnkSystem1_Derived1 UnkSystem1_ov000_Derived1::~UnkSystem1_ov000_Derived1() +80 0.00% 100.00%
src/000_Second/UnkSystem1_Derived1 UnkSystem1_ov000_Derived1::~UnkSystem1_ov000_Derived1() +72 0.00% 100.00%
src/000_Second/UnkSystem1_Derived1 UnkSystem1_ov000_Derived1::~UnkSystem1_ov000_Derived1() +72 0.00% 100.00%
src/000_Second/UnkSystem1_Derived1 UnkSystem1_ov000_Derived1::vfunc_0C() +64 0.00% 100.00%
src/000_Second/UnkSystem1_Derived1 UnkSystem1_ov000_Derived1::func_ov000_0206738c() +60 0.00% 100.00%
src/000_Second/UnkSystem1_Derived1 .data +52 0.00% 100.00%
src/000_Second/UnkSystem1_Derived1 UnkSystem1_ov000_Derived1::UnkSystem1_ov000_Derived1(int, UnkStruct_ov000_02067bc4::UnkStruct1*) +52 0.00% 100.00%
src/000_Second/UnkSystem1_Derived1 UnkSystem1_ov000_Derived1::UnkSystem1_ov000_Derived1(int, UnkStruct_ov000_02067bc4::UnkStruct1*) +52 0.00% 100.00%
src/000_Second/UnkSystem1_Derived1 UnkSystem1_ov000_Derived1::vfunc_10(unsigned short*) +52 0.00% 100.00%
src/000_Second/UnkSystem1_Base .data +44 0.00% 100.00%
src/000_Second/UnkSystem1_Base UnkSystem1_ov000_Base::func_ov000_020669dc() +44 0.00% 100.00%
src/000_Second/UnkSystem1_Base UnkSystem1_ov000_Base::UnkSystem1_ov000_Base(int) +40 0.00% 100.00%
src/000_Second/UnkSystem1_Base UnkSystem1_ov000_Base::vfunc_00(int) +28 0.00% 100.00%
src/000_Second/UnkSystem1_Base UnkSystem1_ov000_Base::func_ov000_020669b4(unsigned char*) +24 0.00% 100.00%
src/000_Second/UnkSystem1_Base UnkSystem1_ov000_Base::vfunc_0C() +8 0.00% 100.00%
src/000_Second/UnkSystem1_Base UnkSystem1_ov000_Base::vfunc_1C(unsigned int, int, int) +8 0.00% 100.00%
src/000_Second/UnkSystem1_Base UnkSystem1_ov000_Base::vfunc_20(int, int, int) +8 0.00% 100.00%
src/000_Second/UnkSystem1_Base UnkSystem1_ov000_Base::vfunc_08(int) +4 0.00% 100.00%
src/000_Second/UnkSystem1_Base UnkSystem1_ov000_Base::vfunc_18() +4 0.00% 100.00%
📈 3 improvements in unmatched functions
Unit Item Bytes Before After
src/000_Second/UnkSystem1_Base UnkSystem1_ov000_Base::vfunc_10(unsigned short*) +5 0.00% 0.60%
src/000_Second/UnkSystem1_Base UnkSystem1_ov000_Base::vfunc_14(void*) +3 0.00% 0.30%
src/000_Second/UnkSystem1_Base UnkSystem1_ov000_Base::vfunc_04() +1 0.00% 0.36%

Report for jp (47785bb - 18e7561)

📈 Matched code: 1.26% (+0.02%, +864 bytes)
📈 Matched data: 22.15% (+0.01%, +96 bytes)

✅ 21 new matches
Unit Item Bytes Before After
src/000_Second/UnkSystem1_Derived1 UnkSystem1_ov000_Derived1::vfunc_08(int) +108 0.00% 100.00%
src/000_Second/UnkSystem1_Base UnkSystem1_ov000_Base::func_ov000_02066a08(UnkStruct5*) +84 0.00% 100.00%
src/000_Second/UnkSystem1_Derived1 UnkSystem1_ov000_Derived1::~UnkSystem1_ov000_Derived1() +80 0.00% 100.00%
src/000_Second/UnkSystem1_Derived1 UnkSystem1_ov000_Derived1::~UnkSystem1_ov000_Derived1() +72 0.00% 100.00%
src/000_Second/UnkSystem1_Derived1 UnkSystem1_ov000_Derived1::~UnkSystem1_ov000_Derived1() +72 0.00% 100.00%
src/000_Second/UnkSystem1_Derived1 UnkSystem1_ov000_Derived1::vfunc_0C() +64 0.00% 100.00%
src/000_Second/UnkSystem1_Derived1 UnkSystem1_ov000_Derived1::func_ov000_0206738c() +60 0.00% 100.00%
src/000_Second/UnkSystem1_Derived1 .data +52 0.00% 100.00%
src/000_Second/UnkSystem1_Derived1 UnkSystem1_ov000_Derived1::UnkSystem1_ov000_Derived1(int, UnkStruct_ov000_02067bc4::UnkStruct1*) +52 0.00% 100.00%
src/000_Second/UnkSystem1_Derived1 UnkSystem1_ov000_Derived1::UnkSystem1_ov000_Derived1(int, UnkStruct_ov000_02067bc4::UnkStruct1*) +52 0.00% 100.00%
src/000_Second/UnkSystem1_Derived1 UnkSystem1_ov000_Derived1::vfunc_10(unsigned short*) +52 0.00% 100.00%
src/000_Second/UnkSystem1_Base .data +44 0.00% 100.00%
src/000_Second/UnkSystem1_Base UnkSystem1_ov000_Base::func_ov000_020669dc() +44 0.00% 100.00%
src/000_Second/UnkSystem1_Base UnkSystem1_ov000_Base::UnkSystem1_ov000_Base(int) +40 0.00% 100.00%
src/000_Second/UnkSystem1_Base UnkSystem1_ov000_Base::vfunc_00(int) +28 0.00% 100.00%
src/000_Second/UnkSystem1_Base UnkSystem1_ov000_Base::func_ov000_020669b4(unsigned char*) +24 0.00% 100.00%
src/000_Second/UnkSystem1_Base UnkSystem1_ov000_Base::vfunc_0C() +8 0.00% 100.00%
src/000_Second/UnkSystem1_Base UnkSystem1_ov000_Base::vfunc_1C(unsigned int, int, int) +8 0.00% 100.00%
src/000_Second/UnkSystem1_Base UnkSystem1_ov000_Base::vfunc_20(int, int, int) +8 0.00% 100.00%
src/000_Second/UnkSystem1_Base UnkSystem1_ov000_Base::vfunc_08(int) +4 0.00% 100.00%
src/000_Second/UnkSystem1_Base UnkSystem1_ov000_Base::vfunc_18() +4 0.00% 100.00%
📈 3 improvements in unmatched functions
Unit Item Bytes Before After
src/000_Second/UnkSystem1_Base UnkSystem1_ov000_Base::vfunc_10(unsigned short*) +5 0.00% 0.60%
src/000_Second/UnkSystem1_Base UnkSystem1_ov000_Base::vfunc_14(void*) +5 0.00% 0.47%
src/000_Second/UnkSystem1_Base UnkSystem1_ov000_Base::vfunc_04() +1 0.00% 0.36%

@Yanis002 Yanis002 merged commit 7803163 into zeldaret:main Jan 21, 2026
3 checks passed
@Yanis002 Yanis002 deleted the unksystem1 branch January 21, 2026 19:50
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