Mercurial > repos > blastem
diff romdb.h @ 1444:14a2834d010c
Save/restore mapper state in native save states
author | Michael Pavone <pavone@retrodev.com> |
---|---|
date | Sun, 27 Aug 2017 18:15:00 -0700 |
parents | 11ac0b511cff |
children | a763523dadf4 1f745318f10a |
line wrap: on
line diff
--- a/romdb.h Sat Aug 26 11:29:46 2017 -0700 +++ b/romdb.h Sun Aug 27 18:15:00 2017 -0700 @@ -14,6 +14,7 @@ #define SAVE_NONE 0xFF #include "tern.h" +#include "serialize.h" typedef struct { uint32_t start; @@ -37,6 +38,14 @@ uint8_t bus_flags; } nor_state; +enum { + MAPPER_NONE, + MAPPER_SEGA, + MAPPER_REALTEC, + MAPPER_XBAND, + MAPPER_MULTI_GAME +}; + typedef struct rom_info rom_info; @@ -62,6 +71,7 @@ uint16_t mapper_start_index; uint8_t save_type; uint8_t save_bus; //only used for NOR currently + uint8_t mapper_type; uint8_t regions; uint8_t is_save_lock_on; //Does the save buffer actually belong to a lock-on cart? }; @@ -77,5 +87,7 @@ //Note: free_rom_info only frees things pointed to by a rom_info struct, not the struct itself //this is because rom_info structs are typically stack allocated void free_rom_info(rom_info *info); +void cart_serialize(system_header *sys, serialize_buffer *buf); +void cart_deserialize(deserialize_buffer *buf, void *vcontext); #endif //ROMDB_H_