diff --git a/retail/bootloader/source/arm7/dsi2ds_patches.c b/retail/bootloader/source/arm7/dsi2ds_patches.c index 152871559..e38393612 100644 --- a/retail/bootloader/source/arm7/dsi2ds_patches.c +++ b/retail/bootloader/source/arm7/dsi2ds_patches.c @@ -11426,30 +11426,36 @@ void patchDSiModeToDSMode(cardengineArm9* ce9, const tNDSHeader* ndsHeader) { // Glory Days: Tactical Defense (USA) // Glory Days: Tactical Defense (Europe) + // Music does not play on retail consoles else if (strcmp(romTid, "KGKE") == 0 || strcmp(romTid, "KGKP") == 0) { // *(u32*)0x02004B9C = 0x0200002F; *(u32*)0x0200B488 = 0xE1A00000; // nop *(u32*)0x0200E7A0 = 0xE1A00000; // nop patchInitDSiWare(0x02018F08, heapEnd); + *(u32*)0x02019294 = *(u32*)0x02004FD0; patchUserSettingsReadDSiWare(0x0201A404); *(u32*)0x0201FB24 = wirelessReturnCodeArm; *(u32*)0x0201FB28 = 0xE12FFF1E; // bx lr if (romTid[3] == 'E') { + *(u32*)0x02065B20 = 0x368940; // Shrink sound heap from 0x958940 for (int i = 0; i < 12; i++) { u32* offset = (u32*)0x0206710C; offset[i] = 0xE1A00000; // nop } *(u32*)0x020671B4 = 0xE1A00000; // nop + *(u32*)0x020671F0 = 0xE1A00000; // nop for (int i = 0; i < 10; i++) { u32* offset = (u32*)0x02075514; offset[i] = 0xE1A00000; // nop } } else { + *(u32*)0x02065C80 = 0x368940; // Shrink sound heap from 0x958940 for (int i = 0; i < 12; i++) { u32* offset = (u32*)0x02067264; offset[i] = 0xE1A00000; // nop } *(u32*)0x0206730C = 0xE1A00000; // nop + *(u32*)0x02067348 = 0xE1A00000; // nop for (int i = 0; i < 10; i++) { u32* offset = (u32*)0x0207566C; offset[i] = 0xE1A00000; // nop @@ -19264,6 +19270,22 @@ void patchDSiModeToDSMode(cardengineArm9* ce9, const tNDSHeader* ndsHeader) { *(u32*)0x020863B0 = 0xE1A00000; // nop } + // Pop Island: Paperfield (USA) + // Full version plays on debug consoles + else if (strcmp(romTid, "KPFE") == 0 && ndsHeader->fatSize > 0 && extendedMemory) { + *(u32*)0x0200F820 = 0xE3A00001; // mov r0, #1 (Enable NitroFS reads) + *(u32*)0x0204E940 = 0x35C940; // Shrink sound heap from 0x958940 + *(u8*)0x021C69D8 = 0; // Hide "DEMO" text + } + + // Pop Island: Paperfield (Europe) + // Full version plays on debug consoles + else if (strcmp(romTid, "KPFP") == 0 && ndsHeader->fatSize > 0 && extendedMemory) { + *(u32*)0x0200F820 = 0xE3A00001; // mov r0, #1 (Enable NitroFS reads) + *(u32*)0x0204E968 = 0x35C940; // Shrink sound heap from 0x958940 + *(u8*)0x021C4AB8 = 0; // Hide "DEMO" text + } + // Pop+ Solo (USA) // Pop+ Solo (Europe, Australia) else if (strcmp(romTid, "KPIE") == 0 || strcmp(romTid, "KPIV") == 0) { diff --git a/retail/bootloader/source/arm7/main.arm7.c b/retail/bootloader/source/arm7/main.arm7.c index 755500ee1..2a779dddb 100644 --- a/retail/bootloader/source/arm7/main.arm7.c +++ b/retail/bootloader/source/arm7/main.arm7.c @@ -1100,8 +1100,8 @@ static void setMemoryAddress(const tNDSHeader* ndsHeader, const module_params_t* const char* romTid = getRomTid(ndsHeader); if (strncmp(romTid, "KPP", 3) == 0 // Pop Island - || strncmp(romTid, "KPF", 3) == 0 // Pop Island: Paperfield - || strncmp(romTid, "KGK", 3) == 0 // Glory Days: Tactical Defense + || (strncmp(romTid, "KPF", 3) == 0 && (ndsHeader->fatSize == 0 || !extendedMemory)) // Pop Island: Paperfield + || (strncmp(romTid, "KGK", 3) == 0 && (ndsHeader->fatSize == 0 || !extendedMemory)) // Glory Days: Tactical Defense || (strcmp(romTid, "NTRJ") == 0 && (ndsHeader->headerCRC16 == 0x53E2 || ndsHeader->headerCRC16 == 0x681E || ndsHeader->headerCRC16 == 0xCD01)) || srlFromPageFile) { *((u16*)(isSdk5(moduleParams) ? 0x02fffc40 : 0x027ffc40)) = 0x2; // Boot Indicator (Cloneboot/Multiboot)