Wickeycolumbus Posted June 25, 2008 Share Posted June 25, 2008 I am trying to read the left joystick button in my game vong, but it is not working out for me. This is what I have: ;; Writing a 1 into D3 of Movement_Status starts game, 0 stops it. bit INPT4 beq Button_Not_Pushed lda Movement_Status ora #%00001000 sta Movement_Status Button_Not_Pushed ;; ... latter on lda Movement_Status and #%00001000 beq Dont_Adjust_Positions ;; Position adjustment code here Dont_Adjust_Positions I can not find anything wrong with this code. When 0 is written to D3 of Movement_Status at powerup, and nothing can move, and when i press the button on the left joystick, the screen stays motionless. Is there a problem with my button reading? When I change it so a 1 is written to D3 at powerup, the sprites move like the game has started. Quote Link to comment Share on other sites More sharing options...
SeaGtGruff Posted June 25, 2008 Share Posted June 25, 2008 I am trying to read the left joystick button in my game vong, but it is not working out for me. This is what I have: ;; Writing a 1 into D3 of Movement_Status starts game, 0 stops it. bit INPT4 beq Button_Not_Pushed lda Movement_Status ora #%00001000 sta Movement_Status Button_Not_Pushed ;; ... latter on lda Movement_Status and #%00001000 beq Dont_Adjust_Positions ;; Position adjustment code here Dont_Adjust_Positions I can not find anything wrong with this code. When 0 is written to D3 of Movement_Status at powerup, and nothing can move, and when i press the button on the left joystick, the screen stays motionless. Is there a problem with my button reading? When I change it so a 1 is written to D3 at powerup, the sprites move like the game has started. You should change the "beq Button_Not_Pushed" to "bmi Button_Not_Pushed." Or if you wanted instead to branch to some line label called "Button_Pushed," you could use "bpl Button_Pushed." Michael Quote Link to comment Share on other sites More sharing options...
Wickeycolumbus Posted June 25, 2008 Author Share Posted June 25, 2008 You should change the "beq Button_Not_Pushed" to "bmi Button_Not_Pushed." Or if you wanted instead to branch to some line label called "Button_Pushed," you could use "bpl Button_Pushed." Michael Thank you! I thought I tried that but I guess that I did not, well any way thanks, it works now. vong20080625.bin 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.