Updated most of the remaining static TIMER_CALLBACKs (nw) to MEMBERs. (nw)

This commit is contained in:
Ivan Vangelista 2014-08-29 17:07:39 +00:00
parent 1efddd17ff
commit 89f245ef71
12 changed files with 35 additions and 33 deletions

View File

@ -73,18 +73,16 @@ WRITE8_MEMBER(jedi_state::jedi_audio_reset_w)
}
static TIMER_CALLBACK( delayed_audio_latch_w )
TIMER_CALLBACK_MEMBER(jedi_state::delayed_audio_latch_w)
{
jedi_state *state = machine.driver_data<jedi_state>();
state->m_audio_latch = param;
*state->m_audio_comm_stat |= 0x80;
m_audio_latch = param;
*m_audio_comm_stat |= 0x80;
}
WRITE8_MEMBER(jedi_state::jedi_audio_latch_w)
{
machine().scheduler().synchronize(FUNC(delayed_audio_latch_w), data);
machine().scheduler().synchronize(timer_expired_delegate(FUNC(jedi_state::delayed_audio_latch_w), this), data);
}

View File

@ -61,12 +61,11 @@ WRITE_LINE_MEMBER(starwars_state::snd_interrupt)
*
*************************************/
static TIMER_CALLBACK( sound_callback )
TIMER_CALLBACK_MEMBER(starwars_state::sound_callback)
{
starwars_state *state = machine.driver_data<starwars_state>();
state->m_riot->porta_in_set(0x40, 0x40);
state->m_main_data = param;
machine.scheduler().boost_interleave(attotime::zero, attotime::from_usec(100));
m_riot->porta_in_set(0x40, 0x40);
m_main_data = param;
machine().scheduler().boost_interleave(attotime::zero, attotime::from_usec(100));
}
@ -79,7 +78,7 @@ READ8_MEMBER(starwars_state::starwars_sin_r)
WRITE8_MEMBER(starwars_state::starwars_sout_w)
{
machine().scheduler().synchronize(FUNC(sound_callback), data);
machine().scheduler().synchronize(timer_expired_delegate(FUNC(starwars_state::sound_callback), this), data);
}
@ -102,20 +101,19 @@ READ8_MEMBER(starwars_state::starwars_main_ready_flag_r)
return m_riot->porta_in_get() & 0xc0; /* only upper two flag bits mapped */
}
static TIMER_CALLBACK( main_callback )
TIMER_CALLBACK_MEMBER(starwars_state::main_callback )
{
starwars_state *state = machine.driver_data<starwars_state>();
if (state->m_riot->porta_in_get() & 0x80)
logerror("Sound data not read %x\n",state->m_sound_data);
if (m_riot->porta_in_get() & 0x80)
logerror("Sound data not read %x\n", m_sound_data);
state->m_riot->porta_in_set(0x80, 0x80);
state->m_sound_data = param;
machine.scheduler().boost_interleave(attotime::zero, attotime::from_usec(100));
m_riot->porta_in_set(0x80, 0x80);
m_sound_data = param;
machine().scheduler().boost_interleave(attotime::zero, attotime::from_usec(100));
}
WRITE8_MEMBER(starwars_state::starwars_main_wr_w)
{
machine().scheduler().synchronize(FUNC(main_callback), data);
machine().scheduler().synchronize(timer_expired_delegate(FUNC(starwars_state::main_callback), this), data);
}

View File

@ -39,7 +39,7 @@ static void turbo_update_samples(turbo_state *state, samples_device *samples)
#if (DISCRETE_TEST)
static TIMER_CALLBACK( update_sound_a )
TIMER_CALLBACK_MEMBER(turbo_state::update_sound_a)
{
discrete_device *discrete = machine.device<discrete_device>("discrete");
int data = param;

View File

@ -382,6 +382,8 @@ public:
void hdds3sdsp_reset_timer();
void hdds3xdsp_reset_timer();
TIMER_CALLBACK_MEMBER( xsdp_sport1_irq_off_callback );
/* DSK board */
DECLARE_WRITE16_MEMBER( hd68k_dsk_control_w );

View File

@ -83,6 +83,7 @@ public:
DECLARE_VIDEO_START(jedi);
UINT32 screen_update_jedi(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
TIMER_CALLBACK_MEMBER(generate_interrupt);
TIMER_CALLBACK_MEMBER(delayed_audio_latch_w);
void get_pens(pen_t *pens);
void do_pen_lookup(bitmap_rgb32 &bitmap, const rectangle &cliprect);
void draw_background_and_text(bitmap_rgb32 &bitmap, const rectangle &cliprect);

View File

@ -97,6 +97,7 @@ public:
DECLARE_READ32_MEMBER( zeus2_r );
DECLARE_WRITE32_MEMBER( zeus2_w );
private:
TIMER_CALLBACK_MEMBER(int_timer_callback);
void exit_handler2();
void zeus2_register32_w(offs_t offset, UINT32 data, int logit);
void zeus2_register_update(offs_t offset, UINT32 oldval, int logit);

View File

@ -67,6 +67,8 @@ public:
DECLARE_DRIVER_INIT(starwars);
virtual void machine_reset();
TIMER_CALLBACK_MEMBER(math_run_clear);
TIMER_CALLBACK_MEMBER(main_callback);
TIMER_CALLBACK_MEMBER(sound_callback);
DECLARE_READ8_MEMBER(r6532_porta_r);
DECLARE_WRITE8_MEMBER(r6532_porta_w);
DECLARE_WRITE_LINE_MEMBER(snd_interrupt);

View File

@ -151,6 +151,7 @@ public:
UINT32 screen_update_subroc3d(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
UINT32 screen_update_buckrog(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
TIMER_CALLBACK_MEMBER(delayed_i8255_w);
TIMER_CALLBACK_MEMBER(update_sound_a);
DECLARE_WRITE8_MEMBER(turbo_sound_a_w);
DECLARE_WRITE8_MEMBER(turbo_sound_b_w);
DECLARE_WRITE8_MEMBER(turbo_sound_c_w);

View File

@ -1297,10 +1297,9 @@ WRITE_LINE_MEMBER(harddriv_state::hdds3xdsp_timer_enable_callback)
/*
TODO: The following does not work correctly
*/
static TIMER_CALLBACK( xsdp_sport1_irq_off_callback )
TIMER_CALLBACK_MEMBER(harddriv_state::xsdp_sport1_irq_off_callback)
{
harddriv_state *state = machine.driver_data<harddriv_state>();
state->m_ds3xdsp->set_input_line(ADSP2105_SPORT1_RX, CLEAR_LINE);
m_ds3xdsp->set_input_line(ADSP2105_SPORT1_RX, CLEAR_LINE);
}
@ -1312,7 +1311,7 @@ WRITE32_MEMBER(harddriv_state::hdds3sdsp_serial_tx_callback)
m_ds3sdsp_sdata = data;
m_ds3xdsp->set_input_line(ADSP2105_SPORT1_RX, ASSERT_LINE);
machine().scheduler().timer_set(attotime::from_nsec(200), FUNC(xsdp_sport1_irq_off_callback));
machine().scheduler().timer_set(attotime::from_nsec(200), timer_expired_delegate(FUNC(harddriv_state::xsdp_sport1_irq_off_callback), this));
}

View File

@ -34,18 +34,17 @@ kaneko_calc3_device::kaneko_calc3_device(const machine_config &mconfig, const ch
}
static TIMER_CALLBACK( kaneko_calc3_run_callback )
TIMER_CALLBACK_MEMBER( kaneko_calc3_device::run_callback )
{
kaneko_calc3_device* dev = (kaneko_calc3_device*)ptr;
dev->calc3_mcu_run(machine);
dev->reset_run_timer();
calc3_mcu_run(machine());
reset_run_timer();
}
void kaneko_calc3_device::device_start()
{
m_calc3_mcuram = (UINT16*)auto_alloc_array_clear(this->machine(), UINT16, 0x10000/2);
initial_scan_tables(this->machine());
m_runtimer = machine().scheduler().timer_alloc(FUNC(kaneko_calc3_run_callback), (void*)this);
m_runtimer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(kaneko_calc3_device::run_callback), this));
save_item(NAME(m_calc3.mcu_status));

View File

@ -53,6 +53,7 @@ private:
UINT16* m_calc3_mcuram;
void calc3_mcu_init(running_machine &machine);
void initial_scan_tables(running_machine& machine);
TIMER_CALLBACK_MEMBER(run_callback);
calc3_t m_calc3;
void calc3_mcu_com_w(offs_t offset, UINT16 data, UINT16 mem_mask, int _n_);

View File

@ -245,9 +245,9 @@ INLINE UINT8 get_texel_4bit(const void *base, int y, int x, int width)
*
*************************************/
static TIMER_CALLBACK( int_timer_callback )
TIMER_CALLBACK_MEMBER(midzeus2_state::int_timer_callback)
{
machine.device("maincpu")->execute().set_input_line(2, ASSERT_LINE);
m_maincpu->set_input_line(2, ASSERT_LINE);
}
@ -268,7 +268,7 @@ VIDEO_START_MEMBER(midzeus2_state,midzeus2)
texel_width = 256;
zeus_renderbase = waveram[1];
int_timer = machine().scheduler().timer_alloc(FUNC(int_timer_callback));
int_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(midzeus2_state::int_timer_callback), this));
/* save states */
save_pointer(NAME(waveram[0]), WAVERAM0_WIDTH * WAVERAM0_HEIGHT * 8 / sizeof(waveram[0][0]));