menu: fix order of SNES initialization
This commit is contained in:
parent
5eae77f626
commit
943a3d14bb
@ -67,8 +67,11 @@ setup_hdma:
|
|||||||
sty $4352
|
sty $4352
|
||||||
sta $4354
|
sta $4354
|
||||||
|
|
||||||
; lda #$06
|
lda #$3a
|
||||||
; sta $420c ;enable HDMA ch. 1+2
|
sta $420c ;enable HDMA ch. 1+3+4+5
|
||||||
|
jsr waitblank
|
||||||
|
lda #$3e
|
||||||
|
sta $420c ;enable HDMA ch. 2 too
|
||||||
lda #$81 ;VBlank NMI + Auto Joypad Read
|
lda #$81 ;VBlank NMI + Auto Joypad Read
|
||||||
sta $4200 ;enable V-BLANK NMI
|
sta $4200 ;enable V-BLANK NMI
|
||||||
rts
|
rts
|
||||||
|
|||||||
@ -51,9 +51,11 @@ coldboot: ; Regular, cold-start init
|
|||||||
sta $420d ; fast cpu
|
sta $420d ; fast cpu
|
||||||
jsr setup_gfx
|
jsr setup_gfx
|
||||||
jsr colortest
|
jsr colortest
|
||||||
jsr setup_hdma
|
|
||||||
jsr menu_init
|
jsr menu_init
|
||||||
jsr tests
|
jsr tests
|
||||||
|
jsr setup_hdma
|
||||||
|
jsr screen_on
|
||||||
|
|
||||||
sep #$20 : .as
|
sep #$20 : .as
|
||||||
lda @RTC_STATUS
|
lda @RTC_STATUS
|
||||||
beq +
|
beq +
|
||||||
@ -197,6 +199,7 @@ setup_gfx:
|
|||||||
;set palette
|
;set palette
|
||||||
stz $2121
|
stz $2121
|
||||||
DMA0(#$00, #$200, #^palette, #!palette, #$22)
|
DMA0(#$00, #$200, #^palette, #!palette, #$22)
|
||||||
|
stz $2121
|
||||||
|
|
||||||
;copy hdma tables so we can work "without" the cartridge
|
;copy hdma tables so we can work "without" the cartridge
|
||||||
;palette
|
;palette
|
||||||
@ -275,11 +278,8 @@ tests:
|
|||||||
lda #$1f
|
lda #$1f
|
||||||
sta $212e
|
sta $212e
|
||||||
sta $212f
|
sta $212f
|
||||||
stz $2121
|
; stz $2121
|
||||||
jsr waitblank
|
lda #8
|
||||||
lda #$0f
|
|
||||||
sta $2100 ;screen on, full brightness
|
|
||||||
lda #9
|
|
||||||
sta bar_yl
|
sta bar_yl
|
||||||
stz cur_bright
|
stz cur_bright
|
||||||
stz tgt_bright
|
stz tgt_bright
|
||||||
|
|||||||
@ -84,9 +84,8 @@ math_cont
|
|||||||
clc
|
clc
|
||||||
adc bar_x ; + X start coord
|
adc bar_x ; + X start coord
|
||||||
sta $2127 ; window 1 right
|
sta $2127 ; window 1 right
|
||||||
lda #$3e ; ch. 1-5
|
; lda #$3e ; ch. 1-5
|
||||||
sta @$420c ; trigger HDMA
|
; sta @$420c ; trigger HDMA
|
||||||
lda #$01
|
|
||||||
|
|
||||||
lda cur_bright
|
lda cur_bright
|
||||||
cmp tgt_bright
|
cmp tgt_bright
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user