2018-04-21 09:20:37 +00:00
|
|
|
#pragma once
|
|
|
|
#include <fnd/types.h>
|
2018-06-03 07:41:56 +00:00
|
|
|
#include <nx/macro.h>
|
2018-04-21 09:20:37 +00:00
|
|
|
|
|
|
|
namespace nx
|
|
|
|
{
|
|
|
|
namespace aci
|
|
|
|
{
|
2018-06-03 07:41:56 +00:00
|
|
|
static const uint32_t kAciStructSig = _MAKE_STRUCT_SIGNATURE("ACI0");
|
|
|
|
static const uint32_t kAciDescStructSig = _MAKE_STRUCT_SIGNATURE("ACID");
|
2018-04-21 09:20:37 +00:00
|
|
|
static const size_t kAciAlignSize = 0x10;
|
2018-04-27 16:13:35 +00:00
|
|
|
|
|
|
|
enum Flags
|
|
|
|
{
|
|
|
|
FLAG_PRODUCTION,
|
|
|
|
FLAG_UNQUALIFIED_APPROVAL
|
|
|
|
};
|
2018-04-21 09:20:37 +00:00
|
|
|
}
|
|
|
|
#pragma pack(push,1)
|
|
|
|
struct sAciHeader
|
|
|
|
{
|
2018-06-03 07:41:56 +00:00
|
|
|
le_uint32_t signature;
|
2018-04-27 16:13:35 +00:00
|
|
|
le_uint32_t size; // includes prefacing signature, set only in ACID made by SDK (it enables easy resigning)
|
2018-04-21 09:20:37 +00:00
|
|
|
byte_t reserved_0[4];
|
2018-04-27 16:13:35 +00:00
|
|
|
le_uint32_t flags; // set in ACID only
|
|
|
|
union uProgramIdInfo
|
|
|
|
{
|
|
|
|
struct sRestrictProgramId
|
|
|
|
{
|
|
|
|
le_uint64_t min;
|
|
|
|
le_uint64_t max;
|
|
|
|
} program_id_restrict;
|
|
|
|
le_uint64_t program_id;
|
|
|
|
} program_id_info;
|
2018-04-21 09:20:37 +00:00
|
|
|
struct sAciSection
|
|
|
|
{
|
2018-04-27 16:13:35 +00:00
|
|
|
le_uint32_t offset; // aligned by 0x10 from the last one
|
|
|
|
le_uint32_t size;
|
|
|
|
} fac, sac, kc;
|
2018-04-21 09:20:37 +00:00
|
|
|
};
|
|
|
|
#pragma pack(pop)
|
|
|
|
}
|