OSDN Git Service

[General] Tracking to upstream, rev 2015-01-14.
[csp-qt/common_source_project-fm7.git] / source / src / vm / pv1000 / psg.h
1 /*\r
2         CASIO PV-1000 Emulator 'ePV-1000'\r
3 \r
4         Author : Takeda.Toshiya\r
5         Date   : 2006.11.16 -\r
6 \r
7         [ psg ]\r
8 */\r
9 \r
10 #ifndef _PSG_H_\r
11 #define _PSG_H_\r
12 \r
13 #include "../vm.h"\r
14 #include "../../emu.h"\r
15 #include "../device.h"\r
16 \r
17 class PSG : public DEVICE\r
18 {\r
19 private:\r
20         struct {\r
21                 int count;\r
22                 int period;\r
23                 bool signal;\r
24         } ch[3];\r
25         int diff;\r
26         \r
27 public:\r
28         PSG(VM* parent_vm, EMU* parent_emu) : DEVICE(parent_vm, parent_emu) {}\r
29         ~PSG() {}\r
30         \r
31         // common functions\r
32         void reset();\r
33         void write_io8(uint32 addr, uint32 data);\r
34         void mix(int32* buffer, int cnt);\r
35         void save_state(FILEIO* state_fio);\r
36         bool load_state(FILEIO* state_fio);\r
37         \r
38         // unique function\r
39         void init(int rate);\r
40 };\r
41 \r
42 #endif\r
43 \r