comparison 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
comparison
equal deleted inserted replaced
1129:6b5c92b6205c 1130:8f14767661fa
68 uint16_t scratch1; 68 uint16_t scratch1;
69 uint16_t scratch2; 69 uint16_t scratch2;
70 void * extra_pc; 70 void * extra_pc;
71 uint32_t sync_cycle; 71 uint32_t sync_cycle;
72 uint32_t int_cycle; 72 uint32_t int_cycle;
73 native_map_slot * static_code_map;
74 native_map_slot * banked_code_map;
75 z80_options * options; 73 z80_options * options;
76 void * system; 74 void * system;
77 uint8_t ram_code_flags[(8 * 1024)/128/8];
78 uint32_t int_enable_cycle; 75 uint32_t int_enable_cycle;
79 uint16_t pc; 76 uint16_t pc;
80 uint32_t int_pulse_start; 77 uint32_t int_pulse_start;
81 uint32_t int_pulse_end; 78 uint32_t int_pulse_end;
82 uint8_t breakpoint_flags[(16 * 1024)/sizeof(uint8_t)]; 79 uint8_t breakpoint_flags[(16 * 1024)/sizeof(uint8_t)];
85 uint8_t * interp_code[256]; 82 uint8_t * interp_code[256];
86 z80_ctx_fun next_int_pulse; 83 z80_ctx_fun next_int_pulse;
87 uint8_t reset; 84 uint8_t reset;
88 uint8_t busreq; 85 uint8_t busreq;
89 uint8_t busack; 86 uint8_t busack;
87 uint8_t ram_code_flags[];
90 }; 88 };
91 89
92 void translate_z80_stream(z80_context * context, uint32_t address); 90 void translate_z80_stream(z80_context * context, uint32_t address);
93 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); 91 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);
94 void z80_options_free(z80_options *opts); 92 void z80_options_free(z80_options *opts);
95 void init_z80_context(z80_context * context, z80_options * options); 93 z80_context * init_z80_context(z80_options * options);
96 code_ptr z80_get_native_address(z80_context * context, uint32_t address); 94 code_ptr z80_get_native_address(z80_context * context, uint32_t address);
97 code_ptr z80_get_native_address_trans(z80_context * context, uint32_t address); 95 code_ptr z80_get_native_address_trans(z80_context * context, uint32_t address);
98 z80_context * z80_handle_code_write(uint32_t address, z80_context * context); 96 z80_context * z80_handle_code_write(uint32_t address, z80_context * context);
99 void z80_reset(z80_context * context); 97 void z80_reset(z80_context * context);
100 void zinsert_breakpoint(z80_context * context, uint16_t address, uint8_t * bp_handler); 98 void zinsert_breakpoint(z80_context * context, uint16_t address, uint8_t * bp_handler);