public function initSkipBootstrap()
{
//Start as an unset device:
echo 'Starting without the GBC boot ROM' . PHP_EOL;
$this->programCounter = 0x100;
$this->stackPointer = 0xfffe;
$this->IME = true;
$this->LCDTicks = 15;
$this->DIVTicks = 14;
$this->registerA = $this->cGBC ? 0x11 : 0x1;
$this->registerB = 0;
$this->registerC = 0x13;
$this->registerD = 0;
$this->registerE = 0xd8;
$this->FZero = true;
$this->FSubtract = false;
$this->FHalfCarry = true;
$this->FCarry = true;
$this->registersHL = 0x14d;
//Fill in the boot ROM set register values
//Default values to the GB boot ROM values, then fill in the GBC boot ROM values after ROM loading
$address = 0xff;
while ($address >= 0) {
if ($address >= 0x30 && $address < 0x40) {
$this->memoryWrite(0xff00 + $address, $this->ffxxDump[$address]);
} else {
switch ($address) {
case 0x0:
case 0x1:
case 0x2:
case 0x7:
case 0xf:
case 0x40:
case 0xff:
$this->memoryWrite(0xff00 + $address, $this->ffxxDump[$address]);
break;
default:
$this->memory[0xff00 + $address] = $this->ffxxDump[$address];
}
}
--$address;
}
}