+atari2600land Posted August 10, 2020 Share Posted August 10, 2020 I'm making a game where a bird drops the ball on top of a wall. I got the ball in after a few hours BUT the ball still goes and draws itself even after it lands on the wall, making it look like this: It does this no matter whether I try to set ENABL to 0 or not. Not only that, the ball height is only supposed to be 4 pixels tall and not stretched like that. Why is it doing this? What am I doing wrong? (Keep in mind that if you decide to help and download the asm file, it is actually under 1,000 lines. The rest is data.) bert12a.asm Quote Link to comment Share on other sites More sharing options...
+Karl G Posted August 10, 2020 Share Posted August 10, 2020 The problem is with setting of VDELBL. The branch to skip setting VDELBL is never taken since you do a clc earlier. I'm not sure what you were going for there, but commenting out the "stx VDELBL" line allows the ball to appear the expected height. Draw_Ball: ; prime ENABL so ball can appear on topmost scanline of Arena ; prep ball's Y position for 2LK lda PlayerY+4 ; get the balls's Y position clc ; adc #1 ; add 1 to compensate for priming of ball ; lsr ; divide by 2 for the 2LK position sta Temp ; save for position calculations bcs NoDelayBL ; if carry is set we don't need Vertical Delay ldx #1 ; preload X for setting VDELPx stx VDELBL ; carry was clear, so set Vertical Delay Quote Link to comment Share on other sites More sharing options...
+atari2600land Posted August 10, 2020 Author Share Posted August 10, 2020 I want the ball to land on the wall, though. So I commented out that part and set the value to stop it at 4 instead of 5 and I get this: lda PlayerY+4 cmp #4 beq MMMM lda PlayerY+4 sbc #1 ; make Ball fall. sta PlayerY+4 lda PlayerY+4 cmp #4 bne MMMM Quote Link to comment Share on other sites More sharing options...
+atari2600land Posted August 10, 2020 Author Share Posted August 10, 2020 A solution: Make wall taller. 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.