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).
pull/2030/head
Connor McLaughlin 5 years ago
parent f34a048009
commit 1e44c2f3d0

@ -850,3 +850,129 @@ DisplayActiveStartOffset = -44
# SCES-20900 (Final Fantasy VII (Spain) (Disc 3))
[SCES-20900]
DisplayActiveStartOffset = -44
# SLPS-02878 (Colin McRae - The Rally 02 (Japan))
[SLPS-02878]
ForceRecompilerLUTFastmem = True
# SLES-02605 (Colin McRae Rally 2.0 (Europe) (En,Fr,De,Es,It))
[SLES-02605]
ForceRecompilerLUTFastmem = True
# SLUS-01222 (Colin McRae Rally 2.0 (USA) (En,Fr,Es))
[SLUS-01222]
ForceRecompilerLUTFastmem = True
# SLPM-86429 (Tony Hawk's Pro Skater (Japan))
[SLPM-86429]
ForceRecompilerLUTFastmem = True
# SLPM-86943 (Tony Hawk's Pro Skater (Japan))
[SLPM-86943]
ForceRecompilerLUTFastmem = True
# SLUS-00860 (Tony Hawk's Pro Skater (USA))
[SLUS-00860]
ForceRecompilerLUTFastmem = True
# SLED-02879 (Tony Hawk's Pro Skater 2 (Australia) (Demo))
[SLED-02879]
ForceRecompilerLUTFastmem = True
# SLED-03048 (Tony Hawk's Pro Skater 2 (Europe) (Demo))
[SLED-03048]
ForceRecompilerLUTFastmem = True
# SLES-02908 (Tony Hawk's Pro Skater 2 (Europe, Australia))
[SLES-02908]
ForceRecompilerLUTFastmem = True
# SLES-02909 (Tony Hawk's Pro Skater 2 (France))
[SLES-02909]
ForceRecompilerLUTFastmem = True
# SLES-02910 (Tony Hawk's Pro Skater 2 (Germany))
[SLES-02910]
ForceRecompilerLUTFastmem = True
# SLPM-86751 (Tony Hawk's Pro Skater 2 (Japan))
[SLPM-86751]
ForceRecompilerLUTFastmem = True
# SLUS-01066 (Tony Hawk's Pro Skater 2 (USA))
[SLUS-01066]
ForceRecompilerLUTFastmem = True
# SLUS-90086 (Tony Hawk's Pro Skater 2 (USA) (Demo))
[SLUS-90086]
ForceRecompilerLUTFastmem = True
# SLES-03645 (Tony Hawk's Pro Skater 3 (Europe))
[SLES-03645]
ForceRecompilerLUTFastmem = True
# SLES-03646 (Tony Hawk's Pro Skater 3 (France))
[SLES-03646]
ForceRecompilerLUTFastmem = True
# SLES-03647 (Tony Hawk's Pro Skater 3 (Germany))
[SLES-03647]
ForceRecompilerLUTFastmem = True
# SLUS-01419 (Tony Hawk's Pro Skater 3 (USA))
[SLUS-01419]
ForceRecompilerLUTFastmem = True
# SLES-03954 (Tony Hawk's Pro Skater 4 (Europe))
[SLES-03954]
ForceRecompilerLUTFastmem = True
# SLES-03956 (Tony Hawk's Pro Skater 4 (France))
[SLES-03956]
ForceRecompilerLUTFastmem = True
# SLES-03955 (Tony Hawk's Pro Skater 4 (Germany))
[SLES-03955]
ForceRecompilerLUTFastmem = True
# SLUS-01485 (Tony Hawk's Pro Skater 4 (USA))
[SLUS-01485]
ForceRecompilerLUTFastmem = True
# SLPS-02833 (Lagnacure (Japan) (Artdink Best Choice))
[SLPS-02833]
ForceRecompilerLUTFastmem = True
# SCPS-45120 (Lagnacure (Japan, Asia))
[SCPS-45120]
ForceRecompilerLUTFastmem = True
# SLPS-01009 (Lagnacure (Japan, Asia))
[SLPS-01009]
ForceRecompilerLUTFastmem = True

@ -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
};

Loading…
Cancel
Save