Advertisement
Guest User

Untitled

a guest
Nov 3rd, 2017
112
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. //-- invite irq subroutines --
  2. //------------------------elr-
  3. //
  4.  
  5. //Set the namespace for these
  6. //  routines so they will be
  7. //  called e.g.: 'irq.start'
  8. //  instead of 'start'.
  9. .filenamespace irq
  10.  
  11. //Import header.
  12. .import source "irq.h.ka"
  13.  
  14. start: {
  15.     sei
  16.     .label startLineLo = [* + 1]
  17.     ldx #<startLine
  18.     .label startLineHi = [* + 1]
  19.     ldy #>startLine
  20.     :setRasterCompareLine()
  21.     :ld IRQ_VECTOR; #frameRoutine
  22.     :setVicInterrupt(RASTER, 1)
  23.     asl VIC.INTERRUPT
  24.     ldx #<startLine
  25.     cpx VIC.RASTER_LSB
  26.     beq [* - 3]
  27.     cli
  28.     rts
  29. }
  30.  
  31. frameRoutine: { //cycle 9-15
  32.     cld
  33.     :vicIntAck(RASTER)
  34.     sta a
  35.     stx x
  36.     sty y
  37.     chain:
  38.     bit scanKeyMatrix
  39.     jsr waveSpritesX
  40.     jsr layTopScreenCels
  41.     jsr layAnimScreenCels
  42.     jsr spriteMultiplex.frameRoutine
  43.     lda #0
  44.     jsr song.play
  45.     .label a = [* + 1]
  46.     lda #0
  47.     .label x = [* + 1]
  48.     ldx #0
  49.     .label y = [* + 1]
  50.     ldy #0
  51.     rti
  52. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement