--- trunk/src/devices/dev_ps2_stuff.c 2007/10/08 16:19:11 18 +++ trunk/src/devices/dev_ps2_stuff.c 2007/10/08 16:19:56 24 @@ -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_ps2_stuff.c,v 1.24 2005/10/26 14:37:04 debug Exp $ + * $Id: dev_ps2_stuff.c,v 1.28 2006/03/04 12:38:48 debug Exp $ * * Playstation 2 misc. stuff: * @@ -79,8 +79,10 @@ cpu_interrupt(cpu, 8 + 9 + i); /* timer 1..3 are "single-shot"? TODO */ - if (i > 0) - d->timer_mode[i] &= ~(T_MODE_CMPE | T_MODE_OVFF); + if (i > 0) { + d->timer_mode[i] &= + ~(T_MODE_CMPE | T_MODE_OVFF); + } } } } @@ -89,9 +91,7 @@ /* * dev_ps2_stuff_access(): */ -int dev_ps2_stuff_access(struct cpu *cpu, struct memory *mem, - uint64_t relative_addr, unsigned char *data, size_t len, - int writeflag, void *extra) +DEVICE_ACCESS(ps2_stuff) { uint64_t idata = 0, odata = 0; int regnr = 0; @@ -335,9 +335,9 @@ d->other_memory_base[DMA_CH_GIF] = DEV_PS2_GIF_FAKE_BASE; memory_device_register(mem, "ps2_stuff", baseaddr, - DEV_PS2_STUFF_LENGTH, dev_ps2_stuff_access, d, MEM_DEFAULT, NULL); + DEV_PS2_STUFF_LENGTH, dev_ps2_stuff_access, d, DM_DEFAULT, NULL); machine_add_tickfunction(machine, - dev_ps2_stuff_tick, d, TICK_STEPS_SHIFT); + dev_ps2_stuff_tick, d, TICK_STEPS_SHIFT, 0.0); return d; }