You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
"*" : add 1 cycle if page boundary is crossed.
add 1 cycle on branches if taken.
From cpu.cpp line 349: if (branch) { int8_t offset = m_bus.read(r_PC++); ++m_skipCycles; auto newPC = static_cast<Address>(r_PC + offset); setPageCrossed(r_PC, newPC, 2); r_PC = newPC; }
If the branch is taken, and page is crossed, m_skipCycles will increase by 3. But according to the document, only 2 cycles should be added.
Is there any mistake, or did I misunderstand the document?
Thank you.
The text was updated successfully, but these errors were encountered:
Hi!
I was mostly following this IIRC. There it says:
2 (+1 if branch succeeds
+2 if to a new page)
I think I may have misunderstood this to mean that it adds +1 if branch succeeds and another +2 if to a new page.
Another source here also seems to match what you point out. I'll run some test roms and do some more digging. Thanks for pointing out!
According to Opcode matrix from http://www.oxyron.de/html/opcodes02.html:
From cpu.cpp line 349:
if (branch) { int8_t offset = m_bus.read(r_PC++); ++m_skipCycles; auto newPC = static_cast<Address>(r_PC + offset); setPageCrossed(r_PC, newPC, 2); r_PC = newPC; }
If the branch is taken, and page is crossed,
m_skipCycles
will increase by 3. But according to the document, only 2 cycles should be added.Is there any mistake, or did I misunderstand the document?
Thank you.
The text was updated successfully, but these errors were encountered: