foxygit / fake-08-xbox360 Log in
commit 7a4cee1fca2d423f9c87896c95674452801e1850
Author:     Jon Bell <j.to.the.bell@gmail.com>
AuthorDate: Mon Dec 29 12:20:52 2025 -0700
Commit:     Jon Bell <j.to.the.bell@gmail.com>
CommitDate: Mon Dec 29 12:20:52 2025 -0700

    Add some logging, disable menu styles in the default cart
---
 source/DefaultCart.h | 15 +++++++++------
 source/vm.cpp        |  7 +++++++
 2 files changed, 16 insertions(+), 6 deletions(-)

diff --git a/source/DefaultCart.h b/source/DefaultCart.h
index 7aae6a0..9a6613f 100644
--- a/source/DefaultCart.h
+++ b/source/DefaultCart.h
@@ -664,12 +664,15 @@ end

 inits = {classic_init,fancy_init,list_init}
 function _init()
-	if __getsetting then
-		theme = __getsetting('menustyle')
-	else
-		theme = 2
-	end
-	theme = theme % #inits --don't load a nonexistant menu style
+	--disabling menu styles - they are currently broken
+	--if __getsetting then
+	--	theme = __getsetting('menustyle')
+	--else
+	--	theme = 2
+	--end
+	--theme = theme % #inits --don't load a nonexistant menu style
+
+	theme = 0

 	inits[theme+1]()
 end
diff --git a/source/vm.cpp b/source/vm.cpp
index 46c3fc8..7d8e199 100644
--- a/source/vm.cpp
+++ b/source/vm.cpp
@@ -590,6 +590,7 @@ bool Vm::Step(){

     // Process any queued cart change (from reset, load, etc.)
     if (_cartChangeQueued) {
+        Logger_Write("Processing cart change, _pauseMenu = %s\n", _pauseMenu ? "true" : "false");
         _prevCartKey = CurrentCartFilename();
         if (_nextCartSize > 0){
             LoadCart(_nextCartData, _nextCartSize);
@@ -599,7 +600,9 @@ bool Vm::Step(){
         }
         // Only run if cart loaded successfully (has Lua code)
         if (_loadedCart && !_loadedCart->LuaString.empty()) {
+            Logger_Write("Before vm_run, _pauseMenu = %s\n", _pauseMenu ? "true" : "false");
             vm_run();
+            Logger_Write("After vm_run, _pauseMenu = %s\n", _pauseMenu ? "true" : "false");
         }
         else {
             Logger_Write("Cart load failed, not running vm_run()\n");
@@ -1182,9 +1185,13 @@ void Vm::vm_run() {
     //     loadCart(_loadedCart);
     // }

+    Logger_Write("vm_run: before Reset(), screenDataMemMapping = 0x%02x\n", _memory->hwState.screenDataMemMapping);
+
     //should combine this with other memory reset code
     _memory->Reset();

+    Logger_Write("vm_run: after Reset(), screenDataMemMapping = 0x%02x\n", _memory->hwState.screenDataMemMapping);
+
     //seed rng
     auto now = std::chrono::high_resolution_clock::now();
     api_srand(fix32::frombits((int32_t)now.time_since_epoch().count()));