From aee96e12c638853d57104d29349025ab85c14e85 Mon Sep 17 00:00:00 2001 From: LPFaint99 Date: Wed, 15 Dec 2010 21:23:42 +0000 Subject: [PATCH] Rename variable in WiiSaveCrypted for icc. Changes file dialog to show *.bin for wii save import instead of data.bin Move Sram dumps to Sram.cpp and change default FlashID Fixes issue 3711. Fixes issue 3042. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6588 8ced0084-cf51-0410-be5f-012b33b47a6e --- Source/Core/Core/Src/HW/EXI_DeviceIPL.cpp | 51 ------------------- Source/Core/Core/Src/HW/Sram.cpp | 50 ++++++++++++++++++ Source/Core/DolphinWX/Src/FrameTools.cpp | 7 +-- .../Src/MemoryCards/WiiSaveCrypted.cpp | 4 +- .../Src/MemoryCards/WiiSaveCrypted.h | 2 +- 5 files changed, 54 insertions(+), 60 deletions(-) diff --git a/Source/Core/Core/Src/HW/EXI_DeviceIPL.cpp b/Source/Core/Core/Src/HW/EXI_DeviceIPL.cpp index c95895d37d..9c708ef5c8 100644 --- a/Source/Core/Core/Src/HW/EXI_DeviceIPL.cpp +++ b/Source/Core/Core/Src/HW/EXI_DeviceIPL.cpp @@ -26,57 +26,6 @@ #include "FileUtil.h" #include "../OnFrame.h" -// english -SRAM sram_dump = {{ - 0x04, 0x6B, - 0xFB, 0x91, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0xFF, 0xFF, 0xFF, 0x40, - 0x05, - 0x00, - 0x00, - 0x2C, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0xD2, 0x2B, 0x29, 0xD5, 0xC7, 0xAA, 0x12, 0xCB, 0x21, 0x27, 0xD1, 0x53, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, - 0x86, - 0x00, - 0xFF, 0x4A, - 0x00, 0x00, - 0x00, 0x00 -}}; - -// german -SRAM sram_dump_german = {{ - 0x1F, 0x66, - 0xE0, 0x96, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x04, 0xEA, 0x19, 0x40, - 0x00, - 0x00, - 0x01, - 0x3C, - 0x12, 0xD5, 0xEA, 0xD3, 0x00, 0xFA, 0x2D, 0x33, 0x13, 0x41, 0x26, 0x03, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, - 0x00, 0x00, - 0x00, - 0x00, - 0x84, 0xFF, - 0x00, 0x00, - 0x00, 0x00 -}}; - - // We should provide an option to choose from the above, or figure out the checksum (the algo in yagcd seems wrong) // so that people can change default language. diff --git a/Source/Core/Core/Src/HW/Sram.cpp b/Source/Core/Core/Src/HW/Sram.cpp index eca7f30114..bdabecb00f 100644 --- a/Source/Core/Core/Src/HW/Sram.cpp +++ b/Source/Core/Core/Src/HW/Sram.cpp @@ -17,6 +17,55 @@ #include "Sram.h" #include "../ConfigManager.h" +// english +SRAM sram_dump = {{ + 0x04, 0x6B, + 0xFB, 0x91, + 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, + 0xFF, 0xFF, 0xFF, 0x40, + 0x05, + 0x00, + 0x00, + 0x2C, + 0x44, 0x4F, 0x4C, 0x50, 0x48, 0x49, 0x4E, 0x53, 0x4C, 0x4F, 0x54, 0x41, + 0x44, 0x4F, 0x4C, 0x50, 0x48, 0x49, 0x4E, 0x53, 0x4C, 0x4F, 0x54, 0x42, + 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, + 0x00, 0x00, + 0x00, 0x00, + 0x00, 0x00, + 0x00, + 0x00, + 0x6E, 0x6D, + 0x00, 0x00, + 0x00, 0x00 +}}; + +// german +SRAM sram_dump_german = {{ + 0x1F, 0x66, + 0xE0, 0x96, + 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, + 0x04, 0xEA, 0x19, 0x40, + 0x00, + 0x00, + 0x01, + 0x3C, + 0x12, 0xD5, 0xEA, 0xD3, 0x00, 0xFA, 0x2D, 0x33, 0x13, 0x41, 0x26, 0x03, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, + 0x00, 0x00, + 0x00, 0x00, + 0x00, 0x00, + 0x00, + 0x00, + 0x84, 0xFF, + 0x00, 0x00, + 0x00, 0x00 +}}; void initSRAM() { @@ -48,3 +97,4 @@ void SetCardFlashID(u8* buffer, u8 card_index) } g_SRAM.flashID_chksum[card_index] = csum^0xFF; } + diff --git a/Source/Core/DolphinWX/Src/FrameTools.cpp b/Source/Core/DolphinWX/Src/FrameTools.cpp index 229ac7df70..da724bb492 100644 --- a/Source/Core/DolphinWX/Src/FrameTools.cpp +++ b/Source/Core/DolphinWX/Src/FrameTools.cpp @@ -1138,12 +1138,7 @@ void CFrame::OnImportSave(wxCommandEvent& WXUNUSED (event)) { wxString path = wxFileSelector(_T("Select the save file"), wxEmptyString, wxEmptyString, wxEmptyString, - wxString::Format - ( - _T("Wii save files|data.bin|All files (%s)|%s"), - wxFileSelectorDefaultWildcardStr, - wxFileSelectorDefaultWildcardStr - ), + _T("Wii save files (*.bin)|*.bin"), wxFD_OPEN | wxFD_PREVIEW | wxFD_FILE_MUST_EXIST, this); diff --git a/Source/Core/DolphinWX/Src/MemoryCards/WiiSaveCrypted.cpp b/Source/Core/DolphinWX/Src/MemoryCards/WiiSaveCrypted.cpp index e81ae40e8b..e25dadb32f 100644 --- a/Source/Core/DolphinWX/Src/MemoryCards/WiiSaveCrypted.cpp +++ b/Source/Core/DolphinWX/Src/MemoryCards/WiiSaveCrypted.cpp @@ -491,7 +491,7 @@ void CWiiSaveCrypted::make_ec_cert(u8 *cert, u8 *sig, char *signer, char *name, ec_priv_to_pub(priv, cert + 0x108); } -bool CWiiSaveCrypted::getPaths(bool _export) +bool CWiiSaveCrypted::getPaths(bool forExport) { if (_saveGameTitle) { @@ -501,7 +501,7 @@ bool CWiiSaveCrypted::getPaths(bool _export) (u8)(_saveGameTitle >> 24) & 0xFF, (u8)(_saveGameTitle >> 16) & 0xFF, (u8)(_saveGameTitle >> 8) & 0xFF, (u8)_saveGameTitle & 0xFF); } - if (_export) + if (forExport) { if(!File::IsDirectory(pathSavedir)) { diff --git a/Source/Core/DolphinWX/Src/MemoryCards/WiiSaveCrypted.h b/Source/Core/DolphinWX/Src/MemoryCards/WiiSaveCrypted.h index e4d3934484..fbf40c4c50 100644 --- a/Source/Core/DolphinWX/Src/MemoryCards/WiiSaveCrypted.h +++ b/Source/Core/DolphinWX/Src/MemoryCards/WiiSaveCrypted.h @@ -42,7 +42,7 @@ public: void do_sig(); void make_ec_cert(u8 *cert, u8 *sig, char *signer, char *name, u8 *priv, u32 key_id); - bool getPaths(bool _export = false); + bool getPaths(bool forExport = false); void ScanForFiles(std::string savDir, std::vector&FilesList, u32 *_numFiles, u32 *_sizeFiles); private: