28 ; 0000: tilemap for BG1 (32x32 4bpp: 512b)
29 ; 2048: BG3-base (h/v offsets)
30 ; 8192: tile data (16k)
31 vmem_tiles_offs = 4096 ; 4k words
32 vmem_hoffs_offs = 1024 ; 2k words
33 vmem_voffs_offs = vmem_hoffs_offs + 32
47 setreg REG_SETINI, $4 ; 239 lines
48 setreg REG_BGMODE, $02 ; mode 2, 8x8 tiles
49 setreg REG_BG12NBA, $1 ; tiles at offs 8kb
50 setreg REG_TM, $1 ; main screen: BG1
51 setreg REG_BG3SC, (vmem_hoffs_offs / 1024) << 2
64 cpx #32 ; 16 entries 2 bytes each
67 pea logo4bpp_tiles_width * logo4bpp_tiles_height / 2
77 pea logo4bpp_tilemap_rows * logo4bpp_tilemap_cols * 2
108 lda #(vmem_voffs_offs & $ff)
110 lda #(vmem_voffs_offs >> 8)
127 ; global scroll for the first column
134 lda #$20 ; enable for BG1
145 ; copy_vmem(vmem_offset, src, num_words)
147 rep #$30 ; 16bit accumulator and index registers
151 tsc ; and make it point to the stack
153 sep #$20 ; restore 8bit accum
162 lda #$80 ; auto incerment after wiriting high byte
180 sep #$10 ; back to 8bit index registers
216 setreg REG_VMAINC, $80
249 setreg REG_CGWSEL, $30
251 setreg REG_COLDATA, $e0
270 setreg REG_VMAINC, $80
272 @clear: stz REG_VMDATAL
282 .byte $20 ; fast ROM, LoROM mapping
284 .byte 1 ; ROM banks 1 = 32k
286 .byte 2 ; country europe/oceania/asia
287 .byte 0 ; developer id: none
288 .byte 0 ; ROM version
289 .word $ffff ; checksum complement
296 .word 0 ; NMI (vblank)
304 .word 0 ; NMI (vblank)