So, this PR is a fairly robust first cut at supporting NES 2.0 ROM files, while support for earlier versions remains. For now, I don't parse the part of the header that specifies sizes for PRG RAM or CHR RAM since I haven't yet implemented any mappers which utilize either.
Some notable changes:
The initializer for Cartridge parses out PRG ROM and CHR ROM sizes correctly for both NES 2.0 ROMs as well as earlier versions. The parsing of the mapper number is also parsed correctly for both versions of ROM files.
The timing mode is also parsed for both ROM versions, and for now, only ROMs that are explicitly designated to be in NTSC or PAL format are supported.
This includes a small hack to handle ROMs using mapper 000 and have only 8K PRG ROM.
So, this PR is a fairly robust first cut at supporting NES 2.0 ROM files, while support for earlier versions remains. For now, I don't parse the part of the header that specifies sizes for PRG RAM or CHR RAM since I haven't yet implemented any mappers which utilize either.
Some notable changes:
Cartridge
parses out PRG ROM and CHR ROM sizes correctly for both NES 2.0 ROMs as well as earlier versions. The parsing of the mapper number is also parsed correctly for both versions of ROM files.