Compare commits

..

7 Commits

Author SHA1 Message Date
coah
4cf20f4dbe match(d_nhttp_private): NHTTPDeleteConnection
Rewrite ConnectionStarted's null check as if/else so the inlined
WaitConnection path matches beq/bne block order (null → -1 first).

Before: 6/7 funcs, 908/1320 code bytes
After:  7/7 funcs, 1320/1320 code bytes
DOL sha1: 26116613f624061ba99c8d1a299aaa6efa85670d
2026-10-01 17:53:54 -05:00
github-actions[bot]
1802d45758 docs: update progress [skip ci] 2026-10-01 22:48:56 +00:00
coah
130cc9e88e match(pf_fat): PFFAT_GetClusterAllocated (#570)
Reorder locals so p_start_cluster lands in r7 and p_vol in r8.

Co-authored-by: matcher <matcher@local>
2026-10-01 17:47:34 -05:00
coah
a801d1c5d6 cleanup(CXStreamingUncompression): rename Huffman init dest param (#568)
Match the Huffman prototype to the .c and the RL/LZ decls (param_2 → data).
2026-10-01 17:47:08 -05:00
coah
8ab07fbb20 Restore SD title button-string ownership (#567) 2026-10-01 17:46:43 -05:00
coah
f68fcc0f9b cleanup(lyt_window): name OSFatal color/msg constants (#566)
Rename assert-path sdata2 color bytes and Error#004 string labels.
2026-10-01 17:46:18 -05:00
coah
5ad481ae40 match(iplSaveDataManager): convert getAvailableInList to C (#563)
Exact match (28/28, diffs 0). Finds first zero titleId whose
chanInfo primaryType is not 1, using dens=12 for page/slot.
2026-10-01 17:45:53 -05:00
12 changed files with 50 additions and 5275 deletions

View File

@@ -53,9 +53,9 @@ Progress
<!-- progress:start -->
| Decompiled | Matched | Linked | Data |
|:---:|:---:|:---:|:---:|
| 99.37% | 87.71% | 62.05% | 92.06% |
| 99.37% | 87.72% | 62.05% | 92.06% |
units 918/1027 complete, functions 12214/12563 matched.
units 918/1027 complete, functions 12215/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

@@ -804,14 +804,14 @@ src/scene/sdChannelSelect/iplSDChannelObj.cpp:
.rodata start:0x81610608 end:0x81610918
.data start:0x81654B38 end:0x81654F98
.sdata2 start:0x81694B18 end:0x81694B60
.sdata start:0x81696DD0 end:0x81696E40
.sdata start:0x81696DD0 end:0x81696E30
src/scene/sdChannelTitle/iplSDChannelTitle.cpp:
.text start:0x813E4BBC end:0x813E947C
.rodata start:0x81610918 end:0x81610948
.data start:0x81654F98 end:0x81655638
.sdata2 start:0x81694B60 end:0x81694B88
.sdata start:0x81696E40 end:0x81696EF0
.sdata start:0x81696E30 end:0x81696EF0
src/scene/sdButton/iplSDButton.cpp:
.text start:0x813E947C end:0x813EA88C

View File

@@ -18664,7 +18664,7 @@ __vt__Q34nw4r3lyt7Picture = .data:0x816717F4; // type:object size:0x6C
@5574 = .data:0x816718E8; // type:object size:0x41 scope:local data:string
__vt__Q34nw4r3lyt7TextBox = .data:0x8167192C; // type:object size:0x74
flipInfos$7849 = .data:0x816719A0; // type:object size:0x3C scope:local
lbl_816719DC = .data:0x816719DC; // type:object size:0x41 data:string
scLytFatalMsg = .data:0x816719DC; // type:object size:0x41 data:string
__vt__Q34nw4r3lyt6Window = .data:0x81671A20; // type:object size:0x7C
__vt__Q34nw4r3lyt8Bounding = .data:0x81671AA0; // type:object size:0x64
kColSels$4880 = .data:0x81671B08; // type:object size:0x20 scope:local data:4byte
@@ -21025,10 +21025,10 @@ lbl_8169553B = .sdata2:0x8169553B; // type:object size:0x1 data:byte
lbl_8169553C = .sdata2:0x8169553C; // type:object size:0x4 align:4 data:float
lbl_81695540 = .sdata2:0x81695540; // type:object size:0x8 align:8 data:double
lbl_81695548 = .sdata2:0x81695548; // type:object size:0x8 align:8 data:double
lbl_81695550 = .sdata2:0x81695550; // type:object size:0x1 data:byte
lbl_81695551 = .sdata2:0x81695551; // type:object size:0x1 data:byte
lbl_81695552 = .sdata2:0x81695552; // type:object size:0x1 data:byte
lbl_81695553 = .sdata2:0x81695553; // type:object size:0x5 data:byte
scLytFatalColorR = .sdata2:0x81695550; // type:object size:0x1 data:byte
scLytFatalColorG = .sdata2:0x81695551; // type:object size:0x1 data:byte
scLytFatalColorB = .sdata2:0x81695552; // type:object size:0x1 data:byte
scLytFatalColorA = .sdata2:0x81695553; // type:object size:0x5 data:byte
@6184 = .sdata2:0x81695558; // type:object size:0x4 scope:local align:4 data:float
@6185 = .sdata2:0x8169555C; // type:object size:0x4 scope:local align:4 data:float
@6186 = .sdata2:0x81695560; // type:object size:0x4 scope:local align:4 data:float

View File

@@ -247,7 +247,7 @@ config.asflags = [
"-I include",
f"-I build/{config.version}/include",
f"--defsym BUILD_VERSION={version_num}",
f"--defsym VERSION_{config.version}=1",
f"--defsym VERSION_{config.version}",
]
config.ldflags = [
"-fp hardware",
@@ -928,7 +928,7 @@ config.libs = [
Object(Matching, "keyboard/tiLanguageIndependentData.cpp", extra_cflags=["-O4,p"], shift_jis=False),
Object(Matching, "keyboard/tiTextInputBase.cpp", extra_cflags=["-O4,p"]),
Object(NonMatching, "keyboard/MyTiManager.cpp", extra_cflags=["-O4,p"]),
Object(Matching, "keyboard/MyTiInputForm.cpp", source="keyboard/MyTiInputForm.s", extra_cflags=["-O4,p"]),
Object(NonMatching, "keyboard/MyTiInputForm.cpp", extra_cflags=["-O4,p"]),
Object(Matching, "keyboard/MyTiLetterForm.cpp", extra_cflags=["-O4,p"]),
Object(Matching, "keyboard/MyTiBg.cpp", extra_cflags=["-O4,p"]),
Object(Matching, "keyboard/tiDebug.cpp", extra_cflags=["-O4,p"]),

View File

@@ -1,19 +1,19 @@
#include <nw4r/db/assert.h>
extern "C" const u8 lbl_81695550 = 255;
extern "C" const u8 lbl_81695551 = 255;
extern "C" const u8 lbl_81695552 = 255;
extern "C" const u8 lbl_81695553 = 0;
extern "C" char lbl_816719DC[] = "Error#004\nAn error has occurred.\nThe system files are corrupted.";
extern "C" const u8 scLytFatalColorR = 255;
extern "C" const u8 scLytFatalColorG = 255;
extern "C" const u8 scLytFatalColorB = 255;
extern "C" const u8 scLytFatalColorA = 0;
extern "C" char scLytFatalMsg[] = "Error#004\nAn error has occurred.\nThe system files are corrupted.";
#undef NW4R_ASSERT
#define NW4R_ASSERT(x) \
{ \
if (!(x)) { \
GXColor front = {*((volatile const u8*)&::lbl_81695550), *((volatile const u8*)&::lbl_81695551), \
*((volatile const u8*)&::lbl_81695552), *((volatile const u8*)&::lbl_81695553)}; \
GXColor front = {*((volatile const u8*)&::scLytFatalColorR), *((volatile const u8*)&::scLytFatalColorG), \
*((volatile const u8*)&::scLytFatalColorB), *((volatile const u8*)&::scLytFatalColorA)}; \
GXColor back = {0, 0, 0, 0}; \
OSFatal((GXColor)front, (GXColor)back, ::lbl_816719DC); \
OSFatal((GXColor)front, (GXColor)back, ::scLytFatalMsg); \
} \
}

View File

@@ -64,7 +64,7 @@ typedef struct CXUncompContextHuffman {
void CXInitUncompContextRL(CXUncompContextRL* context, u8* data);
void CXInitUncompContextLZ(CXUncompContextLZ* context, u8* data);
void CXInitUncompContextHuffman(CXUncompContextHuffman* context, u8* param_2);
void CXInitUncompContextHuffman(CXUncompContextHuffman* context, u8* data);
CXStreamingResult CXReadUncompRL(CXUncompContextRL* context, const void* src, u32 size);
CXStreamingResult CXReadUncompLZ(CXUncompContextLZ* context, const void* src, u32 size);

View File

@@ -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);

View File

@@ -55,7 +55,13 @@ static s32 ConnectionStarted(NHTTPConnectionInfo* handle) {
void* system=NHTTPi_GetSystemInfoP();
void* mutex=NHTTPi_GetMutexInfoP(system);
NHTTPConnectionInfo* connection=NHTTPi_GetConnection(mutex,handle);
return connection ? connection->started : -1;
s32 started;
if (connection == NULL) {
started = -1;
} else {
started = connection->started;
}
return started;
}
static s32 ConnectionState(NHTTPConnectionInfo* handle) {

View File

@@ -1,4 +1,3 @@
// Matching build uses MyTiInputForm.s (C++ Matching breaks DOL SHA1).
#define MYTIINPUTFORM_IMPLEMENTATION
#include "keyboard/MyTiInputForm.h"
#include "keyboard/tiUtil.h"

File diff suppressed because it is too large Load Diff

View File

@@ -86,10 +86,7 @@ static inline void setMemoryTitleLists(SDMemory* memory, SDMemory::TitleRange sd
memory->setTitleLists(sdRange, nandRange);
}
extern "C" char lbl_81696E30[];
extern "C" char lbl_81696E37[];
static const char* sButtonNames[2] = {lbl_81696E30, lbl_81696E37};
static const char* sButtonNames[2] = {"B_BtnA", "B_BtnB"};
static const int sCaptureSizes[2][2] = {{128, 96}, {176, 96}};

View File

@@ -1003,39 +1003,21 @@ namespace ipl {
return count - 1;
}
asm int Manager::getAvailableInList(register const ESTitleId* titleIds, register u32 titleCount) {
nofralloc
li r8, 0
li r6, 0
li r7, 0xc
mtctr r5
cmplwi r5, 0
ble getAvailableInList_L3
getAvailableInList_L1:
add r5, r4, r6
lwzx r0, r4, r6
lwz r5, 4(r5)
or. r0, r5, r0
bne getAvailableInList_L2
divw r5, r8, r7
mullw r0, r5, r7
mulli r5, r5, 0xc0
subf r0, r0, r8
add r5, r3, r5
slwi r0, r0, 4
add r5, r5, r0
lbz r0, 0x30(r5)
cmplwi r0, 1
beq getAvailableInList_L2
mr r3, r8
blr
getAvailableInList_L2:
addi r8, r8, 1
addi r6, r6, 8
bdnz getAvailableInList_L1
getAvailableInList_L3:
li r3, -1
blr
int Manager::getAvailableInList(const ESTitleId* titleIds, u32 titleCount) {
int dens = 12;
u32 i;
for (i = 0; i < titleCount; i++) {
if (titleIds[i] == 0) {
int page = (int)i / dens;
int slot = (int)i % dens;
u8* p = (u8*)this + page * 0xc0;
p += slot * 16;
if (*(p + 0x30) != 1) {
return (int)i;
}
}
}
return -1;
}
asm int Manager::isEqualChannel(register ESTitleId titleId0, register ESTitleId titleId1) {