summaryrefslogtreecommitdiff
path: root/apps/codecs/libgme/emuadpcm.h
diff options
context:
space:
mode:
authorAndree Buschmann <AndreeBuschmann@t-online.de>2011-08-07 20:01:04 +0000
committerAndree Buschmann <AndreeBuschmann@t-online.de>2011-08-07 20:01:04 +0000
commitacb0917556fc33681c1df5a530cf754193e67705 (patch)
tree052a47097009a210e4aed9c207bd6aa4828cc000 /apps/codecs/libgme/emuadpcm.h
parent93c6f1329a5691a8be158cefe15641bd1daf9ef8 (diff)
downloadrockbox-acb0917556fc33681c1df5a530cf754193e67705.tar.gz
rockbox-acb0917556fc33681c1df5a530cf754193e67705.zip
Submit initial patch from FS#12176. Adds support for several new game music formats (AY, GBS, HES, KSS, SGC, VGM and VGZ) and replaces the current NSF and NSFE with a new implementation based on a port of the Game Music Emu library 'GME'. This first submit does not cover the full functionality provided by the author's original patch: Coleco-SGV is not supported, some GME-specific m3u-support has been removed and IRAM is not used yet. Further changes are very likely to follow this submit. Thanks to Mauricio Garrido.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30264 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/codecs/libgme/emuadpcm.h')
-rw-r--r--apps/codecs/libgme/emuadpcm.h52
1 files changed, 52 insertions, 0 deletions
diff --git a/apps/codecs/libgme/emuadpcm.h b/apps/codecs/libgme/emuadpcm.h
new file mode 100644
index 0000000000..0fc39a1709
--- /dev/null
+++ b/apps/codecs/libgme/emuadpcm.h
@@ -0,0 +1,52 @@
1#ifndef __Y8950ADPCM_HH__
2#define __Y8950ADPCM_HH__
3
4#include "blargg_common.h"
5#include "blargg_source.h"
6#include "msxtypes.h"
7
8typedef unsigned short word;
9typedef unsigned __int64 uint64;
10struct Y8950;
11
12struct Y8950Adpcm
13{
14 struct Y8950* y8950;
15
16 int sampleRate;
17 int clockRate;
18
19 int ramSize;
20 int startAddr;
21 int stopAddr;
22 int playAddr;
23 int addrMask;
24 int memPntr;
25 bool romBank;
26 byte* ramBank;
27
28 bool playing;
29 int volume;
30 word delta;
31 unsigned int nowStep, step;
32 int out, output;
33 int diff;
34 int nextLeveling;
35 int sampleStep;
36 int volumeWStep;
37
38 byte reg7;
39 byte reg15;
40};
41
42
43void ADPCM_init(struct Y8950Adpcm* this_, struct Y8950* y8950, byte* ramBank, int sampleRam);
44void ADPCM_reset(struct Y8950Adpcm* this_);
45void ADPCM_setSampleRate(struct Y8950Adpcm* this_, int sr, int clk);
46bool ADPCM_muted(struct Y8950Adpcm* this_);
47void ADPCM_writeReg(struct Y8950Adpcm* this_, byte rg, byte data);
48byte ADPCM_readReg(struct Y8950Adpcm* this_, byte rg);
49int ADPCM_calcSample(struct Y8950Adpcm* this_);
50
51
52#endif