trunk/src/mame/audio/jedi.c
| r31829 | r31830 | |
| 73 | 73 | } |
| 74 | 74 | |
| 75 | 75 | |
| 76 | | static TIMER_CALLBACK( delayed_audio_latch_w ) |
| 76 | TIMER_CALLBACK_MEMBER(jedi_state::delayed_audio_latch_w) |
| 77 | 77 | { |
| 78 | | jedi_state *state = machine.driver_data<jedi_state>(); |
| 79 | | |
| 80 | | state->m_audio_latch = param; |
| 81 | | *state->m_audio_comm_stat |= 0x80; |
| 78 | m_audio_latch = param; |
| 79 | *m_audio_comm_stat |= 0x80; |
| 82 | 80 | } |
| 83 | 81 | |
| 84 | 82 | |
| 85 | 83 | WRITE8_MEMBER(jedi_state::jedi_audio_latch_w) |
| 86 | 84 | { |
| 87 | | machine().scheduler().synchronize(FUNC(delayed_audio_latch_w), data); |
| 85 | machine().scheduler().synchronize(timer_expired_delegate(FUNC(jedi_state::delayed_audio_latch_w), this), data); |
| 88 | 86 | } |
| 89 | 87 | |
| 90 | 88 | |
trunk/src/mame/audio/starwars.c
| r31829 | r31830 | |
| 61 | 61 | * |
| 62 | 62 | *************************************/ |
| 63 | 63 | |
| 64 | | static TIMER_CALLBACK( sound_callback ) |
| 64 | TIMER_CALLBACK_MEMBER(starwars_state::sound_callback) |
| 65 | 65 | { |
| 66 | | starwars_state *state = machine.driver_data<starwars_state>(); |
| 67 | | state->m_riot->porta_in_set(0x40, 0x40); |
| 68 | | state->m_main_data = param; |
| 69 | | machine.scheduler().boost_interleave(attotime::zero, attotime::from_usec(100)); |
| 66 | m_riot->porta_in_set(0x40, 0x40); |
| 67 | m_main_data = param; |
| 68 | machine().scheduler().boost_interleave(attotime::zero, attotime::from_usec(100)); |
| 70 | 69 | } |
| 71 | 70 | |
| 72 | 71 | |
| r31829 | r31830 | |
| 79 | 78 | |
| 80 | 79 | WRITE8_MEMBER(starwars_state::starwars_sout_w) |
| 81 | 80 | { |
| 82 | | machine().scheduler().synchronize(FUNC(sound_callback), data); |
| 81 | machine().scheduler().synchronize(timer_expired_delegate(FUNC(starwars_state::sound_callback), this), data); |
| 83 | 82 | } |
| 84 | 83 | |
| 85 | 84 | |
| r31829 | r31830 | |
| 102 | 101 | return m_riot->porta_in_get() & 0xc0; /* only upper two flag bits mapped */ |
| 103 | 102 | } |
| 104 | 103 | |
| 105 | | static TIMER_CALLBACK( main_callback ) |
| 104 | TIMER_CALLBACK_MEMBER(starwars_state::main_callback ) |
| 106 | 105 | { |
| 107 | | starwars_state *state = machine.driver_data<starwars_state>(); |
| 108 | | if (state->m_riot->porta_in_get() & 0x80) |
| 109 | | logerror("Sound data not read %x\n",state->m_sound_data); |
| 106 | if (m_riot->porta_in_get() & 0x80) |
| 107 | logerror("Sound data not read %x\n", m_sound_data); |
| 110 | 108 | |
| 111 | | state->m_riot->porta_in_set(0x80, 0x80); |
| 112 | | state->m_sound_data = param; |
| 113 | | machine.scheduler().boost_interleave(attotime::zero, attotime::from_usec(100)); |
| 109 | m_riot->porta_in_set(0x80, 0x80); |
| 110 | m_sound_data = param; |
| 111 | machine().scheduler().boost_interleave(attotime::zero, attotime::from_usec(100)); |
| 114 | 112 | } |
| 115 | 113 | |
| 116 | 114 | WRITE8_MEMBER(starwars_state::starwars_main_wr_w) |
| 117 | 115 | { |
| 118 | | machine().scheduler().synchronize(FUNC(main_callback), data); |
| 116 | machine().scheduler().synchronize(timer_expired_delegate(FUNC(starwars_state::main_callback), this), data); |
| 119 | 117 | } |
| 120 | 118 | |
| 121 | 119 | |
trunk/src/mame/machine/kaneko_calc3.c
| r31829 | r31830 | |
| 34 | 34 | } |
| 35 | 35 | |
| 36 | 36 | |
| 37 | | static TIMER_CALLBACK( kaneko_calc3_run_callback ) |
| 37 | TIMER_CALLBACK_MEMBER( kaneko_calc3_device::run_callback ) |
| 38 | 38 | { |
| 39 | | kaneko_calc3_device* dev = (kaneko_calc3_device*)ptr; |
| 40 | | dev->calc3_mcu_run(machine); |
| 41 | | dev->reset_run_timer(); |
| 39 | calc3_mcu_run(machine()); |
| 40 | reset_run_timer(); |
| 42 | 41 | } |
| 43 | 42 | |
| 44 | 43 | void kaneko_calc3_device::device_start() |
| 45 | 44 | { |
| 46 | 45 | m_calc3_mcuram = (UINT16*)auto_alloc_array_clear(this->machine(), UINT16, 0x10000/2); |
| 47 | 46 | initial_scan_tables(this->machine()); |
| 48 | | m_runtimer = machine().scheduler().timer_alloc(FUNC(kaneko_calc3_run_callback), (void*)this); |
| 47 | m_runtimer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(kaneko_calc3_device::run_callback), this)); |
| 49 | 48 | |
| 50 | 49 | |
| 51 | 50 | save_item(NAME(m_calc3.mcu_status)); |
trunk/src/mame/machine/harddriv.c
| r31829 | r31830 | |
| 1297 | 1297 | /* |
| 1298 | 1298 | TODO: The following does not work correctly |
| 1299 | 1299 | */ |
| 1300 | | static TIMER_CALLBACK( xsdp_sport1_irq_off_callback ) |
| 1300 | TIMER_CALLBACK_MEMBER(harddriv_state::xsdp_sport1_irq_off_callback) |
| 1301 | 1301 | { |
| 1302 | | harddriv_state *state = machine.driver_data<harddriv_state>(); |
| 1303 | | state->m_ds3xdsp->set_input_line(ADSP2105_SPORT1_RX, CLEAR_LINE); |
| 1302 | m_ds3xdsp->set_input_line(ADSP2105_SPORT1_RX, CLEAR_LINE); |
| 1304 | 1303 | } |
| 1305 | 1304 | |
| 1306 | 1305 | |
| r31829 | r31830 | |
| 1312 | 1311 | m_ds3sdsp_sdata = data; |
| 1313 | 1312 | |
| 1314 | 1313 | m_ds3xdsp->set_input_line(ADSP2105_SPORT1_RX, ASSERT_LINE); |
| 1315 | | machine().scheduler().timer_set(attotime::from_nsec(200), FUNC(xsdp_sport1_irq_off_callback)); |
| 1314 | machine().scheduler().timer_set(attotime::from_nsec(200), timer_expired_delegate(FUNC(harddriv_state::xsdp_sport1_irq_off_callback), this)); |
| 1316 | 1315 | } |
| 1317 | 1316 | |
| 1318 | 1317 | |
trunk/src/mame/includes/turbo.h
| r31829 | r31830 | |
| 151 | 151 | UINT32 screen_update_subroc3d(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 152 | 152 | UINT32 screen_update_buckrog(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 153 | 153 | TIMER_CALLBACK_MEMBER(delayed_i8255_w); |
| 154 | TIMER_CALLBACK_MEMBER(update_sound_a); |
| 154 | 155 | DECLARE_WRITE8_MEMBER(turbo_sound_a_w); |
| 155 | 156 | DECLARE_WRITE8_MEMBER(turbo_sound_b_w); |
| 156 | 157 | DECLARE_WRITE8_MEMBER(turbo_sound_c_w); |
trunk/src/mame/includes/jedi.h
| r31829 | r31830 | |
| 83 | 83 | DECLARE_VIDEO_START(jedi); |
| 84 | 84 | UINT32 screen_update_jedi(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); |
| 85 | 85 | TIMER_CALLBACK_MEMBER(generate_interrupt); |
| 86 | TIMER_CALLBACK_MEMBER(delayed_audio_latch_w); |
| 86 | 87 | void get_pens(pen_t *pens); |
| 87 | 88 | void do_pen_lookup(bitmap_rgb32 &bitmap, const rectangle &cliprect); |
| 88 | 89 | void draw_background_and_text(bitmap_rgb32 &bitmap, const rectangle &cliprect); |
trunk/src/mame/video/midzeus2.c
| r31829 | r31830 | |
| 245 | 245 | * |
| 246 | 246 | *************************************/ |
| 247 | 247 | |
| 248 | | static TIMER_CALLBACK( int_timer_callback ) |
| 248 | TIMER_CALLBACK_MEMBER(midzeus2_state::int_timer_callback) |
| 249 | 249 | { |
| 250 | | machine.device("maincpu")->execute().set_input_line(2, ASSERT_LINE); |
| 250 | m_maincpu->set_input_line(2, ASSERT_LINE); |
| 251 | 251 | } |
| 252 | 252 | |
| 253 | 253 | |
| r31829 | r31830 | |
| 268 | 268 | texel_width = 256; |
| 269 | 269 | zeus_renderbase = waveram[1]; |
| 270 | 270 | |
| 271 | | int_timer = machine().scheduler().timer_alloc(FUNC(int_timer_callback)); |
| 271 | int_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(midzeus2_state::int_timer_callback), this)); |
| 272 | 272 | |
| 273 | 273 | /* save states */ |
| 274 | 274 | save_pointer(NAME(waveram[0]), WAVERAM0_WIDTH * WAVERAM0_HEIGHT * 8 / sizeof(waveram[0][0])); |