mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-02-13 15:59:23 +01:00
Only reset drive chip state (not DI registers) when changing discs
Resetting the DI registers disables interrupts, which means any errors reported (for instance) are just not sent though.
This commit is contained in:
parent
537e40afb5
commit
b8715b42d2
@ -375,6 +375,13 @@ void Reset(bool spinup)
|
||||
s_DICFG.Hex = 0;
|
||||
s_DICFG.CONFIG = 1; // Disable bootrom descrambler
|
||||
|
||||
ResetDrive(spinup);
|
||||
}
|
||||
|
||||
// Resets state on the MN102 chip in the drive itself, but not the DI registers exposed on the
|
||||
// emulated device, or any inserted disc.
|
||||
void ResetDrive(bool spinup)
|
||||
{
|
||||
s_stream = false;
|
||||
s_stop_at_track_end = false;
|
||||
s_audio_position = 0;
|
||||
@ -453,7 +460,7 @@ void SetDisc(std::unique_ptr<DiscIO::VolumeDisc> disc,
|
||||
DVDThread::SetDisc(std::move(disc));
|
||||
SetLidOpen();
|
||||
|
||||
Reset(false);
|
||||
ResetDrive(false);
|
||||
}
|
||||
|
||||
bool IsDiscInside()
|
||||
|
@ -111,6 +111,7 @@ enum class EjectCause
|
||||
|
||||
void Init();
|
||||
void Reset(bool spinup = true);
|
||||
void ResetDrive(bool spinup);
|
||||
void Shutdown();
|
||||
void DoState(PointerWrap& p);
|
||||
|
||||
|
@ -268,7 +268,7 @@ std::optional<DI::DIResult> DI::StartIOCtl(const IOCtlRequest& request)
|
||||
{
|
||||
const bool spinup = Memory::Read_U32(request.address + 4);
|
||||
INFO_LOG(IOS_DI, "DVDLowReset %s spinup", spinup ? "with" : "without");
|
||||
DVDInterface::Reset(spinup);
|
||||
DVDInterface::ResetDrive(spinup);
|
||||
ResetDIRegisters();
|
||||
return DIResult::Success;
|
||||
}
|
||||
|
@ -37,7 +37,7 @@ static void ReinitHardware()
|
||||
// HACK However, resetting DI will reset the DTK config, which is set by the system menu
|
||||
// (and not by MIOS), causing games that use DTK to break. Perhaps MIOS doesn't actually
|
||||
// reset DI fully, in such a way that the DTK config isn't cleared?
|
||||
// DVDInterface::Reset();
|
||||
// DVDInterface::ResetDrive(true);
|
||||
PowerPC::Reset();
|
||||
Wiimote::ResetAllWiimotes();
|
||||
// Note: this is specific to Dolphin and is required because we initialised it in Wii mode.
|
||||
|
Loading…
x
Reference in New Issue
Block a user