diff options
Diffstat (limited to 'src')
65 files changed, 502 insertions, 516 deletions
diff --git a/src/citra/citra.cpp b/src/citra/citra.cpp index 7c031ce8d..d192428e9 100644 --- a/src/citra/citra.cpp +++ b/src/citra/citra.cpp | |||
| @@ -27,7 +27,7 @@ int __cdecl main(int argc, char **argv) { | |||
| 27 | }); | 27 | }); |
| 28 | 28 | ||
| 29 | if (argc < 2) { | 29 | if (argc < 2) { |
| 30 | ERROR_LOG(BOOT, "Failed to load ROM: No ROM specified"); | 30 | LOG_CRITICAL(Frontend, "Failed to load ROM: No ROM specified"); |
| 31 | return -1; | 31 | return -1; |
| 32 | } | 32 | } |
| 33 | 33 | ||
| @@ -40,7 +40,7 @@ int __cdecl main(int argc, char **argv) { | |||
| 40 | 40 | ||
| 41 | Loader::ResultStatus load_result = Loader::LoadFile(boot_filename); | 41 | Loader::ResultStatus load_result = Loader::LoadFile(boot_filename); |
| 42 | if (Loader::ResultStatus::Success != load_result) { | 42 | if (Loader::ResultStatus::Success != load_result) { |
| 43 | ERROR_LOG(BOOT, "Failed to load ROM (Error %i)!", load_result); | 43 | LOG_CRITICAL(Frontend, "Failed to load ROM (Error %i)!", load_result); |
| 44 | return -1; | 44 | return -1; |
| 45 | } | 45 | } |
| 46 | 46 | ||
diff --git a/src/citra/config.cpp b/src/citra/config.cpp index 1f8f5922b..fe0ebe5a8 100644 --- a/src/citra/config.cpp +++ b/src/citra/config.cpp | |||
| @@ -22,17 +22,17 @@ Config::Config() { | |||
| 22 | bool Config::LoadINI(INIReader* config, const char* location, const std::string& default_contents, bool retry) { | 22 | bool Config::LoadINI(INIReader* config, const char* location, const std::string& default_contents, bool retry) { |
| 23 | if (config->ParseError() < 0) { | 23 | if (config->ParseError() < 0) { |
| 24 | if (retry) { | 24 | if (retry) { |
| 25 | ERROR_LOG(CONFIG, "Failed to load %s. Creating file from defaults...", location); | 25 | LOG_WARNING(Config, "Failed to load %s. Creating file from defaults...", location); |
| 26 | FileUtil::CreateFullPath(location); | 26 | FileUtil::CreateFullPath(location); |
| 27 | FileUtil::WriteStringToFile(true, default_contents, location); | 27 | FileUtil::WriteStringToFile(true, default_contents, location); |
| 28 | *config = INIReader(location); // Reopen file | 28 | *config = INIReader(location); // Reopen file |
| 29 | 29 | ||
| 30 | return LoadINI(config, location, default_contents, false); | 30 | return LoadINI(config, location, default_contents, false); |
| 31 | } | 31 | } |
| 32 | ERROR_LOG(CONFIG, "Failed."); | 32 | LOG_ERROR(Config, "Failed."); |
| 33 | return false; | 33 | return false; |
| 34 | } | 34 | } |
| 35 | INFO_LOG(CONFIG, "Successfully loaded %s", location); | 35 | LOG_INFO(Config, "Successfully loaded %s", location); |
| 36 | return true; | 36 | return true; |
| 37 | } | 37 | } |
| 38 | 38 | ||
diff --git a/src/citra/emu_window/emu_window_glfw.cpp b/src/citra/emu_window/emu_window_glfw.cpp index 982619126..929e09f43 100644 --- a/src/citra/emu_window/emu_window_glfw.cpp +++ b/src/citra/emu_window/emu_window_glfw.cpp | |||
| @@ -36,15 +36,15 @@ const bool EmuWindow_GLFW::IsOpen() { | |||
| 36 | } | 36 | } |
| 37 | 37 | ||
| 38 | void EmuWindow_GLFW::OnFramebufferResizeEvent(GLFWwindow* win, int width, int height) { | 38 | void EmuWindow_GLFW::OnFramebufferResizeEvent(GLFWwindow* win, int width, int height) { |
| 39 | _dbg_assert_(GUI, width > 0); | 39 | _dbg_assert_(Frontend, width > 0); |
| 40 | _dbg_assert_(GUI, height > 0); | 40 | _dbg_assert_(Frontend, height > 0); |
| 41 | 41 | ||
| 42 | GetEmuWindow(win)->NotifyFramebufferSizeChanged(std::pair<unsigned,unsigned>(width, height)); | 42 | GetEmuWindow(win)->NotifyFramebufferSizeChanged(std::pair<unsigned,unsigned>(width, height)); |
| 43 | } | 43 | } |
| 44 | 44 | ||
| 45 | void EmuWindow_GLFW::OnClientAreaResizeEvent(GLFWwindow* win, int width, int height) { | 45 | void EmuWindow_GLFW::OnClientAreaResizeEvent(GLFWwindow* win, int width, int height) { |
| 46 | _dbg_assert_(GUI, width > 0); | 46 | _dbg_assert_(Frontend, width > 0); |
| 47 | _dbg_assert_(GUI, height > 0); | 47 | _dbg_assert_(Frontend, height > 0); |
| 48 | 48 | ||
| 49 | // NOTE: GLFW provides no proper way to set a minimal window size. | 49 | // NOTE: GLFW provides no proper way to set a minimal window size. |
| 50 | // Hence, we just ignore the corresponding EmuWindow hint. | 50 | // Hence, we just ignore the corresponding EmuWindow hint. |
| @@ -59,12 +59,12 @@ EmuWindow_GLFW::EmuWindow_GLFW() { | |||
| 59 | ReloadSetKeymaps(); | 59 | ReloadSetKeymaps(); |
| 60 | 60 | ||
| 61 | glfwSetErrorCallback([](int error, const char *desc){ | 61 | glfwSetErrorCallback([](int error, const char *desc){ |
| 62 | ERROR_LOG(GUI, "GLFW 0x%08x: %s", error, desc); | 62 | LOG_ERROR(Frontend, "GLFW 0x%08x: %s", error, desc); |
| 63 | }); | 63 | }); |
| 64 | 64 | ||
| 65 | // Initialize the window | 65 | // Initialize the window |
| 66 | if(glfwInit() != GL_TRUE) { | 66 | if(glfwInit() != GL_TRUE) { |
| 67 | ERROR_LOG(GUI, "Failed to initialize GLFW! Exiting..."); | 67 | LOG_CRITICAL(Frontend, "Failed to initialize GLFW! Exiting..."); |
| 68 | exit(1); | 68 | exit(1); |
| 69 | } | 69 | } |
| 70 | glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3); | 70 | glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3); |
| @@ -79,7 +79,7 @@ EmuWindow_GLFW::EmuWindow_GLFW() { | |||
| 79 | window_title.c_str(), nullptr, nullptr); | 79 | window_title.c_str(), nullptr, nullptr); |
| 80 | 80 | ||
| 81 | if (m_render_window == nullptr) { | 81 | if (m_render_window == nullptr) { |
| 82 | ERROR_LOG(GUI, "Failed to create GLFW window! Exiting..."); | 82 | LOG_CRITICAL(Frontend, "Failed to create GLFW window! Exiting..."); |
| 83 | exit(1); | 83 | exit(1); |
| 84 | } | 84 | } |
| 85 | 85 | ||
| @@ -149,7 +149,7 @@ void EmuWindow_GLFW::OnMinimalClientAreaChangeRequest(const std::pair<unsigned,u | |||
| 149 | std::pair<int,int> current_size; | 149 | std::pair<int,int> current_size; |
| 150 | glfwGetWindowSize(m_render_window, ¤t_size.first, ¤t_size.second); | 150 | glfwGetWindowSize(m_render_window, ¤t_size.first, ¤t_size.second); |
| 151 | 151 | ||
| 152 | _dbg_assert_(GUI, (int)minimal_size.first > 0 && (int)minimal_size.second > 0); | 152 | _dbg_assert_(Frontend, (int)minimal_size.first > 0 && (int)minimal_size.second > 0); |
| 153 | int new_width = std::max(current_size.first, (int)minimal_size.first); | 153 | int new_width = std::max(current_size.first, (int)minimal_size.first); |
| 154 | int new_height = std::max(current_size.second, (int)minimal_size.second); | 154 | int new_height = std::max(current_size.second, (int)minimal_size.second); |
| 155 | 155 | ||
diff --git a/src/citra_qt/bootmanager.cpp b/src/citra_qt/bootmanager.cpp index b53206be6..6d08d6afc 100644 --- a/src/citra_qt/bootmanager.cpp +++ b/src/citra_qt/bootmanager.cpp | |||
| @@ -62,7 +62,7 @@ void EmuThread::Stop() | |||
| 62 | { | 62 | { |
| 63 | if (!isRunning()) | 63 | if (!isRunning()) |
| 64 | { | 64 | { |
| 65 | INFO_LOG(MASTER_LOG, "EmuThread::Stop called while emu thread wasn't running, returning..."); | 65 | LOG_WARNING(Frontend, "EmuThread::Stop called while emu thread wasn't running, returning..."); |
| 66 | return; | 66 | return; |
| 67 | } | 67 | } |
| 68 | stop_run = true; | 68 | stop_run = true; |
| @@ -76,7 +76,7 @@ void EmuThread::Stop() | |||
| 76 | wait(1000); | 76 | wait(1000); |
| 77 | if (isRunning()) | 77 | if (isRunning()) |
| 78 | { | 78 | { |
| 79 | WARN_LOG(MASTER_LOG, "EmuThread still running, terminating..."); | 79 | LOG_WARNING(Frontend, "EmuThread still running, terminating..."); |
| 80 | quit(); | 80 | quit(); |
| 81 | 81 | ||
| 82 | // TODO: Waiting 50 seconds can be necessary if the logging subsystem has a lot of spam | 82 | // TODO: Waiting 50 seconds can be necessary if the logging subsystem has a lot of spam |
| @@ -84,11 +84,11 @@ void EmuThread::Stop() | |||
| 84 | wait(50000); | 84 | wait(50000); |
| 85 | if (isRunning()) | 85 | if (isRunning()) |
| 86 | { | 86 | { |
| 87 | WARN_LOG(MASTER_LOG, "EmuThread STILL running, something is wrong here..."); | 87 | LOG_CRITICAL(Frontend, "EmuThread STILL running, something is wrong here..."); |
| 88 | terminate(); | 88 | terminate(); |
| 89 | } | 89 | } |
| 90 | } | 90 | } |
| 91 | INFO_LOG(MASTER_LOG, "EmuThread stopped"); | 91 | LOG_INFO(Frontend, "EmuThread stopped"); |
| 92 | } | 92 | } |
| 93 | 93 | ||
| 94 | 94 | ||
diff --git a/src/citra_qt/debugger/graphics_breakpoints.cpp b/src/citra_qt/debugger/graphics_breakpoints.cpp index df5579e15..53394b6e6 100644 --- a/src/citra_qt/debugger/graphics_breakpoints.cpp +++ b/src/citra_qt/debugger/graphics_breakpoints.cpp | |||
| @@ -45,7 +45,7 @@ QVariant BreakPointModel::data(const QModelIndex& index, int role) const | |||
| 45 | map.insert({Pica::DebugContext::Event::IncomingPrimitiveBatch, tr("Incoming primitive batch")}); | 45 | map.insert({Pica::DebugContext::Event::IncomingPrimitiveBatch, tr("Incoming primitive batch")}); |
| 46 | map.insert({Pica::DebugContext::Event::FinishedPrimitiveBatch, tr("Finished primitive batch")}); | 46 | map.insert({Pica::DebugContext::Event::FinishedPrimitiveBatch, tr("Finished primitive batch")}); |
| 47 | 47 | ||
| 48 | _dbg_assert_(GUI, map.size() == static_cast<size_t>(Pica::DebugContext::Event::NumEvents)); | 48 | _dbg_assert_(Debug_GPU, map.size() == static_cast<size_t>(Pica::DebugContext::Event::NumEvents)); |
| 49 | 49 | ||
| 50 | return map[event]; | 50 | return map[event]; |
| 51 | } | 51 | } |
diff --git a/src/citra_qt/main.cpp b/src/citra_qt/main.cpp index 2e3025295..5293263cd 100644 --- a/src/citra_qt/main.cpp +++ b/src/citra_qt/main.cpp | |||
| @@ -158,18 +158,18 @@ GMainWindow::~GMainWindow() | |||
| 158 | 158 | ||
| 159 | void GMainWindow::BootGame(std::string filename) | 159 | void GMainWindow::BootGame(std::string filename) |
| 160 | { | 160 | { |
| 161 | NOTICE_LOG(MASTER_LOG, "Citra starting...\n"); | 161 | LOG_INFO(Frontend, "Citra starting...\n"); |
| 162 | System::Init(render_window); | 162 | System::Init(render_window); |
| 163 | 163 | ||
| 164 | if (Core::Init()) { | 164 | if (Core::Init()) { |
| 165 | ERROR_LOG(MASTER_LOG, "Core initialization failed, exiting..."); | 165 | LOG_CRITICAL(Frontend, "Core initialization failed, exiting..."); |
| 166 | Core::Stop(); | 166 | Core::Stop(); |
| 167 | exit(1); | 167 | exit(1); |
| 168 | } | 168 | } |
| 169 | 169 | ||
| 170 | // Load a game or die... | 170 | // Load a game or die... |
| 171 | if (Loader::ResultStatus::Success != Loader::LoadFile(filename)) { | 171 | if (Loader::ResultStatus::Success != Loader::LoadFile(filename)) { |
| 172 | ERROR_LOG(BOOT, "Failed to load ROM!"); | 172 | LOG_CRITICAL(Frontend, "Failed to load ROM!"); |
| 173 | } | 173 | } |
| 174 | 174 | ||
| 175 | disasmWidget->Init(); | 175 | disasmWidget->Init(); |
diff --git a/src/citra_qt/util/spinbox.cpp b/src/citra_qt/util/spinbox.cpp index 80dc67d7d..9672168f5 100644 --- a/src/citra_qt/util/spinbox.cpp +++ b/src/citra_qt/util/spinbox.cpp | |||
| @@ -244,7 +244,7 @@ QValidator::State CSpinBox::validate(QString& input, int& pos) const | |||
| 244 | if (strpos >= input.length() - HasSign() - suffix.length()) | 244 | if (strpos >= input.length() - HasSign() - suffix.length()) |
| 245 | return QValidator::Intermediate; | 245 | return QValidator::Intermediate; |
| 246 | 246 | ||
| 247 | _dbg_assert_(GUI, base <= 10 || base == 16); | 247 | _dbg_assert_(Frontend, base <= 10 || base == 16); |
| 248 | QString regexp; | 248 | QString regexp; |
| 249 | 249 | ||
| 250 | // Demand sign character for negative ranges | 250 | // Demand sign character for negative ranges |
diff --git a/src/common/break_points.cpp b/src/common/break_points.cpp index 25528b864..587dbf40a 100644 --- a/src/common/break_points.cpp +++ b/src/common/break_points.cpp | |||
| @@ -180,7 +180,7 @@ void TMemCheck::Action(DebugInterface *debug_interface, u32 iValue, u32 addr, | |||
| 180 | { | 180 | { |
| 181 | if (Log) | 181 | if (Log) |
| 182 | { | 182 | { |
| 183 | INFO_LOG(MEMMAP, "CHK %08x (%s) %s%i %0*x at %08x (%s)", | 183 | LOG_DEBUG(Debug_Breakpoint, "CHK %08x (%s) %s%i %0*x at %08x (%s)", |
| 184 | pc, debug_interface->getDescription(pc).c_str(), | 184 | pc, debug_interface->getDescription(pc).c_str(), |
| 185 | write ? "Write" : "Read", size*8, size*2, iValue, addr, | 185 | write ? "Write" : "Read", size*8, size*2, iValue, addr, |
| 186 | debug_interface->getDescription(addr).c_str() | 186 | debug_interface->getDescription(addr).c_str() |
diff --git a/src/common/chunk_file.h b/src/common/chunk_file.h index 32af74594..39a14dc81 100644 --- a/src/common/chunk_file.h +++ b/src/common/chunk_file.h | |||
| @@ -154,7 +154,7 @@ public: | |||
| 154 | Do(foundVersion); | 154 | Do(foundVersion); |
| 155 | 155 | ||
| 156 | if (error == ERROR_FAILURE || foundVersion < minVer || foundVersion > ver) { | 156 | if (error == ERROR_FAILURE || foundVersion < minVer || foundVersion > ver) { |
| 157 | WARN_LOG(COMMON, "Savestate failure: wrong version %d found for %s", foundVersion, title); | 157 | LOG_ERROR(Common, "Savestate failure: wrong version %d found for %s", foundVersion, title); |
| 158 | SetError(ERROR_FAILURE); | 158 | SetError(ERROR_FAILURE); |
| 159 | return PointerWrapSection(*this, -1, title); | 159 | return PointerWrapSection(*this, -1, title); |
| 160 | } | 160 | } |
| @@ -178,7 +178,14 @@ public: | |||
| 178 | case MODE_READ: if (memcmp(data, *ptr, size) != 0) return false; break; | 178 | case MODE_READ: if (memcmp(data, *ptr, size) != 0) return false; break; |
| 179 | case MODE_WRITE: memcpy(*ptr, data, size); break; | 179 | case MODE_WRITE: memcpy(*ptr, data, size); break; |
| 180 | case MODE_MEASURE: break; // MODE_MEASURE - don't need to do anything | 180 | case MODE_MEASURE: break; // MODE_MEASURE - don't need to do anything |
| 181 | case MODE_VERIFY: for(int i = 0; i < size; i++) _dbg_assert_msg_(COMMON, ((u8*)data)[i] == (*ptr)[i], "Savestate verification failure: %d (0x%X) (at %p) != %d (0x%X) (at %p).\n", ((u8*)data)[i], ((u8*)data)[i], &((u8*)data)[i], (*ptr)[i], (*ptr)[i], &(*ptr)[i]); break; | 181 | case MODE_VERIFY: |
| 182 | for (int i = 0; i < size; i++) { | ||
| 183 | _dbg_assert_msg_(Common, ((u8*)data)[i] == (*ptr)[i], | ||
| 184 | "Savestate verification failure: %d (0x%X) (at %p) != %d (0x%X) (at %p).\n", | ||
| 185 | ((u8*)data)[i], ((u8*)data)[i], &((u8*)data)[i], | ||
| 186 | (*ptr)[i], (*ptr)[i], &(*ptr)[i]); | ||
| 187 | } | ||
| 188 | break; | ||
| 182 | default: break; // throw an error? | 189 | default: break; // throw an error? |
| 183 | } | 190 | } |
| 184 | (*ptr) += size; | 191 | (*ptr) += size; |
| @@ -191,7 +198,14 @@ public: | |||
| 191 | case MODE_READ: memcpy(data, *ptr, size); break; | 198 | case MODE_READ: memcpy(data, *ptr, size); break; |
| 192 | case MODE_WRITE: memcpy(*ptr, data, size); break; | 199 | case MODE_WRITE: memcpy(*ptr, data, size); break; |
| 193 | case MODE_MEASURE: break; // MODE_MEASURE - don't need to do anything | 200 | case MODE_MEASURE: break; // MODE_MEASURE - don't need to do anything |
| 194 | case MODE_VERIFY: for(int i = 0; i < size; i++) _dbg_assert_msg_(COMMON, ((u8*)data)[i] == (*ptr)[i], "Savestate verification failure: %d (0x%X) (at %p) != %d (0x%X) (at %p).\n", ((u8*)data)[i], ((u8*)data)[i], &((u8*)data)[i], (*ptr)[i], (*ptr)[i], &(*ptr)[i]); break; | 201 | case MODE_VERIFY: |
| 202 | for (int i = 0; i < size; i++) { | ||
| 203 | _dbg_assert_msg_(Common, ((u8*)data)[i] == (*ptr)[i], | ||
| 204 | "Savestate verification failure: %d (0x%X) (at %p) != %d (0x%X) (at %p).\n", | ||
| 205 | ((u8*)data)[i], ((u8*)data)[i], &((u8*)data)[i], | ||
| 206 | (*ptr)[i], (*ptr)[i], &(*ptr)[i]); | ||
| 207 | } | ||
| 208 | break; | ||
| 195 | default: break; // throw an error? | 209 | default: break; // throw an error? |
| 196 | } | 210 | } |
| 197 | (*ptr) += size; | 211 | (*ptr) += size; |
| @@ -476,7 +490,7 @@ public: | |||
| 476 | break; | 490 | break; |
| 477 | 491 | ||
| 478 | default: | 492 | default: |
| 479 | ERROR_LOG(COMMON, "Savestate error: invalid mode %d.", mode); | 493 | LOG_ERROR(Common, "Savestate error: invalid mode %d.", mode); |
| 480 | } | 494 | } |
| 481 | } | 495 | } |
| 482 | 496 | ||
| @@ -490,7 +504,12 @@ public: | |||
| 490 | case MODE_READ: x = (char*)*ptr; break; | 504 | case MODE_READ: x = (char*)*ptr; break; |
| 491 | case MODE_WRITE: memcpy(*ptr, x.c_str(), stringLen); break; | 505 | case MODE_WRITE: memcpy(*ptr, x.c_str(), stringLen); break; |
| 492 | case MODE_MEASURE: break; | 506 | case MODE_MEASURE: break; |
| 493 | case MODE_VERIFY: _dbg_assert_msg_(COMMON, !strcmp(x.c_str(), (char*)*ptr), "Savestate verification failure: \"%s\" != \"%s\" (at %p).\n", x.c_str(), (char*)*ptr, ptr); break; | 507 | case MODE_VERIFY: |
| 508 | _dbg_assert_msg_(Common, | ||
| 509 | !strcmp(x.c_str(), (char*)*ptr), | ||
| 510 | "Savestate verification failure: \"%s\" != \"%s\" (at %p).\n", | ||
| 511 | x.c_str(), (char*)*ptr, ptr); | ||
| 512 | break; | ||
| 494 | } | 513 | } |
| 495 | (*ptr) += stringLen; | 514 | (*ptr) += stringLen; |
| 496 | } | 515 | } |
| @@ -504,7 +523,11 @@ public: | |||
| 504 | case MODE_READ: x = (wchar_t*)*ptr; break; | 523 | case MODE_READ: x = (wchar_t*)*ptr; break; |
| 505 | case MODE_WRITE: memcpy(*ptr, x.c_str(), stringLen); break; | 524 | case MODE_WRITE: memcpy(*ptr, x.c_str(), stringLen); break; |
| 506 | case MODE_MEASURE: break; | 525 | case MODE_MEASURE: break; |
| 507 | case MODE_VERIFY: _dbg_assert_msg_(COMMON, x == (wchar_t*)*ptr, "Savestate verification failure: \"%ls\" != \"%ls\" (at %p).\n", x.c_str(), (wchar_t*)*ptr, ptr); break; | 526 | case MODE_VERIFY: |
| 527 | _dbg_assert_msg_(Common, x == (wchar_t*)*ptr, | ||
| 528 | "Savestate verification failure: \"%ls\" != \"%ls\" (at %p).\n", | ||
| 529 | x.c_str(), (wchar_t*)*ptr, ptr); | ||
| 530 | break; | ||
| 508 | } | 531 | } |
| 509 | (*ptr) += stringLen; | 532 | (*ptr) += stringLen; |
| 510 | } | 533 | } |
diff --git a/src/common/file_util.cpp b/src/common/file_util.cpp index 7579d8c0f..88c46c117 100644 --- a/src/common/file_util.cpp +++ b/src/common/file_util.cpp | |||
| @@ -88,7 +88,7 @@ bool IsDirectory(const std::string &filename) | |||
| 88 | #endif | 88 | #endif |
| 89 | 89 | ||
| 90 | if (result < 0) { | 90 | if (result < 0) { |
| 91 | WARN_LOG(COMMON, "IsDirectory: stat failed on %s: %s", | 91 | LOG_WARNING(Common_Filesystem, "stat failed on %s: %s", |
| 92 | filename.c_str(), GetLastErrorMsg()); | 92 | filename.c_str(), GetLastErrorMsg()); |
| 93 | return false; | 93 | return false; |
| 94 | } | 94 | } |
| @@ -100,33 +100,33 @@ bool IsDirectory(const std::string &filename) | |||
| 100 | // Doesn't supports deleting a directory | 100 | // Doesn't supports deleting a directory |
| 101 | bool Delete(const std::string &filename) | 101 | bool Delete(const std::string &filename) |
| 102 | { | 102 | { |
| 103 | INFO_LOG(COMMON, "Delete: file %s", filename.c_str()); | 103 | LOG_INFO(Common_Filesystem, "file %s", filename.c_str()); |
| 104 | 104 | ||
| 105 | // Return true because we care about the file no | 105 | // Return true because we care about the file no |
| 106 | // being there, not the actual delete. | 106 | // being there, not the actual delete. |
| 107 | if (!Exists(filename)) | 107 | if (!Exists(filename)) |
| 108 | { | 108 | { |
| 109 | WARN_LOG(COMMON, "Delete: %s does not exist", filename.c_str()); | 109 | LOG_WARNING(Common_Filesystem, "%s does not exist", filename.c_str()); |
| 110 | return true; | 110 | return true; |
| 111 | } | 111 | } |
| 112 | 112 | ||
| 113 | // We can't delete a directory | 113 | // We can't delete a directory |
| 114 | if (IsDirectory(filename)) | 114 | if (IsDirectory(filename)) |
| 115 | { | 115 | { |
| 116 | WARN_LOG(COMMON, "Delete failed: %s is a directory", filename.c_str()); | 116 | LOG_ERROR(Common_Filesystem, "Failed: %s is a directory", filename.c_str()); |
| 117 | return false; | 117 | return false; |
| 118 | } | 118 | } |
| 119 | 119 | ||
| 120 | #ifdef _WIN32 | 120 | #ifdef _WIN32 |
| 121 | if (!DeleteFile(Common::UTF8ToTStr(filename).c_str())) | 121 | if (!DeleteFile(Common::UTF8ToTStr(filename).c_str())) |
| 122 | { | 122 | { |
| 123 | WARN_LOG(COMMON, "Delete: DeleteFile failed on %s: %s", | 123 | LOG_ERROR(Common_Filesystem, "DeleteFile failed on %s: %s", |
| 124 | filename.c_str(), GetLastErrorMsg()); | 124 | filename.c_str(), GetLastErrorMsg()); |
| 125 | return false; | 125 | return false; |
| 126 | } | 126 | } |
| 127 | #else | 127 | #else |
| 128 | if (unlink(filename.c_str()) == -1) { | 128 | if (unlink(filename.c_str()) == -1) { |
| 129 | WARN_LOG(COMMON, "Delete: unlink failed on %s: %s", | 129 | LOG_ERROR(Common_Filesystem, "unlink failed on %s: %s", |
| 130 | filename.c_str(), GetLastErrorMsg()); | 130 | filename.c_str(), GetLastErrorMsg()); |
| 131 | return false; | 131 | return false; |
| 132 | } | 132 | } |
| @@ -138,17 +138,17 @@ bool Delete(const std::string &filename) | |||
| 138 | // Returns true if successful, or path already exists. | 138 | // Returns true if successful, or path already exists. |
| 139 | bool CreateDir(const std::string &path) | 139 | bool CreateDir(const std::string &path) |
| 140 | { | 140 | { |
| 141 | INFO_LOG(COMMON, "CreateDir: directory %s", path.c_str()); | 141 | LOG_TRACE(Common_Filesystem, "directory %s", path.c_str()); |
| 142 | #ifdef _WIN32 | 142 | #ifdef _WIN32 |
| 143 | if (::CreateDirectory(Common::UTF8ToTStr(path).c_str(), nullptr)) | 143 | if (::CreateDirectory(Common::UTF8ToTStr(path).c_str(), nullptr)) |
| 144 | return true; | 144 | return true; |
| 145 | DWORD error = GetLastError(); | 145 | DWORD error = GetLastError(); |
| 146 | if (error == ERROR_ALREADY_EXISTS) | 146 | if (error == ERROR_ALREADY_EXISTS) |
| 147 | { | 147 | { |
| 148 | WARN_LOG(COMMON, "CreateDir: CreateDirectory failed on %s: already exists", path.c_str()); | 148 | LOG_WARNING(Common_Filesystem, "CreateDirectory failed on %s: already exists", path.c_str()); |
| 149 | return true; | 149 | return true; |
| 150 | } | 150 | } |
| 151 | ERROR_LOG(COMMON, "CreateDir: CreateDirectory failed on %s: %i", path.c_str(), error); | 151 | LOG_ERROR(Common_Filesystem, "CreateDirectory failed on %s: %i", path.c_str(), error); |
| 152 | return false; | 152 | return false; |
| 153 | #else | 153 | #else |
| 154 | if (mkdir(path.c_str(), 0755) == 0) | 154 | if (mkdir(path.c_str(), 0755) == 0) |
| @@ -158,11 +158,11 @@ bool CreateDir(const std::string &path) | |||
| 158 | 158 | ||
| 159 | if (err == EEXIST) | 159 | if (err == EEXIST) |
| 160 | { | 160 | { |
| 161 | WARN_LOG(COMMON, "CreateDir: mkdir failed on %s: already exists", path.c_str()); | 161 | LOG_WARNING(Common_Filesystem, "mkdir failed on %s: already exists", path.c_str()); |
| 162 | return true; | 162 | return true; |
| 163 | } | 163 | } |
| 164 | 164 | ||
| 165 | ERROR_LOG(COMMON, "CreateDir: mkdir failed on %s: %s", path.c_str(), strerror(err)); | 165 | LOG_ERROR(Common_Filesystem, "mkdir failed on %s: %s", path.c_str(), strerror(err)); |
| 166 | return false; | 166 | return false; |
| 167 | #endif | 167 | #endif |
| 168 | } | 168 | } |
| @@ -171,11 +171,11 @@ bool CreateDir(const std::string &path) | |||
| 171 | bool CreateFullPath(const std::string &fullPath) | 171 | bool CreateFullPath(const std::string &fullPath) |
| 172 | { | 172 | { |
| 173 | int panicCounter = 100; | 173 | int panicCounter = 100; |
| 174 | INFO_LOG(COMMON, "CreateFullPath: path %s", fullPath.c_str()); | 174 | LOG_TRACE(Common_Filesystem, "path %s", fullPath.c_str()); |
| 175 | 175 | ||
| 176 | if (FileUtil::Exists(fullPath)) | 176 | if (FileUtil::Exists(fullPath)) |
| 177 | { | 177 | { |
| 178 | INFO_LOG(COMMON, "CreateFullPath: path exists %s", fullPath.c_str()); | 178 | LOG_WARNING(Common_Filesystem, "path exists %s", fullPath.c_str()); |
| 179 | return true; | 179 | return true; |
| 180 | } | 180 | } |
| 181 | 181 | ||
| @@ -192,7 +192,7 @@ bool CreateFullPath(const std::string &fullPath) | |||
| 192 | // Include the '/' so the first call is CreateDir("/") rather than CreateDir("") | 192 | // Include the '/' so the first call is CreateDir("/") rather than CreateDir("") |
| 193 | std::string const subPath(fullPath.substr(0, position + 1)); | 193 | std::string const subPath(fullPath.substr(0, position + 1)); |
| 194 | if (!FileUtil::IsDirectory(subPath) && !FileUtil::CreateDir(subPath)) { | 194 | if (!FileUtil::IsDirectory(subPath) && !FileUtil::CreateDir(subPath)) { |
| 195 | ERROR_LOG(COMMON, "CreateFullPath: directory creation failed"); | 195 | LOG_ERROR(Common, "CreateFullPath: directory creation failed"); |
| 196 | return false; | 196 | return false; |
| 197 | } | 197 | } |
| 198 | 198 | ||
| @@ -200,7 +200,7 @@ bool CreateFullPath(const std::string &fullPath) | |||
| 200 | panicCounter--; | 200 | panicCounter--; |
| 201 | if (panicCounter <= 0) | 201 | if (panicCounter <= 0) |
| 202 | { | 202 | { |
| 203 | ERROR_LOG(COMMON, "CreateFullPath: directory structure is too deep"); | 203 | LOG_ERROR(Common, "CreateFullPath: directory structure is too deep"); |
| 204 | return false; | 204 | return false; |
| 205 | } | 205 | } |
| 206 | position++; | 206 | position++; |
| @@ -211,12 +211,12 @@ bool CreateFullPath(const std::string &fullPath) | |||
| 211 | // Deletes a directory filename, returns true on success | 211 | // Deletes a directory filename, returns true on success |
| 212 | bool DeleteDir(const std::string &filename) | 212 | bool DeleteDir(const std::string &filename) |
| 213 | { | 213 | { |
| 214 | INFO_LOG(COMMON, "DeleteDir: directory %s", filename.c_str()); | 214 | LOG_INFO(Common_Filesystem, "directory %s", filename.c_str()); |
| 215 | 215 | ||
| 216 | // check if a directory | 216 | // check if a directory |
| 217 | if (!FileUtil::IsDirectory(filename)) | 217 | if (!FileUtil::IsDirectory(filename)) |
| 218 | { | 218 | { |
| 219 | ERROR_LOG(COMMON, "DeleteDir: Not a directory %s", filename.c_str()); | 219 | LOG_ERROR(Common_Filesystem, "Not a directory %s", filename.c_str()); |
| 220 | return false; | 220 | return false; |
| 221 | } | 221 | } |
| 222 | 222 | ||
| @@ -227,7 +227,7 @@ bool DeleteDir(const std::string &filename) | |||
| 227 | if (rmdir(filename.c_str()) == 0) | 227 | if (rmdir(filename.c_str()) == 0) |
| 228 | return true; | 228 | return true; |
| 229 | #endif | 229 | #endif |
| 230 | ERROR_LOG(COMMON, "DeleteDir: %s: %s", filename.c_str(), GetLastErrorMsg()); | 230 | LOG_ERROR(Common_Filesystem, "failed %s: %s", filename.c_str(), GetLastErrorMsg()); |
| 231 | 231 | ||
| 232 | return false; | 232 | return false; |
| 233 | } | 233 | } |
| @@ -235,11 +235,11 @@ bool DeleteDir(const std::string &filename) | |||
| 235 | // renames file srcFilename to destFilename, returns true on success | 235 | // renames file srcFilename to destFilename, returns true on success |
| 236 | bool Rename(const std::string &srcFilename, const std::string &destFilename) | 236 | bool Rename(const std::string &srcFilename, const std::string &destFilename) |
| 237 | { | 237 | { |
| 238 | INFO_LOG(COMMON, "Rename: %s --> %s", | 238 | LOG_TRACE(Common_Filesystem, "%s --> %s", |
| 239 | srcFilename.c_str(), destFilename.c_str()); | 239 | srcFilename.c_str(), destFilename.c_str()); |
| 240 | if (rename(srcFilename.c_str(), destFilename.c_str()) == 0) | 240 | if (rename(srcFilename.c_str(), destFilename.c_str()) == 0) |
| 241 | return true; | 241 | return true; |
| 242 | ERROR_LOG(COMMON, "Rename: failed %s --> %s: %s", | 242 | LOG_ERROR(Common_Filesystem, "failed %s --> %s: %s", |
| 243 | srcFilename.c_str(), destFilename.c_str(), GetLastErrorMsg()); | 243 | srcFilename.c_str(), destFilename.c_str(), GetLastErrorMsg()); |
| 244 | return false; | 244 | return false; |
| 245 | } | 245 | } |
| @@ -247,13 +247,13 @@ bool Rename(const std::string &srcFilename, const std::string &destFilename) | |||
| 247 | // copies file srcFilename to destFilename, returns true on success | 247 | // copies file srcFilename to destFilename, returns true on success |
| 248 | bool Copy(const std::string &srcFilename, const std::string &destFilename) | 248 | bool Copy(const std::string &srcFilename, const std::string &destFilename) |
| 249 | { | 249 | { |
| 250 | INFO_LOG(COMMON, "Copy: %s --> %s", | 250 | LOG_TRACE(Common_Filesystem, "%s --> %s", |
| 251 | srcFilename.c_str(), destFilename.c_str()); | 251 | srcFilename.c_str(), destFilename.c_str()); |
| 252 | #ifdef _WIN32 | 252 | #ifdef _WIN32 |
| 253 | if (CopyFile(Common::UTF8ToTStr(srcFilename).c_str(), Common::UTF8ToTStr(destFilename).c_str(), FALSE)) | 253 | if (CopyFile(Common::UTF8ToTStr(srcFilename).c_str(), Common::UTF8ToTStr(destFilename).c_str(), FALSE)) |
| 254 | return true; | 254 | return true; |
| 255 | 255 | ||
| 256 | ERROR_LOG(COMMON, "Copy: failed %s --> %s: %s", | 256 | LOG_ERROR(Common_Filesystem, "failed %s --> %s: %s", |
| 257 | srcFilename.c_str(), destFilename.c_str(), GetLastErrorMsg()); | 257 | srcFilename.c_str(), destFilename.c_str(), GetLastErrorMsg()); |
| 258 | return false; | 258 | return false; |
| 259 | #else | 259 | #else |
| @@ -267,7 +267,7 @@ bool Copy(const std::string &srcFilename, const std::string &destFilename) | |||
| 267 | FILE *input = fopen(srcFilename.c_str(), "rb"); | 267 | FILE *input = fopen(srcFilename.c_str(), "rb"); |
| 268 | if (!input) | 268 | if (!input) |
| 269 | { | 269 | { |
| 270 | ERROR_LOG(COMMON, "Copy: input failed %s --> %s: %s", | 270 | LOG_ERROR(Common_Filesystem, "opening input failed %s --> %s: %s", |
| 271 | srcFilename.c_str(), destFilename.c_str(), GetLastErrorMsg()); | 271 | srcFilename.c_str(), destFilename.c_str(), GetLastErrorMsg()); |
| 272 | return false; | 272 | return false; |
| 273 | } | 273 | } |
| @@ -277,7 +277,7 @@ bool Copy(const std::string &srcFilename, const std::string &destFilename) | |||
| 277 | if (!output) | 277 | if (!output) |
| 278 | { | 278 | { |
| 279 | fclose(input); | 279 | fclose(input); |
| 280 | ERROR_LOG(COMMON, "Copy: output failed %s --> %s: %s", | 280 | LOG_ERROR(Common_Filesystem, "opening output failed %s --> %s: %s", |
| 281 | srcFilename.c_str(), destFilename.c_str(), GetLastErrorMsg()); | 281 | srcFilename.c_str(), destFilename.c_str(), GetLastErrorMsg()); |
| 282 | return false; | 282 | return false; |
| 283 | } | 283 | } |
| @@ -291,8 +291,8 @@ bool Copy(const std::string &srcFilename, const std::string &destFilename) | |||
| 291 | { | 291 | { |
| 292 | if (ferror(input) != 0) | 292 | if (ferror(input) != 0) |
| 293 | { | 293 | { |
| 294 | ERROR_LOG(COMMON, | 294 | LOG_ERROR(Common_Filesystem, |
| 295 | "Copy: failed reading from source, %s --> %s: %s", | 295 | "failed reading from source, %s --> %s: %s", |
| 296 | srcFilename.c_str(), destFilename.c_str(), GetLastErrorMsg()); | 296 | srcFilename.c_str(), destFilename.c_str(), GetLastErrorMsg()); |
| 297 | goto bail; | 297 | goto bail; |
| 298 | } | 298 | } |
| @@ -302,8 +302,8 @@ bool Copy(const std::string &srcFilename, const std::string &destFilename) | |||
| 302 | int wnum = fwrite(buffer, sizeof(char), rnum, output); | 302 | int wnum = fwrite(buffer, sizeof(char), rnum, output); |
| 303 | if (wnum != rnum) | 303 | if (wnum != rnum) |
| 304 | { | 304 | { |
| 305 | ERROR_LOG(COMMON, | 305 | LOG_ERROR(Common_Filesystem, |
| 306 | "Copy: failed writing to output, %s --> %s: %s", | 306 | "failed writing to output, %s --> %s: %s", |
| 307 | srcFilename.c_str(), destFilename.c_str(), GetLastErrorMsg()); | 307 | srcFilename.c_str(), destFilename.c_str(), GetLastErrorMsg()); |
| 308 | goto bail; | 308 | goto bail; |
| 309 | } | 309 | } |
| @@ -326,13 +326,13 @@ u64 GetSize(const std::string &filename) | |||
| 326 | { | 326 | { |
| 327 | if (!Exists(filename)) | 327 | if (!Exists(filename)) |
| 328 | { | 328 | { |
| 329 | WARN_LOG(COMMON, "GetSize: failed %s: No such file", filename.c_str()); | 329 | LOG_ERROR(Common_Filesystem, "failed %s: No such file", filename.c_str()); |
| 330 | return 0; | 330 | return 0; |
| 331 | } | 331 | } |
| 332 | 332 | ||
| 333 | if (IsDirectory(filename)) | 333 | if (IsDirectory(filename)) |
| 334 | { | 334 | { |
| 335 | WARN_LOG(COMMON, "GetSize: failed %s: is a directory", filename.c_str()); | 335 | LOG_ERROR(Common_Filesystem, "failed %s: is a directory", filename.c_str()); |
| 336 | return 0; | 336 | return 0; |
| 337 | } | 337 | } |
| 338 | 338 | ||
| @@ -343,12 +343,12 @@ u64 GetSize(const std::string &filename) | |||
| 343 | if (stat64(filename.c_str(), &buf) == 0) | 343 | if (stat64(filename.c_str(), &buf) == 0) |
| 344 | #endif | 344 | #endif |
| 345 | { | 345 | { |
| 346 | DEBUG_LOG(COMMON, "GetSize: %s: %lld", | 346 | LOG_TRACE(Common_Filesystem, "%s: %lld", |
| 347 | filename.c_str(), (long long)buf.st_size); | 347 | filename.c_str(), (long long)buf.st_size); |
| 348 | return buf.st_size; | 348 | return buf.st_size; |
| 349 | } | 349 | } |
| 350 | 350 | ||
| 351 | ERROR_LOG(COMMON, "GetSize: Stat failed %s: %s", | 351 | LOG_ERROR(Common_Filesystem, "Stat failed %s: %s", |
| 352 | filename.c_str(), GetLastErrorMsg()); | 352 | filename.c_str(), GetLastErrorMsg()); |
| 353 | return 0; | 353 | return 0; |
| 354 | } | 354 | } |
| @@ -358,7 +358,7 @@ u64 GetSize(const int fd) | |||
| 358 | { | 358 | { |
| 359 | struct stat64 buf; | 359 | struct stat64 buf; |
| 360 | if (fstat64(fd, &buf) != 0) { | 360 | if (fstat64(fd, &buf) != 0) { |
| 361 | ERROR_LOG(COMMON, "GetSize: stat failed %i: %s", | 361 | LOG_ERROR(Common_Filesystem, "GetSize: stat failed %i: %s", |
| 362 | fd, GetLastErrorMsg()); | 362 | fd, GetLastErrorMsg()); |
| 363 | return 0; | 363 | return 0; |
| 364 | } | 364 | } |
| @@ -371,13 +371,13 @@ u64 GetSize(FILE *f) | |||
| 371 | // can't use off_t here because it can be 32-bit | 371 | // can't use off_t here because it can be 32-bit |
| 372 | u64 pos = ftello(f); | 372 | u64 pos = ftello(f); |
| 373 | if (fseeko(f, 0, SEEK_END) != 0) { | 373 | if (fseeko(f, 0, SEEK_END) != 0) { |
| 374 | ERROR_LOG(COMMON, "GetSize: seek failed %p: %s", | 374 | LOG_ERROR(Common_Filesystem, "GetSize: seek failed %p: %s", |
| 375 | f, GetLastErrorMsg()); | 375 | f, GetLastErrorMsg()); |
| 376 | return 0; | 376 | return 0; |
| 377 | } | 377 | } |
| 378 | u64 size = ftello(f); | 378 | u64 size = ftello(f); |
| 379 | if ((size != pos) && (fseeko(f, pos, SEEK_SET) != 0)) { | 379 | if ((size != pos) && (fseeko(f, pos, SEEK_SET) != 0)) { |
| 380 | ERROR_LOG(COMMON, "GetSize: seek failed %p: %s", | 380 | LOG_ERROR(Common_Filesystem, "GetSize: seek failed %p: %s", |
| 381 | f, GetLastErrorMsg()); | 381 | f, GetLastErrorMsg()); |
| 382 | return 0; | 382 | return 0; |
| 383 | } | 383 | } |
| @@ -387,11 +387,11 @@ u64 GetSize(FILE *f) | |||
| 387 | // creates an empty file filename, returns true on success | 387 | // creates an empty file filename, returns true on success |
| 388 | bool CreateEmptyFile(const std::string &filename) | 388 | bool CreateEmptyFile(const std::string &filename) |
| 389 | { | 389 | { |
| 390 | INFO_LOG(COMMON, "CreateEmptyFile: %s", filename.c_str()); | 390 | LOG_TRACE(Common_Filesystem, "%s", filename.c_str()); |
| 391 | 391 | ||
| 392 | if (!FileUtil::IOFile(filename, "wb")) | 392 | if (!FileUtil::IOFile(filename, "wb")) |
| 393 | { | 393 | { |
| 394 | ERROR_LOG(COMMON, "CreateEmptyFile: failed %s: %s", | 394 | LOG_ERROR(Common_Filesystem, "failed %s: %s", |
| 395 | filename.c_str(), GetLastErrorMsg()); | 395 | filename.c_str(), GetLastErrorMsg()); |
| 396 | return false; | 396 | return false; |
| 397 | } | 397 | } |
| @@ -404,7 +404,7 @@ bool CreateEmptyFile(const std::string &filename) | |||
| 404 | // results into parentEntry. Returns the number of files+directories found | 404 | // results into parentEntry. Returns the number of files+directories found |
| 405 | u32 ScanDirectoryTree(const std::string &directory, FSTEntry& parentEntry) | 405 | u32 ScanDirectoryTree(const std::string &directory, FSTEntry& parentEntry) |
| 406 | { | 406 | { |
| 407 | INFO_LOG(COMMON, "ScanDirectoryTree: directory %s", directory.c_str()); | 407 | LOG_TRACE(Common_Filesystem, "directory %s", directory.c_str()); |
| 408 | // How many files + directories we found | 408 | // How many files + directories we found |
| 409 | u32 foundEntries = 0; | 409 | u32 foundEntries = 0; |
| 410 | #ifdef _WIN32 | 410 | #ifdef _WIN32 |
| @@ -474,7 +474,7 @@ u32 ScanDirectoryTree(const std::string &directory, FSTEntry& parentEntry) | |||
| 474 | // Deletes the given directory and anything under it. Returns true on success. | 474 | // Deletes the given directory and anything under it. Returns true on success. |
| 475 | bool DeleteDirRecursively(const std::string &directory) | 475 | bool DeleteDirRecursively(const std::string &directory) |
| 476 | { | 476 | { |
| 477 | INFO_LOG(COMMON, "DeleteDirRecursively: %s", directory.c_str()); | 477 | LOG_TRACE(Common_Filesystem, "%s", directory.c_str()); |
| 478 | #ifdef _WIN32 | 478 | #ifdef _WIN32 |
| 479 | // Find the first file in the directory. | 479 | // Find the first file in the directory. |
| 480 | WIN32_FIND_DATA ffd; | 480 | WIN32_FIND_DATA ffd; |
| @@ -588,7 +588,7 @@ std::string GetCurrentDir() | |||
| 588 | // Get the current working directory (getcwd uses malloc) | 588 | // Get the current working directory (getcwd uses malloc) |
| 589 | if (!(dir = __getcwd(nullptr, 0))) { | 589 | if (!(dir = __getcwd(nullptr, 0))) { |
| 590 | 590 | ||
| 591 | ERROR_LOG(COMMON, "GetCurrentDirectory failed: %s", | 591 | LOG_ERROR(Common_Filesystem, "GetCurrentDirectory failed: %s", |
| 592 | GetLastErrorMsg()); | 592 | GetLastErrorMsg()); |
| 593 | return nullptr; | 593 | return nullptr; |
| 594 | } | 594 | } |
| @@ -647,7 +647,7 @@ std::string GetSysDirectory() | |||
| 647 | #endif | 647 | #endif |
| 648 | sysDir += DIR_SEP; | 648 | sysDir += DIR_SEP; |
| 649 | 649 | ||
| 650 | INFO_LOG(COMMON, "GetSysDirectory: Setting to %s:", sysDir.c_str()); | 650 | LOG_DEBUG(Common_Filesystem, "Setting to %s:", sysDir.c_str()); |
| 651 | return sysDir; | 651 | return sysDir; |
| 652 | } | 652 | } |
| 653 | 653 | ||
| @@ -695,7 +695,7 @@ const std::string& GetUserPath(const unsigned int DirIDX, const std::string &new | |||
| 695 | { | 695 | { |
| 696 | if (!FileUtil::IsDirectory(newPath)) | 696 | if (!FileUtil::IsDirectory(newPath)) |
| 697 | { | 697 | { |
| 698 | WARN_LOG(COMMON, "Invalid path specified %s", newPath.c_str()); | 698 | LOG_ERROR(Common_Filesystem, "Invalid path specified %s", newPath.c_str()); |
| 699 | return paths[DirIDX]; | 699 | return paths[DirIDX]; |
| 700 | } | 700 | } |
| 701 | else | 701 | else |
diff --git a/src/common/log.h b/src/common/log.h index 105db9802..c0f7ca2df 100644 --- a/src/common/log.h +++ b/src/common/log.h | |||
| @@ -126,23 +126,23 @@ void GenericLog(LOGTYPES_LEVELS level, LOGTYPES_TYPE type, const char*file, int | |||
| 126 | //#define INFO_LOG(t,...) do { GENERIC_LOG(LogTypes::t, LogTypes::LINFO, __VA_ARGS__) } while (0) | 126 | //#define INFO_LOG(t,...) do { GENERIC_LOG(LogTypes::t, LogTypes::LINFO, __VA_ARGS__) } while (0) |
| 127 | //#define DEBUG_LOG(t,...) do { GENERIC_LOG(LogTypes::t, LogTypes::LDEBUG, __VA_ARGS__) } while (0) | 127 | //#define DEBUG_LOG(t,...) do { GENERIC_LOG(LogTypes::t, LogTypes::LDEBUG, __VA_ARGS__) } while (0) |
| 128 | 128 | ||
| 129 | #define OS_LOG(t,...) LOG_INFO(Common, __VA_ARGS__) | 129 | //#define OS_LOG(t,...) LOG_INFO(Common, __VA_ARGS__) |
| 130 | #define ERROR_LOG(t,...) LOG_ERROR(Common_Filesystem, __VA_ARGS__) | 130 | //#define ERROR_LOG(t,...) LOG_ERROR(Common_Filesystem, __VA_ARGS__) |
| 131 | #define WARN_LOG(t,...) LOG_WARNING(Kernel_SVC, __VA_ARGS__) | 131 | //#define WARN_LOG(t,...) LOG_WARNING(Kernel_SVC, __VA_ARGS__) |
| 132 | #define NOTICE_LOG(t,...) LOG_INFO(Service, __VA_ARGS__) | 132 | //#define NOTICE_LOG(t,...) LOG_INFO(Service, __VA_ARGS__) |
| 133 | #define INFO_LOG(t,...) LOG_INFO(Service_FS, __VA_ARGS__) | 133 | //#define INFO_LOG(t,...) LOG_INFO(Service_FS, __VA_ARGS__) |
| 134 | #define DEBUG_LOG(t,...) LOG_DEBUG(Common, __VA_ARGS__) | 134 | //#define DEBUG_LOG(t,...) LOG_DEBUG(Common, __VA_ARGS__) |
| 135 | 135 | ||
| 136 | #if MAX_LOGLEVEL >= DEBUG_LEVEL | 136 | #if MAX_LOGLEVEL >= DEBUG_LEVEL |
| 137 | #define _dbg_assert_(_t_, _a_) \ | 137 | #define _dbg_assert_(_t_, _a_) \ |
| 138 | if (!(_a_)) {\ | 138 | if (!(_a_)) {\ |
| 139 | ERROR_LOG(_t_, "Error...\n\n Line: %d\n File: %s\n Time: %s\n\nIgnore and continue?", \ | 139 | LOG_CRITICAL(_t_, "Error...\n\n Line: %d\n File: %s\n Time: %s\n\nIgnore and continue?", \ |
| 140 | __LINE__, __FILE__, __TIME__); \ | 140 | __LINE__, __FILE__, __TIME__); \ |
| 141 | if (!PanicYesNo("*** Assertion (see log)***\n")) {Crash();} \ | 141 | if (!PanicYesNo("*** Assertion (see log)***\n")) {Crash();} \ |
| 142 | } | 142 | } |
| 143 | #define _dbg_assert_msg_(_t_, _a_, ...)\ | 143 | #define _dbg_assert_msg_(_t_, _a_, ...)\ |
| 144 | if (!(_a_)) {\ | 144 | if (!(_a_)) {\ |
| 145 | ERROR_LOG(_t_, __VA_ARGS__); \ | 145 | LOG_CRITICAL(_t_, __VA_ARGS__); \ |
| 146 | if (!PanicYesNo(__VA_ARGS__)) {Crash();} \ | 146 | if (!PanicYesNo(__VA_ARGS__)) {Crash();} \ |
| 147 | } | 147 | } |
| 148 | #define _dbg_update_() Host_UpdateLogDisplay(); | 148 | #define _dbg_update_() Host_UpdateLogDisplay(); |
diff --git a/src/common/mem_arena.cpp b/src/common/mem_arena.cpp index 7d4fda0e2..9904d2472 100644 --- a/src/common/mem_arena.cpp +++ b/src/common/mem_arena.cpp | |||
| @@ -71,7 +71,7 @@ int ashmem_create_region(const char *name, size_t size) | |||
| 71 | return fd; | 71 | return fd; |
| 72 | 72 | ||
| 73 | error: | 73 | error: |
| 74 | ERROR_LOG(MEMMAP, "NASTY ASHMEM ERROR: ret = %08x", ret); | 74 | LOG_ERROR(Common_Memory, "NASTY ASHMEM ERROR: ret = %08x", ret); |
| 75 | close(fd); | 75 | close(fd); |
| 76 | return ret; | 76 | return ret; |
| 77 | } | 77 | } |
| @@ -130,7 +130,7 @@ void MemArena::GrabLowMemSpace(size_t size) | |||
| 130 | // Note that it appears that ashmem is pinned by default, so no need to pin. | 130 | // Note that it appears that ashmem is pinned by default, so no need to pin. |
| 131 | if (fd < 0) | 131 | if (fd < 0) |
| 132 | { | 132 | { |
| 133 | ERROR_LOG(MEMMAP, "Failed to grab ashmem space of size: %08x errno: %d", (int)size, (int)(errno)); | 133 | LOG_ERROR(Common_Memory, "Failed to grab ashmem space of size: %08x errno: %d", (int)size, (int)(errno)); |
| 134 | return; | 134 | return; |
| 135 | } | 135 | } |
| 136 | #else | 136 | #else |
| @@ -148,12 +148,12 @@ void MemArena::GrabLowMemSpace(size_t size) | |||
| 148 | } | 148 | } |
| 149 | else if (errno != EEXIST) | 149 | else if (errno != EEXIST) |
| 150 | { | 150 | { |
| 151 | ERROR_LOG(MEMMAP, "shm_open failed: %s", strerror(errno)); | 151 | LOG_ERROR(Common_Memory, "shm_open failed: %s", strerror(errno)); |
| 152 | return; | 152 | return; |
| 153 | } | 153 | } |
| 154 | } | 154 | } |
| 155 | if (ftruncate(fd, size) < 0) | 155 | if (ftruncate(fd, size) < 0) |
| 156 | ERROR_LOG(MEMMAP, "Failed to allocate low memory space"); | 156 | LOG_ERROR(Common_Memory, "Failed to allocate low memory space"); |
| 157 | #endif | 157 | #endif |
| 158 | } | 158 | } |
| 159 | 159 | ||
| @@ -197,7 +197,7 @@ void *MemArena::CreateView(s64 offset, size_t size, void *base) | |||
| 197 | 197 | ||
| 198 | if (retval == MAP_FAILED) | 198 | if (retval == MAP_FAILED) |
| 199 | { | 199 | { |
| 200 | NOTICE_LOG(MEMMAP, "mmap failed"); | 200 | LOG_ERROR(Common_Memory, "mmap failed"); |
| 201 | return nullptr; | 201 | return nullptr; |
| 202 | } | 202 | } |
| 203 | return retval; | 203 | return retval; |
| @@ -423,7 +423,7 @@ u8 *MemoryMap_Setup(const MemoryView *views, int num_views, u32 flags, MemArena | |||
| 423 | base = (u8 *)base_addr; | 423 | base = (u8 *)base_addr; |
| 424 | if (Memory_TryBase(base, views, num_views, flags, arena)) | 424 | if (Memory_TryBase(base, views, num_views, flags, arena)) |
| 425 | { | 425 | { |
| 426 | INFO_LOG(MEMMAP, "Found valid memory base at %p after %i tries.", base, base_attempts); | 426 | LOG_DEBUG(Common_Memory, "Found valid memory base at %p after %i tries.", base, base_attempts); |
| 427 | base_attempts = 0; | 427 | base_attempts = 0; |
| 428 | break; | 428 | break; |
| 429 | } | 429 | } |
| @@ -442,7 +442,7 @@ u8 *MemoryMap_Setup(const MemoryView *views, int num_views, u32 flags, MemArena | |||
| 442 | u8 *base = MemArena::Find4GBBase(); | 442 | u8 *base = MemArena::Find4GBBase(); |
| 443 | if (!Memory_TryBase(base, views, num_views, flags, arena)) | 443 | if (!Memory_TryBase(base, views, num_views, flags, arena)) |
| 444 | { | 444 | { |
| 445 | ERROR_LOG(MEMMAP, "MemoryMap_Setup: Failed finding a memory base."); | 445 | LOG_ERROR(Common_Memory, "MemoryMap_Setup: Failed finding a memory base."); |
| 446 | PanicAlert("MemoryMap_Setup: Failed finding a memory base."); | 446 | PanicAlert("MemoryMap_Setup: Failed finding a memory base."); |
| 447 | return 0; | 447 | return 0; |
| 448 | } | 448 | } |
diff --git a/src/common/memory_util.cpp b/src/common/memory_util.cpp index 93da5500b..ca8a2a9e4 100644 --- a/src/common/memory_util.cpp +++ b/src/common/memory_util.cpp | |||
| @@ -109,7 +109,7 @@ void* AllocateAlignedMemory(size_t size,size_t alignment) | |||
| 109 | ptr = memalign(alignment, size); | 109 | ptr = memalign(alignment, size); |
| 110 | #else | 110 | #else |
| 111 | if (posix_memalign(&ptr, alignment, size) != 0) | 111 | if (posix_memalign(&ptr, alignment, size) != 0) |
| 112 | ERROR_LOG(MEMMAP, "Failed to allocate aligned memory"); | 112 | LOG_ERROR(Common_Memory, "Failed to allocate aligned memory"); |
| 113 | #endif | 113 | #endif |
| 114 | #endif | 114 | #endif |
| 115 | 115 | ||
diff --git a/src/common/msg_handler.cpp b/src/common/msg_handler.cpp index b3556aaa8..7ffedc45a 100644 --- a/src/common/msg_handler.cpp +++ b/src/common/msg_handler.cpp | |||
| @@ -75,7 +75,7 @@ bool MsgAlert(bool yes_no, int Style, const char* format, ...) | |||
| 75 | Common::CharArrayFromFormatV(buffer, sizeof(buffer)-1, str_translator(format).c_str(), args); | 75 | Common::CharArrayFromFormatV(buffer, sizeof(buffer)-1, str_translator(format).c_str(), args); |
| 76 | va_end(args); | 76 | va_end(args); |
| 77 | 77 | ||
| 78 | ERROR_LOG(MASTER_LOG, "%s: %s", caption.c_str(), buffer); | 78 | LOG_INFO(Common, "%s: %s", caption.c_str(), buffer); |
| 79 | 79 | ||
| 80 | // Don't ignore questions, especially AskYesNo, PanicYesNo could be ignored | 80 | // Don't ignore questions, especially AskYesNo, PanicYesNo could be ignored |
| 81 | if (msg_handler && (AlertEnabled || Style == QUESTION || Style == CRITICAL)) | 81 | if (msg_handler && (AlertEnabled || Style == QUESTION || Style == CRITICAL)) |
diff --git a/src/common/string_util.cpp b/src/common/string_util.cpp index 7a8274a91..6d9612fb5 100644 --- a/src/common/string_util.cpp +++ b/src/common/string_util.cpp | |||
| @@ -107,7 +107,7 @@ std::string StringFromFormat(const char* format, ...) | |||
| 107 | #else | 107 | #else |
| 108 | va_start(args, format); | 108 | va_start(args, format); |
| 109 | if (vasprintf(&buf, format, args) < 0) | 109 | if (vasprintf(&buf, format, args) < 0) |
| 110 | ERROR_LOG(COMMON, "Unable to allocate memory for string"); | 110 | LOG_ERROR(Common, "Unable to allocate memory for string"); |
| 111 | va_end(args); | 111 | va_end(args); |
| 112 | 112 | ||
| 113 | std::string temp = buf; | 113 | std::string temp = buf; |
| @@ -475,7 +475,7 @@ static std::string CodeToUTF8(const char* fromcode, const std::basic_string<T>& | |||
| 475 | iconv_t const conv_desc = iconv_open("UTF-8", fromcode); | 475 | iconv_t const conv_desc = iconv_open("UTF-8", fromcode); |
| 476 | if ((iconv_t)(-1) == conv_desc) | 476 | if ((iconv_t)(-1) == conv_desc) |
| 477 | { | 477 | { |
| 478 | ERROR_LOG(COMMON, "Iconv initialization failure [%s]: %s", fromcode, strerror(errno)); | 478 | LOG_ERROR(Common, "Iconv initialization failure [%s]: %s", fromcode, strerror(errno)); |
| 479 | iconv_close(conv_desc); | 479 | iconv_close(conv_desc); |
| 480 | return {}; | 480 | return {}; |
| 481 | } | 481 | } |
| @@ -510,7 +510,7 @@ static std::string CodeToUTF8(const char* fromcode, const std::basic_string<T>& | |||
| 510 | } | 510 | } |
| 511 | else | 511 | else |
| 512 | { | 512 | { |
| 513 | ERROR_LOG(COMMON, "iconv failure [%s]: %s", fromcode, strerror(errno)); | 513 | LOG_ERROR(Common, "iconv failure [%s]: %s", fromcode, strerror(errno)); |
| 514 | break; | 514 | break; |
| 515 | } | 515 | } |
| 516 | } | 516 | } |
| @@ -531,7 +531,7 @@ std::u16string UTF8ToUTF16(const std::string& input) | |||
| 531 | iconv_t const conv_desc = iconv_open("UTF-16LE", "UTF-8"); | 531 | iconv_t const conv_desc = iconv_open("UTF-16LE", "UTF-8"); |
| 532 | if ((iconv_t)(-1) == conv_desc) | 532 | if ((iconv_t)(-1) == conv_desc) |
| 533 | { | 533 | { |
| 534 | ERROR_LOG(COMMON, "Iconv initialization failure [UTF-8]: %s", strerror(errno)); | 534 | LOG_ERROR(Common, "Iconv initialization failure [UTF-8]: %s", strerror(errno)); |
| 535 | iconv_close(conv_desc); | 535 | iconv_close(conv_desc); |
| 536 | return {}; | 536 | return {}; |
| 537 | } | 537 | } |
| @@ -566,7 +566,7 @@ std::u16string UTF8ToUTF16(const std::string& input) | |||
| 566 | } | 566 | } |
| 567 | else | 567 | else |
| 568 | { | 568 | { |
| 569 | ERROR_LOG(COMMON, "iconv failure [UTF-8]: %s", strerror(errno)); | 569 | LOG_ERROR(Common, "iconv failure [UTF-8]: %s", strerror(errno)); |
| 570 | break; | 570 | break; |
| 571 | } | 571 | } |
| 572 | } | 572 | } |
diff --git a/src/core/arm/dyncom/arm_dyncom_interpreter.cpp b/src/core/arm/dyncom/arm_dyncom_interpreter.cpp index 233cd3e3a..68012bffd 100644 --- a/src/core/arm/dyncom/arm_dyncom_interpreter.cpp +++ b/src/core/arm/dyncom/arm_dyncom_interpreter.cpp | |||
| @@ -433,9 +433,7 @@ typedef struct _ldst_inst { | |||
| 433 | unsigned int inst; | 433 | unsigned int inst; |
| 434 | get_addr_fp_t get_addr; | 434 | get_addr_fp_t get_addr; |
| 435 | } ldst_inst; | 435 | } ldst_inst; |
| 436 | #define DEBUG_MSG DEBUG_LOG(ARM11, "in %s %d\n", __FUNCTION__, __LINE__); \ | 436 | #define DEBUG_MSG LOG_DEBUG(Core_ARM11, "inst is %x", inst); CITRA_IGNORE_EXIT(0) |
| 437 | DEBUG_LOG(ARM11, "inst is %x\n", inst); \ | ||
| 438 | CITRA_IGNORE_EXIT(0) | ||
| 439 | 437 | ||
| 440 | int CondPassed(arm_processor *cpu, unsigned int cond); | 438 | int CondPassed(arm_processor *cpu, unsigned int cond); |
| 441 | #define LnSWoUB(s) glue(LnSWoUB, s) | 439 | #define LnSWoUB(s) glue(LnSWoUB, s) |
| @@ -1423,7 +1421,7 @@ inline void *AllocBuffer(unsigned int size) | |||
| 1423 | int start = top; | 1421 | int start = top; |
| 1424 | top += size; | 1422 | top += size; |
| 1425 | if (top > CACHE_BUFFER_SIZE) { | 1423 | if (top > CACHE_BUFFER_SIZE) { |
| 1426 | DEBUG_LOG(ARM11, "inst_buf is full\n"); | 1424 | LOG_ERROR(Core_ARM11, "inst_buf is full"); |
| 1427 | CITRA_IGNORE_EXIT(-1); | 1425 | CITRA_IGNORE_EXIT(-1); |
| 1428 | } | 1426 | } |
| 1429 | return (void *)&inst_buf[start]; | 1427 | return (void *)&inst_buf[start]; |
| @@ -1609,6 +1607,10 @@ get_addr_fp_t get_calc_addr_op(unsigned int inst) | |||
| 1609 | #define CHECK_RM (inst_cream->Rm == 15) | 1607 | #define CHECK_RM (inst_cream->Rm == 15) |
| 1610 | #define CHECK_RS (inst_cream->Rs == 15) | 1608 | #define CHECK_RS (inst_cream->Rs == 15) |
| 1611 | 1609 | ||
| 1610 | #define UNIMPLEMENTED_INSTRUCTION(mnemonic) \ | ||
| 1611 | LOG_ERROR(Core_ARM11, "unimplemented instruction: %s", mnemonic); \ | ||
| 1612 | CITRA_IGNORE_EXIT(-1); \ | ||
| 1613 | return nullptr; | ||
| 1612 | 1614 | ||
| 1613 | ARM_INST_PTR INTERPRETER_TRANSLATE(adc)(unsigned int inst, int index) | 1615 | ARM_INST_PTR INTERPRETER_TRANSLATE(adc)(unsigned int inst, int index) |
| 1614 | { | 1616 | { |
| @@ -1723,7 +1725,7 @@ ARM_INST_PTR INTERPRETER_TRANSLATE(bic)(unsigned int inst, int index) | |||
| 1723 | inst_base->br = INDIRECT_BRANCH; | 1725 | inst_base->br = INDIRECT_BRANCH; |
| 1724 | return inst_base; | 1726 | return inst_base; |
| 1725 | } | 1727 | } |
| 1726 | ARM_INST_PTR INTERPRETER_TRANSLATE(bkpt)(unsigned int inst, int index){DEBUG_LOG(ARM11, "in func %s\n", __FUNCTION__);CITRA_IGNORE_EXIT(-1); return nullptr;} | 1728 | ARM_INST_PTR INTERPRETER_TRANSLATE(bkpt)(unsigned int inst, int index) { UNIMPLEMENTED_INSTRUCTION("BKPT"); } |
| 1727 | ARM_INST_PTR INTERPRETER_TRANSLATE(blx)(unsigned int inst, int index) | 1729 | ARM_INST_PTR INTERPRETER_TRANSLATE(blx)(unsigned int inst, int index) |
| 1728 | { | 1730 | { |
| 1729 | arm_inst *inst_base = (arm_inst *)AllocBuffer(sizeof(arm_inst) + sizeof(blx_inst)); | 1731 | arm_inst *inst_base = (arm_inst *)AllocBuffer(sizeof(arm_inst) + sizeof(blx_inst)); |
| @@ -1758,7 +1760,7 @@ ARM_INST_PTR INTERPRETER_TRANSLATE(bx)(unsigned int inst, int index) | |||
| 1758 | 1760 | ||
| 1759 | return inst_base; | 1761 | return inst_base; |
| 1760 | } | 1762 | } |
| 1761 | ARM_INST_PTR INTERPRETER_TRANSLATE(bxj)(unsigned int inst, int index){DEBUG_LOG(ARM11, "in func %s\n", __FUNCTION__);CITRA_IGNORE_EXIT(-1); return nullptr;} | 1763 | ARM_INST_PTR INTERPRETER_TRANSLATE(bxj)(unsigned int inst, int index) { UNIMPLEMENTED_INSTRUCTION("BXJ"); } |
| 1762 | ARM_INST_PTR INTERPRETER_TRANSLATE(cdp)(unsigned int inst, int index){ | 1764 | ARM_INST_PTR INTERPRETER_TRANSLATE(cdp)(unsigned int inst, int index){ |
| 1763 | arm_inst *inst_base = (arm_inst *)AllocBuffer(sizeof(arm_inst) + sizeof(cdp_inst)); | 1765 | arm_inst *inst_base = (arm_inst *)AllocBuffer(sizeof(arm_inst) + sizeof(cdp_inst)); |
| 1764 | cdp_inst *inst_cream = (cdp_inst *)inst_base->component; | 1766 | cdp_inst *inst_cream = (cdp_inst *)inst_base->component; |
| @@ -1775,7 +1777,7 @@ ARM_INST_PTR INTERPRETER_TRANSLATE(cdp)(unsigned int inst, int index){ | |||
| 1775 | inst_cream->opcode_1 = BITS(inst, 20, 23); | 1777 | inst_cream->opcode_1 = BITS(inst, 20, 23); |
| 1776 | inst_cream->inst = inst; | 1778 | inst_cream->inst = inst; |
| 1777 | 1779 | ||
| 1778 | DEBUG_LOG(ARM11, "in func %s inst %x index %x\n", __FUNCTION__, inst, index); | 1780 | LOG_TRACE(Core_ARM11, "inst %x index %x", inst, index); |
| 1779 | return inst_base; | 1781 | return inst_base; |
| 1780 | } | 1782 | } |
| 1781 | ARM_INST_PTR INTERPRETER_TRANSLATE(clrex)(unsigned int inst, int index) | 1783 | ARM_INST_PTR INTERPRETER_TRANSLATE(clrex)(unsigned int inst, int index) |
| @@ -2205,7 +2207,7 @@ ARM_INST_PTR INTERPRETER_TRANSLATE(mcr)(unsigned int inst, int index) | |||
| 2205 | inst_cream->inst = inst; | 2207 | inst_cream->inst = inst; |
| 2206 | return inst_base; | 2208 | return inst_base; |
| 2207 | } | 2209 | } |
| 2208 | ARM_INST_PTR INTERPRETER_TRANSLATE(mcrr)(unsigned int inst, int index){DEBUG_LOG(ARM11, "in func %s\n", __FUNCTION__);CITRA_IGNORE_EXIT(-1); return nullptr;} | 2210 | ARM_INST_PTR INTERPRETER_TRANSLATE(mcrr)(unsigned int inst, int index) { UNIMPLEMENTED_INSTRUCTION("MCRR"); } |
| 2209 | ARM_INST_PTR INTERPRETER_TRANSLATE(mla)(unsigned int inst, int index) | 2211 | ARM_INST_PTR INTERPRETER_TRANSLATE(mla)(unsigned int inst, int index) |
| 2210 | { | 2212 | { |
| 2211 | arm_inst *inst_base = (arm_inst *)AllocBuffer(sizeof(arm_inst) + sizeof(mla_inst)); | 2213 | arm_inst *inst_base = (arm_inst *)AllocBuffer(sizeof(arm_inst) + sizeof(mla_inst)); |
| @@ -2264,7 +2266,7 @@ ARM_INST_PTR INTERPRETER_TRANSLATE(mrc)(unsigned int inst, int index) | |||
| 2264 | inst_cream->inst = inst; | 2266 | inst_cream->inst = inst; |
| 2265 | return inst_base; | 2267 | return inst_base; |
| 2266 | } | 2268 | } |
| 2267 | ARM_INST_PTR INTERPRETER_TRANSLATE(mrrc)(unsigned int inst, int index){DEBUG_LOG(ARM11, "in func %s\n", __FUNCTION__);CITRA_IGNORE_EXIT(-1); return nullptr;} | 2269 | ARM_INST_PTR INTERPRETER_TRANSLATE(mrrc)(unsigned int inst, int index) { UNIMPLEMENTED_INSTRUCTION("MRRC"); } |
| 2268 | ARM_INST_PTR INTERPRETER_TRANSLATE(mrs)(unsigned int inst, int index) | 2270 | ARM_INST_PTR INTERPRETER_TRANSLATE(mrs)(unsigned int inst, int index) |
| 2269 | { | 2271 | { |
| 2270 | arm_inst *inst_base = (arm_inst *)AllocBuffer(sizeof(arm_inst) + sizeof(mrs_inst)); | 2272 | arm_inst *inst_base = (arm_inst *)AllocBuffer(sizeof(arm_inst) + sizeof(mrs_inst)); |
| @@ -2358,8 +2360,8 @@ ARM_INST_PTR INTERPRETER_TRANSLATE(orr)(unsigned int inst, int index) | |||
| 2358 | } | 2360 | } |
| 2359 | return inst_base; | 2361 | return inst_base; |
| 2360 | } | 2362 | } |
| 2361 | ARM_INST_PTR INTERPRETER_TRANSLATE(pkhbt)(unsigned int inst, int index){DEBUG_LOG(ARM11, "in func %s\n", __FUNCTION__);CITRA_IGNORE_EXIT(-1); return nullptr;} | 2363 | ARM_INST_PTR INTERPRETER_TRANSLATE(pkhbt)(unsigned int inst, int index) { UNIMPLEMENTED_INSTRUCTION("PKHBT"); } |
| 2362 | ARM_INST_PTR INTERPRETER_TRANSLATE(pkhtb)(unsigned int inst, int index){DEBUG_LOG(ARM11, "in func %s\n", __FUNCTION__);CITRA_IGNORE_EXIT(-1); return nullptr;} | 2364 | ARM_INST_PTR INTERPRETER_TRANSLATE(pkhtb)(unsigned int inst, int index) { UNIMPLEMENTED_INSTRUCTION("PKHTB"); } |
| 2363 | ARM_INST_PTR INTERPRETER_TRANSLATE(pld)(unsigned int inst, int index) | 2365 | ARM_INST_PTR INTERPRETER_TRANSLATE(pld)(unsigned int inst, int index) |
| 2364 | { | 2366 | { |
| 2365 | arm_inst *inst_base = (arm_inst *)AllocBuffer(sizeof(arm_inst) + sizeof(pld_inst)); | 2367 | arm_inst *inst_base = (arm_inst *)AllocBuffer(sizeof(arm_inst) + sizeof(pld_inst)); |
| @@ -2371,16 +2373,16 @@ ARM_INST_PTR INTERPRETER_TRANSLATE(pld)(unsigned int inst, int index) | |||
| 2371 | 2373 | ||
| 2372 | return inst_base; | 2374 | return inst_base; |
| 2373 | } | 2375 | } |
| 2374 | ARM_INST_PTR INTERPRETER_TRANSLATE(qadd)(unsigned int inst, int index){DEBUG_LOG(ARM11, "in func %s\n", __FUNCTION__);CITRA_IGNORE_EXIT(-1); return nullptr;} | 2376 | ARM_INST_PTR INTERPRETER_TRANSLATE(qadd)(unsigned int inst, int index) { UNIMPLEMENTED_INSTRUCTION("QADD"); } |
| 2375 | ARM_INST_PTR INTERPRETER_TRANSLATE(qadd16)(unsigned int inst, int index){DEBUG_LOG(ARM11, "in func %s\n", __FUNCTION__);CITRA_IGNORE_EXIT(-1); return nullptr;} | 2377 | ARM_INST_PTR INTERPRETER_TRANSLATE(qadd16)(unsigned int inst, int index) { UNIMPLEMENTED_INSTRUCTION("QADD16"); } |
| 2376 | ARM_INST_PTR INTERPRETER_TRANSLATE(qadd8)(unsigned int inst, int index){DEBUG_LOG(ARM11, "in func %s\n", __FUNCTION__);CITRA_IGNORE_EXIT(-1); return nullptr;} | 2378 | ARM_INST_PTR INTERPRETER_TRANSLATE(qadd8)(unsigned int inst, int index) { UNIMPLEMENTED_INSTRUCTION("QADD8"); } |
| 2377 | ARM_INST_PTR INTERPRETER_TRANSLATE(qaddsubx)(unsigned int inst, int index){DEBUG_LOG(ARM11, "in func %s\n", __FUNCTION__);CITRA_IGNORE_EXIT(-1); return nullptr;} | 2379 | ARM_INST_PTR INTERPRETER_TRANSLATE(qaddsubx)(unsigned int inst, int index) { UNIMPLEMENTED_INSTRUCTION("QADDSUBX"); } |
| 2378 | ARM_INST_PTR INTERPRETER_TRANSLATE(qdadd)(unsigned int inst, int index){DEBUG_LOG(ARM11, "in func %s\n", __FUNCTION__);CITRA_IGNORE_EXIT(-1); return nullptr;} | 2380 | ARM_INST_PTR INTERPRETER_TRANSLATE(qdadd)(unsigned int inst, int index) { UNIMPLEMENTED_INSTRUCTION("QDADD"); } |
| 2379 | ARM_INST_PTR INTERPRETER_TRANSLATE(qdsub)(unsigned int inst, int index){DEBUG_LOG(ARM11, "in func %s\n", __FUNCTION__);CITRA_IGNORE_EXIT(-1); return nullptr;} | 2381 | ARM_INST_PTR INTERPRETER_TRANSLATE(qdsub)(unsigned int inst, int index) { UNIMPLEMENTED_INSTRUCTION("QDSUB"); } |
| 2380 | ARM_INST_PTR INTERPRETER_TRANSLATE(qsub)(unsigned int inst, int index){DEBUG_LOG(ARM11, "in func %s\n", __FUNCTION__);CITRA_IGNORE_EXIT(-1); return nullptr;} | 2382 | ARM_INST_PTR INTERPRETER_TRANSLATE(qsub)(unsigned int inst, int index) { UNIMPLEMENTED_INSTRUCTION("QSUB"); } |
| 2381 | ARM_INST_PTR INTERPRETER_TRANSLATE(qsub16)(unsigned int inst, int index){DEBUG_LOG(ARM11, "in func %s\n", __FUNCTION__);CITRA_IGNORE_EXIT(-1); return nullptr;} | 2383 | ARM_INST_PTR INTERPRETER_TRANSLATE(qsub16)(unsigned int inst, int index) { UNIMPLEMENTED_INSTRUCTION("QSUB16"); } |
| 2382 | ARM_INST_PTR INTERPRETER_TRANSLATE(qsub8)(unsigned int inst, int index){DEBUG_LOG(ARM11, "in func %s\n", __FUNCTION__);CITRA_IGNORE_EXIT(-1); return nullptr;} | 2384 | ARM_INST_PTR INTERPRETER_TRANSLATE(qsub8)(unsigned int inst, int index) { UNIMPLEMENTED_INSTRUCTION("QSUB8"); } |
| 2383 | ARM_INST_PTR INTERPRETER_TRANSLATE(qsubaddx)(unsigned int inst, int index){DEBUG_LOG(ARM11, "in func %s\n", __FUNCTION__);CITRA_IGNORE_EXIT(-1); return nullptr;} | 2385 | ARM_INST_PTR INTERPRETER_TRANSLATE(qsubaddx)(unsigned int inst, int index) { UNIMPLEMENTED_INSTRUCTION("QSUBADDX"); } |
| 2384 | ARM_INST_PTR INTERPRETER_TRANSLATE(rev)(unsigned int inst, int index) | 2386 | ARM_INST_PTR INTERPRETER_TRANSLATE(rev)(unsigned int inst, int index) |
| 2385 | { | 2387 | { |
| 2386 | arm_inst *inst_base = (arm_inst *)AllocBuffer(sizeof(arm_inst) + sizeof(rev_inst)); | 2388 | arm_inst *inst_base = (arm_inst *)AllocBuffer(sizeof(arm_inst) + sizeof(rev_inst)); |
| @@ -2410,8 +2412,8 @@ ARM_INST_PTR INTERPRETER_TRANSLATE(rev16)(unsigned int inst, int index){ | |||
| 2410 | 2412 | ||
| 2411 | return inst_base; | 2413 | return inst_base; |
| 2412 | } | 2414 | } |
| 2413 | ARM_INST_PTR INTERPRETER_TRANSLATE(revsh)(unsigned int inst, int index){DEBUG_LOG(ARM11, "in func %s\n", __FUNCTION__);CITRA_IGNORE_EXIT(-1); return nullptr;} | 2415 | ARM_INST_PTR INTERPRETER_TRANSLATE(revsh)(unsigned int inst, int index) { UNIMPLEMENTED_INSTRUCTION("REVSH"); } |
| 2414 | ARM_INST_PTR INTERPRETER_TRANSLATE(rfe)(unsigned int inst, int index){DEBUG_LOG(ARM11, "in func %s\n", __FUNCTION__);CITRA_IGNORE_EXIT(-1); return nullptr;} | 2416 | ARM_INST_PTR INTERPRETER_TRANSLATE(rfe)(unsigned int inst, int index) { UNIMPLEMENTED_INSTRUCTION("RFE"); } |
| 2415 | ARM_INST_PTR INTERPRETER_TRANSLATE(rsb)(unsigned int inst, int index) | 2417 | ARM_INST_PTR INTERPRETER_TRANSLATE(rsb)(unsigned int inst, int index) |
| 2416 | { | 2418 | { |
| 2417 | arm_inst *inst_base = (arm_inst *)AllocBuffer(sizeof(arm_inst) + sizeof(rsb_inst)); | 2419 | arm_inst *inst_base = (arm_inst *)AllocBuffer(sizeof(arm_inst) + sizeof(rsb_inst)); |
| @@ -2460,9 +2462,9 @@ ARM_INST_PTR INTERPRETER_TRANSLATE(rsc)(unsigned int inst, int index) | |||
| 2460 | } | 2462 | } |
| 2461 | return inst_base; | 2463 | return inst_base; |
| 2462 | } | 2464 | } |
| 2463 | ARM_INST_PTR INTERPRETER_TRANSLATE(sadd16)(unsigned int inst, int index){DEBUG_LOG(ARM11, "in func %s\n", __FUNCTION__);CITRA_IGNORE_EXIT(-1); return nullptr;} | 2465 | ARM_INST_PTR INTERPRETER_TRANSLATE(sadd16)(unsigned int inst, int index) { UNIMPLEMENTED_INSTRUCTION("SADD16"); } |
| 2464 | ARM_INST_PTR INTERPRETER_TRANSLATE(sadd8)(unsigned int inst, int index){DEBUG_LOG(ARM11, "in func %s\n", __FUNCTION__);CITRA_IGNORE_EXIT(-1); return nullptr;} | 2466 | ARM_INST_PTR INTERPRETER_TRANSLATE(sadd8)(unsigned int inst, int index) { UNIMPLEMENTED_INSTRUCTION("SADD8"); } |
| 2465 | ARM_INST_PTR INTERPRETER_TRANSLATE(saddsubx)(unsigned int inst, int index){DEBUG_LOG(ARM11, "in func %s\n", __FUNCTION__);CITRA_IGNORE_EXIT(-1); return nullptr;} | 2467 | ARM_INST_PTR INTERPRETER_TRANSLATE(saddsubx)(unsigned int inst, int index) { UNIMPLEMENTED_INSTRUCTION("SADDSUBX"); } |
| 2466 | ARM_INST_PTR INTERPRETER_TRANSLATE(sbc)(unsigned int inst, int index) | 2468 | ARM_INST_PTR INTERPRETER_TRANSLATE(sbc)(unsigned int inst, int index) |
| 2467 | { | 2469 | { |
| 2468 | arm_inst *inst_base = (arm_inst *)AllocBuffer(sizeof(arm_inst) + sizeof(sbc_inst)); | 2470 | arm_inst *inst_base = (arm_inst *)AllocBuffer(sizeof(arm_inst) + sizeof(sbc_inst)); |
| @@ -2487,14 +2489,14 @@ ARM_INST_PTR INTERPRETER_TRANSLATE(sbc)(unsigned int inst, int index) | |||
| 2487 | } | 2489 | } |
| 2488 | return inst_base; | 2490 | return inst_base; |
| 2489 | } | 2491 | } |
| 2490 | ARM_INST_PTR INTERPRETER_TRANSLATE(sel)(unsigned int inst, int index){DEBUG_LOG(ARM11, "in func %s\n", __FUNCTION__);CITRA_IGNORE_EXIT(-1); return nullptr;} | 2492 | ARM_INST_PTR INTERPRETER_TRANSLATE(sel)(unsigned int inst, int index) { UNIMPLEMENTED_INSTRUCTION("SEL"); } |
| 2491 | ARM_INST_PTR INTERPRETER_TRANSLATE(setend)(unsigned int inst, int index){DEBUG_LOG(ARM11, "in func %s\n", __FUNCTION__);CITRA_IGNORE_EXIT(-1); return nullptr;} | 2493 | ARM_INST_PTR INTERPRETER_TRANSLATE(setend)(unsigned int inst, int index) { UNIMPLEMENTED_INSTRUCTION("SETEND"); } |
| 2492 | ARM_INST_PTR INTERPRETER_TRANSLATE(shadd16)(unsigned int inst, int index){DEBUG_LOG(ARM11, "in func %s\n", __FUNCTION__);CITRA_IGNORE_EXIT(-1); return nullptr;} | 2494 | ARM_INST_PTR INTERPRETER_TRANSLATE(shadd16)(unsigned int inst, int index) { UNIMPLEMENTED_INSTRUCTION("SHADD16"); } |
| 2493 | ARM_INST_PTR INTERPRETER_TRANSLATE(shadd8)(unsigned int inst, int index){DEBUG_LOG(ARM11, "in func %s\n", __FUNCTION__);CITRA_IGNORE_EXIT(-1); return nullptr;} | 2495 | ARM_INST_PTR INTERPRETER_TRANSLATE(shadd8)(unsigned int inst, int index) { UNIMPLEMENTED_INSTRUCTION("SHADD8"); } |
| 2494 | ARM_INST_PTR INTERPRETER_TRANSLATE(shaddsubx)(unsigned int inst, int index){DEBUG_LOG(ARM11, "in func %s\n", __FUNCTION__);CITRA_IGNORE_EXIT(-1); return nullptr;} | 2496 | ARM_INST_PTR INTERPRETER_TRANSLATE(shaddsubx)(unsigned int inst, int index) { UNIMPLEMENTED_INSTRUCTION("SHADDSUBX"); } |
| 2495 | ARM_INST_PTR INTERPRETER_TRANSLATE(shsub16)(unsigned int inst, int index){DEBUG_LOG(ARM11, "in func %s\n", __FUNCTION__);CITRA_IGNORE_EXIT(-1); return nullptr;} | 2497 | ARM_INST_PTR INTERPRETER_TRANSLATE(shsub16)(unsigned int inst, int index) { UNIMPLEMENTED_INSTRUCTION("SHSUB16"); } |
| 2496 | ARM_INST_PTR INTERPRETER_TRANSLATE(shsub8)(unsigned int inst, int index){DEBUG_LOG(ARM11, "in func %s\n", __FUNCTION__);CITRA_IGNORE_EXIT(-1); return nullptr;} | 2498 | ARM_INST_PTR INTERPRETER_TRANSLATE(shsub8)(unsigned int inst, int index) { UNIMPLEMENTED_INSTRUCTION("SHSUB8"); } |
| 2497 | ARM_INST_PTR INTERPRETER_TRANSLATE(shsubaddx)(unsigned int inst, int index){DEBUG_LOG(ARM11, "in func %s\n", __FUNCTION__);CITRA_IGNORE_EXIT(-1); return nullptr;} | 2499 | ARM_INST_PTR INTERPRETER_TRANSLATE(shsubaddx)(unsigned int inst, int index) { UNIMPLEMENTED_INSTRUCTION("SHSUBADDX"); } |
| 2498 | ARM_INST_PTR INTERPRETER_TRANSLATE(smla)(unsigned int inst, int index) | 2500 | ARM_INST_PTR INTERPRETER_TRANSLATE(smla)(unsigned int inst, int index) |
| 2499 | { | 2501 | { |
| 2500 | arm_inst *inst_base = (arm_inst *)AllocBuffer(sizeof(arm_inst) + sizeof(smla_inst)); | 2502 | arm_inst *inst_base = (arm_inst *)AllocBuffer(sizeof(arm_inst) + sizeof(smla_inst)); |
| @@ -2553,15 +2555,15 @@ ARM_INST_PTR INTERPRETER_TRANSLATE(smlal)(unsigned int inst, int index) | |||
| 2553 | inst_base->load_r15 = 1; | 2555 | inst_base->load_r15 = 1; |
| 2554 | return inst_base; | 2556 | return inst_base; |
| 2555 | } | 2557 | } |
| 2556 | ARM_INST_PTR INTERPRETER_TRANSLATE(smlalxy)(unsigned int inst, int index){DEBUG_LOG(ARM11, "in func %s\n", __FUNCTION__);CITRA_IGNORE_EXIT(-1); return nullptr;} | 2558 | ARM_INST_PTR INTERPRETER_TRANSLATE(smlalxy)(unsigned int inst, int index) { UNIMPLEMENTED_INSTRUCTION("SMLALXY"); } |
| 2557 | ARM_INST_PTR INTERPRETER_TRANSLATE(smlald)(unsigned int inst, int index){DEBUG_LOG(ARM11, "in func %s\n", __FUNCTION__);CITRA_IGNORE_EXIT(-1); return nullptr;} | 2559 | ARM_INST_PTR INTERPRETER_TRANSLATE(smlald)(unsigned int inst, int index) { UNIMPLEMENTED_INSTRUCTION("SMLALD"); } |
| 2558 | ARM_INST_PTR INTERPRETER_TRANSLATE(smlaw)(unsigned int inst, int index){DEBUG_LOG(ARM11, "in func %s\n", __FUNCTION__);CITRA_IGNORE_EXIT(-1); return nullptr;} | 2560 | ARM_INST_PTR INTERPRETER_TRANSLATE(smlaw)(unsigned int inst, int index) { UNIMPLEMENTED_INSTRUCTION("SMLAW"); } |
| 2559 | ARM_INST_PTR INTERPRETER_TRANSLATE(smlsd)(unsigned int inst, int index){DEBUG_LOG(ARM11, "in func %s\n", __FUNCTION__);CITRA_IGNORE_EXIT(-1); return nullptr;} | 2561 | ARM_INST_PTR INTERPRETER_TRANSLATE(smlsd)(unsigned int inst, int index) { UNIMPLEMENTED_INSTRUCTION("SMLSD"); } |
| 2560 | ARM_INST_PTR INTERPRETER_TRANSLATE(smlsld)(unsigned int inst, int index){DEBUG_LOG(ARM11, "in func %s\n", __FUNCTION__);CITRA_IGNORE_EXIT(-1); return nullptr;} | 2562 | ARM_INST_PTR INTERPRETER_TRANSLATE(smlsld)(unsigned int inst, int index) { UNIMPLEMENTED_INSTRUCTION("SMLSLD"); } |
| 2561 | ARM_INST_PTR INTERPRETER_TRANSLATE(smmla)(unsigned int inst, int index){DEBUG_LOG(ARM11, "in func %s\n", __FUNCTION__);CITRA_IGNORE_EXIT(-1); return nullptr;} | 2563 | ARM_INST_PTR INTERPRETER_TRANSLATE(smmla)(unsigned int inst, int index) { UNIMPLEMENTED_INSTRUCTION("SMMLA"); } |
| 2562 | ARM_INST_PTR INTERPRETER_TRANSLATE(smmls)(unsigned int inst, int index){DEBUG_LOG(ARM11, "in func %s\n", __FUNCTION__);CITRA_IGNORE_EXIT(-1); return nullptr;} | 2564 | ARM_INST_PTR INTERPRETER_TRANSLATE(smmls)(unsigned int inst, int index) { UNIMPLEMENTED_INSTRUCTION("SMMLS"); } |
| 2563 | ARM_INST_PTR INTERPRETER_TRANSLATE(smmul)(unsigned int inst, int index){DEBUG_LOG(ARM11, "in func %s\n", __FUNCTION__);CITRA_IGNORE_EXIT(-1); return nullptr;} | 2565 | ARM_INST_PTR INTERPRETER_TRANSLATE(smmul)(unsigned int inst, int index) { UNIMPLEMENTED_INSTRUCTION("SMMUL"); } |
| 2564 | ARM_INST_PTR INTERPRETER_TRANSLATE(smuad)(unsigned int inst, int index){DEBUG_LOG(ARM11, "in func %s\n", __FUNCTION__);CITRA_IGNORE_EXIT(-1); return nullptr;} | 2566 | ARM_INST_PTR INTERPRETER_TRANSLATE(smuad)(unsigned int inst, int index) { UNIMPLEMENTED_INSTRUCTION("SMUAD"); } |
| 2565 | ARM_INST_PTR INTERPRETER_TRANSLATE(smul)(unsigned int inst, int index) | 2567 | ARM_INST_PTR INTERPRETER_TRANSLATE(smul)(unsigned int inst, int index) |
| 2566 | { | 2568 | { |
| 2567 | arm_inst *inst_base = (arm_inst *)AllocBuffer(sizeof(arm_inst) + sizeof(smul_inst)); | 2569 | arm_inst *inst_base = (arm_inst *)AllocBuffer(sizeof(arm_inst) + sizeof(smul_inst)); |
| @@ -2624,13 +2626,13 @@ ARM_INST_PTR INTERPRETER_TRANSLATE(smulw)(unsigned int inst, int index) | |||
| 2624 | inst_base->load_r15 = 1; | 2626 | inst_base->load_r15 = 1; |
| 2625 | return inst_base; | 2627 | return inst_base; |
| 2626 | } | 2628 | } |
| 2627 | ARM_INST_PTR INTERPRETER_TRANSLATE(smusd)(unsigned int inst, int index){DEBUG_LOG(ARM11, "in func %s\n", __FUNCTION__);CITRA_IGNORE_EXIT(-1); return nullptr;} | 2629 | ARM_INST_PTR INTERPRETER_TRANSLATE(smusd)(unsigned int inst, int index) { UNIMPLEMENTED_INSTRUCTION("SMUSD"); } |
| 2628 | ARM_INST_PTR INTERPRETER_TRANSLATE(srs)(unsigned int inst, int index){DEBUG_LOG(ARM11, "in func %s\n", __FUNCTION__);CITRA_IGNORE_EXIT(-1); return nullptr;} | 2630 | ARM_INST_PTR INTERPRETER_TRANSLATE(srs)(unsigned int inst, int index) { UNIMPLEMENTED_INSTRUCTION("SRS"); } |
| 2629 | ARM_INST_PTR INTERPRETER_TRANSLATE(ssat)(unsigned int inst, int index){DEBUG_LOG(ARM11, "in func %s\n", __FUNCTION__);CITRA_IGNORE_EXIT(-1); return nullptr;} | 2631 | ARM_INST_PTR INTERPRETER_TRANSLATE(ssat)(unsigned int inst, int index) { UNIMPLEMENTED_INSTRUCTION("SSAT"); } |
| 2630 | ARM_INST_PTR INTERPRETER_TRANSLATE(ssat16)(unsigned int inst, int index){DEBUG_LOG(ARM11, "in func %s\n", __FUNCTION__);CITRA_IGNORE_EXIT(-1); return nullptr;} | 2632 | ARM_INST_PTR INTERPRETER_TRANSLATE(ssat16)(unsigned int inst, int index) { UNIMPLEMENTED_INSTRUCTION("SSAT16"); } |
| 2631 | ARM_INST_PTR INTERPRETER_TRANSLATE(ssub16)(unsigned int inst, int index){DEBUG_LOG(ARM11, "in func %s\n", __FUNCTION__);CITRA_IGNORE_EXIT(-1); return nullptr;} | 2633 | ARM_INST_PTR INTERPRETER_TRANSLATE(ssub16)(unsigned int inst, int index) { UNIMPLEMENTED_INSTRUCTION("SSUB16"); } |
| 2632 | ARM_INST_PTR INTERPRETER_TRANSLATE(ssub8)(unsigned int inst, int index){DEBUG_LOG(ARM11, "in func %s\n", __FUNCTION__);CITRA_IGNORE_EXIT(-1); return nullptr;} | 2634 | ARM_INST_PTR INTERPRETER_TRANSLATE(ssub8)(unsigned int inst, int index) { UNIMPLEMENTED_INSTRUCTION("SSUB8"); } |
| 2633 | ARM_INST_PTR INTERPRETER_TRANSLATE(ssubaddx)(unsigned int inst, int index){DEBUG_LOG(ARM11, "in func %s\n", __FUNCTION__);CITRA_IGNORE_EXIT(-1); return nullptr;} | 2635 | ARM_INST_PTR INTERPRETER_TRANSLATE(ssubaddx)(unsigned int inst, int index) { UNIMPLEMENTED_INSTRUCTION("SSUBADDX"); } |
| 2634 | ARM_INST_PTR INTERPRETER_TRANSLATE(stc)(unsigned int inst, int index) | 2636 | ARM_INST_PTR INTERPRETER_TRANSLATE(stc)(unsigned int inst, int index) |
| 2635 | { | 2637 | { |
| 2636 | arm_inst *inst_base = (arm_inst *)AllocBuffer(sizeof(arm_inst) + sizeof(stc_inst)); | 2638 | arm_inst *inst_base = (arm_inst *)AllocBuffer(sizeof(arm_inst) + sizeof(stc_inst)); |
| @@ -2937,9 +2939,9 @@ ARM_INST_PTR INTERPRETER_TRANSLATE(sxtab)(unsigned int inst, int index){ | |||
| 2937 | 2939 | ||
| 2938 | return inst_base; | 2940 | return inst_base; |
| 2939 | } | 2941 | } |
| 2940 | ARM_INST_PTR INTERPRETER_TRANSLATE(sxtab16)(unsigned int inst, int index){DEBUG_LOG(ARM11, "in func %s\n", __FUNCTION__);CITRA_IGNORE_EXIT(-1); return nullptr;} | 2942 | ARM_INST_PTR INTERPRETER_TRANSLATE(sxtab16)(unsigned int inst, int index) { UNIMPLEMENTED_INSTRUCTION("SXTAB16"); } |
| 2941 | ARM_INST_PTR INTERPRETER_TRANSLATE(sxtah)(unsigned int inst, int index){ | 2943 | ARM_INST_PTR INTERPRETER_TRANSLATE(sxtah)(unsigned int inst, int index){ |
| 2942 | DEBUG_LOG(ARM11, "in func %s, SXTAH untested\n", __func__); | 2944 | LOG_WARNING(Core_ARM11, "SXTAH untested"); |
| 2943 | arm_inst *inst_base = (arm_inst *)AllocBuffer(sizeof(arm_inst) + sizeof(sxtah_inst)); | 2945 | arm_inst *inst_base = (arm_inst *)AllocBuffer(sizeof(arm_inst) + sizeof(sxtah_inst)); |
| 2944 | sxtah_inst *inst_cream = (sxtah_inst *)inst_base->component; | 2946 | sxtah_inst *inst_cream = (sxtah_inst *)inst_base->component; |
| 2945 | 2947 | ||
| @@ -2955,7 +2957,7 @@ ARM_INST_PTR INTERPRETER_TRANSLATE(sxtah)(unsigned int inst, int index){ | |||
| 2955 | 2957 | ||
| 2956 | return inst_base; | 2958 | return inst_base; |
| 2957 | } | 2959 | } |
| 2958 | ARM_INST_PTR INTERPRETER_TRANSLATE(sxtb16)(unsigned int inst, int index){DEBUG_LOG(ARM11, "in func %s\n", __FUNCTION__);CITRA_IGNORE_EXIT(-1); return nullptr;} | 2960 | ARM_INST_PTR INTERPRETER_TRANSLATE(sxtb16)(unsigned int inst, int index) { UNIMPLEMENTED_INSTRUCTION("SXTB16"); } |
| 2959 | ARM_INST_PTR INTERPRETER_TRANSLATE(teq)(unsigned int inst, int index) | 2961 | ARM_INST_PTR INTERPRETER_TRANSLATE(teq)(unsigned int inst, int index) |
| 2960 | { | 2962 | { |
| 2961 | arm_inst *inst_base = (arm_inst *)AllocBuffer(sizeof(arm_inst) + sizeof(teq_inst)); | 2963 | arm_inst *inst_base = (arm_inst *)AllocBuffer(sizeof(arm_inst) + sizeof(teq_inst)); |
| @@ -2999,16 +3001,16 @@ ARM_INST_PTR INTERPRETER_TRANSLATE(tst)(unsigned int inst, int index) | |||
| 2999 | inst_base->load_r15 = 1; | 3001 | inst_base->load_r15 = 1; |
| 3000 | return inst_base; | 3002 | return inst_base; |
| 3001 | } | 3003 | } |
| 3002 | ARM_INST_PTR INTERPRETER_TRANSLATE(uadd16)(unsigned int inst, int index){DEBUG_LOG(ARM11, "in func %s\n", __FUNCTION__);CITRA_IGNORE_EXIT(-1); return nullptr;} | 3004 | ARM_INST_PTR INTERPRETER_TRANSLATE(uadd16)(unsigned int inst, int index) { UNIMPLEMENTED_INSTRUCTION("UADD16"); } |
| 3003 | ARM_INST_PTR INTERPRETER_TRANSLATE(uadd8)(unsigned int inst, int index){DEBUG_LOG(ARM11, "in func %s\n", __FUNCTION__);CITRA_IGNORE_EXIT(-1); return nullptr;} | 3005 | ARM_INST_PTR INTERPRETER_TRANSLATE(uadd8)(unsigned int inst, int index) { UNIMPLEMENTED_INSTRUCTION("UADD8"); } |
| 3004 | ARM_INST_PTR INTERPRETER_TRANSLATE(uaddsubx)(unsigned int inst, int index){DEBUG_LOG(ARM11, "in func %s\n", __FUNCTION__);CITRA_IGNORE_EXIT(-1); return nullptr;} | 3006 | ARM_INST_PTR INTERPRETER_TRANSLATE(uaddsubx)(unsigned int inst, int index) { UNIMPLEMENTED_INSTRUCTION("UADDSUBX"); } |
| 3005 | ARM_INST_PTR INTERPRETER_TRANSLATE(uhadd16)(unsigned int inst, int index){DEBUG_LOG(ARM11, "in func %s\n", __FUNCTION__);CITRA_IGNORE_EXIT(-1); return nullptr;} | 3007 | ARM_INST_PTR INTERPRETER_TRANSLATE(uhadd16)(unsigned int inst, int index) { UNIMPLEMENTED_INSTRUCTION("UHADD16"); } |
| 3006 | ARM_INST_PTR INTERPRETER_TRANSLATE(uhadd8)(unsigned int inst, int index){DEBUG_LOG(ARM11, "in func %s\n", __FUNCTION__);CITRA_IGNORE_EXIT(-1); return nullptr;} | 3008 | ARM_INST_PTR INTERPRETER_TRANSLATE(uhadd8)(unsigned int inst, int index) { UNIMPLEMENTED_INSTRUCTION("UHADD8"); } |
| 3007 | ARM_INST_PTR INTERPRETER_TRANSLATE(uhaddsubx)(unsigned int inst, int index){DEBUG_LOG(ARM11, "in func %s\n", __FUNCTION__);CITRA_IGNORE_EXIT(-1); return nullptr;} | 3009 | ARM_INST_PTR INTERPRETER_TRANSLATE(uhaddsubx)(unsigned int inst, int index) { UNIMPLEMENTED_INSTRUCTION("UHADDSUBX"); } |
| 3008 | ARM_INST_PTR INTERPRETER_TRANSLATE(uhsub16)(unsigned int inst, int index){DEBUG_LOG(ARM11, "in func %s\n", __FUNCTION__);CITRA_IGNORE_EXIT(-1); return nullptr;} | 3010 | ARM_INST_PTR INTERPRETER_TRANSLATE(uhsub16)(unsigned int inst, int index) { UNIMPLEMENTED_INSTRUCTION("UHSUB16"); } |
| 3009 | ARM_INST_PTR INTERPRETER_TRANSLATE(uhsub8)(unsigned int inst, int index){DEBUG_LOG(ARM11, "in func %s\n", __FUNCTION__);CITRA_IGNORE_EXIT(-1); return nullptr;} | 3011 | ARM_INST_PTR INTERPRETER_TRANSLATE(uhsub8)(unsigned int inst, int index) { UNIMPLEMENTED_INSTRUCTION("UHSUB8"); } |
| 3010 | ARM_INST_PTR INTERPRETER_TRANSLATE(uhsubaddx)(unsigned int inst, int index){DEBUG_LOG(ARM11, "in func %s\n", __FUNCTION__);CITRA_IGNORE_EXIT(-1); return nullptr;} | 3012 | ARM_INST_PTR INTERPRETER_TRANSLATE(uhsubaddx)(unsigned int inst, int index) { UNIMPLEMENTED_INSTRUCTION("UHSUBADDX"); } |
| 3011 | ARM_INST_PTR INTERPRETER_TRANSLATE(umaal)(unsigned int inst, int index){DEBUG_LOG(ARM11, "in func %s\n", __FUNCTION__);CITRA_IGNORE_EXIT(-1); return nullptr;} | 3013 | ARM_INST_PTR INTERPRETER_TRANSLATE(umaal)(unsigned int inst, int index) { UNIMPLEMENTED_INSTRUCTION("UMAAL"); } |
| 3012 | ARM_INST_PTR INTERPRETER_TRANSLATE(umlal)(unsigned int inst, int index) | 3014 | ARM_INST_PTR INTERPRETER_TRANSLATE(umlal)(unsigned int inst, int index) |
| 3013 | { | 3015 | { |
| 3014 | arm_inst *inst_base = (arm_inst *)AllocBuffer(sizeof(arm_inst) + sizeof(umlal_inst)); | 3016 | arm_inst *inst_base = (arm_inst *)AllocBuffer(sizeof(arm_inst) + sizeof(umlal_inst)); |
| @@ -3111,21 +3113,21 @@ ARM_INST_PTR INTERPRETER_TRANSLATE(blx_1_thumb)(unsigned int tinst, int index) | |||
| 3111 | return inst_base; | 3113 | return inst_base; |
| 3112 | } | 3114 | } |
| 3113 | 3115 | ||
| 3114 | ARM_INST_PTR INTERPRETER_TRANSLATE(uqadd16)(unsigned int inst, int index){DEBUG_LOG(ARM11, "in func %s\n", __FUNCTION__);CITRA_IGNORE_EXIT(-1); return nullptr;} | 3116 | ARM_INST_PTR INTERPRETER_TRANSLATE(uqadd16)(unsigned int inst, int index) { UNIMPLEMENTED_INSTRUCTION("UQADD16"); } |
| 3115 | ARM_INST_PTR INTERPRETER_TRANSLATE(uqadd8)(unsigned int inst, int index){DEBUG_LOG(ARM11, "in func %s\n", __FUNCTION__);CITRA_IGNORE_EXIT(-1); return nullptr;} | 3117 | ARM_INST_PTR INTERPRETER_TRANSLATE(uqadd8)(unsigned int inst, int index) { UNIMPLEMENTED_INSTRUCTION("UQADD8"); } |
| 3116 | ARM_INST_PTR INTERPRETER_TRANSLATE(uqaddsubx)(unsigned int inst, int index){DEBUG_LOG(ARM11, "in func %s\n", __FUNCTION__);CITRA_IGNORE_EXIT(-1); return nullptr;} | 3118 | ARM_INST_PTR INTERPRETER_TRANSLATE(uqaddsubx)(unsigned int inst, int index) { UNIMPLEMENTED_INSTRUCTION("UQADDSUBX"); } |
| 3117 | ARM_INST_PTR INTERPRETER_TRANSLATE(uqsub16)(unsigned int inst, int index){DEBUG_LOG(ARM11, "in func %s\n", __FUNCTION__);CITRA_IGNORE_EXIT(-1); return nullptr;} | 3119 | ARM_INST_PTR INTERPRETER_TRANSLATE(uqsub16)(unsigned int inst, int index) { UNIMPLEMENTED_INSTRUCTION("UQSUB16"); } |
| 3118 | ARM_INST_PTR INTERPRETER_TRANSLATE(uqsub8)(unsigned int inst, int index){DEBUG_LOG(ARM11, "in func %s\n", __FUNCTION__);CITRA_IGNORE_EXIT(-1); return nullptr;} | 3120 | ARM_INST_PTR INTERPRETER_TRANSLATE(uqsub8)(unsigned int inst, int index) { UNIMPLEMENTED_INSTRUCTION("UQSUB8"); } |
| 3119 | ARM_INST_PTR INTERPRETER_TRANSLATE(uqsubaddx)(unsigned int inst, int index){DEBUG_LOG(ARM11, "in func %s\n", __FUNCTION__);CITRA_IGNORE_EXIT(-1); return nullptr;} | 3121 | ARM_INST_PTR INTERPRETER_TRANSLATE(uqsubaddx)(unsigned int inst, int index) { UNIMPLEMENTED_INSTRUCTION("UQSUBADDX"); } |
| 3120 | ARM_INST_PTR INTERPRETER_TRANSLATE(usad8)(unsigned int inst, int index){DEBUG_LOG(ARM11, "in func %s\n", __FUNCTION__);CITRA_IGNORE_EXIT(-1); return nullptr;} | 3122 | ARM_INST_PTR INTERPRETER_TRANSLATE(usad8)(unsigned int inst, int index) { UNIMPLEMENTED_INSTRUCTION("USAD8"); } |
| 3121 | ARM_INST_PTR INTERPRETER_TRANSLATE(usada8)(unsigned int inst, int index){DEBUG_LOG(ARM11, "in func %s\n", __FUNCTION__);CITRA_IGNORE_EXIT(-1); return nullptr;} | 3123 | ARM_INST_PTR INTERPRETER_TRANSLATE(usada8)(unsigned int inst, int index) { UNIMPLEMENTED_INSTRUCTION("USADA8"); } |
| 3122 | ARM_INST_PTR INTERPRETER_TRANSLATE(usat)(unsigned int inst, int index){DEBUG_LOG(ARM11, "in func %s\n", __FUNCTION__);CITRA_IGNORE_EXIT(-1); return nullptr;} | 3124 | ARM_INST_PTR INTERPRETER_TRANSLATE(usat)(unsigned int inst, int index) { UNIMPLEMENTED_INSTRUCTION("USAT"); } |
| 3123 | ARM_INST_PTR INTERPRETER_TRANSLATE(usat16)(unsigned int inst, int index){DEBUG_LOG(ARM11, "in func %s\n", __FUNCTION__);CITRA_IGNORE_EXIT(-1); return nullptr;} | 3125 | ARM_INST_PTR INTERPRETER_TRANSLATE(usat16)(unsigned int inst, int index) { UNIMPLEMENTED_INSTRUCTION("USAT16"); } |
| 3124 | ARM_INST_PTR INTERPRETER_TRANSLATE(usub16)(unsigned int inst, int index){DEBUG_LOG(ARM11, "in func %s\n", __FUNCTION__);CITRA_IGNORE_EXIT(-1); return nullptr;} | 3126 | ARM_INST_PTR INTERPRETER_TRANSLATE(usub16)(unsigned int inst, int index) { UNIMPLEMENTED_INSTRUCTION("USUB16"); } |
| 3125 | ARM_INST_PTR INTERPRETER_TRANSLATE(usub8)(unsigned int inst, int index){DEBUG_LOG(ARM11, "in func %s\n", __FUNCTION__);CITRA_IGNORE_EXIT(-1); return nullptr;} | 3127 | ARM_INST_PTR INTERPRETER_TRANSLATE(usub8)(unsigned int inst, int index) { UNIMPLEMENTED_INSTRUCTION("USUB8"); } |
| 3126 | ARM_INST_PTR INTERPRETER_TRANSLATE(usubaddx)(unsigned int inst, int index){DEBUG_LOG(ARM11, "in func %s\n", __FUNCTION__);CITRA_IGNORE_EXIT(-1); return nullptr;} | 3128 | ARM_INST_PTR INTERPRETER_TRANSLATE(usubaddx)(unsigned int inst, int index) { UNIMPLEMENTED_INSTRUCTION("USUBADDX"); } |
| 3127 | ARM_INST_PTR INTERPRETER_TRANSLATE(uxtab16)(unsigned int inst, int index){DEBUG_LOG(ARM11, "in func %s\n", __FUNCTION__);CITRA_IGNORE_EXIT(-1); return nullptr;} | 3129 | ARM_INST_PTR INTERPRETER_TRANSLATE(uxtab16)(unsigned int inst, int index) { UNIMPLEMENTED_INSTRUCTION("UXTAB16"); } |
| 3128 | ARM_INST_PTR INTERPRETER_TRANSLATE(uxtb16)(unsigned int inst, int index){DEBUG_LOG(ARM11, "in func %s\n", __FUNCTION__);CITRA_IGNORE_EXIT(-1); return nullptr;} | 3130 | ARM_INST_PTR INTERPRETER_TRANSLATE(uxtb16)(unsigned int inst, int index) { UNIMPLEMENTED_INSTRUCTION("UXTB16"); } |
| 3129 | 3131 | ||
| 3130 | 3132 | ||
| 3131 | 3133 | ||
| @@ -3391,7 +3393,7 @@ static tdstate decode_thumb_instr(arm_processor *cpu, uint32_t inst, addr_t addr | |||
| 3391 | } | 3393 | } |
| 3392 | else{ | 3394 | else{ |
| 3393 | /* something wrong */ | 3395 | /* something wrong */ |
| 3394 | DEBUG_LOG(ARM11, "In %s, thumb decoder error\n", __FUNCTION__); | 3396 | LOG_ERROR(Core_ARM11, "thumb decoder error"); |
| 3395 | } | 3397 | } |
| 3396 | break; | 3398 | break; |
| 3397 | case 28: | 3399 | case 28: |
| @@ -3599,7 +3601,7 @@ int InterpreterTranslate(arm_processor *cpu, int &bb_start, addr_t addr) | |||
| 3599 | bank->bank_read(32, phys_addr, &inst); | 3601 | bank->bank_read(32, phys_addr, &inst); |
| 3600 | } | 3602 | } |
| 3601 | else { | 3603 | else { |
| 3602 | DEBUG_LOG(ARM11, "SKYEYE: Read physical addr 0x%x error!!\n", phys_addr); | 3604 | LOG_ERROR(Core_ARM11, "SKYEYE: Read physical addr 0x%x error!!\n", phys_addr); |
| 3603 | return FETCH_FAILURE; | 3605 | return FETCH_FAILURE; |
| 3604 | } | 3606 | } |
| 3605 | #else | 3607 | #else |
| @@ -3629,8 +3631,8 @@ int InterpreterTranslate(arm_processor *cpu, int &bb_start, addr_t addr) | |||
| 3629 | 3631 | ||
| 3630 | ret = decode_arm_instr(inst, &idx); | 3632 | ret = decode_arm_instr(inst, &idx); |
| 3631 | if (ret == DECODE_FAILURE) { | 3633 | if (ret == DECODE_FAILURE) { |
| 3632 | DEBUG_LOG(ARM11, "[info] : Decode failure.\tPC : [0x%x]\tInstruction : [%x]\n", phys_addr, inst); | 3634 | LOG_ERROR(Core_ARM11, "Decode failure.\tPC : [0x%x]\tInstruction : [%x]", phys_addr, inst); |
| 3633 | DEBUG_LOG(ARM11, "cpsr=0x%x, cpu->TFlag=%d, r15=0x%x\n", cpu->Cpsr, cpu->TFlag, cpu->Reg[15]); | 3635 | LOG_ERROR(Core_ARM11, "cpsr=0x%x, cpu->TFlag=%d, r15=0x%x", cpu->Cpsr, cpu->TFlag, cpu->Reg[15]); |
| 3634 | CITRA_IGNORE_EXIT(-1); | 3636 | CITRA_IGNORE_EXIT(-1); |
| 3635 | } | 3637 | } |
| 3636 | // DEBUG_LOG(ARM11, "PC : [0x%x] INST : %s\n", cpu->translate_pc, arm_instruction[idx].name); | 3638 | // DEBUG_LOG(ARM11, "PC : [0x%x] INST : %s\n", cpu->translate_pc, arm_instruction[idx].name); |
| @@ -3674,7 +3676,7 @@ void InterpreterInitInstLength(unsigned long long int *ptr, size_t size) | |||
| 3674 | } | 3676 | } |
| 3675 | } | 3677 | } |
| 3676 | for (int i = 0; i < array_size - 4; i ++) | 3678 | for (int i = 0; i < array_size - 4; i ++) |
| 3677 | DEBUG_LOG(ARM11, "[%d]:%d\n", i, InstLength[i]); | 3679 | LOG_DEBUG(Core_ARM11, "[%d]:%d", i, InstLength[i]); |
| 3678 | } | 3680 | } |
| 3679 | 3681 | ||
| 3680 | int clz(unsigned int x) | 3682 | int clz(unsigned int x) |
| @@ -3721,7 +3723,7 @@ unsigned InterpreterMainLoop(ARMul_State* state) | |||
| 3721 | //if (debug_function(core)) \ | 3723 | //if (debug_function(core)) \ |
| 3722 | if (core->check_int_flag) \ | 3724 | if (core->check_int_flag) \ |
| 3723 | goto END | 3725 | goto END |
| 3724 | //DEBUG_LOG(ARM11, "icounter is %llx line is %d pc is %x\n", cpu->icounter, __LINE__, cpu->Reg[15]) | 3726 | //LOG_TRACE(Core_ARM11, "icounter is %llx pc is %x\n", cpu->icounter, cpu->Reg[15]) |
| 3725 | #else | 3727 | #else |
| 3726 | #define INC_ICOUNTER ; | 3728 | #define INC_ICOUNTER ; |
| 3727 | #endif | 3729 | #endif |
| @@ -4348,7 +4350,7 @@ unsigned InterpreterMainLoop(ARMul_State* state) | |||
| 4348 | bx_inst *inst_cream = (bx_inst *)inst_base->component; | 4350 | bx_inst *inst_cream = (bx_inst *)inst_base->component; |
| 4349 | if ((inst_base->cond == 0xe) || CondPassed(cpu, inst_base->cond)) { | 4351 | if ((inst_base->cond == 0xe) || CondPassed(cpu, inst_base->cond)) { |
| 4350 | if (inst_cream->Rm == 15) | 4352 | if (inst_cream->Rm == 15) |
| 4351 | DEBUG_LOG(ARM11, "In %s, BX at pc %x: use of Rm = R15 is discouraged\n", __FUNCTION__, cpu->Reg[15]); | 4353 | LOG_WARNING(Core_ARM11, "BX at pc %x: use of Rm = R15 is discouraged", cpu->Reg[15]); |
| 4352 | cpu->TFlag = cpu->Reg[inst_cream->Rm] & 0x1; | 4354 | cpu->TFlag = cpu->Reg[inst_cream->Rm] & 0x1; |
| 4353 | cpu->Reg[15] = cpu->Reg[inst_cream->Rm] & 0xfffffffe; | 4355 | cpu->Reg[15] = cpu->Reg[inst_cream->Rm] & 0xfffffffe; |
| 4354 | // cpu->TFlag = cpu->Reg[inst_cream->Rm] & 0x1; | 4356 | // cpu->TFlag = cpu->Reg[inst_cream->Rm] & 0x1; |
| @@ -4373,10 +4375,10 @@ unsigned InterpreterMainLoop(ARMul_State* state) | |||
| 4373 | cpu->NumInstrsToExecute = 0; | 4375 | cpu->NumInstrsToExecute = 0; |
| 4374 | return num_instrs; | 4376 | return num_instrs; |
| 4375 | } | 4377 | } |
| 4376 | ERROR_LOG(ARM11, "CDP insn inst=0x%x, pc=0x%x\n", inst_cream->inst, cpu->Reg[15]); | 4378 | LOG_ERROR(Core_ARM11, "CDP insn inst=0x%x, pc=0x%x\n", inst_cream->inst, cpu->Reg[15]); |
| 4377 | unsigned cpab = (cpu->CDP[inst_cream->cp_num]) (cpu, ARMul_FIRST, inst_cream->inst); | 4379 | unsigned cpab = (cpu->CDP[inst_cream->cp_num]) (cpu, ARMul_FIRST, inst_cream->inst); |
| 4378 | if(cpab != ARMul_DONE){ | 4380 | if(cpab != ARMul_DONE){ |
| 4379 | ERROR_LOG(ARM11, "CDP insn wrong, inst=0x%x, cp_num=0x%x\n", inst_cream->inst, inst_cream->cp_num); | 4381 | LOG_ERROR(Core_ARM11, "CDP insn wrong, inst=0x%x, cp_num=0x%x\n", inst_cream->inst, inst_cream->cp_num); |
| 4380 | //CITRA_IGNORE_EXIT(-1); | 4382 | //CITRA_IGNORE_EXIT(-1); |
| 4381 | } | 4383 | } |
| 4382 | } | 4384 | } |
| @@ -4803,7 +4805,7 @@ unsigned InterpreterMainLoop(ARMul_State* state) | |||
| 4803 | & 0xffff; | 4805 | & 0xffff; |
| 4804 | RD = RN + operand2; | 4806 | RD = RN + operand2; |
| 4805 | if (inst_cream->Rn == 15 || inst_cream->Rm == 15) { | 4807 | if (inst_cream->Rn == 15 || inst_cream->Rm == 15) { |
| 4806 | DEBUG_LOG(ARM11, "in line %d\n", __LINE__); | 4808 | LOG_ERROR(Core_ARM11, "invalid operands for UXTAH"); |
| 4807 | CITRA_IGNORE_EXIT(-1); | 4809 | CITRA_IGNORE_EXIT(-1); |
| 4808 | } | 4810 | } |
| 4809 | } | 4811 | } |
| @@ -4866,7 +4868,7 @@ unsigned InterpreterMainLoop(ARMul_State* state) | |||
| 4866 | uint32_t rear_phys_addr; | 4868 | uint32_t rear_phys_addr; |
| 4867 | fault = check_address_validity(cpu, addr + 4, &rear_phys_addr, 1); | 4869 | fault = check_address_validity(cpu, addr + 4, &rear_phys_addr, 1); |
| 4868 | if(fault){ | 4870 | if(fault){ |
| 4869 | ERROR_LOG(ARM11, "mmu fault , should rollback the above get_addr\n"); | 4871 | LOG_ERROR(Core_ARM11, "mmu fault , should rollback the above get_addr\n"); |
| 4870 | CITRA_IGNORE_EXIT(-1); | 4872 | CITRA_IGNORE_EXIT(-1); |
| 4871 | goto MMU_EXCEPTION; | 4873 | goto MMU_EXCEPTION; |
| 4872 | } | 4874 | } |
| @@ -5089,7 +5091,7 @@ unsigned InterpreterMainLoop(ARMul_State* state) | |||
| 5089 | switch(OPCODE_2){ | 5091 | switch(OPCODE_2){ |
| 5090 | case 0: /* invalidate all */ | 5092 | case 0: /* invalidate all */ |
| 5091 | //invalidate_all_tlb(state); | 5093 | //invalidate_all_tlb(state); |
| 5092 | DEBUG_LOG(ARM11, "{TLB} [INSN] invalidate all\n"); | 5094 | LOG_DEBUG(Core_ARM11, "{TLB} [INSN] invalidate all"); |
| 5093 | //remove_tlb(INSN_TLB); | 5095 | //remove_tlb(INSN_TLB); |
| 5094 | //erase_all(core, INSN_TLB); | 5096 | //erase_all(core, INSN_TLB); |
| 5095 | break; | 5097 | break; |
| @@ -5115,7 +5117,7 @@ unsigned InterpreterMainLoop(ARMul_State* state) | |||
| 5115 | //invalidate_all_tlb(state); | 5117 | //invalidate_all_tlb(state); |
| 5116 | //remove_tlb(DATA_TLB); | 5118 | //remove_tlb(DATA_TLB); |
| 5117 | //erase_all(core, DATA_TLB); | 5119 | //erase_all(core, DATA_TLB); |
| 5118 | DEBUG_LOG(ARM11, "{TLB} [DATA] invalidate all\n"); | 5120 | LOG_DEBUG(Core_ARM11, "{TLB} [DATA] invalidate all"); |
| 5119 | break; | 5121 | break; |
| 5120 | case 1: /* invalidate by MVA */ | 5122 | case 1: /* invalidate by MVA */ |
| 5121 | //invalidate_by_mva(state, value); | 5123 | //invalidate_by_mva(state, value); |
| @@ -5147,13 +5149,13 @@ unsigned InterpreterMainLoop(ARMul_State* state) | |||
| 5147 | //invalidate_by_mva(state, value); | 5149 | //invalidate_by_mva(state, value); |
| 5148 | //erase_by_mva(core, RD, DATA_TLB); | 5150 | //erase_by_mva(core, RD, DATA_TLB); |
| 5149 | //erase_by_mva(core, RD, INSN_TLB); | 5151 | //erase_by_mva(core, RD, INSN_TLB); |
| 5150 | DEBUG_LOG(ARM11, "{TLB} [UNIFILED] invalidate by mva\n"); | 5152 | LOG_DEBUG(Core_ARM11, "{TLB} [UNIFILED] invalidate by mva"); |
| 5151 | break; | 5153 | break; |
| 5152 | case 2: /* invalidate by asid */ | 5154 | case 2: /* invalidate by asid */ |
| 5153 | //invalidate_by_asid(state, value); | 5155 | //invalidate_by_asid(state, value); |
| 5154 | //erase_by_asid(core, RD, DATA_TLB); | 5156 | //erase_by_asid(core, RD, DATA_TLB); |
| 5155 | //erase_by_asid(core, RD, INSN_TLB); | 5157 | //erase_by_asid(core, RD, INSN_TLB); |
| 5156 | DEBUG_LOG(ARM11, "{TLB} [UNIFILED] invalidate by asid\n"); | 5158 | LOG_DEBUG(Core_ARM11, "{TLB} [UNIFILED] invalidate by asid"); |
| 5157 | break; | 5159 | break; |
| 5158 | default: | 5160 | default: |
| 5159 | break; | 5161 | break; |
| @@ -5175,7 +5177,7 @@ unsigned InterpreterMainLoop(ARMul_State* state) | |||
| 5175 | } | 5177 | } |
| 5176 | 5178 | ||
| 5177 | } else { | 5179 | } else { |
| 5178 | DEBUG_LOG(ARM11, "mcr is not implementated. CRn is %d, CRm is %d, OPCODE_2 is %d\n", CRn, CRm, OPCODE_2); | 5180 | LOG_ERROR(Core_ARM11, "mcr CRn=%d, CRm=%d OP2=%d is not implemented", CRn, CRm, OPCODE_2); |
| 5179 | } | 5181 | } |
| 5180 | } | 5182 | } |
| 5181 | } | 5183 | } |
| @@ -5195,7 +5197,7 @@ unsigned InterpreterMainLoop(ARMul_State* state) | |||
| 5195 | uint64_t rs = RS; | 5197 | uint64_t rs = RS; |
| 5196 | uint64_t rn = RN; | 5198 | uint64_t rn = RN; |
| 5197 | if (inst_cream->Rm == 15 || inst_cream->Rs == 15 || inst_cream->Rn == 15) { | 5199 | if (inst_cream->Rm == 15 || inst_cream->Rs == 15 || inst_cream->Rn == 15) { |
| 5198 | DEBUG_LOG(ARM11, "in __line__\n", __LINE__); | 5200 | LOG_ERROR(Core_ARM11, "invalid operands for MLA"); |
| 5199 | CITRA_IGNORE_EXIT(-1); | 5201 | CITRA_IGNORE_EXIT(-1); |
| 5200 | } | 5202 | } |
| 5201 | // RD = dst = RM * RS + RN; | 5203 | // RD = dst = RM * RS + RN; |
| @@ -5309,7 +5311,7 @@ unsigned InterpreterMainLoop(ARMul_State* state) | |||
| 5309 | } | 5311 | } |
| 5310 | } | 5312 | } |
| 5311 | else { | 5313 | else { |
| 5312 | DEBUG_LOG(ARM11, "mrc is not implementated. CRn is %d, CRm is %d, OPCODE_2 is %d\n", CRn, CRm, OPCODE_2); | 5314 | LOG_ERROR(Core_ARM11, "mrc CRn=%d, CRm=%d, OP2=%d is not implemented", CRn, CRm, OPCODE_2); |
| 5313 | } | 5315 | } |
| 5314 | } | 5316 | } |
| 5315 | //DEBUG_LOG(ARM11, "mrc is not implementated. CRn is %d, CRm is %d, OPCODE_2 is %d\n", CRn, CRm, OPCODE_2); | 5317 | //DEBUG_LOG(ARM11, "mrc is not implementated. CRn is %d, CRm is %d, OPCODE_2 is %d\n", CRn, CRm, OPCODE_2); |
| @@ -5500,7 +5502,7 @@ unsigned InterpreterMainLoop(ARMul_State* state) | |||
| 5500 | (((RM >> 16) & 0xff) << 8) | | 5502 | (((RM >> 16) & 0xff) << 8) | |
| 5501 | ((RM >> 24) & 0xff); | 5503 | ((RM >> 24) & 0xff); |
| 5502 | if (inst_cream->Rm == 15) { | 5504 | if (inst_cream->Rm == 15) { |
| 5503 | DEBUG_LOG(ARM11, "in line %d\n", __LINE__); | 5505 | LOG_ERROR(Core_ARM11, "invalid operand for REV"); |
| 5504 | CITRA_IGNORE_EXIT(-1); | 5506 | CITRA_IGNORE_EXIT(-1); |
| 5505 | } | 5507 | } |
| 5506 | } | 5508 | } |
| @@ -5953,7 +5955,7 @@ unsigned InterpreterMainLoop(ARMul_State* state) | |||
| 5953 | sxtb_inst *inst_cream = (sxtb_inst *)inst_base->component; | 5955 | sxtb_inst *inst_cream = (sxtb_inst *)inst_base->component; |
| 5954 | if ((inst_base->cond == 0xe) || CondPassed(cpu, inst_base->cond)) { | 5956 | if ((inst_base->cond == 0xe) || CondPassed(cpu, inst_base->cond)) { |
| 5955 | if (inst_cream->Rm == 15) { | 5957 | if (inst_cream->Rm == 15) { |
| 5956 | DEBUG_LOG(ARM11, "line is %d\n", __LINE__); | 5958 | LOG_ERROR(Core_ARM11, "invalid operand for SXTB"); |
| 5957 | CITRA_IGNORE_EXIT(-1); | 5959 | CITRA_IGNORE_EXIT(-1); |
| 5958 | } | 5960 | } |
| 5959 | unsigned int operand2 = ROTATE_RIGHT_32(RM, 8 * inst_cream->rotate); | 5961 | unsigned int operand2 = ROTATE_RIGHT_32(RM, 8 * inst_cream->rotate); |
| @@ -6059,7 +6061,7 @@ unsigned InterpreterMainLoop(ARMul_State* state) | |||
| 6059 | uint32_t rear_phys_addr; | 6061 | uint32_t rear_phys_addr; |
| 6060 | fault = check_address_validity(cpu, addr + 4, &rear_phys_addr, 0); | 6062 | fault = check_address_validity(cpu, addr + 4, &rear_phys_addr, 0); |
| 6061 | if (fault){ | 6063 | if (fault){ |
| 6062 | ERROR_LOG(ARM11, "mmu fault , should rollback the above get_addr\n"); | 6064 | LOG_ERROR(Core_ARM11, "mmu fault , should rollback the above get_addr\n"); |
| 6063 | CITRA_IGNORE_EXIT(-1); | 6065 | CITRA_IGNORE_EXIT(-1); |
| 6064 | goto MMU_EXCEPTION; | 6066 | goto MMU_EXCEPTION; |
| 6065 | } | 6067 | } |
diff --git a/src/core/arm/interpreter/armemu.cpp b/src/core/arm/interpreter/armemu.cpp index d717bd2c8..825955ade 100644 --- a/src/core/arm/interpreter/armemu.cpp +++ b/src/core/arm/interpreter/armemu.cpp | |||
| @@ -949,7 +949,7 @@ ARMul_Emulate26 (ARMul_State * state) | |||
| 949 | //printf("t decode %04lx -> %08lx\n", instr & 0xffff, armOp); | 949 | //printf("t decode %04lx -> %08lx\n", instr & 0xffff, armOp); |
| 950 | 950 | ||
| 951 | if (armOp == 0xDEADC0DE) { | 951 | if (armOp == 0xDEADC0DE) { |
| 952 | DEBUG("Failed to decode thumb opcode %04X at %08X\n", instr, pc); | 952 | LOG_ERROR(Core_ARM11, "Failed to decode thumb opcode %04X at %08X", instr, pc); |
| 953 | } | 953 | } |
| 954 | 954 | ||
| 955 | instr = armOp; | 955 | instr = armOp; |
| @@ -3437,7 +3437,7 @@ mainswitch: | |||
| 3437 | 3437 | ||
| 3438 | case 0x7f: /* Load Byte, WriteBack, Pre Inc, Reg. */ | 3438 | case 0x7f: /* Load Byte, WriteBack, Pre Inc, Reg. */ |
| 3439 | if (BIT (4)) { | 3439 | if (BIT (4)) { |
| 3440 | DEBUG("got unhandled special breakpoint\n"); | 3440 | LOG_DEBUG(Core_ARM11, "got unhandled special breakpoint"); |
| 3441 | return 1; | 3441 | return 1; |
| 3442 | } | 3442 | } |
| 3443 | UNDEF_LSRBaseEQOffWb; | 3443 | UNDEF_LSRBaseEQOffWb; |
diff --git a/src/core/arm/interpreter/armsupp.cpp b/src/core/arm/interpreter/armsupp.cpp index 2568b93ef..30519f216 100644 --- a/src/core/arm/interpreter/armsupp.cpp +++ b/src/core/arm/interpreter/armsupp.cpp | |||
| @@ -665,7 +665,7 @@ ARMul_MCR (ARMul_State * state, ARMword instr, ARMword source) | |||
| 665 | //if (!CP_ACCESS_ALLOWED (state, CPNum)) { | 665 | //if (!CP_ACCESS_ALLOWED (state, CPNum)) { |
| 666 | if (!state->MCR[CPNum]) { | 666 | if (!state->MCR[CPNum]) { |
| 667 | //chy 2004-07-19 should fix in the future ????!!!! | 667 | //chy 2004-07-19 should fix in the future ????!!!! |
| 668 | DEBUG("SKYEYE ARMul_MCR, ACCESS_not ALLOWed, UndefinedInstr CPnum is %x, source %x\n",CPNum, source); | 668 | LOG_ERROR(Core_ARM11, "SKYEYE ARMul_MCR, ACCESS_not ALLOWed, UndefinedInstr CPnum is %x, source %x",CPNum, source); |
| 669 | ARMul_UndefInstr (state, instr); | 669 | ARMul_UndefInstr (state, instr); |
| 670 | return; | 670 | return; |
| 671 | } | 671 | } |
| @@ -690,7 +690,7 @@ ARMul_MCR (ARMul_State * state, ARMword instr, ARMword source) | |||
| 690 | } | 690 | } |
| 691 | 691 | ||
| 692 | if (cpab == ARMul_CANT) { | 692 | if (cpab == ARMul_CANT) { |
| 693 | DEBUG("SKYEYE ARMul_MCR, CANT, UndefinedInstr %x CPnum is %x, source %x\n", instr, CPNum, source); //ichfly todo | 693 | LOG_ERROR(Core_ARM11, "SKYEYE ARMul_MCR, CANT, UndefinedInstr %x CPnum is %x, source %x", instr, CPNum, source); //ichfly todo |
| 694 | //ARMul_Abort (state, ARMul_UndefinedInstrV); | 694 | //ARMul_Abort (state, ARMul_UndefinedInstrV); |
| 695 | } else { | 695 | } else { |
| 696 | BUSUSEDINCPCN; | 696 | BUSUSEDINCPCN; |
| @@ -762,7 +762,7 @@ ARMword ARMul_MRC (ARMul_State * state, ARMword instr) | |||
| 762 | //if (!CP_ACCESS_ALLOWED (state, CPNum)) { | 762 | //if (!CP_ACCESS_ALLOWED (state, CPNum)) { |
| 763 | if (!state->MRC[CPNum]) { | 763 | if (!state->MRC[CPNum]) { |
| 764 | //chy 2004-07-19 should fix in the future????!!!! | 764 | //chy 2004-07-19 should fix in the future????!!!! |
| 765 | DEBUG("SKYEYE ARMul_MRC,NOT ALLOWed UndefInstr CPnum is %x, instr %x\n", CPNum, instr); | 765 | LOG_ERROR(Core_ARM11, "SKYEYE ARMul_MRC,NOT ALLOWed UndefInstr CPnum is %x, instr %x", CPNum, instr); |
| 766 | ARMul_UndefInstr (state, instr); | 766 | ARMul_UndefInstr (state, instr); |
| 767 | return -1; | 767 | return -1; |
| 768 | } | 768 | } |
| @@ -865,7 +865,7 @@ void | |||
| 865 | ARMul_UndefInstr (ARMul_State * state, ARMword instr) | 865 | ARMul_UndefInstr (ARMul_State * state, ARMword instr) |
| 866 | { | 866 | { |
| 867 | std::string disasm = ARM_Disasm::Disassemble(state->pc, instr); | 867 | std::string disasm = ARM_Disasm::Disassemble(state->pc, instr); |
| 868 | ERROR_LOG(ARM11, "Undefined instruction!! Disasm: %s Opcode: 0x%x", disasm.c_str(), instr); | 868 | LOG_ERROR(Core_ARM11, "Undefined instruction!! Disasm: %s Opcode: 0x%x", disasm.c_str(), instr); |
| 869 | ARMul_Abort (state, ARMul_UndefinedInstrV); | 869 | ARMul_Abort (state, ARMul_UndefinedInstrV); |
| 870 | } | 870 | } |
| 871 | 871 | ||
diff --git a/src/core/arm/interpreter/thumbemu.cpp b/src/core/arm/interpreter/thumbemu.cpp index f7f11f714..9cf80672d 100644 --- a/src/core/arm/interpreter/thumbemu.cpp +++ b/src/core/arm/interpreter/thumbemu.cpp | |||
| @@ -467,7 +467,7 @@ ARMul_ThumbDecode ( | |||
| 467 | (state->Reg[14] + ((tinstr & 0x07FF) << 1)) & 0xFFFFFFFC; | 467 | (state->Reg[14] + ((tinstr & 0x07FF) << 1)) & 0xFFFFFFFC; |
| 468 | state->Reg[14] = (tmp | 1); | 468 | state->Reg[14] = (tmp | 1); |
| 469 | CLEART; | 469 | CLEART; |
| 470 | DEBUG_LOG(ARM11, "In %s, After BLX(1),LR=0x%x,PC=0x%x, offset=0x%x\n", __FUNCTION__, state->Reg[14], state->Reg[15], (tinstr &0x7FF) << 1); | 470 | LOG_DEBUG(Core_ARM11, "After BLX(1),LR=0x%x,PC=0x%x, offset=0x%x", state->Reg[14], state->Reg[15], (tinstr &0x7FF) << 1); |
| 471 | valid = t_branch; | 471 | valid = t_branch; |
| 472 | FLUSHPIPE; | 472 | FLUSHPIPE; |
| 473 | } | 473 | } |
diff --git a/src/core/arm/skyeye_common/armemu.h b/src/core/arm/skyeye_common/armemu.h index 075fc7e9e..7f7c0e682 100644 --- a/src/core/arm/skyeye_common/armemu.h +++ b/src/core/arm/skyeye_common/armemu.h | |||
| @@ -23,8 +23,6 @@ | |||
| 23 | 23 | ||
| 24 | //extern ARMword isize; | 24 | //extern ARMword isize; |
| 25 | 25 | ||
| 26 | #define DEBUG(...) DEBUG_LOG(ARM11, __VA_ARGS__) | ||
| 27 | |||
| 28 | /* Shift Opcodes. */ | 26 | /* Shift Opcodes. */ |
| 29 | #define LSL 0 | 27 | #define LSL 0 |
| 30 | #define LSR 1 | 28 | #define LSR 1 |
| @@ -485,7 +483,7 @@ tdstate; | |||
| 485 | * out-of-updated with the newer ISA. | 483 | * out-of-updated with the newer ISA. |
| 486 | * -- Michael.Kang | 484 | * -- Michael.Kang |
| 487 | ********************************************************************************/ | 485 | ********************************************************************************/ |
| 488 | #define UNDEF_WARNING WARN_LOG(ARM11, "undefined or unpredicted behavior for arm instruction.\n"); | 486 | #define UNDEF_WARNING LOG_WARNING(Core_ARM11, "undefined or unpredicted behavior for arm instruction."); |
| 489 | 487 | ||
| 490 | /* Macros to scrutinize instructions. */ | 488 | /* Macros to scrutinize instructions. */ |
| 491 | #define UNDEF_Test UNDEF_WARNING | 489 | #define UNDEF_Test UNDEF_WARNING |
diff --git a/src/core/core.cpp b/src/core/core.cpp index 865898b24..64de0cbba 100644 --- a/src/core/core.cpp +++ b/src/core/core.cpp | |||
| @@ -47,7 +47,7 @@ void Stop() { | |||
| 47 | 47 | ||
| 48 | /// Initialize the core | 48 | /// Initialize the core |
| 49 | int Init() { | 49 | int Init() { |
| 50 | NOTICE_LOG(MASTER_LOG, "initialized OK"); | 50 | LOG_DEBUG(Core, "initialized OK"); |
| 51 | 51 | ||
| 52 | disasm = new ARM_Disasm(); | 52 | disasm = new ARM_Disasm(); |
| 53 | g_sys_core = new ARM_Interpreter(); | 53 | g_sys_core = new ARM_Interpreter(); |
| @@ -72,7 +72,7 @@ void Shutdown() { | |||
| 72 | delete g_app_core; | 72 | delete g_app_core; |
| 73 | delete g_sys_core; | 73 | delete g_sys_core; |
| 74 | 74 | ||
| 75 | NOTICE_LOG(MASTER_LOG, "shutdown OK"); | 75 | LOG_DEBUG(Core, "shutdown OK"); |
| 76 | } | 76 | } |
| 77 | 77 | ||
| 78 | } // namespace | 78 | } // namespace |
diff --git a/src/core/core_timing.cpp b/src/core/core_timing.cpp index bf8acf41f..1a0b2724a 100644 --- a/src/core/core_timing.cpp +++ b/src/core/core_timing.cpp | |||
| @@ -124,7 +124,7 @@ int RegisterEvent(const char *name, TimedCallback callback) | |||
| 124 | 124 | ||
| 125 | void AntiCrashCallback(u64 userdata, int cyclesLate) | 125 | void AntiCrashCallback(u64 userdata, int cyclesLate) |
| 126 | { | 126 | { |
| 127 | ERROR_LOG(TIME, "Savestate broken: an unregistered event was called."); | 127 | LOG_CRITICAL(Core, "Savestate broken: an unregistered event was called."); |
| 128 | Core::Halt("invalid timing events"); | 128 | Core::Halt("invalid timing events"); |
| 129 | } | 129 | } |
| 130 | 130 | ||
| @@ -176,7 +176,7 @@ void Shutdown() | |||
| 176 | 176 | ||
| 177 | u64 GetTicks() | 177 | u64 GetTicks() |
| 178 | { | 178 | { |
| 179 | ERROR_LOG(TIME, "Unimplemented function!"); | 179 | LOG_ERROR(Core, "Unimplemented function!"); |
| 180 | return 0; | 180 | return 0; |
| 181 | //return (u64)globalTimer + slicelength - currentMIPS->downcount; | 181 | //return (u64)globalTimer + slicelength - currentMIPS->downcount; |
| 182 | } | 182 | } |
| @@ -510,7 +510,7 @@ void MoveEvents() | |||
| 510 | 510 | ||
| 511 | void Advance() | 511 | void Advance() |
| 512 | { | 512 | { |
| 513 | ERROR_LOG(TIME, "Unimplemented function!"); | 513 | LOG_ERROR(Core, "Unimplemented function!"); |
| 514 | //int cyclesExecuted = slicelength - currentMIPS->downcount; | 514 | //int cyclesExecuted = slicelength - currentMIPS->downcount; |
| 515 | //globalTimer += cyclesExecuted; | 515 | //globalTimer += cyclesExecuted; |
| 516 | //currentMIPS->downcount = slicelength; | 516 | //currentMIPS->downcount = slicelength; |
| @@ -547,7 +547,7 @@ void LogPendingEvents() | |||
| 547 | 547 | ||
| 548 | void Idle(int maxIdle) | 548 | void Idle(int maxIdle) |
| 549 | { | 549 | { |
| 550 | ERROR_LOG(TIME, "Unimplemented function!"); | 550 | LOG_ERROR(Core, "Unimplemented function!"); |
| 551 | //int cyclesDown = currentMIPS->downcount; | 551 | //int cyclesDown = currentMIPS->downcount; |
| 552 | //if (maxIdle != 0 && cyclesDown > maxIdle) | 552 | //if (maxIdle != 0 && cyclesDown > maxIdle) |
| 553 | // cyclesDown = maxIdle; | 553 | // cyclesDown = maxIdle; |
diff --git a/src/core/file_sys/archive.h b/src/core/file_sys/archive.h index f3cb11133..27ed23cd0 100644 --- a/src/core/file_sys/archive.h +++ b/src/core/file_sys/archive.h | |||
| @@ -100,7 +100,8 @@ public: | |||
| 100 | case Wchar: | 100 | case Wchar: |
| 101 | return "[Wchar: " + AsString() + ']'; | 101 | return "[Wchar: " + AsString() + ']'; |
| 102 | default: | 102 | default: |
| 103 | ERROR_LOG(KERNEL, "LowPathType cannot be converted to string!"); | 103 | // TODO(yuriks): Add assert |
| 104 | LOG_ERROR(Service_FS, "LowPathType cannot be converted to string!"); | ||
| 104 | return {}; | 105 | return {}; |
| 105 | } | 106 | } |
| 106 | } | 107 | } |
| @@ -114,7 +115,8 @@ public: | |||
| 114 | case Empty: | 115 | case Empty: |
| 115 | return {}; | 116 | return {}; |
| 116 | default: | 117 | default: |
| 117 | ERROR_LOG(KERNEL, "LowPathType cannot be converted to string!"); | 118 | // TODO(yuriks): Add assert |
| 119 | LOG_ERROR(Service_FS, "LowPathType cannot be converted to string!"); | ||
| 118 | return {}; | 120 | return {}; |
| 119 | } | 121 | } |
| 120 | } | 122 | } |
| @@ -128,7 +130,8 @@ public: | |||
| 128 | case Empty: | 130 | case Empty: |
| 129 | return {}; | 131 | return {}; |
| 130 | default: | 132 | default: |
| 131 | ERROR_LOG(KERNEL, "LowPathType cannot be converted to u16string!"); | 133 | // TODO(yuriks): Add assert |
| 134 | LOG_ERROR(Service_FS, "LowPathType cannot be converted to u16string!"); | ||
| 132 | return {}; | 135 | return {}; |
| 133 | } | 136 | } |
| 134 | } | 137 | } |
| @@ -144,7 +147,8 @@ public: | |||
| 144 | case Empty: | 147 | case Empty: |
| 145 | return {}; | 148 | return {}; |
| 146 | default: | 149 | default: |
| 147 | ERROR_LOG(KERNEL, "LowPathType cannot be converted to binary!"); | 150 | // TODO(yuriks): Add assert |
| 151 | LOG_ERROR(Service_FS, "LowPathType cannot be converted to binary!"); | ||
| 148 | return {}; | 152 | return {}; |
| 149 | } | 153 | } |
| 150 | } | 154 | } |
diff --git a/src/core/file_sys/archive_romfs.cpp b/src/core/file_sys/archive_romfs.cpp index 8c2dbeda5..74974c2df 100644 --- a/src/core/file_sys/archive_romfs.cpp +++ b/src/core/file_sys/archive_romfs.cpp | |||
| @@ -16,7 +16,7 @@ namespace FileSys { | |||
| 16 | Archive_RomFS::Archive_RomFS(const Loader::AppLoader& app_loader) { | 16 | Archive_RomFS::Archive_RomFS(const Loader::AppLoader& app_loader) { |
| 17 | // Load the RomFS from the app | 17 | // Load the RomFS from the app |
| 18 | if (Loader::ResultStatus::Success != app_loader.ReadRomFS(raw_data)) { | 18 | if (Loader::ResultStatus::Success != app_loader.ReadRomFS(raw_data)) { |
| 19 | WARN_LOG(FILESYS, "Unable to read RomFS!"); | 19 | LOG_ERROR(Service_FS, "Unable to read RomFS!"); |
| 20 | } | 20 | } |
| 21 | } | 21 | } |
| 22 | 22 | ||
| @@ -39,12 +39,12 @@ std::unique_ptr<File> Archive_RomFS::OpenFile(const Path& path, const Mode mode) | |||
| 39 | * @return Whether the file could be deleted | 39 | * @return Whether the file could be deleted |
| 40 | */ | 40 | */ |
| 41 | bool Archive_RomFS::DeleteFile(const FileSys::Path& path) const { | 41 | bool Archive_RomFS::DeleteFile(const FileSys::Path& path) const { |
| 42 | ERROR_LOG(FILESYS, "Attempted to delete a file from ROMFS."); | 42 | LOG_WARNING(Service_FS, "Attempted to delete a file from ROMFS."); |
| 43 | return false; | 43 | return false; |
| 44 | } | 44 | } |
| 45 | 45 | ||
| 46 | bool Archive_RomFS::RenameFile(const FileSys::Path& src_path, const FileSys::Path& dest_path) const { | 46 | bool Archive_RomFS::RenameFile(const FileSys::Path& src_path, const FileSys::Path& dest_path) const { |
| 47 | ERROR_LOG(FILESYS, "Attempted to rename a file within ROMFS."); | 47 | LOG_WARNING(Service_FS, "Attempted to rename a file within ROMFS."); |
| 48 | return false; | 48 | return false; |
| 49 | } | 49 | } |
| 50 | 50 | ||
| @@ -54,7 +54,7 @@ bool Archive_RomFS::RenameFile(const FileSys::Path& src_path, const FileSys::Pat | |||
| 54 | * @return Whether the directory could be deleted | 54 | * @return Whether the directory could be deleted |
| 55 | */ | 55 | */ |
| 56 | bool Archive_RomFS::DeleteDirectory(const FileSys::Path& path) const { | 56 | bool Archive_RomFS::DeleteDirectory(const FileSys::Path& path) const { |
| 57 | ERROR_LOG(FILESYS, "Attempted to delete a directory from ROMFS."); | 57 | LOG_WARNING(Service_FS, "Attempted to delete a directory from ROMFS."); |
| 58 | return false; | 58 | return false; |
| 59 | } | 59 | } |
| 60 | 60 | ||
| @@ -64,12 +64,12 @@ bool Archive_RomFS::DeleteDirectory(const FileSys::Path& path) const { | |||
| 64 | * @return Whether the directory could be created | 64 | * @return Whether the directory could be created |
| 65 | */ | 65 | */ |
| 66 | bool Archive_RomFS::CreateDirectory(const Path& path) const { | 66 | bool Archive_RomFS::CreateDirectory(const Path& path) const { |
| 67 | ERROR_LOG(FILESYS, "Attempted to create a directory in ROMFS."); | 67 | LOG_WARNING(Service_FS, "Attempted to create a directory in ROMFS."); |
| 68 | return false; | 68 | return false; |
| 69 | } | 69 | } |
| 70 | 70 | ||
| 71 | bool Archive_RomFS::RenameDirectory(const FileSys::Path& src_path, const FileSys::Path& dest_path) const { | 71 | bool Archive_RomFS::RenameDirectory(const FileSys::Path& src_path, const FileSys::Path& dest_path) const { |
| 72 | ERROR_LOG(FILESYS, "Attempted to rename a file within ROMFS."); | 72 | LOG_WARNING(Service_FS, "Attempted to rename a file within ROMFS."); |
| 73 | return false; | 73 | return false; |
| 74 | } | 74 | } |
| 75 | 75 | ||
| @@ -90,7 +90,7 @@ std::unique_ptr<Directory> Archive_RomFS::OpenDirectory(const Path& path) const | |||
| 90 | * @return Number of bytes read | 90 | * @return Number of bytes read |
| 91 | */ | 91 | */ |
| 92 | size_t Archive_RomFS::Read(const u64 offset, const u32 length, u8* buffer) const { | 92 | size_t Archive_RomFS::Read(const u64 offset, const u32 length, u8* buffer) const { |
| 93 | DEBUG_LOG(FILESYS, "called offset=%llu, length=%d", offset, length); | 93 | LOG_TRACE(Service_FS, "called offset=%llu, length=%d", offset, length); |
| 94 | memcpy(buffer, &raw_data[(u32)offset], length); | 94 | memcpy(buffer, &raw_data[(u32)offset], length); |
| 95 | return length; | 95 | return length; |
| 96 | } | 96 | } |
| @@ -104,7 +104,7 @@ size_t Archive_RomFS::Read(const u64 offset, const u32 length, u8* buffer) const | |||
| 104 | * @return Number of bytes written | 104 | * @return Number of bytes written |
| 105 | */ | 105 | */ |
| 106 | size_t Archive_RomFS::Write(const u64 offset, const u32 length, const u32 flush, u8* buffer) { | 106 | size_t Archive_RomFS::Write(const u64 offset, const u32 length, const u32 flush, u8* buffer) { |
| 107 | ERROR_LOG(FILESYS, "Attempted to write to ROMFS."); | 107 | LOG_WARNING(Service_FS, "Attempted to write to ROMFS."); |
| 108 | return 0; | 108 | return 0; |
| 109 | } | 109 | } |
| 110 | 110 | ||
| @@ -120,7 +120,7 @@ size_t Archive_RomFS::GetSize() const { | |||
| 120 | * Set the size of the archive in bytes | 120 | * Set the size of the archive in bytes |
| 121 | */ | 121 | */ |
| 122 | void Archive_RomFS::SetSize(const u64 size) { | 122 | void Archive_RomFS::SetSize(const u64 size) { |
| 123 | ERROR_LOG(FILESYS, "Attempted to set the size of ROMFS"); | 123 | LOG_WARNING(Service_FS, "Attempted to set the size of ROMFS"); |
| 124 | } | 124 | } |
| 125 | 125 | ||
| 126 | } // namespace FileSys | 126 | } // namespace FileSys |
diff --git a/src/core/file_sys/archive_sdmc.cpp b/src/core/file_sys/archive_sdmc.cpp index fc0b9b72d..9e524b60e 100644 --- a/src/core/file_sys/archive_sdmc.cpp +++ b/src/core/file_sys/archive_sdmc.cpp | |||
| @@ -19,7 +19,7 @@ namespace FileSys { | |||
| 19 | 19 | ||
| 20 | Archive_SDMC::Archive_SDMC(const std::string& mount_point) { | 20 | Archive_SDMC::Archive_SDMC(const std::string& mount_point) { |
| 21 | this->mount_point = mount_point; | 21 | this->mount_point = mount_point; |
| 22 | DEBUG_LOG(FILESYS, "Directory %s set as SDMC.", mount_point.c_str()); | 22 | LOG_INFO(Service_FS, "Directory %s set as SDMC.", mount_point.c_str()); |
| 23 | } | 23 | } |
| 24 | 24 | ||
| 25 | Archive_SDMC::~Archive_SDMC() { | 25 | Archive_SDMC::~Archive_SDMC() { |
| @@ -31,12 +31,12 @@ Archive_SDMC::~Archive_SDMC() { | |||
| 31 | */ | 31 | */ |
| 32 | bool Archive_SDMC::Initialize() { | 32 | bool Archive_SDMC::Initialize() { |
| 33 | if (!Settings::values.use_virtual_sd) { | 33 | if (!Settings::values.use_virtual_sd) { |
| 34 | WARN_LOG(FILESYS, "SDMC disabled by config."); | 34 | LOG_WARNING(Service_FS, "SDMC disabled by config."); |
| 35 | return false; | 35 | return false; |
| 36 | } | 36 | } |
| 37 | 37 | ||
| 38 | if (!FileUtil::CreateFullPath(mount_point)) { | 38 | if (!FileUtil::CreateFullPath(mount_point)) { |
| 39 | WARN_LOG(FILESYS, "Unable to create SDMC path."); | 39 | LOG_ERROR(Service_FS, "Unable to create SDMC path."); |
| 40 | return false; | 40 | return false; |
| 41 | } | 41 | } |
| 42 | 42 | ||
| @@ -50,7 +50,7 @@ bool Archive_SDMC::Initialize() { | |||
| 50 | * @return Opened file, or nullptr | 50 | * @return Opened file, or nullptr |
| 51 | */ | 51 | */ |
| 52 | std::unique_ptr<File> Archive_SDMC::OpenFile(const Path& path, const Mode mode) const { | 52 | std::unique_ptr<File> Archive_SDMC::OpenFile(const Path& path, const Mode mode) const { |
| 53 | DEBUG_LOG(FILESYS, "called path=%s mode=%u", path.DebugStr().c_str(), mode.hex); | 53 | LOG_DEBUG(Service_FS, "called path=%s mode=%u", path.DebugStr().c_str(), mode.hex); |
| 54 | File_SDMC* file = new File_SDMC(this, path, mode); | 54 | File_SDMC* file = new File_SDMC(this, path, mode); |
| 55 | if (!file->Open()) | 55 | if (!file->Open()) |
| 56 | return nullptr; | 56 | return nullptr; |
| @@ -98,7 +98,7 @@ bool Archive_SDMC::RenameDirectory(const FileSys::Path& src_path, const FileSys: | |||
| 98 | * @return Opened directory, or nullptr | 98 | * @return Opened directory, or nullptr |
| 99 | */ | 99 | */ |
| 100 | std::unique_ptr<Directory> Archive_SDMC::OpenDirectory(const Path& path) const { | 100 | std::unique_ptr<Directory> Archive_SDMC::OpenDirectory(const Path& path) const { |
| 101 | DEBUG_LOG(FILESYS, "called path=%s", path.DebugStr().c_str()); | 101 | LOG_DEBUG(Service_FS, "called path=%s", path.DebugStr().c_str()); |
| 102 | Directory_SDMC* directory = new Directory_SDMC(this, path); | 102 | Directory_SDMC* directory = new Directory_SDMC(this, path); |
| 103 | if (!directory->Open()) | 103 | if (!directory->Open()) |
| 104 | return nullptr; | 104 | return nullptr; |
| @@ -113,7 +113,7 @@ std::unique_ptr<Directory> Archive_SDMC::OpenDirectory(const Path& path) const { | |||
| 113 | * @return Number of bytes read | 113 | * @return Number of bytes read |
| 114 | */ | 114 | */ |
| 115 | size_t Archive_SDMC::Read(const u64 offset, const u32 length, u8* buffer) const { | 115 | size_t Archive_SDMC::Read(const u64 offset, const u32 length, u8* buffer) const { |
| 116 | ERROR_LOG(FILESYS, "(UNIMPLEMENTED)"); | 116 | LOG_ERROR(Service_FS, "(UNIMPLEMENTED)"); |
| 117 | return -1; | 117 | return -1; |
| 118 | } | 118 | } |
| 119 | 119 | ||
| @@ -126,7 +126,7 @@ size_t Archive_SDMC::Read(const u64 offset, const u32 length, u8* buffer) const | |||
| 126 | * @return Number of bytes written | 126 | * @return Number of bytes written |
| 127 | */ | 127 | */ |
| 128 | size_t Archive_SDMC::Write(const u64 offset, const u32 length, const u32 flush, u8* buffer) { | 128 | size_t Archive_SDMC::Write(const u64 offset, const u32 length, const u32 flush, u8* buffer) { |
| 129 | ERROR_LOG(FILESYS, "(UNIMPLEMENTED)"); | 129 | LOG_ERROR(Service_FS, "(UNIMPLEMENTED)"); |
| 130 | return -1; | 130 | return -1; |
| 131 | } | 131 | } |
| 132 | 132 | ||
| @@ -135,7 +135,7 @@ size_t Archive_SDMC::Write(const u64 offset, const u32 length, const u32 flush, | |||
| 135 | * @return Size of the archive in bytes | 135 | * @return Size of the archive in bytes |
| 136 | */ | 136 | */ |
| 137 | size_t Archive_SDMC::GetSize() const { | 137 | size_t Archive_SDMC::GetSize() const { |
| 138 | ERROR_LOG(FILESYS, "(UNIMPLEMENTED)"); | 138 | LOG_ERROR(Service_FS, "(UNIMPLEMENTED)"); |
| 139 | return 0; | 139 | return 0; |
| 140 | } | 140 | } |
| 141 | 141 | ||
| @@ -143,7 +143,7 @@ size_t Archive_SDMC::GetSize() const { | |||
| 143 | * Set the size of the archive in bytes | 143 | * Set the size of the archive in bytes |
| 144 | */ | 144 | */ |
| 145 | void Archive_SDMC::SetSize(const u64 size) { | 145 | void Archive_SDMC::SetSize(const u64 size) { |
| 146 | ERROR_LOG(FILESYS, "(UNIMPLEMENTED)"); | 146 | LOG_ERROR(Service_FS, "(UNIMPLEMENTED)"); |
| 147 | } | 147 | } |
| 148 | 148 | ||
| 149 | /** | 149 | /** |
diff --git a/src/core/file_sys/directory_sdmc.cpp b/src/core/file_sys/directory_sdmc.cpp index 0f156a127..519787641 100644 --- a/src/core/file_sys/directory_sdmc.cpp +++ b/src/core/file_sys/directory_sdmc.cpp | |||
| @@ -49,7 +49,7 @@ u32 Directory_SDMC::Read(const u32 count, Entry* entries) { | |||
| 49 | const std::string& filename = file.virtualName; | 49 | const std::string& filename = file.virtualName; |
| 50 | Entry& entry = entries[entries_read]; | 50 | Entry& entry = entries[entries_read]; |
| 51 | 51 | ||
| 52 | WARN_LOG(FILESYS, "File %s: size=%llu dir=%d", filename.c_str(), file.size, file.isDirectory); | 52 | LOG_TRACE(Service_FS, "File %s: size=%llu dir=%d", filename.c_str(), file.size, file.isDirectory); |
| 53 | 53 | ||
| 54 | // TODO(Link Mauve): use a proper conversion to UTF-16. | 54 | // TODO(Link Mauve): use a proper conversion to UTF-16. |
| 55 | for (size_t j = 0; j < FILENAME_LENGTH; ++j) { | 55 | for (size_t j = 0; j < FILENAME_LENGTH; ++j) { |
diff --git a/src/core/file_sys/file_sdmc.cpp b/src/core/file_sys/file_sdmc.cpp index b01d96e3d..46c29900b 100644 --- a/src/core/file_sys/file_sdmc.cpp +++ b/src/core/file_sys/file_sdmc.cpp | |||
| @@ -33,7 +33,7 @@ File_SDMC::~File_SDMC() { | |||
| 33 | */ | 33 | */ |
| 34 | bool File_SDMC::Open() { | 34 | bool File_SDMC::Open() { |
| 35 | if (!mode.create_flag && !FileUtil::Exists(path)) { | 35 | if (!mode.create_flag && !FileUtil::Exists(path)) { |
| 36 | ERROR_LOG(FILESYS, "Non-existing file %s can’t be open without mode create.", path.c_str()); | 36 | LOG_ERROR(Service_FS, "Non-existing file %s can’t be open without mode create.", path.c_str()); |
| 37 | return false; | 37 | return false; |
| 38 | } | 38 | } |
| 39 | 39 | ||
diff --git a/src/core/hle/config_mem.cpp b/src/core/hle/config_mem.cpp index 1c9b89227..d8ba9e6cf 100644 --- a/src/core/hle/config_mem.cpp +++ b/src/core/hle/config_mem.cpp | |||
| @@ -55,7 +55,7 @@ inline void Read(T &var, const u32 addr) { | |||
| 55 | break; | 55 | break; |
| 56 | 56 | ||
| 57 | default: | 57 | default: |
| 58 | ERROR_LOG(HLE, "unknown addr=0x%08X", addr); | 58 | LOG_ERROR(Kernel, "unknown addr=0x%08X", addr); |
| 59 | } | 59 | } |
| 60 | } | 60 | } |
| 61 | 61 | ||
diff --git a/src/core/hle/hle.cpp b/src/core/hle/hle.cpp index b8ac186f6..3f73b5538 100644 --- a/src/core/hle/hle.cpp +++ b/src/core/hle/hle.cpp | |||
| @@ -20,7 +20,7 @@ bool g_reschedule = false; ///< If true, immediately reschedules the CPU to a n | |||
| 20 | const FunctionDef* GetSVCInfo(u32 opcode) { | 20 | const FunctionDef* GetSVCInfo(u32 opcode) { |
| 21 | u32 func_num = opcode & 0xFFFFFF; // 8 bits | 21 | u32 func_num = opcode & 0xFFFFFF; // 8 bits |
| 22 | if (func_num > 0xFF) { | 22 | if (func_num > 0xFF) { |
| 23 | ERROR_LOG(HLE,"unknown svc=0x%02X", func_num); | 23 | LOG_ERROR(Kernel_SVC,"unknown svc=0x%02X", func_num); |
| 24 | return nullptr; | 24 | return nullptr; |
| 25 | } | 25 | } |
| 26 | return &g_module_db[0].func_table[func_num]; | 26 | return &g_module_db[0].func_table[func_num]; |
| @@ -35,14 +35,12 @@ void CallSVC(u32 opcode) { | |||
| 35 | if (info->func) { | 35 | if (info->func) { |
| 36 | info->func(); | 36 | info->func(); |
| 37 | } else { | 37 | } else { |
| 38 | ERROR_LOG(HLE, "unimplemented SVC function %s(..)", info->name.c_str()); | 38 | LOG_ERROR(Kernel_SVC, "unimplemented SVC function %s(..)", info->name.c_str()); |
| 39 | } | 39 | } |
| 40 | } | 40 | } |
| 41 | 41 | ||
| 42 | void Reschedule(const char *reason) { | 42 | void Reschedule(const char *reason) { |
| 43 | #ifdef _DEBUG | 43 | _dbg_assert_msg_(Kernel, reason != 0 && strlen(reason) < 256, "Reschedule: Invalid or too long reason."); |
| 44 | _dbg_assert_msg_(HLE, reason != 0 && strlen(reason) < 256, "Reschedule: Invalid or too long reason."); | ||
| 45 | #endif | ||
| 46 | Core::g_app_core->PrepareReschedule(); | 44 | Core::g_app_core->PrepareReschedule(); |
| 47 | g_reschedule = true; | 45 | g_reschedule = true; |
| 48 | } | 46 | } |
| @@ -61,7 +59,7 @@ void Init() { | |||
| 61 | 59 | ||
| 62 | RegisterAllModules(); | 60 | RegisterAllModules(); |
| 63 | 61 | ||
| 64 | NOTICE_LOG(HLE, "initialized OK"); | 62 | LOG_DEBUG(Kernel, "initialized OK"); |
| 65 | } | 63 | } |
| 66 | 64 | ||
| 67 | void Shutdown() { | 65 | void Shutdown() { |
| @@ -69,7 +67,7 @@ void Shutdown() { | |||
| 69 | 67 | ||
| 70 | g_module_db.clear(); | 68 | g_module_db.clear(); |
| 71 | 69 | ||
| 72 | NOTICE_LOG(HLE, "shutdown OK"); | 70 | LOG_DEBUG(Kernel, "shutdown OK"); |
| 73 | } | 71 | } |
| 74 | 72 | ||
| 75 | } // namespace | 73 | } // namespace |
diff --git a/src/core/hle/kernel/address_arbiter.cpp b/src/core/hle/kernel/address_arbiter.cpp index ce4f3c854..9a921108d 100644 --- a/src/core/hle/kernel/address_arbiter.cpp +++ b/src/core/hle/kernel/address_arbiter.cpp | |||
| @@ -24,12 +24,6 @@ public: | |||
| 24 | Kernel::HandleType GetHandleType() const override { return HandleType::AddressArbiter; } | 24 | Kernel::HandleType GetHandleType() const override { return HandleType::AddressArbiter; } |
| 25 | 25 | ||
| 26 | std::string name; ///< Name of address arbiter object (optional) | 26 | std::string name; ///< Name of address arbiter object (optional) |
| 27 | |||
| 28 | ResultVal<bool> WaitSynchronization() override { | ||
| 29 | // TODO(bunnei): ImplementMe | ||
| 30 | ERROR_LOG(OSHLE, "(UNIMPLEMENTED)"); | ||
| 31 | return UnimplementedFunction(ErrorModule::OS); | ||
| 32 | } | ||
| 33 | }; | 27 | }; |
| 34 | 28 | ||
| 35 | //////////////////////////////////////////////////////////////////////////////////////////////////// | 29 | //////////////////////////////////////////////////////////////////////////////////////////////////// |
| @@ -59,7 +53,7 @@ ResultCode ArbitrateAddress(Handle handle, ArbitrationType type, u32 address, s3 | |||
| 59 | break; | 53 | break; |
| 60 | 54 | ||
| 61 | default: | 55 | default: |
| 62 | ERROR_LOG(KERNEL, "unknown type=%d", type); | 56 | LOG_ERROR(Kernel, "unknown type=%d", type); |
| 63 | return ResultCode(ErrorDescription::InvalidEnumValue, ErrorModule::Kernel, ErrorSummary::WrongArgument, ErrorLevel::Usage); | 57 | return ResultCode(ErrorDescription::InvalidEnumValue, ErrorModule::Kernel, ErrorSummary::WrongArgument, ErrorLevel::Usage); |
| 64 | } | 58 | } |
| 65 | return RESULT_SUCCESS; | 59 | return RESULT_SUCCESS; |
diff --git a/src/core/hle/kernel/archive.cpp b/src/core/hle/kernel/archive.cpp index a875fa7ff..ddc09e13b 100644 --- a/src/core/hle/kernel/archive.cpp +++ b/src/core/hle/kernel/archive.cpp | |||
| @@ -94,26 +94,20 @@ public: | |||
| 94 | } | 94 | } |
| 95 | case FileCommand::Close: | 95 | case FileCommand::Close: |
| 96 | { | 96 | { |
| 97 | DEBUG_LOG(KERNEL, "Close %s %s", GetTypeName().c_str(), GetName().c_str()); | 97 | LOG_TRACE(Service_FS, "Close %s %s", GetTypeName().c_str(), GetName().c_str()); |
| 98 | CloseArchive(backend->GetIdCode()); | 98 | CloseArchive(backend->GetIdCode()); |
| 99 | break; | 99 | break; |
| 100 | } | 100 | } |
| 101 | // Unknown command... | 101 | // Unknown command... |
| 102 | default: | 102 | default: |
| 103 | { | 103 | { |
| 104 | ERROR_LOG(KERNEL, "Unknown command=0x%08X!", cmd); | 104 | LOG_ERROR(Service_FS, "Unknown command=0x%08X", cmd); |
| 105 | return UnimplementedFunction(ErrorModule::FS); | 105 | return UnimplementedFunction(ErrorModule::FS); |
| 106 | } | 106 | } |
| 107 | } | 107 | } |
| 108 | cmd_buff[1] = 0; // No error | 108 | cmd_buff[1] = 0; // No error |
| 109 | return MakeResult<bool>(false); | 109 | return MakeResult<bool>(false); |
| 110 | } | 110 | } |
| 111 | |||
| 112 | ResultVal<bool> WaitSynchronization() override { | ||
| 113 | // TODO(bunnei): ImplementMe | ||
| 114 | ERROR_LOG(OSHLE, "(UNIMPLEMENTED)"); | ||
| 115 | return UnimplementedFunction(ErrorModule::FS); | ||
| 116 | } | ||
| 117 | }; | 111 | }; |
| 118 | 112 | ||
| 119 | class File : public Object { | 113 | class File : public Object { |
| @@ -138,7 +132,7 @@ public: | |||
| 138 | u64 offset = cmd_buff[1] | ((u64) cmd_buff[2]) << 32; | 132 | u64 offset = cmd_buff[1] | ((u64) cmd_buff[2]) << 32; |
| 139 | u32 length = cmd_buff[3]; | 133 | u32 length = cmd_buff[3]; |
| 140 | u32 address = cmd_buff[5]; | 134 | u32 address = cmd_buff[5]; |
| 141 | DEBUG_LOG(KERNEL, "Read %s %s: offset=0x%llx length=%d address=0x%x", | 135 | LOG_TRACE(Service_FS, "Read %s %s: offset=0x%llx length=%d address=0x%x", |
| 142 | GetTypeName().c_str(), GetName().c_str(), offset, length, address); | 136 | GetTypeName().c_str(), GetName().c_str(), offset, length, address); |
| 143 | cmd_buff[2] = backend->Read(offset, length, Memory::GetPointer(address)); | 137 | cmd_buff[2] = backend->Read(offset, length, Memory::GetPointer(address)); |
| 144 | break; | 138 | break; |
| @@ -151,7 +145,7 @@ public: | |||
| 151 | u32 length = cmd_buff[3]; | 145 | u32 length = cmd_buff[3]; |
| 152 | u32 flush = cmd_buff[4]; | 146 | u32 flush = cmd_buff[4]; |
| 153 | u32 address = cmd_buff[6]; | 147 | u32 address = cmd_buff[6]; |
| 154 | DEBUG_LOG(KERNEL, "Write %s %s: offset=0x%llx length=%d address=0x%x, flush=0x%x", | 148 | LOG_TRACE(Service_FS, "Write %s %s: offset=0x%llx length=%d address=0x%x, flush=0x%x", |
| 155 | GetTypeName().c_str(), GetName().c_str(), offset, length, address, flush); | 149 | GetTypeName().c_str(), GetName().c_str(), offset, length, address, flush); |
| 156 | cmd_buff[2] = backend->Write(offset, length, flush, Memory::GetPointer(address)); | 150 | cmd_buff[2] = backend->Write(offset, length, flush, Memory::GetPointer(address)); |
| 157 | break; | 151 | break; |
| @@ -159,7 +153,7 @@ public: | |||
| 159 | 153 | ||
| 160 | case FileCommand::GetSize: | 154 | case FileCommand::GetSize: |
| 161 | { | 155 | { |
| 162 | DEBUG_LOG(KERNEL, "GetSize %s %s", GetTypeName().c_str(), GetName().c_str()); | 156 | LOG_TRACE(Service_FS, "GetSize %s %s", GetTypeName().c_str(), GetName().c_str()); |
| 163 | u64 size = backend->GetSize(); | 157 | u64 size = backend->GetSize(); |
| 164 | cmd_buff[2] = (u32)size; | 158 | cmd_buff[2] = (u32)size; |
| 165 | cmd_buff[3] = size >> 32; | 159 | cmd_buff[3] = size >> 32; |
| @@ -169,7 +163,7 @@ public: | |||
| 169 | case FileCommand::SetSize: | 163 | case FileCommand::SetSize: |
| 170 | { | 164 | { |
| 171 | u64 size = cmd_buff[1] | ((u64)cmd_buff[2] << 32); | 165 | u64 size = cmd_buff[1] | ((u64)cmd_buff[2] << 32); |
| 172 | DEBUG_LOG(KERNEL, "SetSize %s %s size=%llu", | 166 | LOG_TRACE(Service_FS, "SetSize %s %s size=%llu", |
| 173 | GetTypeName().c_str(), GetName().c_str(), size); | 167 | GetTypeName().c_str(), GetName().c_str(), size); |
| 174 | backend->SetSize(size); | 168 | backend->SetSize(size); |
| 175 | break; | 169 | break; |
| @@ -177,14 +171,14 @@ public: | |||
| 177 | 171 | ||
| 178 | case FileCommand::Close: | 172 | case FileCommand::Close: |
| 179 | { | 173 | { |
| 180 | DEBUG_LOG(KERNEL, "Close %s %s", GetTypeName().c_str(), GetName().c_str()); | 174 | LOG_TRACE(Service_FS, "Close %s %s", GetTypeName().c_str(), GetName().c_str()); |
| 181 | Kernel::g_object_pool.Destroy<File>(GetHandle()); | 175 | Kernel::g_object_pool.Destroy<File>(GetHandle()); |
| 182 | break; | 176 | break; |
| 183 | } | 177 | } |
| 184 | 178 | ||
| 185 | // Unknown command... | 179 | // Unknown command... |
| 186 | default: | 180 | default: |
| 187 | ERROR_LOG(KERNEL, "Unknown command=0x%08X!", cmd); | 181 | LOG_ERROR(Service_FS, "Unknown command=0x%08X!", cmd); |
| 188 | ResultCode error = UnimplementedFunction(ErrorModule::FS); | 182 | ResultCode error = UnimplementedFunction(ErrorModule::FS); |
| 189 | cmd_buff[1] = error.raw; // TODO(Link Mauve): use the correct error code for that. | 183 | cmd_buff[1] = error.raw; // TODO(Link Mauve): use the correct error code for that. |
| 190 | return error; | 184 | return error; |
| @@ -192,12 +186,6 @@ public: | |||
| 192 | cmd_buff[1] = 0; // No error | 186 | cmd_buff[1] = 0; // No error |
| 193 | return MakeResult<bool>(false); | 187 | return MakeResult<bool>(false); |
| 194 | } | 188 | } |
| 195 | |||
| 196 | ResultVal<bool> WaitSynchronization() override { | ||
| 197 | // TODO(bunnei): ImplementMe | ||
| 198 | ERROR_LOG(OSHLE, "(UNIMPLEMENTED)"); | ||
| 199 | return UnimplementedFunction(ErrorModule::FS); | ||
| 200 | } | ||
| 201 | }; | 189 | }; |
| 202 | 190 | ||
| 203 | class Directory : public Object { | 191 | class Directory : public Object { |
| @@ -222,7 +210,7 @@ public: | |||
| 222 | u32 count = cmd_buff[1]; | 210 | u32 count = cmd_buff[1]; |
| 223 | u32 address = cmd_buff[3]; | 211 | u32 address = cmd_buff[3]; |
| 224 | auto entries = reinterpret_cast<FileSys::Entry*>(Memory::GetPointer(address)); | 212 | auto entries = reinterpret_cast<FileSys::Entry*>(Memory::GetPointer(address)); |
| 225 | DEBUG_LOG(KERNEL, "Read %s %s: count=%d", | 213 | LOG_TRACE(Service_FS, "Read %s %s: count=%d", |
| 226 | GetTypeName().c_str(), GetName().c_str(), count); | 214 | GetTypeName().c_str(), GetName().c_str(), count); |
| 227 | 215 | ||
| 228 | // Number of entries actually read | 216 | // Number of entries actually read |
| @@ -232,14 +220,14 @@ public: | |||
| 232 | 220 | ||
| 233 | case DirectoryCommand::Close: | 221 | case DirectoryCommand::Close: |
| 234 | { | 222 | { |
| 235 | DEBUG_LOG(KERNEL, "Close %s %s", GetTypeName().c_str(), GetName().c_str()); | 223 | LOG_TRACE(Service_FS, "Close %s %s", GetTypeName().c_str(), GetName().c_str()); |
| 236 | Kernel::g_object_pool.Destroy<Directory>(GetHandle()); | 224 | Kernel::g_object_pool.Destroy<Directory>(GetHandle()); |
| 237 | break; | 225 | break; |
| 238 | } | 226 | } |
| 239 | 227 | ||
| 240 | // Unknown command... | 228 | // Unknown command... |
| 241 | default: | 229 | default: |
| 242 | ERROR_LOG(KERNEL, "Unknown command=0x%08X!", cmd); | 230 | LOG_ERROR(Service_FS, "Unknown command=0x%08X!", cmd); |
| 243 | ResultCode error = UnimplementedFunction(ErrorModule::FS); | 231 | ResultCode error = UnimplementedFunction(ErrorModule::FS); |
| 244 | cmd_buff[1] = error.raw; // TODO(Link Mauve): use the correct error code for that. | 232 | cmd_buff[1] = error.raw; // TODO(Link Mauve): use the correct error code for that. |
| 245 | return error; | 233 | return error; |
| @@ -247,12 +235,6 @@ public: | |||
| 247 | cmd_buff[1] = 0; // No error | 235 | cmd_buff[1] = 0; // No error |
| 248 | return MakeResult<bool>(false); | 236 | return MakeResult<bool>(false); |
| 249 | } | 237 | } |
| 250 | |||
| 251 | ResultVal<bool> WaitSynchronization() override { | ||
| 252 | // TODO(bunnei): ImplementMe | ||
| 253 | ERROR_LOG(OSHLE, "(UNIMPLEMENTED)"); | ||
| 254 | return UnimplementedFunction(ErrorModule::FS); | ||
| 255 | } | ||
| 256 | }; | 238 | }; |
| 257 | 239 | ||
| 258 | //////////////////////////////////////////////////////////////////////////////////////////////////// | 240 | //////////////////////////////////////////////////////////////////////////////////////////////////// |
| @@ -272,11 +254,11 @@ ResultVal<Handle> OpenArchive(FileSys::Archive::IdCode id_code) { | |||
| 272 | ResultCode CloseArchive(FileSys::Archive::IdCode id_code) { | 254 | ResultCode CloseArchive(FileSys::Archive::IdCode id_code) { |
| 273 | auto itr = g_archive_map.find(id_code); | 255 | auto itr = g_archive_map.find(id_code); |
| 274 | if (itr == g_archive_map.end()) { | 256 | if (itr == g_archive_map.end()) { |
| 275 | ERROR_LOG(KERNEL, "Cannot close archive %d, does not exist!", (int)id_code); | 257 | LOG_ERROR(Service_FS, "Cannot close archive %d, does not exist!", (int)id_code); |
| 276 | return InvalidHandle(ErrorModule::FS); | 258 | return InvalidHandle(ErrorModule::FS); |
| 277 | } | 259 | } |
| 278 | 260 | ||
| 279 | INFO_LOG(KERNEL, "Closed archive %d", (int) id_code); | 261 | LOG_TRACE(Service_FS, "Closed archive %d", (int) id_code); |
| 280 | return RESULT_SUCCESS; | 262 | return RESULT_SUCCESS; |
| 281 | } | 263 | } |
| 282 | 264 | ||
| @@ -288,11 +270,11 @@ ResultCode MountArchive(Archive* archive) { | |||
| 288 | FileSys::Archive::IdCode id_code = archive->backend->GetIdCode(); | 270 | FileSys::Archive::IdCode id_code = archive->backend->GetIdCode(); |
| 289 | ResultVal<Handle> archive_handle = OpenArchive(id_code); | 271 | ResultVal<Handle> archive_handle = OpenArchive(id_code); |
| 290 | if (archive_handle.Succeeded()) { | 272 | if (archive_handle.Succeeded()) { |
| 291 | ERROR_LOG(KERNEL, "Cannot mount two archives with the same ID code! (%d)", (int) id_code); | 273 | LOG_ERROR(Service_FS, "Cannot mount two archives with the same ID code! (%d)", (int) id_code); |
| 292 | return archive_handle.Code(); | 274 | return archive_handle.Code(); |
| 293 | } | 275 | } |
| 294 | g_archive_map[id_code] = archive->GetHandle(); | 276 | g_archive_map[id_code] = archive->GetHandle(); |
| 295 | INFO_LOG(KERNEL, "Mounted archive %s", archive->GetName().c_str()); | 277 | LOG_TRACE(Service_FS, "Mounted archive %s", archive->GetName().c_str()); |
| 296 | return RESULT_SUCCESS; | 278 | return RESULT_SUCCESS; |
| 297 | } | 279 | } |
| 298 | 280 | ||
| @@ -442,7 +424,7 @@ void ArchiveInit() { | |||
| 442 | if (archive->Initialize()) | 424 | if (archive->Initialize()) |
| 443 | CreateArchive(archive, "SDMC"); | 425 | CreateArchive(archive, "SDMC"); |
| 444 | else | 426 | else |
| 445 | ERROR_LOG(KERNEL, "Can't instantiate SDMC archive with path %s", sdmc_directory.c_str()); | 427 | LOG_ERROR(Service_FS, "Can't instantiate SDMC archive with path %s", sdmc_directory.c_str()); |
| 446 | } | 428 | } |
| 447 | 429 | ||
| 448 | /// Shutdown archives | 430 | /// Shutdown archives |
diff --git a/src/core/hle/kernel/kernel.cpp b/src/core/hle/kernel/kernel.cpp index 80a34c2d5..b38be0a49 100644 --- a/src/core/hle/kernel/kernel.cpp +++ b/src/core/hle/kernel/kernel.cpp | |||
| @@ -35,7 +35,7 @@ Handle ObjectPool::Create(Object* obj, int range_bottom, int range_top) { | |||
| 35 | return i + HANDLE_OFFSET; | 35 | return i + HANDLE_OFFSET; |
| 36 | } | 36 | } |
| 37 | } | 37 | } |
| 38 | ERROR_LOG(HLE, "Unable to allocate kernel object, too many objects slots in use."); | 38 | LOG_ERROR(Kernel, "Unable to allocate kernel object, too many objects slots in use."); |
| 39 | return 0; | 39 | return 0; |
| 40 | } | 40 | } |
| 41 | 41 | ||
| @@ -62,7 +62,7 @@ void ObjectPool::Clear() { | |||
| 62 | 62 | ||
| 63 | Object* &ObjectPool::operator [](Handle handle) | 63 | Object* &ObjectPool::operator [](Handle handle) |
| 64 | { | 64 | { |
| 65 | _dbg_assert_msg_(KERNEL, IsValid(handle), "GRABBING UNALLOCED KERNEL OBJ"); | 65 | _dbg_assert_msg_(Kernel, IsValid(handle), "GRABBING UNALLOCED KERNEL OBJ"); |
| 66 | return pool[handle - HANDLE_OFFSET]; | 66 | return pool[handle - HANDLE_OFFSET]; |
| 67 | } | 67 | } |
| 68 | 68 | ||
| @@ -70,7 +70,7 @@ void ObjectPool::List() { | |||
| 70 | for (int i = 0; i < MAX_COUNT; i++) { | 70 | for (int i = 0; i < MAX_COUNT; i++) { |
| 71 | if (occupied[i]) { | 71 | if (occupied[i]) { |
| 72 | if (pool[i]) { | 72 | if (pool[i]) { |
| 73 | INFO_LOG(KERNEL, "KO %i: %s \"%s\"", i + HANDLE_OFFSET, pool[i]->GetTypeName().c_str(), | 73 | LOG_DEBUG(Kernel, "KO %i: %s \"%s\"", i + HANDLE_OFFSET, pool[i]->GetTypeName().c_str(), |
| 74 | pool[i]->GetName().c_str()); | 74 | pool[i]->GetName().c_str()); |
| 75 | } | 75 | } |
| 76 | } | 76 | } |
| @@ -82,7 +82,7 @@ int ObjectPool::GetCount() const { | |||
| 82 | } | 82 | } |
| 83 | 83 | ||
| 84 | Object* ObjectPool::CreateByIDType(int type) { | 84 | Object* ObjectPool::CreateByIDType(int type) { |
| 85 | ERROR_LOG(COMMON, "Unimplemented: %d.", type); | 85 | LOG_ERROR(Kernel, "Unimplemented: %d.", type); |
| 86 | return nullptr; | 86 | return nullptr; |
| 87 | } | 87 | } |
| 88 | 88 | ||
diff --git a/src/core/hle/kernel/kernel.h b/src/core/hle/kernel/kernel.h index 00a2228bf..00f9b57fc 100644 --- a/src/core/hle/kernel/kernel.h +++ b/src/core/hle/kernel/kernel.h | |||
| @@ -57,7 +57,7 @@ public: | |||
| 57 | * @return True if the current thread should wait as a result of the sync | 57 | * @return True if the current thread should wait as a result of the sync |
| 58 | */ | 58 | */ |
| 59 | virtual ResultVal<bool> SyncRequest() { | 59 | virtual ResultVal<bool> SyncRequest() { |
| 60 | ERROR_LOG(KERNEL, "(UNIMPLEMENTED)"); | 60 | LOG_ERROR(Kernel, "(UNIMPLEMENTED)"); |
| 61 | return UnimplementedFunction(ErrorModule::Kernel); | 61 | return UnimplementedFunction(ErrorModule::Kernel); |
| 62 | } | 62 | } |
| 63 | 63 | ||
| @@ -65,7 +65,10 @@ public: | |||
| 65 | * Wait for kernel object to synchronize. | 65 | * Wait for kernel object to synchronize. |
| 66 | * @return True if the current thread should wait as a result of the wait | 66 | * @return True if the current thread should wait as a result of the wait |
| 67 | */ | 67 | */ |
| 68 | virtual ResultVal<bool> WaitSynchronization() = 0; | 68 | virtual ResultVal<bool> WaitSynchronization() { |
| 69 | LOG_ERROR(Kernel, "(UNIMPLEMENTED)"); | ||
| 70 | return UnimplementedFunction(ErrorModule::Kernel); | ||
| 71 | } | ||
| 69 | }; | 72 | }; |
| 70 | 73 | ||
| 71 | class ObjectPool : NonCopyable { | 74 | class ObjectPool : NonCopyable { |
| @@ -92,13 +95,13 @@ public: | |||
| 92 | T* Get(Handle handle) { | 95 | T* Get(Handle handle) { |
| 93 | if (handle < HANDLE_OFFSET || handle >= HANDLE_OFFSET + MAX_COUNT || !occupied[handle - HANDLE_OFFSET]) { | 96 | if (handle < HANDLE_OFFSET || handle >= HANDLE_OFFSET + MAX_COUNT || !occupied[handle - HANDLE_OFFSET]) { |
| 94 | if (handle != 0) { | 97 | if (handle != 0) { |
| 95 | WARN_LOG(KERNEL, "Kernel: Bad object handle %i (%08x)", handle, handle); | 98 | LOG_ERROR(Kernel, "Bad object handle %08x", handle, handle); |
| 96 | } | 99 | } |
| 97 | return nullptr; | 100 | return nullptr; |
| 98 | } else { | 101 | } else { |
| 99 | Object* t = pool[handle - HANDLE_OFFSET]; | 102 | Object* t = pool[handle - HANDLE_OFFSET]; |
| 100 | if (t->GetHandleType() != T::GetStaticHandleType()) { | 103 | if (t->GetHandleType() != T::GetStaticHandleType()) { |
| 101 | WARN_LOG(KERNEL, "Kernel: Wrong object type for %i (%08x)", handle, handle); | 104 | LOG_ERROR(Kernel, "Wrong object type for %08x", handle, handle); |
| 102 | return nullptr; | 105 | return nullptr; |
| 103 | } | 106 | } |
| 104 | return static_cast<T*>(t); | 107 | return static_cast<T*>(t); |
| @@ -109,7 +112,7 @@ public: | |||
| 109 | template <class T> | 112 | template <class T> |
| 110 | T *GetFast(Handle handle) { | 113 | T *GetFast(Handle handle) { |
| 111 | const Handle realHandle = handle - HANDLE_OFFSET; | 114 | const Handle realHandle = handle - HANDLE_OFFSET; |
| 112 | _dbg_assert_(KERNEL, realHandle >= 0 && realHandle < MAX_COUNT && occupied[realHandle]); | 115 | _dbg_assert_(Kernel, realHandle >= 0 && realHandle < MAX_COUNT && occupied[realHandle]); |
| 113 | return static_cast<T*>(pool[realHandle]); | 116 | return static_cast<T*>(pool[realHandle]); |
| 114 | } | 117 | } |
| 115 | 118 | ||
| @@ -130,8 +133,8 @@ public: | |||
| 130 | 133 | ||
| 131 | bool GetIDType(Handle handle, HandleType* type) const { | 134 | bool GetIDType(Handle handle, HandleType* type) const { |
| 132 | if ((handle < HANDLE_OFFSET) || (handle >= HANDLE_OFFSET + MAX_COUNT) || | 135 | if ((handle < HANDLE_OFFSET) || (handle >= HANDLE_OFFSET + MAX_COUNT) || |
| 133 | !occupied[handle - HANDLE_OFFSET]) { | 136 | !occupied[handle - HANDLE_OFFSET]) { |
| 134 | ERROR_LOG(KERNEL, "Kernel: Bad object handle %i (%08x)", handle, handle); | 137 | LOG_ERROR(Kernel, "Bad object handle %08X", handle, handle); |
| 135 | return false; | 138 | return false; |
| 136 | } | 139 | } |
| 137 | Object* t = pool[handle - HANDLE_OFFSET]; | 140 | Object* t = pool[handle - HANDLE_OFFSET]; |
diff --git a/src/core/hle/kernel/shared_memory.cpp b/src/core/hle/kernel/shared_memory.cpp index cfcc0e0b7..3c8c502c6 100644 --- a/src/core/hle/kernel/shared_memory.cpp +++ b/src/core/hle/kernel/shared_memory.cpp | |||
| @@ -16,12 +16,6 @@ public: | |||
| 16 | static Kernel::HandleType GetStaticHandleType() { return Kernel::HandleType::SharedMemory; } | 16 | static Kernel::HandleType GetStaticHandleType() { return Kernel::HandleType::SharedMemory; } |
| 17 | Kernel::HandleType GetHandleType() const override { return Kernel::HandleType::SharedMemory; } | 17 | Kernel::HandleType GetHandleType() const override { return Kernel::HandleType::SharedMemory; } |
| 18 | 18 | ||
| 19 | ResultVal<bool> WaitSynchronization() override { | ||
| 20 | // TODO(bunnei): ImplementMe | ||
| 21 | ERROR_LOG(OSHLE, "(UNIMPLEMENTED)"); | ||
| 22 | return UnimplementedFunction(ErrorModule::OS); | ||
| 23 | } | ||
| 24 | |||
| 25 | u32 base_address; ///< Address of shared memory block in RAM | 19 | u32 base_address; ///< Address of shared memory block in RAM |
| 26 | MemoryPermission permissions; ///< Permissions of shared memory block (SVC field) | 20 | MemoryPermission permissions; ///< Permissions of shared memory block (SVC field) |
| 27 | MemoryPermission other_permissions; ///< Other permissions of shared memory block (SVC field) | 21 | MemoryPermission other_permissions; ///< Other permissions of shared memory block (SVC field) |
| @@ -61,7 +55,7 @@ ResultCode MapSharedMemory(u32 handle, u32 address, MemoryPermission permissions | |||
| 61 | MemoryPermission other_permissions) { | 55 | MemoryPermission other_permissions) { |
| 62 | 56 | ||
| 63 | if (address < Memory::SHARED_MEMORY_VADDR || address >= Memory::SHARED_MEMORY_VADDR_END) { | 57 | if (address < Memory::SHARED_MEMORY_VADDR || address >= Memory::SHARED_MEMORY_VADDR_END) { |
| 64 | ERROR_LOG(KERNEL, "cannot map handle=0x%08X, address=0x%08X outside of shared mem bounds!", | 58 | LOG_ERROR(Kernel_SVC, "cannot map handle=0x%08X, address=0x%08X outside of shared mem bounds!", |
| 65 | handle, address); | 59 | handle, address); |
| 66 | return ResultCode(ErrorDescription::InvalidAddress, ErrorModule::Kernel, | 60 | return ResultCode(ErrorDescription::InvalidAddress, ErrorModule::Kernel, |
| 67 | ErrorSummary::InvalidArgument, ErrorLevel::Permanent); | 61 | ErrorSummary::InvalidArgument, ErrorLevel::Permanent); |
| @@ -83,7 +77,7 @@ ResultVal<u8*> GetSharedMemoryPointer(Handle handle, u32 offset) { | |||
| 83 | if (0 != shared_memory->base_address) | 77 | if (0 != shared_memory->base_address) |
| 84 | return MakeResult<u8*>(Memory::GetPointer(shared_memory->base_address + offset)); | 78 | return MakeResult<u8*>(Memory::GetPointer(shared_memory->base_address + offset)); |
| 85 | 79 | ||
| 86 | ERROR_LOG(KERNEL, "memory block handle=0x%08X not mapped!", handle); | 80 | LOG_ERROR(Kernel_SVC, "memory block handle=0x%08X not mapped!", handle); |
| 87 | // TODO(yuriks): Verify error code. | 81 | // TODO(yuriks): Verify error code. |
| 88 | return ResultCode(ErrorDescription::InvalidAddress, ErrorModule::Kernel, | 82 | return ResultCode(ErrorDescription::InvalidAddress, ErrorModule::Kernel, |
| 89 | ErrorSummary::InvalidState, ErrorLevel::Permanent); | 83 | ErrorSummary::InvalidState, ErrorLevel::Permanent); |
diff --git a/src/core/hle/kernel/thread.cpp b/src/core/hle/kernel/thread.cpp index 492b917e1..1c04701de 100644 --- a/src/core/hle/kernel/thread.cpp +++ b/src/core/hle/kernel/thread.cpp | |||
| @@ -150,13 +150,13 @@ void ChangeReadyState(Thread* t, bool ready) { | |||
| 150 | 150 | ||
| 151 | /// Verify that a thread has not been released from waiting | 151 | /// Verify that a thread has not been released from waiting |
| 152 | static bool VerifyWait(const Thread* thread, WaitType type, Handle wait_handle) { | 152 | static bool VerifyWait(const Thread* thread, WaitType type, Handle wait_handle) { |
| 153 | _dbg_assert_(KERNEL, thread != nullptr); | 153 | _dbg_assert_(Kernel, thread != nullptr); |
| 154 | return (type == thread->wait_type) && (wait_handle == thread->wait_handle) && (thread->IsWaiting()); | 154 | return (type == thread->wait_type) && (wait_handle == thread->wait_handle) && (thread->IsWaiting()); |
| 155 | } | 155 | } |
| 156 | 156 | ||
| 157 | /// Verify that a thread has not been released from waiting (with wait address) | 157 | /// Verify that a thread has not been released from waiting (with wait address) |
| 158 | static bool VerifyWait(const Thread* thread, WaitType type, Handle wait_handle, VAddr wait_address) { | 158 | static bool VerifyWait(const Thread* thread, WaitType type, Handle wait_handle, VAddr wait_address) { |
| 159 | _dbg_assert_(KERNEL, thread != nullptr); | 159 | _dbg_assert_(Kernel, thread != nullptr); |
| 160 | return VerifyWait(thread, type, wait_handle) && (wait_address == thread->wait_address); | 160 | return VerifyWait(thread, type, wait_handle) && (wait_address == thread->wait_address); |
| 161 | } | 161 | } |
| 162 | 162 | ||
| @@ -196,7 +196,7 @@ void ChangeThreadState(Thread* t, ThreadStatus new_status) { | |||
| 196 | 196 | ||
| 197 | if (new_status == THREADSTATUS_WAIT) { | 197 | if (new_status == THREADSTATUS_WAIT) { |
| 198 | if (t->wait_type == WAITTYPE_NONE) { | 198 | if (t->wait_type == WAITTYPE_NONE) { |
| 199 | ERROR_LOG(KERNEL, "Waittype none not allowed"); | 199 | LOG_ERROR(Kernel, "Waittype none not allowed"); |
| 200 | } | 200 | } |
| 201 | } | 201 | } |
| 202 | } | 202 | } |
| @@ -318,12 +318,12 @@ void DebugThreadQueue() { | |||
| 318 | if (!thread) { | 318 | if (!thread) { |
| 319 | return; | 319 | return; |
| 320 | } | 320 | } |
| 321 | INFO_LOG(KERNEL, "0x%02X 0x%08X (current)", thread->current_priority, GetCurrentThreadHandle()); | 321 | LOG_DEBUG(Kernel, "0x%02X 0x%08X (current)", thread->current_priority, GetCurrentThreadHandle()); |
| 322 | for (u32 i = 0; i < thread_queue.size(); i++) { | 322 | for (u32 i = 0; i < thread_queue.size(); i++) { |
| 323 | Handle handle = thread_queue[i]; | 323 | Handle handle = thread_queue[i]; |
| 324 | s32 priority = thread_ready_queue.contains(handle); | 324 | s32 priority = thread_ready_queue.contains(handle); |
| 325 | if (priority != -1) { | 325 | if (priority != -1) { |
| 326 | INFO_LOG(KERNEL, "0x%02X 0x%08X", priority, handle); | 326 | LOG_DEBUG(Kernel, "0x%02X 0x%08X", priority, handle); |
| 327 | } | 327 | } |
| 328 | } | 328 | } |
| 329 | } | 329 | } |
| @@ -333,7 +333,7 @@ Thread* CreateThread(Handle& handle, const char* name, u32 entry_point, s32 prio | |||
| 333 | s32 processor_id, u32 stack_top, int stack_size) { | 333 | s32 processor_id, u32 stack_top, int stack_size) { |
| 334 | 334 | ||
| 335 | _assert_msg_(KERNEL, (priority >= THREADPRIO_HIGHEST && priority <= THREADPRIO_LOWEST), | 335 | _assert_msg_(KERNEL, (priority >= THREADPRIO_HIGHEST && priority <= THREADPRIO_LOWEST), |
| 336 | "CreateThread priority=%d, outside of allowable range!", priority) | 336 | "priority=%d, outside of allowable range!", priority) |
| 337 | 337 | ||
| 338 | Thread* thread = new Thread; | 338 | Thread* thread = new Thread; |
| 339 | 339 | ||
| @@ -362,24 +362,24 @@ Handle CreateThread(const char* name, u32 entry_point, s32 priority, u32 arg, s3 | |||
| 362 | u32 stack_top, int stack_size) { | 362 | u32 stack_top, int stack_size) { |
| 363 | 363 | ||
| 364 | if (name == nullptr) { | 364 | if (name == nullptr) { |
| 365 | ERROR_LOG(KERNEL, "CreateThread(): nullptr name"); | 365 | LOG_ERROR(Kernel_SVC, "nullptr name"); |
| 366 | return -1; | 366 | return -1; |
| 367 | } | 367 | } |
| 368 | if ((u32)stack_size < 0x200) { | 368 | if ((u32)stack_size < 0x200) { |
| 369 | ERROR_LOG(KERNEL, "CreateThread(name=%s): invalid stack_size=0x%08X", name, | 369 | LOG_ERROR(Kernel_SVC, "(name=%s): invalid stack_size=0x%08X", name, |
| 370 | stack_size); | 370 | stack_size); |
| 371 | return -1; | 371 | return -1; |
| 372 | } | 372 | } |
| 373 | if (priority < THREADPRIO_HIGHEST || priority > THREADPRIO_LOWEST) { | 373 | if (priority < THREADPRIO_HIGHEST || priority > THREADPRIO_LOWEST) { |
| 374 | s32 new_priority = CLAMP(priority, THREADPRIO_HIGHEST, THREADPRIO_LOWEST); | 374 | s32 new_priority = CLAMP(priority, THREADPRIO_HIGHEST, THREADPRIO_LOWEST); |
| 375 | WARN_LOG(KERNEL, "CreateThread(name=%s): invalid priority=0x%08X, clamping to %08X", | 375 | LOG_WARNING(Kernel_SVC, "(name=%s): invalid priority=%d, clamping to %d", |
| 376 | name, priority, new_priority); | 376 | name, priority, new_priority); |
| 377 | // TODO(bunnei): Clamping to a valid priority is not necessarily correct behavior... Confirm | 377 | // TODO(bunnei): Clamping to a valid priority is not necessarily correct behavior... Confirm |
| 378 | // validity of this | 378 | // validity of this |
| 379 | priority = new_priority; | 379 | priority = new_priority; |
| 380 | } | 380 | } |
| 381 | if (!Memory::GetPointer(entry_point)) { | 381 | if (!Memory::GetPointer(entry_point)) { |
| 382 | ERROR_LOG(KERNEL, "CreateThread(name=%s): invalid entry %08x", name, entry_point); | 382 | LOG_ERROR(Kernel_SVC, "(name=%s): invalid entry %08x", name, entry_point); |
| 383 | return -1; | 383 | return -1; |
| 384 | } | 384 | } |
| 385 | Handle handle; | 385 | Handle handle; |
| @@ -416,7 +416,7 @@ ResultCode SetThreadPriority(Handle handle, s32 priority) { | |||
| 416 | // If priority is invalid, clamp to valid range | 416 | // If priority is invalid, clamp to valid range |
| 417 | if (priority < THREADPRIO_HIGHEST || priority > THREADPRIO_LOWEST) { | 417 | if (priority < THREADPRIO_HIGHEST || priority > THREADPRIO_LOWEST) { |
| 418 | s32 new_priority = CLAMP(priority, THREADPRIO_HIGHEST, THREADPRIO_LOWEST); | 418 | s32 new_priority = CLAMP(priority, THREADPRIO_HIGHEST, THREADPRIO_LOWEST); |
| 419 | WARN_LOG(KERNEL, "invalid priority=0x%08X, clamping to %08X", priority, new_priority); | 419 | LOG_WARNING(Kernel_SVC, "invalid priority=%d, clamping to %d", priority, new_priority); |
| 420 | // TODO(bunnei): Clamping to a valid priority is not necessarily correct behavior... Confirm | 420 | // TODO(bunnei): Clamping to a valid priority is not necessarily correct behavior... Confirm |
| 421 | // validity of this | 421 | // validity of this |
| 422 | priority = new_priority; | 422 | priority = new_priority; |
| @@ -470,7 +470,7 @@ void Reschedule() { | |||
| 470 | Thread* next = NextThread(); | 470 | Thread* next = NextThread(); |
| 471 | HLE::g_reschedule = false; | 471 | HLE::g_reschedule = false; |
| 472 | if (next > 0) { | 472 | if (next > 0) { |
| 473 | INFO_LOG(KERNEL, "context switch 0x%08X -> 0x%08X", prev->GetHandle(), next->GetHandle()); | 473 | LOG_TRACE(Kernel, "context switch 0x%08X -> 0x%08X", prev->GetHandle(), next->GetHandle()); |
| 474 | 474 | ||
| 475 | SwitchContext(next); | 475 | SwitchContext(next); |
| 476 | 476 | ||
diff --git a/src/core/hle/service/ac_u.cpp b/src/core/hle/service/ac_u.cpp index 46aee40d6..4130feb9d 100644 --- a/src/core/hle/service/ac_u.cpp +++ b/src/core/hle/service/ac_u.cpp | |||
| @@ -26,7 +26,7 @@ void GetWifiStatus(Service::Interface* self) { | |||
| 26 | cmd_buff[1] = 0; // No error | 26 | cmd_buff[1] = 0; // No error |
| 27 | cmd_buff[2] = 0; // Connection type set to none | 27 | cmd_buff[2] = 0; // Connection type set to none |
| 28 | 28 | ||
| 29 | WARN_LOG(KERNEL, "(STUBBED) called"); | 29 | LOG_WARNING(Service_AC, "(STUBBED) called"); |
| 30 | } | 30 | } |
| 31 | 31 | ||
| 32 | const Interface::FunctionInfo FunctionTable[] = { | 32 | const Interface::FunctionInfo FunctionTable[] = { |
diff --git a/src/core/hle/service/apt_u.cpp b/src/core/hle/service/apt_u.cpp index 181763724..b6d5d101f 100644 --- a/src/core/hle/service/apt_u.cpp +++ b/src/core/hle/service/apt_u.cpp | |||
| @@ -53,7 +53,7 @@ void Initialize(Service::Interface* self) { | |||
| 53 | 53 | ||
| 54 | cmd_buff[1] = 0; // No error | 54 | cmd_buff[1] = 0; // No error |
| 55 | 55 | ||
| 56 | DEBUG_LOG(KERNEL, "called"); | 56 | LOG_DEBUG(Service_APT, "called"); |
| 57 | } | 57 | } |
| 58 | 58 | ||
| 59 | void GetLockHandle(Service::Interface* self) { | 59 | void GetLockHandle(Service::Interface* self) { |
| @@ -74,14 +74,14 @@ void GetLockHandle(Service::Interface* self) { | |||
| 74 | cmd_buff[4] = 0; | 74 | cmd_buff[4] = 0; |
| 75 | 75 | ||
| 76 | cmd_buff[5] = lock_handle; | 76 | cmd_buff[5] = lock_handle; |
| 77 | DEBUG_LOG(KERNEL, "called handle=0x%08X", cmd_buff[5]); | 77 | LOG_TRACE(Service_APT, "called handle=0x%08X", cmd_buff[5]); |
| 78 | } | 78 | } |
| 79 | 79 | ||
| 80 | void Enable(Service::Interface* self) { | 80 | void Enable(Service::Interface* self) { |
| 81 | u32* cmd_buff = Service::GetCommandBuffer(); | 81 | u32* cmd_buff = Service::GetCommandBuffer(); |
| 82 | u32 unk = cmd_buff[1]; // TODO(bunnei): What is this field used for? | 82 | u32 unk = cmd_buff[1]; // TODO(bunnei): What is this field used for? |
| 83 | cmd_buff[1] = 0; // No error | 83 | cmd_buff[1] = 0; // No error |
| 84 | WARN_LOG(KERNEL, "(STUBBED) called unk=0x%08X", unk); | 84 | LOG_WARNING(Service_APT, "(STUBBED) called unk=0x%08X", unk); |
| 85 | } | 85 | } |
| 86 | 86 | ||
| 87 | void InquireNotification(Service::Interface* self) { | 87 | void InquireNotification(Service::Interface* self) { |
| @@ -89,7 +89,7 @@ void InquireNotification(Service::Interface* self) { | |||
| 89 | u32 app_id = cmd_buff[2]; | 89 | u32 app_id = cmd_buff[2]; |
| 90 | cmd_buff[1] = 0; // No error | 90 | cmd_buff[1] = 0; // No error |
| 91 | cmd_buff[2] = static_cast<u32>(SignalType::None); // Signal type | 91 | cmd_buff[2] = static_cast<u32>(SignalType::None); // Signal type |
| 92 | WARN_LOG(KERNEL, "(STUBBED) called app_id=0x%08X", app_id); | 92 | LOG_WARNING(Service_APT, "(STUBBED) called app_id=0x%08X", app_id); |
| 93 | } | 93 | } |
| 94 | 94 | ||
| 95 | /** | 95 | /** |
| @@ -122,7 +122,7 @@ void ReceiveParameter(Service::Interface* self) { | |||
| 122 | cmd_buff[5] = 0; | 122 | cmd_buff[5] = 0; |
| 123 | cmd_buff[6] = 0; | 123 | cmd_buff[6] = 0; |
| 124 | cmd_buff[7] = 0; | 124 | cmd_buff[7] = 0; |
| 125 | WARN_LOG(KERNEL, "(STUBBED) called app_id=0x%08X, buffer_size=0x%08X", app_id, buffer_size); | 125 | LOG_WARNING(Service_APT, "(STUBBED) called app_id=0x%08X, buffer_size=0x%08X", app_id, buffer_size); |
| 126 | } | 126 | } |
| 127 | 127 | ||
| 128 | /** | 128 | /** |
| @@ -155,7 +155,7 @@ void GlanceParameter(Service::Interface* self) { | |||
| 155 | cmd_buff[6] = 0; | 155 | cmd_buff[6] = 0; |
| 156 | cmd_buff[7] = 0; | 156 | cmd_buff[7] = 0; |
| 157 | 157 | ||
| 158 | WARN_LOG(KERNEL, "(STUBBED) called app_id=0x%08X, buffer_size=0x%08X", app_id, buffer_size); | 158 | LOG_WARNING(Service_APT, "(STUBBED) called app_id=0x%08X, buffer_size=0x%08X", app_id, buffer_size); |
| 159 | } | 159 | } |
| 160 | 160 | ||
| 161 | /** | 161 | /** |
| @@ -181,7 +181,7 @@ void AppletUtility(Service::Interface* self) { | |||
| 181 | 181 | ||
| 182 | cmd_buff[1] = 0; // No error | 182 | cmd_buff[1] = 0; // No error |
| 183 | 183 | ||
| 184 | WARN_LOG(KERNEL, "(STUBBED) called unk=0x%08X, buffer1_size=0x%08x, buffer2_size=0x%08x, " | 184 | LOG_WARNING(Service_APT, "(STUBBED) called unk=0x%08X, buffer1_size=0x%08x, buffer2_size=0x%08x, " |
| 185 | "buffer1_addr=0x%08x, buffer2_addr=0x%08x", unk, buffer1_size, buffer2_size, | 185 | "buffer1_addr=0x%08x, buffer2_addr=0x%08x", unk, buffer1_size, buffer2_size, |
| 186 | buffer1_addr, buffer2_addr); | 186 | buffer1_addr, buffer2_addr); |
| 187 | } | 187 | } |
| @@ -194,7 +194,7 @@ void AppletUtility(Service::Interface* self) { | |||
| 194 | * 4 : Handle to shared font memory | 194 | * 4 : Handle to shared font memory |
| 195 | */ | 195 | */ |
| 196 | void GetSharedFont(Service::Interface* self) { | 196 | void GetSharedFont(Service::Interface* self) { |
| 197 | DEBUG_LOG(KERNEL, "called"); | 197 | LOG_TRACE(Kernel_SVC, "called"); |
| 198 | 198 | ||
| 199 | u32* cmd_buff = Service::GetCommandBuffer(); | 199 | u32* cmd_buff = Service::GetCommandBuffer(); |
| 200 | 200 | ||
| @@ -210,7 +210,7 @@ void GetSharedFont(Service::Interface* self) { | |||
| 210 | cmd_buff[4] = shared_font_mem; | 210 | cmd_buff[4] = shared_font_mem; |
| 211 | } else { | 211 | } else { |
| 212 | cmd_buff[1] = -1; // Generic error (not really possible to verify this on hardware) | 212 | cmd_buff[1] = -1; // Generic error (not really possible to verify this on hardware) |
| 213 | ERROR_LOG(KERNEL, "called, but %s has not been loaded!", SHARED_FONT); | 213 | LOG_ERROR(Kernel_SVC, "called, but %s has not been loaded!", SHARED_FONT); |
| 214 | } | 214 | } |
| 215 | } | 215 | } |
| 216 | 216 | ||
| @@ -321,7 +321,7 @@ Interface::Interface() { | |||
| 321 | // Create shared font memory object | 321 | // Create shared font memory object |
| 322 | shared_font_mem = Kernel::CreateSharedMemory("APT_U:shared_font_mem"); | 322 | shared_font_mem = Kernel::CreateSharedMemory("APT_U:shared_font_mem"); |
| 323 | } else { | 323 | } else { |
| 324 | WARN_LOG(KERNEL, "Unable to load shared font: %s", filepath.c_str()); | 324 | LOG_WARNING(Service_APT, "Unable to load shared font: %s", filepath.c_str()); |
| 325 | shared_font_mem = 0; | 325 | shared_font_mem = 0; |
| 326 | } | 326 | } |
| 327 | 327 | ||
diff --git a/src/core/hle/service/cfg_u.cpp b/src/core/hle/service/cfg_u.cpp index 82bab5797..972cc0534 100644 --- a/src/core/hle/service/cfg_u.cpp +++ b/src/core/hle/service/cfg_u.cpp | |||
| @@ -56,7 +56,7 @@ static void GetCountryCodeString(Service::Interface* self) { | |||
| 56 | u32 country_code_id = cmd_buffer[1]; | 56 | u32 country_code_id = cmd_buffer[1]; |
| 57 | 57 | ||
| 58 | if (country_code_id >= country_codes.size() || 0 == country_codes[country_code_id]) { | 58 | if (country_code_id >= country_codes.size() || 0 == country_codes[country_code_id]) { |
| 59 | ERROR_LOG(KERNEL, "requested country code id=%d is invalid", country_code_id); | 59 | LOG_ERROR(Service_CFG, "requested country code id=%d is invalid", country_code_id); |
| 60 | cmd_buffer[1] = ResultCode(ErrorDescription::NotFound, ErrorModule::Config, ErrorSummary::WrongArgument, ErrorLevel::Permanent).raw; | 60 | cmd_buffer[1] = ResultCode(ErrorDescription::NotFound, ErrorModule::Config, ErrorSummary::WrongArgument, ErrorLevel::Permanent).raw; |
| 61 | return; | 61 | return; |
| 62 | } | 62 | } |
| @@ -79,7 +79,7 @@ static void GetCountryCodeID(Service::Interface* self) { | |||
| 79 | u16 country_code_id = 0; | 79 | u16 country_code_id = 0; |
| 80 | 80 | ||
| 81 | // The following algorithm will fail if the first country code isn't 0. | 81 | // The following algorithm will fail if the first country code isn't 0. |
| 82 | _dbg_assert_(HLE, country_codes[0] == 0); | 82 | _dbg_assert_(Service_CFG, country_codes[0] == 0); |
| 83 | 83 | ||
| 84 | for (size_t id = 0; id < country_codes.size(); ++id) { | 84 | for (size_t id = 0; id < country_codes.size(); ++id) { |
| 85 | if (country_codes[id] == country_code) { | 85 | if (country_codes[id] == country_code) { |
| @@ -89,7 +89,7 @@ static void GetCountryCodeID(Service::Interface* self) { | |||
| 89 | } | 89 | } |
| 90 | 90 | ||
| 91 | if (0 == country_code_id) { | 91 | if (0 == country_code_id) { |
| 92 | ERROR_LOG(KERNEL, "requested country code name=%c%c is invalid", country_code & 0xff, country_code >> 8); | 92 | LOG_ERROR(Service_CFG, "requested country code name=%c%c is invalid", country_code & 0xff, country_code >> 8); |
| 93 | cmd_buffer[1] = ResultCode(ErrorDescription::NotFound, ErrorModule::Config, ErrorSummary::WrongArgument, ErrorLevel::Permanent).raw; | 93 | cmd_buffer[1] = ResultCode(ErrorDescription::NotFound, ErrorModule::Config, ErrorSummary::WrongArgument, ErrorLevel::Permanent).raw; |
| 94 | cmd_buffer[2] = 0xFFFF; | 94 | cmd_buffer[2] = 0xFFFF; |
| 95 | return; | 95 | return; |
diff --git a/src/core/hle/service/dsp_dsp.cpp b/src/core/hle/service/dsp_dsp.cpp index e89c8aae3..ce1c9938d 100644 --- a/src/core/hle/service/dsp_dsp.cpp +++ b/src/core/hle/service/dsp_dsp.cpp | |||
| @@ -32,7 +32,7 @@ void ConvertProcessAddressFromDspDram(Service::Interface* self) { | |||
| 32 | cmd_buff[1] = 0; // No error | 32 | cmd_buff[1] = 0; // No error |
| 33 | cmd_buff[2] = (addr << 1) + (Memory::DSP_MEMORY_VADDR + 0x40000); | 33 | cmd_buff[2] = (addr << 1) + (Memory::DSP_MEMORY_VADDR + 0x40000); |
| 34 | 34 | ||
| 35 | DEBUG_LOG(KERNEL, "(STUBBED) called with address %u", addr); | 35 | LOG_WARNING(Service_DSP, "(STUBBED) called with address %u", addr); |
| 36 | } | 36 | } |
| 37 | 37 | ||
| 38 | /** | 38 | /** |
| @@ -55,7 +55,7 @@ void LoadComponent(Service::Interface* self) { | |||
| 55 | 55 | ||
| 56 | // TODO(bunnei): Implement real DSP firmware loading | 56 | // TODO(bunnei): Implement real DSP firmware loading |
| 57 | 57 | ||
| 58 | DEBUG_LOG(KERNEL, "(STUBBED) called"); | 58 | LOG_WARNING(Service_DSP, "(STUBBED) called"); |
| 59 | } | 59 | } |
| 60 | 60 | ||
| 61 | /** | 61 | /** |
| @@ -70,7 +70,7 @@ void GetSemaphoreEventHandle(Service::Interface* self) { | |||
| 70 | cmd_buff[1] = 0; // No error | 70 | cmd_buff[1] = 0; // No error |
| 71 | cmd_buff[3] = semaphore_event; // Event handle | 71 | cmd_buff[3] = semaphore_event; // Event handle |
| 72 | 72 | ||
| 73 | DEBUG_LOG(KERNEL, "(STUBBED) called"); | 73 | LOG_WARNING(Service_DSP, "(STUBBED) called"); |
| 74 | } | 74 | } |
| 75 | 75 | ||
| 76 | /** | 76 | /** |
| @@ -89,7 +89,7 @@ void RegisterInterruptEvents(Service::Interface* self) { | |||
| 89 | 89 | ||
| 90 | cmd_buff[1] = 0; // No error | 90 | cmd_buff[1] = 0; // No error |
| 91 | 91 | ||
| 92 | DEBUG_LOG(KERNEL, "(STUBBED) called"); | 92 | LOG_WARNING(Service_DSP, "(STUBBED) called"); |
| 93 | } | 93 | } |
| 94 | 94 | ||
| 95 | /** | 95 | /** |
| @@ -106,7 +106,7 @@ void WriteReg0x10(Service::Interface* self) { | |||
| 106 | 106 | ||
| 107 | cmd_buff[1] = 0; // No error | 107 | cmd_buff[1] = 0; // No error |
| 108 | 108 | ||
| 109 | DEBUG_LOG(KERNEL, "(STUBBED) called"); | 109 | LOG_WARNING(Service_DSP, "(STUBBED) called"); |
| 110 | } | 110 | } |
| 111 | 111 | ||
| 112 | /** | 112 | /** |
| @@ -140,7 +140,7 @@ void ReadPipeIfPossible(Service::Interface* self) { | |||
| 140 | Memory::Write16(addr + offset, canned_read_pipe[read_pipe_count]); | 140 | Memory::Write16(addr + offset, canned_read_pipe[read_pipe_count]); |
| 141 | read_pipe_count++; | 141 | read_pipe_count++; |
| 142 | } else { | 142 | } else { |
| 143 | ERROR_LOG(KERNEL, "canned read pipe log exceeded!"); | 143 | LOG_ERROR(Service_DSP, "canned read pipe log exceeded!"); |
| 144 | break; | 144 | break; |
| 145 | } | 145 | } |
| 146 | } | 146 | } |
| @@ -148,7 +148,7 @@ void ReadPipeIfPossible(Service::Interface* self) { | |||
| 148 | cmd_buff[1] = 0; // No error | 148 | cmd_buff[1] = 0; // No error |
| 149 | cmd_buff[2] = (read_pipe_count - initial_size) * sizeof(u16); | 149 | cmd_buff[2] = (read_pipe_count - initial_size) * sizeof(u16); |
| 150 | 150 | ||
| 151 | DEBUG_LOG(KERNEL, "(STUBBED) called size=0x%08X, buffer=0x%08X", size, addr); | 151 | LOG_WARNING(Service_DSP, "(STUBBED) called size=0x%08X, buffer=0x%08X", size, addr); |
| 152 | } | 152 | } |
| 153 | 153 | ||
| 154 | const Interface::FunctionInfo FunctionTable[] = { | 154 | const Interface::FunctionInfo FunctionTable[] = { |
diff --git a/src/core/hle/service/fs_user.cpp b/src/core/hle/service/fs_user.cpp index 51e8b579e..9bda4fe8a 100644 --- a/src/core/hle/service/fs_user.cpp +++ b/src/core/hle/service/fs_user.cpp | |||
| @@ -23,7 +23,7 @@ static void Initialize(Service::Interface* self) { | |||
| 23 | // http://3dbrew.org/wiki/FS:Initialize#Request | 23 | // http://3dbrew.org/wiki/FS:Initialize#Request |
| 24 | cmd_buff[1] = RESULT_SUCCESS.raw; | 24 | cmd_buff[1] = RESULT_SUCCESS.raw; |
| 25 | 25 | ||
| 26 | DEBUG_LOG(KERNEL, "called"); | 26 | LOG_DEBUG(Service_FS, "called"); |
| 27 | } | 27 | } |
| 28 | 28 | ||
| 29 | /** | 29 | /** |
| @@ -55,17 +55,15 @@ static void OpenFile(Service::Interface* self) { | |||
| 55 | u32 filename_ptr = cmd_buff[9]; | 55 | u32 filename_ptr = cmd_buff[9]; |
| 56 | FileSys::Path file_path(filename_type, filename_size, filename_ptr); | 56 | FileSys::Path file_path(filename_type, filename_size, filename_ptr); |
| 57 | 57 | ||
| 58 | DEBUG_LOG(KERNEL, "path=%s, mode=%d attrs=%u", file_path.DebugStr().c_str(), mode.hex, attributes); | 58 | LOG_DEBUG(Service_FS, "path=%s, mode=%d attrs=%u", file_path.DebugStr().c_str(), mode.hex, attributes); |
| 59 | 59 | ||
| 60 | ResultVal<Handle> handle = Kernel::OpenFileFromArchive(archive_handle, file_path, mode); | 60 | ResultVal<Handle> handle = Kernel::OpenFileFromArchive(archive_handle, file_path, mode); |
| 61 | cmd_buff[1] = handle.Code().raw; | 61 | cmd_buff[1] = handle.Code().raw; |
| 62 | if (handle.Succeeded()) { | 62 | if (handle.Succeeded()) { |
| 63 | cmd_buff[3] = *handle; | 63 | cmd_buff[3] = *handle; |
| 64 | } else { | 64 | } else { |
| 65 | ERROR_LOG(KERNEL, "failed to get a handle for file %s", file_path.DebugStr().c_str()); | 65 | LOG_ERROR(Service_FS, "failed to get a handle for file %s", file_path.DebugStr().c_str()); |
| 66 | } | 66 | } |
| 67 | |||
| 68 | DEBUG_LOG(KERNEL, "called"); | ||
| 69 | } | 67 | } |
| 70 | 68 | ||
| 71 | /** | 69 | /** |
| @@ -102,11 +100,11 @@ static void OpenFileDirectly(Service::Interface* self) { | |||
| 102 | FileSys::Path archive_path(archivename_type, archivename_size, archivename_ptr); | 100 | FileSys::Path archive_path(archivename_type, archivename_size, archivename_ptr); |
| 103 | FileSys::Path file_path(filename_type, filename_size, filename_ptr); | 101 | FileSys::Path file_path(filename_type, filename_size, filename_ptr); |
| 104 | 102 | ||
| 105 | DEBUG_LOG(KERNEL, "archive_path=%s file_path=%s, mode=%u attributes=%d", | 103 | LOG_DEBUG(Service_FS, "archive_path=%s file_path=%s, mode=%u attributes=%d", |
| 106 | archive_path.DebugStr().c_str(), file_path.DebugStr().c_str(), mode.hex, attributes); | 104 | archive_path.DebugStr().c_str(), file_path.DebugStr().c_str(), mode.hex, attributes); |
| 107 | 105 | ||
| 108 | if (archive_path.GetType() != FileSys::Empty) { | 106 | if (archive_path.GetType() != FileSys::Empty) { |
| 109 | ERROR_LOG(KERNEL, "archive LowPath type other than empty is currently unsupported"); | 107 | LOG_ERROR(Service_FS, "archive LowPath type other than empty is currently unsupported"); |
| 110 | cmd_buff[1] = UnimplementedFunction(ErrorModule::FS).raw; | 108 | cmd_buff[1] = UnimplementedFunction(ErrorModule::FS).raw; |
| 111 | return; | 109 | return; |
| 112 | } | 110 | } |
| @@ -116,7 +114,7 @@ static void OpenFileDirectly(Service::Interface* self) { | |||
| 116 | ResultVal<Handle> archive_handle = Kernel::OpenArchive(archive_id); | 114 | ResultVal<Handle> archive_handle = Kernel::OpenArchive(archive_id); |
| 117 | cmd_buff[1] = archive_handle.Code().raw; | 115 | cmd_buff[1] = archive_handle.Code().raw; |
| 118 | if (archive_handle.Failed()) { | 116 | if (archive_handle.Failed()) { |
| 119 | ERROR_LOG(KERNEL, "failed to get a handle for archive"); | 117 | LOG_ERROR(Service_FS, "failed to get a handle for archive"); |
| 120 | return; | 118 | return; |
| 121 | } | 119 | } |
| 122 | // cmd_buff[2] isn't used according to 3dmoo's implementation. | 120 | // cmd_buff[2] isn't used according to 3dmoo's implementation. |
| @@ -127,10 +125,8 @@ static void OpenFileDirectly(Service::Interface* self) { | |||
| 127 | if (handle.Succeeded()) { | 125 | if (handle.Succeeded()) { |
| 128 | cmd_buff[3] = *handle; | 126 | cmd_buff[3] = *handle; |
| 129 | } else { | 127 | } else { |
| 130 | ERROR_LOG(KERNEL, "failed to get a handle for file %s", file_path.DebugStr().c_str()); | 128 | LOG_ERROR(Service_FS, "failed to get a handle for file %s", file_path.DebugStr().c_str()); |
| 131 | } | 129 | } |
| 132 | |||
| 133 | DEBUG_LOG(KERNEL, "called"); | ||
| 134 | } | 130 | } |
| 135 | 131 | ||
| 136 | /* | 132 | /* |
| @@ -156,12 +152,10 @@ void DeleteFile(Service::Interface* self) { | |||
| 156 | 152 | ||
| 157 | FileSys::Path file_path(filename_type, filename_size, filename_ptr); | 153 | FileSys::Path file_path(filename_type, filename_size, filename_ptr); |
| 158 | 154 | ||
| 159 | DEBUG_LOG(KERNEL, "type=%d size=%d data=%s", | 155 | LOG_DEBUG(Service_FS, "type=%d size=%d data=%s", |
| 160 | filename_type, filename_size, file_path.DebugStr().c_str()); | 156 | filename_type, filename_size, file_path.DebugStr().c_str()); |
| 161 | 157 | ||
| 162 | cmd_buff[1] = Kernel::DeleteFileFromArchive(archive_handle, file_path).raw; | 158 | cmd_buff[1] = Kernel::DeleteFileFromArchive(archive_handle, file_path).raw; |
| 163 | |||
| 164 | DEBUG_LOG(KERNEL, "called"); | ||
| 165 | } | 159 | } |
| 166 | 160 | ||
| 167 | /* | 161 | /* |
| @@ -197,13 +191,11 @@ void RenameFile(Service::Interface* self) { | |||
| 197 | FileSys::Path src_file_path(src_filename_type, src_filename_size, src_filename_ptr); | 191 | FileSys::Path src_file_path(src_filename_type, src_filename_size, src_filename_ptr); |
| 198 | FileSys::Path dest_file_path(dest_filename_type, dest_filename_size, dest_filename_ptr); | 192 | FileSys::Path dest_file_path(dest_filename_type, dest_filename_size, dest_filename_ptr); |
| 199 | 193 | ||
| 200 | DEBUG_LOG(KERNEL, "src_type=%d src_size=%d src_data=%s dest_type=%d dest_size=%d dest_data=%s", | 194 | LOG_DEBUG(Service_FS, "src_type=%d src_size=%d src_data=%s dest_type=%d dest_size=%d dest_data=%s", |
| 201 | src_filename_type, src_filename_size, src_file_path.DebugStr().c_str(), | 195 | src_filename_type, src_filename_size, src_file_path.DebugStr().c_str(), |
| 202 | dest_filename_type, dest_filename_size, dest_file_path.DebugStr().c_str()); | 196 | dest_filename_type, dest_filename_size, dest_file_path.DebugStr().c_str()); |
| 203 | 197 | ||
| 204 | cmd_buff[1] = Kernel::RenameFileBetweenArchives(src_archive_handle, src_file_path, dest_archive_handle, dest_file_path).raw; | 198 | cmd_buff[1] = Kernel::RenameFileBetweenArchives(src_archive_handle, src_file_path, dest_archive_handle, dest_file_path).raw; |
| 205 | |||
| 206 | DEBUG_LOG(KERNEL, "called"); | ||
| 207 | } | 199 | } |
| 208 | 200 | ||
| 209 | /* | 201 | /* |
| @@ -229,12 +221,10 @@ void DeleteDirectory(Service::Interface* self) { | |||
| 229 | 221 | ||
| 230 | FileSys::Path dir_path(dirname_type, dirname_size, dirname_ptr); | 222 | FileSys::Path dir_path(dirname_type, dirname_size, dirname_ptr); |
| 231 | 223 | ||
| 232 | DEBUG_LOG(KERNEL, "type=%d size=%d data=%s", | 224 | LOG_DEBUG(Service_FS, "type=%d size=%d data=%s", |
| 233 | dirname_type, dirname_size, dir_path.DebugStr().c_str()); | 225 | dirname_type, dirname_size, dir_path.DebugStr().c_str()); |
| 234 | 226 | ||
| 235 | cmd_buff[1] = Kernel::DeleteDirectoryFromArchive(archive_handle, dir_path).raw; | 227 | cmd_buff[1] = Kernel::DeleteDirectoryFromArchive(archive_handle, dir_path).raw; |
| 236 | |||
| 237 | DEBUG_LOG(KERNEL, "called"); | ||
| 238 | } | 228 | } |
| 239 | 229 | ||
| 240 | /* | 230 | /* |
| @@ -260,11 +250,9 @@ static void CreateDirectory(Service::Interface* self) { | |||
| 260 | 250 | ||
| 261 | FileSys::Path dir_path(dirname_type, dirname_size, dirname_ptr); | 251 | FileSys::Path dir_path(dirname_type, dirname_size, dirname_ptr); |
| 262 | 252 | ||
| 263 | DEBUG_LOG(KERNEL, "type=%d size=%d data=%s", dirname_type, dirname_size, dir_path.DebugStr().c_str()); | 253 | LOG_DEBUG(Service_FS, "type=%d size=%d data=%s", dirname_type, dirname_size, dir_path.DebugStr().c_str()); |
| 264 | 254 | ||
| 265 | cmd_buff[1] = Kernel::CreateDirectoryFromArchive(archive_handle, dir_path).raw; | 255 | cmd_buff[1] = Kernel::CreateDirectoryFromArchive(archive_handle, dir_path).raw; |
| 266 | |||
| 267 | DEBUG_LOG(KERNEL, "called"); | ||
| 268 | } | 256 | } |
| 269 | 257 | ||
| 270 | /* | 258 | /* |
| @@ -300,13 +288,11 @@ void RenameDirectory(Service::Interface* self) { | |||
| 300 | FileSys::Path src_dir_path(src_dirname_type, src_dirname_size, src_dirname_ptr); | 288 | FileSys::Path src_dir_path(src_dirname_type, src_dirname_size, src_dirname_ptr); |
| 301 | FileSys::Path dest_dir_path(dest_dirname_type, dest_dirname_size, dest_dirname_ptr); | 289 | FileSys::Path dest_dir_path(dest_dirname_type, dest_dirname_size, dest_dirname_ptr); |
| 302 | 290 | ||
| 303 | DEBUG_LOG(KERNEL, "src_type=%d src_size=%d src_data=%s dest_type=%d dest_size=%d dest_data=%s", | 291 | LOG_DEBUG(Service_FS, "src_type=%d src_size=%d src_data=%s dest_type=%d dest_size=%d dest_data=%s", |
| 304 | src_dirname_type, src_dirname_size, src_dir_path.DebugStr().c_str(), | 292 | src_dirname_type, src_dirname_size, src_dir_path.DebugStr().c_str(), |
| 305 | dest_dirname_type, dest_dirname_size, dest_dir_path.DebugStr().c_str()); | 293 | dest_dirname_type, dest_dirname_size, dest_dir_path.DebugStr().c_str()); |
| 306 | 294 | ||
| 307 | cmd_buff[1] = Kernel::RenameDirectoryBetweenArchives(src_archive_handle, src_dir_path, dest_archive_handle, dest_dir_path).raw; | 295 | cmd_buff[1] = Kernel::RenameDirectoryBetweenArchives(src_archive_handle, src_dir_path, dest_archive_handle, dest_dir_path).raw; |
| 308 | |||
| 309 | DEBUG_LOG(KERNEL, "called"); | ||
| 310 | } | 296 | } |
| 311 | 297 | ||
| 312 | static void OpenDirectory(Service::Interface* self) { | 298 | static void OpenDirectory(Service::Interface* self) { |
| @@ -321,17 +307,15 @@ static void OpenDirectory(Service::Interface* self) { | |||
| 321 | 307 | ||
| 322 | FileSys::Path dir_path(dirname_type, dirname_size, dirname_ptr); | 308 | FileSys::Path dir_path(dirname_type, dirname_size, dirname_ptr); |
| 323 | 309 | ||
| 324 | DEBUG_LOG(KERNEL, "type=%d size=%d data=%s", dirname_type, dirname_size, dir_path.DebugStr().c_str()); | 310 | LOG_DEBUG(Service_FS, "type=%d size=%d data=%s", dirname_type, dirname_size, dir_path.DebugStr().c_str()); |
| 325 | 311 | ||
| 326 | ResultVal<Handle> handle = Kernel::OpenDirectoryFromArchive(archive_handle, dir_path); | 312 | ResultVal<Handle> handle = Kernel::OpenDirectoryFromArchive(archive_handle, dir_path); |
| 327 | cmd_buff[1] = handle.Code().raw; | 313 | cmd_buff[1] = handle.Code().raw; |
| 328 | if (handle.Succeeded()) { | 314 | if (handle.Succeeded()) { |
| 329 | cmd_buff[3] = *handle; | 315 | cmd_buff[3] = *handle; |
| 330 | } else { | 316 | } else { |
| 331 | ERROR_LOG(KERNEL, "failed to get a handle for directory"); | 317 | LOG_ERROR(Service_FS, "failed to get a handle for directory"); |
| 332 | } | 318 | } |
| 333 | |||
| 334 | DEBUG_LOG(KERNEL, "called"); | ||
| 335 | } | 319 | } |
| 336 | 320 | ||
| 337 | /** | 321 | /** |
| @@ -356,10 +340,10 @@ static void OpenArchive(Service::Interface* self) { | |||
| 356 | u32 archivename_ptr = cmd_buff[5]; | 340 | u32 archivename_ptr = cmd_buff[5]; |
| 357 | FileSys::Path archive_path(archivename_type, archivename_size, archivename_ptr); | 341 | FileSys::Path archive_path(archivename_type, archivename_size, archivename_ptr); |
| 358 | 342 | ||
| 359 | DEBUG_LOG(KERNEL, "archive_path=%s", archive_path.DebugStr().c_str()); | 343 | LOG_DEBUG(Service_FS, "archive_path=%s", archive_path.DebugStr().c_str()); |
| 360 | 344 | ||
| 361 | if (archive_path.GetType() != FileSys::Empty) { | 345 | if (archive_path.GetType() != FileSys::Empty) { |
| 362 | ERROR_LOG(KERNEL, "archive LowPath type other than empty is currently unsupported"); | 346 | LOG_ERROR(Service_FS, "archive LowPath type other than empty is currently unsupported"); |
| 363 | cmd_buff[1] = UnimplementedFunction(ErrorModule::FS).raw; | 347 | cmd_buff[1] = UnimplementedFunction(ErrorModule::FS).raw; |
| 364 | return; | 348 | return; |
| 365 | } | 349 | } |
| @@ -370,10 +354,8 @@ static void OpenArchive(Service::Interface* self) { | |||
| 370 | // cmd_buff[2] isn't used according to 3dmoo's implementation. | 354 | // cmd_buff[2] isn't used according to 3dmoo's implementation. |
| 371 | cmd_buff[3] = *handle; | 355 | cmd_buff[3] = *handle; |
| 372 | } else { | 356 | } else { |
| 373 | ERROR_LOG(KERNEL, "failed to get a handle for archive"); | 357 | LOG_ERROR(Service_FS, "failed to get a handle for archive"); |
| 374 | } | 358 | } |
| 375 | |||
| 376 | DEBUG_LOG(KERNEL, "called"); | ||
| 377 | } | 359 | } |
| 378 | 360 | ||
| 379 | /* | 361 | /* |
| @@ -388,7 +370,7 @@ static void IsSdmcDetected(Service::Interface* self) { | |||
| 388 | cmd_buff[1] = 0; | 370 | cmd_buff[1] = 0; |
| 389 | cmd_buff[2] = Settings::values.use_virtual_sd ? 1 : 0; | 371 | cmd_buff[2] = Settings::values.use_virtual_sd ? 1 : 0; |
| 390 | 372 | ||
| 391 | DEBUG_LOG(KERNEL, "called"); | 373 | LOG_DEBUG(Service_FS, "called"); |
| 392 | } | 374 | } |
| 393 | 375 | ||
| 394 | const Interface::FunctionInfo FunctionTable[] = { | 376 | const Interface::FunctionInfo FunctionTable[] = { |
diff --git a/src/core/hle/service/gsp_gpu.cpp b/src/core/hle/service/gsp_gpu.cpp index 34eabac45..223800560 100644 --- a/src/core/hle/service/gsp_gpu.cpp +++ b/src/core/hle/service/gsp_gpu.cpp | |||
| @@ -33,7 +33,7 @@ static inline u8* GetCommandBuffer(u32 thread_id) { | |||
| 33 | } | 33 | } |
| 34 | 34 | ||
| 35 | static inline FrameBufferUpdate* GetFrameBufferInfo(u32 thread_id, u32 screen_index) { | 35 | static inline FrameBufferUpdate* GetFrameBufferInfo(u32 thread_id, u32 screen_index) { |
| 36 | _dbg_assert_msg_(GSP, screen_index < 2, "Invalid screen index"); | 36 | _dbg_assert_msg_(Service_GSP, screen_index < 2, "Invalid screen index"); |
| 37 | 37 | ||
| 38 | // For each thread there are two FrameBufferUpdate fields | 38 | // For each thread there are two FrameBufferUpdate fields |
| 39 | u32 offset = 0x200 + (2 * thread_id + screen_index) * sizeof(FrameBufferUpdate); | 39 | u32 offset = 0x200 + (2 * thread_id + screen_index) * sizeof(FrameBufferUpdate); |
| @@ -50,14 +50,14 @@ static inline InterruptRelayQueue* GetInterruptRelayQueue(u32 thread_id) { | |||
| 50 | static void WriteHWRegs(u32 base_address, u32 size_in_bytes, const u32* data) { | 50 | static void WriteHWRegs(u32 base_address, u32 size_in_bytes, const u32* data) { |
| 51 | // TODO: Return proper error codes | 51 | // TODO: Return proper error codes |
| 52 | if (base_address + size_in_bytes >= 0x420000) { | 52 | if (base_address + size_in_bytes >= 0x420000) { |
| 53 | ERROR_LOG(GPU, "Write address out of range! (address=0x%08x, size=0x%08x)", | 53 | LOG_ERROR(Service_GSP, "Write address out of range! (address=0x%08x, size=0x%08x)", |
| 54 | base_address, size_in_bytes); | 54 | base_address, size_in_bytes); |
| 55 | return; | 55 | return; |
| 56 | } | 56 | } |
| 57 | 57 | ||
| 58 | // size should be word-aligned | 58 | // size should be word-aligned |
| 59 | if ((size_in_bytes % 4) != 0) { | 59 | if ((size_in_bytes % 4) != 0) { |
| 60 | ERROR_LOG(GPU, "Invalid size 0x%08x", size_in_bytes); | 60 | LOG_ERROR(Service_GSP, "Invalid size 0x%08x", size_in_bytes); |
| 61 | return; | 61 | return; |
| 62 | } | 62 | } |
| 63 | 63 | ||
| @@ -89,13 +89,13 @@ static void ReadHWRegs(Service::Interface* self) { | |||
| 89 | 89 | ||
| 90 | // TODO: Return proper error codes | 90 | // TODO: Return proper error codes |
| 91 | if (reg_addr + size >= 0x420000) { | 91 | if (reg_addr + size >= 0x420000) { |
| 92 | ERROR_LOG(GPU, "Read address out of range! (address=0x%08x, size=0x%08x)", reg_addr, size); | 92 | LOG_ERROR(Service_GSP, "Read address out of range! (address=0x%08x, size=0x%08x)", reg_addr, size); |
| 93 | return; | 93 | return; |
| 94 | } | 94 | } |
| 95 | 95 | ||
| 96 | // size should be word-aligned | 96 | // size should be word-aligned |
| 97 | if ((size % 4) != 0) { | 97 | if ((size % 4) != 0) { |
| 98 | ERROR_LOG(GPU, "Invalid size 0x%08x", size); | 98 | LOG_ERROR(Service_GSP, "Invalid size 0x%08x", size); |
| 99 | return; | 99 | return; |
| 100 | } | 100 | } |
| 101 | 101 | ||
| @@ -177,11 +177,11 @@ static void RegisterInterruptRelayQueue(Service::Interface* self) { | |||
| 177 | */ | 177 | */ |
| 178 | void SignalInterrupt(InterruptId interrupt_id) { | 178 | void SignalInterrupt(InterruptId interrupt_id) { |
| 179 | if (0 == g_interrupt_event) { | 179 | if (0 == g_interrupt_event) { |
| 180 | WARN_LOG(GSP, "cannot synchronize until GSP event has been created!"); | 180 | LOG_WARNING(Service_GSP, "cannot synchronize until GSP event has been created!"); |
| 181 | return; | 181 | return; |
| 182 | } | 182 | } |
| 183 | if (0 == g_shared_memory) { | 183 | if (0 == g_shared_memory) { |
| 184 | WARN_LOG(GSP, "cannot synchronize until GSP shared memory has been created!"); | 184 | LOG_WARNING(Service_GSP, "cannot synchronize until GSP shared memory has been created!"); |
| 185 | return; | 185 | return; |
| 186 | } | 186 | } |
| 187 | for (int thread_id = 0; thread_id < 0x4; ++thread_id) { | 187 | for (int thread_id = 0; thread_id < 0x4; ++thread_id) { |
| @@ -298,14 +298,14 @@ static void ExecuteCommand(const Command& command, u32 thread_id) { | |||
| 298 | } | 298 | } |
| 299 | 299 | ||
| 300 | default: | 300 | default: |
| 301 | ERROR_LOG(GSP, "unknown command 0x%08X", (int)command.id.Value()); | 301 | LOG_ERROR(Service_GSP, "unknown command 0x%08X", (int)command.id.Value()); |
| 302 | } | 302 | } |
| 303 | } | 303 | } |
| 304 | 304 | ||
| 305 | /// This triggers handling of the GX command written to the command buffer in shared memory. | 305 | /// This triggers handling of the GX command written to the command buffer in shared memory. |
| 306 | static void TriggerCmdReqQueue(Service::Interface* self) { | 306 | static void TriggerCmdReqQueue(Service::Interface* self) { |
| 307 | 307 | ||
| 308 | DEBUG_LOG(GSP, "called"); | 308 | LOG_TRACE(Service_GSP, "called"); |
| 309 | 309 | ||
| 310 | // Iterate through each thread's command queue... | 310 | // Iterate through each thread's command queue... |
| 311 | for (unsigned thread_id = 0; thread_id < 0x4; ++thread_id) { | 311 | for (unsigned thread_id = 0; thread_id < 0x4; ++thread_id) { |
diff --git a/src/core/hle/service/hid_user.cpp b/src/core/hle/service/hid_user.cpp index 2abaf0f2f..5772199d4 100644 --- a/src/core/hle/service/hid_user.cpp +++ b/src/core/hle/service/hid_user.cpp | |||
| @@ -163,7 +163,7 @@ static void GetIPCHandles(Service::Interface* self) { | |||
| 163 | cmd_buff[7] = event_gyroscope; | 163 | cmd_buff[7] = event_gyroscope; |
| 164 | cmd_buff[8] = event_debug_pad; | 164 | cmd_buff[8] = event_debug_pad; |
| 165 | 165 | ||
| 166 | DEBUG_LOG(KERNEL, "called"); | 166 | LOG_TRACE(Service_HID, "called"); |
| 167 | } | 167 | } |
| 168 | 168 | ||
| 169 | const Interface::FunctionInfo FunctionTable[] = { | 169 | const Interface::FunctionInfo FunctionTable[] = { |
diff --git a/src/core/hle/service/ptm_u.cpp b/src/core/hle/service/ptm_u.cpp index 941df467b..559f148dd 100644 --- a/src/core/hle/service/ptm_u.cpp +++ b/src/core/hle/service/ptm_u.cpp | |||
| @@ -42,7 +42,7 @@ static void GetAdapterState(Service::Interface* self) { | |||
| 42 | cmd_buff[1] = 0; // No error | 42 | cmd_buff[1] = 0; // No error |
| 43 | cmd_buff[2] = battery_is_charging ? 1 : 0; | 43 | cmd_buff[2] = battery_is_charging ? 1 : 0; |
| 44 | 44 | ||
| 45 | WARN_LOG(KERNEL, "(STUBBED) called"); | 45 | LOG_WARNING(Service_PTM, "(STUBBED) called"); |
| 46 | } | 46 | } |
| 47 | 47 | ||
| 48 | /* | 48 | /* |
| @@ -57,7 +57,7 @@ static void GetShellState(Service::Interface* self) { | |||
| 57 | cmd_buff[1] = 0; | 57 | cmd_buff[1] = 0; |
| 58 | cmd_buff[2] = shell_open ? 1 : 0; | 58 | cmd_buff[2] = shell_open ? 1 : 0; |
| 59 | 59 | ||
| 60 | DEBUG_LOG(KERNEL, "PTM_U::GetShellState called"); | 60 | LOG_TRACE(Service_PTM, "PTM_U::GetShellState called"); |
| 61 | } | 61 | } |
| 62 | 62 | ||
| 63 | /** | 63 | /** |
| @@ -76,7 +76,7 @@ static void GetBatteryLevel(Service::Interface* self) { | |||
| 76 | cmd_buff[1] = 0; // No error | 76 | cmd_buff[1] = 0; // No error |
| 77 | cmd_buff[2] = static_cast<u32>(ChargeLevels::CompletelyFull); // Set to a completely full battery | 77 | cmd_buff[2] = static_cast<u32>(ChargeLevels::CompletelyFull); // Set to a completely full battery |
| 78 | 78 | ||
| 79 | WARN_LOG(KERNEL, "(STUBBED) called"); | 79 | LOG_WARNING(Service_PTM, "(STUBBED) called"); |
| 80 | } | 80 | } |
| 81 | 81 | ||
| 82 | /** | 82 | /** |
| @@ -94,7 +94,7 @@ static void GetBatteryChargeState(Service::Interface* self) { | |||
| 94 | cmd_buff[1] = 0; // No error | 94 | cmd_buff[1] = 0; // No error |
| 95 | cmd_buff[2] = battery_is_charging ? 1 : 0; | 95 | cmd_buff[2] = battery_is_charging ? 1 : 0; |
| 96 | 96 | ||
| 97 | WARN_LOG(KERNEL, "(STUBBED) called"); | 97 | LOG_WARNING(Service_PTM, "(STUBBED) called"); |
| 98 | } | 98 | } |
| 99 | 99 | ||
| 100 | const Interface::FunctionInfo FunctionTable[] = { | 100 | const Interface::FunctionInfo FunctionTable[] = { |
diff --git a/src/core/hle/service/service.cpp b/src/core/hle/service/service.cpp index fed2268a0..e6973572b 100644 --- a/src/core/hle/service/service.cpp +++ b/src/core/hle/service/service.cpp | |||
| @@ -106,13 +106,13 @@ void Init() { | |||
| 106 | g_manager->AddService(new SOC_U::Interface); | 106 | g_manager->AddService(new SOC_U::Interface); |
| 107 | g_manager->AddService(new SSL_C::Interface); | 107 | g_manager->AddService(new SSL_C::Interface); |
| 108 | 108 | ||
| 109 | NOTICE_LOG(HLE, "initialized OK"); | 109 | LOG_DEBUG(Service, "initialized OK"); |
| 110 | } | 110 | } |
| 111 | 111 | ||
| 112 | /// Shutdown ServiceManager | 112 | /// Shutdown ServiceManager |
| 113 | void Shutdown() { | 113 | void Shutdown() { |
| 114 | delete g_manager; | 114 | delete g_manager; |
| 115 | NOTICE_LOG(HLE, "shutdown OK"); | 115 | LOG_DEBUG(Service, "shutdown OK"); |
| 116 | } | 116 | } |
| 117 | 117 | ||
| 118 | 118 | ||
diff --git a/src/core/hle/service/service.h b/src/core/hle/service/service.h index 3a7d6c469..baae910a1 100644 --- a/src/core/hle/service/service.h +++ b/src/core/hle/service/service.h | |||
| @@ -91,7 +91,7 @@ public: | |||
| 91 | 91 | ||
| 92 | std::string name = (itr == m_functions.end()) ? Common::StringFromFormat("0x%08X", cmd_buff[0]) : itr->second.name; | 92 | std::string name = (itr == m_functions.end()) ? Common::StringFromFormat("0x%08X", cmd_buff[0]) : itr->second.name; |
| 93 | 93 | ||
| 94 | ERROR_LOG(OSHLE, error.c_str(), name.c_str(), GetPortName().c_str()); | 94 | LOG_ERROR(Service, error.c_str(), name.c_str(), GetPortName().c_str()); |
| 95 | 95 | ||
| 96 | // TODO(bunnei): Hack - ignore error | 96 | // TODO(bunnei): Hack - ignore error |
| 97 | cmd_buff[1] = 0; | 97 | cmd_buff[1] = 0; |
| @@ -103,12 +103,6 @@ public: | |||
| 103 | return MakeResult<bool>(false); // TODO: Implement return from actual function | 103 | return MakeResult<bool>(false); // TODO: Implement return from actual function |
| 104 | } | 104 | } |
| 105 | 105 | ||
| 106 | ResultVal<bool> WaitSynchronization() override { | ||
| 107 | // TODO(bunnei): ImplementMe | ||
| 108 | ERROR_LOG(OSHLE, "unimplemented function"); | ||
| 109 | return UnimplementedFunction(ErrorModule::OS); | ||
| 110 | } | ||
| 111 | |||
| 112 | protected: | 106 | protected: |
| 113 | 107 | ||
| 114 | /** | 108 | /** |
diff --git a/src/core/hle/service/srv.cpp b/src/core/hle/service/srv.cpp index 0e7fa9e3b..24a846533 100644 --- a/src/core/hle/service/srv.cpp +++ b/src/core/hle/service/srv.cpp | |||
| @@ -14,7 +14,7 @@ namespace SRV { | |||
| 14 | static Handle g_event_handle = 0; | 14 | static Handle g_event_handle = 0; |
| 15 | 15 | ||
| 16 | static void Initialize(Service::Interface* self) { | 16 | static void Initialize(Service::Interface* self) { |
| 17 | DEBUG_LOG(OSHLE, "called"); | 17 | LOG_DEBUG(Service_SRV, "called"); |
| 18 | 18 | ||
| 19 | u32* cmd_buff = Service::GetCommandBuffer(); | 19 | u32* cmd_buff = Service::GetCommandBuffer(); |
| 20 | 20 | ||
| @@ -22,7 +22,7 @@ static void Initialize(Service::Interface* self) { | |||
| 22 | } | 22 | } |
| 23 | 23 | ||
| 24 | static void GetProcSemaphore(Service::Interface* self) { | 24 | static void GetProcSemaphore(Service::Interface* self) { |
| 25 | DEBUG_LOG(OSHLE, "called"); | 25 | LOG_TRACE(Service_SRV, "called"); |
| 26 | 26 | ||
| 27 | u32* cmd_buff = Service::GetCommandBuffer(); | 27 | u32* cmd_buff = Service::GetCommandBuffer(); |
| 28 | 28 | ||
| @@ -43,9 +43,9 @@ static void GetServiceHandle(Service::Interface* self) { | |||
| 43 | 43 | ||
| 44 | if (nullptr != service) { | 44 | if (nullptr != service) { |
| 45 | cmd_buff[3] = service->GetHandle(); | 45 | cmd_buff[3] = service->GetHandle(); |
| 46 | DEBUG_LOG(OSHLE, "called port=%s, handle=0x%08X", port_name.c_str(), cmd_buff[3]); | 46 | LOG_TRACE(Service_SRV, "called port=%s, handle=0x%08X", port_name.c_str(), cmd_buff[3]); |
| 47 | } else { | 47 | } else { |
| 48 | ERROR_LOG(OSHLE, "(UNIMPLEMENTED) called port=%s", port_name.c_str()); | 48 | LOG_ERROR(Service_SRV, "(UNIMPLEMENTED) called port=%s", port_name.c_str()); |
| 49 | res = UnimplementedFunction(ErrorModule::SRV); | 49 | res = UnimplementedFunction(ErrorModule::SRV); |
| 50 | } | 50 | } |
| 51 | cmd_buff[1] = res.raw; | 51 | cmd_buff[1] = res.raw; |
diff --git a/src/core/hle/svc.cpp b/src/core/hle/svc.cpp index b99c301d4..db0c42e74 100644 --- a/src/core/hle/svc.cpp +++ b/src/core/hle/svc.cpp | |||
| @@ -31,7 +31,7 @@ enum ControlMemoryOperation { | |||
| 31 | 31 | ||
| 32 | /// Map application or GSP heap memory | 32 | /// Map application or GSP heap memory |
| 33 | static Result ControlMemory(u32* out_addr, u32 operation, u32 addr0, u32 addr1, u32 size, u32 permissions) { | 33 | static Result ControlMemory(u32* out_addr, u32 operation, u32 addr0, u32 addr1, u32 size, u32 permissions) { |
| 34 | DEBUG_LOG(SVC,"called operation=0x%08X, addr0=0x%08X, addr1=0x%08X, size=%08X, permissions=0x%08X", | 34 | LOG_TRACE(Kernel_SVC,"called operation=0x%08X, addr0=0x%08X, addr1=0x%08X, size=%08X, permissions=0x%08X", |
| 35 | operation, addr0, addr1, size, permissions); | 35 | operation, addr0, addr1, size, permissions); |
| 36 | 36 | ||
| 37 | switch (operation) { | 37 | switch (operation) { |
| @@ -48,14 +48,14 @@ static Result ControlMemory(u32* out_addr, u32 operation, u32 addr0, u32 addr1, | |||
| 48 | 48 | ||
| 49 | // Unknown ControlMemory operation | 49 | // Unknown ControlMemory operation |
| 50 | default: | 50 | default: |
| 51 | ERROR_LOG(SVC, "unknown operation=0x%08X", operation); | 51 | LOG_ERROR(Kernel_SVC, "unknown operation=0x%08X", operation); |
| 52 | } | 52 | } |
| 53 | return 0; | 53 | return 0; |
| 54 | } | 54 | } |
| 55 | 55 | ||
| 56 | /// Maps a memory block to specified address | 56 | /// Maps a memory block to specified address |
| 57 | static Result MapMemoryBlock(Handle handle, u32 addr, u32 permissions, u32 other_permissions) { | 57 | static Result MapMemoryBlock(Handle handle, u32 addr, u32 permissions, u32 other_permissions) { |
| 58 | DEBUG_LOG(SVC, "called memblock=0x%08X, addr=0x%08X, mypermissions=0x%08X, otherpermission=%d", | 58 | LOG_TRACE(Kernel_SVC, "called memblock=0x%08X, addr=0x%08X, mypermissions=0x%08X, otherpermission=%d", |
| 59 | handle, addr, permissions, other_permissions); | 59 | handle, addr, permissions, other_permissions); |
| 60 | 60 | ||
| 61 | Kernel::MemoryPermission permissions_type = static_cast<Kernel::MemoryPermission>(permissions); | 61 | Kernel::MemoryPermission permissions_type = static_cast<Kernel::MemoryPermission>(permissions); |
| @@ -68,7 +68,7 @@ static Result MapMemoryBlock(Handle handle, u32 addr, u32 permissions, u32 other | |||
| 68 | static_cast<Kernel::MemoryPermission>(other_permissions)); | 68 | static_cast<Kernel::MemoryPermission>(other_permissions)); |
| 69 | break; | 69 | break; |
| 70 | default: | 70 | default: |
| 71 | ERROR_LOG(OSHLE, "unknown permissions=0x%08X", permissions); | 71 | LOG_ERROR(Kernel_SVC, "unknown permissions=0x%08X", permissions); |
| 72 | } | 72 | } |
| 73 | return 0; | 73 | return 0; |
| 74 | } | 74 | } |
| @@ -77,7 +77,7 @@ static Result MapMemoryBlock(Handle handle, u32 addr, u32 permissions, u32 other | |||
| 77 | static Result ConnectToPort(Handle* out, const char* port_name) { | 77 | static Result ConnectToPort(Handle* out, const char* port_name) { |
| 78 | Service::Interface* service = Service::g_manager->FetchFromPortName(port_name); | 78 | Service::Interface* service = Service::g_manager->FetchFromPortName(port_name); |
| 79 | 79 | ||
| 80 | DEBUG_LOG(SVC, "called port_name=%s", port_name); | 80 | LOG_TRACE(Kernel_SVC, "called port_name=%s", port_name); |
| 81 | _assert_msg_(KERNEL, (service != nullptr), "called, but service is not implemented!"); | 81 | _assert_msg_(KERNEL, (service != nullptr), "called, but service is not implemented!"); |
| 82 | 82 | ||
| 83 | *out = service->GetHandle(); | 83 | *out = service->GetHandle(); |
| @@ -95,7 +95,7 @@ static Result SendSyncRequest(Handle handle) { | |||
| 95 | Kernel::Object* object = Kernel::g_object_pool.GetFast<Kernel::Object>(handle); | 95 | Kernel::Object* object = Kernel::g_object_pool.GetFast<Kernel::Object>(handle); |
| 96 | 96 | ||
| 97 | _assert_msg_(KERNEL, (object != nullptr), "called, but kernel object is nullptr!"); | 97 | _assert_msg_(KERNEL, (object != nullptr), "called, but kernel object is nullptr!"); |
| 98 | DEBUG_LOG(SVC, "called handle=0x%08X(%s)", handle, object->GetTypeName().c_str()); | 98 | LOG_TRACE(Kernel_SVC, "called handle=0x%08X(%s)", handle, object->GetTypeName().c_str()); |
| 99 | 99 | ||
| 100 | ResultVal<bool> wait = object->SyncRequest(); | 100 | ResultVal<bool> wait = object->SyncRequest(); |
| 101 | if (wait.Succeeded() && *wait) { | 101 | if (wait.Succeeded() && *wait) { |
| @@ -108,7 +108,7 @@ static Result SendSyncRequest(Handle handle) { | |||
| 108 | /// Close a handle | 108 | /// Close a handle |
| 109 | static Result CloseHandle(Handle handle) { | 109 | static Result CloseHandle(Handle handle) { |
| 110 | // ImplementMe | 110 | // ImplementMe |
| 111 | ERROR_LOG(SVC, "(UNIMPLEMENTED) called handle=0x%08X", handle); | 111 | LOG_ERROR(Kernel_SVC, "(UNIMPLEMENTED) called handle=0x%08X", handle); |
| 112 | return 0; | 112 | return 0; |
| 113 | } | 113 | } |
| 114 | 114 | ||
| @@ -121,9 +121,9 @@ static Result WaitSynchronization1(Handle handle, s64 nano_seconds) { | |||
| 121 | return InvalidHandle(ErrorModule::Kernel).raw; | 121 | return InvalidHandle(ErrorModule::Kernel).raw; |
| 122 | } | 122 | } |
| 123 | Kernel::Object* object = Kernel::g_object_pool.GetFast<Kernel::Object>(handle); | 123 | Kernel::Object* object = Kernel::g_object_pool.GetFast<Kernel::Object>(handle); |
| 124 | _dbg_assert_(KERNEL, object != nullptr); | 124 | _dbg_assert_(Kernel, object != nullptr); |
| 125 | 125 | ||
| 126 | DEBUG_LOG(SVC, "called handle=0x%08X(%s:%s), nanoseconds=%lld", handle, object->GetTypeName().c_str(), | 126 | LOG_TRACE(Kernel_SVC, "called handle=0x%08X(%s:%s), nanoseconds=%lld", handle, object->GetTypeName().c_str(), |
| 127 | object->GetName().c_str(), nano_seconds); | 127 | object->GetName().c_str(), nano_seconds); |
| 128 | 128 | ||
| 129 | ResultVal<bool> wait = object->WaitSynchronization(); | 129 | ResultVal<bool> wait = object->WaitSynchronization(); |
| @@ -143,7 +143,7 @@ static Result WaitSynchronizationN(s32* out, Handle* handles, s32 handle_count, | |||
| 143 | bool unlock_all = true; | 143 | bool unlock_all = true; |
| 144 | bool wait_infinite = (nano_seconds == -1); // Used to wait until a thread has terminated | 144 | bool wait_infinite = (nano_seconds == -1); // Used to wait until a thread has terminated |
| 145 | 145 | ||
| 146 | DEBUG_LOG(SVC, "called handle_count=%d, wait_all=%s, nanoseconds=%lld", | 146 | LOG_TRACE(Kernel_SVC, "called handle_count=%d, wait_all=%s, nanoseconds=%lld", |
| 147 | handle_count, (wait_all ? "true" : "false"), nano_seconds); | 147 | handle_count, (wait_all ? "true" : "false"), nano_seconds); |
| 148 | 148 | ||
| 149 | // Iterate through each handle, synchronize kernel object | 149 | // Iterate through each handle, synchronize kernel object |
| @@ -153,7 +153,7 @@ static Result WaitSynchronizationN(s32* out, Handle* handles, s32 handle_count, | |||
| 153 | } | 153 | } |
| 154 | Kernel::Object* object = Kernel::g_object_pool.GetFast<Kernel::Object>(handles[i]); | 154 | Kernel::Object* object = Kernel::g_object_pool.GetFast<Kernel::Object>(handles[i]); |
| 155 | 155 | ||
| 156 | DEBUG_LOG(SVC, "\thandle[%d] = 0x%08X(%s:%s)", i, handles[i], object->GetTypeName().c_str(), | 156 | LOG_TRACE(Kernel_SVC, "\thandle[%d] = 0x%08X(%s:%s)", i, handles[i], object->GetTypeName().c_str(), |
| 157 | object->GetName().c_str()); | 157 | object->GetName().c_str()); |
| 158 | 158 | ||
| 159 | // TODO(yuriks): Verify how the real function behaves when an error happens here | 159 | // TODO(yuriks): Verify how the real function behaves when an error happens here |
| @@ -181,7 +181,7 @@ static Result WaitSynchronizationN(s32* out, Handle* handles, s32 handle_count, | |||
| 181 | 181 | ||
| 182 | /// Create an address arbiter (to allocate access to shared resources) | 182 | /// Create an address arbiter (to allocate access to shared resources) |
| 183 | static Result CreateAddressArbiter(u32* arbiter) { | 183 | static Result CreateAddressArbiter(u32* arbiter) { |
| 184 | DEBUG_LOG(SVC, "called"); | 184 | LOG_TRACE(Kernel_SVC, "called"); |
| 185 | Handle handle = Kernel::CreateAddressArbiter(); | 185 | Handle handle = Kernel::CreateAddressArbiter(); |
| 186 | *arbiter = handle; | 186 | *arbiter = handle; |
| 187 | return 0; | 187 | return 0; |
| @@ -189,7 +189,7 @@ static Result CreateAddressArbiter(u32* arbiter) { | |||
| 189 | 189 | ||
| 190 | /// Arbitrate address | 190 | /// Arbitrate address |
| 191 | static Result ArbitrateAddress(Handle arbiter, u32 address, u32 type, u32 value, s64 nanoseconds) { | 191 | static Result ArbitrateAddress(Handle arbiter, u32 address, u32 type, u32 value, s64 nanoseconds) { |
| 192 | DEBUG_LOG(SVC, "called handle=0x%08X, address=0x%08X, type=0x%08X, value=0x%08X", arbiter, | 192 | LOG_TRACE(Kernel_SVC, "called handle=0x%08X, address=0x%08X, type=0x%08X, value=0x%08X", arbiter, |
| 193 | address, type, value); | 193 | address, type, value); |
| 194 | return Kernel::ArbitrateAddress(arbiter, static_cast<Kernel::ArbitrationType>(type), | 194 | return Kernel::ArbitrateAddress(arbiter, static_cast<Kernel::ArbitrationType>(type), |
| 195 | address, value).raw; | 195 | address, value).raw; |
| @@ -197,7 +197,7 @@ static Result ArbitrateAddress(Handle arbiter, u32 address, u32 type, u32 value, | |||
| 197 | 197 | ||
| 198 | /// Used to output a message on a debug hardware unit - does nothing on a retail unit | 198 | /// Used to output a message on a debug hardware unit - does nothing on a retail unit |
| 199 | static void OutputDebugString(const char* string) { | 199 | static void OutputDebugString(const char* string) { |
| 200 | OS_LOG(SVC, "%s", string); | 200 | LOG_DEBUG(Debug_Emulated, "%s", string); |
| 201 | } | 201 | } |
| 202 | 202 | ||
| 203 | /// Get resource limit | 203 | /// Get resource limit |
| @@ -206,14 +206,14 @@ static Result GetResourceLimit(Handle* resource_limit, Handle process) { | |||
| 206 | // 0xFFFF8001 is a handle alias for the current KProcess, and 0xFFFF8000 is a handle alias for | 206 | // 0xFFFF8001 is a handle alias for the current KProcess, and 0xFFFF8000 is a handle alias for |
| 207 | // the current KThread. | 207 | // the current KThread. |
| 208 | *resource_limit = 0xDEADBEEF; | 208 | *resource_limit = 0xDEADBEEF; |
| 209 | ERROR_LOG(SVC, "(UNIMPLEMENTED) called process=0x%08X", process); | 209 | LOG_ERROR(Kernel_SVC, "(UNIMPLEMENTED) called process=0x%08X", process); |
| 210 | return 0; | 210 | return 0; |
| 211 | } | 211 | } |
| 212 | 212 | ||
| 213 | /// Get resource limit current values | 213 | /// Get resource limit current values |
| 214 | static Result GetResourceLimitCurrentValues(s64* values, Handle resource_limit, void* names, | 214 | static Result GetResourceLimitCurrentValues(s64* values, Handle resource_limit, void* names, |
| 215 | s32 name_count) { | 215 | s32 name_count) { |
| 216 | ERROR_LOG(SVC, "(UNIMPLEMENTED) called resource_limit=%08X, names=%s, name_count=%d", | 216 | LOG_ERROR(Kernel_SVC, "(UNIMPLEMENTED) called resource_limit=%08X, names=%s, name_count=%d", |
| 217 | resource_limit, names, name_count); | 217 | resource_limit, names, name_count); |
| 218 | Memory::Write32(Core::g_app_core->GetReg(0), 0); // Normmatt: Set used memory to 0 for now | 218 | Memory::Write32(Core::g_app_core->GetReg(0), 0); // Normmatt: Set used memory to 0 for now |
| 219 | return 0; | 219 | return 0; |
| @@ -234,7 +234,7 @@ static Result CreateThread(u32 priority, u32 entry_point, u32 arg, u32 stack_top | |||
| 234 | 234 | ||
| 235 | Core::g_app_core->SetReg(1, thread); | 235 | Core::g_app_core->SetReg(1, thread); |
| 236 | 236 | ||
| 237 | DEBUG_LOG(SVC, "called entrypoint=0x%08X (%s), arg=0x%08X, stacktop=0x%08X, " | 237 | LOG_TRACE(Kernel_SVC, "called entrypoint=0x%08X (%s), arg=0x%08X, stacktop=0x%08X, " |
| 238 | "threadpriority=0x%08X, processorid=0x%08X : created handle=0x%08X", entry_point, | 238 | "threadpriority=0x%08X, processorid=0x%08X : created handle=0x%08X", entry_point, |
| 239 | name.c_str(), arg, stack_top, priority, processor_id, thread); | 239 | name.c_str(), arg, stack_top, priority, processor_id, thread); |
| 240 | 240 | ||
| @@ -245,7 +245,7 @@ static Result CreateThread(u32 priority, u32 entry_point, u32 arg, u32 stack_top | |||
| 245 | static u32 ExitThread() { | 245 | static u32 ExitThread() { |
| 246 | Handle thread = Kernel::GetCurrentThreadHandle(); | 246 | Handle thread = Kernel::GetCurrentThreadHandle(); |
| 247 | 247 | ||
| 248 | DEBUG_LOG(SVC, "called, pc=0x%08X", Core::g_app_core->GetPC()); // PC = 0x0010545C | 248 | LOG_TRACE(Kernel_SVC, "called, pc=0x%08X", Core::g_app_core->GetPC()); // PC = 0x0010545C |
| 249 | 249 | ||
| 250 | Kernel::StopThread(thread, __func__); | 250 | Kernel::StopThread(thread, __func__); |
| 251 | HLE::Reschedule(__func__); | 251 | HLE::Reschedule(__func__); |
| @@ -269,42 +269,42 @@ static Result SetThreadPriority(Handle handle, s32 priority) { | |||
| 269 | /// Create a mutex | 269 | /// Create a mutex |
| 270 | static Result CreateMutex(Handle* mutex, u32 initial_locked) { | 270 | static Result CreateMutex(Handle* mutex, u32 initial_locked) { |
| 271 | *mutex = Kernel::CreateMutex((initial_locked != 0)); | 271 | *mutex = Kernel::CreateMutex((initial_locked != 0)); |
| 272 | DEBUG_LOG(SVC, "called initial_locked=%s : created handle=0x%08X", | 272 | LOG_TRACE(Kernel_SVC, "called initial_locked=%s : created handle=0x%08X", |
| 273 | initial_locked ? "true" : "false", *mutex); | 273 | initial_locked ? "true" : "false", *mutex); |
| 274 | return 0; | 274 | return 0; |
| 275 | } | 275 | } |
| 276 | 276 | ||
| 277 | /// Release a mutex | 277 | /// Release a mutex |
| 278 | static Result ReleaseMutex(Handle handle) { | 278 | static Result ReleaseMutex(Handle handle) { |
| 279 | DEBUG_LOG(SVC, "called handle=0x%08X", handle); | 279 | LOG_TRACE(Kernel_SVC, "called handle=0x%08X", handle); |
| 280 | ResultCode res = Kernel::ReleaseMutex(handle); | 280 | ResultCode res = Kernel::ReleaseMutex(handle); |
| 281 | return res.raw; | 281 | return res.raw; |
| 282 | } | 282 | } |
| 283 | 283 | ||
| 284 | /// Get the ID for the specified thread. | 284 | /// Get the ID for the specified thread. |
| 285 | static Result GetThreadId(u32* thread_id, Handle handle) { | 285 | static Result GetThreadId(u32* thread_id, Handle handle) { |
| 286 | DEBUG_LOG(SVC, "called thread=0x%08X", handle); | 286 | LOG_TRACE(Kernel_SVC, "called thread=0x%08X", handle); |
| 287 | ResultCode result = Kernel::GetThreadId(thread_id, handle); | 287 | ResultCode result = Kernel::GetThreadId(thread_id, handle); |
| 288 | return result.raw; | 288 | return result.raw; |
| 289 | } | 289 | } |
| 290 | 290 | ||
| 291 | /// Query memory | 291 | /// Query memory |
| 292 | static Result QueryMemory(void* info, void* out, u32 addr) { | 292 | static Result QueryMemory(void* info, void* out, u32 addr) { |
| 293 | ERROR_LOG(SVC, "(UNIMPLEMENTED) called addr=0x%08X", addr); | 293 | LOG_ERROR(Kernel_SVC, "(UNIMPLEMENTED) called addr=0x%08X", addr); |
| 294 | return 0; | 294 | return 0; |
| 295 | } | 295 | } |
| 296 | 296 | ||
| 297 | /// Create an event | 297 | /// Create an event |
| 298 | static Result CreateEvent(Handle* evt, u32 reset_type) { | 298 | static Result CreateEvent(Handle* evt, u32 reset_type) { |
| 299 | *evt = Kernel::CreateEvent((ResetType)reset_type); | 299 | *evt = Kernel::CreateEvent((ResetType)reset_type); |
| 300 | DEBUG_LOG(SVC, "called reset_type=0x%08X : created handle=0x%08X", | 300 | LOG_TRACE(Kernel_SVC, "called reset_type=0x%08X : created handle=0x%08X", |
| 301 | reset_type, *evt); | 301 | reset_type, *evt); |
| 302 | return 0; | 302 | return 0; |
| 303 | } | 303 | } |
| 304 | 304 | ||
| 305 | /// Duplicates a kernel handle | 305 | /// Duplicates a kernel handle |
| 306 | static Result DuplicateHandle(Handle* out, Handle handle) { | 306 | static Result DuplicateHandle(Handle* out, Handle handle) { |
| 307 | DEBUG_LOG(SVC, "called handle=0x%08X", handle); | 307 | LOG_WARNING(Kernel_SVC, "(STUBBED) called handle=0x%08X", handle); |
| 308 | 308 | ||
| 309 | // Translate kernel handles -> real handles | 309 | // Translate kernel handles -> real handles |
| 310 | if (handle == Kernel::CurrentThread) { | 310 | if (handle == Kernel::CurrentThread) { |
| @@ -321,19 +321,19 @@ static Result DuplicateHandle(Handle* out, Handle handle) { | |||
| 321 | 321 | ||
| 322 | /// Signals an event | 322 | /// Signals an event |
| 323 | static Result SignalEvent(Handle evt) { | 323 | static Result SignalEvent(Handle evt) { |
| 324 | DEBUG_LOG(SVC, "called event=0x%08X", evt); | 324 | LOG_TRACE(Kernel_SVC, "called event=0x%08X", evt); |
| 325 | return Kernel::SignalEvent(evt).raw; | 325 | return Kernel::SignalEvent(evt).raw; |
| 326 | } | 326 | } |
| 327 | 327 | ||
| 328 | /// Clears an event | 328 | /// Clears an event |
| 329 | static Result ClearEvent(Handle evt) { | 329 | static Result ClearEvent(Handle evt) { |
| 330 | DEBUG_LOG(SVC, "called event=0x%08X", evt); | 330 | LOG_TRACE(Kernel_SVC, "called event=0x%08X", evt); |
| 331 | return Kernel::ClearEvent(evt).raw; | 331 | return Kernel::ClearEvent(evt).raw; |
| 332 | } | 332 | } |
| 333 | 333 | ||
| 334 | /// Sleep the current thread | 334 | /// Sleep the current thread |
| 335 | static void SleepThread(s64 nanoseconds) { | 335 | static void SleepThread(s64 nanoseconds) { |
| 336 | DEBUG_LOG(SVC, "called nanoseconds=%lld", nanoseconds); | 336 | LOG_TRACE(Kernel_SVC, "called nanoseconds=%lld", nanoseconds); |
| 337 | 337 | ||
| 338 | // Check for next thread to schedule | 338 | // Check for next thread to schedule |
| 339 | HLE::Reschedule(__func__); | 339 | HLE::Reschedule(__func__); |
diff --git a/src/core/hw/gpu.cpp b/src/core/hw/gpu.cpp index 77557e582..da78b85e5 100644 --- a/src/core/hw/gpu.cpp +++ b/src/core/hw/gpu.cpp | |||
| @@ -35,7 +35,7 @@ inline void Read(T &var, const u32 raw_addr) { | |||
| 35 | 35 | ||
| 36 | // Reads other than u32 are untested, so I'd rather have them abort than silently fail | 36 | // Reads other than u32 are untested, so I'd rather have them abort than silently fail |
| 37 | if (index >= Regs::NumIds() || !std::is_same<T,u32>::value) { | 37 | if (index >= Regs::NumIds() || !std::is_same<T,u32>::value) { |
| 38 | ERROR_LOG(GPU, "unknown Read%lu @ 0x%08X", sizeof(var) * 8, addr); | 38 | LOG_ERROR(HW_GPU, "unknown Read%lu @ 0x%08X", sizeof(var) * 8, addr); |
| 39 | return; | 39 | return; |
| 40 | } | 40 | } |
| 41 | 41 | ||
| @@ -49,7 +49,7 @@ inline void Write(u32 addr, const T data) { | |||
| 49 | 49 | ||
| 50 | // Writes other than u32 are untested, so I'd rather have them abort than silently fail | 50 | // Writes other than u32 are untested, so I'd rather have them abort than silently fail |
| 51 | if (index >= Regs::NumIds() || !std::is_same<T,u32>::value) { | 51 | if (index >= Regs::NumIds() || !std::is_same<T,u32>::value) { |
| 52 | ERROR_LOG(GPU, "unknown Write%lu 0x%08X @ 0x%08X", sizeof(data) * 8, (u32)data, addr); | 52 | LOG_ERROR(HW_GPU, "unknown Write%lu 0x%08X @ 0x%08X", sizeof(data) * 8, (u32)data, addr); |
| 53 | return; | 53 | return; |
| 54 | } | 54 | } |
| 55 | 55 | ||
| @@ -73,7 +73,7 @@ inline void Write(u32 addr, const T data) { | |||
| 73 | for (u32* ptr = start; ptr < end; ++ptr) | 73 | for (u32* ptr = start; ptr < end; ++ptr) |
| 74 | *ptr = bswap32(config.value); // TODO: This is just a workaround to missing framebuffer format emulation | 74 | *ptr = bswap32(config.value); // TODO: This is just a workaround to missing framebuffer format emulation |
| 75 | 75 | ||
| 76 | DEBUG_LOG(GPU, "MemoryFill from 0x%08x to 0x%08x", config.GetStartAddress(), config.GetEndAddress()); | 76 | LOG_TRACE(HW_GPU, "MemoryFill from 0x%08x to 0x%08x", config.GetStartAddress(), config.GetEndAddress()); |
| 77 | } | 77 | } |
| 78 | break; | 78 | break; |
| 79 | } | 79 | } |
| @@ -105,7 +105,7 @@ inline void Write(u32 addr, const T data) { | |||
| 105 | } | 105 | } |
| 106 | 106 | ||
| 107 | default: | 107 | default: |
| 108 | ERROR_LOG(GPU, "Unknown source framebuffer format %x", config.input_format.Value()); | 108 | LOG_ERROR(HW_GPU, "Unknown source framebuffer format %x", config.input_format.Value()); |
| 109 | break; | 109 | break; |
| 110 | } | 110 | } |
| 111 | 111 | ||
| @@ -132,13 +132,13 @@ inline void Write(u32 addr, const T data) { | |||
| 132 | } | 132 | } |
| 133 | 133 | ||
| 134 | default: | 134 | default: |
| 135 | ERROR_LOG(GPU, "Unknown destination framebuffer format %x", config.output_format.Value()); | 135 | LOG_ERROR(HW_GPU, "Unknown destination framebuffer format %x", config.output_format.Value()); |
| 136 | break; | 136 | break; |
| 137 | } | 137 | } |
| 138 | } | 138 | } |
| 139 | } | 139 | } |
| 140 | 140 | ||
| 141 | DEBUG_LOG(GPU, "DisplayTriggerTransfer: 0x%08x bytes from 0x%08x(%ux%u)-> 0x%08x(%ux%u), dst format %x", | 141 | LOG_TRACE(HW_GPU, "DisplayTriggerTransfer: 0x%08x bytes from 0x%08x(%ux%u)-> 0x%08x(%ux%u), dst format %x", |
| 142 | config.output_height * config.output_width * 4, | 142 | config.output_height * config.output_width * 4, |
| 143 | config.GetPhysicalInputAddress(), (u32)config.input_width, (u32)config.input_height, | 143 | config.GetPhysicalInputAddress(), (u32)config.input_width, (u32)config.input_height, |
| 144 | config.GetPhysicalOutputAddress(), (u32)config.output_width, (u32)config.output_height, | 144 | config.GetPhysicalOutputAddress(), (u32)config.output_width, (u32)config.output_height, |
| @@ -251,12 +251,12 @@ void Init() { | |||
| 251 | framebuffer_sub.color_format = Regs::PixelFormat::RGB8; | 251 | framebuffer_sub.color_format = Regs::PixelFormat::RGB8; |
| 252 | framebuffer_sub.active_fb = 0; | 252 | framebuffer_sub.active_fb = 0; |
| 253 | 253 | ||
| 254 | NOTICE_LOG(GPU, "initialized OK"); | 254 | LOG_DEBUG(HW_GPU, "initialized OK"); |
| 255 | } | 255 | } |
| 256 | 256 | ||
| 257 | /// Shutdown hardware | 257 | /// Shutdown hardware |
| 258 | void Shutdown() { | 258 | void Shutdown() { |
| 259 | NOTICE_LOG(GPU, "shutdown OK"); | 259 | LOG_DEBUG(HW_GPU, "shutdown OK"); |
| 260 | } | 260 | } |
| 261 | 261 | ||
| 262 | } // namespace | 262 | } // namespace |
diff --git a/src/core/hw/hw.cpp b/src/core/hw/hw.cpp index 73a4f1e53..af42b41fb 100644 --- a/src/core/hw/hw.cpp +++ b/src/core/hw/hw.cpp | |||
| @@ -44,7 +44,7 @@ inline void Read(T &var, const u32 addr) { | |||
| 44 | break; | 44 | break; |
| 45 | 45 | ||
| 46 | default: | 46 | default: |
| 47 | ERROR_LOG(HW, "unknown Read%lu @ 0x%08X", sizeof(var) * 8, addr); | 47 | LOG_ERROR(HW_Memory, "unknown Read%lu @ 0x%08X", sizeof(var) * 8, addr); |
| 48 | } | 48 | } |
| 49 | } | 49 | } |
| 50 | 50 | ||
| @@ -57,7 +57,7 @@ inline void Write(u32 addr, const T data) { | |||
| 57 | break; | 57 | break; |
| 58 | 58 | ||
| 59 | default: | 59 | default: |
| 60 | ERROR_LOG(HW, "unknown Write%lu 0x%08X @ 0x%08X", sizeof(data) * 8, (u32)data, addr); | 60 | LOG_ERROR(HW_Memory, "unknown Write%lu 0x%08X @ 0x%08X", sizeof(data) * 8, (u32)data, addr); |
| 61 | } | 61 | } |
| 62 | } | 62 | } |
| 63 | 63 | ||
| @@ -81,12 +81,12 @@ void Update() { | |||
| 81 | /// Initialize hardware | 81 | /// Initialize hardware |
| 82 | void Init() { | 82 | void Init() { |
| 83 | GPU::Init(); | 83 | GPU::Init(); |
| 84 | NOTICE_LOG(HW, "initialized OK"); | 84 | LOG_DEBUG(HW, "initialized OK"); |
| 85 | } | 85 | } |
| 86 | 86 | ||
| 87 | /// Shutdown hardware | 87 | /// Shutdown hardware |
| 88 | void Shutdown() { | 88 | void Shutdown() { |
| 89 | NOTICE_LOG(HW, "shutdown OK"); | 89 | LOG_DEBUG(HW, "shutdown OK"); |
| 90 | } | 90 | } |
| 91 | 91 | ||
| 92 | } \ No newline at end of file | 92 | } \ No newline at end of file |
diff --git a/src/core/loader/3dsx.cpp b/src/core/loader/3dsx.cpp index 7ef146359..f48d13530 100644 --- a/src/core/loader/3dsx.cpp +++ b/src/core/loader/3dsx.cpp | |||
| @@ -174,14 +174,14 @@ int THREEDSXReader::Load3DSXFile(const std::string& filename, u32 base_addr) | |||
| 174 | return ERROR_READ; | 174 | return ERROR_READ; |
| 175 | 175 | ||
| 176 | for (u32 current_inprogress = 0; current_inprogress < remaining && pos < end_pos; current_inprogress++) { | 176 | for (u32 current_inprogress = 0; current_inprogress < remaining && pos < end_pos; current_inprogress++) { |
| 177 | DEBUG_LOG(LOADER, "(t=%d,skip=%u,patch=%u)\n", | 177 | LOG_TRACE(Loader, "(t=%d,skip=%u,patch=%u)\n", |
| 178 | current_segment_reloc_table, (u32)reloc_table[current_inprogress].skip, (u32)reloc_table[current_inprogress].patch); | 178 | current_segment_reloc_table, (u32)reloc_table[current_inprogress].skip, (u32)reloc_table[current_inprogress].patch); |
| 179 | pos += reloc_table[current_inprogress].skip; | 179 | pos += reloc_table[current_inprogress].skip; |
| 180 | s32 num_patches = reloc_table[current_inprogress].patch; | 180 | s32 num_patches = reloc_table[current_inprogress].patch; |
| 181 | while (0 < num_patches && pos < end_pos) { | 181 | while (0 < num_patches && pos < end_pos) { |
| 182 | u32 in_addr = (char*)pos - (char*)&all_mem[0]; | 182 | u32 in_addr = (char*)pos - (char*)&all_mem[0]; |
| 183 | u32 addr = TranslateAddr(*pos, &loadinfo, offsets); | 183 | u32 addr = TranslateAddr(*pos, &loadinfo, offsets); |
| 184 | DEBUG_LOG(LOADER, "Patching %08X <-- rel(%08X,%d) (%08X)\n", | 184 | LOG_TRACE(Loader, "Patching %08X <-- rel(%08X,%d) (%08X)\n", |
| 185 | base_addr + in_addr, addr, current_segment_reloc_table, *pos); | 185 | base_addr + in_addr, addr, current_segment_reloc_table, *pos); |
| 186 | switch (current_segment_reloc_table) { | 186 | switch (current_segment_reloc_table) { |
| 187 | case 0: *pos = (addr); break; | 187 | case 0: *pos = (addr); break; |
| @@ -199,10 +199,10 @@ int THREEDSXReader::Load3DSXFile(const std::string& filename, u32 base_addr) | |||
| 199 | // Write the data | 199 | // Write the data |
| 200 | memcpy(Memory::GetPointer(base_addr), &all_mem[0], loadinfo.seg_sizes[0] + loadinfo.seg_sizes[1] + loadinfo.seg_sizes[2]); | 200 | memcpy(Memory::GetPointer(base_addr), &all_mem[0], loadinfo.seg_sizes[0] + loadinfo.seg_sizes[1] + loadinfo.seg_sizes[2]); |
| 201 | 201 | ||
| 202 | DEBUG_LOG(LOADER, "CODE: %u pages\n", loadinfo.seg_sizes[0] / 0x1000); | 202 | LOG_DEBUG(Loader, "CODE: %u pages\n", loadinfo.seg_sizes[0] / 0x1000); |
| 203 | DEBUG_LOG(LOADER, "RODATA: %u pages\n", loadinfo.seg_sizes[1] / 0x1000); | 203 | LOG_DEBUG(Loader, "RODATA: %u pages\n", loadinfo.seg_sizes[1] / 0x1000); |
| 204 | DEBUG_LOG(LOADER, "DATA: %u pages\n", data_load_size / 0x1000); | 204 | LOG_DEBUG(Loader, "DATA: %u pages\n", data_load_size / 0x1000); |
| 205 | DEBUG_LOG(LOADER, "BSS: %u pages\n", bss_load_size / 0x1000); | 205 | LOG_DEBUG(Loader, "BSS: %u pages\n", bss_load_size / 0x1000); |
| 206 | 206 | ||
| 207 | return ERROR_NONE; | 207 | return ERROR_NONE; |
| 208 | } | 208 | } |
| @@ -220,7 +220,7 @@ int THREEDSXReader::Load3DSXFile(const std::string& filename, u32 base_addr) | |||
| 220 | * @return Success on success, otherwise Error | 220 | * @return Success on success, otherwise Error |
| 221 | */ | 221 | */ |
| 222 | ResultStatus AppLoader_THREEDSX::Load() { | 222 | ResultStatus AppLoader_THREEDSX::Load() { |
| 223 | INFO_LOG(LOADER, "Loading 3DSX file %s...", filename.c_str()); | 223 | LOG_INFO(Loader, "Loading 3DSX file %s...", filename.c_str()); |
| 224 | FileUtil::IOFile file(filename, "rb"); | 224 | FileUtil::IOFile file(filename, "rb"); |
| 225 | if (file.IsOpen()) { | 225 | if (file.IsOpen()) { |
| 226 | 226 | ||
diff --git a/src/core/loader/elf.cpp b/src/core/loader/elf.cpp index 63d2496ed..c95882f4a 100644 --- a/src/core/loader/elf.cpp +++ b/src/core/loader/elf.cpp | |||
| @@ -254,18 +254,18 @@ const char *ElfReader::GetSectionName(int section) const { | |||
| 254 | } | 254 | } |
| 255 | 255 | ||
| 256 | bool ElfReader::LoadInto(u32 vaddr) { | 256 | bool ElfReader::LoadInto(u32 vaddr) { |
| 257 | DEBUG_LOG(MASTER_LOG, "String section: %i", header->e_shstrndx); | 257 | LOG_DEBUG(Loader, "String section: %i", header->e_shstrndx); |
| 258 | 258 | ||
| 259 | // Should we relocate? | 259 | // Should we relocate? |
| 260 | relocate = (header->e_type != ET_EXEC); | 260 | relocate = (header->e_type != ET_EXEC); |
| 261 | 261 | ||
| 262 | if (relocate) { | 262 | if (relocate) { |
| 263 | DEBUG_LOG(MASTER_LOG, "Relocatable module"); | 263 | LOG_DEBUG(Loader, "Relocatable module"); |
| 264 | entryPoint += vaddr; | 264 | entryPoint += vaddr; |
| 265 | } else { | 265 | } else { |
| 266 | DEBUG_LOG(MASTER_LOG, "Prerelocated executable"); | 266 | LOG_DEBUG(Loader, "Prerelocated executable"); |
| 267 | } | 267 | } |
| 268 | INFO_LOG(MASTER_LOG, "%i segments:", header->e_phnum); | 268 | LOG_DEBUG(Loader, "%i segments:", header->e_phnum); |
| 269 | 269 | ||
| 270 | // First pass : Get the bits into RAM | 270 | // First pass : Get the bits into RAM |
| 271 | u32 segment_addr[32]; | 271 | u32 segment_addr[32]; |
| @@ -273,17 +273,17 @@ bool ElfReader::LoadInto(u32 vaddr) { | |||
| 273 | 273 | ||
| 274 | for (int i = 0; i < header->e_phnum; i++) { | 274 | for (int i = 0; i < header->e_phnum; i++) { |
| 275 | Elf32_Phdr *p = segments + i; | 275 | Elf32_Phdr *p = segments + i; |
| 276 | INFO_LOG(MASTER_LOG, "Type: %i Vaddr: %08x Filesz: %i Memsz: %i ", p->p_type, p->p_vaddr, | 276 | LOG_DEBUG(Loader, "Type: %i Vaddr: %08x Filesz: %i Memsz: %i ", p->p_type, p->p_vaddr, |
| 277 | p->p_filesz, p->p_memsz); | 277 | p->p_filesz, p->p_memsz); |
| 278 | 278 | ||
| 279 | if (p->p_type == PT_LOAD) { | 279 | if (p->p_type == PT_LOAD) { |
| 280 | segment_addr[i] = base_addr + p->p_vaddr; | 280 | segment_addr[i] = base_addr + p->p_vaddr; |
| 281 | memcpy(Memory::GetPointer(segment_addr[i]), GetSegmentPtr(i), p->p_filesz); | 281 | memcpy(Memory::GetPointer(segment_addr[i]), GetSegmentPtr(i), p->p_filesz); |
| 282 | INFO_LOG(MASTER_LOG, "Loadable Segment Copied to %08x, size %08x", segment_addr[i], | 282 | LOG_DEBUG(Loader, "Loadable Segment Copied to %08x, size %08x", segment_addr[i], |
| 283 | p->p_memsz); | 283 | p->p_memsz); |
| 284 | } | 284 | } |
| 285 | } | 285 | } |
| 286 | INFO_LOG(MASTER_LOG, "Done loading."); | 286 | LOG_DEBUG(Loader, "Done loading."); |
| 287 | return true; | 287 | return true; |
| 288 | } | 288 | } |
| 289 | 289 | ||
| @@ -346,7 +346,7 @@ AppLoader_ELF::~AppLoader_ELF() { | |||
| 346 | * @return True on success, otherwise false | 346 | * @return True on success, otherwise false |
| 347 | */ | 347 | */ |
| 348 | ResultStatus AppLoader_ELF::Load() { | 348 | ResultStatus AppLoader_ELF::Load() { |
| 349 | INFO_LOG(LOADER, "Loading ELF file %s...", filename.c_str()); | 349 | LOG_INFO(Loader, "Loading ELF file %s...", filename.c_str()); |
| 350 | 350 | ||
| 351 | if (is_loaded) | 351 | if (is_loaded) |
| 352 | return ResultStatus::ErrorAlreadyLoaded; | 352 | return ResultStatus::ErrorAlreadyLoaded; |
diff --git a/src/core/loader/loader.cpp b/src/core/loader/loader.cpp index 174397b05..3883e1307 100644 --- a/src/core/loader/loader.cpp +++ b/src/core/loader/loader.cpp | |||
| @@ -23,7 +23,7 @@ namespace Loader { | |||
| 23 | */ | 23 | */ |
| 24 | FileType IdentifyFile(const std::string &filename) { | 24 | FileType IdentifyFile(const std::string &filename) { |
| 25 | if (filename.size() == 0) { | 25 | if (filename.size() == 0) { |
| 26 | ERROR_LOG(LOADER, "invalid filename %s", filename.c_str()); | 26 | LOG_ERROR(Loader, "invalid filename %s", filename.c_str()); |
| 27 | return FileType::Error; | 27 | return FileType::Error; |
| 28 | } | 28 | } |
| 29 | 29 | ||
| @@ -55,7 +55,7 @@ FileType IdentifyFile(const std::string &filename) { | |||
| 55 | * @return ResultStatus result of function | 55 | * @return ResultStatus result of function |
| 56 | */ | 56 | */ |
| 57 | ResultStatus LoadFile(const std::string& filename) { | 57 | ResultStatus LoadFile(const std::string& filename) { |
| 58 | INFO_LOG(LOADER, "Loading file %s...", filename.c_str()); | 58 | LOG_INFO(Loader, "Loading file %s...", filename.c_str()); |
| 59 | 59 | ||
| 60 | switch (IdentifyFile(filename)) { | 60 | switch (IdentifyFile(filename)) { |
| 61 | 61 | ||
| @@ -83,7 +83,7 @@ ResultStatus LoadFile(const std::string& filename) { | |||
| 83 | // Raw BIN file format... | 83 | // Raw BIN file format... |
| 84 | case FileType::BIN: | 84 | case FileType::BIN: |
| 85 | { | 85 | { |
| 86 | INFO_LOG(LOADER, "Loading BIN file %s...", filename.c_str()); | 86 | LOG_INFO(Loader, "Loading BIN file %s...", filename.c_str()); |
| 87 | 87 | ||
| 88 | FileUtil::IOFile file(filename, "rb"); | 88 | FileUtil::IOFile file(filename, "rb"); |
| 89 | 89 | ||
diff --git a/src/core/loader/ncch.cpp b/src/core/loader/ncch.cpp index 343bb7523..ba9ba00c0 100644 --- a/src/core/loader/ncch.cpp +++ b/src/core/loader/ncch.cpp | |||
| @@ -140,13 +140,13 @@ ResultStatus AppLoader_NCCH::LoadSectionExeFS(const char* name, std::vector<u8>& | |||
| 140 | // Iterate through the ExeFs archive until we find the .code file... | 140 | // Iterate through the ExeFs archive until we find the .code file... |
| 141 | FileUtil::IOFile file(filename, "rb"); | 141 | FileUtil::IOFile file(filename, "rb"); |
| 142 | if (file.IsOpen()) { | 142 | if (file.IsOpen()) { |
| 143 | LOG_DEBUG(Loader, "%d sections:", kMaxSections); | ||
| 143 | for (int i = 0; i < kMaxSections; i++) { | 144 | for (int i = 0; i < kMaxSections; i++) { |
| 144 | // Load the specified section... | 145 | // Load the specified section... |
| 145 | if (strcmp((const char*)exefs_header.section[i].name, name) == 0) { | 146 | if (strcmp((const char*)exefs_header.section[i].name, name) == 0) { |
| 146 | INFO_LOG(LOADER, "ExeFS section %d:", i); | 147 | LOG_DEBUG(Loader, "%d - offset: 0x%08X, size: 0x%08X, name: %s", i, |
| 147 | INFO_LOG(LOADER, " name: %s", exefs_header.section[i].name); | 148 | exefs_header.section[i].offset, exefs_header.section[i].size, |
| 148 | INFO_LOG(LOADER, " offset: 0x%08X", exefs_header.section[i].offset); | 149 | exefs_header.section[i].name); |
| 149 | INFO_LOG(LOADER, " size: 0x%08X", exefs_header.section[i].size); | ||
| 150 | 150 | ||
| 151 | s64 section_offset = (exefs_header.section[i].offset + exefs_offset + | 151 | s64 section_offset = (exefs_header.section[i].offset + exefs_offset + |
| 152 | sizeof(ExeFs_Header)+ncch_offset); | 152 | sizeof(ExeFs_Header)+ncch_offset); |
| @@ -181,7 +181,7 @@ ResultStatus AppLoader_NCCH::LoadSectionExeFS(const char* name, std::vector<u8>& | |||
| 181 | } | 181 | } |
| 182 | } | 182 | } |
| 183 | } else { | 183 | } else { |
| 184 | ERROR_LOG(LOADER, "Unable to read file %s!", filename.c_str()); | 184 | LOG_ERROR(Loader, "Unable to read file %s!", filename.c_str()); |
| 185 | return ResultStatus::Error; | 185 | return ResultStatus::Error; |
| 186 | } | 186 | } |
| 187 | return ResultStatus::ErrorNotUsed; | 187 | return ResultStatus::ErrorNotUsed; |
| @@ -194,7 +194,7 @@ ResultStatus AppLoader_NCCH::LoadSectionExeFS(const char* name, std::vector<u8>& | |||
| 194 | * @return True on success, otherwise false | 194 | * @return True on success, otherwise false |
| 195 | */ | 195 | */ |
| 196 | ResultStatus AppLoader_NCCH::Load() { | 196 | ResultStatus AppLoader_NCCH::Load() { |
| 197 | INFO_LOG(LOADER, "Loading NCCH file %s...", filename.c_str()); | 197 | LOG_INFO(Loader, "Loading NCCH file %s...", filename.c_str()); |
| 198 | 198 | ||
| 199 | if (is_loaded) | 199 | if (is_loaded) |
| 200 | return ResultStatus::ErrorAlreadyLoaded; | 200 | return ResultStatus::ErrorAlreadyLoaded; |
| @@ -205,7 +205,7 @@ ResultStatus AppLoader_NCCH::Load() { | |||
| 205 | 205 | ||
| 206 | // Skip NCSD header and load first NCCH (NCSD is just a container of NCCH files)... | 206 | // Skip NCSD header and load first NCCH (NCSD is just a container of NCCH files)... |
| 207 | if (0 == memcmp(&ncch_header.magic, "NCSD", 4)) { | 207 | if (0 == memcmp(&ncch_header.magic, "NCSD", 4)) { |
| 208 | WARN_LOG(LOADER, "Only loading the first (bootable) NCCH within the NCSD file!"); | 208 | LOG_WARNING(Loader, "Only loading the first (bootable) NCCH within the NCSD file!"); |
| 209 | ncch_offset = 0x4000; | 209 | ncch_offset = 0x4000; |
| 210 | file.Seek(ncch_offset, 0); | 210 | file.Seek(ncch_offset, 0); |
| 211 | file.ReadBytes(&ncch_header, sizeof(NCCH_Header)); | 211 | file.ReadBytes(&ncch_header, sizeof(NCCH_Header)); |
| @@ -222,17 +222,17 @@ ResultStatus AppLoader_NCCH::Load() { | |||
| 222 | is_compressed = (exheader_header.codeset_info.flags.flag & 1) == 1; | 222 | is_compressed = (exheader_header.codeset_info.flags.flag & 1) == 1; |
| 223 | entry_point = exheader_header.codeset_info.text.address; | 223 | entry_point = exheader_header.codeset_info.text.address; |
| 224 | 224 | ||
| 225 | INFO_LOG(LOADER, "Name: %s", exheader_header.codeset_info.name); | 225 | LOG_INFO(Loader, "Name: %s", exheader_header.codeset_info.name); |
| 226 | INFO_LOG(LOADER, "Code compressed: %s", is_compressed ? "yes" : "no"); | 226 | LOG_DEBUG(Loader, "Code compressed: %s", is_compressed ? "yes" : "no"); |
| 227 | INFO_LOG(LOADER, "Entry point: 0x%08X", entry_point); | 227 | LOG_DEBUG(Loader, "Entry point: 0x%08X", entry_point); |
| 228 | 228 | ||
| 229 | // Read ExeFS... | 229 | // Read ExeFS... |
| 230 | 230 | ||
| 231 | exefs_offset = ncch_header.exefs_offset * kBlockSize; | 231 | exefs_offset = ncch_header.exefs_offset * kBlockSize; |
| 232 | u32 exefs_size = ncch_header.exefs_size * kBlockSize; | 232 | u32 exefs_size = ncch_header.exefs_size * kBlockSize; |
| 233 | 233 | ||
| 234 | INFO_LOG(LOADER, "ExeFS offset: 0x%08X", exefs_offset); | 234 | LOG_DEBUG(Loader, "ExeFS offset: 0x%08X", exefs_offset); |
| 235 | INFO_LOG(LOADER, "ExeFS size: 0x%08X", exefs_size); | 235 | LOG_DEBUG(Loader, "ExeFS size: 0x%08X", exefs_size); |
| 236 | 236 | ||
| 237 | file.Seek(exefs_offset + ncch_offset, 0); | 237 | file.Seek(exefs_offset + ncch_offset, 0); |
| 238 | file.ReadBytes(&exefs_header, sizeof(ExeFs_Header)); | 238 | file.ReadBytes(&exefs_header, sizeof(ExeFs_Header)); |
| @@ -243,7 +243,7 @@ ResultStatus AppLoader_NCCH::Load() { | |||
| 243 | 243 | ||
| 244 | return ResultStatus::Success; | 244 | return ResultStatus::Success; |
| 245 | } else { | 245 | } else { |
| 246 | ERROR_LOG(LOADER, "Unable to read file %s!", filename.c_str()); | 246 | LOG_ERROR(Loader, "Unable to read file %s!", filename.c_str()); |
| 247 | } | 247 | } |
| 248 | return ResultStatus::Error; | 248 | return ResultStatus::Error; |
| 249 | } | 249 | } |
| @@ -297,8 +297,8 @@ ResultStatus AppLoader_NCCH::ReadRomFS(std::vector<u8>& buffer) const { | |||
| 297 | u32 romfs_offset = ncch_offset + (ncch_header.romfs_offset * kBlockSize) + 0x1000; | 297 | u32 romfs_offset = ncch_offset + (ncch_header.romfs_offset * kBlockSize) + 0x1000; |
| 298 | u32 romfs_size = (ncch_header.romfs_size * kBlockSize) - 0x1000; | 298 | u32 romfs_size = (ncch_header.romfs_size * kBlockSize) - 0x1000; |
| 299 | 299 | ||
| 300 | INFO_LOG(LOADER, "RomFS offset: 0x%08X", romfs_offset); | 300 | LOG_DEBUG(Loader, "RomFS offset: 0x%08X", romfs_offset); |
| 301 | INFO_LOG(LOADER, "RomFS size: 0x%08X", romfs_size); | 301 | LOG_DEBUG(Loader, "RomFS size: 0x%08X", romfs_size); |
| 302 | 302 | ||
| 303 | buffer.resize(romfs_size); | 303 | buffer.resize(romfs_size); |
| 304 | 304 | ||
| @@ -307,10 +307,10 @@ ResultStatus AppLoader_NCCH::ReadRomFS(std::vector<u8>& buffer) const { | |||
| 307 | 307 | ||
| 308 | return ResultStatus::Success; | 308 | return ResultStatus::Success; |
| 309 | } | 309 | } |
| 310 | NOTICE_LOG(LOADER, "RomFS unused"); | 310 | LOG_DEBUG(Loader, "NCCH has no RomFS"); |
| 311 | return ResultStatus::ErrorNotUsed; | 311 | return ResultStatus::ErrorNotUsed; |
| 312 | } else { | 312 | } else { |
| 313 | ERROR_LOG(LOADER, "Unable to read file %s!", filename.c_str()); | 313 | LOG_ERROR(Loader, "Unable to read file %s!", filename.c_str()); |
| 314 | } | 314 | } |
| 315 | return ResultStatus::Error; | 315 | return ResultStatus::Error; |
| 316 | } | 316 | } |
diff --git a/src/core/mem_map.cpp b/src/core/mem_map.cpp index e1c2580ff..d1c44ed24 100644 --- a/src/core/mem_map.cpp +++ b/src/core/mem_map.cpp | |||
| @@ -71,7 +71,7 @@ void Init() { | |||
| 71 | 71 | ||
| 72 | g_base = MemoryMap_Setup(g_views, kNumMemViews, flags, &arena); | 72 | g_base = MemoryMap_Setup(g_views, kNumMemViews, flags, &arena); |
| 73 | 73 | ||
| 74 | NOTICE_LOG(MEMMAP, "initialized OK, RAM at %p (mirror at 0 @ %p)", g_heap, | 74 | LOG_DEBUG(HW_Memory, "initialized OK, RAM at %p (mirror at 0 @ %p)", g_heap, |
| 75 | physical_fcram); | 75 | physical_fcram); |
| 76 | } | 76 | } |
| 77 | 77 | ||
| @@ -82,7 +82,7 @@ void Shutdown() { | |||
| 82 | arena.ReleaseSpace(); | 82 | arena.ReleaseSpace(); |
| 83 | g_base = nullptr; | 83 | g_base = nullptr; |
| 84 | 84 | ||
| 85 | NOTICE_LOG(MEMMAP, "shutdown OK"); | 85 | LOG_DEBUG(HW_Memory, "shutdown OK"); |
| 86 | } | 86 | } |
| 87 | 87 | ||
| 88 | } // namespace | 88 | } // namespace |
diff --git a/src/core/mem_map_funcs.cpp b/src/core/mem_map_funcs.cpp index b78821a3b..7f7e77233 100644 --- a/src/core/mem_map_funcs.cpp +++ b/src/core/mem_map_funcs.cpp | |||
| @@ -28,7 +28,7 @@ VAddr PhysicalToVirtualAddress(const PAddr addr) { | |||
| 28 | return addr - FCRAM_PADDR + FCRAM_VADDR; | 28 | return addr - FCRAM_PADDR + FCRAM_VADDR; |
| 29 | } | 29 | } |
| 30 | 30 | ||
| 31 | ERROR_LOG(MEMMAP, "Unknown physical address @ 0x%08x", addr); | 31 | LOG_ERROR(HW_Memory, "Unknown physical address @ 0x%08x", addr); |
| 32 | return addr; | 32 | return addr; |
| 33 | } | 33 | } |
| 34 | 34 | ||
| @@ -44,7 +44,7 @@ PAddr VirtualToPhysicalAddress(const VAddr addr) { | |||
| 44 | return addr - FCRAM_VADDR + FCRAM_PADDR; | 44 | return addr - FCRAM_VADDR + FCRAM_PADDR; |
| 45 | } | 45 | } |
| 46 | 46 | ||
| 47 | ERROR_LOG(MEMMAP, "Unknown virtual address @ 0x%08x", addr); | 47 | LOG_ERROR(HW_Memory, "Unknown virtual address @ 0x%08x", addr); |
| 48 | return addr; | 48 | return addr; |
| 49 | } | 49 | } |
| 50 | 50 | ||
| @@ -92,7 +92,7 @@ inline void Read(T &var, const VAddr vaddr) { | |||
| 92 | var = *((const T*)&g_vram[vaddr - VRAM_VADDR]); | 92 | var = *((const T*)&g_vram[vaddr - VRAM_VADDR]); |
| 93 | 93 | ||
| 94 | } else { | 94 | } else { |
| 95 | ERROR_LOG(MEMMAP, "unknown Read%lu @ 0x%08X", sizeof(var) * 8, vaddr); | 95 | LOG_ERROR(HW_Memory, "unknown Read%lu @ 0x%08X", sizeof(var) * 8, vaddr); |
| 96 | } | 96 | } |
| 97 | } | 97 | } |
| 98 | 98 | ||
| @@ -141,7 +141,7 @@ inline void Write(const VAddr vaddr, const T data) { | |||
| 141 | 141 | ||
| 142 | // Error out... | 142 | // Error out... |
| 143 | } else { | 143 | } else { |
| 144 | ERROR_LOG(MEMMAP, "unknown Write%lu 0x%08X @ 0x%08X", sizeof(data) * 8, (u32)data, vaddr); | 144 | LOG_ERROR(HW_Memory, "unknown Write%lu 0x%08X @ 0x%08X", sizeof(data) * 8, (u32)data, vaddr); |
| 145 | } | 145 | } |
| 146 | } | 146 | } |
| 147 | 147 | ||
| @@ -175,7 +175,7 @@ u8 *GetPointer(const VAddr vaddr) { | |||
| 175 | return g_vram + (vaddr - VRAM_VADDR); | 175 | return g_vram + (vaddr - VRAM_VADDR); |
| 176 | 176 | ||
| 177 | } else { | 177 | } else { |
| 178 | ERROR_LOG(MEMMAP, "unknown GetPointer @ 0x%08x", vaddr); | 178 | LOG_ERROR(HW_Memory, "unknown GetPointer @ 0x%08x", vaddr); |
| 179 | return 0; | 179 | return 0; |
| 180 | } | 180 | } |
| 181 | } | 181 | } |
| @@ -239,7 +239,7 @@ u16 Read16(const VAddr addr) { | |||
| 239 | // Check for 16-bit unaligned memory reads... | 239 | // Check for 16-bit unaligned memory reads... |
| 240 | if (addr & 1) { | 240 | if (addr & 1) { |
| 241 | // TODO(bunnei): Implement 16-bit unaligned memory reads | 241 | // TODO(bunnei): Implement 16-bit unaligned memory reads |
| 242 | ERROR_LOG(MEMMAP, "16-bit unaligned memory reads are not implemented!"); | 242 | LOG_ERROR(HW_Memory, "16-bit unaligned memory reads are not implemented!"); |
| 243 | } | 243 | } |
| 244 | 244 | ||
| 245 | return (u16)data; | 245 | return (u16)data; |
diff --git a/src/video_core/clipper.cpp b/src/video_core/clipper.cpp index fbe4047ce..632fb959a 100644 --- a/src/video_core/clipper.cpp +++ b/src/video_core/clipper.cpp | |||
| @@ -157,7 +157,7 @@ void ProcessTriangle(OutputVertex &v0, OutputVertex &v1, OutputVertex &v2) { | |||
| 157 | 157 | ||
| 158 | InitScreenCoordinates(vtx2); | 158 | InitScreenCoordinates(vtx2); |
| 159 | 159 | ||
| 160 | DEBUG_LOG(GPU, | 160 | LOG_TRACE(Render_Software, |
| 161 | "Triangle %lu/%lu (%lu buffer vertices) at position (%.3f, %.3f, %.3f, %.3f), " | 161 | "Triangle %lu/%lu (%lu buffer vertices) at position (%.3f, %.3f, %.3f, %.3f), " |
| 162 | "(%.3f, %.3f, %.3f, %.3f), (%.3f, %.3f, %.3f, %.3f) and " | 162 | "(%.3f, %.3f, %.3f, %.3f), (%.3f, %.3f, %.3f, %.3f) and " |
| 163 | "screen position (%.2f, %.2f, %.2f), (%.2f, %.2f, %.2f), (%.2f, %.2f, %.2f)", | 163 | "screen position (%.2f, %.2f, %.2f), (%.2f, %.2f, %.2f), (%.2f, %.2f, %.2f)", |
diff --git a/src/video_core/command_processor.cpp b/src/video_core/command_processor.cpp index 431139cc2..b74cd3261 100644 --- a/src/video_core/command_processor.cpp +++ b/src/video_core/command_processor.cpp | |||
| @@ -114,7 +114,7 @@ static inline void WritePicaReg(u32 id, u32 value, u32 mask) { | |||
| 114 | (vertex_attribute_formats[i] == 2) ? *(s16*)srcdata : | 114 | (vertex_attribute_formats[i] == 2) ? *(s16*)srcdata : |
| 115 | *(float*)srcdata; | 115 | *(float*)srcdata; |
| 116 | input.attr[i][comp] = float24::FromFloat32(srcval); | 116 | input.attr[i][comp] = float24::FromFloat32(srcval); |
| 117 | DEBUG_LOG(GPU, "Loaded component %x of attribute %x for vertex %x (index %x) from 0x%08x + 0x%08lx + 0x%04lx: %f", | 117 | LOG_TRACE(HW_GPU, "Loaded component %x of attribute %x for vertex %x (index %x) from 0x%08x + 0x%08lx + 0x%04lx: %f", |
| 118 | comp, i, vertex, index, | 118 | comp, i, vertex, index, |
| 119 | attribute_config.GetBaseAddress(), | 119 | attribute_config.GetBaseAddress(), |
| 120 | vertex_attribute_sources[i] - base_address, | 120 | vertex_attribute_sources[i] - base_address, |
| @@ -176,7 +176,7 @@ static inline void WritePicaReg(u32 id, u32 value, u32 mask) { | |||
| 176 | auto& uniform = VertexShader::GetFloatUniform(uniform_setup.index); | 176 | auto& uniform = VertexShader::GetFloatUniform(uniform_setup.index); |
| 177 | 177 | ||
| 178 | if (uniform_setup.index > 95) { | 178 | if (uniform_setup.index > 95) { |
| 179 | ERROR_LOG(GPU, "Invalid VS uniform index %d", (int)uniform_setup.index); | 179 | LOG_ERROR(HW_GPU, "Invalid VS uniform index %d", (int)uniform_setup.index); |
| 180 | break; | 180 | break; |
| 181 | } | 181 | } |
| 182 | 182 | ||
| @@ -192,7 +192,7 @@ static inline void WritePicaReg(u32 id, u32 value, u32 mask) { | |||
| 192 | uniform.x = float24::FromRawFloat24(uniform_write_buffer[2] & 0xFFFFFF); | 192 | uniform.x = float24::FromRawFloat24(uniform_write_buffer[2] & 0xFFFFFF); |
| 193 | } | 193 | } |
| 194 | 194 | ||
| 195 | DEBUG_LOG(GPU, "Set uniform %x to (%f %f %f %f)", (int)uniform_setup.index, | 195 | LOG_TRACE(HW_GPU, "Set uniform %x to (%f %f %f %f)", (int)uniform_setup.index, |
| 196 | uniform.x.ToFloat32(), uniform.y.ToFloat32(), uniform.z.ToFloat32(), | 196 | uniform.x.ToFloat32(), uniform.y.ToFloat32(), uniform.z.ToFloat32(), |
| 197 | uniform.w.ToFloat32()); | 197 | uniform.w.ToFloat32()); |
| 198 | 198 | ||
diff --git a/src/video_core/debug_utils/debug_utils.cpp b/src/video_core/debug_utils/debug_utils.cpp index 71b03f31c..1a20f19ec 100644 --- a/src/video_core/debug_utils/debug_utils.cpp +++ b/src/video_core/debug_utils/debug_utils.cpp | |||
| @@ -248,8 +248,8 @@ void DumpShader(const u32* binary_data, u32 binary_size, const u32* swizzle_data | |||
| 248 | it->component_mask = it->component_mask | component_mask; | 248 | it->component_mask = it->component_mask | component_mask; |
| 249 | } | 249 | } |
| 250 | } catch (const std::out_of_range& ) { | 250 | } catch (const std::out_of_range& ) { |
| 251 | _dbg_assert_msg_(GPU, 0, "Unknown output attribute mapping"); | 251 | _dbg_assert_msg_(HW_GPU, 0, "Unknown output attribute mapping"); |
| 252 | ERROR_LOG(GPU, "Unknown output attribute mapping: %03x, %03x, %03x, %03x", | 252 | LOG_ERROR(HW_GPU, "Unknown output attribute mapping: %03x, %03x, %03x, %03x", |
| 253 | (int)output_attributes[i].map_x.Value(), | 253 | (int)output_attributes[i].map_x.Value(), |
| 254 | (int)output_attributes[i].map_y.Value(), | 254 | (int)output_attributes[i].map_y.Value(), |
| 255 | (int)output_attributes[i].map_z.Value(), | 255 | (int)output_attributes[i].map_z.Value(), |
| @@ -309,7 +309,7 @@ static int is_pica_tracing = false; | |||
| 309 | void StartPicaTracing() | 309 | void StartPicaTracing() |
| 310 | { | 310 | { |
| 311 | if (is_pica_tracing) { | 311 | if (is_pica_tracing) { |
| 312 | ERROR_LOG(GPU, "StartPicaTracing called even though tracing already running!"); | 312 | LOG_WARNING(HW_GPU, "StartPicaTracing called even though tracing already running!"); |
| 313 | return; | 313 | return; |
| 314 | } | 314 | } |
| 315 | 315 | ||
| @@ -342,7 +342,7 @@ void OnPicaRegWrite(u32 id, u32 value) | |||
| 342 | std::unique_ptr<PicaTrace> FinishPicaTracing() | 342 | std::unique_ptr<PicaTrace> FinishPicaTracing() |
| 343 | { | 343 | { |
| 344 | if (!is_pica_tracing) { | 344 | if (!is_pica_tracing) { |
| 345 | ERROR_LOG(GPU, "FinishPicaTracing called even though tracing already running!"); | 345 | LOG_WARNING(HW_GPU, "FinishPicaTracing called even though tracing isn't running!"); |
| 346 | return {}; | 346 | return {}; |
| 347 | } | 347 | } |
| 348 | 348 | ||
| @@ -357,7 +357,7 @@ std::unique_ptr<PicaTrace> FinishPicaTracing() | |||
| 357 | } | 357 | } |
| 358 | 358 | ||
| 359 | const Math::Vec4<u8> LookupTexture(const u8* source, int x, int y, const TextureInfo& info) { | 359 | const Math::Vec4<u8> LookupTexture(const u8* source, int x, int y, const TextureInfo& info) { |
| 360 | _dbg_assert_(GPU, info.format == Pica::Regs::TextureFormat::RGB8); | 360 | _dbg_assert_(Debug_GPU, info.format == Pica::Regs::TextureFormat::RGB8); |
| 361 | 361 | ||
| 362 | // Cf. rasterizer code for an explanation of this algorithm. | 362 | // Cf. rasterizer code for an explanation of this algorithm. |
| 363 | int texel_index_within_tile = 0; | 363 | int texel_index_within_tile = 0; |
| @@ -421,7 +421,7 @@ void DumpTexture(const Pica::Regs::TextureConfig& texture_config, u8* data) { | |||
| 421 | // Initialize write structure | 421 | // Initialize write structure |
| 422 | png_ptr = png_create_write_struct(PNG_LIBPNG_VER_STRING, nullptr, nullptr, nullptr); | 422 | png_ptr = png_create_write_struct(PNG_LIBPNG_VER_STRING, nullptr, nullptr, nullptr); |
| 423 | if (png_ptr == nullptr) { | 423 | if (png_ptr == nullptr) { |
| 424 | ERROR_LOG(GPU, "Could not allocate write struct\n"); | 424 | LOG_ERROR(Debug_GPU, "Could not allocate write struct\n"); |
| 425 | goto finalise; | 425 | goto finalise; |
| 426 | 426 | ||
| 427 | } | 427 | } |
| @@ -429,13 +429,13 @@ void DumpTexture(const Pica::Regs::TextureConfig& texture_config, u8* data) { | |||
| 429 | // Initialize info structure | 429 | // Initialize info structure |
| 430 | info_ptr = png_create_info_struct(png_ptr); | 430 | info_ptr = png_create_info_struct(png_ptr); |
| 431 | if (info_ptr == nullptr) { | 431 | if (info_ptr == nullptr) { |
| 432 | ERROR_LOG(GPU, "Could not allocate info struct\n"); | 432 | LOG_ERROR(Debug_GPU, "Could not allocate info struct\n"); |
| 433 | goto finalise; | 433 | goto finalise; |
| 434 | } | 434 | } |
| 435 | 435 | ||
| 436 | // Setup Exception handling | 436 | // Setup Exception handling |
| 437 | if (setjmp(png_jmpbuf(png_ptr))) { | 437 | if (setjmp(png_jmpbuf(png_ptr))) { |
| 438 | ERROR_LOG(GPU, "Error during png creation\n"); | 438 | LOG_ERROR(Debug_GPU, "Error during png creation\n"); |
| 439 | goto finalise; | 439 | goto finalise; |
| 440 | } | 440 | } |
| 441 | 441 | ||
| @@ -582,7 +582,7 @@ void DumpTevStageConfig(const std::array<Pica::Regs::TevStageConfig,6>& stages) | |||
| 582 | stage_info += "Stage " + std::to_string(index) + ": " + GetColorCombinerStr(tev_stage) + " " + GetAlphaCombinerStr(tev_stage) + "\n"; | 582 | stage_info += "Stage " + std::to_string(index) + ": " + GetColorCombinerStr(tev_stage) + " " + GetAlphaCombinerStr(tev_stage) + "\n"; |
| 583 | } | 583 | } |
| 584 | 584 | ||
| 585 | DEBUG_LOG(GPU, "%s", stage_info.c_str()); | 585 | LOG_TRACE(HW_GPU, "%s", stage_info.c_str()); |
| 586 | } | 586 | } |
| 587 | 587 | ||
| 588 | } // namespace | 588 | } // namespace |
diff --git a/src/video_core/gpu_debugger.h b/src/video_core/gpu_debugger.h index 1242eb58f..16b1656bb 100644 --- a/src/video_core/gpu_debugger.h +++ b/src/video_core/gpu_debugger.h | |||
| @@ -39,7 +39,7 @@ public: | |||
| 39 | virtual void GXCommandProcessed(int total_command_count) | 39 | virtual void GXCommandProcessed(int total_command_count) |
| 40 | { | 40 | { |
| 41 | const GSP_GPU::Command& cmd = observed->ReadGXCommandHistory(total_command_count-1); | 41 | const GSP_GPU::Command& cmd = observed->ReadGXCommandHistory(total_command_count-1); |
| 42 | ERROR_LOG(GSP, "Received command: id=%x", (int)cmd.id.Value()); | 42 | LOG_TRACE(Debug_GPU, "Received command: id=%x", (int)cmd.id.Value()); |
| 43 | } | 43 | } |
| 44 | 44 | ||
| 45 | protected: | 45 | protected: |
diff --git a/src/video_core/primitive_assembly.cpp b/src/video_core/primitive_assembly.cpp index dabf2d1a3..102693ed9 100644 --- a/src/video_core/primitive_assembly.cpp +++ b/src/video_core/primitive_assembly.cpp | |||
| @@ -43,7 +43,7 @@ void PrimitiveAssembler<VertexType>::SubmitVertex(VertexType& vtx, TriangleHandl | |||
| 43 | break; | 43 | break; |
| 44 | 44 | ||
| 45 | default: | 45 | default: |
| 46 | ERROR_LOG(GPU, "Unknown triangle topology %x:", (int)topology); | 46 | LOG_ERROR(Render_Software, "Unknown triangle topology %x:", (int)topology); |
| 47 | break; | 47 | break; |
| 48 | } | 48 | } |
| 49 | } | 49 | } |
diff --git a/src/video_core/rasterizer.cpp b/src/video_core/rasterizer.cpp index a35f0c0d8..b7e04a560 100644 --- a/src/video_core/rasterizer.cpp +++ b/src/video_core/rasterizer.cpp | |||
| @@ -252,7 +252,7 @@ void ProcessTriangle(const VertexShader::OutputVertex& v0, | |||
| 252 | return combiner_output.rgb(); | 252 | return combiner_output.rgb(); |
| 253 | 253 | ||
| 254 | default: | 254 | default: |
| 255 | ERROR_LOG(GPU, "Unknown color combiner source %d\n", (int)source); | 255 | LOG_ERROR(HW_GPU, "Unknown color combiner source %d\n", (int)source); |
| 256 | return {}; | 256 | return {}; |
| 257 | } | 257 | } |
| 258 | }; | 258 | }; |
| @@ -272,7 +272,7 @@ void ProcessTriangle(const VertexShader::OutputVertex& v0, | |||
| 272 | return combiner_output.a(); | 272 | return combiner_output.a(); |
| 273 | 273 | ||
| 274 | default: | 274 | default: |
| 275 | ERROR_LOG(GPU, "Unknown alpha combiner source %d\n", (int)source); | 275 | LOG_ERROR(HW_GPU, "Unknown alpha combiner source %d\n", (int)source); |
| 276 | return 0; | 276 | return 0; |
| 277 | } | 277 | } |
| 278 | }; | 278 | }; |
| @@ -283,7 +283,7 @@ void ProcessTriangle(const VertexShader::OutputVertex& v0, | |||
| 283 | case ColorModifier::SourceColor: | 283 | case ColorModifier::SourceColor: |
| 284 | return values; | 284 | return values; |
| 285 | default: | 285 | default: |
| 286 | ERROR_LOG(GPU, "Unknown color factor %d\n", (int)factor); | 286 | LOG_ERROR(HW_GPU, "Unknown color factor %d\n", (int)factor); |
| 287 | return {}; | 287 | return {}; |
| 288 | } | 288 | } |
| 289 | }; | 289 | }; |
| @@ -293,7 +293,7 @@ void ProcessTriangle(const VertexShader::OutputVertex& v0, | |||
| 293 | case AlphaModifier::SourceAlpha: | 293 | case AlphaModifier::SourceAlpha: |
| 294 | return value; | 294 | return value; |
| 295 | default: | 295 | default: |
| 296 | ERROR_LOG(GPU, "Unknown color factor %d\n", (int)factor); | 296 | LOG_ERROR(HW_GPU, "Unknown color factor %d\n", (int)factor); |
| 297 | return 0; | 297 | return 0; |
| 298 | } | 298 | } |
| 299 | }; | 299 | }; |
| @@ -307,7 +307,7 @@ void ProcessTriangle(const VertexShader::OutputVertex& v0, | |||
| 307 | return ((input[0] * input[1]) / 255).Cast<u8>(); | 307 | return ((input[0] * input[1]) / 255).Cast<u8>(); |
| 308 | 308 | ||
| 309 | default: | 309 | default: |
| 310 | ERROR_LOG(GPU, "Unknown color combiner operation %d\n", (int)op); | 310 | LOG_ERROR(HW_GPU, "Unknown color combiner operation %d\n", (int)op); |
| 311 | return {}; | 311 | return {}; |
| 312 | } | 312 | } |
| 313 | }; | 313 | }; |
| @@ -321,7 +321,7 @@ void ProcessTriangle(const VertexShader::OutputVertex& v0, | |||
| 321 | return input[0] * input[1] / 255; | 321 | return input[0] * input[1] / 255; |
| 322 | 322 | ||
| 323 | default: | 323 | default: |
| 324 | ERROR_LOG(GPU, "Unknown alpha combiner operation %d\n", (int)op); | 324 | LOG_ERROR(HW_GPU, "Unknown alpha combiner operation %d\n", (int)op); |
| 325 | return 0; | 325 | return 0; |
| 326 | } | 326 | } |
| 327 | }; | 327 | }; |
diff --git a/src/video_core/renderer_opengl/gl_shader_util.cpp b/src/video_core/renderer_opengl/gl_shader_util.cpp index fdac9ae1a..d0f82e6cd 100644 --- a/src/video_core/renderer_opengl/gl_shader_util.cpp +++ b/src/video_core/renderer_opengl/gl_shader_util.cpp | |||
| @@ -20,7 +20,7 @@ GLuint LoadShaders(const char* vertex_shader, const char* fragment_shader) { | |||
| 20 | int info_log_length; | 20 | int info_log_length; |
| 21 | 21 | ||
| 22 | // Compile Vertex Shader | 22 | // Compile Vertex Shader |
| 23 | DEBUG_LOG(GPU, "Compiling vertex shader."); | 23 | LOG_DEBUG(Render_OpenGL, "Compiling vertex shader..."); |
| 24 | 24 | ||
| 25 | glShaderSource(vertex_shader_id, 1, &vertex_shader, nullptr); | 25 | glShaderSource(vertex_shader_id, 1, &vertex_shader, nullptr); |
| 26 | glCompileShader(vertex_shader_id); | 26 | glCompileShader(vertex_shader_id); |
| @@ -32,11 +32,15 @@ GLuint LoadShaders(const char* vertex_shader, const char* fragment_shader) { | |||
| 32 | if (info_log_length > 1) { | 32 | if (info_log_length > 1) { |
| 33 | std::vector<char> vertex_shader_error(info_log_length); | 33 | std::vector<char> vertex_shader_error(info_log_length); |
| 34 | glGetShaderInfoLog(vertex_shader_id, info_log_length, nullptr, &vertex_shader_error[0]); | 34 | glGetShaderInfoLog(vertex_shader_id, info_log_length, nullptr, &vertex_shader_error[0]); |
| 35 | DEBUG_LOG(GPU, "%s", &vertex_shader_error[0]); | 35 | if (result) { |
| 36 | LOG_DEBUG(Render_OpenGL, "%s", &vertex_shader_error[0]); | ||
| 37 | } else { | ||
| 38 | LOG_ERROR(Render_OpenGL, "Error compiling vertex shader:\n%s", &vertex_shader_error[0]); | ||
| 39 | } | ||
| 36 | } | 40 | } |
| 37 | 41 | ||
| 38 | // Compile Fragment Shader | 42 | // Compile Fragment Shader |
| 39 | DEBUG_LOG(GPU, "Compiling fragment shader."); | 43 | LOG_DEBUG(Render_OpenGL, "Compiling fragment shader..."); |
| 40 | 44 | ||
| 41 | glShaderSource(fragment_shader_id, 1, &fragment_shader, nullptr); | 45 | glShaderSource(fragment_shader_id, 1, &fragment_shader, nullptr); |
| 42 | glCompileShader(fragment_shader_id); | 46 | glCompileShader(fragment_shader_id); |
| @@ -48,11 +52,15 @@ GLuint LoadShaders(const char* vertex_shader, const char* fragment_shader) { | |||
| 48 | if (info_log_length > 1) { | 52 | if (info_log_length > 1) { |
| 49 | std::vector<char> fragment_shader_error(info_log_length); | 53 | std::vector<char> fragment_shader_error(info_log_length); |
| 50 | glGetShaderInfoLog(fragment_shader_id, info_log_length, nullptr, &fragment_shader_error[0]); | 54 | glGetShaderInfoLog(fragment_shader_id, info_log_length, nullptr, &fragment_shader_error[0]); |
| 51 | DEBUG_LOG(GPU, "%s", &fragment_shader_error[0]); | 55 | if (result) { |
| 56 | LOG_DEBUG(Render_OpenGL, "%s", &fragment_shader_error[0]); | ||
| 57 | } else { | ||
| 58 | LOG_ERROR(Render_OpenGL, "Error compiling fragment shader:\n%s", &fragment_shader_error[0]); | ||
| 59 | } | ||
| 52 | } | 60 | } |
| 53 | 61 | ||
| 54 | // Link the program | 62 | // Link the program |
| 55 | DEBUG_LOG(GPU, "Linking program."); | 63 | LOG_DEBUG(Render_OpenGL, "Linking program..."); |
| 56 | 64 | ||
| 57 | GLuint program_id = glCreateProgram(); | 65 | GLuint program_id = glCreateProgram(); |
| 58 | glAttachShader(program_id, vertex_shader_id); | 66 | glAttachShader(program_id, vertex_shader_id); |
| @@ -66,7 +74,11 @@ GLuint LoadShaders(const char* vertex_shader, const char* fragment_shader) { | |||
| 66 | if (info_log_length > 1) { | 74 | if (info_log_length > 1) { |
| 67 | std::vector<char> program_error(info_log_length); | 75 | std::vector<char> program_error(info_log_length); |
| 68 | glGetProgramInfoLog(program_id, info_log_length, nullptr, &program_error[0]); | 76 | glGetProgramInfoLog(program_id, info_log_length, nullptr, &program_error[0]); |
| 69 | DEBUG_LOG(GPU, "%s", &program_error[0]); | 77 | if (result) { |
| 78 | LOG_DEBUG(Render_OpenGL, "%s", &program_error[0]); | ||
| 79 | } else { | ||
| 80 | LOG_ERROR(Render_OpenGL, "Error linking shader:\n%s", &program_error[0]); | ||
| 81 | } | ||
| 70 | } | 82 | } |
| 71 | 83 | ||
| 72 | glDeleteShader(vertex_shader_id); | 84 | glDeleteShader(vertex_shader_id); |
diff --git a/src/video_core/renderer_opengl/renderer_opengl.cpp b/src/video_core/renderer_opengl/renderer_opengl.cpp index 06de6afbd..e2caeeb8f 100644 --- a/src/video_core/renderer_opengl/renderer_opengl.cpp +++ b/src/video_core/renderer_opengl/renderer_opengl.cpp | |||
| @@ -90,7 +90,7 @@ void RendererOpenGL::LoadFBToActiveGLTexture(const GPU::Regs::FramebufferConfig& | |||
| 90 | const VAddr framebuffer_vaddr = Memory::PhysicalToVirtualAddress( | 90 | const VAddr framebuffer_vaddr = Memory::PhysicalToVirtualAddress( |
| 91 | framebuffer.active_fb == 1 ? framebuffer.address_left2 : framebuffer.address_left1); | 91 | framebuffer.active_fb == 1 ? framebuffer.address_left2 : framebuffer.address_left1); |
| 92 | 92 | ||
| 93 | DEBUG_LOG(GPU, "0x%08x bytes from 0x%08x(%dx%d), fmt %x", | 93 | LOG_TRACE(Render_OpenGL, "0x%08x bytes from 0x%08x(%dx%d), fmt %x", |
| 94 | framebuffer.stride * framebuffer.height, | 94 | framebuffer.stride * framebuffer.height, |
| 95 | framebuffer_vaddr, (int)framebuffer.width, | 95 | framebuffer_vaddr, (int)framebuffer.width, |
| 96 | (int)framebuffer.height, (int)framebuffer.format); | 96 | (int)framebuffer.height, (int)framebuffer.format); |
| @@ -98,15 +98,15 @@ void RendererOpenGL::LoadFBToActiveGLTexture(const GPU::Regs::FramebufferConfig& | |||
| 98 | const u8* framebuffer_data = Memory::GetPointer(framebuffer_vaddr); | 98 | const u8* framebuffer_data = Memory::GetPointer(framebuffer_vaddr); |
| 99 | 99 | ||
| 100 | // TODO: Handle other pixel formats | 100 | // TODO: Handle other pixel formats |
| 101 | _dbg_assert_msg_(RENDER, framebuffer.color_format == GPU::Regs::PixelFormat::RGB8, | 101 | _dbg_assert_msg_(Render_OpenGL, framebuffer.color_format == GPU::Regs::PixelFormat::RGB8, |
| 102 | "Unsupported 3DS pixel format."); | 102 | "Unsupported 3DS pixel format."); |
| 103 | 103 | ||
| 104 | size_t pixel_stride = framebuffer.stride / 3; | 104 | size_t pixel_stride = framebuffer.stride / 3; |
| 105 | // OpenGL only supports specifying a stride in units of pixels, not bytes, unfortunately | 105 | // OpenGL only supports specifying a stride in units of pixels, not bytes, unfortunately |
| 106 | _dbg_assert_(RENDER, pixel_stride * 3 == framebuffer.stride); | 106 | _dbg_assert_(Render_OpenGL, pixel_stride * 3 == framebuffer.stride); |
| 107 | // Ensure no bad interactions with GL_UNPACK_ALIGNMENT, which by default | 107 | // Ensure no bad interactions with GL_UNPACK_ALIGNMENT, which by default |
| 108 | // only allows rows to have a memory alignement of 4. | 108 | // only allows rows to have a memory alignement of 4. |
| 109 | _dbg_assert_(RENDER, pixel_stride % 4 == 0); | 109 | _dbg_assert_(Render_OpenGL, pixel_stride % 4 == 0); |
| 110 | 110 | ||
| 111 | glBindTexture(GL_TEXTURE_2D, texture.handle); | 111 | glBindTexture(GL_TEXTURE_2D, texture.handle); |
| 112 | glPixelStorei(GL_UNPACK_ROW_LENGTH, (GLint)pixel_stride); | 112 | glPixelStorei(GL_UNPACK_ROW_LENGTH, (GLint)pixel_stride); |
| @@ -263,11 +263,11 @@ void RendererOpenGL::Init() { | |||
| 263 | 263 | ||
| 264 | int err = ogl_LoadFunctions(); | 264 | int err = ogl_LoadFunctions(); |
| 265 | if (ogl_LOAD_SUCCEEDED != err) { | 265 | if (ogl_LOAD_SUCCEEDED != err) { |
| 266 | ERROR_LOG(RENDER, "Failed to initialize GL functions! Exiting..."); | 266 | LOG_CRITICAL(Render_OpenGL, "Failed to initialize GL functions! Exiting..."); |
| 267 | exit(-1); | 267 | exit(-1); |
| 268 | } | 268 | } |
| 269 | 269 | ||
| 270 | NOTICE_LOG(RENDER, "GL_VERSION: %s\n", glGetString(GL_VERSION)); | 270 | LOG_INFO(Render_OpenGL, "GL_VERSION: %s", glGetString(GL_VERSION)); |
| 271 | InitOpenGLObjects(); | 271 | InitOpenGLObjects(); |
| 272 | } | 272 | } |
| 273 | 273 | ||
diff --git a/src/video_core/vertex_shader.cpp b/src/video_core/vertex_shader.cpp index 0dff11a0f..477e78cfe 100644 --- a/src/video_core/vertex_shader.cpp +++ b/src/video_core/vertex_shader.cpp | |||
| @@ -206,7 +206,7 @@ static void ProcessShaderCode(VertexShaderState& state) { | |||
| 206 | case Instruction::OpCode::CALL: | 206 | case Instruction::OpCode::CALL: |
| 207 | increment_pc = false; | 207 | increment_pc = false; |
| 208 | 208 | ||
| 209 | _dbg_assert_(GPU, state.call_stack_pointer - state.call_stack < sizeof(state.call_stack)); | 209 | _dbg_assert_(HW_GPU, state.call_stack_pointer - state.call_stack < sizeof(state.call_stack)); |
| 210 | 210 | ||
| 211 | *++state.call_stack_pointer = state.program_counter - shader_memory; | 211 | *++state.call_stack_pointer = state.program_counter - shader_memory; |
| 212 | // TODO: Does this offset refer to the beginning of shader memory? | 212 | // TODO: Does this offset refer to the beginning of shader memory? |
| @@ -218,7 +218,7 @@ static void ProcessShaderCode(VertexShaderState& state) { | |||
| 218 | break; | 218 | break; |
| 219 | 219 | ||
| 220 | default: | 220 | default: |
| 221 | ERROR_LOG(GPU, "Unhandled instruction: 0x%02x (%s): 0x%08x", | 221 | LOG_ERROR(HW_GPU, "Unhandled instruction: 0x%02x (%s): 0x%08x", |
| 222 | (int)instr.opcode.Value(), instr.GetOpCodeName().c_str(), instr.hex); | 222 | (int)instr.opcode.Value(), instr.GetOpCodeName().c_str(), instr.hex); |
| 223 | break; | 223 | break; |
| 224 | } | 224 | } |
| @@ -285,7 +285,7 @@ OutputVertex RunShader(const InputVertex& input, int num_attributes) | |||
| 285 | state.debug.max_opdesc_id, registers.vs_main_offset, | 285 | state.debug.max_opdesc_id, registers.vs_main_offset, |
| 286 | registers.vs_output_attributes); | 286 | registers.vs_output_attributes); |
| 287 | 287 | ||
| 288 | DEBUG_LOG(GPU, "Output vertex: pos (%.2f, %.2f, %.2f, %.2f), col(%.2f, %.2f, %.2f, %.2f), tc0(%.2f, %.2f)", | 288 | LOG_TRACE(Render_Software, "Output vertex: pos (%.2f, %.2f, %.2f, %.2f), col(%.2f, %.2f, %.2f, %.2f), tc0(%.2f, %.2f)", |
| 289 | ret.pos.x.ToFloat32(), ret.pos.y.ToFloat32(), ret.pos.z.ToFloat32(), ret.pos.w.ToFloat32(), | 289 | ret.pos.x.ToFloat32(), ret.pos.y.ToFloat32(), ret.pos.z.ToFloat32(), ret.pos.w.ToFloat32(), |
| 290 | ret.color.x.ToFloat32(), ret.color.y.ToFloat32(), ret.color.z.ToFloat32(), ret.color.w.ToFloat32(), | 290 | ret.color.x.ToFloat32(), ret.color.y.ToFloat32(), ret.color.z.ToFloat32(), ret.color.w.ToFloat32(), |
| 291 | ret.tc0.u().ToFloat32(), ret.tc0.v().ToFloat32()); | 291 | ret.tc0.u().ToFloat32(), ret.tc0.v().ToFloat32()); |
diff --git a/src/video_core/video_core.cpp b/src/video_core/video_core.cpp index b581ff4da..6791e4007 100644 --- a/src/video_core/video_core.cpp +++ b/src/video_core/video_core.cpp | |||
| @@ -30,13 +30,13 @@ void Init(EmuWindow* emu_window) { | |||
| 30 | 30 | ||
| 31 | g_current_frame = 0; | 31 | g_current_frame = 0; |
| 32 | 32 | ||
| 33 | NOTICE_LOG(VIDEO, "initialized OK"); | 33 | LOG_DEBUG(Render, "initialized OK"); |
| 34 | } | 34 | } |
| 35 | 35 | ||
| 36 | /// Shutdown the video core | 36 | /// Shutdown the video core |
| 37 | void Shutdown() { | 37 | void Shutdown() { |
| 38 | delete g_renderer; | 38 | delete g_renderer; |
| 39 | NOTICE_LOG(VIDEO, "shutdown OK"); | 39 | LOG_DEBUG(Render, "shutdown OK"); |
| 40 | } | 40 | } |
| 41 | 41 | ||
| 42 | } // namespace | 42 | } // namespace |