From c404d22036e16d20d91fca0cf29d56785656c0f5 Mon Sep 17 00:00:00 2001 From: bunnei Date: Thu, 29 May 2014 23:26:58 -0400 Subject: hle: cleaned up log messages --- src/core/hle/hle.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/core/hle/hle.cpp') diff --git a/src/core/hle/hle.cpp b/src/core/hle/hle.cpp index 080c36abf..f703da44e 100644 --- a/src/core/hle/hle.cpp +++ b/src/core/hle/hle.cpp @@ -18,7 +18,7 @@ static std::vector g_module_db; const FunctionDef* GetSVCInfo(u32 opcode) { u32 func_num = opcode & 0xFFFFFF; // 8 bits if (func_num > 0xFF) { - ERROR_LOG(HLE,"Unknown SVC: 0x%02X", func_num); + ERROR_LOG(HLE,"unknown svc=0x%02X", func_num); return NULL; } return &g_module_db[0].func_table[func_num]; @@ -33,7 +33,7 @@ void CallSVC(u32 opcode) { if (info->func) { info->func(); } else { - ERROR_LOG(HLE, "Unimplemented SVC function %s(..)", info->name.c_str()); + ERROR_LOG(HLE, "unimplemented SVC function %s(..)", info->name.c_str()); } } @@ -43,7 +43,7 @@ void EatCycles(u32 cycles) { void ReSchedule(const char *reason) { #ifdef _DEBUG - _dbg_assert_msg_(HLE, reason != 0 && strlen(reason) < 256, "ReSchedule: Invalid or too long reason."); + _dbg_assert_msg_(HLE, reason != 0 && strlen(reason) < 256, "Reschedule: Invalid or too long reason."); #endif // TODO: ImplementMe } -- cgit v1.2.3 From 10447d1f4831b495d7bef7711681ddd548f847a6 Mon Sep 17 00:00:00 2001 From: bunnei Date: Sun, 1 Jun 2014 21:42:50 -0400 Subject: kernel: changed main thread priority to default, updated Kernel::Reschedule to use PrepareReschedule --- src/core/hle/hle.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/core/hle/hle.cpp') diff --git a/src/core/hle/hle.cpp b/src/core/hle/hle.cpp index f703da44e..08b0685c9 100644 --- a/src/core/hle/hle.cpp +++ b/src/core/hle/hle.cpp @@ -7,6 +7,7 @@ #include "core/mem_map.h" #include "core/hle/hle.h" #include "core/hle/svc.h" +#include "core/hle/kernel/thread.h" #include "core/hle/service/service.h" //////////////////////////////////////////////////////////////////////////////////////////////////// @@ -41,11 +42,11 @@ void EatCycles(u32 cycles) { // TODO: ImplementMe } -void ReSchedule(const char *reason) { +void Reschedule(const char *reason) { #ifdef _DEBUG _dbg_assert_msg_(HLE, reason != 0 && strlen(reason) < 256, "Reschedule: Invalid or too long reason."); #endif - // TODO: ImplementMe + Core::g_app_core->PrepareReschedule(); } void RegisterModule(std::string name, int num_functions, const FunctionDef* func_table) { -- cgit v1.2.3 From 174cc9a0ed023ca89420fbc999ed82337cc94b8b Mon Sep 17 00:00:00 2001 From: bunnei Date: Thu, 5 Jun 2014 00:26:48 -0400 Subject: hle: added a hokey way to force a thread reschedule during CPU single step mode (as used by the debugger) --- src/core/hle/hle.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/core/hle/hle.cpp') diff --git a/src/core/hle/hle.cpp b/src/core/hle/hle.cpp index 08b0685c9..e49395f56 100644 --- a/src/core/hle/hle.cpp +++ b/src/core/hle/hle.cpp @@ -16,6 +16,8 @@ namespace HLE { static std::vector g_module_db; +bool g_reschedule = false; ///< If true, immediately reschedules the CPU to a new thread + const FunctionDef* GetSVCInfo(u32 opcode) { u32 func_num = opcode & 0xFFFFFF; // 8 bits if (func_num > 0xFF) { @@ -47,6 +49,7 @@ void Reschedule(const char *reason) { _dbg_assert_msg_(HLE, reason != 0 && strlen(reason) < 256, "Reschedule: Invalid or too long reason."); #endif Core::g_app_core->PrepareReschedule(); + g_reschedule = true; } void RegisterModule(std::string name, int num_functions, const FunctionDef* func_table) { -- cgit v1.2.3 From c95972275e276abe3afcac79d956ea29a0879c8e Mon Sep 17 00:00:00 2001 From: bunnei Date: Fri, 6 Jun 2014 00:35:49 -0400 Subject: HLE: Updated all uses of NULL to nullptr (to be C++11 compliant) --- src/core/hle/hle.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/core/hle/hle.cpp') diff --git a/src/core/hle/hle.cpp b/src/core/hle/hle.cpp index e49395f56..dde6d0f40 100644 --- a/src/core/hle/hle.cpp +++ b/src/core/hle/hle.cpp @@ -22,7 +22,7 @@ const FunctionDef* GetSVCInfo(u32 opcode) { u32 func_num = opcode & 0xFFFFFF; // 8 bits if (func_num > 0xFF) { ERROR_LOG(HLE,"unknown svc=0x%02X", func_num); - return NULL; + return nullptr; } return &g_module_db[0].func_table[func_num]; } -- cgit v1.2.3 From 4620e2a741735a18f3a331037f86b3aae0f9fc6d Mon Sep 17 00:00:00 2001 From: bunnei Date: Fri, 6 Jun 2014 23:34:49 -0400 Subject: HLE: Removed usnused EatCycles function. --- src/core/hle/hle.cpp | 4 ---- 1 file changed, 4 deletions(-) (limited to 'src/core/hle/hle.cpp') diff --git a/src/core/hle/hle.cpp b/src/core/hle/hle.cpp index dde6d0f40..53cda4a61 100644 --- a/src/core/hle/hle.cpp +++ b/src/core/hle/hle.cpp @@ -40,10 +40,6 @@ void CallSVC(u32 opcode) { } } -void EatCycles(u32 cycles) { - // TODO: ImplementMe -} - void Reschedule(const char *reason) { #ifdef _DEBUG _dbg_assert_msg_(HLE, reason != 0 && strlen(reason) < 256, "Reschedule: Invalid or too long reason."); -- cgit v1.2.3