From 8ae1e80ccee3a350cffb6c68563ce7dbfd2ab75e Mon Sep 17 00:00:00 2001 From: pagefault <> Date: Sun, 19 Feb 2006 09:00:04 +0000 Subject: [PATCH] Fixed program counter in RET macro, Dirt Racer now plays with some blinking, making progress :) --- zsnes/src/chips/fxemu2c.mac | 10 +++++++++- zsnes/src/win/winlink.cpp | 10 ++++++++++ 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/zsnes/src/chips/fxemu2c.mac b/zsnes/src/chips/fxemu2c.mac index 768022dd..eb024f57 100644 --- a/zsnes/src/chips/fxemu2c.mac +++ b/zsnes/src/chips/fxemu2c.mac @@ -26,9 +26,18 @@ +EXTSYM WriteLine + %macro FXReturn 0 dec dword[NumberOfOpcodes] +;pushad + js %%endloop +;call WriteLine +;popad +%%blah jmp [FxTabled+ecx*4] +%%endloop + jmp FXEndLoop ALIGN32 %endmacro @@ -38,7 +47,6 @@ jmp [FxTabled+ecx*4] %%endloop jmp FXEndLoop -; jmp [FxTabled+ecx*4] ALIGN32 %endmacro diff --git a/zsnes/src/win/winlink.cpp b/zsnes/src/win/winlink.cpp index 3616440c..b46f6596 100644 --- a/zsnes/src/win/winlink.cpp +++ b/zsnes/src/win/winlink.cpp @@ -3088,6 +3088,16 @@ void ZsnesPage() MouseY = 0; } + +extern "C" signed int NumberOfOpcodes; + +void WriteLine() +{ +char buf[50]; +sprintf(buf, "%d\n", NumberOfOpcodes); +WriteConsole(debugWindow, buf, strlen(buf), NULL, NULL); + +} // This function creates the debug console void InitDebugger() {