src/memory/header.cc
/*
 * Determines the PRG-RAM size from an INES header.
 *
 * Assumes the file header is non-null, 16 bytes long, and in the INES format.
 */
Determines the PRG-RAM size from an INES header.
Assumes the file header is non-null, 16 bytes long, and in the INES format.
Determines the PRG - RAM size from an INES header . Assumes the file header is non - null 16 bytes long and in the INES format .
static size_t GetInesPrgRamSize(char *file_header) {
  if ((static_cast<size_t>(file_header[INES_PRG_RAM_SIZE])) == 0) {
    return INES_PRG_RAM_CHUNKSIZE;
  } else {
    return (static_cast<size_t>(file_header[INES_PRG_RAM_SIZE]))
                              * INES_PRG_RAM_CHUNKSIZE;
  }
}
static size_t GetInesPrgRamSize ( char * file_header ) { if ( ( static_cast < size_t > ( file_header [ INES_PRG_RAM_SIZE ] ) ) == 0 ) { return INES_PRG_RAM_CHUNKSIZE ; } else { return ( static_cast < size_t > ( file_header [ INES_PRG_RAM_SIZE ] ) ) * INES_PRG_RAM_CHUNKSIZE ; } }
Determines the PRG-RAM size from an INES header.
Determines the PRG - RAM size from an INES header .
// For compatibility reasons, 8KB of ram is always given to the rom, even // in mappers where it did not actually exist (like UxROM).