From 389625a63cac3d250b53f6c1007da11da9f7c96c Mon Sep 17 00:00:00 2001 From: smf- Date: Wed, 29 Aug 2012 08:35:35 +0000 Subject: Removed SCSIConfigTable, SCSI devices are now linked using SCSIBUS from MESS. (nw) --- src/mess/machine/fm_scsi.c | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'src/mess/machine/fm_scsi.c') 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;xdevs_present;x++) - { - scsidev_device *device = owner()->subdevice( 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(device); + if( scsidev != NULL ) + { + m_SCSIdevices[scsidev->GetDeviceID()] = scsidev; + } + } // allocate read timer m_transfer_timer = timer_alloc(TIMER_TRANSFER); -- cgit v1.2.3-70-g09d2