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

Subversion Repositories or1k

[/] [or1k/] [tags/] [stable_0_2_0_rc3/] [or1ksim/] [peripheral/] [vga.c] - Diff between revs 1486 and 1487

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

Rev 1486 Rev 1487
Line 184... Line 184...
  /* Data is stored upside down */
  /* Data is stored upside down */
  for (y = sy - 1; y >= 0; y--) {
  for (y = sy - 1; y >= 0; y--) {
    int align = 4 - ((bpp + 1) * sx) % 4;
    int align = 4 - ((bpp + 1) * sx) % 4;
    int zero = 0;
    int zero = 0;
    for (x = 0; x < sx; x++) {
    for (x = 0; x < sx; x++) {
      int breakpoint;
      unsigned long pixel = eval_direct32 (vga->vbar[vga->vbindex] + (y * sx + x) * (bpp + 1), 0, 0);
      unsigned long pixel = eval_direct32 (vga->vbar[vga->vbindex] + (y * sx + x) * (bpp + 1), &breakpoint, 0, 0);
 
      if (!fwrite (&pixel, sizeof (pixel), 1, fo)) return 1;
      if (!fwrite (&pixel, sizeof (pixel), 1, fo)) return 1;
    }
    }
    if (!fwrite (&zero, align, 1, fo)) return 1;
    if (!fwrite (&zero, align, 1, fo)) return 1;
  }
  }
 
 

powered by: WebSVN 2.1.0

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