mirror of https://github.com/PCSX2/pcsx2.git
SPU2-X: Fix for DMC1, closing Issue 17 once and for all; also added ICC patch from Issue 75.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@657 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
parent
a4a7bf91dc
commit
63fe0a5fdc
|
@ -895,36 +895,36 @@ void ResetMenuSlots() {
|
||||||
|
|
||||||
|
|
||||||
#define _ADDSUBMENU(menu, menun, string) \
|
#define _ADDSUBMENU(menu, menun, string) \
|
||||||
{ submenu[menun] = CreatePopupMenu(); \
|
submenu[menun] = CreatePopupMenu(), \
|
||||||
AppendMenu(menu, MF_STRING | MF_POPUP, (UINT)submenu[menun], string); }
|
AppendMenu(menu, MF_STRING | MF_POPUP, (UINT)submenu[menun], string)
|
||||||
|
|
||||||
#define ADDSUBMENU(menun, string) \
|
#define ADDSUBMENU(menun, string) \
|
||||||
_ADDSUBMENU(gApp.hMenu, menun, string);
|
_ADDSUBMENU(gApp.hMenu, menun, string);
|
||||||
|
|
||||||
#define ADDSUBMENUS(submn, menun, string) \
|
#define ADDSUBMENUS(submn, menun, string) \
|
||||||
{ submenu[menun] = CreatePopupMenu(); \
|
submenu[menun] = CreatePopupMenu(), \
|
||||||
InsertMenu(submenu[submn], 0, MF_BYPOSITION | MF_STRING | MF_POPUP, (UINT)submenu[menun], string); }
|
InsertMenu(submenu[submn], 0, MF_BYPOSITION | MF_STRING | MF_POPUP, (UINT)submenu[menun], string)
|
||||||
|
|
||||||
#define ADDMENUITEM(menun, string, id) \
|
#define ADDMENUITEM(menun, string, id) \
|
||||||
{ item.fType = MFT_STRING; \
|
item.fType = MFT_STRING, \
|
||||||
item.fMask = MIIM_STATE | MIIM_TYPE | MIIM_ID; \
|
item.fMask = MIIM_STATE | MIIM_TYPE | MIIM_ID, \
|
||||||
item.fState = MFS_ENABLED; \
|
item.fState = MFS_ENABLED, \
|
||||||
item.wID = id; \
|
item.wID = id, \
|
||||||
sprintf(buf, string); \
|
sprintf(buf, string), \
|
||||||
InsertMenuItem(submenu[menun], 0, TRUE, &item); }
|
InsertMenuItem(submenu[menun], 0, TRUE, &item)
|
||||||
|
|
||||||
#define ADDMENUITEMC(menun, string, id) \
|
#define ADDMENUITEMC(menun, string, id) \
|
||||||
{ item.fType = MFT_STRING; \
|
item.fType = MFT_STRING, \
|
||||||
item.fMask = MIIM_STATE | MIIM_TYPE | MIIM_ID; \
|
item.fMask = MIIM_STATE | MIIM_TYPE | MIIM_ID, \
|
||||||
item.fState = MFS_ENABLED | MFS_CHECKED; \
|
item.fState = MFS_ENABLED | MFS_CHECKED, \
|
||||||
item.wID = id; \
|
item.wID = id, \
|
||||||
sprintf(buf, string); \
|
sprintf(buf, string), \
|
||||||
InsertMenuItem(submenu[menun], 0, TRUE, &item); }
|
InsertMenuItem(submenu[menun], 0, TRUE, &item)
|
||||||
|
|
||||||
#define ADDSEPARATOR(menun) \
|
#define ADDSEPARATOR(menun) \
|
||||||
{ item.fMask = MIIM_TYPE; \
|
item.fMask = MIIM_TYPE, \
|
||||||
item.fType = MFT_SEPARATOR; \
|
item.fType = MFT_SEPARATOR, \
|
||||||
InsertMenuItem(submenu[menun], 0, TRUE, &item); }
|
InsertMenuItem(submenu[menun], 0, TRUE, &item)
|
||||||
|
|
||||||
void CreateMainMenu() {
|
void CreateMainMenu() {
|
||||||
MENUITEMINFO item;
|
MENUITEMINFO item;
|
||||||
|
@ -964,10 +964,9 @@ void CreateMainMenu() {
|
||||||
|
|
||||||
ADDSUBMENU(0, _("&Run"));
|
ADDSUBMENU(0, _("&Run"));
|
||||||
|
|
||||||
ADDSUBMENUS(0, 1, _("&Process Priority"));
|
if( IsDevBuild )
|
||||||
if( IsDevBuild ) {
|
|
||||||
ADDMENUITEM(0,_("&Arguments"), ID_RUN_CMDLINE);
|
ADDMENUITEM(0,_("&Arguments"), ID_RUN_CMDLINE);
|
||||||
}
|
|
||||||
ADDMENUITEM(0,_("Re&set"), ID_RUN_RESET);
|
ADDMENUITEM(0,_("Re&set"), ID_RUN_RESET);
|
||||||
ADDMENUITEM(0,_("E&xecute"), ID_RUN_EXECUTE);
|
ADDMENUITEM(0,_("E&xecute"), ID_RUN_EXECUTE);
|
||||||
|
|
||||||
|
@ -991,12 +990,12 @@ void CreateMainMenu() {
|
||||||
|
|
||||||
ADDSUBMENU(0,_("&Language"));
|
ADDSUBMENU(0,_("&Language"));
|
||||||
|
|
||||||
for (i=langsMax-1; i>=0; i--) {
|
for (i=langsMax-1; i>=0; i--)
|
||||||
if (!strcmp(Config.Lang, langs[i].lang)) {
|
{
|
||||||
|
if (!strcmp(Config.Lang, langs[i].lang))
|
||||||
ADDMENUITEMC(0,ParseLang(langs[i].lang), ID_LANGS + i);
|
ADDMENUITEMC(0,ParseLang(langs[i].lang), ID_LANGS + i);
|
||||||
} else {
|
else
|
||||||
ADDMENUITEM(0,ParseLang(langs[i].lang), ID_LANGS + i);
|
ADDMENUITEM(0,ParseLang(langs[i].lang), ID_LANGS + i);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef PCSX2_DEVBUILD
|
#ifdef PCSX2_DEVBUILD
|
||||||
|
|
|
@ -263,8 +263,10 @@ void DoDMAWrite(int core,u16 *pMem,u32 size)
|
||||||
//const u32 endpt2 = (buff2end + roundUp) / indexer_scalar;
|
//const u32 endpt2 = (buff2end + roundUp) / indexer_scalar;
|
||||||
//memset( pcm_cache_flags, 0, endpt2 );
|
//memset( pcm_cache_flags, 0, endpt2 );
|
||||||
|
|
||||||
memcpy( GetMemPtr( 0 ), &pMem[buff1size], buff2end*2 );
|
// Emulation Grayarea: Should addresses wrap around to zero, or wrap around to
|
||||||
|
// 0x2800? Hard to know for usre (almost no games depend on this)
|
||||||
|
|
||||||
|
memcpy( GetMemPtr( 0 ), &pMem[buff1size], buff2end*2 );
|
||||||
Cores[core].TDA = (buff2end+1) & 0xfffff;
|
Cores[core].TDA = (buff2end+1) & 0xfffff;
|
||||||
|
|
||||||
if(Cores[core].IRQEnable)
|
if(Cores[core].IRQEnable)
|
||||||
|
@ -274,7 +276,7 @@ void DoDMAWrite(int core,u16 *pMem,u32 size)
|
||||||
// Since the buffer wraps, the conditional might seem odd, but it works.
|
// Since the buffer wraps, the conditional might seem odd, but it works.
|
||||||
|
|
||||||
if( ( Cores[core].IRQA >= Cores[core].TSA ) ||
|
if( ( Cores[core].IRQA >= Cores[core].TSA ) ||
|
||||||
( Cores[core].IRQA <= Cores[core].TDA ) )
|
( Cores[core].IRQA < Cores[core].TDA ) )
|
||||||
{
|
{
|
||||||
Spdif.Info = 4 << core;
|
Spdif.Info = 4 << core;
|
||||||
SetIrqCall();
|
SetIrqCall();
|
||||||
|
@ -291,10 +293,12 @@ void DoDMAWrite(int core,u16 *pMem,u32 size)
|
||||||
if(Cores[core].IRQEnable)
|
if(Cores[core].IRQEnable)
|
||||||
{
|
{
|
||||||
// Flag interrupt?
|
// Flag interrupt?
|
||||||
// If IRQA occurs between start and dest, flag it:
|
// If IRQA occurs between start and dest, flag it.
|
||||||
|
// (start is inclusive, dest exclusive -- fixes DMC1 and hopefully won't break
|
||||||
|
// other games. ;)
|
||||||
|
|
||||||
if( ( Cores[core].IRQA >= Cores[core].TSA ) &&
|
if( ( Cores[core].IRQA >= Cores[core].TSA ) &&
|
||||||
( Cores[core].IRQA <= Cores[core].TDA ) )
|
( Cores[core].IRQA < Cores[core].TDA ) )
|
||||||
{
|
{
|
||||||
Spdif.Info = 4 << core;
|
Spdif.Info = 4 << core;
|
||||||
SetIrqCall();
|
SetIrqCall();
|
||||||
|
@ -353,8 +357,6 @@ void SPU2readDMA(int core, u16* pMem, u32 size)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Cores[core].TDA = buff2end;
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -371,14 +373,13 @@ void SPU2readDMA(int core, u16* pMem, u32 size)
|
||||||
// If IRQA occurs between start and dest, flag it:
|
// If IRQA occurs between start and dest, flag it:
|
||||||
|
|
||||||
if( ( Cores[i].IRQA >= Cores[i].TSA ) &&
|
if( ( Cores[i].IRQA >= Cores[i].TSA ) &&
|
||||||
( Cores[i].IRQA <= Cores[i].TDA+0x1f ) )
|
( Cores[i].IRQA < Cores[i].TDA ) )
|
||||||
{
|
{
|
||||||
Spdif.Info=4<<i;
|
Spdif.Info=4<<i;
|
||||||
SetIrqCall();
|
SetIrqCall();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Cores[core].TDA = buff1end;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -115,7 +115,7 @@ void dummy7()
|
||||||
#define Cread(a,b,c,d) if(fread(a,b,c,d)<b) break;
|
#define Cread(a,b,c,d) if(fread(a,b,c,d)<b) break;
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
#ifdef _MSC_VER
|
||||||
void CALLBACK s2r_replay(HWND hwnd, HINSTANCE hinst, LPSTR filename, int nCmdShow)
|
EXPORT_C_(void) s2r_replay(HWND hwnd, HINSTANCE hinst, LPSTR filename, int nCmdShow)
|
||||||
{
|
{
|
||||||
// load file
|
// load file
|
||||||
FILE *file=fopen(filename,"rb");
|
FILE *file=fopen(filename,"rb");
|
||||||
|
|
|
@ -29,7 +29,7 @@ void s2r_close();
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
#ifdef _MSC_VER
|
||||||
// s2r playing
|
// s2r playing
|
||||||
void CALLBACK s2r_replay(HWND hwnd, HINSTANCE hinst, LPSTR filename, int nCmdShow);
|
EXPORT_C_(void) s2r_replay(HWND hwnd, HINSTANCE hinst, LPSTR filename, int nCmdShow);
|
||||||
#else
|
#else
|
||||||
#define s2r_replay 0&&
|
#define s2r_replay 0&&
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue