menu: fadeout on load

This commit is contained in:
ikari 2010-12-05 12:37:31 +01:00
parent b7654290a1
commit 2afcfcf742
3 changed files with 31 additions and 2 deletions

View File

@ -112,3 +112,4 @@ hdma_math .byt 0
.byt 0,0
.byt 0
infloop .byt 0,0 ; to be filled w/ 80 FE
wram_fadeloop .byt 0

View File

@ -146,7 +146,11 @@ setup_gfx:
sta infloop
lda #$fe
sta infloop+1
lda #^wram_fadeloop
ldx #!wram_fadeloop
stx $2181
sta $2183
DMA0(#$00, #$22, #^fadeloop, #!fadeloop, #$80);
rts
tests:
@ -283,3 +287,27 @@ snes_init:
rts
fadeloop:
sep #$30 : .as : .xs
ldx #$0f
and #$00
pha
plb
fadeloop_start
lda $4212
and #$80
bne fadeloop_start
- lda $4212
and #$80
bne +
bra -
+ txa
dec
sta $2100
tax
bne fadeloop_start
stz $2100
- bra -
fadeloop_end:
.byt $ff

View File

@ -481,7 +481,7 @@ select_file:
lda #$00
sta @$4200
cli
jsl @infloop
jsl @wram_fadeloop
rts
select_dir: ; y = direntry ptr