Primordial Ooze Posted October 29, 2012 Share Posted October 29, 2012 I'm trying to reverse the sprite when it intersects the left or right boundry. Here is the code i am using: sec lda #$08 sbc REFP0 sta REFP0 However it only seems to work once. Any assistance would be greatly appreciated. Sincerely, Primordial Ooze Quote Link to comment Share on other sites More sharing options...
+SpiceWare Posted October 29, 2012 Share Posted October 29, 2012 (edited) REFP0 is a write only register. I believe when you read from it you're really reading a mirror of INPT4. It's better to use EOR to toggle bits. lda MEMORY eor #$08 sta MEMORY To do what you want, try something like this: MY_REFP0 = $80 ; use a RAM location to save the state lda MY_REFP0 eor #$08 sta MY_REFP0 sta REFP0 Edited October 29, 2012 by SpiceWare 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.