Enabled checksum saving. This should give a reasonably ambitious person a fair chance to upgrade his savegames to the new version. - Please remember to make backups before any attempts to try it. I tried it with SSBM PAL and Mario Sunshine NTSC so I'm confident that it works, just try again if it fails.

Usage: Open your savefile, for example MemoryCardA.raw in a hex editor and update the gamecode and makercode according to yagcd 12.3.1 for the game you want to fix. And remember to update the tag on both locations, both Directory and Directory backup as explained in yagcd. Then open the file, still MemoryCardA.raw or whatever it's called in the Memcard manager (found under the Misc menu). That should correct the checksums. You don't need to do anything else after that, don't click Copy for example. Just close the Memcard manager and use the savefile in the latest revision.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@667 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
John Peterson 2008-09-24 18:18:09 +00:00
parent d4711a605f
commit 284e3ec211
2 changed files with 18 additions and 0 deletions

View File

@ -221,6 +221,8 @@ void CMemcardManager::ReloadMemcard(const char *fileName, int card)
// TODO: add error checking and animate icons
memoryCard[card] = new GCMemcard(fileName);
memoryCard[0]->Save(); // save the changes we made in TestChecksums
m_MemcardList[card]->Hide();
m_MemcardList[card]->ClearAll();
m_MemcardList[card]->InsertColumn(COLUMN_BANNER, _T("Banner"));

View File

@ -525,10 +525,26 @@ u32 GCMemcard::TestChecksums()
if(BE16(dir.CheckSum1)!=csum1) results |= 2;
if(BE16(dir.CheckSum2)!=csum2) results |= 2;
// ------------------------------------------------------------------------------------------
// Save the checksums we just calculated
dir.CheckSum1[0]=u8(csum1>>8);
dir.CheckSum1[1]=u8(csum1);
dir.CheckSum2[0]=u8(csum2>>8);
dir.CheckSum2[1]=u8(csum2);
// ------------------------------------------------------------------------------------------
calc_checksumsBE((u16*)&dir_backup,0xFFE,&csum1,&csum2);
if(BE16(dir_backup.CheckSum1)!=csum1) results |= 4;
if(BE16(dir_backup.CheckSum2)!=csum2) results |= 4;
// ------------------------------------------------------------------------------------------
// Save the checksums we just calculated
dir_backup.CheckSum1[0]=u8(csum1>>8);
dir_backup.CheckSum1[1]=u8(csum1);
dir_backup.CheckSum2[0]=u8(csum2>>8);
dir_backup.CheckSum2[1]=u8(csum2);
// ------------------------------------------------------------------------------------------
calc_checksumsBE((u16*)(((u8*)&bat)+4),0xFFE,&csum1,&csum2);
if(BE16(bat.CheckSum1)!=csum1) results |= 8;
if(BE16(bat.CheckSum2)!=csum2) results |= 8;