menu: more initialization
This commit is contained in:
parent
3e93af19ee
commit
75a4546c5c
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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:
|
||||
|
||||
@ -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?
|
||||
|
||||
@ -16,7 +16,8 @@ NMI_ROUTINE:
|
||||
lda #$00
|
||||
pha
|
||||
plb
|
||||
lda $4210
|
||||
|
||||
lda $4210 ; ack interrupt
|
||||
|
||||
ldx #BG1_TILE_BASE+32*9
|
||||
stx $2116
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user