Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Cycle calculation errors #5

Open
shokre opened this issue Nov 18, 2021 · 1 comment
Open

Cycle calculation errors #5

shokre opened this issue Nov 18, 2021 · 1 comment

Comments

@shokre
Copy link

shokre commented Nov 18, 2021

It appears that cycle count constants are not correct.

Consulting this reference, all of the branch instructions take 2cy, +1 if branch occurs on the same page, and +2 if branch occurs on different page. Yet in the emulator most of the branch instructions are set to 4cy (except BVS 3cy), and +1 if the branch occurs. Page checking is not accounted.

Consulting the same reference LDA oper,X takes 4cy, +1 if page boundary is crossed, yet the emulator consumes 5cy regardless of crossing page boundary.

    ldx #0
    lda $22F0,x

and

    ldx #$20
    lda $22F0,x

(excluding LDX) both consume 5cy in the emulator, regardless of first not crossing the page boundary.

Same issue is also present with LDA oper,Y

@shokre
Copy link
Author

shokre commented Nov 18, 2021

Same problem is also present in JS version of the emulator.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant