Update IOPort code and prepare DMA usage - needs all testing

This commit is contained in:
Björn Gaier
2024-09-06 18:58:36 +01:00
parent e7b9033f52
commit 7b99fd4de8
6 changed files with 14 additions and 41 deletions

View File

@@ -21,7 +21,7 @@ namespace JabyEngine {
SPU_IO::ControlRegister.set_transfer_mode(SPU_IO::ControlRegister::DMAWrite);
}
static void set_src(SPU::SRAM_Adr adr) {
static void set_src(uintptr_t adr) {
DMA_IO::SPU.set_adr(adr);
}

View File

@@ -41,7 +41,7 @@ namespace JabyEngine {
static Progress parse_sample(State::Configuration& config, VAGState& state) {
// Load balancer?
return Progress::Error;
}
static Progress parse_header(State::Configuration& config, VAGState& state) {

View File

@@ -11,9 +11,9 @@ namespace JabyEngine {
SRAM_Adr Voice :: allocate(size_t size) const {
Voice::stop();
const auto voice_id = Voice::get_id();
const auto adr = static_cast<SRAM_Adr>(reinterpret_cast<uintptr_t>(SPU_MMU::allocate(voice_id, size)));
const auto adr = SRAM_Adr{static_cast<SRAM_Adr::UnderlyingType>(reinterpret_cast<uintptr_t>(SPU_MMU::allocate(voice_id, size)))};
SPU_IO::Voice[voice_id].adr.write({adr});
SPU_IO::Voice[voice_id].adr.write(adr);
return adr;
}