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

Sonic Chronicles - The Dark Brotherhood (Europe) freezes up on the first stage #359

Open
benderscruffy opened this issue Jan 7, 2019 · 17 comments
Labels
TIMING RENOVATION VICTIM when shit breaks in melonDS 0.7.1 but not in 0.7 timing Timing issue

Comments

@benderscruffy
Copy link

using 0.7.3
at the start of the first stage the game freezes up

@Arisotura
Copy link
Member

v0rp

@Arisotura
Copy link
Member

going to test it out. if it's not another timing issue, it's going to be interesting.

@Arisotura
Copy link
Member

welp, that's what I feared. it works on old versions (0.7 and older). it's a big fat stinky timing issue.

@Arisotura Arisotura added timing Timing issue TIMING RENOVATION VICTIM when shit breaks in melonDS 0.7.1 but not in 0.7 labels Jun 14, 2019
@Arisotura
Copy link
Member

looking back on it (also, related thread: http://melonds.kuribo64.net/board/thread.php?pid=2010#2010)

it actually started breaking in 0.7.3, not 0.7.1, so that's interesting

@Arisotura
Copy link
Member

as I feared: this is broken by commit 669247e

the one about using absolute timestamps

gonna try and figure out why.

@RSDuck
Copy link
Member

RSDuck commented Jul 17, 2020

this is likely a result of inaccurate arm9 timing

works with the arm9timing hack branch

@atomicwrites
Copy link

There is something problematic about the tutorials in this game, which seem to be pre-rendered videos. I was originally using DeSmuMe and it would crash in the POW actions tutorial, about 5 minutes into the game, then tried mellonDS and it crashes on the motion tutorial which is the first thing that happens. I built the arm9timinghack branch and it now got past the first few tutorials but crashes on the POW tutorial like DeSmuMe. I dont really see any info about it, what does arm9timinghack do? When it crashes, it starts spaming the console with

unknown arm9 read32 E597C038 | E597C03C 00000000
unknown arm9 read32 E597C03C | E597C03C 00000000
unknown arm9 read32 E597C040 | E597C040 00000000
unknown arm9 read32 E597C044 | E597C044 00000000
unknown arm9 read32 E597C048 | E597C048 00000000
unknown arm9 read32 E597C04C | E597C04C 00000000
unknown arm9 read32 E597C050 | E597C050 00000000
unknown arm9 read32 E597C054 | E597C054 00000000
unknown arm9 read32 E597C058 | E597C058 00000000
unknown arm9 read32 E597C05C | E597C05C 00000000
unknown arm9 read32 E597C060 | E597C060 00000000
unknown arm9 read32 E597C064 | E597C064 00000000
unknown arm9 read32 E597C068 | E597C068 00000000
unknown arm9 read32 E597C06C | E597C06C 00000000
unknown arm9 read32 E597C070 | E597C070 00000000
unknown arm9 read32 E597C074 | E597C074 00000000
unknown arm9 read32 E597C078 | E597C078 00000000
...

@RSDuck
Copy link
Member

RSDuck commented Sep 22, 2020

it's a timing issue, so something is too fast or too slow which results in something done in the wrong order. melonDS is pretty accurate in terms of timing except for arm9 timings (which are more or less a guess). The problem is that faithful arm9 timings would require implementing the cache which is quite expensive in terms of performance. So instead the arm9timinghack branch uses a heuristic I calibrated with a few timing sensitive games. With accurate arm9 timings enabled, desmume's implementation is better, though it isn't perfect either.

If you want, you can play around with these constants yourself (here: https://github.com/Arisotura/melonDS/blob/arm9timinghack/src/CP15.cpp#L30-L31 and here: https://github.com/Arisotura/melonDS/blob/arm9timinghack/src/CP15.cpp#L312).

The World Ends With You also still crashes due to a timing issue and it isn't fixed by arm9timinghacks either. There I proposed it could be a cartridge timing issue, but arm9timinghacks could be (and probably is) incomplete.

EDIT: in this concrete case it seems like some data (which contains an address to which is branched) is overriden by code, because E597C038 looks like a valid instruction.

@atomicwrites
Copy link

Hi, I just got around to this and I was able to get past this point by messing the cache timings. Raising
kDataCacheTimingSlow to 28 fixed it, any lower and it would crash. I didn't try changing the diff value on line 312 because I'm not quite sure what it's doing, it looks to me like it uses kDataCacheTimingSlow if the difference between the current and previous average cache time is greater than 3, and if not uses kDataCacheTiming but I'm not sure how it's calculating that/what it affects. Of course it doesn't help that I have 0 cpp experience. I'll see if there are any other crash points further along, but for now it's working finally, thanks. I wonder, how hard it would be to re-base this onto the current version...

@Theguysayhi
Copy link

Just thought I'd chip in and say I'm also experiencing this issue too. Hope it gets fixed soon.

@Mafiu0
Copy link

Mafiu0 commented Oct 11, 2021

Hey-ya! Just wanted to say that the same problem has occurred to me - any videoclip tutorial makes the game crash. Hopefully this gets fixed😔

@ViperAcidZX
Copy link

I'm having the same problem with the US version of this game.

@Zekann
Copy link

Zekann commented Apr 6, 2023

You can import a save for patch the first part of the game

@ks3ca
Copy link

ks3ca commented Dec 21, 2024

Since no one is useful here. I'm gonna attach a save file that has the tutorial part that crashes COMPLETED. There should be no crashes after that, I am currently playing through the game and will update.
Enjoy yall, this works for Delta on iOS as well.

Sonic Cronicles The Dark Brotherhood USA.zip

@ks3ca
Copy link

ks3ca commented Dec 21, 2024

Not sure if there will be an issue with US vs EU version but I suspect if someone finds that there is an issue, I'll be happy to load up the game on desmume and create a save file for the EU version

@Jaklyy
Copy link
Contributor

Jaklyy commented Dec 21, 2024

allegedly this pr: #2235 was able to get the game working, not sure if that's changed with some fixes i just pushed, though.
The pr is interpreter only (jit crashes the emulator) and is extremely cpu intensive, so no promises about it being a solution for everybody. (not to mention this game seems extremely picky about timings, so i make no promise that it'll work forever)

@ks3ca
Copy link

ks3ca commented Dec 23, 2024

So whichever intern coded this game decided whatever caused it to crash in the first tutorial video on melonDS was gonna cause the same crash in the POW tutorial on desmume's most modern version. So I installed an older version of desmume, 0.9.10 (I knew this was gonna work because I completed the game on this version previously) which allowed me to create this NEW save file which is past the crashing POW tutorial.

I will update as i go.
Sonic Cronicles The Dark Brotherhood USA.zip

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
TIMING RENOVATION VICTIM when shit breaks in melonDS 0.7.1 but not in 0.7 timing Timing issue
Projects
None yet
Development

No branches or pull requests

10 participants