Fix assignment of DI interrupt mask ioctls

0x85 is actually DVDLowMaskCoverInterrupt, while 0x89 is DVDLowUnmaskCoverInterrupt.  I'm also fairly sure that 0x87 is DVDLowUnmaskStatusInterrupts.
This commit is contained in:
Pokechu22 2020-02-01 13:40:52 -08:00
parent 69ee15e5ef
commit bb5e5fd8f2
2 changed files with 11 additions and 7 deletions

View File

@ -240,21 +240,25 @@ std::optional<DI::DIResult> DI::StartIOCtl(const IOCtlRequest& request)
INFO_LOG(IOS_DI, "DVDLowGetImmBuf 0x%08x", diimmbuf);
return WriteIfFits(request, diimmbuf);
}
case DIIoctl::DVDLowUnmaskCoverInterrupt:
INFO_LOG(IOS_DI, "DVDLowUnmaskCoverInterrupt");
case DIIoctl::DVDLowMaskCoverInterrupt:
INFO_LOG(IOS_DI, "DVDLowMaskCoverInterrupt");
DVDInterface::SetInterruptEnabled(DVDInterface::DIInterruptType::CVRINT, false);
return DIResult::Success;
case DIIoctl::DVDLowClearCoverInterrupt:
DEBUG_LOG(IOS_DI, "DVDLowClearCoverInterrupt");
DVDInterface::ClearInterrupt(DVDInterface::DIInterruptType::CVRINT);
return DIResult::Success;
case DIIoctl::DVDLowUnmaskStatusInterrupts:
INFO_LOG(IOS_DI, "DVDLowUnmaskStatusInterrupts");
// Dummied out
return DIResult::Success;
case DIIoctl::DVDLowGetCoverStatus:
// TODO: handle resetting case
INFO_LOG(IOS_DI, "DVDLowGetCoverStatus: Disc %sInserted",
DVDInterface::IsDiscInside() ? "" : "Not ");
return WriteIfFits(request, DVDInterface::IsDiscInside() ? 2 : 1);
case DIIoctl::DVDLowEnableCoverInterrupt:
INFO_LOG(IOS_DI, "DVDLowEnableCoverInterrupt");
case DIIoctl::DVDLowUnmaskCoverInterrupt:
INFO_LOG(IOS_DI, "DVDLowUnmaskCoverInterrupt");
DVDInterface::SetInterruptEnabled(DVDInterface::DIInterruptType::CVRINT, true);
return DIResult::Success;
case DIIoctl::DVDLowReset:

View File

@ -60,11 +60,11 @@ public:
DVDLowReadDvdDiscKey = 0x82,
DVDLowGetLength = 0x83,
DVDLowGetImmBuf = 0x84, // Unconfirmed name
DVDLowUnmaskCoverInterrupt = 0x85,
DVDLowMaskCoverInterrupt = 0x85,
DVDLowClearCoverInterrupt = 0x86,
// 0x87 is a dummied out command
DVDLowUnmaskStatusInterrupts = 0x87, // Dummied out, ID is educated guess
DVDLowGetCoverStatus = 0x88,
DVDLowEnableCoverInterrupt = 0x89, // Unconfirmed name
DVDLowUnmaskCoverInterrupt = 0x89,
DVDLowReset = 0x8a,
DVDLowOpenPartition = 0x8b, // ioctlv only
DVDLowClosePartition = 0x8c,