diff --git a/snes/data.a65 b/snes/data.a65 index a9f947d..9f0d438 100644 --- a/snes/data.a65 +++ b/snes/data.a65 @@ -72,6 +72,8 @@ listdisp .word 0 ; number of displayable list entries textdmasize .word 0 ; number of bytes to copy each frame barstep .byt 0 ; step size for bar +;-misc +testvar .word 0,0,0,0 ;----------hdma tables in WRAM (must be stable when cartridge is cut off) hdma_pal .byt 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 .byt 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 diff --git a/snes/dma.a65 b/snes/dma.a65 index 08a4658..5e48d53 100644 --- a/snes/dma.a65 +++ b/snes/dma.a65 @@ -67,15 +67,6 @@ setup_hdma: sty $4352 sta $4354 - lda #$01 ;A to B; direct; 1x two reg - sta $4360 ;ch. 5 for color math - lda #$26 ;2126 + 2127 = window 1 - sta $4361 - lda #^hdma_window - ldy #!hdma_window - sty $4362 - sta $4364 - ; lda #$06 ; sta $420c ;enable HDMA ch. 1+2 lda #$81 ;VBlank NMI + Auto Joypad Read diff --git a/snes/main.a65 b/snes/main.a65 index bce158c..f55613f 100644 --- a/snes/main.a65 +++ b/snes/main.a65 @@ -199,7 +199,7 @@ setup_gfx: ldx #!wram_fadeloop stx $2181 sta $2183 - DMA0(#$00, #$56, #^fadeloop, #!fadeloop, #$80); + DMA0(#$00, #$6C, #^fadeloop, #!fadeloop, #$80); rts tests: @@ -364,7 +364,6 @@ fadeloop: sta hdma_math+2 sta hdma_math+5 sta hdma_math+17 - stz $2126 fadeloop_start lda $4212 and #$80 @@ -381,10 +380,16 @@ fadeloop_start sta hdma_math+17 txa dec - sta $2100 +; sta $2100 tax bne fadeloop_start - stz $2100 + stz $2126 + stz $212e + stz $2131 + stz $2130 + lda #$00 + sta @hdma_math +; stz $2100 - bra - fadeloop_end: diff --git a/snes/menu.a65 b/snes/menu.a65 index 2f90b72..70b0b31 100644 --- a/snes/menu.a65 +++ b/snes/menu.a65 @@ -30,6 +30,7 @@ menuloop_s1 lda isr_done lsr bcc menuloop_s1 + stz isr_done jsr menu_updates ;update stuff, check keys etc lda menu_dirty ;is there ANY reason to redraw the menu? diff --git a/snes/reset.a65 b/snes/reset.a65 index be0bb1d..1ac6f24 100644 --- a/snes/reset.a65 +++ b/snes/reset.a65 @@ -16,7 +16,8 @@ NMI_ROUTINE: lda #$00 pha plb - lda $4210 + + lda $4210 ; ack interrupt ldx #BG1_TILE_BASE+32*9 stx $2116