diff options
Diffstat (limited to 'src/core/hle/config_mem.h')
| -rw-r--r-- | src/core/hle/config_mem.h | 38 |
1 files changed, 35 insertions, 3 deletions
diff --git a/src/core/hle/config_mem.h b/src/core/hle/config_mem.h index cbb478fb3..9825a09e8 100644 --- a/src/core/hle/config_mem.h +++ b/src/core/hle/config_mem.h | |||
| @@ -9,17 +9,49 @@ | |||
| 9 | // bootrom. Because we're not emulating this, and essentially just "stubbing" the functionality, I'm | 9 | // bootrom. Because we're not emulating this, and essentially just "stubbing" the functionality, I'm |
| 10 | // putting this as a subset of HLE for now. | 10 | // putting this as a subset of HLE for now. |
| 11 | 11 | ||
| 12 | #include "common/common_funcs.h" | ||
| 12 | #include "common/common_types.h" | 13 | #include "common/common_types.h" |
| 14 | #include "common/swap.h" | ||
| 15 | |||
| 16 | #include "core/memory.h" | ||
| 13 | 17 | ||
| 14 | //////////////////////////////////////////////////////////////////////////////////////////////////// | 18 | //////////////////////////////////////////////////////////////////////////////////////////////////// |
| 15 | 19 | ||
| 16 | namespace ConfigMem { | 20 | namespace ConfigMem { |
| 17 | 21 | ||
| 18 | template <typename T> | 22 | struct ConfigMemDef { |
| 19 | void Read(T &var, const u32 addr); | 23 | u8 kernel_unk; // 0 |
| 24 | u8 kernel_version_rev; // 1 | ||
| 25 | u8 kernel_version_min; // 2 | ||
| 26 | u8 kernel_version_maj; // 3 | ||
| 27 | u32_le update_flag; // 4 | ||
| 28 | u64_le ns_tid; // 8 | ||
| 29 | u32_le sys_core_ver; // 10 | ||
| 30 | u8 unit_info; // 14 | ||
| 31 | u8 boot_firm; // 15 | ||
| 32 | u8 prev_firm; // 16 | ||
| 33 | INSERT_PADDING_BYTES(0x1); // 17 | ||
| 34 | u32_le ctr_sdk_ver; // 18 | ||
| 35 | INSERT_PADDING_BYTES(0x30 - 0x1C); // 1C | ||
| 36 | u32_le app_mem_type; // 30 | ||
| 37 | INSERT_PADDING_BYTES(0x40 - 0x34); // 34 | ||
| 38 | u32_le app_mem_alloc; // 40 | ||
| 39 | u32_le sys_mem_alloc; // 44 | ||
| 40 | u32_le base_mem_alloc; // 48 | ||
| 41 | INSERT_PADDING_BYTES(0x60 - 0x4C); // 4C | ||
| 42 | u8 firm_unk; // 60 | ||
| 43 | u8 firm_version_rev; // 61 | ||
| 44 | u8 firm_version_min; // 62 | ||
| 45 | u8 firm_version_maj; // 63 | ||
| 46 | u32_le firm_sys_core_ver; // 64 | ||
| 47 | u32_le firm_ctr_sdk_ver; // 68 | ||
| 48 | INSERT_PADDING_BYTES(0x1000 - 0x6C); // 6C | ||
| 49 | }; | ||
| 50 | static_assert(sizeof(ConfigMemDef) == Memory::CONFIG_MEMORY_SIZE, "Config Memory structure size is wrong"); | ||
| 51 | |||
| 52 | extern ConfigMemDef config_mem; | ||
| 20 | 53 | ||
| 21 | void Init(); | 54 | void Init(); |
| 22 | |||
| 23 | void Shutdown(); | 55 | void Shutdown(); |
| 24 | 56 | ||
| 25 | } // namespace | 57 | } // namespace |