Mercurial > repos > blastem
diff trans.c @ 1838:0c1491818f4b
WIP new 68K core using CPU DSL
author | Michael Pavone <pavone@retrodev.com> |
---|---|
date | Thu, 18 Apr 2019 19:47:50 -0700 |
parents | 5b90d7669eee |
children | 374a5ae694e8 57ae42c3ab45 |
line wrap: on
line diff
--- a/trans.c Thu Apr 18 19:47:33 2019 -0700 +++ b/trans.c Thu Apr 18 19:47:50 2019 -0700 @@ -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 <stdio.h> #include <stdlib.h> @@ -19,6 +23,7 @@ { } +#ifndef NEW_CORE m68k_context * sync_components(m68k_context * context, uint32_t address) { if (context->current_cycle > 0x80000000) { @@ -29,6 +34,7 @@ } return context; } +#endif m68k_context *reset_handler(m68k_context *context) { @@ -74,11 +80,17 @@ 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; }