From: Joshua Wise Date: Fri, 28 Mar 2008 07:05:38 +0000 (-0400) Subject: new ctoreadmemb X-Git-Url: http://git.joshuawise.com/mandelfpga.git/commitdiff_plain/ca018365394323a7fc3e33597b35e430f82dcbef?ds=sidebyside new ctoreadmemb --- diff --git a/ctoreadmemb.c b/ctoreadmemb.c index 330cb6d..dbcd4a2 100644 --- a/ctoreadmemb.c +++ b/ctoreadmemb.c @@ -1,16 +1,14 @@ #include "mandelfpga.c" #include -// 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