snes-asm/test_gfx.asm

93 lines
1.3 KiB
NASM
Raw Normal View History

.include "header.inc"
.include "snes_init.asm"
.include "my_custom.asm"
.BANK 0 SLOT 0
.org 0
.section "Vblank"
VBlank:
rti
.ENDS
.BANK 0 SLOT 0
.ORG 0
.section "Main"
Start:
Snes_Init
; 16-bit xy, 8-bit a
rep #%00010000
sep #%00100000
; Load palette by writing to $2122
; .db $00, $00, $E0, $7F, $1F, $00, $FF, $03
Load_Palette_Color $00, $00
Load_Palette_Color $00, $00
Load_Palette_Color $00, $00
Load_Palette_Color $ff, $0a
;lda #%00000
Set_Screen_Brightness %00001111
lda #%10000001 ; enable NMI and joypads
sta $4200
mainloop:
Spin_Loop $02
Reset_Palette_Offset
Load_Palette_Color $00, $00
Load_Palette_Color $00, $00
Load_Palette_Color $00, $00
Load_Palette_Color $ff, $0a
Spin_Loop $02
Reset_Palette_Offset
Load_Palette_Color $ff, $a0
Load_Palette_Color $00, $00
Load_Palette_Color $00, $00
Load_Palette_Color $ff, $0a
jmp mainloop
.ENDS
.BANK 1 SLOT 0
.org 0
.section "TileData"
Face:
.db %00000000
.db %00000000
.db %11000011
.db %11000011
.db %11000011
.db %11000011
.db %00111000
.db %00111000
.db %00111000
.db %00111000
.db %10000001
.db %10000001
.db %01000010
.db %01000010
.db %00111100
.db %00111100
.ENDS