OSDN Git Service

[VM][General] Merge upstream 2016-03-01. (Pahse 1).
[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_t ctrlreg, modereg;
28         
29 public:
30         FLOPPY(VM* parent_vm, EMU* parent_emu) : DEVICE(parent_vm, parent_emu) {}
31         ~FLOPPY() {}
32         
33         // common functions
34         void reset();
35         void write_io8(uint32_t addr, uint32_t data);
36         uint32_t read_io8(uint32_t addr);
37         void save_state(FILEIO* state_fio);
38         bool load_state(FILEIO* state_fio);
39         
40         // unique function
41         void set_context_fdc(UPD765A* device)
42         {
43                 d_fdc = device;
44         }
45 };
46
47 #endif
48