diff m68k_to_x86.h @ 82:6331ddec228f

Initial stab at interrupt support. Make native code offsets bigger so I don't have to worry about overflowing the offset. Implement neg and not (untested).
author Mike Pavone <pavone@retrodev.com>
date Wed, 26 Dec 2012 11:09:04 -0800
parents 8da611e69b32
children 3d3966c254b2
line wrap: on
line diff
--- a/m68k_to_x86.h	Sat Dec 22 21:37:25 2012 -0800
+++ b/m68k_to_x86.h	Wed Dec 26 11:09:04 2012 -0800
@@ -4,11 +4,11 @@
 #define NUM_MEM_AREAS 4
 #define NATIVE_MAP_CHUNKS (32*1024)
 #define NATIVE_CHUNK_SIZE ((16 * 1024 * 1024 / NATIVE_MAP_CHUNKS)/2)
-#define INVALID_OFFSET 0xFFFF
+#define INVALID_OFFSET 0xFFFFFFFF
 
 typedef struct {
 	uint8_t  *base;
-	uint16_t *offsets;
+	int32_t *offsets;
 } native_map_slot;
 
 typedef struct deferred_addr {
@@ -35,9 +35,12 @@
 	uint32_t		target_cycle; //cycle at which the next synchronization or interrupt occurs
 	uint32_t		current_cycle;
 	uint32_t        sync_cycle;
+	uint32_t        int_cycle;
+	uint32_t        int_num;
 	uint16_t        *mem_pointers[NUM_MEM_AREAS];
 	void            *next_context;
 	uint16_t        value;
+	
 	native_map_slot *native_code_map;
 	void            *options;
 } m68k_context;