Just Jeff Posted August 21, 2022 Share Posted August 21, 2022 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. 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. Any ideas? Thanks- -Jeff Quote Link to comment Share on other sites More sharing options...
Thomas Jentzsch Posted August 21, 2022 Share Posted August 21, 2022 (edited) 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 August 21, 2022 by Thomas Jentzsch Quote Link to comment Share on other sites More sharing options...
Just Jeff Posted August 21, 2022 Author Share Posted August 21, 2022 Ah so it is the reason then since it a little quicker. I always thought it was used because it took exactly the same amount of time as the code it skips. Guess I never looked into it. Thanks! Quote Link to comment Share on other sites More sharing options...
Thomas Jentzsch Posted August 21, 2022 Share Posted August 21, 2022 In this case the overall code needs the same amount of cycles. As long as (),y doesn't cross a page. Quote Link to comment Share on other sites More sharing options...
Just Jeff Posted August 21, 2022 Author Share Posted August 21, 2022 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. Quote Link to comment Share on other sites More sharing options...
Thomas Jentzsch Posted August 21, 2022 Share Posted August 21, 2022 Depends on how you setup the pointers and which values Y has. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.