OSDN Git Service

[VM][STATE] Use namespace {VMNAME} to separate per VMs.
[csp-qt/common_source_project-fm7.git] / source / src / vm / n5200 / floppy.h
1 /*
2         NEC N5200 Emulator 'eN5200'
3
4         Author : Takeda.Toshiya
5         Date   : 2008.06.11 -
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 namespace N5200 {
20
21 class FLOPPY : public DEVICE
22 {
23 private:
24         DEVICE *d_fdc, *d_dma;
25         
26         uint8_t chgreg, ctrlreg;
27         
28 public:
29         FLOPPY(VM_TEMPLATE* parent_vm, EMU* parent_emu) : DEVICE(parent_vm, parent_emu)
30         {
31                 set_device_name(_T("Floppy I/F"));
32         }
33         ~FLOPPY() {}
34         
35         // common functions
36         void reset();
37         void write_io8(uint32_t addr, uint32_t data);
38         uint32_t read_io8(uint32_t addr);
39         void write_signal(int id, uint32_t data, uint32_t mask);
40         
41         // unique functions
42         void set_context_fdc(DEVICE* device)
43         {
44                 d_fdc = device;
45         }
46         void set_context_dma(DEVICE* device)
47         {
48                 d_dma = device;
49         }
50 };
51
52 }
53 #endif
54