OSDN Git Service

[VM][General] Merge upstream 2016-03-01. (Pahse 1).
[csp-qt/common_source_project-fm7.git] / source / src / vm / mz2800 / floppy.cpp
1 /*
2         SHARP MZ-2800 Emulator 'EmuZ-2800'
3
4         Author : Takeda.Toshiya
5         Date   : 2007.08.13 -
6
7         [ floppy ]
8 */
9
10 #include "floppy.h"
11 #include "../mb8877.h"
12
13 void FLOPPY::write_io8(uint32_t addr, uint32_t data)
14 {
15         switch(addr & 0x7fff) {
16         case 0xdc:
17                 // drive reg
18                 d_fdc->write_signal(SIG_MB8877_DRIVEREG, data, 3);
19                 d_fdc->write_signal(SIG_MB8877_MOTOR, data, 0x80);
20                 break;
21         case 0xdd:
22                 // side reg
23                 d_fdc->write_signal(SIG_MB8877_SIDEREG, data, 1);
24                 break;
25         }
26 }
27