Compare commits

..

13 Commits

Author SHA1 Message Date
coah
124e2346da cleanup(sdi_api): rename leftover Ghidra param_* names
Rename ISD_GetHCRegister/GetDeviceStatus/GetCardSize and
sduCommand(v)/MultiBlockAsync parameters to descriptive names.
2026-10-01 17:30:46 -05:00
github-actions[bot]
37724c57d6 docs: update progress [skip ci] 2026-10-01 22:27:32 +00:00
coah
1a32db7bdc fix: update iplSDChannelSelect caller missed by #496 rename (#554) 2026-10-01 17:26:54 -05:00
coah
2aab31c1f9 match(NHTTP_thread): NHTTPi_RecvProxyConnectHeader init order (#513)
Set cursor/index before ended so MWCC emits li r4 then li r5.
2026-10-01 17:18:22 -05:00
coah
24c84f5bfc cleanup: rename NandSDWorker SD app title check helpers (#496)
Rename iplNandSD_81348EA8/do_unk_8134C838 to
check_sd_app_titles_async/do_check_sd_app_titles. DOL sha1 unchanged.
2026-10-01 17:17:04 -05:00
coah
73de5786da cleanup(www_surface): rename CreateManager params to match cpp (#512)
param_10 → arcPath; rectW0/H0/W1/H1 → surfaceW/H, browserW/H.
Header-only rename aligned with www_surface.cpp.
2026-10-01 17:16:25 -05:00
coah
3abcd34252 cleanup(iplCalendar): name month/pos pane arrays and day-grid locals (#517)
Replace Matching-only lbl_* pane name tables and Ghidra locals in
the day layout path; update symbols.txt for the arrays.
2026-10-01 17:16:04 -05:00
coah
5c20a11fa8 Restore truncated PC-keyboard event thunk name (#519) 2026-10-01 17:15:31 -05:00
coah
f85a98a6e3 cleanup(iplSettingSelect): name exit-sequence helpers (#516)
Rename Matching-only fn_* exit/reboot helpers to descriptive
snake_case names; update mangled symbols.txt entries.
2026-10-01 17:15:19 -05:00
coah
137ee3242a cleanup(iplCSPane): name fatal OSFatal color/msg and zero float (#511)
lbl_81697844..47 → scCsFatalColorR/G/B/A, lbl_8166A6E3 → scCsFatalMsg,
lbl_81694FC0 → scCsZeroF.
2026-10-01 17:15:08 -05:00
coah
2368a9a774 cleanup(tiHwKeyboard): name EU/non-EU country map tables (#515)
Rename Matching-only setLanguage country lookup tables and
symbols.txt entries.
2026-10-01 17:13:57 -05:00
coah
90399bb6cf cleanup(iplDate): name calendar date pane/string labels (#518)
Matching-only renames in scene/calendar/iplDate (+ symbols.txt).
2026-10-01 17:13:54 -05:00
coah
fc831357ea CDBDatabase: convert Close and FindByKey to matching C (#491)
* CDBDatabase: convert Close and FindByKey to matching C

Replace asm bodies for CDBDatabaseClose and CDBDatabaseFindByKey with
equivalent C that matches instruction-exact (ctxdiff diffs 0). Unit stays
33/33 matched with 100% code and data.

* CDBDatabase: reuse labeled error strings for Close/FindByKey

Point CDBReportError at the existing lbl_ string pool entries so the
linked DOL matches baserom SHA1 26116613f624061ba99c8d1a299aaa6efa85670d.
2026-10-01 17:13:50 -05:00
16 changed files with 226 additions and 306 deletions

View File

@@ -53,9 +53,9 @@ Progress
<!-- progress:start -->
| Decompiled | Matched | Linked | Data |
|:---:|:---:|:---:|:---:|
| 99.37% | 87.69% | 61.93% | 91.37% |
| 99.37% | 87.71% | 61.93% | 92.05% |
units 917/1027 complete, functions 12211/12563 matched.
units 917/1027 complete, functions 12213/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
<!-- progress:end -->

View File

@@ -1761,7 +1761,7 @@ update_sd_app_location_async__Q23ipl12NandSDWorkerFPUl = .text:0x81348E30; // ty
read_sd_app_location_async__Q23ipl12NandSDWorkerFPUl = .text:0x81348E44; // type:function size:0x14
check_for_sd_app_to_nand_async__Q23ipl12NandSDWorkerFUxPQ33ipl12NandSDWorker13AppBlocksInfoPQ33ipl12NandSDWorker13AppBlocksInfo = .text:0x81348E58; // type:function size:0x30
check_backup_fits_async__Q23ipl12NandSDWorkerFPQ33ipl12NandSDWorker11TitleIdListPQ33ipl12NandSDWorker11TitleIdList = .text:0x81348E88; // type:function size:0x20
iplNandSD_81348EA8__Q23ipl12NandSDWorkerFPvPvPv = .text:0x81348EA8; // type:function size:0x2C
check_sd_app_titles_async__Q23ipl12NandSDWorkerFPvPvPv = .text:0x81348EA8; // type:function size:0x2C
get_nand_save_size_async__Q23ipl12NandSDWorkerFUx = .text:0x81348ED4; // type:function size:0x18
get_nand_app_size_async__Q23ipl12NandSDWorkerFUx = .text:0x81348EEC; // type:function size:0x18
delete_nand_save_async__Q23ipl12NandSDWorkerFUx = .text:0x81348F04; // type:function size:0x18
@@ -1823,7 +1823,7 @@ do_read_sd_app_location__Q23ipl12NandSDWorkerFv = .text:0x8134BC60; // type:func
do_check_for_sd_app_to_nand__Q23ipl12NandSDWorkerFv = .text:0x8134BED0; // type:function size:0x3C8
check_backup_fits__Q23ipl12NandSDWorkerFv = .text:0x8134C298; // type:function size:0x3D8
do_list_nand_apps_usage__Q23ipl12NandSDWorkerFv = .text:0x8134C670; // type:function size:0x1C8
do_unk_8134C838__Q23ipl12NandSDWorkerFv = .text:0x8134C838; // type:function size:0x2D0
do_check_sd_app_titles__Q23ipl12NandSDWorkerFv = .text:0x8134C838; // type:function size:0x2D0
do_get_nand_save_size__Q23ipl12NandSDWorkerFv = .text:0x8134CB08; // type:function size:0x260
do_get_nand_app_size__Q23ipl12NandSDWorkerFv = .text:0x8134CD68; // type:function size:0x1F4
get_sd_save_size__Q23ipl12NandSDWorkerFUl = .text:0x8134CF5C; // type:function size:0x140
@@ -5267,10 +5267,10 @@ start_focusout_anm__Q33ipl5scene13SettingSelectFi = .text:0x814093D0; // type:fu
start_selected_anm__Q33ipl5scene13SettingSelectFi = .text:0x81409480; // type:function size:0x274
is_stopped_all_anm__Q33ipl5scene13SettingSelectCFv = .text:0x814096F4; // type:function size:0x74
onEvent__Q33ipl5scene13SettingSelectFUlUlPv = .text:0x81409768; // type:function size:0xFC
fn_81409864__Q33ipl5scene13SettingSelectFv = .text:0x81409864; // type:function size:0x90
fn_814098F4__Q33ipl5scene13SettingSelectFv = .text:0x814098F4; // type:function size:0x94
fn_81409988__Q33ipl5scene13SettingSelectFv = .text:0x81409988; // type:function size:0x64
fn_814099EC__Q33ipl5scene13SettingSelectFv = .text:0x814099EC; // type:function size:0x198
calc_exit_sequence__Q33ipl5scene13SettingSelectFv = .text:0x81409864; // type:function size:0x90
prepare_exit_abort__Q33ipl5scene13SettingSelectFv = .text:0x814098F4; // type:function size:0x94
start_exit_fade__Q33ipl5scene13SettingSelectFv = .text:0x81409988; // type:function size:0x64
finish_exit_reboot__Q33ipl5scene13SettingSelectFv = .text:0x814099EC; // type:function size:0x198
__dt__Q33ipl5scene13SettingSelectFv = .text:0x81409B84; // type:function size:0x58 scope:weak
@20@__dt__Q33ipl5scene13SettingSelectFv = .text:0x81409BDC; // type:function size:0x8 scope:weak
@84@onEvent__Q33ipl5scene13SettingSelectFUlUlPv = .text:0x81409BE4; // type:function size:0x8 scope:weak
@@ -5576,7 +5576,7 @@ __sinit_\tiPcKeyboard_cpp = .text:0x81416F34; // type:function size:0x1B0
@68@calc__Q49textinput8keyboard6pctype12LayoutByNW4RFv = .text:0x814170FC; // type:function size:0x8
@68@draw__Q49textinput8keyboard6pctype12LayoutByNW4RFv = .text:0x81417104; // type:function size:0x8
@68@init__Q49textinput8keyboard6pctype12LayoutByNW4RFv = .text:0x8141710C; // type:function size:0x8
@236@onEvent__Q49textinput8keyboard6pctype12LayoutByNW4RFPQ49textinput8keyboard6pctype5 = .text:0x81417114; // type:function size:0x8
@236@onEvent__Q49textinput8keyboard6pctype12LayoutByNW4RFPQ49textinput8keyboard6pctype5UIObjUlPv = .text:0x81417114; // type:function size:0x8
create__Q49textinput8keyboard13cellphonetype4BaseFP12MEMAllocator = .text:0x8141711C; // type:function size:0xAC
init__Q49textinput8keyboard13cellphonetype4BaseFv = .text:0x814171C8; // type:function size:0xA8
calc__Q49textinput8keyboard13cellphonetype4BaseFv = .text:0x81417270; // type:function size:0x4
@@ -13986,8 +13986,8 @@ lbl_81616AE4 = .rodata:0x81616AE4; // type:object size:0x30
lbl_81616B14 = .rodata:0x81616B14; // type:object size:0x74
lbl_81616B88 = .rodata:0x81616B88; // type:object size:0x40
lbl_81616BC8 = .rodata:0x81616BC8; // type:object size:0x10 data:4byte
lbl_81616BD8 = .rodata:0x81616BD8; // type:object size:0xC
lbl_81616BE4 = .rodata:0x81616BE4; // type:object size:0xC
scCountryMap_EU = .rodata:0x81616BD8; // type:object size:0xC
scCountryMap_NonEU = .rodata:0x81616BE4; // type:object size:0xC
lbl_81616BF0 = .rodata:0x81616BF0; // type:object size:0x88
CHANSVmConstStringObjectUndefined = .rodata:0x81616C78; // type:object size:0x10
lbl_81616C88 = .rodata:0x81616C88; // type:object size:0x10
@@ -15655,15 +15655,15 @@ lbl_8164C424 = .data:0x8164C424; // type:object size:0xB data:string
lbl_8164C42F = .data:0x8164C42F; // type:object size:0xD data:string
lbl_8164C43C = .data:0x8164C43C; // type:object size:0xD data:string
lbl_8164C449 = .data:0x8164C449; // type:object size:0xD data:string
lbl_8164C458 = .data:0x8164C458; // type:object size:0xC data:4byte
scPaneName_T_CalMonth = .data:0x8164C458; // type:object size:0xC data:4byte
lbl_8164C464 = .data:0x8164C464; // type:object size:0x9 data:string
lbl_8164C46D = .data:0x8164C46D; // type:object size:0x9 data:string
lbl_8164C476 = .data:0x8164C476; // type:object size:0x9 data:string
lbl_8164C480 = .data:0x8164C480; // type:object size:0xC
scPaneName_N_Cal = .data:0x8164C480; // type:object size:0xC
lbl_8164C48C = .data:0x8164C48C; // type:object size:0xB data:string
lbl_8164C497 = .data:0x8164C497; // type:object size:0xB data:string
lbl_8164C4A2 = .data:0x8164C4A2; // type:object size:0xB data:string
lbl_8164C4B0 = .data:0x8164C4B0; // type:object size:0xC
scPaneName_N_CalPos = .data:0x8164C4B0; // type:object size:0xC
lbl_8164C4BC = .data:0x8164C4BC; // type:object size:0x43
lbl_8164C4FF = .data:0x8164C4FF; // type:object size:0xF data:string
lbl_8164C50E = .data:0x8164C50E; // type:object size:0x14 data:string
@@ -15673,11 +15673,11 @@ lbl_8164C54E = .data:0x8164C54E; // type:object size:0x18
lbl_8164C566 = .data:0x8164C566; // type:object size:0xC
lbl_8164C572 = .data:0x8164C572; // type:object size:0xA
__vt__Q33ipl5scene8Calendar = .data:0x8164C57C; // type:object size:0xA4
lbl_8164C620 = .data:0x8164C620; // type:object size:0xB data:string
lbl_8164C62C = .data:0x8164C62C; // type:object size:0x14 data:4byte
lbl_8164C640 = .data:0x8164C640; // type:object size:0x12 data:string
lbl_8164C652 = .data:0x8164C652; // type:object size:0xB data:string
lbl_8164C65D = .data:0x8164C65D; // type:object size:0x13 data:string
scN_CalDay_r = .data:0x8164C620; // type:object size:0xB data:string
scDateAnimPaneNames = .data:0x8164C62C; // type:object size:0x14 data:4byte
scMyIplTopFBrlan = .data:0x8164C640; // type:object size:0x12 data:string
scN_CalDay_t = .data:0x8164C652; // type:object size:0xB data:string
scSEDateFocus = .data:0x8164C65D; // type:object size:0x13 data:string
__vt__Q33ipl5scene4Date = .data:0x8164C670; // type:object size:0x18
@12712 = .data:0x8164C688; // type:object size:0xC scope:local data:string
...data.0 = .data:0x8164C688; // type:label scope:local
@@ -18149,7 +18149,7 @@ lbl_8166A6B1 = .data:0x8166A6B1; // type:object size:0xD data:string
lbl_8166A6BE = .data:0x8166A6BE; // type:object size:0xD data:string
lbl_8166A6CB = .data:0x8166A6CB; // type:object size:0xC data:string
lbl_8166A6D7 = .data:0x8166A6D7; // type:object size:0xC data:string
lbl_8166A6E3 = .data:0x8166A6E3; // type:object size:0x41 data:string
scCsFatalMsg = .data:0x8166A6E3; // type:object size:0x41 data:string
lbl_8166A728 = .data:0x8166A728; // type:object size:0xB data:string
lbl_8166A733 = .data:0x8166A733; // type:object size:0x9 data:string
lbl_8166A73C = .data:0x8166A73C; // type:object size:0xB data:string
@@ -20016,7 +20016,7 @@ lbl_81691040 = .data:0x81691040; // type:object size:0x2D0
lbl_81691310 = .data:0x81691310; // type:object size:0x3B data:string
lbl_8169134C = .data:0x8169134C; // type:object size:0x3DC
st_uhs_msc_blk_func = .data:0x81691728; // type:object size:0x20
__sdPathData = .data:0x81691748; // type:object size:0x50
lbl_81691748 = .data:0x81691748; // type:object size:0x50
lbl_81691798 = .data:0x81691798; // type:object size:0x16 data:string
lbl_816917B0 = .data:0x816917B0; // type:object size:0xD data:string
lbl_816917C0 = .data:0x816917C0; // type:object size:0x15 data:string
@@ -20741,7 +20741,7 @@ lbl_81694FA0 = .sdata2:0x81694FA0; // type:object size:0x7 data:string
lbl_81694FA7 = .sdata2:0x81694FA7; // type:object size:0x5 data:string
lbl_81694FAC = .sdata2:0x81694FAC; // type:object size:0xC align:4
lbl_81694FB8 = .sdata2:0x81694FB8; // type:object size:0x8 align:8 data:double
lbl_81694FC0 = .sdata2:0x81694FC0; // type:object size:0x4 align:4 data:float
scCsZeroF = .sdata2:0x81694FC0; // type:object size:0x4 align:4 data:float
@10105 = .sdata2:0x81694FC8; // type:object size:0x4 scope:local align:4 data:float
@9941 = .sdata2:0x81694FD0; // type:object size:0x8 scope:local data:4byte
@10304 = .sdata2:0x81694FD8; // type:object size:0x8 scope:local align:8 data:double
@@ -21785,11 +21785,11 @@ scPaneName_T_Stop = .sdata:0x816967B5; // type:object size:0x7 data:string
lbl_816967C0 = .sdata:0x816967C0; // type:object size:0x4 data:string
lbl_816967C4 = .sdata:0x816967C4; // type:object size:0x6 data:string
lbl_816967CA = .sdata:0x816967CA; // type:object size:0x7 data:string
lbl_816967D8 = .sdata:0x816967D8; // type:object size:0x6 data:string
lbl_816967DE = .sdata:0x816967DE; // type:object size:0x6 data:string
lbl_816967E4 = .sdata:0x816967E4; // type:object size:0x7 data:string
lbl_816967EB = .sdata:0x816967EB; // type:object size:0x7 data:string
lbl_816967F2 = .sdata:0x816967F2; // type:object size:0x6 data:string
scW_Cal = .sdata:0x816967D8; // type:object size:0x6 data:string
scT_Cal = .sdata:0x816967DE; // type:object size:0x6 data:string
scCal_Ac = .sdata:0x816967E4; // type:object size:0x7 data:string
scInfo_a = .sdata:0x816967EB; // type:object size:0x7 data:string
scB_Cal = .sdata:0x816967F2; // type:object size:0x6 data:string
@16087 = .sdata:0x816967F8; // type:object size:0x4 scope:local data:string
@16350 = .sdata:0x816967FC; // type:object size:0x7 scope:local data:string
@16351 = .sdata:0x81696803; // type:object size:0x7 scope:local data:string
@@ -22466,10 +22466,10 @@ lbl_81697824 = .sdata:0x81697824; // type:object size:0x8 data:string
lbl_8169782C = .sdata:0x8169782C; // type:object size:0x8 data:string
lbl_81697834 = .sdata:0x81697834; // type:object size:0x8 data:string
lbl_8169783C = .sdata:0x8169783C; // type:object size:0x8 data:string
lbl_81697844 = .sdata:0x81697844; // type:object size:0x1 data:byte
lbl_81697845 = .sdata:0x81697845; // type:object size:0x1 data:byte
lbl_81697846 = .sdata:0x81697846; // type:object size:0x1 data:byte
lbl_81697847 = .sdata:0x81697847; // type:object size:0x1 data:byte
scCsFatalColorR = .sdata:0x81697844; // type:object size:0x1 data:byte
scCsFatalColorG = .sdata:0x81697845; // type:object size:0x1 data:byte
scCsFatalColorB = .sdata:0x81697846; // type:object size:0x1 data:byte
scCsFatalColorA = .sdata:0x81697847; // type:object size:0x1 data:byte
lbl_81697848 = .sdata:0x81697848; // type:object size:0x8 data:string
lbl_81697850 = .sdata:0x81697850; // type:object size:0x6 data:string
lbl_81697858 = .sdata:0x81697858; // type:object size:0x6 data:string

View File

@@ -35,8 +35,8 @@ namespace ext_ead {
class SurfaceManager {
public:
static void CreateManager(int rectW0, int rectH0, int rectW1, int rectH1, void* mem1Buf, u32 mem1BufSize, void* mem2Buf, u32 mem2BufSize,
void* libBuf, const char* param_10);
static void CreateManager(int surfaceW, int surfaceH, int browserW, int browserH, void* mem1Buf, u32 mem1BufSize, void* mem2Buf, u32 mem2BufSize,
void* libBuf, const char* arcPath);
static void DisposeManager();
static void RegisterArcFile(void* fileBuf);

View File

@@ -167,12 +167,12 @@ namespace ipl {
bool is_stopped_all_anm() const;
void fn_81409864();
void calc_exit_sequence();
void fn_814098F4();
void fn_unk_inline();
void fn_81409988();
void fn_814099EC();
void prepare_exit_abort();
void wait_decide_se();
void start_exit_fade();
void finish_exit_reboot();
int mState; // 0x60
int mPrevState; // 0x64

View File

@@ -92,7 +92,7 @@ namespace ipl {
void read_sd_app_location_async(ESTitleId32* titleIds);
void check_for_sd_app_to_nand_async(ESTitleId titleId, AppBlocksInfo* usedBlocks, AppBlocksInfo* freeBlocks);
void check_backup_fits_async(TitleIdList* newTitles, TitleIdList* replacingTitles);
void iplNandSD_81348EA8(void* ptrA, void* ptrB, void* ptrC);
void check_sd_app_titles_async(void* ptrA, void* ptrB, void* ptrC);
void list_nand_apps_usage_async(void* ptrA, void* ptr);
@@ -514,7 +514,7 @@ namespace ipl {
void do_check_for_sd_app_to_nand();
void check_backup_fits();
void do_list_nand_apps_usage();
void do_unk_8134C838();
void do_check_sd_app_titles();
void do_move_nand_app_to_sd();
void do_move_sd_app_to_nand();

View File

@@ -40,7 +40,7 @@ ISD_Error ISD_ProbeCard(u32 slot);
ISD_Error ISD_MountCard(u32 slot, SDDev** dev);
ISD_Error ISD_UnmountCard(SDDev* dev);
ISD_Error ISD_GetHCRegister(SDDev* dev, u32 param_2, u32* param_3, u32 param_4) NO_INLINE;
ISD_Error ISD_GetHCRegister(SDDev* dev, u32 reg, u32* outValue, u32 size) NO_INLINE;
ISD_Error ISD_ReadBlock(SDDev* dev, u32 offset, u8* cmdResp, u32 cmdRespSize);
ISD_Error ISD_WriteBlock(SDDev* dev, u32 offset, u8* cmdResp, u32 cmdRespSize);

View File

@@ -15,7 +15,7 @@
#define SD_SLOT_PATH_LENGTH 32
char __sdPathData[] = " +++ SD RESET Failed: %d +++\n\0"
char lbl_81691748[] = " +++ SD RESET Failed: %d +++\n\0"
"/dev/sdio/slot0\0/dev/sdio/slot1\0/dev/sdio/slotw";
typedef void (*SDCallbackFunc)(s32, void*);
@@ -55,17 +55,17 @@ enum {
static IOSFd sduOpenFD(u32 slot);
static IOSError sduCommandv(s32 fd, u32 cmd, u32 cmdType, u32 respType, u32 arg, u32 buffer, u32 blockCount, u32 sectorSize, u32 param_9, u32* resp,
static IOSError sduCommandv(s32 fd, u32 cmd, u32 cmdType, u32 respType, u32 arg, u32 buffer, u32 blockCount, u32 sectorSize, u32 dma, u32* resp,
void* cb, void* cbArg);
static ISD_Error sduCommand(s32 fd, u32 cmd, u32 cmdType, u32 respType, u32 arg, u32 buffer, u32 blockCount, u32 sectorSize, u32 param_9, u32* resp,
static ISD_Error sduCommand(s32 fd, u32 cmd, u32 cmdType, u32 respType, u32 arg, u32 buffer, u32 blockCount, u32 sectorSize, u32 dma, u32* resp,
void* cb, void* cbArg);
static ISD_Error sduDatabuswidth(SDDev* dev, u32 buswidth);
static ISD_Error sduGetSCR(SDDev* dev, u32* data) NO_INLINE;
static ISD_Error sduGetOCR(SDDev* dev, u32* data);
extern ISD_Error ISD_ReadMultiBlockAsync(SDDev* dev, u32 offset, u8* cmdResp, u32 cmdRespSize, u32 param_5, u32 param_6);
extern ISD_Error ISD_WriteMultiBlockAsync(SDDev* dev, u32 offset, u8* cmdResp, u32 cmdRespSize, u32 param_5, u32 param_6);
ISD_Error ISD_GetCardSize(SDDev* dev, u32* param_2, u32* param_3, u32* param_4);
extern ISD_Error ISD_ReadMultiBlockAsync(SDDev* dev, u32 offset, u8* cmdResp, u32 cmdRespSize, u32 callback, u32 callbackArg);
extern ISD_Error ISD_WriteMultiBlockAsync(SDDev* dev, u32 offset, u8* cmdResp, u32 cmdRespSize, u32 callback, u32 callbackArg);
ISD_Error ISD_GetCardSize(SDDev* dev, u32* outSize, u32* outSize2, u32* outSectorSize);
IOSError __sdCb(s32 result, void* arg) {
__sdCbArg* data = (__sdCbArg*)arg;
@@ -73,7 +73,7 @@ IOSError __sdCb(s32 result, void* arg) {
switch (data->unk_0x0C) {
case 4: {
if (result != 0) {
OSReport(__sdPathData, result);
OSReport(lbl_81691748, result);
data->dev->SDDevRca = 0;
} else {
if (data->dev != NULL) {
@@ -106,33 +106,33 @@ IOSError __sdCb(s32 result, void* arg) {
return result;
}
ISD_Error ISD_GetHCRegister(SDDev* dev, u32 param_2, u32* param_3, u32 param_4) {
ISD_Error ISD_GetHCRegister(SDDev* dev, u32 reg, u32* outValue, u32 size) {
IOSError ret;
if (__sdHeapId[0] < 0) {
return SD_ERROR_FATAL;
}
__sdReg[0] = param_2;
__sdReg[3] = param_4;
__sdReg[0] = reg;
__sdReg[3] = size;
__sdReg[4] = 0;
if (param_3 != NULL) {
if (outValue != NULL) {
ret = IOS_Ioctl(dev->SDDevFd, SD_IOCTL_2, __sdReg, 0x18, __sdCmdBuffer, 4);
if (ret != IPC_RESULT_OK) {
return SD_ERROR_FATAL;
}
*param_3 = *__sdCmdBuffer;
*outValue = *__sdCmdBuffer;
return ret;
}
return SD_ERROR_FATAL;
}
ISD_Error ISD_GetDeviceStatus(SDDev* dev, u32* param_2) {
ISD_Error ISD_GetDeviceStatus(SDDev* dev, u32* status) {
IOSError ret = SD_ERROR_FATAL;
if (__sdHeapId[0] >= 0 && param_2 != NULL) {
if (__sdHeapId[0] >= 0 && status != NULL) {
OSLockMutex(&__reqMutex);
if (__sdReq != 0) {
@@ -145,7 +145,7 @@ ISD_Error ISD_GetDeviceStatus(SDDev* dev, u32* param_2) {
if (ret != IPC_RESULT_OK) {
__sdReq = 0;
} else {
*param_2 = *__sdCmdBuffer;
*status = *__sdCmdBuffer;
__sdReq = 0;
}
}
@@ -154,13 +154,13 @@ ISD_Error ISD_GetDeviceStatus(SDDev* dev, u32* param_2) {
return ret;
}
static IOSError sduCommandv(s32 fd, u32 cmd, u32 cmdType, u32 respType, u32 arg, u32 buffer, u32 blockCount, u32 sectorSize, u32 param_9, u32* resp,
static IOSError sduCommandv(s32 fd, u32 cmd, u32 cmdType, u32 respType, u32 arg, u32 buffer, u32 blockCount, u32 sectorSize, u32 dma, u32* resp,
void* cb, void* cbArg) {
IOSError ret;
u32 readCount, writeCount;
u32* sdCmd;
if (param_9 != 0) {
if (dma != 0) {
readCount = 2;
writeCount = 1;
} else {
@@ -216,7 +216,7 @@ static IOSError sduCommandv(s32 fd, u32 cmd, u32 cmdType, u32 respType, u32 arg,
return ret;
}
static ISD_Error sduCommand(s32 fd, u32 cmd, u32 cmdType, u32 respType, u32 arg, u32 buffer, u32 blockCount, u32 sectorSize, u32 param_9, u32* resp,
static ISD_Error sduCommand(s32 fd, u32 cmd, u32 cmdType, u32 respType, u32 arg, u32 buffer, u32 blockCount, u32 sectorSize, u32 dma, u32* resp,
void* cb, void* cbArg) {
ISD_Error ret;
u32* sdCmd;
@@ -232,7 +232,7 @@ static ISD_Error sduCommand(s32 fd, u32 cmd, u32 cmdType, u32 respType, u32 arg,
sdCmd[6] = buffer;
sdCmd[4] = blockCount;
sdCmd[5] = sectorSize;
sdCmd[7] = param_9;
sdCmd[7] = dma;
if (resp != NULL) {
if (cb != NULL) {
@@ -365,7 +365,7 @@ ISD_Error ISD_WriteMultiBlock(SDDev* dev, u32 offset, u8* cmdResp, u32 cmdRespSi
return ISD_WriteMultiBlockAsync(dev, offset, cmdResp, cmdRespSize, 0, 0);
}
ISD_Error ISD_ReadMultiBlockAsync(SDDev* dev, u32 offset, u8* cmdResp, u32 cmdRespSize, u32 param_5, u32 param_6) {
ISD_Error ISD_ReadMultiBlockAsync(SDDev* dev, u32 offset, u8* cmdResp, u32 cmdRespSize, u32 callback, u32 callbackArg) {
ISD_Error ret;
u32 status;
@@ -435,12 +435,12 @@ ISD_Error ISD_ReadMultiBlockAsync(SDDev* dev, u32 offset, u8* cmdResp, u32 cmdRe
DCInvalidateRange(cmdResp, cmdRespSize << 9);
ret = sduCommandv(dev->SDDevFd, 0x12, 3, 1, offset, (u32)cmdResp, cmdRespSize, 0x200, 1, __sdResp2, (void*)param_5, (void*)param_6);
ret = sduCommandv(dev->SDDevFd, 0x12, 3, 1, offset, (u32)cmdResp, cmdRespSize, 0x200, 1, __sdResp2, (void*)callback, (void*)callbackArg);
if (ret != IPC_RESULT_OK) {
__sdReq = 0;
}
if (param_5 == 0) {
if (callback == 0) {
__sdReq = 0;
}
}
@@ -449,7 +449,7 @@ out:
return ret;
}
ISD_Error ISD_WriteMultiBlockAsync(SDDev* dev, u32 offset, u8* cmdResp, u32 cmdRespSize, u32 param_5, u32 param_6) {
ISD_Error ISD_WriteMultiBlockAsync(SDDev* dev, u32 offset, u8* cmdResp, u32 cmdRespSize, u32 callback, u32 callbackArg) {
ISD_Error ret;
u32 status;
@@ -519,12 +519,12 @@ ISD_Error ISD_WriteMultiBlockAsync(SDDev* dev, u32 offset, u8* cmdResp, u32 cmdR
DCFlushRange(cmdResp, cmdRespSize << 9);
ret = sduCommand(dev->SDDevFd, 0x19, 3, 1, offset, (u32)cmdResp, cmdRespSize, 0x200, 1, __sdResp2, (void*)param_5, (void*)param_6);
ret = sduCommand(dev->SDDevFd, 0x19, 3, 1, offset, (u32)cmdResp, cmdRespSize, 0x200, 1, __sdResp2, (void*)callback, (void*)callbackArg);
if (ret != IPC_RESULT_OK) {
__sdReq = 0;
}
if (param_5 == 0) {
if (callback == 0) {
__sdReq = 0;
}
}
@@ -570,7 +570,7 @@ ISD_Error ISD_UnmountCard(SDDev* dev) {
ISD_Error ISD_InitCard() {
static u8* lo;
char* paths = __sdPathData;
char* paths = lbl_81691748;
ISD_Error ret = SD_ERROR_SUCCESS;
BOOL enabled;
@@ -782,7 +782,7 @@ static ISD_Error sduGetOCR(SDDev* dev, u32* data) {
}
#ifdef __MWERKS__
asm ISD_Error ISD_GetCardSize(register SDDev* dev, register u32* param_2, register u32* param_3, register u32* param_4) {
asm ISD_Error ISD_GetCardSize(register SDDev* dev, register u32* outSize, register u32* outSize2, register u32* outSectorSize) {
nofralloc
stwu r1, -0x30(r1)
@@ -859,13 +859,13 @@ ISD_GetCardSize_store:
stw r5, 0x18(r28)
stw r0, 0x1c(r28)
stw r3, 0x20(r28)
beq ISD_GetCardSize_no_param2
beq ISD_GetCardSize_no_outSize
stw r3, 0(r29)
ISD_GetCardSize_no_param2:
ISD_GetCardSize_no_outSize:
cmpwi r30, 0
beq ISD_GetCardSize_no_param3
beq ISD_GetCardSize_no_outSize2
stw r3, 0(r30)
ISD_GetCardSize_no_param3:
ISD_GetCardSize_no_outSize2:
cmpwi r31, 0
beq ISD_GetCardSize_success_return
li r0, 0x200
@@ -884,7 +884,7 @@ ISD_GetCardSize_return:
blr
}
#else
ISD_Error ISD_GetCardSize(SDDev* dev, u32* param_2, u32* param_3, u32* param_4) {
ISD_Error ISD_GetCardSize(SDDev* dev, u32* outSize, u32* outSize2, u32* outSectorSize) {
ISD_Error ret;
u32 out0;
u32 out1;
@@ -915,14 +915,14 @@ ISD_Error ISD_GetCardSize(SDDev* dev, u32* param_2, u32* param_3, u32* param_4)
dev->SDSectorNum = out1;
dev->SDDevSize = out2;
if (param_2 != NULL) {
*param_2 = out2;
if (outSize != NULL) {
*outSize = out2;
}
if (param_3 != NULL) {
*param_3 = out2;
if (outSize2 != NULL) {
*outSize2 = out2;
}
if (param_4 != NULL) {
*param_4 = 512;
if (outSectorSize != NULL) {
*outSectorSize = 512;
}
return SD_ERROR_SUCCESS;

View File

@@ -8,10 +8,10 @@ extern u32 CDBGetInitialCode();
extern void CDBLock();
extern CDBErr CDBDatabaseAllocate(CDBDatabase* database, u32 flags);
extern void CDBUnlock();
extern void CDBDatabaseFree();
extern CDBErr CDBDatabaseFree(CDBDatabase* database);
extern void CDBRecordCreateAtOnce();
extern void CDBRecordInitDescriptor();
extern void CDBRecordIsExistFile();
extern void CDBRecordInitDescriptor(CDBRecord* record, CDBDatabase* database, CDBRecordKey* key);
extern BOOL CDBRecordIsExistFile(CDBRecord* record);
extern void CDBRecordOpenReadOnly();
extern void CDBRecordKeyArrayInit();
extern void CDBRecordKeyArraySetReverse();
@@ -157,59 +157,27 @@ CDBErr CDBDatabaseOpen(CDBDatabase* database) {
return result;
}
asm CDBErr CDBDatabaseClose(CDBDatabase* database) {
#ifdef __MWERKS__
nofralloc
stwu r1, -0x10(r1)
mflr r0
stw r0, 0x14(r1)
stw r31, 0xc(r1)
stw r30, 0x8(r1)
mr r30, r3
bl CDBLock
lwz r31, 0x8(r30)
cmpwi r31, 0x0
beq L_8148746C
addis r3, r31, 0x1
lwz r0, -0x3ff0(r3)
cmpwi r0, 0x0
bne L_8148749C
L_8148746C:
li r3, 0x2
bl CDBIsPrintDebugMessage
cmpwi r3, 0x0
beq L_81487494
li r3, 0x2
bl CDBReport_
lis r3, lbl_8166B528@ha
addi r3, r3, lbl_8166B528@l
crclr 4*cr1+eq
bl OSReport
L_81487494:
li r31, 0x1b
b L_814874C4
L_8148749C:
mr r3, r30
bl CDBDatabaseFree
cmpwi r3, 0x0
beq L_814874B4
mr r31, r3
b L_814874C4
L_814874B4:
addis r3, r31, 0x1
li r0, 0x0
stw r0, -0x3ff0(r3)
li r31, 0x0
L_814874C4:
bl CDBUnlock
mr r3, r31
lwz r31, 0xc(r1)
lwz r30, 0x8(r1)
lwz r0, 0x14(r1)
mtlr r0
addi r1, r1, 0x10
blr
#endif
CDBErr CDBDatabaseClose(CDBDatabase* database) {
CDBErr result;
CDBErr status;
CDBDatabaseState* instance;
CDBLock();
instance = database->instance;
if (instance == NULL || instance->flags == 0) {
CDBReportError(lbl_8166B528);
result = CDB_ERROR_27;
} else {
status = CDBDatabaseFree(database);
if (status != CDB_ERROR_OK) {
result = status;
} else {
instance->flags = 0;
result = CDB_ERROR_OK;
}
}
CDBUnlock();
return result;
}
CDBErr CDBDatabasePrivateCreateRecordAtOnce(CDBDatabase* database, CDBRecord* record, const char* typeStr, const char* fileTypeStr, u8* recordData, u32 recordDataSize, char* makerCodeStr, char* gameCodeStr) {
@@ -525,72 +493,24 @@ asm CDBErr CDBDatabaseCreateRecordImAtOnce_() {
#endif
}
asm CDBErr CDBDatabaseFindByKey() {
#ifdef __MWERKS__
nofralloc
stwu r1, -0x20(r1)
mflr r0
stw r0, 0x24(r1)
stw r31, 0x1c(r1)
mr r31, r5
stw r30, 0x18(r1)
mr r30, r4
stw r29, 0x14(r1)
mr r29, r3
bl CDBLock
mr r3, r31
bl CDBRecordKeyIsValid
cmpwi r3, 0x0
bne L_81487ABC
li r3, 0x2
bl CDBIsPrintDebugMessage
cmpwi r3, 0x0
beq L_81487AB4
li r3, 0x2
bl CDBReport_
lis r3, lbl_8166B5A8@ha
addi r3, r3, lbl_8166B5A8@l
crclr 4*cr1+eq
bl OSReport
L_81487AB4:
li r31, 0x5
b L_81487B14
L_81487ABC:
mr r3, r30
mr r4, r29
mr r5, r31
bl CDBRecordInitDescriptor
mr r3, r30
bl CDBRecordIsExistFile
cmpwi r3, 0x0
bne L_81487B10
li r3, 0x2
bl CDBIsPrintDebugMessage
cmpwi r3, 0x0
beq L_81487B08
li r3, 0x2
bl CDBReport_
lis r3, lbl_8166B5B8@ha
mr r4, r31
addi r3, r3, lbl_8166B5B8@l
crclr 4*cr1+eq
bl OSReport
L_81487B08:
li r31, 0x23
b L_81487B14
L_81487B10:
li r31, 0x0
L_81487B14:
bl CDBUnlock
mr r3, r31
lwz r31, 0x1c(r1)
lwz r30, 0x18(r1)
lwz r29, 0x14(r1)
lwz r0, 0x24(r1)
mtlr r0
addi r1, r1, 0x20
blr
#endif
CDBErr CDBDatabaseFindByKey(CDBDatabase* database, CDBRecord* record, CDBRecordKey* recordKey) {
CDBErr result;
CDBLock();
if (!CDBRecordKeyIsValid(recordKey)) {
CDBReportError(lbl_8166B5A8);
result = CDB_ERROR_5;
} else {
CDBRecordInitDescriptor(record, database, recordKey);
if (!CDBRecordIsExistFile(record)) {
CDBReportError(lbl_8166B5B8, recordKey->keyString);
result = CDB_ERROR_CANNOT_OPEN_FILE;
} else {
result = CDB_ERROR_OK;
}
}
CDBUnlock();
return result;
}
CDBErr CDBDatabaseSearchConditionsIsMatch(CDBSearchConditions* conditions, char* key) {

View File

@@ -371,9 +371,9 @@ static BOOL NHTTPi_RecvProxyConnectHeader(NHTTPThreadContext* context)
response->httpStatus = NHTTPi_strToInt(header + 9, 3);
if (NHTTPi_strnicmp(header, "HTTP/", 5) == 0 && header[8] == ' '
&& response->httpStatus == 200) accepted = TRUE;
ended = FALSE;
cursor = header;
index = 0;
ended = FALSE;
while (index < used)
{
if (index > 1 && cursor[-1] == '\r' && *cursor == '\r') ended = TRUE;

View File

@@ -1,19 +1,19 @@
#include <revolution/gx/GXStruct.h>
#include <revolution/os/OSError.h>
extern "C" const char lbl_8166A6E3[];
extern "C" const u8 lbl_81697844;
extern "C" const u8 lbl_81697845;
extern "C" const u8 lbl_81697846;
extern "C" const u8 lbl_81697847;
extern "C" const char scCsFatalMsg[];
extern "C" const u8 scCsFatalColorR;
extern "C" const u8 scCsFatalColorG;
extern "C" const u8 scCsFatalColorB;
extern "C" const u8 scCsFatalColorA;
#define NW4R_DB_ASSERT_H
#define NW4R_ASSERT(x) \
{ \
if (!(x)) { \
GXColor front = {lbl_81697844, lbl_81697845, lbl_81697846, lbl_81697847}; \
GXColor front = {scCsFatalColorR, scCsFatalColorG, scCsFatalColorB, scCsFatalColorA}; \
GXColor back = {0, 0, 0, 0}; \
OSFatal((GXColor)front, (GXColor)back, lbl_8166A6E3); \
OSFatal((GXColor)front, (GXColor)back, scCsFatalMsg); \
} \
}
@@ -29,7 +29,7 @@ extern "C" const u8 lbl_81697847;
#include "math/iplMathTypes.h"
extern "C" const f32 lbl_81694FC0 = 0.0f;
extern "C" const f32 scCsZeroF = 0.0f;
extern "C" nw4r::ut::Color GetTextColor__Q34nw4r3lyt7TextBoxCFUl(const nw4r::lyt::TextBox*, u32);
@@ -130,7 +130,7 @@ namespace ipl {
nw4r::math::VEC2 scale;
scale.x = pane->GetScale().x;
scale.y = pane->GetScale().y;
result = vec3::_ctor(VmInst, VmReturnObj, scale.x, scale.y, lbl_81694FC0) == TRUE;
result = vec3::_ctor(VmInst, VmReturnObj, scale.x, scale.y, scCsZeroF) == TRUE;
}
}
return result;
@@ -514,7 +514,7 @@ namespace ipl {
nw4r::math::VEC3 get_vec_(CHANSVm* vm) {
u32 argc = CHANSVmGetArgc(vm);
CHANSVmObjHdr* arg = CHANSVmGetArg(vm, 0);
nw4r::math::VEC3 out(lbl_81694FC0, lbl_81694FC0, lbl_81694FC0);
nw4r::math::VEC3 out(scCsZeroF, scCsZeroF, scCsZeroF);
if (argc == 1 && util::is_valid_class(arg, "VEC3")) {
f32* src = static_cast<f32*>(*arg->value.ptr_v);
out.x = src[0];
@@ -540,7 +540,7 @@ namespace ipl {
nw4r::lyt::Size get_size_(CHANSVm* vm) {
u32 argc = CHANSVmGetArgc(vm);
CHANSVmObjHdr* arg = CHANSVmGetArg(vm, 0);
nw4r::lyt::Size out(lbl_81694FC0, lbl_81694FC0);
nw4r::lyt::Size out(scCsZeroF, scCsZeroF);
if (argc == 1 && util::is_valid_class(arg, "Size")) {
f32* src = static_cast<f32*>(*arg->value.ptr_v);
out.width = src[0];
@@ -622,15 +622,15 @@ namespace ipl {
namespace pane {
#pragma push
#pragma section const_type ".data"
extern "C" const char lbl_8166A6E3[] = "Error#004\nAn error has occurred.\nThe system files are corrupted.";
extern "C" const char scCsFatalMsg[] = "Error#004\nAn error has occurred.\nThe system files are corrupted.";
#pragma pop
#pragma push
#pragma section data_type ".sdata"
extern "C" __declspec(section ".sdata") const u8 lbl_81697844 = 0xff;
extern "C" __declspec(section ".sdata") const u8 lbl_81697845 = 0xff;
extern "C" __declspec(section ".sdata") const u8 lbl_81697846 = 0xff;
extern "C" __declspec(section ".sdata") const u8 lbl_81697847 = 0;
extern "C" __declspec(section ".sdata") const u8 scCsFatalColorR = 0xff;
extern "C" __declspec(section ".sdata") const u8 scCsFatalColorG = 0xff;
extern "C" __declspec(section ".sdata") const u8 scCsFatalColorB = 0xff;
extern "C" __declspec(section ".sdata") const u8 scCsFatalColorA = 0;
#pragma pop
}
}

View File

@@ -526,8 +526,8 @@ extern const u8 controlKeys[];
return false;
}
extern "C" const u8 lbl_81616BD8[] = {0x0f, 0x21, 0x20, 0x08, 0x09, 0x0e, 0x19, 0x00, 0x21, 0x21, 0x00, 0x00};
extern "C" const u8 lbl_81616BE4[] = {0x0f, 0x21, 0x20, 0x04, 0x09, 0x0e, 0x11, 0x00, 0x21, 0x21, 0x00, 0x00};
extern "C" const u8 scCountryMap_EU[] = {0x0f, 0x21, 0x20, 0x08, 0x09, 0x0e, 0x19, 0x00, 0x21, 0x21, 0x00, 0x00};
extern "C" const u8 scCountryMap_NonEU[] = {0x0f, 0x21, 0x20, 0x04, 0x09, 0x0e, 0x11, 0x00, 0x21, 0x21, 0x00, 0x00};
const u8 controlKeys[] = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x09, 0x01, 0x0a, 0x03,
@@ -640,16 +640,16 @@ const u8 controlKeys[] = {
nofralloc
cmpwi r4, 2
bne setLanguage_L1
lis r4, lbl_81616BD8@ha
lis r4, scCountryMap_EU@ha
lis r3, sInstance__Q39textinput5input10HKBManager@ha
addi r4, r4, lbl_81616BD8@l
addi r4, r4, scCountryMap_EU@l
lbzx r4, r4, r5
addi r3, r3, sInstance__Q39textinput5input10HKBManager@l
b SetCountry__Q39textinput5input10HKBManagerFUc
setLanguage_L1:
lis r4, lbl_81616BE4@ha
lis r4, scCountryMap_NonEU@ha
lis r3, sInstance__Q39textinput5input10HKBManager@ha
addi r4, r4, lbl_81616BE4@l
addi r4, r4, scCountryMap_NonEU@l
lbzx r4, r4, r5
addi r3, r3, sInstance__Q39textinput5input10HKBManager@l
b SetCountry__Q39textinput5input10HKBManagerFUc

View File

@@ -215,19 +215,19 @@ namespace ipl {
MESG_CALENDAR_DEC,
};
static const char* lbl_8164C458[] = {
static const char* scPaneName_T_CalMonth[] = {
"T_CalMonth_a",
"T_CalMonth_b",
"T_CalMonth_c",
};
static const char* lbl_8164C480[] = {
static const char* scPaneName_N_Cal[] = {
"N_Cal_a1",
"N_Cal_b1",
"N_Cal_c1",
};
static const char* lbl_8164C4B0[] = {
static const char* scPaneName_N_CalPos[] = {
"N_CalPos_a",
"N_CalPos_b",
"N_CalPos_c",
@@ -661,9 +661,9 @@ namespace ipl {
utility::Calendar::getLastMonth(*mpBoardDate, &last);
utility::Calendar::getNextMonth(*mpBoardDate, &next);
set_textbox_month(lbl_8164C458[0], last);
set_textbox_month(lbl_8164C458[1], *mpBoardDate);
set_textbox_month(lbl_8164C458[2], next);
set_textbox_month(scPaneName_T_CalMonth[0], last);
set_textbox_month(scPaneName_T_CalMonth[1], *mpBoardDate);
set_textbox_month(scPaneName_T_CalMonth[2], next);
}
void Calendar::set_textbox_month(const char* paneName, const utility::Date& date) {
@@ -714,31 +714,31 @@ namespace ipl {
OSCalendarTime curTime = System::getCurrentTime();
utility::Date local_64(curTime.year, curTime.mon + 1, curTime.mday);
utility::Date local_70;
utility::Date local_7c;
utility::Date todayDate(curTime.year, curTime.mon + 1, curTime.mday);
utility::Date lastMonth;
utility::Date nextMonth;
utility::Calendar::getLastMonth(date, &local_70);
utility::Calendar::getNextMonth(date, &local_7c);
utility::Calendar::getLastMonth(date, &lastMonth);
utility::Calendar::getNextMonth(date, &nextMonth);
int dateIndex;
int iVar10;
int weekOffset;
if (mbAsian || mbUSA) {
iVar10 = 6 - utility::Calendar::getWeek(date.year, date.month, maxDays);
weekOffset = 6 - utility::Calendar::getWeek(date.year, date.month, maxDays);
} else {
week--;
if (week < 0) {
week = 6;
}
iVar10 = 6 - (utility::Calendar::getWeek(date.year, date.month, maxDays) - 1);
if (iVar10 >= 7) {
iVar10 = 0;
weekOffset = 6 - (utility::Calendar::getWeek(date.year, date.month, maxDays) - 1);
if (weekOffset >= 7) {
weekOffset = 0;
}
}
dateIndex = unk == 1 ? 0 : DATE_COUNT;
utility::Date local_88;
utility::Date cellDate;
u32 attr;
int val2;
@@ -750,25 +750,25 @@ namespace ipl {
val = (maxDays + week);
attr = 0;
val2 = (iVar10 + val);
val2 = (weekOffset + val);
if ((week - i) > 0) {
local_88.year = local_70.year;
local_88.month = local_70.month;
local_88.day = i + (local_70.day - week) + 1;
cellDate.year = lastMonth.year;
cellDate.month = lastMonth.month;
cellDate.day = i + (lastMonth.day - week) + 1;
goto out;
}
if ((val - i) > 0) {
local_88.year = date.year;
local_88.month = date.month;
local_88.day = (i - week) + 1;
cellDate.year = date.year;
cellDate.month = date.month;
cellDate.day = (i - week) + 1;
attr |= 2;
if (local_88 == local_64) {
if (cellDate == todayDate) {
attr |= 1;
}
switch (utility::Calendar::getWeek(local_88.year, local_88.month, local_88.day)) {
switch (utility::Calendar::getWeek(cellDate.year, cellDate.month, cellDate.day)) {
case 6: {
attr |= 8;
break;
@@ -782,9 +782,9 @@ namespace ipl {
}
if ((val2 - i) > 0) {
local_88.year = local_7c.year;
local_88.month = local_7c.month;
local_88.day = ((i - maxDays) - week) + 1;
cellDate.year = nextMonth.year;
cellDate.month = nextMonth.month;
cellDate.day = ((i - maxDays) - week) + 1;
goto out;
} else {
dateScn->setVisible(false);
@@ -792,14 +792,14 @@ namespace ipl {
}
out:
dateScn->setDate(local_88);
dateScn->setDate(cellDate);
dateScn->setAttribute(attr);
}
}
void Calendar::set_date_pos(int unk) {
nw4r::lyt::Pane* pane1 = mpLayout->FindPaneByName(lbl_8164C480[unk]);
nw4r::lyt::Pane* pane2 = mpLayout->FindPaneByName(lbl_8164C4B0[unk]);
nw4r::lyt::Pane* pane1 = mpLayout->FindPaneByName(scPaneName_N_Cal[unk]);
nw4r::lyt::Pane* pane2 = mpLayout->FindPaneByName(scPaneName_N_CalPos[unk]);
int dateIndex = unk == 1 ? 0 : DATE_COUNT;
@@ -807,14 +807,14 @@ namespace ipl {
Date* dateScn = ((Date*)nw4r::ut::List_GetNth(&mDateList, dateIndex));
dateIndex++;
nw4r::math::VEC3 local_68;
local_68.x = ((u16)i % 7) * 0x46;
local_68.y = ((u16)i / 7) * -0x30;
local_68.z = 0.0f;
nw4r::math::VEC3 cellPos;
cellPos.x = ((u16)i % 7) * 0x46;
cellPos.y = ((u16)i / 7) * -0x30;
cellPos.z = 0.0f;
MTXMultVec(pane2->GetGlobalMtx(), local_68, local_68);
MTXMultVec(pane2->GetGlobalMtx(), cellPos, cellPos);
dateScn->setTranslate(local_68);
dateScn->setTranslate(cellPos);
dateScn->setRotate(pane1->GetRotate());
}
}

View File

@@ -7,40 +7,40 @@
namespace ipl {
namespace scene {
extern "C" char lbl_816967D8[];
extern "C" char lbl_816967DE[];
extern "C" char lbl_816967E4[];
extern "C" char lbl_816967EB[];
extern "C" char lbl_816967F2[];
extern "C" char scW_Cal[];
extern "C" char scT_Cal[];
extern "C" char scCal_Ac[];
extern "C" char scInfo_a[];
extern "C" char scB_Cal[];
#pragma push
#pragma section const_type ".data"
extern "C" const char lbl_8164C620[] = "N_CalDay_r";
extern "C" const char scN_CalDay_r[] = "N_CalDay_r";
#pragma pop
// clang-format off
extern "C" const char* lbl_8164C62C[Date::ANIM_PANE_MAX] = {
lbl_8164C620,
lbl_816967D8,
lbl_816967DE,
lbl_816967E4,
lbl_816967EB,
extern "C" const char* scDateAnimPaneNames[Date::ANIM_PANE_MAX] = {
scN_CalDay_r,
scW_Cal,
scT_Cal,
scCal_Ac,
scInfo_a,
};
#pragma push
#pragma section const_type ".data"
extern "C" const char lbl_8164C640[] = "my_IplTop_f.brlan";
extern "C" const char lbl_8164C652[] = "N_CalDay_t";
extern "C" const char lbl_8164C65D[] = "WIPL_SE_DATE_FOCUS";
extern "C" const char scMyIplTopFBrlan[] = "my_IplTop_f.brlan";
extern "C" const char scN_CalDay_t[] = "N_CalDay_t";
extern "C" const char scSEDateFocus[] = "WIPL_SE_DATE_FOCUS";
#pragma pop
#pragma push
#pragma section const_type ".sdata"
extern "C" char lbl_816967D8[] = "W_Cal";
extern "C" char lbl_816967DE[] = "T_Cal";
extern "C" char lbl_816967E4[] = "Cal_Ac";
extern "C" char lbl_816967EB[] = "Info_a";
extern "C" char lbl_816967F2[] = "B_Cal";
extern "C" char scW_Cal[] = "W_Cal";
extern "C" char scT_Cal[] = "T_Cal";
extern "C" char scCal_Ac[] = "Cal_Ac";
extern "C" char scInfo_a[] = "Info_a";
extern "C" char scB_Cal[] = "B_Cal";
#pragma pop
static const Date::AnmFrame scAnmFrame[] = {
@@ -73,7 +73,7 @@ namespace ipl {
// Bind animations
for (int i = 0; i < ANIM_PANE_MAX; i++) {
mpPaneAnims[i] = mpLayout->bind(lbl_8164C640, lbl_8164C62C[i], false);
mpPaneAnims[i] = mpLayout->bind(scMyIplTopFBrlan, scDateAnimPaneNames[i], false);
}
mpLayout->finishBinding();
@@ -81,7 +81,7 @@ namespace ipl {
mpGui = new gui::PaneManager(this, mpLayout->getDrawInfo(), NULL, NULL);
mpGui->setupScene(mpLayout);
mpGui->setAllComponentTriggerTarget(false);
mpGui->setTriggerTarget(mpLayout->FindPaneByName(lbl_816967F2), true);
mpGui->setTriggerTarget(mpLayout->FindPaneByName(scB_Cal), true);
// Init date
mpDate = new utility::Date();
@@ -128,19 +128,19 @@ namespace ipl {
}
void Date::setRotate(const nw4r::math::VEC3& vec) {
mpLayout->FindPaneByName(lbl_8164C652)->SetRotate(vec);
mpLayout->FindPaneByName(scN_CalDay_t)->SetRotate(vec);
}
void Date::setTranslate(const nw4r::math::VEC3& vec) {
mpLayout->FindPaneByName(lbl_8164C652)->SetTranslate(vec);
mpLayout->FindPaneByName(scN_CalDay_t)->SetTranslate(vec);
}
void Date::setVisible(bool visible) {
mpLayout->FindPaneByName(lbl_8164C62C[0])->SetVisible(visible);
mpLayout->FindPaneByName(scDateAnimPaneNames[0])->SetVisible(visible);
}
bool Date::getVisible() {
return mpLayout->FindPaneByName(lbl_8164C62C[0])->IsVisible();
return mpLayout->FindPaneByName(scDateAnimPaneNames[0])->IsVisible();
}
void Date::setAttribute(int attr) {
@@ -209,13 +209,13 @@ namespace ipl {
}
void Date::start_point_event(const char* paneName, controller::Interface* con) {
if (strcmp(paneName, lbl_816967F2) == 0) {
if (strcmp(paneName, scB_Cal) == 0) {
if (unk_0x3C == 0) {
static_cast<Calendar*>(System::getScene(SCENE_CALENDAR))->onPointDate(this);
onCmdRecv(1);
if (getVisible()) {
snd::getSystem()->startSE(lbl_8164C65D);
snd::getSystem()->startSE(scSEDateFocus);
if (con != NULL) {
con->rumble(1);
}
@@ -226,7 +226,7 @@ namespace ipl {
}
void Date::start_left_event(const char* paneName) {
if (strcmp(paneName, lbl_816967F2) == 0) {
if (strcmp(paneName, scB_Cal) == 0) {
if (unk_0x3C == 1) {
onCmdRecv(2);
}
@@ -262,7 +262,7 @@ namespace ipl {
numStr[index++] = 0;
nw4r::lyt::TextBox* pane = nw4r::ut::DynamicCast<nw4r::lyt::TextBox*>(mpLayout->FindPaneByName(lbl_8164C62C[2]));
nw4r::lyt::TextBox* pane = nw4r::ut::DynamicCast<nw4r::lyt::TextBox*>(mpLayout->FindPaneByName(scDateAnimPaneNames[2]));
pane->SetString(numStr);
}

View File

@@ -571,7 +571,7 @@ namespace ipl {
mWorkerCommand = 11;
break;
case 12:
mpSDWorker->iplNandSD_81348EA8(
mpSDWorker->check_sd_app_titles_async(
command.arguments.pointers[0], command.arguments.pointers[1],
command.arguments.pointers[2]);
mWorkerCommand = 12;

View File

@@ -185,7 +185,7 @@ namespace ipl {
break;
}
case STATE_16: {
fn_81409864();
calc_exit_sequence();
break;
}
}
@@ -688,28 +688,28 @@ namespace ipl {
}
}
void SettingSelect::fn_81409864() {
void SettingSelect::calc_exit_sequence() {
switch (unk_0x94) {
case 0: {
fn_814098F4();
prepare_exit_abort();
break;
}
case 1: {
fn_unk_inline();
wait_decide_se();
break;
}
case 2: {
fn_81409988();
start_exit_fade();
break;
}
case 3: {
fn_814099EC();
finish_exit_reboot();
break;
}
}
}
void SettingSelect::fn_814098F4() {
void SettingSelect::prepare_exit_abort() {
if (System::getChannelManager()->isReady()) {
for (int i = 0; i < WPAD_MAX_CONTROLLERS; i++) {
controller::Interface* con = System::getController(i);
@@ -724,20 +724,20 @@ namespace ipl {
}
}
void SettingSelect::fn_unk_inline() {
void SettingSelect::wait_decide_se() {
if (!snd::getSystem()->isSEActive("WIPL_SE_DECIDE")) {
unk_0x94 = 2;
}
}
void SettingSelect::fn_81409988() {
void SettingSelect::start_exit_fade() {
__WPADReconnect(TRUE);
snd::getSystem()->stopAllSound(20);
System::getFader()->fadeOut();
unk_0x94 = 3;
}
void SettingSelect::fn_814099EC() {
void SettingSelect::finish_exit_reboot() {
if (System::getFader()->getStatus() == EGG::Fader::PREPARE_IN) {
while (WPADGetStatus() != 0 || System::getBS2Manager()->getIPLState() != bs2::IPL_STATE_8) {
snd::getSystem()->calc();

View File

@@ -389,7 +389,7 @@ namespace ipl {
send_work(MESSAGE_CHECK_BACKUP_FITS);
}
void NandSDWorker::iplNandSD_81348EA8(void* ptrA, void* ptrB, void* ptrC) {
void NandSDWorker::check_sd_app_titles_async(void* ptrA, void* ptrB, void* ptrC) {
myWork->paramA = ptrA;
myWork->paramB = ptrB;
myWork->paramC = ptrC;
@@ -797,7 +797,7 @@ namespace ipl {
break;
}
case MESSAGE_UNK_49: {
do_unk_8134C838();
do_check_sd_app_titles();
break;
}
case MESSAGE_GET_NAND_SAVE_SIZE: {
@@ -2179,7 +2179,7 @@ namespace ipl {
MEMFreeToExpHeap(myWork->mainHeap, titleIds);
}
void NandSDWorker::do_unk_8134C838() {
void NandSDWorker::do_check_sd_app_titles() {
SDAppBanner* sdAppBanner = (SDAppBanner*)MEMAllocFromAllocator(&myWork->unkAllocator, sizeof(SDAppBanner));
/* i guess */