20 ; 0000: tilemap for BG1 (32x32 4bpp: 512b)
21 ; 2048: BG3-base (h/v offsets)
22 ; 8192: tile data (16k)
23 vmem_tiles_offs = 4096 ; 4k words
24 vmem_hoffs_offs = 1024 ; 2k words
25 vmem_voffs_offs = vmem_hoffs_offs + 32
39 setreg REG_SETINI, $4 ; 239 lines
40 setreg REG_BGMODE, $02 ; mode 2, 8x8 tiles
41 setreg REG_BG12NBA, $1 ; tiles at offs 8kb
42 setreg REG_TM, $1 ; main screen: BG1
43 setreg REG_BG3SC, (vmem_hoffs_offs / 1024) << 2
56 cpx #32 ; 16 entries 2 bytes each
59 pea logo4bpp_tiles_width * logo4bpp_tiles_height / 2
69 pea logo4bpp_tilemap_rows * logo4bpp_tilemap_cols * 2
100 lda #(vmem_voffs_offs & $ff)
102 lda #(vmem_voffs_offs >> 8)
119 ; global scroll for the first column
126 lda #$20 ; enable for BG1
137 ; copy_vmem(vmem_offset, src, num_words)
139 rep #$30 ; 16bit accumulator and index registers
143 tsc ; and make it point to the stack
145 sep #$20 ; restore 8bit accum
154 lda #$80 ; auto incerment after wiriting high byte
172 sep #$10 ; back to 8bit index registers
208 setreg REG_VMAINC, $80
241 setreg REG_CGWSEL, $30
243 setreg REG_COLDATA, $e0
264 .byte $20 ; fast ROM, LoROM mapping
266 .byte 1 ; ROM banks 1 = 32k
268 .byte 2 ; country europe/oceania/asia
269 .byte 0 ; developer id: none
270 .byte 0 ; ROM version
271 .word $ffff ; checksum complement
278 .word 0 ; NMI (vblank)
286 .word 0 ; NMI (vblank)