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.
 
 
 
 
 

30 lines
616 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 "mmu.h"
  6. #include "rom.h"
  7. #include "z80.h"
  8. /* Clock speed in Hz was taken from the official Sega GG documentation */
  9. #define CPU_CLOCK_SPEED 3579545
  10. /* Structs */
  11. typedef struct {
  12. MMU mmu;
  13. Z80 cpu;
  14. bool powered;
  15. } GameGear;
  16. /* Functions */
  17. GameGear* gamegear_create();
  18. void gamegear_destroy(GameGear*);
  19. void gamegear_load(GameGear*, ROM*);
  20. void gamegear_power(GameGear*, bool);
  21. void gamegear_simulate(GameGear*);