TMPA264.TMP 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183
  1. ;:ts=8
  2. R0 equ 1
  3. R1 equ 5
  4. R2 equ 9
  5. R3 equ 13
  6. code
  7. xdef __initInternalRegisters
  8. func
  9. __initInternalRegisters:
  10. longa on
  11. longi on
  12. tsc
  13. sec
  14. sbc #L2
  15. tcs
  16. phd
  17. tcd
  18. stz |__characterLocation
  19. stz |__characterLocation+2
  20. stz |__characterLocation+4
  21. stz |__characterLocation+6
  22. jsr __initDebugMap
  23. L4:
  24. pld
  25. tsc
  26. clc
  27. adc #L2
  28. tcs
  29. rts
  30. L2 equ 0
  31. L3 equ 1
  32. ends
  33. efunc
  34. code
  35. xdef __preInit
  36. func
  37. __preInit:
  38. longa on
  39. longi on
  40. tsc
  41. sec
  42. sbc #L5
  43. tcs
  44. phd
  45. tcd
  46. L7:
  47. pld
  48. tsc
  49. clc
  50. adc #L5
  51. tcs
  52. rts
  53. L5 equ 0
  54. L6 equ 1
  55. ends
  56. efunc
  57. code
  58. xdef __main
  59. func
  60. __main:
  61. longa on
  62. longi on
  63. tsc
  64. sec
  65. sbc #L8
  66. tcs
  67. phd
  68. tcd
  69. jsr __initInternalRegisters
  70. pea #<$0
  71. pea #<$0
  72. pea #<$1000
  73. jsr __setTileMapLocation
  74. pea #<$0
  75. pea #<$2000
  76. jsr __setCharacterLocation
  77. pea #<$100
  78. pea #<$0
  79. lda #<__title_pal
  80. pha
  81. jsr __CGRAMLoad
  82. sep #$20
  83. longa off
  84. lda #$1
  85. sta |8453
  86. rep #$20
  87. longa on
  88. sep #$20
  89. longa off
  90. lda #$1
  91. sta |8492
  92. rep #$20
  93. longa on
  94. sep #$20
  95. longa off
  96. lda #$0
  97. sta |8493
  98. rep #$20
  99. longa on
  100. sep #$20
  101. longa off
  102. lda #$f
  103. sta |8448
  104. rep #$20
  105. longa on
  106. stz |__currentScrollEvent
  107. stz |__scrollValue
  108. jsr __debug
  109. L10001:
  110. brl L10001
  111. L8 equ 0
  112. L9 equ 1
  113. ends
  114. efunc
  115. code
  116. xdef __IRQHandler
  117. func
  118. __IRQHandler:
  119. longa on
  120. longi on
  121. tsc
  122. sec
  123. sbc #L10
  124. tcs
  125. phd
  126. tcd
  127. L12:
  128. pld
  129. tsc
  130. clc
  131. adc #L10
  132. tcs
  133. rts
  134. L10 equ 0
  135. L11 equ 1
  136. ends
  137. efunc
  138. code
  139. xdef __NMIHandler
  140. func
  141. __NMIHandler:
  142. longa on
  143. longi on
  144. tsc
  145. sec
  146. sbc #L13
  147. tcs
  148. phd
  149. tcd
  150. L15:
  151. pld
  152. tsc
  153. clc
  154. adc #L13
  155. tcs
  156. rts
  157. L13 equ 0
  158. L14 equ 1
  159. ends
  160. efunc
  161. xref __debug
  162. xref __initDebugMap
  163. xref __CGRAMLoad
  164. xref __setCharacterLocation
  165. xref __setTileMapLocation
  166. udata
  167. xdef __scrollValue
  168. __scrollValue
  169. ds 2
  170. ends
  171. udata
  172. xdef __currentScrollEvent
  173. __currentScrollEvent
  174. ds 2
  175. ends
  176. udata
  177. xdef __pad1
  178. __pad1
  179. ds 2
  180. ends
  181. xref __characterLocation
  182. xref __title_pal
  183. end