src/mess/drivers/x68k.c
| r3163 | r3164 | |
| 634 | 634 | if(sys.mouse.bufferempty != 0) // nothing to do if the mouse data buffer is empty |
| 635 | 635 | return; |
| 636 | 636 | |
| 637 | | if((sys.ioc.irqstatus & 0xc0) != 0) |
| 638 | | return; |
| 637 | // if((sys.ioc.irqstatus & 0xc0) != 0) |
| 638 | // return; |
| 639 | 639 | |
| 640 | 640 | // hard-code the IRQ vector for now, until the SCC code is more complete |
| 641 | 641 | if((scc_get_reg_a(scc, 9) & 0x08) || (scc_get_reg_b(scc, 9) & 0x08)) // SCC reg WR9 is the same for both channels |
| r3163 | r3164 | |
| 746 | 746 | floppy_drive_set_motor_state(image_from_devtype_and_index(IO_FLOPPY, data & 0x03), (data & 0x80)); |
| 747 | 747 | if(data & 0x80) |
| 748 | 748 | { |
| 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 |
| 750 | 750 | { |
| 751 | 751 | if(drive == (data & 0x03)) |
| 752 | { |
| 752 | 753 | floppy_drive_set_motor_state(image_from_devtype_and_index(IO_FLOPPY, drive), 1); |
| 754 | output_set_indexed_value("access_drv",drive,0); |
| 755 | } |
| 753 | 756 | 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); |
| 755 | 758 | } |
| 756 | 759 | } |
| 757 | 760 | else // BIOS code suggests that setting bit 7 of this port to 0 disables the motor of all floppy drives |
| r3163 | r3164 | |
| 763 | 766 | floppy_drive_set_ready_state(image_from_devtype_and_index(IO_FLOPPY, 1),1,1); |
| 764 | 767 | floppy_drive_set_ready_state(image_from_devtype_and_index(IO_FLOPPY, 2),1,1); |
| 765 | 768 | 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 | // } |
| 773 | 776 | logerror("FDC: Drive #%i: Drive selection set to %02x\n",data & 0x03,data); |
| 774 | 777 | break; |
| 775 | 778 | default: |