An emulator, assembler, and disassembler for the Sega Game Gear
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

33 lines
635 B

  1. /* Copyright (C) 2014-2015 Ben Kurtovic <ben.kurtovic@gmail.com>
  2. Released under the terms of the MIT License. See LICENSE for details. */
  3. #pragma once
  4. #include <stdbool.h>
  5. #include <stdint.h>
  6. /* Structs */
  7. typedef struct {
  8. uint8_t a, f, b, c, d, e, h, l;
  9. uint8_t a_, f_, b_, c_, d_, e_, h_, l_;
  10. uint16_t ix, iy, sp, pc;
  11. uint8_t i, r;
  12. bool im_a, im_b;
  13. bool iff1, iff2;
  14. } Z80RegFile;
  15. typedef struct {
  16. Z80RegFile regfile;
  17. uint64_t clock_speed;
  18. } Z80;
  19. /* Functions */
  20. void z80_init(Z80*, uint64_t);
  21. void z80_power(Z80*);
  22. #ifdef DEBUG_MODE
  23. void z80_dump_registers(Z80*);
  24. #endif