system/ppu/index.js
function( value ) {
		var nametableFlag = value & 0x3,
			incrementFlag = value & 0x4,
			spriteFlag = value & 0x8,
			backgroundFlag = value & 0x10,
			sizeFlag = value & 0x20,
			nmiFlag = value & 0x80;

		this.background.setNameTable( nametableFlag );

		this.increment = incrementFlag ? 32 : 1;
		this.sprites.baseTable = spriteFlag ? 0x1000 : 0x0000;
		this.background.baseTable = backgroundFlag ? 0x1000 : 0x0000;
		this.sprites.spriteSize = sizeFlag ? 16 : 8;
		this.generateNMI = !!nmiFlag;

		// TODO multiple NMIs can occure when writing to PPUCONTROL without reading
		// PPUSTATUS
	}
function( value ) {
		var nametableFlag = value & 0x3,
			incrementFlag = value & 0x4,
			spriteFlag = value & 0x8,
			backgroundFlag = value & 0x10,
			sizeFlag = value & 0x20,
			nmiFlag = value & 0x80;

		this.background.setNameTable( nametableFlag );

		this.increment = incrementFlag ? 32 : 1;
		this.sprites.baseTable = spriteFlag ? 0x1000 : 0x0000;
		this.background.baseTable = backgroundFlag ? 0x1000 : 0x0000;
		this.sprites.spriteSize = sizeFlag ? 16 : 8;
		this.generateNMI = !!nmiFlag;

		// TODO multiple NMIs can occure when writing to PPUCONTROL without reading
		// PPUSTATUS
	}
function ( value ) { var nametableFlag = value & 0x3 , incrementFlag = value & 0x4 , spriteFlag = value & 0x8 , backgroundFlag = value & 0x10 , sizeFlag = value & 0x20 , nmiFlag = value & 0x80 ; this . background . setNameTable ( nametableFlag ) ; this . increment = incrementFlag ? 32 : 1 ; this . sprites . baseTable = spriteFlag ? 0x1000 : 0x0000 ; this . background . baseTable = backgroundFlag ? 0x1000 : 0x0000 ; this . sprites . spriteSize = sizeFlag ? 16 : 8 ; this . generateNMI = ! ! nmiFlag ; // TODO multiple NMIs can occure when writing to PPUCONTROL without reading // PPUSTATUS }
Set various flags to control rendering behavior.
Set various flags to control rendering behavior .