diff m68k_core.h @ 2054:8ee7ecbf3f21 segacd

Implement enough of Sega CD gate array and Sub CPU to pass Sik's Mode 1 test ROM
author Michael Pavone <pavone@retrodev.com>
date Tue, 18 Jan 2022 00:03:50 -0800
parents 8b2ef428d1aa
children 8554751f17b5
line wrap: on
line diff
--- a/m68k_core.h	Sat Jan 15 13:15:21 2022 -0800
+++ b/m68k_core.h	Tue Jan 18 00:03:50 2022 -0800
@@ -25,6 +25,8 @@
 #define M68K_STATUS_TRACE 0x80
 
 typedef void (*start_fun)(uint8_t * addr, void * context);
+typedef struct m68k_context m68k_context;
+typedef m68k_context *(*sync_fun)(m68k_context * context, uint32_t address);
 
 typedef struct {
 	code_ptr impl;
@@ -59,6 +61,7 @@
 	code_ptr		set_sr;
 	code_ptr		set_ccr;
 	code_ptr        bp_stub;
+	sync_fun        sync_components;
 	code_info       extra_code;
 	movem_fun       *big_movem;
 	uint32_t        num_movem;
@@ -66,7 +69,6 @@
 	code_word       prologue_start;
 } m68k_options;
 
-typedef struct m68k_context m68k_context;
 typedef void (*m68k_debug_handler)(m68k_context *context, uint32_t pc);
 
 typedef struct {
@@ -106,7 +108,7 @@
 void translate_m68k_stream(uint32_t address, m68k_context * context);
 void start_68k_context(m68k_context * context, uint32_t address);
 void resume_68k(m68k_context *context);
-void init_m68k_opts(m68k_options * opts, memmap_chunk * memmap, uint32_t num_chunks, uint32_t clock_divider);
+void init_m68k_opts(m68k_options * opts, memmap_chunk * memmap, uint32_t num_chunks, uint32_t clock_divider, sync_fun sync_components);
 m68k_context * init_68k_context(m68k_options * opts, m68k_reset_handler reset_handler);
 void m68k_reset(m68k_context * context);
 void m68k_options_free(m68k_options *opts);