BIOS: Add support for loading PS2 BIOSes
This commit is contained in:
@ -101,9 +101,11 @@ std::optional<Image> LoadImageFromFile(const char* filename)
|
||||
const u32 size = static_cast<u32>(std::ftell(fp.get()));
|
||||
std::fseek(fp.get(), 0, SEEK_SET);
|
||||
|
||||
if (size != BIOS_SIZE)
|
||||
// Apparently some PS1/PS2 BIOS revisions found on the PS3 are neither 512KB nor 4MB, so just check within this range
|
||||
if (size < BIOS_SIZE || size > BIOS_SIZE_PS2)
|
||||
{
|
||||
Log_ErrorPrintf("BIOS image '%s' mismatch, expecting %u bytes, got %u bytes", filename, BIOS_SIZE, size);
|
||||
Log_ErrorPrintf("BIOS image '%s' mismatch, expecting between %u and %u bytes, got %u bytes", filename, BIOS_SIZE,
|
||||
BIOS_SIZE_PS2, size);
|
||||
return std::nullopt;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user