Fix CD Interrupt for PS3 PSX Emulator

This commit is contained in:
jaby 2024-02-28 21:41:33 -05:00
parent 36fdbc1710
commit 01430e7770
1 changed files with 5 additions and 4 deletions

View File

@ -27,14 +27,15 @@ namespace JabyEngine {
SysCall::SysEnqIntRP(SysCall::Priority::CdromIoIrq, &::JabyEngine::CD::internal::callback);
CD_IO::PortIndex1::change_to();
CD_IO::Interrupt::ack_extended(CD_IO::PortIndex1::InterruptFlag);
CD_IO::PortIndex1::change_to();
CD_IO::Interrupt::ack_extended(CD_IO::PortIndex1::InterruptFlag);
CD_IO::Interrupt::enable(CD_IO::PortIndex1::InterruptEnable);
// TODO: Verify this on real HW
CD_IO::Interrupt::enable_extended(CD_IO::PortIndex1::InterruptEnable);
Interrupt::enable_irq(Interrupt::CDROM);
Interrupt::ack_irq(Interrupt::CDROM);
SysCall::ExitCriticalSection();
SysCall::ExitCriticalSection();
__debug_boot_color_at(::JabyEngine::GPU::Color24::Red(), DebugX, DebugY, DebugScale);
CD_IO::PortIndex0::change_to();