[hatari-devel] Re: Hatari NatFeats Extension Patch

[ Thread Index | Date Index | More lists.tuxfamily.org/hatari-devel Archives ]


Le 30/04/2014 17:05, Mark Fechtner a écrit :
Hi,

here's a small patch I'm using for quite some time now and that is (to
me at least) pretty helpfull while developing. Its a simple Native
Features command that allows the guest programm to control wether Hatari
is in fast forward mode or not.
During development my build chain starts Hatari with --fast-forward true
and lets the program under development turn fast forward of as soon as
it's done loading data etc. Saves a lot of time when checking builds.
Might be helpfull to others, so I thought I send it to you. This is a
diff against the latest hg:

Hello

thanks for the patch, I added it to the dev tree.

Nicolas


diff -r 10f3c2cc8640 src/debug/natfeats.c
--- a/src/debug/natfeats.c    Wed Apr 30 00:27:13 2014 +0300
+++ b/src/debug/natfeats.c    Wed Apr 30 14:45:02 2014 +0200
@@ -114,6 +114,17 @@
     M68000_SetSpecial(SPCFLAG_DEBUGGER);
     return true;
 }
+/**
+ * set fast forward 0:off >=1:on
+ */
+static bool nf_fastforward(Uint32 stack, Uint32 subid, Uint32 *retval)
+{
+    Uint32 val;
+    Dprintf(("NF fastforward()\n"));
+    val = STMemory_ReadLong(stack);
+    ConfigureParams.System.bFastForward = val;
+    return true;
+}

 #if NF_COMMAND
 /**
@@ -154,8 +165,9 @@
     { "NF_VERSION",  false, nf_version },
     { "NF_STDERR",   false, nf_stderr },
     { "NF_SHUTDOWN", true,  nf_shutdown },
-    { "NF_DEBUGGER", false, nf_debugger }
-};
+    { "NF_DEBUGGER", false, nf_debugger },
+     { "NF_FASTFORWARD", false,  nf_fastforward }
+ };

 /* macros from Aranym */
 #define ID_SHIFT        20

Keep up the good work,
  Mark.




Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/