diff --git a/chiptune_player/chiptune_player.dsk b/chiptune_player/chiptune_player.dsk index c5cbe9da..be382c02 100644 Binary files a/chiptune_player/chiptune_player.dsk and b/chiptune_player/chiptune_player.dsk differ diff --git a/chiptune_player/chiptune_player.s b/chiptune_player/chiptune_player.s index af2540d8..e767eed9 100644 --- a/chiptune_player/chiptune_player.s +++ b/chiptune_player/chiptune_player.s @@ -202,6 +202,40 @@ interrupt_handler: bit $C404 ; can clear 6522 interrupt by reading T1C-L + + inc FRAME_COUNT + lda FRAME_COUNT + cmp #50 + bne frame_good + + lda #$0 + sta FRAME_COUNT + +update_second_ones: + inc $7d0+18 + inc $bd0+18 + lda $bd0+18 + cmp #$ba ; one past '9' + bne frame_good + lda #'0'+$80 + sta $7d0+18 + sta $bd0+18 +update_second_tens: + inc $7d0+17 + inc $bd0+17 + lda $bd0+17 + cmp #$b6 ; 6 + bne frame_good + lda #'0'+$80 + sta $7d0+17 + sta $bd0+17 +update_minutes: + inc $7d0+15 + inc $bd0+15 + ; we don't handle > 9:59 songs yet + +frame_good: + ldy MB_FRAME_DIFF ldx #0 @@ -514,7 +548,7 @@ new_song: lda #$0 sta MB_CHUNK - + sta FRAME_COUNT ;========================= ; Print Title/Author info diff --git a/chiptune_player/zp.inc b/chiptune_player/zp.inc index cf58c3a2..81b20c0d 100644 --- a/chiptune_player/zp.inc +++ b/chiptune_player/zp.inc @@ -67,7 +67,6 @@ C_VOLUME EQU $82 A_COLOR EQU $83 B_COLOR EQU $84 C_COLOR EQU $85 - ;NUM2L EQU $80 ;NUM2H EQU $81 ;RESULT EQU $82 ; 83,84,85