Skip to content

Commit

Permalink
Fix flags in some instrunctions
Browse files Browse the repository at this point in the history
  • Loading branch information
drhelius committed Aug 3, 2024
1 parent 840bc99 commit 2b8e073
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/huc6280_names.h
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ static const GG_OPCode_Info k_opcode_names[256] = {
{ "INY", GG_OPCode_Type_Implied },
{ "CMP #$%02X", GG_OPCode_Type_1b },
{ "DEX", GG_OPCode_Type_Implied },
{ "NOP [UNOFFICIAL]", GG_OPCode_Type_Implied },
{ "NOP [UNOFFICIAL WAI]", GG_OPCode_Type_Implied },
{ "CPY $%04X", GG_OPCode_Type_2b },
{ "CMP $%04X", GG_OPCode_Type_2b },
{ "DEC $%04X", GG_OPCode_Type_2b },
Expand Down
1 change: 1 addition & 0 deletions src/huc6280_opcodes.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ void HuC6280::OPCode0x07()
void HuC6280::OPCode0x08()
{
// PHP
ClearFlag(FLAG_TRANSFER);
SetFlag(FLAG_BREAK);
StackPush8(m_P.GetValue());
}
Expand Down
1 change: 1 addition & 0 deletions src/huc6280_opcodes_inline.h
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,7 @@ inline void HuC6280::OPCodes_BRK()
{
m_PC.Increment();
StackPush16(m_PC.GetValue());
ClearFlag(FLAG_TRANSFER);
SetFlag(FLAG_BREAK);
StackPush8(m_P.GetValue());
SetFlag(FLAG_INTERRUPT);
Expand Down

0 comments on commit 2b8e073

Please sign in to comment.