From 90b6c06e325998da49989d3e8ef5fd543a32f051 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rados=C5=82aw=20Kujawa?= Date: Tue, 24 Jan 2017 22:18:02 +0100 Subject: [PATCH] Fix missing breaks in indirect zero page handling switch. --- src/instruction.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/instruction.c b/src/instruction.c index 9ce8c32..073863c 100644 --- a/src/instruction.c +++ b/src/instruction.c @@ -189,18 +189,18 @@ instruction_data_write_1(rk65c02emu_t *e, instrdef_t *id, instruction_t *i, uint case ABSOLUTE: bus_write_1(e->bus, i->op1 + (i->op2 << 8), val); break; - case ACCUMULATOR: - case IMMEDIATE: case IZPX: /* XXX */ iaddr = bus_read_1(e->bus, i->op1 + e->regs.X); iaddr |= (bus_read_1(e->bus, i->op1 + e->regs.X + 1) << 8); bus_write_1(e->bus, iaddr, val); + break; case IZPY: /* XXX */ iaddr = bus_read_1(e->bus, i->op1); iaddr |= (bus_read_1(e->bus, i->op1 + 1) << 8); bus_write_1(e->bus, iaddr, val + e->regs.Y); + break; case ABSOLUTEX: bus_write_1(e->bus, (i->op1 + (i->op2 << 8)) + e->regs.X, val); break; @@ -209,6 +209,8 @@ instruction_data_write_1(rk65c02emu_t *e, instrdef_t *id, instruction_t *i, uint break; case ZPR: /* XXX */ + case ACCUMULATOR: + case IMMEDIATE: case RELATIVE: case IABSOLUTE: case IABSOLUTEX: