Previous 15994 Revisions Next

r3164 Thursday 4th September, 2008 at 08:57:13 UTC by Barry Rodewald
[X68000] Flipped V-DISP bit sent to MFP Timer A (improves Akumajyou Dracula stage 4), correct floppy motor state (fixes Parodius Da).
[src/mess/drivers]x68k.c
[src/mess/video]x68k.c

src/mess/video/x68k.c
r3163r3164
328328   }
329329
330330   if (x68k_mfp != NULL)
331   mc68901_tai_w(x68k_mfp, sys.crtc.vblank);
331   mc68901_tai_w(x68k_mfp, !sys.crtc.vblank);
332332}
333333
334334
src/mess/drivers/x68k.c
r3163r3164
634634   if(sys.mouse.bufferempty != 0)  // nothing to do if the mouse data buffer is empty
635635      return;
636636
637   if((sys.ioc.irqstatus & 0xc0) != 0)
638      return;
637//   if((sys.ioc.irqstatus & 0xc0) != 0)
638//      return;
639639
640640   // hard-code the IRQ vector for now, until the SCC code is more complete
641641   if((scc_get_reg_a(scc, 9) & 0x08) || (scc_get_reg_b(scc, 9) & 0x08))  // SCC reg WR9 is the same for both channels
r3163r3164
746746      floppy_drive_set_motor_state(image_from_devtype_and_index(IO_FLOPPY, data & 0x03), (data & 0x80));
747747      if(data & 0x80)
748748      {
749         for(drive=0;drive<4;drive++) // enable motor for this drive, disable all the others.
749         for(drive=0;drive<4;drive++) // enable motor for this drive
750750         {
751751            if(drive == (data & 0x03))
752            {
752753               floppy_drive_set_motor_state(image_from_devtype_and_index(IO_FLOPPY, drive), 1);
754               output_set_indexed_value("access_drv",drive,0);
755            }
753756            else
754               floppy_drive_set_motor_state(image_from_devtype_and_index(IO_FLOPPY, drive), 0);
757               output_set_indexed_value("access_drv",drive,1);
755758         }
756759      }
757760      else    // BIOS code suggests that setting bit 7 of this port to 0 disables the motor of all floppy drives
r3163r3164
763766      floppy_drive_set_ready_state(image_from_devtype_and_index(IO_FLOPPY, 1),1,1);
764767      floppy_drive_set_ready_state(image_from_devtype_and_index(IO_FLOPPY, 2),1,1);
765768      floppy_drive_set_ready_state(image_from_devtype_and_index(IO_FLOPPY, 3),1,1);
766      for(drive=0;drive<4;drive++)
767      {
768         if(floppy_drive_get_flag_state(image_from_devtype_and_index(IO_FLOPPY, drive),FLOPPY_DRIVE_MOTOR_ON))
769            output_set_indexed_value("access_drv",drive,0);
770         else
771            output_set_indexed_value("access_drv",drive,1);
772      }
769//      for(drive=0;drive<4;drive++)
770//      {
771//         if(floppy_drive_get_flag_state(image_from_devtype_and_index(IO_FLOPPY, drive),FLOPPY_DRIVE_MOTOR_ON))
772//            output_set_indexed_value("access_drv",drive,0);
773//         else
774//            output_set_indexed_value("access_drv",drive,1);
775//      }
773776      logerror("FDC: Drive #%i: Drive selection set to %02x\n",data & 0x03,data);
774777      break;
775778   default:

Previous 15994 Revisions Next


© 1998-2018 The MESS Team