From 23bdc734bbbd38d6bae573635d4638c3e755928d Mon Sep 17 00:00:00 2001 From: greg Date: Wed, 14 Dec 2016 11:05:38 -0800 Subject: [PATCH] Trying to get VRAM DMA to work For tile map --- test_gfx.asm | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/test_gfx.asm b/test_gfx.asm index 43624f8..6a783a1 100644 --- a/test_gfx.asm +++ b/test_gfx.asm @@ -26,7 +26,7 @@ VBlank: Video_Port_Control ldx #DEST - stx $2116 ; $2116/2117 is 2byte address for VRAM upload/download. most significant bit must be 0 + stx $2116 ; $2116/2117 is 2byte address for VRAM upload/download. most significant bit must be 0 lda #:SOURCE ; source bank ldx #SOURCE ; source offset @@ -64,7 +64,6 @@ Start: ; size (last argument) depends on color mode ; location is beginning of VRAM - Load_Block_to_VRAM Tiles, $0000, (8*2*2), ; put character data at VRAM $0000, tile data at $0400 lda #$04 @@ -72,10 +71,15 @@ Start: lda #$00 sta $210b ; BG1 character location ($1000 word intervals - can't go over $8000 b/c size of VRAM) + stz $1337 + ; main screen designation lda #%00000001 sta $212c ; enable bkg 1, +; Load_Block_to_VRAM TileMap, $0400, 16 + Load_Block_to_VRAM Tiles, $0000, (8*2*2), + ldx #$0400 ; load $0400 (VRAM address of tile data) TileLoadLoop: @@ -95,7 +99,6 @@ TileLoadLoop: cpx #$0780 ; $400 - $780 seems to be limit of snes screen tile memory bne TileLoadLoop - lda #%10000001 ; enable NMI and joypads sta $4200 @@ -156,4 +159,14 @@ Tiles: .db %00111100 .db %00111100 +TileMap: + .db $00, $01 + .db $00, $01 + .db $00, $01 + .db $00, $01 + .db $00, $01 + .db $00, $01 + .db $00, $01 + .db $00, $01 + .ENDS