lerugray Posted February 18, 2021 Share Posted February 18, 2021 (edited) Hello all, I'm currently teaching myself how to program the 2600 using the 8bit workshop tutorials. Currently, I am wondering how to slow down player movement. Here is the code I am currently using for player movement. ; Read joystick movement and apply to object 0 MoveJoystick ; Move vertically ; (up and down are actually reversed since ypos starts at bottom) ldx YPos lda #%00100000 ;Up? bit SWCHA bne SkipMoveUp cpx #2 bcc SkipMoveUp dex SkipMoveUp lda #%00010000 ;Down? bit SWCHA bne SkipMoveDown cpx #183 bcs SkipMoveDown inx SkipMoveDown stx YPos ; Move horizontally ldx XPos lda #%01000000 ;Left? bit SWCHA bne SkipMoveLeft cpx #16 bcc SkipMoveLeft dex SkipMoveLeft lda #%10000000 ;Right? bit SWCHA bne SkipMoveRight cpx #153 bcs SkipMoveRight inx SkipMoveRight stx XPos rts Normally, I am used to coding for the NES and I would be able to just DEX and NOP until the player slowed down, wondering what I would do here in this instance. Thank you! And here is a link to my current test project, took me all day yesterday how to figure out the 'ground' bit of playfield 2600 Test Edited February 18, 2021 by lerugray Quote Link to comment Share on other sites More sharing options...
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.