Skip to content

Instantly share code, notes, and snippets.

@benpye
Created June 7, 2017 02:01
Show Gist options
  • Save benpye/0a03af1a80ddae6005672d9dfdd322ff to your computer and use it in GitHub Desktop.
Save benpye/0a03af1a80ddae6005672d9dfdd322ff to your computer and use it in GitHub Desktop.
TEST_CASE("CB opcodes", "[cb]")
{
auto cpu = std::make_unique<CpuWrapper>();
uint8_t code[] = {0xCB, 0xFF};
cpu->WriteMemory(code, 0, sizeof(code));
cpu->Reset();
cpu->SetA(0);
cpu->RunCycles(8);
REQUIRE(cpu->GetPC() == 2);
REQUIRE(cpu->GetA() == 0b10000000);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment