Add an airplane tile.
This commit is contained in:
parent
41155fadec
commit
788d4a884b
23
pewpew.asm
23
pewpew.asm
@ -70,12 +70,18 @@ Start:
|
|||||||
; Write something recognizable into our scratch space.
|
; Write something recognizable into our scratch space.
|
||||||
jsr FillScratch
|
jsr FillScratch
|
||||||
|
|
||||||
; Start the background color as a lime green.
|
; Start the background color as a sky blue.
|
||||||
lda #31
|
|
||||||
sta $23
|
|
||||||
lda #16
|
lda #16
|
||||||
|
sta $23
|
||||||
|
lda #31
|
||||||
sta $24
|
sta $24
|
||||||
|
|
||||||
|
; Player's initial starting location.
|
||||||
|
lda #(256 / 4)
|
||||||
|
sta $20
|
||||||
|
lda #((224 - 8) / 2)
|
||||||
|
sta $21
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
MainLoop:
|
MainLoop:
|
||||||
@ -110,19 +116,20 @@ LoadPaletteAndTileData:
|
|||||||
lda #32 ; Palette entries for BG2 start at 32.
|
lda #32 ; Palette entries for BG2 start at 32.
|
||||||
sta CGADDR
|
sta CGADDR
|
||||||
-
|
-
|
||||||
lda.l PaletteData, x
|
lda.l UntitledPalette, x
|
||||||
sta CGDATA
|
sta CGDATA
|
||||||
inx
|
inx
|
||||||
cpx #8 ; 8 bytes of palette data.
|
cpx #8 ; 8 bytes of palette data.
|
||||||
bne -
|
bne -
|
||||||
|
|
||||||
; DMA 0 source address & bank.
|
; DMA 0 source address & bank.
|
||||||
ldx #TileData
|
ldx #UntitledData
|
||||||
stx DMA0SRC
|
stx DMA0SRC
|
||||||
lda #:TileData
|
lda #:UntitledData
|
||||||
sta DMA0SRCBANK
|
sta DMA0SRCBANK
|
||||||
; DMA 0 transfer size.
|
; 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
|
sty DMA0SIZE
|
||||||
; DMA 0 control register.
|
; DMA 0 control register.
|
||||||
; Transfer type 001 = 2 addresses, LH.
|
; Transfer type 001 = 2 addresses, LH.
|
||||||
@ -144,7 +151,7 @@ LoadPaletteAndTileData:
|
|||||||
; Set word address for accessing VRAM to $6000.
|
; Set word address for accessing VRAM to $6000.
|
||||||
ldx #$6000 ; BG 2 starts here.
|
ldx #$6000 ; BG 2 starts here.
|
||||||
stx VMADDR
|
stx VMADDR
|
||||||
ldx #$0002 ; Stick one tile into BG2.
|
ldx #$0004 ; Stick one tile into BG2.
|
||||||
stx VMDATA
|
stx VMDATA
|
||||||
|
|
||||||
; Set up the screen. 16x16 tiles for BG2, 8x8 tiles elsewhere, mode 0.
|
; Set up the screen. 16x16 tiles for BG2, 8x8 tiles elsewhere, mode 0.
|
||||||
|
20
tiles.asm
20
tiles.asm
@ -1,13 +1,13 @@
|
|||||||
; Created with eKid's pcx2snes converter ;
|
; 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 $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 $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 $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 $10, $00, $28, $10, $A8, $90, $64, $58, $E3, $DC, $30, $0F, $AC, $93, $60, $5F
|
||||||
.db $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00
|
.db $00, $00, $00, $00, $00, $00, $F8, $00, $80, $00, $70, $80, $0E, $F0, $01, $FE
|
||||||
.db $00, $00, $00, $00, $00, $00, $00, $00, $00, $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
|
.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 $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 $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 $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 $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:
|
UntitledPalette:
|
||||||
.db $1F, $7C, $00, $00, $FF, $7F, $1F, $00
|
.db $1F, $7C, $00, $00, $FF, $7F, $1F, $02
|
||||||
|
|
||||||
; 20 tiles (12 spaces)
|
; 24 tiles (8 spaces)
|
||||||
; 320 bytes
|
; 384 bytes
|
||||||
|
Loading…
Reference in New Issue
Block a user