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
675 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. #include "mmu.h"
  7. #include "rom.h"
  8. #include "z80.h"
  9. #define GG_EXC_BUFF_SIZE 128
  10. /* Structs */
  11. typedef struct {
  12. MMU mmu;
  13. Z80 cpu;
  14. bool powered;
  15. uint64_t last_tick;
  16. char exc_buffer[GG_EXC_BUFF_SIZE];
  17. } GameGear;
  18. /* Functions */
  19. GameGear* gamegear_create();
  20. void gamegear_destroy(GameGear*);
  21. void gamegear_load(GameGear*, const ROM*);
  22. void gamegear_power(GameGear*, bool);
  23. bool gamegear_simulate(GameGear*);
  24. const char* gamegear_get_exception(GameGear*);