menu: fix order of SNES initialization

This commit is contained in:
Maximilian Rehkopf 2012-07-03 16:18:12 +02:00
parent 5eae77f626
commit 943a3d14bb
3 changed files with 13 additions and 11 deletions

View File

@ -67,8 +67,11 @@ setup_hdma:
sty $4352
sta $4354
; lda #$06
; sta $420c ;enable HDMA ch. 1+2
lda #$3a
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
sta $4200 ;enable V-BLANK NMI
rts

View File

@ -51,9 +51,11 @@ coldboot: ; Regular, cold-start init
sta $420d ; fast cpu
jsr setup_gfx
jsr colortest
jsr setup_hdma
jsr menu_init
jsr tests
jsr setup_hdma
jsr screen_on
sep #$20 : .as
lda @RTC_STATUS
beq +
@ -197,6 +199,7 @@ setup_gfx:
;set palette
stz $2121
DMA0(#$00, #$200, #^palette, #!palette, #$22)
stz $2121
;copy hdma tables so we can work "without" the cartridge
;palette
@ -275,11 +278,8 @@ tests:
lda #$1f
sta $212e
sta $212f
stz $2121
jsr waitblank
lda #$0f
sta $2100 ;screen on, full brightness
lda #9
; stz $2121
lda #8
sta bar_yl
stz cur_bright
stz tgt_bright

View File

@ -84,9 +84,8 @@ math_cont
clc
adc bar_x ; + X start coord
sta $2127 ; window 1 right
lda #$3e ; ch. 1-5
sta @$420c ; trigger HDMA
lda #$01
; lda #$3e ; ch. 1-5
; sta @$420c ; trigger HDMA
lda cur_bright
cmp tgt_bright