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.
 
 
 
 
 

35 lines
697 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. char exc_buffer[GG_EXC_BUFF_SIZE];
  19. } GameGear;
  20. /* Functions */
  21. GameGear* gamegear_create();
  22. void gamegear_destroy(GameGear*);
  23. void gamegear_load(GameGear*, const ROM*);
  24. void gamegear_power(GameGear*, bool);
  25. bool gamegear_simulate_frame(GameGear*);
  26. const char* gamegear_get_exception(GameGear*);