Jump to content
IGNORED

Multisprite kernel m1 color hack issue


Al_Nafuur

Recommended Posts

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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 by orange808
  • Like 1
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...