mirror of
https://github.com/MoleskiCoder/EightBit.git
synced 2024-12-22 09:30:32 +00:00
Better register definitions for the 6502
Signed-off-by: Adrian.Conlon <adrian.conlon@gmail.com>
This commit is contained in:
parent
f970c45005
commit
7cd0f324de
@ -31,12 +31,12 @@ namespace EightBit {
|
||||
|
||||
ProcessorType getLevel() const { return level; }
|
||||
|
||||
uint8_t getX() const { return x; }
|
||||
uint8_t getY() const { return y; }
|
||||
uint8_t getA() const { return a; }
|
||||
uint8_t getS() const { return s; }
|
||||
uint8_t& X() { return x; }
|
||||
uint8_t& Y() { return y; }
|
||||
uint8_t& A() { return a; }
|
||||
uint8_t& S() { return s; }
|
||||
|
||||
const StatusFlags& getP() const { return p; }
|
||||
StatusFlags& P() { return p; }
|
||||
|
||||
const Instruction& getInstruction(uint8_t code) const {
|
||||
return instructions[code];
|
||||
|
@ -70,12 +70,12 @@ void Board::Cpu_ExecutingInstruction_Debug(const EightBit::MOS6502& cpu) {
|
||||
|
||||
std::cout << std::hex;
|
||||
std::cout << "PC=" << std::setw(4) << std::setfill('0') << address << ":";
|
||||
std::cout << "P=" << (std::string)m_cpu.getP() << ", ";
|
||||
std::cout << "P=" << (std::string)m_cpu.P() << ", ";
|
||||
std::cout << std::setw(2) << std::setfill('0');
|
||||
std::cout << "A=" << (int)m_cpu.getA() << ", ";
|
||||
std::cout << "X=" << (int)m_cpu.getX() << ", ";
|
||||
std::cout << "Y=" << (int)m_cpu.getY() << ", ";
|
||||
std::cout << "S=" << (int)m_cpu.getS() << "\t";
|
||||
std::cout << "A=" << (int)m_cpu.A() << ", ";
|
||||
std::cout << "X=" << (int)m_cpu.X() << ", ";
|
||||
std::cout << "Y=" << (int)m_cpu.Y() << ", ";
|
||||
std::cout << "S=" << (int)m_cpu.S() << "\t";
|
||||
|
||||
std::cout << m_disassembler.Dump_ByteValue(cell);
|
||||
std::cout << m_disassembler.DumpBytes(mode, address + 1);
|
||||
|
Loading…
Reference in New Issue
Block a user