PacManPlus Posted April 30, 2020 Author Share Posted April 30, 2020 (edited) Thank you so much again! I'm sorry about all of the questions, but... If I increment 'frameskip' at the start of a loop, and decrement it at the beginning of the end-of-screen interrupt: if the iteration of the loop takes too long (it's supposed to only happen once per frame), the interrupt will happen and decrement the 'frameskip' before the iteration of the loop is finished. After the interrupt PC comes back to whatever part of the loop it hadn't finished. Once the iteration of the loop is finished it waits for vbl (where the end-of-screen interrupt happens). Doesn't that mean that 'frameskip' will actually be -1 once the interrupt hits again? Edited April 30, 2020 by PacManPlus Quote Link to comment Share on other sites More sharing options...
RevEng Posted April 30, 2020 Share Posted April 30, 2020 Yeah, you're right. I got my inc and dec mixed up. I have this in 7800basic, but currently I'm not using it for any particular purpose. 1 Quote Link to comment Share on other sites More sharing options...
PacManPlus Posted April 30, 2020 Author Share Posted April 30, 2020 ok cool - thank you. Just wanted to make sure I wasn't missing anything. Thanks! Quote Link to comment Share on other sites More sharing options...
RevEng Posted April 30, 2020 Share Posted April 30, 2020 You're welcome! 1 Quote Link to comment Share on other sites More sharing options...
PacManPlus Posted April 30, 2020 Author Share Posted April 30, 2020 Ok, so I had an idea: I took the 'waitvbl' out of the end of the loop and the game sped up like crazy. I *think* that means that my main loop isn't taking longer than 1 frame to complete, as it started to do more than 1 iteration of the loop per frame... I think that's correct... Quote Link to comment Share on other sites More sharing options...
RevEng Posted April 30, 2020 Share Posted April 30, 2020 Sure, it means that's the case on average. It's not a guarantee that some set of circumstances doesn't cause a frameskip every once and a while. 1 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.