From aa41d9724e763de7a64776a7a2c262a5757383f9 Mon Sep 17 00:00:00 2001 From: Michael Pavone Date: Thu, 18 Apr 2019 19:47:50 -0700 Subject: WIP new 68K core using CPU DSL --- trans.c | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) (limited to 'trans.c') diff --git a/trans.c b/trans.c index 32193ca..1992e88 100644 --- a/trans.c +++ b/trans.c @@ -4,7 +4,11 @@ BlastEm is free software distributed under the terms of the GNU General Public License version 3 or greater. See COPYING for full license text. */ #include "68kinst.h" +#ifdef NEW_CORE +#include "m68k.h" +#else #include "m68k_core.h" +#endif #include "mem.h" #include #include @@ -19,6 +23,7 @@ void render_infobox(char * title, char * buf) { } +#ifndef NEW_CORE m68k_context * sync_components(m68k_context * context, uint32_t address) { if (context->current_cycle > 0x80000000) { @@ -29,6 +34,7 @@ m68k_context * sync_components(m68k_context * context, uint32_t address) } return context; } +#endif m68k_context *reset_handler(m68k_context *context) { @@ -74,11 +80,17 @@ int main(int argc, char ** argv) m68k_context * context = init_68k_context(&opts, reset_handler); context->mem_pointers[0] = memmap[0].buffer; context->mem_pointers[1] = memmap[1].buffer; +#ifndef NEW_CORE context->target_cycle = context->sync_cycle = 0x80000000; - uint32_t address; - address = filebuf[2] << 16 | filebuf[3]; - translate_m68k_stream(address, context); +#endif m68k_reset(context); +#ifdef NEW_CORE + for (;;) + { + m68k_execute(context, 0x80000000); + context->cycles = 0; + } +#endif return 0; } -- cgit v1.2.3