OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [tags/] [stable_0_2_0_rc2/] [or1ksim/] [peripheral/] [fb.c] - Diff between revs 1244 and 1308

Go to most recent revision | Show entire file | Details | Blame | View Log

Rev 1244 Rev 1308
Line 53... Line 53...
                     break;
                     break;
    default:
    default:
      a -= FB_PAL;
      a -= FB_PAL;
      a /= 4;
      a /= 4;
      if (a < 0 || a >= 256) {
      if (a < 0 || a >= 256) {
        fprintf (stderr, "Write out of palette buffer (0x%08x)!\n", addr);
        fprintf (stderr, "Write out of palette buffer (0x%08lx)!\n", addr);
        runtime.sim.cont_run = 0;
        runtime.sim.cont_run = 0;
      } else pal[a] = value;
      } else pal[a] = value;
      break;
      break;
  }
  }
}
}
Line 75... Line 75...
    case FB_CAMPOSADDR: return camera_pos; break;
    case FB_CAMPOSADDR: return camera_pos; break;
    default:
    default:
      a -= FB_PAL;
      a -= FB_PAL;
      a /= 4;
      a /= 4;
      if (a < 0 || a >= 256) {
      if (a < 0 || a >= 256) {
        fprintf (stderr, "Read out of palette buffer (0x%08x)!\n", addr);
        fprintf (stderr, "Read out of palette buffer (0x%08lx)!\n", addr);
        runtime.sim.cont_run = 0;
        runtime.sim.cont_run = 0;
        return 0;
        return 0;
      } else return pal[a];
      } else return pal[a];
  }
  }
}
}
Line 179... Line 179...
/* Dumps a bmp file, based on current image */
/* Dumps a bmp file, based on current image */
static int fb_dump_image24 (char *filename)
static int fb_dump_image24 (char *filename)
{
{
  int sx = FB_SIZEX;
  int sx = FB_SIZEX;
  int sy = FB_SIZEY;
  int sy = FB_SIZEY;
  int i, x, y;
  int x, y;
  FILE *fo;
  FILE *fo;
 
 
  unsigned short int u16;
  unsigned short int u16;
  unsigned long int u32;
  unsigned long int u32;
 
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.