--- trunk/src/devices/dev_turbochannel.c 2007/10/08 16:18:38 12 +++ trunk/src/devices/dev_turbochannel.c 2007/10/08 16:19:37 22 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2003-2005 Anders Gavare. All rights reserved. + * Copyright (C) 2003-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_turbochannel.c,v 1.43 2005/07/12 08:49:13 debug Exp $ + * $Id: dev_turbochannel.c,v 1.46 2006/01/01 13:17:17 debug Exp $ * * Generic framework for TURBOchannel devices, used in DECstation machines. */ @@ -66,14 +66,13 @@ /* * dev_turbochannel_access(): */ -int dev_turbochannel_access(struct cpu *cpu, struct memory *mem, - uint64_t relative_addr, unsigned char *data, size_t len, - int writeflag, void *extra) +DEVICE_ACCESS(turbochannel) { struct turbochannel_data *d = extra; uint64_t idata = 0, odata = 0; - idata = memory_readmax64(cpu, data, len); + if (writeflag == MEM_WRITE) + idata = memory_readmax64(cpu, data, len); relative_addr += d->rom_skip; @@ -335,6 +334,6 @@ snprintf(name2, nlen, "turbochannel"); memory_device_register(mem, name2, baseaddr + rom_offset + rom_skip, - rom_length-rom_skip, dev_turbochannel_access, d, MEM_DEFAULT, NULL); + rom_length-rom_skip, dev_turbochannel_access, d, DM_DEFAULT, NULL); }