OSDN Git Service

[VM][WIP] Use namespace to devices per VMs.
[csp-qt/common_source_project-fm7.git] / source / src / vm / mz2500 / floppy.h
1 /*
2         SHARP MZ-80B Emulator 'EmuZ-80B'
3         SHARP MZ-2200 Emulator 'EmuZ-2200'
4         SHARP MZ-2500 Emulator 'EmuZ-2500'
5
6         Author : Takeda.Toshiya
7         Date   : 2006.12.04 -
8
9         [ floppy ]
10 */
11
12 #ifndef _FLOPPY_H_
13 #define _FLOPPY_H_
14
15 #include "../vm.h"
16 #include "../../emu.h"
17 #include "../device.h"
18
19 #define SIG_FLOPPY_REVERSE      0
20
21 namespace MZ2500 {
22
23 class FLOPPY : public DEVICE
24 {
25 private:
26         DEVICE* d_fdc;
27 #ifdef _MZ2500
28         bool reversed;
29 #endif
30         
31 public:
32         FLOPPY(VM_TEMPLATE* parent_vm, EMU* parent_emu) : DEVICE(parent_vm, parent_emu)
33         {
34                 set_device_name(_T("Floppy I/F"));
35         }
36         ~FLOPPY() {}
37         
38         // common functions
39 #ifdef _MZ2500
40         void initialize();
41 #endif
42         void write_io8(uint32_t addr, uint32_t data);
43 #ifdef _MZ2500
44         void write_signal(int id, uint32_t data, uint32_t mask);
45         bool process_state(FILEIO* state_fio, bool loading);
46 #endif
47         
48         // unique functions
49         void set_context_fdc(DEVICE* device)
50         {
51                 d_fdc = device;
52         }
53 };
54
55 }
56 #endif
57