+Karl G Posted September 17, 2018 Share Posted September 17, 2018 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. 3dpong.asm Quote Link to comment Share on other sites More sharing options...
RevEng Posted September 17, 2018 Share Posted September 17, 2018 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. 2 Quote Link to comment Share on other sites More sharing options...
+Karl G Posted September 18, 2018 Author Share Posted September 18, 2018 Thanks! This saves me from pulling out what remains of my hair. :-) 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.