diff --git a/pewpew.asm b/pewpew.asm index c045f86..dadd886 100644 --- a/pewpew.asm +++ b/pewpew.asm @@ -70,12 +70,18 @@ Start: ; Write something recognizable into our scratch space. jsr FillScratch - ; Start the background color as a lime green. - lda #31 - sta $23 + ; Start the background color as a sky blue. lda #16 + sta $23 + lda #31 sta $24 + ; Player's initial starting location. + lda #(256 / 4) + sta $20 + lda #((224 - 8) / 2) + sta $21 + MainLoop: @@ -110,19 +116,20 @@ LoadPaletteAndTileData: lda #32 ; Palette entries for BG2 start at 32. sta CGADDR - - lda.l PaletteData, x + lda.l UntitledPalette, x sta CGDATA inx cpx #8 ; 8 bytes of palette data. bne - ; DMA 0 source address & bank. - ldx #TileData + ldx #UntitledData stx DMA0SRC - lda #:TileData + lda #:UntitledData sta DMA0SRCBANK ; DMA 0 transfer size. - ldy #320 ; See the helpful comment in face.asm. + ; See the helpful comment in tiles.asm to find the size of the tile data. + ldy #384 sty DMA0SIZE ; DMA 0 control register. ; Transfer type 001 = 2 addresses, LH. @@ -144,7 +151,7 @@ LoadPaletteAndTileData: ; Set word address for accessing VRAM to $6000. ldx #$6000 ; BG 2 starts here. stx VMADDR - ldx #$0002 ; Stick one tile into BG2. + ldx #$0004 ; Stick one tile into BG2. stx VMDATA ; Set up the screen. 16x16 tiles for BG2, 8x8 tiles elsewhere, mode 0. diff --git a/tiles.asm b/tiles.asm index a6cb685..8b6c29e 100644 --- a/tiles.asm +++ b/tiles.asm @@ -1,13 +1,13 @@ ; Created with eKid's pcx2snes converter ; -TileData: +UntitledData: .db $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00 .db $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00 .db $07, $00, $18, $07, $20, $1F, $4C, $33, $50, $2F, $86, $79, $86, $79, $80, $7F .db $E0, $00, $18, $E0, $04, $F8, $32, $CC, $0A, $F4, $61, $9E, $61, $9E, $01, $FE - .db $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00 - .db $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00 - .db $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00 + .db $10, $00, $28, $10, $A8, $90, $64, $58, $E3, $DC, $30, $0F, $AC, $93, $60, $5F + .db $00, $00, $00, $00, $00, $00, $F8, $00, $80, $00, $70, $80, $0E, $F0, $01, $FE + .db $80, $00, $80, $00, $80, $00, $80, $00, $80, $00, $80, $00, $80, $00, $80, $00 .db $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00 .db $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00 .db $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00 @@ -21,9 +21,13 @@ TileData: .db $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00 .db $80, $7F, $9F, $60, $9F, $6F, $4F, $37, $47, $38, $20, $1F, $18, $07, $07, $00 .db $01, $FE, $F9, $06, $F9, $F6, $F2, $EC, $E2, $1C, $04, $F8, $18, $E0, $E0, $00 + .db $60, $5F, $AC, $93, $30, $0F, $E3, $DC, $64, $58, $A8, $90, $28, $10, $10, $00 + .db $01, $FE, $0E, $F0, $70, $80, $80, $00, $F8, $00, $00, $00, $00, $00, $00, $00 + .db $80, $00, $80, $00, $80, $00, $80, $00, $80, $00, $80, $00, $80, $00, $80, $00 + .db $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00 -PaletteData: - .db $1F, $7C, $00, $00, $FF, $7F, $1F, $00 +UntitledPalette: + .db $1F, $7C, $00, $00, $FF, $7F, $1F, $02 -; 20 tiles (12 spaces) -; 320 bytes +; 24 tiles (8 spaces) +; 384 bytes diff --git a/tiles.pcx b/tiles.pcx index 61013f9..37e2b8d 100644 Binary files a/tiles.pcx and b/tiles.pcx differ