mirror of https://github.com/PCSX2/pcsx2.git
CDVD: Force initialized flag on NVRAM reads
Jak 1 crashes on boot if it's not set.
This commit is contained in:
parent
b55ec3ae58
commit
e2a4d8f1e6
|
@ -333,7 +333,18 @@ s32 cdvdReadConfig(u8* config)
|
|||
cdvdReadNVM(config, nvmLayout->config2 + ((cdvd.CBlockIndex++) * 16), 16);
|
||||
break;
|
||||
default:
|
||||
cdvdReadNVM(config, nvmLayout->config1 + ((cdvd.CBlockIndex++) * 16), 16);
|
||||
{
|
||||
cdvdReadNVM(config, nvmLayout->config1 + (cdvd.CBlockIndex * 16), 16);
|
||||
DEV_LOG("CONF1: {:02X} {:02X} {:02X} {:02X} {:02X} {:02X}", config[0], config[1], config[2], config[3], config[4], config[5]);
|
||||
if (cdvd.CBlockIndex == 1 && (NoOSD || VMManager::Internal::WasFastBooted()))
|
||||
{
|
||||
// HACK: Set the "initialized" flag when fast booting, otherwise some games crash (e.g. Jak 1).
|
||||
config[2] |= 0x80;
|
||||
}
|
||||
|
||||
cdvd.CBlockIndex++;
|
||||
}
|
||||
break;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -2626,6 +2626,11 @@ bool VMManager::ShouldAllowPresentThrottle()
|
|||
return (!valid_vm || (!s_target_speed_synced_to_host && s_target_speed != 1.0f));
|
||||
}
|
||||
|
||||
bool VMManager::Internal::WasFastBooted()
|
||||
{
|
||||
return s_fast_boot_requested;
|
||||
}
|
||||
|
||||
bool VMManager::Internal::IsFastBootInProgress()
|
||||
{
|
||||
return s_fast_boot_requested && !HasBootedELF();
|
||||
|
|
|
@ -261,6 +261,9 @@ namespace VMManager
|
|||
/// Updates the variables in the EmuFolders namespace, reloading subsystems if needed.
|
||||
void UpdateEmuFolders();
|
||||
|
||||
/// Returns true if the VM was fast booted.
|
||||
bool WasFastBooted();
|
||||
|
||||
/// Returns true if fast booting is active (requested but ELF not started).
|
||||
bool IsFastBootInProgress();
|
||||
|
||||
|
|
Loading…
Reference in New Issue