Previous 199869 Revisions Next

r17439 Friday 24th August, 2012 at 10:35:45 UTC by smf
a little tidy up while working on other files (nw)
[src/emu/machine]ncr539x.c ncr539x.h wd33c93.c
[src/mess/machine]fm_scsi.c mb89352.c ncr5380.c ncr5380.h scsibus.c

trunk/src/emu/machine/wd33c93.c
r17438r17439
781781
782782void wd33c93_init( running_machine &machine, const struct WD33C93interface *interface )
783783{
784   int i;
785
786784   // save interface pointer for later
787785   intf = interface;
788786
r17438r17439
790788   memset(devices, 0, sizeof(devices));
791789
792790   // try to open the devices
793   for (i = 0; i < interface->scsidevs->devs_present; i++)
791   for (int i = 0; i < interface->scsidevs->devs_present; i++)
794792   {
795793      scsidev_device *device = machine.device<scsidev_device>( interface->scsidevs->devices[i].tag );
796794      devices[device->GetDeviceID()] = device;
trunk/src/emu/machine/ncr539x.c
r17438r17439
149149
150150void ncr539x_device::device_start()
151151{
152   int i;
153
154152   memset(m_scsi_devices, 0, sizeof(m_scsi_devices));
155153
156154   // resolve line callbacks
r17438r17439
158156   m_out_drq_func.resolve(m_out_drq_cb, *this);
159157
160158   // try to open the devices
161   for (i = 0; i < scsidevs->devs_present; i++)
159   for (int i = 0; i < scsidevs->devs_present; i++)
162160   {
163161      scsidev_device *device = machine().device<scsidev_device>( scsidevs->devices[i].tag );
164162      m_scsi_devices[device->GetDeviceID()] = device;
r17438r17439
192190   m_out_irq_func(CLEAR_LINE);
193191   m_out_drq_func(CLEAR_LINE);
194192
195   scan_devices();
193   // try to open the devices
194   for (int i = 0; i < scsidevs->devs_present; i++)
195   {
196      scsidev_device *device = machine().device<scsidev_device>( scsidevs->devices[i].tag );
197      m_scsi_devices[device->GetDeviceID()] = device;
198   }
196199}
197200
198201void ncr539x_device::dma_read_data(int bytes, UINT8 *pData)
r17438r17439
225228   }
226229}
227230
228void ncr539x_device::scan_devices()
229{
230   int i;
231
232   // try to open the devices
233   for (i = 0; i < scsidevs->devs_present; i++)
234   {
235      scsidev_device *device = machine().device<scsidev_device>( scsidevs->devices[i].tag );
236      m_scsi_devices[device->GetDeviceID()] = device;
237   }
238}
239
240231void ncr539x_device::device_timer(emu_timer &timer, device_timer_id tid, int param, void *ptr)
241232{
242233   //printf("539X: device_timer expired, param = %d, m_command = %02x\n", param, m_command);
trunk/src/emu/machine/ncr539x.h
r17438r17439
4040   void dma_read_data(int bytes, UINT8 *pData);
4141   void dma_write_data(int bytes, UINT8 *pData);
4242
43   void *get_scsi_device(int id);
44
45   void scan_devices();
4643protected:
4744   // device-level overrides
4845   virtual void device_start();
trunk/src/mess/machine/scsibus.c
r17438r17439
942942{
943943    scsibus_t               *bus = get_token(device);
944944    const SCSIConfigTable   *scsidevs = bus->interface->scsidevs;
945   int                     devno;
946945
947946    // try to open the devices
948    for (devno = 0; devno < scsidevs->devs_present; devno++)
947    for (int devno = 0; devno < scsidevs->devs_present; devno++)
949948    {
950949        LOG(1,"SCSIBUS:init devno=%d \n",devno);
951950      scsidev_device *scsidev = device->machine().device<scsidev_device>( scsidevs->devices[devno].tag );
trunk/src/mess/machine/fm_scsi.c
r17438r17439
6060
6161void fmscsi_device::device_start()
6262{
63   int x;
64
6563    m_input_lines = 0;
6664    m_output_lines = 0;
6765    m_data = 0;
r17438r17439
7674    memset(m_SCSIdevices,0,sizeof(m_SCSIdevices));
7775
7876    // initialise SCSI devices, if any present
79    for(x=0;x<scsidevs->devs_present;x++)
77    for(int x=0;x<scsidevs->devs_present;x++)
8078    {
8179      scsidev_device *device = machine().device<scsidev_device>( scsidevs->devices[x].tag );
8280      m_SCSIdevices[device->GetDeviceID()] = device;
trunk/src/mess/machine/ncr5380.c
r17438r17439
122122   save_item(NAME(m_d_limit));
123123   save_item(NAME(m_next_req_flag));
124124
125   int i;
126
127125   // try to open the devices
128   for (i = 0; i < scsidevs->devs_present; i++)
126   for (int i = 0; i < scsidevs->devs_present; i++)
129127   {
130128      scsidev_device *device = machine().device<scsidev_device>( scsidevs->devices[i].tag );
131129      m_scsi_devices[device->GetDeviceID()] = device;
trunk/src/mess/machine/ncr5380.h
r17438r17439
5656   void ncr5380_read_data(int bytes, UINT8 *pData);
5757   void ncr5380_write_data(int bytes, UINT8 *pData);
5858
59   void *ncr5380_get_scsi_device(int id);
6059protected:
6160   // device-level overrides
6261   virtual void device_start();
trunk/src/mess/machine/mb89352.c
r17438r17439
137137
138138void mb89352_device::device_start()
139139{
140   int i;
141
142140   m_phase = SCSI_PHASE_BUS_FREE;
143141    m_target = 0;
144142    m_command_index = 0;
r17438r17439
158156    m_transfer_timer = timer_alloc(TIMER_TRANSFER);
159157
160158   // try to open the devices
161   for (i = 0; i < scsidevs->devs_present; i++)
159   for (int i = 0; i < scsidevs->devs_present; i++)
162160   {
163161      scsidev_device *device = machine().device<scsidev_device>( scsidevs->devices[i].tag );
164162      m_SCSIdevices[device->GetDeviceID()] = device;

Previous 199869 Revisions Next


© 1997-2024 The MAME Team