Citra: Super mario maker hang when creating extra data

Created on 17 Jan 2017  路  18Comments  路  Source: citra-emu/citra

(This issue is to document a possible solution rather than just to report a bug)

Note: to boot the game you need to make a mii first. you can run mii maker on citra or import a mii save data.

After checking the mii, the game will try create (huge) extdata, while a scene of a eating pigeon is displayed on the screen. On real 3DS this process takes about 3 minutes. On citra, the file creating process finishes instantly, but the scene goes forever.

This issue is likely caused by instant return from svcSendSyncRequest without rescheduling. I tried to put the svcSendSyncRequest caller thread to sleep for 1ms, then wake and preempt it. This successfully bypasses the hang and lets it go in game. I also tried 0.1ms but it doesn't work well.

cc @Subv

A-kernel T-game-hang

Most helpful comment

@Subv SleepThread(0) doesn't work. SleepThread(1ms) without preempting does work, though. Similarly SleepThread(0.1ms) doesn't work.

The detailed observation:

  • Current master / SleepThread(0) at the end of SendSyncRequest with/out preempting: the pigeon doesn't eat the food at all and hangs forever.
  • SleepThread(0.1ms) at the end of SendSyncRequest with/out preempting: the pigeon eats the food to some point and stop, then hangs forever
  • SleepThread(1ms) at the end of SendSyncRequest with/out preempting: the pigeon eats all food and then go in game.

All 18 comments

Ooh interesting, what about quick reschedules? ie. SleepThread(0)

@Subv SleepThread(0) doesn't work. SleepThread(1ms) without preempting does work, though. Similarly SleepThread(0.1ms) doesn't work.

The detailed observation:

  • Current master / SleepThread(0) at the end of SendSyncRequest with/out preempting: the pigeon doesn't eat the food at all and hangs forever.
  • SleepThread(0.1ms) at the end of SendSyncRequest with/out preempting: the pigeon eats the food to some point and stop, then hangs forever
  • SleepThread(1ms) at the end of SendSyncRequest with/out preempting: the pigeon eats all food and then go in game.

I want to add game Animal Crossing: Happy Home Designer, without sleep, game just hang, only L trigger (screenshot) works

I like this:
_SleepThread(1ms) at the end of SendSyncRequest with/out preempting: the pigeon eats all food and then go in game._
Is it a change that can be done without affecting other games or cause other issues or slowdowns?

@Colmines92

Is it a change that can be done without affecting other games or cause other issues or slowdowns?

No it will slowdown the game very much (with known reasons). It is not meant to be a proper fix. It is only for finding the problem source

Does manually adding ticks inside SendSyncRequest fix the issue?

@Subv I am not sure if this is the correct way to do this. I added Core::System::GetInstance().CPU().AddTicks(ticks); in SendSyncRequest, where for ticks I tried 0.1ms, 1ms and 10ms. None of them helps

Maybe try https://github.com/citra-emu/citra/issues/2526#issuecomment-279085036 and see if it helps?

@Subv I have tried that before (and tried again today), but it doesn't help

As of Canary-201 this issue is considered partially fixed.
It needs PR #3091 + #3184 and possibly #3119 as well for it to be able to load the game (when save file existed).
If starting new game, the game will ~hang~ stalled (animation still works but it does nothing) when creating extra data but soft reset the game afterward will work as usual.

A video for preview.

Does it really hang? afaik the game takes a very long time creating the extdata on console

Info: The game is still broken due to the new delay value does not fix the stalled animation. It works with the previous higher delay value.

is this not implemented in the latest build?

Hey, I would like to know how to do this, but honestly I don't understand how to. Do I have to download the Citra source code, edit something and build it? And if not, do I need a specific release?

@Korkonica see https://github.com/citra-emu/citra/pull/3440 for more information about how to fix it. That PR only adds appropriate delays for reading data, but citra doesn't emulate delays on writing data. So what you need to do is change the homebrew that is linked there to write to each location instead of read, run it on hardware and get appropriate values, and add a write delay generator in the same manner that the read generator works.

^ Same issues with Minecraft at Startup of the Game , Needs little bust and better yep "Correct Values" with this commit that makes it work.

Hey is there a way to fix this ? This don't work for me :(

hi, i don't know how do that. can someone send me a video?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

DeathWrench picture DeathWrench  路  3Comments

Allanouille picture Allanouille  路  3Comments

Atsuraelu picture Atsuraelu  路  3Comments

kdex picture kdex  路  4Comments

ghost picture ghost  路  3Comments