Skip to content
Permalink
Browse files

GCMemcard: Use BigEndianValue for Header.m_sram_language.

  • Loading branch information...
AdmiralCurtiss committed Nov 18, 2018
1 parent 905a16e commit b3ce882109d9547449908be83806859dc3a88c60
Showing with 6 additions and 6 deletions.
  1. +6 −6 Source/Core/Core/HW/GCMemcard/GCMemcard.h
@@ -102,11 +102,11 @@ void calc_checksumsBE(const u16* buf, u32 length, u16* csum, u16* inv_csum);
struct Header // Offset Size Description
{
// Serial in libogc
u8 m_serial[12]; // 0x0000 12 ?
Common::BigEndianValue<u64> m_format_time; // 0x000c 8 Time of format (OSTime value)
u32 m_sram_bias; // 0x0014 4 SRAM bias at time of format
u32 m_sram_language; // 0x0018 4 SRAM language
u8 m_unknown_2[4]; // 0x001c 4 ? almost always 0
u8 m_serial[12]; // 0x0000 12 ?
Common::BigEndianValue<u64> m_format_time; // 0x000c 8 Time of format (OSTime value)
u32 m_sram_bias; // 0x0014 4 SRAM bias at time of format
Common::BigEndianValue<u32> m_sram_language; // 0x0018 4 SRAM language
u8 m_unknown_2[4]; // 0x001c 4 ? almost always 0
// end Serial in libogc
u8 m_device_id[2]; // 0x0020 2 0 if formated in slot A 1 if formated in slot B
u8 m_size_mb[2]; // 0x0022 2 Size of memcard in Mbits
@@ -148,7 +148,7 @@ struct Header // Offset Size Description
rand &= (u64)0x0000000000007fffULL;
}
m_sram_bias = g_SRAM.settings.rtc_bias;
m_sram_language = BE32(g_SRAM.settings.language);
m_sram_language = static_cast<u32>(g_SRAM.settings.language);
// TODO: determine the purpose of m_unknown_2
// 1 works for slot A, 0 works for both slot A and slot B
*(u32*)&m_unknown_2 = 0; // = _viReg[55]; static vu16* const _viReg = (u16*)0xCC002000;

0 comments on commit b3ce882

Please sign in to comment.
You can’t perform that action at this time.