Mercurial > repos > blastem
comparison trans.c @ 2445:339eff5dc350
Get 68K test harness compiling again
author | Michael Pavone <pavone@retrodev.com> |
---|---|
date | Tue, 13 Feb 2024 21:18:47 -0800 |
parents | 7d4df6b74263 |
children | d1eec03dca09 |
comparison
equal
deleted
inserted
replaced
2444:ab577e2ed66a | 2445:339eff5dc350 |
---|---|
21 | 21 |
22 void render_infobox(char * title, char * buf) | 22 void render_infobox(char * title, char * buf) |
23 { | 23 { |
24 } | 24 } |
25 | 25 |
26 #ifndef NEW_CORE | 26 m68k_context *int_ack(m68k_context *context) |
27 { | |
28 return context; | |
29 } | |
30 | |
27 m68k_context * sync_components(m68k_context * context, uint32_t address) | 31 m68k_context * sync_components(m68k_context * context, uint32_t address) |
28 { | 32 { |
33 #ifndef NEW_CORE | |
29 if (context->current_cycle >= context->target_cycle) { | 34 if (context->current_cycle >= context->target_cycle) { |
30 puts("hit cycle limit"); | 35 puts("hit cycle limit"); |
31 exit(0); | 36 exit(0); |
32 } | 37 } |
33 if (context->status & M68K_STATUS_TRACE || context->trace_pending) { | 38 if (context->status & M68K_STATUS_TRACE || context->trace_pending) { |
34 context->target_cycle = context->current_cycle; | 39 context->target_cycle = context->current_cycle; |
35 } | 40 } |
36 return context; | 41 return context; |
42 #endif | |
37 } | 43 } |
38 #endif | |
39 | 44 |
40 m68k_context *reset_handler(m68k_context *context) | 45 m68k_context *reset_handler(m68k_context *context) |
41 { | 46 { |
42 m68k_print_regs(context); | 47 m68k_print_regs(context); |
43 #ifdef NEW_CORE | 48 #ifdef NEW_CORE |
80 memmap[1].end = 0x1000000; | 85 memmap[1].end = 0x1000000; |
81 memmap[1].mask = 0xFFFF; | 86 memmap[1].mask = 0xFFFF; |
82 memmap[1].flags = MMAP_READ | MMAP_WRITE | MMAP_CODE; | 87 memmap[1].flags = MMAP_READ | MMAP_WRITE | MMAP_CODE; |
83 memmap[1].buffer = malloc(64 * 1024); | 88 memmap[1].buffer = malloc(64 * 1024); |
84 memset(memmap[1].buffer, 0, 64 * 1024); | 89 memset(memmap[1].buffer, 0, 64 * 1024); |
85 init_m68k_opts(&opts, memmap, 2, 1); | 90 init_m68k_opts(&opts, memmap, 2, 1, sync_components, int_ack); |
86 m68k_context * context = init_68k_context(&opts, reset_handler); | 91 m68k_context * context = init_68k_context(&opts, reset_handler); |
87 context->mem_pointers[0] = memmap[0].buffer; | 92 context->mem_pointers[0] = memmap[0].buffer; |
88 context->mem_pointers[1] = memmap[1].buffer; | 93 context->mem_pointers[1] = memmap[1].buffer; |
89 #ifdef NEW_CORE | 94 #ifdef NEW_CORE |
90 context->cycles = 40; | 95 context->cycles = 40; |