Project

General

Profile

Actions

Emulator Issues #12241

closed

Project M or LXP launcher freezes

Added by ryanebola16 over 3 years ago. Updated over 3 years ago.

Status:
Fixed
Priority:
High
Assignee:
-
% Done:

0%

Operating system:
Issue type:
Bug
Milestone:
Current
Regression:
Yes
Relates to usability:
No
Relates to performance:
No
Easy:
No
Relates to maintainability:
No
Regression start:
5.0-12436
Fixed in:
5.0-12565

Description

Game Name?

Project M or LXP launcher for Super Smash Bros. Brawl mods

What's the problem? Describe what went wrong.

Note: These launchers need DSPLLE.

See attached logs. Things seem to differ after Core\HW\EXI\EXI_DeviceIPL.cpp:306 N[OSREPORT]: << RVL_SDK - DVD release build: Aug 2 2007 13:46:28 (0x4199_60831) >>

What steps will reproduce the problem?

  1. Enable DSPLLE
  2. Run Project M launcher or LXP launcher to load Brawl mods. Let me know if an explanation for how to set this up is needed.
  3. Observe freeze.

Is the issue present in the latest development version? For future reference, please also write down the version number of the latest development version.

5.0-12528

Is the issue present in the latest stable version?

No 5.0

If the issue isn't present in the latest stable version, which is the first broken version? (You can find the first broken version by bisecting. Windows users can use the tool https://forums.dolphin-emu.org/Thread-green-notice-development-thread-unofficial-dolphin-bisection-tool-for-finding-broken-builds and anyone who is building Dolphin on their own can use git bisect.)

5.0-12436

What are your PC specifications? (CPU, GPU, Operating System, more)

Win 10 Pro x64
Intel Core i7-4702MQ CPU @2.20GHz
GeForce GT 750M
2x 8GB Hynix 1600MHz
GeForce Game Ready Driver 425.31


Files

5012426 GOOD.txt (51.5 KB) 5012426 GOOD.txt ryanebola16, 09/03/2020 08:50 AM
5012436 FREEZE.txt (13 KB) 5012436 FREEZE.txt ryanebola16, 09/03/2020 08:50 AM
5012426 GOOD 2.txt (5.61 KB) 5012426 GOOD 2.txt ryanebola16, 09/03/2020 11:13 PM
5012436 FREEZE 2.txt (3.92 KB) 5012436 FREEZE 2.txt ryanebola16, 09/03/2020 11:13 PM
Actions #1

Updated by AdmiralCurtiss over 3 years ago

For reference, that bisect points to: https://dolphin-emu.org/download/dev/07a0d44b36c487967cbd957ed9bd20384bf3e33a/

Which yeah, seems plausible.

Actions #2

Updated by pokechu22 over 3 years ago

Can you attach logs with IOS - Drive Interface (IOS_DI), DVD Interface (DVD), and Processor Interface (PI) enabled in the log configuration?

Actions #4

Updated by pokechu22 over 3 years ago

Looks like the issue is in the game's antipiracy "Error #001" check, which attempts to make a read past the end of the disc, expecting it to fail with an out of bounds result (which wouldn't happen with DVD-Rs apparently). But instead of giving an out of bounds error, the disc drive wants the disc ID to be read since it was just reset (something that was only implemented in 5.0-12436). Testing the normal game, I don't see the write to PI_RESET_CODE happening, so it's probably something to do with the mod.

There are two possibilities:

  • The write to PI_RESET_CODE shouldn't be happening but is for some reason
  • The out-of-bounds error is supposed to take priority over the disc ID not read error (which seems unlikely to me)

I'll do some further testing. The one thing that strikes me as odd is that I'd expect the "Error #001" message to show up in this case instead of just a freeze.

Actions #5

Updated by pokechu22 over 3 years ago

I was able to reproduce, but it sent me back to the System Menu instead of freezing. Do you have a System Menu installed?

Project M is definitely intentionally writing 1 to PI_RESET_CODE (it actually logs 0xCC003024 = 1, but none of its log messages show up after WDVD OpenPartion because (as far as I can tell) after Dolphin detects a game switch, it resets the HLE patches since they usually don't apply anymore; in this case Project M has a few more log messages before it actually starts Smash). I don't see anything else that writes something else back to PI_RESET_CODE (Project M doesn't do it, and Smash only does it in one place that doesn't seem to apply and wasn't hit when launching the game normally).

It also turns out that the "Error #001" message won't show up in this case, because it actually checks the top byte of the error result (in this case 0x05020401) and returns false immediately if it's nonzero (it only performs further checking of the error code, which might result in the message, if the top byte is zero). Since the top byte is the drive state (with 5 being disc ID not read), it won't give the message. I'm guessing Nintendo did this so that if someone ejected the disc right after it started, it wouldn't make the claim about an unauthorized device. The false return value causes the calling code to run OSReturnToMenu(), so the System Menu part makes sense at least.

Unfortunately, I don't fully understand what's happening here. My first possibility doesn't apply (the write is clearly intended), and the second one also doesn't (even if the out-of-bounds error took priority in the no disc ID state, that'd result in a return of 0x05052100 because it still includes the state value of 5, and thus it would still return to menu). Possibly the implementation of PI_RESET_CODE is backwards (right now, we reset the drive when bit 2 (0x4) is cleared, but instead it should be reset when it's set), but that doesn't seem quite right to me since libogc's (and Nintendo's) DVD_LowReset clears it, waits, and then enables it again; I'd expect the reset signal to be the period when it's unset.

Actions #6

Updated by pokechu22 over 3 years ago

Fix: https://github.com/dolphin-emu/dolphin/pull/9060 (hardware testing seems to show PI_RESET_CODE not resetting DI in Wii mode)

Actions #7

Updated by JosJuice over 3 years ago

  • Status changed from New to Fix pending
Actions #8

Updated by ryanebola16 over 3 years ago

  • Operating system deleted (N/A)

Great, I'm using a NAND dump and my system menu no longer works. Since you were able to reproduce the rest of the problem I doubt that it's related. I'll file a new issue if redumping doesn't help and I find a bug relating to why the system menu no longer works for me. Thanks!

Actions #9

Updated by JosJuice over 3 years ago

  • Status changed from Fix pending to Fixed
  • Fixed in set to 5.0-12565
Actions

Also available in: Atom PDF