add a hack for fixing game sessions that were carelessly initialized with the wrong save size. it may or may not work in any given case, depending on how the game works
This commit is contained in:
parent
8fd6cfb8fc
commit
cefa3dbcf5
12
src/mc.cpp
12
src/mc.cpp
|
@ -78,6 +78,12 @@ static const int save_types[7][2] = {
|
|||
{MC_TYPE_FLASH,MC_SIZE_4MBITS}
|
||||
};
|
||||
|
||||
//forces the current
|
||||
void backup_forceManualBackupType()
|
||||
{
|
||||
MMU_new.backupDevice.forceManualBackupType();
|
||||
}
|
||||
|
||||
void backup_setManualBackupType(int type)
|
||||
{
|
||||
CommonSettings.manualBackupType = type;
|
||||
|
@ -818,3 +824,9 @@ bool BackupDevice::load_movie(std::istream* is) {
|
|||
|
||||
return true;
|
||||
}
|
||||
|
||||
void BackupDevice::forceManualBackupType()
|
||||
{
|
||||
addr_size = addr_size_for_old_save_size(save_types[CommonSettings.manualBackupType][1]);
|
||||
state = RUNNING;
|
||||
}
|
||||
|
|
3
src/mc.h
3
src/mc.h
|
@ -76,6 +76,8 @@ public:
|
|||
void reset();
|
||||
void close_rom();
|
||||
|
||||
void forceManualBackupType();
|
||||
|
||||
bool save_state(std::ostream* os);
|
||||
bool load_state(std::istream* is);
|
||||
|
||||
|
@ -142,6 +144,7 @@ void fw_reset_com(memory_chip_t *mc); /* reset communication with mc */
|
|||
u8 fw_transfer(memory_chip_t *mc, u8 data);
|
||||
|
||||
void backup_setManualBackupType(int type);
|
||||
void backup_forceManualBackupType();
|
||||
|
||||
#endif /*__FW_H__*/
|
||||
|
||||
|
|
|
@ -3451,6 +3451,7 @@ LRESULT CALLBACK WindowProcedure (HWND hwnd, UINT message, WPARAM wParam, LPARAM
|
|||
case IDC_SAVETYPE5: backup_setManualBackupType(4); return 0;
|
||||
case IDC_SAVETYPE6: backup_setManualBackupType(5); return 0;
|
||||
case IDC_SAVETYPE7: backup_setManualBackupType(6); return 0;
|
||||
case IDC_SAVETYPE_FORCE: backup_forceManualBackupType(); return 0;
|
||||
|
||||
case IDM_RESET:
|
||||
ResetGame();
|
||||
|
|
|
@ -77,6 +77,7 @@
|
|||
#define IDC_SAVETYPE4 185
|
||||
#define IDC_SAVETYPE5 186
|
||||
#define IDC_SAVETYPE6 187
|
||||
#define IDC_SAVETYPE_FORCE 188
|
||||
#define IDC_FRAMESKIPAUTO 190
|
||||
#define IDC_FRAMESKIP0 191
|
||||
#define IDC_FRAMESKIP1 192
|
||||
|
|
Binary file not shown.
Loading…
Reference in New Issue