mirror of
https://github.com/WinampDesktop/winamp.git
synced 2025-06-10 18:55:46 -04:00
GameSettings: Add trait to force LUT fastmem
Should help with games like CMR2 and Lagnacure (which are constantly invalidating code), and THPS series (which use memory mirrors).
This commit is contained in:
@ -129,7 +129,7 @@ private:
|
||||
enum : u32
|
||||
{
|
||||
GAME_LIST_CACHE_SIGNATURE = 0x45434C47,
|
||||
GAME_LIST_CACHE_VERSION = 26
|
||||
GAME_LIST_CACHE_VERSION = 27
|
||||
};
|
||||
|
||||
using CacheMap = std::unordered_map<std::string, GameListEntry>;
|
||||
|
@ -35,6 +35,7 @@ std::array<std::pair<const char*, const char*>, static_cast<u32>(Trait::Count)>
|
||||
{"ForcePGXPCPUMode", TRANSLATABLE("GameSettingsTrait", "Force PGXP CPU Mode")},
|
||||
{"ForceRecompilerMemoryExceptions", TRANSLATABLE("GameSettingsTrait", "Force Recompiler Memory Exceptions")},
|
||||
{"ForceRecompilerICache", TRANSLATABLE("GameSettingsTrait", "Force Recompiler ICache")},
|
||||
{"ForceRecompilerLUTFastmem", TRANSLATABLE("GameSettingsTrait", "Force Recompiler LUT Fastmem")},
|
||||
}};
|
||||
|
||||
const char* GetTraitName(Trait trait)
|
||||
@ -1240,10 +1241,22 @@ void Entry::ApplySettings(bool display_osd_messages) const
|
||||
}
|
||||
|
||||
if (HasTrait(Trait::ForceRecompilerMemoryExceptions))
|
||||
{
|
||||
Log_WarningPrint("Memory exceptions for recompiler forced by game settings.");
|
||||
g_settings.cpu_recompiler_memory_exceptions = true;
|
||||
}
|
||||
|
||||
if (HasTrait(Trait::ForceRecompilerICache))
|
||||
{
|
||||
Log_WarningPrint("ICache for recompiler forced by game settings.");
|
||||
g_settings.cpu_recompiler_icache = true;
|
||||
}
|
||||
|
||||
if (g_settings.cpu_fastmem_mode == CPUFastmemMode::MMap && HasTrait(Trait::ForceRecompilerLUTFastmem))
|
||||
{
|
||||
Log_WarningPrint("LUT fastmem for recompiler forced by game settings.");
|
||||
g_settings.cpu_fastmem_mode = CPUFastmemMode::LUT;
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace GameSettings
|
||||
|
@ -27,6 +27,7 @@ enum class Trait : u32
|
||||
ForcePGXPCPUMode,
|
||||
ForceRecompilerMemoryExceptions,
|
||||
ForceRecompilerICache,
|
||||
ForceRecompilerLUTFastmem,
|
||||
|
||||
Count
|
||||
};
|
||||
|
Reference in New Issue
Block a user