Update SPU

This commit is contained in:
2024-09-28 13:52:36 +02:00
parent a76784065a
commit 4a46392f24
4 changed files with 10 additions and 9 deletions

View File

@@ -21,13 +21,11 @@ namespace JabyEngine {
}
namespace DMA {
using words_t = size_t;
struct WordsReady {
uint32_t words_to_use;
bool is_last;
static constexpr WordsReady calculate(const State::Configuration& config, words_t words_left) {
static constexpr WordsReady calculate(const State::Configuration& config, size_t words_left) {
const auto config_data_words = (config.data_bytes/sizeof(uint32_t));
const auto words_to_use = (config_data_words > words_left) ? words_left : config_data_words;
@@ -39,7 +37,7 @@ namespace JabyEngine {
};
template<typename T>
static words_t send_words(words_t words_to_send, bool send_all) {
static size_t send_words(size_t words_to_send, bool send_all) {
auto blocks_to_send = words_to_send/16;
while(blocks_to_send > 0) {
const auto block_send = (blocks_to_send > UI16_MAX) ? UI16_MAX : blocks_to_send;

View File

@@ -6,6 +6,7 @@ namespace JabyEngine {
namespace SPU_IO_Values {
namespace MemoryMap {
static constexpr uintptr_t ADPCM = 0x01000;
static constexpr uintptr_t End = 0x7FFFF;
}
__declare_io_value(AD, uint16_t) {