From c3d33dba2c0378defa7478882a7a5e7ac7ae8997 Mon Sep 17 00:00:00 2001 From: Stefan Arentz Date: Wed, 21 Dec 2016 21:50:02 -0500 Subject: [PATCH] Print PC when unexpected io is read/written --- src/two.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/two.c b/src/two.c index f4480c1..77bb56d 100644 --- a/src/two.c +++ b/src/two.c @@ -171,7 +171,7 @@ static uint8_t ewm_two_iom_read(struct cpu_t *cpu, struct mem_t *mem, uint16_t a } default: - printf("[A2P] Unexpected read at $%.4X\n", addr); + printf("[A2P] Unexpected read at $%.4X pc is $%.4X\n", addr, cpu->state.pc); break; } return 0; @@ -244,7 +244,7 @@ static void ewm_two_iom_write(struct cpu_t *cpu, struct mem_t *mem, uint16_t add break; default: - printf("[A2P] Unexpected write at $%.4X\n", addr); + printf("[A2P] Unexpected write at $%.4X pc is $%.4X\n", addr, cpu->state.pc); break; } }