Previous 199869 Revisions Next

r31830 Friday 29th August, 2014 at 17:07:39 UTC by Osso
Updated most of the remaining static TIMER_CALLBACKs (nw) to MEMBERs. (nw)
[src/mame/audio]jedi.c starwars.c turbo.c
[src/mame/includes]harddriv.h jedi.h midzeus.h starwars.h turbo.h
[src/mame/machine]harddriv.c kaneko_calc3.c kaneko_calc3.h
[src/mame/video]midzeus2.c

trunk/src/mame/audio/jedi.c
r31829r31830
7373}
7474
7575
76static TIMER_CALLBACK( delayed_audio_latch_w )
76TIMER_CALLBACK_MEMBER(jedi_state::delayed_audio_latch_w)
7777{
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;
8280}
8381
8482
8583WRITE8_MEMBER(jedi_state::jedi_audio_latch_w)
8684{
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);
8886}
8987
9088
trunk/src/mame/audio/turbo.c
r31829r31830
3939
4040#if (DISCRETE_TEST)
4141
42static TIMER_CALLBACK( update_sound_a )
42TIMER_CALLBACK_MEMBER(turbo_state::update_sound_a)
4343{
4444   discrete_device *discrete = machine.device<discrete_device>("discrete");
4545   int data = param;
trunk/src/mame/audio/starwars.c
r31829r31830
6161 *
6262 *************************************/
6363
64static TIMER_CALLBACK( sound_callback )
64TIMER_CALLBACK_MEMBER(starwars_state::sound_callback)
6565{
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));
7069}
7170
7271
r31829r31830
7978
8079WRITE8_MEMBER(starwars_state::starwars_sout_w)
8180{
82   machine().scheduler().synchronize(FUNC(sound_callback), data);
81   machine().scheduler().synchronize(timer_expired_delegate(FUNC(starwars_state::sound_callback), this), data);
8382}
8483
8584
r31829r31830
102101   return m_riot->porta_in_get() & 0xc0;    /* only upper two flag bits mapped */
103102}
104103
105static TIMER_CALLBACK( main_callback )
104TIMER_CALLBACK_MEMBER(starwars_state::main_callback )
106105{
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);
110108
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));
114112}
115113
116114WRITE8_MEMBER(starwars_state::starwars_main_wr_w)
117115{
118   machine().scheduler().synchronize(FUNC(main_callback), data);
116   machine().scheduler().synchronize(timer_expired_delegate(FUNC(starwars_state::main_callback), this), data);
119117}
120118
121119
trunk/src/mame/machine/kaneko_calc3.c
r31829r31830
3434}
3535
3636
37static TIMER_CALLBACK( kaneko_calc3_run_callback )
37TIMER_CALLBACK_MEMBER( kaneko_calc3_device::run_callback )
3838{
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();
4241}
4342
4443void kaneko_calc3_device::device_start()
4544{
4645   m_calc3_mcuram = (UINT16*)auto_alloc_array_clear(this->machine(), UINT16, 0x10000/2);
4746   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));
4948
5049
5150   save_item(NAME(m_calc3.mcu_status));
trunk/src/mame/machine/kaneko_calc3.h
r31829r31830
5353   UINT16* m_calc3_mcuram;
5454   void calc3_mcu_init(running_machine &machine);
5555   void initial_scan_tables(running_machine& machine);
56   TIMER_CALLBACK_MEMBER(run_callback);
5657
5758   calc3_t m_calc3;
5859   void calc3_mcu_com_w(offs_t offset, UINT16 data, UINT16 mem_mask, int _n_);
trunk/src/mame/machine/harddriv.c
r31829r31830
12971297/*
12981298    TODO: The following does not work correctly
12991299*/
1300static TIMER_CALLBACK( xsdp_sport1_irq_off_callback )
1300TIMER_CALLBACK_MEMBER(harddriv_state::xsdp_sport1_irq_off_callback)
13011301{
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);
13041303}
13051304
13061305
r31829r31830
13121311   m_ds3sdsp_sdata = data;
13131312
13141313   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));
13161315}
13171316
13181317
trunk/src/mame/includes/turbo.h
r31829r31830
151151   UINT32 screen_update_subroc3d(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
152152   UINT32 screen_update_buckrog(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
153153   TIMER_CALLBACK_MEMBER(delayed_i8255_w);
154   TIMER_CALLBACK_MEMBER(update_sound_a);
154155   DECLARE_WRITE8_MEMBER(turbo_sound_a_w);
155156   DECLARE_WRITE8_MEMBER(turbo_sound_b_w);
156157   DECLARE_WRITE8_MEMBER(turbo_sound_c_w);
trunk/src/mame/includes/midzeus.h
r31829r31830
9797   DECLARE_READ32_MEMBER( zeus2_r );
9898   DECLARE_WRITE32_MEMBER( zeus2_w );
9999private:
100   TIMER_CALLBACK_MEMBER(int_timer_callback);
100101   void exit_handler2();
101102   void zeus2_register32_w(offs_t offset, UINT32 data, int logit);
102103   void zeus2_register_update(offs_t offset, UINT32 oldval, int logit);
trunk/src/mame/includes/harddriv.h
r31829r31830
382382
383383   void hdds3sdsp_reset_timer();
384384   void hdds3xdsp_reset_timer();
385   
386   TIMER_CALLBACK_MEMBER( xsdp_sport1_irq_off_callback );
385387
386388   /* DSK board */
387389   DECLARE_WRITE16_MEMBER( hd68k_dsk_control_w );
trunk/src/mame/includes/starwars.h
r31829r31830
6767   DECLARE_DRIVER_INIT(starwars);
6868   virtual void machine_reset();
6969   TIMER_CALLBACK_MEMBER(math_run_clear);
70   TIMER_CALLBACK_MEMBER(main_callback);
71   TIMER_CALLBACK_MEMBER(sound_callback);
7072   DECLARE_READ8_MEMBER(r6532_porta_r);
7173   DECLARE_WRITE8_MEMBER(r6532_porta_w);
7274   DECLARE_WRITE_LINE_MEMBER(snd_interrupt);
trunk/src/mame/includes/jedi.h
r31829r31830
8383   DECLARE_VIDEO_START(jedi);
8484   UINT32 screen_update_jedi(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
8585   TIMER_CALLBACK_MEMBER(generate_interrupt);
86   TIMER_CALLBACK_MEMBER(delayed_audio_latch_w);
8687   void get_pens(pen_t *pens);
8788   void do_pen_lookup(bitmap_rgb32 &bitmap, const rectangle &cliprect);
8889   void draw_background_and_text(bitmap_rgb32 &bitmap, const rectangle &cliprect);
trunk/src/mame/video/midzeus2.c
r31829r31830
245245 *
246246 *************************************/
247247
248static TIMER_CALLBACK( int_timer_callback )
248TIMER_CALLBACK_MEMBER(midzeus2_state::int_timer_callback)
249249{
250   machine.device("maincpu")->execute().set_input_line(2, ASSERT_LINE);
250   m_maincpu->set_input_line(2, ASSERT_LINE);
251251}
252252
253253
r31829r31830
268268   texel_width = 256;
269269   zeus_renderbase = waveram[1];
270270
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));
272272
273273   /* save states */
274274   save_pointer(NAME(waveram[0]), WAVERAM0_WIDTH * WAVERAM0_HEIGHT * 8 / sizeof(waveram[0][0]));

Previous 199869 Revisions Next


© 1997-2024 The MAME Team