mirror of
https://github.com/zoriya/ComSquare.git
synced 2026-05-25 15:39:28 +00:00
Solving timing issues
This commit is contained in:
@@ -15,7 +15,7 @@ Test(SBC, removingOne)
|
||||
snes.cpu->_registers.p.c = true;
|
||||
snes.cpu->_registers.a = 0x1;
|
||||
snes.wram->_data[0] = 0x1;
|
||||
snes.cpu->SBC(0x0);
|
||||
snes.cpu->SBC(0x0, ComSquare::CPU::AddressingMode::Implied);
|
||||
cr_assert_eq(snes.cpu->_registers.a, 0, "The accumulator's value should be 0x0 but it was 0x%x.", snes.cpu->_registers.a);
|
||||
cr_assert_eq(snes.cpu->_registers.p.c, true, "The carry flags should be set.");
|
||||
cr_assert_eq(snes.cpu->_registers.p.v, false, "The overflow flags should not be set.");
|
||||
@@ -32,7 +32,7 @@ Test(SBC, legitOverflowWithCarry)
|
||||
snes.cpu->_registers.p.c = true;
|
||||
snes.wram->_data[0] = 0x03;
|
||||
snes.wram->_data[1] = 0x20;
|
||||
snes.cpu->SBC(0x0);
|
||||
snes.cpu->SBC(0x0, ComSquare::CPU::AddressingMode::Implied);
|
||||
cr_assert_eq(snes.cpu->_registers.a, 0xDFFE, "The accumulator's value should be 0xDFFE but it was 0x%x.", snes.cpu->_registers.a);
|
||||
cr_assert_eq(snes.cpu->_registers.p.c, false, "The carry flags should not be set.");
|
||||
cr_assert_eq(snes.cpu->_registers.p.v, false, "The overflow flags should not be set.");
|
||||
@@ -49,7 +49,7 @@ Test(SBC, overflowWithCarry)
|
||||
snes.cpu->_registers.p.c = true;
|
||||
snes.wram->_data[0] = 0x03;
|
||||
snes.wram->_data[1] = 0x20;
|
||||
snes.cpu->SBC(0x0);
|
||||
snes.cpu->SBC(0x0, ComSquare::CPU::AddressingMode::Implied);
|
||||
cr_assert_eq(snes.cpu->_registers.a, 0xDFFE, "The accumulator's value should be 0xDFFE but it was 0x%x.", snes.cpu->_registers.a);
|
||||
cr_assert_eq(snes.cpu->_registers.p.c, false, "The carry flags should not be set.");
|
||||
cr_assert_eq(snes.cpu->_registers.p.v, false, "The overflow flags should be not set.");
|
||||
@@ -65,7 +65,7 @@ Test(SBC, overflowEmulation)
|
||||
snes.cpu->_registers.p.m = false;
|
||||
snes.cpu->_registers.p.c = false;
|
||||
snes.wram->_data[0] = 0x02;
|
||||
snes.cpu->SBC(0x0);
|
||||
snes.cpu->SBC(0x0, ComSquare::CPU::AddressingMode::Implied);
|
||||
cr_assert_eq(snes.cpu->_registers.a, 0xFE, "The accumulator's value should be 0xFE but it was 0x%x.", snes.cpu->_registers.a);
|
||||
cr_assert_eq(snes.cpu->_registers.p.c, false, "The carry flags should not be set.");
|
||||
cr_assert_eq(snes.cpu->_registers.p.v, false, "The overflow flags should not be set.");
|
||||
@@ -83,7 +83,7 @@ Test(SBC, overflowEmulation)
|
||||
// snes.cpu->_registers.p.m = false;
|
||||
// snes.wram->_data[0] = 0x03;
|
||||
// snes.wram->_data[1] = 0x20;
|
||||
// snes.cpu->SBC(0x0);
|
||||
// snes.cpu->SBC(0x0, ComSquare::CPU::AddressingMode::Implied);
|
||||
// cr_assert_eq(snes.cpu->_registers.a, 0x7998, "The accumulator's value should be 0x7998 but it was 0x%x.", snes.cpu->_registers.a);
|
||||
// cr_assert_eq(snes.cpu->_registers.p.c, false, "The carry flags should not be set.");
|
||||
// cr_assert_eq(snes.cpu->_registers.p.v, false, "The overflow flags should not be set.");
|
||||
|
||||
Reference in New Issue
Block a user