Mercurial > repos > blastem
comparison x86_backend.h @ 555:5af986d2b9da
Start work on refactoring some of the backend code to allow more sharing between M68K and Z80 cores and possibly also between x86 and the ARM backend when it exists
author | Michael Pavone <pavone@retrodev.com> |
---|---|
date | Mon, 24 Feb 2014 00:39:02 -0800 |
parents | 140af5509ce7 |
children | 34dfa9b24c7b |
comparison
equal
deleted
inserted
replaced
554:474270dbff15 | 555:5af986d2b9da |
---|---|
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 X86_BACKEND_H_ | 6 #ifndef X86_BACKEND_H_ |
7 #define X86_BACKEND_H_ | 7 #define X86_BACKEND_H_ |
8 | 8 |
27 typedef struct deferred_addr { | 27 typedef struct deferred_addr { |
28 struct deferred_addr *next; | 28 struct deferred_addr *next; |
29 uint8_t *dest; | 29 uint8_t *dest; |
30 uint32_t address; | 30 uint32_t address; |
31 } deferred_addr; | 31 } deferred_addr; |
32 | |
33 typedef enum { | |
34 READ_16, | |
35 READ_8, | |
36 WRITE_16, | |
37 WRITE_8 | |
38 } ftype; | |
39 | |
40 typedef struct { | |
41 uint32_t flags; | |
42 native_map_slot *native_code_map; | |
43 deferred_addr *deferred; | |
44 uint8_t *cur_code; | |
45 uint8_t *code_end; | |
46 uint8_t **ram_inst_sizes; | |
47 FILE *address_log; | |
48 uint8_t *save_context; | |
49 uint8_t *load_context; | |
50 uint8_t *handle_cycle_limit; | |
51 uint8_t *handle_cycle_limit_int; | |
52 uint8_t context_reg; | |
53 uint8_t scratch1; | |
54 uint8_t scratch2; | |
55 } cpu_options; | |
32 | 56 |
33 | 57 |
34 #define MMAP_READ 0x01 | 58 #define MMAP_READ 0x01 |
35 #define MMAP_WRITE 0x02 | 59 #define MMAP_WRITE 0x02 |
36 #define MMAP_CODE 0x04 | 60 #define MMAP_CODE 0x04 |