From: IrgendwerA8 Date: Mon, 20 Mar 2017 20:53:07 +0000 (+0100) Subject: Fixed addressing error for TSB/TSR and enabled tests again. X-Git-Tag: V2.16~18^2 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=refs%2Fpull%2F407%2Fhead;p=cc65 Fixed addressing error for TSB/TSR and enabled tests again. --- diff --git a/src/sim65/6502.c b/src/sim65/6502.c index 0320dd895..b870dd76d 100644 --- a/src/sim65/6502.c +++ b/src/sim65/6502.c @@ -470,7 +470,7 @@ static void OPC_65SC02_0C (void) unsigned Addr; unsigned char Val; Cycles = 6; - Addr = MemReadByte (Regs.PC+1); + Addr = MemReadWord (Regs.PC+1); Val = MemReadByte (Addr); SET_ZF ((Val & Regs.AC) == 0); MemWriteByte (Addr, (unsigned char) (Val | Regs.AC)); @@ -604,7 +604,7 @@ static void OPC_65SC02_1C (void) unsigned Addr; unsigned char Val; Cycles = 6; - Addr = MemReadByte (Regs.PC+1); + Addr = MemReadWord (Regs.PC+1); Val = MemReadByte (Addr); SET_ZF ((Val & Regs.AC) == 0); MemWriteByte (Addr, (unsigned char) (Val & ~Regs.AC)); diff --git a/test/val/Makefile b/test/val/Makefile index 1981b36fe..95522a930 100644 --- a/test/val/Makefile +++ b/test/val/Makefile @@ -39,13 +39,6 @@ SOURCES := $(wildcard *.c) TESTS := $(foreach option,$(OPTIONS),$(SOURCES:%.c=$(WORKDIR)/%.$(option).6502.prg)) TESTS += $(foreach option,$(OPTIONS),$(SOURCES:%.c=$(WORKDIR)/%.$(option).65c02.prg)) -# FIXME: These tests fail when built with optimizations for the 65c02 -TESTS := $(filter-out $(WORKDIR)/compare7.O%.65c02.prg,$(TESTS)) -TESTS := $(filter-out $(WORKDIR)/compare8.O%.65c02.prg,$(TESTS)) -TESTS := $(filter-out $(WORKDIR)/compare9.O%.65c02.prg,$(TESTS)) -TESTS := $(filter-out $(WORKDIR)/compare10.O%.65c02.prg,$(TESTS)) -TESTS := $(filter-out $(WORKDIR)/or1.O%.65c02.prg,$(TESTS)) - all: $(TESTS) $(WORKDIR):