NES_Header_Repair
NES_Header_Repair copied to clipboard
fix ambiguous rom size notation
The functions make_rom_byte and make_rom_nibble would use the old style ROM size notation with sizes up to 67,108,864. However, for PRG-ROM and CHR-ROM, old style notation can only go up to 62,898,176 and 31,449,088 respectively, because any higher would put 0xF in the MSB which would signify exponent-multiplier notation. This patch correctly caps the use of old style notation to values within the valid range.