From 943a3d14bbfeb8da4ca3540d913e1259c41e47ff Mon Sep 17 00:00:00 2001 From: Maximilian Rehkopf Date: Tue, 3 Jul 2012 16:18:12 +0200 Subject: [PATCH] menu: fix order of SNES initialization --- snes/dma.a65 | 7 +++++-- snes/main.a65 | 12 ++++++------ snes/reset.a65 | 5 ++--- 3 files changed, 13 insertions(+), 11 deletions(-) diff --git a/snes/dma.a65 b/snes/dma.a65 index 5e48d53..3983693 100644 --- a/snes/dma.a65 +++ b/snes/dma.a65 @@ -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 diff --git a/snes/main.a65 b/snes/main.a65 index 2ccd605..0d8d335 100644 --- a/snes/main.a65 +++ b/snes/main.a65 @@ -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 diff --git a/snes/reset.a65 b/snes/reset.a65 index 3f8a484..d7b9a8f 100644 --- a/snes/reset.a65 +++ b/snes/reset.a65 @@ -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