diff options
author | Mike Pavone <pavone@retrodev.com> | 2013-04-25 21:01:11 -0700 |
---|---|---|
committer | Mike Pavone <pavone@retrodev.com> | 2013-04-25 21:01:11 -0700 |
commit | 46db74a053d7fca9dee69e8737a435e65b538577 (patch) | |
tree | fa645a9997fac9f040b6664ffbaf9b0733fdc71e /z80_to_x86.h | |
parent | 68be5ac1a6452de7333d77b91d5a9634aac05b5b (diff) |
Get Z80 core working for simple programs
Diffstat (limited to 'z80_to_x86.h')
-rw-r--r-- | z80_to_x86.h | 21 |
1 files changed, 16 insertions, 5 deletions
diff --git a/z80_to_x86.h b/z80_to_x86.h index dbea50e..bfad077 100644 --- a/z80_to_x86.h +++ b/z80_to_x86.h @@ -16,8 +16,11 @@ enum { }; typedef struct { - uint32_t flags; - int8_t regs[Z80_UNUSED]; + uint8_t * cur_code; + uint8_t * code_end; + deferred_addr * deferred; + uint32_t flags; + int8_t regs[Z80_UNUSED]; } x86_z80_options; typedef struct { @@ -27,13 +30,21 @@ typedef struct { uint16_t bank_reg; uint8_t regs[Z80_A+1]; uint8_t alt_regs[Z80_A+1]; + uint32_t target_cycle; + uint32_t current_cycle; uint8_t * mem_pointers[ZNUM_MEM_AREAS]; - native_map_slot * native_code_map; - void * options + native_map_slot * static_code_map; + native_map_slot * banked_code_map; + void * options; void * next_context; } z80_context; -void translate_z80_stream(z80_context * context, uint16_t address); +void translate_z80_stream(z80_context * context, uint32_t address); +void init_x86_z80_opts(x86_z80_options * options); +void init_z80_context(z80_context * context, x86_z80_options * options); +uint8_t * z80_get_native_address(z80_context * context, uint32_t address); +void z80_run(z80_context * context); +void z80_reset(z80_context * context); #endif //Z80_TO_X86_H_ |