diff --git a/src/emu/bus/isa/hdc.c b/src/emu/bus/isa/hdc.c index f2e59018cdc..59ff19d3432 100644 --- a/src/emu/bus/isa/hdc.c +++ b/src/emu/bus/isa/hdc.c @@ -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(timer_expired_delegate(FUNC(isa8_hdc_device::hdc_command),this)); + timer = timer_alloc(); } //------------------------------------------------- @@ -483,7 +483,7 @@ int isa8_hdc_device::test_ready() return 1; } -TIMER_CALLBACK_MEMBER(isa8_hdc_device::hdc_command) +void isa8_hdc_device::hdc_command() { int set_error_info = 1; int old_error = error; /* Previous error data is needed for CMD_SENSE */ @@ -585,6 +585,13 @@ TIMER_CALLBACK_MEMBER(isa8_hdc_device::hdc_command) if(no_dma()) pc_hdc_result(set_error_info); } + +void isa8_hdc_device::device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) +{ + hdc_command(); +} + + /* Command format * Bits Description * 7 0 diff --git a/src/emu/bus/isa/hdc.h b/src/emu/bus/isa/hdc.h index 6d211d3843f..0f9118dafa4 100644 --- a/src/emu/bus/isa/hdc.h +++ b/src/emu/bus/isa/hdc.h @@ -35,6 +35,7 @@ protected: // device-level overrides virtual void device_start(); virtual void device_reset(); + virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr); private: int drv; /* 0 master, 1 slave drive */ int cylinders[2]; /* number of cylinders */ @@ -84,8 +85,8 @@ protected: void get_drive(); void get_chsn(); int test_ready(); - 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);