]> Joshua Wise's Git repositories - mandelfpga.git/commitdiff
new ctoreadmemb
authorJoshua Wise <joshua@rebirth.joshuawise.com>
Fri, 28 Mar 2008 07:05:38 +0000 (03:05 -0400)
committerJoshua Wise <joshua@rebirth.joshuawise.com>
Fri, 28 Mar 2008 07:05:38 +0000 (03:05 -0400)
ctoreadmemb.c

index 330cb6d556d92a3c3aca0db921657a1aa4e602e6..dbcd4a2e7ccc14400020bd90105467e5e54ec28e 100644 (file)
@@ -1,16 +1,14 @@
 #include "mandelfpga.c"
 #include <stdio.h>
 
-// w t f, the data is inverted somehow :psyduck:
 void main()
 {
   int y,x;
   
-  for (y=MANDELFPGA_HEIGHT-1; y >= 0; y--)
+  for (y=0; y < MANDELFPGA_HEIGHT; y++)
   {
-    for (x = MANDELFPGA_WIDTH; x < 128; x++)
-      printf("00\n");  // XST can't take don't cares there. sad face
-    for (x=MANDELFPGA_WIDTH-1; x >= 0; x--)
+    
+    for (x=0; x < MANDELFPGA_WIDTH; x++)
     {
       unsigned char *p = &MANDELFPGA_PIXEL_DATA[MANDELFPGA_BYTES_PER_PIXEL*(MANDELFPGA_WIDTH*y+x)];
       if (p[0] == 0 && p[1] == 0 && p[2] == 0)
@@ -24,6 +22,7 @@ void main()
       else
         fprintf(stderr, "o shi, what is %d %d %d\n", p[0], p[1], p[2]);
     }
-    
+    for (; x < 128; x++)
+      printf("00\n");  // XST can't take don't cares there. sad face
   }
 }
\ No newline at end of file
This page took 0.025396 seconds and 4 git commands to generate.