NES 2.0: Fixed bug in PRG size extra bits

This commit is contained in:
Souryo 2017-04-12 17:35:10 -04:00
parent c9a5e4e2fb
commit 9277abff64

View file

@ -127,7 +127,7 @@ struct NESHeader
uint32_t GetPrgSize()
{
if(GetRomHeaderVersion() == RomHeaderVersion::Nes2_0) {
return (((Byte9 & 0x0F) << 4) | PrgCount) * 0x4000;
return (((Byte9 & 0x0F) << 8) | PrgCount) * 0x4000;
} else {
if(PrgCount == 0) {
return 256 * 0x4000; //0 is a special value and means 256