From 591d52b5f3edc19b1ec78bd64c6e03d55c514af8 Mon Sep 17 00:00:00 2001 From: Jaby Date: Wed, 28 Feb 2024 21:41:33 -0500 Subject: [PATCH] Fix CD Interrupt for PS3 PSX Emulator --- src/Library/src/BootLoader/cd_boot.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/Library/src/BootLoader/cd_boot.cpp b/src/Library/src/BootLoader/cd_boot.cpp index 82f91b7e..73cfcf6c 100644 --- a/src/Library/src/BootLoader/cd_boot.cpp +++ b/src/Library/src/BootLoader/cd_boot.cpp @@ -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();