From 349c3f6fbb86e7ef423fc1c80f82db3906113d16 Mon Sep 17 00:00:00 2001 From: RocketRobz Date: Sat, 7 Dec 2024 22:00:32 -0700 Subject: [PATCH] Update main.c --- 3dssplash/arm7/source/main.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/3dssplash/arm7/source/main.c b/3dssplash/arm7/source/main.c index 212b54a51f..5b23fd009c 100644 --- a/3dssplash/arm7/source/main.c +++ b/3dssplash/arm7/source/main.c @@ -86,6 +86,8 @@ int main() { *(u16*)0x02FFFC36 = *(u16*)0x0800015E; // Header CRC16 *(u32*)0x02FFFC38 = *(u32*)0x0800000C; // Game Code + *(u32*)0x02FFFDF0 = REG_SCFG_EXT; + // clear sound registers dmaFillWords(0, (void*)0x04000400, 0x100); @@ -124,7 +126,7 @@ int main() { // 01: Fade Out // 02: Return - // 03: status (Bit 0: hasRegulableBacklight, Bit 1: scfgEnabled, Bit 2: REG_SNDEXTCNT, Bit 3: isDSPhat, Bit 4: i2cBricked) + // 03: status (Bit 0: hasRegulableBacklight, Bit 1: scfgSdmmcEnabled, Bit 2: REG_SNDEXTCNT, Bit 3: isDSPhat, Bit 4: i2cBricked) // 03: Status: Init/Volume/Battery/SD @@ -132,14 +134,18 @@ int main() { // Battery is 7 bits -- bits 0-7 // Volume is 00h to 1Fh = 5 bits -- bits 8-12 // SD status -- bits 13-14 - // Init status -- bits 15-18 (Bit 0 (15): hasRegulableBacklight, Bit 1 (16): scfgEnabled, Bit 2 (17): REG_SNDEXTCNT, Bit 3 (18): isDSPhat, Bit 4 (19): i2cBricked) + // Init status -- bits 15-18 (Bit 0 (15): hasRegulableBacklight, Bit 1 (16): scfgSdmmcEnabled, Bit 2 (17): REG_SNDEXTCNT, Bit 3 (18): isDSPhat, Bit 4 (19): i2cBricked) + + *(vu32*)0x4004820 = 0x8B7F0305; u8 initStatus = (BIT_SET(!!(REG_SNDEXTCNT), SNDEXTCNT_BIT) - | BIT_SET(!!(REG_SCFG_EXT), REGSCFG_BIT) + | BIT_SET(*(vu32*)0x4004820, SCFGSDMMC_BIT) | BIT_SET(!!(pmBacklight & BIT(4) || pmBacklight & BIT(5) || pmBacklight & BIT(6) || pmBacklight & BIT(7)), BACKLIGHT_BIT) | BIT_SET(isPhat(), DSPHAT_BIT) | BIT_SET(i2cBricked, I2CBRICKED_BIT)); + *(vu32*)0x4004820 = 0; + status = (status & ~INIT_MASK) | ((initStatus << INIT_OFF) & INIT_MASK); fifoSendValue32(FIFO_USER_03, status);