diff --git a/src/demo.s b/src/demo.s index 8f92790..cd37cd3 100644 --- a/src/demo.s +++ b/src/demo.s @@ -285,12 +285,12 @@ demo: ld hl,(tempo) ld b,h - ld c,l + ld c,l ; bc = tempo srl h - rr l + rr l ; hl = tempo / 2 srl h - rr l - adc hl,bc + rr l ; hl = tempo / 4 + adc hl,bc ; hl = tempo + tempo / 4 (-> * 1.25) ld b,h ld c,l ld hl,screen + screen.24.rows * 1 + 29 diff --git a/src/demo/show.pattern.s b/src/demo/show.pattern.s index 9c0a1e4..847c258 100644 --- a/src/demo/show.pattern.s +++ b/src/demo/show.pattern.s @@ -157,7 +157,10 @@ print.percent: add hl,bc add hl,hl ; * 10 - ld a,h + ld a,h ; h = next digit, but unrounded + bit 7,l + jr z,$+3 + inc a ; round up ex de,hl jr @print ; fraction (1%) diff --git a/src/tracker.s b/src/tracker.s index f95641b..3df54ce 100644 --- a/src/tracker.s +++ b/src/tracker.s @@ -1508,11 +1508,7 @@ reset.song: ld hl,0x500 ld (counter.fract),hl - ld a,h - inc a - ld (speed),a - ld hl,0x100 - ld (tempo),hl + call reset.speed ; ld (disable.pos),a ;no position jumping (temp) @@ -1565,6 +1561,16 @@ im.lmpr: ; ei ret +;--------------------------------------------------------------- +reset.speed: + + ld a,6 + ld (speed),a + ld hl,0x100 + ld (tempo),hl + + ret + reset.list: defw c1+repeat+1 defb 0 @@ -1802,7 +1808,9 @@ vibrato.table: defw 197,199,201,203,205,207,209,211 ; 96 defw 213,216,218,220,222,224,226,228 ;104 defw 230,232,234,236,238,240,242,244 ;112 - defw 246,248,250,252,254,256,259,261 ;120 + defw 246,248,250,252,254 ;120 + defw 256 ;125 0x0100 + defw 259,261 ;126 defw 263,265,267,269,271,273,275,277 ;128 defw 279,281,283,285,287,289,291,293 ;136 defw 295,297,300,302,304,306,308,310 ;144 @@ -2059,11 +2067,7 @@ tracker: loop.time: - ld (hl),0 - ld a,6 ;reset speed (new in 2.03) - ld (speed),a - ld hl,0x0100 ;and tempo - ld (tempo),hl + call reset.speed play.status: ld a,(disable.pos) ;0=keep repeating