Skip to content

Cycle calculation errors #5

Description

@shokre

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions