comparison m68k_to_x86.h @ 208:3457dc6fd558

Tweaks to make blastem compatible with m68k-tester
author Mike Pavone <pavone@retrodev.com>
date Sat, 26 Jan 2013 01:33:32 -0800
parents 209a37eed3e7
children 464513050c85
comparison
equal deleted inserted replaced
207:c82f65a87a53 208:3457dc6fd558
1 #ifndef M68K_TO_X86_H_ 1 #ifndef M68K_TO_X86_H_
2 #define M68K_TO_X86_H_ 2 #define M68K_TO_X86_H_
3 #include <stdint.h> 3 #include <stdint.h>
4 #include <stdio.h> 4 #include <stdio.h>
5 #include "68kinst.h" 5 //#include "68kinst.h"
6 struct m68kinst;
6 7
7 #define NUM_MEM_AREAS 4 8 #define NUM_MEM_AREAS 4
8 #define NATIVE_MAP_CHUNKS (64*1024) 9 #define NATIVE_MAP_CHUNKS (64*1024)
9 #define NATIVE_CHUNK_SIZE ((16 * 1024 * 1024 / NATIVE_MAP_CHUNKS)/2) 10 #define NATIVE_CHUNK_SIZE ((16 * 1024 * 1024 / NATIVE_MAP_CHUNKS)/2)
10 #define INVALID_OFFSET 0xFFFFFFFF 11 #define INVALID_OFFSET 0xFFFFFFFF
54 native_map_slot *native_code_map; 55 native_map_slot *native_code_map;
55 void *options; 56 void *options;
56 uint8_t ram_code_flags[32/8]; 57 uint8_t ram_code_flags[32/8];
57 } m68k_context; 58 } m68k_context;
58 59
59 uint8_t * translate_m68k(uint8_t * dst, m68kinst * inst, x86_68k_options * opts); 60 uint8_t * translate_m68k(uint8_t * dst, struct m68kinst * inst, x86_68k_options * opts);
60 uint8_t * translate_m68k_stream(uint32_t address, m68k_context * context); 61 uint8_t * translate_m68k_stream(uint32_t address, m68k_context * context);
61 void start_68k_context(m68k_context * context, uint32_t address); 62 void start_68k_context(m68k_context * context, uint32_t address);
62 void init_x86_68k_opts(x86_68k_options * opts); 63 void init_x86_68k_opts(x86_68k_options * opts);
63 void init_68k_context(m68k_context * context, native_map_slot * native_code_map, void * opts); 64 void init_68k_context(m68k_context * context, native_map_slot * native_code_map, void * opts);
64 void m68k_reset(m68k_context * context); 65 void m68k_reset(m68k_context * context);
65 void insert_breakpoint(m68k_context * context, uint32_t address, uint8_t * bp_handler); 66 void insert_breakpoint(m68k_context * context, uint32_t address, uint8_t * bp_handler);
66 void remove_breakpoint(m68k_context * context, uint32_t address); 67 void remove_breakpoint(m68k_context * context, uint32_t address);
68 m68k_context * m68k_handle_code_write(uint32_t address, m68k_context * context);
67 69
68 #endif //M68K_TO_X86_H_ 70 #endif //M68K_TO_X86_H_
69 71