GameBoy\Core::disableBootROM PHP Method

disableBootROM() public method

public disableBootROM ( )
    public function disableBootROM()
    {
        //Remove any traces of the boot ROM from ROM memory.
        for ($address = 0; $address < 0x900; ++$address) {
            //Skip the already loaded in ROM header.
            if ($address < 0x100 || $address >= 0x200) {
                $this->memory[$address] = $this->ROM[$address];
                //Replace the GameBoy Color boot ROM with the game ROM.
            }
        }
        $this->checkPaletteType();
        if (!$this->cGBC) {
            //Clean up the post-boot (GB mode only) state:
            echo 'Stepping down from GBC mode.' . PHP_EOL;
            $this->tileCount /= 2;
            $this->tileCountInvalidator = $this->tileCount * 4;
            if (!Settings::$colorize) {
                $this->transparentCutoff = 4;
            }
            $this->colorCount = 12;
            // @TODO
            // $this->tileData.length = $this->tileCount * $this->colorCount;
            unset($this->VRAM);
            unset($this->GBCMemory);
            //Possible Extra: shorten some gfx arrays to the length that we need (Remove the unused indices)
        }
    }