Hey all,
DGEN works superbly for me... except for the save and load function.
most of the time it just gives me "Couldn't save to slot 0!" or "Couldn't load slot 0!". It does work, however, every once in a blue moon.
I'm getting a bit tired of having to restart the game each time I come to play.
Does anyone know how to get DGEN working? Or any alternative Mega Drive emulators?
Thankyou all!
EDIT: Found what looks to be the source code on Github if anyone has any ideas. 
Code:
// Save/load states
// It is externed from your implementation to change the current slot
// (I know this is a hack :)
int slot = 0;
void md_save(md& megad)
{
FILE *save;
char file[64];
if (((size_t)snprintf(file,
sizeof(file),
"%s.gs%d",
megad.romname,
slot) >= sizeof(file)) ||
((save = dgen_fopen("saves", file, DGEN_WRITE)) == NULL)) {
snprintf(temp, sizeof(temp),
"Couldn't save state to slot %d!", slot);
pd_message(temp);
return;
}
megad.export_gst(save);
fclose(save);
snprintf(temp, sizeof(temp), "Saved state to slot %d.", slot);
pd_message(temp);
}
void md_load(md& megad)
{
FILE *load;
char file[64];
if (((size_t)snprintf(file,
sizeof(file),
"%s.gs%d",
megad.romname,
slot) >= sizeof(file)) ||
((load = dgen_fopen("saves", file, DGEN_READ)) == NULL)) {
snprintf(temp, sizeof(temp),
"Couldn't load state from slot %d!", slot);
pd_message(temp);
return;
}
megad.import_gst(load);
fclose(load);
snprintf(temp, sizeof(temp), "Loaded state from slot %d.", slot);
pd_message(temp);
}