From 30e2147479a639caaf692ba4fa54fdf61a91c994 Mon Sep 17 00:00:00 2001 From: coah <100182500+coah80@users.noreply.github.com> Date: Thu, 1 Oct 2026 17:38:28 -0500 Subject: [PATCH 1/7] match(sd_drv): pfd_st_removal_callback (#546) Force store-before-load of media_inserted by reading it back in the device check so MWCC emits li r0 / stw / lwz order. --- libs/RVL_SDK/src/fa/driver/sd_drv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/RVL_SDK/src/fa/driver/sd_drv.c b/libs/RVL_SDK/src/fa/driver/sd_drv.c index f217d23d..30fb418f 100644 --- a/libs/RVL_SDK/src/fa/driver/sd_drv.c +++ b/libs/RVL_SDK/src/fa/driver/sd_drv.c @@ -291,7 +291,7 @@ s32 pfd_st_removal_callback(s32 status, void* data) { return 0; } g_pfd_sddrv_info.media_inserted = 0; - if (pfd_sddrv_device(&g_pfd_sddrv_info) != 0) { + if (g_pfd_sddrv_info.media_inserted == 0 && pfd_sddrv_device(&g_pfd_sddrv_info) != 0) { g_event = 1; result = ISD_RegisterDeviceIntrHandler(g_pfd_sddrv_info.device, (SDDevIntrCallback)pfd_st_inter_callback, &g_event); if (result != 0) { -- 2.49.1 From 1f224c53c19956927567bb900b1d48d96f4e6745 Mon Sep 17 00:00:00 2001 From: coah <100182500+coah80@users.noreply.github.com> Date: Thu, 1 Oct 2026 17:38:34 -0500 Subject: [PATCH 2/7] cleanup(usbkbd): name SetLED device and ledBits params (#547) Rename USBKBDSetLED/Async param_1/param_2 to device/ledBits. Byte-identical; DOL sha1 unchanged. --- libs/RVL_SDK/include/revolution/usbkbd.h | 4 ++-- libs/RVL_SDK/src/usbkbd/usb_kbd.c | 12 ++++++------ 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/libs/RVL_SDK/include/revolution/usbkbd.h b/libs/RVL_SDK/include/revolution/usbkbd.h index 9b4f8cfe..cd8212b0 100644 --- a/libs/RVL_SDK/include/revolution/usbkbd.h +++ b/libs/RVL_SDK/include/revolution/usbkbd.h @@ -33,8 +33,8 @@ typedef struct USBKBDCmdLEDAsync { USBKBDErr USBKBDInitialize(USBKBDAttachCallback attachCb, USBKBDDetachCallback detachCb); -USBKBDErr USBKBDSetLED(u32, u8, USBKBDCmdLED* cmd); -USBKBDErr USBKBDSetLEDAsync(u32, u8, USBKBDCmdLEDAsync* cmd, USBKBDCmdLEDCallback cb, void* cbArg); +USBKBDErr USBKBDSetLED(u32 device, u8 ledBits, USBKBDCmdLED* cmd); +USBKBDErr USBKBDSetLEDAsync(u32 device, u8 ledBits, USBKBDCmdLEDAsync* cmd, USBKBDCmdLEDCallback cb, void* cbArg); USBKBDErr USBKBDRegisterEventCallback(USBKBDEventCallback cb); diff --git a/libs/RVL_SDK/src/usbkbd/usb_kbd.c b/libs/RVL_SDK/src/usbkbd/usb_kbd.c index 9c7068fd..958ac152 100644 --- a/libs/RVL_SDK/src/usbkbd/usb_kbd.c +++ b/libs/RVL_SDK/src/usbkbd/usb_kbd.c @@ -96,13 +96,13 @@ USBKBDErr USBKBDInitialize(USBKBDAttachCallback attachCb, USBKBDDetachCallback d return USB_KBD_ERR_OK; } -USBKBDErr USBKBDSetLED(u32 param_1, u8 param_2, USBKBDCmdLED* cmd) { +USBKBDErr USBKBDSetLED(u32 device, u8 ledBits, USBKBDCmdLED* cmd) { if (usbKbdFd < 0) { return USB_KBD_ERR_NOT_INIT; } - cmd->unk_0x04 = param_2; - cmd->unk_0x00 = param_1; + cmd->unk_0x04 = ledBits; + cmd->unk_0x00 = device; return IOS_Write(usbKbdFd, cmd, sizeof(USBKBDCmdLED)) != IPC_RESULT_OK ? USB_KBD_ERR_FATAL : USB_KBD_ERR_OK; } @@ -114,12 +114,12 @@ static IOSError usbKbdSetLEDHandler(IOSError error, void* arg) { return IPC_RESULT_OK; } -USBKBDErr USBKBDSetLEDAsync(u32 param_1, u8 param_2, USBKBDCmdLEDAsync* cmd, USBKBDCmdLEDCallback cb, void* cbArg) { +USBKBDErr USBKBDSetLEDAsync(u32 device, u8 ledBits, USBKBDCmdLEDAsync* cmd, USBKBDCmdLEDCallback cb, void* cbArg) { if (usbKbdFd < 0) { return USB_KBD_ERR_NOT_INIT; } - cmd->base.unk_0x00 = param_1; - cmd->base.unk_0x04 = param_2; + cmd->base.unk_0x00 = device; + cmd->base.unk_0x04 = ledBits; cmd->cb = cb; cmd->cbArg = cbArg; -- 2.49.1 From e46bac9a1bd68032cf6b7cd8dac56e60f2a2fb84 Mon Sep 17 00:00:00 2001 From: coah <100182500+coah80@users.noreply.github.com> Date: Thu, 1 Oct 2026 17:39:42 -0500 Subject: [PATCH 3/7] cleanup(hcisu_h2): name USB callback, receive, and init params (#549) Rename Ghidra param_* on Matching hcisu_h2 helpers: usb_cback event/status, receive_msg pipe, init taskId/mbox/bufSize. Byte-identical; DOL sha1 unchanged. --- libs/RVL_SDK/src/bte/hcisu_h2.c | 140 ++++++++++++++++---------------- 1 file changed, 70 insertions(+), 70 deletions(-) diff --git a/libs/RVL_SDK/src/bte/hcisu_h2.c b/libs/RVL_SDK/src/bte/hcisu_h2.c index 03e2e5e7..248b048f 100644 --- a/libs/RVL_SDK/src/bte/hcisu_h2.c +++ b/libs/RVL_SDK/src/bte/hcisu_h2.c @@ -113,20 +113,20 @@ static UINT16 const hcisu_msg_evt_table[] = MSG_HC_TO_STACK_HCI_EVT, }; -void hcisu_h2_usb_cback(UINT8 param_1, INT8 param_2) +void hcisu_h2_usb_cback(UINT8 event, INT8 status) { - switch (param_1) + switch (event) { case 0: break; case 4: - bta_usb_close_evt(param_2); + bta_usb_close_evt(status); break; } } -UINT16 hcisu_h2_receive_msg(UINT16 param_1, tHCISU_H2_CB *p_cb) +UINT16 hcisu_h2_receive_msg(UINT16 pipe, tHCISU_H2_CB *p_cb) { UINT16 bytes_read = 0; UINT8 byte; @@ -138,7 +138,7 @@ UINT16 hcisu_h2_receive_msg(UINT16 param_1, tHCISU_H2_CB *p_cb) if (p_cb->at_0x1e != 2) return 0; - r27 = param_1 + 1; + r27 = pipe + 1; while (TRUE) { @@ -148,36 +148,36 @@ UINT16 hcisu_h2_receive_msg(UINT16 param_1, tHCISU_H2_CB *p_cb) ++bytes_read; msg_received = FALSE; - switch (p_cb->at_0x1a[param_1]) + switch (p_cb->at_0x1a[pipe]) { case 0: if (r27 == 1) { - p_cb->at_0x00[param_1] = GKI_getpoolbuf(GKI_POOL_ID_2); - p_cb->at_0x14[param_1] = 4; + p_cb->at_0x00[pipe] = GKI_getpoolbuf(GKI_POOL_ID_2); + p_cb->at_0x14[pipe] = 4; } else if (r27 == 2) { - p_cb->at_0x00[param_1] = GKI_getpoolbuf(GKI_POOL_ID_3); - p_cb->at_0x14[param_1] = 2; + p_cb->at_0x00[pipe] = GKI_getpoolbuf(GKI_POOL_ID_3); + p_cb->at_0x14[pipe] = 2; } else if (r27 == 3) { - p_cb->at_0x00[param_1] = GKI_getpoolbuf(GKI_POOL_ID_1); - p_cb->at_0x14[param_1] = 3; + p_cb->at_0x00[pipe] = GKI_getpoolbuf(GKI_POOL_ID_1); + p_cb->at_0x14[pipe] = 3; } else { break; } - if (p_cb->at_0x00[param_1]) + if (p_cb->at_0x00[pipe]) { - p_cb->at_0x00[param_1]->len = 0; - p_cb->at_0x00[param_1]->event = - hcisu_msg_evt_table[p_cb->at_0x14[param_1] - 1]; - p_cb->at_0x00[param_1]->offset = 0; - p_cb->at_0x1a[param_1] = 1; + p_cb->at_0x00[pipe]->len = 0; + p_cb->at_0x00[pipe]->event = + hcisu_msg_evt_table[p_cb->at_0x14[pipe] - 1]; + p_cb->at_0x00[pipe]->offset = 0; + p_cb->at_0x1a[pipe] = 1; } else { @@ -185,54 +185,54 @@ UINT16 hcisu_h2_receive_msg(UINT16 param_1, tHCISU_H2_CB *p_cb) "HCIS: Unable to allocate buffer for incoming HCI " "message."); - p_cb->at_0x1a[param_1] = 2; + p_cb->at_0x1a[pipe] = 2; } - p_cb->at_0x0c[param_1] = - hcisu_preamble_table[p_cb->at_0x14[param_1] - 1]; + p_cb->at_0x0c[pipe] = + hcisu_preamble_table[p_cb->at_0x14[pipe] - 1]; /* fallthrough */ case 1: - *((UINT8 *)(p_cb->at_0x00[param_1] + 1) - + p_cb->at_0x00[param_1]->len++) = byte; + *((UINT8 *)(p_cb->at_0x00[pipe] + 1) + + p_cb->at_0x00[pipe]->len++) = byte; - --p_cb->at_0x0c[param_1]; + --p_cb->at_0x0c[pipe]; - if (p_cb->at_0x0c[param_1] == 0) + if (p_cb->at_0x0c[pipe] == 0) { msg_len = byte; - if (p_cb->at_0x14[param_1] == 2) + if (p_cb->at_0x14[pipe] == 2) { - msg_len = (msg_len << 8) + p_cb->at_0x17[param_1]; + msg_len = (msg_len << 8) + p_cb->at_0x17[pipe]; - if ((p_cb->at_0x00[param_1] = + if ((p_cb->at_0x00[pipe] = (HC_BT_HDR *)l2cap_link_chk_pkt_start( - (BT_HDR *)p_cb->at_0x00[param_1])) + (BT_HDR *)p_cb->at_0x00[pipe])) == 0) { - p_cb->at_0x0c[param_1] = msg_len; + p_cb->at_0x0c[pipe] = msg_len; if (msg_len == 0) - p_cb->at_0x1a[param_1] = 0; + p_cb->at_0x1a[pipe] = 0; else - p_cb->at_0x1a[param_1] = 4; + p_cb->at_0x1a[pipe] = 4; break; } } - p_cb->at_0x0c[param_1] = msg_len; + p_cb->at_0x0c[pipe] = msg_len; if (sizeof(HC_BT_HDR) - + hcisu_preamble_table[p_cb->at_0x14[param_1] - 1] + + hcisu_preamble_table[p_cb->at_0x14[pipe] - 1] + msg_len - > GKI_get_buf_size(p_cb->at_0x00[param_1])) + > GKI_get_buf_size(p_cb->at_0x00[pipe])) { - GKI_freebuf(p_cb->at_0x00[param_1]); - p_cb->at_0x00[param_1] = NULL; - p_cb->at_0x1a[param_1] = 4; + GKI_freebuf(p_cb->at_0x00[pipe]); + p_cb->at_0x00[pipe] = NULL; + p_cb->at_0x1a[pipe] = 4; BT_TRACE(HCI, ERROR, "HCIS: Invalid length for incoming HCI message."); @@ -242,85 +242,85 @@ UINT16 hcisu_h2_receive_msg(UINT16 param_1, tHCISU_H2_CB *p_cb) if (msg_len != 0) { - p_cb->at_0x1a[param_1] = 3; + p_cb->at_0x1a[pipe] = 3; } else { msg_received = TRUE; - p_cb->at_0x1a[param_1] = 0; + p_cb->at_0x1a[pipe] = 0; } } else { - p_cb->at_0x17[param_1] = byte; + p_cb->at_0x17[pipe] = byte; } break; case 2: - --p_cb->at_0x0c[param_1]; + --p_cb->at_0x0c[pipe]; - if (p_cb->at_0x0c[param_1] == 0) + if (p_cb->at_0x0c[pipe] == 0) { msg_len = byte; - if (p_cb->at_0x14[param_1] == 2) - msg_len = (msg_len << 8) + p_cb->at_0x17[param_1]; + if (p_cb->at_0x14[pipe] == 2) + msg_len = (msg_len << 8) + p_cb->at_0x17[pipe]; - p_cb->at_0x0c[param_1] = msg_len; - p_cb->at_0x1a[param_1] = 4; + p_cb->at_0x0c[pipe] = msg_len; + p_cb->at_0x1a[pipe] = 4; } else { - p_cb->at_0x17[param_1] = byte; + p_cb->at_0x17[pipe] = byte; } break; case 3: - *((UINT8 *)(p_cb->at_0x00[param_1] + 1) - + p_cb->at_0x00[param_1]->len++) = byte; + *((UINT8 *)(p_cb->at_0x00[pipe] + 1) + + p_cb->at_0x00[pipe]->len++) = byte; - --p_cb->at_0x0c[param_1]; + --p_cb->at_0x0c[pipe]; - len = UUSB_Read(param_1 + 1, - (UINT8 *)(p_cb->at_0x00[param_1] + 1) - + p_cb->at_0x00[param_1]->len, - p_cb->at_0x0c[param_1]); + len = UUSB_Read(pipe + 1, + (UINT8 *)(p_cb->at_0x00[pipe] + 1) + + p_cb->at_0x00[pipe]->len, + p_cb->at_0x0c[pipe]); - p_cb->at_0x00[param_1]->len += len; - p_cb->at_0x0c[param_1] -= len; + p_cb->at_0x00[pipe]->len += len; + p_cb->at_0x0c[pipe] -= len; bytes_read += len; - if (p_cb->at_0x0c[param_1] == 0) + if (p_cb->at_0x0c[pipe] == 0) { - if (p_cb->at_0x14[param_1] == 2 + if (p_cb->at_0x14[pipe] == 2 && l2cap_link_chk_pkt_end() == 0) { - p_cb->at_0x1a[param_1] = 0; + p_cb->at_0x1a[pipe] = 0; } else { msg_received = TRUE; - p_cb->at_0x1a[param_1] = 0; + p_cb->at_0x1a[pipe] = 0; } } break; case 4: - --p_cb->at_0x0c[param_1]; + --p_cb->at_0x0c[pipe]; - if (p_cb->at_0x0c[param_1] == 0) - p_cb->at_0x1a[param_1] = 0; + if (p_cb->at_0x0c[pipe] == 0) + p_cb->at_0x1a[pipe] = 0; break; } if (msg_received) { - GKI_send_msg(hcisu_h2_cb.at_0x1f, 0, p_cb->at_0x00[param_1]); - p_cb->at_0x00[param_1] = NULL; + GKI_send_msg(hcisu_h2_cb.at_0x1f, 0, p_cb->at_0x00[pipe]); + p_cb->at_0x00[pipe] = NULL; } } @@ -403,7 +403,7 @@ void hcisu_h2_send_msg(tHCISU_H2_CB *p_cb, HC_BT_HDR *p_msg) hcisu_h2_send_msg_now(p_cb, p_msg); } -void hcisu_h2_init(UINT8 param_1, UINT8 param_2, UINT16 param_3) +void hcisu_h2_init(UINT8 taskId, UINT8 mbox, UINT16 bufSize) { hcisu_h2_cb.at_0x1e = 0; @@ -411,9 +411,9 @@ void hcisu_h2_init(UINT8 param_1, UINT8 param_2, UINT16 param_3) hcisu_h2_cb.at_0x1a[1] = 0; hcisu_h2_cb.at_0x1a[2] = 0; - hcisu_h2_cb.at_0x1f = param_1; - hcisu_h2_cb.at_0x20 = param_2; - hcisu_h2_cb.at_0x12 = param_3; + hcisu_h2_cb.at_0x1f = taskId; + hcisu_h2_cb.at_0x20 = mbox; + hcisu_h2_cb.at_0x12 = bufSize; } BOOLEAN hcisu_h2_open(tHCI_CFG *_p_cfg) -- 2.49.1 From 63579601e2be950f8a9e959355a9372c0141614f Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 1 Oct 2026 22:39:45 +0000 Subject: [PATCH 4/7] docs: update progress [skip ci] --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index ae9828d3..31ec27a7 100644 --- a/README.md +++ b/README.md @@ -55,7 +55,7 @@ Progress |:---:|:---:|:---:|:---:| | 99.37% | 87.71% | 62.05% | 92.06% | -units 918/1027 complete, functions 12213/12563 matched. +units 918/1027 complete, functions 12214/12563 matched. decompiled = code with a C/C++ implementation (objdiff fuzzy), matched = byte-exact code, linked = code actually linked into the DOL, data = byte-exact data -- 2.49.1 From 76a60f8c1a1ac8b5a56d2e1119c34254670968c4 Mon Sep 17 00:00:00 2001 From: coah <100182500+coah80@users.noreply.github.com> Date: Thu, 1 Oct 2026 17:40:03 -0500 Subject: [PATCH 5/7] CDBDatabase: convert Search_ to matching C (#548) Exact match (53/53, diffs 0). Builds CDBSearchConditions and calls SearchYearLayer. DOL SHA1 unchanged. Co-authored-by: asm2c --- libs/RevoEX/src/cdb/CDBDatabase.c | 94 ++++++++++--------------------- 1 file changed, 29 insertions(+), 65 deletions(-) diff --git a/libs/RevoEX/src/cdb/CDBDatabase.c b/libs/RevoEX/src/cdb/CDBDatabase.c index d38251b2..56681033 100644 --- a/libs/RevoEX/src/cdb/CDBDatabase.c +++ b/libs/RevoEX/src/cdb/CDBDatabase.c @@ -117,9 +117,9 @@ extern CDBErr CDBDatabaseSearchMinuteLayer(); extern CDBErr CDBDatabaseSearchHourLayer(); extern CDBErr CDBDatabaseSearchDayLayer(); extern CDBErr CDBDatabaseSearchMonthLayer(); -extern CDBErr CDBDatabaseSearchYearLayer(); +extern CDBErr CDBDatabaseSearchYearLayer(CDBDatabase* database, CDBSearchConditions* conditions, CDBRecordLocation recordLocation); extern CDBErr CDBDatabaseSearch(); -extern CDBErr CDBDatabaseSearch_(); +extern CDBErr CDBDatabaseSearch_(CDBDatabase* database, CDBDate beginDate, CDBDate endDate, CDBSearchDirection searchDirection, char* makerCodeStr, char* gameCodeStr, char* type, CDBRecordLocation recordLocation, BOOL openRecord, CDBSearchRecordCB searchRecordCB, void* searchRecordArg, u64* wiiId); typedef struct { u32 used; u8 state[0xC00C]; @@ -2176,7 +2176,7 @@ asm CDBErr CDBDatabaseSearchMonthLayer() { #endif } -asm CDBErr CDBDatabaseSearchYearLayer() { +asm CDBErr CDBDatabaseSearchYearLayer(CDBDatabase* database, CDBSearchConditions* conditions, CDBRecordLocation recordLocation) { #ifdef __MWERKS__ nofralloc stwu r1, -0x90(r1) @@ -2432,74 +2432,38 @@ asm CDBErr CDBDatabaseSearchYearLayer() { CDBErr CDBDatabaseSearch(CDBDatabase* database, CDBDate beginDate, CDBDate endDate, CDBSearchDirection searchDirection, char* makerCode, char* gameCode, int unk7, CDBRecordLocation recordLocation, int unk9, CDBSearchRecordCB searchRecordCB, void* searchRecordArg) { CDBErr result; CDBLock(); - result = CDBDatabaseSearch_(database, beginDate, endDate, searchDirection, makerCode, gameCode, unk7, recordLocation, unk9, searchRecordCB, searchRecordArg, NULL); + result = CDBDatabaseSearch_(database, beginDate, endDate, searchDirection, makerCode, gameCode, (char*)unk7, recordLocation, unk9, searchRecordCB, searchRecordArg, NULL); CDBUnlock(); return result; } -asm CDBErr CDBDatabaseSearch_() { -#ifdef __MWERKS__ - nofralloc - stwu r1, -0x60(r1) - mflr r0 - stw r0, 0x64(r1) - addi r11, r1, 0x60 - bl _savegpr_24 - cmplw r4, r5 - lwz r28, 0x68(r1) - lwz r29, 0x6c(r1) - mr r24, r3 - lwz r30, 0x70(r1) - mr r25, r8 - lwz r31, 0x74(r1) - mr r26, r9 - mr r27, r10 - bge L_81489764 - stw r4, 0x8(r1) - stw r5, 0xc(r1) - b L_8148976C - L_81489764: - stw r5, 0x8(r1) - stw r4, 0xc(r1) - L_8148976C: - stw r6, 0x1c(r1) - mr r3, r7 - addi r4, r1, 0x10 - bl CDBConvMCStrToMCValue - mr r3, r25 - addi r4, r1, 0x14 - bl CDBConvGCStrToGCValue - li r0, 0x1 - cmpwi r31, 0x0 - stw r26, 0x18(r1) - stw r29, 0x20(r1) - stw r30, 0x24(r1) - stw r0, 0x28(r1) - stw r28, 0x2c(r1) - bne L_814897B8 - li r0, 0x0 - stw r0, 0x34(r1) - stw r0, 0x30(r1) - b L_814897C8 - L_814897B8: - lwz r0, 0x0(r31) - lwz r3, 0x4(r31) - stw r3, 0x34(r1) - stw r0, 0x30(r1) - L_814897C8: - mr r3, r24 - mr r5, r27 - addi r4, r1, 0x8 - bl CDBDatabaseSearchYearLayer - addi r11, r1, 0x60 - bl _restgpr_24 - lwz r0, 0x64(r1) - mtlr r0 - addi r1, r1, 0x60 - blr -#endif +CDBErr CDBDatabaseSearch_(CDBDatabase* database, CDBDate beginDate, CDBDate endDate, CDBSearchDirection searchDirection, char* makerCodeStr, char* gameCodeStr, char* type, CDBRecordLocation recordLocation, BOOL openRecord, CDBSearchRecordCB searchRecordCB, void* searchRecordArg, u64* wiiId) { + CDBSearchConditions conditions; + + if (beginDate < endDate) { + conditions.beginDate = beginDate; + conditions.endDate = endDate; + } else { + conditions.beginDate = endDate; + conditions.endDate = beginDate; + } + conditions.direction = searchDirection; + CDBConvMCStrToMCValue(makerCodeStr, &conditions.makerCode); + CDBConvGCStrToGCValue(gameCodeStr, &conditions.gameCode); + conditions.type = type; + conditions.callback = searchRecordCB; + conditions.callbackArg = searchRecordArg; + conditions.keepSearching = TRUE; + conditions.openRecord = openRecord; + if (wiiId == NULL) { + conditions.wiiId = 0; + } else { + conditions.wiiId = *wiiId; + } + return CDBDatabaseSearchYearLayer(database, &conditions, recordLocation); } + void CDBDatabaseInstanceInit(CDBDatabaseState* instance, u32 flags, CDBDatabase* database) { instance->used = 1; instance->flags = flags; -- 2.49.1 From e062e1c6698c5022f15336cb1c002425e00b65b7 Mon Sep 17 00:00:00 2001 From: coah <100182500+coah80@users.noreply.github.com> Date: Thu, 1 Oct 2026 17:40:09 -0500 Subject: [PATCH 6/7] cleanup(uusb_ppc): name UUSB_Read/Write params (#550) Rename pipe/buf/len on Read; pipe/unused on Write; fix debug print to use len. Byte-identical; DOL sha1 unchanged. --- libs/RVL_SDK/src/bte/uusb_ppc.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/libs/RVL_SDK/src/bte/uusb_ppc.c b/libs/RVL_SDK/src/bte/uusb_ppc.c index 5df29bd2..ed9c023f 100644 --- a/libs/RVL_SDK/src/bte/uusb_ppc.c +++ b/libs/RVL_SDK/src/bte/uusb_ppc.c @@ -565,7 +565,7 @@ void UUSB_Open(tUUSB *uusb, tUUSB_CBACK *cback) (void)uusb; } -UINT16 UUSB_Read(UINT8 param_1, void *param_2, UINT16 param_3) +UINT16 UUSB_Read(UINT8 pipe, void *buf, UINT16 len) { return 0; } @@ -580,7 +580,7 @@ int UUSB_WriteBuf(/* ... */) return 0; } -UINT16 UUSB_Write(UINT8 param_1, void *p_data, UINT16 len, void *param_4) +UINT16 UUSB_Write(UINT8 pipe, void *p_data, UINT16 len, void *unused) { short sp18 = 0; IOSError ret = 0; @@ -591,7 +591,7 @@ UINT16 UUSB_Write(UINT8 param_1, void *p_data, UINT16 len, void *param_4) if (usb.state != 2) return 0; - switch (param_1) + switch (pipe) { case 0: p_buf = GKI_getpoolbuf(usb.cmd_buffer_pool); @@ -656,7 +656,7 @@ UINT16 UUSB_Write(UINT8 param_1, void *p_data, UINT16 len, void *param_4) memcpy(p_buffer, p_data, len); if (len > 190) - UUSBDBG(" woah ! thats pretty Big ! :%d", param_3); + UUSBDBG(" woah ! thats pretty Big ! :%d", len); if (usb.at_0x38 < 5 && usb.bulk_buffer_q.count == 0) { @@ -696,7 +696,7 @@ UINT16 UUSB_Write(UINT8 param_1, void *p_data, UINT16 len, void *param_4) break; } - (void)param_4; + (void)unused; return ret; } -- 2.49.1 From ae807bd2bff37562c3f205544e1624ae0af9d5d4 Mon Sep 17 00:00:00 2001 From: matcher Date: Thu, 1 Oct 2026 17:40:29 -0500 Subject: [PATCH 7/7] match(pf_fat): PFFAT_GetClusterAllocated Reorder locals so p_start_cluster lands in r7 and p_vol in r8. --- libs/RVL_SDK/src/fa/pf_fat.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/libs/RVL_SDK/src/fa/pf_fat.c b/libs/RVL_SDK/src/fa/pf_fat.c index 1809415e..046531d5 100644 --- a/libs/RVL_SDK/src/fa/pf_fat.c +++ b/libs/RVL_SDK/src/fa/pf_fat.c @@ -1180,20 +1180,24 @@ s32 PFFAT_GetClusterSpecified(PFFAT_FFD* file, u32 chainIndex, s32 PFFAT_GetClusterAllocated(PFFAT_FFD* file, u32 chainIndex, u32 numClusters, u32* cluster) { + u32* start; + PF_VOLUME* vol; PFFAT_HINT* hint; u32 fatType; u32 locateStart; u32 locateEnd; s32 error; - fatType = file->p_vol->bpb.fat_type; + start = file->p_start_cluster; + vol = file->p_vol; + fatType = vol->bpb.fat_type; hint = file->p_hint; - if (*file->p_start_cluster == 1) { + if (*start == 1) { if (fatType <= FAT_16) { *cluster = -1; return 0; } - *file->p_start_cluster = file->p_vol->bpb.root_dir_cluster; + *start = vol->bpb.root_dir_cluster; } *cluster = -1; error = find_cluster_in_chain(file, chainIndex, 2, numClusters, 1, cluster); -- 2.49.1