src/memory/header.cc
/*
 * Decodes byte 6 of an NES header into the mirroring, battery, trainer, and
 * four screen bools.
 *
 * Assumes the header is non-null and 16 bytes long.
 */
Decodes byte 6 of an NES header into the mirroring, battery, trainer, and
four screen bools.

Assumes the header is non-null and 16 bytes long.
Decodes byte 6 of an NES header into the mirroring battery trainer and four screen bools . Assumes the header is non - null and 16 bytes long .
static void DecodeFlag6(RomHeader *header, char *file_header) {
  header->mirror = static_cast<bool>(file_header[FLAG_6] & 0x01);
  header->battery = static_cast<bool>(file_header[FLAG_6] & 0x02);
  header->trainer = static_cast<bool>(file_header[FLAG_6] & 0x04);
  header->four_screen = static_cast<bool>(file_header[FLAG_6] & 0x08);
  return;
}
static void DecodeFlag6 ( RomHeader * header , char * file_header ) { header -> mirror = static_cast < bool > ( file_header [ FLAG_6 ] & 0x01 ) ; header -> battery = static_cast < bool > ( file_header [ FLAG_6 ] & 0x02 ) ; header -> trainer = static_cast < bool > ( file_header [ FLAG_6 ] & 0x04 ) ; header -> four_screen = static_cast < bool > ( file_header [ FLAG_6 ] & 0x08 ) ; return ; }
Decodes byte 6 of an NES header into the mirroring, battery, trainer, and
 four screen bools.
Decodes byte 6 of an NES header into the mirroring battery trainer and four screen bools .