adapt time in comments
Stefan Schuermans

Stefan Schuermans commited on 2019-06-21 20:53:39
Showing 1 changed files, with 17 additions and 17 deletions.

... ...
@@ -201,6 +201,7 @@ ROW_OFF_LOOP:
201 201
 ; output: -
202 202
 ; changes: TMP, TMP2, DATA
203 203
 ; cycles: 7822 (including rcall and ret)
204
+; time: 1ms
204 205
 ROW_GRAY:
205 206
         ldi     GRAY,1
206 207
 ROW_GRAY_LOOP:
... ...
@@ -218,8 +219,7 @@ ROW_GRAY_LOOP:
218 219
 ; input: FRAME = pixel data (0..15)
219 220
 ; output: -
220 221
 ; changes: TMP, TMP2, CNT, DATA, X
221
-; cycles: 43682 (including rcall and ret)
222
-; time: 5.5ms
222
+; time: 6ms
223 223
 OUT_FRAME:
224 224
         wdr
225 225
         ldi     XL,low(FRAME)           ; ptr to pixel data
... ...
@@ -245,16 +245,16 @@ OUT_FRAME_LOOP:
245 245
 
246 246
 ; output a frame for some time
247 247
 ; input: FRAME = pixel data (0..15)
248
-;        TMP = time to show frame (1..255, in 5.5 ms steps)
248
+;        TMP = time to show frame (1..255, in 6 ms steps)
249 249
 ; output: -
250 250
 ; changes: X, TMP, TMP2
251
-; time: TMP * 5.5 ms
251
+; time: TMP * 6 ms
252 252
 OUT_FRAME_TIME:
253 253
 ; output frame
254 254
         push    TMP
255 255
         push    CNT
256 256
         push    DATA
257
-        rcall   OUT_FRAME               ; 5.5 ms
257
+        rcall   OUT_FRAME               ; 6 ms
258 258
         pop     DATA
259 259
         pop     CNT
260 260
         pop     TMP
... ...
@@ -388,12 +388,12 @@ ANIM_BLINK:
388 388
 ; off
389 389
         ldi     DATA,0                  ; minimum color
390 390
         rcall   SET_COLOR               ; paint
391
-        ldi     TMP,100                 ; show frame 550 ms
391
+        ldi     TMP,100                 ; show frame 600 ms
392 392
         rcall   OUT_FRAME_TIME
393 393
 ; on
394 394
         ldi     DATA,15                 ; maximum color
395 395
         rcall   SET_COLOR               ; paint
396
-        ldi     TMP,100                 ; show frame 550 ms
396
+        ldi     TMP,100                 ; show frame 600 ms
397 397
         rcall   OUT_FRAME_TIME
398 398
 ; done
399 399
         ret
... ...
@@ -409,7 +409,7 @@ ANIM_FADE:
409 409
         ldi     DATA,0                  ; start dark
410 410
 ANIM_FADE_UP:
411 411
         rcall   SET_COLOR               ; paint
412
-        ldi     TMP,10                  ; show frame 55 ms
412
+        ldi     TMP,10                  ; show frame 60 ms
413 413
         rcall   OUT_FRAME_TIME
414 414
         inc     DATA                    ; fade up
415 415
         cpi     DATA,15                 ; loop until almost full on
... ...
@@ -417,7 +417,7 @@ ANIM_FADE_UP:
417 417
 ; fade down
418 418
 ANIM_FADE_DOWN:
419 419
         rcall   SET_COLOR               ; paint
420
-        ldi     TMP,10                  ; show frame 55 ms
420
+        ldi     TMP,10                  ; show frame 60 ms
421 421
         rcall   OUT_FRAME_TIME
422 422
         dec     DATA                    ; fade up
423 423
         cpi     DATA,255                ; loop until full off
... ...
@@ -441,7 +441,7 @@ ANIM_FLICKER_EVEN:
441 441
         subi    CNT,-2                  ; move two pixels
442 442
         cpi     CNT,42                  ; loop
443 443
         brlo    ANIM_FLICKER_EVEN
444
-        ldi     TMP,40                  ; show frame 220 ms
444
+        ldi     TMP,40                  ; show frame 240 ms
445 445
         rcall   OUT_FRAME_TIME
446 446
 ; odd pixels
447 447
         rcall   CLEAR                   ; clear
... ...
@@ -452,7 +452,7 @@ ANIM_FLICKER_ODD:
452 452
         subi    CNT,-2                  ; move two pixels
453 453
         cpi     CNT,42                  ; loop
454 454
         brlo    ANIM_FLICKER_ODD
455
-        ldi     TMP,40                  ; show frame 220 ms
455
+        ldi     TMP,40                  ; show frame 240 ms
456 456
         rcall   OUT_FRAME_TIME
457 457
 ; done
458 458
         ret
... ...
@@ -475,7 +475,7 @@ ANIM_WOBBLE_UP_DRAW:
475 475
         eor     DATA,TMP
476 476
         cpi     CNT,42                  ; loop
477 477
         brlo    ANIM_WOBBLE_UP_DRAW
478
-        ldi     TMP,10                  ; show frame 55 ms
478
+        ldi     TMP,10                  ; show frame 60 ms
479 479
         rcall   OUT_FRAME_TIME
480 480
         inc     DATA                    ; next color: brighter
481 481
         cpi     DATA,16
... ...
@@ -491,7 +491,7 @@ ANIM_WOBBLE_DOWN_DRAW:
491 491
         eor     DATA,TMP
492 492
         cpi     CNT,42                  ; loop
493 493
         brlo    ANIM_WOBBLE_DOWN_DRAW
494
-        ldi     TMP,10                  ; show frame 55 ms
494
+        ldi     TMP,10                  ; show frame 60 ms
495 495
         rcall   OUT_FRAME_TIME
496 496
         dec     DATA                    ; next color: darker
497 497
         cpi     DATA,16
... ...
@@ -511,7 +511,7 @@ ANIM_RUN_LOOP:
511 511
         rcall   CLEAR                   ; clear
512 512
         ldi     DATA,15                 ; current pixel full on
513 513
         rcall   SET_PIXEL
514
-        ldi     TMP,10                  ; show frame 55 ms
514
+        ldi     TMP,10                  ; show frame 60 ms
515 515
         rcall   OUT_FRAME_TIME
516 516
         inc     CNT                     ; next pixel
517 517
         cpi     CNT,43                  ; loop until after last pixel
... ...
@@ -531,7 +531,7 @@ ANIM_BW_RUN_LOOP:
531 531
         rcall   CLEAR                   ; clear
532 532
         ldi     DATA,15                 ; current pixel full on
533 533
         rcall   SET_PIXEL
534
-        ldi     TMP,10                  ; show frame 55 ms
534
+        ldi     TMP,10                  ; show frame 60 ms
535 535
         rcall   OUT_FRAME_TIME
536 536
         dec     CNT                     ; previous pixel
537 537
         cpi     CNT,255                 ; loop until before 1st pixel
... ...
@@ -550,7 +550,7 @@ ANIM_WORM:
550 550
 ANIM_WORM_LOOP:
551 551
         rcall   CLEAR                   ; draw worm
552 552
         rcall   DRAW_WORM
553
-        ldi     TMP,10                  ; show frame 55 ms
553
+        ldi     TMP,10                  ; show frame 60 ms
554 554
         rcall   OUT_FRAME_TIME
555 555
         inc     CNT                     ; advance worm
556 556
         cpi     CNT,57                  ; loop until has exits
... ...
@@ -570,7 +570,7 @@ ANIM_BW_WORM:
570 570
 ANIM_BW_WORM_LOOP:
571 571
         rcall   CLEAR                   ; draw backwards worm
572 572
         rcall   DRAW_BW_WORM
573
-        ldi     TMP,10                  ; show frame 55 ms
573
+        ldi     TMP,10                  ; show frame 60 ms
574 574
         rcall   OUT_FRAME_TIME
575 575
         dec     CNT                     ; advance worm backwards
576 576
         cpi     CNT,254                 ; loop until worm has exited
577 577