diff options
| author | 2017-10-09 23:56:20 -0400 | |
|---|---|---|
| committer | 2017-10-09 23:56:20 -0400 | |
| commit | b1d5db1cf60344b6b081c9d03cb6ccc3264326cd (patch) | |
| tree | fde377c4ba3c0f92c032e6f5ec8627aae37270ef /src/core/hle/applets | |
| parent | loader: Various improvements for NSO/NRO loaders. (diff) | |
| parent | Merge pull request #2996 from MerryMage/split-travis (diff) | |
| download | yuzu-b1d5db1cf60344b6b081c9d03cb6ccc3264326cd.tar.gz yuzu-b1d5db1cf60344b6b081c9d03cb6ccc3264326cd.tar.xz yuzu-b1d5db1cf60344b6b081c9d03cb6ccc3264326cd.zip | |
Merge remote-tracking branch 'upstream/master' into nx
# Conflicts:
# src/core/CMakeLists.txt
# src/core/arm/dynarmic/arm_dynarmic.cpp
# src/core/arm/dyncom/arm_dyncom.cpp
# src/core/hle/kernel/process.cpp
# src/core/hle/kernel/thread.cpp
# src/core/hle/kernel/thread.h
# src/core/hle/kernel/vm_manager.cpp
# src/core/loader/3dsx.cpp
# src/core/loader/elf.cpp
# src/core/loader/ncch.cpp
# src/core/memory.cpp
# src/core/memory.h
# src/core/memory_setup.h
Diffstat (limited to 'src/core/hle/applets')
| -rw-r--r-- | src/core/hle/applets/erreula.cpp | 4 | ||||
| -rw-r--r-- | src/core/hle/applets/mii_selector.cpp | 10 | ||||
| -rw-r--r-- | src/core/hle/applets/mii_selector.h | 57 | ||||
| -rw-r--r-- | src/core/hle/applets/mint.cpp | 4 | ||||
| -rw-r--r-- | src/core/hle/applets/swkbd.cpp | 4 |
5 files changed, 37 insertions, 42 deletions
diff --git a/src/core/hle/applets/erreula.cpp b/src/core/hle/applets/erreula.cpp index 75d7fd9fc..518f371f5 100644 --- a/src/core/hle/applets/erreula.cpp +++ b/src/core/hle/applets/erreula.cpp | |||
| @@ -31,8 +31,8 @@ ResultCode ErrEula::ReceiveParameter(const Service::APT::MessageParameter& param | |||
| 31 | heap_memory = std::make_shared<std::vector<u8>>(capture_info.size); | 31 | heap_memory = std::make_shared<std::vector<u8>>(capture_info.size); |
| 32 | // Create a SharedMemory that directly points to this heap block. | 32 | // Create a SharedMemory that directly points to this heap block. |
| 33 | framebuffer_memory = Kernel::SharedMemory::CreateForApplet( | 33 | framebuffer_memory = Kernel::SharedMemory::CreateForApplet( |
| 34 | heap_memory, 0, heap_memory->size(), MemoryPermission::ReadWrite, | 34 | heap_memory, 0, capture_info.size, MemoryPermission::ReadWrite, MemoryPermission::ReadWrite, |
| 35 | MemoryPermission::ReadWrite, "ErrEula Memory"); | 35 | "ErrEula Memory"); |
| 36 | 36 | ||
| 37 | // Send the response message with the newly created SharedMemory | 37 | // Send the response message with the newly created SharedMemory |
| 38 | Service::APT::MessageParameter result; | 38 | Service::APT::MessageParameter result; |
diff --git a/src/core/hle/applets/mii_selector.cpp b/src/core/hle/applets/mii_selector.cpp index 89f08daa2..f225c23a5 100644 --- a/src/core/hle/applets/mii_selector.cpp +++ b/src/core/hle/applets/mii_selector.cpp | |||
| @@ -38,8 +38,8 @@ ResultCode MiiSelector::ReceiveParameter(const Service::APT::MessageParameter& p | |||
| 38 | heap_memory = std::make_shared<std::vector<u8>>(capture_info.size); | 38 | heap_memory = std::make_shared<std::vector<u8>>(capture_info.size); |
| 39 | // Create a SharedMemory that directly points to this heap block. | 39 | // Create a SharedMemory that directly points to this heap block. |
| 40 | framebuffer_memory = Kernel::SharedMemory::CreateForApplet( | 40 | framebuffer_memory = Kernel::SharedMemory::CreateForApplet( |
| 41 | heap_memory, 0, heap_memory->size(), MemoryPermission::ReadWrite, | 41 | heap_memory, 0, capture_info.size, MemoryPermission::ReadWrite, MemoryPermission::ReadWrite, |
| 42 | MemoryPermission::ReadWrite, "MiiSelector Memory"); | 42 | "MiiSelector Memory"); |
| 43 | 43 | ||
| 44 | // Send the response message with the newly created SharedMemory | 44 | // Send the response message with the newly created SharedMemory |
| 45 | Service::APT::MessageParameter result; | 45 | Service::APT::MessageParameter result; |
| @@ -66,7 +66,7 @@ ResultCode MiiSelector::StartImpl(const Service::APT::AppletStartupParameter& pa | |||
| 66 | // continue. | 66 | // continue. |
| 67 | MiiResult result; | 67 | MiiResult result; |
| 68 | memset(&result, 0, sizeof(result)); | 68 | memset(&result, 0, sizeof(result)); |
| 69 | result.result_code = 0; | 69 | result.return_code = 0; |
| 70 | 70 | ||
| 71 | // Let the application know that we're closing | 71 | // Let the application know that we're closing |
| 72 | Service::APT::MessageParameter message; | 72 | Service::APT::MessageParameter message; |
| @@ -82,5 +82,5 @@ ResultCode MiiSelector::StartImpl(const Service::APT::AppletStartupParameter& pa | |||
| 82 | } | 82 | } |
| 83 | 83 | ||
| 84 | void MiiSelector::Update() {} | 84 | void MiiSelector::Update() {} |
| 85 | } | 85 | } // namespace Applets |
| 86 | } // namespace | 86 | } // namespace HLE |
diff --git a/src/core/hle/applets/mii_selector.h b/src/core/hle/applets/mii_selector.h index ec00e29d2..136ce8948 100644 --- a/src/core/hle/applets/mii_selector.h +++ b/src/core/hle/applets/mii_selector.h | |||
| @@ -16,51 +16,46 @@ namespace HLE { | |||
| 16 | namespace Applets { | 16 | namespace Applets { |
| 17 | 17 | ||
| 18 | struct MiiConfig { | 18 | struct MiiConfig { |
| 19 | u8 unk_000; | 19 | u8 enable_cancel_button; |
| 20 | u8 unk_001; | 20 | u8 enable_guest_mii; |
| 21 | u8 unk_002; | 21 | u8 show_on_top_screen; |
| 22 | u8 unk_003; | 22 | INSERT_PADDING_BYTES(5); |
| 23 | u8 unk_004; | 23 | u16 title[0x40]; |
| 24 | INSERT_PADDING_BYTES(4); | ||
| 25 | u8 show_guest_miis; | ||
| 24 | INSERT_PADDING_BYTES(3); | 26 | INSERT_PADDING_BYTES(3); |
| 25 | u16 unk_008; | 27 | u32 initially_selected_mii_index; |
| 26 | INSERT_PADDING_BYTES(0x82); | 28 | u8 guest_mii_whitelist[6]; |
| 27 | u8 unk_08C; | 29 | u8 user_mii_whitelist[0x64]; |
| 28 | INSERT_PADDING_BYTES(3); | ||
| 29 | u16 unk_090; | ||
| 30 | INSERT_PADDING_BYTES(2); | 30 | INSERT_PADDING_BYTES(2); |
| 31 | u32 unk_094; | 31 | u32 magic_value; |
| 32 | u16 unk_098; | ||
| 33 | u8 unk_09A[0x64]; | ||
| 34 | u8 unk_0FE; | ||
| 35 | u8 unk_0FF; | ||
| 36 | u32 unk_100; | ||
| 37 | }; | 32 | }; |
| 38 | |||
| 39 | static_assert(sizeof(MiiConfig) == 0x104, "MiiConfig structure has incorrect size"); | 33 | static_assert(sizeof(MiiConfig) == 0x104, "MiiConfig structure has incorrect size"); |
| 40 | #define ASSERT_REG_POSITION(field_name, position) \ | 34 | #define ASSERT_REG_POSITION(field_name, position) \ |
| 41 | static_assert(offsetof(MiiConfig, field_name) == position, \ | 35 | static_assert(offsetof(MiiConfig, field_name) == position, \ |
| 42 | "Field " #field_name " has invalid position") | 36 | "Field " #field_name " has invalid position") |
| 43 | ASSERT_REG_POSITION(unk_008, 0x08); | 37 | ASSERT_REG_POSITION(title, 0x08); |
| 44 | ASSERT_REG_POSITION(unk_08C, 0x8C); | 38 | ASSERT_REG_POSITION(show_guest_miis, 0x8C); |
| 45 | ASSERT_REG_POSITION(unk_090, 0x90); | 39 | ASSERT_REG_POSITION(initially_selected_mii_index, 0x90); |
| 46 | ASSERT_REG_POSITION(unk_094, 0x94); | 40 | ASSERT_REG_POSITION(guest_mii_whitelist, 0x94); |
| 47 | ASSERT_REG_POSITION(unk_0FE, 0xFE); | ||
| 48 | #undef ASSERT_REG_POSITION | 41 | #undef ASSERT_REG_POSITION |
| 49 | 42 | ||
| 50 | struct MiiResult { | 43 | struct MiiResult { |
| 51 | u32 result_code; | 44 | u32 return_code; |
| 52 | u8 unk_04; | 45 | u32 is_guest_mii_selected; |
| 53 | INSERT_PADDING_BYTES(7); | 46 | u32 selected_guest_mii_index; |
| 54 | u8 unk_0C[0x60]; | 47 | // TODO(mailwl): expand to Mii Format structure: https://www.3dbrew.org/wiki/Mii |
| 55 | u8 unk_6C[0x16]; | 48 | u8 selected_mii_data[0x5C]; |
| 56 | INSERT_PADDING_BYTES(2); | 49 | INSERT_PADDING_BYTES(2); |
| 50 | u16 mii_data_checksum; | ||
| 51 | u16 guest_mii_name[0xC]; | ||
| 57 | }; | 52 | }; |
| 58 | static_assert(sizeof(MiiResult) == 0x84, "MiiResult structure has incorrect size"); | 53 | static_assert(sizeof(MiiResult) == 0x84, "MiiResult structure has incorrect size"); |
| 59 | #define ASSERT_REG_POSITION(field_name, position) \ | 54 | #define ASSERT_REG_POSITION(field_name, position) \ |
| 60 | static_assert(offsetof(MiiResult, field_name) == position, \ | 55 | static_assert(offsetof(MiiResult, field_name) == position, \ |
| 61 | "Field " #field_name " has invalid position") | 56 | "Field " #field_name " has invalid position") |
| 62 | ASSERT_REG_POSITION(unk_0C, 0x0C); | 57 | ASSERT_REG_POSITION(selected_mii_data, 0x0C); |
| 63 | ASSERT_REG_POSITION(unk_6C, 0x6C); | 58 | ASSERT_REG_POSITION(guest_mii_name, 0x6C); |
| 64 | #undef ASSERT_REG_POSITION | 59 | #undef ASSERT_REG_POSITION |
| 65 | 60 | ||
| 66 | class MiiSelector final : public Applet { | 61 | class MiiSelector final : public Applet { |
| @@ -79,5 +74,5 @@ private: | |||
| 79 | 74 | ||
| 80 | MiiConfig config; | 75 | MiiConfig config; |
| 81 | }; | 76 | }; |
| 82 | } | 77 | } // namespace Applets |
| 83 | } // namespace | 78 | } // namespace HLE |
diff --git a/src/core/hle/applets/mint.cpp b/src/core/hle/applets/mint.cpp index 31a79ea17..50d79190b 100644 --- a/src/core/hle/applets/mint.cpp +++ b/src/core/hle/applets/mint.cpp | |||
| @@ -31,8 +31,8 @@ ResultCode Mint::ReceiveParameter(const Service::APT::MessageParameter& paramete | |||
| 31 | heap_memory = std::make_shared<std::vector<u8>>(capture_info.size); | 31 | heap_memory = std::make_shared<std::vector<u8>>(capture_info.size); |
| 32 | // Create a SharedMemory that directly points to this heap block. | 32 | // Create a SharedMemory that directly points to this heap block. |
| 33 | framebuffer_memory = Kernel::SharedMemory::CreateForApplet( | 33 | framebuffer_memory = Kernel::SharedMemory::CreateForApplet( |
| 34 | heap_memory, 0, heap_memory->size(), MemoryPermission::ReadWrite, | 34 | heap_memory, 0, capture_info.size, MemoryPermission::ReadWrite, MemoryPermission::ReadWrite, |
| 35 | MemoryPermission::ReadWrite, "Mint Memory"); | 35 | "Mint Memory"); |
| 36 | 36 | ||
| 37 | // Send the response message with the newly created SharedMemory | 37 | // Send the response message with the newly created SharedMemory |
| 38 | Service::APT::MessageParameter result; | 38 | Service::APT::MessageParameter result; |
diff --git a/src/core/hle/applets/swkbd.cpp b/src/core/hle/applets/swkbd.cpp index fdf8807b0..0bc471a3a 100644 --- a/src/core/hle/applets/swkbd.cpp +++ b/src/core/hle/applets/swkbd.cpp | |||
| @@ -41,8 +41,8 @@ ResultCode SoftwareKeyboard::ReceiveParameter(Service::APT::MessageParameter con | |||
| 41 | heap_memory = std::make_shared<std::vector<u8>>(capture_info.size); | 41 | heap_memory = std::make_shared<std::vector<u8>>(capture_info.size); |
| 42 | // Create a SharedMemory that directly points to this heap block. | 42 | // Create a SharedMemory that directly points to this heap block. |
| 43 | framebuffer_memory = Kernel::SharedMemory::CreateForApplet( | 43 | framebuffer_memory = Kernel::SharedMemory::CreateForApplet( |
| 44 | heap_memory, 0, heap_memory->size(), MemoryPermission::ReadWrite, | 44 | heap_memory, 0, capture_info.size, MemoryPermission::ReadWrite, MemoryPermission::ReadWrite, |
| 45 | MemoryPermission::ReadWrite, "SoftwareKeyboard Memory"); | 45 | "SoftwareKeyboard Memory"); |
| 46 | 46 | ||
| 47 | // Send the response message with the newly created SharedMemory | 47 | // Send the response message with the newly created SharedMemory |
| 48 | Service::APT::MessageParameter result; | 48 | Service::APT::MessageParameter result; |