trunk/src/mame/drivers/othunder.c
| r22843 | r22844 | |
| 277 | 277 | update_irq(); |
| 278 | 278 | } |
| 279 | 279 | |
| 280 | | TIMER_CALLBACK_MEMBER(othunder_state::ad_interrupt) |
| 280 | void othunder_state::device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) |
| 281 | 281 | { |
| 282 | | m_ad_irq = 1; |
| 283 | | update_irq(); |
| 282 | switch (id) |
| 283 | { |
| 284 | case TIMER_AD_INTERRUPT: |
| 285 | m_ad_irq = 1; |
| 286 | update_irq(); |
| 287 | break; |
| 288 | default: |
| 289 | assert_always(FALSE, "Unknown id in othunder_state::device_timer"); |
| 290 | } |
| 284 | 291 | } |
| 285 | 292 | |
| 286 | 293 | |
| r22843 | r22844 | |
| 374 | 381 | The ADC60808 clock is 512kHz. Conversion takes between 0 and 8 clock |
| 375 | 382 | cycles, so would end in a maximum of 15.625us. We'll use 10. */ |
| 376 | 383 | |
| 377 | | machine().scheduler().timer_set(attotime::from_usec(10), timer_expired_delegate(FUNC(othunder_state::ad_interrupt),this)); |
| 384 | timer_set(attotime::from_usec(10), TIMER_AD_INTERRUPT); |
| 378 | 385 | } |
| 379 | 386 | |
| 380 | 387 | |
trunk/src/mame/drivers/vendetta.c
| r22843 | r22844 | |
| 194 | 194 | k053246_set_objcha_line(m_k053246, (data & 0x20) ? ASSERT_LINE : CLEAR_LINE); |
| 195 | 195 | } |
| 196 | 196 | |
| 197 | | TIMER_CALLBACK_MEMBER(vendetta_state::z80_nmi_callback) |
| 197 | void vendetta_state::device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) |
| 198 | 198 | { |
| 199 | | m_audiocpu->set_input_line(INPUT_LINE_NMI, ASSERT_LINE); |
| 199 | switch (id) |
| 200 | { |
| 201 | case TIMER_Z80_NMI: |
| 202 | m_audiocpu->set_input_line(INPUT_LINE_NMI, ASSERT_LINE); |
| 203 | break; |
| 204 | default: |
| 205 | assert_always(FALSE, "Unknown id in vendetta_state::device_timer"); |
| 206 | } |
| 200 | 207 | } |
| 201 | 208 | |
| 202 | 209 | WRITE8_MEMBER(vendetta_state::z80_arm_nmi_w) |
| 203 | 210 | { |
| 204 | 211 | m_audiocpu->set_input_line(INPUT_LINE_NMI, CLEAR_LINE); |
| 205 | 212 | |
| 206 | | machine().scheduler().timer_set(attotime::from_usec(25), timer_expired_delegate(FUNC(vendetta_state::z80_nmi_callback),this)); |
| 213 | timer_set(attotime::from_usec(25), TIMER_Z80_NMI); |
| 207 | 214 | } |
| 208 | 215 | |
| 209 | 216 | WRITE8_MEMBER(vendetta_state::z80_irq_w) |
trunk/src/mame/drivers/taito_f3.c
| r22843 | r22844 | |
| 390 | 390 | |
| 391 | 391 | /******************************************************************************/ |
| 392 | 392 | |
| 393 | | TIMER_CALLBACK_MEMBER(taito_f3_state::f3_interrupt3) |
| 393 | void taito_f3_state::device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) |
| 394 | 394 | { |
| 395 | | m_maincpu->set_input_line(3, HOLD_LINE); // some signal from video hardware? |
| 395 | switch (id) |
| 396 | { |
| 397 | case TIMER_F3_INTERRUPT3: |
| 398 | m_maincpu->set_input_line(3, HOLD_LINE); // some signal from video hardware? |
| 399 | break; |
| 400 | default: |
| 401 | assert_always(FALSE, "Unknown id in taito_f3_state::device_timer"); |
| 402 | } |
| 396 | 403 | } |
| 397 | 404 | |
| 398 | 405 | INTERRUPT_GEN_MEMBER(taito_f3_state::f3_interrupt2) |
| 399 | 406 | { |
| 400 | 407 | device.execute().set_input_line(2, HOLD_LINE); // vblank |
| 401 | | machine().scheduler().timer_set(downcast<cpu_device *>(&device)->cycles_to_attotime(10000), timer_expired_delegate(FUNC(taito_f3_state::f3_interrupt3),this)); |
| 408 | timer_set(downcast<cpu_device *>(&device)->cycles_to_attotime(10000), TIMER_F3_INTERRUPT3); |
| 402 | 409 | } |
| 403 | 410 | |
| 404 | 411 | static SOUND_RESET( f3 ) |
trunk/src/mame/drivers/fuukifg3.c
| r22843 | r22844 | |
| 521 | 521 | |
| 522 | 522 | ***************************************************************************/ |
| 523 | 523 | |
| 524 | | TIMER_CALLBACK_MEMBER(fuuki32_state::level_1_interrupt_callback) |
| 524 | void fuuki32_state::device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) |
| 525 | 525 | { |
| 526 | | m_maincpu->set_input_line(1, HOLD_LINE); |
| 527 | | machine().scheduler().timer_set(machine().primary_screen->time_until_pos(248), timer_expired_delegate(FUNC(fuuki32_state::level_1_interrupt_callback),this)); |
| 526 | switch (id) |
| 527 | { |
| 528 | case TIMER_LEVEL_1_INTERRUPT: |
| 529 | m_maincpu->set_input_line(1, HOLD_LINE); |
| 530 | timer_set(machine().primary_screen->time_until_pos(248), TIMER_LEVEL_1_INTERRUPT); |
| 531 | break; |
| 532 | case TIMER_VBLANK_INTERRUPT: |
| 533 | m_maincpu->set_input_line(3, HOLD_LINE); // VBlank IRQ |
| 534 | timer_set(machine().primary_screen->time_until_vblank_start(), TIMER_VBLANK_INTERRUPT); |
| 535 | break; |
| 536 | case TIMER_RASTER_INTERRUPT: |
| 537 | m_maincpu->set_input_line(5, HOLD_LINE); // Raster Line IRQ |
| 538 | machine().primary_screen->update_partial(machine().primary_screen->vpos()); |
| 539 | m_raster_interrupt_timer->adjust(machine().primary_screen->frame_period()); |
| 540 | break; |
| 541 | default: |
| 542 | assert_always(FALSE, "Unknown id in fuuki32_state::device_timer"); |
| 543 | } |
| 528 | 544 | } |
| 529 | 545 | |
| 530 | 546 | |
| 531 | | TIMER_CALLBACK_MEMBER(fuuki32_state::vblank_interrupt_callback) |
| 532 | | { |
| 533 | | m_maincpu->set_input_line(3, HOLD_LINE); // VBlank IRQ |
| 534 | | machine().scheduler().timer_set(machine().primary_screen->time_until_vblank_start(), timer_expired_delegate(FUNC(fuuki32_state::vblank_interrupt_callback),this)); |
| 535 | | } |
| 536 | | |
| 537 | | |
| 538 | | TIMER_CALLBACK_MEMBER(fuuki32_state::raster_interrupt_callback) |
| 539 | | { |
| 540 | | m_maincpu->set_input_line(5, HOLD_LINE); // Raster Line IRQ |
| 541 | | machine().primary_screen->update_partial(machine().primary_screen->vpos()); |
| 542 | | m_raster_interrupt_timer->adjust(machine().primary_screen->frame_period()); |
| 543 | | } |
| 544 | | |
| 545 | | |
| 546 | 547 | void fuuki32_state::machine_start() |
| 547 | 548 | { |
| 548 | 549 | UINT8 *ROM = memregion("soundcpu")->base(); |
| 549 | 550 | |
| 550 | 551 | membank("bank1")->configure_entries(0, 0x10, &ROM[0x10000], 0x8000); |
| 551 | 552 | |
| 552 | | m_raster_interrupt_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(fuuki32_state::raster_interrupt_callback),this)); |
| 553 | m_raster_interrupt_timer = timer_alloc(TIMER_RASTER_INTERRUPT); |
| 553 | 554 | |
| 554 | 555 | save_item(NAME(m_spr_buffered_tilebank)); |
| 555 | 556 | save_item(NAME(m_shared_ram)); |
| r22843 | r22844 | |
| 560 | 561 | { |
| 561 | 562 | const rectangle &visarea = machine().primary_screen->visible_area(); |
| 562 | 563 | |
| 563 | | machine().scheduler().timer_set(machine().primary_screen->time_until_pos(248), timer_expired_delegate(FUNC(fuuki32_state::level_1_interrupt_callback),this)); |
| 564 | | machine().scheduler().timer_set(machine().primary_screen->time_until_vblank_start(), timer_expired_delegate(FUNC(fuuki32_state::vblank_interrupt_callback),this)); |
| 564 | timer_set(machine().primary_screen->time_until_pos(248), TIMER_LEVEL_1_INTERRUPT); |
| 565 | timer_set(machine().primary_screen->time_until_vblank_start(), TIMER_VBLANK_INTERRUPT); |
| 565 | 566 | m_raster_interrupt_timer->adjust(machine().primary_screen->time_until_pos(0, visarea.max_x + 1)); |
| 566 | 567 | } |
| 567 | 568 | |
trunk/src/mame/drivers/sprint4.c
| r22843 | r22844 | |
| 41 | 41 | } |
| 42 | 42 | |
| 43 | 43 | |
| 44 | void sprint4_state::device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) |
| 45 | { |
| 46 | switch (id) |
| 47 | { |
| 48 | case TIMER_NMI: |
| 49 | nmi_callback(ptr, param); |
| 50 | break; |
| 51 | default: |
| 52 | assert_always(FALSE, "Unknown id in sprint4_state::device_timer"); |
| 53 | } |
| 54 | } |
| 55 | |
| 56 | |
| 44 | 57 | TIMER_CALLBACK_MEMBER(sprint4_state::nmi_callback) |
| 45 | 58 | { |
| 46 | 59 | int scanline = param; |
| r22843 | r22844 | |
| 103 | 116 | if (ioport("IN0")->read() & 0x40) |
| 104 | 117 | m_maincpu->set_input_line(INPUT_LINE_NMI, PULSE_LINE); |
| 105 | 118 | |
| 106 | | machine().scheduler().timer_set(machine().primary_screen->time_until_pos(scanline), timer_expired_delegate(FUNC(sprint4_state::nmi_callback),this), scanline); |
| 119 | timer_set(machine().primary_screen->time_until_pos(scanline), TIMER_NMI, scanline); |
| 107 | 120 | } |
| 108 | 121 | |
| 109 | 122 | |
| 110 | 123 | void sprint4_state::machine_reset() |
| 111 | 124 | { |
| 112 | | machine().scheduler().timer_set(machine().primary_screen->time_until_pos(32), timer_expired_delegate(FUNC(sprint4_state::nmi_callback),this), 32); |
| 125 | timer_set(machine().primary_screen->time_until_pos(32), TIMER_NMI, 32); |
| 113 | 126 | |
| 114 | 127 | memset(m_steer_FF1, 0, sizeof m_steer_FF1); |
| 115 | 128 | memset(m_steer_FF2, 0, sizeof m_steer_FF2); |
trunk/src/mame/drivers/tehkanwc.c
| r22843 | r22844 | |
| 144 | 144 | m_audiocpu->set_input_line(INPUT_LINE_NMI, PULSE_LINE); |
| 145 | 145 | } |
| 146 | 146 | |
| 147 | | TIMER_CALLBACK_MEMBER(tehkanwc_state::reset_callback) |
| 147 | void tehkanwc_state::device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) |
| 148 | 148 | { |
| 149 | | m_audiocpu->set_input_line(INPUT_LINE_RESET, PULSE_LINE); |
| 149 | switch (id) |
| 150 | { |
| 151 | case TIMER_RESET: |
| 152 | m_audiocpu->set_input_line(INPUT_LINE_RESET, PULSE_LINE); |
| 153 | break; |
| 154 | default: |
| 155 | assert_always(FALSE, "Unknown id in tehkanwc_state::device_timer"); |
| 156 | } |
| 150 | 157 | } |
| 151 | 158 | |
| 152 | 159 | WRITE8_MEMBER(tehkanwc_state::sound_answer_w) |
| r22843 | r22844 | |
| 155 | 162 | |
| 156 | 163 | /* in Gridiron, the sound CPU goes in a tight loop after the self test, */ |
| 157 | 164 | /* probably waiting to be reset by a watchdog */ |
| 158 | | if (space.device().safe_pc() == 0x08bc) machine().scheduler().timer_set(attotime::from_seconds(1), timer_expired_delegate(FUNC(tehkanwc_state::reset_callback),this)); |
| 165 | if (space.device().safe_pc() == 0x08bc) timer_set(attotime::from_seconds(1), TIMER_RESET); |
| 159 | 166 | } |
| 160 | 167 | |
| 161 | 168 | |
trunk/src/mame/drivers/asuka.c
| r22843 | r22844 | |
| 230 | 230 | INTERRUPTS |
| 231 | 231 | ***********************************************************/ |
| 232 | 232 | |
| 233 | | TIMER_CALLBACK_MEMBER(asuka_state::cadash_interrupt5) |
| 233 | void asuka_state::device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) |
| 234 | 234 | { |
| 235 | | m_maincpu->set_input_line(5, HOLD_LINE); |
| 235 | switch (id) |
| 236 | { |
| 237 | case TIMER_CADASH_INTERRUPT5: |
| 238 | m_maincpu->set_input_line(5, HOLD_LINE); |
| 239 | break; |
| 240 | default: |
| 241 | assert_always(FALSE, "Unknown id in asuka_state::device_timer"); |
| 242 | } |
| 236 | 243 | } |
| 237 | 244 | |
| 245 | |
| 238 | 246 | INTERRUPT_GEN_MEMBER(asuka_state::cadash_interrupt) |
| 239 | 247 | { |
| 240 | | machine().scheduler().timer_set(downcast<cpu_device *>(&device)->cycles_to_attotime(500), timer_expired_delegate(FUNC(asuka_state::cadash_interrupt5),this)); |
| 248 | timer_set(downcast<cpu_device *>(&device)->cycles_to_attotime(500), TIMER_CADASH_INTERRUPT5); |
| 241 | 249 | device.execute().set_input_line(4, HOLD_LINE); /* interrupt vector 4 */ |
| 242 | 250 | } |
| 243 | 251 | |
trunk/src/mame/drivers/mgolf.c
| r22843 | r22844 | |
| 10 | 10 | class mgolf_state : public driver_device |
| 11 | 11 | { |
| 12 | 12 | public: |
| 13 | enum |
| 14 | { |
| 15 | TIMER_INTERRUPT |
| 16 | }; |
| 17 | |
| 13 | 18 | mgolf_state(const machine_config &mconfig, device_type type, const char *tag) |
| 14 | 19 | : driver_device(mconfig, type, tag), |
| 15 | 20 | m_video_ram(*this, "video_ram"), |
| r22843 | r22844 | |
| 43 | 48 | TIMER_CALLBACK_MEMBER(interrupt_callback); |
| 44 | 49 | void update_plunger( ); |
| 45 | 50 | double calc_plunger_pos(); |
| 51 | |
| 52 | protected: |
| 53 | virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr); |
| 46 | 54 | }; |
| 47 | 55 | |
| 48 | 56 | |
| r22843 | r22844 | |
| 116 | 124 | } |
| 117 | 125 | |
| 118 | 126 | |
| 127 | void mgolf_state::device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) |
| 128 | { |
| 129 | switch (id) |
| 130 | { |
| 131 | case TIMER_INTERRUPT: |
| 132 | interrupt_callback(ptr, param); |
| 133 | break; |
| 134 | default: |
| 135 | assert_always(FALSE, "Unknown id in mgolf_state::device_timer"); |
| 136 | } |
| 137 | } |
| 138 | |
| 139 | |
| 119 | 140 | TIMER_CALLBACK_MEMBER(mgolf_state::interrupt_callback) |
| 120 | 141 | { |
| 121 | 142 | int scanline = param; |
| r22843 | r22844 | |
| 129 | 150 | if (scanline >= 262) |
| 130 | 151 | scanline = 16; |
| 131 | 152 | |
| 132 | | machine().scheduler().timer_set(machine().primary_screen->time_until_pos(scanline), timer_expired_delegate(FUNC(mgolf_state::interrupt_callback),this), scanline); |
| 153 | timer_set(machine().primary_screen->time_until_pos(scanline), TIMER_INTERRUPT, scanline); |
| 133 | 154 | } |
| 134 | 155 | |
| 135 | 156 | |
| r22843 | r22844 | |
| 314 | 335 | |
| 315 | 336 | void mgolf_state::machine_reset() |
| 316 | 337 | { |
| 317 | | machine().scheduler().timer_set(machine().primary_screen->time_until_pos(16), timer_expired_delegate(FUNC(mgolf_state::interrupt_callback),this), 16); |
| 338 | timer_set(machine().primary_screen->time_until_pos(16), TIMER_INTERRUPT, 16); |
| 318 | 339 | |
| 319 | 340 | m_mask = 0; |
| 320 | 341 | m_prev = 0; |
trunk/src/mame/drivers/taito_z.c
| r22843 | r22844 | |
| 1016 | 1016 | INTERRUPTS |
| 1017 | 1017 | ***********************************************************/ |
| 1018 | 1018 | |
| 1019 | | /* 68000 A */ |
| 1020 | | |
| 1021 | | TIMER_CALLBACK_MEMBER(taitoz_state::taitoz_interrupt6) |
| 1019 | void taitoz_state::device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) |
| 1022 | 1020 | { |
| 1023 | | m_maincpu->set_input_line(6, HOLD_LINE); |
| 1021 | switch (id) |
| 1022 | { |
| 1023 | case TIMER_TAITOZ_INTERRUPT6: |
| 1024 | /* 68000 A */ |
| 1025 | m_maincpu->set_input_line(6, HOLD_LINE); |
| 1026 | break; |
| 1027 | case TIMER_TAITOZ_CPUB_INTERRUPT5: |
| 1028 | /* 68000 B */ |
| 1029 | m_subcpu->set_input_line(5, HOLD_LINE); |
| 1030 | break; |
| 1031 | default: |
| 1032 | assert_always(FALSE, "Unknown id in taitoz_state::device_timer"); |
| 1033 | } |
| 1024 | 1034 | } |
| 1025 | 1035 | |
| 1026 | | /* 68000 B */ |
| 1027 | 1036 | |
| 1028 | | TIMER_CALLBACK_MEMBER(taitoz_state::taitoz_cpub_interrupt5) |
| 1029 | | { |
| 1030 | | m_subcpu->set_input_line(5, HOLD_LINE); |
| 1031 | | } |
| 1032 | | |
| 1033 | | |
| 1034 | 1037 | /***** Routines for particular games *****/ |
| 1035 | 1038 | |
| 1036 | 1039 | INTERRUPT_GEN_MEMBER(taitoz_state::sci_interrupt) |
| r22843 | r22844 | |
| 1042 | 1045 | m_sci_int6 = !m_sci_int6; |
| 1043 | 1046 | |
| 1044 | 1047 | if (m_sci_int6) |
| 1045 | | machine().scheduler().timer_set(downcast<cpu_device *>(&device)->cycles_to_attotime(200000 - 500), timer_expired_delegate(FUNC(taitoz_state::taitoz_interrupt6),this)); |
| 1048 | timer_set(downcast<cpu_device *>(&device)->cycles_to_attotime(200000 - 500), TIMER_TAITOZ_INTERRUPT6); |
| 1046 | 1049 | |
| 1047 | 1050 | device.execute().set_input_line(4, HOLD_LINE); |
| 1048 | 1051 | } |
| r22843 | r22844 | |
| 1226 | 1229 | but we don't want CPUA to have an int6 before int4 is over (?) |
| 1227 | 1230 | */ |
| 1228 | 1231 | |
| 1229 | | machine().scheduler().timer_set(downcast<cpu_device *>(&space.device())->cycles_to_attotime(10000), timer_expired_delegate(FUNC(taitoz_state::taitoz_interrupt6),this)); |
| 1232 | timer_set(downcast<cpu_device *>(&space.device())->cycles_to_attotime(10000), TIMER_TAITOZ_INTERRUPT6); |
| 1230 | 1233 | } |
| 1231 | 1234 | |
| 1232 | 1235 | |
| r22843 | r22844 | |
| 1291 | 1294 | Four lightgun interrupts happen before the collected coords |
| 1292 | 1295 | are moved to shared ram where CPUA can use them. */ |
| 1293 | 1296 | |
| 1294 | | machine().scheduler().timer_set(downcast<cpu_device *>(&space.device())->cycles_to_attotime(10000), timer_expired_delegate(FUNC(taitoz_state::taitoz_cpub_interrupt5),this)); |
| 1297 | timer_set(downcast<cpu_device *>(&space.device())->cycles_to_attotime(10000), TIMER_TAITOZ_CPUB_INTERRUPT5); |
| 1295 | 1298 | } |
| 1296 | 1299 | |
| 1297 | 1300 | WRITE16_MEMBER(taitoz_state::spacegun_gun_output_w) |
trunk/src/mame/drivers/slapshot.c
| r22843 | r22844 | |
| 171 | 171 | INTERRUPTS |
| 172 | 172 | ***********************************************************/ |
| 173 | 173 | |
| 174 | | TIMER_CALLBACK_MEMBER(slapshot_state::slapshot_interrupt6) |
| 174 | void slapshot_state::device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) |
| 175 | 175 | { |
| 176 | | m_maincpu->set_input_line(6, HOLD_LINE); |
| 176 | switch (id) |
| 177 | { |
| 178 | case TIMER_SLAPSHOT_INTERRUPT6: |
| 179 | m_maincpu->set_input_line(6, HOLD_LINE); |
| 180 | break; |
| 181 | default: |
| 182 | assert_always(FALSE, "Unknown id in slapshot_state::device_timer"); |
| 183 | } |
| 177 | 184 | } |
| 178 | 185 | |
| 179 | 186 | |
| 180 | 187 | INTERRUPT_GEN_MEMBER(slapshot_state::slapshot_interrupt) |
| 181 | 188 | { |
| 182 | | machine().scheduler().timer_set(downcast<cpu_device *>(&device)->cycles_to_attotime(200000 - 500), timer_expired_delegate(FUNC(slapshot_state::slapshot_interrupt6),this)); |
| 189 | timer_set(downcast<cpu_device *>(&device)->cycles_to_attotime(200000 - 500), TIMER_SLAPSHOT_INTERRUPT6); |
| 183 | 190 | device.execute().set_input_line(5, HOLD_LINE); |
| 184 | 191 | } |
| 185 | 192 | |
trunk/src/mame/drivers/rollerg.c
| r22843 | r22844 | |
| 59 | 59 | m_audiocpu->set_input_line_and_vector(0, HOLD_LINE, 0xff); |
| 60 | 60 | } |
| 61 | 61 | |
| 62 | | TIMER_CALLBACK_MEMBER(rollerg_state::nmi_callback) |
| 62 | void rollerg_state::device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) |
| 63 | 63 | { |
| 64 | | m_audiocpu->set_input_line(INPUT_LINE_NMI, ASSERT_LINE); |
| 64 | switch (id) |
| 65 | { |
| 66 | case TIMER_NMI: |
| 67 | m_audiocpu->set_input_line(INPUT_LINE_NMI, ASSERT_LINE); |
| 68 | break; |
| 69 | default: |
| 70 | assert_always(FALSE, "Unknown id in rollerg_state::device_timer"); |
| 71 | } |
| 65 | 72 | } |
| 66 | 73 | |
| 67 | 74 | WRITE8_MEMBER(rollerg_state::sound_arm_nmi_w) |
| 68 | 75 | { |
| 69 | 76 | m_audiocpu->set_input_line(INPUT_LINE_NMI, CLEAR_LINE); |
| 70 | | machine().scheduler().timer_set(attotime::from_usec(50), timer_expired_delegate(FUNC(rollerg_state::nmi_callback),this)); /* kludge until the K053260 is emulated correctly */ |
| 77 | timer_set(attotime::from_usec(50), TIMER_NMI); /* kludge until the K053260 is emulated correctly */ |
| 71 | 78 | } |
| 72 | 79 | |
| 73 | 80 | READ8_MEMBER(rollerg_state::pip_r) |
trunk/src/mame/drivers/groundfx.c
| r22843 | r22844 | |
| 98 | 98 | INTERRUPTS |
| 99 | 99 | ***********************************************************/ |
| 100 | 100 | |
| 101 | | TIMER_CALLBACK_MEMBER(groundfx_state::groundfx_interrupt5) |
| 101 | void groundfx_state::device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) |
| 102 | 102 | { |
| 103 | | m_maincpu->set_input_line(5, HOLD_LINE); //from 5... ADC port |
| 103 | switch (id) |
| 104 | { |
| 105 | case TIMER_GROUNDFX_INTERRUPT5: |
| 106 | m_maincpu->set_input_line(5, HOLD_LINE); //from 5... ADC port |
| 107 | break; |
| 108 | default: |
| 109 | assert_always(FALSE, "Unknown id in groundfx_state::device_timer"); |
| 110 | } |
| 104 | 111 | } |
| 105 | 112 | |
| 106 | 113 | |
| r22843 | r22844 | |
| 173 | 180 | { |
| 174 | 181 | /* One interrupt per input port (4 per frame, though only 2 used). |
| 175 | 182 | 1000 cycle delay is arbitrary */ |
| 176 | | machine().scheduler().timer_set(downcast<cpu_device *>(&space.device())->cycles_to_attotime(1000), timer_expired_delegate(FUNC(groundfx_state::groundfx_interrupt5),this)); |
| 183 | timer_set(downcast<cpu_device *>(&space.device())->cycles_to_attotime(1000), TIMER_GROUNDFX_INTERRUPT5); |
| 177 | 184 | } |
| 178 | 185 | |
| 179 | 186 | WRITE32_MEMBER(groundfx_state::rotate_control_w)/* only a guess that it's rotation */ |
trunk/src/mame/drivers/metro.c
| r22843 | r22844 | |
| 194 | 194 | update_irq_state(); |
| 195 | 195 | } |
| 196 | 196 | |
| 197 | void metro_state::device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) |
| 198 | { |
| 199 | switch (id) |
| 200 | { |
| 201 | case TIMER_KARATOUR_IRQ: |
| 202 | m_requested_int[5] = 0; |
| 203 | break; |
| 204 | case TIMER_MOUJA_IRQ: |
| 205 | m_requested_int[0] = 1; |
| 206 | update_irq_state(); |
| 207 | break; |
| 208 | case TIMER_METRO_BLIT_DONE: |
| 209 | metro_blit_done(ptr, param); |
| 210 | break; |
| 211 | default: |
| 212 | assert_always(FALSE, "Unknown id in metro_state::device_timer"); |
| 213 | } |
| 214 | } |
| 215 | |
| 197 | 216 | INTERRUPT_GEN_MEMBER(metro_state::metro_vblank_interrupt) |
| 198 | 217 | { |
| 199 | 218 | m_requested_int[m_vblank_bit] = 1; |
| r22843 | r22844 | |
| 206 | 225 | update_irq_state(); |
| 207 | 226 | } |
| 208 | 227 | |
| 209 | | TIMER_CALLBACK_MEMBER(metro_state::karatour_irq_callback) |
| 210 | | { |
| 211 | | m_requested_int[5] = 0; |
| 212 | | } |
| 213 | | |
| 214 | 228 | /* lev 2-7 (lev 1 seems sound related) */ |
| 215 | 229 | INTERRUPT_GEN_MEMBER(metro_state::karatour_interrupt) |
| 216 | 230 | { |
| 217 | 231 | m_requested_int[m_vblank_bit] = 1; |
| 218 | 232 | |
| 219 | 233 | /* write to scroll registers, the duration is a guess */ |
| 220 | | machine().scheduler().timer_set(attotime::from_usec(2500), timer_expired_delegate(FUNC(metro_state::karatour_irq_callback),this)); |
| 234 | timer_set(attotime::from_usec(2500), TIMER_KARATOUR_IRQ); |
| 221 | 235 | m_requested_int[5] = 1; |
| 222 | 236 | |
| 223 | 237 | update_irq_state(); |
| 224 | 238 | } |
| 225 | 239 | |
| 226 | | TIMER_CALLBACK_MEMBER(metro_state::mouja_irq_callback) |
| 227 | | { |
| 228 | | m_requested_int[0] = 1; |
| 229 | | update_irq_state(); |
| 230 | | } |
| 231 | | |
| 232 | 240 | WRITE16_MEMBER(metro_state::mouja_irq_timer_ctrl_w) |
| 233 | 241 | { |
| 234 | 242 | double freq = 58.0 + (0xff - (data & 0xff)) / 2.2; /* 0xff=58Hz, 0x80=116Hz? */ |
| r22843 | r22844 | |
| 620 | 628 | another blit. */ |
| 621 | 629 | if (b1 == 0) |
| 622 | 630 | { |
| 623 | | machine().scheduler().timer_set(attotime::from_usec(500), timer_expired_delegate(FUNC(metro_state::metro_blit_done),this)); |
| 631 | timer_set(attotime::from_usec(500), TIMER_METRO_BLIT_DONE); |
| 624 | 632 | return; |
| 625 | 633 | } |
| 626 | 634 | |
| r22843 | r22844 | |
| 6340 | 6348 | metro_common(); |
| 6341 | 6349 | m_irq_line = -1; /* split interrupt handlers */ |
| 6342 | 6350 | m_vblank_bit = 1; |
| 6343 | | m_mouja_irq_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(metro_state::mouja_irq_callback),this)); |
| 6351 | m_mouja_irq_timer = timer_alloc(TIMER_MOUJA_IRQ); |
| 6344 | 6352 | } |
| 6345 | 6353 | |
| 6346 | 6354 | DRIVER_INIT_MEMBER(metro_state,gakusai) |
trunk/src/mame/drivers/undrfire.c
| r22843 | r22844 | |
| 225 | 225 | INTERRUPTS |
| 226 | 226 | ***********************************************************/ |
| 227 | 227 | |
| 228 | | TIMER_CALLBACK_MEMBER(undrfire_state::interrupt5) |
| 228 | void undrfire_state::device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) |
| 229 | 229 | { |
| 230 | | m_maincpu->set_input_line(5, HOLD_LINE); |
| 230 | switch (id) |
| 231 | { |
| 232 | case TIMER_INTERRUPT5: |
| 233 | m_maincpu->set_input_line(5, HOLD_LINE); |
| 234 | break; |
| 235 | default: |
| 236 | assert_always(FALSE, "Unknown id in undrfire_state::device_timer"); |
| 237 | } |
| 231 | 238 | } |
| 232 | 239 | |
| 233 | 240 | |
| r22843 | r22844 | |
| 358 | 365 | WRITE32_MEMBER(undrfire_state::unknown_int_req_w) |
| 359 | 366 | { |
| 360 | 367 | /* 10000 cycle delay is arbitrary */ |
| 361 | | machine().scheduler().timer_set(downcast<cpu_device *>(&space.device())->cycles_to_attotime(10000), timer_expired_delegate(FUNC(undrfire_state::interrupt5),this)); |
| 368 | timer_set(downcast<cpu_device *>(&space.device())->cycles_to_attotime(10000), TIMER_INTERRUPT5); |
| 362 | 369 | } |
| 363 | 370 | |
| 364 | 371 | |
| r22843 | r22844 | |
| 463 | 470 | { |
| 464 | 471 | /* One interrupt per input port (4 per frame, though only 2 used). |
| 465 | 472 | 1000 cycle delay is arbitrary */ |
| 466 | | machine().scheduler().timer_set(downcast<cpu_device *>(&space.device())->cycles_to_attotime(1000), timer_expired_delegate(FUNC(undrfire_state::interrupt5),this)); |
| 473 | timer_set(downcast<cpu_device *>(&space.device())->cycles_to_attotime(1000), TIMER_INTERRUPT5); |
| 467 | 474 | } |
| 468 | 475 | |
| 469 | 476 | /*********************************************************** |
trunk/src/mame/drivers/dec8.c
| r22843 | r22844 | |
| 132 | 132 | * |
| 133 | 133 | ***************************************************/ |
| 134 | 134 | |
| 135 | | TIMER_CALLBACK_MEMBER(dec8_state::dec8_i8751_timer_callback) |
| 135 | void dec8_state::device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) |
| 136 | 136 | { |
| 137 | | // The schematics show a clocked LS194 shift register (3A) is used to automatically |
| 138 | | // clear the IRQ request. The MCU does not clear it itself. |
| 139 | | m_mcu->set_input_line(MCS51_INT1_LINE, CLEAR_LINE); |
| 137 | switch (id) |
| 138 | { |
| 139 | case TIMER_DEC8_I8751: |
| 140 | // The schematics show a clocked LS194 shift register (3A) is used to automatically |
| 141 | // clear the IRQ request. The MCU does not clear it itself. |
| 142 | m_mcu->set_input_line(MCS51_INT1_LINE, CLEAR_LINE); |
| 143 | break; |
| 144 | default: |
| 145 | assert_always(FALSE, "Unknown id in dec8_state::device_timer"); |
| 146 | } |
| 140 | 147 | } |
| 141 | 148 | |
| 142 | 149 | WRITE8_MEMBER(dec8_state::dec8_i8751_w) |
| r22843 | r22844 | |
| 146 | 153 | case 0: /* High byte - SECIRQ is trigged on activating this latch */ |
| 147 | 154 | m_i8751_value = (m_i8751_value & 0xff) | (data << 8); |
| 148 | 155 | m_mcu->set_input_line(MCS51_INT1_LINE, ASSERT_LINE); |
| 149 | | machine().scheduler().timer_set(m_mcu->clocks_to_attotime(64), timer_expired_delegate(FUNC(dec8_state::dec8_i8751_timer_callback),this)); // 64 clocks not confirmed |
| 156 | timer_set(m_mcu->clocks_to_attotime(64), TIMER_DEC8_I8751); // 64 clocks not confirmed |
| 150 | 157 | break; |
| 151 | 158 | case 1: /* Low byte */ |
| 152 | 159 | m_i8751_value = (m_i8751_value & 0xff00) | data; |
trunk/src/mame/drivers/skullxbo.c
| r22843 | r22844 | |
| 39 | 39 | } |
| 40 | 40 | |
| 41 | 41 | |
| 42 | | TIMER_CALLBACK_MEMBER(skullxbo_state::irq_gen) |
| 42 | void skullxbo_state::device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) |
| 43 | 43 | { |
| 44 | | scanline_int_gen(m_maincpu); |
| 44 | switch (id) |
| 45 | { |
| 46 | case TIMER_IRQ_GEN: |
| 47 | scanline_int_gen(m_maincpu); |
| 48 | break; |
| 49 | default: |
| 50 | assert_always(FALSE, "Unknown id in skullxbo_state::device_timer"); |
| 51 | } |
| 45 | 52 | } |
| 46 | 53 | |
| 47 | 54 | |
| r22843 | r22844 | |
| 55 | 62 | { |
| 56 | 63 | int width = screen.width(); |
| 57 | 64 | attotime period = screen.time_until_pos(screen.vpos() + 6, width * 0.9); |
| 58 | | machine().scheduler().timer_set(period, timer_expired_delegate(FUNC(skullxbo_state::irq_gen), this)); |
| 65 | timer_set(period, TIMER_IRQ_GEN); |
| 59 | 66 | } |
| 60 | 67 | |
| 61 | 68 | /* update the playfield and motion objects */ |
trunk/src/mame/drivers/tugboat.c
| r22843 | r22844 | |
| 31 | 31 | class tugboat_state : public driver_device |
| 32 | 32 | { |
| 33 | 33 | public: |
| 34 | enum |
| 35 | { |
| 36 | TIMER_INTERRUPT |
| 37 | }; |
| 38 | |
| 34 | 39 | tugboat_state(const machine_config &mconfig, device_type type, const char *tag) |
| 35 | 40 | : driver_device(mconfig, type, tag), |
| 36 | 41 | m_ram(*this, "ram"), |
| r22843 | r22844 | |
| 51 | 56 | virtual void machine_reset(); |
| 52 | 57 | virtual void palette_init(); |
| 53 | 58 | UINT32 screen_update_tugboat(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 54 | | TIMER_CALLBACK_MEMBER(interrupt_gen); |
| 55 | 59 | required_device<cpu_device> m_maincpu; |
| 60 | |
| 61 | protected: |
| 62 | virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr); |
| 56 | 63 | }; |
| 57 | 64 | |
| 58 | 65 | |
| r22843 | r22844 | |
| 205 | 212 | DEVCB_NULL /* IRQB */ |
| 206 | 213 | }; |
| 207 | 214 | |
| 208 | | TIMER_CALLBACK_MEMBER(tugboat_state::interrupt_gen) |
| 215 | void tugboat_state::device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) |
| 209 | 216 | { |
| 210 | | m_maincpu->set_input_line(0, HOLD_LINE); |
| 211 | | machine().scheduler().timer_set(machine().primary_screen->frame_period(), timer_expired_delegate(FUNC(tugboat_state::interrupt_gen),this)); |
| 217 | switch (id) |
| 218 | { |
| 219 | case TIMER_INTERRUPT: |
| 220 | m_maincpu->set_input_line(0, HOLD_LINE); |
| 221 | timer_set(machine().primary_screen->frame_period(), TIMER_INTERRUPT); |
| 222 | break; |
| 223 | default: |
| 224 | assert_always(FALSE, "Unknown id in tugboat_state::device_timer"); |
| 225 | } |
| 212 | 226 | } |
| 213 | 227 | |
| 214 | 228 | void tugboat_state::machine_reset() |
| 215 | 229 | { |
| 216 | | machine().scheduler().timer_set(machine().primary_screen->time_until_pos(30*8+4), timer_expired_delegate(FUNC(tugboat_state::interrupt_gen),this)); |
| 230 | timer_set(machine().primary_screen->time_until_pos(30*8+4), TIMER_INTERRUPT); |
| 217 | 231 | } |
| 218 | 232 | |
| 219 | 233 | |
trunk/src/mame/includes/asuka.h
| r22843 | r22844 | |
| 9 | 9 | class asuka_state : public driver_device |
| 10 | 10 | { |
| 11 | 11 | public: |
| 12 | enum |
| 13 | { |
| 14 | TIMER_CADASH_INTERRUPT5 |
| 15 | }; |
| 16 | |
| 12 | 17 | asuka_state(const machine_config &mconfig, device_type type, const char *tag) |
| 13 | 18 | : driver_device(mconfig, type, tag), |
| 14 | 19 | m_cadash_shared_ram(*this, "sharedram"), |
| r22843 | r22844 | |
| 59 | 64 | UINT32 screen_update_asuka(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 60 | 65 | void screen_eof_asuka(screen_device &screen, bool state); |
| 61 | 66 | INTERRUPT_GEN_MEMBER(cadash_interrupt); |
| 62 | | TIMER_CALLBACK_MEMBER(cadash_interrupt5); |
| 63 | 67 | |
| 64 | 68 | /*----------- defined in machine/bonzeadv.c -----------*/ |
| 65 | 69 | void WriteLevelData(); |
| r22843 | r22844 | |
| 72 | 76 | DECLARE_WRITE16_MEMBER( bonzeadv_cchip_ram_w ); |
| 73 | 77 | DECLARE_WRITE_LINE_MEMBER(irqhandler); |
| 74 | 78 | DECLARE_WRITE_LINE_MEMBER(asuka_msm5205_vck); |
| 79 | |
| 80 | protected: |
| 81 | virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr); |
| 75 | 82 | }; |
trunk/src/mame/includes/groundfx.h
| r22843 | r22844 | |
| 11 | 11 | class groundfx_state : public driver_device |
| 12 | 12 | { |
| 13 | 13 | public: |
| 14 | enum |
| 15 | { |
| 16 | TIMER_GROUNDFX_INTERRUPT5 |
| 17 | }; |
| 18 | |
| 14 | 19 | groundfx_state(const machine_config &mconfig, device_type type, const char *tag) |
| 15 | 20 | : driver_device(mconfig, type, tag), |
| 16 | 21 | m_ram(*this,"ram"), |
| r22843 | r22844 | |
| 40 | 45 | virtual void video_start(); |
| 41 | 46 | UINT32 screen_update_groundfx(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 42 | 47 | INTERRUPT_GEN_MEMBER(groundfx_interrupt); |
| 43 | | TIMER_CALLBACK_MEMBER(groundfx_interrupt5); |
| 44 | 48 | void draw_sprites(bitmap_ind16 &bitmap,const rectangle &cliprect,int do_hack,int x_offs,int y_offs); |
| 45 | 49 | required_device<cpu_device> m_maincpu; |
| 50 | |
| 51 | protected: |
| 52 | virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr); |
| 46 | 53 | }; |
trunk/src/mame/includes/vendetta.h
| r22843 | r22844 | |
| 8 | 8 | class vendetta_state : public driver_device |
| 9 | 9 | { |
| 10 | 10 | public: |
| 11 | enum |
| 12 | { |
| 13 | TIMER_Z80_NMI |
| 14 | }; |
| 15 | |
| 11 | 16 | vendetta_state(const machine_config &mconfig, device_type type, const char *tag) |
| 12 | 17 | : driver_device(mconfig, type, tag), |
| 13 | 18 | m_maincpu(*this, "maincpu"), |
| r22843 | r22844 | |
| 53 | 58 | virtual void machine_reset(); |
| 54 | 59 | UINT32 screen_update_vendetta(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 55 | 60 | INTERRUPT_GEN_MEMBER(vendetta_irq); |
| 56 | | TIMER_CALLBACK_MEMBER(z80_nmi_callback); |
| 57 | 61 | void vendetta_video_banking( int select ); |
| 62 | |
| 63 | protected: |
| 64 | virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr); |
| 58 | 65 | }; |
| 59 | 66 | |
| 60 | 67 | /*----------- defined in video/vendetta.c -----------*/ |
trunk/src/mame/includes/taito_f3.h
| r22843 | r22844 | |
| 45 | 45 | class taito_f3_state : public driver_device |
| 46 | 46 | { |
| 47 | 47 | public: |
| 48 | enum |
| 49 | { |
| 50 | TIMER_F3_INTERRUPT3 |
| 51 | }; |
| 52 | |
| 48 | 53 | taito_f3_state(const machine_config &mconfig, device_type type, const char *tag) |
| 49 | 54 | : driver_device(mconfig, type, tag), |
| 50 | 55 | m_f3_ram(*this,"f3_ram") , |
| r22843 | r22844 | |
| 278 | 283 | UINT32 screen_update_f3(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); |
| 279 | 284 | void screen_eof_f3(screen_device &screen, bool state); |
| 280 | 285 | INTERRUPT_GEN_MEMBER(f3_interrupt2); |
| 281 | | TIMER_CALLBACK_MEMBER(f3_interrupt3); |
| 282 | 286 | required_device<cpu_device> m_maincpu; |
| 283 | 287 | optional_device<cpu_device> m_audiocpu; |
| 284 | 288 | optional_device<okim6295_device> m_oki; |
| 289 | |
| 290 | protected: |
| 291 | virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr); |
| 285 | 292 | }; |
trunk/src/mame/includes/fuukifg3.h
| r22843 | r22844 | |
| 12 | 12 | class fuuki32_state : public driver_device |
| 13 | 13 | { |
| 14 | 14 | public: |
| 15 | enum |
| 16 | { |
| 17 | TIMER_LEVEL_1_INTERRUPT, |
| 18 | TIMER_VBLANK_INTERRUPT, |
| 19 | TIMER_RASTER_INTERRUPT |
| 20 | }; |
| 21 | |
| 15 | 22 | fuuki32_state(const machine_config &mconfig, device_type type, const char *tag) |
| 16 | 23 | : driver_device(mconfig, type, tag), |
| 17 | 24 | m_vram(*this, "vram"), |
| r22843 | r22844 | |
| 74 | 81 | void draw_sprites( screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect ); |
| 75 | 82 | void fuuki32_draw_layer( bitmap_ind16 &bitmap, const rectangle &cliprect, int i, int flag, int pri ); |
| 76 | 83 | DECLARE_WRITE_LINE_MEMBER(irqhandler); |
| 84 | |
| 85 | protected: |
| 86 | virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr); |
| 77 | 87 | }; |
trunk/src/mame/includes/dec8.h
| r22843 | r22844 | |
| 4 | 4 | class dec8_state : public driver_device |
| 5 | 5 | { |
| 6 | 6 | public: |
| 7 | enum |
| 8 | { |
| 9 | TIMER_DEC8_I8751 |
| 10 | }; |
| 11 | |
| 7 | 12 | dec8_state(const machine_config &mconfig, device_type type, const char *tag) |
| 8 | 13 | : driver_device(mconfig, type, tag), |
| 9 | 14 | m_maincpu(*this, "maincpu"), |
| r22843 | r22844 | |
| 140 | 145 | void screen_eof_dec8(screen_device &screen, bool state); |
| 141 | 146 | INTERRUPT_GEN_MEMBER(gondo_interrupt); |
| 142 | 147 | INTERRUPT_GEN_MEMBER(oscar_interrupt); |
| 143 | | TIMER_CALLBACK_MEMBER(dec8_i8751_timer_callback); |
| 144 | 148 | void srdarwin_draw_sprites( bitmap_ind16 &bitmap, const rectangle &cliprect, int pri ); |
| 145 | 149 | DECLARE_WRITE_LINE_MEMBER(irqhandler); |
| 146 | 150 | DECLARE_WRITE_LINE_MEMBER(csilver_adpcm_int); |
| 151 | |
| 152 | protected: |
| 153 | virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr); |
| 147 | 154 | }; |
trunk/src/mame/includes/taito_z.h
| r22843 | r22844 | |
| 12 | 12 | class taitoz_state : public driver_device |
| 13 | 13 | { |
| 14 | 14 | public: |
| 15 | enum |
| 16 | { |
| 17 | TIMER_TAITOZ_INTERRUPT6, |
| 18 | TIMER_TAITOZ_CPUB_INTERRUPT5 |
| 19 | }; |
| 20 | |
| 15 | 21 | taitoz_state(const machine_config &mconfig, device_type type, const char *tag) |
| 16 | 22 | : driver_device(mconfig, type, tag), |
| 17 | 23 | m_spriteram(*this, "spriteram"), |
| r22843 | r22844 | |
| 96 | 102 | UINT32 screen_update_dblaxle(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 97 | 103 | UINT32 screen_update_racingb(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 98 | 104 | INTERRUPT_GEN_MEMBER(sci_interrupt); |
| 99 | | TIMER_CALLBACK_MEMBER(taitoz_interrupt6); |
| 100 | | TIMER_CALLBACK_MEMBER(taitoz_cpub_interrupt5); |
| 101 | 105 | void taitoz_postload(); |
| 102 | 106 | void contcirc_draw_sprites_16x8( bitmap_ind16 &bitmap, const rectangle &cliprect, int y_offs ); |
| 103 | 107 | void chasehq_draw_sprites_16x16( bitmap_ind16 &bitmap, const rectangle &cliprect, int y_offs ); |
| r22843 | r22844 | |
| 109 | 113 | void reset_sound_region( ); |
| 110 | 114 | DECLARE_WRITE_LINE_MEMBER(irqhandler); |
| 111 | 115 | DECLARE_WRITE_LINE_MEMBER(irqhandlerb); |
| 116 | |
| 117 | protected: |
| 118 | virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr); |
| 112 | 119 | }; |
trunk/src/mame/includes/undrfire.h
| r22843 | r22844 | |
| 12 | 12 | class undrfire_state : public driver_device |
| 13 | 13 | { |
| 14 | 14 | public: |
| 15 | enum |
| 16 | { |
| 17 | TIMER_INTERRUPT5 |
| 18 | }; |
| 19 | |
| 15 | 20 | undrfire_state(const machine_config &mconfig, device_type type, const char *tag) |
| 16 | 21 | : driver_device(mconfig, type, tag), |
| 17 | 22 | m_ram(*this, "ram"), |
| r22843 | r22844 | |
| 50 | 55 | UINT32 screen_update_undrfire(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 51 | 56 | UINT32 screen_update_cbombers(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 52 | 57 | INTERRUPT_GEN_MEMBER(undrfire_interrupt); |
| 53 | | TIMER_CALLBACK_MEMBER(interrupt5); |
| 54 | 58 | void draw_sprites(bitmap_ind16 &bitmap,const rectangle &cliprect,const int *primasks,int x_offs,int y_offs); |
| 55 | 59 | void draw_sprites_cbombers(bitmap_ind16 &bitmap,const rectangle &cliprect,const int *primasks,int x_offs,int y_offs); |
| 56 | 60 | required_device<cpu_device> m_maincpu; |
| 57 | 61 | optional_device<cpu_device> m_subcpu; |
| 58 | 62 | required_device<eeprom_device> m_eeprom; |
| 63 | |
| 64 | protected: |
| 65 | virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr); |
| 59 | 66 | }; |
trunk/src/mame/includes/metro.h
| r22843 | r22844 | |
| 12 | 12 | class metro_state : public driver_device |
| 13 | 13 | { |
| 14 | 14 | public: |
| 15 | enum |
| 16 | { |
| 17 | TIMER_KARATOUR_IRQ, |
| 18 | TIMER_MOUJA_IRQ, |
| 19 | TIMER_METRO_BLIT_DONE |
| 20 | }; |
| 21 | |
| 15 | 22 | metro_state(const machine_config &mconfig, device_type type, const char *tag) |
| 16 | 23 | : driver_device(mconfig, type, tag), |
| 17 | 24 | m_maincpu(*this, "maincpu"), |
| r22843 | r22844 | |
| 192 | 199 | int sx, int sy, int wx, int wy, int big, UINT16 *tilemapram, int layer ); |
| 193 | 200 | DECLARE_WRITE_LINE_MEMBER(blzntrnd_irqhandler); |
| 194 | 201 | DECLARE_WRITE_LINE_MEMBER(ymf278b_interrupt); |
| 202 | |
| 203 | protected: |
| 204 | virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr); |
| 195 | 205 | }; |
| 196 | 206 | |
| 197 | 207 | |
trunk/src/mame/includes/rollerg.h
| r22843 | r22844 | |
| 8 | 8 | class rollerg_state : public driver_device |
| 9 | 9 | { |
| 10 | 10 | public: |
| 11 | enum |
| 12 | { |
| 13 | TIMER_NMI |
| 14 | }; |
| 15 | |
| 11 | 16 | rollerg_state(const machine_config &mconfig, device_type type, const char *tag) |
| 12 | 17 | : driver_device(mconfig, type, tag), |
| 13 | 18 | m_maincpu(*this, "maincpu"), |
| r22843 | r22844 | |
| 43 | 48 | virtual void machine_reset(); |
| 44 | 49 | virtual void video_start(); |
| 45 | 50 | UINT32 screen_update_rollerg(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 46 | | TIMER_CALLBACK_MEMBER(nmi_callback); |
| 51 | |
| 52 | protected: |
| 53 | virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr); |
| 47 | 54 | }; |
| 48 | 55 | |
| 49 | 56 | /*----------- defined in video/rollerg.c -----------*/ |
trunk/src/mame/includes/tehkanwc.h
| r22843 | r22844 | |
| 3 | 3 | class tehkanwc_state : public driver_device |
| 4 | 4 | { |
| 5 | 5 | public: |
| 6 | enum |
| 7 | { |
| 8 | TIMER_RESET |
| 9 | }; |
| 10 | |
| 6 | 11 | tehkanwc_state(const machine_config &mconfig, device_type type, const char *tag) |
| 7 | 12 | : driver_device(mconfig, type, tag), |
| 8 | 13 | m_videoram(*this, "videoram"), |
| r22843 | r22844 | |
| 53 | 58 | TILE_GET_INFO_MEMBER(get_fg_tile_info); |
| 54 | 59 | virtual void video_start(); |
| 55 | 60 | UINT32 screen_update_tehkanwc(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 56 | | TIMER_CALLBACK_MEMBER(reset_callback); |
| 57 | 61 | void gridiron_draw_led(bitmap_ind16 &bitmap, const rectangle &cliprect, UINT8 led,int player); |
| 58 | 62 | void draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 59 | 63 | DECLARE_WRITE_LINE_MEMBER(tehkanwc_adpcm_int); |
| r22843 | r22844 | |
| 61 | 65 | required_device<cpu_device> m_audiocpu; |
| 62 | 66 | required_device<cpu_device> m_subcpu; |
| 63 | 67 | required_device<msm5205_device> m_msm; |
| 68 | |
| 69 | protected: |
| 70 | virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr); |
| 64 | 71 | }; |
trunk/src/mame/includes/skullxbo.h
| r22843 | r22844 | |
| 9 | 9 | class skullxbo_state : public atarigen_state |
| 10 | 10 | { |
| 11 | 11 | public: |
| 12 | enum |
| 13 | { |
| 14 | TIMER_IRQ_GEN |
| 15 | }; |
| 16 | |
| 12 | 17 | skullxbo_state(const machine_config &mconfig, device_type type, const char *tag) |
| 13 | 18 | : atarigen_state(mconfig, type, tag) { } |
| 14 | 19 | virtual void update_interrupts(); |
| r22843 | r22844 | |
| 23 | 28 | DECLARE_MACHINE_RESET(skullxbo); |
| 24 | 29 | DECLARE_VIDEO_START(skullxbo); |
| 25 | 30 | UINT32 screen_update_skullxbo(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 26 | | TIMER_CALLBACK_MEMBER(irq_gen); |
| 27 | 31 | void skullxbo_scanline_update(int scanline); |
| 28 | 32 | DECLARE_WRITE16_MEMBER( skullxbo_playfieldlatch_w ); |
| 29 | 33 | DECLARE_WRITE16_MEMBER( skullxbo_xscroll_w ); |
| 30 | 34 | DECLARE_WRITE16_MEMBER( skullxbo_yscroll_w ); |
| 31 | 35 | DECLARE_WRITE16_MEMBER( skullxbo_mobmsb_w ); |
| 36 | |
| 37 | protected: |
| 38 | virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr); |
| 32 | 39 | }; |
trunk/src/mame/includes/sprint4.h
| r22843 | r22844 | |
| 1 | 1 | class sprint4_state : public driver_device |
| 2 | 2 | { |
| 3 | 3 | public: |
| 4 | enum |
| 5 | { |
| 6 | TIMER_NMI |
| 7 | }; |
| 8 | |
| 4 | 9 | sprint4_state(const machine_config &mconfig, device_type type, const char *tag) |
| 5 | 10 | : driver_device(mconfig, type, tag), |
| 6 | 11 | m_videoram(*this, "videoram"), |
| r22843 | r22844 | |
| 45 | 50 | TIMER_CALLBACK_MEMBER(nmi_callback); |
| 46 | 51 | required_device<cpu_device> m_maincpu; |
| 47 | 52 | required_device<discrete_device> m_discrete; |
| 53 | |
| 54 | protected: |
| 55 | virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr); |
| 48 | 56 | }; |
trunk/src/mame/includes/othunder.h
| r22843 | r22844 | |
| 23 | 23 | class othunder_state : public driver_device |
| 24 | 24 | { |
| 25 | 25 | public: |
| 26 | enum |
| 27 | { |
| 28 | TIMER_AD_INTERRUPT |
| 29 | }; |
| 30 | |
| 26 | 31 | othunder_state(const machine_config &mconfig, device_type type, const char *tag) |
| 27 | 32 | : driver_device(mconfig, type, tag), |
| 28 | 33 | m_spriteram(*this,"spriteram"), |
| r22843 | r22844 | |
| 80 | 85 | virtual void video_start(); |
| 81 | 86 | UINT32 screen_update_othunder(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 82 | 87 | INTERRUPT_GEN_MEMBER(vblank_interrupt); |
| 83 | | TIMER_CALLBACK_MEMBER(ad_interrupt); |
| 84 | 88 | void reset_sound_region(); |
| 85 | 89 | void draw_sprites( bitmap_ind16 &bitmap, const rectangle &cliprect, const int *primasks, int y_offs ); |
| 86 | 90 | void update_irq( ); |
| 87 | 91 | DECLARE_WRITE_LINE_MEMBER(irqhandler); |
| 92 | |
| 93 | protected: |
| 94 | virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr); |
| 88 | 95 | }; |
trunk/src/mame/includes/slapshot.h
| r22843 | r22844 | |
| 21 | 21 | class slapshot_state : public driver_device |
| 22 | 22 | { |
| 23 | 23 | public: |
| 24 | enum |
| 25 | { |
| 26 | TIMER_SLAPSHOT_INTERRUPT6 |
| 27 | }; |
| 28 | |
| 24 | 29 | slapshot_state(const machine_config &mconfig, device_type type, const char *tag) |
| 25 | 30 | : driver_device(mconfig, type, tag), |
| 26 | 31 | m_color_ram(*this,"color_ram"), |
| r22843 | r22844 | |
| 77 | 82 | UINT32 screen_update_slapshot(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); |
| 78 | 83 | void screen_eof_taito_no_buffer(screen_device &screen, bool state); |
| 79 | 84 | INTERRUPT_GEN_MEMBER(slapshot_interrupt); |
| 80 | | TIMER_CALLBACK_MEMBER(slapshot_interrupt6); |
| 81 | 85 | void reset_sound_region(); |
| 82 | 86 | void draw_sprites( bitmap_ind16 &bitmap, const rectangle &cliprect, int *primasks, int y_offset ); |
| 83 | 87 | void taito_handle_sprite_buffering( ); |
| 84 | 88 | void taito_update_sprites_active_area( ); |
| 85 | 89 | DECLARE_WRITE_LINE_MEMBER(irqhandler); |
| 90 | |
| 91 | protected: |
| 92 | virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr); |
| 86 | 93 | }; |