mirror of
https://github.com/d0k3/GodMode9.git
synced 2025-06-26 21:52:48 +00:00
Full mount compatibility for all known FIRM versions
This commit is contained in:
parent
ea00a3217a
commit
7a7bc96a9b
@ -8,8 +8,8 @@
|
||||
#define SECRET_NAME "secret_sector.bin"
|
||||
|
||||
#define FIRM_MAX_SIZE 0x400000 // 4MB, due to FIRM partition size
|
||||
#define ARM11NCCH_OFFSET 0, 0x2A000, 0x2B000, 0x2C000
|
||||
#define ARM9BIN_OFFSET 0x800
|
||||
#define ARM11V2_OFFSET 0x2B000
|
||||
|
||||
// see: https://www.3dbrew.org/wiki/FIRM#Firmware_Section_Headers
|
||||
typedef struct {
|
||||
|
@ -414,9 +414,10 @@ bool BuildVGameFirmDir(void) {
|
||||
n++;
|
||||
}
|
||||
} else if (section->type == 1) { // ARM11 section, search for modules
|
||||
const u32 arm11_ncch_offset[] = { ARM11NCCH_OFFSET };
|
||||
NcchHeader firm_ncch;
|
||||
for (u32 v = 0; v < 2; v++) {
|
||||
u32 start = v ? ARM11V2_OFFSET : 0;
|
||||
for (u32 v = 0; v < sizeof(arm11_ncch_offset) / sizeof(u32); v++) {
|
||||
u32 start = arm11_ncch_offset[v];
|
||||
for (u32 p = start; p < section->size; p += firm_ncch.size * NCCH_MEDIA_UNIT) {
|
||||
char name[8];
|
||||
if ((ReadImageBytes((u8*) &firm_ncch, section->offset + p, 0x200) != 0) ||
|
||||
|
Loading…
x
Reference in New Issue
Block a user