OSDN Git Service

[General] Convert sourcecode's CRLF format: DOS(WINDOWS) to Unix, to apply patches...
[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 class FLOPPY : public DEVICE
20 {
21 private:
22         DEVICE *d_fdc, *d_dma;
23         
24         uint8 chgreg, ctrlreg;
25         
26 public:
27         FLOPPY(VM* parent_vm, EMU* parent_emu) : DEVICE(parent_vm, parent_emu) {}
28         ~FLOPPY() {}
29         
30         // common functions
31         void reset();
32         void write_io8(uint32 addr, uint32 data);
33         uint32 read_io8(uint32 addr);
34         void write_signal(int id, uint32 data, uint32 mask);
35         
36         // unique functions
37         void set_context_fdc(DEVICE* device)
38         {
39                 d_fdc = device;
40         }
41         void set_context_dma(DEVICE* device)
42         {
43                 d_dma = device;
44         }
45 };
46
47 #endif
48