[PATCH 08/20] Add a function that can be used to exit the loop in m68k_go()

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


---
 src/includes/m68000.h |  1 +
 src/m68000.c          | 11 ++++++++++-
 2 files changed, 11 insertions(+), 1 deletion(-)

diff --git a/src/includes/m68000.h b/src/includes/m68000.h
index 55c65270..3ec953a8 100644
--- a/src/includes/m68000.h
+++ b/src/includes/m68000.h
@@ -422,6 +422,7 @@ extern void M68000_Reset(bool bCold);
 extern void M68000_SetDebugger(bool debug);
 extern void M68000_RestoreDebugger(void);
 extern void M68000_Start(void);
+extern void M68000_EndTimeSlice(void);
 extern void M68000_CheckCpuSettings(void);
 extern void M68000_PatchCpuTables(void);
 extern void M68000_MemorySnapShot_Capture(bool bSave);
diff --git a/src/m68000.c b/src/m68000.c
index af19c42d..f70c818e 100644
--- a/src/m68000.c
+++ b/src/m68000.c
@@ -348,7 +348,16 @@ void M68000_Start(void)
 }
 
 
-/*-----------------------------------------------------------------------*/
+/**
+ * Call this function to make sure that m68k_go() exits
+ */
+void M68000_EndTimeSlice(void)
+{
+	M68000_SetSpecial(SPCFLAG_BRK);
+	quit_program = UAE_QUIT;
+}
+
+
 /**
  * Check whether CPU settings have been changed.
  * Possible values for WinUAE :
-- 
2.48.1


--MP_/VkVZp1l8MIESxWVe2vPSxV2
Content-Type: text/x-patch
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
 filename=0009-Add-a-cycInt-handler-that-can-be-used-to-break-out-o.patch



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