|
|
|
@@ -5,6 +5,7 @@ |
|
|
|
#include "file.h" |
|
|
|
#include "mapper.h" |
|
|
|
#include "filemap.h" |
|
|
|
#include "compat.h" |
|
|
|
|
|
|
|
|
|
|
|
/* SRAM */ |
|
|
|
@@ -44,6 +45,7 @@ int save_sram(const nes_cart* cart, const char* cart_filename) { |
|
|
|
cart->mapper->sram(cart->map_data) : NULL; |
|
|
|
|
|
|
|
if (sram_size > 0 && NULL != sram) { |
|
|
|
mkdir("sram"); |
|
|
|
char sram_filename[FILENAME_MAX] = {0}; |
|
|
|
make_sram_filename(sram_filename, FILENAME_MAX - 1, |
|
|
|
cart_filename); |
|
|
|
@@ -91,6 +93,8 @@ int load_state(nes* sys, const char* cart_filename) { |
|
|
|
int save_state(const nes* sys, const char* cart_filename) { |
|
|
|
int size = -1; |
|
|
|
|
|
|
|
mkdir("save"); |
|
|
|
|
|
|
|
char state_filename[FILENAME_MAX] = {0}; |
|
|
|
make_state_filename(state_filename, FILENAME_MAX - 1, |
|
|
|
cart_filename); |
|
|
|
|