mirror of
https://github.com/MoleskiCoder/EightBit.git
synced 2024-12-24 06:29:42 +00:00
Undocumented variant of SBC added.
Signed-off-by: Adrian Conlon <Adrian.conlon@gmail.com>
This commit is contained in:
parent
1beee9782f
commit
5f54f61514
@ -395,6 +395,9 @@ std::string EightBit::Disassembly::disassemble(uint16_t current) const {
|
||||
case 0b101:
|
||||
output << disassemble_AM_11(bbb, "*LAX");
|
||||
break;
|
||||
case 0b111:
|
||||
output << disassemble_AM_11(bbb, "*SBC");
|
||||
break;
|
||||
default:
|
||||
throw std::domain_error("Illegal instruction group");
|
||||
}
|
||||
|
@ -19,7 +19,7 @@ EightBit::MOS6502::MOS6502(Bus& bus)
|
||||
/* B */ 2, 5, 0, 5, 4, 4, 4, 4, 2, 4, 2, 0, 4, 4, 4, 4,
|
||||
/* C */ 2, 6, 0, 0, 3, 3, 5, 0, 2, 2, 2, 0, 4, 4, 6, 0,
|
||||
/* D */ 2, 5, 0, 0, 4, 4, 6, 0, 2, 4, 2, 0, 4, 4, 7, 0,
|
||||
/* E */ 2, 6, 0, 0, 3, 3, 5, 0, 2, 2, 2, 0, 4, 4, 6, 0,
|
||||
/* E */ 2, 6, 0, 0, 3, 3, 5, 0, 2, 2, 2, 2, 4, 4, 6, 0,
|
||||
/* F */ 2, 5, 0, 0, 4, 4, 6, 0, 2, 4, 2, 0, 4, 4, 7, 0,
|
||||
};
|
||||
|
||||
@ -411,12 +411,15 @@ int EightBit::MOS6502::execute(uint8_t cell) {
|
||||
break;
|
||||
case 0b11:
|
||||
switch (decoded.aaa) {
|
||||
case 0b100: // SAX
|
||||
case 0b100: // *SAX
|
||||
AM_11(decoded.bbb, A() & X());
|
||||
break;
|
||||
case 0b101: // LAX
|
||||
case 0b101: // *LAX
|
||||
adjustNZ(X() = A() = AM_11(decoded.bbb));
|
||||
break;
|
||||
case 0b111: // *SBC
|
||||
SBC(AM_11(decoded.bbb));
|
||||
break;
|
||||
default:
|
||||
throw std::domain_error("Illegal instruction group");
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user