src/memory/header.cc
/*
 * Gets the VS and TV system bools from an INES header.
 *
 * Assumes the file header is non-null, 16 bytes long, and in the INES format.
 */
Gets the VS and TV system bools from an INES header.
Assumes the file header is non-null, 16 bytes long, and in the INES format.
Gets the VS and TV system bools from an INES header . Assumes the file header is non - null 16 bytes long and in the INES format .
static void DecodeInesBools(RomHeader *header, char *file_header) {
  if (file_header[FLAG_7] & 0x01) {
    header->console_type = VS;
  } else {
    header->console_type = NES;
  }
  if (file_header[INES_TV_SYSTEM] & 0x01) {
    header->tv_type = PAL_TV;
  } else {
    header->tv_type = NTSC_TV;
  }
  return;
}
static void DecodeInesBools ( RomHeader * header , char * file_header ) { if ( file_header [ FLAG_7 ] & 0x01 ) { header -> console_type = VS ; } else { header -> console_type = NES ; } if ( file_header [ INES_TV_SYSTEM ] & 0x01 ) { header -> tv_type = PAL_TV ; } else { header -> tv_type = NTSC_TV ; } return ; }
Gets the VS and TV system bools from an INES header.
Gets the VS and TV system bools from an INES header .
// Convert the VS bool to the header enum. // Convert the TV system bool to the header enum.