here it is with device_timer(nw)

This commit is contained in:
Miodrag Milanovic 2014-03-22 11:16:03 +00:00
parent 48c2ab93c5
commit 2a0dc18fde
2 changed files with 11 additions and 3 deletions

View File

@ -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

View File

@ -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);