comparison m68k_to_x86.h @ 539:c2716b502a81

Generate save_context and load_context functions at runtime
author Michael Pavone <pavone@retrodev.com>
date Fri, 14 Feb 2014 19:56:18 -0800
parents 140af5509ce7
children 4ca826862174
comparison
equal deleted inserted replaced
538:71b7cf543040 539:c2716b502a81
1 /* 1 /*
2 Copyright 2013 Michael Pavone 2 Copyright 2013 Michael Pavone
3 This file is part of BlastEm. 3 This file is part of BlastEm.
4 BlastEm is free software distributed under the terms of the GNU General Public License version 3 or greater. See COPYING for full license text. 4 BlastEm is free software distributed under the terms of the GNU General Public License version 3 or greater. See COPYING for full license text.
5 */ 5 */
6 #ifndef M68K_TO_X86_H_ 6 #ifndef M68K_TO_X86_H_
7 #define M68K_TO_X86_H_ 7 #define M68K_TO_X86_H_
8 #include <stdint.h> 8 #include <stdint.h>
20 20
21 typedef struct { 21 typedef struct {
22 uint32_t flags; 22 uint32_t flags;
23 int8_t dregs[8]; 23 int8_t dregs[8];
24 int8_t aregs[8]; 24 int8_t aregs[8];
25 int8_t flag_regs[5];
25 native_map_slot *native_code_map; 26 native_map_slot *native_code_map;
26 deferred_addr *deferred; 27 deferred_addr *deferred;
27 uint8_t *cur_code; 28 uint8_t *cur_code;
28 uint8_t *code_end; 29 uint8_t *code_end;
29 uint8_t **ram_inst_sizes; 30 uint8_t **ram_inst_sizes;
35 uint8_t *read_32; 36 uint8_t *read_32;
36 uint8_t *write_32_lowfirst; 37 uint8_t *write_32_lowfirst;
37 uint8_t *write_32_highfirst; 38 uint8_t *write_32_highfirst;
38 uint8_t *handle_cycle_limit_int; 39 uint8_t *handle_cycle_limit_int;
39 uint8_t *trap; 40 uint8_t *trap;
41 uint8_t *save_context;
42 uint8_t *load_context;
40 } x86_68k_options; 43 } x86_68k_options;
41 44
42 typedef struct { 45 typedef struct {
43 uint8_t flags[5]; 46 uint8_t flags[5];
44 uint8_t status; 47 uint8_t status;
51 uint32_t int_cycle; 54 uint32_t int_cycle;
52 uint32_t int_num; 55 uint32_t int_num;
53 uint16_t *mem_pointers[NUM_MEM_AREAS]; 56 uint16_t *mem_pointers[NUM_MEM_AREAS];
54 void *video_context; 57 void *video_context;
55 uint16_t reserved; 58 uint16_t reserved;
56 59
57 native_map_slot *native_code_map; 60 native_map_slot *native_code_map;
58 void *options; 61 void *options;
59 uint8_t ram_code_flags[32/8]; 62 uint8_t ram_code_flags[32/8];
60 void *system; 63 void *system;
61 } m68k_context; 64 } m68k_context;