OSDN Git Service

[VM][FM7][FM77AV] Set sub clock.
[csp-qt/common_source_project-fm7.git] / source / src / vm / pc98ha / floppy.h
1 /*
2         NEC PC-98LT Emulator 'ePC-98LT'
3         NEC PC-98HA Emulator 'eHANDY98'
4
5         Author : Takeda.Toshiya
6         Date   : 2008.06.11 -
7
8         [ floppy ]
9 */
10
11 #ifndef _FLOPPY_H_
12 #define _FLOPPY_H_
13
14 #include "../vm.h"
15 #include "../../emu.h"
16 #include "../device.h"
17
18 #define SIG_FLOPPY_DRQ  0
19
20 class UPD765A;
21
22 class FLOPPY : public DEVICE
23 {
24 private:
25         UPD765A *d_fdc;
26         
27         uint8 ctrlreg, modereg;
28         
29 public:
30         FLOPPY(VM* parent_vm, EMU* parent_emu) : DEVICE(parent_vm, parent_emu) {}
31         ~FLOPPY() {}
32         // common functions
33         void reset();
34         void write_io8(uint32 addr, uint32 data);
35         uint32 read_io8(uint32 addr);
36         void save_state(FILEIO* state_fio);
37         bool load_state(FILEIO* state_fio);
38         
39         // unique function
40         void set_context_fdc(UPD765A* device)
41         {
42                 d_fdc = device;
43         }
44 };
45
46 #endif
47