This commit is contained in:
Emmet Young 2012-10-03 06:44:52 +10:00
commit 2e6fc68897
7 changed files with 58 additions and 50 deletions

View File

@ -3542,6 +3542,8 @@ Primary Frame Buffer=1
Culling=1 Culling=1
Emulate Clear=1 Emulate Clear=1
Audio Signal=No Audio Signal=No
32bit=No
ViRefresh=1410
[2C739EAC-9EF77726-C:50] [2C739EAC-9EF77726-C:50]
Good Name=Doom 64 (E) Good Name=Doom 64 (E)
@ -7112,11 +7114,15 @@ Emulate Clear=1
Cheat0=801DA5CB 0002 //Subscreen Delay Fix Cheat0=801DA5CB 0002 //Subscreen Delay Fix
MD5=AA3911F5D5598E19E0183E15B6719C36 MD5=AA3911F5D5598E19E0183E15B6719C36
CustomSMM=1 CustomSMM=1
SMM-PI DMA=0
SMM-TLB=0
FuncFind=1 FuncFind=1
ClearvFrame=0 ClearvFrame=0
Aspect Correction=1 Aspect Correction=1
32bit=No
SMM-Cache=0
SMM-PI DMA=0
SMM-TLB=0
SMM-Protect=1
SMM-FUNC=0
[D43DA81F-021E1E19-C:45] [D43DA81F-021E1E19-C:45]
Good Name=Legend of Zelda, The - Ocarina of Time (U) (V1.1) Good Name=Legend of Zelda, The - Ocarina of Time (U) (V1.1)
@ -7140,8 +7146,12 @@ Cheat0=801DA78B 0002 //Subscreen Delay Fix
MD5=BBEB1FFE21E5F6D4F062287B98C3323E MD5=BBEB1FFE21E5F6D4F062287B98C3323E
FuncFind=1 FuncFind=1
CustomSMM=1 CustomSMM=1
32bit=No
SMM-Cache=0
SMM-PI DMA=0 SMM-PI DMA=0
SMM-TLB=0 SMM-TLB=0
SMM-Protect=1
SMM-FUNC=0
[693BA2AE-B7F14E9F-C:45] [693BA2AE-B7F14E9F-C:45]
Good Name=Legend of Zelda, The - Ocarina of Time (U) (V1.2) Good Name=Legend of Zelda, The - Ocarina of Time (U) (V1.2)
@ -7165,8 +7175,12 @@ Cheat0=801DAE8B 0002 //Subscreen Delay Fix
MD5=B9B5B0C5155D122B07D2ACE2B34B5EDD MD5=B9B5B0C5155D122B07D2ACE2B34B5EDD
FuncFind=1 FuncFind=1
CustomSMM=1 CustomSMM=1
32bit=No
SMM-Cache=0
SMM-PI DMA=0 SMM-PI DMA=0
SMM-TLB=0 SMM-TLB=0
SMM-Protect=1
SMM-FUNC=0
[F478D8B3-9716DD6D-C:50] [F478D8B3-9716DD6D-C:50]
Good Name=LEGO Racers (E) (M10) Good Name=LEGO Racers (E) (M10)

View File

@ -1312,7 +1312,7 @@ int CMipsMemoryVM::MemoryFilter( DWORD dwExptCode, void * lpExceptionPointer )
DWORD MemAddress = (char *)lpEP->ExceptionRecord->ExceptionInformation[1] - (char *)_MMU->Rdram(); DWORD MemAddress = (char *)lpEP->ExceptionRecord->ExceptionInformation[1] - (char *)_MMU->Rdram();
if ((int)(MemAddress) < 0 || MemAddress > 0x1FFFFFFF) if ((int)(MemAddress) < 0 || MemAddress > 0x1FFFFFFF)
{ {
if (bHaveDebugger()) { _Notify->BreakPoint(__FILE__,__LINE__); } // if (bHaveDebugger()) { _Notify->BreakPoint(__FILE__,__LINE__); }
return EXCEPTION_EXECUTE_HANDLER; return EXCEPTION_EXECUTE_HANDLER;
} }
@ -3497,22 +3497,23 @@ void CMipsMemoryVM::Compile_StoreInstructClean (x86Reg AddressReg, int Length )
{ {
return; return;
} }
_Notify->BreakPoint(__FILE__,__LINE__);
/*
stdstr_f strLen("%d",Length); stdstr_f strLen("%d",Length);
UnMap_AllFPRs(); UnMap_AllFPRs();
x86Reg StoreTemp1 = Map_TempReg(x86_Any,-1,FALSE); /*x86Reg StoreTemp1 = Map_TempReg(x86_Any,-1,FALSE);
MoveX86RegToX86Reg(AddressReg, StoreTemp1); MoveX86RegToX86Reg(AddressReg, StoreTemp1);
AndConstToX86Reg(StoreTemp1,0xFFC); AndConstToX86Reg(StoreTemp1,0xFFC);*/
JnzLabel8("NotDelaySlot",0);
BYTE * NotDelaySlotJump = m_RecompPos - 1;
BeforeCallDirect(m_RegWorkingSet); BeforeCallDirect(m_RegWorkingSet);
PushImm32("CRecompiler::Remove_StoreInstruc",CRecompiler::Remove_StoreInstruc); PushImm32("CRecompiler::Remove_StoreInstruc",CRecompiler::Remove_StoreInstruc);
PushImm32(strLen.c_str(),Length); PushImm32(Length);
Push(AddressReg); Push(AddressReg);
MoveConstToX86reg((DWORD)_Recompiler,x86_ECX); MoveConstToX86reg((DWORD)_Recompiler,x86_ECX);
Call_Direct(AddressOf(&CRecompiler::ClearRecompCode_Virt), "CRecompiler::ClearRecompCode_Virt"); Call_Direct(AddressOf(&CRecompiler::ClearRecompCode_Virt), "CRecompiler::ClearRecompCode_Virt");
AfterCallDirect(m_RegWorkingSet); AfterCallDirect(m_RegWorkingSet);
JmpLabel8("MemCheckDone",0); /*JmpLabel8("MemCheckDone",0);
BYTE * MemCheckDone = m_RecompPos - 1; BYTE * MemCheckDone = m_RecompPos - 1;
CPU_Message(" "); CPU_Message(" ");
@ -3539,7 +3540,7 @@ void CMipsMemoryVM::Compile_StoreInstructClean (x86Reg AddressReg, int Length )
SetJump8(MemCheckDone,m_RecompPos); SetJump8(MemCheckDone,m_RecompPos);
SetJump8(MemCheckDone2,m_RecompPos); SetJump8(MemCheckDone2,m_RecompPos);
X86Protected(StoreTemp1) = false; X86Protected(StoreTemp1) = false;*/
} }
void CMipsMemoryVM::Compile_SD (void) void CMipsMemoryVM::Compile_SD (void)

View File

@ -4,26 +4,6 @@
#include <windows.h> #include <windows.h>
void CN64System::InitializeCPUCore ( void )
{
switch (_Rom->GetCountry())
{
case Germany: case french: case Italian:
case Europe: case Spanish: case Australia:
case X_PAL: case Y_PAL:
m_SystemType = SYSTEM_PAL;
break;
default:
m_SystemType = SYSTEM_NTSC;
break;
}
#ifndef EXTERNAL_RELEASE
LogOptions.GenerateLog = _Settings->LoadDword(Debugger_GenerateDebugLog);
LoadLogOptions(&LogOptions, FALSE);
StartLog();
#endif
}
CN64System::CN64System ( CPlugins * Plugins, bool SavesReadOnly ) : CN64System::CN64System ( CPlugins * Plugins, bool SavesReadOnly ) :
m_MMU_VM(this,SavesReadOnly), m_MMU_VM(this,SavesReadOnly),
m_TLB(this), m_TLB(this),
@ -47,11 +27,25 @@ CN64System::CN64System ( CPlugins * Plugins, bool SavesReadOnly ) :
m_NextInstruction(0), m_NextInstruction(0),
m_JumpToLocation(0), m_JumpToLocation(0),
m_TLBLoadAddress(0), m_TLBLoadAddress(0),
m_TLBStoreAddress(0) m_TLBStoreAddress(0),
m_SaveUsing((SAVE_CHIP_TYPE)_Settings->LoadDword(Game_SaveChip)),
m_SystemType(SYSTEM_NTSC)
{ {
m_hPauseEvent = CreateEvent(NULL,true,false,NULL); m_hPauseEvent = CreateEvent(NULL,true,false,NULL);
m_Limitor.SetHertz(_Settings->LoadDword(Game_ScreenHertz)); m_Limitor.SetHertz(_Settings->LoadDword(Game_ScreenHertz));
m_Cheats.LoadCheats(!_Settings->LoadDword(Setting_RememberCheats)); m_Cheats.LoadCheats(!_Settings->LoadDword(Setting_RememberCheats));
switch (_Rom->GetCountry())
{
case Germany: case french: case Italian:
case Europe: case Spanish: case Australia:
case X_PAL: case Y_PAL:
m_SystemType = SYSTEM_PAL;
break;
default:
m_SystemType = SYSTEM_NTSC;
break;
}
} }
CN64System::~CN64System ( void ) { CN64System::~CN64System ( void ) {
@ -778,10 +772,11 @@ void CN64System::ExecuteCPU ( void )
m_EndEmulation = false; m_EndEmulation = false;
_Notify->RefreshMenu(); _Notify->RefreshMenu();
//Check me #ifndef EXTERNAL_RELEASE
// _Rom->m_RomFileSize = _Rom->GetRomSize(); LogOptions.GenerateLog = _Settings->LoadDword(Debugger_GenerateDebugLog);
LoadLogOptions(&LogOptions, FALSE);
m_SaveUsing = (SAVE_CHIP_TYPE)_Settings->LoadDword(Game_SaveChip); StartLog();
#endif
CInterpreterCPU::BuildCPU(); CInterpreterCPU::BuildCPU();
@ -795,7 +790,6 @@ void CN64System::ExecuteCPU ( void )
} }
void CN64System::ExecuteInterpret () { void CN64System::ExecuteInterpret () {
InitializeCPUCore();
SetActiveSystem(); SetActiveSystem();
CInterpreterCPU::ExecuteCPU(); CInterpreterCPU::ExecuteCPU();
} }
@ -803,7 +797,6 @@ void CN64System::ExecuteInterpret () {
void CN64System::ExecuteRecompiler () void CN64System::ExecuteRecompiler ()
{ {
//execute opcodes while no errors //execute opcodes while no errors
InitializeCPUCore();
m_Recomp = new CRecompiler(m_Profile,m_EndEmulation); m_Recomp = new CRecompiler(m_Profile,m_EndEmulation);
SetActiveSystem(); SetActiveSystem();
m_Recomp->Run(); m_Recomp->Run();
@ -824,7 +817,6 @@ void CN64System::ExecuteSyncCPU ()
m_SyncCPU->SetActiveSystem(); m_SyncCPU->SetActiveSystem();
SetActiveSystem(); SetActiveSystem();
InitializeCPUCore();
m_Recomp->Run(); m_Recomp->Run();
} }
@ -938,6 +930,7 @@ void CN64System::SyncCPU (CN64System * const SecondCPU) {
if (m_MMU_VM.Rdram()[0x00206970 + z] != SecondCPU->m_MMU_VM.Rdram()[0x00206970 + z]) if (m_MMU_VM.Rdram()[0x00206970 + z] != SecondCPU->m_MMU_VM.Rdram()[0x00206970 + z])
{ {
ErrorFound = true; ErrorFound = true;
break;
} }
}*/ }*/

View File

@ -33,8 +33,8 @@ public:
CProfiling m_Profile; CProfiling m_Profile;
CCheats m_Cheats; CCheats m_Cheats;
bool m_EndEmulation; bool m_EndEmulation;
enum SAVE_CHIP_TYPE m_SaveUsing; SAVE_CHIP_TYPE m_SaveUsing;
enum SystemType m_SystemType;; SystemType m_SystemType;
//Methods //Methods
static bool CN64System::RunFileImage ( const char * FileLoc ); static bool CN64System::RunFileImage ( const char * FileLoc );
@ -85,7 +85,6 @@ private:
static void StartEmulationThread ( FileImageInfo * Info ); static void StartEmulationThread ( FileImageInfo * Info );
static bool EmulationStarting ( HANDLE hThread, DWORD ThreadId ); static bool EmulationStarting ( HANDLE hThread, DWORD ThreadId );
void InitializeCPUCore( void );
void ExecuteCPU ( void ); void ExecuteCPU ( void );
void RefreshScreen ( void ); void RefreshScreen ( void );
bool InternalEvent ( void ); bool InternalEvent ( void );

View File

@ -65,7 +65,7 @@ CRecompilerSettings::~CRecompilerSettings()
void CRecompilerSettings::RefreshSettings() void CRecompilerSettings::RefreshSettings()
{ {
m_bSMM_StoreInstruc = _Settings->LoadBool(Game_SMM_StoreInstruc); m_bSMM_StoreInstruc = false /*_Settings->LoadBool(Game_SMM_StoreInstruc)*/;
m_bSMM_Protect = _Settings->LoadBool(Game_SMM_Protect); m_bSMM_Protect = _Settings->LoadBool(Game_SMM_Protect);
m_bSMM_ValidFunc = _Settings->LoadBool(Game_SMM_ValidFunc); m_bSMM_ValidFunc = _Settings->LoadBool(Game_SMM_ValidFunc);
m_bSMM_PIDMA = _Settings->LoadBool(Game_SMM_PIDMA); m_bSMM_PIDMA = _Settings->LoadBool(Game_SMM_PIDMA);

View File

@ -18,7 +18,8 @@ CGameRecompilePage::CGameRecompilePage (HWND hParent, const RECT & rcDispay )
AddModCheckBox(GetDlgItem(IDC_SMM_VALIDATE),Game_SMM_ValidFunc); AddModCheckBox(GetDlgItem(IDC_SMM_VALIDATE),Game_SMM_ValidFunc);
AddModCheckBox(GetDlgItem(IDC_SMM_TLB),Game_SMM_TLB); AddModCheckBox(GetDlgItem(IDC_SMM_TLB),Game_SMM_TLB);
AddModCheckBox(GetDlgItem(IDC_SMM_PROTECT),Game_SMM_Protect); AddModCheckBox(GetDlgItem(IDC_SMM_PROTECT),Game_SMM_Protect);
AddModCheckBox(GetDlgItem(IDC_SMM_STORE),Game_SMM_StoreInstruc); ::ShowWindow(GetDlgItem(IDC_SMM_STORE),SW_HIDE);
//AddModCheckBox(GetDlgItem(IDC_SMM_STORE),Game_SMM_StoreInstruc);
AddModCheckBox(GetDlgItem(IDC_ROM_FASTSP),Game_FastSP); AddModCheckBox(GetDlgItem(IDC_ROM_FASTSP),Game_FastSP);
CModifiedComboBox * ComboBox; CModifiedComboBox * ComboBox;

View File

@ -571,7 +571,7 @@ BEGIN
END END
IDD_Settings_GameRecompiler DIALOGEX 0, 0, 230, 156 IDD_Settings_GameRecompiler DIALOGEX 0, 0, 230, 156
STYLE DS_SETFONT | WS_CHILD STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD
EXSTYLE WS_EX_CONTROLPARENT EXSTYLE WS_EX_CONTROLPARENT
FONT 8, "MS Shell Dlg", 0, 0, 0x1 FONT 8, "MS Shell Dlg", 0, 0, 0x1
BEGIN BEGIN
@ -584,12 +584,12 @@ BEGIN
CONTROL "Cache",IDC_SMM_CACHE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,10,91,89,9 CONTROL "Cache",IDC_SMM_CACHE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,10,91,89,9
CONTROL "PI DMA",IDC_SMM_DMA,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,10,103,89,9 CONTROL "PI DMA",IDC_SMM_DMA,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,10,103,89,9
CONTROL "Start Changed",IDC_SMM_VALIDATE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,10,115,89,8 CONTROL "Start Changed",IDC_SMM_VALIDATE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,10,115,89,8
CONTROL "Protect Memory",IDC_SMM_PROTECT,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,116,115,89,8 CONTROL "Protect Memory",IDC_SMM_PROTECT,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,116,91,89,8
CONTROL "TLB Unmapping",IDC_SMM_TLB,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,116,103,89,8 CONTROL "TLB Unmapping",IDC_SMM_TLB,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,116,103,89,8
CONTROL "",IDC_STATIC,"Static",SS_BLACKFRAME | SS_SUNKEN,6,42,208,1 CONTROL "",IDC_STATIC,"Static",SS_BLACKFRAME | SS_SUNKEN,6,42,208,1
CONTROL "Advanced Block Linking",IDC_BLOCK_LINKING,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,113,49,95,11 CONTROL "Advanced Block Linking",IDC_BLOCK_LINKING,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,113,49,95,11
CONTROL "Fast SP",IDC_ROM_FASTSP,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,10,62,91,11 CONTROL "Fast SP",IDC_ROM_FASTSP,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,10,62,91,11
CONTROL "Store Instruction",IDC_SMM_STORE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,116,91,89,8 CONTROL "Store Instruction",IDC_SMM_STORE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,116,115,89,8
END END
IDD_Settings_GamePlugin DIALOGEX 0, 0, 231, 206 IDD_Settings_GamePlugin DIALOGEX 0, 0, 231, 206
@ -925,8 +925,8 @@ END
// //
VS_VERSION_INFO VERSIONINFO VS_VERSION_INFO VERSIONINFO
FILEVERSION 1,7,51,52 FILEVERSION 1,7,51,51
PRODUCTVERSION 1,7,51,52 PRODUCTVERSION 1,7,51,51
FILEFLAGSMASK 0x3fL FILEFLAGSMASK 0x3fL
#ifdef _DEBUG #ifdef _DEBUG
FILEFLAGS 0x1L FILEFLAGS 0x1L
@ -943,12 +943,12 @@ BEGIN
BEGIN BEGIN
VALUE "CompanyName", " " VALUE "CompanyName", " "
VALUE "FileDescription", "Project64" VALUE "FileDescription", "Project64"
VALUE "FileVersion", "1, 7, 51, 52" VALUE "FileVersion", "1, 7, 51, 51"
VALUE "InternalName", "Project64" VALUE "InternalName", "Project64"
VALUE "LegalCopyright", "Copyright © 2010" VALUE "LegalCopyright", "Copyright © 2010"
VALUE "OriginalFilename", "Project64.exe" VALUE "OriginalFilename", "Project64.exe"
VALUE "ProductName", " Project64" VALUE "ProductName", " Project64"
VALUE "ProductVersion", "1, 7, 51, 52" VALUE "ProductVersion", "1, 7, 51, 51"
END END
END END
BLOCK "VarFileInfo" BLOCK "VarFileInfo"