joelanders/r6502 — pull request #6 by haramako (2014-04-10 12:21:37+00:00)
Title: fix indirect jmp resolve indirect twice.

Repost from #3, `* Indirect jump (etc. "jmp (addr)")`

> It looks like you're making indirect jump behave exactly the same as direct jump? And I think I have the behavior correct for indirect,y addressing.

It's seems resolving indirect access **twice**, in `decode_arg()` and `jmp()`.
so `jmp (arg)` must jump to `*arg`, but jump to `**arg`.

I'm not sure where I should resolve indirect access in `decode_arg()` and `jump()`.
How do you think?

----
example code

lda #$34
sta $1000
lda #$12
sta $1001
jmp ($1000)

must jump to $1234, but $0000 ( == `*($1234)` )