diff options
Diffstat (limited to 'src/core/hle/shared_page.h')
| -rw-r--r-- | src/core/hle/shared_page.h | 69 |
1 files changed, 0 insertions, 69 deletions
diff --git a/src/core/hle/shared_page.h b/src/core/hle/shared_page.h deleted file mode 100644 index a58259888..000000000 --- a/src/core/hle/shared_page.h +++ /dev/null | |||
| @@ -1,69 +0,0 @@ | |||
| 1 | // Copyright 2015 Citra Emulator Project | ||
| 2 | // Licensed under GPLv2 or any later version | ||
| 3 | // Refer to the license.txt file included. | ||
| 4 | |||
| 5 | #pragma once | ||
| 6 | |||
| 7 | /** | ||
| 8 | * The shared page stores various runtime configuration settings. This memory page is | ||
| 9 | * read-only for user processes (there is a bit in the header that grants the process | ||
| 10 | * write access, according to 3dbrew; this is not emulated) | ||
| 11 | */ | ||
| 12 | |||
| 13 | #include "common/bit_field.h" | ||
| 14 | #include "common/common_funcs.h" | ||
| 15 | #include "common/common_types.h" | ||
| 16 | #include "common/swap.h" | ||
| 17 | #include "core/memory.h" | ||
| 18 | |||
| 19 | //////////////////////////////////////////////////////////////////////////////////////////////////// | ||
| 20 | |||
| 21 | namespace SharedPage { | ||
| 22 | |||
| 23 | // See http://3dbrew.org/wiki/Configuration_Memory#Shared_Memory_Page_For_ARM11_Processes | ||
| 24 | |||
| 25 | struct DateTime { | ||
| 26 | u64_le date_time; // 0 | ||
| 27 | u64_le update_tick; // 8 | ||
| 28 | u64_le tick_to_second_coefficient; // 10 | ||
| 29 | u64_le tick_offset; // 18 | ||
| 30 | }; | ||
| 31 | static_assert(sizeof(DateTime) == 0x20, "Datetime size is wrong"); | ||
| 32 | |||
| 33 | union BatteryState { | ||
| 34 | u8 raw; | ||
| 35 | BitField<0, 1, u8> is_adapter_connected; | ||
| 36 | BitField<1, 1, u8> is_charging; | ||
| 37 | BitField<2, 3, u8> charge_level; | ||
| 38 | }; | ||
| 39 | |||
| 40 | struct SharedPageDef { | ||
| 41 | // Most of these names are taken from the 3dbrew page linked above. | ||
| 42 | u32_le date_time_counter; // 0 | ||
| 43 | u8 running_hw; // 4 | ||
| 44 | /// "Microcontroller hardware info" | ||
| 45 | u8 mcu_hw_info; // 5 | ||
| 46 | INSERT_PADDING_BYTES(0x20 - 0x6); // 6 | ||
| 47 | DateTime date_time_0; // 20 | ||
| 48 | DateTime date_time_1; // 40 | ||
| 49 | u8 wifi_macaddr[6]; // 60 | ||
| 50 | u8 wifi_link_level; // 66 | ||
| 51 | u8 wifi_unknown2; // 67 | ||
| 52 | INSERT_PADDING_BYTES(0x80 - 0x68); // 68 | ||
| 53 | float_le sliderstate_3d; // 80 | ||
| 54 | u8 ledstate_3d; // 84 | ||
| 55 | BatteryState battery_state; // 85 | ||
| 56 | u8 unknown_value; // 86 | ||
| 57 | INSERT_PADDING_BYTES(0xA0 - 0x87); // 87 | ||
| 58 | u64_le menu_title_id; // A0 | ||
| 59 | u64_le active_menu_title_id; // A8 | ||
| 60 | INSERT_PADDING_BYTES(0x1000 - 0xB0); // B0 | ||
| 61 | }; | ||
| 62 | static_assert(sizeof(SharedPageDef) == Memory::SHARED_PAGE_SIZE, | ||
| 63 | "Shared page structure size is wrong"); | ||
| 64 | |||
| 65 | extern SharedPageDef shared_page; | ||
| 66 | |||
| 67 | void Init(); | ||
| 68 | |||
| 69 | } // namespace SharedPage | ||