summaryrefslogtreecommitdiffstatshomepage
path: root/src/emu/cpu/m6502
diff options
context:
space:
mode:
author Olivier Galibert <galibert@pobox.com>2015-01-28 13:23:46 +0100
committer Olivier Galibert <galibert@pobox.com>2015-01-28 13:23:08 +0100
commit56d51fd23bb02bac5b5724bb73ee564460a39acb (patch)
treeabc81fbd77c6e6186beeb9e57e43eed1f495825e /src/emu/cpu/m6502
parent1cab2192d7240f53a5196a2b52715533dfc81544 (diff)
m65ce02: Generalize Kale's findings [O. Galibert]
Diffstat (limited to 'src/emu/cpu/m6502')
-rw-r--r--src/emu/cpu/m6502/m6502.c2
-rw-r--r--src/emu/cpu/m6502/om65ce02.lst18
2 files changed, 10 insertions, 10 deletions
diff --git a/src/emu/cpu/m6502/m6502.c b/src/emu/cpu/m6502/m6502.c
index 062560cdbc8..9c35ec6da61 100644
--- a/src/emu/cpu/m6502/m6502.c
+++ b/src/emu/cpu/m6502/m6502.c
@@ -579,7 +579,7 @@ offs_t m6502_device::disassemble_generic(char *buffer, offs_t pc, const UINT8 *o
break;
case DASM_rw2:
- sprintf(buffer, " $%04x", (pc & 0xf0000) | UINT16(pc + 3 + INT16((opram[2] << 8) | opram[1])));
+ sprintf(buffer, " $%04x", (pc & 0xf0000) | UINT16(pc + 2 + INT16((opram[2] << 8) | opram[1])));
flags |= 3;
break;
diff --git a/src/emu/cpu/m6502/om65ce02.lst b/src/emu/cpu/m6502/om65ce02.lst
index d5c2e543e46..6fdf244a8b1 100644
--- a/src/emu/cpu/m6502/om65ce02.lst
+++ b/src/emu/cpu/m6502/om65ce02.lst
@@ -245,7 +245,7 @@ bcc_rw2
TMP = read_pc();
TMP = set_h(TMP, read_pc());
if(!(P & F_C))
- PC += TMP;
+ PC += TMP-1;
prefetch();
bcs_ce_rel
@@ -258,7 +258,7 @@ bcs_rw2
TMP = read_pc();
TMP = set_h(TMP, read_pc());
if(P & F_C)
- PC += TMP;
+ PC += TMP-1;
prefetch();
beq_ce_rel
@@ -271,7 +271,7 @@ beq_rw2
TMP = read_pc();
TMP = set_h(TMP, read_pc());
if(P & F_Z)
- PC += TMP;
+ PC += TMP-1;
prefetch();
bit_ce_abx
@@ -307,7 +307,7 @@ bmi_rw2
TMP = read_pc();
TMP = set_h(TMP, read_pc());
if(P & F_N)
- PC += TMP;
+ PC += TMP-1;
prefetch();
bne_ce_rel
@@ -320,7 +320,7 @@ bne_rw2
TMP = read_pc();
TMP = set_h(TMP, read_pc());
if(!(P & F_Z))
- PC += TMP;
+ PC += TMP-1;
prefetch();
bpl_ce_rel
@@ -333,7 +333,7 @@ bpl_rw2
TMP = read_pc();
TMP = set_h(TMP, read_pc());
if(!(P & F_N))
- PC += TMP;
+ PC += TMP-1;
prefetch();
bra_ce_rel
@@ -379,7 +379,7 @@ bsr_rw2
write(SP, PC);
dec_SP_ce();
TMP = set_h(TMP, read_pc());
- PC += TMP;
+ PC += TMP-1;
prefetch();
bvc_ce_rel
@@ -392,7 +392,7 @@ bvc_rw2
TMP = read_pc();
TMP = set_h(TMP, read_pc());
if(!(P & F_V))
- PC += TMP;
+ PC += TMP-1;
prefetch();
bvs_ce_rel
@@ -405,7 +405,7 @@ bvs_rw2
TMP = read_pc();
TMP = set_h(TMP, read_pc());
if(P & F_V)
- PC += TMP;
+ PC += TMP-1;
prefetch();
clc_ce_imp