Closed Schuemi closed 4 years ago
Hi, if branch ins goes to a new page, we should add one more tick only. see: http://6502.org/tutorials/6502opcodes.html#BEQ
A branch not taken requires two machine cycles. Add one if the branch is taken and add one more if the branch crosses a page boundary.
@PudgeMa this is closed by #37 I believe?
Hi, maybe I'm wrong (if so, sorry for that), but I can't find the two extra circles, if a branch goes to a new ram page. (see: http://obelisk.me.uk/6502/reference.html#BCC )
should this:
template<Flag f, bool v> void br() { s8 j = rd(imm()); if (P[f] == v) { T; PC += j; } }
be maybe something like this:
template<Flag f, bool v> void br() { s8 j = rd(imm()); if (P[f] == v) { T; if(cross(PC, j)) {T;T;} PC += j; } }
Thank you