Settings: Split read and seek cycles for maximum CD speedup
This commit is contained in:
parent
3292833fb8
commit
d2c09dfaff
|
@ -1578,7 +1578,7 @@ u32 CDROM::GetSectorsPerTrack(CDImage::LBA lba)
|
|||
TickCount CDROM::GetTicksForSeek(CDImage::LBA new_lba, bool ignore_speed_change)
|
||||
{
|
||||
if (g_settings.cdrom_seek_speedup == 0)
|
||||
return System::ScaleTicksToOverclock(g_settings.cdrom_max_speedup_cycles);
|
||||
return System::ScaleTicksToOverclock(g_settings.cdrom_max_seek_speedup_cycles);
|
||||
|
||||
u32 ticks = 0;
|
||||
|
||||
|
@ -1683,7 +1683,10 @@ TickCount CDROM::GetTicksForPause()
|
|||
return 27000;
|
||||
|
||||
if (g_settings.cdrom_read_speedup == 0 && CanUseReadSpeedup())
|
||||
return System::ScaleTicksToOverclock(g_settings.cdrom_max_speedup_cycles);
|
||||
{
|
||||
return System::ScaleTicksToOverclock(
|
||||
std::max(g_settings.cdrom_max_read_speedup_cycles, g_settings.cdrom_max_seek_speedup_cycles));
|
||||
}
|
||||
|
||||
const u32 sectors_per_track = GetSectorsPerTrack(s_state.current_lba);
|
||||
const TickCount ticks_per_read = GetTicksForRead();
|
||||
|
@ -3920,7 +3923,7 @@ void CDROM::CheckForSectorBufferReadComplete()
|
|||
CanUseReadSpeedup() && g_settings.cdrom_read_speedup == 0)
|
||||
{
|
||||
const TickCount remaining_time = s_state.drive_event.GetTicksUntilNextExecution();
|
||||
const TickCount instant_ticks = System::ScaleTicksToOverclock(g_settings.cdrom_max_speedup_cycles);
|
||||
const TickCount instant_ticks = System::ScaleTicksToOverclock(g_settings.cdrom_max_read_speedup_cycles);
|
||||
if (remaining_time > instant_ticks)
|
||||
s_state.drive_event.Schedule(instant_ticks);
|
||||
}
|
||||
|
|
|
@ -6465,9 +6465,14 @@ void FullscreenUI::DrawAdvancedSettingsPage()
|
|||
FSUI_CSTR("Reduces hitches in emulation by reading/decompressing CD data asynchronously on a worker thread."),
|
||||
"CDROM", "ReadaheadSectors", Settings::DEFAULT_CDROM_READAHEAD_SECTORS, 0, 32, FSUI_CSTR("%d sectors"));
|
||||
|
||||
DrawIntRangeSetting(bsi, FSUI_CSTR("Maximum Speedup Read/Seek Cycles"),
|
||||
FSUI_CSTR("Sets the minimum delay for the 'Maximum' read/seek speedup level."), "CDROM",
|
||||
"MaxSpeedupCycles", Settings::DEFAULT_CDROM_MAX_SPEEDUP_CYCLES, 1, 1000000,
|
||||
DrawIntRangeSetting(bsi, FSUI_CSTR("Maximum Seek Speedup Cycles"),
|
||||
FSUI_CSTR("Sets the minimum delay for the 'Maximum' seek speedup level."), "CDROM",
|
||||
"MaxSeekSpeedupCycles", Settings::DEFAULT_CDROM_MAX_SEEK_SPEEDUP_CYCLES, 1, 1000000,
|
||||
FSUI_CSTR("%d cycles"));
|
||||
|
||||
DrawIntRangeSetting(bsi, FSUI_CSTR("Maximum Read Speedup Cycles"),
|
||||
FSUI_CSTR("Sets the minimum delay for the 'Maximum' read speedup level."), "CDROM",
|
||||
"MaxReadSpeedupCycles", Settings::DEFAULT_CDROM_MAX_READ_SPEEDUP_CYCLES, 1, 1000000,
|
||||
FSUI_CSTR("%d cycles"));
|
||||
|
||||
DrawToggleSetting(bsi, FSUI_CSTR("Enable Region Check"),
|
||||
|
@ -9355,7 +9360,8 @@ TRANSLATE_NOOP("FullscreenUI", "Logs out of RetroAchievements.");
|
|||
TRANSLATE_NOOP("FullscreenUI", "Macro Button {}");
|
||||
TRANSLATE_NOOP("FullscreenUI", "Makes games run closer to their console framerate, at a small cost to performance.");
|
||||
TRANSLATE_NOOP("FullscreenUI", "Maximum");
|
||||
TRANSLATE_NOOP("FullscreenUI", "Maximum Speedup Read/Seek Cycles");
|
||||
TRANSLATE_NOOP("FullscreenUI", "Maximum Read Speedup Cycles");
|
||||
TRANSLATE_NOOP("FullscreenUI", "Maximum Seek Speedup Cycles");
|
||||
TRANSLATE_NOOP("FullscreenUI", "Memory Card Busy");
|
||||
TRANSLATE_NOOP("FullscreenUI", "Memory Card Directory");
|
||||
TRANSLATE_NOOP("FullscreenUI", "Memory Card Port {}");
|
||||
|
@ -9543,7 +9549,8 @@ TRANSLATE_NOOP("FullscreenUI", "Set Input Binding");
|
|||
TRANSLATE_NOOP("FullscreenUI", "Sets a threshold for discarding precise values when exceeded. May help with glitches in some games.");
|
||||
TRANSLATE_NOOP("FullscreenUI", "Sets a threshold for discarding the emulated depth buffer. May help in some games.");
|
||||
TRANSLATE_NOOP("FullscreenUI", "Sets the fast forward speed. It is not guaranteed that this speed will be reached on all systems.");
|
||||
TRANSLATE_NOOP("FullscreenUI", "Sets the minimum delay for the 'Maximum' read/seek speedup level.");
|
||||
TRANSLATE_NOOP("FullscreenUI", "Sets the minimum delay for the 'Maximum' read speedup level.");
|
||||
TRANSLATE_NOOP("FullscreenUI", "Sets the minimum delay for the 'Maximum' seek speedup level.");
|
||||
TRANSLATE_NOOP("FullscreenUI", "Sets the target emulation speed. It is not guaranteed that this speed will be reached on all systems.");
|
||||
TRANSLATE_NOOP("FullscreenUI", "Sets the turbo speed. It is not guaranteed that this speed will be reached on all systems.");
|
||||
TRANSLATE_NOOP("FullscreenUI", "Sets the verbosity of messages logged. Higher levels will log more messages.");
|
||||
|
|
|
@ -375,8 +375,10 @@ void Settings::Load(const SettingsInterface& si, const SettingsInterface& contro
|
|||
Truncate8(std::min<u32>(si.GetUIntValue("CDROM", "ReadSpeedup", 1u), std::numeric_limits<u8>::max()));
|
||||
cdrom_seek_speedup =
|
||||
Truncate8(std::min<u32>(si.GetUIntValue("CDROM", "SeekSpeedup", 1u), std::numeric_limits<u8>::max()));
|
||||
cdrom_max_speedup_cycles =
|
||||
std::max(si.GetUIntValue("CDROM", "MaxSpeedupCycles", DEFAULT_CDROM_MAX_SPEEDUP_CYCLES), 1u);
|
||||
cdrom_max_seek_speedup_cycles =
|
||||
std::max(si.GetUIntValue("CDROM", "MaxSeekSpeedupCycles", DEFAULT_CDROM_MAX_SEEK_SPEEDUP_CYCLES), 1u);
|
||||
cdrom_max_read_speedup_cycles =
|
||||
std::max(si.GetUIntValue("CDROM", "MaxReadSpeedupCycles", DEFAULT_CDROM_MAX_READ_SPEEDUP_CYCLES), 1u);
|
||||
|
||||
audio_backend =
|
||||
AudioStream::ParseBackendName(
|
||||
|
@ -672,7 +674,8 @@ void Settings::Save(SettingsInterface& si, bool ignore_base) const
|
|||
si.SetBoolValue("CDROM", "MuteCDAudio", cdrom_mute_cd_audio);
|
||||
si.SetUIntValue("CDROM", "ReadSpeedup", cdrom_read_speedup);
|
||||
si.SetUIntValue("CDROM", "SeekSpeedup", cdrom_seek_speedup);
|
||||
si.SetUIntValue("CDROM", "MaxSpeedupCycles", cdrom_max_speedup_cycles);
|
||||
si.SetUIntValue("CDROM", "MaxReadSpeedupCycles", cdrom_max_seek_speedup_cycles);
|
||||
si.SetUIntValue("CDROM", "MaxSeekSpeedupCycles", cdrom_max_read_speedup_cycles);
|
||||
|
||||
si.SetStringValue("Audio", "Backend", AudioStream::GetBackendName(audio_backend));
|
||||
si.SetStringValue("Audio", "Driver", audio_driver.c_str());
|
||||
|
|
|
@ -315,7 +315,8 @@ struct Settings : public GPUSettings
|
|||
|
||||
u8 cdrom_read_speedup = 1;
|
||||
u8 cdrom_seek_speedup = 1;
|
||||
u32 cdrom_max_speedup_cycles = DEFAULT_CDROM_MAX_SPEEDUP_CYCLES;
|
||||
u32 cdrom_max_seek_speedup_cycles = DEFAULT_CDROM_MAX_SEEK_SPEEDUP_CYCLES;
|
||||
u32 cdrom_max_read_speedup_cycles = DEFAULT_CDROM_MAX_READ_SPEEDUP_CYCLES;
|
||||
|
||||
u8 cdrom_readahead_sectors = DEFAULT_CDROM_READAHEAD_SECTORS;
|
||||
CDROMMechaconVersion cdrom_mechacon_version = DEFAULT_CDROM_MECHACON_VERSION;
|
||||
|
@ -584,7 +585,8 @@ struct Settings : public GPUSettings
|
|||
#endif
|
||||
|
||||
static constexpr u8 DEFAULT_CDROM_READAHEAD_SECTORS = 8;
|
||||
static constexpr u32 DEFAULT_CDROM_MAX_SPEEDUP_CYCLES = 30000;
|
||||
static constexpr u32 DEFAULT_CDROM_MAX_SEEK_SPEEDUP_CYCLES = 30000;
|
||||
static constexpr u32 DEFAULT_CDROM_MAX_READ_SPEEDUP_CYCLES = 30000;
|
||||
static constexpr CDROMMechaconVersion DEFAULT_CDROM_MECHACON_VERSION = CDROMMechaconVersion::VC1A;
|
||||
|
||||
static constexpr ControllerType DEFAULT_CONTROLLER_1_TYPE = ControllerType::AnalogController;
|
||||
|
|
|
@ -281,8 +281,12 @@ void AdvancedSettingsWidget::addTweakOptions()
|
|||
Settings::DEFAULT_CDROM_MECHACON_VERSION);
|
||||
addIntRangeTweakOption(m_dialog, m_ui.tweakOptionTable, tr("CD-ROM Readahead Sectors"), "CDROM", "ReadaheadSectors",
|
||||
0, 32, Settings::DEFAULT_CDROM_READAHEAD_SECTORS, tr(" sectors"));
|
||||
addIntRangeTweakOption(m_dialog, m_ui.tweakOptionTable, tr("CD-ROM Max Speedup Read/Seek Cycles"), "CDROM",
|
||||
"MaxSpeedupCycles", 1, 1000000, Settings::DEFAULT_CDROM_MAX_SPEEDUP_CYCLES, tr(" cycles"));
|
||||
addIntRangeTweakOption(m_dialog, m_ui.tweakOptionTable, tr("CD-ROM Max Seek Speedup Cycles"), "CDROM",
|
||||
"MaxSeekSpeedupCycles", 1, 1000000, Settings::DEFAULT_CDROM_MAX_SEEK_SPEEDUP_CYCLES,
|
||||
tr(" cycles"));
|
||||
addIntRangeTweakOption(m_dialog, m_ui.tweakOptionTable, tr("CD-ROM Max Read Speedup Cycles"), "CDROM",
|
||||
"MaxReadSpeedupCycles", 1, 1000000, Settings::DEFAULT_CDROM_MAX_READ_SPEEDUP_CYCLES,
|
||||
tr(" cycles"));
|
||||
addBooleanTweakOption(m_dialog, m_ui.tweakOptionTable, tr("CD-ROM Region Check"), "CDROM", "RegionCheck", false);
|
||||
addBooleanTweakOption(m_dialog, m_ui.tweakOptionTable, tr("CD-ROM SubQ Skew"), "CDROM", "SubQSkew", false);
|
||||
addBooleanTweakOption(m_dialog, m_ui.tweakOptionTable, tr("Allow Booting Without SBI File"), "CDROM",
|
||||
|
@ -328,11 +332,13 @@ void AdvancedSettingsWidget::onResetToDefaultClicked()
|
|||
setIntRangeTweakOption(m_ui.tweakOptionTable, i++,
|
||||
Settings::DEFAULT_CDROM_READAHEAD_SECTORS); // CD-ROM Readahead Sectors
|
||||
setIntRangeTweakOption(m_ui.tweakOptionTable, i++,
|
||||
Settings::DEFAULT_CDROM_MAX_SPEEDUP_CYCLES); // CD-ROM Max Speedup Read/Seek Cycles
|
||||
setBooleanTweakOption(m_ui.tweakOptionTable, i++, false); // CDROM Region Check
|
||||
setBooleanTweakOption(m_ui.tweakOptionTable, i++, false); // CDROM SubQ Skew
|
||||
setBooleanTweakOption(m_ui.tweakOptionTable, i++, false); // Allow booting without SBI file
|
||||
setBooleanTweakOption(m_ui.tweakOptionTable, i++, false); // Enable GDB Server
|
||||
Settings::DEFAULT_CDROM_MAX_SEEK_SPEEDUP_CYCLES); // CD-ROM Max Speedup Seek Cycles
|
||||
setIntRangeTweakOption(m_ui.tweakOptionTable, i++,
|
||||
Settings::DEFAULT_CDROM_MAX_READ_SPEEDUP_CYCLES); // CD-ROM Max Speedup Read Cycles
|
||||
setBooleanTweakOption(m_ui.tweakOptionTable, i++, false); // CDROM Region Check
|
||||
setBooleanTweakOption(m_ui.tweakOptionTable, i++, false); // CDROM SubQ Skew
|
||||
setBooleanTweakOption(m_ui.tweakOptionTable, i++, false); // Allow booting without SBI file
|
||||
setBooleanTweakOption(m_ui.tweakOptionTable, i++, false); // Enable GDB Server
|
||||
setIntRangeTweakOption(m_ui.tweakOptionTable, i++, Settings::DEFAULT_GDB_SERVER_PORT); // GDB Server Port
|
||||
setBooleanTweakOption(m_ui.tweakOptionTable, i++, false); // Export Shared Memory
|
||||
setBooleanTweakOption(m_ui.tweakOptionTable, i++, false); // Enable PCDRV
|
||||
|
|
Loading…
Reference in New Issue