Mercurial > repos > blastem
comparison m68k_core.h @ 1507:2455662378ed mame_interp
Added MAME Z80 core, re-enabled 68K tracing in Musashi core, disabled a bunch of code gen stuff when using interpreters from MAME
author | Michael Pavone <pavone@retrodev.com> |
---|---|
date | Sat, 30 Dec 2017 18:27:06 -0800 |
parents | 4e5797b3935a |
children | 75172d440900 |
comparison
equal
deleted
inserted
replaced
1506:ded16f3d7eb4 | 1507:2455662378ed |
---|---|
34 int8_t dir; | 34 int8_t dir; |
35 } movem_fun; | 35 } movem_fun; |
36 | 36 |
37 typedef struct { | 37 typedef struct { |
38 cpu_options gen; | 38 cpu_options gen; |
39 | 39 #ifdef USE_NATIVE |
40 int8_t dregs[8]; | 40 int8_t dregs[8]; |
41 int8_t aregs[8]; | 41 int8_t aregs[8]; |
42 int8_t flag_regs[5]; | 42 int8_t flag_regs[5]; |
43 #endif | |
43 FILE *address_log; | 44 FILE *address_log; |
45 #ifdef USE_NATIVE | |
44 code_ptr read_16; | 46 code_ptr read_16; |
45 code_ptr write_16; | 47 code_ptr write_16; |
46 code_ptr read_8; | 48 code_ptr read_8; |
47 code_ptr write_8; | 49 code_ptr write_8; |
48 code_ptr read_32; | 50 code_ptr read_32; |
62 code_info extra_code; | 64 code_info extra_code; |
63 movem_fun *big_movem; | 65 movem_fun *big_movem; |
64 uint32_t num_movem; | 66 uint32_t num_movem; |
65 uint32_t movem_storage; | 67 uint32_t movem_storage; |
66 code_word prologue_start; | 68 code_word prologue_start; |
69 #endif | |
67 } m68k_options; | 70 } m68k_options; |
68 | 71 |
69 typedef struct m68k_context m68k_context; | 72 typedef struct m68k_context m68k_context; |
70 typedef void (*m68k_debug_handler)(m68k_context *context, uint32_t pc); | 73 typedef void (*m68k_debug_handler)(m68k_context *context, uint32_t pc); |
71 | 74 |
110 m68k_context * init_68k_context(m68k_options * opts, m68k_reset_handler reset_handler); | 113 m68k_context * init_68k_context(m68k_options * opts, m68k_reset_handler reset_handler); |
111 void m68k_reset(m68k_context * context); | 114 void m68k_reset(m68k_context * context); |
112 void m68k_options_free(m68k_options *opts); | 115 void m68k_options_free(m68k_options *opts); |
113 void insert_breakpoint(m68k_context * context, uint32_t address, m68k_debug_handler bp_handler); | 116 void insert_breakpoint(m68k_context * context, uint32_t address, m68k_debug_handler bp_handler); |
114 void remove_breakpoint(m68k_context * context, uint32_t address); | 117 void remove_breakpoint(m68k_context * context, uint32_t address); |
115 m68k_context * m68k_handle_code_write(uint32_t address, m68k_context * context); | |
116 uint32_t get_instruction_start(m68k_options *opts, uint32_t address); | 118 uint32_t get_instruction_start(m68k_options *opts, uint32_t address); |
117 uint16_t m68k_get_ir(m68k_context *context); | 119 uint16_t m68k_get_ir(m68k_context *context); |
118 void m68k_print_regs(m68k_context * context); | 120 void m68k_print_regs(m68k_context * context); |
121 #ifdef USE_NATIVE | |
122 m68k_context * m68k_handle_code_write(uint32_t address, m68k_context * context); | |
119 void m68k_invalidate_code_range(m68k_context *context, uint32_t start, uint32_t end); | 123 void m68k_invalidate_code_range(m68k_context *context, uint32_t start, uint32_t end); |
124 #else | |
125 #define m68k_handle_code_write(A, M) | |
126 #define m68k_invalidate_code_range(M, S, E) | |
127 #endif | |
120 void m68k_serialize(m68k_context *context, uint32_t pc, serialize_buffer *buf); | 128 void m68k_serialize(m68k_context *context, uint32_t pc, serialize_buffer *buf); |
121 void m68k_deserialize(deserialize_buffer *buf, void *vcontext); | 129 void m68k_deserialize(deserialize_buffer *buf, void *vcontext); |
122 | 130 |
123 #endif //M68K_CORE_H_ | 131 #endif //M68K_CORE_H_ |
124 | 132 |