comparison trans.c @ 1991:7d4df6b74263

Somewhat buggy implementations of shift instructions in new 68K core
author Michael Pavone <pavone@retrodev.com>
date Sat, 13 Jun 2020 00:37:22 -0700
parents 57ae42c3ab45
children 638eb2d25696 339eff5dc350
comparison
equal deleted inserted replaced
1990:57ae42c3ab45 1991:7d4df6b74263
38 #endif 38 #endif
39 39
40 m68k_context *reset_handler(m68k_context *context) 40 m68k_context *reset_handler(m68k_context *context)
41 { 41 {
42 m68k_print_regs(context); 42 m68k_print_regs(context);
43 #ifdef NEW_CORE
44 printf("cycles: %d\n", context->cycles);
45 #else
43 printf("cycles: %d\n", context->current_cycle); 46 printf("cycles: %d\n", context->current_cycle);
47 #endif
44 exit(0); 48 exit(0);
45 //unreachable 49 //unreachable
46 return context; 50 return context;
47 } 51 }
48 52
80 memset(memmap[1].buffer, 0, 64 * 1024); 84 memset(memmap[1].buffer, 0, 64 * 1024);
81 init_m68k_opts(&opts, memmap, 2, 1); 85 init_m68k_opts(&opts, memmap, 2, 1);
82 m68k_context * context = init_68k_context(&opts, reset_handler); 86 m68k_context * context = init_68k_context(&opts, reset_handler);
83 context->mem_pointers[0] = memmap[0].buffer; 87 context->mem_pointers[0] = memmap[0].buffer;
84 context->mem_pointers[1] = memmap[1].buffer; 88 context->mem_pointers[1] = memmap[1].buffer;
89 #ifdef NEW_CORE
90 context->cycles = 40;
91 #else
85 context->current_cycle = 40; 92 context->current_cycle = 40;
86 #ifndef NEW_CORE
87 context->target_cycle = context->sync_cycle = 8000; 93 context->target_cycle = context->sync_cycle = 8000;
88 #endif 94 #endif
89 m68k_reset(context); 95 m68k_reset(context);
90 #ifdef NEW_CORE 96 #ifdef NEW_CORE
91 m68k_execute(context, 8000); 97 m68k_execute(context, 8000);