1
0

ROMbootloader.asm 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535
  1. ; Bootloader. Is stored in ROM.
  2. ; Writes logo to on screen as a form of POST. Initial color is white, and will be changed to blue/green after the bootloader is finished to indicate success.
  3. ; Copies SPI to SDRAM, or copies UART bootloader from ROM to SDRAM, and finally jumps to SDRAM after setting the color of the logo and clearing all registers
  4. ; Because assembler assumes the program is executed from SDRAM, the addresses need to be updated after compilation!
  5. Main:
  6. ; LOGO
  7. ; set palette table
  8. load32 0xC00400 r1 ; pallette address
  9. load 0xFF r2 ; white as primary color, others black
  10. write 0 r1 r2
  11. ; copy pattern table
  12. load32 0xC00000 r3 ; r3 = data dest
  13. addr2reg LOGOTABLE r2 ; r2 = data source
  14. add r3 253 r1 ; r1 = loop end (if r3 matches)
  15. CopyPatternLoop:
  16. ; copy data to VRAM
  17. read 0 r2 r15
  18. write 0 r3 r15
  19. add r2 1 r2 ; increase source address
  20. add r3 1 r3 ; increase dest address
  21. beq r3 r1 2 ; keep looping until all 252 words are copied
  22. jump CopyPatternLoop
  23. ; copy window tile table
  24. load32 0xC015E5 r3 ; r3 = data dest: window tile address 0xC01420 + position offset
  25. addr2reg TILETABLE r2 ; r2 = data source
  26. load 0 r4 ; r4 = loop counter
  27. load 96 r1 ; r1 = loop end
  28. load 16 r5 ; r5 = next line counter
  29. load 32 r8 ; r8 = shift variable
  30. CopyTileLoop:
  31. sub r8 8 r8 ; remove 8 from shift variable
  32. read 0 r2 r10 ; read data
  33. shiftr r10 r8 r10 ; shift data to right
  34. write 0 r3 r10 ; write shifted data to vram
  35. bne r0 r8 3 ; if we shifted the last byte
  36. add r2 1 r2 ; increase source address
  37. load 32 r8 ; set shift variable back
  38. add r3 1 r3 ; increase dest address
  39. sub r5 1 r5 ; reduce line counter
  40. add r4 1 r4 ; increase counter
  41. bne r5 r0 3
  42. load 16 r5
  43. add r3 24 r3
  44. beq r4 r1 2 ; keep looping until all tiles are copied
  45. jump CopyTileLoop
  46. CopySPI:
  47. load32 0xC02741 r1 ; r1 = Boot mode address: 0xC02741
  48. ; This part is deprecated, but does not hurt to leave in
  49. ; It was used when GPI[0] was used to dertermine the boot mode
  50. read 0 r1 r2 ; r2 = GPIO values
  51. load 0b00000001 r3 ; r3 = bitmask for GPI[0]
  52. and r2 r3 r3 ; r3 = GPI[0]
  53. ; if Boot mode is high, then jump to UART bootloader copy function
  54. beq r0 r3 2
  55. jump CopyUartLoader
  56. load32 0x800000 r1 ; r1 = address 0 of SPI: 0x800000
  57. load 0 r2 ; r2 = address 0 of SDRAM: 0x00, and loop var
  58. read 2 r1 r3 ; r3 = last address to copy +1, which is in line 3 of SPI code
  59. CopyLoop:
  60. ; copy SPI to SDRAM
  61. read 0 r1 r15
  62. write 0 r2 r15
  63. add r1 1 r1 ; incr SPI address
  64. add r2 1 r2 ; incr SDRAM address
  65. beq r2 r3 2 ; copy is done when SDRAM address == number of lines to copy
  66. jump CopyLoop ; copy is not done yet, copy next address
  67. EndBootloader:
  68. ; before clearing registers, we change the color of the logo to blue/green-ish to indicate success
  69. load32 0xC00400 r1 ; pallette address
  70. load 0b10010 r2 ; Blue/green as main color, others black
  71. write 0 r1 r2
  72. ; clear registers
  73. load 0 r1
  74. load 0 r2
  75. load 0 r3
  76. load 0 r4
  77. load 0 r5
  78. load 0 r6
  79. load 0 r7
  80. load 0 r8
  81. load 0 r9
  82. load 0 r10
  83. load 0 r11
  84. load 0 r12
  85. load 0 r13
  86. load 0 r14
  87. load 0 r15
  88. jump 0 ; bootloader is done, jump to sdram
  89. CopyUartLoader:
  90. addr2reg UARTBOOTLOADERDATAPART1 r1 ; r1 = (src) address of first part of UART bootloader data in ROM
  91. load 0 r2 ; r2 = (dst) address 0 of SDRAM: 0x00, and loop var
  92. load 4 r4 ; r4 = number of words to copy at the start
  93. CopyStartLoop:
  94. ; copy ROM to SDRAM
  95. read 0 r1 r15
  96. write 0 r2 r15
  97. add r1 1 r1 ; incr ROM address
  98. add r2 1 r2 ; incr SDRAM address
  99. beq r2 r4 2 ; copy is done when SDRAM address == number of words to copy at the start
  100. jump CopyStartLoop ; copy is not done yet, copy next address
  101. addr2reg UARTBOOTLOADERDATAPART2 r1 ; r1 = (src) address of second part of UART bootloader data in ROM
  102. load32 0x3FDE04 r2 ; r2 = (dst) address 4185604 of SDRAM: 0x3FDE04, and loop var
  103. load32 0x3FDE6D r3 ; r3 = r2 + number of words to copy = 0x3FDE04 + 105 = 0x3FDE6D
  104. CopyEndLoop:
  105. ; copy ROM to SDRAM
  106. read 0 r1 r15
  107. write 0 r2 r15
  108. add r1 1 r1 ; incr ROM address
  109. add r2 1 r2 ; incr SDRAM address
  110. beq r2 r3 2 ; copy is done when SDRAM address == number of lines to copy
  111. jump CopyEndLoop ; copy is not done yet, copy next address
  112. jump EndBootloader ; copy is done
  113. UARTBOOTLOADERDATAPART1:
  114. .dw 0b10010000000000000000000000000110 ; Jump to constant address 3, first part of of UART bootloader data (to SDRAM 0, 4 words long)
  115. .dw 0b10010000011111111011110011001010 ; Jump to constant address 4185701
  116. .dw 0b00000000001111111101111001101101 ; Length of program
  117. .dw 0b11111111111111111111111111111111 ; Halt
  118. UARTBOOTLOADERDATAPART2:
  119. .dw 0b00011100001001110010001100010001 ;Set r1 to 0x2723
  120. .dw 0b00011101000000001100000000010001 ;Set highest 16 bits of r1 to 0xC0
  121. .dw 0b11101111111111111111000100000010 ;Read at address in r1 with offset -1 to r2
  122. .dw 0b00011100000000000000000001000100 ;Set r4 to 0
  123. .dw 0b01100000000000000010010011011000 ;(unsigned) If r4 != r13, then jump to offset 2
  124. .dw 0b00010101000000000001100000100010 ;Compute r2 << 24 and write result to r2
  125. .dw 0b00011100000000000000000101000100 ;Set r4 to 1
  126. .dw 0b01100000000000000010010011011000 ;(unsigned) If r4 != r13, then jump to offset 2
  127. .dw 0b00010101000000000001000000100010 ;Compute r2 << 16 and write result to r2
  128. .dw 0b00011100000000000000001001000100 ;Set r4 to 2
  129. .dw 0b01100000000000000010010011011000 ;(unsigned) If r4 != r13, then jump to offset 2
  130. .dw 0b00010101000000000000100000100010 ;Compute r2 << 8 and write result to r2
  131. .dw 0b00011100000000000000001101000100 ;Set r4 to 3
  132. .dw 0b01100000000000000010010011011000 ;(unsigned) If r4 != r13, then jump to offset 2
  133. .dw 0b00010101000000000000000000100010 ;Compute r2 << 0 and write result to r2
  134. .dw 0b00010011000000000000000111011101 ;Compute r13 + 1 and write result to r13
  135. .dw 0b00000011000000000000001011101110 ;Compute r2 + r14 and write result to r14
  136. .dw 0b00011100000000000000010001000100 ;Set r4 to 4
  137. .dw 0b01100000000000000010010011010000 ;(unsigned) If r4 == r13, then jump to offset 2
  138. .dw 0b01000000000000000000000000000000 ;Return from interrupt
  139. .dw 0b00010110000000000001100011100100 ;Compute r14 >> 24 and write result to r4
  140. .dw 0b11010000000000000000000101000000 ;Write value in r4 to address in r1 with offset 0
  141. .dw 0b00010110000000000001000011100100 ;Compute r14 >> 16 and write result to r4
  142. .dw 0b11010000000000000000000101000000 ;Write value in r4 to address in r1 with offset 0
  143. .dw 0b00010110000000000000100011100100 ;Compute r14 >> 8 and write result to r4
  144. .dw 0b11010000000000000000000101000000 ;Write value in r4 to address in r1 with offset 0
  145. .dw 0b00010110000000000000000011100100 ;Compute r14 >> 0 and write result to r4
  146. .dw 0b11010000000000000000000101000000 ;Write value in r4 to address in r1 with offset 0
  147. .dw 0b01000000000000000000000000000000 ;Return from interrupt
  148. .dw 0b00011100000000000000000000010001 ;Set r1 to 0x0000
  149. .dw 0b00011101000000000100000000010001 ;Set highest 16 bits of r1 to 0x40
  150. .dw 0b00011100000000000000000000100010 ;Set r2 to 0
  151. .dw 0b00011100000000000000000000110011 ;Set r3 to 0
  152. .dw 0b00000000000000000000001000000101 ;Compute r2 OR r0 and write result to r5
  153. .dw 0b00000000000000000000000100000110 ;Compute r1 OR r0 and write result to r6
  154. .dw 0b11100000000000000000011000001111 ;Read at address in r6 with offset 0 to r15
  155. .dw 0b11010000000000000000010111110000 ;Write value in r15 to address in r5 with offset 0
  156. .dw 0b00010011000000000000000101010101 ;Compute r5 + 1 and write result to r5
  157. .dw 0b00010011000000000000000101100110 ;Compute r6 + 1 and write result to r6
  158. .dw 0b00010011000000000000000100110011 ;Compute r3 + 1 and write result to r3
  159. .dw 0b01100000000000000010001111100000 ;(unsigned) If r3 == r14, then jump to offset 2
  160. .dw 0b10010000011111111011110001001110 ;Jump to constant address 4185639
  161. .dw 0b01110000000000000000000000000000 ;Clear L1 Cache
  162. .dw 0b01000000000000000000000000000000 ;Return from interrupt
  163. .dw 0b01000000000000000000000000000000 ;Return from interrupt
  164. .dw 0b00011100000000000000010000010001 ;Set r1 to 4
  165. .dw 0b01100000000000000010110100010000 ;(unsigned) If r13 == r1, then jump to offset 2
  166. .dw 0b10010000011111111011110000001000 ;Jump to constant address 4185604
  167. .dw 0b00011100001001110010001100010001 ;Set r1 to 0x2723
  168. .dw 0b00011101000000001100000000010001 ;Set highest 16 bits of r1 to 0xC0
  169. .dw 0b11101111111111111111000100000010 ;Read at address in r1 with offset -1 to r2
  170. .dw 0b00011100000000000000000000110011 ;Set r3 to 0
  171. .dw 0b01100000000000000010001111001000 ;(unsigned) If r3 != r12, then jump to offset 2
  172. .dw 0b00010101000000000001100000100010 ;Compute r2 << 24 and write result to r2
  173. .dw 0b00011100000000000000000100110011 ;Set r3 to 1
  174. .dw 0b01100000000000000010001111001000 ;(unsigned) If r3 != r12, then jump to offset 2
  175. .dw 0b00010101000000000001000000100010 ;Compute r2 << 16 and write result to r2
  176. .dw 0b00011100000000000000001000110011 ;Set r3 to 2
  177. .dw 0b01100000000000000010001111001000 ;(unsigned) If r3 != r12, then jump to offset 2
  178. .dw 0b00010101000000000000100000100010 ;Compute r2 << 8 and write result to r2
  179. .dw 0b00011100000000000000001100110011 ;Set r3 to 3
  180. .dw 0b01100000000000000010001111001000 ;(unsigned) If r3 != r12, then jump to offset 2
  181. .dw 0b00010101000000000000000000100010 ;Compute r2 << 0 and write result to r2
  182. .dw 0b00010011000000000000000111001100 ;Compute r12 + 1 and write result to r12
  183. .dw 0b00000011000000000000001010101010 ;Compute r2 + r10 and write result to r10
  184. .dw 0b00011100000000000000010000110011 ;Set r3 to 4
  185. .dw 0b01100000000000000010110000110100 ;(unsigned) If r12 >= r3, then jump to offset 2
  186. .dw 0b01000000000000000000000000000000 ;Return from interrupt
  187. .dw 0b00011100000000000000000001000100 ;Set r4 to 0x0000
  188. .dw 0b00011101000000000100000001000100 ;Set highest 16 bits of r4 to 0x40
  189. .dw 0b00000011000000000000101101000100 ;Compute r11 + r4 and write result to r4
  190. .dw 0b11010000000000000000010010100000 ;Write value in r10 to address in r4 with offset 0
  191. .dw 0b00010011000000000000000110111011 ;Compute r11 + 1 and write result to r11
  192. .dw 0b00011100000000000000000000010001 ;Set r1 to 0
  193. .dw 0b00011100000000000000000000100010 ;Set r2 to 0
  194. .dw 0b00011100000000000000000000110011 ;Set r3 to 0
  195. .dw 0b00011100000000000000000001000100 ;Set r4 to 0
  196. .dw 0b00011100000000000000000001010101 ;Set r5 to 0
  197. .dw 0b00011100000000000000000001100110 ;Set r6 to 0
  198. .dw 0b00011100000000000000000001110111 ;Set r7 to 0
  199. .dw 0b00011100000000000000000010001000 ;Set r8 to 0
  200. .dw 0b00011100000000000000000010011001 ;Set r9 to 0
  201. .dw 0b00011100000000000000000010101010 ;Set r10 to 0
  202. .dw 0b00011100000000000000000011001100 ;Set r12 to 0
  203. .dw 0b01100000000000000010101111100000 ;(unsigned) If r11 == r14, then jump to offset 2
  204. .dw 0b01000000000000000000000000000000 ;Return from interrupt
  205. .dw 0b00011100001001110010001100010001 ;Set r1 to 0x2723
  206. .dw 0b00011101000000001100000000010001 ;Set highest 16 bits of r1 to 0xC0
  207. .dw 0b00011100000000000110010000110011 ;Set r3 to 100
  208. .dw 0b11010000000000000000000100110000 ;Write value in r3 to address in r1 with offset 0
  209. .dw 0b00011100001001110011100100010001 ;Set r1 to 0x2739
  210. .dw 0b00011101000000001100000000010001 ;Set highest 16 bits of r1 to 0xC0
  211. .dw 0b00011100000000000000000100100010 ;Set r2 to 1
  212. .dw 0b11010000000000000000000100100000 ;Write value in r2 to address in r1 with offset 0
  213. .dw 0b11010000000000000001000100100000 ;Write value in r2 to address in r1 with offset 1
  214. .dw 0b01000000000000000000000000000000 ;Return from interrupt
  215. .dw 0b01000000000000000000000000000000 ;Return from interrupt
  216. .dw 0b11000000000000000000000000001000 ;Save Interrupt ID to r8
  217. .dw 0b00011100000000000000001110011001 ;Set r9 to 3
  218. .dw 0b01100000000000000010100010011000 ;(unsigned) If r8 != r9, then jump to offset 2
  219. .dw 0b10010000011111111011110001100010 ;Jump to constant address 4185649
  220. .dw 0b00011100000000000000000110011001 ;Set r9 to 1
  221. .dw 0b01100000000000000010100010011000 ;(unsigned) If r8 != r9, then jump to offset 2
  222. .dw 0b10010000011111111011110001000010 ;Jump to constant address 4185633
  223. .dw 0b01000000000000000000000000000000 ;Return from interrupt
  224. TILETABLE:
  225. .db 0 1 2 3 4 5 0 0 0 0 0 0 0 0 0 0
  226. .db 6 7 8 9 10 11 12 0 0 0 0 0 0 0 0 0
  227. .db 13 14 15 16 17 18 19 20 21 22 23 24 25 26 0 0
  228. .db 29 30 31 32 33 34 35 36 37 38 39 40 41 42 0 0
  229. .db 45 46 47 48 49 50 51 0 0 52 53 54 55 56 0 0
  230. .db 58 59 60 61 62 63 0 0 0 0 0 0 0 0 0 0
  231. LOGOTABLE: ; 252 words long
  232. .dw 0 0 0 0 ; tile 0, background, so always empty
  233. .dw 0b00000000000000000000000000000011
  234. .dw 0b00000000000000110000000000000000
  235. .dw 0b00000000110000000000001111110000
  236. .dw 0b00000000111111000000000000111111 ; tile 1
  237. .dw 0b00000000000000001100000000000000
  238. .dw 0b11110000000000001111110000000000
  239. .dw 0b00111111000011110000110000111111
  240. .dw 0b00000000111111000000001111111100 ; tile 2
  241. .dw 0b00000000000000000000000000000000
  242. .dw 0b00000000000000000000000000000011
  243. .dw 0b11111111000011111111111111000011
  244. .dw 0b00000011111100000000000011111100 ; tile 3
  245. .dw 0b00000000000000000011110000000000
  246. .dw 0b11111100000000001111000000000000
  247. .dw 0b11000000001111000000000011111100
  248. .dw 0b00000011111100000000111111000000 ; tile 4
  249. .dw 0b00000000000000000000000000000000
  250. .dw 0b00000000000000000000000000000000
  251. .dw 0b00000000000000000000000000000000
  252. .dw 0b00000000000000000011000000000000 ; tile 5
  253. .dw 0b00000000000000000000000000000000
  254. .dw 0b00000000000000000000000011110000
  255. .dw 0b00000000111111000000000000111111
  256. .dw 0b00110000000011111111110000000011 ; tile 6
  257. .dw 0b11110000000011111111110000000000
  258. .dw 0b00111111000000000000111111000011
  259. .dw 0b00000011000011110000000000111111
  260. .dw 0b11000000111111001100001111110000 ; tile 7
  261. .dw 0b00001111110011110011111100000011
  262. .dw 0b11111100000000001111110000000000
  263. .dw 0b11001111000000000000001111000000
  264. .dw 0b00000000111100000000000000111100 ; tile 8
  265. .dw 0b00000000001111111100000000001111
  266. .dw 0b11110000000000110011110000000000
  267. .dw 0b00001111000000000000001111000000
  268. .dw 0b00000000111100000000000000111100 ; tile 9
  269. .dw 0b00001111000000001100000000000011
  270. .dw 0b11110000000011111111110000111111
  271. .dw 0b00111111000011000000111111000000
  272. .dw 0b00000011111100000000000011111100 ; tile 10
  273. .dw 0b11111100000000001111000000000000
  274. .dw 0b11000000000000000000000011110000
  275. .dw 0b00000011111100000000111111000000
  276. .dw 0b00111111000000000011110000000011 ; tile 00
  277. .dw 0b00000000000000000000000000000000
  278. .dw 0b00000000000000000000000000000000
  279. .dw 0b00000000000000000000000000000000
  280. .dw 0b11000000000000001111000000000000 ; tile 12
  281. .dw 0b00111111000000000000111111000000
  282. .dw 0b00000011111100000000000011000011
  283. .dw 0b00000000000011110000000000111111
  284. .dw 0b00000000111111000000000011110000 ; tile 13
  285. .dw 0b00001111110000000011111100000000
  286. .dw 0b11111100000000001111000000000000
  287. .dw 0b11000000001111110000000000110011
  288. .dw 0b00000000111111110000001111000000 ; tile 14
  289. .dw 0b00000000111111110000000011111111
  290. .dw 0b00000000111111110000000011111111
  291. .dw 0b00000000111111110000000011111111
  292. .dw 0b00000000111111110000000011111111 ; tile 15
  293. .dw 0b11111111111111111111111111111111
  294. .dw 0b11111111111111111100000000000000
  295. .dw 0b11000000000000001100000000000000
  296. .dw 0b11111111111111001111111111111100 ; tile 16
  297. .dw 0b11111100001111111111110000001111
  298. .dw 0b11111100000000110000000000000000
  299. .dw 0b00000000000000000000000000000000
  300. .dw 0b00000000000000000000000000000000 ; tile 17
  301. .dw 0b00000000000011111100000000111111
  302. .dw 0b11110000111111001111110000110000
  303. .dw 0b00111111000000000000111111000000
  304. .dw 0b00111111111100001111000011110000 ; tile 18
  305. .dw 0b11000011111111110000001111111111
  306. .dw 0b00000011111111110000001111111111
  307. .dw 0b00000011111111110000001111111111
  308. .dw 0b00000011111111110000001111111111 ; tile 19
  309. .dw 0b11111111111111001111111111111100
  310. .dw 0b11111111111111000000000000111111
  311. .dw 0b00000000001111110000000000111111
  312. .dw 0b00000000001111110000000000111111 ; tile 20
  313. .dw 0b00000000000000000000000000000000
  314. .dw 0b00000000000000001111000000001111
  315. .dw 0b11110000000011111111000000001111
  316. .dw 0b11110000000011111111000000001111 ; tile 21
  317. .dw 0b00111111111111110011111111111111
  318. .dw 0b00111111111111111111110000000000
  319. .dw 0b11111100000000001111110000000000
  320. .dw 0b11111100000000001111110000000000 ; tile 22
  321. .dw 0b11111111110000001111111111000000
  322. .dw 0b11111111110000000000001111111111
  323. .dw 0b00000011111111110000001111111111
  324. .dw 0b00000000000000000000000000000000 ; tile 23
  325. .dw 0b00000000000000110000000000000011
  326. .dw 0b00000000000000110000000011111111
  327. .dw 0b00000000111111110000000011111111
  328. .dw 0b00000000111111110000000011111111 ; tile 24
  329. .dw 0b11111111111111111111111111111111
  330. .dw 0b11111111111111111100000000000000
  331. .dw 0b11000000000000001100000000000000
  332. .dw 0b11000000000000001100000000000000 ; tile 25
  333. .dw 0b11111100000000001111110000000000
  334. .dw 0b11111100000000000011111111110000
  335. .dw 0b00111111111100000011111111110000
  336. .dw 0b00000000000000000000000000000000 ; tile 26
  337. .dw 0b00000000000000000000000000000000
  338. .dw 0b00000000000000000000000000001111
  339. .dw 0b00000000000011110000000011111111
  340. .dw 0b00000000111111000000111111111100 ; tile 27
  341. .dw 0b00111111110000000011111111000000
  342. .dw 0b00111111110000001111111111000000
  343. .dw 0b11111111110000001111111111000000
  344. .dw 0b00111111110000000011111111000000 ; tile 28
  345. .dw 0b00000000111100000000000011110000
  346. .dw 0b00000000111111000000000000111111
  347. .dw 0b00000000000011110000000011000011
  348. .dw 0b00000011111100000000111111000000 ; tile 29
  349. .dw 0b00001111000000000011110000001111
  350. .dw 0b11110000000011001100000000001111
  351. .dw 0b11000000001111001111000011110000
  352. .dw 0b11111111110000000011111100000000 ; tile 30
  353. .dw 0b00000000111111111100000011111111
  354. .dw 0b11000000111111111100000011111111
  355. .dw 0b00000000111111110000000011111111
  356. .dw 0b00000000111111110000000011111111 ; tile 31
  357. .dw 0b11111111111111001100000000000000
  358. .dw 0b11000000000000001100000000000000
  359. .dw 0b11000000000011111100000000001100
  360. .dw 0b11000000000011111111000000000000 ; tile 32
  361. .dw 0b00000000000000110000000011111111
  362. .dw 0b00000000110011000000000011111100
  363. .dw 0b11000000000000001100000000000000
  364. .dw 0b11000000000000111111000000001111 ; tile 33
  365. .dw 0b11000000111100000000000011110000
  366. .dw 0b00000011111100000000111111000000
  367. .dw 0b00111111000000001111110000110000
  368. .dw 0b11110000111111001100000000111111 ; tile 34
  369. .dw 0b00000011111111110000001111111111
  370. .dw 0b00000011111111110000001111111111
  371. .dw 0b00000011111111110000001111111111
  372. .dw 0b00000011111111110000001111111111 ; tile 35
  373. .dw 0b00000000001111111111111111111100
  374. .dw 0b11111111111111001111111111111100
  375. .dw 0b11111111111111000000000000000000
  376. .dw 0b00000000000000000000000000000000 ; tile 36
  377. .dw 0b11110000000011110000000000001111
  378. .dw 0b00000000000011110000000000001111
  379. .dw 0b00000000000011110000000000001111
  380. .dw 0b00000000000011110000000000001111 ; tile 37
  381. .dw 0b11111100000000001111110000000000
  382. .dw 0b11111100000000001111110000000000
  383. .dw 0b11111100000000001111110000000000
  384. .dw 0b11111100000000001111110000000000 ; tile 38
  385. .dw 0b00000000000000001111111111111111
  386. .dw 0b11111111111111111111111111111111
  387. .dw 0b11111111111111110000001111111111
  388. .dw 0b00000011111111110000001111111111 ; tile 39
  389. .dw 0b00000000111111110000000011111111
  390. .dw 0b00000000111111110000000011111111
  391. .dw 0b00000000111111110000000011111111
  392. .dw 0b00000000111111110000000011111111 ; tile 40
  393. .dw 0b11000000000000001100000000000000
  394. .dw 0b11000000000000001100000000000000
  395. .dw 0b11000000000000001100000000000000
  396. .dw 0b11000000000000001100000000000000 ; tile 41
  397. .dw 0b00000000000000000000000000000000
  398. .dw 0b00000000000000000000000000000000
  399. .dw 0b00000000000000000011111111110000
  400. .dw 0b00111111111100000011111111110000 ; tile 42
  401. .dw 0b00001111110000001111111111000000
  402. .dw 0b11111100000000001111111111111111
  403. .dw 0b11111111111111111111111111111111
  404. .dw 0b00000000000000000000000000000000 ; tile 43
  405. .dw 0b00111111110000000011111111000000
  406. .dw 0b00111111110000001111111111111111
  407. .dw 0b11111111111111111111111111111111
  408. .dw 0b00111111110000000011111111000000 ; tile 44
  409. .dw 0b00111111000000001111110000000011
  410. .dw 0b00110000000011110000000000111111
  411. .dw 0b00000000111111000000000011110000
  412. .dw 0b00000000000000000000000000000000 ; tile 45
  413. .dw 0b00001111110000001100001111110000
  414. .dw 0b11000000111111000000000000111111
  415. .dw 0b00000011000011110000111111000011
  416. .dw 0b00111111000000001111110000000000 ; tile 46
  417. .dw 0b00000000111111110000000011111111
  418. .dw 0b00000000111111110000000000001111
  419. .dw 0b11000000000011111111000000111100
  420. .dw 0b11111100111100000011111111000000 ; tile 47
  421. .dw 0b11111100000000001100111100000000
  422. .dw 0b11000011110000000000000011110000
  423. .dw 0b00000000001111000000000000001111
  424. .dw 0b00000000000000110000000000001111 ; tile 48
  425. .dw 0b00111100001111110000111111111100
  426. .dw 0b00000011111100000000111111000000
  427. .dw 0b00111111000011001111110000111111
  428. .dw 0b11110000000011111100000000000011 ; tile 49
  429. .dw 0b00000000000011110011110000000011
  430. .dw 0b00111111000000000000111111000000
  431. .dw 0b00000011111100000000000011110000
  432. .dw 0b11000000000000001111000000000000 ; tile 50
  433. .dw 0b11000011111111111111001111111111
  434. .dw 0b11000011111111110000000000000000
  435. .dw 0b00000000000000000000000000000000
  436. .dw 0b00000000000000000000000000000000 ; tile 51
  437. .dw 0b00111111111111110011111111111111
  438. .dw 0b00111111111111110000000000000000
  439. .dw 0b00000000000000000000000000000000
  440. .dw 0b00000000000000000000000000000000 ; tile 52
  441. .dw 0b11111111111111111111111111111111
  442. .dw 0b11111111111111110000000000000000
  443. .dw 0b00000000000000000000000000000000
  444. .dw 0b00000000000000000000000000000000 ; tile 53
  445. .dw 0b00000000000000110000000000000011
  446. .dw 0b00000000000000110000000000000000
  447. .dw 0b00000000000000000000000000000000
  448. .dw 0b00000000000000000000000000000000 ; tile 54
  449. .dw 0b11111111111111111111111111111111
  450. .dw 0b11111111111111110000000000000000
  451. .dw 0b00000000000000000000000000000000
  452. .dw 0b00000000000000000000000000000000 ; tile 55
  453. .dw 0b11111100000000001111110000000000
  454. .dw 0b11111100000000000000000000000000
  455. .dw 0b00000000000000000000000000000000
  456. .dw 0b00000000000000000000000000000000 ; tile 56
  457. .dw 0b00111111110000000011111111000000
  458. .dw 0b00111111110000000000000000000000
  459. .dw 0b00000000000000000000000000000000
  460. .dw 0b00000000000000000000000000000000 ; tile 57
  461. .dw 0b00000000000000110000000000000000
  462. .dw 0b00000000000000000000000000000000
  463. .dw 0b00000000000000000000000000000000
  464. .dw 0b00000000000000000000000000000000 ; tile 58
  465. .dw 0b11110000000011111100000000111111
  466. .dw 0b00000000111111000000001111110000
  467. .dw 0b00000011110000000000000000000000
  468. .dw 0b00000000000000110000000000000011 ; tile 59
  469. .dw 0b00001111110000000000001111110000
  470. .dw 0b00000000111111000000110000111111
  471. .dw 0b00111111000011111111110000000000
  472. .dw 0b11110000000000001100000000000000 ; tile 60
  473. .dw 0b00000000001111110000000011111100
  474. .dw 0b00000011111100001111111111000011
  475. .dw 0b11111111000011110000000000000011
  476. .dw 0b00000000000000000000000000000000 ; tile 61
  477. .dw 0b00001111000000000000111111000000
  478. .dw 0b00000011111100000000000011111100
  479. .dw 0b11000000001111001111000000000000
  480. .dw 0b11111100000000000011110000000000 ; tile 62
  481. .dw 0b11111100000000000011000000000000
  482. .dw 0b00000000000000000000000000000000
  483. .dw 0b00000000000000000000000000000000
  484. .dw 0b00000000000000000000000000000000 ; tile 63
  485. ; interrupt handlers are required for assembler, but will be removed in bootloader, since no interrupts are possible during bootloading
  486. Int:
  487. reti