From 3482a1a1cfbc7bedc87d6ca52756a2c1f5d2b856 Mon Sep 17 00:00:00 2001 From: Vincent Cunningham Date: Mon, 1 Feb 2021 23:42:54 -0500 Subject: [PATCH 1/3] Call RunLoadedImage when manually starting emulation RunLoadedImage is skipped in the Run*Image methods in CN64System if AutoStart is disabled. If the check for if there is a current g_BaseSystem fails, these changes run RunLoadedImage to create one and StartEmulation. I'm not sure the extra NULL guard is necessary, but I don't want to skip the first g_BaseSystem check altogether. I added it as a "just in case." --- Source/Project64/UserInterface/MainMenu.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Source/Project64/UserInterface/MainMenu.cpp b/Source/Project64/UserInterface/MainMenu.cpp index 0cee54773..dfaae0a83 100644 --- a/Source/Project64/UserInterface/MainMenu.cpp +++ b/Source/Project64/UserInterface/MainMenu.cpp @@ -304,6 +304,15 @@ bool CMainMenu::ProcessMessage(HWND hWnd, DWORD /*FromAccelerator*/, DWORD MenuI { g_BaseSystem->StartEmulation(true); } + else if (g_Settings->LoadBool(Setting_AutoStart) == 0) + { + WriteTrace(TraceN64System, TraceDebug, "Manually starting rom"); + CN64System::RunLoadedImage(); + if (g_BaseSystem == NULL) + { + g_Notify->BreakPoint(__FILE__, __LINE__); + } + } else { g_Notify->BreakPoint(__FILE__, __LINE__); From 678c5819e8a88640a32010eec7dd7bf27b5e8dbb Mon Sep 17 00:00:00 2001 From: Vincent Cunningham Date: Tue, 2 Feb 2021 10:27:23 -0500 Subject: [PATCH 2/3] Only skip StartEmulation in RunLoadedImage when AutoStart disabled --- Source/Project64-core/N64System/N64Class.cpp | 24 +++++++------------- Source/Project64/UserInterface/MainMenu.cpp | 13 ++++------- 2 files changed, 12 insertions(+), 25 deletions(-) diff --git a/Source/Project64-core/N64System/N64Class.cpp b/Source/Project64-core/N64System/N64Class.cpp index a0e3a6a3b..06ce73ae1 100644 --- a/Source/Project64-core/N64System/N64Class.cpp +++ b/Source/Project64-core/N64System/N64Class.cpp @@ -515,11 +515,7 @@ bool CN64System::RunFileImage(const char * FileLoc) g_Settings->SaveString(File_DiskIPLTOOLPath, FileLoc); } - if (g_Settings->LoadBool(Setting_AutoStart) != 0) - { - WriteTrace(TraceN64System, TraceDebug, "Automattically starting rom"); - RunLoadedImage(); - } + RunLoadedImage(); return true; } @@ -537,11 +533,7 @@ bool CN64System::RunDiskImage(const char * FileLoc) } g_Settings->SaveBool(Setting_EnableDisk, true); - if (g_Settings->LoadBool(Setting_AutoStart) != 0) - { - WriteTrace(TraceN64System, TraceDebug, "Automattically starting rom"); - RunLoadedImage(); - } + RunLoadedImage(); return true; } @@ -563,11 +555,7 @@ bool CN64System::RunDiskComboImage(const char * FileLoc, const char * FileLocDis } g_Settings->SaveBool(Setting_EnableDisk, true); - if (g_Settings->LoadBool(Setting_AutoStart) != 0) - { - WriteTrace(TraceN64System, TraceDebug, "Automattically starting rom"); - RunLoadedImage(); - } + RunLoadedImage(); return true; } @@ -577,7 +565,11 @@ void CN64System::RunLoadedImage(void) g_BaseSystem = new CN64System(g_Plugins, (uint32_t)time(NULL), false, false); if (g_BaseSystem) { - g_BaseSystem->StartEmulation(true); + if (g_Settings->LoadBool(Setting_AutoStart) != 0) + { + WriteTrace(TraceN64System, TraceDebug, "Automattically starting rom"); + g_BaseSystem->StartEmulation(true); + } } else { diff --git a/Source/Project64/UserInterface/MainMenu.cpp b/Source/Project64/UserInterface/MainMenu.cpp index dfaae0a83..bf4e6651d 100644 --- a/Source/Project64/UserInterface/MainMenu.cpp +++ b/Source/Project64/UserInterface/MainMenu.cpp @@ -302,17 +302,12 @@ bool CMainMenu::ProcessMessage(HWND hWnd, DWORD /*FromAccelerator*/, DWORD MenuI //Now we have created again, we can start up emulation if (g_BaseSystem) { + if (g_Settings->LoadBool(Setting_AutoStart) == 0) + { + WriteTrace(TraceN64System, TraceDebug, "Manually starting rom"); + } g_BaseSystem->StartEmulation(true); } - else if (g_Settings->LoadBool(Setting_AutoStart) == 0) - { - WriteTrace(TraceN64System, TraceDebug, "Manually starting rom"); - CN64System::RunLoadedImage(); - if (g_BaseSystem == NULL) - { - g_Notify->BreakPoint(__FILE__, __LINE__); - } - } else { g_Notify->BreakPoint(__FILE__, __LINE__); From e285bc7c8bef0a07fbe398b4311b619ce3cec00b Mon Sep 17 00:00:00 2001 From: John Sebastian Peterson Date: Mon, 8 Feb 2021 05:59:36 +0100 Subject: [PATCH 3/3] Update Banjo-Kazooie (U) (V1.1).cht All all these are wrong I'm on the phone now so it's very annoying to fix change --- Config/Cheats/Banjo-Kazooie (U) (V1.1).cht | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Config/Cheats/Banjo-Kazooie (U) (V1.1).cht b/Config/Cheats/Banjo-Kazooie (U) (V1.1).cht index 686c2a441..42390a3cd 100644 --- a/Config/Cheats/Banjo-Kazooie (U) (V1.1).cht +++ b/Config/Cheats/Banjo-Kazooie (U) (V1.1).cht @@ -54,7 +54,7 @@ $Have Zero Time all Levels 81386004 3000 $Infinite\Air -81385F8E 0E10 +813851AE 0E10 $Infinite\Always Have All Jinjos 80385F7B 00FF @@ -66,8 +66,7 @@ $Infinite\Gold Feathers 80385F73 00FF $Infinite\Health -80385F83 0008 -80385F87 0008 +803851A3 0008 $Infinite\Jiggies 80385FCB 00FF