Jump to content
IGNORED

Is byte $2C unstable for cycles?


Just Jeff

Recommended Posts

Good Morning..

 

I don't recall ever running into this before.  Looks like a typical page boundary issue, but no amount of align 256s seem to be able to fix it.

image.png.850e03bfbd0e99bb3cb6824a9cf78ad2.png image.png.1337760e96666681bd254363aa686f48.png

The shearing here is my fault, but note how it changes when the taxi is on the line.  So it seems obvious I'm gaining a cycle.

 

I did see this in the debugger.  What's up with the "4-5" cycles  Whatever it is, it appears I'm getting it when the taxi flies through it, but that doesn't make sense either since the branch is taken when the taxi is present.

image.png.7edb5f9b84d76ff7c7af66c37d8cb9d4.png

 

Any ideas?

 

Thanks-

-Jeff

Link to comment
Share on other sites

The "4-5" means, the instruction takes 4-5=-1 cycles when combined with the next instruction, which is skipped with "bit". So 4 in total. Alternatively we could output -1 here, but there might be situations where you want to know the correct number of cycles per instruction. Which is 4 here.

 

To me it looks like (Player0Ptr),y is crossing a page boundary. Then it takes 6 cycles. 

Edited by Thomas Jentzsch
Link to comment
Share on other sites

    align 256 

TaxiGearUpGfx:
    .byte %00000000,%00000000,%00100100,%11011010,%11111111,%01000110,%01001000,%00110000	;Taxi, gear up

Player0Gfx: 
    .byte %10000001,%01000010,%00100100,%11011010,%11111111,%01000110,%01001000,%00110000	;Taxi, gear down
Player0_HEIGHT = * - Player0Gfx 

;Additional frames for landing collision checking
    .byte %00000000,%01000010,%00100100,%11011010,%11111111,%01000110,%01001000,%00110000   ;Both legs short
    .byte %00000001,%01000010,%00100100,%11011010,%11111111,%01000110,%01001000,%00110000   ;Left leg short
    .byte %10000000,%01000010,%00100100,%11011010,%11111111,%01000110,%01001000,%00110000   ;right leg short

 

Hmm well I figured this would have prevented that, but it did not.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...