mirror of
https://github.com/libretro/pcsx2.git
synced 2024-11-25 10:20:09 +00:00
SPU2-X: Another sync regression fix. My earlier experiments didn't fly, so I reverted the TimeUpdate call in spu2_read also (negative impact on some dma-related things, but fixes lots of other weird stuff).
Changed several instances of afxres.rc in plugins to be afxresmw.rc (for VS Express) git-svn-id: http://pcsx2.googlecode.com/svn/trunk@611 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
parent
fe78c668de
commit
edc418d0e4
@ -7,7 +7,7 @@
|
||||
//
|
||||
// Generated from the TEXTINCLUDE 2 resource.
|
||||
//
|
||||
#include "afxres.h"
|
||||
#include "afxresmw.h"
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
#undef APSTUDIO_READONLY_SYMBOLS
|
||||
@ -34,14 +34,12 @@ END
|
||||
|
||||
2 TEXTINCLUDE
|
||||
BEGIN
|
||||
"#include ""afxres.h""\r\n"
|
||||
"\0"
|
||||
"#include ""afxresmw.h""\r\0"
|
||||
END
|
||||
|
||||
3 TEXTINCLUDE
|
||||
BEGIN
|
||||
"\r\n"
|
||||
"\0"
|
||||
"\r\0"
|
||||
END
|
||||
|
||||
#endif // APSTUDIO_INVOKED
|
||||
@ -63,10 +61,8 @@ BEGIN
|
||||
PUSHBUTTON "Select Iso",IDC_SELECTISO,160,10,45,14
|
||||
PUSHBUTTON "Compress Iso",IDC_COMPRESSISO,33,75,65,14
|
||||
PUSHBUTTON "Decompress Iso",IDC_DECOMPRESSISO,113,75,65,14
|
||||
COMBOBOX IDC_METHOD,120,55,85,50,CBS_DROPDOWNLIST | WS_VSCROLL |
|
||||
WS_TABSTOP
|
||||
CONTROL "Progress1",IDC_PROGRESS,"msctls_progress32",WS_BORDER |
|
||||
0x1,10,35,145,14
|
||||
COMBOBOX IDC_METHOD,120,55,85,50,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
|
||||
CONTROL "Progress1",IDC_PROGRESS,"msctls_progress32",PBS_SMOOTH | WS_BORDER,10,35,145,14
|
||||
LTEXT "Compression Method:",IDC_STATIC,29,57,69,8
|
||||
PUSHBUTTON "Stop",IDC_STOP,160,35,45,14
|
||||
GROUPBOX "",IDC_STATIC,5,0,205,95
|
||||
@ -76,18 +72,15 @@ BEGIN
|
||||
END
|
||||
|
||||
IDD_ABOUT DIALOG 0, 0, 177, 106
|
||||
STYLE DS_SETFONT | DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION |
|
||||
WS_SYSMENU
|
||||
STYLE DS_SETFONT | DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
||||
CAPTION "CDVDabout"
|
||||
FONT 8, "MS Sans Serif"
|
||||
BEGIN
|
||||
DEFPUSHBUTTON "OK",IDOK,65,85,50,14
|
||||
LTEXT "CDVDiso Driver",IDC_NAME,70,10,50,8
|
||||
GROUPBOX "",IDC_STATIC,5,35,170,40
|
||||
LTEXT "Thanks to:\n mooby - coding hints and .bz support\n Brenden Conte - linux conf bugfix",
|
||||
IDC_STATIC,10,45,160,25
|
||||
LTEXT "Author: linuzappz <linuzappz@hotmail.com>",IDC_STATIC,
|
||||
20,20,141,10
|
||||
LTEXT "Thanks to:\n mooby - coding hints and .bz support\n Brenden Conte - linux conf bugfix",IDC_STATIC,10,45,160,25
|
||||
LTEXT "Author: linuzappz <linuzappz@hotmail.com>",IDC_STATIC,20,20,141,10
|
||||
END
|
||||
|
||||
|
||||
|
@ -7,11 +7,7 @@
|
||||
//
|
||||
// Generated from the TEXTINCLUDE 2 resource.
|
||||
//
|
||||
#ifdef __MINGW32__
|
||||
#include "afxresmw.h"
|
||||
#else
|
||||
#include "afxres.h"
|
||||
#endif
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
#undef APSTUDIO_READONLY_SYMBOLS
|
||||
@ -38,14 +34,12 @@ END
|
||||
|
||||
2 TEXTINCLUDE
|
||||
BEGIN
|
||||
"#include ""afxres.h""\r\n"
|
||||
"\0"
|
||||
"#include ""afxresmw.h""\r\0"
|
||||
END
|
||||
|
||||
3 TEXTINCLUDE
|
||||
BEGIN
|
||||
"\r\n"
|
||||
"\0"
|
||||
"\r\0"
|
||||
END
|
||||
|
||||
#endif // APSTUDIO_INVOKED
|
||||
@ -68,8 +62,7 @@ BEGIN
|
||||
END
|
||||
|
||||
IDD_ABOUT DIALOGEX 0, 0, 177, 106
|
||||
STYLE DS_SETFONT | DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION |
|
||||
WS_SYSMENU
|
||||
STYLE DS_SETFONT | DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
||||
CAPTION "FireWire About"
|
||||
FONT 8, "MS Sans Serif", 0, 0, 0x0
|
||||
BEGIN
|
||||
|
@ -7,9 +7,7 @@
|
||||
//
|
||||
// Generated from the TEXTINCLUDE 2 resource.
|
||||
//
|
||||
|
||||
#include "afxres.h"
|
||||
|
||||
#include "afxresmw.h"
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
#undef APSTUDIO_READONLY_SYMBOLS
|
||||
@ -36,14 +34,12 @@ END
|
||||
|
||||
2 TEXTINCLUDE
|
||||
BEGIN
|
||||
"#include ""afxres.h""\r\n"
|
||||
"\0"
|
||||
"#include ""afxresmw.h""\r\0"
|
||||
END
|
||||
|
||||
3 TEXTINCLUDE
|
||||
BEGIN
|
||||
"\r\n"
|
||||
"\0"
|
||||
"\r\0"
|
||||
END
|
||||
|
||||
#endif // APSTUDIO_INVOKED
|
||||
@ -66,8 +62,7 @@ BEGIN
|
||||
END
|
||||
|
||||
IDD_ABOUT DIALOGEX 0, 0, 177, 106
|
||||
STYLE DS_SETFONT | DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION |
|
||||
WS_SYSMENU
|
||||
STYLE DS_SETFONT | DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
||||
CAPTION "USBabout"
|
||||
FONT 8, "MS Sans Serif", 0, 0, 0x0
|
||||
BEGIN
|
||||
|
@ -366,31 +366,34 @@ EXPORT_C_(u16) SPU2read(u32 rmem)
|
||||
// if(!replay_mode)
|
||||
// s2r_readreg(Cycles,rmem);
|
||||
|
||||
//TimeUpdate( *cPtr );
|
||||
|
||||
u16 ret=0xDEAD; u32 core=0, mem=rmem&0xFFFF, omem=mem;
|
||||
if (mem & 0x400) { omem^=0x400; core=1; }
|
||||
|
||||
if(rmem==0x1f9001AC)
|
||||
{
|
||||
ret = DmaRead(core);
|
||||
ret = DmaRead(core);
|
||||
}
|
||||
else if (rmem>>16 == 0x1f80)
|
||||
else
|
||||
{
|
||||
ret = SPU_ps1_read(rmem);
|
||||
}
|
||||
else if ((mem&0xFFFF)>=0x800)
|
||||
{
|
||||
ret=spu2Ru16(mem);
|
||||
ConLog(" * SPU2: Read from reg>=0x800: %x value %x\n",mem,ret);
|
||||
}
|
||||
else
|
||||
{
|
||||
ret = *(regtable[(mem>>1)]);
|
||||
//FileLog("[%10d] SPU2 read mem %x (core %d, register %x): %x\n",Cycles, mem, core, (omem & 0x7ff), ret);
|
||||
SPU2writeLog( "read", rmem, ret );
|
||||
}
|
||||
TimeUpdate( *cPtr );
|
||||
|
||||
if (rmem>>16 == 0x1f80)
|
||||
{
|
||||
ret = SPU_ps1_read(rmem);
|
||||
}
|
||||
else if( (mem&0xFFFF) >= 0x800 )
|
||||
{
|
||||
ret = spu2Ru16(mem);
|
||||
ConLog(" * SPU2: Read from reg>=0x800: %x value %x\n",mem,ret);
|
||||
}
|
||||
else
|
||||
{
|
||||
ret = *(regtable[(mem>>1)]);
|
||||
//FileLog("[%10d] SPU2 read mem %x (core %d, register %x): %x\n",Cycles, mem, core, (omem & 0x7ff), ret);
|
||||
SPU2writeLog( "read", rmem, ret );
|
||||
}
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
@ -440,8 +440,8 @@ static s32 __forceinline GetVoiceValues_Cubic( V_Core& thiscore, uint voiceidx )
|
||||
|
||||
// Note! It's very important that ADSR stay as accurate as possible. By the way
|
||||
// it is used, various sound effects can end prematurely if we truncate more than
|
||||
// one or two bits.
|
||||
return MulShr32( val, vc.ADSR.Value>>1 );
|
||||
// one or two bits. (or maybe it's better with no truncation at all?)
|
||||
return MulShr32( val>>1, vc.ADSR.Value );
|
||||
}
|
||||
|
||||
// Noise values need to be mixed without going through interpolation, since it
|
||||
|
@ -321,6 +321,66 @@ static const int SanityInterval = 4800;
|
||||
u32 TicksCore = 0;
|
||||
u32 TicksThread = 0;
|
||||
|
||||
PCSX2_ALIGNED16( static u64 g_globalMMXData[8] );
|
||||
|
||||
static __forceinline void SaveMMXRegs()
|
||||
{
|
||||
#ifdef _MSC_VER
|
||||
__asm {
|
||||
movntq mmword ptr [g_globalMMXData + 0], mm0
|
||||
movntq mmword ptr [g_globalMMXData + 8], mm1
|
||||
movntq mmword ptr [g_globalMMXData + 16], mm2
|
||||
movntq mmword ptr [g_globalMMXData + 24], mm3
|
||||
movntq mmword ptr [g_globalMMXData + 32], mm4
|
||||
movntq mmword ptr [g_globalMMXData + 40], mm5
|
||||
movntq mmword ptr [g_globalMMXData + 48], mm6
|
||||
movntq mmword ptr [g_globalMMXData + 56], mm7
|
||||
emms
|
||||
}
|
||||
#else
|
||||
__asm__(".intel_syntax\n"
|
||||
"movq [%0+0x00], %%mm0\n"
|
||||
"movq [%0+0x08], %%mm1\n"
|
||||
"movq [%0+0x10], %%mm2\n"
|
||||
"movq [%0+0x18], %%mm3\n"
|
||||
"movq [%0+0x20], %%mm4\n"
|
||||
"movq [%0+0x28], %%mm5\n"
|
||||
"movq [%0+0x30], %%mm6\n"
|
||||
"movq [%0+0x38], %%mm7\n"
|
||||
"emms\n"
|
||||
".att_syntax\n" : : "r"(g_globalMMXData) );
|
||||
#endif
|
||||
}
|
||||
|
||||
static __forceinline void RestoreMMXRegs()
|
||||
{
|
||||
#ifdef _MSC_VER
|
||||
__asm {
|
||||
movq mm0, mmword ptr [g_globalMMXData + 0]
|
||||
movq mm1, mmword ptr [g_globalMMXData + 8]
|
||||
movq mm2, mmword ptr [g_globalMMXData + 16]
|
||||
movq mm3, mmword ptr [g_globalMMXData + 24]
|
||||
movq mm4, mmword ptr [g_globalMMXData + 32]
|
||||
movq mm5, mmword ptr [g_globalMMXData + 40]
|
||||
movq mm6, mmword ptr [g_globalMMXData + 48]
|
||||
movq mm7, mmword ptr [g_globalMMXData + 56]
|
||||
emms
|
||||
}
|
||||
#else
|
||||
__asm__(".intel_syntax\n"
|
||||
"movq %%mm0, [%0+0x00]\n"
|
||||
"movq %%mm1, [%0+0x08]\n"
|
||||
"movq %%mm2, [%0+0x10]\n"
|
||||
"movq %%mm3, [%0+0x18]\n"
|
||||
"movq %%mm4, [%0+0x20]\n"
|
||||
"movq %%mm5, [%0+0x28]\n"
|
||||
"movq %%mm6, [%0+0x30]\n"
|
||||
"movq %%mm7, [%0+0x38]\n"
|
||||
"emms\n"
|
||||
".att_syntax\n" : : "r"(g_globalMMXData) );
|
||||
#endif
|
||||
}
|
||||
|
||||
void __fastcall TimeUpdate(u32 cClocks)
|
||||
{
|
||||
u32 dClocks = cClocks-lClocks;
|
||||
@ -401,7 +461,10 @@ void __fastcall TimeUpdate(u32 cClocks)
|
||||
lClocks+=TickInterval;
|
||||
Cycles++;
|
||||
|
||||
SaveMMXRegs();
|
||||
Mix();
|
||||
RestoreMMXRegs();
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -17,7 +17,6 @@
|
||||
<Configurations>
|
||||
<Configuration
|
||||
Name="Devel|Win32"
|
||||
IntermediateDirectory="$(ConfigurationName)"
|
||||
ConfigurationType="2"
|
||||
InheritedPropertySheets="..\..\..\..\common\vsprops\plugin_svnroot.vsprops;..\..\..\..\common\vsprops\BaseProperties.vsprops;..\..\..\..\common\vsprops\3rdpartyDeps.vsprops"
|
||||
UseOfMFC="0"
|
||||
@ -210,7 +209,6 @@
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Release|Win32"
|
||||
IntermediateDirectory="$(ConfigurationName)"
|
||||
ConfigurationType="2"
|
||||
InheritedPropertySheets="..\..\..\..\common\vsprops\plugin_svnroot.vsprops;..\..\..\..\common\vsprops\BaseProperties.vsprops;..\..\..\..\common\vsprops\3rdpartyDeps.vsprops"
|
||||
UseOfMFC="0"
|
||||
@ -314,7 +312,6 @@
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Debug|Win32"
|
||||
IntermediateDirectory="$(ConfigurationName)"
|
||||
ConfigurationType="2"
|
||||
InheritedPropertySheets="..\..\..\..\common\vsprops\plugin_svnroot.vsprops;..\..\..\..\common\vsprops\BaseProperties.vsprops;..\..\..\..\common\vsprops\3rdpartyDeps.vsprops"
|
||||
UseOfMFC="0"
|
||||
|
@ -8,7 +8,7 @@
|
||||
// Generated from the TEXTINCLUDE 2 resource.
|
||||
//
|
||||
#include "resource.h"
|
||||
#include "afxres.h"
|
||||
#include "afxresmw.h"
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
#undef APSTUDIO_READONLY_SYMBOLS
|
||||
@ -206,14 +206,12 @@ END
|
||||
2 TEXTINCLUDE
|
||||
BEGIN
|
||||
"#include ""resource.h""\r\n"
|
||||
"#include ""afxres.h""\r\n"
|
||||
"\0"
|
||||
"#include ""afxresmw.h""\r\0"
|
||||
END
|
||||
|
||||
3 TEXTINCLUDE
|
||||
BEGIN
|
||||
"\r\n"
|
||||
"\0"
|
||||
"\r\0"
|
||||
END
|
||||
|
||||
#endif // APSTUDIO_INVOKED
|
||||
|
@ -7,7 +7,7 @@
|
||||
//
|
||||
// Generated from the TEXTINCLUDE 2 resource.
|
||||
//
|
||||
#include "afxres.h"
|
||||
#include "afxresmw.h"
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
#undef APSTUDIO_READONLY_SYMBOLS
|
||||
@ -107,14 +107,12 @@ END
|
||||
|
||||
2 TEXTINCLUDE
|
||||
BEGIN
|
||||
"#include ""afxres.h""\r\n"
|
||||
"\0"
|
||||
"#include ""afxresmw.h""\r\0"
|
||||
END
|
||||
|
||||
3 TEXTINCLUDE
|
||||
BEGIN
|
||||
"\r\n"
|
||||
"\0"
|
||||
"\r\0"
|
||||
END
|
||||
|
||||
#endif // APSTUDIO_INVOKED
|
||||
|
@ -7,7 +7,7 @@
|
||||
//
|
||||
// Generated from the TEXTINCLUDE 2 resource.
|
||||
//
|
||||
#include "afxres.h"
|
||||
#include "afxresmw.h"
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
#undef APSTUDIO_READONLY_SYMBOLS
|
||||
@ -34,14 +34,12 @@ END
|
||||
|
||||
2 TEXTINCLUDE
|
||||
BEGIN
|
||||
"#include ""afxres.h""\r\n"
|
||||
"\0"
|
||||
"#include ""afxresmw.h""\r\0"
|
||||
END
|
||||
|
||||
3 TEXTINCLUDE
|
||||
BEGIN
|
||||
"\r\n"
|
||||
"\0"
|
||||
"\r\0"
|
||||
END
|
||||
|
||||
#endif // APSTUDIO_INVOKED
|
||||
|
Loading…
Reference in New Issue
Block a user