Minor stuff
This commit is contained in:
parent
4367ea6afa
commit
a09fc6ebcb
@ -325,7 +325,7 @@ void patchCode(u64 progId, u8 *code, u32 size)
|
||||
0xE0, 0x1E, 0xFF, 0x2F, 0xE1, 0x01, 0x01
|
||||
};
|
||||
|
||||
static const u8 mostRecentFpdVer = 0x06;
|
||||
u8 mostRecentFpdVer = 0x06;
|
||||
|
||||
u8 *fpdVer = memsearch(code, fpdVerPattern, size, sizeof(fpdVerPattern));
|
||||
|
||||
@ -348,7 +348,7 @@ void patchCode(u64 progId, u8 *code, u32 size)
|
||||
const u32 currentNand = BOOTCFG_NAND;
|
||||
const u32 matchingFirm = BOOTCFG_FIRM == (currentNand != 0);
|
||||
|
||||
u16 *verString;
|
||||
static const u16 *verString;
|
||||
switch(currentNand)
|
||||
{
|
||||
case 1:
|
||||
|
@ -86,8 +86,8 @@ void detectAndProcessExceptionDumps(void)
|
||||
|
||||
if(dumpHeader->magic[0] == 0xDEADC0DE && dumpHeader->magic[1] == 0xDEADCAFE && (dumpHeader->processor == 9 || dumpHeader->processor == 11))
|
||||
{
|
||||
vu32 *regs = (vu32 *)((vu8 *)dumpHeader + sizeof(ExceptionDumpHeader));
|
||||
vu8 *additionalData = (vu8 *)dumpHeader + dumpHeader->totalSize - dumpHeader->additionalDataSize;
|
||||
const vu32 *regs = (vu32 *)((vu8 *)dumpHeader + sizeof(ExceptionDumpHeader));
|
||||
const vu8 *additionalData = (vu8 *)dumpHeader + dumpHeader->totalSize - dumpHeader->additionalDataSize;
|
||||
|
||||
const char *handledExceptionNames[] = {
|
||||
"FIQ", "undefined instruction", "prefetch abort", "data abort"
|
||||
@ -132,7 +132,7 @@ void detectAndProcessExceptionDumps(void)
|
||||
{
|
||||
posY += SPACING_Y;
|
||||
char processName[] = "Current process: --------";
|
||||
memcpy(processName + 17, (char *)additionalData, 8);
|
||||
memcpy(processName + 17, (void *)additionalData, 8);
|
||||
posY = drawString(processName, 10, posY, COLOR_WHITE);
|
||||
}
|
||||
|
||||
@ -166,7 +166,7 @@ void detectAndProcessExceptionDumps(void)
|
||||
u32 size = dumpHeader->totalSize;
|
||||
char path[42];
|
||||
char fileName[] = "crash_dump_00000000.dmp";
|
||||
char *pathFolder = dumpHeader->processor == 9 ? "/luma/dumps/arm9" : "/luma/dumps/arm11";
|
||||
const char *pathFolder = dumpHeader->processor == 9 ? "/luma/dumps/arm9" : "/luma/dumps/arm11";
|
||||
|
||||
findDumpFile(pathFolder, fileName);
|
||||
memcpy(path, pathFolder, strlen(pathFolder) + 1);
|
||||
|
@ -42,7 +42,7 @@
|
||||
|
||||
extern u16 launchedFirmTidLow[8]; //Defined in start.s
|
||||
|
||||
static firmHeader *const firm = (firmHeader *)0x24000000;
|
||||
static firmHeader *firm = (firmHeader *)0x24000000;
|
||||
static const firmSectionHeader *section;
|
||||
|
||||
u32 emuOffset;
|
||||
@ -490,7 +490,7 @@ static inline void copySection0AndInjectSystemModules(FirmwareType firmType)
|
||||
src < srcEnd; src += srcModuleSize, dst += dstModuleSize)
|
||||
{
|
||||
srcModuleSize = *(u32 *)(src + 0x104) * 0x200;
|
||||
char *moduleName = (char *)(src + 0x200);
|
||||
const char *moduleName = (char *)(src + 0x200);
|
||||
|
||||
char fileName[30] = "/luma/sysmodules/";
|
||||
const char *ext = ".cxi";
|
||||
@ -503,11 +503,11 @@ static inline void copySection0AndInjectSystemModules(FirmwareType firmType)
|
||||
if(fileSize) dstModuleSize = fileSize;
|
||||
else
|
||||
{
|
||||
void *module;
|
||||
const void *module;
|
||||
|
||||
if(firmType == NATIVE_FIRM && memcmp(moduleName, "loader", 6) == 0)
|
||||
{
|
||||
module = (void *)injector;
|
||||
module = injector;
|
||||
dstModuleSize = injector_size;
|
||||
}
|
||||
else
|
||||
@ -530,13 +530,13 @@ static inline void copySection0AndInjectSystemModules(void)
|
||||
src < srcEnd; src += srcModuleSize, dst += dstModuleSize)
|
||||
{
|
||||
srcModuleSize = *(u32 *)(src + 0x104) * 0x200;
|
||||
char *moduleName = (char *)(src + 0x200);
|
||||
const char *moduleName = (const char *)(src + 0x200);
|
||||
|
||||
void *module;
|
||||
const void *module;
|
||||
|
||||
if(memcmp(moduleName, "loader", 6) == 0)
|
||||
{
|
||||
module = (void *)injector;
|
||||
module = injector;
|
||||
dstModuleSize = injector_size;
|
||||
}
|
||||
else
|
||||
|
@ -127,7 +127,7 @@ void loadPayload(u32 pressed)
|
||||
{
|
||||
initScreens();
|
||||
|
||||
u32 *const loaderAddress = (u32 *)0x24FFFF00;
|
||||
u32 *loaderAddress = (u32 *)0x24FFFF00;
|
||||
|
||||
memcpy(loaderAddress, loader, loader_size);
|
||||
|
||||
|
@ -123,7 +123,7 @@ void patchFirmlaunches(u8 *pos, u32 size, u32 process9MemAddr)
|
||||
void patchFirmWrites(u8 *pos, u32 size)
|
||||
{
|
||||
//Look for FIRM writing code
|
||||
u8 *const off1 = memsearch(pos, "exe:", size, 4);
|
||||
u8 *off1 = memsearch(pos, "exe:", size, 4);
|
||||
const u8 pattern[] = {0x00, 0x28, 0x01, 0xDA};
|
||||
|
||||
u16 *off2 = (u16 *)memsearch(off1 - 0x100, pattern, 0x100, sizeof(pattern));
|
||||
|
Reference in New Issue
Block a user