From 5c6e8e7a510bba6212598f47061508a35a50ab09 Mon Sep 17 00:00:00 2001 From: Vince Weaver Date: Mon, 19 Feb 2018 00:21:56 -0500 Subject: [PATCH] chiptune: have elapsed time working overflows at 9:59 though --- chiptune_player/chiptune_player.dsk | Bin 143360 -> 143360 bytes chiptune_player/chiptune_player.s | 36 +++++++++++++++++++++++++++- chiptune_player/zp.inc | 1 - 3 files changed, 35 insertions(+), 2 deletions(-) diff --git a/chiptune_player/chiptune_player.dsk b/chiptune_player/chiptune_player.dsk index c5cbe9da2536710e62be3f341bc9e3267f69a649..be382c0274d4c22cd81b79a1e87f5009d175fb67 100644 GIT binary patch delta 14446 zcmeHO3v?9MdEPrS`+jO3tCa++yRw8WWbi@_#*Y{qL@XH@Vi2|o@#!K2mF!^Gaogjb z_C#Pb3dio`NLt5>oaA&1C}Ne^fjC7a9JlT%wj~ZpHa&@*)`3VOV8uRG7h{))5bA&D z&a7rvy9uanz^V4I|3Cb5_s;Cjo$s6PyI0!=ZQBNI@$epB1>3_NM{MUkE`hbOHrCEM zSSRaZ-K>Z8@=@d%uJ(P?jvu*%7mp=O@~B)cSIANMto%aadHHgpP@cg1c>JU=h*G}9 z_i5#H1=Q*e`tYxK`~i<|7ZQhJksDC?TI`e(oIHx7LgGz%4t)4V=<+5gRpOl@cJYsp z2IL?Oc%OjR__415KOuHUQ>kZ2FDAJ>A;}eqL+Jz89gO|U4M=LKlsg7(Nv_f>ZyU6$ zdHbM4&Cg*R3Ul_-|y zB`nzPPuOY(Y^f&(ic^mbIFjDoced@={nfVC-9K)V>uL*j7r=kZ;J?*va?O(3mWk%T zl2hBlt`u~Z;<|TKrsN$>utTkHPuE+a-kPpIo36`Hmz(OoRj}LCwxg}JO^&Z?g_CKW z7k80UG0EZG2n+u19k9W|#$=^ct+W_Ra&{x~&D75~1)7>K&}M$~s9YJrFYvKjM5f%nk5|XTK0fx;7SzO;gxK-DsDfE3 zM9(zNy%UZ;N(RDNfwm%BW1?J+ z$HakuNNuR8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Dl}ltih|YEPtsJS#zb8C{8)Am$g`*gu;Gs{4As=;fy;Pu@?(5h26oDA6CFZxbX*Ndug zb~1QzW{3R?8ou^yG1fZaE2G)_Zwp_8EPRm%^Wp2|!i&jErVd~2MzSP)jdY|t&cFW$mOqf2ydVr8xd||`K#5Lsx_a# z+7XFbWQc|E0a_0s+(+vXgx_}Z*K(S_mb3h|oa8UkF3Dfjh5Yqw7JxPjECMz9W75Oi z&o9RxtctDLu<;A4jg6Z(EvkueJFO*)K}47o#6$Pk}S6B?Y!%~=SDs9uT*veLCy=sUKi^)x-KF4Bjfdv`!ZPj>5H8NAP z*x<0ZsM(#ju{gt6kO%WDUM;-%4lJx`SojzVNT%y>U|6ZEV6k?SvB)wO3mA)fhebVO zVKEkeo)L?)Q?WQZ$>Qu?XYq+Se^~VSwb6BjPELJcUD+mkHE@2VRZz?mB zkyC~BHc)GD^HbE)`l>@SSXCB~+l zv57lu;?vxXB^aX*XT<2lRE$ncGCFbB8C}qf`<%6(YZWn?&@fMzybEE8)-r@OT7wAd zIY!G6euQ?cK)9YU+U!iVInU@tg!j@RuOR#?t*;@BY2A--(qU9d8C5bym4p##moTcI Ko>Bj{tnhFAFJvG9 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