nesemuguy wrote:
after the 16 byte of the .nes file, there is a 512 byte trainer if present, then the 16 or 32kb program code, then the 8kb chr rom. But why are some .nes roms so big like the simspons rom file is 262kb?
Not all games have only 16KB or 32KB PRG code. In fact most don't! Those sizes are used on boards without memory mapping hardware (i.e. NROM). Most games have more than 32KB of PRG code, and more than 8KB CHR (if it is a CHR-ROM game, CHR-RAM games have their graphics stored with the PRG code).
However, the 6502 (NES CPU) can only see 32KB of PRG and 8KB of CHR at a time, so it's a job for the mapping hardware to show small pieces of the complete ROM into these "windows" that the CPU can see, and that's what memory mapping is.