aboutsummaryrefslogtreecommitdiff
path: root/libpsn00b/psxcd/common.c
diff options
context:
space:
mode:
authorspicyjpeg <thatspicyjpeg@gmail.com>2022-12-28 12:18:29 +0100
committerspicyjpeg <thatspicyjpeg@gmail.com>2022-12-28 12:18:29 +0100
commit7e350980d5c09bbc81a0de01bf016a87ecfc4feb (patch)
tree26b403d12eea34a4644b3d147f00e1d1455e7f52 /libpsn00b/psxcd/common.c
parenteaec942f56ceec9c14de5c4185a02602abadd50a (diff)
downloadpsn00bsdk-7e350980d5c09bbc81a0de01bf016a87ecfc4feb.tar.gz
Add CdUnlock() and DMA priority API
Diffstat (limited to 'libpsn00b/psxcd/common.c')
-rw-r--r--libpsn00b/psxcd/common.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/libpsn00b/psxcd/common.c b/libpsn00b/psxcd/common.c
index 8b8030b..c8f01d1 100644
--- a/libpsn00b/psxcd/common.c
+++ b/libpsn00b/psxcd/common.c
@@ -208,6 +208,9 @@ int CdInit(void) {
BUS_CD_CFG = 0x00020943;
+ SetDMAPriority(DMA_CD, 3);
+ DMA_CHCR(DMA_CD) = 0x00000000; // Stop DMA
+
CD_REG(0) = 1;
CD_REG(3) = 0x1f; // Acknowledge all IRQs
CD_REG(2) = 0x1f; // Enable all IRQs
@@ -217,9 +220,6 @@ int CdInit(void) {
CdlATV mix = { 0x80, 0x00, 0x80, 0x00 };
CdMix(&mix);
- DMA_DPCR |= 0x0000b000; // Enable DMA3
- DMA_CHCR(DMA_CD) = 0x00000000; // Stop DMA3
-
_last_mode = 0;
_ack_pending = 0;
_sync_pending = 0;