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 |
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 |
|
|
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 |
|
|