diff options
author | 2012-08-29 08:35:35 +0000 | |
---|---|---|
committer | 2012-08-29 08:35:35 +0000 | |
commit | 389625a63cac3d250b53f6c1007da11da9f7c96c (patch) | |
tree | 76a5677c19af74a775d9a34dfb2558bd43f6212c /src/mess/machine/fm_scsi.c | |
parent | 9b81dbdcc31c5b4e48853f9b1bd0c580bafa7dc3 (diff) |
Removed SCSIConfigTable, SCSI devices are now linked using SCSIBUS from MESS. (nw)
Diffstat (limited to 'src/mess/machine/fm_scsi.c')
-rw-r--r-- | src/mess/machine/fm_scsi.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/src/mess/machine/fm_scsi.c b/src/mess/machine/fm_scsi.c index 7e771c3d536..2f691cc9d90 100644 --- a/src/mess/machine/fm_scsi.c +++ b/src/mess/machine/fm_scsi.c @@ -43,7 +43,6 @@ void fmscsi_device::device_config_complete() // otherwise, initialize it to defaults else { - scsidevs = NULL; memset(&irq_callback,0,sizeof(irq_callback)); memset(&drq_callback,0,sizeof(drq_callback)); } @@ -73,12 +72,15 @@ void fmscsi_device::device_start() memset(m_SCSIdevices,0,sizeof(m_SCSIdevices)); - // initialise SCSI devices, if any present - for(int x=0;x<scsidevs->devs_present;x++) - { - scsidev_device *device = owner()->subdevice<scsidev_device>( scsidevs->devices[x].tag ); - m_SCSIdevices[device->GetDeviceID()] = device; - } + // try to open the devices + for( device_t *device = owner()->first_subdevice(); device != NULL; device = device->next() ) + { + scsidev_device *scsidev = dynamic_cast<scsidev_device *>(device); + if( scsidev != NULL ) + { + m_SCSIdevices[scsidev->GetDeviceID()] = scsidev; + } + } // allocate read timer m_transfer_timer = timer_alloc(TIMER_TRANSFER); |