OSDN Git Service

[VM][MYCOMZ80A][MULTI8] Apply new state framework to VMs.
[csp-qt/common_source_project-fm7.git] / source / src / vm / multi8 / floppy.h
1 /*
2         MITSUBISHI Electric MULTI8 Emulator 'EmuLTI8'
3
4         Author : Takeda.Toshiya
5         Date   : 2006.09.17 -
6
7         [ floppy ]
8 */
9
10 #ifndef _FLOPPY_H_
11 #define _FLOPPY_H_
12
13 #include "../vm.h"
14 #include "../../emu.h"
15 #include "../device.h"
16
17 #define SIG_FLOPPY_DRQ  0
18
19 class FLOPPY : public DEVICE
20 {
21 private:
22         DEVICE *d_fdc;
23         bool drq;
24         
25 public:
26         FLOPPY(VM* parent_vm, EMU* parent_emu) : DEVICE(parent_vm, parent_emu)
27         {
28                 set_device_name(_T("Floppy I/F"));
29         }
30         ~FLOPPY() {}
31         
32         // common functions
33         void write_io8(uint32_t addr, uint32_t data);
34         uint32_t read_io8(uint32_t addr);
35         void write_signal(int id, uint32_t data, uint32_t mask);
36         void decl_state();
37         void save_state(FILEIO* state_fio);
38         bool load_state(FILEIO* state_fio);
39         
40         // unique function
41         void set_context_fdc(DEVICE* device)
42         {
43                 d_fdc = device;
44         }
45 };
46
47 #endif
48