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.
 
 
 
 
 

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