summaryrefslogtreecommitdiff
path: root/src/core/hle/config_mem.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/hle/config_mem.h')
-rw-r--r--src/core/hle/config_mem.h38
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
16namespace ConfigMem { 20namespace ConfigMem {
17 21
18template <typename T> 22struct ConfigMemDef {
19void 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};
50static_assert(sizeof(ConfigMemDef) == Memory::CONFIG_MEMORY_SIZE, "Config Memory structure size is wrong");
51
52extern ConfigMemDef config_mem;
20 53
21void Init(); 54void Init();
22
23void Shutdown(); 55void Shutdown();
24 56
25} // namespace 57} // namespace