OSDN Git Service

f2aff1c162153e4e017a9a1ea11739c3e5d63c8c
[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 class FMSOUND : public DEVICE
28 {
29 private:
30         DEVICE* d_opn;
31 #ifdef SUPPORT_PC98_OPNA
32         uint8_t mask;
33 #endif
34         
35 public:
36         FMSOUND(VM_TEMPLATE* parent_vm, EMU* parent_emu) : DEVICE(parent_vm, parent_emu)
37         {
38 #ifdef SUPPORT_PC98_OPNA
39                 set_device_name(_T("PC-9801-86 (FM Sound)"));
40 #else
41                 set_device_name(_T("PC-9801-26 (FM Sound)"));
42 #endif
43         }
44         ~FMSOUND() {}
45         
46         // common functions
47 #ifdef SUPPORT_PC98_OPNA
48         void reset();
49 #endif
50         void write_io8(uint32_t addr, uint32_t data);
51         uint32_t read_io8(uint32_t addr);
52 #ifdef SUPPORT_PC98_OPNA
53         bool process_state(FILEIO* state_fio, bool loading);
54 #endif
55         
56         // unique function
57         void set_context_opn(DEVICE* device)
58         {
59                 d_opn = device;
60         }
61 };
62
63 #endif
64