summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xlibpcsxcore/psxhw.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/libpcsxcore/psxhw.c b/libpcsxcore/psxhw.c
index 2e7241d0..f119d6fa 100755
--- a/libpcsxcore/psxhw.c
+++ b/libpcsxcore/psxhw.c
@@ -503,12 +503,23 @@ void psxHwWrite16(u32 add, u16 value) {
#define DmaExec(n) { \
HW_DMA##n##_CHCR = SWAPu32(value); \
\
+ if (SWAPu32(HW_DMA##n##_CHCR) & 0x01000000 && SWAPu32(HW_DMA_PCR) & (8 << (n * 4))) { \
+ psxDma##n(SWAPu32(HW_DMA##n##_MADR), SWAPu32(HW_DMA##n##_BCR), SWAPu32(HW_DMA##n##_CHCR)); \
+ } \
+}
+
+#if 0
+// Failed with: Lode Runner, Tales Of Phantasy.
+#define DmaExec(n) { \
+ HW_DMA##n##_CHCR = SWAPu32(value); \
+\
if ((SWAPu32(HW_DMA##n##_CHCR) & 0x01000000 || \
(n == 2 && SWAPu32(HW_DMA##n##_CHCR) == 0x0401)) /* Vampire Hunter D */ && \
SWAPu32(HW_DMA_PCR) & (8 << (n * 4))) { \
psxDma##n(SWAPu32(HW_DMA##n##_MADR), SWAPu32(HW_DMA##n##_BCR), SWAPu32(HW_DMA##n##_CHCR)); \
} \
}
+#endif
void psxHwWrite32(u32 add, u32 value) {
switch (add) {