Merge pull request #8895 from sepalani/card
GCMemcard: Rename unknown field to m_dtv_status
This commit is contained in:
commit
7b9a464c93
|
@ -1567,11 +1567,9 @@ void InitializeHeaderData(HeaderData* data, const CardFlashId& flash_id, u16 siz
|
||||||
}
|
}
|
||||||
data->m_sram_bias = rtc_bias;
|
data->m_sram_bias = rtc_bias;
|
||||||
data->m_sram_language = sram_language;
|
data->m_sram_language = sram_language;
|
||||||
// TODO: determine the purpose of m_unknown_2
|
// TODO: determine the purpose of m_dtv_status
|
||||||
// 1 works for slot A, 0 works for both slot A and slot B
|
// 1 works for slot A, 0 works for both slot A and slot B
|
||||||
std::memset(
|
data->m_dtv_status = 0;
|
||||||
data->m_unknown_2.data(), 0,
|
|
||||||
data->m_unknown_2.size()); // = _viReg[55]; static vu16* const _viReg = (u16*)0xCC002000;
|
|
||||||
data->m_device_id = 0;
|
data->m_device_id = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -175,7 +175,7 @@ static_assert(std::is_trivially_copyable_v<GCMBlock>);
|
||||||
struct HeaderData
|
struct HeaderData
|
||||||
{
|
{
|
||||||
// NOTE: libogc refers to 'Serial' as the first 0x20 bytes of the header,
|
// NOTE: libogc refers to 'Serial' as the first 0x20 bytes of the header,
|
||||||
// so the data from m_serial until m_unknown_2 (inclusive)
|
// so the data from m_serial until m_dtv_status (inclusive)
|
||||||
|
|
||||||
// 12 bytes at 0x0000
|
// 12 bytes at 0x0000
|
||||||
std::array<u8, 12> m_serial;
|
std::array<u8, 12> m_serial;
|
||||||
|
@ -189,8 +189,8 @@ struct HeaderData
|
||||||
// 4 bytes at 0x0018: SRAM language
|
// 4 bytes at 0x0018: SRAM language
|
||||||
Common::BigEndianValue<u32> m_sram_language;
|
Common::BigEndianValue<u32> m_sram_language;
|
||||||
|
|
||||||
// 4 bytes at 0x001c: ? almost always 0
|
// 4 bytes at 0x001c: VI DTV status register value (u16 from 0xCC00206E)
|
||||||
std::array<u8, 4> m_unknown_2;
|
u32 m_dtv_status;
|
||||||
|
|
||||||
// 2 bytes at 0x0020: 0 if formated in slot A, 1 if formated in slot B
|
// 2 bytes at 0x0020: 0 if formated in slot A, 1 if formated in slot B
|
||||||
Common::BigEndianValue<u16> m_device_id;
|
Common::BigEndianValue<u16> m_device_id;
|
||||||
|
|
Loading…
Reference in New Issue