Pause refresh during load cycles
authorTero Marttila <terom@fixme.fi>
Thu, 17 Jun 2010 23:05:24 +0300
changeset 35 f1ac13235304
parent 34 4646abd073fb
child 36 06e1e554acbb
Pause refresh during load cycles
matrix.s
--- a/matrix.s	Thu Jun 17 21:54:24 2010 +0300
+++ b/matrix.s	Thu Jun 17 23:05:24 2010 +0300
@@ -98,8 +98,8 @@
         rcall       Matrix_ShiftRight
 
         ; wait for X/16th of a second
-        ldi         XH, high(4 * 1024)
-        ldi         XL, low(4 * 1024)
+        ldi         XH, high(8 * 1024)
+        ldi         XL, low(8 * 1024)
 
         rcall       Timer_Sleep
 
@@ -113,6 +113,9 @@
         ldi         ZL, low(cseg0 * 2)      ; word addr
         ldi         ZH, high(cseg0 * 2)     ; word addr
     
+    ; Pause refresh
+        cli
+
     ; Load initial frame
         ; to first frame, starting from right edge
         ldi         r17, 8
@@ -146,6 +149,9 @@
         dec         r17
         brne        sc_load_next
 
+    ; Enable refresh
+        sei
+
     ; Animate from this -> next frame
         ldi         r17, 8      ; 8 columns
 
@@ -163,6 +169,9 @@
         dec         r17
         brne        sc_anim
 
+    ; Pause refresh
+        cli
+
     ; Move next -> this
         ldi         r17, 8
         ldi         XL, low(matrix_colbuf + 16)