X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?p=snes_test1;a=blobdiff_plain;f=test.asm;h=15d23a3c0d0adcb3a92987a7b737303ba350787e;hp=da5f5ec5a91f6bf1f016b2da1c81b89710dca0fb;hb=HEAD;hpb=6b4a9266e17c7fa3f54d0492c4a01b44fc5d3fe0 diff --git a/test.asm b/test.asm index da5f5ec..15d23a3 100644 --- a/test.asm +++ b/test.asm @@ -9,7 +9,7 @@ .segment "code" ; VMEM map - ; 0000: tilemap for BG1 (32x32 4bpp: 512b) + ; 0000: tilemap for BG1 (32x32 word tile refs, 2kb) ; 2048: BG3-base (h/v offsets) ; 8192: tile data (16k) vmem_tiles_offs = 4096 ; 4k words @@ -17,9 +17,11 @@ vmem_voffs_offs = vmem_hoffs_offs + 32 sei + ; get out of 6502 emulation mode clc xce + ; initialize stack I16 ldx #$1fff txs @@ -102,9 +104,7 @@ mainloop: ldx ncol bne @per_tile_offs ; global scroll for the first column - ;sta REG_BG1VOFS sta vscroll - ;stz REG_BG1VOFS bra @end @per_tile_offs: @@ -113,9 +113,6 @@ mainloop: asl tax ; x = ncol << 1 pla - ;sta REG_VMDATAL - ;lda #$20 ; enable for BG1 - ;sta REG_VMDATAH sta shadow_voffs,x inx lda #$20 @@ -150,7 +147,7 @@ mainloop: A16 jmp mainloop - ; copy_vmem(vmem_offset, src, num_words) + ; copy_vmem(vmem_offset, src, num_bytes) copy_vmem: rep #$30 ; 16bit accumulator and index registers .a16 @@ -164,7 +161,7 @@ copy_vmem: ; $3 return address ; $5 vmem_offs ; $7 src - ; $9 num_words + ; $9 num_bytes lda #$80 ; auto incerment after wiriting high byte sta REG_VMAINC