Play CDDA track

This commit is contained in:
2024-05-05 22:12:23 +02:00
parent 01622fd5d6
commit f91a7b470c
9 changed files with 80 additions and 3 deletions

View File

@@ -153,10 +153,12 @@ namespace JabyEngine {
static constexpr Desc GetStat{0x01, Interrupt::Type::Acknowledge};
static constexpr Desc SetLoc{0x02, Interrupt::Type::Acknowledge};
static constexpr Desc Play{0x03, Interrupt::Type::Acknowledge};
static constexpr Desc ReadN{0x06, Interrupt::Type::DataReady};
static constexpr Desc Pause{0x09, Interrupt::Type::Complete};
static constexpr Desc Init{0x0A, Interrupt::Type::Complete};
static constexpr Desc SetMode{0x0E, Interrupt::Type::Acknowledge};
static constexpr Desc GetTN{0x13, Interrupt::Type::Acknowledge};
};
static constexpr auto IORegister1Adr = 0x1F801801;

View File

@@ -1,5 +1,6 @@
#pragma once
#include "ioport.hpp"
#include <limits.hpp>
namespace JabyEngine {
namespace SPU_IO {
@@ -156,6 +157,10 @@ namespace JabyEngine {
__declare_io_port_w_type(inline, Adr, WorkAreaAdr, 0x1F801DA2);
};
static constexpr SimpleVolume operator""_vol(long double fraction) {
return {static_cast<int16_t>(static_cast<long double>(I16_MAX)*fraction)};
}
__declare_io_port(, ControlRegister, 0x1F801DAA);
__declare_io_port(, DataTransferControl, 0x1F801DAC);
__declare_io_port(, PMON, 0x1F801D90);