src/memory/mappers/sxrom.cc
/*
 * Uses the provided rom file and header to initialize and create an
 * Sxrom class.
 *
 * Assumes the provided rom file and header are valid.
 */
Uses the provided rom file and header to initialize and create an
Sxrom class.

Assumes the provided rom file and header are valid.
Uses the provided rom file and header to initialize and create an Sxrom class . Assumes the provided rom file and header are valid .
Sxrom::Sxrom(FILE *rom_file, RomHeader *header, Config *config)
     : Memory(header, config) {
  ram_ = RandNew(RAM_SIZE);
  LoadPrgRom(rom_file);
  LoadChr(rom_file);
  LoadPrgRam();
  nametable_bank_a_ = RandNew(SCREEN_SIZE);
  nametable_bank_b_ = RandNew(SCREEN_SIZE);
  nametable_[0] = nametable_bank_a_;
  nametable_[1] = nametable_bank_a_;
  nametable_[2] = nametable_bank_a_;
  nametable_[3] = nametable_bank_a_;
  return;
}
Sxrom :: Sxrom ( FILE * rom_file , RomHeader * header , Config * config ) : Memory ( header , config ) { ram_ = RandNew ( RAM_SIZE ) ; LoadPrgRom ( rom_file ) ; LoadChr ( rom_file ) ; LoadPrgRam ( ) ; nametable_bank_a_ = RandNew ( SCREEN_SIZE ) ; nametable_bank_b_ = RandNew ( SCREEN_SIZE ) ; nametable_ [ 0 ] = nametable_bank_a_ ; nametable_ [ 1 ] = nametable_bank_a_ ; nametable_ [ 2 ] = nametable_bank_a_ ; nametable_ [ 3 ] = nametable_bank_a_ ; return ; }
Uses the provided rom file and header to initialize and create an
 Sxrom class.
Uses the provided rom file and header to initialize and create an Sxrom class .
// Setup the NES ram space. // Load the rom data into memory. // Set up the cart ram space. // Setup the nametable in vram. The header mirroring bit is ignored in // this mapper, so we set the mirrored banks to a default value for now.