Link6415 Posted November 20, 2016 Share Posted November 20, 2016 So, I have a raster interrupt that uses one sprite for two clouds, horizontally independent of each other, with fixed vertical positions. It looks good until I hold down a key on the keyboard, then the interrupt doesn't work at all! The sprite is a set of two clouds. After the first half of the sprite is drawn (the first cloud), the X position is changed, and the second half is drawn. But when I hold down a key, the second cloud is not repositioned (it reverts to the same horizontal position as the first cloud), so it seems to me that the interrupt is not taking place. I'm a noob, so (as usual) excuse me if this is a silly question. Quote Link to comment Share on other sites More sharing options...
TMR Posted November 20, 2016 Share Posted November 20, 2016 Hard to say without seeing code but it sounds like you're using $ea31 to exit an interrupt at some point not far above the the split that's changing the sprite X position. An easy way to tell is to leave the runtime doing an inc $d020 / jmp *-$03 and you'll be able to see where the CPU is busy and what happens to that use when you press a key. $ea31 only really needs to be called once a frame so if every interrupt is exiting with it that will be using a lot more CPU grunt than is needed as well. 1 Quote Link to comment Share on other sites More sharing options...
Link6415 Posted November 20, 2016 Author Share Posted November 20, 2016 Yep, that was it. Changed to $ea81 and it works great! Thanks! 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.