/[gxemul]/trunk/src/devices/dev_fb.c
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /trunk/src/devices/dev_fb.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 17 by dpavlin, Mon Oct 8 16:18:51 2007 UTC revision 18 by dpavlin, Mon Oct 8 16:19:11 2007 UTC
# Line 25  Line 25 
25   *  SUCH DAMAGE.   *  SUCH DAMAGE.
26   *     *  
27   *   *
28   *  $Id: dev_fb.c,v 1.107 2005/09/18 19:54:15 debug Exp $   *  $Id: dev_fb.c,v 1.108 2005/10/20 22:49:07 debug Exp $
29   *     *  
30   *  Generic framebuffer device.   *  Generic framebuffer device.
31   *   *
32   *      DECstation VFB01 monochrome framebuffer, 1024x864   *      DECstation VFB01 monochrome framebuffer, 1024x864
33   *      DECstation VFB02 8-bit color framebuffer, 1024x864   *      DECstation VFB02 8-bit color framebuffer, 1024x864
34   *      DECstation Maxine, 1024x768 8-bit color   *      DECstation Maxine, 1024x768 8-bit color
35   *      HPCmips framebuffer   *      HPC (mips, arm, ..) framebuffer
36   *      Playstation 2 (24-bit color)   *      Playstation 2 (24-bit color)
37   *      generic (any resolution, several bit depths possible)   *      generic (any resolution, several bit depths possible)
38   *   *
# Line 388  void update_framebuffer(struct vfb_data Line 388  void update_framebuffer(struct vfb_data
388                                  c = d->framebuffer[fb_addr >> 3];                                  c = d->framebuffer[fb_addr >> 3];
389                                  fb_addr &= 7;                                  fb_addr &= 7;
390    
391                                  /*  HPCmips is reverse:  */                                  /*  HPC is reverse:  */
392                                  if (d->vfb_type == VFB_HPCMIPS)                                  if (d->vfb_type == VFB_HPC)
393                                          fb_addr = 8 - d->bit_depth - fb_addr;                                          fb_addr = 8 - d->bit_depth - fb_addr;
394    
395                                  c = (c >> fb_addr) & ((1<<d->bit_depth) - 1);                                  c = (c >> fb_addr) & ((1<<d->bit_depth) - 1);
# Line 435  void update_framebuffer(struct vfb_data Line 435  void update_framebuffer(struct vfb_data
435                                          break;                                          break;
436                                  /*  TODO: copy to the scaledown code below  */                                  /*  TODO: copy to the scaledown code below  */
437                                  case 16:                                  case 16:
438                                          if (d->vfb_type == VFB_HPCMIPS) {                                          if (d->vfb_type == VFB_HPC) {
439                                                  b = d->framebuffer[fb_addr] +                                                  b = d->framebuffer[fb_addr] +
440                                                      (d->framebuffer[fb_addr+1]                                                      (d->framebuffer[fb_addr+1]
441                                                      << 8);                                                      << 8);
# Line 521  void update_framebuffer(struct vfb_data Line 521  void update_framebuffer(struct vfb_data
521                                  c = d->framebuffer[fb_addr >> 3];                                  c = d->framebuffer[fb_addr >> 3];
522                                  fb_addr &= 7;                                  fb_addr &= 7;
523    
524                                  /*  HPCmips is reverse:  */                                  /*  HPC is reverse:  */
525                                  if (d->vfb_type == VFB_HPCMIPS)                                  if (d->vfb_type == VFB_HPC)
526                                          fb_addr = 8 - d->bit_depth - fb_addr;                                          fb_addr = 8 - d->bit_depth - fb_addr;
527    
528                                  c = (c >> fb_addr) & ((1<<d->bit_depth) - 1);                                  c = (c >> fb_addr) & ((1<<d->bit_depth) - 1);
# Line 936  int dev_fb_access(struct cpu *cpu, struc Line 936  int dev_fb_access(struct cpu *cpu, struc
936   *   *
937   *  VFB_DEC_VFB01, _VFB02, and VFB_DEC_MAXINE are DECstation specific.   *  VFB_DEC_VFB01, _VFB02, and VFB_DEC_MAXINE are DECstation specific.
938   *   *
939   *  If type is VFB_HPCMIPS, then color encoding differs from the generic case.   *  If type is VFB_HPC, then color encoding differs from the generic case.
940   *   *
941   *  If bit_depth = -15 (note the minus sign), then a special hack is used for   *  If bit_depth = -15 (note the minus sign), then a special hack is used for
942   *  the Playstation Portable's 5-bit R, 5-bit G, 5-bit B.   *  the Playstation Portable's 5-bit R, 5-bit G, 5-bit B.

Legend:
Removed from v.17  
changed lines
  Added in v.18

  ViewVC Help
Powered by ViewVC 1.1.26