ds: music working sort of

This commit is contained in:
Vince Weaver 2019-10-14 22:54:55 -04:00
parent 827a2d3656
commit c654c96304
3 changed files with 32 additions and 11 deletions

View File

@ -37,11 +37,30 @@ frame_decode_loop:
inc FRAME_OFFSET
bne frame_decode_loop
inc r0_wrsmc+2 ; 6
inc r1_wrsmc+2 ; 6
inc r2_wrsmc+2 ; 6
inc r4_wrsmc+2 ; 6
inc r13_wrsmc+2 ; 6
inc r6_wrsmc+2 ; 6
inc r7_wrsmc+2 ; 6
inc r8_wrsmc+2 ; 6
inc r9_wrsmc+2 ; 6
inc r11_wrsmc+2 ; 6
inc r12_wrsmc+2 ; 6
inc FRAME_PAGE
lda FRAME_PAGE
cmp #5
cmp #3
bne frame_decode_loop
lda #0
sta FRAME_OFFSET
; lda #1

View File

@ -222,17 +222,19 @@ done_frame_wrap:
;========================
; 28+26+6= 60
; trashes A,X
play_mb_write:
; address
stx MOCK_6522_ORA1 ; put address on PA1 ; 4
stx MOCK_6522_ORA2 ; put address on PA2 ; 4
ldy #MOCK_AY_LATCH_ADDR ; latch_address for PB1 ; 2
sty MOCK_6522_ORB1 ; latch_address on PB1 ; 4
sty MOCK_6522_ORB2 ; latch_address on PB2 ; 4
ldy #MOCK_AY_INACTIVE ; go inactive ; 2
sty MOCK_6522_ORB1 ; 4
sty MOCK_6522_ORB2 ; 4
ldx #MOCK_AY_LATCH_ADDR ; latch_address for PB1 ; 2
stx MOCK_6522_ORB1 ; latch_address on PB1 ; 4
stx MOCK_6522_ORB2 ; latch_address on PB2 ; 4
ldx #MOCK_AY_INACTIVE ; go inactive ; 2
stx MOCK_6522_ORB1 ; 4
stx MOCK_6522_ORB2 ; 4
;===========
; 28
@ -242,8 +244,8 @@ play_mb_write:
lda #MOCK_AY_WRITE ; ; 2
sta MOCK_6522_ORB1 ; write on PB1 ; 4
sta MOCK_6522_ORB2 ; write on PB2 ; 4
sty MOCK_6522_ORB1 ; 4
sty MOCK_6522_ORB2 ; 4
stx MOCK_6522_ORB1 ; 4
stx MOCK_6522_ORB2 ; 4
;===========
; 26

View File

@ -89,13 +89,13 @@ r13_wrsmc:
lda NOISE
and #$1f
ora ENVELOPE_SHAPE
r6_smcwr:
r6_wrsmc:
sta $9F00,Y
;=====================
; Register 7: Enable
lda ENABLE
r7_smcwr:
r7_wrsmc:
sta $A200,Y
;=====================