Responds to NMI
This commit is contained in:
parent
d8ddf3bba6
commit
67ccdc3052
49
test_gfx.asm
49
test_gfx.asm
@ -2,11 +2,28 @@
|
||||
.include "snes_init.asm"
|
||||
.include "my_custom.asm"
|
||||
|
||||
|
||||
.EQU PalNum $0000
|
||||
|
||||
.BANK 0 SLOT 0
|
||||
.org 0
|
||||
.section "Vblank"
|
||||
|
||||
VBlank:
|
||||
|
||||
Set_A_8_XY_16
|
||||
|
||||
stz $2115
|
||||
ldx #$0400 ;setup VRAM
|
||||
|
||||
ldx #$0400
|
||||
stx $2116 ; VRAM address
|
||||
|
||||
lda PalNum
|
||||
sta $2119
|
||||
|
||||
lda $4210 ; clear NMI flag
|
||||
|
||||
rti
|
||||
|
||||
.ENDS
|
||||
@ -52,6 +69,8 @@ Start:
|
||||
|
||||
Set_A_8_XY_16
|
||||
|
||||
stz PalNum
|
||||
|
||||
Load_Palette_Color $00, $00
|
||||
Load_Palette_Color $00, $00
|
||||
Load_Palette_Color $00, $00
|
||||
@ -84,21 +103,25 @@ Start:
|
||||
Enable_NMI_And_Joypad
|
||||
|
||||
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
|
||||
wai
|
||||
wai
|
||||
wai
|
||||
wai
|
||||
wai
|
||||
wai
|
||||
wai
|
||||
wai
|
||||
wai
|
||||
wai
|
||||
wai
|
||||
wai
|
||||
|
||||
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
|
||||
lda PalNum
|
||||
clc
|
||||
adc #$04
|
||||
and #$1c
|
||||
sta PalNum
|
||||
|
||||
jmp mainloop
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user