--- trunk/src/devices/dev_px.c 2007/10/08 16:18:00 4 +++ trunk/src/devices/dev_px.c 2007/10/08 16:19:11 18 @@ -25,7 +25,7 @@ * SUCH DAMAGE. * * - * $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 $ * * TURBOchannel Pixelstamp graphics device. * @@ -567,7 +567,8 @@ struct px_data *d = extra; int i; - idata = memory_readmax64(cpu, data, len); + if (writeflag == MEM_WRITE) + idata = memory_readmax64(cpu, data, len); if (relative_addr < 0x0c0000) { /* @@ -789,14 +790,15 @@ fatal("dev_px_init(): unimplemented px_type\n"); } - d->fb_mem = memory_new(PX_XSIZE * PX_YSIZE * d->bitdepth / 8); + d->fb_mem = memory_new(PX_XSIZE * PX_YSIZE * d->bitdepth / 8, + machine->arch); if (d->fb_mem == NULL) { fprintf(stderr, "dev_px_init(): out of memory (1)\n"); exit(1); } d->vfb_data = dev_fb_init(machine, d->fb_mem, 0, VFB_GENERIC, - 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); if (d->vfb_data == NULL) { fprintf(stderr, "dev_px_init(): out of memory (2)\n"); exit(2);