Skip to content

Bte remaining - #47

Merged
GuestDreemurr merged 5 commits into
doldecomp:mainfrom
ridvansan:bte-remaining
Oct 21, 2026
Merged

GuestDreemurr merged 5 commits into
doldecomp:mainfrom
ridvansan:bte-remaining

Conversation

@ridvansan

Copy link
Copy Markdown
Contributor

reopened

Match and link the remaining BTE units - 187 functions across 16 TUs:

- WBT/GAP: wbt_ext, gap_api, gap_conn, gap_utils (16 functions)
- hcicmds: 59 HCI command builders
- HID: hidd_api/hidd_conn/hidd_mgmt/hidd_pm (6) and hidh_api/hidh_conn (27)
- L2CAP: l2c_api, l2c_csm, l2c_link, l2c_main, l2c_utils (79)

Key fixes: the RVL l2c_int.h with MAX_L2CAP_CLIENTS = 8 (restores the
retail 0x7E8 tL2C_CB layout), the RVL HID headers, the 2006 per-layer
trace dispatchers, and reconstruction of dead-function .data/.sdata at
the compiler's literal boundaries.

objdiff: every function and section 100.00; all 61 BTE units linked.
BTE code 163668/163668, functions 673/673. The DOL matches and the
project is at 77.10% fuzzy.
The first import kept every non-retail function behind #if 0. Delete
those blocks now that the retail function sets are known, leaving only
the functions that are actually part of the retail units:

- gap_api/gap_conn/gap_utils, hidd_api/hidd_conn/hidd_mgmt/hidd_pm,
  l2c_api/l2c_link/l2c_main/l2c_utils (59 blocks)

Rebuilt and verified: every affected unit is still 100.00 in objdiff
and the DOL matches.
@decomp-dev

decomp-dev Bot commented Oct 21, 2026 •

Copy link
Copy Markdown

Report for HAFE (08caf87 - beac043)

📈 Matched code: 76.83% (+3.46%, +52744 bytes)
📈 Linked code: 74.27% (+3.46%, +52744 bytes)
Total data: 1813749 bytes (-4 bytes)
📈 Matched data: 47.94% (+0.68%, +12388 bytes)
📈 Linked data: 73.89% (+0.68%, +12388 bytes)

✅ 206 new matches
Unit Item Bytes Before After
main/revolution/BTE/stack/l2cap/l2c_main process_l2cap_cmd +2672 0.00% 100.00%
main/revolution/BTE/stack/l2cap/l2c_csm .data +2104 0.00% 100.00%
main/revolution/BTE/stack/l2cap/l2c_main .bss +2024 0.00% 100.00%
main/revolution/BTE/stack/l2cap/l2c_api .data +1936 0.00% 100.00%
main/revolution/BTE/stack/hid/hidh_api hidh_search_callback +1104 0.00% 100.00%
main/revolution/BTE/stack/hcic/hcicmds btsnd_hcic_set_afh_channels +1056 0.00% 100.00%
main/revolution/BTE/stack/hid/hidh_api .bss +1028 0.00% 100.00%
main/revolution/BTE/stack/hid/hidh_conn .data +1000 0.00% 100.00%
main/revolution/BTE/stack/l2cap/l2c_csm l2c_csm_config +968 0.00% 100.00%
main/revolution/BTE/stack/gap/gap_utils .bss +944 0.00% 100.00%
main/revolution/BTE/stack/hid/hidh_conn hidh_l2cif_data_ind +920 0.00% 100.00%
main/revolution/BTE/stack/hid/hidh_conn hidh_l2cif_connect_cfm +840 0.00% 100.00%
main/revolution/BTE/stack/l2cap/l2c_main l2c_rcv_acl_data +816 0.00% 100.00%
main/revolution/BTE/stack/hid/hidh_conn hidh_l2cif_config_cfm +780 0.00% 100.00%
main/revolution/BTE/stack/l2cap/l2c_main .data +768 0.00% 100.00%
main/revolution/BTE/stack/l2cap/l2c_utils l2cu_send_peer_config_req +760 0.00% 100.00%
main/revolution/BTE/stack/l2cap/l2c_utils l2cu_send_peer_config_rsp +760 0.00% 100.00%
main/revolution/BTE/stack/gap/gap_utils .data +752 0.00% 100.00%
main/revolution/BTE/stack/l2cap/l2c_link l2c_link_check_send_pkts +716 0.00% 100.00%
main/revolution/BTE/stack/hid/hidh_conn hidh_l2cif_disconnect_ind +708 0.00% 100.00%
main/revolution/BTE/stack/hid/hidh_conn hidh_l2cif_config_ind +680 0.00% 100.00%
main/revolution/BTE/stack/hid/hidh_conn hidh_conn_snd_data +668 0.00% 100.00%
main/revolution/BTE/stack/l2cap/l2c_csm l2c_csm_closed +660 0.00% 100.00%
main/revolution/BTE/stack/l2cap/l2c_link .data +624 0.00% 100.00%
main/revolution/BTE/stack/l2cap/l2c_csm l2c_csm_open +604 0.00% 100.00%
main/revolution/BTE/stack/hid/hidh_conn hidh_l2cif_connect_ind +600 0.00% 100.00%
main/revolution/BTE/stack/hid/hidh_conn hidh_l2cif_disconnect_cfm +584 0.00% 100.00%
main/revolution/BTE/stack/l2cap/l2c_csm l2c_csm_w4_l2cap_connect_rsp +580 0.00% 100.00%
main/revolution/BTE/stack/l2cap/l2c_link l2c_link_hci_conn_comp +568 0.00% 100.00%
main/revolution/BTE/stack/l2cap/l2c_api L2CA_ConnectReq +564 0.00% 100.00%

...and 176 more new matches

@GuestDreemurr
GuestDreemurr merged commit 26b325e into doldecomp:main Oct 21, 2026
1 check passed
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