diff z80_to_x86.h @ 1130:8f14767661fa

Remove memory map assumptions from Z80 core and move a little bit of logic to the generic backend.c so it can be shared between CPU cores
author Michael Pavone <pavone@retrodev.com>
date Wed, 28 Dec 2016 20:39:27 -0800
parents 928a65750345
children 5c8b1c33ca10
line wrap: on
line diff
--- a/z80_to_x86.h	Wed Dec 28 12:28:52 2016 -0800
+++ b/z80_to_x86.h	Wed Dec 28 20:39:27 2016 -0800
@@ -70,11 +70,8 @@
 	void *            extra_pc;
 	uint32_t          sync_cycle;
 	uint32_t          int_cycle;
-	native_map_slot * static_code_map;
-	native_map_slot * banked_code_map;
 	z80_options *     options;
 	void *            system;
-	uint8_t           ram_code_flags[(8 * 1024)/128/8];
 	uint32_t          int_enable_cycle;
 	uint16_t          pc;
 	uint32_t          int_pulse_start;
@@ -87,12 +84,13 @@
 	uint8_t           reset;
 	uint8_t           busreq;
 	uint8_t           busack;
+	uint8_t           ram_code_flags[];
 };
 
 void translate_z80_stream(z80_context * context, uint32_t address);
 void init_z80_opts(z80_options * options, memmap_chunk const * chunks, uint32_t num_chunks, memmap_chunk const * io_chunks, uint32_t num_io_chunks, uint32_t clock_divider, uint32_t io_address_mask);
 void z80_options_free(z80_options *opts);
-void init_z80_context(z80_context * context, z80_options * options);
+z80_context * init_z80_context(z80_options * options);
 code_ptr z80_get_native_address(z80_context * context, uint32_t address);
 code_ptr z80_get_native_address_trans(z80_context * context, uint32_t address);
 z80_context * z80_handle_code_write(uint32_t address, z80_context * context);