menu: fade in screen on cold boot
This commit is contained in:
parent
14a2136be7
commit
5eae77f626
@ -184,6 +184,11 @@ direntry_xscroll
|
|||||||
direntry_xscroll_wait
|
direntry_xscroll_wait
|
||||||
.word 0
|
.word 0
|
||||||
infloop .byt 0,0 ; to be filled w/ 80 FE
|
infloop .byt 0,0 ; to be filled w/ 80 FE
|
||||||
|
tgt_bright
|
||||||
|
.byt 0
|
||||||
|
cur_bright
|
||||||
|
.byt 0
|
||||||
|
|
||||||
;------------------------
|
;------------------------
|
||||||
saved_sp
|
saved_sp
|
||||||
.word 0
|
.word 0
|
||||||
|
|||||||
@ -29,8 +29,12 @@ GAME_MAIN:
|
|||||||
sta $420d ; fast cpu
|
sta $420d ; fast cpu
|
||||||
jsr setup_gfx
|
jsr setup_gfx
|
||||||
jsr colortest
|
jsr colortest
|
||||||
jsr setup_hdma
|
|
||||||
jsr tests
|
jsr tests
|
||||||
|
jsr setup_hdma
|
||||||
|
lda #$0f
|
||||||
|
sta cur_bright
|
||||||
|
sta tgt_bright
|
||||||
|
sta $2100
|
||||||
|
|
||||||
jmp @set_bank ; Set bios bank, just to be sure
|
jmp @set_bank ; Set bios bank, just to be sure
|
||||||
set_bank:
|
set_bank:
|
||||||
@ -277,6 +281,14 @@ tests:
|
|||||||
sta $2100 ;screen on, full brightness
|
sta $2100 ;screen on, full brightness
|
||||||
lda #9
|
lda #9
|
||||||
sta bar_yl
|
sta bar_yl
|
||||||
|
stz cur_bright
|
||||||
|
stz tgt_bright
|
||||||
|
rts
|
||||||
|
|
||||||
|
screen_on:
|
||||||
|
stz $2100 ;screen on, 0% brightness
|
||||||
|
lda #$0f
|
||||||
|
sta tgt_bright
|
||||||
rts
|
rts
|
||||||
|
|
||||||
snes_init:
|
snes_init:
|
||||||
@ -387,7 +399,7 @@ snes_init:
|
|||||||
|
|
||||||
fadeloop:
|
fadeloop:
|
||||||
sep #$30 : .as : .xs
|
sep #$30 : .as : .xs
|
||||||
ldx #$0f
|
ldx cur_bright
|
||||||
and #$00
|
and #$00
|
||||||
pha
|
pha
|
||||||
plb
|
plb
|
||||||
|
|||||||
@ -87,6 +87,27 @@ math_cont
|
|||||||
lda #$3e ; ch. 1-5
|
lda #$3e ; ch. 1-5
|
||||||
sta @$420c ; trigger HDMA
|
sta @$420c ; trigger HDMA
|
||||||
lda #$01
|
lda #$01
|
||||||
|
|
||||||
|
lda cur_bright
|
||||||
|
cmp tgt_bright
|
||||||
|
beq +
|
||||||
|
bpl bright_down
|
||||||
|
bright_up
|
||||||
|
inc
|
||||||
|
sta cur_bright
|
||||||
|
lda $2100
|
||||||
|
and #$f0
|
||||||
|
ora cur_bright
|
||||||
|
sta $2100
|
||||||
|
bra +
|
||||||
|
bright_down
|
||||||
|
dec
|
||||||
|
sta cur_bright
|
||||||
|
lda $2100
|
||||||
|
and #$f0
|
||||||
|
ora cur_bright
|
||||||
|
sta $2100
|
||||||
|
+ lda #$01
|
||||||
sta isr_done
|
sta isr_done
|
||||||
rtl
|
rtl
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user