Skip to content

Commit

Permalink
BCC, BCS and BEQ opcodes
Browse files Browse the repository at this point in the history
  • Loading branch information
drhelius committed Jul 1, 2024
1 parent 7324b9e commit ddf288d
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 0 additions & 2 deletions src/huc6280_inline.h
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,6 @@ inline u16 HuC6280::AbsoluteAddressing(EightBitRegister* reg)
{
u16 address = Fetch16();
u16 result = address + reg->GetValue();
m_page_crossed = PageCrossed(address, result);
return result;
}

Expand All @@ -198,7 +197,6 @@ inline u16 HuC6280::IndirectIndexedAddressing()
u8 h = m_memory->Read((address + 1) & 0x20FF);
address = Address16(h, l);
u16 result = address + m_Y.GetValue();
m_page_crossed = PageCrossed(address, result);
return result;
}

Expand Down
9 changes: 6 additions & 3 deletions src/huc6280_opcodes.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -982,7 +982,8 @@ void HuC6280::OPCode0x8F()

void HuC6280::OPCode0x90()
{
// BCC $s
// OK
// BCC hhll
OPcodes_Branch(!IsSetFlag(FLAG_CARRY));
}

Expand Down Expand Up @@ -1185,7 +1186,8 @@ void HuC6280::OPCode0xAF()

void HuC6280::OPCode0xB0()
{
// BCS $s
// OK
// BCS hhll
OPcodes_Branch(IsSetFlag(FLAG_CARRY));
}

Expand Down Expand Up @@ -1591,7 +1593,8 @@ void HuC6280::OPCode0xEF()

void HuC6280::OPCode0xF0()
{
// BEQ $s
// OK
// BEQ hhll
OPcodes_Branch(IsSetFlag(FLAG_ZERO));
}

Expand Down
1 change: 0 additions & 1 deletion src/huc6280_opcodes_inline.h
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,6 @@ inline void HuC6280::OPcodes_Branch(bool condition)
u16 result = static_cast<u16>(address + displacement);
m_PC.SetValue(result);
m_branch_taken = true;
m_page_crossed = PageCrossed(address, result);
}
else
m_PC.Increment();
Expand Down

0 comments on commit ddf288d

Please sign in to comment.