From b439f40fe2fcd1a297632c63de021c607d372fa9 Mon Sep 17 00:00:00 2001 From: Thomas Harte Date: Fri, 9 Oct 2020 22:04:25 -0400 Subject: [PATCH] Corrects INC and DEC. --- Processors/6502/AllRAM/6502AllRAM.cpp | 6 +++--- Processors/65816/Implementation/65816Implementation.hpp | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Processors/6502/AllRAM/6502AllRAM.cpp b/Processors/6502/AllRAM/6502AllRAM.cpp index cbd8e6b36..49344126d 100644 --- a/Processors/6502/AllRAM/6502AllRAM.cpp +++ b/Processors/6502/AllRAM/6502AllRAM.cpp @@ -11,7 +11,7 @@ #include #include -#define BE_NOISY +//#define BE_NOISY using namespace CPU::MOS6502; @@ -45,14 +45,14 @@ template class ConcreteAllRAMProcessor: public AllRAMProcessor, publ *value = memory_[address]; #ifdef BE_NOISY // if((address&0xff00) == 0x100) { -// printf("%04x -> %02x\n", address, *value); + printf("%04x -> %02x\n", address, *value); // } #endif } else { memory_[address] = *value; #ifdef BE_NOISY // if((address&0xff00) == 0x100) { -// printf("%04x <- %02x\n", address, *value); + printf("%04x <- %02x\n", address, *value); // } #endif } diff --git a/Processors/65816/Implementation/65816Implementation.hpp b/Processors/65816/Implementation/65816Implementation.hpp index ac750dba7..5daa93055 100644 --- a/Processors/65816/Implementation/65816Implementation.hpp +++ b/Processors/65816/Implementation/65816Implementation.hpp @@ -577,13 +577,13 @@ template void Processor::run_for(const Cycles // case INC: - ++instruction_buffer_.value; - flags_.set_nz(instruction_buffer_.value, m_shift_); + ++data_buffer_.value; + flags_.set_nz(data_buffer_.value, m_shift_); break;; case DEC: - --instruction_buffer_.value; - flags_.set_nz(instruction_buffer_.value, m_shift_); + --data_buffer_.value; + flags_.set_nz(data_buffer_.value, m_shift_); break; case INX: {