From 80e1c296c541f62987f1f777375406817576b31e Mon Sep 17 00:00:00 2001 From: georgemoralis Date: Tue, 17 Mar 2026 18:15:55 +0200 Subject: [PATCH] cleanup --- src/main.cpp | 148 +++--------------- .../frontend/translate/vector_alu.cpp | 5 +- 2 files changed, 19 insertions(+), 134 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index d2804ee62..cd319f8b3 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -71,136 +71,24 @@ int main(int argc, char* argv[]) { std::optional setAddonFolder; std::optional patchFile; - // ---- Options ---- - app.add_option("-g,--game", gamePath, "Game path or ID"); - app.add_option("-p,--patch", patchFile, "Patch file to apply"); - app.add_flag("-i,--ignore-game-patch", ignoreGamePatch, - "Disable automatic loading of game patches"); - - // FULLSCREEN: behavior-identical - app.add_option("-f,--fullscreen", fullscreenStr, "Fullscreen mode (true|false)"); - - app.add_option("--override-root", overrideRoot)->check(CLI::ExistingDirectory); - - app.add_flag("--wait-for-debugger", waitForDebugger); - app.add_option("--wait-for-pid", waitPid); - - app.add_flag("--show-fps", showFps); - app.add_flag("--config-clean", configClean); - app.add_flag("--config-global", configGlobal); - app.add_flag("--log-append", logAppend); - - app.add_option("--add-game-folder", addGameFolder)->check(CLI::ExistingDirectory); - app.add_option("--set-addon-folder", setAddonFolder)->check(CLI::ExistingDirectory); - - // ---- Capture args after `--` verbatim ---- - app.allow_extras(); - app.parse_complete_callback([&]() { - const auto& extras = app.remaining(); - if (!extras.empty()) { - gameArgs = extras; - } - }); - - // ---- No-args behavior ---- - if (argc == 1) { - SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_INFORMATION, "shadPS4", - "This is a CLI application. Please use the QTLauncher for a GUI:\n" - "https://github.com/shadps4-emu/shadps4-qtlauncher/releases", - nullptr); - std::cout << app.help(); - return -1; - } - - try { - app.parse(argc, argv); - } catch (const CLI::ParseError& e) { - return app.exit(e); - } - - // ---- Utility commands ---- - if (addGameFolder) { - Config::addGameInstallDir(*addGameFolder); - Config::save(user_dir / "config.toml"); - std::cout << "Game folder successfully saved.\n"; - return 0; - } - - if (setAddonFolder) { - Config::setAddonInstallDir(*setAddonFolder); - Config::save(user_dir / "config.toml"); - std::cout << "Addon folder successfully saved.\n"; - return 0; - } - - if (!gamePath.has_value()) { - if (!gameArgs.empty()) { - gamePath = gameArgs.front(); - gameArgs.erase(gameArgs.begin()); - } else { - std::cerr << "Error: Please provide a game path or ID.\n"; - return 1; - } - } - if (!gameArgs.empty()) { - if (gameArgs.front() == "--") { - gameArgs.erase(gameArgs.begin()); - } else { - std::cerr << "Error: unhandled flags\n"; - return 1; - } - } - - // ---- Apply flags ---- - if (patchFile) - MemoryPatcher::patch_file = *patchFile; - - if (ignoreGamePatch) - Core::FileSys::MntPoints::ignore_game_patches = true; - - if (fullscreenStr) { - if (*fullscreenStr == "true") { - Config::setIsFullscreen(true); - } else if (*fullscreenStr == "false") { - Config::setIsFullscreen(false); - } else { - std::cerr << "Error: Invalid argument for --fullscreen (use true|false)\n"; - return 1; - } - } - - if (showFps) - Config::setShowFpsCounter(true); - - if (configClean) - Config::setConfigMode(Config::ConfigMode::Clean); - - if (configGlobal) - Config::setConfigMode(Config::ConfigMode::Global); - - if (logAppend) - Common::Log::SetAppend(); - - // ---- Resolve game path or ID ---- - std::filesystem::path ebootPath(*gamePath); - if (!std::filesystem::exists(ebootPath)) { - bool found = false; - constexpr int maxDepth = 5; - for (const auto& installDir : Config::getGameInstallDirs()) { - if (auto foundPath = Common::FS::FindGameByID(installDir, *gamePath, maxDepth)) { - ebootPath = *foundPath; - found = true; - break; - } - } - if (!found) { - std::cerr << "Error: Game ID or file path not found: " << *gamePath << "\n"; - return 1; - } - } - - if (waitPid) - Core::Debugger::WaitForPid(*waitPid); + // const char* const ebootPath = "M:/PS4/dumpedgames/CUSA00207/eboot.bin"; // bloodborne + // const char* const ebootPath = "D:/ps4/shadps4games/CUSA07010/eboot.bin"; // sonic mania + // const char* const ebootPath = "C:/ps4tests/CUSA03318/eboot.bin";//carmageddon + // const char* const ebootPath = "C:/ps4tests/CUSA04518/eboot.bin"; // project diva x + // const char* const ebootPath = "D:/ps4sdk/rain.elf"; + // const char* const ebootPath = "C:/ps4tests/CUSA05344/eboot.bin";//here we lie + // const char* const ebootPath = "C:/ps4tests/CUSA01499/eboot.bin"; // mirror's edge catalyst + // const char* const ebootPath = "D:/ps4/shadps4games/CUSA30582/eboot.bin";//SpongeBob + // SquarePants: The Cosmic Shake + //const char* const ebootPath = "D:/ps4/shadps4games/CUSA36843/eboot.bin"; // red dead + // const char* const ebootPath = "C:/ps4tests/CUSA00375/eboot.bin"; // the evil within + // const char* const ebootPath = "C:/ps4tests/CUSA51536/eboot.bin";//formula legends + // const char* const ebootPath = "D:/ps4/shadps4games/CUSA11616/eboot.bin"; // Reverie + // const char* const ebootPath = "C:/ps4tests/CUSA00093/eboot.bin";//driveclub + // const char* const ebootPath = "D:/ps4games/playable/CUSA05635/eboot.bin";//puyo tetris + //const char* const ebootPath = "M:/PS4/dumpedgames/CUSA07410/eboot.bin";//gow + //const char* const ebootPath = "D:/ps4/shadps4games/CUSA31498/eboot.bin";//street fighter 6 + const char* const ebootPath = "M:/PS4/dumpedgames/CUSA20099/eboot.bin";//gi joe auto* emulator = Common::Singleton::Instance(); emulator->executableName = argv[0]; diff --git a/src/shader_recompiler/frontend/translate/vector_alu.cpp b/src/shader_recompiler/frontend/translate/vector_alu.cpp index 80f525862..199b6f7b0 100644 --- a/src/shader_recompiler/frontend/translate/vector_alu.cpp +++ b/src/shader_recompiler/frontend/translate/vector_alu.cpp @@ -1162,10 +1162,7 @@ void Translator::V_CMP_U64(ConditionOp op, bool is_signed, bool set_exec, const return {ir.Imm32(v), ir.Imm32(v < 0 ? -1 : 0)}; } case VccLo: - // treat as 32-bit values, zero-extend to 64-bit - { - return {ir.GetVccLo(), ir.GetVccHi()}; - } + return {ir.GetVccLo(), ir.GetVccHi()}; default: UNREACHABLE_MSG("Unsupported operand field {}", u32(op.field)); }