--- trunk/src/devices/dev_fdc.c 2007/10/08 16:19:28 21 +++ trunk/src/devices/dev_fdc.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_fdc.c,v 1.14 2005/11/13 00:14:09 debug Exp $ + * $Id: dev_fdc.c,v 1.18 2006/02/09 20:02:59 debug Exp $ * * PC-style floppy controller. * @@ -47,7 +47,7 @@ #include "misc.h" -#define DEV_FDC_LENGTH 8 +#define DEV_FDC_LENGTH 6 /* TODO 8, but collision with wdc */ struct fdc_data { @@ -59,12 +59,10 @@ /* * dev_fdc_access(): */ -int dev_fdc_access(struct cpu *cpu, struct memory *mem, - uint64_t relative_addr, unsigned char *data, size_t len, - int writeflag, void *extra) +DEVICE_ACCESS(fdc) { uint64_t idata = 0, odata = 0; - int i; + size_t i; struct fdc_data *d = extra; if (writeflag == MEM_WRITE) @@ -93,10 +91,7 @@ } -/* - * devinit_fdc(): - */ -int devinit_fdc(struct devinit *devinit) +DEVINIT(fdc) { struct fdc_data *d;