GameDatabase: Add overrides for maximum CD speedup cycles

This commit is contained in:
Stenzek 2025-03-30 18:36:58 +10:00
parent d2c09dfaff
commit 8c1f75ab8c
No known key found for this signature in database
3 changed files with 87 additions and 2 deletions

View File

@ -101046,6 +101046,9 @@ SCPS-45320:
- DigitalController
traits:
- ForcePGXPCPUMode
settings:
cdromMaxSeekSpeedupCycles: 30000
cdromMaxReadSpeedupCycles: 80000
codes:
- SCPS-45320
- SCPS-45321
@ -101073,6 +101076,9 @@ PAPX-90044:
versionTested: "0.1-905-g237f469"
traits:
- ForcePGXPCPUMode
settings:
cdromMaxSeekSpeedupCycles: 30000
cdromMaxReadSpeedupCycles: 80000
SCPS-45317:
name: "Metal Gear Solid (Japan, Asia) (Disc 1) (Ichi) (Premium Package)"
discSet:
@ -101085,6 +101091,9 @@ SCPS-45317:
- DigitalController
traits:
- ForcePGXPCPUMode
settings:
cdromMaxSeekSpeedupCycles: 30000
cdromMaxReadSpeedupCycles: 80000
codes:
- SCPS-45317
- SLPM-86111
@ -101114,6 +101123,9 @@ SCPS-45318:
- DigitalController
traits:
- ForcePGXPCPUMode
settings:
cdromMaxSeekSpeedupCycles: 30000
cdromMaxReadSpeedupCycles: 80000
codes:
- SCPS-45318
- SLPM-86112
@ -101137,12 +101149,18 @@ SLED-01400:
genre: "** DEMO **"
traits:
- ForcePGXPCPUMode
settings:
cdromMaxSeekSpeedupCycles: 30000
cdromMaxReadSpeedupCycles: 80000
SLED-01775:
name: "Metal Gear Solid (Europe) (Demo 2)"
metadata:
genre: "** DEMO **"
traits:
- ForcePGXPCPUMode
settings:
cdromMaxSeekSpeedupCycles: 30000
cdromMaxReadSpeedupCycles: 80000
SLES-01370:
name: "Metal Gear Solid (Europe) (Disc 1)"
discSet:
@ -101158,6 +101176,9 @@ SLES-01370:
- DigitalController
traits:
- ForcePGXPCPUMode
settings:
cdromMaxSeekSpeedupCycles: 30000
cdromMaxReadSpeedupCycles: 80000
metadata:
publisher: "Konami"
developer: "KCE Japan"
@ -101187,6 +101208,9 @@ SLES-11370:
- DigitalController
traits:
- ForcePGXPCPUMode
settings:
cdromMaxSeekSpeedupCycles: 30000
cdromMaxReadSpeedupCycles: 80000
metadata:
publisher: "Konami"
developer: "KCE Japan"
@ -101216,6 +101240,9 @@ SLES-01506:
- DigitalController
traits:
- ForcePGXPCPUMode
settings:
cdromMaxSeekSpeedupCycles: 30000
cdromMaxReadSpeedupCycles: 80000
metadata:
publisher: "Konami"
developer: "KCE Japan"
@ -101245,6 +101272,9 @@ SLES-11506:
- DigitalController
traits:
- ForcePGXPCPUMode
settings:
cdromMaxSeekSpeedupCycles: 30000
cdromMaxReadSpeedupCycles: 80000
metadata:
publisher: "Konami"
developer: "KCE Japan"
@ -101274,6 +101304,9 @@ SLES-01507:
- DigitalController
traits:
- ForcePGXPCPUMode
settings:
cdromMaxSeekSpeedupCycles: 30000
cdromMaxReadSpeedupCycles: 80000
metadata:
publisher: "Konami"
developer: "KCE Japan"
@ -101303,6 +101336,9 @@ SLES-11507:
- DigitalController
traits:
- ForcePGXPCPUMode
settings:
cdromMaxSeekSpeedupCycles: 30000
cdromMaxReadSpeedupCycles: 80000
metadata:
publisher: "Konami"
developer: "KCE Japan"
@ -101332,6 +101368,9 @@ SLES-01508:
- DigitalController
traits:
- ForcePGXPCPUMode
settings:
cdromMaxSeekSpeedupCycles: 30000
cdromMaxReadSpeedupCycles: 80000
metadata:
publisher: "Konami"
developer: "KCE Japan"
@ -101361,6 +101400,9 @@ SLES-11508:
- DigitalController
traits:
- ForcePGXPCPUMode
settings:
cdromMaxSeekSpeedupCycles: 30000
cdromMaxReadSpeedupCycles: 80000
metadata:
publisher: "Konami"
developer: "KCE Japan"
@ -101382,6 +101424,9 @@ SLPM-86098:
- DigitalController
traits:
- ForcePGXPCPUMode
settings:
cdromMaxSeekSpeedupCycles: 30000
cdromMaxReadSpeedupCycles: 80000
metadata:
publisher: "Konami"
developer: "Konami / Diamond Head"
@ -101408,6 +101453,9 @@ SLPM-86114:
- DigitalController
traits:
- ForcePGXPCPUMode
settings:
cdromMaxSeekSpeedupCycles: 30000
cdromMaxReadSpeedupCycles: 80000
codes:
- SLPM-86114
- SLPM-87411
@ -101437,6 +101485,9 @@ SLPM-86115:
- DigitalController
traits:
- ForcePGXPCPUMode
settings:
cdromMaxSeekSpeedupCycles: 30000
cdromMaxReadSpeedupCycles: 80000
codes:
- SLPM-86115
- SLPM-87412
@ -101469,6 +101520,9 @@ SLES-01734:
- DigitalController
traits:
- ForcePGXPCPUMode
settings:
cdromMaxSeekSpeedupCycles: 30000
cdromMaxReadSpeedupCycles: 80000
metadata:
publisher: "Konami"
developer: "KCE Japan"
@ -101498,6 +101552,9 @@ SLES-11734:
- DigitalController
traits:
- ForcePGXPCPUMode
settings:
cdromMaxSeekSpeedupCycles: 30000
cdromMaxReadSpeedupCycles: 80000
metadata:
publisher: "Konami"
developer: "KCE Japan"
@ -101518,6 +101575,9 @@ SLUS-90035:
genre: "** DEMO **"
traits:
- ForcePGXPCPUMode
settings:
cdromMaxSeekSpeedupCycles: 30000
cdromMaxReadSpeedupCycles: 80000
SLUS-00594:
name: "Metal Gear Solid (USA) (Disc 1)"
discSet:
@ -101533,6 +101593,9 @@ SLUS-00594:
- DigitalController
traits:
- ForcePGXPCPUMode
settings:
cdromMaxSeekSpeedupCycles: 30000
cdromMaxReadSpeedupCycles: 80000
metadata:
publisher: "Konami"
developer: "KCE Japan"
@ -101562,6 +101625,9 @@ SLUS-00776:
- DigitalController
traits:
- ForcePGXPCPUMode
settings:
cdromMaxSeekSpeedupCycles: 30000
cdromMaxReadSpeedupCycles: 80000
metadata:
publisher: "Konami"
developer: "KCE Japan"

View File

@ -40,7 +40,7 @@ namespace GameDatabase {
enum : u32
{
GAME_DATABASE_CACHE_SIGNATURE = 0x45434C48,
GAME_DATABASE_CACHE_VERSION = 24,
GAME_DATABASE_CACHE_VERSION = 25,
};
static const Entry* GetEntryForId(std::string_view code);
@ -392,6 +392,18 @@ void GameDatabase::Entry::ApplySettings(Settings& settings, bool display_osd_mes
if (display_osd_messages)
INFO_LOG("GameDB: DMA halt ticks set to {}.", settings.dma_halt_ticks);
}
if (cdrom_max_seek_speedup_cycles.has_value() && g_settings.cdrom_seek_speedup == 0)
{
settings.cdrom_max_seek_speedup_cycles = cdrom_max_seek_speedup_cycles.value();
if (display_osd_messages)
INFO_LOG("GameDB: CDROM maximum seek speedup cycles set to {}.", settings.cdrom_max_seek_speedup_cycles);
}
if (cdrom_max_read_speedup_cycles.has_value() && g_settings.cdrom_read_speedup == 0)
{
settings.cdrom_max_read_speedup_cycles = cdrom_max_read_speedup_cycles.value();
if (display_osd_messages)
INFO_LOG("GameDB: CDROM maximum read speedup cycles set to {}.", settings.cdrom_max_read_speedup_cycles);
}
if (gpu_fifo_size.has_value())
{
settings.gpu_fifo_size = gpu_fifo_size.value();
@ -990,7 +1002,8 @@ bool GameDatabase::LoadFromCache()
!reader.ReadOptionalT(&entry.display_line_start_offset) ||
!reader.ReadOptionalT(&entry.display_line_end_offset) || !reader.ReadOptionalT(&entry.display_crop_mode) ||
!reader.ReadOptionalT(&entry.display_deinterlacing_mode) || !reader.ReadOptionalT(&entry.dma_max_slice_ticks) ||
!reader.ReadOptionalT(&entry.dma_halt_ticks) || !reader.ReadOptionalT(&entry.gpu_fifo_size) ||
!reader.ReadOptionalT(&entry.dma_halt_ticks) || !reader.ReadOptionalT(&entry.cdrom_max_seek_speedup_cycles) ||
!reader.ReadOptionalT(&entry.cdrom_max_read_speedup_cycles) || !reader.ReadOptionalT(&entry.gpu_fifo_size) ||
!reader.ReadOptionalT(&entry.gpu_max_run_ahead) || !reader.ReadOptionalT(&entry.gpu_pgxp_tolerance) ||
!reader.ReadOptionalT(&entry.gpu_pgxp_depth_threshold) ||
!reader.ReadOptionalT(&entry.gpu_pgxp_preserve_proj_fp) || !reader.ReadOptionalT(&entry.gpu_line_detect_mode) ||
@ -1108,6 +1121,8 @@ bool GameDatabase::SaveToCache()
writer.WriteOptionalT(entry.display_deinterlacing_mode);
writer.WriteOptionalT(entry.dma_max_slice_ticks);
writer.WriteOptionalT(entry.dma_halt_ticks);
writer.WriteOptionalT(entry.cdrom_max_seek_speedup_cycles);
writer.WriteOptionalT(entry.cdrom_max_read_speedup_cycles);
writer.WriteOptionalT(entry.gpu_fifo_size);
writer.WriteOptionalT(entry.gpu_max_run_ahead);
writer.WriteOptionalT(entry.gpu_pgxp_tolerance);
@ -1370,6 +1385,8 @@ bool GameDatabase::ParseYamlEntry(Entry* entry, const ryml::ConstNodeRef& value)
settings, "displayDeinterlacingMode", &Settings::ParseDisplayDeinterlacingMode);
entry->dma_max_slice_ticks = GetOptionalTFromObject<u32>(settings, "dmaMaxSliceTicks");
entry->dma_halt_ticks = GetOptionalTFromObject<u32>(settings, "dmaHaltTicks");
entry->cdrom_max_seek_speedup_cycles = GetOptionalTFromObject<u32>(settings, "cdromMaxSeekSpeedupCycles");
entry->cdrom_max_read_speedup_cycles = GetOptionalTFromObject<u32>(settings, "cdromMaxReadSpeedupCycles");
entry->gpu_fifo_size = GetOptionalTFromObject<u32>(settings, "gpuFIFOSize");
entry->gpu_max_run_ahead = GetOptionalTFromObject<u32>(settings, "gpuMaxRunAhead");
entry->gpu_pgxp_tolerance = GetOptionalTFromObject<float>(settings, "gpuPGXPTolerance");

View File

@ -123,6 +123,8 @@ struct Entry
std::optional<GPULineDetectMode> gpu_line_detect_mode;
std::optional<u32> dma_max_slice_ticks;
std::optional<u32> dma_halt_ticks;
std::optional<u32> cdrom_max_seek_speedup_cycles;
std::optional<u32> cdrom_max_read_speedup_cycles;
std::optional<u32> gpu_fifo_size;
std::optional<u32> gpu_max_run_ahead;
std::optional<float> gpu_pgxp_tolerance;