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

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

revision 41 by dpavlin, Mon Oct 8 16:21:17 2007 UTC revision 42 by dpavlin, Mon Oct 8 16:22:32 2007 UTC
# Line 25  Line 25 
25   *  SUCH DAMAGE.   *  SUCH DAMAGE.
26   *     *  
27   *   *
28   *  $Id: dev_bt455.c,v 1.11 2006/12/30 13:30:57 debug Exp $   *  $Id: dev_bt455.c,v 1.12 2007/06/15 18:44:19 debug Exp $
29   *     *  
30   *  Brooktree 455, used by TURBOchannel graphics cards.   *  COMMENT: Brooktree BT455, used by TURBOchannel graphics cards
31   *   *
32   *  TODO:  This is hardcoded to only use 16 grayscales, using only the   *  TODO:  This is hardcoded to only use 16 grayscales, using only the
33   *  green component of the palette.  Perhaps some other graphics card uses   *  green component of the palette.  Perhaps some other graphics card uses
# Line 57  struct bt455_data { Line 57  struct bt455_data {
57  };  };
58    
59    
 /*  
  *  dev_bt455_access():  
  */  
60  DEVICE_ACCESS(bt455)  DEVICE_ACCESS(bt455)
61  {  {
62          struct bt455_data *d = (struct bt455_data *) extra;          struct bt455_data *d = extra;
63          uint64_t idata = 0, odata = 0;          uint64_t idata = 0, odata = 0;
64          int i, modified;          int i, modified;
65    
# Line 172  DEVICE_ACCESS(bt455) Line 169  DEVICE_ACCESS(bt455)
169  void dev_bt455_init(struct memory *mem, uint64_t baseaddr,  void dev_bt455_init(struct memory *mem, uint64_t baseaddr,
170          struct vfb_data *vfb_data)          struct vfb_data *vfb_data)
171  {  {
172          struct bt455_data *d = malloc(sizeof(struct bt455_data));          struct bt455_data *d;
173          if (d == NULL) {  
174                  fprintf(stderr, "out of memory\n");          CHECK_ALLOCATION(d = malloc(sizeof(struct bt455_data)));
                 exit(1);  
         }  
175          memset(d, 0, sizeof(struct bt455_data));          memset(d, 0, sizeof(struct bt455_data));
176    
177          d->vfb_data     = vfb_data;          d->vfb_data     = vfb_data;
178          d->rgb_palette  = vfb_data->rgb_palette;          d->rgb_palette  = vfb_data->rgb_palette;
179    

Legend:
Removed from v.41  
changed lines
  Added in v.42

  ViewVC Help
Powered by ViewVC 1.1.26