Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //-- invite irq subroutines --
- //------------------------elr-
- //
- //Set the namespace for these
- // routines so they will be
- // called e.g.: 'irq.start'
- // instead of 'start'.
- .filenamespace irq
- //Import header.
- .import source "irq.h.ka"
- start: {
- sei
- .label startLineLo = [* + 1]
- ldx #<startLine
- .label startLineHi = [* + 1]
- ldy #>startLine
- :setRasterCompareLine()
- :ld IRQ_VECTOR; #frameRoutine
- :setVicInterrupt(RASTER, 1)
- asl VIC.INTERRUPT
- ldx #<startLine
- cpx VIC.RASTER_LSB
- beq [* - 3]
- cli
- rts
- }
- frameRoutine: { //cycle 9-15
- cld
- :vicIntAck(RASTER)
- sta a
- stx x
- sty y
- chain:
- bit scanKeyMatrix
- jsr waveSpritesX
- jsr layTopScreenCels
- jsr layAnimScreenCels
- jsr spriteMultiplex.frameRoutine
- lda #0
- jsr song.play
- .label a = [* + 1]
- lda #0
- .label x = [* + 1]
- ldx #0
- .label y = [* + 1]
- ldy #0
- rti
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement