Fix CD IRQ issue

This commit is contained in:
Jaby 2024-02-29 21:13:23 -05:00
parent 591d52b5f3
commit 00b2c351db
2 changed files with 3 additions and 4 deletions

View File

@ -19,7 +19,6 @@ namespace JabyEngine {
((parameter_fifo.write(CD_IO::ParameterFifo{args})),...);
cmd_fifo.write(CD_IO::CommandFifo {cmd.id});
cmd_interrupt_bit = bit::set(0, cmd.complete_irq);
}
template<typename T, typename...ARGS>
@ -30,7 +29,8 @@ namespace JabyEngine {
template<typename...ARGS>
static void send_wait(IOPort<CD_IO::CommandFifo>& cmd_fifo, IOPort<CD_IO::ParameterFifo>& parameter_fifo, CD_IO::Command::Desc cmd, ARGS...args) {
send(cmd_fifo, parameter_fifo, cmd, args...);
wait_completed();
cmd_interrupt_bit = bit::set(0, cmd.complete_irq);
wait_completed(); // TODO: This was moved because of Duckstation - but is it fine on real hardware?
}
template<typename T, typename...ARGS>

View File

@ -88,7 +88,6 @@ namespace JabyEngine {
Progress CDFileProcessor :: process() {
const auto cur_state = CD::internal::read_current_state();
CDFileProcessor::process_data();
switch(cur_state) {
case CD::internal::State::Done:
@ -100,7 +99,7 @@ namespace JabyEngine {
return Progress::Done;
case CD::internal::State::BufferFull:
/* We processd data and unpause the CD drive */
/* We processed data and unpause the CD drive */
CD::internal::continue_reading();
return Progress::InProgress;