chiptune: more commenting

This commit is contained in:
Vince Weaver 2018-02-23 22:08:33 -05:00
parent d39d531d98
commit c13a5333c4
3 changed files with 45 additions and 29 deletions

View File

@ -84,19 +84,19 @@ reset_ay_both:
write_ay_both:
; address
stx MOCK_6522_ORA1 ; put address on PA
lda #MOCK_AY_LATCH_ADDR ; latch_address on PB
sta MOCK_6522_ORB1
lda #MOCK_AY_INACTIVE ; go inactive
sta MOCK_6522_ORB1
stx MOCK_6522_ORA1 ; put address on PA ; 3
lda #MOCK_AY_LATCH_ADDR ; latch_address on PB ; 2
sta MOCK_6522_ORB1 ; 3
lda #MOCK_AY_INACTIVE ; go inactive ; 2
sta MOCK_6522_ORB1 ; 3
; value
lda MB_VALUE
sta MOCK_6522_ORA1 ; put value on PA
lda #MOCK_AY_WRITE ; write on PB
sta MOCK_6522_ORB1
lda #MOCK_AY_INACTIVE ; go inactive
sta MOCK_6522_ORB1
lda MB_VALUE ; 3
sta MOCK_6522_ORA1 ; put value on PA ; 3
lda #MOCK_AY_WRITE ; write on PB ; 2
sta MOCK_6522_ORB1 ; 3
lda #MOCK_AY_INACTIVE ; go inactive ; 2
sta MOCK_6522_ORB1 ; 3
;=======================
; Write Left AY-3-8910
@ -104,22 +104,23 @@ write_ay_both:
;write_ay_left:
; address
stx MOCK_6522_ORA2 ; put address on PA
lda #MOCK_AY_LATCH_ADDR ; latch_address on PB
sta MOCK_6522_ORB2
lda #MOCK_AY_INACTIVE ; go inactive
sta MOCK_6522_ORB2
stx MOCK_6522_ORA2 ; put address on PA ; 3
lda #MOCK_AY_LATCH_ADDR ; latch_address on PB ; 2
sta MOCK_6522_ORB2 ; 3
lda #MOCK_AY_INACTIVE ; go inactive ; 2
sta MOCK_6522_ORB2 ; 3
; value
lda MB_VALUE
sta MOCK_6522_ORA2 ; put value on PA
lda #MOCK_AY_WRITE ; write on PB
sta MOCK_6522_ORB2
lda #MOCK_AY_INACTIVE ; go inactive
sta MOCK_6522_ORB2
rts
lda MB_VALUE ; 3
sta MOCK_6522_ORA2 ; put value on PA ; 3
lda #MOCK_AY_WRITE ; write on PB ; 2
sta MOCK_6522_ORB2 ; 3
lda #MOCK_AY_INACTIVE ; go inactive ; 2
sta MOCK_6522_ORB2 ; 3
rts ; 6
;===========
; 61
;=======================================
; clear ay -- clear all 14 AY registers
; should silence the card

View File

@ -302,10 +302,11 @@ mb_not_13:
and #$f ; 2
sta REGISTER_DUMP,X ; 4
; INLINE this?
; INLINE this (could save 72 cycles)
jsr write_ay_both ; assume 3 channel (not six) ; 6
; so write same to both
; left/right
; 61
clc ; point to next interleaved ; 2
lda INH ; page by adding $300 ; 3
@ -341,7 +342,7 @@ chunk_good:
done_interrupt:
pla ; restore a ; 4
rti ; 6
rti ; return from interrupt ; 6
;=================

View File

@ -51,6 +51,22 @@ SCREEN_Y EQU $62
;DY_I EQU $6E
;DY_F EQU $6F
REGISTER_DUMP EQU $70
A_FINE_TONE EQU $70
A_COARSE_TONE EQU $71
B_FINE_TONE EQU $72
B_COARSE_TONE EQU $73
C_FINE_TONE EQU $74
C_COARSE_TONE EQU $75
NOISE EQU $76
ENABLE EQU $77
A_VOLUME EQU $78
B_VOLUME EQU $79
C_VOLUME EQU $7A
ENVELOPE_FINE EQU $7B
ENVELOPE_COARSE EQU $7C
ENVELOPE_SHAPE EQU $7D
;SPACEY_I EQU $70
;SPACEY_F EQU $71
;CY_I EQU $72
@ -68,9 +84,7 @@ SCREEN_Y EQU $62
;NUM1L EQU $7E
;NUM1H EQU $7F
A_VOLUME EQU $80
B_VOLUME EQU $81
C_VOLUME EQU $82
A_COLOR EQU $83
B_COLOR EQU $84
C_COLOR EQU $85