#include "mandelfpga.c"
#include <stdio.h>

void main()
{
  int y,x;
  
  for (y=0; y < MANDELFPGA_HEIGHT; y++)
  {
    
    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)
        printf("00\n");
      else if (p[0] == 255 && p[1] == 0 && p[2] == 0)
        printf("10\n");
      else if (p[0] == 0 && p[1] == 255 && ((p[2] == 0) || (p[2] == 36)))
        printf("01\n");
      else if (p[0] == 255 && p[1] == 255 && p[2] == 255)
        printf("11\n");
      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
  }
}