C64: standardize missing firmware errors
This commit is contained in:
parent
39526d3eb7
commit
ab50181b31
|
@ -18,11 +18,9 @@ namespace BizHawk.Emulation.Cores.Computers.Commodore64
|
||||||
|
|
||||||
private byte[] GetFirmware(string name, int length)
|
private byte[] GetFirmware(string name, int length)
|
||||||
{
|
{
|
||||||
byte[] result = new byte[length];
|
byte[] result = CoreComm.CoreFileProvider.GetFirmware("C64", name, true);
|
||||||
using (Stream source = CoreComm.CoreFileProvider.OpenFirmware("C64", name))
|
if (result.Length != length)
|
||||||
{
|
throw new MissingFirmwareException(string.Format("Firmware {0} was {1} bytes, should be {2} bytes", name, result.Length, length));
|
||||||
source.Read(result, 0, length);
|
|
||||||
}
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue