mirror of
https://github.com/d0k3/GodMode9.git
synced 2025-06-26 13:42:47 +00:00
Include ARM9 footer when mounting .nds files
This commit is contained in:
parent
ff86444e2c
commit
f74d9ddfd7
@ -20,6 +20,9 @@
|
||||
#define TWL_UNITCODE_TWLNTR 0x02
|
||||
#define TWL_UNITCODE_TWL 0x03
|
||||
|
||||
// see https://github.com/devkitPro/ndstool/blob/313b0be6440d3087b6d433c3ea057605d2c95197/source/header.cpp#L585-L595
|
||||
#define NDS_ARM9_FOOTER_MAGIC 0xDEC00621
|
||||
|
||||
// see: http://problemkaputt.de/gbatek.htm#dscartridgeicontitle
|
||||
typedef struct {
|
||||
u16 version;
|
||||
|
@ -497,11 +497,14 @@ bool BuildVGameNdsDir(void) {
|
||||
n++;
|
||||
}
|
||||
|
||||
// ARM9 section
|
||||
// ARM9 section (+ ARM9 section footer)
|
||||
if (twl->arm9_size) {
|
||||
u32 f = 0;
|
||||
ReadGameImageBytes(&f, offset_nds + twl->arm9_rom_offset + twl->arm9_size, sizeof(u32));
|
||||
strncpy(templates[n].name, NAME_NDS_ARM9, 32);
|
||||
templates[n].offset = offset_nds + twl->arm9_rom_offset;
|
||||
templates[n].size = twl->arm9_size;
|
||||
if (f == NDS_ARM9_FOOTER_MAGIC) templates[n].size += 0xC;
|
||||
templates[n].keyslot = 0xFF;
|
||||
templates[n].flags = 0;
|
||||
n++;
|
||||
|
Loading…
x
Reference in New Issue
Block a user