Play nice jingle and more clean-up
This commit is contained in:
@@ -42,24 +42,6 @@ namespace JabyEngine {
|
||||
}
|
||||
}
|
||||
|
||||
static void test_spu_alloc() {
|
||||
static const auto calculate_spu_adr = [](size_t size) -> const uint8_t* {
|
||||
return reinterpret_cast<const uint8_t*>(SPU_IO_Values::MemoryMap::ADPCM + size);
|
||||
};
|
||||
static const auto simple_assert = [](uint32_t test_id, const uint8_t* adr, const uint8_t* expected) {
|
||||
static const char* ok_text = "Test %i: 0x%p == 0x%p; OK\n";
|
||||
static const char* failed_text = "Test %i: 0x%p != 0x%p; Failed\n";
|
||||
|
||||
printf(adr == expected ? ok_text : failed_text, test_id, adr, expected);
|
||||
};
|
||||
|
||||
printf("=== SPU test ===\n");
|
||||
simple_assert(0, SPU_MMU::allocate(0, 0x600), calculate_spu_adr(0x0));
|
||||
simple_assert(1, SPU_MMU::allocate(1, 0x800), calculate_spu_adr(0x600));
|
||||
simple_assert(2, SPU_MMU::allocate(0, 0x300), calculate_spu_adr(0x0));
|
||||
simple_assert(3, SPU_MMU::allocate(2, 0x300), calculate_spu_adr(0x300));
|
||||
}
|
||||
|
||||
namespace boot {
|
||||
namespace Start {
|
||||
// Thanks to Nicolas Noble!
|
||||
@@ -99,7 +81,6 @@ namespace JabyEngine {
|
||||
GTE::setup();
|
||||
test_bios_font();
|
||||
test_gte_scale();
|
||||
test_spu_alloc();
|
||||
|
||||
SPU::setup();
|
||||
}
|
||||
|
@@ -5,7 +5,6 @@
|
||||
#include <PSX/System/syscalls.hpp>
|
||||
#include <stdio.hpp>
|
||||
|
||||
// TODO: Can you use the GPU IO Port while also using DMA?
|
||||
namespace JabyEngine {
|
||||
namespace CD {
|
||||
namespace internal {
|
||||
|
@@ -44,6 +44,7 @@ namespace JabyEngine {
|
||||
const auto words_used = Helper::DMA::send_words<SPU::internal::DMA>(words_to_use, is_last);
|
||||
|
||||
state.words_left -= words_used;
|
||||
|
||||
config.processed(words_used*sizeof(uint32_t));
|
||||
return is_last ? Progress::Done : Progress::InProgress;
|
||||
}
|
||||
|
@@ -62,12 +62,6 @@ namespace JabyEngine {
|
||||
|
||||
void render(const uint32_t* data, size_t words) {
|
||||
wait_ready_for_CMD();
|
||||
#ifdef __SUPPORT_PS3__
|
||||
// TODO: Doesn't matter anymore...?
|
||||
// The PS3 needs explict change to FiFo
|
||||
//GPU_IO::GP1.set_dma_direction(GPU_IO_Values::GPUSTAT::DMADirection::Fifo);
|
||||
#endif // __SUPPORT_PS3__
|
||||
|
||||
for(size_t n = 0; n < words; n++) {
|
||||
GPU_IO::GP0.write({data[n]});
|
||||
}
|
||||
|
@@ -2,6 +2,7 @@
|
||||
#include <PSX/System/IOPorts/spu_io.hpp>
|
||||
#include <PSX/Auxiliary/math_helper.hpp>
|
||||
#include <PSX/SPU/spu.hpp>
|
||||
#include <PSX/jabyengine_config.hpp>
|
||||
#include <stddef.hpp>
|
||||
#ifdef __DEBUG_SPU_MMU__
|
||||
#include <stdio.hpp>
|
||||
|
Reference in New Issue
Block a user