nds-bootstrap icon indicating copy to clipboard operation
nds-bootstrap copied to clipboard

Golden Sun Dark Dawn black screen at launch

Open Stack3r opened this issue 6 years ago • 38 comments

This game gets stuck at a black screen after loading from dsimenu++, even an AP patched rom has issues loading

Stack3r avatar Jun 26 '18 02:06 Stack3r

I do not think this is AP (I mean not only AP)

ahezard avatar Jun 29 '18 01:06 ahezard

Yeah i'm starting to think the same Edit Just ripped a rom from my cartridge and had the same issue with and without the AP patch

Stack3r avatar Jun 29 '18 01:06 Stack3r

I have an issue in no$gba with this file : "jumped to empty wram", I am using a fat16 virtual sd card in no$gba so it may be the issue (the fat table cache is probably bigger than allowed)

ahezard avatar Jun 29 '18 15:06 ahezard

arm7 is not thumb and is properly patched

ahezard avatar Jun 29 '18 15:06 ahezard

arm9 is not thumb but I have some doubt on the card read patch here

edit : no, arm9 is thumb, it seems to be not properly detected because arm patch are applied instead of thumb

ahezard avatar Jun 29 '18 15:06 ahezard

Testing: Haven't tested with an AP Patch, but this still black screens on launch on an unpatched ROM.

Kalanyr avatar Aug 31 '18 01:08 Kalanyr

Could be linked to #517

ahezard avatar Jan 31 '19 23:01 ahezard

The RomId of the card have a very specific behavior : Fomr user Jeod "GS: Dark Dawn's card chip id is E080FF80 If I press a button to re-get card id, it changes to FF000000"

ahezard avatar Feb 28 '19 22:02 ahezard

Could be linked to #539

ahezard avatar Feb 28 '19 22:02 ahezard

golden_sun_card_commmand_dma.txt Attached card command/dma log at startup (onlyfew seconds). The games sends a lot of card command (ap check?) and then the opening video start with dma card read command (AF000001).

ahezard avatar Mar 01 '19 18:03 ahezard

This can be linked somehow to https://github.com/chishm/nitrohax/issues/3

ahezard avatar Mar 07 '19 20:03 ahezard

Wood contains a specific patch for this game https://github.com/ahezard/woodrpg_forwarder/blob/e0280c91b21e28443c23f98a171012ef8a301b0c/akloader/arm9/source/patches_pr.cpp#L457 Related to CP15 / data cache management function at 4BA60 (US version) Could be a good hint

{0x45354f42,0x0204ba64,KMemProtMe,0x02049850,true }, //BO5E: 5367 - Golden Sun - Dark Dawn (USA)

The patch applied is https://github.com/ahezard/woodrpg_forwarder/blob/e0280c91b21e28443c23f98a171012ef8a301b0c/akloader/patches/unprot_015.s

ahezard avatar Mar 12 '19 22:03 ahezard

The cardId function is not properly matched : findCardIdEndOffset: Card ID end SDK 5 found: 0204994C

findCardIdStartOffset: Card ID start SDK 5 not found Card ID start SDK 5 alt 1 found: 02049850

ahezard avatar Mar 17 '19 20:03 ahezard

Card ID start should be : 02049904

ahezard avatar Mar 17 '19 20:03 ahezard

the game is looping on this code, blocking on irq forever :

02055DB4 EB000000 BL 0x02055DBC 02055DB8 EAFFFFFD B 0x02055DB4 02055DBC E3A00000 MOV R0, #0x0 02055DC0 EE070F90 MCR P15, 0, R0, CR7, CR0, 4 02055DC4 E12FFF1E BX LR

ahezard avatar Jun 09 '19 21:06 ahezard

Hello, hoping it's ok for me to post on this issue. I am still new to nds-bootstrap.

In all honesty, I really love Golden Sun series, even Dark Dawn (idc about the flaws). So, as of writing the time now is 4:43 pm EST, on Oct 4th. Using the latest nightly version included in Twilight Menu++ Updater, Dark Dawn still starts on the black screen with AP patched.

Any updates? Anything I can do to help? I'd love to see this game running on my 3DS, haha. Thanks!

firelad97 avatar Oct 04 '19 20:10 firelad97

Yeah i have the same problem with the black screen is there a solution?

ChittendenLC avatar Nov 30 '19 04:11 ChittendenLC

Currently no. I know there was some work started on it, however at least as far as I'm aware, there's been no progress on this game yet.

dubbz82 avatar Nov 30 '19 04:11 dubbz82

Yes, this still Black Screens on launch on the latest Stable as of this post (both with and without an AP-fixed ROM)

Same with the nightly (https://github.com/ahezard/nds-bootstrap/commit/4b1258bc7380a053cfb625ca44d4ab2a2d90cfd4 )

Kalanyr avatar Jan 29 '20 15:01 Kalanyr

This appears to be in part related to the absence of nds firmware. No$gba stalled at black screen without firmware.bin in same path, but booted the game without issue after firmware.bin was added to same path as no$gba exe. Speculate nds firmware has an irq handler.

JeodC avatar Sep 13 '20 14:09 JeodC

Perhaps interrupts were disabled, then never re-enabled?

nickdesaulniers avatar Oct 03 '20 09:10 nickdesaulniers

ARM7 - IE image

ARM7 - IF image

ARM9 - IE image

ARM9 - IF image

This appears to be in part related to the absence of nds firmware. No$gba stalled at black screen without firmware.bin in same path, but booted the game without issue after firmware.bin was added to same path as no$gba exe. Speculate nds firmware has an irq handler.

black screen in that case was caused by not being passed system language IIRC.

the game is looping on this code, blocking on irq forever :

02055DB4 EB000000 BL 0x02055DBC 02055DB8 EAFFFFFD B 0x02055DB4 02055DBC E3A00000 MOV R0, #0x0 02055DC0 EE070F90 MCR P15, 0, R0, CR7, CR0, 4 02055DC4 E12FFF1E BX LR

Be sure this is not the well known arm9 idle loop.

Squall-Leonhart avatar Aug 07 '21 01:08 Squall-Leonhart

DMA1DAD and DMA1CNT hold a value of image

until the intro finally begins to appear, when the DMA2's recieve a value. image

Squall-Leonhart avatar Aug 07 '21 01:08 Squall-Leonhart

@RocketRobz Is it possible we can get twilightmenu/nds-bootstrap to be updated that we can add our own NDS firmware.bin to see if that fixes the GSDD launch issue?

gh0sti avatar May 06 '22 20:05 gh0sti

The user settings aren't the issue, as they're loaded properly. There is a separate issue that is causing the user settings check to fail.

RocketRobz avatar May 06 '22 21:05 RocketRobz

@RocketRobz Is it possible we can get twilightmenu/nds-bootstrap to be updated that we can add our own NDS firmware.bin to see if that fixes the GSDD launch issue?

i second this, would love that ability. most emulators have that ability, and by not including the bios with the emulator you are avoiding any legal trouble. it just might fix the problem with golden sun?

Rose22 avatar Jul 20 '22 11:07 Rose22

It was just a theory since thats part of its AP that it needs to see a valid bios file check. I'm wondering if that would fix other compatibility issued games as well.

gh0sti avatar Jul 20 '22 12:07 gh0sti

and by not including the bios with the emulator you are avoiding any legal trouble. it just might fix the problem with golden sun?

The BIOS and firmware are already on the console itself, so it isn't really a concern, I would figure

spellboundtriangle avatar Jul 20 '22 17:07 spellboundtriangle

After further investigation, the crash occurs in overlay 335.

Something in the overlay code is causing the game to branch to 0x021F7720 early before code gets loaded there. This does not occur when running the game outside of nds-bootstrap.

One can find out by setting a breakpoint to 0x021F7E80 and 0x021F7EAC, the latter of which contains a second instance of BLX R12, where R12 is where 0x021F7720 is set to.

EDIT: Welp, it seems NO$GBA's breakpoint feature is causing issues, as without setting 0x021F7720 as breakpoint, it does branch to valid code, though it apparently branches to the code where it stops the game from running.

RocketRobz avatar Aug 05 '22 06:08 RocketRobz

EDIT: Welp, it seems NO$GBA's breakpoint feature is causing issues, as without setting 0x021F7720 as breakpoint, it does branch to valid code, though it apparently branches to the code where it stops the game from running.

what happens if you test running golden sun in Twilight Menu using the official nintendo DS bios (or a file dump of it, if it differs from the one installed on 3ds)? it might just solve the problem... considering one of the people in this issue thread said that adding the bios in no$gba solves the problem

Rose22 avatar Aug 05 '22 12:08 Rose22