Use 32x32 sprites for ship.
Also use neviksti's pcx2snes rather than eKid's.
This commit is contained in:
parent
e8d57e5cbe
commit
025d0ea3ec
@ -1,6 +1,6 @@
|
|||||||
@echo off
|
@echo off
|
||||||
pcx2snes sprites.pcx -osprites.asm -b4 -nSprite -d
|
pcx2snes -s32 -c16 -o16 -n sprites32
|
||||||
pcx2snes tiles.pcx -otiles.asm -b2 -nTile -d
|
pcx2snes -s16 -c4 -o4 -n tiles
|
||||||
wla-65816 -o pewpew.asm pewpew.o
|
wla-65816 -o pewpew.asm pewpew.o
|
||||||
wlalink -vr wlalink.cfg pewpew.smc
|
wlalink -vr wlalink.cfg pewpew.smc
|
||||||
del *.o
|
del *.o
|
34
pewpew.asm
34
pewpew.asm
@ -86,7 +86,7 @@ Start:
|
|||||||
; Player's initial starting location.
|
; Player's initial starting location.
|
||||||
lda #(256 / 4)
|
lda #(256 / 4)
|
||||||
sta $20
|
sta $20
|
||||||
lda #((224 - 8) / 2)
|
lda #((224 - 16) / 2)
|
||||||
sta $21
|
sta $21
|
||||||
|
|
||||||
|
|
||||||
@ -155,9 +155,8 @@ LoadPaletteAndTileData:
|
|||||||
stx DMA0SRC
|
stx DMA0SRC
|
||||||
lda #:SpriteData
|
lda #:SpriteData
|
||||||
sta DMA0SRCBANK
|
sta DMA0SRCBANK
|
||||||
; DMA 0 transfer size.
|
; DMA 0 transfer size. Equal to the size of sprites32.pic.
|
||||||
; See the helpful comment in sprites.asm to find the size of the tile data.
|
ldx #2048
|
||||||
ldx #640
|
|
||||||
stx DMA0SIZE
|
stx DMA0SIZE
|
||||||
; DMA 0 control register.
|
; DMA 0 control register.
|
||||||
; Transfer type 001 = 2 addresses, LH.
|
; Transfer type 001 = 2 addresses, LH.
|
||||||
@ -179,9 +178,8 @@ LoadPaletteAndTileData:
|
|||||||
stx DMA0SRC
|
stx DMA0SRC
|
||||||
lda #:TileData
|
lda #:TileData
|
||||||
sta DMA0SRCBANK
|
sta DMA0SRCBANK
|
||||||
; DMA 0 transfer size.
|
; DMA 0 transfer size. Equal to the size of tiles.pic.
|
||||||
; See the helpful comment in tiles.asm to find the size of the tile data.
|
ldx #512
|
||||||
ldx #384
|
|
||||||
stx DMA0SIZE
|
stx DMA0SIZE
|
||||||
; DMA 0 control register.
|
; DMA 0 control register.
|
||||||
; Transfer type 001 = 2 addresses, LH.
|
; Transfer type 001 = 2 addresses, LH.
|
||||||
@ -327,7 +325,7 @@ JoypadDown:
|
|||||||
cmp #$04
|
cmp #$04
|
||||||
bne JoypadLeft ; Button not pressed.
|
bne JoypadLeft ; Button not pressed.
|
||||||
lda $21
|
lda $21
|
||||||
cmp #(224 - 16)
|
cmp #(224 - 32)
|
||||||
beq JoypadLeft ; Value saturated.
|
beq JoypadLeft ; Value saturated.
|
||||||
inc $21
|
inc $21
|
||||||
inc $21
|
inc $21
|
||||||
@ -349,7 +347,7 @@ JoypadRight:
|
|||||||
cmp #$01 ; Right
|
cmp #$01 ; Right
|
||||||
bne JoypadB ; Button not pressed.
|
bne JoypadB ; Button not pressed.
|
||||||
lda $20
|
lda $20
|
||||||
cmp #(256 - 16)
|
cmp #(256 - 32)
|
||||||
beq JoypadB ; Value saturated.
|
beq JoypadB ; Value saturated.
|
||||||
inc $20
|
inc $20
|
||||||
inc $20
|
inc $20
|
||||||
@ -474,16 +472,13 @@ UpdateGraphics:
|
|||||||
lda $0021
|
lda $0021
|
||||||
sta $0101
|
sta $0101
|
||||||
; Choose which sprite based on frame count.
|
; Choose which sprite based on frame count.
|
||||||
lda $14
|
|
||||||
and #%00000100
|
|
||||||
lsr
|
|
||||||
sta $0102
|
|
||||||
; Set priority bits so that the sprite is drawn in front.
|
; Set priority bits so that the sprite is drawn in front.
|
||||||
lda #%00110000
|
lda #%00110000
|
||||||
sta $0103
|
sta $0103
|
||||||
; Clear x-MSB so that the sprite is displayed.
|
; Clear x-MSB so that the sprite is displayed.
|
||||||
lda $0300
|
lda $0300
|
||||||
and #%11111110
|
and #%11111110
|
||||||
|
ora #%00000010 ; ... and make it the large size. (32x32)
|
||||||
sta $0300
|
sta $0300
|
||||||
|
|
||||||
; Make the background scroll. Horizontal over time; vertical depending on
|
; Make the background scroll. Horizontal over time; vertical depending on
|
||||||
@ -545,8 +540,17 @@ FillScratch:
|
|||||||
.BANK 1 SLOT 0
|
.BANK 1 SLOT 0
|
||||||
.ORG 0
|
.ORG 0
|
||||||
.SECTION "GraphicsData"
|
.SECTION "GraphicsData"
|
||||||
.INCLUDE "sprites.asm"
|
|
||||||
.INCLUDE "tiles.asm"
|
SpriteData:
|
||||||
|
.INCBIN "sprites32.pic"
|
||||||
|
SpritePalette:
|
||||||
|
.INCBIN "sprites32.clr"
|
||||||
|
|
||||||
|
TileData:
|
||||||
|
.INCBIN "tiles.pic"
|
||||||
|
TilePalette:
|
||||||
|
.INCBIN "tiles.clr"
|
||||||
|
|
||||||
.ENDS
|
.ENDS
|
||||||
|
|
||||||
|
|
||||||
|
@ -18,6 +18,8 @@
|
|||||||
;
|
;
|
||||||
; Here is a link to an online version of Yoshi's doc (v. 2.30):
|
; Here is a link to an online version of Yoshi's doc (v. 2.30):
|
||||||
; http://patpend.net/technical/snes/snes.txt
|
; http://patpend.net/technical/snes/snes.txt
|
||||||
|
; Anomie's register doc is more up-to-date and might have better info:
|
||||||
|
; http://www.dforce3000.de/pub/doc/anomie_regs.txt
|
||||||
|
|
||||||
; $2100: Screen display initialization [INIDISP]
|
; $2100: Screen display initialization [INIDISP]
|
||||||
; Format: x000bbbb
|
; Format: x000bbbb
|
||||||
|
30
sprites.asm
30
sprites.asm
@ -1,30 +0,0 @@
|
|||||||
; Created with eKid's pcx2snes converter ;
|
|
||||||
|
|
||||||
SpriteData:
|
|
||||||
.db $00, $00, $03, $03, $00, $03, $01, $03, $05, $07, $03, $01, $03, $03, $02, $03$00, $00, $00, $00, $03, $00, $03, $00, $03, $00, $02, $10, $03, $48, $00, $2F
|
|
||||||
.db $00, $00, $00, $00, $60, $E0, $00, $C0, $70, $F8, $C0, $F0, $F0, $FE, $E2, $CF$00, $00, $00, $00, $80, $00, $C0, $00, $40, $80, $30, $00, $CE, $00, $13, $EC
|
|
||||||
.db $00, $00, $03, $03, $00, $03, $01, $03, $05, $07, $03, $01, $03, $03, $02, $03$00, $00, $00, $00, $03, $00, $03, $00, $03, $20, $02, $90, $03, $00, $00, $67
|
|
||||||
.db $00, $00, $00, $00, $60, $E0, $00, $C0, $70, $F8, $C0, $F0, $F0, $FE, $E2, $CF$00, $00, $00, $00, $80, $00, $C0, $00, $40, $80, $30, $00, $CE, $00, $13, $EC
|
|
||||||
.db $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $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, $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, $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, $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, $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, $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, $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, $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, $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, $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, $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, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00
|
|
||||||
.db $02, $03, $03, $03, $03, $01, $05, $07, $01, $03, $00, $03, $03, $03, $00, $00$00, $37, $03, $48, $02, $10, $03, $00, $03, $00, $03, $00, $00, $00, $00, $00
|
|
||||||
.db $E2, $CF, $F0, $FE, $C0, $F0, $70, $F8, $00, $C0, $60, $E0, $00, $00, $00, $00$13, $EC, $CE, $00, $30, $00, $40, $80, $C0, $00, $80, $00, $00, $00, $00, $00
|
|
||||||
.db $02, $03, $03, $03, $03, $01, $05, $07, $01, $03, $00, $03, $03, $03, $00, $00$00, $4F, $03, $10, $02, $A0, $03, $00, $03, $00, $03, $00, $00, $00, $00, $00
|
|
||||||
.db $E2, $CF, $F0, $FE, $C0, $F0, $70, $F8, $00, $C0, $60, $E0, $00, $00, $00, $00$13, $EC, $CE, $00, $30, $00, $40, $80, $C0, $00, $80, $00, $00, $00, $00, $00
|
|
||||||
|
|
||||||
SpritePalette:
|
|
||||||
.db $1F, $7C, $00, $00, $8D, $0C, $08, $19, $25, $29, $CF, $18, $8B, $29, $0F, $36
|
|
||||||
.db $1F, $02, $8E, $5E, $18, $5B, $FF, $7F, $00, $00, $00, $00, $00, $00, $00, $00
|
|
||||||
|
|
||||||
; 20 tiles (12 spaces)
|
|
||||||
; 640 bytes
|
|
BIN
sprites32.pcx
Normal file
BIN
sprites32.pcx
Normal file
Binary file not shown.
33
tiles.asm
33
tiles.asm
@ -1,33 +0,0 @@
|
|||||||
; Created with eKid's pcx2snes converter ;
|
|
||||||
|
|
||||||
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 $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, $01, $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
|
|
||||||
.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
|
|
||||||
.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, $10, $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
|
|
||||||
|
|
||||||
TilePalette:
|
|
||||||
.db $1F, $7C, $00, $00, $FF, $7F, $1F, $02
|
|
||||||
|
|
||||||
; 24 tiles (8 spaces)
|
|
||||||
; 384 bytes
|
|
Loading…
Reference in New Issue
Block a user