diff 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
line wrap: on
line diff
--- a/x86_backend.h	Sun Feb 23 22:17:43 2014 -0800
+++ b/x86_backend.h	Mon Feb 24 00:39:02 2014 -0800
@@ -1,6 +1,6 @@
 /*
  Copyright 2013 Michael Pavone
- This file is part of BlastEm. 
+ This file is part of BlastEm.
  BlastEm is free software distributed under the terms of the GNU General Public License version 3 or greater. See COPYING for full license text.
 */
 #ifndef X86_BACKEND_H_
@@ -30,6 +30,30 @@
 	uint32_t             address;
 } deferred_addr;
 
+typedef enum {
+	READ_16,
+	READ_8,
+	WRITE_16,
+	WRITE_8
+} ftype;
+
+typedef struct {
+	uint32_t flags;
+	native_map_slot *native_code_map;
+	deferred_addr   *deferred;
+	uint8_t         *cur_code;
+	uint8_t         *code_end;
+	uint8_t         **ram_inst_sizes;
+	FILE            *address_log;
+	uint8_t			*save_context;
+	uint8_t			*load_context;
+	uint8_t         *handle_cycle_limit;
+	uint8_t         *handle_cycle_limit_int;
+	uint8_t			context_reg;
+	uint8_t			scratch1;
+	uint8_t			scratch2;
+} cpu_options;
+
 
 #define MMAP_READ      0x01
 #define MMAP_WRITE     0x02