2 FUJITSU FMR-50 Emulator 'eFMR-50'
3 FUJITSU FMR-60 Emulator 'eFMR-60'
5 Author : Takeda.Toshiya
13 #include "../mb8877.h"
15 void FLOPPY::initialize()
19 changed[0] = changed[1] = changed[2] = changed[3] = false;
22 void FLOPPY::write_io8(uint32 addr, uint32 data)
26 switch(addr & 0xffff) {
28 // drive control register
29 irqmsk = ((data & 1) != 0);
31 d_fdc->write_signal(SIG_MB8877_MOTOR, data, 0x10);
32 d_fdc->write_signal(SIG_MB8877_SIDEREG, data, 4);
35 // drive select register
45 if(drvsel != nextdrv) {
46 d_fdc->write_signal(SIG_MB8877_DRIVEREG, drvsel = nextdrv, 3);
53 uint32 FLOPPY::read_io8(uint32 addr)
55 switch(addr & 0xffff) {
58 changed[drvsel] = false;
59 return d_fdc->fdc_status() | 0xe1; // fdd*2
61 // return d_fdc->fdc_status() | 0x60; // fdd*1
62 return d_fdc->fdc_status() | 0xe0; // fdd*2
69 void FLOPPY::write_signal(int id, uint32 data, uint32 mask)
71 if(id == SIG_FLOPPY_IRQ) {
72 irq = ((data & mask) != 0);
77 void FLOPPY::update_intr()
79 d_pic->write_signal(SIG_I8259_CHIP0 | SIG_I8259_IR6, irq && irqmsk ? 1 : 0, 1);