From cb997a9a2cdf28bea2c100e4fcb86fced132e92f Mon Sep 17 00:00:00 2001 From: ziplantil Date: Sun, 30 Oct 2022 16:42:51 +0200 Subject: [PATCH] fixes --- include/w65c02s.h | 4 ++-- test/Makefile | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/include/w65c02s.h b/include/w65c02s.h index 7e07156..deb50e8 100644 --- a/include/w65c02s.h +++ b/include/w65c02s.h @@ -1946,7 +1946,7 @@ static unsigned w65c02s_mode_relative_bit(W65C02S_PARAMS_MODE) { /* skip one read cycle if no page boundary crossed */ if (W65C02S_GET_HI(cpu->pc = W65C02S_TR.new_pc) == W65C02S_GET_HI(W65C02S_TR.old_pc)) - W65C02S_SKIP_TO_NEXT(3); + W65C02S_SKIP_TO_NEXT(6); W65C02S_READ(W65C02S_TR.old_pc); w65c02s_irq_latch_slow(cpu); W65C02S_CYCLE(6) @@ -2062,7 +2062,7 @@ static unsigned w65c02s_mode_rmw_absolute_x(W65C02S_PARAMS_MODE) { W65C02S_TR.ea += cpu->x; /* if not INC and DEC and we did not cross a page, skip cycle. */ if (!penalty) W65C02S_SKIP_TO_NEXT(4); - W65C02S_READ(cpu->pc - 1); + W65C02S_READ(W65C02S_TR.ea); } W65C02S_CYCLE(4) W65C02S_TR.data = W65C02S_READ(W65C02S_TR.ea); diff --git a/test/Makefile b/test/Makefile index a7616a4..ea270d2 100644 --- a/test/Makefile +++ b/test/Makefile @@ -39,16 +39,16 @@ all: $(PROGS) %.o: %.c $(HEADERS) $(CC) $(CFLAGS) $(CEFLAGS) -I$(LIBPATH) -c -o $@ $< -monitor: $(LIBFILES) monitor.o +monitor: $(LIBFILES) monitor.o $(HEADERS) $(LD) -o $@ $^ $(LFLAGS) -busdump: $(LIBFILES) busdump.o +busdump: $(LIBFILES) busdump.o $(HEADERS) $(LD) -o $@ $^ $(LFLAGS) -benchmark: $(LIBFILES) benchmark.o +benchmark: $(LIBFILES) benchmark.o $(HEADERS) $(LD) -o $@ $^ $(LFLAGS) -breaktest: $(LIBFILES) breaktest.o +breaktest: $(LIBFILES) breaktest.o $(HEADERS) $(LD) -o $@ $^ $(LFLAGS) clean: