Previous 15994 Revisions Next

r9692 Tuesday 30th November, 2010 at 00:16:12 UTC by R. Belmont
[SONYDRIV] Don't crash if tach read with no disk inserted.
[src/mess/devices]sonydriv.c

src/mess/devices/sonydriv.c
r9691r9692
330330         break;
331331      case 0x0e:   /* Tachometer */
332332         /* (time in seconds) / (60 sec/minute) * (rounds/minute) * (60 pulses) * (2 pulse phases) */
333         result = ((int) (attotime_to_double(timer_get_time(device->machine)) / 60.0 * sony_rpm(f, &cur_image->device()) * 60.0 * 2.0)) & 1;
333         if (cur_image)
334         {
335            result = ((int) (attotime_to_double(timer_get_time(device->machine)) / 60.0 * sony_rpm(f, &cur_image->device()) * 60.0 * 2.0)) & 1;
336         }
334337         break;
335338      case 0x0f:   /* 400k/800k: Drive installed: 0=drive connected, 1=drive not connected */
336339            /* FDHD: Inserted disk density: 0=HD, 1=DD */

Previous 15994 Revisions Next


© 1998-2018 The MESS Team