Previous 199869 Revisions Next

r23672 Thursday 13th June, 2013 at 12:35:02 UTC by smf
moved the status timer across (nw)
[src/emu/machine]idectrl.c idectrl.h idehd.c idehd.h

trunk/src/emu/machine/idectrl.c
r23671r23672
10061006      /* return the current status and clear any pending interrupts */
10071007      case IDE_BANK0_STATUS_COMMAND:
10081008         result = dev->status;
1009         if (last_status_timer->elapsed() > TIME_PER_ROTATION)
1009         if (dev->last_status_timer->elapsed() > TIME_PER_ROTATION)
10101010         {
10111011            result |= IDE_STATUS_HIT_INDEX;
1012            last_status_timer->adjust(attotime::never);
1012            dev->last_status_timer->adjust(attotime::never);
10131013         }
10141014         if (dev->interrupt_pending == ASSERT_LINE)
10151015            set_irq(CLEAR_LINE);
r23671r23672
10671067   {
10681068      case IDE_BANK1_STATUS_CONTROL:
10691069         result = dev->status;
1070         if (last_status_timer->elapsed() > TIME_PER_ROTATION)
1070         if (dev->last_status_timer->elapsed() > TIME_PER_ROTATION)
10711071         {
10721072            result |= IDE_STATUS_HIT_INDEX;
1073            last_status_timer->adjust(attotime::never);
1073            dev->last_status_timer->adjust(attotime::never);
10741074         }
10751075         break;
10761076
r23671r23672
13111311   slot[1] = subdevice<ide_slot_device>("1");
13121312
13131313   /* create a timer for timing status */
1314   last_status_timer = timer_alloc(TID_NULL);
13151314   reset_timer = timer_alloc(TID_RESET_CALLBACK);
13161315
13171316   /* register ide states */
trunk/src/emu/machine/idectrl.h
r23671r23672
130130   UINT8           config_register[IDE_CONFIG_REGISTERS];
131131   UINT8           config_register_num;
132132
133   emu_timer *     last_status_timer;
134133   emu_timer *     reset_timer;
135134
136135   UINT8           cur_drive;
trunk/src/emu/machine/idehd.c
r23671r23672
22
33#define PRINTF_IDE_COMMANDS         0
44
5enum
6{
7   TID_NULL,
8   TID_DELAYED_INTERRUPT,
9   TID_DELAYED_INTERRUPT_BUFFER_READY,
10   TID_RESET_CALLBACK,
11   TID_SECURITY_ERROR_DONE,
12   TID_READ_SECTOR_DONE_CALLBACK,
13   TID_WRITE_SECTOR_DONE_CALLBACK
14};
15
516//**************************************************************************
617//  IDE DEVICE INTERFACE
718//**************************************************************************
r23671r23672
272283
273284   save_item(NAME(dma_active));
274285   save_item(NAME(verify_only));
286
287   last_status_timer = timer_alloc(TID_NULL);
275288}
276289
277290//-------------------------------------------------
trunk/src/emu/machine/idehd.h
r23671r23672
6767
6868   UINT8           gnetreadlock;
6969
70   emu_timer *     last_status_timer;
71
7072protected:
7173   UINT8           m_features[IDE_DISK_SECTOR_SIZE];
7274   UINT16          m_num_cylinders;

Previous 199869 Revisions Next


© 1997-2024 The MAME Team