Previous 15994 Revisions Next

r6209 Wednesday 28th October, 2009 at 22:10:38 UTC by R. Belmont
SCSIHD: fix crashes for drive slots that have no disk.
[src/emu/machine]scsihd.c

src/emu/machine/scsihd.c
r6208r6209
116116   SCSIHd *our_this = (SCSIHd *)SCSIThis( &SCSIClassHARDDISK, scsiInstance );
117117   SCSIGetCommand( scsiInstance, &command, &commandLength );
118118
119   // if we're a drive without a disk, return all zeroes
120   if (!our_this->disk)
121   {
122      memset(data, 0, dataLength);
123      return;
124   }
125
119126   switch ( command[0] )
120127   {
121128      case 0x03:   // REQUEST SENSE
r6208r6209
207214   SCSIHd *our_this = (SCSIHd *)SCSIThis( &SCSIClassHARDDISK, scsiInstance );
208215   SCSIGetCommand( scsiInstance, &command, &commandLength );
209216
217   if (!our_this->disk)
218   {
219      return;
220   }
221
210222   switch ( command[0] )
211223   {
212224      case 0x0a: // WRITE(6)

Previous 15994 Revisions Next


© 1998-2018 The MESS Team