OSDN Git Service

[VM][STATE] Use namespace {VMNAME} to separate per VMs.
[csp-qt/common_source_project-fm7.git] / source / src / vm / pc98ha / floppy.h
1 /*
2         NEC PC-98LT Emulator 'ePC-98LT'
3         NEC PC-98HA Emulator 'eHANDY98'
4
5         Author : Takeda.Toshiya
6         Date   : 2008.06.11 -
7
8         [ floppy ]
9 */
10
11 #ifndef _FLOPPY_H_
12 #define _FLOPPY_H_
13
14 #include "../vm.h"
15 #include "../../emu.h"
16 #include "../device.h"
17
18 #define SIG_FLOPPY_DRQ  0
19
20 class UPD765A;
21
22 namespace PC98HA {
23
24 class FLOPPY : public DEVICE
25 {
26 private:
27         UPD765A *d_fdc;
28         
29         uint8_t ctrlreg, modereg;
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         void reset();
40         void write_io8(uint32_t addr, uint32_t data);
41         uint32_t read_io8(uint32_t addr);
42         bool process_state(FILEIO* state_fio, bool loading);
43         
44         // unique function
45         void set_context_fdc(UPD765A* device)
46         {
47                 d_fdc = device;
48         }
49 };
50
51 }
52 #endif
53