aboutsummaryrefslogtreecommitdiff
path: root/libpsn00b/psxspu
diff options
context:
space:
mode:
Diffstat (limited to 'libpsn00b/psxspu')
-rw-r--r--libpsn00b/psxspu/common.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/libpsn00b/psxspu/common.c b/libpsn00b/psxspu/common.c
index a340af6..5dae473 100644
--- a/libpsn00b/psxspu/common.c
+++ b/libpsn00b/psxspu/common.c
@@ -44,6 +44,11 @@ static size_t _dma_transfer(uint32_t *data, size_t length, int write) {
length += DMA_CHUNK_LENGTH - 1;
}
+ // Increase bus delay for DMA reads
+ SPU_DELAY_SIZE &= 0xf0ffffff;
+ if (!write)
+ SPU_DELAY_SIZE = 2 << 24;
+
SPU_CTRL &= 0xffcf; // Disable DMA request
_wait_status(0x0030, 0x0000);
@@ -102,6 +107,8 @@ static size_t _manual_write(const uint16_t *data, size_t length) {
/* Public API */
void SpuInit(void) {
+ SPU_DELAY_SIZE = 0x200931e1;
+
SPU_CTRL = 0x0000; // SPU disabled
_wait_status(0x001f, 0x0000);