Guest User

Untitled

a guest
Aug 16th, 2018
144
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. controller_strobe:
  2. @controller1:
  3.     lda #$01
  4.     sta $4016
  5.     lda #$00
  6.     sta $4016
  7.     lda control_pad1
  8.     sta control_old1
  9.     ldx #$08
  10. :   lda $4016
  11.     lsr A
  12.     ror control_pad1
  13.     dex
  14.     bne :-
  15.  
  16.     lda control_pad3
  17.     sta control_old3
  18.     ldx #$08
  19. :   lda $4016
  20.     lsr A
  21.     ror control_pad3
  22.     dex
  23.     bne :-
  24.  
  25.     ldx #$08
  26. :   lda $4016
  27.     lsr A
  28.     ror
  29.     dex
  30.     bne :-
  31.     cmp #$10
  32.     bne @controller1
  33. @controller2:
  34.     lda control_pad2
  35.     sta control_old2
  36.     ldx #$08
  37. :   lda $4017
  38.     lsr A
  39.     ror control_pad2
  40.     dex
  41.     bne :-
  42.  
  43.     lda control_pad4
  44.     sta control_old4
  45.     ldx #$08
  46. :   lda $4017
  47.     lsr A
  48.     ror control_pad4
  49.     dex
  50.     bne :-
  51.  
  52.     ldx #$08
  53. :   lda $4017
  54.     lsr A
  55.     ror
  56.     dex
  57.     bne :-
  58.     cmp #$10
  59.     bne @controller2
  60.     rts
Add Comment
Please, Sign In to add comment