+Al_Nafuur Posted March 25, 2022 Share Posted March 25, 2022 I want to hack the multisprite kernel so that missile1 has a different color ($00) when it is not drawn on the same scanline than one of the multisprites (player1 - player5) So I changed line 396 of the multisprite_kernel.asm from: sta GRP1 ;+5 16 so Ball gets drawn to: sta COLUP1 ;+5 16 so Ball gets drawn To disable the multisprites in the empty scanlines I had to add a %00000000 to the sprite definition of the multisprites (see my attached modified version of ex_multisprite_9_objects.bas) This all works fine for missile1 and the multisprite players, but unfortunately the side effect of my hack is that player0 and the ball are not getting drawn correctly (mostly when they are not in the same scanline with a multisprite) Can anyone explain what is happening here and what I am doing wrong? ex_multisprite_9_objects_m1_hack.bas.bin ex_multisprite_9_objects_m1_hack.bas multisprite_kernel.asm Quote Link to comment Share on other sites More sharing options...
orange808 Posted March 25, 2022 Share Posted March 25, 2022 Probably related to VDELxx. 1 Quote Link to comment Share on other sites More sharing options...
+Karl G Posted March 25, 2022 Share Posted March 25, 2022 What he said. If VDELP0 and VDELBL are set, then drawing of those objects will wait for a write to GRP1 before displaying. 1 Quote Link to comment Share on other sites More sharing options...
+Al_Nafuur Posted March 26, 2022 Author Share Posted March 26, 2022 When VDELP0 and VDELBL are not set the example works much better. But GRP0 is written midscanline and P0 "wobbles" when it is at the right side of the screen and a P1 multisprite is repositioned at the same scanline. Quote Link to comment Share on other sites More sharing options...
orange808 Posted March 26, 2022 Share Posted March 26, 2022 (edited) Of course. I didn't look closely at the kernel, but we can safely assume that the P0 sprite information and the state of the ball for the next scanline are: being "preloaded" while the current scanline is being "drawn". VDELxx holds the "new" values in a latch and the updates are "released" (to simultaneously update the state of P1, P0, and the ball) when GRP1 is updated. So, the ball and player 0 updates are being loaded early and updates are delayed until player1 is updated. As a result, when you turn off VDELxx, the ball and player0 are immediately updated midscanline--instead of waiting for player1 to be updated. Edited March 26, 2022 by orange808 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.