mirror of
https://github.com/holub/mame
synced 2025-07-07 02:50:50 +03:00
no need to use "static TIMER_CALLBACK" but TIMER_CALLBACK_MEMBER, lot of previously modernized devices have this in (nw)
This commit is contained in:
parent
eb86cbcb77
commit
48c2ab93c5
@ -171,7 +171,7 @@ void isa8_hdc_device::device_start()
|
||||
m_isa->install_device(0x0320, 0x0323, 0, 0, read8_delegate( FUNC(isa8_hdc_device::pc_hdc_r), this ), write8_delegate( FUNC(isa8_hdc_device::pc_hdc_w), this ) );
|
||||
m_isa->set_dma_channel(3, this, FALSE);
|
||||
buffer.resize(17*4*512);
|
||||
timer = machine().scheduler().timer_alloc(FUNC(pc_hdc_command), this);
|
||||
timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(isa8_hdc_device::hdc_command),this));
|
||||
}
|
||||
|
||||
//-------------------------------------------------
|
||||
@ -483,7 +483,7 @@ int isa8_hdc_device::test_ready()
|
||||
return 1;
|
||||
}
|
||||
|
||||
void isa8_hdc_device::hdc_command()
|
||||
TIMER_CALLBACK_MEMBER(isa8_hdc_device::hdc_command)
|
||||
{
|
||||
int set_error_info = 1;
|
||||
int old_error = error; /* Previous error data is needed for CMD_SENSE */
|
||||
@ -585,12 +585,6 @@ void isa8_hdc_device::hdc_command()
|
||||
if(no_dma()) pc_hdc_result(set_error_info);
|
||||
}
|
||||
|
||||
TIMER_CALLBACK(isa8_hdc_device::pc_hdc_command)
|
||||
{
|
||||
reinterpret_cast<isa8_hdc_device *>(ptr)->hdc_command();
|
||||
}
|
||||
|
||||
|
||||
/* Command format
|
||||
* Bits Description
|
||||
* 7 0
|
||||
|
@ -84,9 +84,8 @@ protected:
|
||||
void get_drive();
|
||||
void get_chsn();
|
||||
int test_ready();
|
||||
static TIMER_CALLBACK(pc_hdc_command);
|
||||
TIMER_CALLBACK_MEMBER(hdc_command);
|
||||
public:
|
||||
void hdc_command();
|
||||
void pc_hdc_data_w(int data);
|
||||
void pc_hdc_reset_w(int data);
|
||||
void pc_hdc_select_w(int data);
|
||||
|
@ -52,15 +52,10 @@ void snapshot_image_device::device_config_complete()
|
||||
}
|
||||
|
||||
/*-------------------------------------------------
|
||||
TIMER_CALLBACK(process_snapshot_or_quickload)
|
||||
TIMER_CALLBACK_MEMBER(process_snapshot_or_quickload)
|
||||
-------------------------------------------------*/
|
||||
|
||||
static TIMER_CALLBACK(process_snapshot_or_quickload)
|
||||
{
|
||||
reinterpret_cast<snapshot_image_device *>(ptr)->timer_callback();
|
||||
}
|
||||
|
||||
void snapshot_image_device::timer_callback()
|
||||
TIMER_CALLBACK_MEMBER(snapshot_image_device::process_snapshot_or_quickload)
|
||||
{
|
||||
/* invoke the load */
|
||||
m_load(*this, filetype(), length());
|
||||
@ -76,7 +71,7 @@ void snapshot_image_device::timer_callback()
|
||||
void snapshot_image_device::device_start()
|
||||
{
|
||||
/* allocate a timer */
|
||||
m_timer = machine().scheduler().timer_alloc(FUNC(process_snapshot_or_quickload), (void *)this);
|
||||
m_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(snapshot_image_device::process_snapshot_or_quickload),this));
|
||||
}
|
||||
|
||||
/*-------------------------------------------------
|
||||
|
@ -35,7 +35,7 @@ public:
|
||||
virtual const char *file_extensions() const { return m_file_extensions; }
|
||||
virtual const option_guide *create_option_guide() const { return NULL; }
|
||||
|
||||
void timer_callback();
|
||||
TIMER_CALLBACK_MEMBER(process_snapshot_or_quickload);
|
||||
void set_handler(snapquick_load_delegate load, const char *ext, seconds_t sec) { m_load = load; m_file_extensions = ext; m_delay_seconds = sec; };
|
||||
void set_interface(const char *_interface) { m_interface = _interface; }
|
||||
protected:
|
||||
|
Loading…
Reference in New Issue
Block a user