Previous 15994 Revisions Next

r5748 Wednesday 16th September, 2009 at 18:59:10 UTC by Miodrag Milanović
[SVI318] Fixed floppy. Also some wd17xx and nec765 fixes.
[src/mess/drivers]svi318.c
[src/mess/machine]nec765.c svi318.c wd17xx.c

src/mess/machine/wd17xx.c
r5747r5748
397397   UINT8 step_counter;
398398   wd17xx_t *w = get_safe_token(device);
399399
400   if (w->current_drive >= 1)
400   if (w->current_drive >= floppy_get_count(device->machine))
401401      return;
402402
403403   step_counter = 255;
r5747r5748
17351735
17361736   for (i = 0; i < 4; i++)
17371737   {
1738      const device_config *img = devtag_get_device(device->machine,w->intf->floppy_drive_tags[w->current_drive]);
1739      if (img!=NULL) {
1740         floppy_drive_set_controller(img,device);
1741         floppy_drive_set_index_pulse_callback(img, wd17xx_index_pulse_callback);
1742         floppy_drive_set_rpm( img, 300.);
1738      if(w->intf->floppy_drive_tags[i]!=NULL) {
1739         const device_config *img = devtag_get_device(device->machine,w->intf->floppy_drive_tags[i]);
1740         if (img!=NULL) {
1741            floppy_drive_set_controller(img,device);
1742            floppy_drive_set_index_pulse_callback(img, wd17xx_index_pulse_callback);
1743            floppy_drive_set_rpm( img, 300.);
1744         }
17431745      }
17441746   }
17451747
src/mess/machine/svi318.c
r5747r5748
611611   int id = floppy_get_drive(image);
612612
613613   size = image_length (image);
614
615614   switch (size)
616615   {
617616   case 172032:   /* SVI-328 SSDD */
src/mess/machine/nec765.c
r5747r5748
22012201      are checked or only the drive selected with the drive select bits?? */
22022202
22032203      a_drive_is_ready = 0;
2204      for (i = 0; i < 2; i++)
2204      for (i = 0; i < 4; i++)
22052205      {
2206         if (fdc->intf->floppy_drive_tags[i]!=NULL) {
2207            if(devtag_get_device(device->machine,fdc->intf->floppy_drive_tags[i])) {
2206         if (fdc->intf->floppy_drive_tags[i]!=NULL) {           
2207            if (image_exists(devtag_get_device(device->machine,fdc->intf->floppy_drive_tags[i]))) {
22082208               a_drive_is_ready = 1;
22092209               break;
22102210            }
r5747r5748
23222322{
23232323   int i;
23242324   nec765_t *fdc = get_safe_token(device);
2325   for (i = 0; i < 2; i++) {
2325   for (i = 0; i < 4; i++) {
23262326      if (fdc->intf->floppy_drive_tags[i]!=NULL) {
23272327         const device_config *img = devtag_get_device(device->machine,fdc->intf->floppy_drive_tags[i]);
23282328         floppy_drive_set_controller(img, device);
src/mess/drivers/svi318.c
r5747r5748
271271   CASSETTE_PLAY
272272};
273273
274static const floppy_config svi318_floppy_config =
275{
276   FLOPPY_DRIVE_DS_80,
277   FLOPPY_OPTIONS_NAME(svi318)
278};
279
274280static MACHINE_DRIVER_START( svi318_cartslot )
275281   MDRV_CARTSLOT_ADD("cart")
276282   MDRV_CARTSLOT_EXTENSION_LIST("rom")
r5747r5748
318324   MDRV_CASSETTE_ADD( "cassette", svi318_cassette_config )
319325
320326   MDRV_WD179X_ADD("wd179x", svi_wd17xx_interface )
327   
328   MDRV_FLOPPY_2_DRIVES_ADD(svi318_floppy_config)
321329
322330   MDRV_IMPORT_FROM( svi318_cartslot )
323331MACHINE_DRIVER_END
r5747r5748
346354   NULL
347355};
348356
349static const floppy_config svi318_floppy_config =
350{
351   FLOPPY_DRIVE_DS_80,
352   FLOPPY_OPTIONS_NAME(svi318)
353};
354
355357static MACHINE_DRIVER_START( svi328_806 )
356358   /* Basic machine hardware */
357359   MDRV_CPU_ADD( "maincpu", Z80, 3579545 )   /* 3.579545 MHz */

Previous 15994 Revisions Next


© 1998-2018 The MESS Team