OSDN Git Service

[VM][STATE] Use namespace {VMNAME} to separate per VMs.
[csp-qt/common_source_project-fm7.git] / source / src / vm / pc98ha / note.h
1 /*
2         NEC PC-98LT Emulator 'ePC-98LT'
3         NEC PC-98HA Emulator 'eHANDY98'
4
5         Author : Takeda.Toshiya
6         Date   : 2008.08.14 -
7
8         [ note i/o ]
9 */
10
11 #ifndef _NOTE_H_
12 #define _NOTE_H_
13
14 #include "../vm.h"
15 #include "../../emu.h"
16 #include "../device.h"
17
18 namespace PC98HA {
19
20 class NOTE : public DEVICE
21 {
22 private:
23         DEVICE *d_pic;
24         uint8_t ch, regs[16];
25         
26 public:
27         NOTE(VM_TEMPLATE* parent_vm, EMU* parent_emu) : DEVICE(parent_vm, parent_emu)
28         {
29                 set_device_name(_T("98NOTE I/O"));
30         }
31         ~NOTE() {}
32         
33         // common functions
34         void initialize();
35         void write_io8(uint32_t addr, uint32_t data);
36         uint32_t read_io8(uint32_t addr);
37         bool process_state(FILEIO* state_fio, bool loading);
38         
39         // unique function
40         void set_context_pic(DEVICE* device)
41         {
42                 d_pic = device;
43         }
44 };
45
46 }
47 #endif
48