From: chaoskagami Date: Tue, 31 May 2016 08:17:11 +0000 (-0400) Subject: Misc shit X-Git-Tag: stable-1~29 X-Git-Url: https://chaos.moe/g/?a=commitdiff_plain;h=21cf64b5c8f0ecc3797d55b9f0a150fee61941ca;p=corbenik%2Fcorbenik.git Misc shit --- diff --git a/external/loader/source/loader.c b/external/loader/source/loader.c index a505053..b7ed35b 100644 --- a/external/loader/source/loader.c +++ b/external/loader/source/loader.c @@ -188,7 +188,7 @@ loader_LoadProcess(Handle* process, u64 prog_handle) // n3ds speed, -1 force o3ds // This is A-OK because the CPU speed parameter isn't passed through to any // kernel function; meaning it has already been set. - u8 n3ds_mode = g_exheader.arm11systemlocalcaps.flags[1] & 0x3; + u8 n3ds_mode = g_exheader.arm11systemlocalcaps.flags[1] & 0x3; // 0x3 -> L2+800Mhz u8 cpu_mode = get_cpumode(progid); if (cpu_mode != 0xFF) { // Skip? u8 mode = n3ds_mode | cpu_mode; // Keep flags set by exheader. @@ -196,6 +196,8 @@ loader_LoadProcess(Handle* process, u64 prog_handle) // sysmodule. It doesn't make sense. } + // TODO - clean up this shit below. Not only is it unoptimized but it reads like garbage. + // What the addressing info would be if not for expansion. This is passed to // patchCode. original_vaddr.text_size = (g_exheader.codesetinfo.text.codesize + 4095) >> diff --git a/external/loader/source/lzss.c b/external/loader/source/lzss.c index a2e508f..b4f32d0 100644 --- a/external/loader/source/lzss.c +++ b/external/loader/source/lzss.c @@ -1,5 +1,7 @@ #include <3ds.h> +// TODO - In the future, why not ADD code compression modes? Like, zlib, for example. Or lzss+zlib. + int lzss_decompress(u8* buffer) { diff --git a/external/loader/source/patcher.c b/external/loader/source/patcher.c index 655911d..3b2a328 100644 --- a/external/loader/source/patcher.c +++ b/external/loader/source/patcher.c @@ -468,7 +468,7 @@ language_emu(u64 progId, u8* code, u32 size) void overlay_patch(u64 progId, u8* code, u32 size) { - // TODO - Implement. + // TODO - Implement. Needs some thought. This should allow usage of files off SD rather than RomFS. } // This is only for the .data segment.