OSDN Git Service

[VM][STATE] Use namespace {VMNAME} to separate per VMs.
[csp-qt/common_source_project-fm7.git] / source / src / vm / pc9801 / fmsound.h
1 /*
2         NEC PC-9801 Emulator 'ePC-9801'
3         NEC PC-9801E/F/M Emulator 'ePC-9801E'
4         NEC PC-9801U Emulator 'ePC-9801U'
5         NEC PC-9801VF Emulator 'ePC-9801VF'
6         NEC PC-9801VM Emulator 'ePC-9801VM'
7         NEC PC-9801VX Emulator 'ePC-9801VX'
8         NEC PC-9801RA Emulator 'ePC-9801RA'
9         NEC PC-98XA Emulator 'ePC-98XA'
10         NEC PC-98XL Emulator 'ePC-98XL'
11         NEC PC-98RL Emulator 'ePC-98RL'
12         NEC PC-98DO Emulator 'ePC-98DO'
13
14         Author : Takeda.Toshiya
15         Date   : 2012.02.03-
16
17         [ PC-9801-26 ]
18 */
19
20 #ifndef _FMSOUND_H_
21 #define _FMSOUND_H_
22
23 #include "../vm.h"
24 #include "../../emu.h"
25 #include "../device.h"
26
27 namespace PC9801 {
28
29 class FMSOUND : public DEVICE
30 {
31 private:
32         DEVICE* d_opn;
33 #ifdef SUPPORT_PC98_OPNA
34         uint8_t mask;
35 #endif
36         
37 public:
38         FMSOUND(VM_TEMPLATE* parent_vm, EMU* parent_emu) : DEVICE(parent_vm, parent_emu)
39         {
40 #ifdef SUPPORT_PC98_OPNA
41                 set_device_name(_T("PC-9801-86 (FM Sound)"));
42 #else
43                 set_device_name(_T("PC-9801-26 (FM Sound)"));
44 #endif
45         }
46         ~FMSOUND() {}
47         
48         // common functions
49 #ifdef SUPPORT_PC98_OPNA
50         void reset();
51 #endif
52         void write_io8(uint32_t addr, uint32_t data);
53         uint32_t read_io8(uint32_t addr);
54 #ifdef SUPPORT_PC98_OPNA
55         bool process_state(FILEIO* state_fio, bool loading);
56 #endif
57         
58         // unique function
59         void set_context_opn(DEVICE* device)
60         {
61                 d_opn = device;
62         }
63 };
64
65 }
66 #endif
67