Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Golden Sun Dark Dawn black screen at launch #252

Closed
Stack3r opened this issue Jun 26, 2018 · 51 comments
Closed

Golden Sun Dark Dawn black screen at launch #252

Stack3r opened this issue Jun 26, 2018 · 51 comments
Labels
AP Issue Bug Major Major bug at least breaking one game completely Retail
Projects
Milestone

Comments

@Stack3r
Copy link
Collaborator

Stack3r commented Jun 26, 2018

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

@ahezard
Copy link
Collaborator

ahezard commented Jun 29, 2018

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

@Stack3r
Copy link
Collaborator Author

Stack3r commented Jun 29, 2018

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

@ahezard
Copy link
Collaborator

ahezard commented Jun 29, 2018

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
Copy link
Collaborator

ahezard commented Jun 29, 2018

arm7 is not thumb and is properly patched

@ahezard
Copy link
Collaborator

ahezard commented Jun 29, 2018

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

@Kalanyr
Copy link

Kalanyr commented Aug 31, 2018

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

@ahezard
Copy link
Collaborator

ahezard commented Jan 31, 2019

Could be linked to #517

@ahezard
Copy link
Collaborator

ahezard commented Feb 28, 2019

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
Copy link
Collaborator

ahezard commented Feb 28, 2019

Could be linked to #539

@ahezard
Copy link
Collaborator

ahezard commented Mar 1, 2019

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
Copy link
Collaborator

ahezard commented Mar 7, 2019

This can be linked somehow to chishm/nitrohax#3

@ahezard
Copy link
Collaborator

ahezard commented Mar 12, 2019

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
Copy link
Collaborator

ahezard commented Mar 17, 2019

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
Copy link
Collaborator

ahezard commented Mar 17, 2019

Card ID start should be : 02049904

@ahezard ahezard added this to the 1.0 Release milestone May 15, 2019
@ahezard
Copy link
Collaborator

ahezard commented Jun 9, 2019

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

@firelad97
Copy link

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!

@ChittendenLC
Copy link

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

@dubbz82
Copy link

dubbz82 commented Nov 30, 2019

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.

@Kalanyr
Copy link

Kalanyr commented Jan 29, 2020

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 (4b1258b )

@Rose22
Copy link

Rose22 commented Jul 20, 2022

@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?

@gh0sti
Copy link

gh0sti commented Jul 20, 2022

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.

@spellboundtriangle
Copy link
Contributor

spellboundtriangle commented Jul 20, 2022

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

@RocketRobz
Copy link
Member

RocketRobz commented Aug 5, 2022

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.

@Rose22
Copy link

Rose22 commented Aug 5, 2022

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
Copy link

Rose22 commented Aug 5, 2022

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.

i'm referring to this post

@NightScript370
Copy link
Member

I wouldn't rely on that conclusion, to be frank. It could be a piece of code that got branched earlier because of the lack of firmware.bin and our issue would be solely because of something else.

Even if you still want to do it....how? You're loading the same thing already provided to you by the DS itself. After all, the firmware.bin originates from the same device we're hooking into directly.

@Rose22
Copy link

Rose22 commented Aug 5, 2022

I wouldn't rely on that conclusion, to be frank. It could be a piece of code that got branched earlier because of the lack of firmware.bin and our issue would be solely because of something else.

Even if you still want to do it....how? You're loading the same thing already provided to you by the DS itself. After all, the firmware.bin originates from the same device we're hooking into directly.

oh, i forgot twilight menu doesn't just run on 3DS but also on original DS's.. i figured it might be a subtle difference between the firmware.bin file and the DS firmware included with the 3ds.

perhaps you guys could do the firmware.bin thing that person described, and use breakpoints to see why it successfully runs?

@RocketRobz
Copy link
Member

Unfortunately, even with breakpoints, it is unclear how it successfully runs.

@JeodC
Copy link

JeodC commented Aug 5, 2022

I wouldn't rely on that conclusion, to be frank. It could be a piece of code that got branched earlier because of the lack of firmware.bin and our issue would be solely because of something else.
Even if you still want to do it....how? You're loading the same thing already provided to you by the DS itself. After all, the firmware.bin originates from the same device we're hooking into directly.

oh, i forgot twilight menu doesn't just run on 3DS but also on original DS's.. i figured it might be a subtle difference between the firmware.bin file and the DS firmware included with the 3ds.

perhaps you guys could do the firmware.bin thing that person described, and use breakpoints to see why it successfully runs?

I used my firmware.bin ripped directly from my own 3ds. There is no difference.

@hubert-skowronek
Copy link

@RocketRobz what about forking desmume source code and use it as a debugger? Doing so helped me to create Bowsers Inside Story AP patch

@Ch3ck3rM0n
Copy link

I used my firmware.bin ripped directly from my own 3ds. There is no difference.

So this means, still no way or workaround to get my golden sun image working and I still have to use my hard copy?

@RocketRobz
Copy link
Member

So this means, still no way or workaround to get my golden sun image working and I still have to use my hard copy?

Right. This is something that other (possibly more experienced) nds-bootstrap or DS(i) homebrew developers would know what to do.

@gh0sti
Copy link

gh0sti commented Jan 25, 2023

Would it be possible to try using a donor rom header?

@RocketRobz
Copy link
Member

Would it be possible to try using a donor rom header?

How, exactly?

@worstperson
Copy link

I found that MelonDS in DS mode is advanced enough to boot the flashcart version of TWL Menu and launch retail roms via nds-bootstrap. My idea is to add a bunch of logging to the interpreter (for example, every branch and it's destination) so I can directly compare code flow between a working state launched directly and broken launched through bootstrap. Just wanted to check with others if this approach has already been tried, or is even viable, since I have little arm reversing experience and basically no knowledge of the NDS platform.

@RocketRobz
Copy link
Member

I found that MelonDS in DS mode is advanced enough to boot the flashcart version of TWL Menu and launch retail roms via nds-bootstrap. My idea is to add a bunch of logging to the interpreter (for example, every branch and it's destination) so I can directly compare code flow between a working state launched directly and broken launched through bootstrap. Just wanted to check with others if this approach has already been tried, or is even viable, since I have little arm reversing experience and basically no knowledge of the NDS platform.

To my knowledge, this hasn't been tried yet.

@gh0sti
Copy link

gh0sti commented Feb 10, 2023

Would it be possible to try using a donor rom header?

How, exactly?

Could we patch the rom with a good header to see if that would work? Tricking the emulator to boot up a good known header of a rom?

@NightScript370
Copy link
Member

The game code is problematic in the overlay area, which is unique to each game. This will do nothing to change the compatibility for the better.

@chrisssj2
Copy link

Would love to see this finally updated to work

@RocketRobz
Copy link
Member

Fully works as of cadf553

Retail ROMs automation moved this from High priority to Closed Sep 8, 2023
@Kaisaan Kaisaan unpinned this issue Sep 8, 2023
@gh0sti
Copy link

gh0sti commented Sep 8, 2023

What fixed it?

@RocketRobz
Copy link
Member

What fixed it?

Basically, the AP-fix included with TWLMenu++ was broken, so a new better AP-fix has been implemented into nds-bootstrap.
A writeup is coming soon.

@gh0sti
Copy link

gh0sti commented Sep 9, 2023

What fixed it?

Basically, the AP-fix included with TWLMenu++ was broken, so a new better AP-fix has been implemented into nds-bootstrap. A writeup is coming soon.

Thank you for not giving up and the work is appreciated!

@RocketRobz
Copy link
Member

New version with GSDD support is now available, along with the write-up: https://github.com/DS-Homebrew/nds-bootstrap/releases/tag/v1.0.0

@Sukotto-1999
Copy link

All done!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
AP Issue Bug Major Major bug at least breaking one game completely Retail
Projects
Retail ROMs
  
Closed
Development

No branches or pull requests