OSDN Git Service

[VM][STATE] Use namespace {VMNAME} to separate per VMs.
[csp-qt/common_source_project-fm7.git] / source / src / vm / pasopia7 / floppy.h
1 /*
2         TOSHIBA PASOPIA 7 Emulator 'EmuPIA7'
3
4         Author : Takeda.Toshiya
5         Date   : 2006.09.20 -
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_INTR 0
18
19 namespace PASOPIA7 {
20
21 class FLOPPY : public DEVICE
22 {
23 private:
24         DEVICE *d_fdc;
25         bool intr;
26         
27 public:
28         FLOPPY(VM_TEMPLATE* parent_vm, EMU* parent_emu) : DEVICE(parent_vm, parent_emu)
29         {
30                 set_device_name(_T("Floppy I/F"));
31         }
32         ~FLOPPY() {}
33         
34         // common functions
35         void initialize();
36         void write_io8(uint32_t addr, uint32_t data);
37         uint32_t read_io8(uint32_t addr);
38         void write_signal(int id, uint32_t data, uint32_t mask);
39         bool process_state(FILEIO* state_fio, bool loading);
40         
41         // unique function
42         void set_context_fdc(DEVICE* device)
43         {
44                 d_fdc = device;
45         }
46 };
47
48 }
49 #endif
50