From d4e4abfe82756be95ff4cc352b704b21e5ac0b19 Mon Sep 17 00:00:00 2001 From: "sudonim1@gmail.com" Date: Sun, 2 Sep 2012 22:07:11 +0000 Subject: [PATCH] SPU2-X: TDA is a fake internal register (which should probably be nuked), so reading from the FIFO (or whatever 1AC is) certainly shouldn't use it. Also fixed up related code a little. We don't know of any games which actually use this though. Actually I don't know if we know that reading this register does anything, this could all be the product of an overactive imagination. git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5399 96395faa-99c1-11dd-bbfe-3dabce05a288 --- plugins/spu2-x/src/PS2E-spu2.cpp | 4 ++-- plugins/spu2-x/src/defs.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/plugins/spu2-x/src/PS2E-spu2.cpp b/plugins/spu2-x/src/PS2E-spu2.cpp index eeba13ebfd..60147e1585 100644 --- a/plugins/spu2-x/src/PS2E-spu2.cpp +++ b/plugins/spu2-x/src/PS2E-spu2.cpp @@ -589,7 +589,7 @@ EXPORT_C_(u16) SPU2read(u32 rmem) u16 ret=0xDEAD; u32 core=0, mem=rmem&0xFFFF, omem=mem; if (mem & 0x400) { omem^=0x400; core=1; } - if(rmem==0x1f9001AC) + if(omem == 0x1f9001AC) { ret = Cores[core].DmaRead(); } @@ -602,7 +602,7 @@ EXPORT_C_(u16) SPU2read(u32 rmem) { ret = Cores[0].ReadRegPS1(rmem); } - else if( (mem&0xFFFF) >= 0x800 ) + else if (mem >= 0x800) { ret = spu2Ru16(mem); ConLog("* SPU2-X: Read from reg>=0x800: %x value %x\n",mem,ret); diff --git a/plugins/spu2-x/src/defs.h b/plugins/spu2-x/src/defs.h index c38c2b3bc0..5d20d4608a 100644 --- a/plugins/spu2-x/src/defs.h +++ b/plugins/spu2-x/src/defs.h @@ -496,8 +496,8 @@ struct V_Core __forceinline u16 DmaRead() { - const u16 ret = (u16)spu2M_Read(TDA); - ++TDA; TDA &= 0xfffff; + const u16 ret = (u16)spu2M_Read(TSA); + ++TSA; TSA &= 0xfffff; return ret; }