Jump to content
IGNORED

Horizontal Positioning Issue


Karl G

Recommended Posts

I am seeing a discrepancy in where objects are positioned when looking in the Stella debugger vs where I think they should be positioned. In this project, I am positioning all 5 objects, and only one shows as the same position as I have set.

 

I have tried various versions of the SetHorizPos routine with the same results, so I assume the issue is elsewhere:

 

Player 0 position: 65 (Expected: 64)

Player 1 position: 76 (Expected: 76)
Missile 0 position: 23 (Expected: 24)
Missile 1 position: 134 (Expected: 135)
Ball position: 9 (Expected: 10)
Any idea what I am missing here? Thanks in advance for any advice.
post-48311-0-93883600-1537201861_thumb.png
Link to comment
Share on other sites

Here's the relevant info

 

It's just the normal offset for the positions of the objects. A RESP will set the objects position to the pixel at which the write happens. But the TIA needs a couple of cycles from the pixel clock to set up the actual output. Therefore all objects will be delayed by a couple of pixels.

 

The offset is 4 pixels for missiles and the ball, 5 pixels for single-width players, and 6 pixels for double- and quadrouple-width players. You need to take these offsets into account when calculating the position of an object.

This matches your -1 for missiles and ball, +1 for your wide player, using a regular player as the reference. All is well.

  • Like 2
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...