Mercurial > repos > blastem
comparison z80_to_x86.h @ 590:ea80559c67cb
WIP effort to update z80 core for code gen changes
author | Michael Pavone <pavone@retrodev.com> |
---|---|
date | Sun, 14 Dec 2014 16:45:23 -0800 |
parents | acec5464fa1e |
children | 966b46c68942 |
comparison
equal
deleted
inserted
replaced
589:2dde38c1744f | 590:ea80559c67cb |
---|---|
20 ZF_S, | 20 ZF_S, |
21 ZF_NUM | 21 ZF_NUM |
22 }; | 22 }; |
23 | 23 |
24 typedef struct { | 24 typedef struct { |
25 uint8_t * cur_code; | 25 cpu_options gen; |
26 uint8_t * code_end; | 26 code_ptr save_context_scratch; |
27 uint8_t *ram_inst_sizes; | 27 code_ptr load_context_scratch; |
28 deferred_addr * deferred; | 28 code_ptr write_8_noinc; |
29 | |
29 uint32_t flags; | 30 uint32_t flags; |
30 int8_t regs[Z80_UNUSED]; | 31 int8_t regs[Z80_UNUSED]; |
31 } x86_z80_options; | 32 } z80_options; |
32 | 33 |
33 typedef struct { | 34 typedef struct { |
34 void * native_pc; | 35 void * native_pc; |
35 uint16_t sp; | 36 uint16_t sp; |
36 uint8_t flags[ZF_NUM]; | 37 uint8_t flags[ZF_NUM]; |
49 void * extra_pc; | 50 void * extra_pc; |
50 uint32_t sync_cycle; | 51 uint32_t sync_cycle; |
51 uint32_t int_cycle; | 52 uint32_t int_cycle; |
52 native_map_slot * static_code_map; | 53 native_map_slot * static_code_map; |
53 native_map_slot * banked_code_map; | 54 native_map_slot * banked_code_map; |
54 void * options; | 55 z80_options * options; |
55 void * system; | 56 void * system; |
56 uint8_t ram_code_flags[(8 * 1024)/128/8]; | 57 uint8_t ram_code_flags[(8 * 1024)/128/8]; |
57 uint32_t int_enable_cycle; | 58 uint32_t int_enable_cycle; |
58 uint16_t pc; | 59 uint16_t pc; |
59 } z80_context; | 60 } z80_context; |
60 | 61 |
61 void translate_z80_stream(z80_context * context, uint32_t address); | 62 void translate_z80_stream(z80_context * context, uint32_t address); |
62 void init_x86_z80_opts(x86_z80_options * options); | 63 void init_x86_z80_opts(z80_options * options, memmap_chunk * chunks, uint32_t num_chunks); |
63 void init_z80_context(z80_context * context, x86_z80_options * options); | 64 void init_z80_context(z80_context * context, z80_options * options); |
64 uint8_t * z80_get_native_address(z80_context * context, uint32_t address); | 65 uint8_t * z80_get_native_address(z80_context * context, uint32_t address); |
65 uint8_t * z80_get_native_address_trans(z80_context * context, uint32_t address); | 66 uint8_t * z80_get_native_address_trans(z80_context * context, uint32_t address); |
66 z80_context * z80_handle_code_write(uint32_t address, z80_context * context); | 67 z80_context * z80_handle_code_write(uint32_t address, z80_context * context); |
67 void z80_run(z80_context * context); | 68 void z80_run(z80_context * context); |
68 void z80_reset(z80_context * context); | 69 void z80_reset(z80_context * context); |