--- trunk/src/devices/dev_sfb.c 2007/10/08 16:18:00 4 +++ trunk/src/devices/dev_sfb.c 2007/10/08 16:19:37 22 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004-2005 Anders Gavare. All rights reserved. + * Copyright (C) 2004-2006 Anders Gavare. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: @@ -25,7 +25,7 @@ * SUCH DAMAGE. * * - * $Id: dev_sfb.c,v 1.6 2005/02/18 07:22:30 debug Exp $ + * $Id: dev_sfb.c,v 1.9 2006/01/01 13:17:17 debug Exp $ * * SFB TURBOchannel framebuffer. * @@ -67,13 +67,13 @@ /* * dev_sfb_access(): */ -int dev_sfb_access(struct cpu *cpu, struct memory *mem, uint64_t relative_addr, - unsigned char *data, size_t len, int writeflag, void *extra) +DEVICE_ACCESS(sfb) { uint64_t idata = 0, odata = 0; struct sfb_data *d = extra; - idata = memory_readmax64(cpu, data, len); + if (writeflag == MEM_WRITE) + idata = memory_readmax64(cpu, data, len); if (writeflag==MEM_READ) { odata = d->reg[(relative_addr >> 2) & (N_SFB_REGS - 1)]; @@ -113,6 +113,6 @@ d->reg[(SFB_VVERTICAL - SFB_ASIC_OFFSET) / 4] = SFB_YSIZE; memory_device_register(mem, "sfb", baseaddr, SFB_REG_SIZE, - dev_sfb_access, d, MEM_DEFAULT, NULL); + dev_sfb_access, d, DM_DEFAULT, NULL); }