From cc82cd99923caeb3353288789208eb079c73e720 Mon Sep 17 00:00:00 2001 From: IrgendwerA8 Date: Mon, 20 Mar 2017 21:53:07 +0100 Subject: [PATCH] Fixed addressing error for TSB/TSR and enabled tests again. --- src/sim65/6502.c | 4 ++-- test/val/Makefile | 7 ------- 2 files changed, 2 insertions(+), 9 deletions(-) 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): -- 2.39.5