diff options
author | Mike Pavone <pavone@retrodev.com> | 2013-04-16 22:29:00 -0700 |
---|---|---|
committer | Mike Pavone <pavone@retrodev.com> | 2013-04-16 22:29:00 -0700 |
commit | 9d263ae4d5ae12022177b4dda9120c88b20604df (patch) | |
tree | f2e177496bae97b9fa1b9cf02875e2e5b5b39aef /z80_to_x86.h | |
parent | 5b8b2105a5ebee2f9d272c06ba129c7f1fbb8922 (diff) |
Make reset trigger debug exit to make it easier to test the same cases in blastem and musashi. Fix asl #1 overflow flag.
Diffstat (limited to 'z80_to_x86.h')
-rw-r--r-- | z80_to_x86.h | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/z80_to_x86.h b/z80_to_x86.h new file mode 100644 index 0000000..dbea50e --- /dev/null +++ b/z80_to_x86.h @@ -0,0 +1,39 @@ +#ifndef Z80_TO_X86_H_ +#define Z80_TO_X86_H_ +#include "z80inst.h" +#include "x86_backend.h" + +#define ZNUM_MEM_AREAS 4 + +enum { + ZF_C = 0, + ZF_N, + ZF_PV, + ZF_H, + ZF_Z, + ZF_S, + ZF_NUM +}; + +typedef struct { + uint32_t flags; + int8_t regs[Z80_UNUSED]; +} x86_z80_options; + +typedef struct { + void * native_pc; + uint16_t sp; + uint8_t flags[ZF_NUM]; + uint16_t bank_reg; + uint8_t regs[Z80_A+1]; + uint8_t alt_regs[Z80_A+1]; + uint8_t * mem_pointers[ZNUM_MEM_AREAS]; + native_map_slot * native_code_map; + void * options + void * next_context; +} z80_context; + +void translate_z80_stream(z80_context * context, uint16_t address); + +#endif //Z80_TO_X86_H_ + |