Previous 199869 Revisions Next

r22826 Wednesday 15th May, 2013 at 07:10:37 UTC by Andrew Gardner
Eliminate some of MAME's anonymous timers. [Andrew Gardner]
[src/mame/drivers]boxer.c cidelsa.c gcpinbal.c gottlieb.c kinst.c m10.c mjsister.c peplus.c policetr.c simpsons.c taito_b.c tmnt.c topspeed.c trucocl.c wgp.c
[src/mame/includes]cidelsa.h gcpinbal.h gottlieb.h m10.h policetr.h simpsons.h taito_b.h tmnt.h topspeed.h trucocl.h wgp.h

trunk/src/mame/drivers/policetr.c
r22825r22826
101101 *
102102 *************************************/
103103
104TIMER_CALLBACK_MEMBER(policetr_state::irq5_gen)
104void policetr_state::device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr)
105105{
106   m_maincpu->set_input_line(R3000_IRQ5, ASSERT_LINE);
106   switch (id)
107   {
108   case TIMER_IRQ5_GEN:
109      m_maincpu->set_input_line(R3000_IRQ5, ASSERT_LINE);
110      break;
111   default:
112      assert_always(FALSE, "Unknown id in policetr_state::device_timer");
113   }
107114}
108115
109116
110117INTERRUPT_GEN_MEMBER(policetr_state::irq4_gen)
111118{
112119   device.execute().set_input_line(R3000_IRQ4, ASSERT_LINE);
113   machine().scheduler().timer_set(machine().primary_screen->time_until_pos(0), timer_expired_delegate(FUNC(policetr_state::irq5_gen),this));
120   timer_set(machine().primary_screen->time_until_pos(0), TIMER_IRQ5_GEN);
114121}
115122
116123
trunk/src/mame/drivers/m10.c
r22825r22826
499499   if (param == 0)
500500   {
501501      m_maincpu->set_input_line(0, ASSERT_LINE);
502      machine().scheduler().timer_set(machine().primary_screen->time_until_pos(IREMM10_VBSTART + 16), timer_expired_delegate(FUNC(m10_state::interrupt_callback),this), 1);
502      timer_set(machine().primary_screen->time_until_pos(IREMM10_VBSTART + 16), TIMER_INTERRUPT, 1);
503503   }
504504   if (param == 1)
505505   {
506506      m_maincpu->set_input_line(0, ASSERT_LINE);
507      machine().scheduler().timer_set(machine().primary_screen->time_until_pos(IREMM10_VBSTART + 24), timer_expired_delegate(FUNC(m10_state::interrupt_callback),this), 2);
507      timer_set(machine().primary_screen->time_until_pos(IREMM10_VBSTART + 24), TIMER_INTERRUPT, 2);
508508   }
509509   if (param == -1)
510510      m_maincpu->set_input_line(0, CLEAR_LINE);
511}
511512
513void m10_state::device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr)
514{
515   switch (id)
516   {
517   case TIMER_INTERRUPT:
518      interrupt_callback(ptr, param);
519      break;
520   default:
521      assert_always(FALSE, "Unknown id in m10_state::device_timer");
522   }
512523}
513524
514525#if 0
515526INTERRUPT_GEN_MEMBER(m10_state::m11_interrupt)
516527{
517528   device.execute().set_input_line(0, ASSERT_LINE);
518   //machine().scheduler().timer_set(machine.primary_screen->time_until_pos(IREMM10_VBEND), timer_expired_delegate(FUNC(m10_state::interrupt_callback),this), -1);
529   //timer_set(machine.primary_screen->time_until_pos(IREMM10_VBEND), TIMER_INTERRUPT, -1);
519530}
520531
521532INTERRUPT_GEN_MEMBER(m10_state::m10_interrupt)
r22825r22826
527538INTERRUPT_GEN_MEMBER(m10_state::m15_interrupt)
528539{
529540   device.execute().set_input_line(0, ASSERT_LINE);
530   machine().scheduler().timer_set(machine().primary_screen->time_until_pos(IREMM10_VBSTART + 1, 80), timer_expired_delegate(FUNC(m10_state::interrupt_callback),this), -1);
541   timer_set(machine().primary_screen->time_until_pos(IREMM10_VBSTART + 1, 80), TIMER_INTERRUPT, -1);
531542}
532543
533544/*************************************
trunk/src/mame/drivers/mjsister.c
r22825r22826
1717class mjsister_state : public driver_device
1818{
1919public:
20   enum
21   {
22      TIMER_DAC
23   };
24
2025   mjsister_state(const machine_config &mconfig, device_type type, const char *tag)
2126      : driver_device(mconfig, type, tag),
2227      m_maincpu(*this, "maincpu") { }
r22825r22826
5863   DECLARE_WRITE8_MEMBER(mjsister_input_sel1_w);
5964   DECLARE_WRITE8_MEMBER(mjsister_input_sel2_w);
6065   DECLARE_READ8_MEMBER(mjsister_keys_r);
66   TIMER_CALLBACK_MEMBER(dac_callback);
6167   virtual void machine_start();
6268   virtual void machine_reset();
6369   virtual void video_start();
6470   UINT32 screen_update_mjsister(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
65   TIMER_CALLBACK_MEMBER(dac_callback);
6671   void mjsister_redraw();
6772   void mjsister_plot0( int offset, UINT8 data );
6873   void mjsister_plot1( int offset, UINT8 data );
74
75protected:
76   virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr);
6977};
7078
7179
r22825r22826
168176 *
169177 *************************************/
170178
179void mjsister_state::device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr)
180{
181   switch(id)
182   {
183   case TIMER_DAC:
184      dac_callback(ptr, param);
185      break;
186   default:
187      assert_always(FALSE, "Unknown id in mjsister_state::device_timer");
188   }
189}
190
171191TIMER_CALLBACK_MEMBER(mjsister_state::dac_callback)
172192{
173193   UINT8 *DACROM = memregion("samples")->base();
r22825r22826
175195   m_dac->write_unsigned8(DACROM[(m_dac_bank * 0x10000 + m_dac_adr++) & 0x1ffff]);
176196
177197   if (((m_dac_adr & 0xff00 ) >> 8) !=  m_dac_adr_e)
178      machine().scheduler().timer_set(attotime::from_hz(MCLK) * 1024, timer_expired_delegate(FUNC(mjsister_state::dac_callback),this));
198      timer_set(attotime::from_hz(MCLK) * 1024, TIMER_DAC);
179199   else
180200      m_dac_busy = 0;
181201}
r22825r22826
191211   m_dac_adr = m_dac_adr_s << 8;
192212
193213   if (m_dac_busy == 0)
194      machine().scheduler().synchronize(timer_expired_delegate(FUNC(mjsister_state::dac_callback),this));
214      synchronize(TIMER_DAC);
195215
196216   m_dac_busy = 1;
197217}
trunk/src/mame/drivers/wgp.c
r22825r22826
439439                        INTERRUPTS
440440***********************************************************/
441441
442/* 68000 A */
443
444#ifdef UNUSED_FUNCTION
445TIMER_CALLBACK_MEMBER(wgp_state::wgp_interrupt4)
442void wgp_state::device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr)
446443{
447   m_maincpu->set_input_line(4, HOLD_LINE);
444   switch (id)
445   {
446   /* 68000 A */
447   case TIMER_WGP_INTERRUPT4:
448      m_maincpu->set_input_line(4, HOLD_LINE);
449      break;
450   case TIMER_WGP_INTERRUPT6:
451      m_maincpu->set_input_line(6, HOLD_LINE);
452      break;
453   /* 68000 B */
454   case TIMER_WGP_CPUB_INTERRUPT6:
455      m_subcpu->set_input_line(6, HOLD_LINE); /* assumes Z80 sandwiched between the 68Ks */
456      break;
457   default:
458      assert_always(FALSE, "Unknown id in wgp_state::device_timer");
459   }
448460}
449#endif
450461
451TIMER_CALLBACK_MEMBER(wgp_state::wgp_interrupt6)
452{
453   m_maincpu->set_input_line(6, HOLD_LINE);
454}
455462
456/* 68000 B */
457
458TIMER_CALLBACK_MEMBER(wgp_state::wgp_cpub_interrupt6)
459{
460   m_subcpu->set_input_line(6, HOLD_LINE); /* assumes Z80 sandwiched between the 68Ks */
461}
462
463
464
465463/***** Routines for particular games *****/
466464
467465/* FWIW offset of 10000,10500 on ints can get CPUB obeying the
r22825r22826
469467
470468INTERRUPT_GEN_MEMBER(wgp_state::wgp_cpub_interrupt)
471469{
472   machine().scheduler().timer_set(downcast<cpu_device *>(&device)->cycles_to_attotime(200000-500), timer_expired_delegate(FUNC(wgp_state::wgp_cpub_interrupt6),this));
470   timer_set(downcast<cpu_device *>(&device)->cycles_to_attotime(200000-500), TIMER_WGP_CPUB_INTERRUPT6);
473471   device.execute().set_input_line(4, HOLD_LINE);
474472}
475473
r22825r22826
592590      hardware has got the next a/d conversion ready. We set a token
593591      delay of 10000 cycles although our inputs are always ready. */
594592
595   machine().scheduler().timer_set(downcast<cpu_device *>(&space.device())->cycles_to_attotime(10000), timer_expired_delegate(FUNC(wgp_state::wgp_interrupt6),this));
593   timer_set(downcast<cpu_device *>(&space.device())->cycles_to_attotime(10000), TIMER_WGP_INTERRUPT6);
596594}
597595
598596
trunk/src/mame/drivers/topspeed.c
r22825r22826
319319                        INTERRUPTS
320320***********************************************************/
321321
322/* 68000 A */
323
324TIMER_CALLBACK_MEMBER(topspeed_state::topspeed_interrupt6)
322void topspeed_state::device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr)
325323{
326   m_maincpu->set_input_line(6, HOLD_LINE);
324   switch (id)
325   {
326   /* 68000 A */
327   case TIMER_TOPSPEED_INTERRUPT6:
328      m_maincpu->set_input_line(6, HOLD_LINE);
329      break;
330   /* 68000 B */
331   case TIMER_TOPSPEED_CPUB_INTERRUPT6:
332      m_subcpu->set_input_line(6, HOLD_LINE); /* assumes Z80 sandwiched between the 68Ks */
333      break;
334   default:
335      assert_always(FALSE, "Unknown id in topspeed_state::device_timer");
336   }
327337}
328338
329/* 68000 B */
330339
331TIMER_CALLBACK_MEMBER(topspeed_state::topspeed_cpub_interrupt6)
332{
333   m_subcpu->set_input_line(6, HOLD_LINE); /* assumes Z80 sandwiched between the 68Ks */
334}
335
336
337340INTERRUPT_GEN_MEMBER(topspeed_state::topspeed_interrupt)
338341{
339342   /* Unsure how many int6's per frame */
340   machine().scheduler().timer_set(downcast<cpu_device *>(&device)->cycles_to_attotime(200000 - 500), timer_expired_delegate(FUNC(topspeed_state::topspeed_interrupt6),this));
343   timer_set(downcast<cpu_device *>(&device)->cycles_to_attotime(200000 - 500), TIMER_TOPSPEED_INTERRUPT6);
341344   device.execute().set_input_line(5, HOLD_LINE);
342345}
343346
344347INTERRUPT_GEN_MEMBER(topspeed_state::topspeed_cpub_interrupt)
345348{
346349   /* Unsure how many int6's per frame */
347   machine().scheduler().timer_set(downcast<cpu_device *>(&device)->cycles_to_attotime(200000 - 500), timer_expired_delegate(FUNC(topspeed_state::topspeed_cpub_interrupt6),this));
350   timer_set(downcast<cpu_device *>(&device)->cycles_to_attotime(200000 - 500), TIMER_TOPSPEED_CPUB_INTERRUPT6);
348351   device.execute().set_input_line(5, HOLD_LINE);
349352}
350353
trunk/src/mame/drivers/gottlieb.c
r22825r22826
236236      m_maincpu->space(AS_PROGRAM).install_write_handler(0x05806, 0x05806, 0, 0x07f8, write8_delegate(FUNC(gottlieb_state::laserdisc_select_w),this));
237237
238238      /* allocate a timer for serial transmission, and one for philips code processing */
239      m_laserdisc_bit_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(gottlieb_state::laserdisc_bit_callback),this));
240      m_laserdisc_philips_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(gottlieb_state::laserdisc_philips_callback),this));
239      m_laserdisc_bit_timer = timer_alloc(TIMER_LASERDISC_BIT);
240      m_laserdisc_philips_timer = timer_alloc(TIMER_LASERDISC_PHILIPS);
241241
242242      /* create some audio RAM */
243243      m_laserdisc_audio_buffer = auto_alloc_array(machine(), UINT8, AUDIORAM_SIZE);
r22825r22826
458458
459459   /* assert the line and set a timer for deassertion */
460460   m_laserdisc->control_w(ASSERT_LINE);
461   machine().scheduler().timer_set(LASERDISC_CLOCK * 10, timer_expired_delegate(FUNC(gottlieb_state::laserdisc_bit_off_callback),this));
461   timer_set(LASERDISC_CLOCK * 10, TIMER_LASERDISC_BIT_OFF);
462462
463463   /* determine how long for the next command; there is a 555 timer with a
464464      variable resistor controlling the timing of the pulses. Nominally, the
r22825r22826
644644
645645
646646
647   /*************************************
648   *
649   *  Interrupt generation
650   *
651   *************************************/
647/*************************************
648*
649*  Interrupt generation
650*
651*************************************/
652652
653void gottlieb_state::device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr)
654{
655   switch (id)
656   {
657   case TIMER_LASERDISC_PHILIPS:
658      laserdisc_philips_callback(ptr, param);
659      break;
660   case TIMER_LASERDISC_BIT_OFF:
661      laserdisc_bit_off_callback(ptr, param);
662      break;
663   case TIMER_LASERDISC_BIT:
664      laserdisc_bit_callback(ptr, param);
665      break;
666   case TIMER_NMI_CLEAR:
667      nmi_clear(ptr, param);
668      break;
669   default:
670      assert_always(FALSE, "Unknown id in gottlieb_state::device_timer");
671   }
672}
673
653674TIMER_CALLBACK_MEMBER(gottlieb_state::nmi_clear)
654675{
655676   m_maincpu->set_input_line(INPUT_LINE_NMI, CLEAR_LINE);
r22825r22826
660681{
661682   /* assert the NMI and set a timer to clear it at the first visible line */
662683   device.execute().set_input_line(INPUT_LINE_NMI, ASSERT_LINE);
663   machine().scheduler().timer_set(machine().primary_screen->time_until_pos(0), timer_expired_delegate(FUNC(gottlieb_state::nmi_clear),this));
684   timer_set(machine().primary_screen->time_until_pos(0), TIMER_NMI_CLEAR);
664685
665686   /* if we have a laserdisc, update it */
666687   if (m_laserdisc != NULL)
trunk/src/mame/drivers/peplus.c
r22825r22826
178178class peplus_state : public driver_device
179179{
180180public:
181   enum
182   {
183      TIMER_ASSERT_LP
184   };
185
181186   peplus_state(const machine_config &mconfig, device_type type, const char *tag)
182187      : driver_device(mconfig, type, tag),
183188         m_cmos_ram(*this, "cmos") ,
r22825r22826
268273   virtual void video_start();
269274   virtual void palette_init();
270275   UINT32 screen_update_peplus(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
271   TIMER_CALLBACK_MEMBER(assert_lp_cb);
272276   void peplus_load_superdata(const char *bank_name);
273277   void peplus_init();
274278   required_device<cpu_device> m_maincpu;
279
280protected:
281   virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr);
275282};
276283
277284static const UINT8  id_022[8] = { 0x00, 0x01, 0x04, 0x09, 0x13, 0x16, 0x18, 0x00 };
r22825r22826
377384   /* Reset timing logic */
378385}
379386
380TIMER_CALLBACK_MEMBER(peplus_state::assert_lp_cb)
387void peplus_state::device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr)
381388{
382   downcast<mc6845_device *>((device_t*)ptr)->assert_light_pen_input();
389   switch (id)
390   {
391   case TIMER_ASSERT_LP:
392      downcast<mc6845_device *>((device_t*)ptr)->assert_light_pen_input();
393      break;
394   default:
395      assert_always(FALSE, "Unknown id in peplus_state::device_timer");
396   }
383397}
384398
399
385400static void handle_lightpen( device_t *device )
386401{
387402   peplus_state *state = device->machine().driver_data<peplus_state>();
r22825r22826
393408   xt = x_val * vis_area.width() / 1024 + vis_area.min_x;
394409   yt = y_val * vis_area.height() / 1024 + vis_area.min_y;
395410
396      device->machine().scheduler().timer_set(device->machine().primary_screen->time_until_pos(yt, xt), timer_expired_delegate(FUNC(peplus_state::assert_lp_cb),state), 0, device);
411   state->timer_set(device->machine().primary_screen->time_until_pos(yt, xt), peplus_state::TIMER_ASSERT_LP, 0, device);
397412}
398413
399414WRITE_LINE_MEMBER(peplus_state::crtc_vsync)
trunk/src/mame/drivers/trucocl.c
r22825r22826
4343}
4444
4545
46TIMER_CALLBACK_MEMBER(trucocl_state::dac_irq)
46void trucocl_state::device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr)
4747{
48   m_maincpu->set_input_line(INPUT_LINE_NMI, PULSE_LINE );
48   switch (id)
49   {
50   case TIMER_DAC_IRQ:
51      m_maincpu->set_input_line(INPUT_LINE_NMI, PULSE_LINE);
52      break;
53   default:
54      assert_always(FALSE, "Unknown id in trucocl_state::device_timer");
55   }
4956}
5057
58
5159WRITE8_MEMBER(trucocl_state::audio_dac_w)
5260{
5361   UINT8 *rom = memregion("maincpu")->base();
r22825r22826
7482
7583   m_dac->write_unsigned8( rom[dac_address+m_cur_dac_address_index] );
7684
77   machine().scheduler().timer_set( attotime::from_hz( 16000 ), timer_expired_delegate(FUNC(trucocl_state::dac_irq),this));
85   timer_set( attotime::from_hz( 16000 ), TIMER_DAC_IRQ);
7886}
7987
8088static ADDRESS_MAP_START( main_map, AS_PROGRAM, 8, trucocl_state )
trunk/src/mame/drivers/simpsons.c
r22825r22826
119119}
120120#endif
121121
122TIMER_CALLBACK_MEMBER(simpsons_state::nmi_callback)
122
123void simpsons_state::device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr)
123124{
124   m_audiocpu->set_input_line(INPUT_LINE_NMI, ASSERT_LINE);
125   switch (id)
126   {
127   case TIMER_NMI:
128      m_audiocpu->set_input_line(INPUT_LINE_NMI, ASSERT_LINE);
129      break;
130   case TIMER_DMAEND:
131      if (m_firq_enabled)
132         m_maincpu->set_input_line(KONAMI_FIRQ_LINE, HOLD_LINE);
133      break;
134   default:
135      assert_always(FALSE, "Unknown id in simpsons_state::device_timer");
136   }
125137}
126138
139
127140WRITE8_MEMBER(simpsons_state::z80_arm_nmi_w)
128141{
129142   m_audiocpu->set_input_line(INPUT_LINE_NMI, CLEAR_LINE);
130   machine().scheduler().timer_set(attotime::from_usec(25), timer_expired_delegate(FUNC(simpsons_state::nmi_callback),this));  /* kludge until the K053260 is emulated correctly */
143   timer_set(attotime::from_usec(25), TIMER_NMI);  /* kludge until the K053260 is emulated correctly */
131144}
132145
133146static ADDRESS_MAP_START( z80_map, AS_PROGRAM, 8, simpsons_state )
r22825r22826
249262   if (num_inactive) do { *dst = 0; dst += 8; } while (--num_inactive);
250263}
251264
252TIMER_CALLBACK_MEMBER(simpsons_state::dmaend_callback)
253{
254   if (m_firq_enabled)
255      m_maincpu->set_input_line(KONAMI_FIRQ_LINE, HOLD_LINE);
256}
257
258
259265INTERRUPT_GEN_MEMBER(simpsons_state::simpsons_irq)
260266{
261267   if (k053246_is_irq_enabled(m_k053246))
262268   {
263269      simpsons_objdma();
264270      // 32+256us delay at 8MHz dotclock; artificially shortened since actual V-blank length is unknown
265      machine().scheduler().timer_set(attotime::from_usec(30), timer_expired_delegate(FUNC(simpsons_state::dmaend_callback),this));
271      timer_set(attotime::from_usec(30), TIMER_DMAEND);
266272   }
267273
268274   if (k052109_is_irq_enabled(m_k052109))
trunk/src/mame/drivers/kinst.c
r22825r22826
139139class kinst_state : public driver_device
140140{
141141public:
142   enum
143   {
144      TIMER_IRQ0_STOP
145   };
146
142147   kinst_state(const machine_config &mconfig, device_type type, const char *tag)
143148      : driver_device(mconfig, type, tag),
144149      m_rambase(*this, "rambase"),
r22825r22826
166171   virtual void machine_reset();
167172   UINT32 screen_update_kinst(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
168173   INTERRUPT_GEN_MEMBER(irq0_start);
169   TIMER_CALLBACK_MEMBER(irq0_stop);
170174   required_device<cpu_device> m_maincpu;
175
176protected:
177   virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr);
171178};
172179
173180
r22825r22826
280287 *
281288 *************************************/
282289
283TIMER_CALLBACK_MEMBER(kinst_state::irq0_stop)
290void kinst_state::device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr)
284291{
285   m_maincpu->set_input_line(0, CLEAR_LINE);
292   switch (id)
293   {
294   case TIMER_IRQ0_STOP:
295      m_maincpu->set_input_line(0, CLEAR_LINE);
296      break;
297   default:
298      assert_always(FALSE, "Unknown id in kinst_state::device_timer");
299   }
286300}
287301
288302
289303INTERRUPT_GEN_MEMBER(kinst_state::irq0_start)
290304{
291305   device.execute().set_input_line(0, ASSERT_LINE);
292   machine().scheduler().timer_set(attotime::from_usec(50), timer_expired_delegate(FUNC(kinst_state::irq0_stop),this));
306   timer_set(attotime::from_usec(50), TIMER_IRQ0_STOP);
293307}
294308
295309
trunk/src/mame/drivers/boxer.c
r22825r22826
2323class boxer_state : public driver_device
2424{
2525public:
26   enum
27   {
28      TIMER_POT_INTERRUPT,
29      TIMER_PERIODIC
30   };
31
2632   boxer_state(const machine_config &mconfig, device_type type, const char *tag)
2733      : driver_device(mconfig, type, tag),
2834      m_tile_ram(*this, "tile_ram"),
r22825r22826
5460   TIMER_CALLBACK_MEMBER(pot_interrupt);
5561   TIMER_CALLBACK_MEMBER(periodic_callback);
5662   void draw_boxer( bitmap_ind16 &bitmap, const rectangle &cliprect );
63
64protected:
65   virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr);
5766};
5867
5968/*************************************
r22825r22826
6271 *
6372 *************************************/
6473
74void boxer_state::device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr)
75{
76   switch(id)
77   {
78   case TIMER_POT_INTERRUPT:
79      pot_interrupt(ptr, param);
80      break;
81   case TIMER_PERIODIC:
82      periodic_callback(ptr, param);
83      break;
84   default:
85      assert_always(FALSE, "Unknown id in boxer_state::device_timer");
86   }
87}
88
6589TIMER_CALLBACK_MEMBER(boxer_state::pot_interrupt)
6690{
6791   int mask = param;
r22825r22826
96120
97121      for (i = 1; i < 256; i++)
98122         if (mask[i] != 0)
99            machine().scheduler().timer_set(machine().primary_screen->time_until_pos(i), timer_expired_delegate(FUNC(boxer_state::pot_interrupt),this), mask[i]);
123            timer_set(machine().primary_screen->time_until_pos(i), TIMER_POT_INTERRUPT, mask[i]);
100124
101125      m_pot_state = 0;
102126   }
r22825r22826
106130   if (scanline >= 262)
107131      scanline = 0;
108132
109   machine().scheduler().timer_set(machine().primary_screen->time_until_pos(scanline), timer_expired_delegate(FUNC(boxer_state::periodic_callback),this), scanline);
133   timer_set(machine().primary_screen->time_until_pos(scanline), TIMER_PERIODIC, scanline);
110134}
111135
112136
r22825r22826
434458
435459void boxer_state::machine_reset()
436460{
437   machine().scheduler().timer_set(machine().primary_screen->time_until_pos(0), timer_expired_delegate(FUNC(boxer_state::periodic_callback),this));
461   timer_set(machine().primary_screen->time_until_pos(0), TIMER_PERIODIC);
438462
439463   m_pot_state = 0;
440464   m_pot_latch = 0;
trunk/src/mame/drivers/cidelsa.c
r22825r22826
424424
425425/* Machine Start */
426426
427TIMER_CALLBACK_MEMBER(cidelsa_state::set_cpu_mode)
427void cidelsa_state::device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr)
428428{
429   m_reset = 1;
429   switch (id)
430   {
431   case TIMER_SET_CPU_MODE:
432      m_reset = 1;
433      break;
434   default:
435      assert_always(FALSE, "Unknown id in cidelsa_state::device_timer");
436   }
430437}
431438
432439void cidelsa_state::machine_start()
r22825r22826
453460{
454461   /* reset the CPU */
455462   m_reset = 0;
456   machine().scheduler().timer_set(attotime::from_msec(200), timer_expired_delegate(FUNC(cidelsa_state::set_cpu_mode),this));
463   timer_set(attotime::from_msec(200), TIMER_SET_CPU_MODE);
457464}
458465
459466/* Machine Drivers */
trunk/src/mame/drivers/gcpinbal.c
r22825r22826
4747                      INTERRUPTS
4848***********************************************************/
4949
50TIMER_CALLBACK_MEMBER(gcpinbal_state::gcpinbal_interrupt1)
50void gcpinbal_state::device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr)
5151{
52   m_maincpu->set_input_line(1, HOLD_LINE);
53}
54
55#ifdef UNUSED_FUNCTION
56TIMER_CALLBACK_MEMBER(gcpinbal_state::gcpinbal_interrupt3)
57{
58   // IRQ3 is from the M6585
59//  if (!ADPCM_playing(0))
52   switch (id)
6053   {
61      m_maincpu->set_input_line(3, HOLD_LINE);
54   case TIMER_GCPINBAL_INTERRUPT1:
55      m_maincpu->set_input_line(1, HOLD_LINE);
56      break;
57   case TIMER_GCPINBAL_INTERRUPT3:
58      // IRQ3 is from the M6585
59      //if (!ADPCM_playing(0))
60      {
61         m_maincpu->set_input_line(3, HOLD_LINE);
62      }
63      break;
64   default:
65      assert_always(FALSE, "Unknown id in gcpinbal_state::device_timer");
6266   }
6367}
64#endif
6568
6669INTERRUPT_GEN_MEMBER(gcpinbal_state::gcpinbal_interrupt)
6770{
6871   /* Unsure of actual sequence */
6972
70   machine().scheduler().timer_set(downcast<cpu_device *>(&device)->cycles_to_attotime(500), timer_expired_delegate(FUNC(gcpinbal_state::gcpinbal_interrupt1),this));
71//  machine().scheduler().timer_set(downcast<cpu_device *>(&device)->cycles_to_attotime(1000), timer_expired_delegate(FUNC(gcpinbal_state::gcpinbal_interrupt3),this));
73   timer_set(downcast<cpu_device *>(&device)->cycles_to_attotime(500), TIMER_GCPINBAL_INTERRUPT1);
74//  timer_set(downcast<cpu_device *>(&device)->cycles_to_attotime(1000), TIMER_GCPINBAL_INTERRUPT3);
7275   device.execute().set_input_line(4, HOLD_LINE);
7376}
7477
trunk/src/mame/drivers/tmnt.c
r22825r22826
300300}
301301#endif
302302
303TIMER_CALLBACK_MEMBER(tmnt_state::nmi_callback)
303void tmnt_state::device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr)
304304{
305   m_audiocpu->set_input_line(INPUT_LINE_NMI, ASSERT_LINE);
305   switch (id)
306   {
307   case TIMER_NMI:
308      m_audiocpu->set_input_line(INPUT_LINE_NMI, ASSERT_LINE);
309      break;
310   default:
311      assert_always(FALSE, "Unknown id in tmnt_state::device_timer");
312   }
306313}
307314
308315WRITE8_MEMBER(tmnt_state::sound_arm_nmi_w)
309316{
310317//  sound_nmi_enabled = 1;
311318   m_audiocpu->set_input_line(INPUT_LINE_NMI, CLEAR_LINE);
312   machine().scheduler().timer_set(attotime::from_usec(50), timer_expired_delegate(FUNC(tmnt_state::nmi_callback),this));  /* kludge until the K053260 is emulated correctly */
319   timer_set(attotime::from_usec(50), TIMER_NMI);  /* kludge until the K053260 is emulated correctly */
313320}
314321
315322
trunk/src/mame/drivers/taito_b.c
r22825r22826
196196   membank("bank1")->set_entry((data - 1) & 3);
197197}
198198
199TIMER_CALLBACK_MEMBER(taitob_state::rsaga2_interrupt2)
199void taitob_state::device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr)
200200{
201   m_maincpu->set_input_line(2, HOLD_LINE);
201   switch (id)
202   {
203   case RSAGA2_INTERRUPT2:
204      m_maincpu->set_input_line(2, HOLD_LINE);
205      break;
206   case CRIMEC_INTERRUPT3:
207      m_maincpu->set_input_line(3, HOLD_LINE);
208      break;
209   case HITICE_INTERRUPT6:
210      m_maincpu->set_input_line(6, HOLD_LINE);
211      break;
212   case RAMBO3_INTERRUPT1:
213      m_maincpu->set_input_line(1, HOLD_LINE);
214      break;
215   case PBOBBLE_INTERRUPT5:
216      m_maincpu->set_input_line(5, HOLD_LINE);
217      break;
218   case VIOFIGHT_INTERRUPT1:
219      m_maincpu->set_input_line(1, HOLD_LINE);
220      break;
221   case MASTERW_INTERRUPT4:
222      m_maincpu->set_input_line(4, HOLD_LINE);
223      break;
224   case SILENTD_INTERRUPT4:
225      m_maincpu->set_input_line(4, HOLD_LINE);
226      break;
227   case SELFEENA_INTERRUPT4:
228      m_maincpu->set_input_line(4, HOLD_LINE);
229      break;
230   case SBM_INTERRUPT5:
231      m_maincpu->set_input_line(5, HOLD_LINE);
232      break;
233   case REALPUNC_INTERRUPT3:
234      m_maincpu->set_input_line(3, HOLD_LINE);
235      break;
236   default:
237      assert_always(FALSE, "Unknown id in taitob_state::device_timer");
238   }
202239}
203240
241
204242INTERRUPT_GEN_MEMBER(taitob_state::rastansaga2_interrupt)
205243{
206   machine().scheduler().timer_set(downcast<cpu_device *>(&device)->cycles_to_attotime(5000), timer_expired_delegate(FUNC(taitob_state::rsaga2_interrupt2),this));
244   timer_set(downcast<cpu_device *>(&device)->cycles_to_attotime(5000), RSAGA2_INTERRUPT2);
207245   device.execute().set_input_line(4, HOLD_LINE);
208246}
209247
210
211TIMER_CALLBACK_MEMBER(taitob_state::crimec_interrupt3)
212{
213   m_maincpu->set_input_line(3, HOLD_LINE);
214}
215
216248INTERRUPT_GEN_MEMBER(taitob_state::crimec_interrupt)
217249{
218   machine().scheduler().timer_set(downcast<cpu_device *>(&device)->cycles_to_attotime(5000), timer_expired_delegate(FUNC(taitob_state::crimec_interrupt3),this));
250   timer_set(downcast<cpu_device *>(&device)->cycles_to_attotime(5000), CRIMEC_INTERRUPT3);
219251   device.execute().set_input_line(5, HOLD_LINE);
220252}
221253
222
223TIMER_CALLBACK_MEMBER(taitob_state::hitice_interrupt6)
224{
225   m_maincpu->set_input_line(6, HOLD_LINE);
226}
227
228254INTERRUPT_GEN_MEMBER(taitob_state::hitice_interrupt)
229255{
230   machine().scheduler().timer_set(downcast<cpu_device *>(&device)->cycles_to_attotime(5000), timer_expired_delegate(FUNC(taitob_state::hitice_interrupt6),this));
256   timer_set(downcast<cpu_device *>(&device)->cycles_to_attotime(5000), HITICE_INTERRUPT6);
231257   device.execute().set_input_line(4, HOLD_LINE);
232258}
233259
234
235TIMER_CALLBACK_MEMBER(taitob_state::rambo3_interrupt1)
236{
237   m_maincpu->set_input_line(1, HOLD_LINE);
238}
239
240260INTERRUPT_GEN_MEMBER(taitob_state::rambo3_interrupt)
241261{
242   machine().scheduler().timer_set(downcast<cpu_device *>(&device)->cycles_to_attotime(5000), timer_expired_delegate(FUNC(taitob_state::rambo3_interrupt1),this));
262   timer_set(downcast<cpu_device *>(&device)->cycles_to_attotime(5000), RAMBO3_INTERRUPT1);
243263   device.execute().set_input_line(6, HOLD_LINE);
244264}
245265
246
247TIMER_CALLBACK_MEMBER(taitob_state::pbobble_interrupt5)
248{
249   m_maincpu->set_input_line(5, HOLD_LINE);
250}
251
252266INTERRUPT_GEN_MEMBER(taitob_state::pbobble_interrupt)
253267{
254   machine().scheduler().timer_set(downcast<cpu_device *>(&device)->cycles_to_attotime(5000), timer_expired_delegate(FUNC(taitob_state::pbobble_interrupt5),this));
268   timer_set(downcast<cpu_device *>(&device)->cycles_to_attotime(5000), PBOBBLE_INTERRUPT5);
255269   device.execute().set_input_line(3, HOLD_LINE);
256270}
257271
258TIMER_CALLBACK_MEMBER(taitob_state::viofight_interrupt1)
259{
260   m_maincpu->set_input_line(1, HOLD_LINE);
261}
262
263272INTERRUPT_GEN_MEMBER(taitob_state::viofight_interrupt)
264273{
265   machine().scheduler().timer_set(downcast<cpu_device *>(&device)->cycles_to_attotime(5000), timer_expired_delegate(FUNC(taitob_state::viofight_interrupt1),this));
274   timer_set(downcast<cpu_device *>(&device)->cycles_to_attotime(5000), VIOFIGHT_INTERRUPT1);
266275   device.execute().set_input_line(4, HOLD_LINE);
267276}
268277
269TIMER_CALLBACK_MEMBER(taitob_state::masterw_interrupt4)
270{
271   m_maincpu->set_input_line(4, HOLD_LINE);
272}
273
274278INTERRUPT_GEN_MEMBER(taitob_state::masterw_interrupt)
275279{
276   machine().scheduler().timer_set(downcast<cpu_device *>(&device)->cycles_to_attotime(5000), timer_expired_delegate(FUNC(taitob_state::masterw_interrupt4),this));
280   timer_set(downcast<cpu_device *>(&device)->cycles_to_attotime(5000), MASTERW_INTERRUPT4);
277281   device.execute().set_input_line(5, HOLD_LINE);
278282}
279283
280TIMER_CALLBACK_MEMBER(taitob_state::silentd_interrupt4)
281{
282   m_maincpu->set_input_line(4, HOLD_LINE);
283}
284
285284INTERRUPT_GEN_MEMBER(taitob_state::silentd_interrupt)
286285{
287   machine().scheduler().timer_set(downcast<cpu_device *>(&device)->cycles_to_attotime(5000), timer_expired_delegate(FUNC(taitob_state::silentd_interrupt4),this));
286   timer_set(downcast<cpu_device *>(&device)->cycles_to_attotime(5000), SILENTD_INTERRUPT4);
288287   device.execute().set_input_line(6, HOLD_LINE);
289288}
290289
291TIMER_CALLBACK_MEMBER(taitob_state::selfeena_interrupt4)
292{
293   m_maincpu->set_input_line(4, HOLD_LINE);
294}
295
296290INTERRUPT_GEN_MEMBER(taitob_state::selfeena_interrupt)
297291{
298   machine().scheduler().timer_set(downcast<cpu_device *>(&device)->cycles_to_attotime(5000), timer_expired_delegate(FUNC(taitob_state::selfeena_interrupt4),this));
292   timer_set(downcast<cpu_device *>(&device)->cycles_to_attotime(5000), SELFEENA_INTERRUPT4);
299293   device.execute().set_input_line(6, HOLD_LINE);
300294}
301295
302TIMER_CALLBACK_MEMBER(taitob_state::sbm_interrupt5)//4
303{
304   m_maincpu->set_input_line(5, HOLD_LINE);
305}
306
307296INTERRUPT_GEN_MEMBER(taitob_state::sbm_interrupt)//5
308297{
309   machine().scheduler().timer_set(downcast<cpu_device *>(&device)->cycles_to_attotime(10000), timer_expired_delegate(FUNC(taitob_state::sbm_interrupt5),this));
298   timer_set(downcast<cpu_device *>(&device)->cycles_to_attotime(10000), SBM_INTERRUPT5);
310299   device.execute().set_input_line(4, HOLD_LINE);
311300}
312301
313TIMER_CALLBACK_MEMBER(taitob_state::realpunc_interrupt3)//3
314{
315   m_maincpu->set_input_line(3, HOLD_LINE);
316}
317
318302INTERRUPT_GEN_MEMBER(taitob_state::realpunc_interrupt)//2
319303{
320   machine().scheduler().timer_set(downcast<cpu_device *>(&device)->cycles_to_attotime(10000), timer_expired_delegate(FUNC(taitob_state::realpunc_interrupt3),this));
304   timer_set(downcast<cpu_device *>(&device)->cycles_to_attotime(10000), REALPUNC_INTERRUPT3);
321305   device.execute().set_input_line(2, HOLD_LINE);
322306}
323307
trunk/src/mame/includes/wgp.h
r22825r22826
99class wgp_state : public driver_device
1010{
1111public:
12   enum
13   {
14      TIMER_WGP_INTERRUPT4,
15      TIMER_WGP_INTERRUPT6,
16      TIMER_WGP_CPUB_INTERRUPT6
17   };
18
1219   wgp_state(const machine_config &mconfig, device_type type, const char *tag)
1320      : driver_device(mconfig, type, tag),
1421      m_spritemap(*this, "spritemap"),
r22825r22826
7784   DECLARE_VIDEO_START(wgp2);
7885   UINT32 screen_update_wgp(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
7986   INTERRUPT_GEN_MEMBER(wgp_cpub_interrupt);
80   TIMER_CALLBACK_MEMBER(wgp_interrupt4);
81   TIMER_CALLBACK_MEMBER(wgp_interrupt6);
82   TIMER_CALLBACK_MEMBER(wgp_cpub_interrupt6);
8387   void wgp_postload();
8488   inline void common_get_piv_tile_info( tile_data &tileinfo, int tile_index, int num );
8589   void wgp_core_vh_start( int piv_xoffs, int piv_yoffs );
r22825r22826
8892   void parse_control();
8993   void reset_sound_region(  )  /* assumes Z80 sandwiched between the 68Ks */;
9094   DECLARE_WRITE_LINE_MEMBER(irqhandler);
95
96protected:
97   virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr);
9198};
trunk/src/mame/includes/trucocl.h
r22825r22826
33class trucocl_state : public driver_device
44{
55public:
6   enum
7   {
8      TIMER_DAC_IRQ
9   };
10
611   trucocl_state(const machine_config &mconfig, device_type type, const char *tag)
712      : driver_device(mconfig, type, tag),
813      m_videoram(*this, "videoram"),
r22825r22826
2732   virtual void palette_init();
2833   UINT32 screen_update_trucocl(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
2934   INTERRUPT_GEN_MEMBER(trucocl_interrupt);
30   TIMER_CALLBACK_MEMBER(dac_irq);
3135   required_device<cpu_device> m_maincpu;
3236   required_device<dac_device> m_dac;
37
38protected:
39   virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr);
3340};
trunk/src/mame/includes/gcpinbal.h
r22825r22826
55class gcpinbal_state : public driver_device
66{
77public:
8   enum
9   {
10      TIMER_GCPINBAL_INTERRUPT1,
11      TIMER_GCPINBAL_INTERRUPT3
12   };
13
814   gcpinbal_state(const machine_config &mconfig, device_type type, const char *tag)
915      : driver_device(mconfig, type, tag),
1016      m_maincpu(*this, "maincpu"),
r22825r22826
6066   virtual void video_start();
6167   UINT32 screen_update_gcpinbal(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
6268   INTERRUPT_GEN_MEMBER(gcpinbal_interrupt);
63   TIMER_CALLBACK_MEMBER(gcpinbal_interrupt1);
64   TIMER_CALLBACK_MEMBER(gcpinbal_interrupt3);
6569   void gcpinbal_core_vh_start(  );
6670   void draw_sprites( bitmap_ind16 &bitmap, const rectangle &cliprect, int y_offs );
6771   DECLARE_WRITE_LINE_MEMBER(gcp_adpcm_int);
72
73protected:
74   virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr);
6875};
trunk/src/mame/includes/topspeed.h
r22825r22826
99class topspeed_state : public driver_device
1010{
1111public:
12   enum
13   {
14      TIMER_TOPSPEED_INTERRUPT6,
15      TIMER_TOPSPEED_CPUB_INTERRUPT6
16   };
17
1218   topspeed_state(const machine_config &mconfig, device_type type, const char *tag)
1319      : driver_device(mconfig, type, tag),
1420      m_spritemap(*this, "spritemap"),
r22825r22826
6874   UINT32 screen_update_topspeed(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
6975   INTERRUPT_GEN_MEMBER(topspeed_interrupt);
7076   INTERRUPT_GEN_MEMBER(topspeed_cpub_interrupt);
71   TIMER_CALLBACK_MEMBER(topspeed_interrupt6);
72   TIMER_CALLBACK_MEMBER(topspeed_cpub_interrupt6);
7377   void topspeed_postload();
7478   void draw_sprites( bitmap_ind16 &bitmap, const rectangle &cliprect );
7579   void parse_control(  )   /* assumes Z80 sandwiched between 68Ks */;
r22825r22826
7781   void topspeed_msm5205_clock(device_t *device, int chip);
7882   DECLARE_WRITE_LINE_MEMBER(topspeed_msm5205_vck_1);
7983   DECLARE_WRITE_LINE_MEMBER(topspeed_msm5205_vck_2);
84
85protected:
86   virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr);
8087};
trunk/src/mame/includes/gottlieb.h
r22825r22826
229229class gottlieb_state : public driver_device
230230{
231231public:
232   enum
233   {
234      TIMER_LASERDISC_PHILIPS,
235      TIMER_LASERDISC_BIT_OFF,
236      TIMER_LASERDISC_BIT,
237      TIMER_NMI_CLEAR
238   };
239
232240   gottlieb_state(const machine_config &mconfig, device_type type, const char *tag)
233241      : driver_device(mconfig, type, tag),
234242         m_maincpu(*this, "maincpu"),
r22825r22826
319327   void audio_process_clock(int logit);
320328   void audio_handle_zero_crossing(attotime zerotime, int logit);
321329   void laserdisc_audio_process(laserdisc_device &device, int samplerate, int samples, const INT16 *ch0, const INT16 *ch1);
330
331protected:
332   virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr);
322333};
323334
324335/*----------- defined in audio/gottlieb.c -----------*/
trunk/src/mame/includes/cidelsa.h
r22825r22826
3737class cidelsa_state : public driver_device
3838{
3939public:
40   enum
41   {
42      TIMER_SET_CPU_MODE
43   };
44
4045   cidelsa_state(const machine_config &mconfig, device_type type, const char *tag)
4146      : driver_device(mconfig, type, tag),
4247         m_maincpu(*this, CDP1802_TAG),
r22825r22826
7277   UINT8 *m_charram;
7378   DECLARE_CUSTOM_INPUT_MEMBER(cdp1869_pcb_r);
7479   DECLARE_INPUT_CHANGED_MEMBER(ef_w);
75   TIMER_CALLBACK_MEMBER(set_cpu_mode);
80
81protected:
82   virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr);
7683};
7784
7885class draco_state : public cidelsa_state
trunk/src/mame/includes/m10.h
r22825r22826
3131class m10_state : public driver_device
3232{
3333public:
34   enum
35   {
36      TIMER_INTERRUPT
37   };
38
3439   m10_state(const machine_config &mconfig, device_type type, const char *tag)
3540      : driver_device(mconfig, type, tag),
3641      m_memory(*this, "memory"),
r22825r22826
97102   DECLARE_WRITE8_MEMBER(ic8j1_output_changed);
98103   DECLARE_WRITE8_MEMBER(ic8j2_output_changed);
99104   inline void plot_pixel_m10( bitmap_ind16 &bm, int x, int y, int col );
105
106protected:
107   virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr);
100108};
trunk/src/mame/includes/policetr.h
r22825r22826
77class policetr_state : public driver_device
88{
99public:
10   enum
11   {
12      TIMER_IRQ5_GEN
13   };
14
1015   policetr_state(const machine_config &mconfig, device_type type, const char *tag)
1116      : driver_device(mconfig, type, tag),
1217      m_rambase(*this, "rambase"),
r22825r22826
5055   virtual void video_start();
5156   UINT32 screen_update_policetr(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
5257   INTERRUPT_GEN_MEMBER(irq4_gen);
53   TIMER_CALLBACK_MEMBER(irq5_gen);
5458   void render_display_list(offs_t offset);
5559   required_device<cpu_device> m_maincpu;
5660   required_device<eeprom_device> m_eeprom;
61
62protected:
63   virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr);
5764};
trunk/src/mame/includes/simpsons.h
r22825r22826
33class simpsons_state : public driver_device
44{
55public:
6   enum
7   {
8      TIMER_NMI,
9      TIMER_DMAEND
10   };
11
612   simpsons_state(const machine_config &mconfig, device_type type, const char *tag)
713      : driver_device(mconfig, type, tag),
814      m_maincpu(*this, "maincpu"),
r22825r22826
5561   void simpsons_video_banking( int bank );
5662   void sound_nmi_callback( int param );
5763   void simpsons_objdma(  );
64
65protected:
66   virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr);
5867};
5968
6069
trunk/src/mame/includes/taito_b.h
r22825r22826
44class taitob_state : public driver_device
55{
66public:
7   enum
8   {
9      RSAGA2_INTERRUPT2,
10      CRIMEC_INTERRUPT3,
11      HITICE_INTERRUPT6,
12      RAMBO3_INTERRUPT1,
13      PBOBBLE_INTERRUPT5,
14      VIOFIGHT_INTERRUPT1,
15      MASTERW_INTERRUPT4,
16      SILENTD_INTERRUPT4,
17      SELFEENA_INTERRUPT4,
18      SBM_INTERRUPT5,
19      REALPUNC_INTERRUPT3
20   };
21
722   taitob_state(const machine_config &mconfig, device_type type, const char *tag)
823      : driver_device(mconfig, type, tag),
924      m_spriteram(*this, "spriteram"),
r22825r22826
91106   INTERRUPT_GEN_MEMBER(selfeena_interrupt);
92107   INTERRUPT_GEN_MEMBER(sbm_interrupt);
93108   INTERRUPT_GEN_MEMBER(realpunc_interrupt);
94   TIMER_CALLBACK_MEMBER(rsaga2_interrupt2);
95   TIMER_CALLBACK_MEMBER(crimec_interrupt3);
96   TIMER_CALLBACK_MEMBER(hitice_interrupt6);
97   TIMER_CALLBACK_MEMBER(rambo3_interrupt1);
98   TIMER_CALLBACK_MEMBER(pbobble_interrupt5);
99   TIMER_CALLBACK_MEMBER(viofight_interrupt1);
100   TIMER_CALLBACK_MEMBER(masterw_interrupt4);
101   TIMER_CALLBACK_MEMBER(silentd_interrupt4);
102   TIMER_CALLBACK_MEMBER(selfeena_interrupt4);
103   TIMER_CALLBACK_MEMBER(sbm_interrupt5);
104   TIMER_CALLBACK_MEMBER(realpunc_interrupt3);
105109   void hitice_clear_pixel_bitmap(  );
106110   void draw_sprites( bitmap_ind16 &bitmap, const rectangle &cliprect );
107111   void draw_framebuffer( bitmap_ind16 &bitmap, const rectangle &cliprect, int priority );
108112   void ryujin_patch(void);
109113   void sbm_patch(void);
110114   DECLARE_WRITE_LINE_MEMBER(irqhandler);
115
116protected:
117   virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr);
111118};
trunk/src/mame/includes/tmnt.h
r22825r22826
77class tmnt_state : public driver_device
88{
99public:
10   enum
11   {
12      TIMER_NMI
13   };
14
1015   tmnt_state(const machine_config &mconfig, device_type type, const char *tag)
1116      : driver_device(mconfig, type, tag),
1217      m_spriteram(*this, "spriteram"),
r22825r22826
161166   INTERRUPT_GEN_MEMBER(punkshot_interrupt);
162167   INTERRUPT_GEN_MEMBER(lgtnfght_interrupt);
163168   INTERRUPT_GEN_MEMBER(tmnt_vblank_irq);
164   TIMER_CALLBACK_MEMBER(nmi_callback);
165169   void sound_nmi_callback( int param );
166170   inline UINT32 tmnt2_get_word( UINT32 addr );
167171   void tmnt2_put_word( address_space &space, UINT32 addr, UINT16 data );
168172   DECLARE_WRITE8_MEMBER(volume_callback);
173
174protected:
175   virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr);
169176};
170177
171178

Previous 199869 Revisions Next


© 1997-2024 The MAME Team