/[gxemul]/trunk/src/devices/dev_sgi_gbe.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_sgi_gbe.c

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

revision 12 by dpavlin, Mon Oct 8 16:18:38 2007 UTC revision 20 by dpavlin, Mon Oct 8 16:19:23 2007 UTC
# Line 25  Line 25 
25   *  SUCH DAMAGE.   *  SUCH DAMAGE.
26   *     *  
27   *   *
28   *  $Id: dev_sgi_gbe.c,v 1.26 2005/08/16 05:37:12 debug Exp $   *  $Id: dev_sgi_gbe.c,v 1.29 2005/11/13 00:14:09 debug Exp $
29   *   *
30   *  SGI "gbe", graphics controller. Framebuffer.   *  SGI "gbe", graphics controller. Framebuffer.
31   *  Loosely inspired by Linux code.   *  Loosely inspired by Linux code.
# Line 49  Line 49 
49  #define GBE_DEBUG  #define GBE_DEBUG
50  /*  #define debug fatal  */  /*  #define debug fatal  */
51    
52  /* #define MTE_TEST */  #define MTE_TEST
53    
54  #define GBE_DEFAULT_XRES                640  #define GBE_DEFAULT_XRES                640
55  #define GBE_DEFAULT_YRES                480  #define GBE_DEFAULT_YRES                480
# Line 205  int dev_sgi_gbe_access(struct cpu *cpu, Line 205  int dev_sgi_gbe_access(struct cpu *cpu,
205          struct sgi_gbe_data *d = extra;          struct sgi_gbe_data *d = extra;
206          uint64_t idata = 0, odata = 0;          uint64_t idata = 0, odata = 0;
207    
208          idata = memory_readmax64(cpu, data, len);          if (writeflag == MEM_WRITE)
209                    idata = memory_readmax64(cpu, data, len);
210    
211  #ifdef GBE_DEBUG  #ifdef GBE_DEBUG
212          if (writeflag == MEM_WRITE)          if (writeflag == MEM_WRITE)
# Line 399  void dev_sgi_gbe_init(struct machine *ma Line 400  void dev_sgi_gbe_init(struct machine *ma
400                  exit(1);                  exit(1);
401          }          }
402          memset(d, 0, sizeof(struct sgi_gbe_data));          memset(d, 0, sizeof(struct sgi_gbe_data));
403    
404            /*  640x480 for Linux:  */
405          d->xres = GBE_DEFAULT_XRES;          d->xres = GBE_DEFAULT_XRES;
406          d->yres = GBE_DEFAULT_YRES;          d->yres = GBE_DEFAULT_YRES;
407          d->bitdepth = 8;          d->bitdepth = 8;
 #if 0  
408          d->control = 0x20aa000;         /*  or 0x00000001?  */          d->control = 0x20aa000;         /*  or 0x00000001?  */
409  #endif  
410            /*  1280x1024 for booting the O2's PROM:  */
411            d->xres = 1280; d->yres = 1024;
412    
413          d->fb_data = dev_fb_init(machine, mem, FAKE_GBE_FB_ADDRESS,          d->fb_data = dev_fb_init(machine, mem, FAKE_GBE_FB_ADDRESS,
414              VFB_GENERIC, d->xres, d->yres, d->xres, d->yres, 8, "SGI GBE");              VFB_GENERIC, d->xres, d->yres, d->xres, d->yres, 8, "SGI GBE");
415          set_grayscale_palette(d->fb_data, 256);          set_grayscale_palette(d->fb_data, 256);
416    
417          memory_device_register(mem, "sgi_gbe", baseaddr, DEV_SGI_GBE_LENGTH,          memory_device_register(mem, "sgi_gbe", baseaddr, DEV_SGI_GBE_LENGTH,
418              dev_sgi_gbe_access, d, MEM_DEFAULT, NULL);              dev_sgi_gbe_access, d, DM_DEFAULT, NULL);
419          machine_add_tickfunction(machine, dev_sgi_gbe_tick, d, 18);          machine_add_tickfunction(machine, dev_sgi_gbe_tick, d, 18);
420  }  }
421    

Legend:
Removed from v.12  
changed lines
  Added in v.20

  ViewVC Help
Powered by ViewVC 1.1.26