From 1ccb62ed8e2ba0ac2fe6d0f29eef3e4b69f10b74 Mon Sep 17 00:00:00 2001 From: "SND\\weimingzhi_cp" Date: Sat, 13 Feb 2010 03:49:01 +0000 Subject: git-svn-id: https://pcsxr.svn.codeplex.com/svn/pcsxr@41506 e17a0e51-4ae3-4d35-97c3-1a29b211df97 --- libpcsxcore/cdrom.c | 3 ++- libpcsxcore/psxhw.c | 13 ++++++++----- libpcsxcore/r3000a.c | 2 +- 3 files changed, 11 insertions(+), 7 deletions(-) (limited to 'libpcsxcore') diff --git a/libpcsxcore/cdrom.c b/libpcsxcore/cdrom.c index b2384671..c6d44290 100644 --- a/libpcsxcore/cdrom.c +++ b/libpcsxcore/cdrom.c @@ -105,13 +105,14 @@ static struct SubQ *subq; cdr.FirstSector = 1; \ cdr.Readed = 0xff; \ AddIrqQueue(READ_ACK, 0x800); \ -} +} #define StopReading() { \ if (cdr.Reading) { \ cdr.Reading = 0; \ psxRegs.interrupt &= ~0x40000; \ } \ + cdr.StatP &= ~0x20; \ } #define StopCdda() { \ 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)); \ } \ diff --git a/libpcsxcore/r3000a.c b/libpcsxcore/r3000a.c index 6a8a7051..c0b163bb 100644 --- a/libpcsxcore/r3000a.c +++ b/libpcsxcore/r3000a.c @@ -26,7 +26,7 @@ #include "cdrom.h" #include "mdec.h" #include "gte.h" -#include "cheat.h" +#include "cheat.h" #include "ppf.h" psxRegisters psxRegs; -- cgit v1.2.3