Previous 199869 Revisions Next

r23673 Thursday 13th June, 2013 at 12:47:19 UTC by smf
moved the reset timer across (nw)
[src/emu/machine]idectrl.c idectrl.h idehd.c idehd.h

trunk/src/emu/machine/idectrl.c
r23672r23673
128128      set_irq(ASSERT_LINE);
129129      break;
130130
131   case TID_RESET_CALLBACK:
132      reset();
133      break;
134
135131   case TID_SECURITY_ERROR_DONE:
136132      /* clear error state */
137133      dev->status &= ~IDE_STATUS_ERROR;
r23672r23673
12661262         {
12671263            dev->status |= IDE_STATUS_BUSY;
12681264            dev->status &= ~IDE_STATUS_DRIVE_READY;
1269            reset_timer->adjust(attotime::from_msec(5));
1265            dev->reset_timer->adjust(attotime::from_msec(5));
12701266         }
12711267         break;
12721268   }
r23672r23673
13101306   slot[0] = subdevice<ide_slot_device>("0");
13111307   slot[1] = subdevice<ide_slot_device>("1");
13121308
1313   /* create a timer for timing status */
1314   reset_timer = timer_alloc(TID_RESET_CALLBACK);
1315
13161309   /* register ide states */
13171310   save_item(NAME(config_unknown));
13181311   save_item(NAME(config_register));
trunk/src/emu/machine/idectrl.h
r23672r23673
130130   UINT8           config_register[IDE_CONFIG_REGISTERS];
131131   UINT8           config_register_num;
132132
133   emu_timer *     reset_timer;
134
135133   UINT8           cur_drive;
136134   ide_slot_device *slot[2];
137135
trunk/src/emu/machine/idehd.c
r23672r23673
284284   save_item(NAME(dma_active));
285285   save_item(NAME(verify_only));
286286
287   /* create a timer for timing status */
287288   last_status_timer = timer_alloc(TID_NULL);
289   reset_timer = timer_alloc(TID_RESET_CALLBACK);
288290}
289291
290292//-------------------------------------------------
r23672r23673
330332   status = IDE_STATUS_DRIVE_READY | IDE_STATUS_SEEK_COMPLETE;
331333}
332334
335void ide_hdd_device::device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr)
336{
337   switch(id)
338   {
339   case TID_RESET_CALLBACK:
340      reset();
341      break;
342   }
343}
344
333345//-------------------------------------------------
334346//  read device key
335347//-------------------------------------------------
trunk/src/emu/machine/idehd.h
r23672r23673
6868   UINT8           gnetreadlock;
6969
7070   emu_timer *     last_status_timer;
71   emu_timer *     reset_timer;
7172
7273protected:
7374   UINT8           m_features[IDE_DISK_SECTOR_SIZE];
r23672r23673
9394   // device-level overrides
9495   virtual void device_start();
9596   virtual void device_reset();
97   virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr);
9698
9799   // optional information overrides
98100   virtual machine_config_constructor device_mconfig_additions() const;

Previous 199869 Revisions Next


© 1997-2024 The MAME Team