25 |
* SUCH DAMAGE. |
* SUCH DAMAGE. |
26 |
* |
* |
27 |
* |
* |
28 |
* $Id: dev_px.c,v 1.26 2005/02/18 07:29:56 debug Exp $ |
* $Id: dev_px.c,v 1.29 2005/10/26 14:37:04 debug Exp $ |
29 |
* |
* |
30 |
* TURBOchannel Pixelstamp graphics device. |
* TURBOchannel Pixelstamp graphics device. |
31 |
* |
* |
567 |
struct px_data *d = extra; |
struct px_data *d = extra; |
568 |
int i; |
int i; |
569 |
|
|
570 |
idata = memory_readmax64(cpu, data, len); |
if (writeflag == MEM_WRITE) |
571 |
|
idata = memory_readmax64(cpu, data, len); |
572 |
|
|
573 |
if (relative_addr < 0x0c0000) { |
if (relative_addr < 0x0c0000) { |
574 |
/* |
/* |
790 |
fatal("dev_px_init(): unimplemented px_type\n"); |
fatal("dev_px_init(): unimplemented px_type\n"); |
791 |
} |
} |
792 |
|
|
793 |
d->fb_mem = memory_new(PX_XSIZE * PX_YSIZE * d->bitdepth / 8); |
d->fb_mem = memory_new(PX_XSIZE * PX_YSIZE * d->bitdepth / 8, |
794 |
|
machine->arch); |
795 |
if (d->fb_mem == NULL) { |
if (d->fb_mem == NULL) { |
796 |
fprintf(stderr, "dev_px_init(): out of memory (1)\n"); |
fprintf(stderr, "dev_px_init(): out of memory (1)\n"); |
797 |
exit(1); |
exit(1); |
798 |
} |
} |
799 |
|
|
800 |
d->vfb_data = dev_fb_init(machine, d->fb_mem, 0, VFB_GENERIC, |
d->vfb_data = dev_fb_init(machine, d->fb_mem, 0, VFB_GENERIC, |
801 |
PX_XSIZE, PX_YSIZE, PX_XSIZE, PX_YSIZE, d->bitdepth, d->px_name, 1); |
PX_XSIZE, PX_YSIZE, PX_XSIZE, PX_YSIZE, d->bitdepth, d->px_name); |
802 |
if (d->vfb_data == NULL) { |
if (d->vfb_data == NULL) { |
803 |
fprintf(stderr, "dev_px_init(): out of memory (2)\n"); |
fprintf(stderr, "dev_px_init(): out of memory (2)\n"); |
804 |
exit(2); |
exit(2); |