diff options
Diffstat (limited to 'src/core')
| -rw-r--r-- | src/core/gdbstub/gdbstub.cpp | 5 | ||||
| -rw-r--r-- | src/core/hle/service/boss/boss.cpp | 4 | ||||
| -rw-r--r-- | src/core/hle/service/cfg/cfg.cpp | 1 | ||||
| -rw-r--r-- | src/core/hle/service/mic_u.cpp | 5 | ||||
| -rw-r--r-- | src/core/hle/service/soc_u.cpp | 4 | ||||
| -rw-r--r-- | src/core/loader/ncch.cpp | 2 | ||||
| -rw-r--r-- | src/core/loader/ncch.h | 2 |
7 files changed, 8 insertions, 15 deletions
diff --git a/src/core/gdbstub/gdbstub.cpp b/src/core/gdbstub/gdbstub.cpp index d88e25073..5cf45ada5 100644 --- a/src/core/gdbstub/gdbstub.cpp +++ b/src/core/gdbstub/gdbstub.cpp | |||
| @@ -57,7 +57,6 @@ const u32 SIGTERM = 15; | |||
| 57 | const u32 MSG_WAITALL = 8; | 57 | const u32 MSG_WAITALL = 8; |
| 58 | #endif | 58 | #endif |
| 59 | 59 | ||
| 60 | const u32 R0_REGISTER = 0; | ||
| 61 | const u32 R15_REGISTER = 15; | 60 | const u32 R15_REGISTER = 15; |
| 62 | const u32 CPSR_REGISTER = 25; | 61 | const u32 CPSR_REGISTER = 25; |
| 63 | const u32 FPSCR_REGISTER = 58; | 62 | const u32 FPSCR_REGISTER = 58; |
| @@ -816,10 +815,6 @@ static void RemoveBreakpoint() { | |||
| 816 | auto addr_pos = std::find(start_offset, command_buffer + command_length, ','); | 815 | auto addr_pos = std::find(start_offset, command_buffer + command_length, ','); |
| 817 | PAddr addr = HexToInt(start_offset, static_cast<u32>(addr_pos - start_offset)); | 816 | PAddr addr = HexToInt(start_offset, static_cast<u32>(addr_pos - start_offset)); |
| 818 | 817 | ||
| 819 | start_offset = addr_pos + 1; | ||
| 820 | u32 len = | ||
| 821 | HexToInt(start_offset, static_cast<u32>((command_buffer + command_length) - start_offset)); | ||
| 822 | |||
| 823 | if (type == BreakpointType::Access) { | 818 | if (type == BreakpointType::Access) { |
| 824 | // Access is made up of Read and Write types, so add both breakpoints | 819 | // Access is made up of Read and Write types, so add both breakpoints |
| 825 | type = BreakpointType::Read; | 820 | type = BreakpointType::Read; |
diff --git a/src/core/hle/service/boss/boss.cpp b/src/core/hle/service/boss/boss.cpp index 6ab16ccd5..e0de037f8 100644 --- a/src/core/hle/service/boss/boss.cpp +++ b/src/core/hle/service/boss/boss.cpp | |||
| @@ -2,6 +2,7 @@ | |||
| 2 | // Licensed under GPLv2 or any later version | 2 | // Licensed under GPLv2 or any later version |
| 3 | // Refer to the license.txt file included. | 3 | // Refer to the license.txt file included. |
| 4 | 4 | ||
| 5 | #include <cinttypes> | ||
| 5 | #include "core/hle/service/boss/boss.h" | 6 | #include "core/hle/service/boss/boss.h" |
| 6 | #include "core/hle/service/boss/boss_p.h" | 7 | #include "core/hle/service/boss/boss_p.h" |
| 7 | #include "core/hle/service/boss/boss_u.h" | 8 | #include "core/hle/service/boss/boss_u.h" |
| @@ -33,7 +34,8 @@ void InitializeSession(Service::Interface* self) { | |||
| 33 | cmd_buff[0] = IPC::MakeHeader(0x1, 0x1, 0); | 34 | cmd_buff[0] = IPC::MakeHeader(0x1, 0x1, 0); |
| 34 | cmd_buff[1] = RESULT_SUCCESS.raw; | 35 | cmd_buff[1] = RESULT_SUCCESS.raw; |
| 35 | 36 | ||
| 36 | LOG_WARNING(Service_BOSS, "(STUBBED) unk_param=0x%016X, translation=0x%08X, unk_param4=0x%08X", | 37 | LOG_WARNING(Service_BOSS, |
| 38 | "(STUBBED) unk_param=0x%016" PRIX64 ", translation=0x%08X, unk_param4=0x%08X", | ||
| 37 | unk_param, translation, unk_param4); | 39 | unk_param, translation, unk_param4); |
| 38 | } | 40 | } |
| 39 | 41 | ||
diff --git a/src/core/hle/service/cfg/cfg.cpp b/src/core/hle/service/cfg/cfg.cpp index 0bf59eb76..59dd6d1cd 100644 --- a/src/core/hle/service/cfg/cfg.cpp +++ b/src/core/hle/service/cfg/cfg.cpp | |||
| @@ -84,7 +84,6 @@ struct ConsoleCountryInfo { | |||
| 84 | static_assert(sizeof(ConsoleCountryInfo) == 4, "ConsoleCountryInfo must be exactly 4 bytes"); | 84 | static_assert(sizeof(ConsoleCountryInfo) == 4, "ConsoleCountryInfo must be exactly 4 bytes"); |
| 85 | } | 85 | } |
| 86 | 86 | ||
| 87 | static const u64 CFG_SAVE_ID = 0x00010017; | ||
| 88 | static const u64 CONSOLE_UNIQUE_ID = 0xDEADC0DE; | 87 | static const u64 CONSOLE_UNIQUE_ID = 0xDEADC0DE; |
| 89 | static const ConsoleModelInfo CONSOLE_MODEL = {NINTENDO_3DS_XL, {0, 0, 0}}; | 88 | static const ConsoleModelInfo CONSOLE_MODEL = {NINTENDO_3DS_XL, {0, 0, 0}}; |
| 90 | static const u8 CONSOLE_LANGUAGE = LANGUAGE_EN; | 89 | static const u8 CONSOLE_LANGUAGE = LANGUAGE_EN; |
diff --git a/src/core/hle/service/mic_u.cpp b/src/core/hle/service/mic_u.cpp index 4f1dd2fce..c62f8afc6 100644 --- a/src/core/hle/service/mic_u.cpp +++ b/src/core/hle/service/mic_u.cpp | |||
| @@ -99,7 +99,8 @@ static void StartSampling(Interface* self) { | |||
| 99 | is_sampling = true; | 99 | is_sampling = true; |
| 100 | LOG_WARNING(Service_MIC, "(STUBBED) called, encoding=%u, sample_rate=%u, " | 100 | LOG_WARNING(Service_MIC, "(STUBBED) called, encoding=%u, sample_rate=%u, " |
| 101 | "audio_buffer_offset=%d, audio_buffer_size=%u, audio_buffer_loop=%u", | 101 | "audio_buffer_offset=%d, audio_buffer_size=%u, audio_buffer_loop=%u", |
| 102 | encoding, sample_rate, audio_buffer_offset, audio_buffer_size, audio_buffer_loop); | 102 | static_cast<u32>(encoding), static_cast<u32>(sample_rate), audio_buffer_offset, |
| 103 | audio_buffer_size, audio_buffer_loop); | ||
| 103 | } | 104 | } |
| 104 | 105 | ||
| 105 | /** | 106 | /** |
| @@ -114,7 +115,7 @@ static void AdjustSampling(Interface* self) { | |||
| 114 | u32* cmd_buff = Kernel::GetCommandBuffer(); | 115 | u32* cmd_buff = Kernel::GetCommandBuffer(); |
| 115 | sample_rate = static_cast<SampleRate>(cmd_buff[1] & 0xFF); | 116 | sample_rate = static_cast<SampleRate>(cmd_buff[1] & 0xFF); |
| 116 | cmd_buff[1] = RESULT_SUCCESS.raw; // No error | 117 | cmd_buff[1] = RESULT_SUCCESS.raw; // No error |
| 117 | LOG_WARNING(Service_MIC, "(STUBBED) called, sample_rate=%u", sample_rate); | 118 | LOG_WARNING(Service_MIC, "(STUBBED) called, sample_rate=%u", static_cast<u32>(sample_rate)); |
| 118 | } | 119 | } |
| 119 | 120 | ||
| 120 | /** | 121 | /** |
diff --git a/src/core/hle/service/soc_u.cpp b/src/core/hle/service/soc_u.cpp index c3918cdd0..dcc5c3c90 100644 --- a/src/core/hle/service/soc_u.cpp +++ b/src/core/hle/service/soc_u.cpp | |||
| @@ -603,7 +603,6 @@ static void RecvFrom(Interface* self) { | |||
| 603 | u32 socket_handle = cmd_buffer[1]; | 603 | u32 socket_handle = cmd_buffer[1]; |
| 604 | u32 len = cmd_buffer[2]; | 604 | u32 len = cmd_buffer[2]; |
| 605 | u32 flags = cmd_buffer[3]; | 605 | u32 flags = cmd_buffer[3]; |
| 606 | socklen_t addr_len = static_cast<socklen_t>(cmd_buffer[4]); | ||
| 607 | 606 | ||
| 608 | struct { | 607 | struct { |
| 609 | u32 output_buffer_descriptor; | 608 | u32 output_buffer_descriptor; |
| @@ -693,7 +692,6 @@ static void Poll(Interface* self) { | |||
| 693 | static void GetSockName(Interface* self) { | 692 | static void GetSockName(Interface* self) { |
| 694 | u32* cmd_buffer = Kernel::GetCommandBuffer(); | 693 | u32* cmd_buffer = Kernel::GetCommandBuffer(); |
| 695 | u32 socket_handle = cmd_buffer[1]; | 694 | u32 socket_handle = cmd_buffer[1]; |
| 696 | socklen_t ctr_len = cmd_buffer[2]; | ||
| 697 | 695 | ||
| 698 | // Memory address of the ctr_dest_addr structure | 696 | // Memory address of the ctr_dest_addr structure |
| 699 | VAddr ctr_dest_addr_addr = cmd_buffer[0x104 >> 2]; | 697 | VAddr ctr_dest_addr_addr = cmd_buffer[0x104 >> 2]; |
| @@ -734,7 +732,6 @@ static void Shutdown(Interface* self) { | |||
| 734 | static void GetPeerName(Interface* self) { | 732 | static void GetPeerName(Interface* self) { |
| 735 | u32* cmd_buffer = Kernel::GetCommandBuffer(); | 733 | u32* cmd_buffer = Kernel::GetCommandBuffer(); |
| 736 | u32 socket_handle = cmd_buffer[1]; | 734 | u32 socket_handle = cmd_buffer[1]; |
| 737 | socklen_t len = cmd_buffer[2]; | ||
| 738 | 735 | ||
| 739 | // Memory address of the ctr_dest_addr structure | 736 | // Memory address of the ctr_dest_addr structure |
| 740 | VAddr ctr_dest_addr_addr = cmd_buffer[0x104 >> 2]; | 737 | VAddr ctr_dest_addr_addr = cmd_buffer[0x104 >> 2]; |
| @@ -765,7 +762,6 @@ static void Connect(Interface* self) { | |||
| 765 | // performing nonblocking operations and spinlock until the data is available | 762 | // performing nonblocking operations and spinlock until the data is available |
| 766 | u32* cmd_buffer = Kernel::GetCommandBuffer(); | 763 | u32* cmd_buffer = Kernel::GetCommandBuffer(); |
| 767 | u32 socket_handle = cmd_buffer[1]; | 764 | u32 socket_handle = cmd_buffer[1]; |
| 768 | socklen_t len = cmd_buffer[2]; | ||
| 769 | 765 | ||
| 770 | // Memory address of the ctr_input_addr structure | 766 | // Memory address of the ctr_input_addr structure |
| 771 | VAddr ctr_input_addr_addr = cmd_buffer[6]; | 767 | VAddr ctr_input_addr_addr = cmd_buffer[6]; |
diff --git a/src/core/loader/ncch.cpp b/src/core/loader/ncch.cpp index a204dc336..5df33f6d2 100644 --- a/src/core/loader/ncch.cpp +++ b/src/core/loader/ncch.cpp | |||
| @@ -288,7 +288,7 @@ ResultStatus AppLoader_NCCH::LoadExeFS() { | |||
| 288 | LOG_DEBUG(Loader, "Thread priority: 0x%X", priority); | 288 | LOG_DEBUG(Loader, "Thread priority: 0x%X", priority); |
| 289 | LOG_DEBUG(Loader, "Resource limit category: %d", resource_limit_category); | 289 | LOG_DEBUG(Loader, "Resource limit category: %d", resource_limit_category); |
| 290 | LOG_DEBUG(Loader, "System Mode: %d", | 290 | LOG_DEBUG(Loader, "System Mode: %d", |
| 291 | exheader_header.arm11_system_local_caps.system_mode); | 291 | static_cast<int>(exheader_header.arm11_system_local_caps.system_mode)); |
| 292 | 292 | ||
| 293 | if (exheader_header.arm11_system_local_caps.program_id != ncch_header.program_id) { | 293 | if (exheader_header.arm11_system_local_caps.program_id != ncch_header.program_id) { |
| 294 | LOG_ERROR(Loader, "ExHeader Program ID mismatch: the ROM is probably encrypted."); | 294 | LOG_ERROR(Loader, "ExHeader Program ID mismatch: the ROM is probably encrypted."); |
diff --git a/src/core/loader/ncch.h b/src/core/loader/ncch.h index fe08f5b45..4ef95b5c6 100644 --- a/src/core/loader/ncch.h +++ b/src/core/loader/ncch.h | |||
| @@ -181,7 +181,7 @@ public: | |||
| 181 | * Loads the Exheader and returns the system mode for this application. | 181 | * Loads the Exheader and returns the system mode for this application. |
| 182 | * @return Optional with the kernel system mode | 182 | * @return Optional with the kernel system mode |
| 183 | */ | 183 | */ |
| 184 | boost::optional<u32> LoadKernelSystemMode(); | 184 | boost::optional<u32> LoadKernelSystemMode() override; |
| 185 | 185 | ||
| 186 | ResultStatus ReadCode(std::vector<u8>& buffer) override; | 186 | ResultStatus ReadCode(std::vector<u8>& buffer) override; |
| 187 | 187 | ||