Add SPU memory allocation
This commit is contained in:
@@ -34,4 +34,14 @@ namespace JabyEngine {
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
static constexpr T min_of(T a, T b) {
|
||||
return (a < b) ? a : b;
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
static constexpr T max_of(T a, T b) {
|
||||
return (a > b) ? a : b;
|
||||
}
|
||||
}
|
11
include/PSX/SPU/spu.hpp
Normal file
11
include/PSX/SPU/spu.hpp
Normal file
@@ -0,0 +1,11 @@
|
||||
#pragma once
|
||||
#include "../jabyengine.hpp"
|
||||
|
||||
namespace JabyEngine {
|
||||
namespace SPU {
|
||||
const uint8_t* allocate_voice(uint8_t voice, size_t size);
|
||||
void deallocate_voice(uint8_t voice);
|
||||
|
||||
void dump();
|
||||
}
|
||||
}
|
@@ -4,6 +4,10 @@
|
||||
|
||||
namespace JabyEngine {
|
||||
namespace SPU_IO {
|
||||
namespace MemoryMap {
|
||||
static constexpr uintptr_t ADPCM = 0x01000;
|
||||
}
|
||||
|
||||
enum struct Mode {
|
||||
Linear = 0,
|
||||
Exponential = 1,
|
||||
@@ -126,7 +130,8 @@ namespace JabyEngine {
|
||||
static constexpr auto EchoBits = BitRange::from_to(0, 23);
|
||||
};
|
||||
|
||||
static constexpr size_t VoiceCount = 24;
|
||||
static constexpr size_t VoiceCount = 24;
|
||||
static constexpr size_t ReverbCount = 1;
|
||||
|
||||
struct Key {
|
||||
__declare_io_port_w_type(inline, ubus32_t, On, 0x1F801D88);
|
||||
|
Reference in New Issue
Block a user