trunk/src/emu/cpu/psx/dma.c
r22826 | r22827 | |
62 | 62 | { |
63 | 63 | psx_dma_channel *dma = &m_channel[ index ]; |
64 | 64 | |
65 | | dma->timer = machine().scheduler().timer_alloc( timer_expired_delegate( FUNC( psxdma_device::dma_finished_callback ), this) ); |
| 65 | dma->timer = timer_alloc(index); |
66 | 66 | |
67 | 67 | machine().save().save_item( "psxdma", tag(), index, NAME( dma->n_base ) ); |
68 | 68 | machine().save().save_item( "psxdma", tag(), index, NAME( dma->n_blockcontrol ) ); |
r22826 | r22827 | |
194 | 194 | dma_stop_timer( index ); |
195 | 195 | } |
196 | 196 | |
197 | | TIMER_CALLBACK_MEMBER(psxdma_device::dma_finished_callback) |
| 197 | void psxdma_device::device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) |
198 | 198 | { |
199 | | dma_finished(param); |
| 199 | dma_finished(id); |
200 | 200 | } |
201 | 201 | |
202 | 202 | void psxdma_device::install_read_handler( int index, psx_dma_read_delegate p_fn_dma_read ) |
trunk/src/emu/cpu/psx/rcnt.c
r22826 | r22827 | |
55 | 55 | |
56 | 56 | for( n = 0; n < 3; n++ ) |
57 | 57 | { |
58 | | root_counter[ n ].timer = machine().scheduler().timer_alloc( timer_expired_delegate( FUNC( psxrcnt_device::root_finished ), this ) ); |
| 58 | root_counter[ n ].timer = timer_alloc(n); |
59 | 59 | state_save_register_item( machine(), "psxroot", NULL, n, root_counter[ n ].n_count ); |
60 | 60 | state_save_register_item( machine(), "psxroot", NULL, n, root_counter[ n ].n_mode ); |
61 | 61 | state_save_register_item( machine(), "psxroot", NULL, n, root_counter[ n ].n_target ); |
r22826 | r22827 | |
223 | 223 | } |
224 | 224 | } |
225 | 225 | |
226 | | TIMER_CALLBACK_MEMBER(psxrcnt_device::root_finished) |
| 226 | void psxrcnt_device::device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) |
227 | 227 | { |
228 | | int n_counter = param; |
| 228 | int n_counter = id; |
229 | 229 | psx_root *root = &root_counter[ n_counter ]; |
230 | 230 | |
231 | 231 | verboselog( machine(), 2, "root_finished( %d ) %04x\n", n_counter, root_current( n_counter ) ); |