Advertisement
Armakuni

asm koala and sid

Apr 29th, 2020
422
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.66 KB | None | 0 0
  1. sid_init = $2700
  2. sid_play = $0000
  3. ;---------------------------------
  4. ;Koalaview by iAN CooG/HokutoForce
  5. ;C64ASM version http://ready64.org/smf/index.php?topic=999.0
  6. ;---------------------------------
  7.  
  8. scrpos = $7f40
  9. scr = $5c00
  10. colpos = $8328
  11. col = $d800
  12. bkgcol = $8710
  13.  
  14. ;---------------------------------
  15. ;sysline
  16. ;---------------------------------
  17. *= $0801
  18. word eop
  19. word 7102
  20. byte $9e
  21. byte $32,$30,$36,$31,$00
  22. eop
  23. word 0
  24. ;---------------------------------
  25. ;to avoid unnecessary waste of mem
  26. ;stick the routine just after
  27. ;the koalapic, comment the above
  28. ;sysline and set *= $8711 instead
  29. ;---------------------------------
  30. ;;*= $8711
  31. sei
  32. lda #$00
  33. sta $d011
  34. sta $d020
  35. ldx #$00
  36. copy
  37. lda scrpos,x
  38. sta scr,x
  39. lda scrpos+$100,x
  40. sta scr+$100,x
  41. lda scrpos+$200,x
  42. sta scr+$200,x
  43. lda scrpos+$300,x
  44. sta scr+$300,x
  45. lda colpos,x
  46. sta col,x
  47. lda colpos+$100,x
  48. sta col+$100,x
  49. lda colpos+$200,x
  50. sta col+$200,x
  51. lda colpos+$300,x
  52. sta col+$300,x
  53. dex
  54. bne copy
  55. lda bkgcol
  56. sta $d021
  57. lda #$2e
  58. sta $d012
  59. lda #$78
  60. sta $d018
  61. lda #$02
  62. sta $dd00
  63. lda #$d8
  64. sta $d016
  65. lda #$3b
  66. sta $d011
  67.  
  68. kmain
  69. ;wait for any fire/space
  70. ; lda $dc01
  71. ; and $dc00
  72. ; and #$10
  73. ; bne kmain
  74.  
  75. ;----------------
  76. ;----sid section
  77. ;----------------
  78.  
  79.  
  80. lda #$00
  81. tax
  82. tay
  83. jsr sid_init
  84. sei
  85. lda #$7f
  86. sta $dc0d
  87. sta $dd0d
  88. lda #$01
  89. sta $d01a
  90. lda #$1b
  91. ldx #$08
  92. ldy #$14
  93. sta $d011
  94. stx $d016
  95. sty $d014
  96. lda #<irq
  97. ldx #>irq
  98. ldy #$7e
  99. sta $0314
  100. stx $0315
  101. sty $d012
  102. lda $dc0d
  103. lda $dd0d
  104. asl $d019
  105. cli
  106. loop inx
  107. stx $0400
  108. jmp loop
  109.  
  110. irq jsr sid_play
  111. asl $d019
  112. jmp $ea81
  113.  
  114. cli
  115. ;remove the space from buffer, if any
  116. ;cyclewaste, to wait $C6
  117. beq *+2
  118. sta $c6
  119. jsr $fda3
  120. jsr $e5a0
  121. lda $0286
  122. ldx #$00
  123. cram
  124. sta col,x
  125. sta col+$0100,x
  126. sta col+$0200,x
  127. sta col+$0300,x
  128. dex
  129. bne cram
  130. rts
  131. * = $0f82
  132. INCBIN "Ninja_eyes.sid"
  133. *= $6000
  134. incbin "narnia.kla",2
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement