Mercurial > repos > blastem
comparison m68k_to_x86.h @ 343:467bfa17004a
Mostly working runtime generation of memory map read/write functions
author | Mike Pavone <pavone@retrodev.com> |
---|---|
date | Sat, 18 May 2013 11:44:42 -0700 |
parents | e5e8b48ad157 |
children | b24556b45d1e |
comparison
equal
deleted
inserted
replaced
342:13f994c88c34 | 343:467bfa17004a |
---|---|
21 deferred_addr *deferred; | 21 deferred_addr *deferred; |
22 uint8_t *cur_code; | 22 uint8_t *cur_code; |
23 uint8_t *code_end; | 23 uint8_t *code_end; |
24 uint8_t **ram_inst_sizes; | 24 uint8_t **ram_inst_sizes; |
25 FILE *address_log; | 25 FILE *address_log; |
26 uint8_t *read_16; | |
27 uint8_t *write_16; | |
28 uint8_t *read_8; | |
29 uint8_t *write_8; | |
30 uint8_t *read_32; | |
31 uint8_t *write_32_lowfirst; | |
32 uint8_t *write_32_highfirst; | |
26 } x86_68k_options; | 33 } x86_68k_options; |
27 | 34 |
28 typedef struct { | 35 typedef struct { |
29 uint8_t flags[5]; | 36 uint8_t flags[5]; |
30 uint8_t status; | 37 uint8_t status; |
36 uint32_t sync_cycle; | 43 uint32_t sync_cycle; |
37 uint32_t int_cycle; | 44 uint32_t int_cycle; |
38 uint32_t int_num; | 45 uint32_t int_num; |
39 uint16_t *mem_pointers[NUM_MEM_AREAS]; | 46 uint16_t *mem_pointers[NUM_MEM_AREAS]; |
40 void *video_context; | 47 void *video_context; |
41 uint16_t value; | 48 uint16_t reserved; |
42 | 49 |
43 native_map_slot *native_code_map; | 50 native_map_slot *native_code_map; |
44 void *options; | 51 void *options; |
45 uint8_t ram_code_flags[32/8]; | 52 uint8_t ram_code_flags[32/8]; |
46 void *system; | 53 void *system; |
47 } m68k_context; | 54 } m68k_context; |
48 | 55 |
49 uint8_t * translate_m68k(uint8_t * dst, struct m68kinst * inst, x86_68k_options * opts); | 56 uint8_t * translate_m68k(uint8_t * dst, struct m68kinst * inst, x86_68k_options * opts); |
50 uint8_t * translate_m68k_stream(uint32_t address, m68k_context * context); | 57 uint8_t * translate_m68k_stream(uint32_t address, m68k_context * context); |
51 void start_68k_context(m68k_context * context, uint32_t address); | 58 void start_68k_context(m68k_context * context, uint32_t address); |
52 void init_x86_68k_opts(x86_68k_options * opts); | 59 void init_x86_68k_opts(x86_68k_options * opts, memmap_chunk * memmap, uint32_t num_chunks); |
53 void init_68k_context(m68k_context * context, native_map_slot * native_code_map, void * opts); | 60 void init_68k_context(m68k_context * context, native_map_slot * native_code_map, void * opts); |
54 void m68k_reset(m68k_context * context); | 61 void m68k_reset(m68k_context * context); |
55 void insert_breakpoint(m68k_context * context, uint32_t address, uint8_t * bp_handler); | 62 void insert_breakpoint(m68k_context * context, uint32_t address, uint8_t * bp_handler); |
56 void remove_breakpoint(m68k_context * context, uint32_t address); | 63 void remove_breakpoint(m68k_context * context, uint32_t address); |
57 m68k_context * m68k_handle_code_write(uint32_t address, m68k_context * context); | 64 m68k_context * m68k_handle_code_write(uint32_t address, m68k_context * context); |