Merge pull request #1033 from purplemarshmallow/RSP_Settings

introduce new per-game RSP settings
This commit is contained in:
zilmar 2016-03-21 09:16:54 +11:00
commit b95b822e1a
6 changed files with 40 additions and 17 deletions

View File

@ -1,4 +1,4 @@
// ============ RDB for PJ64 v2.2. GoodN64 v321 =====================================
// ============ RDB for PJ64 v2.2. GoodN64 v321 =====================================
// PJ64 v2.2 Official RDB
// Not for use with PJ64 v1.6 or previous
//---- START OF RDB FILE HEADER ---------------------------------------------------------
@ -2041,6 +2041,7 @@ Internal Name=GAUNTLET LEGENDS
Status=Issues (mixed)
Plugin Note=[Glide64] missing:various
RDRAM Size=8
RSP-Mfc0Count=10
[70B0260E-6716D04C-C:4A]
Good Name=Gauntlet Legends (J)
@ -2048,6 +2049,7 @@ Internal Name=GAUNTLET LEGENDS
Status=Issues (mixed)
Plugin Note=[Glide64] missing:various
RDRAM Size=8
RSP-Mfc0Count=10
[729B5E32-B728D980-C:45]
Good Name=Gauntlet Legends (U)
@ -2056,6 +2058,7 @@ Status=Issues (mixed)
Plugin Note=[Glide64] missing:various
Culling=1
RDRAM Size=8
RSP-Mfc0Count=10
[489C84E6-4C6E49F9-C:4A]
Good Name=Getter Love!! - Cho Ren-ai Party Game (J)
@ -2466,7 +2469,7 @@ Good Name=Indiana Jones and the Infernal Machine (E) (Unreleased)
Internal Name=Indiana Jones
Status=Only intro/part OK
Core Note=Camera issue; can't play
Plugin Note=[rsp] interpreter only [video] HLE not supported
Plugin Note=[Glide64] errors:various
32bit=No
AudioResetOnLoad=Yes
Counter Factor=1
@ -2486,7 +2489,7 @@ Good Name=Indiana Jones and the Infernal Machine (U)
Internal Name=Indiana Jones
Status=Only intro/part OK
Core Note=Camera issue; can't play
Plugin Note=[rsp] interpreter only [video] HLE not supported
Plugin Note=[Glide64] errors:various
32bit=No
AudioResetOnLoad=Yes
Counter Factor=1
@ -3274,6 +3277,7 @@ Internal Name=ÏصÉÌ«ÄËß°
Status=Issues (plugin)
Plugin Note=[video] HLE not supported; errors:various
HLE GFX=No
RSP-SemaphoreExit=1
[9C663069-80F24A80-C:50]
Good Name=Mario Party (E) (M3)
@ -4436,6 +4440,7 @@ Culling=1
Emulate Clear=1
Linking=Off
RDRAM Size=8
RSP-Mfc0Count=10
[AC5AA5C7-A9B0CDC3-C:46]
Good Name=Pokemon Stadium 2 (F)
@ -4446,6 +4451,7 @@ Culling=1
Emulate Clear=1
Linking=Off
RDRAM Size=8
RSP-Mfc0Count=10
[439B7E7E-C1A1495D-C:44]
Good Name=Pokemon Stadium 2 (G)
@ -4456,6 +4462,7 @@ Culling=1
Emulate Clear=1
Linking=Off
RDRAM Size=8
RSP-Mfc0Count=10
[EFCEAF00-22094848-C:49]
Good Name=Pokemon Stadium 2 (I)
@ -4466,6 +4473,7 @@ Culling=1
Emulate Clear=1
Linking=Off
RDRAM Size=8
RSP-Mfc0Count=10
[63775886-5FB80E7B-C:4A]
Good Name=Pokemon Stadium 2 (J)
@ -4486,6 +4494,7 @@ Culling=1
Emulate Clear=1
Linking=Off
RDRAM Size=8
RSP-Mfc0Count=10
[03571182-892FD06D-C:45]
Good Name=Pokemon Stadium 2 (U)
@ -4496,6 +4505,7 @@ Culling=1
Emulate Clear=1
Linking=Off
RDRAM Size=8
RSP-Mfc0Count=10
[EE4FD7C2-9CF1D938-C:4A]
Good Name=Pokemon Stadium Kin Gin (J)
@ -4506,6 +4516,7 @@ Culling=1
Emulate Clear=1
Linking=Off
RDRAM Size=8
RSP-Mfc0Count=10
[41380792-A167E045-C:45]
Good Name=Polaris SnoCross (U)
@ -5269,7 +5280,7 @@ SMM-TLB=0
Good Name=Star Wars - Rogue Squadron (E) (M3) (V1.0)
Internal Name=Rogue Squadron
Status=Broken (plugin)
Plugin Note=[rsp] interpreter only [video] HLE not supported
Plugin Note=[Glide64] errors:various
32bit=No
AudioResetOnLoad=Yes
Counter Factor=1
@ -5281,7 +5292,7 @@ RSP-JumpTableSize=3584
Good Name=Star Wars - Rogue Squadron (E) (M3) (V1.1)
Internal Name=Rogue Squadron
Status=Broken (plugin)
Plugin Note=[rsp] interpreter only [video] HLE not supported
Plugin Note=[Glide64] errors:various
32bit=No
AudioResetOnLoad=Yes
Counter Factor=1
@ -5293,7 +5304,7 @@ RSP-JumpTableSize=3584
Good Name=Star Wars - Rogue Squadron (U) (V1.0)
Internal Name=Rogue Squadron
Status=Broken (plugin)
Plugin Note=[rsp] interpreter only [video] HLE not supported
Plugin Note=[Glide64] errors:various
32bit=No
AudioResetOnLoad=Yes
Counter Factor=1
@ -5305,7 +5316,7 @@ RSP-JumpTableSize=3584
Good Name=Star Wars - Rogue Squadron (U) (V1.1)
Internal Name=Rogue Squadron
Status=Broken (plugin)
Plugin Note=[rsp] interpreter only [video] HLE not supported
Plugin Note=[Glide64] errors:various
32bit=No
AudioResetOnLoad=Yes
Counter Factor=1
@ -5350,7 +5361,7 @@ RDRAM Size=8
Good Name=Star Wars - Shutsugeki! Rogue Chuutai (J)
Internal Name=rogue squadron
Status=Broken (plugin)
Plugin Note=[rsp] interpreter only [video] HLE not supported
Plugin Note=[Glide64] errors:various
32bit=No
HLE GFX=No
RDRAM Size=8
@ -5370,7 +5381,7 @@ Good Name=Star Wars Episode I - Battle for Naboo (E)
Internal Name=Battle for Naboo
Status=Only intro/part OK
Core Note=Camera issue; can't play
Plugin Note=[rsp] interpreter only [video] HLE not supported
Plugin Note=[Glide64] errors:various
32bit=No
AudioResetOnLoad=Yes
Counter Factor=1
@ -5383,7 +5394,7 @@ Good Name=Star Wars Episode I - Battle for Naboo (U)
Internal Name=Battle for Naboo
Status=Only intro/part OK
Core Note=Camera issue; can't play
Plugin Note=[rsp] interpreter only [video] HLE not supported
Plugin Note=[Glide64] errors:various
32bit=No
AudioResetOnLoad=Yes
Counter Factor=1
@ -5480,6 +5491,7 @@ AudioResetOnLoad=Yes
HLE GFX=No
Fixed Audio=0
RDRAM Size=8
RSP-Mfc0Count=10
[F4646B69-C5751095-C:4A]
Good Name=Super B-Daman - Battle Phoenix 64 (J)
@ -6786,6 +6798,7 @@ Plugin Note=[video] HLE not supported [audio] needs audio plugin
AudioResetOnLoad=Yes
Fixed Audio=0
HLE GFX=No
RSP-Mfc0Count=10
[308DFEC8-CE2EB5F6-C:45]
Good Name=World Driver Championship (U)
@ -6796,6 +6809,7 @@ Plugin Note=[video] HLE not supported [audio] needs audio plugin
AudioResetOnLoad=Yes
Fixed Audio=0
HLE GFX=No
RSP-Mfc0Count=10
[2D21C57B-8FE4C58C-C:50]
Good Name=Worms - Armageddon (E) (M6)

View File

@ -57,6 +57,7 @@ void BuildInterpreterCPU(void);
void BuildRecompilerCPU(void);
extern HANDLE hMutex;
DWORD Mfc0Count, SemaphoreExit = 0;
void SetCPU(DWORD core)
{

View File

@ -41,3 +41,5 @@ extern OPCODE RSPOpC;
void SetCPU(DWORD core);
void Build_RSP (void);
extern DWORD Mfc0Count, SemaphoreExit;

View File

@ -310,7 +310,7 @@ void RSP_Cop0_MF (void) {
case 4:
RSP_MfStatusCount += 1;
RSP_GPR[RSPOpC.rt].UW = *RSPInfo.SP_STATUS_REG;
if (RSP_MfStatusCount > 10)
if (Mfc0Count != 0 && RSP_MfStatusCount > Mfc0Count)
{
RSP_Running = FALSE;
}
@ -318,7 +318,7 @@ void RSP_Cop0_MF (void) {
case 5: RSP_GPR[RSPOpC.rt].UW = *RSPInfo.SP_DMA_FULL_REG; break;
case 6: RSP_GPR[RSPOpC.rt].UW = *RSPInfo.SP_DMA_BUSY_REG; break;
case 7:
if (AudioHle || GraphicsHle)
if (AudioHle || GraphicsHle || SemaphoreExit == 0)
{
RSP_GPR[RSPOpC.rt].W = 0;
} else {

View File

@ -81,7 +81,7 @@ enum {
Set_ReOrdering, Set_GPRConstants, Set_Flags, Set_AlignVector,
//Game Settings
Set_JumpTableSize
Set_JumpTableSize, Set_Mfc0Count, Set_SemaphoreExit
};
short Set_AudioHle = 0, Set_GraphicsHle = 0;
@ -544,6 +544,8 @@ __declspec(dllexport) void RomOpen (void)
EnableDebugging(true);
}
JumpTableSize = GetSetting(Set_JumpTableSize);
Mfc0Count = GetSetting(Set_Mfc0Count);
SemaphoreExit = GetSetting(Set_SemaphoreExit);
}
/******************************************************************
@ -787,6 +789,8 @@ __declspec(dllexport) void PluginLoaded (void)
RegisterSetting(Set_AlignVector, Data_DWORD_General,"Assume Vector loads align", NULL,Compiler.bAlignVector,NULL);
RegisterSetting(Set_JumpTableSize, Data_DWORD_Game,"JumpTableSize",NULL,0x800,NULL);
RegisterSetting(Set_Mfc0Count, Data_DWORD_Game, "Mfc0Count", NULL, 0x0, NULL);
RegisterSetting(Set_SemaphoreExit, Data_DWORD_Game, "SemaphoreExit", NULL, 0x0, NULL);
AudioHle = Set_AudioHle != 0 ? GetSystemSetting(Set_AudioHle) : false;
GraphicsHle = Set_GraphicsHle != 0 ? GetSystemSetting(Set_GraphicsHle) : true;

View File

@ -1681,9 +1681,11 @@ void Compile_Cop0_MF ( void ) {
case 4:
MoveVariableToX86reg(&RSP_MfStatusCount, "RSP_MfStatusCount", x86_ECX);
MoveVariableToX86reg(RSPInfo.SP_STATUS_REG, "SP_STATUS_REG", x86_EAX);
CompConstToX86reg(x86_ECX, 10);
JbLabel8("label", 10);
MoveConstToVariable(0, &RSP_Running, "RSP_Running");
if (Mfc0Count != 0) {
CompConstToX86reg(x86_ECX, Mfc0Count);
JbLabel8("label", 10);
MoveConstToVariable(0, &RSP_Running, "RSP_Running");
}
IncX86reg(x86_ECX);
MoveX86regToVariable(x86_EAX, &RSP_GPR[RSPOpC.rt].UW, GPR_Name(RSPOpC.rt));
MoveX86regToVariable(x86_ECX, &RSP_MfStatusCount, "RSP_MfStatusCount");
@ -1700,7 +1702,7 @@ void Compile_Cop0_MF ( void ) {
}
break;
case 7:
if (AudioHle || GraphicsHle)
if (AudioHle || GraphicsHle || SemaphoreExit == 0)
{
MoveConstToVariable(0, &RSP_GPR[RSPOpC.rt].W, GPR_Name(RSPOpC.rt));
} else {