Skip to content
Permalink
Browse files

GCMemcard: Use BigEndianValue for Header.m_encoding.

  • Loading branch information...
AdmiralCurtiss committed Nov 18, 2018
1 parent 8eabcbf commit 256d336219c336a66876dad648156c18ced0119e
Showing with 8 additions and 8 deletions.
  1. +8 −8 Source/Core/Core/HW/GCMemcard/GCMemcard.h
@@ -110,13 +110,13 @@ struct Header // Offset Size Description
// end Serial in libogc
Common::BigEndianValue<u16>
m_device_id; // 0x0020 2 0 if formated in slot A 1 if formated in slot B
Common::BigEndianValue<u16> m_size_mb; // 0x0022 2 Size of memcard in Mbits
u16 m_encoding; // 0x0024 2 Encoding (Windows-1252 or Shift JIS)
u8 m_unused_1[468]; // 0x0026 468 Unused (0xff)
u16 m_update_counter; // 0x01fa 2 Update Counter (?, probably unused)
u16 m_checksum; // 0x01fc 2 Additive Checksum
u16 m_checksum_inv; // 0x01fe 2 Inverse Checksum
u8 m_unused_2[7680]; // 0x0200 0x1e00 Unused (0xff)
Common::BigEndianValue<u16> m_size_mb; // 0x0022 2 Size of memcard in Mbits
Common::BigEndianValue<u16> m_encoding; // 0x0024 2 Encoding (Windows-1252 or Shift JIS)
u8 m_unused_1[468]; // 0x0026 468 Unused (0xff)
u16 m_update_counter; // 0x01fa 2 Update Counter (?, probably unused)
u16 m_checksum; // 0x01fc 2 Additive Checksum
u16 m_checksum_inv; // 0x01fe 2 Inverse Checksum
u8 m_unused_2[7680]; // 0x0200 0x1e00 Unused (0xff)

void CARD_GetSerialNo(u32* serial1, u32* serial2) const
{
@@ -138,7 +138,7 @@ struct Header // Offset Size Description
{
memset(this, 0xFF, BLOCK_SIZE);
m_size_mb = sizeMb;
m_encoding = BE16(shift_jis ? 1 : 0);
m_encoding = shift_jis ? 1 : 0;
u64 rand = Common::Timer::GetLocalTimeSinceJan1970() - ExpansionInterface::CEXIIPL::GC_EPOCH;
m_format_time = rand;
for (int i = 0; i < 12; i++)

0 comments on commit 256d336

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