diff options
Diffstat (limited to 'libpcsxcore/psxhw.c')
| -rw-r--r-- | libpcsxcore/psxhw.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/libpcsxcore/psxhw.c b/libpcsxcore/psxhw.c index 2e48469c..8e1e8667 100644 --- a/libpcsxcore/psxhw.c +++ b/libpcsxcore/psxhw.c @@ -194,9 +194,9 @@ u32 psxHwRead32(u32 add) { switch (add) { case 0x1f801040: hard = sioRead8(); - hard|= sioRead8() << 8; - hard|= sioRead8() << 16; - hard|= sioRead8() << 24; + hard |= sioRead8() << 8; + hard |= sioRead8() << 16; + hard |= sioRead8() << 24; #ifdef PAD_LOG PAD_LOG("sio read32 ;ret = %lx\n", hard); #endif @@ -480,9 +480,12 @@ void psxHwWrite16(u32 add, u16 value) { } #define DmaExec(n) { \ - if (SWAPu32(HW_DMA##n##_CHCR) & 0x01000000) return; \ + if (SWAPu32(HW_DMA##n##_CHCR) & 0x01000000) { \ + HW_DMA##n##_CHCR = SWAPu32(value); \ + return; \ + } \ 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)); \ } \ |
