chiptune_player: rename some labels/addresses

careful as not to break anything
This commit is contained in:
Vince Weaver 2018-02-24 21:26:54 -05:00
parent e4d66a70b8
commit e88e773563
3 changed files with 30 additions and 10 deletions

View File

@ -23,7 +23,7 @@ CHUNKSIZE EQU $3
sta CV
sta DONE_PLAYING
sta XPOS
sta MB_FRAME_DIFF
sta MB_CHUNK_OFFSET
; print detection message
@ -395,6 +395,7 @@ page_copy_loop:
; filenames
;==========
krw_file:
.asciiz "INTRO2.KRW"
.asciiz "DEATH2.KRW"
.asciiz "DEMO4.KRW"
.asciiz "WAVE.KRW"

View File

@ -20,6 +20,7 @@ interrupt_handler:
;============
; 7
;=====================
; Update time counter
@ -28,7 +29,7 @@ interrupt_handler:
inc FRAME_COUNT ; 5
lda FRAME_COUNT ; 3
cmp #50 ; 3
bne frame_good ; 3/2nt
bne mb_write_frame ; 3/2nt
lda #$0 ; 2
sta FRAME_COUNT ; 3
@ -38,7 +39,7 @@ update_second_ones:
inc $bd0+17 ; 6
lda $bd0+17 ; 4
cmp #$ba ; one past '9' ; 2
bne frame_good ; 3/2nt
bne mb_write_frame ; 3/2nt
lda #'0'+$80 ; 2
sta $7d0+17 ; 4
sta $bd0+17 ; 4
@ -47,7 +48,7 @@ update_second_tens:
inc $bd0+16 ; 6
lda $bd0+16 ; 4
cmp #$b6 ; 6 (for 60 seconds) ; 2
bne frame_good ; 3/2nt
bne mb_write_frame ; 3/2nt
lda #'0'+$80 ; 2
sta $7d0+16 ; 4
sta $bd0+16 ; 4
@ -59,15 +60,24 @@ update_minutes:
;=============
; 90 worst
frame_good:
ldy MB_FRAME_DIFF ; get chunk offset ; 3
;=============================
; Write frames to Mockingboard
;=============================
mb_write_frame:
ldy MB_CHUNK_OFFSET ; get chunk offset ; 3
ldx #0 ; set up reg count ; 2
;=============
; 5
;==================================
; loop through the 14 registers
; reading the value, then write out
;==================================
mb_write_loop:
lda (INL),y ; load register value ; 5
@ -90,7 +100,7 @@ mb_not_done:
cpx #13 ; 2
bne mb_not_13 ; 3/2nt
cmp #$ff ; 2
beq skip_r13 ; 3/2nt
beq increment_offset ; 3/2nt
mb_not_13:
sta MB_VALUE ; 3
@ -119,11 +129,19 @@ mb_not_13:
;============
; roughly 95?
; *13= 1235?
skip_r13:
inc MB_FRAME_DIFF ; increment offset ; 5
;==============================================
; incremement offset. If 0 move to next chunk
;==============================================
increment_offset:
inc MB_CHUNK_OFFSET ; increment offset ; 5
bne reset_chunk ; if not zero, done ; 3/2nt
wraparound:
inc MB_CHUNK ; go to next chunk ; 5

View File

@ -108,7 +108,8 @@ MB_CHUNK EQU $92
MB_ADDRL EQU $91
MB_ADDRH EQU $92
DONE_PLAYING EQU $93
MB_FRAME_DIFF EQU $94
;MB_FRAME_DIFF EQU $94
MB_CHUNK_OFFSET EQU $94
;LZSS_RL EQU $95
;LZSS_RH EQU $96
;LZSS_COUNT EQU $97