From acb0917556fc33681c1df5a530cf754193e67705 Mon Sep 17 00:00:00 2001 From: Andree Buschmann Date: Sun, 7 Aug 2011 20:01:04 +0000 Subject: 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 --- apps/codecs/libgme/emuadpcm.h | 52 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 apps/codecs/libgme/emuadpcm.h (limited to 'apps/codecs/libgme/emuadpcm.h') 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 @@ +#ifndef __Y8950ADPCM_HH__ +#define __Y8950ADPCM_HH__ + +#include "blargg_common.h" +#include "blargg_source.h" +#include "msxtypes.h" + +typedef unsigned short word; +typedef unsigned __int64 uint64; +struct Y8950; + +struct Y8950Adpcm +{ + struct Y8950* y8950; + + int sampleRate; + int clockRate; + + int ramSize; + int startAddr; + int stopAddr; + int playAddr; + int addrMask; + int memPntr; + bool romBank; + byte* ramBank; + + bool playing; + int volume; + word delta; + unsigned int nowStep, step; + int out, output; + int diff; + int nextLeveling; + int sampleStep; + int volumeWStep; + + byte reg7; + byte reg15; +}; + + +void ADPCM_init(struct Y8950Adpcm* this_, struct Y8950* y8950, byte* ramBank, int sampleRam); +void ADPCM_reset(struct Y8950Adpcm* this_); +void ADPCM_setSampleRate(struct Y8950Adpcm* this_, int sr, int clk); +bool ADPCM_muted(struct Y8950Adpcm* this_); +void ADPCM_writeReg(struct Y8950Adpcm* this_, byte rg, byte data); +byte ADPCM_readReg(struct Y8950Adpcm* this_, byte rg); +int ADPCM_calcSample(struct Y8950Adpcm* this_); + + +#endif -- cgit v1.2.3