Merge branch 'main' into batch-sync

This commit is contained in:
Lander Gallastegi 2025-07-07 14:24:20 +02:00 committed by GitHub
commit 35bbe874a9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
23 changed files with 338 additions and 250 deletions

View file

@ -203,7 +203,7 @@ execute_process(
# Set Version # Set Version
set(EMULATOR_VERSION_MAJOR "0") set(EMULATOR_VERSION_MAJOR "0")
set(EMULATOR_VERSION_MINOR "9") set(EMULATOR_VERSION_MINOR "10")
set(EMULATOR_VERSION_PATCH "1") set(EMULATOR_VERSION_PATCH "1")
set_source_files_properties(src/shadps4.rc PROPERTIES COMPILE_DEFINITIONS "EMULATOR_VERSION_MAJOR=${EMULATOR_VERSION_MAJOR};EMULATOR_VERSION_MINOR=${EMULATOR_VERSION_MINOR};EMULATOR_VERSION_PATCH=${EMULATOR_VERSION_PATCH}") set_source_files_properties(src/shadps4.rc PROPERTIES COMPILE_DEFINITIONS "EMULATOR_VERSION_MAJOR=${EMULATOR_VERSION_MAJOR};EMULATOR_VERSION_MINOR=${EMULATOR_VERSION_MINOR};EMULATOR_VERSION_PATCH=${EMULATOR_VERSION_PATCH}")

View file

@ -37,6 +37,9 @@
<category translate="no">Game</category> <category translate="no">Game</category>
</categories> </categories>
<releases> <releases>
<release version="0.10.0" date="2025-07-06">
<url>https://github.com/shadps4-emu/shadPS4/releases/tag/v.0.10.0</url>
</release>
<release version="0.9.0" date="2025-05-22"> <release version="0.9.0" date="2025-05-22">
<url>https://github.com/shadps4-emu/shadPS4/releases/tag/v.0.9.0</url> <url>https://github.com/shadps4-emu/shadPS4/releases/tag/v.0.9.0</url>
</release> </release>

View file

@ -31,31 +31,50 @@ std::filesystem::path find_fs_path_or(const basic_value<TC>& v, const K& ky,
namespace Config { namespace Config {
// General
static bool isNeo = false; static bool isNeo = false;
static bool isDevKit = false; static bool isDevKit = false;
static bool isPSNSignedIn = false;
static bool isTrophyPopupDisabled = false; static bool isTrophyPopupDisabled = false;
static double trophyNotificationDuration = 6.0;
static bool enableDiscordRPC = false; static bool enableDiscordRPC = false;
static u32 screenWidth = 1280; static std::string logFilter = "";
static u32 screenHeight = 720;
static s32 gpuId = -1; // Vulkan physical device index. Set to negative for auto select
static std::string logFilter;
static std::string logType = "sync"; static std::string logType = "sync";
static std::string userName = "shadPS4"; static std::string userName = "shadPS4";
static std::string chooseHomeTab; static std::string chooseHomeTab = "General";
static bool isShowSplash = false;
static std::string isSideTrophy = "right";
static bool compatibilityData = false;
static bool checkCompatibilityOnStartup = false;
// Input
static int cursorState = HideCursorState::Idle;
static int cursorHideTimeout = 5; // 5 seconds (default)
static bool useSpecialPad = false; static bool useSpecialPad = false;
static int specialPadClass = 1; static int specialPadClass = 1;
static bool isMotionControlsEnabled = true; static bool isMotionControlsEnabled = true;
static bool isDebugDump = false; static bool useUnifiedInputConfig = true;
static bool isShaderDebug = false;
static bool isShowSplash = false; // These two entries aren't stored in the config
static std::string isSideTrophy = "right"; static bool overrideControllerColor = false;
static int controllerCustomColorRGB[3] = {0, 0, 255};
// GPU
static u32 screenWidth = 1280;
static u32 screenHeight = 720;
static bool isNullGpu = false; static bool isNullGpu = false;
static bool shouldCopyGPUBuffers = false; static bool shouldCopyGPUBuffers = false;
static bool readbacksEnabled = false; static bool readbacksEnabled = false;
static bool directMemoryAccessEnabled = false; static bool directMemoryAccessEnabled = false;
static bool shouldDumpShaders = false; static bool shouldDumpShaders = false;
static bool shouldPatchShaders = true; static bool shouldPatchShaders = false;
static u32 vblankDivider = 1; static u32 vblankDivider = 1;
static bool isFullscreen = false;
static std::string fullscreenMode = "Windowed";
static bool isHDRAllowed = false;
// Vulkan
static s32 gpuId = -1;
static bool vkValidation = false; static bool vkValidation = false;
static bool vkValidationSync = false; static bool vkValidationSync = false;
static bool vkValidationGpu = false; static bool vkValidationGpu = false;
@ -63,32 +82,29 @@ static bool vkCrashDiagnostic = false;
static bool vkHostMarkers = false; static bool vkHostMarkers = false;
static bool vkGuestMarkers = false; static bool vkGuestMarkers = false;
static bool rdocEnable = false; static bool rdocEnable = false;
static bool isFpsColor = true;
static bool isSeparateLogFilesEnabled = false;
static int cursorState = HideCursorState::Idle;
static int cursorHideTimeout = 5; // 5 seconds (default)
static double trophyNotificationDuration = 6.0;
static bool useUnifiedInputConfig = true;
static bool overrideControllerColor = false;
static int controllerCustomColorRGB[3] = {0, 0, 255};
static bool compatibilityData = false;
static bool checkCompatibilityOnStartup = false;
static std::string trophyKey;
static bool isPSNSignedIn = false;
// Gui // Debug
static bool isDebugDump = false;
static bool isShaderDebug = false;
static bool isSeparateLogFilesEnabled = false;
static bool isFpsColor = true;
// GUI
static bool load_game_size = true; static bool load_game_size = true;
static std::vector<GameInstallDir> settings_install_dirs = {}; static std::vector<GameInstallDir> settings_install_dirs = {};
std::vector<bool> install_dirs_enabled = {}; std::vector<bool> install_dirs_enabled = {};
std::filesystem::path settings_addon_install_dir = {}; std::filesystem::path settings_addon_install_dir = {};
std::filesystem::path save_data_path = {}; std::filesystem::path save_data_path = {};
static bool isFullscreen = false;
static std::string fullscreenMode = "Windowed";
static bool isHDRAllowed = false;
// Language // Settings
u32 m_language = 1; // english u32 m_language = 1; // english
// Keys
static std::string trophyKey = "";
// Expected number of items in the config file
static constexpr u64 total_entries = 51;
bool allowHDR() { bool allowHDR() {
return isHDRAllowed; return isHDRAllowed;
} }
@ -565,36 +581,46 @@ void load(const std::filesystem::path& path) {
fmt::print("Got exception trying to load config file. Exception: {}\n", ex.what()); fmt::print("Got exception trying to load config file. Exception: {}\n", ex.what());
return; return;
} }
u64 entry_count = 0;
if (data.contains("General")) { if (data.contains("General")) {
const toml::value& general = data.at("General"); const toml::value& general = data.at("General");
isNeo = toml::find_or<bool>(general, "isPS4Pro", false); isNeo = toml::find_or<bool>(general, "isPS4Pro", isNeo);
isDevKit = toml::find_or<bool>(general, "isDevKit", false); isDevKit = toml::find_or<bool>(general, "isDevKit", isDevKit);
isPSNSignedIn = toml::find_or<bool>(general, "isPSNSignedIn", false); isPSNSignedIn = toml::find_or<bool>(general, "isPSNSignedIn", isPSNSignedIn);
isTrophyPopupDisabled = toml::find_or<bool>(general, "isTrophyPopupDisabled", false); isTrophyPopupDisabled =
trophyNotificationDuration = toml::find_or<bool>(general, "isTrophyPopupDisabled", isTrophyPopupDisabled);
toml::find_or<double>(general, "trophyNotificationDuration", 5.0); trophyNotificationDuration = toml::find_or<double>(general, "trophyNotificationDuration",
enableDiscordRPC = toml::find_or<bool>(general, "enableDiscordRPC", true); trophyNotificationDuration);
logFilter = toml::find_or<std::string>(general, "logFilter", ""); enableDiscordRPC = toml::find_or<bool>(general, "enableDiscordRPC", enableDiscordRPC);
logType = toml::find_or<std::string>(general, "logType", "sync"); logFilter = toml::find_or<std::string>(general, "logFilter", logFilter);
userName = toml::find_or<std::string>(general, "userName", "shadPS4"); logType = toml::find_or<std::string>(general, "logType", logType);
isShowSplash = toml::find_or<bool>(general, "showSplash", true); userName = toml::find_or<std::string>(general, "userName", userName);
isSideTrophy = toml::find_or<std::string>(general, "sideTrophy", "right"); isShowSplash = toml::find_or<bool>(general, "showSplash", isShowSplash);
compatibilityData = toml::find_or<bool>(general, "compatibilityEnabled", false); isSideTrophy = toml::find_or<std::string>(general, "sideTrophy", isSideTrophy);
checkCompatibilityOnStartup = compatibilityData = toml::find_or<bool>(general, "compatibilityEnabled", compatibilityData);
toml::find_or<bool>(general, "checkCompatibilityOnStartup", false); checkCompatibilityOnStartup = toml::find_or<bool>(general, "checkCompatibilityOnStartup",
chooseHomeTab = toml::find_or<std::string>(general, "chooseHomeTab", "Release"); checkCompatibilityOnStartup);
chooseHomeTab = toml::find_or<std::string>(general, "chooseHomeTab", chooseHomeTab);
entry_count += general.size();
} }
if (data.contains("Input")) { if (data.contains("Input")) {
const toml::value& input = data.at("Input"); const toml::value& input = data.at("Input");
cursorState = toml::find_or<int>(input, "cursorState", HideCursorState::Idle); cursorState = toml::find_or<int>(input, "cursorState", cursorState);
cursorHideTimeout = toml::find_or<int>(input, "cursorHideTimeout", 5); cursorHideTimeout = toml::find_or<int>(input, "cursorHideTimeout", cursorHideTimeout);
useSpecialPad = toml::find_or<bool>(input, "useSpecialPad", false); useSpecialPad = toml::find_or<bool>(input, "useSpecialPad", useSpecialPad);
specialPadClass = toml::find_or<int>(input, "specialPadClass", 1); specialPadClass = toml::find_or<int>(input, "specialPadClass", specialPadClass);
isMotionControlsEnabled = toml::find_or<bool>(input, "isMotionControlsEnabled", true); isMotionControlsEnabled =
useUnifiedInputConfig = toml::find_or<bool>(input, "useUnifiedInputConfig", true); toml::find_or<bool>(input, "isMotionControlsEnabled", isMotionControlsEnabled);
useUnifiedInputConfig =
toml::find_or<bool>(input, "useUnifiedInputConfig", useUnifiedInputConfig);
entry_count += input.size();
} }
if (data.contains("GPU")) { if (data.contains("GPU")) {
@ -602,44 +628,52 @@ void load(const std::filesystem::path& path) {
screenWidth = toml::find_or<int>(gpu, "screenWidth", screenWidth); screenWidth = toml::find_or<int>(gpu, "screenWidth", screenWidth);
screenHeight = toml::find_or<int>(gpu, "screenHeight", screenHeight); screenHeight = toml::find_or<int>(gpu, "screenHeight", screenHeight);
isNullGpu = toml::find_or<bool>(gpu, "nullGpu", false); isNullGpu = toml::find_or<bool>(gpu, "nullGpu", isNullGpu);
shouldCopyGPUBuffers = toml::find_or<bool>(gpu, "copyGPUBuffers", false); shouldCopyGPUBuffers = toml::find_or<bool>(gpu, "copyGPUBuffers", shouldCopyGPUBuffers);
readbacksEnabled = toml::find_or<bool>(gpu, "readbacks", false); readbacksEnabled = toml::find_or<bool>(gpu, "readbacks", readbacksEnabled);
directMemoryAccessEnabled = toml::find_or<bool>(gpu, "directMemoryAccess", false); directMemoryAccessEnabled =
shouldDumpShaders = toml::find_or<bool>(gpu, "dumpShaders", false); toml::find_or<bool>(gpu, "directMemoryAccess", directMemoryAccessEnabled);
shouldPatchShaders = toml::find_or<bool>(gpu, "patchShaders", true); shouldDumpShaders = toml::find_or<bool>(gpu, "dumpShaders", shouldDumpShaders);
vblankDivider = toml::find_or<int>(gpu, "vblankDivider", 1); shouldPatchShaders = toml::find_or<bool>(gpu, "patchShaders", shouldPatchShaders);
isFullscreen = toml::find_or<bool>(gpu, "Fullscreen", false); vblankDivider = toml::find_or<int>(gpu, "vblankDivider", vblankDivider);
fullscreenMode = toml::find_or<std::string>(gpu, "FullscreenMode", "Windowed"); isFullscreen = toml::find_or<bool>(gpu, "Fullscreen", isFullscreen);
isHDRAllowed = toml::find_or<bool>(gpu, "allowHDR", false); fullscreenMode = toml::find_or<std::string>(gpu, "FullscreenMode", fullscreenMode);
isHDRAllowed = toml::find_or<bool>(gpu, "allowHDR", isHDRAllowed);
entry_count += gpu.size();
} }
if (data.contains("Vulkan")) { if (data.contains("Vulkan")) {
const toml::value& vk = data.at("Vulkan"); const toml::value& vk = data.at("Vulkan");
gpuId = toml::find_or<int>(vk, "gpuId", -1); gpuId = toml::find_or<int>(vk, "gpuId", gpuId);
vkValidation = toml::find_or<bool>(vk, "validation", false); vkValidation = toml::find_or<bool>(vk, "validation", vkValidation);
vkValidationSync = toml::find_or<bool>(vk, "validation_sync", false); vkValidationSync = toml::find_or<bool>(vk, "validation_sync", vkValidationSync);
vkValidationGpu = toml::find_or<bool>(vk, "validation_gpu", true); vkValidationGpu = toml::find_or<bool>(vk, "validation_gpu", vkValidationGpu);
vkCrashDiagnostic = toml::find_or<bool>(vk, "crashDiagnostic", false); vkCrashDiagnostic = toml::find_or<bool>(vk, "crashDiagnostic", vkCrashDiagnostic);
vkHostMarkers = toml::find_or<bool>(vk, "hostMarkers", false); vkHostMarkers = toml::find_or<bool>(vk, "hostMarkers", vkHostMarkers);
vkGuestMarkers = toml::find_or<bool>(vk, "guestMarkers", false); vkGuestMarkers = toml::find_or<bool>(vk, "guestMarkers", vkGuestMarkers);
rdocEnable = toml::find_or<bool>(vk, "rdocEnable", false); rdocEnable = toml::find_or<bool>(vk, "rdocEnable", rdocEnable);
entry_count += vk.size();
} }
if (data.contains("Debug")) { if (data.contains("Debug")) {
const toml::value& debug = data.at("Debug"); const toml::value& debug = data.at("Debug");
isDebugDump = toml::find_or<bool>(debug, "DebugDump", false); isDebugDump = toml::find_or<bool>(debug, "DebugDump", isDebugDump);
isSeparateLogFilesEnabled = toml::find_or<bool>(debug, "isSeparateLogFilesEnabled", false); isSeparateLogFilesEnabled =
isShaderDebug = toml::find_or<bool>(debug, "CollectShader", false); toml::find_or<bool>(debug, "isSeparateLogFilesEnabled", isSeparateLogFilesEnabled);
isFpsColor = toml::find_or<bool>(debug, "FPSColor", true); isShaderDebug = toml::find_or<bool>(debug, "CollectShader", isShaderDebug);
isFpsColor = toml::find_or<bool>(debug, "FPSColor", isFpsColor);
entry_count += debug.size();
} }
if (data.contains("GUI")) { if (data.contains("GUI")) {
const toml::value& gui = data.at("GUI"); const toml::value& gui = data.at("GUI");
load_game_size = toml::find_or<bool>(gui, "loadGameSizeEnabled", true); load_game_size = toml::find_or<bool>(gui, "loadGameSizeEnabled", load_game_size);
const auto install_dir_array = const auto install_dir_array =
toml::find_or<std::vector<std::u8string>>(gui, "installDirs", {}); toml::find_or<std::vector<std::u8string>>(gui, "installDirs", {});
@ -661,20 +695,32 @@ void load(const std::filesystem::path& path) {
{std::filesystem::path{install_dir_array[i]}, install_dirs_enabled[i]}); {std::filesystem::path{install_dir_array[i]}, install_dirs_enabled[i]});
} }
save_data_path = toml::find_fs_path_or(gui, "saveDataPath", {}); save_data_path = toml::find_fs_path_or(gui, "saveDataPath", save_data_path);
settings_addon_install_dir = toml::find_fs_path_or(gui, "addonInstallDir", {}); settings_addon_install_dir =
toml::find_fs_path_or(gui, "addonInstallDir", settings_addon_install_dir);
entry_count += gui.size();
} }
if (data.contains("Settings")) { if (data.contains("Settings")) {
const toml::value& settings = data.at("Settings"); const toml::value& settings = data.at("Settings");
m_language = toml::find_or<int>(settings, "consoleLanguage", m_language);
m_language = toml::find_or<int>(settings, "consoleLanguage", 1); entry_count += settings.size();
} }
if (data.contains("Keys")) { if (data.contains("Keys")) {
const toml::value& keys = data.at("Keys"); const toml::value& keys = data.at("Keys");
trophyKey = toml::find_or<std::string>(keys, "TrophyKey", ""); trophyKey = toml::find_or<std::string>(keys, "TrophyKey", trophyKey);
entry_count += keys.size();
}
// Run save after loading to generate any missing fields with default values.
if (entry_count != total_entries) {
fmt::print("Outdated config detected, updating config file.\n");
save(path);
} }
} }
@ -822,32 +868,50 @@ void save(const std::filesystem::path& path) {
} }
void setDefaultValues() { void setDefaultValues() {
isHDRAllowed = false; // General
isNeo = false; isNeo = false;
isDevKit = false; isDevKit = false;
isPSNSignedIn = false; isPSNSignedIn = false;
isFullscreen = false;
isTrophyPopupDisabled = false; isTrophyPopupDisabled = false;
enableDiscordRPC = true; trophyNotificationDuration = 6.0;
screenWidth = 1280; enableDiscordRPC = false;
screenHeight = 720;
logFilter = ""; logFilter = "";
logType = "sync"; logType = "sync";
userName = "shadPS4"; userName = "shadPS4";
chooseHomeTab = "General"; chooseHomeTab = "General";
cursorState = HideCursorState::Idle;
cursorHideTimeout = 5;
trophyNotificationDuration = 6.0;
useSpecialPad = false;
specialPadClass = 1;
isDebugDump = false;
isShaderDebug = false;
isShowSplash = false; isShowSplash = false;
isSideTrophy = "right"; isSideTrophy = "right";
compatibilityData = false;
checkCompatibilityOnStartup = false;
// Input
cursorState = HideCursorState::Idle;
cursorHideTimeout = 5;
useSpecialPad = false;
specialPadClass = 1;
isMotionControlsEnabled = true;
useUnifiedInputConfig = true;
overrideControllerColor = false;
controllerCustomColorRGB[0] = 0;
controllerCustomColorRGB[1] = 0;
controllerCustomColorRGB[2] = 255;
// GPU
screenWidth = 1280;
screenHeight = 720;
isNullGpu = false; isNullGpu = false;
shouldCopyGPUBuffers = false;
readbacksEnabled = false;
directMemoryAccessEnabled = false;
shouldDumpShaders = false; shouldDumpShaders = false;
shouldPatchShaders = false;
vblankDivider = 1; vblankDivider = 1;
isFullscreen = false;
fullscreenMode = "Windowed";
isHDRAllowed = false;
// Vulkan
gpuId = -1;
vkValidation = false; vkValidation = false;
vkValidationSync = false; vkValidationSync = false;
vkValidationGpu = false; vkValidationGpu = false;
@ -855,10 +919,18 @@ void setDefaultValues() {
vkHostMarkers = false; vkHostMarkers = false;
vkGuestMarkers = false; vkGuestMarkers = false;
rdocEnable = false; rdocEnable = false;
// Debug
isDebugDump = false;
isShaderDebug = false;
isSeparateLogFilesEnabled = false;
isFpsColor = true;
// GUI
load_game_size = true;
// Settings
m_language = 1; m_language = 1;
gpuId = -1;
compatibilityData = false;
checkCompatibilityOnStartup = false;
} }
constexpr std::string_view GetDefaultKeyboardConfig() { constexpr std::string_view GetDefaultKeyboardConfig() {

View file

@ -358,9 +358,17 @@ enum PosixPageProtection {
[[nodiscard]] constexpr PosixPageProtection ToPosixProt(Core::MemoryProt prot) { [[nodiscard]] constexpr PosixPageProtection ToPosixProt(Core::MemoryProt prot) {
if (True(prot & Core::MemoryProt::CpuReadWrite) || if (True(prot & Core::MemoryProt::CpuReadWrite) ||
True(prot & Core::MemoryProt::GpuReadWrite)) { True(prot & Core::MemoryProt::GpuReadWrite)) {
return PAGE_READWRITE; if (True(prot & Core::MemoryProt::CpuExec)) {
return PAGE_EXECUTE_READWRITE;
} else {
return PAGE_READWRITE;
}
} else if (True(prot & Core::MemoryProt::CpuRead) || True(prot & Core::MemoryProt::GpuRead)) { } else if (True(prot & Core::MemoryProt::CpuRead) || True(prot & Core::MemoryProt::GpuRead)) {
return PAGE_READONLY; if (True(prot & Core::MemoryProt::CpuExec)) {
return PAGE_EXECUTE_READ;
} else {
return PAGE_READONLY;
}
} else { } else {
return PAGE_NOACCESS; return PAGE_NOACCESS;
} }

View file

@ -573,11 +573,12 @@ void* PS4_SYSV_ABI posix_mmap(void* addr, u64 len, s32 prot, s32 flags, s32 fd,
auto* memory = Core::Memory::Instance(); auto* memory = Core::Memory::Instance();
const auto mem_prot = static_cast<Core::MemoryProt>(prot); const auto mem_prot = static_cast<Core::MemoryProt>(prot);
const auto mem_flags = static_cast<Core::MemoryMapFlags>(flags); const auto mem_flags = static_cast<Core::MemoryMapFlags>(flags);
const auto is_exec = True(mem_prot & Core::MemoryProt::CpuExec);
s32 result = ORBIS_OK; s32 result = ORBIS_OK;
if (fd == -1) { if (fd == -1) {
result = memory->MapMemory(&addr_out, std::bit_cast<VAddr>(addr), len, mem_prot, mem_flags, result = memory->MapMemory(&addr_out, std::bit_cast<VAddr>(addr), len, mem_prot, mem_flags,
Core::VMAType::Flexible); Core::VMAType::Flexible, "anon", is_exec);
} else { } else {
result = memory->MapFile(&addr_out, std::bit_cast<VAddr>(addr), len, mem_prot, mem_flags, result = memory->MapFile(&addr_out, std::bit_cast<VAddr>(addr), len, mem_prot, mem_flags,
fd, phys_addr); fd, phys_addr);
@ -711,6 +712,7 @@ void RegisterMemory(Core::Loader::SymbolsResolver* sym) {
sceKernelConfiguredFlexibleMemorySize); sceKernelConfiguredFlexibleMemorySize);
LIB_FUNCTION("vSMAm3cxYTY", "libkernel", 1, "libkernel", 1, 1, sceKernelMprotect); LIB_FUNCTION("vSMAm3cxYTY", "libkernel", 1, "libkernel", 1, 1, sceKernelMprotect);
LIB_FUNCTION("YQOfxL4QfeU", "libkernel", 1, "libkernel", 1, 1, posix_mprotect);
LIB_FUNCTION("YQOfxL4QfeU", "libScePosix", 1, "libkernel", 1, 1, posix_mprotect); LIB_FUNCTION("YQOfxL4QfeU", "libScePosix", 1, "libkernel", 1, 1, posix_mprotect);
LIB_FUNCTION("9bfdLIyuwCY", "libkernel", 1, "libkernel", 1, 1, sceKernelMtypeprotect); LIB_FUNCTION("9bfdLIyuwCY", "libkernel", 1, "libkernel", 1, 1, sceKernelMtypeprotect);

View file

@ -342,7 +342,7 @@ s32 MemoryManager::MapMemory(void** out_addr, VAddr virtual_addr, u64 size, Memo
} }
} }
// Limit the minumum address to SystemManagedVirtualBase to prevent hardware-specific issues. // Limit the minimum address to SystemManagedVirtualBase to prevent hardware-specific issues.
VAddr mapped_addr = (virtual_addr == 0) ? impl.SystemManagedVirtualBase() : virtual_addr; VAddr mapped_addr = (virtual_addr == 0) ? impl.SystemManagedVirtualBase() : virtual_addr;
// Fixed mapping means the virtual address must exactly match the provided one. // Fixed mapping means the virtual address must exactly match the provided one.
@ -631,6 +631,9 @@ s64 MemoryManager::ProtectBytes(VAddr addr, VirtualMemoryArea vma_base, u64 size
if (True(prot & MemoryProt::CpuReadWrite)) { if (True(prot & MemoryProt::CpuReadWrite)) {
perms |= Core::MemoryPermission::ReadWrite; perms |= Core::MemoryPermission::ReadWrite;
} }
if (True(prot & MemoryProt::CpuExec)) {
perms |= Core::MemoryPermission::Execute;
}
if (True(prot & MemoryProt::GpuRead)) { if (True(prot & MemoryProt::GpuRead)) {
perms |= Core::MemoryPermission::Read; perms |= Core::MemoryPermission::Read;
} }
@ -650,9 +653,9 @@ s32 MemoryManager::Protect(VAddr addr, u64 size, MemoryProt prot) {
std::scoped_lock lk{mutex}; std::scoped_lock lk{mutex};
// Validate protection flags // Validate protection flags
constexpr static MemoryProt valid_flags = MemoryProt::NoAccess | MemoryProt::CpuRead | constexpr static MemoryProt valid_flags =
MemoryProt::CpuReadWrite | MemoryProt::GpuRead | MemoryProt::NoAccess | MemoryProt::CpuRead | MemoryProt::CpuReadWrite |
MemoryProt::GpuWrite | MemoryProt::GpuReadWrite; MemoryProt::CpuExec | MemoryProt::GpuRead | MemoryProt::GpuWrite | MemoryProt::GpuReadWrite;
MemoryProt invalid_flags = prot & ~valid_flags; MemoryProt invalid_flags = prot & ~valid_flags;
if (invalid_flags != MemoryProt::NoAccess) { if (invalid_flags != MemoryProt::NoAccess) {

View file

@ -31,6 +31,7 @@ enum class MemoryProt : u32 {
NoAccess = 0, NoAccess = 0,
CpuRead = 1, CpuRead = 1,
CpuReadWrite = 2, CpuReadWrite = 2,
CpuExec = 4,
GpuRead = 16, GpuRead = 16,
GpuWrite = 32, GpuWrite = 32,
GpuReadWrite = 48, GpuReadWrite = 48,

View file

@ -527,71 +527,71 @@
</message> </message>
<message> <message>
<source>unmapped</source> <source>unmapped</source>
<translation type="unfinished">unmapped</translation> <translation>sense assignar</translation>
</message> </message>
<message> <message>
<source>L1</source> <source>L1</source>
<translation type="unfinished">L1</translation> <translation>L1</translation>
</message> </message>
<message> <message>
<source>R1</source> <source>R1</source>
<translation type="unfinished">R1</translation> <translation>R1</translation>
</message> </message>
<message> <message>
<source>L2</source> <source>L2</source>
<translation type="unfinished">L2</translation> <translation>L2</translation>
</message> </message>
<message> <message>
<source>Options</source> <source>Options</source>
<translation type="unfinished">Options</translation> <translation>Opcions</translation>
</message> </message>
<message> <message>
<source>R2</source> <source>R2</source>
<translation type="unfinished">R2</translation> <translation>R2</translation>
</message> </message>
<message> <message>
<source>Touchpad Left</source> <source>Touchpad Left</source>
<translation type="unfinished">Touchpad Left</translation> <translation>Touchpad esquerra</translation>
</message> </message>
<message> <message>
<source>Touchpad Center</source> <source>Touchpad Center</source>
<translation type="unfinished">Touchpad Center</translation> <translation>Touchpad centre</translation>
</message> </message>
<message> <message>
<source>Touchpad Right</source> <source>Touchpad Right</source>
<translation type="unfinished">Touchpad Right</translation> <translation>Touchpad dreta</translation>
</message> </message>
<message> <message>
<source>Triangle</source> <source>Triangle</source>
<translation type="unfinished">Triangle</translation> <translation>Triangle</translation>
</message> </message>
<message> <message>
<source>Square</source> <source>Square</source>
<translation type="unfinished">Square</translation> <translation>Quadrat</translation>
</message> </message>
<message> <message>
<source>Circle</source> <source>Circle</source>
<translation type="unfinished">Circle</translation> <translation>Cercle</translation>
</message> </message>
<message> <message>
<source>Cross</source> <source>Cross</source>
<translation type="unfinished">Cross</translation> <translation>Creu</translation>
</message> </message>
<message> <message>
<source>Cannot bind any unique input more than once. Duplicate inputs mapped to the following buttons: <source>Cannot bind any unique input more than once. Duplicate inputs mapped to the following buttons:
%1</source> %1</source>
<translation type="unfinished">Cannot bind any unique input more than once. Duplicate inputs mapped to the following buttons: <translation>No es pot assignar una entrada més d'una vegada. S'han assignat de manera duplicada pels següents botons:
%1</translation> %1</translation>
</message> </message>
<message> <message>
<source>Press a button</source> <source>Press a button</source>
<translation type="unfinished">Press a button</translation> <translation>Clica un botó</translation>
</message> </message>
<message> <message>
<source>Move analog stick</source> <source>Move analog stick</source>
<translation type="unfinished">Move analog stick</translation> <translation>Mou la palanca</translation>
</message> </message>
</context> </context>
<context> <context>

View file

@ -527,71 +527,69 @@
</message> </message>
<message> <message>
<source>unmapped</source> <source>unmapped</source>
<translation type="unfinished">unmapped</translation> <translation>sin vincular</translation>
</message> </message>
<message> <message>
<source>L1</source> <source>L1</source>
<translation type="unfinished">L1</translation> <translation>L1</translation>
</message> </message>
<message> <message>
<source>R1</source> <source>R1</source>
<translation type="unfinished">R1</translation> <translation>R1</translation>
</message> </message>
<message> <message>
<source>L2</source> <source>L2</source>
<translation type="unfinished">L2</translation> <translation>L2</translation>
</message> </message>
<message> <message>
<source>Options</source> <source>Options</source>
<translation type="unfinished">Options</translation> <translation>Opciones</translation>
</message> </message>
<message> <message>
<source>R2</source> <source>R2</source>
<translation type="unfinished">R2</translation> <translation>R2</translation>
</message> </message>
<message> <message>
<source>Touchpad Left</source> <source>Touchpad Left</source>
<translation type="unfinished">Touchpad Left</translation> <translation>Izquierda del Touchpad</translation>
</message> </message>
<message> <message>
<source>Touchpad Center</source> <source>Touchpad Center</source>
<translation type="unfinished">Touchpad Center</translation> <translation>Centro del Touchpad</translation>
</message> </message>
<message> <message>
<source>Touchpad Right</source> <source>Touchpad Right</source>
<translation type="unfinished">Touchpad Right</translation> <translation>Derecha del Touchpad</translation>
</message> </message>
<message> <message>
<source>Triangle</source> <source>Triangle</source>
<translation type="unfinished">Triangle</translation> <translation>Triángulo</translation>
</message> </message>
<message> <message>
<source>Square</source> <source>Square</source>
<translation type="unfinished">Square</translation> <translation>Cuadrado</translation>
</message> </message>
<message> <message>
<source>Circle</source> <source>Circle</source>
<translation type="unfinished">Circle</translation> <translation>Círculo</translation>
</message> </message>
<message> <message>
<source>Cross</source> <source>Cross</source>
<translation type="unfinished">Cross</translation> <translation>Equis</translation>
</message> </message>
<message> <message>
<source>Cannot bind any unique input more than once. Duplicate inputs mapped to the following buttons: <source>Cannot bind any unique input more than once. Duplicate inputs mapped to the following buttons:
%1</source> %1</source>
<translation type="unfinished">Cannot bind any unique input more than once. Duplicate inputs mapped to the following buttons: <translation>No se puede asignar un control único más de una vez. Controles duplicados asignados a los siguientes botones</translation>
%1</translation>
</message> </message>
<message> <message>
<source>Press a button</source> <source>Press a button</source>
<translation type="unfinished">Press a button</translation> <translation>Presiona un botón</translation>
</message> </message>
<message> <message>
<source>Move analog stick</source> <source>Move analog stick</source>
<translation type="unfinished">Move analog stick</translation> <translation>Mueve el stick analógico</translation>
</message> </message>
</context> </context>
<context> <context>
@ -778,7 +776,7 @@
</message> </message>
<message> <message>
<source>Favorite</source> <source>Favorite</source>
<translation type="unfinished">Favorite</translation> <translation>Favorito</translation>
</message> </message>
</context> </context>
<context> <context>
@ -984,11 +982,11 @@
</message> </message>
<message> <message>
<source>Remove from Favorites</source> <source>Remove from Favorites</source>
<translation type="unfinished">Remove from Favorites</translation> <translation>Eliminar de Favoritos</translation>
</message> </message>
<message> <message>
<source>Add to Favorites</source> <source>Add to Favorites</source>
<translation type="unfinished">Add to Favorites</translation> <translation>Añadir a favoritos</translation>
</message> </message>
</context> </context>
<context> <context>
@ -1220,21 +1218,19 @@
<source>Cannot bind any unique input more than once. Duplicate inputs mapped to the following buttons: <source>Cannot bind any unique input more than once. Duplicate inputs mapped to the following buttons:
%1</source> %1</source>
<translation type="unfinished">Cannot bind any unique input more than once. Duplicate inputs mapped to the following buttons: <translation>No se puede asignar un control único más de una vez. Controles duplicados asignados a los siguientes botones:</translation>
%1</translation>
</message> </message>
<message> <message>
<source>Touchpad Left</source> <source>Touchpad Left</source>
<translation type="unfinished">Touchpad Left</translation> <translation>Izquierda del Touchpad</translation>
</message> </message>
<message> <message>
<source>Touchpad Center</source> <source>Touchpad Center</source>
<translation type="unfinished">Touchpad Center</translation> <translation>Centro del Touchpad</translation>
</message> </message>
<message> <message>
<source>Touchpad Right</source> <source>Touchpad Right</source>
<translation type="unfinished">Touchpad Right</translation> <translation>Derecha del Touchpad</translation>
</message> </message>
</context> </context>
<context> <context>

View file

@ -527,71 +527,71 @@
</message> </message>
<message> <message>
<source>unmapped</source> <source>unmapped</source>
<translation type="unfinished">unmapped</translation> <translation>non mappato</translation>
</message> </message>
<message> <message>
<source>L1</source> <source>L1</source>
<translation type="unfinished">L1</translation> <translation>L1</translation>
</message> </message>
<message> <message>
<source>R1</source> <source>R1</source>
<translation type="unfinished">R1</translation> <translation>R1</translation>
</message> </message>
<message> <message>
<source>L2</source> <source>L2</source>
<translation type="unfinished">L2</translation> <translation>L2</translation>
</message> </message>
<message> <message>
<source>Options</source> <source>Options</source>
<translation type="unfinished">Options</translation> <translation>Opzioni</translation>
</message> </message>
<message> <message>
<source>R2</source> <source>R2</source>
<translation type="unfinished">R2</translation> <translation>R2</translation>
</message> </message>
<message> <message>
<source>Touchpad Left</source> <source>Touchpad Left</source>
<translation type="unfinished">Touchpad Left</translation> <translation>Touchpad Sinistra</translation>
</message> </message>
<message> <message>
<source>Touchpad Center</source> <source>Touchpad Center</source>
<translation type="unfinished">Touchpad Center</translation> <translation>Touchpad Centrale</translation>
</message> </message>
<message> <message>
<source>Touchpad Right</source> <source>Touchpad Right</source>
<translation type="unfinished">Touchpad Right</translation> <translation>Touchpad Destra</translation>
</message> </message>
<message> <message>
<source>Triangle</source> <source>Triangle</source>
<translation type="unfinished">Triangle</translation> <translation>Triangolo</translation>
</message> </message>
<message> <message>
<source>Square</source> <source>Square</source>
<translation type="unfinished">Square</translation> <translation>Quadrato</translation>
</message> </message>
<message> <message>
<source>Circle</source> <source>Circle</source>
<translation type="unfinished">Circle</translation> <translation>Cerchio</translation>
</message> </message>
<message> <message>
<source>Cross</source> <source>Cross</source>
<translation type="unfinished">Cross</translation> <translation>Croce</translation>
</message> </message>
<message> <message>
<source>Cannot bind any unique input more than once. Duplicate inputs mapped to the following buttons: <source>Cannot bind any unique input more than once. Duplicate inputs mapped to the following buttons:
%1</source> %1</source>
<translation type="unfinished">Cannot bind any unique input more than once. Duplicate inputs mapped to the following buttons: <translation>Non è possibile associare più di una volta qualsiasi input univoco. Sono presenti input duplicati mappati ai seguenti pulsanti:
%1</translation> %1</translation>
</message> </message>
<message> <message>
<source>Press a button</source> <source>Press a button</source>
<translation type="unfinished">Press a button</translation> <translation>Premi un pulsante</translation>
</message> </message>
<message> <message>
<source>Move analog stick</source> <source>Move analog stick</source>
<translation type="unfinished">Move analog stick</translation> <translation>Muovi levetta analogica</translation>
</message> </message>
</context> </context>
<context> <context>
@ -778,7 +778,7 @@
</message> </message>
<message> <message>
<source>Favorite</source> <source>Favorite</source>
<translation type="unfinished">Favorite</translation> <translation>Preferiti</translation>
</message> </message>
</context> </context>
<context> <context>
@ -984,11 +984,11 @@
</message> </message>
<message> <message>
<source>Remove from Favorites</source> <source>Remove from Favorites</source>
<translation type="unfinished">Remove from Favorites</translation> <translation>Rimuovi dai Preferiti</translation>
</message> </message>
<message> <message>
<source>Add to Favorites</source> <source>Add to Favorites</source>
<translation type="unfinished">Add to Favorites</translation> <translation>Aggiungi ai preferiti</translation>
</message> </message>
</context> </context>
<context> <context>
@ -1226,15 +1226,15 @@
</message> </message>
<message> <message>
<source>Touchpad Left</source> <source>Touchpad Left</source>
<translation type="unfinished">Touchpad Left</translation> <translation>Touchpad Sinistra</translation>
</message> </message>
<message> <message>
<source>Touchpad Center</source> <source>Touchpad Center</source>
<translation type="unfinished">Touchpad Center</translation> <translation>Touchpad Centrale</translation>
</message> </message>
<message> <message>
<source>Touchpad Right</source> <source>Touchpad Right</source>
<translation type="unfinished">Touchpad Right</translation> <translation>Touchpad Destra</translation>
</message> </message>
</context> </context>
<context> <context>

View file

@ -495,7 +495,7 @@
</message> </message>
<message> <message>
<source>Override Lightbar Color</source> <source>Override Lightbar Color</source>
<translation>Overstyr farge lyslinja</translation> <translation>Overstyr farge lyslisten</translation>
</message> </message>
<message> <message>
<source>Override Color</source> <source>Override Color</source>
@ -527,71 +527,71 @@
</message> </message>
<message> <message>
<source>unmapped</source> <source>unmapped</source>
<translation type="unfinished">unmapped</translation> <translation>Ikke tildelt</translation>
</message> </message>
<message> <message>
<source>L1</source> <source>L1</source>
<translation type="unfinished">L1</translation> <translation>L1</translation>
</message> </message>
<message> <message>
<source>R1</source> <source>R1</source>
<translation type="unfinished">R1</translation> <translation>R1</translation>
</message> </message>
<message> <message>
<source>L2</source> <source>L2</source>
<translation type="unfinished">L2</translation> <translation>L2</translation>
</message> </message>
<message> <message>
<source>Options</source> <source>Options</source>
<translation type="unfinished">Options</translation> <translation>Options</translation>
</message> </message>
<message> <message>
<source>R2</source> <source>R2</source>
<translation type="unfinished">R2</translation> <translation>R2</translation>
</message> </message>
<message> <message>
<source>Touchpad Left</source> <source>Touchpad Left</source>
<translation type="unfinished">Touchpad Left</translation> <translation>Venstre berøringsplate</translation>
</message> </message>
<message> <message>
<source>Touchpad Center</source> <source>Touchpad Center</source>
<translation type="unfinished">Touchpad Center</translation> <translation>Midt berøringsplate</translation>
</message> </message>
<message> <message>
<source>Touchpad Right</source> <source>Touchpad Right</source>
<translation type="unfinished">Touchpad Right</translation> <translation>Høyre berøringsplate</translation>
</message> </message>
<message> <message>
<source>Triangle</source> <source>Triangle</source>
<translation type="unfinished">Triangle</translation> <translation>Triangel</translation>
</message> </message>
<message> <message>
<source>Square</source> <source>Square</source>
<translation type="unfinished">Square</translation> <translation>Firkant</translation>
</message> </message>
<message> <message>
<source>Circle</source> <source>Circle</source>
<translation type="unfinished">Circle</translation> <translation>Sirkel</translation>
</message> </message>
<message> <message>
<source>Cross</source> <source>Cross</source>
<translation type="unfinished">Cross</translation> <translation>Kryss</translation>
</message> </message>
<message> <message>
<source>Cannot bind any unique input more than once. Duplicate inputs mapped to the following buttons: <source>Cannot bind any unique input more than once. Duplicate inputs mapped to the following buttons:
%1</source> %1</source>
<translation type="unfinished">Cannot bind any unique input more than once. Duplicate inputs mapped to the following buttons: <translation>Kan ikke tildele samme inndata mer enn én gang. Dupliserte inndata tildeles følgende taster:
%1</translation> %1</translation>
</message> </message>
<message> <message>
<source>Press a button</source> <source>Press a button</source>
<translation type="unfinished">Press a button</translation> <translation>Trykk en knapp</translation>
</message> </message>
<message> <message>
<source>Move analog stick</source> <source>Move analog stick</source>
<translation type="unfinished">Move analog stick</translation> <translation>Flytt analog stikke</translation>
</message> </message>
</context> </context>
<context> <context>
@ -1226,15 +1226,15 @@
</message> </message>
<message> <message>
<source>Touchpad Left</source> <source>Touchpad Left</source>
<translation>Berøringsplate venstre</translation> <translation>Venstre berøringsplate</translation>
</message> </message>
<message> <message>
<source>Touchpad Center</source> <source>Touchpad Center</source>
<translation>Berøringsplate midten</translation> <translation>Midt berøringsplate</translation>
</message> </message>
<message> <message>
<source>Touchpad Right</source> <source>Touchpad Right</source>
<translation>Berøringsplate høyre</translation> <translation>Høyre berøringsplate</translation>
</message> </message>
</context> </context>
<context> <context>

View file

@ -555,7 +555,7 @@
</message> </message>
<message> <message>
<source>Touchpad Center</source> <source>Touchpad Center</source>
<translation type="unfinished">Touchpad Center</translation> <translation>Centro do Touchpad</translation>
</message> </message>
<message> <message>
<source>Touchpad Right</source> <source>Touchpad Right</source>
@ -571,11 +571,11 @@
</message> </message>
<message> <message>
<source>Circle</source> <source>Circle</source>
<translation type="unfinished">Circle</translation> <translation>Círculo</translation>
</message> </message>
<message> <message>
<source>Cross</source> <source>Cross</source>
<translation type="unfinished">Cross</translation> <translation>Cruz</translation>
</message> </message>
<message> <message>
<source>Cannot bind any unique input more than once. Duplicate inputs mapped to the following buttons: <source>Cannot bind any unique input more than once. Duplicate inputs mapped to the following buttons:
@ -591,7 +591,7 @@
</message> </message>
<message> <message>
<source>Move analog stick</source> <source>Move analog stick</source>
<translation type="unfinished">Move analog stick</translation> <translation>Mover analógico</translation>
</message> </message>
</context> </context>
<context> <context>

View file

@ -591,7 +591,7 @@
</message> </message>
<message> <message>
<source>Move analog stick</source> <source>Move analog stick</source>
<translation type="unfinished">Move analog stick</translation> <translation>Двиньте аналоговый стик</translation>
</message> </message>
</context> </context>
<context> <context>

View file

@ -527,71 +527,71 @@
</message> </message>
<message> <message>
<source>unmapped</source> <source>unmapped</source>
<translation type="unfinished">unmapped</translation> <translation>pacaktuar</translation>
</message> </message>
<message> <message>
<source>L1</source> <source>L1</source>
<translation type="unfinished">L1</translation> <translation>L1</translation>
</message> </message>
<message> <message>
<source>R1</source> <source>R1</source>
<translation type="unfinished">R1</translation> <translation>R1</translation>
</message> </message>
<message> <message>
<source>L2</source> <source>L2</source>
<translation type="unfinished">L2</translation> <translation>L2</translation>
</message> </message>
<message> <message>
<source>Options</source> <source>Options</source>
<translation type="unfinished">Options</translation> <translation>Options</translation>
</message> </message>
<message> <message>
<source>R2</source> <source>R2</source>
<translation type="unfinished">R2</translation> <translation>R2</translation>
</message> </message>
<message> <message>
<source>Touchpad Left</source> <source>Touchpad Left</source>
<translation type="unfinished">Touchpad Left</translation> <translation>Paneli me Prekje Majtas</translation>
</message> </message>
<message> <message>
<source>Touchpad Center</source> <source>Touchpad Center</source>
<translation type="unfinished">Touchpad Center</translation> <translation>Paneli me Prekje Qendër</translation>
</message> </message>
<message> <message>
<source>Touchpad Right</source> <source>Touchpad Right</source>
<translation type="unfinished">Touchpad Right</translation> <translation>Paneli me Prekje Djathtas</translation>
</message> </message>
<message> <message>
<source>Triangle</source> <source>Triangle</source>
<translation type="unfinished">Triangle</translation> <translation>Trekëndësh</translation>
</message> </message>
<message> <message>
<source>Square</source> <source>Square</source>
<translation type="unfinished">Square</translation> <translation>Katror</translation>
</message> </message>
<message> <message>
<source>Circle</source> <source>Circle</source>
<translation type="unfinished">Circle</translation> <translation>Rreth</translation>
</message> </message>
<message> <message>
<source>Cross</source> <source>Cross</source>
<translation type="unfinished">Cross</translation> <translation>Kryq</translation>
</message> </message>
<message> <message>
<source>Cannot bind any unique input more than once. Duplicate inputs mapped to the following buttons: <source>Cannot bind any unique input more than once. Duplicate inputs mapped to the following buttons:
%1</source> %1</source>
<translation type="unfinished">Cannot bind any unique input more than once. Duplicate inputs mapped to the following buttons: <translation>Nuk mund caktohet e njëjta hyrje unike shumë se një herë. Hyrjet e dyfishta janë caktuar butonët e mëposhtëm:
%1</translation> %1</translation>
</message> </message>
<message> <message>
<source>Press a button</source> <source>Press a button</source>
<translation type="unfinished">Press a button</translation> <translation>Shtyp një buton</translation>
</message> </message>
<message> <message>
<source>Move analog stick</source> <source>Move analog stick</source>
<translation type="unfinished">Move analog stick</translation> <translation>Lëviz levën</translation>
</message> </message>
</context> </context>
<context> <context>

View file

@ -527,71 +527,71 @@
</message> </message>
<message> <message>
<source>unmapped</source> <source>unmapped</source>
<translation type="unfinished">unmapped</translation> <translation>omappad</translation>
</message> </message>
<message> <message>
<source>L1</source> <source>L1</source>
<translation type="unfinished">L1</translation> <translation>L1</translation>
</message> </message>
<message> <message>
<source>R1</source> <source>R1</source>
<translation type="unfinished">R1</translation> <translation>R1</translation>
</message> </message>
<message> <message>
<source>L2</source> <source>L2</source>
<translation type="unfinished">L2</translation> <translation>L2</translation>
</message> </message>
<message> <message>
<source>Options</source> <source>Options</source>
<translation type="unfinished">Options</translation> <translation>Options</translation>
</message> </message>
<message> <message>
<source>R2</source> <source>R2</source>
<translation type="unfinished">R2</translation> <translation>R2</translation>
</message> </message>
<message> <message>
<source>Touchpad Left</source> <source>Touchpad Left</source>
<translation type="unfinished">Touchpad Left</translation> <translation>Pekplatta vänster</translation>
</message> </message>
<message> <message>
<source>Touchpad Center</source> <source>Touchpad Center</source>
<translation type="unfinished">Touchpad Center</translation> <translation>Pekplatta i mitten</translation>
</message> </message>
<message> <message>
<source>Touchpad Right</source> <source>Touchpad Right</source>
<translation type="unfinished">Touchpad Right</translation> <translation>Pekplatta höger</translation>
</message> </message>
<message> <message>
<source>Triangle</source> <source>Triangle</source>
<translation type="unfinished">Triangle</translation> <translation>Triangel</translation>
</message> </message>
<message> <message>
<source>Square</source> <source>Square</source>
<translation type="unfinished">Square</translation> <translation>Fyrkant</translation>
</message> </message>
<message> <message>
<source>Circle</source> <source>Circle</source>
<translation type="unfinished">Circle</translation> <translation>Cirkel</translation>
</message> </message>
<message> <message>
<source>Cross</source> <source>Cross</source>
<translation type="unfinished">Cross</translation> <translation>Kors</translation>
</message> </message>
<message> <message>
<source>Cannot bind any unique input more than once. Duplicate inputs mapped to the following buttons: <source>Cannot bind any unique input more than once. Duplicate inputs mapped to the following buttons:
%1</source> %1</source>
<translation type="unfinished">Cannot bind any unique input more than once. Duplicate inputs mapped to the following buttons: <translation>Det går inte att binda samma unika inmatning mer än en gång. Dubbletta inmatningar är mappade till följande knappar:
%1</translation> %1</translation>
</message> </message>
<message> <message>
<source>Press a button</source> <source>Press a button</source>
<translation type="unfinished">Press a button</translation> <translation>Tryck en knapp</translation>
</message> </message>
<message> <message>
<source>Move analog stick</source> <source>Move analog stick</source>
<translation type="unfinished">Move analog stick</translation> <translation>Rör analog spak</translation>
</message> </message>
</context> </context>
<context> <context>

View file

@ -527,71 +527,71 @@
</message> </message>
<message> <message>
<source>unmapped</source> <source>unmapped</source>
<translation type="unfinished">unmapped</translation> <translation></translation>
</message> </message>
<message> <message>
<source>L1</source> <source>L1</source>
<translation type="unfinished">L1</translation> <translation>L1</translation>
</message> </message>
<message> <message>
<source>R1</source> <source>R1</source>
<translation type="unfinished">R1</translation> <translation>R1</translation>
</message> </message>
<message> <message>
<source>L2</source> <source>L2</source>
<translation type="unfinished">L2</translation> <translation>L2</translation>
</message> </message>
<message> <message>
<source>Options</source> <source>Options</source>
<translation type="unfinished">Options</translation> <translation></translation>
</message> </message>
<message> <message>
<source>R2</source> <source>R2</source>
<translation type="unfinished">R2</translation> <translation>R2</translation>
</message> </message>
<message> <message>
<source>Touchpad Left</source> <source>Touchpad Left</source>
<translation type="unfinished">Touchpad Left</translation> <translation></translation>
</message> </message>
<message> <message>
<source>Touchpad Center</source> <source>Touchpad Center</source>
<translation type="unfinished">Touchpad Center</translation> <translation></translation>
</message> </message>
<message> <message>
<source>Touchpad Right</source> <source>Touchpad Right</source>
<translation type="unfinished">Touchpad Right</translation> <translation></translation>
</message> </message>
<message> <message>
<source>Triangle</source> <source>Triangle</source>
<translation type="unfinished">Triangle</translation> <translation></translation>
</message> </message>
<message> <message>
<source>Square</source> <source>Square</source>
<translation type="unfinished">Square</translation> <translation></translation>
</message> </message>
<message> <message>
<source>Circle</source> <source>Circle</source>
<translation type="unfinished">Circle</translation> <translation></translation>
</message> </message>
<message> <message>
<source>Cross</source> <source>Cross</source>
<translation type="unfinished">Cross</translation> <translation></translation>
</message> </message>
<message> <message>
<source>Cannot bind any unique input more than once. Duplicate inputs mapped to the following buttons: <source>Cannot bind any unique input more than once. Duplicate inputs mapped to the following buttons:
%1</source> %1</source>
<translation type="unfinished">Cannot bind any unique input more than once. Duplicate inputs mapped to the following buttons: <translation>
%1</translation> %1</translation>
</message> </message>
<message> <message>
<source>Press a button</source> <source>Press a button</source>
<translation type="unfinished">Press a button</translation> <translation></translation>
</message> </message>
<message> <message>
<source>Move analog stick</source> <source>Move analog stick</source>
<translation type="unfinished">Move analog stick</translation> <translation></translation>
</message> </message>
</context> </context>
<context> <context>

View file

@ -353,7 +353,7 @@ Id EmitFPIsInf32(EmitContext& ctx, Id value);
Id EmitFPIsInf64(EmitContext& ctx, Id value); Id EmitFPIsInf64(EmitContext& ctx, Id value);
Id EmitIAdd32(EmitContext& ctx, IR::Inst* inst, Id a, Id b); Id EmitIAdd32(EmitContext& ctx, IR::Inst* inst, Id a, Id b);
Id EmitIAdd64(EmitContext& ctx, Id a, Id b); Id EmitIAdd64(EmitContext& ctx, Id a, Id b);
Id EmitIAddCary32(EmitContext& ctx, Id a, Id b); Id EmitIAddCarry32(EmitContext& ctx, Id a, Id b);
Id EmitISub32(EmitContext& ctx, Id a, Id b); Id EmitISub32(EmitContext& ctx, Id a, Id b);
Id EmitISub64(EmitContext& ctx, Id a, Id b); Id EmitISub64(EmitContext& ctx, Id a, Id b);
Id EmitSMulHi(EmitContext& ctx, Id a, Id b); Id EmitSMulHi(EmitContext& ctx, Id a, Id b);

View file

@ -60,7 +60,7 @@ Id EmitIAdd64(EmitContext& ctx, Id a, Id b) {
return ctx.OpIAdd(ctx.U64, a, b); return ctx.OpIAdd(ctx.U64, a, b);
} }
Id EmitIAddCary32(EmitContext& ctx, Id a, Id b) { Id EmitIAddCarry32(EmitContext& ctx, Id a, Id b) {
return ctx.OpIAddCarry(ctx.full_result_u32x2, a, b); return ctx.OpIAddCarry(ctx.full_result_u32x2, a, b);
} }

View file

@ -623,12 +623,15 @@ void Translator::V_ADDC_U32(const GcnInst& inst) {
const IR::U32 src0{GetSrc(inst.src[0])}; const IR::U32 src0{GetSrc(inst.src[0])};
const IR::U32 src1{GetSrc(inst.src[1])}; const IR::U32 src1{GetSrc(inst.src[1])};
const IR::U32 carry{GetCarryIn(inst)}; const IR::U32 carry{GetCarryIn(inst)};
const IR::U32 result{ir.IAdd(ir.IAdd(src0, src1), carry)}; const IR::Value tmp1{ir.IAddCarry(src0, src1)};
SetDst(inst.dst[0], result); const IR::U32 result1{ir.CompositeExtract(tmp1, 0)};
const IR::U32 carry_out1{ir.CompositeExtract(tmp1, 1)};
const IR::Value tmp2{ir.IAddCarry(result1, carry)};
const IR::U32 result2{ir.CompositeExtract(tmp2, 0)};
const IR::U32 carry_out2{ir.CompositeExtract(tmp2, 1)};
SetDst(inst.dst[0], result2);
const IR::U1 less_src0{ir.ILessThan(result, src0, false)}; const IR::U1 did_overflow{ir.INotEqual(ir.BitwiseOr(carry_out1, carry_out2), ir.Imm32(0))};
const IR::U1 less_src1{ir.ILessThan(result, src1, false)};
const IR::U1 did_overflow{ir.LogicalOr(less_src0, less_src1)};
SetCarryOut(inst, did_overflow); SetCarryOut(inst, did_overflow);
} }

View file

@ -1424,13 +1424,13 @@ U32U64 IREmitter::IAdd(const U32U64& a, const U32U64& b) {
} }
} }
Value IREmitter::IAddCary(const U32& a, const U32& b) { Value IREmitter::IAddCarry(const U32& a, const U32& b) {
if (a.Type() != b.Type()) { if (a.Type() != b.Type()) {
UNREACHABLE_MSG("Mismatching types {} and {}", a.Type(), b.Type()); UNREACHABLE_MSG("Mismatching types {} and {}", a.Type(), b.Type());
} }
switch (a.Type()) { switch (a.Type()) {
case Type::U32: case Type::U32:
return Inst<U32>(Opcode::IAddCary32, a, b); return Inst(Opcode::IAddCarry32, a, b);
default: default:
ThrowInvalidType(a.Type()); ThrowInvalidType(a.Type());
} }

View file

@ -254,7 +254,7 @@ public:
[[nodiscard]] F32F64 FPMedTri(const F32F64& a, const F32F64& b, const F32F64& c); [[nodiscard]] F32F64 FPMedTri(const F32F64& a, const F32F64& b, const F32F64& c);
[[nodiscard]] U32U64 IAdd(const U32U64& a, const U32U64& b); [[nodiscard]] U32U64 IAdd(const U32U64& a, const U32U64& b);
[[nodiscard]] Value IAddCary(const U32& a, const U32& b); [[nodiscard]] Value IAddCarry(const U32& a, const U32& b);
[[nodiscard]] U32U64 ISub(const U32U64& a, const U32U64& b); [[nodiscard]] U32U64 ISub(const U32U64& a, const U32U64& b);
[[nodiscard]] U32 IMulHi(const U32& a, const U32& b, bool is_signed = false); [[nodiscard]] U32 IMulHi(const U32& a, const U32& b, bool is_signed = false);
[[nodiscard]] U32U64 IMul(const U32U64& a, const U32U64& b); [[nodiscard]] U32U64 IMul(const U32U64& a, const U32U64& b);

View file

@ -328,7 +328,7 @@ OPCODE(FPCmpClass32, U1, F32,
// Integer operations // Integer operations
OPCODE(IAdd32, U32, U32, U32, ) OPCODE(IAdd32, U32, U32, U32, )
OPCODE(IAdd64, U64, U64, U64, ) OPCODE(IAdd64, U64, U64, U64, )
OPCODE(IAddCary32, U32x2, U32, U32, ) OPCODE(IAddCarry32, U32x2, U32, U32, )
OPCODE(ISub32, U32, U32, U32, ) OPCODE(ISub32, U32, U32, U32, )
OPCODE(ISub64, U64, U64, U64, ) OPCODE(ISub64, U64, U64, U64, )
OPCODE(IMul32, U32, U32, U32, ) OPCODE(IMul32, U32, U32, U32, )

View file

@ -169,7 +169,7 @@ ImageId TextureCache::ResolveDepthOverlap(const ImageInfo& requested_info, Bindi
if (recreate) { if (recreate) {
auto new_info = requested_info; auto new_info = requested_info;
new_info.resources = std::min(requested_info.resources, cache_image.info.resources); new_info.resources = std::max(requested_info.resources, cache_image.info.resources);
const auto new_image_id = slot_images.insert(instance, scheduler, new_info); const auto new_image_id = slot_images.insert(instance, scheduler, new_info);
RegisterImage(new_image_id); RegisterImage(new_image_id);