public function setCurrentMBC2AND3ROMBank()
{
//Read the cartridge ROM data from RAM memory:
//Only map bank 0 to bank 1 here (MBC2 is like MBC1, but can only do 16 banks, so only the bank 0 quirk appears for MBC2):
$this->currentROMBank = max($this->ROMBank1offs - 1, 0) * 0x4000;
while ($this->currentROMBank + 0x4000 >= count($this->ROM)) {
$this->currentROMBank -= count($this->ROM);
}
}