ScummVM API documentation
sid.h
1 /* ScummVM - Graphic Adventure Engine
2  *
3  * ScummVM is the legal property of its developers, whose names
4  * are too numerous to list here. Please refer to the COPYRIGHT
5  * file distributed with this source distribution.
6  *
7  * This program is free software: you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License as published by
9  * the Free Software Foundation, either version 3 of the License, or
10  * (at your option) any later version.
11  *
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with this program. If not, see <http://www.gnu.org/licenses/>.
19  *
20  */
21 
22 #ifndef FREESCAPE_SID_H
23 #define FREESCAPE_SID_H
24 
25 #include "common/scummsys.h"
26 
27 namespace Freescape {
28 
29 // SID register offsets (matches C64 $D400-$D418)
30 enum SIDRegs {
31  kSIDV1FreqLo = 0x00,
32  kSIDV1FreqHi = 0x01,
33  kSIDV1PwLo = 0x02,
34  kSIDV1PwHi = 0x03,
35  kSIDV1Ctrl = 0x04,
36  kSIDV1AD = 0x05,
37  kSIDV1SR = 0x06,
38 
39  kSIDV2FreqLo = 0x07,
40  kSIDV2FreqHi = 0x08,
41  kSIDV2PwLo = 0x09,
42  kSIDV2PwHi = 0x0A,
43  kSIDV2Ctrl = 0x0B,
44  kSIDV2AD = 0x0C,
45  kSIDV2SR = 0x0D,
46 
47  kSIDV3FreqLo = 0x0E,
48  kSIDV3FreqHi = 0x0F,
49  kSIDV3PwLo = 0x10,
50  kSIDV3PwHi = 0x11,
51  kSIDV3Ctrl = 0x12,
52  kSIDV3AD = 0x13,
53  kSIDV3SR = 0x14,
54 
55  kSIDFilterLo = 0x15,
56  kSIDFilterHi = 0x16,
57  kSIDFilterCtrl = 0x17,
58  kSIDVolume = 0x18
59 };
60 
61 // 40-byte SFX descriptor used by the Wally Beben C64 SFX engine
62 // (shared by Dark Side, Total Eclipse, and possibly other Freescape titles).
63 struct C64SFXData {
64  uint8 numNotes;
65  uint8 repeatCount;
66  uint8 reserved;
67  uint8 freqWaypoints[20];
68  uint8 padding;
69  uint8 durations[9];
70  uint8 speed;
71  uint8 padding2;
72  uint8 pwLo;
73  uint8 pwHi;
74  uint8 waveform;
75  uint8 attackDecay;
76  uint8 sustainRelease;
77 };
78 
79 } // namespace Freescape
80 
81 #endif // FREESCAPE_SID_H
Definition: area.h:36
Definition: sid.h:63