diff --git a/Config/Project64.rdb b/Config/Project64.rdb index 52cced2f8..0f358d66a 100644 --- a/Config/Project64.rdb +++ b/Config/Project64.rdb @@ -3542,6 +3542,8 @@ Primary Frame Buffer=1 Culling=1 Emulate Clear=1 Audio Signal=No +32bit=No +ViRefresh=1410 [2C739EAC-9EF77726-C:50] Good Name=Doom 64 (E) @@ -7112,11 +7114,15 @@ Emulate Clear=1 Cheat0=801DA5CB 0002 //Subscreen Delay Fix MD5=AA3911F5D5598E19E0183E15B6719C36 CustomSMM=1 -SMM-PI DMA=0 -SMM-TLB=0 FuncFind=1 ClearvFrame=0 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] Good Name=Legend of Zelda, The - Ocarina of Time (U) (V1.1) @@ -7140,8 +7146,12 @@ Cheat0=801DA78B 0002 //Subscreen Delay Fix MD5=BBEB1FFE21E5F6D4F062287B98C3323E FuncFind=1 CustomSMM=1 +32bit=No +SMM-Cache=0 SMM-PI DMA=0 SMM-TLB=0 +SMM-Protect=1 +SMM-FUNC=0 [693BA2AE-B7F14E9F-C:45] Good Name=Legend of Zelda, The - Ocarina of Time (U) (V1.2) @@ -7165,8 +7175,12 @@ Cheat0=801DAE8B 0002 //Subscreen Delay Fix MD5=B9B5B0C5155D122B07D2ACE2B34B5EDD FuncFind=1 CustomSMM=1 +32bit=No +SMM-Cache=0 SMM-PI DMA=0 SMM-TLB=0 +SMM-Protect=1 +SMM-FUNC=0 [F478D8B3-9716DD6D-C:50] Good Name=LEGO Racers (E) (M10) diff --git a/Source/Project64/N64 System/Mips/Memory Virtual Mem.cpp b/Source/Project64/N64 System/Mips/Memory Virtual Mem.cpp index 21c31678c..81ea92474 100644 --- a/Source/Project64/N64 System/Mips/Memory Virtual Mem.cpp +++ b/Source/Project64/N64 System/Mips/Memory Virtual Mem.cpp @@ -1312,7 +1312,7 @@ int CMipsMemoryVM::MemoryFilter( DWORD dwExptCode, void * lpExceptionPointer ) DWORD MemAddress = (char *)lpEP->ExceptionRecord->ExceptionInformation[1] - (char *)_MMU->Rdram(); if ((int)(MemAddress) < 0 || MemAddress > 0x1FFFFFFF) { - if (bHaveDebugger()) { _Notify->BreakPoint(__FILE__,__LINE__); } +// if (bHaveDebugger()) { _Notify->BreakPoint(__FILE__,__LINE__); } return EXCEPTION_EXECUTE_HANDLER; } @@ -3497,22 +3497,23 @@ void CMipsMemoryVM::Compile_StoreInstructClean (x86Reg AddressReg, int Length ) { return; } + _Notify->BreakPoint(__FILE__,__LINE__); + + /* stdstr_f strLen("%d",Length); UnMap_AllFPRs(); - x86Reg StoreTemp1 = Map_TempReg(x86_Any,-1,FALSE); + /*x86Reg StoreTemp1 = Map_TempReg(x86_Any,-1,FALSE); MoveX86RegToX86Reg(AddressReg, StoreTemp1); - AndConstToX86Reg(StoreTemp1,0xFFC); - JnzLabel8("NotDelaySlot",0); - BYTE * NotDelaySlotJump = m_RecompPos - 1; + AndConstToX86Reg(StoreTemp1,0xFFC);*/ BeforeCallDirect(m_RegWorkingSet); PushImm32("CRecompiler::Remove_StoreInstruc",CRecompiler::Remove_StoreInstruc); - PushImm32(strLen.c_str(),Length); + PushImm32(Length); Push(AddressReg); MoveConstToX86reg((DWORD)_Recompiler,x86_ECX); Call_Direct(AddressOf(&CRecompiler::ClearRecompCode_Virt), "CRecompiler::ClearRecompCode_Virt"); AfterCallDirect(m_RegWorkingSet); - JmpLabel8("MemCheckDone",0); + /*JmpLabel8("MemCheckDone",0); BYTE * MemCheckDone = m_RecompPos - 1; CPU_Message(" "); @@ -3539,7 +3540,7 @@ void CMipsMemoryVM::Compile_StoreInstructClean (x86Reg AddressReg, int Length ) SetJump8(MemCheckDone,m_RecompPos); SetJump8(MemCheckDone2,m_RecompPos); - X86Protected(StoreTemp1) = false; + X86Protected(StoreTemp1) = false;*/ } void CMipsMemoryVM::Compile_SD (void) diff --git a/Source/Project64/N64 System/N64 Class.cpp b/Source/Project64/N64 System/N64 Class.cpp index b583994c4..b66930dc9 100644 --- a/Source/Project64/N64 System/N64 Class.cpp +++ b/Source/Project64/N64 System/N64 Class.cpp @@ -4,26 +4,6 @@ #include -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 ) : m_MMU_VM(this,SavesReadOnly), m_TLB(this), @@ -47,11 +27,25 @@ CN64System::CN64System ( CPlugins * Plugins, bool SavesReadOnly ) : m_NextInstruction(0), m_JumpToLocation(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_Limitor.SetHertz(_Settings->LoadDword(Game_ScreenHertz)); 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 ) { @@ -778,10 +772,11 @@ void CN64System::ExecuteCPU ( void ) m_EndEmulation = false; _Notify->RefreshMenu(); - //Check me - // _Rom->m_RomFileSize = _Rom->GetRomSize(); - - m_SaveUsing = (SAVE_CHIP_TYPE)_Settings->LoadDword(Game_SaveChip); +#ifndef EXTERNAL_RELEASE + LogOptions.GenerateLog = _Settings->LoadDword(Debugger_GenerateDebugLog); + LoadLogOptions(&LogOptions, FALSE); + StartLog(); +#endif CInterpreterCPU::BuildCPU(); @@ -795,7 +790,6 @@ void CN64System::ExecuteCPU ( void ) } void CN64System::ExecuteInterpret () { - InitializeCPUCore(); SetActiveSystem(); CInterpreterCPU::ExecuteCPU(); } @@ -803,7 +797,6 @@ void CN64System::ExecuteInterpret () { void CN64System::ExecuteRecompiler () { //execute opcodes while no errors - InitializeCPUCore(); m_Recomp = new CRecompiler(m_Profile,m_EndEmulation); SetActiveSystem(); m_Recomp->Run(); @@ -824,7 +817,6 @@ void CN64System::ExecuteSyncCPU () m_SyncCPU->SetActiveSystem(); SetActiveSystem(); - InitializeCPUCore(); 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]) { ErrorFound = true; + break; } }*/ diff --git a/Source/Project64/N64 System/N64 Class.h b/Source/Project64/N64 System/N64 Class.h index adda8d7b6..a99eac697 100644 --- a/Source/Project64/N64 System/N64 Class.h +++ b/Source/Project64/N64 System/N64 Class.h @@ -33,8 +33,8 @@ public: CProfiling m_Profile; CCheats m_Cheats; bool m_EndEmulation; - enum SAVE_CHIP_TYPE m_SaveUsing; - enum SystemType m_SystemType;; + SAVE_CHIP_TYPE m_SaveUsing; + SystemType m_SystemType; //Methods static bool CN64System::RunFileImage ( const char * FileLoc ); @@ -85,7 +85,6 @@ private: static void StartEmulationThread ( FileImageInfo * Info ); static bool EmulationStarting ( HANDLE hThread, DWORD ThreadId ); - void InitializeCPUCore( void ); void ExecuteCPU ( void ); void RefreshScreen ( void ); bool InternalEvent ( void ); diff --git a/Source/Project64/Settings/Recompiler Settings.cpp b/Source/Project64/Settings/Recompiler Settings.cpp index cf44416e1..edc130d5b 100644 --- a/Source/Project64/Settings/Recompiler Settings.cpp +++ b/Source/Project64/Settings/Recompiler Settings.cpp @@ -65,7 +65,7 @@ CRecompilerSettings::~CRecompilerSettings() 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_ValidFunc = _Settings->LoadBool(Game_SMM_ValidFunc); m_bSMM_PIDMA = _Settings->LoadBool(Game_SMM_PIDMA); diff --git a/Source/Project64/User Interface/Settings/Settings Page - Game - Recompiler.cpp b/Source/Project64/User Interface/Settings/Settings Page - Game - Recompiler.cpp index 098366003..35cce7b44 100644 --- a/Source/Project64/User Interface/Settings/Settings Page - Game - Recompiler.cpp +++ b/Source/Project64/User Interface/Settings/Settings Page - Game - Recompiler.cpp @@ -18,7 +18,8 @@ CGameRecompilePage::CGameRecompilePage (HWND hParent, const RECT & rcDispay ) AddModCheckBox(GetDlgItem(IDC_SMM_VALIDATE),Game_SMM_ValidFunc); AddModCheckBox(GetDlgItem(IDC_SMM_TLB),Game_SMM_TLB); 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); CModifiedComboBox * ComboBox; diff --git a/Source/Project64/User Interface/UI Resources.rc b/Source/Project64/User Interface/UI Resources.rc index a35b2232d..d81b76487 100644 --- a/Source/Project64/User Interface/UI Resources.rc +++ b/Source/Project64/User Interface/UI Resources.rc @@ -571,7 +571,7 @@ BEGIN END IDD_Settings_GameRecompiler DIALOGEX 0, 0, 230, 156 -STYLE DS_SETFONT | WS_CHILD +STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD EXSTYLE WS_EX_CONTROLPARENT FONT 8, "MS Shell Dlg", 0, 0, 0x1 BEGIN @@ -584,12 +584,12 @@ BEGIN 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 "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 "",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 "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 IDD_Settings_GamePlugin DIALOGEX 0, 0, 231, 206 @@ -925,8 +925,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 1,7,51,52 - PRODUCTVERSION 1,7,51,52 + FILEVERSION 1,7,51,51 + PRODUCTVERSION 1,7,51,51 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -943,12 +943,12 @@ BEGIN BEGIN VALUE "CompanyName", " " VALUE "FileDescription", "Project64" - VALUE "FileVersion", "1, 7, 51, 52" + VALUE "FileVersion", "1, 7, 51, 51" VALUE "InternalName", "Project64" VALUE "LegalCopyright", "Copyright © 2010" VALUE "OriginalFilename", "Project64.exe" VALUE "ProductName", " Project64" - VALUE "ProductVersion", "1, 7, 51, 52" + VALUE "ProductVersion", "1, 7, 51, 51" END END BLOCK "VarFileInfo"