Only update DIMAR and DILENGTH if transfer completed without error
Turns out, Gamecube games actually do check DILENGTH, and if DILENGTH is at 0, they'll think the transfer completed successfully even if DEINT is used, since after all, surely that means everything was sent. That caused all sorts of issues, from audio looping when a disc is removed since it's re-using the same buffer to just flat-out crashing instead of showing the disc removed screen.
This commit is contained in:
parent
fba51b2956
commit
537e40afb5
|
@ -1283,8 +1283,11 @@ void FinishExecutingCommand(ReplyType reply_type, DIInterruptType interrupt_type
|
||||||
else if (reply_type == ReplyType::Interrupt || reply_type == ReplyType::IOS)
|
else if (reply_type == ReplyType::Interrupt || reply_type == ReplyType::IOS)
|
||||||
transfer_size = s_DILENGTH;
|
transfer_size = s_DILENGTH;
|
||||||
|
|
||||||
|
if (interrupt_type == DIInterruptType::TCINT)
|
||||||
|
{
|
||||||
s_DIMAR += transfer_size;
|
s_DIMAR += transfer_size;
|
||||||
s_DILENGTH -= transfer_size;
|
s_DILENGTH -= transfer_size;
|
||||||
|
}
|
||||||
|
|
||||||
switch (reply_type)
|
switch (reply_type)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue