waterfall: trying to get actual mockingboard to work right :(

This commit is contained in:
Vince Weaver 2018-08-03 14:45:00 -04:00
parent dee9bcb737
commit 610eab4ef8

View File

@ -22,6 +22,7 @@ DRAW_PAGE = $EE
LASTKEY = $F1 LASTKEY = $F1
PADDLE_STATUS = $F2 PADDLE_STATUS = $F2
XPOS = $F3 XPOS = $F3
OLD_XPOS = $F4
TEMP = $FA TEMP = $FA
TEMPY = $FB TEMPY = $FB
INL = $FC INL = $FC
@ -65,6 +66,7 @@ waterfall_demo:
sta BIRD_DIR sta BIRD_DIR
sta BIRD_STATE sta BIRD_STATE
sta FRAME sta FRAME
sta OLD_XPOS
lda #4 lda #4
sta DRAW_PAGE sta DRAW_PAGE
@ -81,6 +83,16 @@ waterfall_demo:
sta MB_VALUE ; 3 sta MB_VALUE ; 3
jsr write_ay_both ; 6+65 jsr write_ay_both ; 6+65
; enable white noise
ldx #6 ; 2
lda #1 ; 2
sta MB_VALUE ; 3
jsr write_ay_both ; 6+65
;===============
; 78
;============================= ;=============================
; Load foreground to graphic page1 (apple page2) ; Load foreground to graphic page1 (apple page2)
@ -871,25 +883,31 @@ even_first_four_lines:
; come in with 21 ; come in with 21
; 21 ; 21
; kill 61 ; kill 139
ldx #12 ; 2
dummy_loop:
asl DUMMY ; 6 asl DUMMY ; 6
asl DUMMY ; 6 dex ; 2
asl DUMMY ; 6 bne dummy_loop ; 3
asl DUMMY ; 6
asl DUMMY ; 6 ; 6 left over
asl DUMMY ; 6 nop ;2
asl DUMMY ; 6 nop ;2
asl DUMMY ; 6 nop ; 2
asl DUMMY ; 6
lda XPOS ; 3
nop ; 2
nop ; 2
; high = 5 + 12+ 3 = 20 ; high = 5 + 12+ 3 = 20
; medium = 5 + 9 + 6 = 20 ; medium = 5 + 9 + 6 = 20
; low = 5 + 9 + 6 = 20 ; low = 5 + 9 + 6 = 20
lda XPOS ; 3 lda XPOS ; 3
; cmp OLD_XPOS ; 3
; beq skip_mb ;
; 2
; sta OLD_XPOS ; 3
cmp #23 ; 2 cmp #23 ; 2
bmi check_medium bmi check_medium
; 2 ; 2
@ -910,26 +928,16 @@ was_medium:
lda #12 ; 2 lda #12 ; 2
nop ; 2 nop ; 2
write_volume: write_volume:
; write A volume ; write A/noise volume
sta MB_VALUE ; 3 sta MB_VALUE ; 3
ldx #8 ; 2 ldx #8 ; 2
lda #$2 ; 2 lda #$2 ; 2
jsr write_ay_both ; 6+65 jsr write_ay_both ; 6+65
;=============== ;===============
; 78 ; 78
; write noise
ldx #6 ; 2 skip_mb:
lda #1 ; 2
sta MB_VALUE ; 3
jsr write_ay_both ; 6+65
;===============
; 78
; setup loop for next section ; setup loop for next section