erpt: add remaining SubmitFsInfo helpers
This commit is contained in:
30
libraries/libstratosphere/include/stratosphere/gc/gc.hpp
Normal file
30
libraries/libstratosphere/include/stratosphere/gc/gc.hpp
Normal file
@@ -0,0 +1,30 @@
|
||||
/*
|
||||
* Copyright (c) Atmosphère-NX
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms and conditions of the GNU General Public License,
|
||||
* version 2, as published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#pragma once
|
||||
#include <vapours.hpp>
|
||||
#include <stratosphere/gc/impl/gc_types.hpp>
|
||||
|
||||
namespace ams::gc {
|
||||
|
||||
struct GameCardIdSet {
|
||||
gc::impl::CardId1 id1;
|
||||
gc::impl::CardId2 id2;
|
||||
gc::impl::CardId3 id3;
|
||||
};
|
||||
static_assert(util::is_pod<GameCardIdSet>::value);
|
||||
static_assert(sizeof(GameCardIdSet) == 0xC);
|
||||
|
||||
}
|
||||
@@ -76,6 +76,11 @@ namespace ams::gc::impl {
|
||||
static_assert(util::is_pod<CardHeaderEncryptedData>::value);
|
||||
static_assert(sizeof(CardHeaderEncryptedData) == 0x70);
|
||||
|
||||
enum MakerCodeForCardId1 : u8 {
|
||||
MakerCodeForCardId1_MegaChips = 0xC2,
|
||||
MakerCodeForCardId1_Lapis = 0xAE,
|
||||
};
|
||||
|
||||
enum MemoryCapacity : u8 {
|
||||
MemoryCapacity_1GB = 0xFA,
|
||||
MemoryCapacity_2GB = 0xF8,
|
||||
@@ -85,6 +90,33 @@ namespace ams::gc::impl {
|
||||
MemoryCapacity_32GB = 0xE2,
|
||||
};
|
||||
|
||||
enum MemoryType : u8 {
|
||||
MemoryType_T1RomFast = 0x01,
|
||||
MemoryType_T2RomFast = 0x02,
|
||||
MemoryType_T1NandFast = 0x09,
|
||||
MemoryType_T2NandFast = 0x0A,
|
||||
MemoryType_T1RomLate = 0x21,
|
||||
MemoryType_T2RomLate = 0x22,
|
||||
MemoryType_T1NandLate = 0x29,
|
||||
MemoryType_T2NandLate = 0x2A,
|
||||
};
|
||||
|
||||
enum CardSecurityNumber : u8 {
|
||||
CardSecurityNumber_0 = 0x00,
|
||||
CardSecurityNumber_1 = 0x01,
|
||||
CardSecurityNumber_2 = 0x02,
|
||||
CardSecurityNumber_3 = 0x03,
|
||||
CardSecurityNumber_4 = 0x04,
|
||||
};
|
||||
|
||||
enum CardType : u8 {
|
||||
CardType_Rom = 0x00,
|
||||
CardType_Writable_Dev_T1 = 0x01,
|
||||
CardType_Writable_Prod_T1 = 0x02,
|
||||
CardType_Writable_Dev_T2 = 0x03,
|
||||
CardType_Writable_Prod_T2 = 0x04,
|
||||
};
|
||||
|
||||
enum AccessControl1ClockRate : u32 {
|
||||
AccessControl1ClockRate_25MHz = 0x00A10011,
|
||||
AccessControl1ClockRate_50MHz = 0x00A10010,
|
||||
@@ -95,6 +127,23 @@ namespace ams::gc::impl {
|
||||
SelSec_T2 = 2,
|
||||
};
|
||||
|
||||
struct CardId1 {
|
||||
MakerCodeForCardId1 maker_code;
|
||||
MemoryCapacity memory_capacity;
|
||||
u8 reserved;
|
||||
MemoryType memory_type;
|
||||
};
|
||||
|
||||
struct CardId2 {
|
||||
CardSecurityNumber card_security_number;
|
||||
CardType card_type;
|
||||
u8 reserved[2];
|
||||
};
|
||||
|
||||
struct CardId3 {
|
||||
u8 reserved[4];
|
||||
};
|
||||
|
||||
struct CardHeader {
|
||||
static constexpr u32 Magic = util::FourCC<'H','E','A','D'>::Code;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user