From d129ffed990972be73e9054d4c31b1e39cd4b1f9 Mon Sep 17 00:00:00 2001 From: Peter Evans Date: Fri, 30 Mar 2018 16:10:15 -0500 Subject: [PATCH] Logging on STA instructions --- src/mos6502.loadstor.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/mos6502.loadstor.c b/src/mos6502.loadstor.c index 1e59c48..11e23f5 100644 --- a/src/mos6502.loadstor.c +++ b/src/mos6502.loadstor.c @@ -116,6 +116,8 @@ DEFINE_INST(ply) */ DEFINE_INST(sta) { + log_debug("STA eff_addr:%04x next:%02x prev:%02x", + cpu->eff_addr, cpu->A, mos6502_get(cpu, cpu->eff_addr)); mos6502_set(cpu, cpu->eff_addr, cpu->A); } @@ -124,6 +126,8 @@ DEFINE_INST(sta) */ DEFINE_INST(stx) { + log_debug("STA eff_addr:%04x next:%02x prev:%02x", + cpu->eff_addr, cpu->X, mos6502_get(cpu, cpu->eff_addr)); mos6502_set(cpu, cpu->eff_addr, cpu->X); } @@ -132,6 +136,8 @@ DEFINE_INST(stx) */ DEFINE_INST(sty) { + log_debug("STA eff_addr:%04x next:%02x prev:%02x", + cpu->eff_addr, cpu->Y, mos6502_get(cpu, cpu->eff_addr)); mos6502_set(cpu, cpu->eff_addr, cpu->Y); }