Prepare setup of CD drive
This commit is contained in:
@@ -1,13 +1,26 @@
|
||||
#include "../../include/BootLoader/boot_loader.hpp"
|
||||
#include <PSX/System/IOPorts/cd_io.hpp>
|
||||
#include <PSX/System/IOPorts/interrupt_io.hpp>
|
||||
#include <PSX/System/IOPorts/memory_io.hpp>
|
||||
#include <PSX/System/syscalls.h>
|
||||
|
||||
namespace JabyEngine {
|
||||
namespace boot {
|
||||
namespace CD {
|
||||
void setup() {
|
||||
CD_IO::PortIndex0::change_to();
|
||||
CD_IO::PortIndex0::DataFifo.read();
|
||||
CD_IO::PortIndex0::DataFifo16.read();
|
||||
__syscall_EnterCriticalSection();
|
||||
Memory_IO::COM_DELAY.write(Memory_IO::COM_DELAY::SetupValue);
|
||||
Memory_IO::CD_DELAY.write(Memory_IO::CD_DELAY::SetupValue);
|
||||
|
||||
//Equeue Callback?
|
||||
|
||||
CD_IO::PortIndex1::change_to();
|
||||
CD_IO::Interrupt::ack_extended(CD_IO::PortIndex1::InterruptFlagRegister);
|
||||
CD_IO::Interrupt::enable(CD_IO::PortIndex1::InterruptEnableRegister);
|
||||
|
||||
Interrupt::ack_irq(Interrupt::CDROM);
|
||||
Interrupt::enable_irq(Interrupt::CDROM);
|
||||
__syscall_ExitCriticalSection();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -15,6 +15,8 @@ namespace JabyEngine {
|
||||
enable_DMA();
|
||||
|
||||
SPU::stop_voices();
|
||||
|
||||
CD::setup();
|
||||
Timer::setup();
|
||||
|
||||
const auto start = HighResTime::get_time_stamp();
|
||||
|
Reference in New Issue
Block a user