Skip to content

Commit 73c882e

Browse files
Fix size compute issue, support for 3.55
1 parent e0d936d commit 73c882e

1 file changed

Lines changed: 16 additions & 24 deletions

File tree

main.c

Lines changed: 16 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,8 @@ static char *units[] = {
130130
"KB",
131131
"MB",
132132
"GB",
133-
"TB"
133+
"TB",
134+
"PB"
134135
};
135136
#define N_UNITS (sizeof(units) / sizeof(char **))
136137

@@ -146,7 +147,7 @@ static int unitType(SceOff iBytes, int* oConv, int* oCent)
146147
res++;
147148
}
148149
*oConv = (int)convBytes;
149-
*oCent = (int)(iBytes%divider)/(divider/102);
150+
*oCent = (int)((iBytes%divider)/(divider/102));
150151
return res;
151152
}
152153

@@ -175,22 +176,17 @@ uint32_t text_addr, text_size, data_addr, data_size;
175176
static int (*scePafWidgetSetFontSize)(void *widget, float size, int unk0, int pos, int len);
176177

177178

178-
static void get_functions_retail_360()
179-
{
180-
scePafWidgetSetFontSize = (void*) text_addr + 0x45ce80;
181-
}
182-
183-
static void get_functions_retail_365()
179+
static void get_functions_retail_355()
184180
{
185-
scePafWidgetSetFontSize = (void*) text_addr + 0x45d2c8;
181+
scePafWidgetSetFontSize = (void*) text_addr + 0x45c950;
186182
}
187183

188-
static void get_functions_retail_367()
184+
static void get_functions_retail_360()
189185
{
190-
scePafWidgetSetFontSize = (void*) text_addr + 0x45D2C8;
186+
scePafWidgetSetFontSize = (void*) text_addr + 0x45ce80;
191187
}
192188

193-
static void get_functions_retail_368()
189+
static void get_functions_retail_365_368()
194190
{
195191
scePafWidgetSetFontSize = (void*) text_addr + 0x45D2C8;
196192
}
@@ -476,29 +472,25 @@ int module_start(SceSize argc, const void *args)
476472

477473
uint32_t offsets[2];
478474

479-
switch (info.module_nid) {
475+
switch (info.module_nid) {
476+
case 0x8978D25D: // retail 3.55 SceShell
477+
offsets[0] = 0x183EF0;
478+
offsets[1] = 0x40DBD8;
479+
get_functions_retail_355();
480+
break;
481+
480482
case 0x0552F692: // retail 3.60 SceShell
481483
offsets[0] = 0x183ea4;
482484
offsets[1] = 0x40e0b4;
483485
get_functions_retail_360();
484486
break;
485487

486488
case 0x5549BF1F: // retail 3.65 SceShell
487-
offsets[0] = 0x183f6c;
488-
offsets[1] = 0x40e4fc;
489-
get_functions_retail_365();
490-
break;
491-
492489
case 0x34B4D82E: // retail 3.67 SceShell
493-
offsets[0] = 0x183F6C;
494-
offsets[1] = 0x40E4FC;
495-
get_functions_retail_367();
496-
break;
497-
498490
case 0x12DAC0F3: // retail 3.68 SceShell
499491
offsets[0] = 0x183F6C;
500492
offsets[1] = 0x40E4FC;
501-
get_functions_retail_368();
493+
get_functions_retail_365_368();
502494
break;
503495

504496
case 0xEAB89D5C: // PTEL 3.60 SceShell

0 commit comments

Comments
 (0)