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
572 B

  1. /* Copyright (C) 2014-2017 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 "rom.h"
  7. /* Structs */
  8. typedef struct {
  9. char *path;
  10. const ROM *rom;
  11. void *map;
  12. size_t mapsize;
  13. size_t cart_ram_offset;
  14. bool has_cart_ram;
  15. } Save;
  16. /* Functions */
  17. bool save_init(Save*, const char*, const ROM*);
  18. void save_free(Save*);
  19. bool save_has_cart_ram(const Save*);
  20. uint8_t* save_get_cart_ram(Save*);
  21. bool save_init_cart_ram(Save*);