diff --git a/Makefile.libretro b/Makefile.libretro
index a05ba9e83..b580c6b17 100644
--- a/Makefile.libretro
+++ b/Makefile.libretro
@@ -1,6 +1,7 @@
DEBUG = 0
LOGSOUND = 0
-FRONTEND_SUPPORTS_RGB565 = 1
+FRONTEND_SUPPORTS_RGB565 = 0
+FRONTEND_SUPPORTS_RGB888 = 1
HAVE_CHD = 1
HAVE_SYS_PARAM = 1
HOOK_CPU = 0
@@ -8,6 +9,7 @@ HAVE_CDROM = 0
USE_PER_SOUND_CHANNELS_CONFIG = 1
LOW_MEMORY = 0
MAX_ROM_SIZE = 10485760
+LTO ?= -flto
CORE_DIR := .
@@ -785,8 +787,8 @@ ifeq ($(platform), emscripten)
CFLAGS += -O3 -DNDEBUG
CXXFLAGS += -O3 -DNDEBUG
else
- CFLAGS += -O2 -DNDEBUG
- CXXFLAGS += -O2 -DNDEBUG
+ CFLAGS += -O3 -DNDEBUG
+ CXXFLAGS += -O3 -DNDEBUG
endif
endif
@@ -820,12 +822,15 @@ ifeq ($(LOW_MEMORY), 1)
DEFINES += -DLOW_MEMORY
endif
-CFLAGS += $(fpic) $(DEFINES) $(CODE_DEFINES) $(FLAGS)
-CXXFLAGS += $(fpic) $(DEFINES) $(CODE_DEFINES) $(FLAGS)
+CFLAGS += $(fpic) $(DEFINES) $(CODE_DEFINES) $(FLAGS) -MMD
+CXXFLAGS += $(fpic) $(DEFINES) $(CODE_DEFINES) $(FLAGS) -MMD
ifeq ($(FRONTEND_SUPPORTS_RGB565), 1)
# if you have a new frontend that supports RGB565
BPP_DEFINES = -DUSE_16BPP_RENDERING -DFRONTEND_SUPPORTS_RGB565
+else ifeq ($(FRONTEND_SUPPORTS_RGB888), 1)
+ # if you have a new frontend that supports RGB888
+ BPP_DEFINES = -DUSE_32BPP_RENDERING -DFRONTEND_SUPPORTS_RGB888
else
BPP_DEFINES = -DUSE_15BPP_RENDERING
endif
@@ -908,3 +913,6 @@ endif
print-%:
@echo '$*=$($*)'
+
+DEPENDS = ${OBJECTS:.o=.d} # substitutes ".o" with ".d"
+-include ${DEPENDS} # copies files x.d, y.d, z.d (if they exist)
diff --git a/core/cart_hw/md_cart.c b/core/cart_hw/md_cart.c
index 766289da1..acb272707 100644
--- a/core/cart_hw/md_cart.c
+++ b/core/cart_hw/md_cart.c
@@ -94,6 +94,8 @@ static void topshooter_w(uint32 address, uint32 data);
static uint32 tekken_regs_r(uint32 address);
static void tekken_regs_w(uint32 address, uint32 data);
+#include "paprium.h"
+
/* Games that need extra hardware emulation:
- copy protection device
- custom ROM banking device
@@ -571,6 +573,15 @@ void md_cart_init(void)
/* initialize SPI EEPROM board */
eeprom_spi_init();
}
+ else if (strstr(rominfo.product,"T-574120-00"))
+ {
+ cart.special |= HW_PAPRIUM;
+
+ paprium_init();
+
+ /* initialize SPI EEPROM board */
+ eeprom_spi_init();
+ }
else if (strstr(rominfo.ROMType,"SF") && strstr(rominfo.product,"001"))
{
/* SF-001 mapper */
@@ -848,6 +859,12 @@ void md_cart_reset(int hard_reset)
megasd_reset();
}
+ /* MegaSD hardware */
+ if (cart.special & HW_PAPRIUM)
+ {
+ paprium_reset();
+ }
+
/* SVP chip */
if (svp)
{
@@ -935,6 +952,11 @@ int md_cart_context_save(uint8 *state)
bufferptr += megasd_context_save(&state[bufferptr]);
}
+ if (cart.special & HW_PAPRIUM)
+ {
+ save_param(&paprium_s, sizeof(paprium_s));
+ }
+
return bufferptr;
}
@@ -997,6 +1019,15 @@ int md_cart_context_load(uint8 *state)
bufferptr += megasd_context_load(&state[bufferptr]);
}
+ if (cart.special & HW_PAPRIUM)
+ {
+ load_param(&paprium_s, sizeof(paprium_s));
+
+ paprium_map();
+
+ log_cb(RETRO_LOG_ERROR, "\n\n\n ############################\n\n\n");
+ }
+
return bufferptr;
}
diff --git a/core/cart_hw/md_cart.h b/core/cart_hw/md_cart.h
index 58687b9da..36d6d8599 100644
--- a/core/cart_hw/md_cart.h
+++ b/core/cart_hw/md_cart.h
@@ -65,6 +65,7 @@
#define HW_J_CART 0x04
#define HW_LOCK_ON 0x08
#define HW_MEGASD 0x10
+#define HW_PAPRIUM 0x20
/* Cartridge extra hardware */
typedef struct
diff --git a/core/cart_hw/minimp3.h b/core/cart_hw/minimp3.h
new file mode 100644
index 000000000..3220ae1a8
--- /dev/null
+++ b/core/cart_hw/minimp3.h
@@ -0,0 +1,1865 @@
+#ifndef MINIMP3_H
+#define MINIMP3_H
+/*
+ https://github.com/lieff/minimp3
+ To the extent possible under law, the author(s) have dedicated all copyright and related and neighboring rights to this software to the public domain worldwide.
+ This software is distributed without any warranty.
+ See .
+*/
+#include
+
+#define MINIMP3_MAX_SAMPLES_PER_FRAME (1152*2)
+
+typedef struct
+{
+ int frame_bytes, frame_offset, channels, hz, layer, bitrate_kbps;
+} mp3dec_frame_info_t;
+
+typedef struct
+{
+ float mdct_overlap[2][9*32], qmf_state[15*2*32];
+ int reserv, free_format_bytes;
+ unsigned char header[4], reserv_buf[511];
+} mp3dec_t;
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
+void mp3dec_init(mp3dec_t *dec);
+#ifndef MINIMP3_FLOAT_OUTPUT
+typedef int16_t mp3d_sample_t;
+#else /* MINIMP3_FLOAT_OUTPUT */
+typedef float mp3d_sample_t;
+void mp3dec_f32_to_s16(const float *in, int16_t *out, int num_samples);
+#endif /* MINIMP3_FLOAT_OUTPUT */
+int mp3dec_decode_frame(mp3dec_t *dec, const uint8_t *mp3, int mp3_bytes, mp3d_sample_t *pcm, mp3dec_frame_info_t *info);
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+#endif /* MINIMP3_H */
+#if defined(MINIMP3_IMPLEMENTATION) && !defined(_MINIMP3_IMPLEMENTATION_GUARD)
+#define _MINIMP3_IMPLEMENTATION_GUARD
+
+#include
+#include
+
+#define MAX_FREE_FORMAT_FRAME_SIZE 2304 /* more than ISO spec's */
+#ifndef MAX_FRAME_SYNC_MATCHES
+#define MAX_FRAME_SYNC_MATCHES 10
+#endif /* MAX_FRAME_SYNC_MATCHES */
+
+#define MAX_L3_FRAME_PAYLOAD_BYTES MAX_FREE_FORMAT_FRAME_SIZE /* MUST be >= 320000/8/32000*1152 = 1440 */
+
+#define MAX_BITRESERVOIR_BYTES 511
+#define SHORT_BLOCK_TYPE 2
+#define STOP_BLOCK_TYPE 3
+#define MODE_MONO 3
+#define MODE_JOINT_STEREO 1
+#define HDR_SIZE 4
+#define HDR_IS_MONO(h) (((h[3]) & 0xC0) == 0xC0)
+#define HDR_IS_MS_STEREO(h) (((h[3]) & 0xE0) == 0x60)
+#define HDR_IS_FREE_FORMAT(h) (((h[2]) & 0xF0) == 0)
+#define HDR_IS_CRC(h) (!((h[1]) & 1))
+#define HDR_TEST_PADDING(h) ((h[2]) & 0x2)
+#define HDR_TEST_MPEG1(h) ((h[1]) & 0x8)
+#define HDR_TEST_NOT_MPEG25(h) ((h[1]) & 0x10)
+#define HDR_TEST_I_STEREO(h) ((h[3]) & 0x10)
+#define HDR_TEST_MS_STEREO(h) ((h[3]) & 0x20)
+#define HDR_GET_STEREO_MODE(h) (((h[3]) >> 6) & 3)
+#define HDR_GET_STEREO_MODE_EXT(h) (((h[3]) >> 4) & 3)
+#define HDR_GET_LAYER(h) (((h[1]) >> 1) & 3)
+#define HDR_GET_BITRATE(h) ((h[2]) >> 4)
+#define HDR_GET_SAMPLE_RATE(h) (((h[2]) >> 2) & 3)
+#define HDR_GET_MY_SAMPLE_RATE(h) (HDR_GET_SAMPLE_RATE(h) + (((h[1] >> 3) & 1) + ((h[1] >> 4) & 1))*3)
+#define HDR_IS_FRAME_576(h) ((h[1] & 14) == 2)
+#define HDR_IS_LAYER_1(h) ((h[1] & 6) == 6)
+
+#define BITS_DEQUANTIZER_OUT -1
+#define MAX_SCF (255 + BITS_DEQUANTIZER_OUT*4 - 210)
+#define MAX_SCFI ((MAX_SCF + 3) & ~3)
+
+#define MINIMP3_MIN(a, b) ((a) > (b) ? (b) : (a))
+#define MINIMP3_MAX(a, b) ((a) < (b) ? (b) : (a))
+
+#if !defined(MINIMP3_NO_SIMD)
+
+#if !defined(MINIMP3_ONLY_SIMD) && (defined(_M_X64) || defined(__x86_64__) || defined(__aarch64__) || defined(_M_ARM64))
+/* x64 always have SSE2, arm64 always have neon, no need for generic code */
+#define MINIMP3_ONLY_SIMD
+#endif /* SIMD checks... */
+
+#if (defined(_MSC_VER) && (defined(_M_IX86) || defined(_M_X64))) || ((defined(__i386__) || defined(__x86_64__)) && defined(__SSE2__))
+#if defined(_MSC_VER)
+#include
+#endif /* defined(_MSC_VER) */
+#include
+#define HAVE_SSE 1
+#define HAVE_SIMD 1
+#define VSTORE _mm_storeu_ps
+#define VLD _mm_loadu_ps
+#define VSET _mm_set1_ps
+#define VADD _mm_add_ps
+#define VSUB _mm_sub_ps
+#define VMUL _mm_mul_ps
+#define VMAC(a, x, y) _mm_add_ps(a, _mm_mul_ps(x, y))
+#define VMSB(a, x, y) _mm_sub_ps(a, _mm_mul_ps(x, y))
+#define VMUL_S(x, s) _mm_mul_ps(x, _mm_set1_ps(s))
+#define VREV(x) _mm_shuffle_ps(x, x, _MM_SHUFFLE(0, 1, 2, 3))
+typedef __m128 f4;
+#if defined(_MSC_VER) || defined(MINIMP3_ONLY_SIMD)
+#define minimp3_cpuid __cpuid
+#else /* defined(_MSC_VER) || defined(MINIMP3_ONLY_SIMD) */
+static __inline__ __attribute__((always_inline)) void minimp3_cpuid(int CPUInfo[], const int InfoType)
+{
+#if defined(__PIC__)
+ __asm__ __volatile__(
+#if defined(__x86_64__)
+ "push %%rbx\n"
+ "cpuid\n"
+ "xchgl %%ebx, %1\n"
+ "pop %%rbx\n"
+#else /* defined(__x86_64__) */
+ "xchgl %%ebx, %1\n"
+ "cpuid\n"
+ "xchgl %%ebx, %1\n"
+#endif /* defined(__x86_64__) */
+ : "=a" (CPUInfo[0]), "=r" (CPUInfo[1]), "=c" (CPUInfo[2]), "=d" (CPUInfo[3])
+ : "a" (InfoType));
+#else /* defined(__PIC__) */
+ __asm__ __volatile__(
+ "cpuid"
+ : "=a" (CPUInfo[0]), "=b" (CPUInfo[1]), "=c" (CPUInfo[2]), "=d" (CPUInfo[3])
+ : "a" (InfoType));
+#endif /* defined(__PIC__)*/
+}
+#endif /* defined(_MSC_VER) || defined(MINIMP3_ONLY_SIMD) */
+static int have_simd(void)
+{
+#ifdef MINIMP3_ONLY_SIMD
+ return 1;
+#else /* MINIMP3_ONLY_SIMD */
+ static int g_have_simd;
+ int CPUInfo[4];
+#ifdef MINIMP3_TEST
+ static int g_counter;
+ if (g_counter++ > 100)
+ return 0;
+#endif /* MINIMP3_TEST */
+ if (g_have_simd)
+ goto end;
+ minimp3_cpuid(CPUInfo, 0);
+ g_have_simd = 1;
+ if (CPUInfo[0] > 0)
+ {
+ minimp3_cpuid(CPUInfo, 1);
+ g_have_simd = (CPUInfo[3] & (1 << 26)) + 1; /* SSE2 */
+ }
+end:
+ return g_have_simd - 1;
+#endif /* MINIMP3_ONLY_SIMD */
+}
+#elif defined(__ARM_NEON) || defined(__aarch64__) || defined(_M_ARM64)
+#include
+#define HAVE_SSE 0
+#define HAVE_SIMD 1
+#define VSTORE vst1q_f32
+#define VLD vld1q_f32
+#define VSET vmovq_n_f32
+#define VADD vaddq_f32
+#define VSUB vsubq_f32
+#define VMUL vmulq_f32
+#define VMAC(a, x, y) vmlaq_f32(a, x, y)
+#define VMSB(a, x, y) vmlsq_f32(a, x, y)
+#define VMUL_S(x, s) vmulq_f32(x, vmovq_n_f32(s))
+#define VREV(x) vcombine_f32(vget_high_f32(vrev64q_f32(x)), vget_low_f32(vrev64q_f32(x)))
+typedef float32x4_t f4;
+static int have_simd()
+{ /* TODO: detect neon for !MINIMP3_ONLY_SIMD */
+ return 1;
+}
+#else /* SIMD checks... */
+#define HAVE_SSE 0
+#define HAVE_SIMD 0
+#ifdef MINIMP3_ONLY_SIMD
+#error MINIMP3_ONLY_SIMD used, but SSE/NEON not enabled
+#endif /* MINIMP3_ONLY_SIMD */
+#endif /* SIMD checks... */
+#else /* !defined(MINIMP3_NO_SIMD) */
+#define HAVE_SIMD 0
+#endif /* !defined(MINIMP3_NO_SIMD) */
+
+#if defined(__ARM_ARCH) && (__ARM_ARCH >= 6) && !defined(__aarch64__) && !defined(_M_ARM64)
+#define HAVE_ARMV6 1
+static __inline__ __attribute__((always_inline)) int32_t minimp3_clip_int16_arm(int32_t a)
+{
+ int32_t x = 0;
+ __asm__ ("ssat %0, #16, %1" : "=r"(x) : "r"(a));
+ return x;
+}
+#else
+#define HAVE_ARMV6 0
+#endif
+
+typedef struct
+{
+ const uint8_t *buf;
+ int pos, limit;
+} bs_t;
+
+typedef struct
+{
+ float scf[3*64];
+ uint8_t total_bands, stereo_bands, bitalloc[64], scfcod[64];
+} L12_scale_info;
+
+typedef struct
+{
+ uint8_t tab_offset, code_tab_width, band_count;
+} L12_subband_alloc_t;
+
+typedef struct
+{
+ const uint8_t *sfbtab;
+ uint16_t part_23_length, big_values, scalefac_compress;
+ uint8_t global_gain, block_type, mixed_block_flag, n_long_sfb, n_short_sfb;
+ uint8_t table_select[3], region_count[3], subblock_gain[3];
+ uint8_t preflag, scalefac_scale, count1_table, scfsi;
+} L3_gr_info_t;
+
+typedef struct
+{
+ bs_t bs;
+ uint8_t maindata[MAX_BITRESERVOIR_BYTES + MAX_L3_FRAME_PAYLOAD_BYTES];
+ L3_gr_info_t gr_info[4];
+ float grbuf[2][576], scf[40], syn[18 + 15][2*32];
+ uint8_t ist_pos[2][39];
+} mp3dec_scratch_t;
+
+static void bs_init(bs_t *bs, const uint8_t *data, int bytes)
+{
+ bs->buf = data;
+ bs->pos = 0;
+ bs->limit = bytes*8;
+}
+
+static uint32_t get_bits(bs_t *bs, int n)
+{
+ uint32_t next, cache = 0, s = bs->pos & 7;
+ int shl = n + s;
+ const uint8_t *p = bs->buf + (bs->pos >> 3);
+ if ((bs->pos += n) > bs->limit)
+ return 0;
+ next = *p++ & (255 >> s);
+ while ((shl -= 8) > 0)
+ {
+ cache |= next << shl;
+ next = *p++;
+ }
+ return cache | (next >> -shl);
+}
+
+static int hdr_valid(const uint8_t *h)
+{
+ return h[0] == 0xff &&
+ ((h[1] & 0xF0) == 0xf0 || (h[1] & 0xFE) == 0xe2) &&
+ (HDR_GET_LAYER(h) != 0) &&
+ (HDR_GET_BITRATE(h) != 15) &&
+ (HDR_GET_SAMPLE_RATE(h) != 3);
+}
+
+static int hdr_compare(const uint8_t *h1, const uint8_t *h2)
+{
+ return hdr_valid(h2) &&
+ ((h1[1] ^ h2[1]) & 0xFE) == 0 &&
+ ((h1[2] ^ h2[2]) & 0x0C) == 0 &&
+ !(HDR_IS_FREE_FORMAT(h1) ^ HDR_IS_FREE_FORMAT(h2));
+}
+
+static unsigned hdr_bitrate_kbps(const uint8_t *h)
+{
+ static const uint8_t halfrate[2][3][15] = {
+ { { 0,4,8,12,16,20,24,28,32,40,48,56,64,72,80 }, { 0,4,8,12,16,20,24,28,32,40,48,56,64,72,80 }, { 0,16,24,28,32,40,48,56,64,72,80,88,96,112,128 } },
+ { { 0,16,20,24,28,32,40,48,56,64,80,96,112,128,160 }, { 0,16,24,28,32,40,48,56,64,80,96,112,128,160,192 }, { 0,16,32,48,64,80,96,112,128,144,160,176,192,208,224 } },
+ };
+ return 2*halfrate[!!HDR_TEST_MPEG1(h)][HDR_GET_LAYER(h) - 1][HDR_GET_BITRATE(h)];
+}
+
+static unsigned hdr_sample_rate_hz(const uint8_t *h)
+{
+ static const unsigned g_hz[3] = { 44100, 48000, 32000 };
+ return g_hz[HDR_GET_SAMPLE_RATE(h)] >> (int)!HDR_TEST_MPEG1(h) >> (int)!HDR_TEST_NOT_MPEG25(h);
+}
+
+static unsigned hdr_frame_samples(const uint8_t *h)
+{
+ return HDR_IS_LAYER_1(h) ? 384 : (1152 >> (int)HDR_IS_FRAME_576(h));
+}
+
+static int hdr_frame_bytes(const uint8_t *h, int free_format_size)
+{
+ int frame_bytes = hdr_frame_samples(h)*hdr_bitrate_kbps(h)*125/hdr_sample_rate_hz(h);
+ if (HDR_IS_LAYER_1(h))
+ {
+ frame_bytes &= ~3; /* slot align */
+ }
+ return frame_bytes ? frame_bytes : free_format_size;
+}
+
+static int hdr_padding(const uint8_t *h)
+{
+ return HDR_TEST_PADDING(h) ? (HDR_IS_LAYER_1(h) ? 4 : 1) : 0;
+}
+
+#ifndef MINIMP3_ONLY_MP3
+static const L12_subband_alloc_t *L12_subband_alloc_table(const uint8_t *hdr, L12_scale_info *sci)
+{
+ const L12_subband_alloc_t *alloc;
+ int mode = HDR_GET_STEREO_MODE(hdr);
+ int nbands, stereo_bands = (mode == MODE_MONO) ? 0 : (mode == MODE_JOINT_STEREO) ? (HDR_GET_STEREO_MODE_EXT(hdr) << 2) + 4 : 32;
+
+ if (HDR_IS_LAYER_1(hdr))
+ {
+ static const L12_subband_alloc_t g_alloc_L1[] = { { 76, 4, 32 } };
+ alloc = g_alloc_L1;
+ nbands = 32;
+ } else if (!HDR_TEST_MPEG1(hdr))
+ {
+ static const L12_subband_alloc_t g_alloc_L2M2[] = { { 60, 4, 4 }, { 44, 3, 7 }, { 44, 2, 19 } };
+ alloc = g_alloc_L2M2;
+ nbands = 30;
+ } else
+ {
+ static const L12_subband_alloc_t g_alloc_L2M1[] = { { 0, 4, 3 }, { 16, 4, 8 }, { 32, 3, 12 }, { 40, 2, 7 } };
+ int sample_rate_idx = HDR_GET_SAMPLE_RATE(hdr);
+ unsigned kbps = hdr_bitrate_kbps(hdr) >> (int)(mode != MODE_MONO);
+ if (!kbps) /* free-format */
+ {
+ kbps = 192;
+ }
+
+ alloc = g_alloc_L2M1;
+ nbands = 27;
+ if (kbps < 56)
+ {
+ static const L12_subband_alloc_t g_alloc_L2M1_lowrate[] = { { 44, 4, 2 }, { 44, 3, 10 } };
+ alloc = g_alloc_L2M1_lowrate;
+ nbands = sample_rate_idx == 2 ? 12 : 8;
+ } else if (kbps >= 96 && sample_rate_idx != 1)
+ {
+ nbands = 30;
+ }
+ }
+
+ sci->total_bands = (uint8_t)nbands;
+ sci->stereo_bands = (uint8_t)MINIMP3_MIN(stereo_bands, nbands);
+
+ return alloc;
+}
+
+static void L12_read_scalefactors(bs_t *bs, uint8_t *pba, uint8_t *scfcod, int bands, float *scf)
+{
+ static const float g_deq_L12[18*3] = {
+#define DQ(x) 9.53674316e-07f/x, 7.56931807e-07f/x, 6.00777173e-07f/x
+ DQ(3),DQ(7),DQ(15),DQ(31),DQ(63),DQ(127),DQ(255),DQ(511),DQ(1023),DQ(2047),DQ(4095),DQ(8191),DQ(16383),DQ(32767),DQ(65535),DQ(3),DQ(5),DQ(9)
+ };
+ int i, m;
+ for (i = 0; i < bands; i++)
+ {
+ float s = 0;
+ int ba = *pba++;
+ int mask = ba ? 4 + ((19 >> scfcod[i]) & 3) : 0;
+ for (m = 4; m; m >>= 1)
+ {
+ if (mask & m)
+ {
+ int b = get_bits(bs, 6);
+ s = g_deq_L12[ba*3 - 6 + b % 3]*(1 << 21 >> b/3);
+ }
+ *scf++ = s;
+ }
+ }
+}
+
+static void L12_read_scale_info(const uint8_t *hdr, bs_t *bs, L12_scale_info *sci)
+{
+ static const uint8_t g_bitalloc_code_tab[] = {
+ 0,17, 3, 4, 5,6,7, 8,9,10,11,12,13,14,15,16,
+ 0,17,18, 3,19,4,5, 6,7, 8, 9,10,11,12,13,16,
+ 0,17,18, 3,19,4,5,16,
+ 0,17,18,16,
+ 0,17,18,19, 4,5,6, 7,8, 9,10,11,12,13,14,15,
+ 0,17,18, 3,19,4,5, 6,7, 8, 9,10,11,12,13,14,
+ 0, 2, 3, 4, 5,6,7, 8,9,10,11,12,13,14,15,16
+ };
+ const L12_subband_alloc_t *subband_alloc = L12_subband_alloc_table(hdr, sci);
+
+ int i, k = 0, ba_bits = 0;
+ const uint8_t *ba_code_tab = g_bitalloc_code_tab;
+
+ for (i = 0; i < sci->total_bands; i++)
+ {
+ uint8_t ba;
+ if (i == k)
+ {
+ k += subband_alloc->band_count;
+ ba_bits = subband_alloc->code_tab_width;
+ ba_code_tab = g_bitalloc_code_tab + subband_alloc->tab_offset;
+ subband_alloc++;
+ }
+ ba = ba_code_tab[get_bits(bs, ba_bits)];
+ sci->bitalloc[2*i] = ba;
+ if (i < sci->stereo_bands)
+ {
+ ba = ba_code_tab[get_bits(bs, ba_bits)];
+ }
+ sci->bitalloc[2*i + 1] = sci->stereo_bands ? ba : 0;
+ }
+
+ for (i = 0; i < 2*sci->total_bands; i++)
+ {
+ sci->scfcod[i] = sci->bitalloc[i] ? HDR_IS_LAYER_1(hdr) ? 2 : get_bits(bs, 2) : 6;
+ }
+
+ L12_read_scalefactors(bs, sci->bitalloc, sci->scfcod, sci->total_bands*2, sci->scf);
+
+ for (i = sci->stereo_bands; i < sci->total_bands; i++)
+ {
+ sci->bitalloc[2*i + 1] = 0;
+ }
+}
+
+static int L12_dequantize_granule(float *grbuf, bs_t *bs, L12_scale_info *sci, int group_size)
+{
+ int i, j, k, choff = 576;
+ for (j = 0; j < 4; j++)
+ {
+ float *dst = grbuf + group_size*j;
+ for (i = 0; i < 2*sci->total_bands; i++)
+ {
+ int ba = sci->bitalloc[i];
+ if (ba != 0)
+ {
+ if (ba < 17)
+ {
+ int half = (1 << (ba - 1)) - 1;
+ for (k = 0; k < group_size; k++)
+ {
+ dst[k] = (float)((int)get_bits(bs, ba) - half);
+ }
+ } else
+ {
+ unsigned mod = (2 << (ba - 17)) + 1; /* 3, 5, 9 */
+ unsigned code = get_bits(bs, mod + 2 - (mod >> 3)); /* 5, 7, 10 */
+ for (k = 0; k < group_size; k++, code /= mod)
+ {
+ dst[k] = (float)((int)(code % mod - mod/2));
+ }
+ }
+ }
+ dst += choff;
+ choff = 18 - choff;
+ }
+ }
+ return group_size*4;
+}
+
+static void L12_apply_scf_384(L12_scale_info *sci, const float *scf, float *dst)
+{
+ int i, k;
+ memcpy(dst + 576 + sci->stereo_bands*18, dst + sci->stereo_bands*18, (sci->total_bands - sci->stereo_bands)*18*sizeof(float));
+ for (i = 0; i < sci->total_bands; i++, dst += 18, scf += 6)
+ {
+ for (k = 0; k < 12; k++)
+ {
+ dst[k + 0] *= scf[0];
+ dst[k + 576] *= scf[3];
+ }
+ }
+}
+#endif /* MINIMP3_ONLY_MP3 */
+
+static int L3_read_side_info(bs_t *bs, L3_gr_info_t *gr, const uint8_t *hdr)
+{
+ static const uint8_t g_scf_long[8][23] = {
+ { 6,6,6,6,6,6,8,10,12,14,16,20,24,28,32,38,46,52,60,68,58,54,0 },
+ { 12,12,12,12,12,12,16,20,24,28,32,40,48,56,64,76,90,2,2,2,2,2,0 },
+ { 6,6,6,6,6,6,8,10,12,14,16,20,24,28,32,38,46,52,60,68,58,54,0 },
+ { 6,6,6,6,6,6,8,10,12,14,16,18,22,26,32,38,46,54,62,70,76,36,0 },
+ { 6,6,6,6,6,6,8,10,12,14,16,20,24,28,32,38,46,52,60,68,58,54,0 },
+ { 4,4,4,4,4,4,6,6,8,8,10,12,16,20,24,28,34,42,50,54,76,158,0 },
+ { 4,4,4,4,4,4,6,6,6,8,10,12,16,18,22,28,34,40,46,54,54,192,0 },
+ { 4,4,4,4,4,4,6,6,8,10,12,16,20,24,30,38,46,56,68,84,102,26,0 }
+ };
+ static const uint8_t g_scf_short[8][40] = {
+ { 4,4,4,4,4,4,4,4,4,6,6,6,8,8,8,10,10,10,12,12,12,14,14,14,18,18,18,24,24,24,30,30,30,40,40,40,18,18,18,0 },
+ { 8,8,8,8,8,8,8,8,8,12,12,12,16,16,16,20,20,20,24,24,24,28,28,28,36,36,36,2,2,2,2,2,2,2,2,2,26,26,26,0 },
+ { 4,4,4,4,4,4,4,4,4,6,6,6,6,6,6,8,8,8,10,10,10,14,14,14,18,18,18,26,26,26,32,32,32,42,42,42,18,18,18,0 },
+ { 4,4,4,4,4,4,4,4,4,6,6,6,8,8,8,10,10,10,12,12,12,14,14,14,18,18,18,24,24,24,32,32,32,44,44,44,12,12,12,0 },
+ { 4,4,4,4,4,4,4,4,4,6,6,6,8,8,8,10,10,10,12,12,12,14,14,14,18,18,18,24,24,24,30,30,30,40,40,40,18,18,18,0 },
+ { 4,4,4,4,4,4,4,4,4,4,4,4,6,6,6,8,8,8,10,10,10,12,12,12,14,14,14,18,18,18,22,22,22,30,30,30,56,56,56,0 },
+ { 4,4,4,4,4,4,4,4,4,4,4,4,6,6,6,6,6,6,10,10,10,12,12,12,14,14,14,16,16,16,20,20,20,26,26,26,66,66,66,0 },
+ { 4,4,4,4,4,4,4,4,4,4,4,4,6,6,6,8,8,8,12,12,12,16,16,16,20,20,20,26,26,26,34,34,34,42,42,42,12,12,12,0 }
+ };
+ static const uint8_t g_scf_mixed[8][40] = {
+ { 6,6,6,6,6,6,6,6,6,8,8,8,10,10,10,12,12,12,14,14,14,18,18,18,24,24,24,30,30,30,40,40,40,18,18,18,0 },
+ { 12,12,12,4,4,4,8,8,8,12,12,12,16,16,16,20,20,20,24,24,24,28,28,28,36,36,36,2,2,2,2,2,2,2,2,2,26,26,26,0 },
+ { 6,6,6,6,6,6,6,6,6,6,6,6,8,8,8,10,10,10,14,14,14,18,18,18,26,26,26,32,32,32,42,42,42,18,18,18,0 },
+ { 6,6,6,6,6,6,6,6,6,8,8,8,10,10,10,12,12,12,14,14,14,18,18,18,24,24,24,32,32,32,44,44,44,12,12,12,0 },
+ { 6,6,6,6,6,6,6,6,6,8,8,8,10,10,10,12,12,12,14,14,14,18,18,18,24,24,24,30,30,30,40,40,40,18,18,18,0 },
+ { 4,4,4,4,4,4,6,6,4,4,4,6,6,6,8,8,8,10,10,10,12,12,12,14,14,14,18,18,18,22,22,22,30,30,30,56,56,56,0 },
+ { 4,4,4,4,4,4,6,6,4,4,4,6,6,6,6,6,6,10,10,10,12,12,12,14,14,14,16,16,16,20,20,20,26,26,26,66,66,66,0 },
+ { 4,4,4,4,4,4,6,6,4,4,4,6,6,6,8,8,8,12,12,12,16,16,16,20,20,20,26,26,26,34,34,34,42,42,42,12,12,12,0 }
+ };
+
+ unsigned tables, scfsi = 0;
+ int main_data_begin, part_23_sum = 0;
+ int sr_idx = HDR_GET_MY_SAMPLE_RATE(hdr); sr_idx -= (sr_idx != 0);
+ int gr_count = HDR_IS_MONO(hdr) ? 1 : 2;
+
+ if (HDR_TEST_MPEG1(hdr))
+ {
+ gr_count *= 2;
+ main_data_begin = get_bits(bs, 9);
+ scfsi = get_bits(bs, 7 + gr_count);
+ } else
+ {
+ main_data_begin = get_bits(bs, 8 + gr_count) >> gr_count;
+ }
+
+ do
+ {
+ if (HDR_IS_MONO(hdr))
+ {
+ scfsi <<= 4;
+ }
+ gr->part_23_length = (uint16_t)get_bits(bs, 12);
+ part_23_sum += gr->part_23_length;
+ gr->big_values = (uint16_t)get_bits(bs, 9);
+ if (gr->big_values > 288)
+ {
+ return -1;
+ }
+ gr->global_gain = (uint8_t)get_bits(bs, 8);
+ gr->scalefac_compress = (uint16_t)get_bits(bs, HDR_TEST_MPEG1(hdr) ? 4 : 9);
+ gr->sfbtab = g_scf_long[sr_idx];
+ gr->n_long_sfb = 22;
+ gr->n_short_sfb = 0;
+ if (get_bits(bs, 1))
+ {
+ gr->block_type = (uint8_t)get_bits(bs, 2);
+ if (!gr->block_type)
+ {
+ return -1;
+ }
+ gr->mixed_block_flag = (uint8_t)get_bits(bs, 1);
+ gr->region_count[0] = 7;
+ gr->region_count[1] = 255;
+ if (gr->block_type == SHORT_BLOCK_TYPE)
+ {
+ scfsi &= 0x0F0F;
+ if (!gr->mixed_block_flag)
+ {
+ gr->region_count[0] = 8;
+ gr->sfbtab = g_scf_short[sr_idx];
+ gr->n_long_sfb = 0;
+ gr->n_short_sfb = 39;
+ } else
+ {
+ gr->sfbtab = g_scf_mixed[sr_idx];
+ gr->n_long_sfb = HDR_TEST_MPEG1(hdr) ? 8 : 6;
+ gr->n_short_sfb = 30;
+ }
+ }
+ tables = get_bits(bs, 10);
+ tables <<= 5;
+ gr->subblock_gain[0] = (uint8_t)get_bits(bs, 3);
+ gr->subblock_gain[1] = (uint8_t)get_bits(bs, 3);
+ gr->subblock_gain[2] = (uint8_t)get_bits(bs, 3);
+ } else
+ {
+ gr->block_type = 0;
+ gr->mixed_block_flag = 0;
+ tables = get_bits(bs, 15);
+ gr->region_count[0] = (uint8_t)get_bits(bs, 4);
+ gr->region_count[1] = (uint8_t)get_bits(bs, 3);
+ gr->region_count[2] = 255;
+ }
+ gr->table_select[0] = (uint8_t)(tables >> 10);
+ gr->table_select[1] = (uint8_t)((tables >> 5) & 31);
+ gr->table_select[2] = (uint8_t)((tables) & 31);
+ gr->preflag = HDR_TEST_MPEG1(hdr) ? get_bits(bs, 1) : (gr->scalefac_compress >= 500);
+ gr->scalefac_scale = (uint8_t)get_bits(bs, 1);
+ gr->count1_table = (uint8_t)get_bits(bs, 1);
+ gr->scfsi = (uint8_t)((scfsi >> 12) & 15);
+ scfsi <<= 4;
+ gr++;
+ } while(--gr_count);
+
+ if (part_23_sum + bs->pos > bs->limit + main_data_begin*8)
+ {
+ return -1;
+ }
+
+ return main_data_begin;
+}
+
+static void L3_read_scalefactors(uint8_t *scf, uint8_t *ist_pos, const uint8_t *scf_size, const uint8_t *scf_count, bs_t *bitbuf, int scfsi)
+{
+ int i, k;
+ for (i = 0; i < 4 && scf_count[i]; i++, scfsi *= 2)
+ {
+ int cnt = scf_count[i];
+ if (scfsi & 8)
+ {
+ memcpy(scf, ist_pos, cnt);
+ } else
+ {
+ int bits = scf_size[i];
+ if (!bits)
+ {
+ memset(scf, 0, cnt);
+ memset(ist_pos, 0, cnt);
+ } else
+ {
+ int max_scf = (scfsi < 0) ? (1 << bits) - 1 : -1;
+ for (k = 0; k < cnt; k++)
+ {
+ int s = get_bits(bitbuf, bits);
+ ist_pos[k] = (s == max_scf ? -1 : s);
+ scf[k] = s;
+ }
+ }
+ }
+ ist_pos += cnt;
+ scf += cnt;
+ }
+ scf[0] = scf[1] = scf[2] = 0;
+}
+
+static float L3_ldexp_q2(float y, int exp_q2)
+{
+ static const float g_expfrac[4] = { 9.31322575e-10f,7.83145814e-10f,6.58544508e-10f,5.53767716e-10f };
+ int e;
+ do
+ {
+ e = MINIMP3_MIN(30*4, exp_q2);
+ y *= g_expfrac[e & 3]*(1 << 30 >> (e >> 2));
+ } while ((exp_q2 -= e) > 0);
+ return y;
+}
+
+static void L3_decode_scalefactors(const uint8_t *hdr, uint8_t *ist_pos, bs_t *bs, const L3_gr_info_t *gr, float *scf, int ch)
+{
+ static const uint8_t g_scf_partitions[3][28] = {
+ { 6,5,5, 5,6,5,5,5,6,5, 7,3,11,10,0,0, 7, 7, 7,0, 6, 6,6,3, 8, 8,5,0 },
+ { 8,9,6,12,6,9,9,9,6,9,12,6,15,18,0,0, 6,15,12,0, 6,12,9,6, 6,18,9,0 },
+ { 9,9,6,12,9,9,9,9,9,9,12,6,18,18,0,0,12,12,12,0,12, 9,9,6,15,12,9,0 }
+ };
+ const uint8_t *scf_partition = g_scf_partitions[!!gr->n_short_sfb + !gr->n_long_sfb];
+ uint8_t scf_size[4], iscf[40];
+ int i, scf_shift = gr->scalefac_scale + 1, gain_exp, scfsi = gr->scfsi;
+ float gain;
+
+ if (HDR_TEST_MPEG1(hdr))
+ {
+ static const uint8_t g_scfc_decode[16] = { 0,1,2,3, 12,5,6,7, 9,10,11,13, 14,15,18,19 };
+ int part = g_scfc_decode[gr->scalefac_compress];
+ scf_size[1] = scf_size[0] = (uint8_t)(part >> 2);
+ scf_size[3] = scf_size[2] = (uint8_t)(part & 3);
+ } else
+ {
+ static const uint8_t g_mod[6*4] = { 5,5,4,4,5,5,4,1,4,3,1,1,5,6,6,1,4,4,4,1,4,3,1,1 };
+ int k, modprod, sfc, ist = HDR_TEST_I_STEREO(hdr) && ch;
+ sfc = gr->scalefac_compress >> ist;
+ for (k = ist*3*4; sfc >= 0; sfc -= modprod, k += 4)
+ {
+ for (modprod = 1, i = 3; i >= 0; i--)
+ {
+ scf_size[i] = (uint8_t)(sfc / modprod % g_mod[k + i]);
+ modprod *= g_mod[k + i];
+ }
+ }
+ scf_partition += k;
+ scfsi = -16;
+ }
+ L3_read_scalefactors(iscf, ist_pos, scf_size, scf_partition, bs, scfsi);
+
+ if (gr->n_short_sfb)
+ {
+ int sh = 3 - scf_shift;
+ for (i = 0; i < gr->n_short_sfb; i += 3)
+ {
+ iscf[gr->n_long_sfb + i + 0] += gr->subblock_gain[0] << sh;
+ iscf[gr->n_long_sfb + i + 1] += gr->subblock_gain[1] << sh;
+ iscf[gr->n_long_sfb + i + 2] += gr->subblock_gain[2] << sh;
+ }
+ } else if (gr->preflag)
+ {
+ static const uint8_t g_preamp[10] = { 1,1,1,1,2,2,3,3,3,2 };
+ for (i = 0; i < 10; i++)
+ {
+ iscf[11 + i] += g_preamp[i];
+ }
+ }
+
+ gain_exp = gr->global_gain + BITS_DEQUANTIZER_OUT*4 - 210 - (HDR_IS_MS_STEREO(hdr) ? 2 : 0);
+ gain = L3_ldexp_q2(1 << (MAX_SCFI/4), MAX_SCFI - gain_exp);
+ for (i = 0; i < (int)(gr->n_long_sfb + gr->n_short_sfb); i++)
+ {
+ scf[i] = L3_ldexp_q2(gain, iscf[i] << scf_shift);
+ }
+}
+
+static const float g_pow43[129 + 16] = {
+ 0,-1,-2.519842f,-4.326749f,-6.349604f,-8.549880f,-10.902724f,-13.390518f,-16.000000f,-18.720754f,-21.544347f,-24.463781f,-27.473142f,-30.567351f,-33.741992f,-36.993181f,
+ 0,1,2.519842f,4.326749f,6.349604f,8.549880f,10.902724f,13.390518f,16.000000f,18.720754f,21.544347f,24.463781f,27.473142f,30.567351f,33.741992f,36.993181f,40.317474f,43.711787f,47.173345f,50.699631f,54.288352f,57.937408f,61.644865f,65.408941f,69.227979f,73.100443f,77.024898f,81.000000f,85.024491f,89.097188f,93.216975f,97.382800f,101.593667f,105.848633f,110.146801f,114.487321f,118.869381f,123.292209f,127.755065f,132.257246f,136.798076f,141.376907f,145.993119f,150.646117f,155.335327f,160.060199f,164.820202f,169.614826f,174.443577f,179.305980f,184.201575f,189.129918f,194.090580f,199.083145f,204.107210f,209.162385f,214.248292f,219.364564f,224.510845f,229.686789f,234.892058f,240.126328f,245.389280f,250.680604f,256.000000f,261.347174f,266.721841f,272.123723f,277.552547f,283.008049f,288.489971f,293.998060f,299.532071f,305.091761f,310.676898f,316.287249f,321.922592f,327.582707f,333.267377f,338.976394f,344.709550f,350.466646f,356.247482f,362.051866f,367.879608f,373.730522f,379.604427f,385.501143f,391.420496f,397.362314f,403.326427f,409.312672f,415.320884f,421.350905f,427.402579f,433.475750f,439.570269f,445.685987f,451.822757f,457.980436f,464.158883f,470.357960f,476.577530f,482.817459f,489.077615f,495.357868f,501.658090f,507.978156f,514.317941f,520.677324f,527.056184f,533.454404f,539.871867f,546.308458f,552.764065f,559.238575f,565.731879f,572.243870f,578.774440f,585.323483f,591.890898f,598.476581f,605.080431f,611.702349f,618.342238f,625.000000f,631.675540f,638.368763f,645.079578f
+};
+
+static float L3_pow_43(int x)
+{
+ float frac;
+ int sign, mult = 256;
+
+ if (x < 129)
+ {
+ return g_pow43[16 + x];
+ }
+
+ if (x < 1024)
+ {
+ mult = 16;
+ x <<= 3;
+ }
+
+ sign = 2*x & 64;
+ frac = (float)((x & 63) - sign) / ((x & ~63) + sign);
+ return g_pow43[16 + ((x + sign) >> 6)]*(1.f + frac*((4.f/3) + frac*(2.f/9)))*mult;
+}
+
+static void L3_huffman(float *dst, bs_t *bs, const L3_gr_info_t *gr_info, const float *scf, int layer3gr_limit)
+{
+ static const int16_t tabs[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 785,785,785,785,784,784,784,784,513,513,513,513,513,513,513,513,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,
+ -255,1313,1298,1282,785,785,785,785,784,784,784,784,769,769,769,769,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,290,288,
+ -255,1313,1298,1282,769,769,769,769,529,529,529,529,529,529,529,529,528,528,528,528,528,528,528,528,512,512,512,512,512,512,512,512,290,288,
+ -253,-318,-351,-367,785,785,785,785,784,784,784,784,769,769,769,769,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,819,818,547,547,275,275,275,275,561,560,515,546,289,274,288,258,
+ -254,-287,1329,1299,1314,1312,1057,1057,1042,1042,1026,1026,784,784,784,784,529,529,529,529,529,529,529,529,769,769,769,769,768,768,768,768,563,560,306,306,291,259,
+ -252,-413,-477,-542,1298,-575,1041,1041,784,784,784,784,769,769,769,769,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,-383,-399,1107,1092,1106,1061,849,849,789,789,1104,1091,773,773,1076,1075,341,340,325,309,834,804,577,577,532,532,516,516,832,818,803,816,561,561,531,531,515,546,289,289,288,258,
+ -252,-429,-493,-559,1057,1057,1042,1042,529,529,529,529,529,529,529,529,784,784,784,784,769,769,769,769,512,512,512,512,512,512,512,512,-382,1077,-415,1106,1061,1104,849,849,789,789,1091,1076,1029,1075,834,834,597,581,340,340,339,324,804,833,532,532,832,772,818,803,817,787,816,771,290,290,290,290,288,258,
+ -253,-349,-414,-447,-463,1329,1299,-479,1314,1312,1057,1057,1042,1042,1026,1026,785,785,785,785,784,784,784,784,769,769,769,769,768,768,768,768,-319,851,821,-335,836,850,805,849,341,340,325,336,533,533,579,579,564,564,773,832,578,548,563,516,321,276,306,291,304,259,
+ -251,-572,-733,-830,-863,-879,1041,1041,784,784,784,784,769,769,769,769,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,-511,-527,-543,1396,1351,1381,1366,1395,1335,1380,-559,1334,1138,1138,1063,1063,1350,1392,1031,1031,1062,1062,1364,1363,1120,1120,1333,1348,881,881,881,881,375,374,359,373,343,358,341,325,791,791,1123,1122,-703,1105,1045,-719,865,865,790,790,774,774,1104,1029,338,293,323,308,-799,-815,833,788,772,818,803,816,322,292,307,320,561,531,515,546,289,274,288,258,
+ -251,-525,-605,-685,-765,-831,-846,1298,1057,1057,1312,1282,785,785,785,785,784,784,784,784,769,769,769,769,512,512,512,512,512,512,512,512,1399,1398,1383,1367,1382,1396,1351,-511,1381,1366,1139,1139,1079,1079,1124,1124,1364,1349,1363,1333,882,882,882,882,807,807,807,807,1094,1094,1136,1136,373,341,535,535,881,775,867,822,774,-591,324,338,-671,849,550,550,866,864,609,609,293,336,534,534,789,835,773,-751,834,804,308,307,833,788,832,772,562,562,547,547,305,275,560,515,290,290,
+ -252,-397,-477,-557,-622,-653,-719,-735,-750,1329,1299,1314,1057,1057,1042,1042,1312,1282,1024,1024,785,785,785,785,784,784,784,784,769,769,769,769,-383,1127,1141,1111,1126,1140,1095,1110,869,869,883,883,1079,1109,882,882,375,374,807,868,838,881,791,-463,867,822,368,263,852,837,836,-543,610,610,550,550,352,336,534,534,865,774,851,821,850,805,593,533,579,564,773,832,578,578,548,548,577,577,307,276,306,291,516,560,259,259,
+ -250,-2107,-2507,-2764,-2909,-2974,-3007,-3023,1041,1041,1040,1040,769,769,769,769,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,-767,-1052,-1213,-1277,-1358,-1405,-1469,-1535,-1550,-1582,-1614,-1647,-1662,-1694,-1726,-1759,-1774,-1807,-1822,-1854,-1886,1565,-1919,-1935,-1951,-1967,1731,1730,1580,1717,-1983,1729,1564,-1999,1548,-2015,-2031,1715,1595,-2047,1714,-2063,1610,-2079,1609,-2095,1323,1323,1457,1457,1307,1307,1712,1547,1641,1700,1699,1594,1685,1625,1442,1442,1322,1322,-780,-973,-910,1279,1278,1277,1262,1276,1261,1275,1215,1260,1229,-959,974,974,989,989,-943,735,478,478,495,463,506,414,-1039,1003,958,1017,927,942,987,957,431,476,1272,1167,1228,-1183,1256,-1199,895,895,941,941,1242,1227,1212,1135,1014,1014,490,489,503,487,910,1013,985,925,863,894,970,955,1012,847,-1343,831,755,755,984,909,428,366,754,559,-1391,752,486,457,924,997,698,698,983,893,740,740,908,877,739,739,667,667,953,938,497,287,271,271,683,606,590,712,726,574,302,302,738,736,481,286,526,725,605,711,636,724,696,651,589,681,666,710,364,467,573,695,466,466,301,465,379,379,709,604,665,679,316,316,634,633,436,436,464,269,424,394,452,332,438,363,347,408,393,448,331,422,362,407,392,421,346,406,391,376,375,359,1441,1306,-2367,1290,-2383,1337,-2399,-2415,1426,1321,-2431,1411,1336,-2447,-2463,-2479,1169,1169,1049,1049,1424,1289,1412,1352,1319,-2495,1154,1154,1064,1064,1153,1153,416,390,360,404,403,389,344,374,373,343,358,372,327,357,342,311,356,326,1395,1394,1137,1137,1047,1047,1365,1392,1287,1379,1334,1364,1349,1378,1318,1363,792,792,792,792,1152,1152,1032,1032,1121,1121,1046,1046,1120,1120,1030,1030,-2895,1106,1061,1104,849,849,789,789,1091,1076,1029,1090,1060,1075,833,833,309,324,532,532,832,772,818,803,561,561,531,560,515,546,289,274,288,258,
+ -250,-1179,-1579,-1836,-1996,-2124,-2253,-2333,-2413,-2477,-2542,-2574,-2607,-2622,-2655,1314,1313,1298,1312,1282,785,785,785,785,1040,1040,1025,1025,768,768,768,768,-766,-798,-830,-862,-895,-911,-927,-943,-959,-975,-991,-1007,-1023,-1039,-1055,-1070,1724,1647,-1103,-1119,1631,1767,1662,1738,1708,1723,-1135,1780,1615,1779,1599,1677,1646,1778,1583,-1151,1777,1567,1737,1692,1765,1722,1707,1630,1751,1661,1764,1614,1736,1676,1763,1750,1645,1598,1721,1691,1762,1706,1582,1761,1566,-1167,1749,1629,767,766,751,765,494,494,735,764,719,749,734,763,447,447,748,718,477,506,431,491,446,476,461,505,415,430,475,445,504,399,460,489,414,503,383,474,429,459,502,502,746,752,488,398,501,473,413,472,486,271,480,270,-1439,-1455,1357,-1471,-1487,-1503,1341,1325,-1519,1489,1463,1403,1309,-1535,1372,1448,1418,1476,1356,1462,1387,-1551,1475,1340,1447,1402,1386,-1567,1068,1068,1474,1461,455,380,468,440,395,425,410,454,364,467,466,464,453,269,409,448,268,432,1371,1473,1432,1417,1308,1460,1355,1446,1459,1431,1083,1083,1401,1416,1458,1445,1067,1067,1370,1457,1051,1051,1291,1430,1385,1444,1354,1415,1400,1443,1082,1082,1173,1113,1186,1066,1185,1050,-1967,1158,1128,1172,1097,1171,1081,-1983,1157,1112,416,266,375,400,1170,1142,1127,1065,793,793,1169,1033,1156,1096,1141,1111,1155,1080,1126,1140,898,898,808,808,897,897,792,792,1095,1152,1032,1125,1110,1139,1079,1124,882,807,838,881,853,791,-2319,867,368,263,822,852,837,866,806,865,-2399,851,352,262,534,534,821,836,594,594,549,549,593,593,533,533,848,773,579,579,564,578,548,563,276,276,577,576,306,291,516,560,305,305,275,259,
+ -251,-892,-2058,-2620,-2828,-2957,-3023,-3039,1041,1041,1040,1040,769,769,769,769,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,-511,-527,-543,-559,1530,-575,-591,1528,1527,1407,1526,1391,1023,1023,1023,1023,1525,1375,1268,1268,1103,1103,1087,1087,1039,1039,1523,-604,815,815,815,815,510,495,509,479,508,463,507,447,431,505,415,399,-734,-782,1262,-815,1259,1244,-831,1258,1228,-847,-863,1196,-879,1253,987,987,748,-767,493,493,462,477,414,414,686,669,478,446,461,445,474,429,487,458,412,471,1266,1264,1009,1009,799,799,-1019,-1276,-1452,-1581,-1677,-1757,-1821,-1886,-1933,-1997,1257,1257,1483,1468,1512,1422,1497,1406,1467,1496,1421,1510,1134,1134,1225,1225,1466,1451,1374,1405,1252,1252,1358,1480,1164,1164,1251,1251,1238,1238,1389,1465,-1407,1054,1101,-1423,1207,-1439,830,830,1248,1038,1237,1117,1223,1148,1236,1208,411,426,395,410,379,269,1193,1222,1132,1235,1221,1116,976,976,1192,1162,1177,1220,1131,1191,963,963,-1647,961,780,-1663,558,558,994,993,437,408,393,407,829,978,813,797,947,-1743,721,721,377,392,844,950,828,890,706,706,812,859,796,960,948,843,934,874,571,571,-1919,690,555,689,421,346,539,539,944,779,918,873,932,842,903,888,570,570,931,917,674,674,-2575,1562,-2591,1609,-2607,1654,1322,1322,1441,1441,1696,1546,1683,1593,1669,1624,1426,1426,1321,1321,1639,1680,1425,1425,1305,1305,1545,1668,1608,1623,1667,1592,1638,1666,1320,1320,1652,1607,1409,1409,1304,1304,1288,1288,1664,1637,1395,1395,1335,1335,1622,1636,1394,1394,1319,1319,1606,1621,1392,1392,1137,1137,1137,1137,345,390,360,375,404,373,1047,-2751,-2767,-2783,1062,1121,1046,-2799,1077,-2815,1106,1061,789,789,1105,1104,263,355,310,340,325,354,352,262,339,324,1091,1076,1029,1090,1060,1075,833,833,788,788,1088,1028,818,818,803,803,561,561,531,531,816,771,546,546,289,274,288,258,
+ -253,-317,-381,-446,-478,-509,1279,1279,-811,-1179,-1451,-1756,-1900,-2028,-2189,-2253,-2333,-2414,-2445,-2511,-2526,1313,1298,-2559,1041,1041,1040,1040,1025,1025,1024,1024,1022,1007,1021,991,1020,975,1019,959,687,687,1018,1017,671,671,655,655,1016,1015,639,639,758,758,623,623,757,607,756,591,755,575,754,559,543,543,1009,783,-575,-621,-685,-749,496,-590,750,749,734,748,974,989,1003,958,988,973,1002,942,987,957,972,1001,926,986,941,971,956,1000,910,985,925,999,894,970,-1071,-1087,-1102,1390,-1135,1436,1509,1451,1374,-1151,1405,1358,1480,1420,-1167,1507,1494,1389,1342,1465,1435,1450,1326,1505,1310,1493,1373,1479,1404,1492,1464,1419,428,443,472,397,736,526,464,464,486,457,442,471,484,482,1357,1449,1434,1478,1388,1491,1341,1490,1325,1489,1463,1403,1309,1477,1372,1448,1418,1433,1476,1356,1462,1387,-1439,1475,1340,1447,1402,1474,1324,1461,1371,1473,269,448,1432,1417,1308,1460,-1711,1459,-1727,1441,1099,1099,1446,1386,1431,1401,-1743,1289,1083,1083,1160,1160,1458,1445,1067,1067,1370,1457,1307,1430,1129,1129,1098,1098,268,432,267,416,266,400,-1887,1144,1187,1082,1173,1113,1186,1066,1050,1158,1128,1143,1172,1097,1171,1081,420,391,1157,1112,1170,1142,1127,1065,1169,1049,1156,1096,1141,1111,1155,1080,1126,1154,1064,1153,1140,1095,1048,-2159,1125,1110,1137,-2175,823,823,1139,1138,807,807,384,264,368,263,868,838,853,791,867,822,852,837,866,806,865,790,-2319,851,821,836,352,262,850,805,849,-2399,533,533,835,820,336,261,578,548,563,577,532,532,832,772,562,562,547,547,305,275,560,515,290,290,288,258 };
+ static const uint8_t tab32[] = { 130,162,193,209,44,28,76,140,9,9,9,9,9,9,9,9,190,254,222,238,126,94,157,157,109,61,173,205 };
+ static const uint8_t tab33[] = { 252,236,220,204,188,172,156,140,124,108,92,76,60,44,28,12 };
+ static const int16_t tabindex[2*16] = { 0,32,64,98,0,132,180,218,292,364,426,538,648,746,0,1126,1460,1460,1460,1460,1460,1460,1460,1460,1842,1842,1842,1842,1842,1842,1842,1842 };
+ static const uint8_t g_linbits[] = { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,3,4,6,8,10,13,4,5,6,7,8,9,11,13 };
+
+#define PEEK_BITS(n) (bs_cache >> (32 - n))
+#define FLUSH_BITS(n) { bs_cache <<= (n); bs_sh += (n); }
+#define CHECK_BITS while (bs_sh >= 0) { bs_cache |= (uint32_t)*bs_next_ptr++ << bs_sh; bs_sh -= 8; }
+#define BSPOS ((bs_next_ptr - bs->buf)*8 - 24 + bs_sh)
+
+ float one = 0.0f;
+ int ireg = 0, big_val_cnt = gr_info->big_values;
+ const uint8_t *sfb = gr_info->sfbtab;
+ const uint8_t *bs_next_ptr = bs->buf + bs->pos/8;
+ uint32_t bs_cache = (((bs_next_ptr[0]*256u + bs_next_ptr[1])*256u + bs_next_ptr[2])*256u + bs_next_ptr[3]) << (bs->pos & 7);
+ int pairs_to_decode, np, bs_sh = (bs->pos & 7) - 8;
+ bs_next_ptr += 4;
+
+ while (big_val_cnt > 0)
+ {
+ int tab_num = gr_info->table_select[ireg];
+ int sfb_cnt = gr_info->region_count[ireg++];
+ const int16_t *codebook = tabs + tabindex[tab_num];
+ int linbits = g_linbits[tab_num];
+ if (linbits)
+ {
+ do
+ {
+ np = *sfb++ / 2;
+ pairs_to_decode = MINIMP3_MIN(big_val_cnt, np);
+ one = *scf++;
+ do
+ {
+ int j, w = 5;
+ int leaf = codebook[PEEK_BITS(w)];
+ while (leaf < 0)
+ {
+ FLUSH_BITS(w);
+ w = leaf & 7;
+ leaf = codebook[PEEK_BITS(w) - (leaf >> 3)];
+ }
+ FLUSH_BITS(leaf >> 8);
+
+ for (j = 0; j < 2; j++, dst++, leaf >>= 4)
+ {
+ int lsb = leaf & 0x0F;
+ if (lsb == 15)
+ {
+ lsb += PEEK_BITS(linbits);
+ FLUSH_BITS(linbits);
+ CHECK_BITS;
+ *dst = one*L3_pow_43(lsb)*((int32_t)bs_cache < 0 ? -1: 1);
+ } else
+ {
+ *dst = g_pow43[16 + lsb - 16*(bs_cache >> 31)]*one;
+ }
+ FLUSH_BITS(lsb ? 1 : 0);
+ }
+ CHECK_BITS;
+ } while (--pairs_to_decode);
+ } while ((big_val_cnt -= np) > 0 && --sfb_cnt >= 0);
+ } else
+ {
+ do
+ {
+ np = *sfb++ / 2;
+ pairs_to_decode = MINIMP3_MIN(big_val_cnt, np);
+ one = *scf++;
+ do
+ {
+ int j, w = 5;
+ int leaf = codebook[PEEK_BITS(w)];
+ while (leaf < 0)
+ {
+ FLUSH_BITS(w);
+ w = leaf & 7;
+ leaf = codebook[PEEK_BITS(w) - (leaf >> 3)];
+ }
+ FLUSH_BITS(leaf >> 8);
+
+ for (j = 0; j < 2; j++, dst++, leaf >>= 4)
+ {
+ int lsb = leaf & 0x0F;
+ *dst = g_pow43[16 + lsb - 16*(bs_cache >> 31)]*one;
+ FLUSH_BITS(lsb ? 1 : 0);
+ }
+ CHECK_BITS;
+ } while (--pairs_to_decode);
+ } while ((big_val_cnt -= np) > 0 && --sfb_cnt >= 0);
+ }
+ }
+
+ for (np = 1 - big_val_cnt;; dst += 4)
+ {
+ const uint8_t *codebook_count1 = (gr_info->count1_table) ? tab33 : tab32;
+ int leaf = codebook_count1[PEEK_BITS(4)];
+ if (!(leaf & 8))
+ {
+ leaf = codebook_count1[(leaf >> 3) + (bs_cache << 4 >> (32 - (leaf & 3)))];
+ }
+ FLUSH_BITS(leaf & 7);
+ if (BSPOS > layer3gr_limit)
+ {
+ break;
+ }
+#define RELOAD_SCALEFACTOR if (!--np) { np = *sfb++/2; if (!np) break; one = *scf++; }
+#define DEQ_COUNT1(s) if (leaf & (128 >> s)) { dst[s] = ((int32_t)bs_cache < 0) ? -one : one; FLUSH_BITS(1) }
+ RELOAD_SCALEFACTOR;
+ DEQ_COUNT1(0);
+ DEQ_COUNT1(1);
+ RELOAD_SCALEFACTOR;
+ DEQ_COUNT1(2);
+ DEQ_COUNT1(3);
+ CHECK_BITS;
+ }
+
+ bs->pos = layer3gr_limit;
+}
+
+static void L3_midside_stereo(float *left, int n)
+{
+ int i = 0;
+ float *right = left + 576;
+#if HAVE_SIMD
+ if (have_simd())
+ {
+ for (; i < n - 3; i += 4)
+ {
+ f4 vl = VLD(left + i);
+ f4 vr = VLD(right + i);
+ VSTORE(left + i, VADD(vl, vr));
+ VSTORE(right + i, VSUB(vl, vr));
+ }
+#ifdef __GNUC__
+ /* Workaround for spurious -Waggressive-loop-optimizations warning from gcc.
+ * For more info see: https://github.com/lieff/minimp3/issues/88
+ */
+ if (__builtin_constant_p(n % 4 == 0) && n % 4 == 0)
+ return;
+#endif
+ }
+#endif /* HAVE_SIMD */
+ for (; i < n; i++)
+ {
+ float a = left[i];
+ float b = right[i];
+ left[i] = a + b;
+ right[i] = a - b;
+ }
+}
+
+static void L3_intensity_stereo_band(float *left, int n, float kl, float kr)
+{
+ int i;
+ for (i = 0; i < n; i++)
+ {
+ left[i + 576] = left[i]*kr;
+ left[i] = left[i]*kl;
+ }
+}
+
+static void L3_stereo_top_band(const float *right, const uint8_t *sfb, int nbands, int max_band[3])
+{
+ int i, k;
+
+ max_band[0] = max_band[1] = max_band[2] = -1;
+
+ for (i = 0; i < nbands; i++)
+ {
+ for (k = 0; k < sfb[i]; k += 2)
+ {
+ if (right[k] != 0 || right[k + 1] != 0)
+ {
+ max_band[i % 3] = i;
+ break;
+ }
+ }
+ right += sfb[i];
+ }
+}
+
+static void L3_stereo_process(float *left, const uint8_t *ist_pos, const uint8_t *sfb, const uint8_t *hdr, int max_band[3], int mpeg2_sh)
+{
+ static const float g_pan[7*2] = { 0,1,0.21132487f,0.78867513f,0.36602540f,0.63397460f,0.5f,0.5f,0.63397460f,0.36602540f,0.78867513f,0.21132487f,1,0 };
+ unsigned i, max_pos = HDR_TEST_MPEG1(hdr) ? 7 : 64;
+
+ for (i = 0; sfb[i]; i++)
+ {
+ unsigned ipos = ist_pos[i];
+ if ((int)i > max_band[i % 3] && ipos < max_pos)
+ {
+ float kl, kr, s = HDR_TEST_MS_STEREO(hdr) ? 1.41421356f : 1;
+ if (HDR_TEST_MPEG1(hdr))
+ {
+ kl = g_pan[2*ipos];
+ kr = g_pan[2*ipos + 1];
+ } else
+ {
+ kl = 1;
+ kr = L3_ldexp_q2(1, (ipos + 1) >> 1 << mpeg2_sh);
+ if (ipos & 1)
+ {
+ kl = kr;
+ kr = 1;
+ }
+ }
+ L3_intensity_stereo_band(left, sfb[i], kl*s, kr*s);
+ } else if (HDR_TEST_MS_STEREO(hdr))
+ {
+ L3_midside_stereo(left, sfb[i]);
+ }
+ left += sfb[i];
+ }
+}
+
+static void L3_intensity_stereo(float *left, uint8_t *ist_pos, const L3_gr_info_t *gr, const uint8_t *hdr)
+{
+ int max_band[3], n_sfb = gr->n_long_sfb + gr->n_short_sfb;
+ int i, max_blocks = gr->n_short_sfb ? 3 : 1;
+
+ L3_stereo_top_band(left + 576, gr->sfbtab, n_sfb, max_band);
+ if (gr->n_long_sfb)
+ {
+ max_band[0] = max_band[1] = max_band[2] = MINIMP3_MAX(MINIMP3_MAX(max_band[0], max_band[1]), max_band[2]);
+ }
+ for (i = 0; i < max_blocks; i++)
+ {
+ int default_pos = HDR_TEST_MPEG1(hdr) ? 3 : 0;
+ int itop = n_sfb - max_blocks + i;
+ int prev = itop - max_blocks;
+ ist_pos[itop] = max_band[i] >= prev ? default_pos : ist_pos[prev];
+ }
+ L3_stereo_process(left, ist_pos, gr->sfbtab, hdr, max_band, gr[1].scalefac_compress & 1);
+}
+
+static void L3_reorder(float *grbuf, float *scratch, const uint8_t *sfb)
+{
+ int i, len;
+ float *src = grbuf, *dst = scratch;
+
+ for (;0 != (len = *sfb); sfb += 3, src += 2*len)
+ {
+ for (i = 0; i < len; i++, src++)
+ {
+ *dst++ = src[0*len];
+ *dst++ = src[1*len];
+ *dst++ = src[2*len];
+ }
+ }
+ memcpy(grbuf, scratch, (dst - scratch)*sizeof(float));
+}
+
+static void L3_antialias(float *grbuf, int nbands)
+{
+ static const float g_aa[2][8] = {
+ {0.85749293f,0.88174200f,0.94962865f,0.98331459f,0.99551782f,0.99916056f,0.99989920f,0.99999316f},
+ {0.51449576f,0.47173197f,0.31337745f,0.18191320f,0.09457419f,0.04096558f,0.01419856f,0.00369997f}
+ };
+
+ for (; nbands > 0; nbands--, grbuf += 18)
+ {
+ int i = 0;
+#if HAVE_SIMD
+ if (have_simd()) for (; i < 8; i += 4)
+ {
+ f4 vu = VLD(grbuf + 18 + i);
+ f4 vd = VLD(grbuf + 14 - i);
+ f4 vc0 = VLD(g_aa[0] + i);
+ f4 vc1 = VLD(g_aa[1] + i);
+ vd = VREV(vd);
+ VSTORE(grbuf + 18 + i, VSUB(VMUL(vu, vc0), VMUL(vd, vc1)));
+ vd = VADD(VMUL(vu, vc1), VMUL(vd, vc0));
+ VSTORE(grbuf + 14 - i, VREV(vd));
+ }
+#endif /* HAVE_SIMD */
+#ifndef MINIMP3_ONLY_SIMD
+ for(; i < 8; i++)
+ {
+ float u = grbuf[18 + i];
+ float d = grbuf[17 - i];
+ grbuf[18 + i] = u*g_aa[0][i] - d*g_aa[1][i];
+ grbuf[17 - i] = u*g_aa[1][i] + d*g_aa[0][i];
+ }
+#endif /* MINIMP3_ONLY_SIMD */
+ }
+}
+
+static void L3_dct3_9(float *y)
+{
+ float s0, s1, s2, s3, s4, s5, s6, s7, s8, t0, t2, t4;
+
+ s0 = y[0]; s2 = y[2]; s4 = y[4]; s6 = y[6]; s8 = y[8];
+ t0 = s0 + s6*0.5f;
+ s0 -= s6;
+ t4 = (s4 + s2)*0.93969262f;
+ t2 = (s8 + s2)*0.76604444f;
+ s6 = (s4 - s8)*0.17364818f;
+ s4 += s8 - s2;
+
+ s2 = s0 - s4*0.5f;
+ y[4] = s4 + s0;
+ s8 = t0 - t2 + s6;
+ s0 = t0 - t4 + t2;
+ s4 = t0 + t4 - s6;
+
+ s1 = y[1]; s3 = y[3]; s5 = y[5]; s7 = y[7];
+
+ s3 *= 0.86602540f;
+ t0 = (s5 + s1)*0.98480775f;
+ t4 = (s5 - s7)*0.34202014f;
+ t2 = (s1 + s7)*0.64278761f;
+ s1 = (s1 - s5 - s7)*0.86602540f;
+
+ s5 = t0 - s3 - t2;
+ s7 = t4 - s3 - t0;
+ s3 = t4 + s3 - t2;
+
+ y[0] = s4 - s7;
+ y[1] = s2 + s1;
+ y[2] = s0 - s3;
+ y[3] = s8 + s5;
+ y[5] = s8 - s5;
+ y[6] = s0 + s3;
+ y[7] = s2 - s1;
+ y[8] = s4 + s7;
+}
+
+static void L3_imdct36(float *grbuf, float *overlap, const float *window, int nbands)
+{
+ int i, j;
+ static const float g_twid9[18] = {
+ 0.73727734f,0.79335334f,0.84339145f,0.88701083f,0.92387953f,0.95371695f,0.97629601f,0.99144486f,0.99904822f,0.67559021f,0.60876143f,0.53729961f,0.46174861f,0.38268343f,0.30070580f,0.21643961f,0.13052619f,0.04361938f
+ };
+
+ for (j = 0; j < nbands; j++, grbuf += 18, overlap += 9)
+ {
+ float co[9], si[9];
+ co[0] = -grbuf[0];
+ si[0] = grbuf[17];
+ for (i = 0; i < 4; i++)
+ {
+ si[8 - 2*i] = grbuf[4*i + 1] - grbuf[4*i + 2];
+ co[1 + 2*i] = grbuf[4*i + 1] + grbuf[4*i + 2];
+ si[7 - 2*i] = grbuf[4*i + 4] - grbuf[4*i + 3];
+ co[2 + 2*i] = -(grbuf[4*i + 3] + grbuf[4*i + 4]);
+ }
+ L3_dct3_9(co);
+ L3_dct3_9(si);
+
+ si[1] = -si[1];
+ si[3] = -si[3];
+ si[5] = -si[5];
+ si[7] = -si[7];
+
+ i = 0;
+
+#if HAVE_SIMD
+ if (have_simd()) for (; i < 8; i += 4)
+ {
+ f4 vovl = VLD(overlap + i);
+ f4 vc = VLD(co + i);
+ f4 vs = VLD(si + i);
+ f4 vr0 = VLD(g_twid9 + i);
+ f4 vr1 = VLD(g_twid9 + 9 + i);
+ f4 vw0 = VLD(window + i);
+ f4 vw1 = VLD(window + 9 + i);
+ f4 vsum = VADD(VMUL(vc, vr1), VMUL(vs, vr0));
+ VSTORE(overlap + i, VSUB(VMUL(vc, vr0), VMUL(vs, vr1)));
+ VSTORE(grbuf + i, VSUB(VMUL(vovl, vw0), VMUL(vsum, vw1)));
+ vsum = VADD(VMUL(vovl, vw1), VMUL(vsum, vw0));
+ VSTORE(grbuf + 14 - i, VREV(vsum));
+ }
+#endif /* HAVE_SIMD */
+ for (; i < 9; i++)
+ {
+ float ovl = overlap[i];
+ float sum = co[i]*g_twid9[9 + i] + si[i]*g_twid9[0 + i];
+ overlap[i] = co[i]*g_twid9[0 + i] - si[i]*g_twid9[9 + i];
+ grbuf[i] = ovl*window[0 + i] - sum*window[9 + i];
+ grbuf[17 - i] = ovl*window[9 + i] + sum*window[0 + i];
+ }
+ }
+}
+
+static void L3_idct3(float x0, float x1, float x2, float *dst)
+{
+ float m1 = x1*0.86602540f;
+ float a1 = x0 - x2*0.5f;
+ dst[1] = x0 + x2;
+ dst[0] = a1 + m1;
+ dst[2] = a1 - m1;
+}
+
+static void L3_imdct12(float *x, float *dst, float *overlap)
+{
+ static const float g_twid3[6] = { 0.79335334f,0.92387953f,0.99144486f, 0.60876143f,0.38268343f,0.13052619f };
+ float co[3], si[3];
+ int i;
+
+ L3_idct3(-x[0], x[6] + x[3], x[12] + x[9], co);
+ L3_idct3(x[15], x[12] - x[9], x[6] - x[3], si);
+ si[1] = -si[1];
+
+ for (i = 0; i < 3; i++)
+ {
+ float ovl = overlap[i];
+ float sum = co[i]*g_twid3[3 + i] + si[i]*g_twid3[0 + i];
+ overlap[i] = co[i]*g_twid3[0 + i] - si[i]*g_twid3[3 + i];
+ dst[i] = ovl*g_twid3[2 - i] - sum*g_twid3[5 - i];
+ dst[5 - i] = ovl*g_twid3[5 - i] + sum*g_twid3[2 - i];
+ }
+}
+
+static void L3_imdct_short(float *grbuf, float *overlap, int nbands)
+{
+ for (;nbands > 0; nbands--, overlap += 9, grbuf += 18)
+ {
+ float tmp[18];
+ memcpy(tmp, grbuf, sizeof(tmp));
+ memcpy(grbuf, overlap, 6*sizeof(float));
+ L3_imdct12(tmp, grbuf + 6, overlap + 6);
+ L3_imdct12(tmp + 1, grbuf + 12, overlap + 6);
+ L3_imdct12(tmp + 2, overlap, overlap + 6);
+ }
+}
+
+static void L3_change_sign(float *grbuf)
+{
+ int b, i;
+ for (b = 0, grbuf += 18; b < 32; b += 2, grbuf += 36)
+ for (i = 1; i < 18; i += 2)
+ grbuf[i] = -grbuf[i];
+}
+
+static void L3_imdct_gr(float *grbuf, float *overlap, unsigned block_type, unsigned n_long_bands)
+{
+ static const float g_mdct_window[2][18] = {
+ { 0.99904822f,0.99144486f,0.97629601f,0.95371695f,0.92387953f,0.88701083f,0.84339145f,0.79335334f,0.73727734f,0.04361938f,0.13052619f,0.21643961f,0.30070580f,0.38268343f,0.46174861f,0.53729961f,0.60876143f,0.67559021f },
+ { 1,1,1,1,1,1,0.99144486f,0.92387953f,0.79335334f,0,0,0,0,0,0,0.13052619f,0.38268343f,0.60876143f }
+ };
+ if (n_long_bands)
+ {
+ L3_imdct36(grbuf, overlap, g_mdct_window[0], n_long_bands);
+ grbuf += 18*n_long_bands;
+ overlap += 9*n_long_bands;
+ }
+ if (block_type == SHORT_BLOCK_TYPE)
+ L3_imdct_short(grbuf, overlap, 32 - n_long_bands);
+ else
+ L3_imdct36(grbuf, overlap, g_mdct_window[block_type == STOP_BLOCK_TYPE], 32 - n_long_bands);
+}
+
+static void L3_save_reservoir(mp3dec_t *h, mp3dec_scratch_t *s)
+{
+ int pos = (s->bs.pos + 7)/8u;
+ int remains = s->bs.limit/8u - pos;
+ if (remains > MAX_BITRESERVOIR_BYTES)
+ {
+ pos += remains - MAX_BITRESERVOIR_BYTES;
+ remains = MAX_BITRESERVOIR_BYTES;
+ }
+ if (remains > 0)
+ {
+ memmove(h->reserv_buf, s->maindata + pos, remains);
+ }
+ h->reserv = remains;
+}
+
+static int L3_restore_reservoir(mp3dec_t *h, bs_t *bs, mp3dec_scratch_t *s, int main_data_begin)
+{
+ int frame_bytes = (bs->limit - bs->pos)/8;
+ int bytes_have = MINIMP3_MIN(h->reserv, main_data_begin);
+ memcpy(s->maindata, h->reserv_buf + MINIMP3_MAX(0, h->reserv - main_data_begin), MINIMP3_MIN(h->reserv, main_data_begin));
+ memcpy(s->maindata + bytes_have, bs->buf + bs->pos/8, frame_bytes);
+ bs_init(&s->bs, s->maindata, bytes_have + frame_bytes);
+ return h->reserv >= main_data_begin;
+}
+
+static void L3_decode(mp3dec_t *h, mp3dec_scratch_t *s, L3_gr_info_t *gr_info, int nch)
+{
+ int ch;
+
+ for (ch = 0; ch < nch; ch++)
+ {
+ int layer3gr_limit = s->bs.pos + gr_info[ch].part_23_length;
+ L3_decode_scalefactors(h->header, s->ist_pos[ch], &s->bs, gr_info + ch, s->scf, ch);
+ L3_huffman(s->grbuf[ch], &s->bs, gr_info + ch, s->scf, layer3gr_limit);
+ }
+
+ if (HDR_TEST_I_STEREO(h->header))
+ {
+ L3_intensity_stereo(s->grbuf[0], s->ist_pos[1], gr_info, h->header);
+ } else if (HDR_IS_MS_STEREO(h->header))
+ {
+ L3_midside_stereo(s->grbuf[0], 576);
+ }
+
+ for (ch = 0; ch < nch; ch++, gr_info++)
+ {
+ int aa_bands = 31;
+ int n_long_bands = (gr_info->mixed_block_flag ? 2 : 0) << (int)(HDR_GET_MY_SAMPLE_RATE(h->header) == 2);
+
+ if (gr_info->n_short_sfb)
+ {
+ aa_bands = n_long_bands - 1;
+ L3_reorder(s->grbuf[ch] + n_long_bands*18, s->syn[0], gr_info->sfbtab + gr_info->n_long_sfb);
+ }
+
+ L3_antialias(s->grbuf[ch], aa_bands);
+ L3_imdct_gr(s->grbuf[ch], h->mdct_overlap[ch], gr_info->block_type, n_long_bands);
+ L3_change_sign(s->grbuf[ch]);
+ }
+}
+
+static void mp3d_DCT_II(float *grbuf, int n)
+{
+ static const float g_sec[24] = {
+ 10.19000816f,0.50060302f,0.50241929f,3.40760851f,0.50547093f,0.52249861f,2.05778098f,0.51544732f,0.56694406f,1.48416460f,0.53104258f,0.64682180f,1.16943991f,0.55310392f,0.78815460f,0.97256821f,0.58293498f,1.06067765f,0.83934963f,0.62250412f,1.72244716f,0.74453628f,0.67480832f,5.10114861f
+ };
+ int i, k = 0;
+#if HAVE_SIMD
+ if (have_simd()) for (; k < n; k += 4)
+ {
+ f4 t[4][8], *x;
+ float *y = grbuf + k;
+
+ for (x = t[0], i = 0; i < 8; i++, x++)
+ {
+ f4 x0 = VLD(&y[i*18]);
+ f4 x1 = VLD(&y[(15 - i)*18]);
+ f4 x2 = VLD(&y[(16 + i)*18]);
+ f4 x3 = VLD(&y[(31 - i)*18]);
+ f4 t0 = VADD(x0, x3);
+ f4 t1 = VADD(x1, x2);
+ f4 t2 = VMUL_S(VSUB(x1, x2), g_sec[3*i + 0]);
+ f4 t3 = VMUL_S(VSUB(x0, x3), g_sec[3*i + 1]);
+ x[0] = VADD(t0, t1);
+ x[8] = VMUL_S(VSUB(t0, t1), g_sec[3*i + 2]);
+ x[16] = VADD(t3, t2);
+ x[24] = VMUL_S(VSUB(t3, t2), g_sec[3*i + 2]);
+ }
+ for (x = t[0], i = 0; i < 4; i++, x += 8)
+ {
+ f4 x0 = x[0], x1 = x[1], x2 = x[2], x3 = x[3], x4 = x[4], x5 = x[5], x6 = x[6], x7 = x[7], xt;
+ xt = VSUB(x0, x7); x0 = VADD(x0, x7);
+ x7 = VSUB(x1, x6); x1 = VADD(x1, x6);
+ x6 = VSUB(x2, x5); x2 = VADD(x2, x5);
+ x5 = VSUB(x3, x4); x3 = VADD(x3, x4);
+ x4 = VSUB(x0, x3); x0 = VADD(x0, x3);
+ x3 = VSUB(x1, x2); x1 = VADD(x1, x2);
+ x[0] = VADD(x0, x1);
+ x[4] = VMUL_S(VSUB(x0, x1), 0.70710677f);
+ x5 = VADD(x5, x6);
+ x6 = VMUL_S(VADD(x6, x7), 0.70710677f);
+ x7 = VADD(x7, xt);
+ x3 = VMUL_S(VADD(x3, x4), 0.70710677f);
+ x5 = VSUB(x5, VMUL_S(x7, 0.198912367f)); /* rotate by PI/8 */
+ x7 = VADD(x7, VMUL_S(x5, 0.382683432f));
+ x5 = VSUB(x5, VMUL_S(x7, 0.198912367f));
+ x0 = VSUB(xt, x6); xt = VADD(xt, x6);
+ x[1] = VMUL_S(VADD(xt, x7), 0.50979561f);
+ x[2] = VMUL_S(VADD(x4, x3), 0.54119611f);
+ x[3] = VMUL_S(VSUB(x0, x5), 0.60134488f);
+ x[5] = VMUL_S(VADD(x0, x5), 0.89997619f);
+ x[6] = VMUL_S(VSUB(x4, x3), 1.30656302f);
+ x[7] = VMUL_S(VSUB(xt, x7), 2.56291556f);
+ }
+
+ if (k > n - 3)
+ {
+#if HAVE_SSE
+#define VSAVE2(i, v) _mm_storel_pi((__m64 *)(void*)&y[i*18], v)
+#else /* HAVE_SSE */
+#define VSAVE2(i, v) vst1_f32((float32_t *)&y[i*18], vget_low_f32(v))
+#endif /* HAVE_SSE */
+ for (i = 0; i < 7; i++, y += 4*18)
+ {
+ f4 s = VADD(t[3][i], t[3][i + 1]);
+ VSAVE2(0, t[0][i]);
+ VSAVE2(1, VADD(t[2][i], s));
+ VSAVE2(2, VADD(t[1][i], t[1][i + 1]));
+ VSAVE2(3, VADD(t[2][1 + i], s));
+ }
+ VSAVE2(0, t[0][7]);
+ VSAVE2(1, VADD(t[2][7], t[3][7]));
+ VSAVE2(2, t[1][7]);
+ VSAVE2(3, t[3][7]);
+ } else
+ {
+#define VSAVE4(i, v) VSTORE(&y[i*18], v)
+ for (i = 0; i < 7; i++, y += 4*18)
+ {
+ f4 s = VADD(t[3][i], t[3][i + 1]);
+ VSAVE4(0, t[0][i]);
+ VSAVE4(1, VADD(t[2][i], s));
+ VSAVE4(2, VADD(t[1][i], t[1][i + 1]));
+ VSAVE4(3, VADD(t[2][1 + i], s));
+ }
+ VSAVE4(0, t[0][7]);
+ VSAVE4(1, VADD(t[2][7], t[3][7]));
+ VSAVE4(2, t[1][7]);
+ VSAVE4(3, t[3][7]);
+ }
+ } else
+#endif /* HAVE_SIMD */
+#ifdef MINIMP3_ONLY_SIMD
+ {} /* for HAVE_SIMD=1, MINIMP3_ONLY_SIMD=1 case we do not need non-intrinsic "else" branch */
+#else /* MINIMP3_ONLY_SIMD */
+ for (; k < n; k++)
+ {
+ float t[4][8], *x, *y = grbuf + k;
+
+ for (x = t[0], i = 0; i < 8; i++, x++)
+ {
+ float x0 = y[i*18];
+ float x1 = y[(15 - i)*18];
+ float x2 = y[(16 + i)*18];
+ float x3 = y[(31 - i)*18];
+ float t0 = x0 + x3;
+ float t1 = x1 + x2;
+ float t2 = (x1 - x2)*g_sec[3*i + 0];
+ float t3 = (x0 - x3)*g_sec[3*i + 1];
+ x[0] = t0 + t1;
+ x[8] = (t0 - t1)*g_sec[3*i + 2];
+ x[16] = t3 + t2;
+ x[24] = (t3 - t2)*g_sec[3*i + 2];
+ }
+ for (x = t[0], i = 0; i < 4; i++, x += 8)
+ {
+ float x0 = x[0], x1 = x[1], x2 = x[2], x3 = x[3], x4 = x[4], x5 = x[5], x6 = x[6], x7 = x[7], xt;
+ xt = x0 - x7; x0 += x7;
+ x7 = x1 - x6; x1 += x6;
+ x6 = x2 - x5; x2 += x5;
+ x5 = x3 - x4; x3 += x4;
+ x4 = x0 - x3; x0 += x3;
+ x3 = x1 - x2; x1 += x2;
+ x[0] = x0 + x1;
+ x[4] = (x0 - x1)*0.70710677f;
+ x5 = x5 + x6;
+ x6 = (x6 + x7)*0.70710677f;
+ x7 = x7 + xt;
+ x3 = (x3 + x4)*0.70710677f;
+ x5 -= x7*0.198912367f; /* rotate by PI/8 */
+ x7 += x5*0.382683432f;
+ x5 -= x7*0.198912367f;
+ x0 = xt - x6; xt += x6;
+ x[1] = (xt + x7)*0.50979561f;
+ x[2] = (x4 + x3)*0.54119611f;
+ x[3] = (x0 - x5)*0.60134488f;
+ x[5] = (x0 + x5)*0.89997619f;
+ x[6] = (x4 - x3)*1.30656302f;
+ x[7] = (xt - x7)*2.56291556f;
+
+ }
+ for (i = 0; i < 7; i++, y += 4*18)
+ {
+ y[0*18] = t[0][i];
+ y[1*18] = t[2][i] + t[3][i] + t[3][i + 1];
+ y[2*18] = t[1][i] + t[1][i + 1];
+ y[3*18] = t[2][i + 1] + t[3][i] + t[3][i + 1];
+ }
+ y[0*18] = t[0][7];
+ y[1*18] = t[2][7] + t[3][7];
+ y[2*18] = t[1][7];
+ y[3*18] = t[3][7];
+ }
+#endif /* MINIMP3_ONLY_SIMD */
+}
+
+#ifndef MINIMP3_FLOAT_OUTPUT
+static int16_t mp3d_scale_pcm(float sample)
+{
+#if HAVE_ARMV6
+ int32_t s32 = (int32_t)(sample + .5f);
+ s32 -= (s32 < 0);
+ int16_t s = (int16_t)minimp3_clip_int16_arm(s32);
+#else
+ if (sample >= 32766.5) return (int16_t) 32767;
+ if (sample <= -32767.5) return (int16_t)-32768;
+ int16_t s = (int16_t)(sample + .5f);
+ s -= (s < 0); /* away from zero, to be compliant */
+#endif
+ return s;
+}
+#else /* MINIMP3_FLOAT_OUTPUT */
+static float mp3d_scale_pcm(float sample)
+{
+ return sample*(1.f/32768.f);
+}
+#endif /* MINIMP3_FLOAT_OUTPUT */
+
+static void mp3d_synth_pair(mp3d_sample_t *pcm, int nch, const float *z)
+{
+ float a;
+ a = (z[14*64] - z[ 0]) * 29;
+ a += (z[ 1*64] + z[13*64]) * 213;
+ a += (z[12*64] - z[ 2*64]) * 459;
+ a += (z[ 3*64] + z[11*64]) * 2037;
+ a += (z[10*64] - z[ 4*64]) * 5153;
+ a += (z[ 5*64] + z[ 9*64]) * 6574;
+ a += (z[ 8*64] - z[ 6*64]) * 37489;
+ a += z[ 7*64] * 75038;
+ pcm[0] = mp3d_scale_pcm(a);
+
+ z += 2;
+ a = z[14*64] * 104;
+ a += z[12*64] * 1567;
+ a += z[10*64] * 9727;
+ a += z[ 8*64] * 64019;
+ a += z[ 6*64] * -9975;
+ a += z[ 4*64] * -45;
+ a += z[ 2*64] * 146;
+ a += z[ 0*64] * -5;
+ pcm[16*nch] = mp3d_scale_pcm(a);
+}
+
+static void mp3d_synth(float *xl, mp3d_sample_t *dstl, int nch, float *lins)
+{
+ int i;
+ float *xr = xl + 576*(nch - 1);
+ mp3d_sample_t *dstr = dstl + (nch - 1);
+
+ static const float g_win[] = {
+ -1,26,-31,208,218,401,-519,2063,2000,4788,-5517,7134,5959,35640,-39336,74992,
+ -1,24,-35,202,222,347,-581,2080,1952,4425,-5879,7640,5288,33791,-41176,74856,
+ -1,21,-38,196,225,294,-645,2087,1893,4063,-6237,8092,4561,31947,-43006,74630,
+ -1,19,-41,190,227,244,-711,2085,1822,3705,-6589,8492,3776,30112,-44821,74313,
+ -1,17,-45,183,228,197,-779,2075,1739,3351,-6935,8840,2935,28289,-46617,73908,
+ -1,16,-49,176,228,153,-848,2057,1644,3004,-7271,9139,2037,26482,-48390,73415,
+ -2,14,-53,169,227,111,-919,2032,1535,2663,-7597,9389,1082,24694,-50137,72835,
+ -2,13,-58,161,224,72,-991,2001,1414,2330,-7910,9592,70,22929,-51853,72169,
+ -2,11,-63,154,221,36,-1064,1962,1280,2006,-8209,9750,-998,21189,-53534,71420,
+ -2,10,-68,147,215,2,-1137,1919,1131,1692,-8491,9863,-2122,19478,-55178,70590,
+ -3,9,-73,139,208,-29,-1210,1870,970,1388,-8755,9935,-3300,17799,-56778,69679,
+ -3,8,-79,132,200,-57,-1283,1817,794,1095,-8998,9966,-4533,16155,-58333,68692,
+ -4,7,-85,125,189,-83,-1356,1759,605,814,-9219,9959,-5818,14548,-59838,67629,
+ -4,7,-91,117,177,-106,-1428,1698,402,545,-9416,9916,-7154,12980,-61289,66494,
+ -5,6,-97,111,163,-127,-1498,1634,185,288,-9585,9838,-8540,11455,-62684,65290
+ };
+ float *zlin = lins + 15*64;
+ const float *w = g_win;
+
+ zlin[4*15] = xl[18*16];
+ zlin[4*15 + 1] = xr[18*16];
+ zlin[4*15 + 2] = xl[0];
+ zlin[4*15 + 3] = xr[0];
+
+ zlin[4*31] = xl[1 + 18*16];
+ zlin[4*31 + 1] = xr[1 + 18*16];
+ zlin[4*31 + 2] = xl[1];
+ zlin[4*31 + 3] = xr[1];
+
+ mp3d_synth_pair(dstr, nch, lins + 4*15 + 1);
+ mp3d_synth_pair(dstr + 32*nch, nch, lins + 4*15 + 64 + 1);
+ mp3d_synth_pair(dstl, nch, lins + 4*15);
+ mp3d_synth_pair(dstl + 32*nch, nch, lins + 4*15 + 64);
+
+#if HAVE_SIMD
+ if (have_simd()) for (i = 14; i >= 0; i--)
+ {
+#define VLOAD(k) f4 w0 = VSET(*w++); f4 w1 = VSET(*w++); f4 vz = VLD(&zlin[4*i - 64*k]); f4 vy = VLD(&zlin[4*i - 64*(15 - k)]);
+#define V0(k) { VLOAD(k) b = VADD(VMUL(vz, w1), VMUL(vy, w0)) ; a = VSUB(VMUL(vz, w0), VMUL(vy, w1)); }
+#define V1(k) { VLOAD(k) b = VADD(b, VADD(VMUL(vz, w1), VMUL(vy, w0))); a = VADD(a, VSUB(VMUL(vz, w0), VMUL(vy, w1))); }
+#define V2(k) { VLOAD(k) b = VADD(b, VADD(VMUL(vz, w1), VMUL(vy, w0))); a = VADD(a, VSUB(VMUL(vy, w1), VMUL(vz, w0))); }
+ f4 a, b;
+ zlin[4*i] = xl[18*(31 - i)];
+ zlin[4*i + 1] = xr[18*(31 - i)];
+ zlin[4*i + 2] = xl[1 + 18*(31 - i)];
+ zlin[4*i + 3] = xr[1 + 18*(31 - i)];
+ zlin[4*i + 64] = xl[1 + 18*(1 + i)];
+ zlin[4*i + 64 + 1] = xr[1 + 18*(1 + i)];
+ zlin[4*i - 64 + 2] = xl[18*(1 + i)];
+ zlin[4*i - 64 + 3] = xr[18*(1 + i)];
+
+ V0(0) V2(1) V1(2) V2(3) V1(4) V2(5) V1(6) V2(7)
+
+ {
+#ifndef MINIMP3_FLOAT_OUTPUT
+#if HAVE_SSE
+ static const f4 g_max = { 32767.0f, 32767.0f, 32767.0f, 32767.0f };
+ static const f4 g_min = { -32768.0f, -32768.0f, -32768.0f, -32768.0f };
+ __m128i pcm8 = _mm_packs_epi32(_mm_cvtps_epi32(_mm_max_ps(_mm_min_ps(a, g_max), g_min)),
+ _mm_cvtps_epi32(_mm_max_ps(_mm_min_ps(b, g_max), g_min)));
+ dstr[(15 - i)*nch] = _mm_extract_epi16(pcm8, 1);
+ dstr[(17 + i)*nch] = _mm_extract_epi16(pcm8, 5);
+ dstl[(15 - i)*nch] = _mm_extract_epi16(pcm8, 0);
+ dstl[(17 + i)*nch] = _mm_extract_epi16(pcm8, 4);
+ dstr[(47 - i)*nch] = _mm_extract_epi16(pcm8, 3);
+ dstr[(49 + i)*nch] = _mm_extract_epi16(pcm8, 7);
+ dstl[(47 - i)*nch] = _mm_extract_epi16(pcm8, 2);
+ dstl[(49 + i)*nch] = _mm_extract_epi16(pcm8, 6);
+#else /* HAVE_SSE */
+ int16x4_t pcma, pcmb;
+ a = VADD(a, VSET(0.5f));
+ b = VADD(b, VSET(0.5f));
+ pcma = vqmovn_s32(vqaddq_s32(vcvtq_s32_f32(a), vreinterpretq_s32_u32(vcltq_f32(a, VSET(0)))));
+ pcmb = vqmovn_s32(vqaddq_s32(vcvtq_s32_f32(b), vreinterpretq_s32_u32(vcltq_f32(b, VSET(0)))));
+ vst1_lane_s16(dstr + (15 - i)*nch, pcma, 1);
+ vst1_lane_s16(dstr + (17 + i)*nch, pcmb, 1);
+ vst1_lane_s16(dstl + (15 - i)*nch, pcma, 0);
+ vst1_lane_s16(dstl + (17 + i)*nch, pcmb, 0);
+ vst1_lane_s16(dstr + (47 - i)*nch, pcma, 3);
+ vst1_lane_s16(dstr + (49 + i)*nch, pcmb, 3);
+ vst1_lane_s16(dstl + (47 - i)*nch, pcma, 2);
+ vst1_lane_s16(dstl + (49 + i)*nch, pcmb, 2);
+#endif /* HAVE_SSE */
+
+#else /* MINIMP3_FLOAT_OUTPUT */
+
+ static const f4 g_scale = { 1.0f/32768.0f, 1.0f/32768.0f, 1.0f/32768.0f, 1.0f/32768.0f };
+ a = VMUL(a, g_scale);
+ b = VMUL(b, g_scale);
+#if HAVE_SSE
+ _mm_store_ss(dstr + (15 - i)*nch, _mm_shuffle_ps(a, a, _MM_SHUFFLE(1, 1, 1, 1)));
+ _mm_store_ss(dstr + (17 + i)*nch, _mm_shuffle_ps(b, b, _MM_SHUFFLE(1, 1, 1, 1)));
+ _mm_store_ss(dstl + (15 - i)*nch, _mm_shuffle_ps(a, a, _MM_SHUFFLE(0, 0, 0, 0)));
+ _mm_store_ss(dstl + (17 + i)*nch, _mm_shuffle_ps(b, b, _MM_SHUFFLE(0, 0, 0, 0)));
+ _mm_store_ss(dstr + (47 - i)*nch, _mm_shuffle_ps(a, a, _MM_SHUFFLE(3, 3, 3, 3)));
+ _mm_store_ss(dstr + (49 + i)*nch, _mm_shuffle_ps(b, b, _MM_SHUFFLE(3, 3, 3, 3)));
+ _mm_store_ss(dstl + (47 - i)*nch, _mm_shuffle_ps(a, a, _MM_SHUFFLE(2, 2, 2, 2)));
+ _mm_store_ss(dstl + (49 + i)*nch, _mm_shuffle_ps(b, b, _MM_SHUFFLE(2, 2, 2, 2)));
+#else /* HAVE_SSE */
+ vst1q_lane_f32(dstr + (15 - i)*nch, a, 1);
+ vst1q_lane_f32(dstr + (17 + i)*nch, b, 1);
+ vst1q_lane_f32(dstl + (15 - i)*nch, a, 0);
+ vst1q_lane_f32(dstl + (17 + i)*nch, b, 0);
+ vst1q_lane_f32(dstr + (47 - i)*nch, a, 3);
+ vst1q_lane_f32(dstr + (49 + i)*nch, b, 3);
+ vst1q_lane_f32(dstl + (47 - i)*nch, a, 2);
+ vst1q_lane_f32(dstl + (49 + i)*nch, b, 2);
+#endif /* HAVE_SSE */
+#endif /* MINIMP3_FLOAT_OUTPUT */
+ }
+ } else
+#endif /* HAVE_SIMD */
+#ifdef MINIMP3_ONLY_SIMD
+ {} /* for HAVE_SIMD=1, MINIMP3_ONLY_SIMD=1 case we do not need non-intrinsic "else" branch */
+#else /* MINIMP3_ONLY_SIMD */
+ for (i = 14; i >= 0; i--)
+ {
+#define LOAD(k) float w0 = *w++; float w1 = *w++; float *vz = &zlin[4*i - k*64]; float *vy = &zlin[4*i - (15 - k)*64];
+#define S0(k) { int j; LOAD(k); for (j = 0; j < 4; j++) b[j] = vz[j]*w1 + vy[j]*w0, a[j] = vz[j]*w0 - vy[j]*w1; }
+#define S1(k) { int j; LOAD(k); for (j = 0; j < 4; j++) b[j] += vz[j]*w1 + vy[j]*w0, a[j] += vz[j]*w0 - vy[j]*w1; }
+#define S2(k) { int j; LOAD(k); for (j = 0; j < 4; j++) b[j] += vz[j]*w1 + vy[j]*w0, a[j] += vy[j]*w1 - vz[j]*w0; }
+ float a[4], b[4];
+
+ zlin[4*i] = xl[18*(31 - i)];
+ zlin[4*i + 1] = xr[18*(31 - i)];
+ zlin[4*i + 2] = xl[1 + 18*(31 - i)];
+ zlin[4*i + 3] = xr[1 + 18*(31 - i)];
+ zlin[4*(i + 16)] = xl[1 + 18*(1 + i)];
+ zlin[4*(i + 16) + 1] = xr[1 + 18*(1 + i)];
+ zlin[4*(i - 16) + 2] = xl[18*(1 + i)];
+ zlin[4*(i - 16) + 3] = xr[18*(1 + i)];
+
+ S0(0) S2(1) S1(2) S2(3) S1(4) S2(5) S1(6) S2(7)
+
+ dstr[(15 - i)*nch] = mp3d_scale_pcm(a[1]);
+ dstr[(17 + i)*nch] = mp3d_scale_pcm(b[1]);
+ dstl[(15 - i)*nch] = mp3d_scale_pcm(a[0]);
+ dstl[(17 + i)*nch] = mp3d_scale_pcm(b[0]);
+ dstr[(47 - i)*nch] = mp3d_scale_pcm(a[3]);
+ dstr[(49 + i)*nch] = mp3d_scale_pcm(b[3]);
+ dstl[(47 - i)*nch] = mp3d_scale_pcm(a[2]);
+ dstl[(49 + i)*nch] = mp3d_scale_pcm(b[2]);
+ }
+#endif /* MINIMP3_ONLY_SIMD */
+}
+
+static void mp3d_synth_granule(float *qmf_state, float *grbuf, int nbands, int nch, mp3d_sample_t *pcm, float *lins)
+{
+ int i;
+ for (i = 0; i < nch; i++)
+ {
+ mp3d_DCT_II(grbuf + 576*i, nbands);
+ }
+
+ memcpy(lins, qmf_state, sizeof(float)*15*64);
+
+ for (i = 0; i < nbands; i += 2)
+ {
+ mp3d_synth(grbuf + i, pcm + 32*nch*i, nch, lins + i*64);
+ }
+#ifndef MINIMP3_NONSTANDARD_BUT_LOGICAL
+ if (nch == 1)
+ {
+ for (i = 0; i < 15*64; i += 2)
+ {
+ qmf_state[i] = lins[nbands*64 + i];
+ }
+ } else
+#endif /* MINIMP3_NONSTANDARD_BUT_LOGICAL */
+ {
+ memcpy(qmf_state, lins + nbands*64, sizeof(float)*15*64);
+ }
+}
+
+static int mp3d_match_frame(const uint8_t *hdr, int mp3_bytes, int frame_bytes)
+{
+ int i, nmatch;
+ for (i = 0, nmatch = 0; nmatch < MAX_FRAME_SYNC_MATCHES; nmatch++)
+ {
+ i += hdr_frame_bytes(hdr + i, frame_bytes) + hdr_padding(hdr + i);
+ if (i + HDR_SIZE > mp3_bytes)
+ return nmatch > 0;
+ if (!hdr_compare(hdr, hdr + i))
+ return 0;
+ }
+ return 1;
+}
+
+static int mp3d_find_frame(const uint8_t *mp3, int mp3_bytes, int *free_format_bytes, int *ptr_frame_bytes)
+{
+ int i, k;
+ for (i = 0; i < mp3_bytes - HDR_SIZE; i++, mp3++)
+ {
+ if (hdr_valid(mp3))
+ {
+ int frame_bytes = hdr_frame_bytes(mp3, *free_format_bytes);
+ int frame_and_padding = frame_bytes + hdr_padding(mp3);
+
+ for (k = HDR_SIZE; !frame_bytes && k < MAX_FREE_FORMAT_FRAME_SIZE && i + 2*k < mp3_bytes - HDR_SIZE; k++)
+ {
+ if (hdr_compare(mp3, mp3 + k))
+ {
+ int fb = k - hdr_padding(mp3);
+ int nextfb = fb + hdr_padding(mp3 + k);
+ if (i + k + nextfb + HDR_SIZE > mp3_bytes || !hdr_compare(mp3, mp3 + k + nextfb))
+ continue;
+ frame_and_padding = k;
+ frame_bytes = fb;
+ *free_format_bytes = fb;
+ }
+ }
+ if ((frame_bytes && i + frame_and_padding <= mp3_bytes &&
+ mp3d_match_frame(mp3, mp3_bytes - i, frame_bytes)) ||
+ (!i && frame_and_padding == mp3_bytes))
+ {
+ *ptr_frame_bytes = frame_and_padding;
+ return i;
+ }
+ *free_format_bytes = 0;
+ }
+ }
+ *ptr_frame_bytes = 0;
+ return mp3_bytes;
+}
+
+void mp3dec_init(mp3dec_t *dec)
+{
+ dec->header[0] = 0;
+}
+
+int mp3dec_decode_frame(mp3dec_t *dec, const uint8_t *mp3, int mp3_bytes, mp3d_sample_t *pcm, mp3dec_frame_info_t *info)
+{
+ int i = 0, igr, frame_size = 0, success = 1;
+ const uint8_t *hdr;
+ bs_t bs_frame[1];
+ mp3dec_scratch_t scratch;
+
+ if (mp3_bytes > 4 && dec->header[0] == 0xff && hdr_compare(dec->header, mp3))
+ {
+ frame_size = hdr_frame_bytes(mp3, dec->free_format_bytes) + hdr_padding(mp3);
+ if (frame_size != mp3_bytes && (frame_size + HDR_SIZE > mp3_bytes || !hdr_compare(mp3, mp3 + frame_size)))
+ {
+ frame_size = 0;
+ }
+ }
+ if (!frame_size)
+ {
+ memset(dec, 0, sizeof(mp3dec_t));
+ i = mp3d_find_frame(mp3, mp3_bytes, &dec->free_format_bytes, &frame_size);
+ if (!frame_size || i + frame_size > mp3_bytes)
+ {
+ info->frame_bytes = i;
+ return 0;
+ }
+ }
+
+ hdr = mp3 + i;
+ memcpy(dec->header, hdr, HDR_SIZE);
+ info->frame_bytes = i + frame_size;
+ info->frame_offset = i;
+ info->channels = HDR_IS_MONO(hdr) ? 1 : 2;
+ info->hz = hdr_sample_rate_hz(hdr);
+ info->layer = 4 - HDR_GET_LAYER(hdr);
+ info->bitrate_kbps = hdr_bitrate_kbps(hdr);
+
+ if (!pcm)
+ {
+ return hdr_frame_samples(hdr);
+ }
+
+ bs_init(bs_frame, hdr + HDR_SIZE, frame_size - HDR_SIZE);
+ if (HDR_IS_CRC(hdr))
+ {
+ get_bits(bs_frame, 16);
+ }
+
+ if (info->layer == 3)
+ {
+ int main_data_begin = L3_read_side_info(bs_frame, scratch.gr_info, hdr);
+ if (main_data_begin < 0 || bs_frame->pos > bs_frame->limit)
+ {
+ mp3dec_init(dec);
+ return 0;
+ }
+ success = L3_restore_reservoir(dec, bs_frame, &scratch, main_data_begin);
+ if (success)
+ {
+ for (igr = 0; igr < (HDR_TEST_MPEG1(hdr) ? 2 : 1); igr++, pcm += 576*info->channels)
+ {
+ memset(scratch.grbuf[0], 0, 576*2*sizeof(float));
+ L3_decode(dec, &scratch, scratch.gr_info + igr*info->channels, info->channels);
+ mp3d_synth_granule(dec->qmf_state, scratch.grbuf[0], 18, info->channels, pcm, scratch.syn[0]);
+ }
+ }
+ L3_save_reservoir(dec, &scratch);
+ } else
+ {
+#ifdef MINIMP3_ONLY_MP3
+ return 0;
+#else /* MINIMP3_ONLY_MP3 */
+ L12_scale_info sci[1];
+ L12_read_scale_info(hdr, bs_frame, sci);
+
+ memset(scratch.grbuf[0], 0, 576*2*sizeof(float));
+ for (i = 0, igr = 0; igr < 3; igr++)
+ {
+ if (12 == (i += L12_dequantize_granule(scratch.grbuf[0] + i, bs_frame, sci, info->layer | 1)))
+ {
+ i = 0;
+ L12_apply_scf_384(sci, sci->scf + igr, scratch.grbuf[0]);
+ mp3d_synth_granule(dec->qmf_state, scratch.grbuf[0], 12, info->channels, pcm, scratch.syn[0]);
+ memset(scratch.grbuf[0], 0, 576*2*sizeof(float));
+ pcm += 384*info->channels;
+ }
+ if (bs_frame->pos > bs_frame->limit)
+ {
+ mp3dec_init(dec);
+ return 0;
+ }
+ }
+#endif /* MINIMP3_ONLY_MP3 */
+ }
+ return success*hdr_frame_samples(dec->header);
+}
+
+#ifdef MINIMP3_FLOAT_OUTPUT
+void mp3dec_f32_to_s16(const float *in, int16_t *out, int num_samples)
+{
+ int i = 0;
+#if HAVE_SIMD
+ int aligned_count = num_samples & ~7;
+ for(; i < aligned_count; i += 8)
+ {
+ static const f4 g_scale = { 32768.0f, 32768.0f, 32768.0f, 32768.0f };
+ f4 a = VMUL(VLD(&in[i ]), g_scale);
+ f4 b = VMUL(VLD(&in[i+4]), g_scale);
+#if HAVE_SSE
+ static const f4 g_max = { 32767.0f, 32767.0f, 32767.0f, 32767.0f };
+ static const f4 g_min = { -32768.0f, -32768.0f, -32768.0f, -32768.0f };
+ __m128i pcm8 = _mm_packs_epi32(_mm_cvtps_epi32(_mm_max_ps(_mm_min_ps(a, g_max), g_min)),
+ _mm_cvtps_epi32(_mm_max_ps(_mm_min_ps(b, g_max), g_min)));
+ out[i ] = _mm_extract_epi16(pcm8, 0);
+ out[i+1] = _mm_extract_epi16(pcm8, 1);
+ out[i+2] = _mm_extract_epi16(pcm8, 2);
+ out[i+3] = _mm_extract_epi16(pcm8, 3);
+ out[i+4] = _mm_extract_epi16(pcm8, 4);
+ out[i+5] = _mm_extract_epi16(pcm8, 5);
+ out[i+6] = _mm_extract_epi16(pcm8, 6);
+ out[i+7] = _mm_extract_epi16(pcm8, 7);
+#else /* HAVE_SSE */
+ int16x4_t pcma, pcmb;
+ a = VADD(a, VSET(0.5f));
+ b = VADD(b, VSET(0.5f));
+ pcma = vqmovn_s32(vqaddq_s32(vcvtq_s32_f32(a), vreinterpretq_s32_u32(vcltq_f32(a, VSET(0)))));
+ pcmb = vqmovn_s32(vqaddq_s32(vcvtq_s32_f32(b), vreinterpretq_s32_u32(vcltq_f32(b, VSET(0)))));
+ vst1_lane_s16(out+i , pcma, 0);
+ vst1_lane_s16(out+i+1, pcma, 1);
+ vst1_lane_s16(out+i+2, pcma, 2);
+ vst1_lane_s16(out+i+3, pcma, 3);
+ vst1_lane_s16(out+i+4, pcmb, 0);
+ vst1_lane_s16(out+i+5, pcmb, 1);
+ vst1_lane_s16(out+i+6, pcmb, 2);
+ vst1_lane_s16(out+i+7, pcmb, 3);
+#endif /* HAVE_SSE */
+ }
+#endif /* HAVE_SIMD */
+ for(; i < num_samples; i++)
+ {
+ float sample = in[i] * 32768.0f;
+ if (sample >= 32766.5)
+ out[i] = (int16_t) 32767;
+ else if (sample <= -32767.5)
+ out[i] = (int16_t)-32768;
+ else
+ {
+ int16_t s = (int16_t)(sample + .5f);
+ s -= (s < 0); /* away from zero, to be compliant */
+ out[i] = s;
+ }
+ }
+}
+#endif /* MINIMP3_FLOAT_OUTPUT */
+#endif /* MINIMP3_IMPLEMENTATION && !_MINIMP3_IMPLEMENTATION_GUARD */
diff --git a/core/cart_hw/minimp3_ex.h b/core/cart_hw/minimp3_ex.h
new file mode 100644
index 000000000..2871705df
--- /dev/null
+++ b/core/cart_hw/minimp3_ex.h
@@ -0,0 +1,1397 @@
+#ifndef MINIMP3_EXT_H
+#define MINIMP3_EXT_H
+/*
+ https://github.com/lieff/minimp3
+ To the extent possible under law, the author(s) have dedicated all copyright and related and neighboring rights to this software to the public domain worldwide.
+ This software is distributed without any warranty.
+ See .
+*/
+#include
+#include "minimp3.h"
+
+/* flags for mp3dec_ex_open_* functions */
+#define MP3D_SEEK_TO_BYTE 0 /* mp3dec_ex_seek seeks to byte in stream */
+#define MP3D_SEEK_TO_SAMPLE 1 /* mp3dec_ex_seek precisely seeks to sample using index (created during duration calculation scan or when mp3dec_ex_seek called) */
+#define MP3D_DO_NOT_SCAN 2 /* do not scan whole stream for duration if vbrtag not found, mp3dec_ex_t::samples will be filled only if mp3dec_ex_t::vbr_tag_found == 1 */
+#ifdef MINIMP3_ALLOW_MONO_STEREO_TRANSITION
+#define MP3D_ALLOW_MONO_STEREO_TRANSITION 4
+#define MP3D_FLAGS_MASK 7
+#else
+#define MP3D_FLAGS_MASK 3
+#endif
+
+/* compile-time config */
+#define MINIMP3_PREDECODE_FRAMES 2 /* frames to pre-decode and skip after seek (to fill internal structures) */
+/*#define MINIMP3_SEEK_IDX_LINEAR_SEARCH*/ /* define to use linear index search instead of binary search on seek */
+#define MINIMP3_IO_SIZE (128*1024) /* io buffer size for streaming functions, must be greater than MINIMP3_BUF_SIZE */
+#define MINIMP3_BUF_SIZE (16*1024) /* buffer which can hold minimum 10 consecutive mp3 frames (~16KB) worst case */
+/*#define MINIMP3_SCAN_LIMIT (256*1024)*/ /* how many bytes will be scanned to search first valid mp3 frame, to prevent stall on large non-mp3 files */
+#define MINIMP3_ENABLE_RING 0 /* WIP enable hardware magic ring buffer if available, to make less input buffer memmove(s) in callback IO mode */
+
+/* return error codes */
+#define MP3D_E_PARAM -1
+#define MP3D_E_MEMORY -2
+#define MP3D_E_IOERROR -3
+#define MP3D_E_USER -4 /* can be used to stop processing from callbacks without indicating specific error */
+#define MP3D_E_DECODE -5 /* decode error which can't be safely skipped, such as sample rate, layer and channels change */
+
+typedef struct
+{
+ mp3d_sample_t *buffer;
+ size_t samples; /* channels included, byte size = samples*sizeof(mp3d_sample_t) */
+ int channels, hz, layer, avg_bitrate_kbps;
+} mp3dec_file_info_t;
+
+typedef struct
+{
+ const uint8_t *buffer;
+ size_t size;
+} mp3dec_map_info_t;
+
+typedef struct
+{
+ uint64_t sample;
+ uint64_t offset;
+} mp3dec_frame_t;
+
+typedef struct
+{
+ mp3dec_frame_t *frames;
+ size_t num_frames, capacity;
+} mp3dec_index_t;
+
+typedef size_t (*MP3D_READ_CB)(void *buf, size_t size, void *user_data);
+typedef int (*MP3D_SEEK_CB)(uint64_t position, void *user_data);
+
+typedef struct
+{
+ MP3D_READ_CB read;
+ void *read_data;
+ MP3D_SEEK_CB seek;
+ void *seek_data;
+} mp3dec_io_t;
+
+typedef struct
+{
+ mp3dec_t mp3d;
+ mp3dec_map_info_t file;
+ mp3dec_io_t *io;
+ mp3dec_index_t index;
+ uint64_t offset, samples, detected_samples, cur_sample, start_offset, end_offset;
+ mp3dec_frame_info_t info;
+ mp3d_sample_t buffer[MINIMP3_MAX_SAMPLES_PER_FRAME];
+ size_t input_consumed, input_filled;
+ int is_file, flags, vbr_tag_found, indexes_built;
+ int free_format_bytes;
+ int buffer_samples, buffer_consumed, to_skip, start_delay;
+ int last_error;
+} mp3dec_ex_t;
+
+typedef int (*MP3D_ITERATE_CB)(void *user_data, const uint8_t *frame, int frame_size, int free_format_bytes, size_t buf_size, uint64_t offset, mp3dec_frame_info_t *info);
+typedef int (*MP3D_PROGRESS_CB)(void *user_data, size_t file_size, uint64_t offset, mp3dec_frame_info_t *info);
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* detect mp3/mpa format */
+int mp3dec_detect_buf(const uint8_t *buf, size_t buf_size);
+int mp3dec_detect_cb(mp3dec_io_t *io, uint8_t *buf, size_t buf_size);
+/* decode whole buffer block */
+int mp3dec_load_buf(mp3dec_t *dec, const uint8_t *buf, size_t buf_size, mp3dec_file_info_t *info, MP3D_PROGRESS_CB progress_cb, void *user_data);
+int mp3dec_load_cb(mp3dec_t *dec, mp3dec_io_t *io, uint8_t *buf, size_t buf_size, mp3dec_file_info_t *info, MP3D_PROGRESS_CB progress_cb, void *user_data);
+/* iterate through frames */
+int mp3dec_iterate_buf(const uint8_t *buf, size_t buf_size, MP3D_ITERATE_CB callback, void *user_data);
+int mp3dec_iterate_cb(mp3dec_io_t *io, uint8_t *buf, size_t buf_size, MP3D_ITERATE_CB callback, void *user_data);
+/* streaming decoder with seeking capability */
+int mp3dec_ex_open_buf(mp3dec_ex_t *dec, const uint8_t *buf, size_t buf_size, int flags);
+int mp3dec_ex_open_cb(mp3dec_ex_t *dec, mp3dec_io_t *io, int flags);
+void mp3dec_ex_close(mp3dec_ex_t *dec);
+int mp3dec_ex_seek(mp3dec_ex_t *dec, uint64_t position);
+size_t mp3dec_ex_read_frame(mp3dec_ex_t *dec, mp3d_sample_t **buf, mp3dec_frame_info_t *frame_info, size_t max_samples);
+size_t mp3dec_ex_read(mp3dec_ex_t *dec, mp3d_sample_t *buf, size_t samples);
+#ifndef MINIMP3_NO_STDIO
+/* stdio versions of file detect, load, iterate and stream */
+int mp3dec_detect(const char *file_name);
+int mp3dec_load(mp3dec_t *dec, const char *file_name, mp3dec_file_info_t *info, MP3D_PROGRESS_CB progress_cb, void *user_data);
+int mp3dec_iterate(const char *file_name, MP3D_ITERATE_CB callback, void *user_data);
+int mp3dec_ex_open(mp3dec_ex_t *dec, const char *file_name, int flags);
+#ifdef _WIN32
+int mp3dec_detect_w(const wchar_t *file_name);
+int mp3dec_load_w(mp3dec_t *dec, const wchar_t *file_name, mp3dec_file_info_t *info, MP3D_PROGRESS_CB progress_cb, void *user_data);
+int mp3dec_iterate_w(const wchar_t *file_name, MP3D_ITERATE_CB callback, void *user_data);
+int mp3dec_ex_open_w(mp3dec_ex_t *dec, const wchar_t *file_name, int flags);
+#endif
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+#endif /*MINIMP3_EXT_H*/
+
+#if defined(MINIMP3_IMPLEMENTATION) && !defined(_MINIMP3_EX_IMPLEMENTATION_GUARD)
+#define _MINIMP3_EX_IMPLEMENTATION_GUARD
+#include
+#include "minimp3.h"
+
+static void mp3dec_skip_id3v1(const uint8_t *buf, size_t *pbuf_size)
+{
+ size_t buf_size = *pbuf_size;
+#ifndef MINIMP3_NOSKIP_ID3V1
+ if (buf_size >= 128 && !memcmp(buf + buf_size - 128, "TAG", 3))
+ {
+ buf_size -= 128;
+ if (buf_size >= 227 && !memcmp(buf + buf_size - 227, "TAG+", 4))
+ buf_size -= 227;
+ }
+#endif
+#ifndef MINIMP3_NOSKIP_APEV2
+ if (buf_size > 32 && !memcmp(buf + buf_size - 32, "APETAGEX", 8))
+ {
+ buf_size -= 32;
+ const uint8_t *tag = buf + buf_size + 8 + 4;
+ uint32_t tag_size = (uint32_t)(tag[3] << 24) | (tag[2] << 16) | (tag[1] << 8) | tag[0];
+ if (buf_size >= tag_size)
+ buf_size -= tag_size;
+ }
+#endif
+ *pbuf_size = buf_size;
+}
+
+static size_t mp3dec_skip_id3v2(const uint8_t *buf, size_t buf_size)
+{
+#define MINIMP3_ID3_DETECT_SIZE 10
+#ifndef MINIMP3_NOSKIP_ID3V2
+ if (buf_size >= MINIMP3_ID3_DETECT_SIZE && !memcmp(buf, "ID3", 3) && !((buf[5] & 15) || (buf[6] & 0x80) || (buf[7] & 0x80) || (buf[8] & 0x80) || (buf[9] & 0x80)))
+ {
+ size_t id3v2size = (((buf[6] & 0x7f) << 21) | ((buf[7] & 0x7f) << 14) | ((buf[8] & 0x7f) << 7) | (buf[9] & 0x7f)) + 10;
+ if ((buf[5] & 16))
+ id3v2size += 10; /* footer */
+ return id3v2size;
+ }
+#endif
+ return 0;
+}
+
+static void mp3dec_skip_id3(const uint8_t **pbuf, size_t *pbuf_size)
+{
+ uint8_t *buf = (uint8_t *)(*pbuf);
+ size_t buf_size = *pbuf_size;
+ size_t id3v2size = mp3dec_skip_id3v2(buf, buf_size);
+ if (id3v2size)
+ {
+ if (id3v2size >= buf_size)
+ id3v2size = buf_size;
+ buf += id3v2size;
+ buf_size -= id3v2size;
+ }
+ mp3dec_skip_id3v1(buf, &buf_size);
+ *pbuf = (const uint8_t *)buf;
+ *pbuf_size = buf_size;
+}
+
+static int mp3dec_check_vbrtag(const uint8_t *frame, int frame_size, uint32_t *frames, int *delay, int *padding)
+{
+ static const char g_xing_tag[4] = { 'X', 'i', 'n', 'g' };
+ static const char g_info_tag[4] = { 'I', 'n', 'f', 'o' };
+#define FRAMES_FLAG 1
+#define BYTES_FLAG 2
+#define TOC_FLAG 4
+#define VBR_SCALE_FLAG 8
+ /* Side info offsets after header:
+ / Mono Stereo
+ / MPEG1 17 32
+ / MPEG2 & 2.5 9 17*/
+ bs_t bs[1];
+ L3_gr_info_t gr_info[4];
+ bs_init(bs, frame + HDR_SIZE, frame_size - HDR_SIZE);
+ if (HDR_IS_CRC(frame))
+ get_bits(bs, 16);
+ if (L3_read_side_info(bs, gr_info, frame) < 0)
+ return 0; /* side info corrupted */
+
+ const uint8_t *tag = frame + HDR_SIZE + bs->pos/8;
+ if (memcmp(g_xing_tag, tag, 4) && memcmp(g_info_tag, tag, 4))
+ return 0;
+ int flags = tag[7];
+ if (!((flags & FRAMES_FLAG)))
+ return -1;
+ tag += 8;
+ *frames = (uint32_t)(tag[0] << 24) | (tag[1] << 16) | (tag[2] << 8) | tag[3];
+ tag += 4;
+ if (flags & BYTES_FLAG)
+ tag += 4;
+ if (flags & TOC_FLAG)
+ tag += 100;
+ if (flags & VBR_SCALE_FLAG)
+ tag += 4;
+ *delay = *padding = 0;
+ if (*tag)
+ { /* extension, LAME, Lavc, etc. Should be the same structure. */
+ tag += 21;
+ if (tag - frame + 14 >= frame_size)
+ return 0;
+ *delay = ((tag[0] << 4) | (tag[1] >> 4)) + (528 + 1);
+ *padding = (((tag[1] & 0xF) << 8) | tag[2]) - (528 + 1);
+ }
+ return 1;
+}
+
+int mp3dec_detect_buf(const uint8_t *buf, size_t buf_size)
+{
+ return mp3dec_detect_cb(0, (uint8_t *)buf, buf_size);
+}
+
+int mp3dec_detect_cb(mp3dec_io_t *io, uint8_t *buf, size_t buf_size)
+{
+ if (!buf || (size_t)-1 == buf_size || (io && buf_size < MINIMP3_BUF_SIZE))
+ return MP3D_E_PARAM;
+ size_t filled = buf_size;
+ if (io)
+ {
+ if (io->seek(0, io->seek_data))
+ return MP3D_E_IOERROR;
+ filled = io->read(buf, MINIMP3_ID3_DETECT_SIZE, io->read_data);
+ if (filled > MINIMP3_ID3_DETECT_SIZE)
+ return MP3D_E_IOERROR;
+ }
+ if (filled < MINIMP3_ID3_DETECT_SIZE)
+ return MP3D_E_USER; /* too small, can't be mp3/mpa */
+ if (mp3dec_skip_id3v2(buf, filled))
+ return 0; /* id3v2 tag is enough evidence */
+ if (io)
+ {
+ size_t readed = io->read(buf + MINIMP3_ID3_DETECT_SIZE, buf_size - MINIMP3_ID3_DETECT_SIZE, io->read_data);
+ if (readed > (buf_size - MINIMP3_ID3_DETECT_SIZE))
+ return MP3D_E_IOERROR;
+ filled += readed;
+ if (filled < MINIMP3_BUF_SIZE)
+ mp3dec_skip_id3v1(buf, &filled);
+ } else
+ {
+ mp3dec_skip_id3v1(buf, &filled);
+ if (filled > MINIMP3_BUF_SIZE)
+ filled = MINIMP3_BUF_SIZE;
+ }
+ int free_format_bytes, frame_size;
+ mp3d_find_frame(buf, filled, &free_format_bytes, &frame_size);
+ if (frame_size)
+ return 0; /* MAX_FRAME_SYNC_MATCHES consecutive frames found */
+ return MP3D_E_USER;
+}
+
+int mp3dec_load_buf(mp3dec_t *dec, const uint8_t *buf, size_t buf_size, mp3dec_file_info_t *info, MP3D_PROGRESS_CB progress_cb, void *user_data)
+{
+ return mp3dec_load_cb(dec, 0, (uint8_t *)buf, buf_size, info, progress_cb, user_data);
+}
+
+int mp3dec_load_cb(mp3dec_t *dec, mp3dec_io_t *io, uint8_t *buf, size_t buf_size, mp3dec_file_info_t *info, MP3D_PROGRESS_CB progress_cb, void *user_data)
+{
+ if (!dec || !buf || !info || (size_t)-1 == buf_size || (io && buf_size < MINIMP3_BUF_SIZE))
+ return MP3D_E_PARAM;
+ uint64_t detected_samples = 0;
+ size_t orig_buf_size = buf_size;
+ int to_skip = 0;
+ mp3dec_frame_info_t frame_info;
+ memset(info, 0, sizeof(*info));
+ memset(&frame_info, 0, sizeof(frame_info));
+
+ /* skip id3 */
+ size_t filled = 0, consumed = 0;
+ int eof = 0, ret = 0;
+ if (io)
+ {
+ if (io->seek(0, io->seek_data))
+ return MP3D_E_IOERROR;
+ filled = io->read(buf, MINIMP3_ID3_DETECT_SIZE, io->read_data);
+ if (filled > MINIMP3_ID3_DETECT_SIZE)
+ return MP3D_E_IOERROR;
+ if (MINIMP3_ID3_DETECT_SIZE != filled)
+ return 0;
+ size_t id3v2size = mp3dec_skip_id3v2(buf, filled);
+ if (id3v2size)
+ {
+ if (io->seek(id3v2size, io->seek_data))
+ return MP3D_E_IOERROR;
+ filled = io->read(buf, buf_size, io->read_data);
+ if (filled > buf_size)
+ return MP3D_E_IOERROR;
+ } else
+ {
+ size_t readed = io->read(buf + MINIMP3_ID3_DETECT_SIZE, buf_size - MINIMP3_ID3_DETECT_SIZE, io->read_data);
+ if (readed > (buf_size - MINIMP3_ID3_DETECT_SIZE))
+ return MP3D_E_IOERROR;
+ filled += readed;
+ }
+ if (filled < MINIMP3_BUF_SIZE)
+ mp3dec_skip_id3v1(buf, &filled);
+ } else
+ {
+ mp3dec_skip_id3((const uint8_t **)&buf, &buf_size);
+ if (!buf_size)
+ return 0;
+ }
+ /* try to make allocation size assumption by first frame or vbr tag */
+ mp3dec_init(dec);
+ int samples;
+ do
+ {
+ uint32_t frames;
+ int i, delay, padding, free_format_bytes = 0, frame_size = 0;
+ const uint8_t *hdr;
+ if (io)
+ {
+ if (!eof && filled - consumed < MINIMP3_BUF_SIZE)
+ { /* keep minimum 10 consecutive mp3 frames (~16KB) worst case */
+ memmove(buf, buf + consumed, filled - consumed);
+ filled -= consumed;
+ consumed = 0;
+ size_t readed = io->read(buf + filled, buf_size - filled, io->read_data);
+ if (readed > (buf_size - filled))
+ return MP3D_E_IOERROR;
+ if (readed != (buf_size - filled))
+ eof = 1;
+ filled += readed;
+ if (eof)
+ mp3dec_skip_id3v1(buf, &filled);
+ }
+ i = mp3d_find_frame(buf + consumed, filled - consumed, &free_format_bytes, &frame_size);
+ consumed += i;
+ hdr = buf + consumed;
+ } else
+ {
+ i = mp3d_find_frame(buf, buf_size, &free_format_bytes, &frame_size);
+ buf += i;
+ buf_size -= i;
+ hdr = buf;
+ }
+ if (i && !frame_size)
+ continue;
+ if (!frame_size)
+ return 0;
+ frame_info.channels = HDR_IS_MONO(hdr) ? 1 : 2;
+ frame_info.hz = hdr_sample_rate_hz(hdr);
+ frame_info.layer = 4 - HDR_GET_LAYER(hdr);
+ frame_info.bitrate_kbps = hdr_bitrate_kbps(hdr);
+ frame_info.frame_bytes = frame_size;
+ samples = hdr_frame_samples(hdr)*frame_info.channels;
+ if (3 != frame_info.layer)
+ break;
+ int ret = mp3dec_check_vbrtag(hdr, frame_size, &frames, &delay, &padding);
+ if (ret > 0)
+ {
+ padding *= frame_info.channels;
+ to_skip = delay*frame_info.channels;
+ detected_samples = samples*(uint64_t)frames;
+ if (detected_samples >= (uint64_t)to_skip)
+ detected_samples -= to_skip;
+ if (padding > 0 && detected_samples >= (uint64_t)padding)
+ detected_samples -= padding;
+ if (!detected_samples)
+ return 0;
+ }
+ if (ret)
+ {
+ if (io)
+ {
+ consumed += frame_size;
+ } else
+ {
+ buf += frame_size;
+ buf_size -= frame_size;
+ }
+ }
+ break;
+ } while(1);
+ size_t allocated = MINIMP3_MAX_SAMPLES_PER_FRAME*sizeof(mp3d_sample_t);
+ if (detected_samples)
+ allocated += detected_samples*sizeof(mp3d_sample_t);
+ else
+ allocated += (buf_size/frame_info.frame_bytes)*samples*sizeof(mp3d_sample_t);
+ info->buffer = (mp3d_sample_t*)malloc(allocated);
+ if (!info->buffer)
+ return MP3D_E_MEMORY;
+ /* save info */
+ info->channels = frame_info.channels;
+ info->hz = frame_info.hz;
+ info->layer = frame_info.layer;
+ /* decode all frames */
+ size_t avg_bitrate_kbps = 0, frames = 0;
+ do
+ {
+ if ((allocated - info->samples*sizeof(mp3d_sample_t)) < MINIMP3_MAX_SAMPLES_PER_FRAME*sizeof(mp3d_sample_t))
+ {
+ allocated *= 2;
+ mp3d_sample_t *alloc_buf = (mp3d_sample_t*)realloc(info->buffer, allocated);
+ if (!alloc_buf)
+ return MP3D_E_MEMORY;
+ info->buffer = alloc_buf;
+ }
+ if (io)
+ {
+ if (!eof && filled - consumed < MINIMP3_BUF_SIZE)
+ { /* keep minimum 10 consecutive mp3 frames (~16KB) worst case */
+ memmove(buf, buf + consumed, filled - consumed);
+ filled -= consumed;
+ consumed = 0;
+ size_t readed = io->read(buf + filled, buf_size - filled, io->read_data);
+ if (readed != (buf_size - filled))
+ eof = 1;
+ filled += readed;
+ if (eof)
+ mp3dec_skip_id3v1(buf, &filled);
+ }
+ samples = mp3dec_decode_frame(dec, buf + consumed, filled - consumed, info->buffer + info->samples, &frame_info);
+ consumed += frame_info.frame_bytes;
+ } else
+ {
+ samples = mp3dec_decode_frame(dec, buf, MINIMP3_MIN(buf_size, (size_t)INT_MAX), info->buffer + info->samples, &frame_info);
+ buf += frame_info.frame_bytes;
+ buf_size -= frame_info.frame_bytes;
+ }
+ if (samples)
+ {
+ if (info->hz != frame_info.hz || info->layer != frame_info.layer)
+ {
+ ret = MP3D_E_DECODE;
+ break;
+ }
+ if (info->channels && info->channels != frame_info.channels)
+ {
+#ifdef MINIMP3_ALLOW_MONO_STEREO_TRANSITION
+ info->channels = 0; /* mark file with mono-stereo transition */
+#else
+ ret = MP3D_E_DECODE;
+ break;
+#endif
+ }
+ samples *= frame_info.channels;
+ if (to_skip)
+ {
+ size_t skip = MINIMP3_MIN(samples, to_skip);
+ to_skip -= skip;
+ samples -= skip;
+ memmove(info->buffer, info->buffer + skip, samples*sizeof(mp3d_sample_t));
+ }
+ info->samples += samples;
+ avg_bitrate_kbps += frame_info.bitrate_kbps;
+ frames++;
+ if (progress_cb)
+ {
+ ret = progress_cb(user_data, orig_buf_size, orig_buf_size - buf_size, &frame_info);
+ if (ret)
+ break;
+ }
+ }
+ } while (frame_info.frame_bytes);
+ if (detected_samples && info->samples > detected_samples)
+ info->samples = detected_samples; /* cut padding */
+ /* reallocate to normal buffer size */
+ if (allocated != info->samples*sizeof(mp3d_sample_t))
+ {
+ mp3d_sample_t *alloc_buf = (mp3d_sample_t*)realloc(info->buffer, info->samples*sizeof(mp3d_sample_t));
+ if (!alloc_buf && info->samples)
+ return MP3D_E_MEMORY;
+ info->buffer = alloc_buf;
+ }
+ if (frames)
+ info->avg_bitrate_kbps = avg_bitrate_kbps/frames;
+ return ret;
+}
+
+int mp3dec_iterate_buf(const uint8_t *buf, size_t buf_size, MP3D_ITERATE_CB callback, void *user_data)
+{
+ const uint8_t *orig_buf = buf;
+ if (!buf || (size_t)-1 == buf_size || !callback)
+ return MP3D_E_PARAM;
+ /* skip id3 */
+ mp3dec_skip_id3(&buf, &buf_size);
+ if (!buf_size)
+ return 0;
+ mp3dec_frame_info_t frame_info;
+ memset(&frame_info, 0, sizeof(frame_info));
+ do
+ {
+ int free_format_bytes = 0, frame_size = 0, ret;
+ int i = mp3d_find_frame(buf, buf_size, &free_format_bytes, &frame_size);
+ buf += i;
+ buf_size -= i;
+ if (i && !frame_size)
+ continue;
+ if (!frame_size)
+ break;
+ const uint8_t *hdr = buf;
+ frame_info.channels = HDR_IS_MONO(hdr) ? 1 : 2;
+ frame_info.hz = hdr_sample_rate_hz(hdr);
+ frame_info.layer = 4 - HDR_GET_LAYER(hdr);
+ frame_info.bitrate_kbps = hdr_bitrate_kbps(hdr);
+ frame_info.frame_bytes = frame_size;
+
+ if (callback)
+ {
+ if ((ret = callback(user_data, hdr, frame_size, free_format_bytes, buf_size, hdr - orig_buf, &frame_info)))
+ return ret;
+ }
+ buf += frame_size;
+ buf_size -= frame_size;
+ } while (1);
+ return 0;
+}
+
+int mp3dec_iterate_cb(mp3dec_io_t *io, uint8_t *buf, size_t buf_size, MP3D_ITERATE_CB callback, void *user_data)
+{
+ if (!io || !buf || (size_t)-1 == buf_size || buf_size < MINIMP3_BUF_SIZE || !callback)
+ return MP3D_E_PARAM;
+ size_t filled = io->read(buf, MINIMP3_ID3_DETECT_SIZE, io->read_data), consumed = 0;
+ uint64_t readed = 0;
+ mp3dec_frame_info_t frame_info;
+ int eof = 0;
+ memset(&frame_info, 0, sizeof(frame_info));
+ if (filled > MINIMP3_ID3_DETECT_SIZE)
+ return MP3D_E_IOERROR;
+ if (MINIMP3_ID3_DETECT_SIZE != filled)
+ return 0;
+ size_t id3v2size = mp3dec_skip_id3v2(buf, filled);
+ if (id3v2size)
+ {
+ if (io->seek(id3v2size, io->seek_data))
+ return MP3D_E_IOERROR;
+ filled = io->read(buf, buf_size, io->read_data);
+ if (filled > buf_size)
+ return MP3D_E_IOERROR;
+ readed += id3v2size;
+ } else
+ {
+ size_t readed = io->read(buf + MINIMP3_ID3_DETECT_SIZE, buf_size - MINIMP3_ID3_DETECT_SIZE, io->read_data);
+ if (readed > (buf_size - MINIMP3_ID3_DETECT_SIZE))
+ return MP3D_E_IOERROR;
+ filled += readed;
+ }
+ if (filled < MINIMP3_BUF_SIZE)
+ mp3dec_skip_id3v1(buf, &filled);
+ do
+ {
+ int free_format_bytes = 0, frame_size = 0, ret;
+ int i = mp3d_find_frame(buf + consumed, filled - consumed, &free_format_bytes, &frame_size);
+ if (i && !frame_size)
+ {
+ consumed += i;
+ continue;
+ }
+ if (!frame_size)
+ break;
+ const uint8_t *hdr = buf + consumed + i;
+ frame_info.channels = HDR_IS_MONO(hdr) ? 1 : 2;
+ frame_info.hz = hdr_sample_rate_hz(hdr);
+ frame_info.layer = 4 - HDR_GET_LAYER(hdr);
+ frame_info.bitrate_kbps = hdr_bitrate_kbps(hdr);
+ frame_info.frame_bytes = frame_size;
+
+ readed += i;
+ if (callback)
+ {
+ if ((ret = callback(user_data, hdr, frame_size, free_format_bytes, filled - consumed, readed, &frame_info)))
+ return ret;
+ }
+ readed += frame_size;
+ consumed += i + frame_size;
+ if (!eof && filled - consumed < MINIMP3_BUF_SIZE)
+ { /* keep minimum 10 consecutive mp3 frames (~16KB) worst case */
+ memmove(buf, buf + consumed, filled - consumed);
+ filled -= consumed;
+ consumed = 0;
+ size_t readed = io->read(buf + filled, buf_size - filled, io->read_data);
+ if (readed > (buf_size - filled))
+ return MP3D_E_IOERROR;
+ if (readed != (buf_size - filled))
+ eof = 1;
+ filled += readed;
+ if (eof)
+ mp3dec_skip_id3v1(buf, &filled);
+ }
+ } while (1);
+ return 0;
+}
+
+static int mp3dec_load_index(void *user_data, const uint8_t *frame, int frame_size, int free_format_bytes, size_t buf_size, uint64_t offset, mp3dec_frame_info_t *info)
+{
+ mp3dec_frame_t *idx_frame;
+ mp3dec_ex_t *dec = (mp3dec_ex_t *)user_data;
+ if (!dec->index.frames && !dec->start_offset)
+ { /* detect VBR tag and try to avoid full scan */
+ uint32_t frames;
+ int delay, padding;
+ dec->info = *info;
+ dec->start_offset = dec->offset = offset;
+ dec->end_offset = offset + buf_size;
+ dec->free_format_bytes = free_format_bytes; /* should not change */
+ if (3 == dec->info.layer)
+ {
+ int ret = mp3dec_check_vbrtag(frame, frame_size, &frames, &delay, &padding);
+ if (ret)
+ dec->start_offset = dec->offset = offset + frame_size;
+ if (ret > 0)
+ {
+ padding *= info->channels;
+ dec->start_delay = dec->to_skip = delay*info->channels;
+ dec->samples = hdr_frame_samples(frame)*info->channels*(uint64_t)frames;
+ if (dec->samples >= (uint64_t)dec->start_delay)
+ dec->samples -= dec->start_delay;
+ if (padding > 0 && dec->samples >= (uint64_t)padding)
+ dec->samples -= padding;
+ dec->detected_samples = dec->samples;
+ dec->vbr_tag_found = 1;
+ return MP3D_E_USER;
+ } else if (ret < 0)
+ return 0;
+ }
+ }
+ if (dec->flags & MP3D_DO_NOT_SCAN)
+ return MP3D_E_USER;
+ if (dec->index.num_frames + 1 > dec->index.capacity)
+ {
+ if (!dec->index.capacity)
+ dec->index.capacity = 4096;
+ else
+ dec->index.capacity *= 2;
+ mp3dec_frame_t *alloc_buf = (mp3dec_frame_t *)realloc((void*)dec->index.frames, sizeof(mp3dec_frame_t)*dec->index.capacity);
+ if (!alloc_buf)
+ return MP3D_E_MEMORY;
+ dec->index.frames = alloc_buf;
+ }
+ idx_frame = &dec->index.frames[dec->index.num_frames++];
+ idx_frame->offset = offset;
+ idx_frame->sample = dec->samples;
+ if (!dec->buffer_samples && dec->index.num_frames < 256)
+ { /* for some cutted mp3 frames, bit-reservoir not filled and decoding can't be started from first frames */
+ /* try to decode up to 255 first frames till samples starts to decode */
+ dec->buffer_samples = mp3dec_decode_frame(&dec->mp3d, frame, MINIMP3_MIN(buf_size, (size_t)INT_MAX), dec->buffer, info);
+ dec->samples += dec->buffer_samples*info->channels;
+ } else
+ dec->samples += hdr_frame_samples(frame)*info->channels;
+ return 0;
+}
+
+int mp3dec_ex_open_buf(mp3dec_ex_t *dec, const uint8_t *buf, size_t buf_size, int flags)
+{
+ if (!dec || !buf || (size_t)-1 == buf_size || (flags & (~MP3D_FLAGS_MASK)))
+ return MP3D_E_PARAM;
+ memset(dec, 0, sizeof(*dec));
+ dec->file.buffer = buf;
+ dec->file.size = buf_size;
+ dec->flags = flags;
+ mp3dec_init(&dec->mp3d);
+ int ret = mp3dec_iterate_buf(dec->file.buffer, dec->file.size, mp3dec_load_index, dec);
+ if (ret && MP3D_E_USER != ret)
+ return ret;
+ mp3dec_init(&dec->mp3d);
+ dec->buffer_samples = 0;
+ dec->indexes_built = !(dec->vbr_tag_found || (flags & MP3D_DO_NOT_SCAN));
+ dec->flags &= (~MP3D_DO_NOT_SCAN);
+ return 0;
+}
+
+#ifndef MINIMP3_SEEK_IDX_LINEAR_SEARCH
+static size_t mp3dec_idx_binary_search(mp3dec_index_t *idx, uint64_t position)
+{
+ size_t end = idx->num_frames, start = 0, index = 0;
+ while (start <= end)
+ {
+ size_t mid = (start + end) / 2;
+ if (idx->frames[mid].sample >= position)
+ { /* move left side. */
+ if (idx->frames[mid].sample == position)
+ return mid;
+ end = mid - 1;
+ } else
+ { /* move to right side */
+ index = mid;
+ start = mid + 1;
+ if (start == idx->num_frames)
+ break;
+ }
+ }
+ return index;
+}
+#endif
+
+int mp3dec_ex_seek(mp3dec_ex_t *dec, uint64_t position)
+{
+ size_t i;
+ if (!dec)
+ return MP3D_E_PARAM;
+ if (!(dec->flags & MP3D_SEEK_TO_SAMPLE))
+ {
+ if (dec->io)
+ {
+ dec->offset = position;
+ } else
+ {
+ dec->offset = MINIMP3_MIN(position, dec->file.size);
+ }
+ dec->cur_sample = 0;
+ goto do_exit;
+ }
+ dec->cur_sample = position;
+ position += dec->start_delay;
+ if (0 == position)
+ { /* optimize seek to zero, no index needed */
+seek_zero:
+ dec->offset = dec->start_offset;
+ dec->to_skip = 0;
+ goto do_exit;
+ }
+ if (!dec->indexes_built)
+ { /* no index created yet (vbr tag used to calculate track length or MP3D_DO_NOT_SCAN open flag used) */
+ dec->indexes_built = 1;
+ dec->samples = 0;
+ dec->buffer_samples = 0;
+ if (dec->io)
+ {
+ if (dec->io->seek(dec->start_offset, dec->io->seek_data))
+ return MP3D_E_IOERROR;
+ int ret = mp3dec_iterate_cb(dec->io, (uint8_t *)dec->file.buffer, dec->file.size, mp3dec_load_index, dec);
+ if (ret && MP3D_E_USER != ret)
+ return ret;
+ } else
+ {
+ int ret = mp3dec_iterate_buf(dec->file.buffer + dec->start_offset, dec->file.size - dec->start_offset, mp3dec_load_index, dec);
+ if (ret && MP3D_E_USER != ret)
+ return ret;
+ }
+ for (i = 0; i < dec->index.num_frames; i++)
+ dec->index.frames[i].offset += dec->start_offset;
+ dec->samples = dec->detected_samples;
+ }
+ if (!dec->index.frames)
+ goto seek_zero; /* no frames in file - seek to zero */
+#ifdef MINIMP3_SEEK_IDX_LINEAR_SEARCH
+ for (i = 0; i < dec->index.num_frames; i++)
+ {
+ if (dec->index.frames[i].sample >= position)
+ break;
+ }
+#else
+ i = mp3dec_idx_binary_search(&dec->index, position);
+#endif
+ if (i)
+ {
+ int to_fill_bytes = 511;
+ int skip_frames = MINIMP3_PREDECODE_FRAMES
+#ifdef MINIMP3_SEEK_IDX_LINEAR_SEARCH
+ + ((dec->index.frames[i].sample == position) ? 0 : 1)
+#endif
+ ;
+ i -= MINIMP3_MIN(i, (size_t)skip_frames);
+ if (3 == dec->info.layer)
+ {
+ while (i && to_fill_bytes)
+ { /* make sure bit-reservoir is filled when we start decoding */
+ bs_t bs[1];
+ L3_gr_info_t gr_info[4];
+ int frame_bytes, frame_size;
+ const uint8_t *hdr;
+ if (dec->io)
+ {
+ hdr = dec->file.buffer;
+ if (dec->io->seek(dec->index.frames[i - 1].offset, dec->io->seek_data))
+ return MP3D_E_IOERROR;
+ size_t readed = dec->io->read((uint8_t *)hdr, HDR_SIZE, dec->io->read_data);
+ if (readed != HDR_SIZE)
+ return MP3D_E_IOERROR;
+ frame_size = hdr_frame_bytes(hdr, dec->free_format_bytes) + hdr_padding(hdr);
+ readed = dec->io->read((uint8_t *)hdr + HDR_SIZE, frame_size - HDR_SIZE, dec->io->read_data);
+ if (readed != (size_t)(frame_size - HDR_SIZE))
+ return MP3D_E_IOERROR;
+ bs_init(bs, hdr + HDR_SIZE, frame_size - HDR_SIZE);
+ } else
+ {
+ hdr = dec->file.buffer + dec->index.frames[i - 1].offset;
+ frame_size = hdr_frame_bytes(hdr, dec->free_format_bytes) + hdr_padding(hdr);
+ bs_init(bs, hdr + HDR_SIZE, frame_size - HDR_SIZE);
+ }
+ if (HDR_IS_CRC(hdr))
+ get_bits(bs, 16);
+ i--;
+ if (L3_read_side_info(bs, gr_info, hdr) < 0)
+ break; /* frame not decodable, we can start from here */
+ frame_bytes = (bs->limit - bs->pos)/8;
+ to_fill_bytes -= MINIMP3_MIN(to_fill_bytes, frame_bytes);
+ }
+ }
+ }
+ dec->offset = dec->index.frames[i].offset;
+ dec->to_skip = position - dec->index.frames[i].sample;
+ while ((i + 1) < dec->index.num_frames && !dec->index.frames[i].sample && !dec->index.frames[i + 1].sample)
+ { /* skip not decodable first frames */
+ const uint8_t *hdr;
+ if (dec->io)
+ {
+ hdr = dec->file.buffer;
+ if (dec->io->seek(dec->index.frames[i].offset, dec->io->seek_data))
+ return MP3D_E_IOERROR;
+ size_t readed = dec->io->read((uint8_t *)hdr, HDR_SIZE, dec->io->read_data);
+ if (readed != HDR_SIZE)
+ return MP3D_E_IOERROR;
+ } else
+ hdr = dec->file.buffer + dec->index.frames[i].offset;
+ dec->to_skip += hdr_frame_samples(hdr)*dec->info.channels;
+ i++;
+ }
+do_exit:
+ if (dec->io)
+ {
+ if (dec->io->seek(dec->offset, dec->io->seek_data))
+ return MP3D_E_IOERROR;
+ }
+ dec->buffer_samples = 0;
+ dec->buffer_consumed = 0;
+ dec->input_consumed = 0;
+ dec->input_filled = 0;
+ dec->last_error = 0;
+ mp3dec_init(&dec->mp3d);
+ return 0;
+}
+
+size_t mp3dec_ex_read_frame(mp3dec_ex_t *dec, mp3d_sample_t **buf, mp3dec_frame_info_t *frame_info, size_t max_samples)
+{
+ if (!dec || !buf || !frame_info)
+ {
+ if (dec)
+ dec->last_error = MP3D_E_PARAM;
+ return 0;
+ }
+ if (dec->detected_samples && dec->cur_sample >= dec->detected_samples)
+ return 0; /* at end of stream */
+ if (dec->last_error)
+ return 0; /* error eof state, seek can reset it */
+ *buf = NULL;
+ uint64_t end_offset = dec->end_offset ? dec->end_offset : dec->file.size;
+ int eof = 0;
+ while (dec->buffer_consumed == dec->buffer_samples)
+ {
+ const uint8_t *dec_buf;
+ if (dec->io)
+ {
+ if (!eof && (dec->input_filled - dec->input_consumed) < MINIMP3_BUF_SIZE)
+ { /* keep minimum 10 consecutive mp3 frames (~16KB) worst case */
+ memmove((uint8_t*)dec->file.buffer, (uint8_t*)dec->file.buffer + dec->input_consumed, dec->input_filled - dec->input_consumed);
+ dec->input_filled -= dec->input_consumed;
+ dec->input_consumed = 0;
+ size_t readed = dec->io->read((uint8_t*)dec->file.buffer + dec->input_filled, dec->file.size - dec->input_filled, dec->io->read_data);
+ if (readed > (dec->file.size - dec->input_filled))
+ {
+ dec->last_error = MP3D_E_IOERROR;
+ readed = 0;
+ }
+ if (readed != (dec->file.size - dec->input_filled))
+ eof = 1;
+ dec->input_filled += readed;
+ if (eof)
+ mp3dec_skip_id3v1((uint8_t*)dec->file.buffer, &dec->input_filled);
+ }
+ dec_buf = dec->file.buffer + dec->input_consumed;
+ if (!(dec->input_filled - dec->input_consumed))
+ return 0;
+ dec->buffer_samples = mp3dec_decode_frame(&dec->mp3d, dec_buf, dec->input_filled - dec->input_consumed, dec->buffer, frame_info);
+ dec->input_consumed += frame_info->frame_bytes;
+ } else
+ {
+ dec_buf = dec->file.buffer + dec->offset;
+ uint64_t buf_size = end_offset - dec->offset;
+ if (!buf_size)
+ return 0;
+ dec->buffer_samples = mp3dec_decode_frame(&dec->mp3d, dec_buf, MINIMP3_MIN(buf_size, (uint64_t)INT_MAX), dec->buffer, frame_info);
+ }
+ dec->buffer_consumed = 0;
+ if (dec->info.hz != frame_info->hz || dec->info.layer != frame_info->layer)
+ {
+return_e_decode:
+ dec->last_error = MP3D_E_DECODE;
+ return 0;
+ }
+ if (dec->buffer_samples)
+ {
+ dec->buffer_samples *= frame_info->channels;
+ if (dec->to_skip)
+ {
+ size_t skip = MINIMP3_MIN(dec->buffer_samples, dec->to_skip);
+ dec->buffer_consumed += skip;
+ dec->to_skip -= skip;
+ }
+ if (
+#ifdef MINIMP3_ALLOW_MONO_STEREO_TRANSITION
+ !(dec->flags & MP3D_ALLOW_MONO_STEREO_TRANSITION) &&
+#endif
+ dec->buffer_consumed != dec->buffer_samples && dec->info.channels != frame_info->channels)
+ {
+ goto return_e_decode;
+ }
+ } else if (dec->to_skip)
+ { /* In mp3 decoding not always can start decode from any frame because of bit reservoir,
+ count skip samples for such frames */
+ int frame_samples = hdr_frame_samples(dec_buf)*frame_info->channels;
+ dec->to_skip -= MINIMP3_MIN(frame_samples, dec->to_skip);
+ }
+ dec->offset += frame_info->frame_bytes;
+ }
+ size_t out_samples = MINIMP3_MIN((size_t)(dec->buffer_samples - dec->buffer_consumed), max_samples);
+ if (dec->detected_samples)
+ { /* count decoded samples to properly cut padding */
+ if (dec->cur_sample + out_samples >= dec->detected_samples)
+ out_samples = dec->detected_samples - dec->cur_sample;
+ }
+ dec->cur_sample += out_samples;
+ *buf = dec->buffer + dec->buffer_consumed;
+ dec->buffer_consumed += out_samples;
+ return out_samples;
+}
+
+size_t mp3dec_ex_read(mp3dec_ex_t *dec, mp3d_sample_t *buf, size_t samples)
+{
+ if (!dec || !buf)
+ {
+ if (dec)
+ dec->last_error = MP3D_E_PARAM;
+ return 0;
+ }
+ mp3dec_frame_info_t frame_info;
+ memset(&frame_info, 0, sizeof(frame_info));
+ size_t samples_requested = samples;
+ while (samples)
+ {
+ mp3d_sample_t *buf_frame = NULL;
+ size_t read_samples = mp3dec_ex_read_frame(dec, &buf_frame, &frame_info, samples);
+ if (!read_samples)
+ {
+ break;
+ }
+ memcpy(buf, buf_frame, read_samples * sizeof(mp3d_sample_t));
+ buf += read_samples;
+ samples -= read_samples;
+ }
+ return samples_requested - samples;
+}
+
+int mp3dec_ex_open_cb(mp3dec_ex_t *dec, mp3dec_io_t *io, int flags)
+{
+ if (!dec || !io || (flags & (~MP3D_FLAGS_MASK)))
+ return MP3D_E_PARAM;
+ memset(dec, 0, sizeof(*dec));
+#ifdef MINIMP3_HAVE_RING
+ int ret;
+ if (ret = mp3dec_open_ring(&dec->file, MINIMP3_IO_SIZE))
+ return ret;
+#else
+ dec->file.size = MINIMP3_IO_SIZE;
+ dec->file.buffer = (const uint8_t*)malloc(dec->file.size);
+ if (!dec->file.buffer)
+ return MP3D_E_MEMORY;
+#endif
+ dec->flags = flags;
+ dec->io = io;
+ mp3dec_init(&dec->mp3d);
+ if (io->seek(0, io->seek_data))
+ return MP3D_E_IOERROR;
+ int ret = mp3dec_iterate_cb(io, (uint8_t *)dec->file.buffer, dec->file.size, mp3dec_load_index, dec);
+ if (ret && MP3D_E_USER != ret)
+ return ret;
+ if (dec->io->seek(dec->start_offset, dec->io->seek_data))
+ return MP3D_E_IOERROR;
+ mp3dec_init(&dec->mp3d);
+ dec->buffer_samples = 0;
+ dec->indexes_built = !(dec->vbr_tag_found || (flags & MP3D_DO_NOT_SCAN));
+ dec->flags &= (~MP3D_DO_NOT_SCAN);
+ return 0;
+}
+
+
+#ifndef MINIMP3_NO_STDIO
+
+#if defined(__linux__) || defined(__FreeBSD__)
+#include
+#include
+#include
+#include
+#include
+#include
+#if !defined(_GNU_SOURCE)
+#include
+#include
+#endif
+#if !defined(MAP_POPULATE) && defined(__linux__)
+#define MAP_POPULATE 0x08000
+#elif !defined(MAP_POPULATE)
+#define MAP_POPULATE 0
+#endif
+
+static void mp3dec_close_file(mp3dec_map_info_t *map_info)
+{
+ if (map_info->buffer && MAP_FAILED != map_info->buffer)
+ munmap((void *)map_info->buffer, map_info->size);
+ map_info->buffer = 0;
+ map_info->size = 0;
+}
+
+static int mp3dec_open_file(const char *file_name, mp3dec_map_info_t *map_info)
+{
+ if (!file_name)
+ return MP3D_E_PARAM;
+ int file;
+ struct stat st;
+ memset(map_info, 0, sizeof(*map_info));
+retry_open:
+ file = open(file_name, O_RDONLY);
+ if (file < 0 && (errno == EAGAIN || errno == EINTR))
+ goto retry_open;
+ if (file < 0 || fstat(file, &st) < 0)
+ {
+ close(file);
+ return MP3D_E_IOERROR;
+ }
+
+ map_info->size = st.st_size;
+retry_mmap:
+ map_info->buffer = (const uint8_t *)mmap(NULL, st.st_size, PROT_READ, MAP_PRIVATE | MAP_POPULATE, file, 0);
+ if (MAP_FAILED == map_info->buffer && (errno == EAGAIN || errno == EINTR))
+ goto retry_mmap;
+ close(file);
+ if (MAP_FAILED == map_info->buffer)
+ return MP3D_E_IOERROR;
+ return 0;
+}
+
+#if MINIMP3_ENABLE_RING && defined(__linux__) && defined(_GNU_SOURCE)
+#define MINIMP3_HAVE_RING
+static void mp3dec_close_ring(mp3dec_map_info_t *map_info)
+{
+#if defined(__linux__) && defined(_GNU_SOURCE)
+ if (map_info->buffer && MAP_FAILED != map_info->buffer)
+ munmap((void *)map_info->buffer, map_info->size*2);
+#else
+ if (map_info->buffer)
+ {
+ shmdt(map_info->buffer);
+ shmdt(map_info->buffer + map_info->size);
+ }
+#endif
+ map_info->buffer = 0;
+ map_info->size = 0;
+}
+
+static int mp3dec_open_ring(mp3dec_map_info_t *map_info, size_t size)
+{
+ int memfd, page_size;
+#if defined(__linux__) && defined(_GNU_SOURCE)
+ void *buffer;
+ int res;
+#endif
+ memset(map_info, 0, sizeof(*map_info));
+
+#ifdef _SC_PAGESIZE
+ page_size = sysconf(_SC_PAGESIZE);
+#else
+ page_size = getpagesize();
+#endif
+ map_info->size = (size + page_size - 1)/page_size*page_size;
+
+#if defined(__linux__) && defined(_GNU_SOURCE)
+ memfd = memfd_create("mp3_ring", 0);
+ if (memfd < 0)
+ return MP3D_E_MEMORY;
+
+retry_ftruncate:
+ res = ftruncate(memfd, map_info->size);
+ if (res && (errno == EAGAIN || errno == EINTR))
+ goto retry_ftruncate;
+ if (res)
+ goto error;
+
+retry_mmap:
+ map_info->buffer = (const uint8_t *)mmap(NULL, map_info->size*2, PROT_NONE, MAP_ANONYMOUS | MAP_PRIVATE, -1, 0);
+ if (MAP_FAILED == map_info->buffer && (errno == EAGAIN || errno == EINTR))
+ goto retry_mmap;
+ if (MAP_FAILED == map_info->buffer || !map_info->buffer)
+ goto error;
+retry_mmap2:
+ buffer = mmap((void *)map_info->buffer, map_info->size, PROT_READ | PROT_WRITE, MAP_FIXED | MAP_SHARED, memfd, 0);
+ if (MAP_FAILED == map_info->buffer && (errno == EAGAIN || errno == EINTR))
+ goto retry_mmap2;
+ if (MAP_FAILED == map_info->buffer || buffer != (void *)map_info->buffer)
+ goto error;
+retry_mmap3:
+ buffer = mmap((void *)map_info->buffer + map_info->size, map_info->size, PROT_READ | PROT_WRITE, MAP_FIXED | MAP_SHARED, memfd, 0);
+ if (MAP_FAILED == map_info->buffer && (errno == EAGAIN || errno == EINTR))
+ goto retry_mmap3;
+ if (MAP_FAILED == map_info->buffer || buffer != (void *)(map_info->buffer + map_info->size))
+ goto error;
+
+ close(memfd);
+ return 0;
+error:
+ close(memfd);
+ mp3dec_close_ring(map_info);
+ return MP3D_E_MEMORY;
+#else
+ memfd = shmget(IPC_PRIVATE, map_info->size, IPC_CREAT | 0700);
+ if (memfd < 0)
+ return MP3D_E_MEMORY;
+retry_mmap:
+ map_info->buffer = (const uint8_t *)mmap(NULL, map_info->size*2, PROT_NONE, MAP_PRIVATE, -1, 0);
+ if (MAP_FAILED == map_info->buffer && (errno == EAGAIN || errno == EINTR))
+ goto retry_mmap;
+ if (MAP_FAILED == map_info->buffer)
+ goto error;
+ if (map_info->buffer != shmat(memfd, map_info->buffer, 0))
+ goto error;
+ if ((map_info->buffer + map_info->size) != shmat(memfd, map_info->buffer + map_info->size, 0))
+ goto error;
+ if (shmctl(memfd, IPC_RMID, NULL) < 0)
+ return MP3D_E_MEMORY;
+ return 0;
+error:
+ shmctl(memfd, IPC_RMID, NULL);
+ mp3dec_close_ring(map_info);
+ return MP3D_E_MEMORY;
+#endif
+}
+#endif /*MINIMP3_ENABLE_RING*/
+#elif defined(_WIN32)
+#include
+
+static void mp3dec_close_file(mp3dec_map_info_t *map_info)
+{
+ if (map_info->buffer)
+ UnmapViewOfFile(map_info->buffer);
+ map_info->buffer = 0;
+ map_info->size = 0;
+}
+
+static int mp3dec_open_file_h(HANDLE file, mp3dec_map_info_t *map_info)
+{
+ memset(map_info, 0, sizeof(*map_info));
+
+ HANDLE mapping = NULL;
+ LARGE_INTEGER s;
+ s.LowPart = GetFileSize(file, (DWORD*)&s.HighPart);
+ if (s.LowPart == INVALID_FILE_SIZE && GetLastError() != NO_ERROR)
+ goto error;
+ map_info->size = s.QuadPart;
+
+ mapping = CreateFileMapping(file, NULL, PAGE_READONLY, 0, 0, NULL);
+ if (!mapping)
+ goto error;
+ map_info->buffer = (const uint8_t*)MapViewOfFile(mapping, FILE_MAP_READ, 0, 0, s.QuadPart);
+ CloseHandle(mapping);
+ if (!map_info->buffer)
+ goto error;
+
+ CloseHandle(file);
+ return 0;
+error:
+ mp3dec_close_file(map_info);
+ CloseHandle(file);
+ return MP3D_E_IOERROR;
+}
+
+static int mp3dec_open_file(const char *file_name, mp3dec_map_info_t *map_info)
+{
+ if (!file_name)
+ return MP3D_E_PARAM;
+ HANDLE file = CreateFileA(file_name, GENERIC_READ, FILE_SHARE_READ, 0, OPEN_EXISTING, 0, 0);
+ if (INVALID_HANDLE_VALUE == file)
+ return MP3D_E_IOERROR;
+ return mp3dec_open_file_h(file, map_info);
+}
+
+static int mp3dec_open_file_w(const wchar_t *file_name, mp3dec_map_info_t *map_info)
+{
+ if (!file_name)
+ return MP3D_E_PARAM;
+ HANDLE file = CreateFileW(file_name, GENERIC_READ, FILE_SHARE_READ, 0, OPEN_EXISTING, 0, 0);
+ if (INVALID_HANDLE_VALUE == file)
+ return MP3D_E_IOERROR;
+ return mp3dec_open_file_h(file, map_info);
+}
+#else
+#include
+
+static void mp3dec_close_file(mp3dec_map_info_t *map_info)
+{
+ if (map_info->buffer)
+ free((void *)map_info->buffer);
+ map_info->buffer = 0;
+ map_info->size = 0;
+}
+
+static int mp3dec_open_file(const char *file_name, mp3dec_map_info_t *map_info)
+{
+ if (!file_name)
+ return MP3D_E_PARAM;
+ memset(map_info, 0, sizeof(*map_info));
+ FILE *file = fopen(file_name, "rb");
+ if (!file)
+ return MP3D_E_IOERROR;
+ int res = MP3D_E_IOERROR;
+ long size = -1;
+ if (fseek(file, 0, SEEK_END))
+ goto error;
+ size = ftell(file);
+ if (size < 0)
+ goto error;
+ map_info->size = (size_t)size;
+ if (fseek(file, 0, SEEK_SET))
+ goto error;
+ map_info->buffer = (uint8_t *)malloc(map_info->size);
+ if (!map_info->buffer)
+ {
+ res = MP3D_E_MEMORY;
+ goto error;
+ }
+ if (fread((void *)map_info->buffer, 1, map_info->size, file) != map_info->size)
+ goto error;
+ fclose(file);
+ return 0;
+error:
+ mp3dec_close_file(map_info);
+ fclose(file);
+ return res;
+}
+#endif
+
+static int mp3dec_detect_mapinfo(mp3dec_map_info_t *map_info)
+{
+ int ret = mp3dec_detect_buf(map_info->buffer, map_info->size);
+ mp3dec_close_file(map_info);
+ return ret;
+}
+
+static int mp3dec_load_mapinfo(mp3dec_t *dec, mp3dec_map_info_t *map_info, mp3dec_file_info_t *info, MP3D_PROGRESS_CB progress_cb, void *user_data)
+{
+ int ret = mp3dec_load_buf(dec, map_info->buffer, map_info->size, info, progress_cb, user_data);
+ mp3dec_close_file(map_info);
+ return ret;
+}
+
+static int mp3dec_iterate_mapinfo(mp3dec_map_info_t *map_info, MP3D_ITERATE_CB callback, void *user_data)
+{
+ int ret = mp3dec_iterate_buf(map_info->buffer, map_info->size, callback, user_data);
+ mp3dec_close_file(map_info);
+ return ret;
+}
+
+static int mp3dec_ex_open_mapinfo(mp3dec_ex_t *dec, int flags)
+{
+ int ret = mp3dec_ex_open_buf(dec, dec->file.buffer, dec->file.size, flags);
+ dec->is_file = 1;
+ if (ret)
+ mp3dec_ex_close(dec);
+ return ret;
+}
+
+int mp3dec_detect(const char *file_name)
+{
+ int ret;
+ mp3dec_map_info_t map_info;
+ if ((ret = mp3dec_open_file(file_name, &map_info)))
+ return ret;
+ return mp3dec_detect_mapinfo(&map_info);
+}
+
+int mp3dec_load(mp3dec_t *dec, const char *file_name, mp3dec_file_info_t *info, MP3D_PROGRESS_CB progress_cb, void *user_data)
+{
+ int ret;
+ mp3dec_map_info_t map_info;
+ if ((ret = mp3dec_open_file(file_name, &map_info)))
+ return ret;
+ return mp3dec_load_mapinfo(dec, &map_info, info, progress_cb, user_data);
+}
+
+int mp3dec_iterate(const char *file_name, MP3D_ITERATE_CB callback, void *user_data)
+{
+ int ret;
+ mp3dec_map_info_t map_info;
+ if ((ret = mp3dec_open_file(file_name, &map_info)))
+ return ret;
+ return mp3dec_iterate_mapinfo(&map_info, callback, user_data);
+}
+
+int mp3dec_ex_open(mp3dec_ex_t *dec, const char *file_name, int flags)
+{
+ int ret;
+ if (!dec)
+ return MP3D_E_PARAM;
+ if ((ret = mp3dec_open_file(file_name, &dec->file)))
+ return ret;
+ return mp3dec_ex_open_mapinfo(dec, flags);
+}
+
+void mp3dec_ex_close(mp3dec_ex_t *dec)
+{
+#ifdef MINIMP3_HAVE_RING
+ if (dec->io)
+ mp3dec_close_ring(&dec->file);
+#else
+ if (dec->io && dec->file.buffer)
+ free((void*)dec->file.buffer);
+#endif
+ if (dec->is_file)
+ mp3dec_close_file(&dec->file);
+ if (dec->index.frames)
+ free(dec->index.frames);
+ memset(dec, 0, sizeof(*dec));
+}
+
+#ifdef _WIN32
+int mp3dec_detect_w(const wchar_t *file_name)
+{
+ int ret;
+ mp3dec_map_info_t map_info;
+ if ((ret = mp3dec_open_file_w(file_name, &map_info)))
+ return ret;
+ return mp3dec_detect_mapinfo(&map_info);
+}
+
+int mp3dec_load_w(mp3dec_t *dec, const wchar_t *file_name, mp3dec_file_info_t *info, MP3D_PROGRESS_CB progress_cb, void *user_data)
+{
+ int ret;
+ mp3dec_map_info_t map_info;
+ if ((ret = mp3dec_open_file_w(file_name, &map_info)))
+ return ret;
+ return mp3dec_load_mapinfo(dec, &map_info, info, progress_cb, user_data);
+}
+
+int mp3dec_iterate_w(const wchar_t *file_name, MP3D_ITERATE_CB callback, void *user_data)
+{
+ int ret;
+ mp3dec_map_info_t map_info;
+ if ((ret = mp3dec_open_file_w(file_name, &map_info)))
+ return ret;
+ return mp3dec_iterate_mapinfo(&map_info, callback, user_data);
+}
+
+int mp3dec_ex_open_w(mp3dec_ex_t *dec, const wchar_t *file_name, int flags)
+{
+ int ret;
+ if ((ret = mp3dec_open_file_w(file_name, &dec->file)))
+ return ret;
+ return mp3dec_ex_open_mapinfo(dec, flags);
+}
+#endif
+#else /* MINIMP3_NO_STDIO */
+void mp3dec_ex_close(mp3dec_ex_t *dec)
+{
+#ifdef MINIMP3_HAVE_RING
+ if (dec->io)
+ mp3dec_close_ring(&dec->file);
+#else
+ if (dec->io && dec->file.buffer)
+ free((void*)dec->file.buffer);
+#endif
+ if (dec->index.frames)
+ free(dec->index.frames);
+ memset(dec, 0, sizeof(*dec));
+}
+#endif
+
+#endif /* MINIMP3_IMPLEMENTATION && !_MINIMP3_EX_IMPLEMENTATION_GUARD */
diff --git a/core/cart_hw/paprium.h b/core/cart_hw/paprium.h
new file mode 100644
index 000000000..9acf355ef
--- /dev/null
+++ b/core/cart_hw/paprium.h
@@ -0,0 +1,2863 @@
+/*
+Project Little Man
+*/
+
+#ifdef _WIN32
+#include
+#include
+#endif
+
+
+#define DEBUG_SPRITE 0
+#define DEBUG_MODE 0
+#define DEBUG_CHEAT 0
+
+
+#define MINIMP3_IMPLEMENTATION
+#include "minimp3_ex.h"
+
+
+static mp3dec_t paprium_mp3d;
+static mp3dec_file_info_t paprium_mp3d_info;
+
+static mp3dec_t paprium_mp3d_boss1;
+static mp3dec_file_info_t paprium_mp3d_info_boss1;
+
+static mp3dec_t paprium_mp3d_boss2;
+static mp3dec_file_info_t paprium_mp3d_info_boss2;
+
+static mp3dec_t paprium_mp3d_boss3;
+static mp3dec_file_info_t paprium_mp3d_info_boss3;
+
+static mp3dec_t paprium_mp3d_boss4;
+static mp3dec_file_info_t paprium_mp3d_info_boss4;
+
+static int paprium_track_last;
+extern char g_rom_dir[256];
+
+
+#define PAPRIUM_BOSS1 0x17
+#define PAPRIUM_BOSS2 0x21
+#define PAPRIUM_BOSS3 0x22
+#define PAPRIUM_BOSS4 0x23
+
+
+static int skip_boot1 = 1;
+
+
+extern T_SRAM sram;
+
+
+extern retro_log_printf_t log_cb;
+static char error_str[1024];
+static int paprium_cmd_count = 0;
+
+#define m68k_read_immediate_16(address) *(uint16 *)(m68k.memory_map[((address)>>16)&0xff].base + ((address) & 0xffff))
+#define m68k_read_immediate_32(address) (m68k_read_immediate_16(address) << 16) | (m68k_read_immediate_16(address+2))
+
+
+static uint8 paprium_obj_ram[0x80000];
+static uint8 paprium_wave_ram[0x180000];
+
+static int paprium_tmss = 1;
+int fast_dma_hack = 0;
+
+static int paprium_music_ptr;
+static int paprium_wave_ptr;
+static int paprium_sfx_ptr;
+static int paprium_tile_ptr;
+static int paprium_sprite_ptr;
+
+
+typedef struct paprium_voice_t
+{
+ int volume;
+ int panning;
+ int flags;
+ int type;
+
+ int size;
+ int ptr;
+ int tick;
+
+ int loop;
+ int echo;
+ int program;
+
+
+ int count;
+
+ int time;
+
+ int start;
+ int num;
+
+ int decay;
+ int decay2;
+ int release;
+ int sustain;
+
+ int duration;
+ int velocity;
+ int keyon;
+ int key_type;
+ int pitch;
+ int cents;
+ int modulation;
+} paprium_voice_t;
+
+
+struct paprium_t
+{
+ uint8 ram[0x10000];
+ uint8 decoder_ram[0x10000];
+ uint8 scaler_ram[0x1000];
+ uint8 music_ram[0x8000];
+ uint8 exps_ram[14*8];
+
+ paprium_voice_t sfx[8];
+ paprium_voice_t music[26];
+
+ int music_section, audio_tick, music_segment;
+
+ int out_l, out_r;
+ int audio_flags, sfx_volume, music_volume;
+
+ int decoder_mode, decoder_ptr, decoder_size;
+ int draw_src, draw_dst;
+ int obj[0x31];
+
+ int echo_l[48000/4], echo_r[48000/4];
+ int echo_ptr, echo_pan;
+
+ int music_track, mp3_ptr, music_tick;
+} paprium_s;
+
+
+uint8 paprium_volume_table[256] =
+{
+ 0x00, 0x03, 0x07, 0x0B, 0x0E, 0x12, 0x15, 0x18, 0x1B, 0x1E, 0x21, 0x24, 0x27, 0x29, 0x2C, 0x2F,
+ 0x31, 0x34, 0x36, 0x38, 0x3B, 0x3D, 0x3F, 0x41, 0x44, 0x46, 0x48, 0x4A, 0x4C, 0x4E, 0x50, 0x51,
+ 0x53, 0x55, 0x57, 0x59, 0x5A, 0x5C, 0x5E, 0x5F, 0x61, 0x63, 0x64, 0x66, 0x67, 0x69, 0x6A, 0x6C,
+ 0x6D, 0x6F, 0x70, 0x72, 0x73, 0x74, 0x76, 0x77, 0x78, 0x7A, 0x7B, 0x7C, 0x7E, 0x7F, 0x80, 0x81,
+ 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, 0x8A, 0x8B, 0x8C, 0x8D, 0x8E, 0x8F, 0x90, 0x91, 0x92, 0x93,
+ 0x94, 0x95, 0x96, 0x97, 0x98, 0x99, 0x9A, 0x9B, 0x9C, 0x9D, 0x9E, 0x9F, 0xA0, 0xA1, 0xA2, 0xA3,
+ 0xA4, 0xA4, 0xA5, 0xA6, 0xA7, 0xA8, 0xA9, 0xAA, 0xAB, 0xAB, 0xAC, 0xAD, 0xAE, 0xAF, 0xAF, 0xB0,
+ 0xB1, 0xB2, 0xB3, 0xB3, 0xB4, 0xB5, 0xB6, 0xB6, 0xB7, 0xB8, 0xB9, 0xB9, 0xBA, 0xBB, 0xBC, 0xBC,
+ 0xBD, 0xBE, 0xBE, 0xBF, 0xC0, 0xC1, 0xC1, 0xC2, 0xC3, 0xC3, 0xC4, 0xC5, 0xC5, 0xC6, 0xC7, 0xC7,
+ 0xC8, 0xC9, 0xC9, 0xCA, 0xCA, 0xCB, 0xCC, 0xCC, 0xCD, 0xCE, 0xCE, 0xCF, 0xCF, 0xD0, 0xD1, 0xD1,
+ 0xD2, 0xD2, 0xD3, 0xD3, 0xD4, 0xD5, 0xD5, 0xD6, 0xD6, 0xD7, 0xD7, 0xD8, 0xD9, 0xD9, 0xDA, 0xDA,
+ 0xDB, 0xDB, 0xDC, 0xDC, 0xDD, 0xDD, 0xDE, 0xDF, 0xDF, 0xE0, 0xE0, 0xE1, 0xE1, 0xE2, 0xE2, 0xE3,
+ 0xE3, 0xE4, 0xE4, 0xE5, 0xE5, 0xE6, 0xE6, 0xE7, 0xE7, 0xE8, 0xE8, 0xE9, 0xE9, 0xEA, 0xEA, 0xEA,
+ 0xEB, 0xEB, 0xEC, 0xEC, 0xED, 0xED, 0xEE, 0xEE, 0xEF, 0xEF, 0xF0, 0xF0, 0xF0, 0xF1, 0xF1, 0xF2,
+ 0xF2, 0xF3, 0xF3, 0xF4, 0xF4, 0xF4, 0xF5, 0xF5, 0xF6, 0xF6, 0xF7, 0xF7, 0xF7, 0xF8, 0xF8, 0xF9,
+ 0xF9, 0xF9, 0xFA, 0xFA, 0xFB, 0xFB, 0xFC, 0xFC, 0xFC, 0xFD, 0xFD, 0xFE, 0xFE, 0xFE, 0xFF, 0xFF,
+};
+
+
+static void paprium_load_mp3(int track, int reload)
+{
+ static char name[512];
+
+ paprium_s.music_track = track;
+
+#ifdef _WIN32
+ sprintf(error_str, "%s\\paprium\\", g_rom_dir);
+#else
+ sprintf(error_str, "%s/paprium/", g_rom_dir);
+#endif
+
+ switch(track) {
+ case 0x01: sprintf(name, "%s02 90's Acid Dub Character Select.mp3", error_str); break;
+ case 0x02: sprintf(name, "%s08 90's Dance.mp3", error_str); break;
+ case 0x03: sprintf(name, "%s42 1988 Commercial.mp3", error_str); break;
+ case 0x04: sprintf(name, "%s05 Asian Chill.mp3", error_str); break;
+ case 0x05: sprintf(name, "%s31 Bad Dudes vs Paprium.mp3", error_str); break;
+ case 0x06: sprintf(name, "%s43 Blade FM.mp3", error_str); break;
+ case 0x07: sprintf(name, "%s03 Bone Crusher.mp3", error_str); break;
+ case 0x0B: sprintf(name, "%s26 Club Shuffle.mp3", error_str); break;
+ case 0x0C: sprintf(name, "%s23 Continue.mp3", error_str); break; /* Continue Fast */
+ case 0x0E: sprintf(name, "%s07 Cool Groove.mp3", error_str); break;
+ case 0x0F: sprintf(name, "%s36 Cyberpunk Ninja.mp3", error_str); break;
+ case 0x10: sprintf(name, "%s35 Cyberpunk Funk.mp3", error_str); break;
+ case 0x11: sprintf(name, "%s30 Cyber Interlude.mp3", error_str); break;
+ case 0x12: sprintf(name, "%s21 Cyborg Invasion.mp3", error_str); break;
+ case 0x13: sprintf(name, "%s44 Dark Alley.mp3", error_str); break;
+ case 0x14: sprintf(name, "%s29 Dark & Power Mad.mp3", error_str); break;
+ case 0x15: sprintf(name, "%s24 Intro.mp3", error_str); break; /* Dark Bounce */
+ case 0x16: sprintf(name, "%s27 Dark Rock.mp3", error_str); break;
+ case 0x17: sprintf(name, "%s04 Drumbass Boss.mp3", error_str); break;
+ case 0x18: sprintf(name, "%s45 Dubstep Groove.mp3", error_str); break;
+ case 0x19: sprintf(name, "%s15 Electro Acid Funk.mp3", error_str); break;
+ case 0x1B: sprintf(name, "%s28 Evolve.mp3", error_str); break;
+ case 0x1C: sprintf(name, "%s33 Funk Enhanced Mix.mp3", error_str); break;
+ case 0x1D: sprintf(name, "%s41 Game Over.mp3", error_str); break;
+ case 0x1E: sprintf(name, "%s46 Gothic.mp3", error_str); break;
+ case 0x20: sprintf(name, "%s13 Hard Rock.mp3", error_str); break;
+ case 0x21: sprintf(name, "%s22 Hardcore BP1.mp3", error_str); break;
+ case 0x22: sprintf(name, "%s11 Hardcore BP2.mp3", error_str); break;
+ case 0x23: sprintf(name, "%s38 Hardcore BP3.mp3", error_str); break;
+ case 0x24: sprintf(name, "%s40 Score.mp3", error_str); break; /* High Score */
+ case 0x25: sprintf(name, "%s47 House.mp3", error_str); break;
+ case 0x26: sprintf(name, "%s17 Indie Shuffle.mp3", error_str); break;
+ case 0x27: sprintf(name, "%s25 Indie Break Beat.mp3", error_str); break;
+ case 0x28: sprintf(name, "%s16 Jazzy Shuffle.mp3", error_str); break;
+ case 0x2A: sprintf(name, "%s19 Neo Metal.mp3", error_str); break;
+ case 0x2B: sprintf(name, "%s14 Neon Rider.mp3", error_str); break;
+ case 0x2E: sprintf(name, "%s09 Retro Beat.mp3", error_str); break;
+ case 0x2F: sprintf(name, "%s20 Sadness.mp3", error_str); break;
+ case 0x31: sprintf(name, "%s18 Slow Asian Beat.mp3", error_str); break;
+ case 0x32: sprintf(name, "%s48 Slow Mood.mp3", error_str); break; /* Slow Mood Ext. ? */
+ case 0x33: sprintf(name, "%s49 Smooth Coords.mp3", error_str); break;
+ case 0x34: sprintf(name, "%s10 Spiral.mp3", error_str); break;
+ case 0x35: sprintf(name, "%s12 Stage Clear.mp3", error_str); break;
+ case 0x36: sprintf(name, "%s32 Summer Breeze.mp3", error_str); break;
+ case 0x37: sprintf(name, "%s06 Techno Beats.mp3", error_str); break;
+ case 0x38: sprintf(name, "%s50 Tension.mp3", error_str); break;
+ case 0x39: sprintf(name, "%s01 Theme of Paprium.mp3", error_str); break;
+ case 0x3A: sprintf(name, "%s39 Ending.mp3", error_str); break; /* Tough Guy */
+ case 0x3B: sprintf(name, "%s34 Transe.mp3", error_str); break;
+ case 0x3C: sprintf(name, "%s37 Urban.mp3", error_str); break;
+ case 0x3D: sprintf(name, "%s51 Water.mp3", error_str); break;
+ case 0x3E: sprintf(name, "%s52 Waterfront Beat.mp3", error_str); break;
+ default: paprium_s.music_track = 0; return;
+ }
+
+ if( reload )
+ paprium_s.mp3_ptr = 0;
+
+ paprium_s.music_tick = 0;
+
+ if( track != PAPRIUM_BOSS1 && track != PAPRIUM_BOSS2 && track != PAPRIUM_BOSS3 && track != PAPRIUM_BOSS4 ) {
+ if( mp3dec_load(&paprium_mp3d, name, &paprium_mp3d_info, NULL, NULL) ) {
+ paprium_s.music_track = 0;
+ return;
+ }
+ }
+}
+
+
+static void paprium_load_mp3_boss()
+{
+ static char name[512];
+
+#ifdef _WIN32
+ sprintf(error_str, "%s\\paprium\\", g_rom_dir);
+#else
+ sprintf(error_str, "%s/paprium/", g_rom_dir);
+#endif
+
+ sprintf(name, "%s04 Drumbass Boss.mp3", error_str);
+ mp3dec_load(&paprium_mp3d_boss1, name, &paprium_mp3d_info_boss1, NULL, NULL);
+
+ sprintf(name, "%s22 Hardcore BP1.mp3", error_str);
+ mp3dec_load(&paprium_mp3d_boss2, name, &paprium_mp3d_info_boss2, NULL, NULL);
+
+ sprintf(name, "%s11 Hardcore BP2.mp3", error_str);
+ mp3dec_load(&paprium_mp3d_boss3, name, &paprium_mp3d_info_boss3, NULL, NULL);
+
+ sprintf(name, "%s38 Hardcore BP3.mp3", error_str);
+ mp3dec_load(&paprium_mp3d_boss4, name, &paprium_mp3d_info_boss4, NULL, NULL);
+}
+
+
+static void paprium_music_sheet()
+{
+ int ch;
+ int l = 0, r = 0;
+
+ /* 00-04 = WMMM */
+ /* 05, 06, 07 */
+ int sections = paprium_s.music_ram[0x09];
+ /* 09 */
+ int bars = (paprium_s.music_ram[0x0B] ? paprium_s.music_ram[0x0B] : 0x100) + 8;
+ /* 0B */
+ int cmds = paprium_s.music_ram[0x0D];
+ /* 10-29 */
+ /* 2A-43 */
+ /* 44-5D */
+ /* 5E-77 */
+ /* 78-97 = title ^ 0xA5 */
+ /* 98-B7 = author ^ 0xA5 */
+ /* B8-D7 = comment ^ 0xA5 */
+
+
+ if( paprium_s.music_segment == -1 ) {
+ paprium_s.music_track = 0;
+ return;
+ }
+
+ if( paprium_s.audio_tick < 4 )
+ return;
+ paprium_s.audio_tick = 0;
+
+
+#if 0
+ sprintf(error_str, "Music_Sheet %X %X - %X %X\n", paprium_s.music_segment, paprium_s.music_section, sections, bars);
+ log_cb(RETRO_LOG_ERROR, error_str);
+#endif
+
+
+ for( ch = 0; ch < 26; ch++ ) {
+ int ptr = *(uint16*)(paprium_s.music_ram + 0xD8 + (ch*sections*2) + (paprium_s.music_segment*2));
+ int index = paprium_s.music_ram[(ptr + paprium_s.music_section)^1];
+ int code = 0, arg = 0;
+ int keyon = 0, duration = 0, freq = -1, volume = 0;
+ paprium_voice_t *voice = paprium_s.music + ch;
+
+
+#if 0
+//if(ch == 0) {
+{
+ sprintf(error_str, "[%d] Music %X %X %X = %X\n", ch, ptr, ptr + paprium_s.music_section, index, (index == 0) ? 0 : ptr + bars + ((index-1)*8) + paprium_s.music_section*2);
+ log_cb(RETRO_LOG_ERROR, error_str);
+}
+#endif
+
+
+ if( index == 0 )
+ goto next;
+ ptr += bars + (index-1) * 8;
+
+
+ for( int lcv = 0; lcv < cmds; lcv++ ) {
+ code = *(uint16*)(paprium_s.music_ram + ptr + lcv*2);
+ arg = code & 0xFF;
+ code >>= 8;
+
+
+ if( code == 0x00 )
+ {} //break;
+
+ else if( code == 0x01 ) { /* ?? */
+ if( ch >= 11-1 ) keyon = code;
+ voice->volume = 255 - paprium_volume_table[arg]; /* z80 table ? */
+ }
+
+ else if( code == 0x02 )
+ voice->panning = arg;
+
+ else if( code == 0x03 ) {
+ voice->volume = 255 - paprium_volume_table[arg]; /* z80 table ? */
+ }
+
+ else if( code == 0x05 ) {
+ voice->volume = 255 - paprium_volume_table[arg]; /* z80 table ? */
+ }
+
+ /* velocity */
+
+ else if( code == 0x08 ) {
+#if 0
+ sprintf(error_str, "08 - %X %X %X\n", ch, ptr, arg);
+ log_cb(RETRO_LOG_ERROR, error_str);
+ //MessageBoxA(0, error_str, "---", 0);
+#endif
+
+ freq = arg;
+ }
+
+ else if( code == 0x0A ) {
+#if 0
+ sprintf(error_str, "0B - %X %X %X\n", ch, ptr, arg);
+ log_cb(RETRO_LOG_ERROR, error_str);
+ //MessageBoxA(0, error_str, "---", 0);
+#endif
+ freq = 0; /* faster ? */
+ }
+
+ else if( code == 0x0B ) {
+#if 0
+ sprintf(error_str, "0B - %X %X %X\n", ch, ptr, arg);
+ log_cb(RETRO_LOG_ERROR, error_str);
+#endif
+ //MessageBoxA(0, error_str, "---", 0);
+ }
+
+ else if( code == 0x0C ) {
+#if 0
+ sprintf(error_str, "0C - %X %X %X\n", ch, ptr, arg);
+ log_cb(RETRO_LOG_ERROR, error_str);
+#endif
+ //MessageBoxA(0, error_str, "---", 0);
+ }
+
+ else if( code == 0x0E ) { /* stop ? */
+ keyon = 0;
+ voice->size = 0;
+ }
+
+ else if( code == 0x0F ) { /* program */
+ voice->program = arg;
+
+ if( ch < 6 ) { /* YM */
+ }
+
+ else if( ch < 10 ) { /* PSG */
+ }
+
+ else
+ { /* wave */
+ }
+
+#if DEBUG_MODE
+ sprintf(error_str, "[%d] Sample %X %X\n", ch, arg, ptr);
+ log_cb(RETRO_LOG_ERROR, error_str);
+#endif
+ }
+ }
+
+
+ if( keyon ) {
+#if 0
+ uint8* ptr = paprium_wave_ram + voice->program*16;
+
+ voice->ptr = (*(uint16*)(ptr + 0x00)<<16) + *(uint16*)(ptr + 0x02);
+ voice->size = (*(uint16*)((paprium_wave_ram + 0x04 + voice->program*16))<<16) + *(uint16*)(paprium_wave_ram + 0x06 + voice->program*16);
+ /* *(uint16*)(paprium_wave_ram + 0x08 + voice->program*16)<<16) + *(uint16*)(paprium_wave_ram + 0x0A + voice->program*16); */
+ voice->type = *(uint16*)(paprium_wave_ram + 0x0C + voice->program*16) + 1;
+ /* *(uint16*)(paprium_wave_ram + 0x0E + voice->program*16); */
+
+ voice->tick = 0;
+ voice->time = 0;
+
+ voice->keyon = keyon;
+ voice->duration = 65536;
+ voice->release = 256;
+#endif
+ }
+
+ if( freq >= 0 ) {
+ voice->type = freq;
+ //if(ch == 16-1) MessageBoxA(0,"hit","-",0);
+ }
+
+next:
+ *(uint16*)(paprium_s.ram + ch*4 + 0x1B98) = index ? 0xE0 : 0; /* L */
+ *(uint16*)(paprium_s.ram + ch*4 + 0x1B9A) = index ? 0xE0 : 0; /* R */
+ }
+
+
+end:
+ if( (++paprium_s.music_section) >= bars ) {
+ paprium_s.music_section = 0;
+
+ if( (++paprium_s.music_segment) >= sections )
+ paprium_s.music_segment = 0;
+ }
+}
+
+
+static void paprium_music_synth(int *out_l, int *out_r)
+{
+ int ch;
+ int l = 0, r = 0;
+
+
+#if 1
+ if( paprium_s.music_track ) {
+ if( paprium_s.music_track == PAPRIUM_BOSS1 ) {
+ l = paprium_mp3d_info_boss1.buffer[paprium_s.mp3_ptr];
+ r = paprium_mp3d_info_boss1.buffer[paprium_s.mp3_ptr];
+ }
+ else if( paprium_s.music_track == PAPRIUM_BOSS2 ) {
+ l = paprium_mp3d_info_boss2.buffer[paprium_s.mp3_ptr];
+ r = paprium_mp3d_info_boss2.buffer[paprium_s.mp3_ptr];
+ }
+ else if( paprium_s.music_track == PAPRIUM_BOSS3 ) {
+ l = paprium_mp3d_info_boss3.buffer[paprium_s.mp3_ptr];
+ r = paprium_mp3d_info_boss3.buffer[paprium_s.mp3_ptr];
+ }
+ else if( paprium_s.music_track == PAPRIUM_BOSS4 ) {
+ l = paprium_mp3d_info_boss4.buffer[paprium_s.mp3_ptr];
+ r = paprium_mp3d_info_boss4.buffer[paprium_s.mp3_ptr];
+ }
+ else {
+ l = paprium_mp3d_info.buffer[paprium_s.mp3_ptr];
+ r = paprium_mp3d_info.buffer[paprium_s.mp3_ptr];
+ }
+
+
+ l = (l * paprium_s.music_volume) / 256;
+ r = (r * paprium_s.music_volume) / 256;
+
+
+ paprium_s.music_tick += 0x10000;
+ if( paprium_s.music_tick >= 0x10000 ) {
+ paprium_s.music_tick -= 0x10000;
+
+ paprium_s.mp3_ptr += 2;
+ }
+
+
+ if( paprium_s.music_track == PAPRIUM_BOSS1 ) {
+ if( paprium_s.mp3_ptr >= paprium_mp3d_info_boss1.samples)
+ paprium_s.mp3_ptr -= paprium_mp3d_info_boss1.samples;
+ }
+ else if( paprium_s.music_track == PAPRIUM_BOSS2 ) {
+ if( paprium_s.mp3_ptr >= paprium_mp3d_info_boss2.samples)
+ paprium_s.mp3_ptr -= paprium_mp3d_info_boss2.samples;
+ }
+ else if( paprium_s.music_track == PAPRIUM_BOSS3 ) {
+ if( paprium_s.mp3_ptr >= paprium_mp3d_info_boss3.samples)
+ paprium_s.mp3_ptr -= paprium_mp3d_info_boss3.samples;
+ }
+ else if( paprium_s.music_track == PAPRIUM_BOSS4 ) {
+ if( paprium_s.mp3_ptr >= paprium_mp3d_info_boss4.samples)
+ paprium_s.mp3_ptr -= paprium_mp3d_info_boss4.samples;
+ }
+ else {
+ if( paprium_s.mp3_ptr >= paprium_mp3d_info.samples)
+ paprium_s.mp3_ptr -= paprium_mp3d_info.samples;
+ }
+ }
+
+ *out_l = l;
+ *out_r = r;
+
+ return;
+#endif
+
+
+ for( ch = 0; ch < 26; ch++ ) {
+ paprium_voice_t *voice = paprium_s.music + ch;
+ const int _rates[] = {2,4,5,8,9,10}; /* 24000 ?, 12000, 9600, 6000, 5333-?, 4800-? */
+
+ int rate = _rates[voice->type] << 16; /* 16.16 */
+ int vol = voice->volume;
+ int pan = voice->panning;
+
+ int sample, sample_l, sample_r;
+
+
+ //if( ch < 15-1 || ch > 17-1 ) goto next;
+
+#if 0
+ if( ch == 20 ) {
+ sprintf(error_str, "[%d] %X %X\n", ch, voice->ptr, voice->size);
+ log_cb(RETRO_LOG_ERROR, error_str);
+ }
+ else
+ goto next;
+#endif
+
+
+ if( ((paprium_s.audio_tick % 4) == 0) && voice->duration) {
+ //voice->duration--;
+ if( voice->duration == 0 ) {
+ if( voice->keyon == 1 ) /* hard off */
+ voice->size = 0;
+ }
+ }
+
+
+ if( voice->size == 0 ) goto next;
+
+
+ sample = *(uint8 *)(paprium_wave_ram + (voice->ptr^1));
+
+ sample = (((sample & 0xFF) * 65536) / 256) - 32768;
+ sample = (sample * vol) / 0x300;
+
+ sample_l = (sample * ((pan <= 0x80) ? 0x80 : 0x100 - pan)) / 0x80;
+ sample_r = (sample * ((pan >= 0x80) ? 0x80 : pan)) / 0x80;
+
+ l += sample_l;
+ r += sample_r;
+
+
+ voice->time++;
+ voice->tick += 0x10000;
+
+
+ if( voice->tick >= rate ) {
+ voice->tick -= rate;
+
+ voice->size--;
+ voice->ptr++;
+ }
+
+
+next:
+ }
+
+
+ *out_l += l;
+ *out_r += r;
+}
+
+
+static void paprium_sfx_voice(int *out_l, int *out_r)
+{
+ int ch;
+ int l = 0, r = 0;
+
+ for( ch = 0; ch < 8; ch++ ) {
+ paprium_voice_t *voice = paprium_s.sfx + ch;
+ const int _rates[] = {1,2,4,5,8,9}; /* 48000, 24000, 12000, 9600, 6000, 5333 */
+
+ int rate = _rates[voice->type >> 4] << 16; /* 16.16 */
+ int depth = voice->type & 0x03;
+ /* voice->type & 0xC0; */
+
+ int vol = voice->volume;
+ int pan = voice->panning;
+
+ int sample, sample_l, sample_r;
+
+
+ if( voice->size == 0 ) goto next;
+
+
+ sample = *(uint8 *)(cart.rom + paprium_sfx_ptr + (voice->ptr^1));
+
+ if( depth == 1 )
+ sample = (((sample & 0xFF) * 65536) / 256) - 32768;
+
+ else if( depth == 2 ) {
+ if( voice->count == 0 )
+ sample >>= 4;
+
+ sample = (((sample & 0x0F) * 65536) / 16) - 32768;
+ }
+
+
+ sample = (sample * vol) / 0x400;
+
+ sample_l = (sample * ((pan <= 0x80) ? 0x80 : 0x100 - pan)) / 0x80;
+ sample_r = (sample * ((pan >= 0x80) ? 0x80 : pan)) / 0x80;
+
+ l += sample_l;
+ r += sample_r;
+
+
+ if( voice->flags & 0x4000 ) { /* echo */
+ if( voice->echo & 1 )
+ paprium_s.echo_l[paprium_s.echo_ptr % (48000/6)] += (sample_l * 33) / 100;
+ else
+ paprium_s.echo_r[paprium_s.echo_ptr % (48000/6)] += (sample_r * 33) / 100;
+ }
+
+
+ if( voice->flags & 0x100 ) { /* amplify */
+ l = (l * 125) / 100;
+ r = (r * 125) / 100;
+ }
+
+ voice->time++;
+
+ voice->tick += 0x10000;
+ voice->tick -= (voice->flags & 0x8000) ? 0x800 : 0; /* tiny pitch */
+ voice->tick -= (voice->flags & 0x2000) ? 0x8000 : 0; /* huge pitch */
+
+
+ if( voice->tick >= rate ) {
+ voice->tick -= rate;
+
+ voice->count++;
+ voice->size--;
+
+ if( voice->count >= depth ) {
+ voice->ptr++;
+
+ voice->count = 0;
+ }
+ }
+
+
+next:
+ if( voice->size == 0 ) {
+ voice->count = 0;
+
+ if( voice->loop ) {
+ uint8 *sfx = paprium_sfx_ptr + cart.rom;
+
+ voice->ptr = (*(uint16 *)(sfx + voice->num*8) << 16) | (*(uint16 *)(sfx + voice->num*8 + 2));
+ voice->size = (*(uint8 *)(sfx + voice->num*8 + 4) << 16) | (*(uint16 *)(sfx + voice->num*8 + 6));
+ }
+ }
+ }
+
+ *out_l += l;
+ *out_r += r;
+}
+
+
+void paprium_audio(int cycles)
+{
+ int lcv;
+ int samples = blip_clocks_needed(snd.blips[3], cycles);
+
+
+#if DEBUG_MODE
+ sprintf(error_str, "Audio frame %X - %X\n", samples, cycles);
+ log_cb(RETRO_LOG_ERROR, error_str);
+#endif
+
+
+ if( paprium_s.music_track != paprium_track_last ) {
+ paprium_load_mp3(paprium_s.music_track, 0);
+ }
+
+
+ paprium_s.audio_tick++;
+
+
+ for( lcv = 0; lcv < samples; lcv++ ) {
+ int l = 0, r = 0;
+ int ch;
+
+
+ paprium_s.echo_l[paprium_s.echo_ptr] = 0;
+ paprium_s.echo_r[paprium_s.echo_ptr] = 0;
+
+
+ paprium_music_synth(&l, &r);
+ paprium_sfx_voice(&l, &r);
+
+
+ paprium_s.echo_ptr = (paprium_s.echo_ptr+1) % (48000/6);
+
+ l += paprium_s.echo_l[paprium_s.echo_ptr];
+ r += paprium_s.echo_r[paprium_s.echo_ptr];
+
+
+ l = (l * paprium_s.sfx_volume) / 0x100;
+ r = (r * paprium_s.sfx_volume) / 0x100;
+
+
+ if( paprium_s.audio_flags & 0x08 ) { /* gain */
+ l = l * 4 / 2;
+ r = r * 4 / 2;
+ }
+
+
+ if( l > 32767 ) l = 32767;
+ else if( l < -32768 ) l = -32768;
+
+ if( r > 32767 ) r = 32767;
+ else if( r < -32768 ) r = -32768;
+
+
+ blip_add_delta_fast(snd.blips[3], lcv, l-paprium_s.out_l, r-paprium_s.out_r);
+
+
+ paprium_s.out_l = l;
+ paprium_s.out_r = r;
+ }
+
+
+ paprium_music_sheet();
+
+
+#if DEBUG_MODE
+ for( lcv = 0; lcv < 8; lcv++ ) {
+ if( !paprium_s.sfx[lcv].decay ) continue;
+
+ sprintf(error_str, "[%d] %d %d %d - %d %d\n", lcv, paprium_s.sfx[lcv].loop, paprium_s.sfx[lcv].volume, paprium_s.sfx[lcv].size, paprium_s.sfx[lcv].decay, paprium_s.sfx[lcv].decay2);
+ log_cb(RETRO_LOG_ERROR, error_str);
+
+ paprium_s.sfx[lcv].decay2 += paprium_s.sfx[lcv].decay;
+ while( paprium_s.sfx[lcv].decay2 >= 2 ) { /* stage1 intro sound fade-out time ?? 2 seems decent */
+ paprium_s.sfx[lcv].volume -= 1;
+ if( paprium_s.sfx[lcv].volume < 0 ) paprium_s.sfx[lcv].volume = 0;
+
+ paprium_s.sfx[lcv].decay2 -= 2;
+ }
+ }
+#endif
+
+
+ blip_end_frame(snd.blips[3], samples);
+
+
+ paprium_track_last = paprium_s.music_track;
+}
+
+
+static void paprium_decoder_lz_rle(uint src, uint8 *dst)
+{
+ int size = 0;
+ int len, lz, rle, code;
+
+
+#if 0
+ sprintf(error_str, "LZ-RLE %X\n", src);
+ log_cb(RETRO_LOG_ERROR, error_str);
+#endif
+
+
+ while(1) {
+ int type = cart.rom[(src++)^1];
+
+ code = type >> 6;
+ len = type & 0x3F;
+
+
+ if( (code == 0) && (len == 0))
+ break;
+
+ else if( code == 1 )
+ rle = cart.rom[(src++)^1];
+
+ else if( code == 2 )
+ lz = size - cart.rom[(src++)^1];
+
+
+ while( len-- > 0 ) {
+ switch(code) {
+ case 0: dst[(size++)^1] = cart.rom[(src++)^1]; break;
+ case 1: dst[(size++)^1] = rle; break;
+ case 2: dst[(size++)^1] = dst[(lz++)^1]; break;
+ case 3: dst[(size++)^1] = 0; break;
+ }
+ }
+ }
+
+#if 0
+ sprintf(error_str, "STOP %X - %X\n", src, size);
+ log_cb(RETRO_LOG_ERROR, error_str);
+#endif
+
+
+ paprium_s.decoder_size = size;
+}
+
+
+static void paprium_decoder_lzo(uint src, uint8 *dst)
+{
+ int size = 0;
+ int len, lz, raw;
+ int state = 0;
+
+
+#if 0
+ sprintf(error_str, "LZO %X\n", src);
+ log_cb(RETRO_LOG_ERROR, error_str);
+#endif
+
+
+ while(1) {
+ int code = cart.rom[(src++)^1];
+
+ if( code & 0x80 ) goto code_80;
+ if( code & 0x40 ) goto code_40;
+ if( code & 0x20 ) goto code_20;
+ if( code & 0x10 ) goto code_10;
+
+
+code_00:
+ if( state == 0 ) {
+ raw = code & 0x0F;
+
+ if( raw == 0 ) {
+ int extra = 0;
+
+ while(1) {
+ raw = cart.rom[(src++)^1];
+ if( raw ) break;
+
+ extra += 255;
+ }
+
+ raw += extra;
+ raw += 15;
+ }
+ raw += 3;
+
+ len = 0;
+ state = 4;
+ goto copy_loop;
+ }
+
+ else if( state < 4 ) {
+ raw = code & 0x03;
+ lz = (code >> 2) & 0x03;
+
+ lz += cart.rom[(src++)^1] << 2;
+ lz += 1;
+
+ len = 2;
+ goto copy_loop;
+ }
+
+ else {
+ raw = code & 0x03;
+ lz = (code >> 2) & 0x03;
+
+ lz += cart.rom[(src++)^1] << 2;
+ lz += 2049;
+
+ len = 3;
+ goto copy_loop;
+ }
+
+
+code_10:
+ len = code & 0x07;
+
+ if( len == 0 ) {
+ int extra = 0;
+
+ while(1) {
+ len = cart.rom[(src++)^1];
+ if( len ) break;
+
+ extra += 255;
+ }
+
+ len += extra;
+ len += 7;
+ }
+ len += 2;
+
+
+ lz = ((code >> 3) & 1) << 14;
+
+ code = cart.rom[(src++)^1];
+ raw = code & 0x03;
+ lz += code >> 2;
+
+ lz += cart.rom[(src++)^1] << 6;
+ lz += 16384;
+
+ if( lz == 16384 ) break;
+ goto copy_loop;
+
+
+code_20:
+ len = code & 0x1F;
+
+ if( len == 0 ) {
+ int extra = 0;
+
+ while(1) {
+ len = cart.rom[(src++)^1];
+ if( len ) break;
+
+ extra += 255;
+ }
+
+ len += extra;
+ len += 31;
+ }
+ len += 2;
+
+
+ code = cart.rom[(src++)^1];
+ raw = code & 0x03;
+
+ lz = code >> 2;
+ lz += cart.rom[(src++)^1] << 6;
+ lz += 1;
+
+ goto copy_loop;
+
+
+code_40:
+ raw = code & 0x03;
+ len = ((code >> 5) & 1) + 3;
+ lz = (code >> 2) & 0x07;
+
+ lz += cart.rom[(src++)^1] << 3;
+ lz += 1;
+
+ goto copy_loop;
+
+
+code_80:
+ raw = code & 0x03;
+ len = ((code >> 5) & 0x03) + 5;
+ lz = (code >> 2) & 0x07;
+
+ lz += cart.rom[(src++)^1] << 3;
+ lz += 1;
+
+
+copy_loop:
+ if( len > 0 )
+ state = raw;
+ else
+ state = 4;
+
+
+ lz = size - lz;
+
+ while(1) {
+ if( len > 0 ) {
+ dst[(size++)^1] = dst[(lz++)^1];
+ len--;
+ }
+
+ else if( raw > 0 ) {
+ dst[(size++)^1] = cart.rom[(src++)^1];
+ raw--;
+ }
+
+ else
+ break;
+ }
+ }
+
+
+#if 0
+ sprintf(error_str, "END %X - %X\n", src, size);
+ log_cb(RETRO_LOG_ERROR, error_str);
+#endif
+
+
+ paprium_s.decoder_size = size;
+}
+
+
+static void paprium_decoder_type(int src, uint8 *dst)
+{
+ int type = cart.rom[(src++)^1];
+
+ if( type == 0x80 )
+ paprium_decoder_lz_rle(src, dst);
+
+ else if( type == 0x81 )
+ paprium_decoder_lzo(src, dst);
+
+ else {
+#if DEBUG_MODE
+ sprintf(error_str, "%X - Decoder_Type %X\n", src-1, type);
+ log_cb(RETRO_LOG_ERROR, error_str);
+ MessageBoxA(0, error_str, "paprium_decoder_init", 0);
+#endif
+ }
+}
+
+
+static int paprium_decoder(int mode)
+{
+#if DEBUG_MODE
+ sprintf(error_str, "[%d] [%04X:%04X] DM Decoder %02X -- %04X %04X %04X\n",
+ v_counter,
+ (m68k.prev_pc>>16)&0xffff, m68k.prev_pc&0xffff,
+ mode, *(uint16 *)(paprium_s.ram + 0x1E10), *(uint16 *)(paprium_s.ram + 0x1E12), *(uint16 *)(paprium_s.ram + 0x1E14));
+ log_cb(RETRO_LOG_ERROR, error_str);
+#endif
+
+
+ int offset = *(uint16 *)(paprium_s.ram + 0x1E10);
+ int ptr = (*(uint16 *)(paprium_s.ram + 0x1E12) << 16) + *(uint16 *)(paprium_s.ram + 0x1E14);
+
+
+#if DEBUG_MODE
+ if( mode != 2 && mode != 7 ) {
+ sprintf(error_str, "Mode %X", mode);
+ log_cb(RETRO_LOG_ERROR, error_str);
+ MessageBoxA(0, error_str, "Decoder_Init", 0);
+ }
+#endif
+
+
+ paprium_decoder_type(ptr, paprium_s.decoder_ram + offset);
+
+
+ paprium_s.decoder_mode = mode;
+ paprium_s.decoder_ptr = offset;
+
+
+#if DEBUG_MODE
+ if( paprium_cmd_count != 3 ) {
+ sprintf(error_str, "Decoder %d count\n", paprium_cmd_count);
+ log_cb(RETRO_LOG_ERROR, error_str);
+ MessageBoxA(0, error_str, "count", 0);
+ }
+#endif
+}
+
+
+static int paprium_decoder_copy(int arg)
+{
+ /* *(uint16 *)(paprium_s.ram + 0x1E10); */
+ int offset = *(uint16 *)(paprium_s.ram + 0x1E12);
+ int size = *(uint16 *)(paprium_s.ram + 0x1E14);
+
+
+#if DEBUG_MODE
+ sprintf(error_str, "[%d] [%04X:%04X] DM Decoder_Copy %02X [%X] -- %04X %04X %04X\n",
+ v_counter,
+ (m68k.prev_pc>>16)&0xffff, m68k.prev_pc&0xffff,
+ arg, paprium_s.decoder_ptr,
+ *(uint16 *)(paprium_s.ram + 0x1E10), *(uint16 *)(paprium_s.ram + 0x1E12), *(uint16 *)(paprium_s.ram + 0x1E14));
+ log_cb(RETRO_LOG_ERROR, error_str);
+#endif
+
+
+#if DEBUG_MODE
+ if( *(uint16 *)(paprium_s.ram + 0x1E10) ) {
+ sprintf(error_str, "paprium_decoder 1E10 = %X", *(uint16 *)(paprium_s.ram + 0x1E10));
+ log_cb(RETRO_LOG_ERROR, error_str);
+ MessageBoxA(0,error_str,"decoder",0);
+ }
+#endif
+
+
+ paprium_s.decoder_ptr = offset;
+ paprium_s.decoder_size = size;
+
+
+#if DEBUG_MODE
+ if( paprium_cmd_count != 3 ) {
+ sprintf(error_str, "Decoder_Copy %d count\n", paprium_cmd_count);
+ log_cb(RETRO_LOG_ERROR, error_str);
+ MessageBoxA(0, error_str, "count", 0);
+ }
+#endif
+}
+
+
+static void paprium_sprite(int index)
+{
+ int lcv, spr_x, spr_y, count;
+ int spritePtr, gfxPtr;
+
+ int dmaSize = 0;
+ int dmaPtr = *(uint16*) (paprium_s.ram + 0x1F16);
+
+ int spriteCount = *(uint16*) (paprium_s.ram + 0x1F18);
+
+ int anim = *(uint16*) (paprium_s.ram + 0xF80 + index*16);
+ int nextAnim = *(uint16*) (paprium_s.ram + 0xF82 + index*16);
+ int obj = *(uint16*) (paprium_s.ram + 0xF84 + index*16) & 0x7FFF;
+ //*(uint16*) (paprium_s.ram + 0xF86 + index*16);
+ int objAttr = *(uint16*) (paprium_s.ram + 0xF88 + index*16);
+ int reset = *(uint16*) (paprium_s.ram + 0xF8A + index*16);
+ int pos_x = *(uint16*) (paprium_s.ram + 0xF8C + index*16);
+ int pos_y = *(uint16*) (paprium_s.ram + 0xF8E + index*16);
+
+ int src = paprium_s.draw_src;
+ int vram = paprium_s.draw_dst;
+ int flip_h = objAttr & 0x800;
+ int animFlags;
+
+
+ int animPtr = *(uint32*) (paprium_obj_ram + (obj+1)*4);
+ int framePtr = paprium_s.obj[index];
+
+
+ if( index != 0x30 ) {
+ //return;
+ }
+
+
+#if DEBUG_MODE /* frozen enemy */
+ {
+ int color = -1;
+ int pri = -1;
+
+ if(0) {}
+ else if( (obj > 0x00 && obj < 0x30) && (anim == 5) ) color = 0;
+ else if( (obj == 0x0D) && (anim == 3) ) color = 0;
+
+ if( color != -1 ) {
+ objAttr &= ~0x6000;
+
+ switch(color) {
+ case 0: break;
+ case 1: objAttr += 0x2000; break;
+ case 2: objAttr += 0x4000; break;
+ case 3: objAttr += 0x6000; break;
+ }
+ }
+
+ if( pri != -1 ) {
+ objAttr &= ~0x8000;
+
+ switch(pri) {
+ case 0: break;
+ case 1: objAttr += 0x8000; break;
+ }
+ }
+ }
+#endif
+
+
+#if DEBUG_SPRITE
+ uint8 *ptr = paprium_s.ram + 0xF80 + index*16;
+
+ sprintf(error_str, "[%d] [%04X:%04X] DM Sprite %02X - %04X %04X %04X %04X %04X %04X X=%04X Y=%04X\n",
+ v_counter,
+ (m68k.prev_pc>>16)&0xffff, m68k.prev_pc&0xffff,
+ index,
+ *(uint16 *)(ptr+0), *(uint16 *)(ptr+2), *(uint16 *)(ptr+4), *(uint16 *)(ptr+6),
+ *(uint16 *)(ptr+8), *(uint16 *)(ptr+10), *(uint16 *)(ptr+12), *(uint16 *)(ptr+14) );
+ log_cb(RETRO_LOG_ERROR, error_str);
+#endif
+
+
+reload:
+ if( reset == 1 ) {
+ framePtr = *(uint32*) (paprium_obj_ram + animPtr + anim*4);
+
+ *(uint16*) (paprium_s.ram + 0xF8A + index*16) = 0;
+ }
+ if( (framePtr == 0) || (framePtr == -1) ) {
+ *(uint16*) (paprium_s.ram + 0xF80 + index*16) = 0;
+ return;
+ }
+
+
+ spritePtr = paprium_obj_ram[framePtr + 0] << 0;
+ spritePtr += paprium_obj_ram[framePtr + 1] << 8;
+ spritePtr += paprium_obj_ram[framePtr + 2] << 16;
+ animFlags = paprium_obj_ram[framePtr + 3];
+
+
+#if DEBUG_SPRITE
+ sprintf(error_str, "%X - %X %X %X - %X - %X %X\n",
+ ((obj+1) & 0x7FFF)*4,
+ animPtr, anim, animPtr + anim*4,
+ framePtr,
+ spritePtr, animFlags);
+ log_cb(RETRO_LOG_ERROR, error_str);
+#endif
+
+
+ if( spritePtr == 0 ) return;
+
+
+ framePtr += 4;
+
+ if( animFlags < 0x80 ) {
+ if( nextAnim == 0xFFFF ) {
+ int nextFrame;
+
+ nextFrame = paprium_obj_ram[framePtr + 0] << 0;
+ nextFrame += paprium_obj_ram[framePtr + 1] << 8;
+ nextFrame += paprium_obj_ram[framePtr + 2] << 16;
+
+ framePtr = nextFrame;
+ }
+ else if( reset == 0 ) {
+ anim = nextAnim;
+ reset = 1;
+
+ goto reload;
+ }
+ }
+
+ paprium_s.obj[index] = framePtr;
+
+
+ count = paprium_obj_ram[(spritePtr++)^1];
+ int flags2 = paprium_obj_ram[(spritePtr++)^1];
+
+
+#if 0
+ sprintf(error_str, "%d - %X %X %X\n", count, src, vram, flags2);
+ log_cb(RETRO_LOG_ERROR, error_str);
+#endif
+
+
+ spr_x = pos_x;
+ spr_y = pos_y;
+
+ for( lcv = 0; lcv < count; lcv++ ) {
+ int misc = ((paprium_obj_ram[spritePtr + 3] >> 4) & 0x0F);
+ int size_x = ((paprium_obj_ram[spritePtr + 3] >> 2) & 0x03) + 1;
+ int size_y = ((paprium_obj_ram[spritePtr + 3] >> 0) & 0x03) + 1;
+ int tile = *(uint16*) (paprium_obj_ram + spritePtr + 4);
+ int tileAttr = *(uint16*) (paprium_obj_ram + spritePtr + 6) & ~0x1FF;
+ int ofs = *(uint16*) (paprium_obj_ram + spritePtr + 6) & 0x1FF;
+
+ int tilePtr = paprium_tile_ptr + tile*4;
+ int tileSize = size_x * size_y * 0x20;
+
+ int sprAttr = 0;
+
+
+ if( !flip_h )
+ spr_x += (int8) paprium_obj_ram[spritePtr + 1];
+ else
+ spr_x -= (int8) paprium_obj_ram[spritePtr + 1];
+
+ spr_y += (int8) paprium_obj_ram[spritePtr + 0];
+ spritePtr += 8;
+
+
+ if( tile == 0 ) continue;
+ if( spriteCount >= 94 ) continue;
+
+
+ sprAttr = (tileAttr & 0x8000) ? 0x8000 : (objAttr & 0x8000);
+ sprAttr += (tileAttr & 0x6000) ? (tileAttr & 0x6000) : (objAttr & 0x6000);
+ sprAttr += (tileAttr & 0x1800) ^ (objAttr & 0x1800);
+
+
+ if( (spr_y >= 128) && (spr_y + size_y*8 < 368) ) {
+ if( (!flip_h && ((spr_x + size_x*8 >= 128) && spr_x < 448)) ||
+ (flip_h && ((spr_x - size_x*8 < 448) && spr_x >= 128)) ) {
+ if( spriteCount < 80 ) {
+ *(uint16*) (paprium_s.ram + 0xB00 + spriteCount*8) = spr_y & 0x3FF;
+ *(uint16*) (paprium_s.ram + 0xB02 + spriteCount*8) = ((size_x-1) << 10) + ((size_y-1) << 8) + (spriteCount+1);
+ *(uint16*) (paprium_s.ram + 0xB04 + spriteCount*8) = sprAttr + ((vram / 0x20) & 0x7FF);
+ *(uint16*) (paprium_s.ram + 0xB06 + spriteCount*8) = (spr_x - ((!flip_h) ? 0 : size_x*8)) & 0x1FF;
+
+#if DEBUG_SPRITE
+ sprintf(error_str, "%d / %X %X %X %X\n",
+ spriteCount,
+ *(uint16*) (paprium_s.ram + 0xB00 + (spriteCount-0)*8),
+ *(uint16*) (paprium_s.ram + 0xB02 + (spriteCount-0)*8),
+ *(uint16*) (paprium_s.ram + 0xB04 + (spriteCount-0)*8),
+ *(uint16*) (paprium_s.ram + 0xB06 + (spriteCount-0)*8)
+ );
+ log_cb(RETRO_LOG_ERROR, error_str);
+#endif
+ }
+ else {
+ if( spriteCount == 80 ) { /* sprite 0 lock */
+ paprium_s.ram[0xD7A] = 1; /* exp.s list */
+
+ memcpy(paprium_s.exps_ram, paprium_s.ram + 0xB00, 8);
+ paprium_s.exps_ram[2] = 14; /* normal list */
+
+ spriteCount++;
+ }
+
+ *(uint16*) (paprium_s.exps_ram + 0 + (spriteCount-80)*8) = spr_y & 0x3FF;
+ *(uint16*) (paprium_s.exps_ram + 2 + (spriteCount-80)*8) = ((size_x-1) << 10) + ((size_y-1) << 8) + ((spriteCount-80)+1);
+ *(uint16*) (paprium_s.exps_ram + 4 + (spriteCount-80)*8) = sprAttr + ((vram / 0x20) & 0x7FF);
+ *(uint16*) (paprium_s.exps_ram + 6 + (spriteCount-80)*8) = (spr_x - ((!flip_h) ? 0 : size_x*8)) & 0x1FF;
+
+#if DEBUG_SPRITE
+ sprintf(error_str, "%d / %X %X %X %X\n",
+ spriteCount,
+ *(uint16*) (paprium_s.ram + 0x1F20 + (spriteCount-80)*8),
+ *(uint16*) (paprium_s.ram + 0x1F22 + (spriteCount-80)*8),
+ *(uint16*) (paprium_s.ram + 0x1F24 + (spriteCount-80)*8),
+ *(uint16*) (paprium_s.ram + 0x1F26 + (spriteCount-80)*8)
+ );
+ log_cb(RETRO_LOG_ERROR, error_str);
+#endif
+ }
+
+ spriteCount++;
+
+#if DEBUG_SPRITE
+ sprintf(error_str, "%d %d / %d %d %X %X / %X %X %X\n", spriteCount, count, spr_x, spr_y, tileAttr, objAttr, src, vram, tile);
+ log_cb(RETRO_LOG_ERROR, error_str);
+#endif
+ }
+ }
+
+
+
+ int ptr = paprium_tile_ptr + (*(uint16*)(cart.rom + tilePtr) << 16) + *(uint16*)(cart.rom + tilePtr + 2);
+ static uint8 tile_ram[0x10000];
+
+ paprium_decoder_type(ptr, tile_ram);
+ memcpy(paprium_s.ram + src, tile_ram + ofs * 0x20, tileSize);
+
+
+ //if( !tiledupe && dmaPtr < dmalimit && vram < vramlimit && tile < tilelimit)
+
+ *(uint16*) (paprium_s.ram + 0x1400 + dmaPtr*16) = 0x8F02;
+ *(uint16*) (paprium_s.ram + 0x1402 + dmaPtr*16) = 0x9300 + ((tileSize >> 1) & 0xFF);
+ *(uint16*) (paprium_s.ram + 0x1404 + dmaPtr*16) = 0x9500 + ((src >> 1) & 0xFF);
+ *(uint16*) (paprium_s.ram + 0x1406 + dmaPtr*16) = 0x9400 + ((tileSize >> 9) & 0xFF);
+ *(uint16*) (paprium_s.ram + 0x1408 + dmaPtr*16) = 0x9700;
+ *(uint16*) (paprium_s.ram + 0x140A + dmaPtr*16) = 0x9600 + ((src >> 9) & 0xFF);
+ *(uint16*) (paprium_s.ram + 0x140C + dmaPtr*16) = 0x4000 + (vram & 0x3FFF);
+ *(uint16*) (paprium_s.ram + 0x140E + dmaPtr*16) = 0x0080 + (vram >> 14);
+
+ *(uint16*) (paprium_s.ram + 0x1F16) = ++dmaPtr;
+ *(uint16*) (paprium_s.ram + 0x1F18) = spriteCount;
+
+
+ src += tileSize;
+ dmaSize += tileSize;
+ vram += tileSize;
+ }
+
+
+ paprium_s.draw_src = src;
+ paprium_s.draw_dst = vram;
+}
+
+
+static void paprium_sprite_init(int arg)
+{
+#if DEBUG_MODE
+ sprintf(error_str, "[%d] [%04X:%04X] DM Sprite_Init %02X\n",
+ v_counter,
+ (m68k.prev_pc>>16)&0xffff, m68k.prev_pc&0xffff,
+ arg);
+ log_cb(RETRO_LOG_ERROR, error_str);
+#endif
+
+ memset(paprium_s.ram + 0x1F20, 0, 14*8);
+
+
+#if DEBUG_MODE
+ if( paprium_cmd_count != 0 ) {
+ sprintf(error_str, ">> Sprite_Init %d count\n", paprium_cmd_count);
+ log_cb(RETRO_LOG_ERROR, error_str);
+ MessageBoxA(0, error_str, "count", 0);
+ }
+#endif
+}
+
+
+static void paprium_sprite_start(int arg)
+{
+#if DEBUG_SPRITE
+ sprintf(error_str, "[%d] [%04X:%04X] DM Sprite_Start %02X\n",
+ v_counter,
+ (m68k.prev_pc>>16)&0xffff, m68k.prev_pc&0xffff,
+ arg);
+ log_cb(RETRO_LOG_ERROR, error_str);
+#endif
+
+ int count = *(uint16*)(paprium_s.ram + 0x1F18);
+
+ *(uint16*) (paprium_s.ram + 0x1F16) = 0x0001; /* dma count */
+
+ *(uint16*) (paprium_s.ram + 0x1400) = 0x8f02;
+ *(uint16*) (paprium_s.ram + 0x1402) = 0x9340;
+ *(uint16*) (paprium_s.ram + 0x1404) = 0x9580;
+ *(uint16*) (paprium_s.ram + 0x1406) = 0x9401;
+ *(uint16*) (paprium_s.ram + 0x1408) = 0x9700;
+ *(uint16*) (paprium_s.ram + 0x140a) = 0x9605;
+ *(uint16*) (paprium_s.ram + 0x140c) = 0x7000;
+ *(uint16*) (paprium_s.ram + 0x140e) = 0x0083;
+
+
+ if( count < 80 )
+ memcpy(paprium_s.ram + 0x1F20, paprium_s.ram + 0xB00, 14*8);
+ else
+ memcpy(paprium_s.ram + 0x1F20, paprium_s.exps_ram, 14*8);
+
+
+ paprium_s.draw_src = 0x2000;
+ paprium_s.draw_dst = 0x200;
+
+
+#if DEBUG_MODE
+ if( paprium_cmd_count != 0 ) {
+ sprintf(error_str, ">> Sprite_Start %d count\n", paprium_cmd_count);
+ log_cb(RETRO_LOG_ERROR, error_str);
+ MessageBoxA(0, error_str, "count", 0);
+ }
+#endif
+}
+
+
+static void paprium_sprite_stop(int arg)
+{
+#if DEBUG_SPRITE
+ sprintf(error_str, "[%d] [%04X:%04X] DM Sprite_Stop %02X -- %d sprites\n",
+ v_counter,
+ (m68k.prev_pc>>16)&0xffff, m68k.prev_pc&0xffff,
+ arg, *(uint16*)(paprium_s.ram + 0x1f18));
+ log_cb(RETRO_LOG_ERROR, error_str);
+#endif
+
+
+ int count = *(uint16*)(paprium_s.ram + 0x1F18);
+
+ if( count == 0 ) {
+ memset(paprium_s.ram + 0xB00, 0, 8);
+ memset(paprium_s.exps_ram, 0, 8);
+ }
+ else if( count <= 80 ) {
+ paprium_s.ram[0xB02 + (count-1)*8] = 0;
+
+ if( count <= 14 )
+ paprium_s.exps_ram[2 + (count-1)*8] = 0;
+ }
+ else
+ paprium_s.exps_ram[2 + (count-81)*8] = 0;
+
+
+ if( arg == 2 )
+ *(uint16*) (paprium_s.ram + 0x1F1C) = 1; /* exp.s - force draw */
+
+
+#if DEBUG_MODE
+ if( paprium_cmd_count != 0 ) {
+ sprintf(error_str, ">> Sprite_Stop %d count\n", paprium_cmd_count);
+ log_cb(RETRO_LOG_ERROR, error_str);
+ MessageBoxA(0, error_str, "count", 0);
+ }
+#endif
+}
+
+
+static void paprium_sprite_pause(int arg)
+{
+#if DEBUG_SPRITE
+ sprintf(error_str, "[%d] [%04X:%04X] DM Sprite_Pause %02X -- %d sprites\n",
+ v_counter,
+ (m68k.prev_pc>>16)&0xffff, m68k.prev_pc&0xffff,
+ arg, *(uint16*)(paprium_s.ram + 0x1f18));
+ log_cb(RETRO_LOG_ERROR, error_str);
+#endif
+
+ int count = *(uint16*)(paprium_s.ram + 0x1F18);
+
+ if( count == 0 )
+ memset(paprium_s.ram + 0xB00, 0, 8);
+
+
+#if DEBUG_MODE
+ if( paprium_cmd_count != 0 ) {
+ sprintf(error_str, ">> Sprite_Pause %d count\n", paprium_cmd_count);
+ log_cb(RETRO_LOG_ERROR, error_str);
+ MessageBoxA(0, error_str, "count", 0);
+ }
+#endif
+}
+
+
+static void paprium_scaler_init(int arg)
+{
+ int row, col, out;
+ static uint8 temp[0x800];
+
+#if DEBUG_MODE
+ sprintf(error_str, "[%d] [%04X:%04X] DM Scaler_Init %02X - %04X %04X\n",
+ v_counter,
+ (m68k.prev_pc>>16)&0xffff, m68k.prev_pc&0xffff,
+ arg,
+ *(uint16 *)(paprium_s.ram + 0x1E10), *(uint16 *)(paprium_s.ram + 0x1E12));
+ log_cb(RETRO_LOG_ERROR, error_str);
+#endif
+
+
+ int ptr = (*(uint16 *)(paprium_s.ram + 0x1E10) << 16) + *(uint16 *)(paprium_s.ram + 0x1E12);
+ paprium_decoder_type(ptr, temp);
+
+
+ out = 0;
+
+ for( col = 0; col < 64; col++ ) {
+ for( row = 0; row < 64; row++ ) {
+ if( col & 1 )
+ paprium_s.scaler_ram[out] = temp[row*32 + (col/2)^1] & 0x0F;
+ else
+ paprium_s.scaler_ram[out] = temp[row*32 + (col/2)^1] >> 4;
+
+ out++;
+ }
+ }
+
+
+#if DEBUG_MODE
+ if( paprium_cmd_count != 2 ) {
+ sprintf(error_str, ">> Scaler_Init %d count\n", paprium_cmd_count);
+ log_cb(RETRO_LOG_ERROR, error_str);
+ MessageBoxA(0, error_str, "count", 0);
+ }
+#endif
+}
+
+
+static void paprium_scaler(int arg)
+{
+ int row, col;
+
+ int left = *(uint16 *)(paprium_s.ram + 0x1E10);
+ int right = *(uint16 *)(paprium_s.ram + 0x1E12);
+ int scale = *(uint16 *)(paprium_s.ram + 0x1E14);
+ int ptr = *(uint16 *)(paprium_s.ram + 0x1E16);
+ int step = 64 * 0x10000 / scale;
+ int ptr_frac = 0;
+
+
+#if DEBUG_SPRITE
+ sprintf(error_str, "[%d] [%04X:%04X] DM Scaler %02X -- %04X %04X %04X %04X\n",
+ v_counter,
+ (m68k.prev_pc>>16)&0xffff, m68k.prev_pc&0xffff,
+ arg, *(uint16 *)(paprium_s.ram + 0x1E10), *(uint16 *)(paprium_s.ram + 0x1E12), *(uint16 *)(paprium_s.ram + 0x1E14), *(uint16 *)(paprium_s.ram + 0x1E16));
+ log_cb(RETRO_LOG_ERROR, error_str);
+#endif
+
+
+ for( col = 0; col < 128; col++ ) {
+ int base = (col & 4) ? 0x600 : 0x200;
+ int out = ((col / 8) * 64) + ((col & 2) / 2);
+
+ for( row = 0; row < 64; row += 2 ) {
+ if( (col >= left) && (col < right) ) {
+ if(col & 1)
+ paprium_s.ram[base + out^1] += paprium_s.scaler_ram[row*64 + ptr] & 0x0F;
+ else
+ paprium_s.ram[base + out^1] = paprium_s.scaler_ram[row*64 + ptr] << 4;
+ }
+ else if( (col & 1) == 0 )
+ paprium_s.ram[base + out^1] = 0;
+
+ out += 2;
+ }
+
+ if( (col >= left) && (col < right) && (ptr < 64) ) {
+ ptr_frac += 0x10000;
+
+ while( ptr_frac >= step ) {
+ ptr++;
+ ptr_frac -= step;
+ }
+ }
+ }
+
+
+#if DEBUG_MODE
+ if( paprium_cmd_count != 4 ) {
+ sprintf(error_str, ">> Scaler %d count\n", paprium_cmd_count);
+ log_cb(RETRO_LOG_ERROR, error_str);
+ MessageBoxA(0, error_str, "count", 0);
+ }
+#endif
+}
+
+
+static void paprium_sram_read(int bank)
+{
+#if DEBUG_MODE
+ sprintf(error_str, "[%d] [%04X:%04X] DM Sram_Read %02X -- %04X\n",
+ v_counter,
+ (m68k.prev_pc>>16)&0xffff, m68k.prev_pc&0xffff,
+ bank, *(uint16 *)(paprium_s.ram + 0x1E10));
+ log_cb(RETRO_LOG_ERROR, error_str);
+#endif
+
+ int offset = *(uint16 *)(paprium_s.ram + 0x1E10);
+
+ if( (bank >= 1) && (bank <= 4) )
+ memcpy(paprium_s.ram + offset, sram.sram + ((bank-1) * 0x780), 0x780);
+
+
+#if DEBUG_MODE
+ if( paprium_cmd_count != 1 ) {
+ sprintf(error_str, ">> Sram_Read %d count\n", paprium_cmd_count);
+ log_cb(RETRO_LOG_ERROR, error_str);
+ MessageBoxA(0, error_str, "count", 0);
+ }
+#endif
+}
+
+
+static void paprium_sram_write(int bank)
+{
+#if DEBUG_MODE
+ sprintf(error_str, "[%d] [%04X:%04X] DM Sram_Write %02X -- %04X %04X\n",
+ v_counter,
+ (m68k.prev_pc>>16)&0xffff, m68k.prev_pc&0xffff,
+ bank, *(uint16 *)(paprium_s.ram + 0x1E10), *(uint16 *)(paprium_s.ram + 0x1E12));
+ log_cb(RETRO_LOG_ERROR, error_str);
+#endif
+
+
+ /* *(uint16 *)(paprium_s.ram + 0x1E10) */
+ int offset = *(uint16 *)(paprium_s.ram + 0x1E12);
+
+ if( (bank >= 1) && (bank <= 4) )
+ memcpy(sram.sram + ((bank-1) * 0x780), paprium_s.ram + offset, 0x780);
+
+
+#if DEBUG_MODE
+ if( *(uint16 *)(paprium_s.ram + 0x1E10) != 0xBEEF ) {
+ sprintf(error_str, ">> SRAM write 1E10 %X\n", *(uint16 *)(paprium_s.ram + 0x1E10));
+ log_cb(RETRO_LOG_ERROR, error_str);
+ MessageBoxA(0, error_str, "sram write", 0);
+ }
+
+ if( paprium_cmd_count != 1 ) {
+ sprintf(error_str, ">> Sram_Write %d count\n", paprium_cmd_count);
+ log_cb(RETRO_LOG_ERROR, error_str);
+ MessageBoxA(0, error_str, "count", 0);
+ }
+#endif
+}
+
+
+static void paprium_mapper(int arg)
+{
+#if DEBUG_MODE
+ sprintf(error_str, "[%d] [%04X:%04X] DM Mapper %02X -- %04X %04X\n",
+ v_counter,
+ (m68k.prev_pc>>16)&0xffff, m68k.prev_pc&0xffff,
+ arg, *(uint16 *)(paprium_s.ram + 0x1E10), *(uint16 *)(paprium_s.ram + 0x1E12));
+ log_cb(RETRO_LOG_ERROR, error_str);
+#endif
+
+
+ memcpy(paprium_s.ram + 0x8000, cart.rom + 0x8000, 0x8000); /* troll */
+
+
+#if DEBUG_MODE
+ if( paprium_cmd_count != 2 ) {
+ sprintf(error_str, ">> Mapper %d count\n", paprium_cmd_count);
+ log_cb(RETRO_LOG_ERROR, error_str);
+ MessageBoxA(0, error_str, "count", 0);
+ }
+#endif
+}
+
+
+static void paprium_boot(int arg)
+{
+#if DEBUG_MODE
+ sprintf(error_str, "[%d] [%04X:%04X] DM Boot %02X\n",
+ v_counter,
+ (m68k.prev_pc>>16)&0xffff, m68k.prev_pc&0xffff,
+ arg);
+ log_cb(RETRO_LOG_ERROR, error_str);
+#endif
+
+ paprium_music_ptr = (*(uint16*)(paprium_s.ram + 0x1E10) << 16) + *(uint16*)(paprium_s.ram + 0x1E12);
+ /* (*(uint16*)(paprium_s.ram + 0x1E14) << 16) + *(uint16*)(paprium_s.ram + 0x1E16); */
+ paprium_wave_ptr = (*(uint16*)(paprium_s.ram + 0x1E18) << 16) + *(uint16*)(paprium_s.ram + 0x1E1A);
+ /* (*(uint16*)(paprium_s.ram + 0x1E1C) << 16) + *(uint16*)(paprium_s.ram + 0x1E1E); */
+ paprium_sfx_ptr = (*(uint16*)(paprium_s.ram + 0x1E20) << 16) + *(uint16*)(paprium_s.ram + 0x1E22);
+ paprium_sprite_ptr = (*(uint16*)(paprium_s.ram + 0x1E24) << 16) + *(uint16*)(paprium_s.ram + 0x1E26);
+ paprium_tile_ptr = (*(uint16*)(paprium_s.ram + 0x1E28) << 16) + *(uint16*)(paprium_s.ram + 0x1E2A);
+
+ /* paprium_wave_unpack(paprium_wave_ptr, paprium_wave_ram); */
+ paprium_decoder_type(paprium_sprite_ptr, paprium_obj_ram);
+
+ paprium_s.decoder_size = 0;
+
+
+#if DEBUG_MODE
+ paprium_cmd_count = 0;
+#endif
+}
+
+
+static void paprium_EC(int arg)
+{
+#if DEBUG_MODE
+ sprintf(error_str, "[%d] [%04X:%04X] DM EC %02X = %02X %02X\n",
+ v_counter,
+ (m68k.prev_pc>>16)&0xffff, m68k.prev_pc&0xffff,
+ arg, *(uint16 *)(paprium_s.ram + 0x1E10), *(uint16 *)(paprium_s.ram + 0x1E12));
+ log_cb(RETRO_LOG_ERROR, error_str);
+#endif
+
+#if DEBUG_MODE
+ if( *(uint16 *)(paprium_s.ram + 0x1E10) ) {
+ sprintf(error_str, ">> EC %02X\n", *(uint16 *)(paprium_s.ram + 0x1E10));
+ log_cb(RETRO_LOG_ERROR, error_str);
+ MessageBoxA(0, error_str, "ec", 0);
+ }
+#endif
+
+#if DEBUG_MODE
+ if( paprium_cmd_count != 2 ) {
+ sprintf(error_str, ">> EC %d count\n", paprium_cmd_count);
+ log_cb(RETRO_LOG_ERROR, error_str);
+ MessageBoxA(0, error_str, "count", 0);
+ }
+#endif
+}
+
+
+static void paprium_music(int track)
+{
+#if DEBUG_MODE
+ sprintf(error_str, "[%d] [%04X:%04X] DM Music %02X\n",
+ v_counter,
+ (m68k.prev_pc>>16)&0xffff, m68k.prev_pc&0xffff,
+ track);
+ log_cb(RETRO_LOG_ERROR, error_str);
+#endif
+
+ track &= 0x7F;
+
+
+ int ptr = (*(uint16*)(cart.rom + paprium_music_ptr + track*4)<<16) + (*(uint16*)(cart.rom + paprium_music_ptr + track*4 + 2));
+ paprium_decoder_type(paprium_music_ptr + ptr, paprium_s.music_ram);
+ paprium_s.decoder_size = 0;
+
+
+ paprium_s.music_section = 0;
+ paprium_s.music_segment = 0;
+ paprium_s.audio_tick = 0;
+
+
+ memset(paprium_s.music, 0, sizeof(paprium_s.music));
+ for( int ch = 0; ch < 26; ch++ ) {
+ paprium_voice_t *voice = paprium_s.music + ch;
+
+ voice->panning = 0x80;
+ voice->volume = 0x80;
+ voice->program = paprium_s.music_ram[0x2A + ch^1];
+ }
+
+
+#if DEBUG_MODE
+ if( paprium_cmd_count != 0 ) {
+ sprintf(error_str, ">> Music %d count\n", paprium_cmd_count);
+ log_cb(RETRO_LOG_ERROR, error_str);
+ MessageBoxA(0, error_str, "count", 0);
+ }
+#endif
+
+
+#if 1
+ paprium_load_mp3(track, 1);
+#endif
+}
+
+
+static void paprium_music_volume(int level)
+{
+#if DEBUG_MODE
+ sprintf(error_str, "[%d] [%04X:%04X] DM Music_Volume %02X -- %04X %04X\n",
+ v_counter,
+ (m68k.prev_pc>>16)&0xffff, m68k.prev_pc&0xffff,
+ level, *(uint16 *)(paprium_s.ram + 0x1E10), *(uint16 *)(paprium_s.ram + 0x1E12));
+ log_cb(RETRO_LOG_ERROR, error_str);
+#endif
+
+ paprium_s.music_volume = level;
+ /* *(uint16 *)(paprium_s.ram + 0x1E10); */
+ /* *(uint16 *)(paprium_s.ram + 0x1E12); */
+
+
+#if 0
+ // stream mp3 / ogg, manage tempo
+#endif
+
+
+#if DEBUG_MODE
+ if(*(uint16 *)(paprium_s.ram + 0x1E10) != 0x80) {
+ sprintf(error_str, ">> Music_Volume = %X\n", *(uint16 *)(paprium_s.ram + 0x1E10));
+ log_cb(RETRO_LOG_ERROR, error_str);
+ MessageBoxA(0, error_str, "ooo", 0);
+ }
+
+ if(*(uint16 *)(paprium_s.ram + 0x1E12) != 0x00 && *(uint16 *)(paprium_s.ram + 0x1E12) != 0x08) {
+ sprintf(error_str, ">> Music_Volume-2 = %X\n", *(uint16 *)(paprium_s.ram + 0x1E12));
+ log_cb(RETRO_LOG_ERROR, error_str);
+ MessageBoxA(0, error_str, "ooo", 0);
+ }
+
+ if( paprium_cmd_count != 2 ) {
+ sprintf(error_str, ">> Music_Volume %d count\n", paprium_cmd_count);
+ log_cb(RETRO_LOG_ERROR, error_str);
+ MessageBoxA(0, error_str, "count", 0);
+ }
+#endif
+}
+
+
+static void paprium_music_setting(int flag)
+{
+#if DEBUG_MODE
+ sprintf(error_str, "[%d] [%04X:%04X] DM Music_Setting %02X\n",
+ v_counter,
+ (m68k.prev_pc>>16)&0xffff, m68k.prev_pc&0xffff,
+ flag);
+ log_cb(RETRO_LOG_ERROR, error_str);
+#endif
+
+ if( flag == 8 )
+ paprium_s.music_segment = -1;
+
+ else if( flag == 0 )
+ paprium_s.music_segment = -1;
+
+
+#if DEBUG_MODE
+ else {
+ sprintf(error_str, ">> Music_Setting = %X\n", flag);
+ log_cb(RETRO_LOG_ERROR, error_str);
+ MessageBoxA(0, error_str, "ooo", 0);
+ }
+#endif
+
+
+#if DEBUG_MODE
+ if( paprium_cmd_count != 0 ) {
+ sprintf(error_str, ">> Music_Setting %d count\n", paprium_cmd_count);
+ log_cb(RETRO_LOG_ERROR, error_str);
+ MessageBoxA(0, error_str, "count", 0);
+ }
+#endif
+}
+
+
+static void paprium_music_special(int flag)
+{
+#if DEBUG_MODE
+ sprintf(error_str, "[%d] [%04X:%04X] DM Music_Special %02X = %04X %04X %04X %04X\n",
+ v_counter,
+ (m68k.prev_pc>>16)&0xffff, m68k.prev_pc&0xffff,
+ flag, *(uint16 *)(paprium_s.ram + 0x1E10), *(uint16 *)(paprium_s.ram + 0x1E12), *(uint16 *)(paprium_s.ram + 0x1E14), *(uint16 *)(paprium_s.ram + 0x1E16));
+ log_cb(RETRO_LOG_ERROR, error_str);
+#endif
+
+ if( flag == 1 ) {
+ //*(uint16 *)(paprium_s.ram + 0x1E10)
+ //*(uint16 *)(paprium_s.ram + 0x1E12)
+
+#if DEBUG_MODE
+ if( *(uint16 *)(paprium_s.ram + 0x1E10) != 0x40 ) {
+ sprintf(error_str, ">> Music_Special_01 %X count\n", *(uint16 *)(paprium_s.ram + 0x1E10));
+ log_cb(RETRO_LOG_ERROR, error_str);
+ MessageBoxA(0, error_str, "count", 0);
+ }
+
+ if( *(uint16 *)(paprium_s.ram + 0x1E12) != 0x08 ) {
+ sprintf(error_str, ">> Music_Special_01-2 %X count\n", *(uint16 *)(paprium_s.ram + 0x1E10));
+ log_cb(RETRO_LOG_ERROR, error_str);
+ MessageBoxA(0, error_str, "count", 0);
+ }
+
+ if( paprium_cmd_count != 2 ) {
+ sprintf(error_str, ">> Music_Special-01 %d count\n", paprium_cmd_count);
+ log_cb(RETRO_LOG_ERROR, error_str);
+ MessageBoxA(0, error_str, "count", 0);
+ }
+#endif
+ }
+
+ else if( flag == 2 ) {
+ //*(uint16 *)(paprium_s.ram + 0x1E10) /* 4 = crisis, 0 = normal ? */
+
+#if DEBUG_MODE
+ if( *(uint16 *)(paprium_s.ram + 0x1E10) != 4 && *(uint16 *)(paprium_s.ram + 0x1E10) != 0 ) {
+ sprintf(error_str, ">> Music_Special_02 %X count\n", *(uint16 *)(paprium_s.ram + 0x1E10));
+ log_cb(RETRO_LOG_ERROR, error_str);
+ MessageBoxA(0, error_str, "count", 0);
+ }
+
+ if( paprium_cmd_count != 1 ) {
+ sprintf(error_str, ">> Music_Special-02 %d count\n", paprium_cmd_count);
+ log_cb(RETRO_LOG_ERROR, error_str);
+ MessageBoxA(0, error_str, "count", 0);
+ }
+#endif
+ }
+
+ else if( flag == 4 ) {
+ //*(uint16 *)(paprium_s.ram + 0x1E10) /* 81 = blu pill */
+
+#if DEBUG_MODE
+ if( *(uint16 *)(paprium_s.ram + 0x1E10) != 0x80 && *(uint16 *)(paprium_s.ram + 0x1E10) != 0x81 ) {
+ sprintf(error_str, ">> Music_Special_04 %X count\n", *(uint16 *)(paprium_s.ram + 0x1E10));
+ log_cb(RETRO_LOG_ERROR, error_str);
+ MessageBoxA(0, error_str, "count", 0);
+ }
+
+ if( paprium_cmd_count != 1 ) {
+ sprintf(error_str, ">> Music_Special-04 %d count\n", paprium_cmd_count);
+ log_cb(RETRO_LOG_ERROR, error_str);
+ MessageBoxA(0, error_str, "count", 0);
+ }
+#endif
+ }
+
+ else if( flag == 6 ) { /* sax man */
+ //*(uint16 *)(paprium_s.ram + 0x1E10)
+ //*(uint16 *)(paprium_s.ram + 0x1E12)
+ //*(uint16 *)(paprium_s.ram + 0x1E14)
+
+#if DEBUG_MODE
+ if( *(uint16 *)(paprium_s.ram + 0x1E10) != 1 ) {
+ sprintf(error_str, ">> Music_Special_06 %X count\n", *(uint16 *)(paprium_s.ram + 0x1E10));
+ log_cb(RETRO_LOG_ERROR, error_str);
+ MessageBoxA(0, error_str, "count", 0);
+ }
+
+ if( paprium_cmd_count != 3 ) {
+ sprintf(error_str, ">> Music_Special-06 %d count\n", paprium_cmd_count);
+ log_cb(RETRO_LOG_ERROR, error_str);
+ MessageBoxA(0, error_str, "count", 0);
+ }
+#endif
+ }
+
+ else if( flag == 7 ) { /* blu pill - stage title */
+ //*(uint16 *)(paprium_s.ram + 0x1E10)
+
+#if DEBUG_MODE
+ if( *(uint16 *)(paprium_s.ram + 0x1E10) != 0x6C && *(uint16 *)(paprium_s.ram + 0x1E10) != 0xA0 ) {
+ sprintf(error_str, ">> Music_Special_07 %X count\n", *(uint16 *)(paprium_s.ram + 0x1E10));
+ log_cb(RETRO_LOG_ERROR, error_str);
+ MessageBoxA(0, error_str, "count", 0);
+ }
+
+ if( paprium_cmd_count != 1 ) {
+ sprintf(error_str, ">> Music_Special-06 %d count\n", paprium_cmd_count);
+ log_cb(RETRO_LOG_ERROR, error_str);
+ MessageBoxA(0, error_str, "count", 0);
+ }
+#endif
+ }
+
+#if DEBUG_MODE
+ else {
+ sprintf(error_str, ">> Music special = %X\n", flag);
+ log_cb(RETRO_LOG_ERROR, error_str);
+ MessageBoxA(0, error_str, "ooo", 0);
+ }
+#endif
+}
+
+
+static void paprium_audio_setting(int flags)
+{
+#if DEBUG_MODE
+ sprintf(error_str, "[%d] [%04X:%04X] DM Audio_Settings %02X\n",
+ v_counter,
+ (m68k.prev_pc>>16)&0xffff, m68k.prev_pc&0xffff,
+ flags);
+ log_cb(RETRO_LOG_ERROR, error_str);
+#endif
+
+ paprium_s.audio_flags = flags;
+
+ paprium_s.ram[0x1801] = flags & 0x01; /* dac */
+
+ paprium_s.ram[0x1800] = (flags & 0x01) ? 0x80 : 0x00; /* dac */
+ paprium_s.ram[0x1800] += (flags & 0x02) ? 0x40 : 0x00; /* ntsc */
+
+
+#if DEBUG_MODE
+ if( paprium_cmd_count != 0 ) {
+ sprintf(error_str, ">> Audio_Settings %d count\n", paprium_cmd_count);
+ log_cb(RETRO_LOG_ERROR, error_str);
+ MessageBoxA(0, error_str, "count", 0);
+ }
+#endif
+}
+
+
+static void paprium_sfx_volume(int level)
+{
+#if DEBUG_MODE
+ sprintf(error_str, "[%d] [%04X:%04X] DM Sfx_Volume %02X -- %04X\n",
+ v_counter,
+ (m68k.prev_pc>>16)&0xffff, m68k.prev_pc&0xffff,
+ level, *(uint16 *)(paprium_s.ram + 0x1E10));
+ log_cb(RETRO_LOG_ERROR, error_str);
+#endif
+
+ paprium_s.sfx_volume = level;
+ /* *(uint16 *)(paprium_s.ram + 0x1E10); */
+ /* *(uint16 *)(paprium_s.ram + 0x1E12); */
+
+
+#if DEBUG_MODE
+ if(*(uint16 *)(paprium_s.ram + 0x1E10) != 0x80) {
+ sprintf(error_str, ">> Sfx_Volume-1 = %X\n", *(uint16 *)(paprium_s.ram + 0x1E10));
+ log_cb(RETRO_LOG_ERROR, error_str);
+ MessageBoxA(0, error_str, "ooo", 0);
+ }
+
+ if(*(uint16 *)(paprium_s.ram + 0x1E12) != 0x00 && paprium_cmd_count == 2) {
+ sprintf(error_str, ">> Sfx_Volume-2 = %X\n", *(uint16 *)(paprium_s.ram + 0x1E12));
+ log_cb(RETRO_LOG_ERROR, error_str);
+ MessageBoxA(0, error_str, "ooo", 0);
+ }
+#endif
+
+
+#if DEBUG_MODE
+ if( paprium_cmd_count != 1 && paprium_cmd_count != 2 ) {
+ sprintf(error_str, ">> Sfx_Volume %d count\n", paprium_cmd_count);
+ log_cb(RETRO_LOG_ERROR, error_str);
+ MessageBoxA(0, error_str, "count", 0);
+ }
+#endif
+}
+
+
+static void paprium_cmd(int data)
+{
+ int cmd = data >> 8;
+ int lcv;
+ int retaddr;
+ int argscnt;
+
+
+ data &= 0xFF;
+
+ if( m68k.prev_pc == 0xb4394 ) {
+ retaddr = m68k_read_immediate_32(m68k.dar[15]+16);
+ argscnt = 4;
+ }
+ else {
+ retaddr = m68k_read_immediate_32(m68k.dar[15]+4);
+ argscnt = 0;
+ }
+
+
+
+ switch(cmd) {
+ case 0x81:
+ case 0x83:
+ case 0x95:
+ case 0x96:
+ case 0xA4:
+ case 0xA9:
+ case 0xB6:
+ goto print_0;
+
+ case 0xD0:
+ goto print_2;
+ goto print_5;
+
+ case 0xE7: /* T-574120-0 = after demo loop */
+ goto print_9;
+
+ case 0xD5: /* secret room */
+ case 0xEC:
+ goto print_2;
+
+ case 0x84: paprium_mapper(data); break;
+ case 0x88: paprium_audio_setting(data); break;
+ case 0x8C: paprium_music(data); break;
+ case 0x8D: paprium_music_setting(data); break;
+ case 0xAD: paprium_sprite(data); break;
+ case 0xAE: paprium_sprite_start(data); break;
+ case 0xAF: paprium_sprite_stop(data); break;
+ case 0xB0: paprium_sprite_init(data); break;
+ case 0xB1: paprium_sprite_pause(data); break;
+ case 0xC6: paprium_boot(data); break;
+ case 0xC9: paprium_music_volume(data); break;
+ case 0xCA: paprium_sfx_volume(data); break;
+ case 0xD1: goto sfx_play;
+ case 0xD2: goto sfx_off;
+ case 0xD3: goto sfx_loop;
+ case 0xD6: paprium_music_special(data); break;
+ case 0xDA: paprium_decoder(data); break;
+ case 0xDB: paprium_decoder_copy(data); break;
+ case 0xDF: paprium_sram_read(data); break;
+ case 0xE0: paprium_sram_write(data); break;
+ //case 0xF2: paprium_block_viewer(data); break;
+ case 0xF4: paprium_scaler_init(data); break;
+ case 0xF5: paprium_scaler(data); break;
+
+ default: goto print_x;
+ }
+
+
+done:
+ *(uint16*)(paprium_s.ram + 0x1FEA) &= 0x7FFF;
+ return;
+
+
+
+print_0:
+#if DEBUG_MODE
+ sprintf(error_str, "[%d] [%04X:%04X] DM %02X %02X\n",
+ v_counter,
+ (m68k.prev_pc>>16)&0xffff, m68k.prev_pc&0xffff,
+ cmd, data);
+ log_cb(RETRO_LOG_ERROR, error_str);
+
+ if( paprium_cmd_count != 0 ) {
+ sprintf(error_str, "%X %d count\n", cmd, paprium_cmd_count);
+ log_cb(RETRO_LOG_ERROR, error_str);
+ MessageBoxA(0, error_str, "count", 0);
+ }
+#endif
+ goto done;
+
+
+print_1:
+#if DEBUG_MODE
+ sprintf(error_str, "[%d] [%04X:%04X] DM %02X %02X -- %04X\n",
+ v_counter,
+ (m68k.prev_pc>>16)&0xffff, m68k.prev_pc&0xffff,
+ cmd, data,
+ *(uint16 *)(paprium_s.ram + 0x1E10));
+ log_cb(RETRO_LOG_ERROR, error_str);
+
+ if( paprium_cmd_count != 1 ) {
+ sprintf(error_str, "%X %d count\n", cmd, paprium_cmd_count);
+ log_cb(RETRO_LOG_ERROR, error_str);
+ MessageBoxA(0, error_str, "count", 0);
+ }
+#endif
+ goto done;
+
+
+print_2:
+#if DEBUG_MODE
+ sprintf(error_str, "[%d] [%04X:%04X] DM %02X %02X -- %04X %04X\n",
+ v_counter,
+ (m68k.prev_pc>>16)&0xffff, m68k.prev_pc&0xffff,
+ cmd, data,
+ *(uint16 *)(paprium_s.ram + 0x1E10), *(uint16 *)(paprium_s.ram + 0x1E12));
+ log_cb(RETRO_LOG_ERROR, error_str);
+
+ if( paprium_cmd_count != 2 ) {
+ sprintf(error_str, "%X %d count\n", cmd, paprium_cmd_count);
+ log_cb(RETRO_LOG_ERROR, error_str);
+ MessageBoxA(0, error_str, "count", 0);
+ }
+#endif
+ goto done;
+
+
+print_4:
+#if DEBUG_MODE
+ sprintf(error_str, "[%d] [%04X:%04X] DM %02X %02X -- %04X %04X %04X %04X\n",
+ v_counter,
+ (m68k.prev_pc>>16)&0xffff, m68k.prev_pc&0xffff,
+ cmd, data,
+ *(uint16 *)(paprium_s.ram + 0x1E10), *(uint16 *)(paprium_s.ram + 0x1E12), *(uint16 *)(paprium_s.ram + 0x1E14), *(uint16 *)(paprium_s.ram + 0x1E16));
+ log_cb(RETRO_LOG_ERROR, error_str);
+
+
+ if( paprium_cmd_count != 4 ) {
+ sprintf(error_str, "%X %d count\n", cmd, paprium_cmd_count);
+ log_cb(RETRO_LOG_ERROR, error_str);
+ MessageBoxA(0, error_str, "count", 0);
+ }
+#endif
+ goto done;
+
+
+print_5:
+#if DEBUG_MODE
+ sprintf(error_str, "[%d] [%04X:%04X] DM %02X %02X -- %04X %04X %04X %04X %04X\n",
+ v_counter,
+ (m68k.prev_pc>>16)&0xffff, m68k.prev_pc&0xffff,
+ cmd, data,
+ *(uint16 *)(paprium_s.ram + 0x1E10), *(uint16 *)(paprium_s.ram + 0x1E12), *(uint16 *)(paprium_s.ram + 0x1E14), *(uint16 *)(paprium_s.ram + 0x1E16), *(uint16 *)(paprium_s.ram + 0x1E18));
+ log_cb(RETRO_LOG_ERROR, error_str);
+
+ if( paprium_cmd_count != 5 ) {
+ sprintf(error_str, "%X %d count\n", cmd, paprium_cmd_count);
+ log_cb(RETRO_LOG_ERROR, error_str);
+ MessageBoxA(0, error_str, "count", 0);
+ }
+#endif
+ goto done;
+
+
+print_9:
+#if DEBUG_MODE
+ sprintf(error_str, "[%d] [%04X:%04X] DM %02X %02X -- %04X %04X %04X %04X %04X ..\n",
+ v_counter,
+ (m68k.prev_pc>>16)&0xffff, m68k.prev_pc&0xffff,
+ cmd, data,
+ *(uint16 *)(paprium_s.ram + 0x1E10), *(uint16 *)(paprium_s.ram + 0x1E12), *(uint16 *)(paprium_s.ram + 0x1E14), *(uint16 *)(paprium_s.ram + 0x1E16), *(uint16 *)(paprium_s.ram + 0x1E18));
+ log_cb(RETRO_LOG_ERROR, error_str);
+
+ if( paprium_cmd_count != 9 ) {
+ sprintf(error_str, "%X %d count\n", cmd, paprium_cmd_count);
+ log_cb(RETRO_LOG_ERROR, error_str);
+ MessageBoxA(0, error_str, "count", 0);
+ }
+#endif
+ goto done;
+
+
+print_x:
+#if DEBUG_MODE
+ if( argscnt == 4 ) {
+ sprintf(error_str, "[%d] [%04X:%04X] DM %02X %02X -- %04X %04X %04X %04X\n",
+ v_counter,
+ (m68k.prev_pc>>16)&0xffff, m68k.prev_pc&0xffff,
+ cmd, data,
+ *(uint16 *)(paprium_s.ram + 0x1E10), *(uint16 *)(paprium_s.ram + 0x1E12), *(uint16 *)(paprium_s.ram + 0x1E14), *(uint16 *)(paprium_s.ram + 0x1E16));
+ log_cb(RETRO_LOG_ERROR, error_str);
+ }
+
+ else {
+ sprintf(error_str, "[%d] [%04X:%04X] DM %02X %02X ## %04X %04X %04X %04X\n",
+ v_counter,
+ (m68k.prev_pc>>16)&0xffff, m68k.prev_pc&0xffff,
+ cmd, data,
+ *(uint16 *)(paprium_s.ram + 0x1E10), *(uint16 *)(paprium_s.ram + 0x1E12), *(uint16 *)(paprium_s.ram + 0x1E14), *(uint16 *)(paprium_s.ram + 0x1E16));
+ log_cb(RETRO_LOG_ERROR, error_str);
+ }
+
+ sprintf(error_str, "DM %02X %02X\n", cmd, data);
+ log_cb(RETRO_LOG_ERROR, error_str);
+ MessageBoxA(0, error_str, "DM", 0);
+#endif
+ goto done;
+
+
+sfx_play:
+ {
+ int chan, vol, pan, flags;
+ int ptr, size, type;
+ int lcv;
+ int newch = 0, maxtime = 0;
+ const int rates[] = {1,2,4,5,8,9};
+ uint8 *sfx = paprium_sfx_ptr + cart.rom;
+
+
+#if DEBUG_MODE
+ sprintf(error_str, "[%d] [%04X:%04X <== %04X:%04X] DM Sfx_Play %02X -- %04X %04X %04X %04X\n",
+ v_counter,
+ (m68k.prev_pc>>16)&0xffff, m68k.prev_pc&0xffff, (retaddr>>16)&0xffff, retaddr&0xffff,
+ data, *(uint16 *)(paprium_s.ram + 0x1E10), *(uint16 *)(paprium_s.ram + 0x1E12), *(uint16 *)(paprium_s.ram + 0x1E14), *(uint16 *)(paprium_s.ram + 0x1E16));
+ log_cb(RETRO_LOG_ERROR, error_str);
+#endif
+
+ chan = *(uint16 *)(paprium_s.ram + 0x1E10);
+ vol = *(uint16 *)(paprium_s.ram + 0x1E12);
+ pan = *(uint16 *)(paprium_s.ram + 0x1E14);
+ flags = *(uint16 *)(paprium_s.ram + 0x1E16);
+
+
+#if DEBUG_MODE
+ if(flags & 0x100) {
+ sprintf(error_str, "Sfx flags %X\n", flags);
+ //MessageBoxA(0, error_str, "Sfx flags", MB_OK );
+ log_cb(RETRO_LOG_ERROR, error_str);
+ } /* stage1 alarm = 8100 */
+ //else if( flags <= 0x8100 ) {}
+ else if( flags & 0x8000 ) {}
+ else if( flags & 0x4000 ) {}
+ else if( flags & 0x2000 ) {}
+ else if( flags & 0x800 ) {}
+ //else if( flags & 0x100 ) {}
+ else if( flags & 0x400 ) {}
+ else if( flags == 0 ) {}
+ else {
+ sprintf(error_str, "Sfx flags %X\n", flags);
+ log_cb(RETRO_LOG_ERROR, error_str);
+ MessageBoxA(0, error_str, "Sfx flags", MB_OK );
+ }
+
+
+ if( chan > 0x80 ) MessageBoxA(0, "Sfx channel", "Warn", MB_OK );
+#endif
+
+
+ ptr = (*(uint16 *)(sfx + data*8) << 16) | (*(uint16 *)(sfx + data*8 + 2));
+ size = (*(uint8 *)(sfx + data*8 + 4) << 16) | (*(uint16 *)(sfx + data*8 + 6));
+ type = *(uint8 *)(sfx + data*8 + 5);
+
+
+#if DEBUG_MODE
+ sprintf(error_str, "%X %X | %X %X %X | %X %X %X\n",
+ paprium_sfx_ptr + data*8, paprium_sfx_ptr + ptr,
+ ptr, size, type,
+ rates[type >> 4], type & 0x03, type & 0x0C);
+ log_cb(RETRO_LOG_ERROR, error_str);
+#endif
+
+
+ for( lcv = 0; lcv < 8; lcv++, chan >>= 1 ) {
+ if( (chan & 1) == 0 ) continue;
+
+ if( paprium_s.sfx[lcv].size ) {
+ if( maxtime < paprium_s.sfx[lcv].time ) {
+ maxtime = paprium_s.sfx[lcv].time;
+ newch = lcv;
+ }
+ continue;
+ }
+
+ newch = lcv;
+ break;
+ }
+
+
+ paprium_s.sfx[newch].volume = vol;
+ paprium_s.sfx[newch].panning = pan;
+ paprium_s.sfx[newch].type = type;
+
+ paprium_s.sfx[newch].num = data;
+ paprium_s.sfx[newch].flags = flags;
+
+ paprium_s.sfx[newch].loop = 0;
+ paprium_s.sfx[newch].count = 0;
+ paprium_s.sfx[newch].time = 0;
+ paprium_s.sfx[newch].tick = 0;
+ paprium_s.sfx[newch].decay = 0;
+
+ if( flags & 0x4000 )
+ paprium_s.sfx[newch].echo = (paprium_s.echo_pan++) & 1;
+
+ paprium_s.sfx[newch].ptr = ptr;
+ paprium_s.sfx[newch].start = ptr;
+ paprium_s.sfx[newch].size = size;
+ }
+ goto done;
+
+
+sfx_loop:
+ {
+ int lcv;
+
+
+#if DEBUG_MODE
+ sprintf(error_str, "[%d] [%04X:%04X <== %04X:%04X] DM Sfx_Loop %02X -- %04X %04X %04X\n",
+ v_counter,
+ (m68k.prev_pc>>16)&0xffff, m68k.prev_pc&0xffff, (retaddr>>16)&0xffff, retaddr&0xffff,
+ data, *(uint16 *)(paprium_s.ram + 0x1E10), *(uint16 *)(paprium_s.ram + 0x1E12), *(uint16 *)(paprium_s.ram + 0x1E14));
+ log_cb(RETRO_LOG_ERROR, error_str);
+#endif
+
+
+ for( lcv = 0; lcv < 8; lcv++, data >>= 1 ) {
+ if( (data & 1) == 0 ) continue;
+
+ paprium_s.sfx[lcv].volume = *(uint16 *)(paprium_s.ram + 0x1E10);
+ paprium_s.sfx[lcv].panning = *(uint16 *)(paprium_s.ram + 0x1E12);
+ paprium_s.sfx[lcv].decay = *(uint16 *)(paprium_s.ram + 0x1E14);
+
+ paprium_s.sfx[lcv].loop = 1;
+
+ break;
+ }
+ }
+ goto done;
+
+
+sfx_off:
+ {
+ int flags;
+
+
+#if DEBUG_MODE
+ sprintf(error_str, "[%d] [%04X:%04X <== %04X:%04X] DM Sfx_Off %02X -- %04X\n",
+ v_counter,
+ (m68k.prev_pc>>16)&0xffff, m68k.prev_pc&0xffff, (retaddr>>16)&0xffff, retaddr&0xffff,
+ data, *(uint16 *)(paprium_s.ram + 0x1E10));
+ log_cb(RETRO_LOG_ERROR, error_str);
+#endif
+
+
+ flags = *(uint16 *)(paprium_s.ram + 0x1E10);
+
+
+ if(0) {}
+ //else if( flags == 6 ) {}
+ else if( flags == 0 ) {}
+ else {} //MessageBoxA(0, "Sfx_Off flags", "Warn", MB_OK );
+
+
+ for( lcv = 0; lcv < 8; lcv++ ) {
+ if( !(data & (1 << lcv) ) ) continue;
+
+ if( flags == 0 ) {
+ paprium_s.sfx[lcv].size = 0;
+ }
+
+ paprium_s.sfx[lcv].decay = flags;
+ paprium_s.sfx[lcv].loop = 0;
+
+ break;
+ }
+ }
+ goto done;
+}
+
+
+static int paprium_addr_test(uint32 address, int mode)
+{
+#if DEBUG_MODE == 0
+ return 0;
+#endif
+
+
+ if( address < 0x100 ) return 0; /* exception table */
+
+ if( skip_boot1 ) {
+ if( address == 0x14CE ) {
+ skip_boot1 = 0;
+ }
+ return 0;
+ }
+
+
+#if DEBUG_MODE
+ if( mode == 0 ) {
+ if( address >= 0x8000 ) return 0;
+ }
+#endif
+
+
+#if DEBUG_MODE
+ if( address >= 0x2000 && address < 0x8000 ) return 0;
+#endif
+
+#if DEBUG_MODE
+ if( address >= 0x200 && address < 0xb00 ) return 0;
+#endif
+
+#if DEBUG_MODE
+ if( address >= 0xb00 && address < 0xf00 ) return 0;
+ if( address >= 0x1f20 && address < 0x1f90 ) return 0; /* exp.s */
+#endif
+
+#if DEBUG_MODE
+ if( address >= 0xF80 && address < 0x1290 ) return 0; /* OBJ list */
+#endif
+
+#if 0
+ if( address >= 0x1290 && address < 0x1400 ) {
+ MessageBoxA(0, "address", "me", 0);
+ return 0;
+ }
+#endif
+
+#if 0
+ if( address >= 0x1B40 && address < 0x1b90 ) {
+ MessageBoxA(0, "address 2", "me", 0);
+ return 1;
+ }
+#endif
+
+#if 0
+ if( address >= 0xd80 && address < 0xf80 ) {
+ MessageBoxA(0, "address 3", "me", 0);
+ return 1;
+ }
+#endif
+
+#if DEBUG_MODE
+ if( address >= 0x1400 && address < 0x1800 ) return 0; /* DMA list */
+#endif
+
+#if DEBUG_MODE
+ if( address >= 0x1800 && address < 0x1A00 ) return 0; /* DAC list ?? */
+#endif
+
+#if DEBUG_MODE
+ if( address == 0x1F10 ) return 0; /* DMA size = header [10h] + packet [x words] */
+ if( address == 0x1F16 ) return 0; /* DMA transfer count */
+ if( address == 0x1F18 ) return 0; /* OBJ count */
+ if( address == 0x1F12 ) return 0; /* sprite ram available ??? 0B00 or 1200 */
+#endif
+
+#if DEBUG_MODE
+ if( address >= 0x1b98 && address < 0x1c00 ) return 0; /* soundshock x26 */
+#endif
+
+
+ if( address == 0x1FEA ) return 0; /* DM command */
+
+
+ //if( address == 0x1FE4 ) return 0; /* DM ?? */
+ //if( address == 0x1FE6 ) return 0; /* DM ?? */
+
+ return 1;
+}
+
+
+static uint32 paprium_r8(uint32 address)
+{
+ int data = paprium_s.ram[address^1];
+
+
+#if DEBUG_MODE
+ if( paprium_addr_test(address, 0) ) {
+ sprintf(error_str, "[%04X:%04X] R8 %04X = %04X\n",
+ (m68k.prev_pc>>16)&0xffff, m68k.prev_pc&0xffff, address, data);
+
+ log_cb(RETRO_LOG_ERROR, error_str);
+ }
+#endif
+
+
+ if( address == 0x1800 )
+ data = 0;
+
+ else if( address >= 0x1880 && address < 0x1b00 ) {
+ data = rand() % 256;
+ //paprium_s.ram[address^1] = data; /* dma blowout if no limit */
+ }
+
+
+ return data;
+}
+
+
+static uint32 paprium_r16(uint32 address)
+{
+ int data = 0;
+
+
+ if( (address == 0xC000) && (paprium_s.decoder_size > 0) ) {
+#if DEBUG_MODE
+ sprintf(error_str, "[%d] Decoder %X %X @ C000\n", v_counter, paprium_s.decoder_ptr, paprium_s.decoder_size);
+ log_cb(RETRO_LOG_ERROR, error_str);
+#endif
+
+ int max, size;
+
+ if( paprium_s.decoder_mode == 2 )
+ max = 0x4000;
+
+ else if( paprium_s.decoder_mode == 7 )
+ max = 0x800;
+
+
+ size = (paprium_s.decoder_size > max) ? max : paprium_s.decoder_size;
+
+ memcpy(paprium_s.ram + 0xC000, paprium_s.decoder_ram + paprium_s.decoder_ptr, size);
+
+ paprium_s.decoder_ptr += size;
+ paprium_s.decoder_size -= size;
+ }
+
+
+ switch( address ) {
+ case 0x1FE4:
+ data = 0xFFFF;
+ data &= ~(1<<2);
+ data &= ~(1<<6);
+ break;
+
+ case 0x1FE6:
+ data = 0xFFFF;
+ data &= ~(1<<14);
+ data &= ~(1<<8); /* sram */
+ data &= ~(1<<9); /* sram */
+ break;
+
+ case 0x1FEA:
+ data = 0xFFFF;
+ data &= ~(1<<15);
+ break;
+
+ default:
+ data = *(uint16 *)(paprium_s.ram + address);
+ break;
+ }
+
+
+#if DEBUG_MODE
+ if( paprium_addr_test(address, 0) ) {
+ sprintf(error_str, "[%d] [%04X:%04X] R16 %04X = %04X\n",
+ v_counter, (m68k.prev_pc>>16)&0xffff, m68k.prev_pc&0xffff, address, data);
+
+ log_cb(RETRO_LOG_ERROR, error_str);
+ }
+#endif
+
+ return data;
+}
+
+
+static void paprium_w8(uint32 address, uint32 data)
+{
+#if DEBUG_MODE
+ if( paprium_addr_test(address, 1) ) {
+ sprintf(error_str, "[%d] [%04X:%04X] W8 %04X = %02X\n",
+ v_counter, (m68k.prev_pc>>16)&0xffff, m68k.prev_pc&0xffff, address, data);
+
+ log_cb(RETRO_LOG_ERROR, error_str);
+ }
+#endif
+
+ paprium_s.ram[address^1] = data;
+}
+
+
+static void paprium_w16(uint32 address, uint32 data)
+{
+#if DEBUG_MODE
+ if( paprium_addr_test(address, 1) ) {
+ sprintf(error_str, "[%d] [%04X:%04X] W16 %04X = %04X\n",
+ v_counter, (m68k.prev_pc>>16)&0xffff, m68k.prev_pc&0xffff, address, data);
+
+ log_cb(RETRO_LOG_ERROR, error_str);
+ }
+
+ if( address >= 0x1E10 && address <= 0x1E30 ) paprium_cmd_count++;
+#endif
+
+ *(uint16 *)(paprium_s.ram + address) = data;
+
+ if( address == 0x1FEA ) {
+ paprium_cmd(data);
+
+ paprium_cmd_count = 0;
+ }
+}
+
+
+static uint32 paprium_io_r8(uint32 address)
+{
+ if( address == 0xA14101 )
+ return paprium_tmss;
+
+ ctrl_io_read_byte(address);
+}
+
+
+static void paprium_io_w8(uint32 address, uint32 data)
+{
+ if( address >= 0xA130F3 && address <= 0xA130FF ) /* no bank mapper */
+ return;
+
+ if( address == 0xA14101 ) {
+ paprium_tmss = data;
+ return;
+ }
+
+ ctrl_io_write_byte(address, data);
+}
+
+
+static void paprium_map()
+{
+ m68k.memory_map[0x00].base = paprium_s.ram;
+ m68k.memory_map[0x00].read8 = paprium_r8;
+ m68k.memory_map[0x00].read16 = paprium_r16;
+ m68k.memory_map[0x00].write8 = paprium_w8;
+ m68k.memory_map[0x00].write16 = paprium_w16;
+
+ m68k.memory_map[0xA1].read8 = paprium_io_r8;
+ m68k.memory_map[0xA1].write8 = paprium_io_w8;
+
+ zbank_memory_map[0x00].read = paprium_r8;
+ zbank_memory_map[0x00].write = paprium_w8;
+}
+
+
+static void paprium_init()
+{
+ int ptr;
+
+ paprium_map();
+
+
+ memset(&paprium_s, 0, sizeof(paprium_s));
+ memcpy(paprium_s.ram, cart.rom, 0x10000);
+
+
+#if 1 /* fast loadstate */
+ ptr = (*(uint16*)(cart.rom + 0xaf77c) << 16) + *(uint16*)(cart.rom + 0xaf77e);
+
+ paprium_music_ptr = (*(uint16*)(cart.rom + 0x10054)<< 16) + *(uint16*)(cart.rom + 0x10056);
+ // (*(uint16*)(cart.rom + 0x10058)<< 16) + *(uint16*)(cart.rom + 0x1005a);
+ paprium_wave_ptr = (*(uint16*)(cart.rom + ptr + 0x774)<< 16) + *(uint16*)(cart.rom + ptr + 0x776);
+ // (*(uint16*)(cart.rom + 0x1005c)<< 16) + *(uint16*)(cart.rom + 0x1005e);
+ paprium_sfx_ptr = (*(uint16*)(cart.rom + ptr + 0x778)<< 16) + *(uint16*)(cart.rom + ptr + 0x77a);
+ paprium_sprite_ptr = (*(uint16*)(cart.rom + 0x10014)<< 16) + *(uint16*)(cart.rom + 0x10016);
+ paprium_tile_ptr = (*(uint16*)(cart.rom + ptr + 0x780)<< 16) + *(uint16*)(cart.rom + ptr + 0x782);
+
+ paprium_decoder_type(paprium_sprite_ptr, paprium_obj_ram);
+ paprium_s.decoder_size = 0;
+
+
+ if(0) { /* www.wavpack.com */
+ /* warn: adding payload after 8MB ROM breaks Mega CD */
+
+ FILE *fp;
+
+#ifdef _WIN32
+ sprintf(error_str, "%s\\paprium\\paprium.wav", g_rom_dir);
+#else
+ sprintf(error_str, "%s/paprium/paprium.wav", g_rom_dir);
+#endif
+
+ fp = fopen(error_str, "rb");
+ if(!fp) {
+ //MessageBoxA(0,"help","r",0);
+ exit(1);
+ }
+ fseek(fp, 0x2C, SEEK_SET);
+ int size = fread(paprium_wave_ram, 1, 0x180000, fp);
+ for(int lcv = 0; lcv < size; lcv +=2 ) {
+ int data = *(uint16*)(paprium_wave_ram + lcv);
+ data = ((data & 0xFF00) >> 8) + ((data & 0x00FF) << 8);
+ *(uint16*)(paprium_wave_ram + lcv) = data;
+ }
+ fclose(fp);
+ }
+
+ *(uint16*)(paprium_s.ram + 0x192) = 0x3634; /* 6-button, multitap */
+#endif
+
+
+ paprium_s.ram[0x1D1D^1] = 0x04; /* rom ok - dynamic patch */
+ paprium_s.ram[0x1D2C^1] = 0x67;
+
+
+#if 1 /* boot hack */
+ *(uint16*) (paprium_s.ram + 0x1560) = 0x4EF9;
+ *(uint16*) (paprium_s.ram + 0x1562) = 0x0001;
+ *(uint16*) (paprium_s.ram + 0x1564) = 0x0100;
+#endif
+
+
+ fast_dma_hack = 1; /* skip vram management */
+
+
+#if DEBUG_CHEAT /* cheat - big hurt */
+ *(uint16*) (cart.rom + 0x9FE38 + 6) = 0x007F; /* Tug */
+ *(uint16*) (cart.rom + 0x9FE58 + 6) = 0x007F;
+ *(uint16*) (cart.rom + 0x9FF18 + 6) = 0x007F;
+ *(uint16*) (cart.rom + 0x9FF38 + 6) = 0x007F;
+
+ *(uint16*) (cart.rom + 0x9FB58 + 6) = 0x007F; /* Alex */
+ *(uint16*) (cart.rom + 0x9FB78 + 6) = 0x007F;
+ *(uint16*) (cart.rom + 0x9FBF8 + 6) = 0x007F;
+ *(uint16*) (cart.rom + 0x9FC18 + 6) = 0x007F;
+ *(uint16*) (cart.rom + 0x9FCB8 + 6) = 0x007F;
+ *(uint16*) (cart.rom + 0x9FCD8 + 6) = 0x007F;
+
+ *(uint16*) (cart.rom + 0x9F758 + 6) = 0x007F; /* Dice */
+ *(uint16*) (cart.rom + 0x9F778 + 6) = 0x007F;
+ *(uint16*) (cart.rom + 0x9F798 + 6) = 0x007F;
+ *(uint16*) (cart.rom + 0x9F7B8 + 6) = 0x007F;
+ *(uint16*) (cart.rom + 0x9F7D8 + 6) = 0x007F;
+ *(uint16*) (cart.rom + 0x9F898 + 6) = 0x007F;
+#endif
+
+
+#if 1 /* WM text - pre-irq delay */
+ *(uint16*)(cart.rom + 0xb9094) = 0x2079;
+ *(uint16*)(cart.rom + 0xb9096) = 0x000a;
+ *(uint16*)(cart.rom + 0xb9098) = 0xf85c;
+
+ *(uint16*)(cart.rom + 0xb909a) = 0x20bc;
+ *(uint16*)(cart.rom + 0xb909c) = 0x0000;
+ *(uint16*)(cart.rom + 0xb909e) = 0x0003;
+
+ *(uint16*)(cart.rom + 0xb90a0) = 0x20bc;
+ *(uint16*)(cart.rom + 0xb90a2) = 0x0000;
+ *(uint16*)(cart.rom + 0xb90a4) = 0x0003;
+
+ *(uint16*)(cart.rom + 0xb90a6) = 0x20bc;
+ *(uint16*)(cart.rom + 0xb90a8) = 0x0000;
+ *(uint16*)(cart.rom + 0xb90aa) = 0x0003;
+
+ *(uint16*)(cart.rom + 0xb90ac) = 0x20bc;
+ *(uint16*)(cart.rom + 0xb90ae) = 0x0000;
+ *(uint16*)(cart.rom + 0xb90b0) = 0x0003;
+
+ *(uint16*)(cart.rom + 0xb90b2) = 0x20bc;
+ *(uint16*)(cart.rom + 0xb90b4) = 0x0000;
+ *(uint16*)(cart.rom + 0xb90b6) = 0x0003;
+#endif
+
+
+ srand((uintptr_t) &ptr); /* discard time library */
+ paprium_s.echo_pan = rand();
+
+
+ paprium_s.music_segment = -1;
+}
+
+
+static void paprium_reset()
+{
+ paprium_init();
+
+ mp3dec_init(&paprium_mp3d);
+
+ mp3dec_init(&paprium_mp3d_boss1);
+ mp3dec_init(&paprium_mp3d_boss2);
+ mp3dec_init(&paprium_mp3d_boss3);
+ mp3dec_init(&paprium_mp3d_boss4);
+ paprium_load_mp3_boss();
+
+
+ //extern int trace_start;
+ //trace_start = 1;
+ skip_boot1 = 1;
+}
diff --git a/core/cd_hw/cdd.c b/core/cd_hw/cdd.c
index 45bc5bf3a..f1c9831e7 100644
--- a/core/cd_hw/cdd.c
+++ b/core/cd_hw/cdd.c
@@ -192,7 +192,8 @@ void cdd_init(int samplerate)
{
/* CD-DA is running by default at 44100 Hz */
/* Audio stream is resampled to desired rate using Blip Buffer */
- blip_set_rates(snd.blips[2], 44100, samplerate);
+ //blip_set_rates(snd.blips[2], 44100, samplerate);
+ blip_set_rates(snd.blips[2], 48000, samplerate); /* paprium hack */
}
void cdd_reset(void)
diff --git a/core/m68k/m68kcpu.c b/core/m68k/m68kcpu.c
index 5382ce422..237fb1cc1 100644
--- a/core/m68k/m68kcpu.c
+++ b/core/m68k/m68kcpu.c
@@ -2,6 +2,8 @@
/* MAIN 68K CORE */
/* ======================================================================== */
+#define DEBUG_TRACE 0
+
extern int vdp_68k_irq_ack(int int_level);
#define m68ki_cpu m68k
@@ -31,6 +33,11 @@ static int irq_latency;
m68ki_cpu_core m68k;
+#if DEBUG_TRACE
+#include
+#include "m68kd.h"
+#include "shared.h"
+#endif
/* ======================================================================== */
/* =============================== CALLBACKS ============================== */
@@ -296,6 +303,13 @@ void m68k_run(unsigned int cycles)
cpu_hook(HOOK_M68K_E, 0, REG_PC, 0);
#endif
+#if DEBUG_TRACE
+ {
+ m68k.prev_pc = m68k.pc;
+ trace_m68k();
+ }
+#endif
+
/* Decode next instruction */
REG_IR = m68ki_read_imm_16();
diff --git a/core/m68k/m68kcpu.h b/core/m68k/m68kcpu.h
index 424d68723..3655f91a3 100644
--- a/core/m68k/m68kcpu.h
+++ b/core/m68k/m68kcpu.h
@@ -154,8 +154,8 @@
/* We have to do this because the morons at ANSI decided that shifts
* by >= data size are undefined.
*/
- #define LSR_32(A, C) ((C) < 32 ? (A) >> (C) : 0)
- #define LSL_32(A, C) ((C) < 32 ? (A) << (C) : 0)
+ #define LSR_32(A, C) (((C) < 32) ? (A) >> (C) : 0)
+ #define LSL_32(A, C) (((C) < 32) ? (A) << (C) : 0)
#endif /* M68K_INT_GT_32_BIT */
#if M68K_USE_64_BIT
diff --git a/core/m68k/m68kd.h b/core/m68k/m68kd.h
new file mode 100644
index 000000000..4b4424882
--- /dev/null
+++ b/core/m68k/m68kd.h
@@ -0,0 +1,1162 @@
+//#include
+
+static FILE *fp_trace_m68k;
+static char map_m68k[0x100 * 0x10000];
+
+
+static char Dbg_Str[64];
+static char Dbg_EA_Str[32];
+static char Dbg_Size_Str[3];
+static char Dbg_Cond_Str[3];
+
+static unsigned short (*Next_Word)();
+static unsigned int (*Next_Long)();
+
+int trace_start;
+
+
+static char *Make_Dbg_EA_Str(int Size, int EA_Num, int Reg_Num)
+{
+ int i;
+ Dbg_EA_Str[31] = 0;
+
+ switch(EA_Num)
+ {
+ case 0:
+ // 000 rrr Dr
+ sprintf(Dbg_EA_Str, "D%.1d%c", Reg_Num, 0);
+ break;
+
+ case 1:
+ // 001 rrr Ar
+ sprintf(Dbg_EA_Str, "A%.1d%c", Reg_Num, 0);
+ break;
+
+ case 2:
+ // 010 rrr (Ar)
+ sprintf(Dbg_EA_Str, "(A%.1d)%c", Reg_Num, 0);
+ break;
+
+ case 3:
+ // 011 rrr (Ar)+
+ sprintf(Dbg_EA_Str, "(A%.1d)+%c", Reg_Num, 0);
+ break;
+
+ case 4:
+ // 100 rrr -(Ar)
+ sprintf(Dbg_EA_Str, "-(A%.1d)%c", Reg_Num, 0);
+ break;
+
+ case 5:
+ // 101 rrr d16(Ar) dddddddd dddddddd
+ sprintf(Dbg_EA_Str, "$%.4X(A%.1d)%c", Next_Word(), Reg_Num, 0);
+ break;
+
+ case 6:
+ // 110 rrr d8(Ar,ix) aiiizcc0 dddddddd
+ i = Next_Word() & 0xFFFF;
+ if (i & 0x8000)
+ sprintf(Dbg_EA_Str, "$%.2X(A%.1d,A%.1d)%c", i & 0xFF, Reg_Num, (i >> 12) & 0x7, 0);
+ else
+ sprintf(Dbg_EA_Str, "$%.2X(A%.1d,D%.1d)%c", i & 0xFF, Reg_Num, (i >> 12) & 0x7, 0);
+ break;
+
+ case 7:
+ switch(Reg_Num)
+ {
+ case 0:
+ // 111 000 addr16 dddddddd dddddddd
+ sprintf(Dbg_EA_Str, "($%.4X)%c", Next_Word(), 0);
+ break;
+
+ case 1:
+ // 111 001 addr32 dddddddd dddddddd ddddddddd dddddddd
+ sprintf(Dbg_EA_Str, "($%.8X)%c", Next_Long(), 0);
+ break;
+
+ case 2:
+ // 111 010 d16(PC) dddddddd dddddddd
+ sprintf(Dbg_EA_Str, "$%.4X(PC)%c", Next_Word(), 0);
+ break;
+
+ case 3:
+ // 111 011 d8(PC,ix) aiiiz000 dddddddd
+ i = Next_Word() & 0xFFFF;
+ if (i & 0x8000)
+ sprintf(Dbg_EA_Str, "$%.2X(PC,A%.1d)%c", i & 0xFF, (i >> 12) & 0x7, 0);
+ else
+ sprintf(Dbg_EA_Str, "$%.2X(PC,D%.1d)%c", i & 0xFF, (i >> 12) & 0x7, 0);
+ break;
+
+ case 4:
+ // 111 100 imm/implied
+ switch(Size)
+ {
+ case 0:
+ sprintf(Dbg_EA_Str, "#$%.2X%c", Next_Word() & 0xFF, 0);
+ break;
+
+ case 1:
+ sprintf(Dbg_EA_Str, "#$%.4X%c", Next_Word(), 0);
+ break;
+
+ case 2:
+ sprintf(Dbg_EA_Str, "#$%.8X%c", Next_Long(), 0);
+ break;
+ }
+ break;
+ }
+ break;
+ }
+
+ return(Dbg_EA_Str);
+}
+
+
+static char *Make_Dbg_Size_Str(int Size)
+{
+ Dbg_Size_Str[2] = 0;
+ sprintf(Dbg_Size_Str, ".?");
+
+ switch(Size)
+ {
+ case 0:
+ sprintf(Dbg_Size_Str, ".B");
+ break;
+
+ case 1:
+ sprintf(Dbg_Size_Str, ".W");
+ break;
+
+ case 2:
+ sprintf(Dbg_Size_Str, ".L");
+ break;
+ }
+
+ return(Dbg_Size_Str);
+}
+
+
+static char *Make_Dbg_Size_Str_2(int Size)
+{
+ Dbg_Size_Str[2] = 0;
+ sprintf(Dbg_Size_Str, ".?");
+
+ switch(Size)
+ {
+ case 0:
+ sprintf(Dbg_Size_Str, ".W");
+ break;
+
+ case 1:
+ sprintf(Dbg_Size_Str, ".L");
+ break;
+ }
+
+ return(Dbg_Size_Str);
+}
+
+static char *Make_Dbg_Cond_Str(int Cond)
+{
+ Dbg_Cond_Str[2] = 0;
+ sprintf(Dbg_Cond_Str, "??");
+
+ switch(Cond)
+ {
+ case 0:
+ sprintf(Dbg_Cond_Str, "Tr");
+ break;
+
+ case 1:
+ sprintf(Dbg_Cond_Str, "Fa");
+ break;
+
+ case 2:
+ sprintf(Dbg_Cond_Str, "HI");
+ break;
+
+ case 3:
+ sprintf(Dbg_Cond_Str, "LS");
+ break;
+
+ case 4:
+ sprintf(Dbg_Cond_Str, "CC");
+ break;
+
+ case 5:
+ sprintf(Dbg_Cond_Str, "CS");
+ break;
+
+ case 6:
+ sprintf(Dbg_Cond_Str, "NE");
+ break;
+
+ case 7:
+ sprintf(Dbg_Cond_Str, "EQ");
+ break;
+
+ case 8:
+ sprintf(Dbg_Cond_Str, "VC");
+ break;
+
+ case 9:
+ sprintf(Dbg_Cond_Str, "VS");
+ break;
+
+ case 10:
+ sprintf(Dbg_Cond_Str, "PL");
+ break;
+
+ case 11:
+ sprintf(Dbg_Cond_Str, "MI");
+ break;
+
+ case 12:
+ sprintf(Dbg_Cond_Str, "GE");
+ break;
+
+ case 13:
+ sprintf(Dbg_Cond_Str, "LT");
+ break;
+
+ case 14:
+ sprintf(Dbg_Cond_Str, "GT");
+ break;
+
+ case 15:
+ sprintf(Dbg_Cond_Str, "LE");
+ break;
+ }
+
+ return(Dbg_Cond_Str);
+}
+
+
+static char *M68KDisasm(unsigned short (*NW)(), unsigned int (*NL)(), unsigned int hook_pc )
+{
+ int i;
+ unsigned short OPC;
+ static char Tmp_Str[64];
+
+ Dbg_Str[63] = 0;
+ Tmp_Str[63] = 0;
+
+ Next_Word = NW;
+ Next_Long = NL;
+
+ OPC = Next_Word();
+
+ sprintf(Dbg_Str, "Unknown Opcode%c", 0);
+
+ switch(OPC >> 12)
+ {
+ case 0:
+
+ if (OPC & 0x100)
+ {
+ if ((OPC & 0x038) == 0x8)
+ {
+ if (OPC & 0x080)
+ //MOVEP.z Ds,d16(Ad)
+ sprintf(Dbg_Str, "MOVEP%-3sD%.1d,#$%.4X(A%.1d)%c", Make_Dbg_Size_Str_2((OPC & 0x40) >> 6), (OPC & 0xE00) >> 9, Next_Word(), OPC & 0x7, 0);
+ else
+ //MOVEP.z d16(As),Dd
+ sprintf(Dbg_Str, "MOVEP%-3s#$%.4X(A%.1d),D%.1d%c", Make_Dbg_Size_Str_2((OPC & 0x40) >> 6), Next_Word(), OPC & 0x7, (OPC & 0xE00) >> 9, 0);
+ }
+ else
+ {
+ switch((OPC >> 6) & 0x3)
+ {
+ case 0:
+ //BTST Ds,a
+ sprintf(Dbg_Str, "BTST D%.1d,%s%c", (OPC & 0xE00) >> 9, Make_Dbg_EA_Str(2, (OPC & 0x38) >> 3, OPC & 7), 0);
+ break;
+
+ case 1:
+ //BCHG Ds,a
+ sprintf(Dbg_Str, "BCHG D%.1d,%s%c", (OPC & 0xE00) >> 9, Make_Dbg_EA_Str(2, (OPC & 0x38) >> 3, OPC & 7), 0);
+ break;
+
+ case 2:
+ //BCLR Ds,a
+ sprintf(Dbg_Str, "BCLR D%.1d,%s%c", (OPC & 0xE00) >> 9, Make_Dbg_EA_Str(2, (OPC & 0x38) >> 3, OPC & 7), 0);
+ break;
+
+ case 3:
+ //BSET Ds,a
+ sprintf(Dbg_Str, "BSET D%.1d,%s%c", (OPC & 0xE00) >> 9, Make_Dbg_EA_Str(2, (OPC & 0x38) >> 3, OPC & 7), 0);
+ break;
+ }
+ }
+ }
+ else
+ {
+ switch((OPC >> 6) & 0x3F)
+ {
+ case 0:
+ //ORI.B #k,a
+ i = Next_Word() & 0xFF;
+ sprintf(Dbg_Str, "ORI.B #$%.2X,%s%c", i, Make_Dbg_EA_Str(0, (OPC & 0x38) >> 3, OPC & 0x7), 0);
+ break;
+
+ case 1:
+ //ORI.W #k,a
+ i = Next_Word() & 0xFFFF;
+ sprintf(Dbg_Str, "ORI.W #$%.4X,%s%c", i, Make_Dbg_EA_Str(1, (OPC & 0x38) >> 3, OPC & 0x7), 0);
+ break;
+
+ case 2:
+ //ORI.L #k,a
+ i = Next_Long();
+ sprintf(Dbg_Str, "ORI.L #$%.8X,%s%c", i, Make_Dbg_EA_Str(2, (OPC & 0x38) >> 3, OPC & 0x7), 0);
+ break;
+
+ case 8:
+ //ANDI.B #k,a
+ i = Next_Word() & 0xFF;
+ sprintf(Dbg_Str, "ANDI.B #$%.2X,%s%c", i & 0xFF, Make_Dbg_EA_Str(0, (OPC & 0x38) >> 3, OPC & 0x7), 0);
+ break;
+
+ case 9:
+ //ANDI.W #k,a
+ i = Next_Word() & 0xFFFF;
+ sprintf(Dbg_Str, "ANDI.W #$%.4X,%s%c", i, Make_Dbg_EA_Str(1, (OPC & 0x38) >> 3, OPC & 0x7), 0);
+ break;
+
+ case 10:
+ //ANDI.L #k,a
+ i = Next_Long();
+ sprintf(Dbg_Str, "ANDI.L #$%.8X,%s%c", i, Make_Dbg_EA_Str(2, (OPC & 0x38) >> 3, OPC & 0x7), 0);
+ break;
+
+ case 16:
+ //SUBI.B #k,a
+ i = Next_Word() & 0xFF;
+ sprintf(Dbg_Str, "SUBI.B #$%.2X,%s%c", i & 0xFF, Make_Dbg_EA_Str(0, (OPC & 0x38) >> 3, OPC & 0x7), 0);
+ break;
+
+ case 17:
+ //SUBI.W #k,a
+ i = Next_Word() & 0xFFFF;
+ sprintf(Dbg_Str, "SUBI.W #$%.4X,%s%c", i, Make_Dbg_EA_Str(1, (OPC & 0x38) >> 3, OPC & 0x7), 0);
+ break;
+
+ case 18:
+ //SUBI.L #k,a
+ i = Next_Long();
+ sprintf(Dbg_Str, "SUBI.L #$%.8X,%s%c", i, Make_Dbg_EA_Str(2, (OPC & 0x38) >> 3, OPC & 0x7), 0);
+ break;
+
+ case 24:
+ //ADDI.B #k,a
+ i = Next_Word() & 0xFF;
+ sprintf(Dbg_Str, "ADDI.B #$%.2X,%s%c", i & 0xFF, Make_Dbg_EA_Str(0, (OPC & 0x38) >> 3, OPC & 0x7), 0);
+ break;
+
+ case 25:
+ //ADDI.W #k,a
+ i = Next_Word() & 0xFFFF;
+ sprintf(Dbg_Str, "ADDI.W #$%.4X,%s%c", i, Make_Dbg_EA_Str(1, (OPC & 0x38) >> 3, OPC & 0x7), 0);
+ break;
+
+ case 26:
+ //ADDI.L #k,a
+ i = Next_Long();
+ sprintf(Dbg_Str, "ADDI.L #$%.8X,%s%c", i, Make_Dbg_EA_Str(2, (OPC & 0x38) >> 3, OPC & 0x7), 0);
+ break;
+
+ case 32:
+ //BTST #n,a
+ i = Next_Word() & 0xFF;
+ sprintf(Dbg_Str, "BTST #%d,%s%c", i, Make_Dbg_EA_Str(0, (OPC & 0x38) >> 3, OPC & 0x7), 0);
+ break;
+
+ case 33:
+ //BCHG #n,a
+ i = Next_Word() & 0xFF;
+ sprintf(Dbg_Str, "BCHG #%d,%s%c", i, Make_Dbg_EA_Str(0, (OPC & 0x38) >> 3, OPC & 0x7), 0);
+ break;
+
+ case 34:
+ //BCLR #n,a
+ i = Next_Word() & 0xFF;
+ sprintf(Dbg_Str, "BCLR #%d,%s%c", i, Make_Dbg_EA_Str(0, (OPC & 0x38) >> 3, OPC & 0x7), 0);
+ break;
+
+ case 35:
+ //BSET #n,a
+ i = Next_Word() & 0xFF;
+ sprintf(Dbg_Str, "BSET #%d,%s%c", i, Make_Dbg_EA_Str(0, (OPC & 0x38) >> 3, OPC & 0x7), 0);
+ break;
+
+ case 40:
+ //EORI.B #k,a
+ i = Next_Word() & 0xFF;
+ sprintf(Dbg_Str, "EORI.B #$%.2X,%s%c", i & 0xFF, Make_Dbg_EA_Str(0, (OPC & 0x38) >> 3, OPC & 0x7), 0);
+ break;
+
+ case 41:
+ //EORI.W #k,a
+ i = Next_Word() & 0xFFFF;
+ sprintf(Dbg_Str, "EORI.W #$%.4X,%s%c", i, Make_Dbg_EA_Str(1, (OPC & 0x38) >> 3, OPC & 0x7), 0);
+ break;
+
+ case 42:
+ //EORI.L #k,a
+ i = Next_Long();
+ sprintf(Dbg_Str, "EORI.L #$%.8X,%s%c", i, Make_Dbg_EA_Str(2, (OPC & 0x38) >> 3, OPC & 0x7), 0);
+ break;
+
+ case 48:
+ //CMPI.B #k,a
+ i = Next_Word() & 0xFF;
+ sprintf(Dbg_Str, "CMPI.B #$%.2X,%s%c", i & 0xFF, Make_Dbg_EA_Str(0, (OPC & 0x38) >> 3, OPC & 0x7), 0);
+ break;
+
+ case 49:
+ //CMPI.W #k,a
+ i = Next_Word() & 0xFFFF;
+ sprintf(Dbg_Str, "CMPI.W #$%.4X,%s%c", i, Make_Dbg_EA_Str(1, (OPC & 0x38) >> 3, OPC & 0x7), 0);
+ break;
+
+ case 50:
+ //CMPI.L #k,a
+ i = Next_Long();
+ sprintf(Dbg_Str, "CMPI.L #$%.8X,%s%c", i, Make_Dbg_EA_Str(2, (OPC & 0x38) >> 3, OPC & 0x7), 0);
+ break;
+ }
+ }
+ break;
+
+ case 1:
+ //MOVE.b as,ad
+ sprintf(Tmp_Str, "%s%c", Make_Dbg_EA_Str(0, (OPC >> 3) & 0x7, OPC & 0x7), 0);
+ sprintf(Dbg_Str, "MOVE.b %s,%s%c", Tmp_Str, Make_Dbg_EA_Str(0, (OPC >> 6) & 0x7, (OPC >> 9) & 0x7), 0);
+ break;
+
+ case 2:
+ //MOVE.l as,ad
+ sprintf(Tmp_Str, "%s%c", Make_Dbg_EA_Str(2, (OPC >> 3) & 0x7, OPC & 0x7), 0);
+ sprintf(Dbg_Str, "MOVE.l %s,%s%c", Tmp_Str, Make_Dbg_EA_Str(2, (OPC >> 6) & 0x7, (OPC >> 9) & 0x7), 0);
+ break;
+
+ case 3:
+ //MOVE.w as,ad
+ sprintf(Tmp_Str, "%s%c", Make_Dbg_EA_Str(1, (OPC >> 3) & 0x7, OPC & 0x7), 0);
+ sprintf(Dbg_Str, "MOVE.w %s,%s%c", Tmp_Str, Make_Dbg_EA_Str(1, (OPC >> 6) & 0x7, (OPC >> 9) & 0x7), 0);
+ break;
+
+ case 4:
+ //SPECIALS ...
+
+ if (OPC & 0x100)
+ {
+ if (OPC & 0x40)
+ //LEA a,Ad
+ sprintf(Dbg_Str, "LEA %s,A%.1d%c", Make_Dbg_EA_Str(2, (OPC & 0x38) >> 3, OPC & 0x7), (OPC >> 9) & 0x7, 0);
+ else
+ //CHK.W a,Dd
+ sprintf(Dbg_Str, "CHK.W %s,D%.1d%c", Make_Dbg_EA_Str(1, (OPC & 0x38) >> 3, OPC & 0x7), (OPC >> 9) & 0x7, 0);
+ }
+ else
+ {
+ switch((OPC >> 6) & 0x3F)
+ {
+ case 0: case 1: case 2:
+ //NEGX.z a
+ sprintf(Dbg_Str, "NEGX%-4s%s%c", Make_Dbg_Size_Str((OPC >> 6) & 3), Make_Dbg_EA_Str((OPC >> 6) & 3, (OPC & 0x38) >> 3, OPC & 0x7), 0);
+ break;
+
+ case 3:
+ //MOVE SR,a
+ sprintf(Dbg_Str, "MOVE SR,%s%c", Make_Dbg_EA_Str(1, (OPC & 0x38) >> 3, OPC & 0x7), 0);
+ break;
+
+ case 8: case 9: case 10:
+ //CLR.z a
+ sprintf(Dbg_Str, "CLR%-5s%s%c", Make_Dbg_Size_Str((OPC >> 6) & 3), Make_Dbg_EA_Str((OPC >> 6) & 3, (OPC & 0x38) >> 3, OPC & 0x7), 0);
+ break;
+
+ case 16: case 17: case 18:
+ //NEG.z a
+ sprintf(Dbg_Str, "NEG%-5s%s%c", Make_Dbg_Size_Str((OPC >> 6) & 3), Make_Dbg_EA_Str((OPC >> 6) & 3, (OPC & 0x38) >> 3, OPC & 0x7), 0);
+ break;
+
+ case 19:
+ //MOVE a,CCR
+ sprintf(Dbg_Str, "MOVE %s,CCR%c", Make_Dbg_EA_Str(1, (OPC & 0x38) >> 3, OPC & 0x7), 0);
+ break;
+
+ case 24: case 25: case 26:
+ //NOT.z a
+ sprintf(Dbg_Str, "NOT%-5s%s%c", Make_Dbg_Size_Str((OPC >> 6) & 3), Make_Dbg_EA_Str((OPC >> 6) & 3, (OPC & 0x38) >> 3, OPC & 0x7), 0);
+ break;
+
+ case 27:
+ //MOVE a,SR
+ sprintf(Dbg_Str, "MOVE %s,SR%c", Make_Dbg_EA_Str(1, (OPC & 0x38) >> 3, OPC & 0x7), 0);
+ break;
+
+ case 32:
+ //NBCD a
+ sprintf(Dbg_Str, "NBCD %s%c", Make_Dbg_EA_Str(0, (OPC & 0x38) >> 3, OPC & 0x7), 0);
+ break;
+
+ case 33:
+
+ if (OPC & 0x38)
+ //PEA a
+ sprintf(Dbg_Str, "PEA %s%c", Make_Dbg_EA_Str(2, (OPC & 0x38) >> 3, OPC & 0x7), 0);
+ else
+ //SWAP.w Dd
+ sprintf(Dbg_Str, "SWAP.w D%d%c", OPC & 0x7, 0);
+
+ break;
+
+ case 34: case 35:
+
+ if (OPC & 0x38)
+ {
+ int registers_a7_d0 = Next_Word();
+
+ //MOVEM.z Reg-List,a
+ sprintf(Dbg_Str, "MOVEM%-3s{d0-a7}[%02x %02x],%s%c", Make_Dbg_Size_Str_2((OPC >> 6) & 1),
+ registers_a7_d0 >> 8, registers_a7_d0 & 0xff,
+ Make_Dbg_EA_Str((OPC >> 6) & 1 + 1, (OPC & 0x38) >> 3, OPC & 0x7), 0);
+ //Next_Word();
+ }
+ else
+ //EXT.z Dd
+ sprintf(Dbg_Str, "EXT%-5s%s%c", Make_Dbg_Size_Str_2((OPC >> 6) & 1), Make_Dbg_EA_Str((OPC >> 6) & 1 + 1, (OPC & 0x38) >> 3, OPC & 0x7), 0);
+
+ break;
+
+ case 40: case 41: case 42:
+ //TST.z a
+ sprintf(Dbg_Str, "TST%-5s%s%c", Make_Dbg_Size_Str((OPC >> 6) & 0x3), Make_Dbg_EA_Str((OPC >> 6) & 0x3, (OPC & 0x38) >> 3, OPC & 0x7), 0);
+ break;
+
+ case 43:
+ //TAS.b a
+ sprintf(Dbg_Str, "TAS.B %s%c", Make_Dbg_EA_Str(0, (OPC & 0x38) >> 3, OPC & 0x7), 0);
+ break;
+
+ case 48: case 49:
+ //Bad Opcode
+ sprintf(Dbg_Str, "Bad Opcode%c", 0);
+ break;
+
+ case 50: case 51: {
+ int registers_d0_a7 = Next_Word();
+
+ //MOVEM.z a,Reg-List
+ sprintf(Dbg_Str, "MOVEM%-3s%s,{a7-d0}[%02x %02x]%c", Make_Dbg_Size_Str_2((OPC >> 6) & 1), Make_Dbg_EA_Str((OPC >> 6) & 1 + 1, (OPC & 0x38) >> 3, OPC & 0x7),
+ registers_d0_a7 >> 8, registers_d0_a7 & 0xff,
+ 0);
+ //Next_Word();
+ } break;
+
+ case 57:
+
+ switch((OPC >> 3) & 0x7)
+ {
+ case 0: case 1:
+ //TRAP #vector
+ sprintf(Dbg_Str, "TRAP #$%.1X%c", OPC & 0xF, 0);
+ break;
+
+ case 2:
+ //LINK As,#k16
+ sprintf(Dbg_Str, "LINK A%.1d,#$%.4X%c", OPC & 0x7, Next_Word(), 0);
+ break;
+
+ case 3:
+ //ULNK Ad
+ sprintf(Dbg_Str, "ULNK A%.1d%c", OPC & 0x7, 0);
+ break;
+
+ case 4:
+ //MOVE As,USP
+ sprintf(Dbg_Str, "MOVE A%.1d,USP%c",OPC & 0x7, 0);
+ break;
+
+ case 5:
+ //MOVE USP,Ad
+ sprintf(Dbg_Str, "MOVE USP,A%.1d%c",OPC & 0x7, 0);
+ break;
+
+ case 6:
+
+ switch(OPC & 0x7)
+ {
+ case 0:
+ //RESET
+ sprintf(Dbg_Str, "RESET%c", 0);
+ break;
+
+ case 1:
+ //NOP
+ sprintf(Dbg_Str, "NOP%c", 0);
+ break;
+
+ case 2:
+ //STOP #k16
+ sprintf(Dbg_Str, "STOP #$%.4X%c", Next_Word(), 0);
+ break;
+
+ case 3:
+ //RTE
+ sprintf(Dbg_Str, "RTE%c", 0);
+ break;
+
+ case 4:
+ //Bad Opcode
+ sprintf(Dbg_Str, "Bad Opcode%c", 0);
+ break;
+
+ case 5:
+ //RTS
+ sprintf(Dbg_Str, "RTS%c", 0);
+ break;
+
+ case 6:
+ //TRAPV
+ sprintf(Dbg_Str, "TRAPV%c", 0);
+ break;
+
+ case 7:
+ //RTR
+ sprintf(Dbg_Str, "RTR%c", 0);
+ break;
+ }
+ break;
+ }
+ break;
+
+ case 58:
+ //JSR a
+ sprintf(Dbg_Str, "JSR %s%c", Make_Dbg_EA_Str(2, (OPC & 0x38) >> 3, OPC & 0x7), 0);
+ break;
+
+ case 59:
+ //JMP a
+ sprintf(Dbg_Str, "JMP %s%c", Make_Dbg_EA_Str(2, (OPC & 0x38) >> 3, OPC & 0x7), 0);
+ break;
+ }
+ }
+ break;
+
+ case 5:
+
+ if ((OPC & 0xC0) == 0xC0)
+ {
+ char offset = OPC & 0xFF;
+
+ if ((OPC & 0x38) == 0x08) {
+ unsigned short word = Next_Word();
+
+ //DBCC Ds,label
+ sprintf(Dbg_Str, "DB%-6sD%.1d,#$%.4X [%02X:%04X]%c", Make_Dbg_Cond_Str((OPC >> 8) & 0xF), OPC & 0x7, word,
+ (hook_pc + 2) >> 16, (hook_pc + 2 + word) & 0xffff, 0);
+ }
+ else
+ //STCC.b a
+ sprintf(Dbg_Str, "ST%-6s%s [%02X:%04X]%c", Make_Dbg_Cond_Str((OPC >> 8) & 0xF), Make_Dbg_EA_Str(0, (OPC & 0x38) >> 3, OPC & 0x7),
+ (hook_pc + 2) >> 16, (hook_pc + 2 + offset) & 0xffff, 0);
+ break;
+ }
+ else
+ {
+ if (OPC & 0x100)
+ //SUBQ.z #k3,a
+ sprintf(Dbg_Str, "SUBQ%-4s#%.1d,%s%c", Make_Dbg_Size_Str((OPC >> 6) & 3), (OPC >> 9) & 0x7, Make_Dbg_EA_Str((OPC >> 6) & 3, (OPC & 0x38) >> 3, OPC & 0x7), 0);
+ else
+ //ADDQ.z #k3,a
+ sprintf(Dbg_Str, "ADDQ%-4s#%.1d,%s%c", Make_Dbg_Size_Str((OPC >> 6) & 3), (OPC >> 9) & 0x7, Make_Dbg_EA_Str((OPC >> 6) & 3, (OPC & 0x38) >> 3, OPC & 0x7), 0);
+ break;
+ }
+ break;
+
+ case 6:
+
+ if (OPC & 0xFF)
+ {
+ int offset = (char) (OPC & 0xFF);
+
+ if ((OPC & 0xF00) == 0x100)
+ {
+ //BSR label
+ sprintf(Dbg_Str, "BSR #$%.2X [%02X:%04X]%c", OPC & 0xFF,
+ (hook_pc + 2 + offset) >> 16, (hook_pc + 2 + offset) & 0xffff, 0);
+ break;
+ }
+
+ if (!(OPC & 0xF00))
+ {
+ //BRA label
+ sprintf(Dbg_Str, "BRA #$%.2X [%02X:%04X]%c", OPC & 0xFF,
+ (hook_pc + 2 + offset) >> 16, (hook_pc + 2 + offset) & 0xffff, 0);
+ break;
+ }
+
+ //BCC label
+ sprintf(Dbg_Str, "B%-7s#$%.2X [%02X:%04X]%c",
+ Make_Dbg_Cond_Str((OPC >> 8) & 0xF), OPC & 0xFF,
+ (hook_pc + 2 + offset) >> 16, (hook_pc + 2 + offset) & 0xffff, 0);
+ }
+ else
+ {
+ int offset = (short)(Next_Word());
+
+ if ((OPC & 0xF00) == 0x100)
+ {
+ //BSR label
+ sprintf(Dbg_Str, "BSR #$%.4X [%02X:%04X]%c", offset,
+ (hook_pc + 2 + offset) >> 16, (hook_pc + 2 + offset) & 0xffff, 0);
+ break;
+ }
+
+ if (!(OPC & 0xF00))
+ {
+ //BRA label
+ sprintf(Dbg_Str, "BRA #$%.4X [%02X:%04X]%c", offset,
+ (hook_pc + 2 + offset) >> 16, (hook_pc + 2 + offset) & 0xffff, 0);
+ break;
+ }
+
+ //BCC label
+ sprintf(Dbg_Str, "B%-7s#$%.4X [%02X:%04X]%c",
+ Make_Dbg_Cond_Str((OPC >> 8 ) & 0xF), offset,
+ (hook_pc + 2 + offset) >> 16, (hook_pc + 2 + offset) & 0xffff, 0);
+ }
+ break;
+
+ case 7:
+ //MOVEQ #k8,Dd
+ sprintf(Dbg_Str, "MOVEQ #$%.2X,D%.1d%c", OPC & 0xFF, (OPC >> 9) & 0x7, 0);
+ break;
+
+ case 8:
+
+ if (OPC & 0x100)
+ {
+ if (!(OPC & 0xF8))
+ {
+ //SBCD Ds,Dd
+ sprintf(Dbg_Str, "SBCD D%.1d,D%.1d%c", OPC & 0x7, (OPC >> 9) & 0x7, 0);
+ break;
+ }
+
+ if ((OPC & 0xF8) == 0x8)
+ {
+ //SBCD -(As),-(Ad)
+ sprintf(Dbg_Str, "SBCD -(A%.1d),-(A%.1d)%c", OPC & 0x7, (OPC >> 9) & 0x7, 0);
+ break;
+ }
+
+ if ((OPC & 0xC0) == 0xC0)
+ //DIVS.w a,Dd
+ sprintf(Dbg_Str, "DIVS.W %s,D%.1d%c", Make_Dbg_EA_Str(1, (OPC & 0x38) >> 3, OPC & 0x7), (OPC >> 9) & 0x7, 0);
+ else
+ //OR.z Ds,a
+ sprintf(Dbg_Str, "OR%-6sD%.1d;%s%c", Make_Dbg_Size_Str((OPC >> 6) & 3), (OPC >> 9) & 0x7, Make_Dbg_EA_Str((OPC >> 6) & 3, (OPC & 0x38) >> 3, OPC & 0x7), 0);
+ }
+ else
+ {
+ if ((OPC & 0xC0) == 0xC0)
+ //DIVU.w a,Dd
+ sprintf(Dbg_Str, "DIVU.W %s,D%.1d%c", Make_Dbg_EA_Str(1, (OPC & 0x38) >> 3, OPC & 0x7), (OPC >> 9) & 0x7, 0);
+ else
+ //OR.z a,Dd
+ sprintf(Dbg_Str, "OR%-6s%s,D%.1d%c", Make_Dbg_Size_Str((OPC >> 6) & 3), Make_Dbg_EA_Str((OPC >> 6) & 3, (OPC & 0x38) >> 3, OPC & 0x7), (OPC >> 9) & 0x7, 0);
+ }
+ break;
+
+ case 9:
+
+ if ((OPC & 0xC0) == 0xC0)
+ //SUBA.z a,Ad
+ sprintf(Dbg_Str, "SUBA%-4s%s,A%.1d%c", Make_Dbg_Size_Str_2((OPC >> 8) & 1), Make_Dbg_EA_Str((OPC >> 8) & 1 + 1, (OPC & 0x38) >> 3, OPC & 0x7), (OPC >> 9) & 0x7, 0);
+ else
+ {
+ if (OPC & 0x100)
+ {
+ if (!(OPC & 0x38))
+ {
+ //SUBX.z Ds,Dd
+ sprintf(Dbg_Str, "SUBX%-4sD%.1d,D%.1d%c", Make_Dbg_Size_Str((OPC >> 6) & 0x3), OPC & 0x7, (OPC >> 9) & 0x7, 0);
+ break;
+ }
+
+ if ((OPC & 0x38) == 0x8)
+ {
+ //SUBX.z -(As),-(Ad)
+ sprintf(Dbg_Str, "SUBX%-4s-(A%.1d),-(A%.1d)%c", Make_Dbg_Size_Str((OPC >> 6) & 0x3), OPC & 0x7, (OPC >> 9) & 0x7, 0);
+ break;
+ }
+
+ //SUB.z Ds,a
+ sprintf(Dbg_Str, "SUB%-5sD%.1d,%s%c", Make_Dbg_Size_Str((OPC >> 6) & 0x3), (OPC >> 9) & 0x7, Make_Dbg_EA_Str((OPC >> 6) & 3, (OPC & 0x38) >> 3, OPC & 0x7), 0);
+ }
+ else
+ //SUB.z a,Dd
+ sprintf(Dbg_Str, "SUB%-5s%s,D%.1d%c", Make_Dbg_Size_Str((OPC >> 6) & 0x3), Make_Dbg_EA_Str((OPC >> 6) & 3, (OPC & 0x38) >> 3, OPC & 0x7), (OPC >> 9) & 0x7, 0);
+ }
+ break;
+
+ case 10:
+ //Bad Opcode
+ sprintf(Dbg_Str, "Bad Opcode%c", 0);
+ break;
+
+ case 11:
+
+ if ((OPC & 0xC0) == 0xC0)
+ //CMPA.z a,Ad
+ sprintf(Dbg_Str, "CMPA%-4s%s,A%.1d%c", Make_Dbg_Size_Str_2((OPC >> 8) & 1), Make_Dbg_EA_Str((OPC >> 7) & 1 + 1, (OPC & 0x38) >> 3, OPC & 0x7), (OPC >> 9) & 0x7, 0);
+ else
+ {
+ if (OPC & 0x100)
+ {
+ if ((OPC & 0x38) == 0x8)
+ {
+ //CMPM.z (As)+,(Ad)+
+ sprintf(Dbg_Str, "CMPM%-4s(A%.1d)+,(A%.1d)+%c", Make_Dbg_Size_Str((OPC >> 6) & 0x3), OPC & 0x7, (OPC >> 9) & 0x7, 0);
+ break;
+ }
+
+ //EOR.z Ds,a
+ sprintf(Dbg_Str, "EOR%-5sD%.1d,%s%c", Make_Dbg_Size_Str((OPC >> 6) & 0x3), (OPC >> 9) & 0x7, Make_Dbg_EA_Str((OPC >> 6) & 3, (OPC & 0x38) >> 3, OPC & 0x7), 0);
+ }
+ else
+ //CMP.z a,Dd
+ sprintf(Dbg_Str, "CMP%-5s%s,D%.1d%c", Make_Dbg_Size_Str((OPC >> 6) & 0x3), Make_Dbg_EA_Str((OPC >> 6) & 3, (OPC & 0x38) >> 3, OPC & 0x7), (OPC >> 9) & 0x7, 0);
+ }
+ break;
+
+ case 12:
+
+ if ((OPC & 0X1F8) == 0x100)
+ {
+ //ABCD Ds,Dd
+ sprintf(Dbg_Str, "ABCD D%.1d,D%.1d%c", OPC & 0x7, (OPC >> 9) & 0x7, 0);
+ break;
+ }
+
+ if ((OPC & 0X1F8) == 0x140)
+ {
+ //EXG.l Ds,Dd
+ sprintf(Dbg_Str, "EXG.L D%.1d,D%.1d%c", OPC & 0x7, (OPC >> 9) & 0x7, 0);
+ break;
+ }
+
+ if ((OPC & 0X1F8) == 0x108)
+ {
+ //ABCD -(As),-(Ad)
+ sprintf(Dbg_Str, "ABCD -(A%.1d),-(A%.1d)%c", OPC & 0x7, (OPC >> 9) & 0x7, 0);
+ break;
+ }
+
+ if ((OPC & 0X1F8) == 0x148)
+ {
+ //EXG.l As,Ad
+ sprintf(Dbg_Str, "EXG.L A%.1d,A%.1d%c", OPC & 0x7, (OPC >> 9) & 0x7, 0);
+ break;
+ }
+
+ if ((OPC & 0X1F8) == 0x188)
+ {
+ //EXG.l As,Dd
+ sprintf(Dbg_Str, "EXG.L A%.1d,D%.1d%c", OPC & 0x7, (OPC >> 9) & 0x7, 0);
+ break;
+ }
+
+ switch((OPC >> 6) & 0x7)
+ {
+ case 0: case 1: case 2:
+ //AND.z a,Dd
+ sprintf(Dbg_Str, "AND%-5s%s,D%.1d%c", Make_Dbg_Size_Str((OPC >> 6) & 0x3), Make_Dbg_EA_Str((OPC >> 6) & 3, (OPC & 0x38) >> 3, OPC & 0x7), (OPC >> 9) & 0x7, 0);
+ break;
+
+ case 3:
+ //MULU.w a,Dd
+ sprintf(Dbg_Str, "MULU.W %s,D%.1d%c", Make_Dbg_EA_Str(1, (OPC & 0x38) >> 3, OPC & 0x7), (OPC >> 9) & 0x7, 0);
+ break;
+
+ case 4: case 5: case 6:
+ //AND.z Ds,a
+ sprintf(Dbg_Str, "AND%-5sD%.1d,%s%c", Make_Dbg_Size_Str((OPC >> 6) & 0x3), (OPC >> 9) & 0x7, Make_Dbg_EA_Str((OPC >> 6) & 3, (OPC & 0x38) >> 3, OPC & 0x7), 0);
+ break;
+
+ case 7:
+ //MULS.w a,Dd
+ sprintf(Dbg_Str, "MULS.W %s,D%.1d%c", Make_Dbg_EA_Str(1, (OPC & 0x38) >> 3, OPC & 0x7), (OPC >> 9) & 0x7, 0);
+ break;
+ }
+ break;
+
+ case 13:
+
+ if ((OPC & 0xC0) == 0xC0)
+ //ADDA.z a,Ad
+ sprintf(Dbg_Str, "ADDA%-4s%s,A%.1d%c", Make_Dbg_Size_Str_2((OPC >> 8) & 1), Make_Dbg_EA_Str((OPC >> 8) & 1 + 1, (OPC & 0x38) >> 3, OPC & 0x7), (OPC >> 9) & 0x7, 0);
+ else
+ {
+ if (OPC & 0x100)
+ {
+ if (!(OPC & 0x38))
+ {
+ //ADDX.z Ds,Dd
+ sprintf(Dbg_Str, "ADDX%-4sD%.1d,D%.1d%c", Make_Dbg_Size_Str((OPC >> 6) & 0x3), OPC & 0x7, (OPC >> 9) & 0x7, 0);
+ break;
+ }
+
+ if ((OPC & 0x38) == 0x8)
+ {
+ //ADDX.z -(As),-(Ad)
+ sprintf(Dbg_Str, "ADDX%-4s-(A%.1d),-(A%.1d)%c", Make_Dbg_Size_Str((OPC >> 6) & 0x3), OPC & 0x7, (OPC >> 9) & 0x7, 0);
+ break;
+ }
+
+ //ADD.z Ds,a
+ sprintf(Dbg_Str, "ADD%-5sD%.1d,%s%c", Make_Dbg_Size_Str((OPC >> 6) & 0x3), (OPC >> 9) & 0x7, Make_Dbg_EA_Str((OPC >> 6) & 3, (OPC & 0x38) >> 3, OPC & 0x7), 0);
+ }
+ else
+ //ADD.z a,Dd
+ sprintf(Dbg_Str, "ADD%-5s%s,D%.1d%c", Make_Dbg_Size_Str((OPC >> 6) & 0x3), Make_Dbg_EA_Str((OPC >> 6) & 3, (OPC & 0x38) >> 3, OPC & 0x7), (OPC >> 9) & 0x7, 0);
+ }
+ break;
+
+ case 14:
+
+ if ((OPC & 0xC0) == 0xC0)
+ {
+ switch ((OPC >> 8) & 0x7)
+ {
+ case 0:
+ //ASR.w #1,a
+ sprintf(Dbg_Str, "ASR.W #1,%s%c", Make_Dbg_EA_Str(1, (OPC & 0x38) >> 3, OPC & 0x7), 0);
+ break;
+
+ case 1:
+ //ASL.w #1,a
+ sprintf(Dbg_Str, "ASL.W #1,%s%c", Make_Dbg_EA_Str(1, (OPC & 0x38) >> 3, OPC & 0x7), 0);
+ break;
+
+ case 2:
+ //LSR.w #1,a
+ sprintf(Dbg_Str, "LSR.W #1,%s%c", Make_Dbg_EA_Str(1, (OPC & 0x38) >> 3, OPC & 0x7), 0);
+ break;
+
+ case 3:
+ //LSL.w #1,a
+ sprintf(Dbg_Str, "LSL.W #1,%s%c", Make_Dbg_EA_Str(1, (OPC & 0x38) >> 3, OPC & 0x7), 0);
+ break;
+
+ case 4:
+ //ROXR.w #1,a
+ sprintf(Dbg_Str, "ROXR.W #1,%s%c", Make_Dbg_EA_Str(1, (OPC & 0x38) >> 3, OPC & 0x7), 0);
+ break;
+
+ case 5:
+ //ROXL.w #1,a
+ sprintf(Dbg_Str, "ROXL.W #1,%s%c", Make_Dbg_EA_Str(1, (OPC & 0x38) >> 3, OPC & 0x7), 0);
+ break;
+
+ case 6:
+ //ROR.w #1,a
+ sprintf(Dbg_Str, "ROR.W #1,%s%c", Make_Dbg_EA_Str(1, (OPC & 0x38) >> 3, OPC & 0x7), 0);
+ break;
+
+ case 7:
+ //ROL.w #1,a
+ sprintf(Dbg_Str, "ROL.W #1,%s%c", Make_Dbg_EA_Str(1, (OPC & 0x38) >> 3, OPC & 0x7), 0);
+ break;
+
+ }
+ }
+ else
+ {
+ switch ((OPC >> 3) & 0x3F)
+ {
+ case 0: case 8: case 16:
+ //ASR.z #k,Dd
+ sprintf(Dbg_Str, "ASR%-5s#%.1d,D%.1d%c", Make_Dbg_Size_Str((OPC >> 6) & 0x3), (OPC >> 9) & 0x7, OPC & 0x7, 0);
+ break;
+
+ case 1: case 9: case 17:
+ //LSR.z #k,Dd
+ sprintf(Dbg_Str, "LSR%-5s#%.1d,D%.1d%c", Make_Dbg_Size_Str((OPC >> 6) & 0x3), (OPC >> 9) & 0x7, OPC & 0x7, 0);
+ break;
+
+ case 2: case 10: case 18:
+ //ROXR.z #k,Dd
+ sprintf(Dbg_Str, "ROXR%-4s#%.1d,D%.1d%c", Make_Dbg_Size_Str((OPC >> 6) & 0x3), (OPC >> 9) & 0x7, OPC & 0x7, 0);
+ break;
+
+ case 3: case 11: case 19:
+ //ROR.z #k,Dd
+ sprintf(Dbg_Str, "ROR%-5s#%.1d,D%.1d%c", Make_Dbg_Size_Str((OPC >> 6) & 0x3), (OPC >> 9) & 0x7, OPC & 0x7, 0);
+ break;
+
+ case 4: case 12: case 20:
+ //ASR.z Ds,Dd
+ sprintf(Dbg_Str, "ASR%-5sD%.1d,D%.1d%c", Make_Dbg_Size_Str((OPC >> 6) & 0x3), (OPC >> 9) & 0x7, OPC & 0x7, 0);
+ break;
+
+ case 5: case 13: case 21:
+ //LSR.z Ds,Dd
+ sprintf(Dbg_Str, "LSR%-5sD%.1d,D%.1d%c", Make_Dbg_Size_Str((OPC >> 6) & 0x3), (OPC >> 9) & 0x7, OPC & 0x7, 0);
+ break;
+
+ case 6: case 14: case 22:
+ //ROXR.z Ds,Dd
+ sprintf(Dbg_Str, "ROXR%-4sD%.1d,D%.1d%c", Make_Dbg_Size_Str((OPC >> 6) & 0x3), (OPC >> 9) & 0x7, OPC & 0x7, 0);
+ break;
+
+ case 7: case 15: case 23:
+ //ROR.z Ds,Dd
+ sprintf(Dbg_Str, "ROR%-5sD%.1d,D%.1d%c", Make_Dbg_Size_Str((OPC >> 6) & 0x3), (OPC >> 9) & 0x7, OPC & 0x7, 0);
+ break;
+
+ case 32: case 40: case 48:
+ //ASL.z #k,Dd
+ sprintf(Dbg_Str, "ASL%-5s#%.1d,D%.1d%c", Make_Dbg_Size_Str((OPC >> 6) & 0x3), (OPC >> 9) & 0x7, OPC & 0x7, 0);
+ break;
+
+ case 33: case 41: case 49:
+ //LSL.z #k,Dd
+ sprintf(Dbg_Str, "LSL%-5s#%.1d,D%.1d%c", Make_Dbg_Size_Str((OPC >> 6) & 0x3), (OPC >> 9) & 0x7, OPC & 0x7, 0);
+ break;
+
+ case 34: case 42: case 50:
+ //ROXL.z #k,Dd
+ sprintf(Dbg_Str, "ROXL%-4s#%.1d,D%.1d%c", Make_Dbg_Size_Str((OPC >> 6) & 0x3), (OPC >> 9) & 0x7, OPC & 0x7, 0);
+ break;
+
+ case 35: case 43: case 51:
+ //ROL.z #k,Dd
+ sprintf(Dbg_Str, "ROL%-5s#%.1d,D%.1d%c", Make_Dbg_Size_Str((OPC >> 6) & 0x3), (OPC >> 9) & 0x7, OPC & 0x7, 0);
+ break;
+
+ case 36: case 44: case 52:
+ //ASL.z Ds,Dd
+ sprintf(Dbg_Str, "ASL%-5sD%.1d,D%.1d%c", Make_Dbg_Size_Str((OPC >> 6) & 0x3), (OPC >> 9) & 0x7, OPC & 0x7, 0);
+ break;
+
+ case 37: case 45: case 53:
+ //LSL.z Ds,Dd
+ sprintf(Dbg_Str, "LSL%-5sD%.1d,D%.1d%c", Make_Dbg_Size_Str((OPC >> 6) & 0x3), (OPC >> 9) & 0x7, OPC & 0x7, 0);
+ break;
+
+ case 38: case 46: case 54:
+ //ROXL.z Ds,Dd
+ sprintf(Dbg_Str, "ROXL%-4sD%.1d,D%.1d%c", Make_Dbg_Size_Str((OPC >> 6) & 0x3), (OPC >> 9) & 0x7, OPC & 0x7, 0);
+ break;
+
+ case 39: case 47: case 55:
+ //ROL.z Ds,Dd
+ sprintf(Dbg_Str, "ROL%-5sD%.1d,D%.1d%c", Make_Dbg_Size_Str((OPC >> 6) & 0x3), (OPC >> 9) & 0x7, OPC & 0x7, 0);
+ break;
+
+ }
+ }
+ break;
+
+ case 15:
+ //Bad Opcode
+ sprintf(Dbg_Str, "Bad Opcode%c", 0);
+ break;
+ }
+
+ return(Dbg_Str);
+}
+
+
+static unsigned short Next_Word_T(void)
+{
+ return m68ki_read_imm_16();
+}
+
+static unsigned int Next_Long_T(void)
+{
+ return m68ki_read_imm_32();
+}
+
+static void trace_m68k()
+{
+ static char String [512];
+ static unsigned int counter = 0;
+ int real_pc = m68k.pc;
+
+
+ if( trace_start == 0 ) return;
+
+
+ counter++;
+
+ if( map_m68k[m68k.pc] ) return;
+ if( m68k.pc == 0x1F00 ) return; // paprium diasm crash
+ //if( m68k.pc >= 0xFF0000 ) return;
+ //if( m68k.pc < 0x10000 ) return;
+ map_m68k[m68k.pc] = 1;
+
+ //if(m68k.pc == 0x84bf6 ) map_m68k[m68k.pc] = 0;
+
+
+ if( !fp_trace_m68k ) {
+ fp_trace_m68k = fopen("trace-m68k.txt", "w");
+ }
+
+
+ sprintf( String, "[%X] %02X:%04X", counter, m68k.pc >> 16, m68k.pc & 0xffff );
+ fprintf( fp_trace_m68k, "%s", String );
+
+
+ sprintf( String, " %04X %04X ", m68k_read_immediate_16(m68k.pc), m68k_read_immediate_16(m68k.pc+2) );
+ fprintf( fp_trace_m68k, "%s", String );
+
+
+ sprintf( String, "%-33s", M68KDisasm( Next_Word_T, Next_Long_T, m68k.pc ) );
+ fprintf( fp_trace_m68k, "%s", String );
+
+
+ sprintf( String, "A0=%.8X A1=%.8X A2=%.8X ", m68k.dar[8], m68k.dar[9], m68k.dar[10]);
+ fprintf( fp_trace_m68k, "%s", String );
+
+ sprintf( String, "A3=%.8X A4=%.8X A5=%.8X ", m68k.dar[11], m68k.dar[12], m68k.dar[13]);
+ fprintf( fp_trace_m68k, "%s", String );
+
+ sprintf( String, "A6=%.8X A7=%.8X", m68k.dar[14], m68k.dar[15]);
+ fprintf( fp_trace_m68k, "%s", String );
+
+ sprintf( String, " " );
+ fprintf( fp_trace_m68k, "%s", String );
+
+ sprintf( String, "D0=%.8X D1=%.8X D2=%.8X ", m68k.dar[0], m68k.dar[1], m68k.dar[2]);
+ fprintf( fp_trace_m68k, "%s", String );
+
+ sprintf( String, "D3=%.8X D4=%.8X D5=%.8X ", m68k.dar[3], m68k.dar[4], m68k.dar[5]);
+ fprintf( fp_trace_m68k, "%s", String );
+
+ sprintf( String, "D6=%.8X D7=%.8X", m68k.dar[6], m68k.dar[7]);
+ fprintf( fp_trace_m68k, "%s", String );
+
+ fprintf( fp_trace_m68k, " ");
+ fprintf( fp_trace_m68k, "%c", (m68k.ir & 0x10)?'X':'x' );
+ fprintf( fp_trace_m68k, "%c", (m68k.ir & 0x08)?'N':'n' );
+ fprintf( fp_trace_m68k, "%c", (m68k.ir & 0x04)?'Z':'z' );
+ fprintf( fp_trace_m68k, "%c", (m68k.ir & 0x02)?'V':'v' );
+ fprintf( fp_trace_m68k, "%c", (m68k.ir & 0x01)?'C':'c' );
+
+ fprintf( fp_trace_m68k, "\n" );
+ fflush(fp_trace_m68k);
+
+
+#if 0
+ if( real_pc == 0xb90c2 )
+ MessageBoxA(0,"debug","0",0);
+#endif
+
+ m68k.pc = real_pc;
+}
diff --git a/core/m68k/m68kops.h b/core/m68k/m68kops.h
index 83bd911f4..1a2751a19 100644
--- a/core/m68k/m68kops.h
+++ b/core/m68k/m68kops.h
@@ -3973,7 +3973,7 @@ static void m68k_op_asl_8_r(void)
}
*r_dst &= 0xffffff00;
- FLAG_X = FLAG_C = ((shift == 8 ? src & 1 : 0))<<8;
+ FLAG_X = FLAG_C = (((shift == 8) ? src & 1 : 0))<<8;
FLAG_N = NFLAG_CLEAR;
FLAG_Z = ZFLAG_SET;
FLAG_V = (!(src == 0))<<7;
@@ -4010,7 +4010,7 @@ static void m68k_op_asl_16_r(void)
}
*r_dst &= 0xffff0000;
- FLAG_X = FLAG_C = ((shift == 16 ? src & 1 : 0))<<8;
+ FLAG_X = FLAG_C = (((shift == 16) ? src & 1 : 0))<<8;
FLAG_N = NFLAG_CLEAR;
FLAG_Z = ZFLAG_SET;
FLAG_V = (!(src == 0))<<7;
@@ -4047,7 +4047,7 @@ static void m68k_op_asl_32_r(void)
}
*r_dst = 0;
- FLAG_X = FLAG_C = ((shift == 32 ? src & 1 : 0))<<8;
+ FLAG_X = FLAG_C = (((shift == 32) ? src & 1 : 0))<<8;
FLAG_N = NFLAG_CLEAR;
FLAG_Z = ZFLAG_SET;
FLAG_V = (!(src == 0))<<7;
@@ -9668,7 +9668,7 @@ static void m68k_op_lsr_32_r(void)
}
*r_dst = 0;
- FLAG_X = FLAG_C = (shift == 32 ? GET_MSB_32(src)>>23 : 0);
+ FLAG_X = FLAG_C = ((shift == 32) ? GET_MSB_32(src)>>23 : 0);
FLAG_N = NFLAG_CLEAR;
FLAG_Z = ZFLAG_SET;
FLAG_V = VFLAG_CLEAR;
@@ -9940,7 +9940,7 @@ static void m68k_op_lsl_32_r(void)
}
*r_dst = 0;
- FLAG_X = FLAG_C = ((shift == 32 ? src & 1 : 0))<<8;
+ FLAG_X = FLAG_C = (((shift == 32) ? src & 1 : 0))<<8;
FLAG_N = NFLAG_CLEAR;
FLAG_Z = ZFLAG_SET;
FLAG_V = VFLAG_CLEAR;
diff --git a/core/m68k/s68kcpu.c b/core/m68k/s68kcpu.c
index ef47850ed..e3375f4df 100644
--- a/core/m68k/s68kcpu.c
+++ b/core/m68k/s68kcpu.c
@@ -2,6 +2,8 @@
/* SUB 68K CORE */
/* ======================================================================== */
+#define DEBUG_TRACE 0
+
extern int scd_68k_irq_ack(int level);
#define m68ki_cpu s68k
@@ -19,6 +21,10 @@ extern int scd_68k_irq_ack(int level);
#include "m68kcpu.h"
#include "m68kops.h"
+#if DEBUG_TRACE
+#include "s68kd.h"
+#endif
+
/* ======================================================================== */
/* ================================= DATA ================================= */
/* ======================================================================== */
@@ -253,8 +259,14 @@ void s68k_run(unsigned int cycles)
/* Set the address space for reads */
m68ki_use_data_space() /* auto-disable (see m68kcpu.h) */
- /* Save current instruction PC */
- s68k.prev_pc = REG_PC;
+ /* Save current instruction PC */
+ s68k.prev_pc = REG_PC;
+
+#if DEBUG_TRACE
+ {
+ trace_s68k();
+ }
+#endif
/* Decode next instruction */
REG_IR = m68ki_read_imm_16();
diff --git a/core/m68k/s68kd.h b/core/m68k/s68kd.h
new file mode 100644
index 000000000..323200807
--- /dev/null
+++ b/core/m68k/s68kd.h
@@ -0,0 +1,1153 @@
+//#include
+
+static FILE *fp_trace_s68k;
+static char map_s68k[0x100 * 0x10000];
+
+
+static char Dbg_Str[64];
+static char Dbg_EA_Str[32];
+static char Dbg_Size_Str[3];
+static char Dbg_Cond_Str[3];
+
+static unsigned short (*Next_Word)();
+static unsigned int (*Next_Long)();
+
+extern int trace_start;
+
+
+static char *Make_Dbg_EA_Str(int Size, int EA_Num, int Reg_Num)
+{
+ int i;
+ Dbg_EA_Str[31] = 0;
+
+ switch(EA_Num)
+ {
+ case 0:
+ // 000 rrr Dr
+ sprintf(Dbg_EA_Str, "D%.1d%c", Reg_Num, 0);
+ break;
+
+ case 1:
+ // 001 rrr Ar
+ sprintf(Dbg_EA_Str, "A%.1d%c", Reg_Num, 0);
+ break;
+
+ case 2:
+ // 010 rrr (Ar)
+ sprintf(Dbg_EA_Str, "(A%.1d)%c", Reg_Num, 0);
+ break;
+
+ case 3:
+ // 011 rrr (Ar)+
+ sprintf(Dbg_EA_Str, "(A%.1d)+%c", Reg_Num, 0);
+ break;
+
+ case 4:
+ // 100 rrr -(Ar)
+ sprintf(Dbg_EA_Str, "-(A%.1d)%c", Reg_Num, 0);
+ break;
+
+ case 5:
+ // 101 rrr d16(Ar) dddddddd dddddddd
+ sprintf(Dbg_EA_Str, "$%.4X(A%.1d)%c", Next_Word(), Reg_Num, 0);
+ break;
+
+ case 6:
+ // 110 rrr d8(Ar,ix) aiiizcc0 dddddddd
+ i = Next_Word() & 0xFFFF;
+ if (i & 0x8000)
+ sprintf(Dbg_EA_Str, "$%.2X(A%.1d,A%.1d)%c", i & 0xFF, Reg_Num, (i >> 12) & 0x7, 0);
+ else
+ sprintf(Dbg_EA_Str, "$%.2X(A%.1d,D%.1d)%c", i & 0xFF, Reg_Num, (i >> 12) & 0x7, 0);
+ break;
+
+ case 7:
+ switch(Reg_Num)
+ {
+ case 0:
+ // 111 000 addr16 dddddddd dddddddd
+ sprintf(Dbg_EA_Str, "($%.4X)%c", Next_Word(), 0);
+ break;
+
+ case 1:
+ // 111 001 addr32 dddddddd dddddddd ddddddddd dddddddd
+ sprintf(Dbg_EA_Str, "($%.8X)%c", Next_Long(), 0);
+ break;
+
+ case 2:
+ // 111 010 d16(PC) dddddddd dddddddd
+ sprintf(Dbg_EA_Str, "$%.4X(PC)%c", Next_Word(), 0);
+ break;
+
+ case 3:
+ // 111 011 d8(PC,ix) aiiiz000 dddddddd
+ i = Next_Word() & 0xFFFF;
+ if (i & 0x8000)
+ sprintf(Dbg_EA_Str, "$%.2X(PC,A%.1d)%c", i & 0xFF, (i >> 12) & 0x7, 0);
+ else
+ sprintf(Dbg_EA_Str, "$%.2X(PC,D%.1d)%c", i & 0xFF, (i >> 12) & 0x7, 0);
+ break;
+
+ case 4:
+ // 111 100 imm/implied
+ switch(Size)
+ {
+ case 0:
+ sprintf(Dbg_EA_Str, "#$%.2X%c", Next_Word() & 0xFF, 0);
+ break;
+
+ case 1:
+ sprintf(Dbg_EA_Str, "#$%.4X%c", Next_Word(), 0);
+ break;
+
+ case 2:
+ sprintf(Dbg_EA_Str, "#$%.8X%c", Next_Long(), 0);
+ break;
+ }
+ break;
+ }
+ break;
+ }
+
+ return(Dbg_EA_Str);
+}
+
+
+static char *Make_Dbg_Size_Str(int Size)
+{
+ Dbg_Size_Str[2] = 0;
+ sprintf(Dbg_Size_Str, ".?");
+
+ switch(Size)
+ {
+ case 0:
+ sprintf(Dbg_Size_Str, ".B");
+ break;
+
+ case 1:
+ sprintf(Dbg_Size_Str, ".W");
+ break;
+
+ case 2:
+ sprintf(Dbg_Size_Str, ".L");
+ break;
+ }
+
+ return(Dbg_Size_Str);
+}
+
+
+static char *Make_Dbg_Size_Str_2(int Size)
+{
+ Dbg_Size_Str[2] = 0;
+ sprintf(Dbg_Size_Str, ".?");
+
+ switch(Size)
+ {
+ case 0:
+ sprintf(Dbg_Size_Str, ".W");
+ break;
+
+ case 1:
+ sprintf(Dbg_Size_Str, ".L");
+ break;
+ }
+
+ return(Dbg_Size_Str);
+}
+
+static char *Make_Dbg_Cond_Str(int Cond)
+{
+ Dbg_Cond_Str[2] = 0;
+ sprintf(Dbg_Cond_Str, "??");
+
+ switch(Cond)
+ {
+ case 0:
+ sprintf(Dbg_Cond_Str, "Tr");
+ break;
+
+ case 1:
+ sprintf(Dbg_Cond_Str, "Fa");
+ break;
+
+ case 2:
+ sprintf(Dbg_Cond_Str, "HI");
+ break;
+
+ case 3:
+ sprintf(Dbg_Cond_Str, "LS");
+ break;
+
+ case 4:
+ sprintf(Dbg_Cond_Str, "CC");
+ break;
+
+ case 5:
+ sprintf(Dbg_Cond_Str, "CS");
+ break;
+
+ case 6:
+ sprintf(Dbg_Cond_Str, "NE");
+ break;
+
+ case 7:
+ sprintf(Dbg_Cond_Str, "EQ");
+ break;
+
+ case 8:
+ sprintf(Dbg_Cond_Str, "VC");
+ break;
+
+ case 9:
+ sprintf(Dbg_Cond_Str, "VS");
+ break;
+
+ case 10:
+ sprintf(Dbg_Cond_Str, "PL");
+ break;
+
+ case 11:
+ sprintf(Dbg_Cond_Str, "MI");
+ break;
+
+ case 12:
+ sprintf(Dbg_Cond_Str, "GE");
+ break;
+
+ case 13:
+ sprintf(Dbg_Cond_Str, "LT");
+ break;
+
+ case 14:
+ sprintf(Dbg_Cond_Str, "GT");
+ break;
+
+ case 15:
+ sprintf(Dbg_Cond_Str, "LE");
+ break;
+ }
+
+ return(Dbg_Cond_Str);
+}
+
+
+static char *S68KDisasm(unsigned short (*NW)(), unsigned int (*NL)(), unsigned int hook_pc )
+{
+ int i;
+ unsigned short OPC;
+ static char Tmp_Str[64];
+
+ Dbg_Str[63] = 0;
+ Tmp_Str[63] = 0;
+
+ Next_Word = NW;
+ Next_Long = NL;
+
+ OPC = Next_Word();
+
+ sprintf(Dbg_Str, "Unknown Opcode%c", 0);
+
+ switch(OPC >> 12)
+ {
+ case 0:
+
+ if (OPC & 0x100)
+ {
+ if ((OPC & 0x038) == 0x8)
+ {
+ if (OPC & 0x080)
+ //MOVEP.z Ds,d16(Ad)
+ sprintf(Dbg_Str, "MOVEP%-3sD%.1d,#$%.4X(A%.1d)%c", Make_Dbg_Size_Str_2((OPC & 0x40) >> 6), (OPC & 0xE00) >> 9, Next_Word(), OPC & 0x7, 0);
+ else
+ //MOVEP.z d16(As),Dd
+ sprintf(Dbg_Str, "MOVEP%-3s#$%.4X(A%.1d),D%.1d%c", Make_Dbg_Size_Str_2((OPC & 0x40) >> 6), Next_Word(), OPC & 0x7, (OPC & 0xE00) >> 9, 0);
+ }
+ else
+ {
+ switch((OPC >> 6) & 0x3)
+ {
+ case 0:
+ //BTST Ds,a
+ sprintf(Dbg_Str, "BTST D%.1d,%s%c", (OPC & 0xE00) >> 9, Make_Dbg_EA_Str(2, (OPC & 0x38) >> 3, OPC & 7), 0);
+ break;
+
+ case 1:
+ //BCHG Ds,a
+ sprintf(Dbg_Str, "BCHG D%.1d,%s%c", (OPC & 0xE00) >> 9, Make_Dbg_EA_Str(2, (OPC & 0x38) >> 3, OPC & 7), 0);
+ break;
+
+ case 2:
+ //BCLR Ds,a
+ sprintf(Dbg_Str, "BCLR D%.1d,%s%c", (OPC & 0xE00) >> 9, Make_Dbg_EA_Str(2, (OPC & 0x38) >> 3, OPC & 7), 0);
+ break;
+
+ case 3:
+ //BSET Ds,a
+ sprintf(Dbg_Str, "BSET D%.1d,%s%c", (OPC & 0xE00) >> 9, Make_Dbg_EA_Str(2, (OPC & 0x38) >> 3, OPC & 7), 0);
+ break;
+ }
+ }
+ }
+ else
+ {
+ switch((OPC >> 6) & 0x3F)
+ {
+ case 0:
+ //ORI.B #k,a
+ i = Next_Word() & 0xFF;
+ sprintf(Dbg_Str, "ORI.B #$%.2X,%s%c", i, Make_Dbg_EA_Str(0, (OPC & 0x38) >> 3, OPC & 0x7), 0);
+ break;
+
+ case 1:
+ //ORI.W #k,a
+ i = Next_Word() & 0xFFFF;
+ sprintf(Dbg_Str, "ORI.W #$%.4X,%s%c", i, Make_Dbg_EA_Str(1, (OPC & 0x38) >> 3, OPC & 0x7), 0);
+ break;
+
+ case 2:
+ //ORI.L #k,a
+ i = Next_Long();
+ sprintf(Dbg_Str, "ORI.L #$%.8X,%s%c", i, Make_Dbg_EA_Str(2, (OPC & 0x38) >> 3, OPC & 0x7), 0);
+ break;
+
+ case 8:
+ //ANDI.B #k,a
+ i = Next_Word() & 0xFF;
+ sprintf(Dbg_Str, "ANDI.B #$%.2X,%s%c", i & 0xFF, Make_Dbg_EA_Str(0, (OPC & 0x38) >> 3, OPC & 0x7), 0);
+ break;
+
+ case 9:
+ //ANDI.W #k,a
+ i = Next_Word() & 0xFFFF;
+ sprintf(Dbg_Str, "ANDI.W #$%.4X,%s%c", i, Make_Dbg_EA_Str(1, (OPC & 0x38) >> 3, OPC & 0x7), 0);
+ break;
+
+ case 10:
+ //ANDI.L #k,a
+ i = Next_Long();
+ sprintf(Dbg_Str, "ANDI.L #$%.8X,%s%c", i, Make_Dbg_EA_Str(2, (OPC & 0x38) >> 3, OPC & 0x7), 0);
+ break;
+
+ case 16:
+ //SUBI.B #k,a
+ i = Next_Word() & 0xFF;
+ sprintf(Dbg_Str, "SUBI.B #$%.2X,%s%c", i & 0xFF, Make_Dbg_EA_Str(0, (OPC & 0x38) >> 3, OPC & 0x7), 0);
+ break;
+
+ case 17:
+ //SUBI.W #k,a
+ i = Next_Word() & 0xFFFF;
+ sprintf(Dbg_Str, "SUBI.W #$%.4X,%s%c", i, Make_Dbg_EA_Str(1, (OPC & 0x38) >> 3, OPC & 0x7), 0);
+ break;
+
+ case 18:
+ //SUBI.L #k,a
+ i = Next_Long();
+ sprintf(Dbg_Str, "SUBI.L #$%.8X,%s%c", i, Make_Dbg_EA_Str(2, (OPC & 0x38) >> 3, OPC & 0x7), 0);
+ break;
+
+ case 24:
+ //ADDI.B #k,a
+ i = Next_Word() & 0xFF;
+ sprintf(Dbg_Str, "ADDI.B #$%.2X,%s%c", i & 0xFF, Make_Dbg_EA_Str(0, (OPC & 0x38) >> 3, OPC & 0x7), 0);
+ break;
+
+ case 25:
+ //ADDI.W #k,a
+ i = Next_Word() & 0xFFFF;
+ sprintf(Dbg_Str, "ADDI.W #$%.4X,%s%c", i, Make_Dbg_EA_Str(1, (OPC & 0x38) >> 3, OPC & 0x7), 0);
+ break;
+
+ case 26:
+ //ADDI.L #k,a
+ i = Next_Long();
+ sprintf(Dbg_Str, "ADDI.L #$%.8X,%s%c", i, Make_Dbg_EA_Str(2, (OPC & 0x38) >> 3, OPC & 0x7), 0);
+ break;
+
+ case 32:
+ //BTST #n,a
+ i = Next_Word() & 0xFF;
+ sprintf(Dbg_Str, "BTST #%d,%s%c", i, Make_Dbg_EA_Str(0, (OPC & 0x38) >> 3, OPC & 0x7), 0);
+ break;
+
+ case 33:
+ //BCHG #n,a
+ i = Next_Word() & 0xFF;
+ sprintf(Dbg_Str, "BCHG #%d,%s%c", i, Make_Dbg_EA_Str(0, (OPC & 0x38) >> 3, OPC & 0x7), 0);
+ break;
+
+ case 34:
+ //BCLR #n,a
+ i = Next_Word() & 0xFF;
+ sprintf(Dbg_Str, "BCLR #%d,%s%c", i, Make_Dbg_EA_Str(0, (OPC & 0x38) >> 3, OPC & 0x7), 0);
+ break;
+
+ case 35:
+ //BSET #n,a
+ i = Next_Word() & 0xFF;
+ sprintf(Dbg_Str, "BSET #%d,%s%c", i, Make_Dbg_EA_Str(0, (OPC & 0x38) >> 3, OPC & 0x7), 0);
+ break;
+
+ case 40:
+ //EORI.B #k,a
+ i = Next_Word() & 0xFF;
+ sprintf(Dbg_Str, "EORI.B #$%.2X,%s%c", i & 0xFF, Make_Dbg_EA_Str(0, (OPC & 0x38) >> 3, OPC & 0x7), 0);
+ break;
+
+ case 41:
+ //EORI.W #k,a
+ i = Next_Word() & 0xFFFF;
+ sprintf(Dbg_Str, "EORI.W #$%.4X,%s%c", i, Make_Dbg_EA_Str(1, (OPC & 0x38) >> 3, OPC & 0x7), 0);
+ break;
+
+ case 42:
+ //EORI.L #k,a
+ i = Next_Long();
+ sprintf(Dbg_Str, "EORI.L #$%.8X,%s%c", i, Make_Dbg_EA_Str(2, (OPC & 0x38) >> 3, OPC & 0x7), 0);
+ break;
+
+ case 48:
+ //CMPI.B #k,a
+ i = Next_Word() & 0xFF;
+ sprintf(Dbg_Str, "CMPI.B #$%.2X,%s%c", i & 0xFF, Make_Dbg_EA_Str(0, (OPC & 0x38) >> 3, OPC & 0x7), 0);
+ break;
+
+ case 49:
+ //CMPI.W #k,a
+ i = Next_Word() & 0xFFFF;
+ sprintf(Dbg_Str, "CMPI.W #$%.4X,%s%c", i, Make_Dbg_EA_Str(1, (OPC & 0x38) >> 3, OPC & 0x7), 0);
+ break;
+
+ case 50:
+ //CMPI.L #k,a
+ i = Next_Long();
+ sprintf(Dbg_Str, "CMPI.L #$%.8X,%s%c", i, Make_Dbg_EA_Str(2, (OPC & 0x38) >> 3, OPC & 0x7), 0);
+ break;
+ }
+ }
+ break;
+
+ case 1:
+ //MOVE.b as,ad
+ sprintf(Tmp_Str, "%s%c", Make_Dbg_EA_Str(0, (OPC >> 3) & 0x7, OPC & 0x7), 0);
+ sprintf(Dbg_Str, "MOVE.b %s,%s%c", Tmp_Str, Make_Dbg_EA_Str(0, (OPC >> 6) & 0x7, (OPC >> 9) & 0x7), 0);
+ break;
+
+ case 2:
+ //MOVE.l as,ad
+ sprintf(Tmp_Str, "%s%c", Make_Dbg_EA_Str(2, (OPC >> 3) & 0x7, OPC & 0x7), 0);
+ sprintf(Dbg_Str, "MOVE.l %s,%s%c", Tmp_Str, Make_Dbg_EA_Str(2, (OPC >> 6) & 0x7, (OPC >> 9) & 0x7), 0);
+ break;
+
+ case 3:
+ //MOVE.w as,ad
+ sprintf(Tmp_Str, "%s%c", Make_Dbg_EA_Str(1, (OPC >> 3) & 0x7, OPC & 0x7), 0);
+ sprintf(Dbg_Str, "MOVE.w %s,%s%c", Tmp_Str, Make_Dbg_EA_Str(1, (OPC >> 6) & 0x7, (OPC >> 9) & 0x7), 0);
+ break;
+
+ case 4:
+ //SPECIALS ...
+
+ if (OPC & 0x100)
+ {
+ if (OPC & 0x40)
+ //LEA a,Ad
+ sprintf(Dbg_Str, "LEA %s,A%.1d%c", Make_Dbg_EA_Str(2, (OPC & 0x38) >> 3, OPC & 0x7), (OPC >> 9) & 0x7, 0);
+ else
+ //CHK.W a,Dd
+ sprintf(Dbg_Str, "CHK.W %s,D%.1d%c", Make_Dbg_EA_Str(1, (OPC & 0x38) >> 3, OPC & 0x7), (OPC >> 9) & 0x7, 0);
+ }
+ else
+ {
+ switch((OPC >> 6) & 0x3F)
+ {
+ case 0: case 1: case 2:
+ //NEGX.z a
+ sprintf(Dbg_Str, "NEGX%-4s%s%c", Make_Dbg_Size_Str((OPC >> 6) & 3), Make_Dbg_EA_Str((OPC >> 6) & 3, (OPC & 0x38) >> 3, OPC & 0x7), 0);
+ break;
+
+ case 3:
+ //MOVE SR,a
+ sprintf(Dbg_Str, "MOVE SR,%s%c", Make_Dbg_EA_Str(1, (OPC & 0x38) >> 3, OPC & 0x7), 0);
+ break;
+
+ case 8: case 9: case 10:
+ //CLR.z a
+ sprintf(Dbg_Str, "CLR%-5s%s%c", Make_Dbg_Size_Str((OPC >> 6) & 3), Make_Dbg_EA_Str((OPC >> 6) & 3, (OPC & 0x38) >> 3, OPC & 0x7), 0);
+ break;
+
+ case 16: case 17: case 18:
+ //NEG.z a
+ sprintf(Dbg_Str, "NEG%-5s%s%c", Make_Dbg_Size_Str((OPC >> 6) & 3), Make_Dbg_EA_Str((OPC >> 6) & 3, (OPC & 0x38) >> 3, OPC & 0x7), 0);
+ break;
+
+ case 19:
+ //MOVE a,CCR
+ sprintf(Dbg_Str, "MOVE %s,CCR%c", Make_Dbg_EA_Str(1, (OPC & 0x38) >> 3, OPC & 0x7), 0);
+ break;
+
+ case 24: case 25: case 26:
+ //NOT.z a
+ sprintf(Dbg_Str, "NOT%-5s%s%c", Make_Dbg_Size_Str((OPC >> 6) & 3), Make_Dbg_EA_Str((OPC >> 6) & 3, (OPC & 0x38) >> 3, OPC & 0x7), 0);
+ break;
+
+ case 27:
+ //MOVE a,SR
+ sprintf(Dbg_Str, "MOVE %s,SR%c", Make_Dbg_EA_Str(1, (OPC & 0x38) >> 3, OPC & 0x7), 0);
+ break;
+
+ case 32:
+ //NBCD a
+ sprintf(Dbg_Str, "NBCD %s%c", Make_Dbg_EA_Str(0, (OPC & 0x38) >> 3, OPC & 0x7), 0);
+ break;
+
+ case 33:
+
+ if (OPC & 0x38)
+ //PEA a
+ sprintf(Dbg_Str, "PEA %s%c", Make_Dbg_EA_Str(2, (OPC & 0x38) >> 3, OPC & 0x7), 0);
+ else
+ //SWAP.w Dd
+ sprintf(Dbg_Str, "SWAP.w D%d%c", OPC & 0x7, 0);
+
+ break;
+
+ case 34: case 35:
+
+ if (OPC & 0x38)
+ {
+ int registers_a7_d0 = Next_Word();
+
+ //MOVEM.z Reg-List,a
+ sprintf(Dbg_Str, "MOVEM%-3s{d0-a7}[%02x %02x],%s%c", Make_Dbg_Size_Str_2((OPC >> 6) & 1),
+ registers_a7_d0 >> 8, registers_a7_d0 & 0xff,
+ Make_Dbg_EA_Str((OPC >> 6) & 1 + 1, (OPC & 0x38) >> 3, OPC & 0x7), 0);
+ //Next_Word();
+ }
+ else
+ //EXT.z Dd
+ sprintf(Dbg_Str, "EXT%-5s%s%c", Make_Dbg_Size_Str_2((OPC >> 6) & 1), Make_Dbg_EA_Str((OPC >> 6) & 1 + 1, (OPC & 0x38) >> 3, OPC & 0x7), 0);
+
+ break;
+
+ case 40: case 41: case 42:
+ //TST.z a
+ sprintf(Dbg_Str, "TST%-5s%s%c", Make_Dbg_Size_Str((OPC >> 6) & 0x3), Make_Dbg_EA_Str((OPC >> 6) & 0x3, (OPC & 0x38) >> 3, OPC & 0x7), 0);
+ break;
+
+ case 43:
+ //TAS.b a
+ sprintf(Dbg_Str, "TAS.B %s%c", Make_Dbg_EA_Str(0, (OPC & 0x38) >> 3, OPC & 0x7), 0);
+ break;
+
+ case 48: case 49:
+ //Bad Opcode
+ sprintf(Dbg_Str, "Bad Opcode%c", 0);
+ break;
+
+ case 50: case 51: {
+ int registers_d0_a7 = Next_Word();
+
+ //MOVEM.z a,Reg-List
+ sprintf(Dbg_Str, "MOVEM%-3s%s,{a7-d0}[%02x %02x]%c", Make_Dbg_Size_Str_2((OPC >> 6) & 1), Make_Dbg_EA_Str((OPC >> 6) & 1 + 1, (OPC & 0x38) >> 3, OPC & 0x7),
+ registers_d0_a7 >> 8, registers_d0_a7 & 0xff,
+ 0);
+ //Next_Word();
+ } break;
+
+ case 57:
+
+ switch((OPC >> 3) & 0x7)
+ {
+ case 0: case 1:
+ //TRAP #vector
+ sprintf(Dbg_Str, "TRAP #$%.1X%c", OPC & 0xF, 0);
+ break;
+
+ case 2:
+ //LINK As,#k16
+ sprintf(Dbg_Str, "LINK A%.1d,#$%.4X%c", OPC & 0x7, Next_Word(), 0);
+ break;
+
+ case 3:
+ //ULNK Ad
+ sprintf(Dbg_Str, "ULNK A%.1d%c", OPC & 0x7, 0);
+ break;
+
+ case 4:
+ //MOVE As,USP
+ sprintf(Dbg_Str, "MOVE A%.1d,USP%c",OPC & 0x7, 0);
+ break;
+
+ case 5:
+ //MOVE USP,Ad
+ sprintf(Dbg_Str, "MOVE USP,A%.1d%c",OPC & 0x7, 0);
+ break;
+
+ case 6:
+
+ switch(OPC & 0x7)
+ {
+ case 0:
+ //RESET
+ sprintf(Dbg_Str, "RESET%c", 0);
+ break;
+
+ case 1:
+ //NOP
+ sprintf(Dbg_Str, "NOP%c", 0);
+ break;
+
+ case 2:
+ //STOP #k16
+ sprintf(Dbg_Str, "STOP #$%.4X%c", Next_Word(), 0);
+ break;
+
+ case 3:
+ //RTE
+ sprintf(Dbg_Str, "RTE%c", 0);
+ break;
+
+ case 4:
+ //Bad Opcode
+ sprintf(Dbg_Str, "Bad Opcode%c", 0);
+ break;
+
+ case 5:
+ //RTS
+ sprintf(Dbg_Str, "RTS%c", 0);
+ break;
+
+ case 6:
+ //TRAPV
+ sprintf(Dbg_Str, "TRAPV%c", 0);
+ break;
+
+ case 7:
+ //RTR
+ sprintf(Dbg_Str, "RTR%c", 0);
+ break;
+ }
+ break;
+ }
+ break;
+
+ case 58:
+ //JSR a
+ sprintf(Dbg_Str, "JSR %s%c", Make_Dbg_EA_Str(2, (OPC & 0x38) >> 3, OPC & 0x7), 0);
+ break;
+
+ case 59:
+ //JMP a
+ sprintf(Dbg_Str, "JMP %s%c", Make_Dbg_EA_Str(2, (OPC & 0x38) >> 3, OPC & 0x7), 0);
+ break;
+ }
+ }
+ break;
+
+ case 5:
+
+ if ((OPC & 0xC0) == 0xC0)
+ {
+ char offset = OPC & 0xFF;
+
+ if ((OPC & 0x38) == 0x08) {
+ unsigned short word = Next_Word();
+
+ //DBCC Ds,label
+ sprintf(Dbg_Str, "DB%-6sD%.1d,#$%.4X [%02X:%04X]%c", Make_Dbg_Cond_Str((OPC >> 8) & 0xF), OPC & 0x7, word,
+ (hook_pc + 2) >> 16, (hook_pc + 2 + word) & 0xffff, 0);
+ }
+ else
+ //STCC.b a
+ sprintf(Dbg_Str, "ST%-6s%s [%02X:%04X]%c", Make_Dbg_Cond_Str((OPC >> 8) & 0xF), Make_Dbg_EA_Str(0, (OPC & 0x38) >> 3, OPC & 0x7),
+ (hook_pc + 2) >> 16, (hook_pc + 2 + offset) & 0xffff, 0);
+ break;
+ }
+ else
+ {
+ if (OPC & 0x100)
+ //SUBQ.z #k3,a
+ sprintf(Dbg_Str, "SUBQ%-4s#%.1d,%s%c", Make_Dbg_Size_Str((OPC >> 6) & 3), (OPC >> 9) & 0x7, Make_Dbg_EA_Str((OPC >> 6) & 3, (OPC & 0x38) >> 3, OPC & 0x7), 0);
+ else
+ //ADDQ.z #k3,a
+ sprintf(Dbg_Str, "ADDQ%-4s#%.1d,%s%c", Make_Dbg_Size_Str((OPC >> 6) & 3), (OPC >> 9) & 0x7, Make_Dbg_EA_Str((OPC >> 6) & 3, (OPC & 0x38) >> 3, OPC & 0x7), 0);
+ break;
+ }
+ break;
+
+ case 6:
+
+ if (OPC & 0xFF)
+ {
+ int offset = (char) (OPC & 0xFF);
+
+ if ((OPC & 0xF00) == 0x100)
+ {
+ //BSR label
+ sprintf(Dbg_Str, "BSR #$%.2X [%02X:%04X]%c", OPC & 0xFF,
+ (hook_pc + 2 + offset) >> 16, (hook_pc + 2 + offset) & 0xffff, 0);
+ break;
+ }
+
+ if (!(OPC & 0xF00))
+ {
+ //BRA label
+ sprintf(Dbg_Str, "BRA #$%.2X [%02X:%04X]%c", OPC & 0xFF,
+ (hook_pc + 2 + offset) >> 16, (hook_pc + 2 + offset) & 0xffff, 0);
+ break;
+ }
+
+ //BCC label
+ sprintf(Dbg_Str, "B%-7s#$%.2X [%02X:%04X]%c",
+ Make_Dbg_Cond_Str((OPC >> 8) & 0xF), OPC & 0xFF,
+ (hook_pc + 2 + offset) >> 16, (hook_pc + 2 + offset) & 0xffff, 0);
+ }
+ else
+ {
+ int offset = (short)(Next_Word());
+
+ if ((OPC & 0xF00) == 0x100)
+ {
+ //BSR label
+ sprintf(Dbg_Str, "BSR #$%.4X [%02X:%04X]%c", offset,
+ (hook_pc + 2 + offset) >> 16, (hook_pc + 2 + offset) & 0xffff, 0);
+ break;
+ }
+
+ if (!(OPC & 0xF00))
+ {
+ //BRA label
+ sprintf(Dbg_Str, "BRA #$%.4X [%02X:%04X]%c", offset,
+ (hook_pc + 2 + offset) >> 16, (hook_pc + 2 + offset) & 0xffff, 0);
+ break;
+ }
+
+ //BCC label
+ sprintf(Dbg_Str, "B%-7s#$%.4X [%02X:%04X]%c",
+ Make_Dbg_Cond_Str((OPC >> 8 ) & 0xF), offset,
+ (hook_pc + 2 + offset) >> 16, (hook_pc + 2 + offset) & 0xffff, 0);
+ }
+ break;
+
+ case 7:
+ //MOVEQ #k8,Dd
+ sprintf(Dbg_Str, "MOVEQ #$%.2X,D%.1d%c", OPC & 0xFF, (OPC >> 9) & 0x7, 0);
+ break;
+
+ case 8:
+
+ if (OPC & 0x100)
+ {
+ if (!(OPC & 0xF8))
+ {
+ //SBCD Ds,Dd
+ sprintf(Dbg_Str, "SBCD D%.1d,D%.1d%c", OPC & 0x7, (OPC >> 9) & 0x7, 0);
+ break;
+ }
+
+ if ((OPC & 0xF8) == 0x8)
+ {
+ //SBCD -(As),-(Ad)
+ sprintf(Dbg_Str, "SBCD -(A%.1d),-(A%.1d)%c", OPC & 0x7, (OPC >> 9) & 0x7, 0);
+ break;
+ }
+
+ if ((OPC & 0xC0) == 0xC0)
+ //DIVS.w a,Dd
+ sprintf(Dbg_Str, "DIVS.W %s,D%.1d%c", Make_Dbg_EA_Str(1, (OPC & 0x38) >> 3, OPC & 0x7), (OPC >> 9) & 0x7, 0);
+ else
+ //OR.z Ds,a
+ sprintf(Dbg_Str, "OR%-6sD%.1d;%s%c", Make_Dbg_Size_Str((OPC >> 6) & 3), (OPC >> 9) & 0x7, Make_Dbg_EA_Str((OPC >> 6) & 3, (OPC & 0x38) >> 3, OPC & 0x7), 0);
+ }
+ else
+ {
+ if ((OPC & 0xC0) == 0xC0)
+ //DIVU.w a,Dd
+ sprintf(Dbg_Str, "DIVU.W %s,D%.1d%c", Make_Dbg_EA_Str(1, (OPC & 0x38) >> 3, OPC & 0x7), (OPC >> 9) & 0x7, 0);
+ else
+ //OR.z a,Dd
+ sprintf(Dbg_Str, "OR%-6s%s,D%.1d%c", Make_Dbg_Size_Str((OPC >> 6) & 3), Make_Dbg_EA_Str((OPC >> 6) & 3, (OPC & 0x38) >> 3, OPC & 0x7), (OPC >> 9) & 0x7, 0);
+ }
+ break;
+
+ case 9:
+
+ if ((OPC & 0xC0) == 0xC0)
+ //SUBA.z a,Ad
+ sprintf(Dbg_Str, "SUBA%-4s%s,A%.1d%c", Make_Dbg_Size_Str_2((OPC >> 8) & 1), Make_Dbg_EA_Str((OPC >> 8) & 1 + 1, (OPC & 0x38) >> 3, OPC & 0x7), (OPC >> 9) & 0x7, 0);
+ else
+ {
+ if (OPC & 0x100)
+ {
+ if (!(OPC & 0x38))
+ {
+ //SUBX.z Ds,Dd
+ sprintf(Dbg_Str, "SUBX%-4sD%.1d,D%.1d%c", Make_Dbg_Size_Str((OPC >> 6) & 0x3), OPC & 0x7, (OPC >> 9) & 0x7, 0);
+ break;
+ }
+
+ if ((OPC & 0x38) == 0x8)
+ {
+ //SUBX.z -(As),-(Ad)
+ sprintf(Dbg_Str, "SUBX%-4s-(A%.1d),-(A%.1d)%c", Make_Dbg_Size_Str((OPC >> 6) & 0x3), OPC & 0x7, (OPC >> 9) & 0x7, 0);
+ break;
+ }
+
+ //SUB.z Ds,a
+ sprintf(Dbg_Str, "SUB%-5sD%.1d,%s%c", Make_Dbg_Size_Str((OPC >> 6) & 0x3), (OPC >> 9) & 0x7, Make_Dbg_EA_Str((OPC >> 6) & 3, (OPC & 0x38) >> 3, OPC & 0x7), 0);
+ }
+ else
+ //SUB.z a,Dd
+ sprintf(Dbg_Str, "SUB%-5s%s,D%.1d%c", Make_Dbg_Size_Str((OPC >> 6) & 0x3), Make_Dbg_EA_Str((OPC >> 6) & 3, (OPC & 0x38) >> 3, OPC & 0x7), (OPC >> 9) & 0x7, 0);
+ }
+ break;
+
+ case 10:
+ //Bad Opcode
+ sprintf(Dbg_Str, "Bad Opcode%c", 0);
+ break;
+
+ case 11:
+
+ if ((OPC & 0xC0) == 0xC0)
+ //CMPA.z a,Ad
+ sprintf(Dbg_Str, "CMPA%-4s%s,A%.1d%c", Make_Dbg_Size_Str_2((OPC >> 8) & 1), Make_Dbg_EA_Str((OPC >> 7) & 1 + 1, (OPC & 0x38) >> 3, OPC & 0x7), (OPC >> 9) & 0x7, 0);
+ else
+ {
+ if (OPC & 0x100)
+ {
+ if ((OPC & 0x38) == 0x8)
+ {
+ //CMPM.z (As)+,(Ad)+
+ sprintf(Dbg_Str, "CMPM%-4s(A%.1d)+,(A%.1d)+%c", Make_Dbg_Size_Str((OPC >> 6) & 0x3), OPC & 0x7, (OPC >> 9) & 0x7, 0);
+ break;
+ }
+
+ //EOR.z Ds,a
+ sprintf(Dbg_Str, "EOR%-5sD%.1d,%s%c", Make_Dbg_Size_Str((OPC >> 6) & 0x3), (OPC >> 9) & 0x7, Make_Dbg_EA_Str((OPC >> 6) & 3, (OPC & 0x38) >> 3, OPC & 0x7), 0);
+ }
+ else
+ //CMP.z a,Dd
+ sprintf(Dbg_Str, "CMP%-5s%s,D%.1d%c", Make_Dbg_Size_Str((OPC >> 6) & 0x3), Make_Dbg_EA_Str((OPC >> 6) & 3, (OPC & 0x38) >> 3, OPC & 0x7), (OPC >> 9) & 0x7, 0);
+ }
+ break;
+
+ case 12:
+
+ if ((OPC & 0X1F8) == 0x100)
+ {
+ //ABCD Ds,Dd
+ sprintf(Dbg_Str, "ABCD D%.1d,D%.1d%c", OPC & 0x7, (OPC >> 9) & 0x7, 0);
+ break;
+ }
+
+ if ((OPC & 0X1F8) == 0x140)
+ {
+ //EXG.l Ds,Dd
+ sprintf(Dbg_Str, "EXG.L D%.1d,D%.1d%c", OPC & 0x7, (OPC >> 9) & 0x7, 0);
+ break;
+ }
+
+ if ((OPC & 0X1F8) == 0x108)
+ {
+ //ABCD -(As),-(Ad)
+ sprintf(Dbg_Str, "ABCD -(A%.1d),-(A%.1d)%c", OPC & 0x7, (OPC >> 9) & 0x7, 0);
+ break;
+ }
+
+ if ((OPC & 0X1F8) == 0x148)
+ {
+ //EXG.l As,Ad
+ sprintf(Dbg_Str, "EXG.L A%.1d,A%.1d%c", OPC & 0x7, (OPC >> 9) & 0x7, 0);
+ break;
+ }
+
+ if ((OPC & 0X1F8) == 0x188)
+ {
+ //EXG.l As,Dd
+ sprintf(Dbg_Str, "EXG.L A%.1d,D%.1d%c", OPC & 0x7, (OPC >> 9) & 0x7, 0);
+ break;
+ }
+
+ switch((OPC >> 6) & 0x7)
+ {
+ case 0: case 1: case 2:
+ //AND.z a,Dd
+ sprintf(Dbg_Str, "AND%-5s%s,D%.1d%c", Make_Dbg_Size_Str((OPC >> 6) & 0x3), Make_Dbg_EA_Str((OPC >> 6) & 3, (OPC & 0x38) >> 3, OPC & 0x7), (OPC >> 9) & 0x7, 0);
+ break;
+
+ case 3:
+ //MULU.w a,Dd
+ sprintf(Dbg_Str, "MULU.W %s,D%.1d%c", Make_Dbg_EA_Str(1, (OPC & 0x38) >> 3, OPC & 0x7), (OPC >> 9) & 0x7, 0);
+ break;
+
+ case 4: case 5: case 6:
+ //AND.z Ds,a
+ sprintf(Dbg_Str, "AND%-5sD%.1d,%s%c", Make_Dbg_Size_Str((OPC >> 6) & 0x3), (OPC >> 9) & 0x7, Make_Dbg_EA_Str((OPC >> 6) & 3, (OPC & 0x38) >> 3, OPC & 0x7), 0);
+ break;
+
+ case 7:
+ //MULS.w a,Dd
+ sprintf(Dbg_Str, "MULS.W %s,D%.1d%c", Make_Dbg_EA_Str(1, (OPC & 0x38) >> 3, OPC & 0x7), (OPC >> 9) & 0x7, 0);
+ break;
+ }
+ break;
+
+ case 13:
+
+ if ((OPC & 0xC0) == 0xC0)
+ //ADDA.z a,Ad
+ sprintf(Dbg_Str, "ADDA%-4s%s,A%.1d%c", Make_Dbg_Size_Str_2((OPC >> 8) & 1), Make_Dbg_EA_Str((OPC >> 8) & 1 + 1, (OPC & 0x38) >> 3, OPC & 0x7), (OPC >> 9) & 0x7, 0);
+ else
+ {
+ if (OPC & 0x100)
+ {
+ if (!(OPC & 0x38))
+ {
+ //ADDX.z Ds,Dd
+ sprintf(Dbg_Str, "ADDX%-4sD%.1d,D%.1d%c", Make_Dbg_Size_Str((OPC >> 6) & 0x3), OPC & 0x7, (OPC >> 9) & 0x7, 0);
+ break;
+ }
+
+ if ((OPC & 0x38) == 0x8)
+ {
+ //ADDX.z -(As),-(Ad)
+ sprintf(Dbg_Str, "ADDX%-4s-(A%.1d),-(A%.1d)%c", Make_Dbg_Size_Str((OPC >> 6) & 0x3), OPC & 0x7, (OPC >> 9) & 0x7, 0);
+ break;
+ }
+
+ //ADD.z Ds,a
+ sprintf(Dbg_Str, "ADD%-5sD%.1d,%s%c", Make_Dbg_Size_Str((OPC >> 6) & 0x3), (OPC >> 9) & 0x7, Make_Dbg_EA_Str((OPC >> 6) & 3, (OPC & 0x38) >> 3, OPC & 0x7), 0);
+ }
+ else
+ //ADD.z a,Dd
+ sprintf(Dbg_Str, "ADD%-5s%s,D%.1d%c", Make_Dbg_Size_Str((OPC >> 6) & 0x3), Make_Dbg_EA_Str((OPC >> 6) & 3, (OPC & 0x38) >> 3, OPC & 0x7), (OPC >> 9) & 0x7, 0);
+ }
+ break;
+
+ case 14:
+
+ if ((OPC & 0xC0) == 0xC0)
+ {
+ switch ((OPC >> 8) & 0x7)
+ {
+ case 0:
+ //ASR.w #1,a
+ sprintf(Dbg_Str, "ASR.W #1,%s%c", Make_Dbg_EA_Str(1, (OPC & 0x38) >> 3, OPC & 0x7), 0);
+ break;
+
+ case 1:
+ //ASL.w #1,a
+ sprintf(Dbg_Str, "ASL.W #1,%s%c", Make_Dbg_EA_Str(1, (OPC & 0x38) >> 3, OPC & 0x7), 0);
+ break;
+
+ case 2:
+ //LSR.w #1,a
+ sprintf(Dbg_Str, "LSR.W #1,%s%c", Make_Dbg_EA_Str(1, (OPC & 0x38) >> 3, OPC & 0x7), 0);
+ break;
+
+ case 3:
+ //LSL.w #1,a
+ sprintf(Dbg_Str, "LSL.W #1,%s%c", Make_Dbg_EA_Str(1, (OPC & 0x38) >> 3, OPC & 0x7), 0);
+ break;
+
+ case 4:
+ //ROXR.w #1,a
+ sprintf(Dbg_Str, "ROXR.W #1,%s%c", Make_Dbg_EA_Str(1, (OPC & 0x38) >> 3, OPC & 0x7), 0);
+ break;
+
+ case 5:
+ //ROXL.w #1,a
+ sprintf(Dbg_Str, "ROXL.W #1,%s%c", Make_Dbg_EA_Str(1, (OPC & 0x38) >> 3, OPC & 0x7), 0);
+ break;
+
+ case 6:
+ //ROR.w #1,a
+ sprintf(Dbg_Str, "ROR.W #1,%s%c", Make_Dbg_EA_Str(1, (OPC & 0x38) >> 3, OPC & 0x7), 0);
+ break;
+
+ case 7:
+ //ROL.w #1,a
+ sprintf(Dbg_Str, "ROL.W #1,%s%c", Make_Dbg_EA_Str(1, (OPC & 0x38) >> 3, OPC & 0x7), 0);
+ break;
+
+ }
+ }
+ else
+ {
+ switch ((OPC >> 3) & 0x3F)
+ {
+ case 0: case 8: case 16:
+ //ASR.z #k,Dd
+ sprintf(Dbg_Str, "ASR%-5s#%.1d,D%.1d%c", Make_Dbg_Size_Str((OPC >> 6) & 0x3), (OPC >> 9) & 0x7, OPC & 0x7, 0);
+ break;
+
+ case 1: case 9: case 17:
+ //LSR.z #k,Dd
+ sprintf(Dbg_Str, "LSR%-5s#%.1d,D%.1d%c", Make_Dbg_Size_Str((OPC >> 6) & 0x3), (OPC >> 9) & 0x7, OPC & 0x7, 0);
+ break;
+
+ case 2: case 10: case 18:
+ //ROXR.z #k,Dd
+ sprintf(Dbg_Str, "ROXR%-4s#%.1d,D%.1d%c", Make_Dbg_Size_Str((OPC >> 6) & 0x3), (OPC >> 9) & 0x7, OPC & 0x7, 0);
+ break;
+
+ case 3: case 11: case 19:
+ //ROR.z #k,Dd
+ sprintf(Dbg_Str, "ROR%-5s#%.1d,D%.1d%c", Make_Dbg_Size_Str((OPC >> 6) & 0x3), (OPC >> 9) & 0x7, OPC & 0x7, 0);
+ break;
+
+ case 4: case 12: case 20:
+ //ASR.z Ds,Dd
+ sprintf(Dbg_Str, "ASR%-5sD%.1d,D%.1d%c", Make_Dbg_Size_Str((OPC >> 6) & 0x3), (OPC >> 9) & 0x7, OPC & 0x7, 0);
+ break;
+
+ case 5: case 13: case 21:
+ //LSR.z Ds,Dd
+ sprintf(Dbg_Str, "LSR%-5sD%.1d,D%.1d%c", Make_Dbg_Size_Str((OPC >> 6) & 0x3), (OPC >> 9) & 0x7, OPC & 0x7, 0);
+ break;
+
+ case 6: case 14: case 22:
+ //ROXR.z Ds,Dd
+ sprintf(Dbg_Str, "ROXR%-4sD%.1d,D%.1d%c", Make_Dbg_Size_Str((OPC >> 6) & 0x3), (OPC >> 9) & 0x7, OPC & 0x7, 0);
+ break;
+
+ case 7: case 15: case 23:
+ //ROR.z Ds,Dd
+ sprintf(Dbg_Str, "ROR%-5sD%.1d,D%.1d%c", Make_Dbg_Size_Str((OPC >> 6) & 0x3), (OPC >> 9) & 0x7, OPC & 0x7, 0);
+ break;
+
+ case 32: case 40: case 48:
+ //ASL.z #k,Dd
+ sprintf(Dbg_Str, "ASL%-5s#%.1d,D%.1d%c", Make_Dbg_Size_Str((OPC >> 6) & 0x3), (OPC >> 9) & 0x7, OPC & 0x7, 0);
+ break;
+
+ case 33: case 41: case 49:
+ //LSL.z #k,Dd
+ sprintf(Dbg_Str, "LSL%-5s#%.1d,D%.1d%c", Make_Dbg_Size_Str((OPC >> 6) & 0x3), (OPC >> 9) & 0x7, OPC & 0x7, 0);
+ break;
+
+ case 34: case 42: case 50:
+ //ROXL.z #k,Dd
+ sprintf(Dbg_Str, "ROXL%-4s#%.1d,D%.1d%c", Make_Dbg_Size_Str((OPC >> 6) & 0x3), (OPC >> 9) & 0x7, OPC & 0x7, 0);
+ break;
+
+ case 35: case 43: case 51:
+ //ROL.z #k,Dd
+ sprintf(Dbg_Str, "ROL%-5s#%.1d,D%.1d%c", Make_Dbg_Size_Str((OPC >> 6) & 0x3), (OPC >> 9) & 0x7, OPC & 0x7, 0);
+ break;
+
+ case 36: case 44: case 52:
+ //ASL.z Ds,Dd
+ sprintf(Dbg_Str, "ASL%-5sD%.1d,D%.1d%c", Make_Dbg_Size_Str((OPC >> 6) & 0x3), (OPC >> 9) & 0x7, OPC & 0x7, 0);
+ break;
+
+ case 37: case 45: case 53:
+ //LSL.z Ds,Dd
+ sprintf(Dbg_Str, "LSL%-5sD%.1d,D%.1d%c", Make_Dbg_Size_Str((OPC >> 6) & 0x3), (OPC >> 9) & 0x7, OPC & 0x7, 0);
+ break;
+
+ case 38: case 46: case 54:
+ //ROXL.z Ds,Dd
+ sprintf(Dbg_Str, "ROXL%-4sD%.1d,D%.1d%c", Make_Dbg_Size_Str((OPC >> 6) & 0x3), (OPC >> 9) & 0x7, OPC & 0x7, 0);
+ break;
+
+ case 39: case 47: case 55:
+ //ROL.z Ds,Dd
+ sprintf(Dbg_Str, "ROL%-5sD%.1d,D%.1d%c", Make_Dbg_Size_Str((OPC >> 6) & 0x3), (OPC >> 9) & 0x7, OPC & 0x7, 0);
+ break;
+
+ }
+ }
+ break;
+
+ case 15:
+ //Bad Opcode
+ sprintf(Dbg_Str, "Bad Opcode%c", 0);
+ break;
+ }
+
+ return(Dbg_Str);
+}
+
+
+static unsigned short Next_Word_T(void)
+{
+ return m68ki_read_imm_16();
+}
+
+static unsigned int Next_Long_T(void)
+{
+ return m68ki_read_imm_32();
+}
+
+static void trace_s68k()
+{
+ static char String [512];
+ int real_pc = s68k.pc;
+
+
+ return;
+ if( trace_start == 0 ) return;
+
+
+ if( map_s68k[s68k.pc] ) return;
+ if( s68k.pc == 0x1F00 ) return; // paprium diasm crash
+ //if( s68k.pc >= 0xFF0000 ) return;
+ //if( s68k.pc < 0x10000 ) return;
+ map_s68k[s68k.pc] = 1;
+
+
+ if( !fp_trace_s68k ) {
+ fp_trace_s68k = fopen("trace-s68k.txt", "w");
+ }
+
+
+ sprintf( String, "%02X:%04X", s68k.pc >> 16, s68k.pc & 0xffff );
+ fprintf( fp_trace_s68k, "%s", String );
+
+
+ sprintf( String, " %04X %04X ", m68k_read_immediate_16(s68k.pc), m68k_read_immediate_16(s68k.pc+2) );
+ fprintf( fp_trace_s68k, "%s", String );
+
+
+ sprintf( String, "%-33s", S68KDisasm( Next_Word_T, Next_Long_T, s68k.pc ) );
+ fprintf( fp_trace_s68k, "%s", String );
+
+
+ sprintf( String, "A0=%.8X A1=%.8X A2=%.8X ", s68k.dar[8], s68k.dar[9], s68k.dar[10]);
+ fprintf( fp_trace_s68k, "%s", String );
+
+ sprintf( String, "A3=%.8X A4=%.8X A5=%.8X ", s68k.dar[11], s68k.dar[12], s68k.dar[13]);
+ fprintf( fp_trace_s68k, "%s", String );
+
+ sprintf( String, "A6=%.8X A7=%.8X", s68k.dar[14], s68k.dar[15]);
+ fprintf( fp_trace_s68k, "%s", String );
+
+ sprintf( String, " " );
+ fprintf( fp_trace_s68k, "%s", String );
+
+ sprintf( String, "D0=%.8X D1=%.8X D2=%.8X ", s68k.dar[0], s68k.dar[1], s68k.dar[2]);
+ fprintf( fp_trace_s68k, "%s", String );
+
+ sprintf( String, "D3=%.8X D4=%.8X D5=%.8X ", s68k.dar[3], s68k.dar[4], s68k.dar[5]);
+ fprintf( fp_trace_s68k, "%s", String );
+
+ sprintf( String, "D6=%.8X D7=%.8X", s68k.dar[6], s68k.dar[7]);
+ fprintf( fp_trace_s68k, "%s", String );
+
+ fprintf( fp_trace_s68k, " ");
+ fprintf( fp_trace_s68k, "%c", (s68k.ir & 0x10)?'X':'x' );
+ fprintf( fp_trace_s68k, "%c", (s68k.ir & 0x08)?'N':'n' );
+ fprintf( fp_trace_s68k, "%c", (s68k.ir & 0x04)?'Z':'z' );
+ fprintf( fp_trace_s68k, "%c", (s68k.ir & 0x02)?'V':'v' );
+ fprintf( fp_trace_s68k, "%c", (s68k.ir & 0x01)?'C':'c' );
+
+ fprintf( fp_trace_s68k, "\n" );
+ fflush(fp_trace_s68k);
+
+
+ s68k.pc = real_pc;
+}
diff --git a/core/memz80.c b/core/memz80.c
index 75e1a20e4..0ea91f599 100644
--- a/core/memz80.c
+++ b/core/memz80.c
@@ -152,6 +152,14 @@ unsigned char z80_memory_r(unsigned int address)
/* read from 68k banked area */
address = zbank | (address & 0x7FFF);
+
+ if(0)
+ {
+ static FILE *fp = 0;
+ if(!fp) fp = fopen("trace-z80-mem.txt", "w");
+ fprintf(fp, "%X - %X %X - %X %X %X %X\n", address, Z80.pc.w.l, zbank, Z80.af.b.h, Z80.bc.w.l, Z80.de.w.l, Z80.hl.w.l);
+ }
+
if (zbank_memory_map[address >> 16].read)
{
return (*zbank_memory_map[address >> 16].read)(address);
@@ -164,6 +172,16 @@ unsigned char z80_memory_r(unsigned int address)
void z80_memory_w(unsigned int address, unsigned char data)
{
+#if 0
+ static char error_str[512];
+ sprintf(error_str, "[%d] Z80 %04X = %X\n",
+ v_counter,
+ address, data
+ );
+ log_cb(RETRO_LOG_ERROR, error_str);
+#endif
+
+
switch((address >> 13) & 7)
{
case 0: /* $0000-$3FFF: Z80 RAM (8K mirrored) */
@@ -175,6 +193,26 @@ void z80_memory_w(unsigned int address, unsigned char data)
case 2: /* $4000-$5FFF: YM2612 */
{
+#if 0
+if( address == 0x4000 && data != 0x2A && data != 0x2B && data != 0xB6 ) {
+ static char error_str[512];
+ sprintf(error_str, "[%d] Z80 %04X = %X\n",
+ v_counter,
+ address, data
+ );
+ log_cb(RETRO_LOG_ERROR, error_str);
+}
+
+if( address == 0x4002 && data != 0x2A && data != 0x2B && data != 0xB6 ) {
+ static char error_str[512];
+ sprintf(error_str, "[%d] Z80 %04X = %X\n",
+ v_counter,
+ address, data
+ );
+ log_cb(RETRO_LOG_ERROR, error_str);
+}
+#endif
+
fm_write(Z80.cycles, address & 3, data);
return;
}
diff --git a/core/sound/blip_buf.c b/core/sound/blip_buf.c
index 1a47157d8..f231bbb09 100644
--- a/core/sound/blip_buf.c
+++ b/core/sound/blip_buf.c
@@ -27,62 +27,41 @@ details. You should have received a copy of the GNU Lesser General Public
License along with this module; if not, write to the Free Software Foundation,
Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */
-
-#if defined (BLARGG_TEST) && BLARGG_TEST
- #include "blargg_test.h"
+#ifdef _WIN32
+#define DEBUG_BLIP
#endif
-/* Equivalent to ULONG_MAX >= 0xFFFFFFFF00000000.
-Avoids constants that don't fit in 32 bits. */
-#if ULONG_MAX/0xFFFFFFFF > 0xFFFFFFFF
- typedef unsigned long fixed_t;
- enum { pre_shift = 32 };
+#ifdef DEBUG_BLIP
+#include
+#include
-#elif defined(ULLONG_MAX)
- typedef unsigned long long fixed_t;
- enum { pre_shift = 32 };
-
-#else
- typedef unsigned fixed_t;
- enum { pre_shift = 0 };
+void debug_me(char *msg, int x)
+{
+ while(GetModuleHandle(NULL)) {
+ if( GetProcAddress(NULL, msg) ) Sleep(1);
+ Sleep (1);
+ }
+}
+#endif
+#if defined (BLARGG_TEST) && BLARGG_TEST
+ #include "blargg_test.h"
#endif
-enum { time_bits = pre_shift + 20 };
+//#define BLIP_MONO
-static fixed_t const time_unit = (fixed_t) 1 << time_bits;
+/*
+YM2612 = 7.67 Mhz NTSC
+Z80 = 3.579545 MHz
+Crystal = 53.693175 = 15 x 3.57954 MHz NTSC
-enum { bass_shift = 9 }; /* affects high-pass filter breakpoint frequency */
-enum { end_frame_extra = 2 }; /* allows deltas slightly after frame length */
-
-enum { half_width = 8 };
-enum { buf_extra = half_width*2 + end_frame_extra };
-enum { phase_bits = 5 };
-enum { phase_count = 1 << phase_bits };
-enum { delta_bits = 15 };
-enum { delta_unit = 1 << delta_bits };
-enum { frac_bits = time_bits - pre_shift };
-enum { phase_shift = frac_bits - phase_bits };
-
-/* We could eliminate avail and encode whole samples in offset, but that would
-limit the total buffered samples to blip_max_frame. That could only be
-increased by decreasing time_bits, which would reduce resample ratio accuracy.
+53693175 clock @ 50 == 1073863.5 [2^20.034]
+32552 pcm
+44100 cdda
*/
-typedef int buf_t;
-
-struct blip_t
-{
- fixed_t factor;
- fixed_t offset;
- int size;
-#ifdef BLIP_MONO
- int integrator;
-#else
- int integrator[2];
- buf_t* buffer[2];
-#endif
-};
+enum { time_bits = 64-22 }; /* 22.42 -- 768000 * 2^42 = 2EE0 0000 0000 0000*/
+static fixed_t const time_unit = (fixed_t) 1 << time_bits;
#define BLIP_BUFFER_STATE_BUFFER_SIZE 16
@@ -90,10 +69,10 @@ struct blip_buffer_state_t
{
fixed_t offset;
#ifdef BLIP_MONO
- int integrator;
+ buf_t integrator;
buf_t buffer[BLIP_BUFFER_STATE_BUFFER_SIZE];
#else
- int integrator[2];
+ buf_t integrator[2];
buf_t buffer[2][BLIP_BUFFER_STATE_BUFFER_SIZE];
#endif
};
@@ -111,16 +90,18 @@ enum { max_sample = +32767 };
enum { min_sample = -32768 };
#define CLAMP( n ) \
- {\
- if ( n > max_sample ) n = max_sample;\
- else if ( n < min_sample) n = min_sample;\
- }
+{\
+ if ( n > max_sample ) n = max_sample;\
+ else if ( n < min_sample) n = min_sample;\
+}
+
+#include "blip_lpf.h"
#ifdef BLIP_ASSERT
static void check_assumptions( void )
{
int n;
-
+
#if INT_MAX < 0x7FFFFFFF || UINT_MAX < 0xFFFFFFFF
#error "int must be at least 32 bits"
#endif
@@ -146,31 +127,38 @@ blip_t* blip_new( int size )
#ifdef BLIP_ASSERT
assert( size >= 0 );
#endif
-
-#ifdef BLIP_MONO
- m = (blip_t*) malloc( sizeof *m + (size + buf_extra) * sizeof (buf_t) );
-#else
+
m = (blip_t*) malloc( sizeof *m );
+
+#ifdef DEBUG_BLIP
+ printf("[blip_new] %d\n", size); fflush(stdout);
#endif
if ( m )
{
-#ifndef BLIP_MONO
- m->buffer[0] = (buf_t*) malloc( (size + buf_extra) * sizeof (buf_t));
- m->buffer[1] = (buf_t*) malloc( (size + buf_extra) * sizeof (buf_t));
- if ((m->buffer[0] == NULL) || (m->buffer[1] == NULL))
- {
- blip_delete(m);
- return 0;
- }
-#endif
- m->factor = time_unit / blip_max_ratio;
+#ifdef BLIP_MONO
+ m->buffer = (buf_t*) malloc( size * sizeof (buf_t));
+ if (m->buffer == NULL)
+ {
+ blip_delete(m);
+ return 0;
+ }
+#else
+ m->buffer[0] = (buf_t*) malloc( size * sizeof (buf_t));
+ m->buffer[1] = (buf_t*) malloc( size * sizeof (buf_t));
+ if ((m->buffer[0] == NULL) || (m->buffer[1] == NULL))
+ {
+ blip_delete(m);
+ return 0;
+ }
+#endif
+ m->factor = time_unit;
m->size = size;
blip_clear( m );
#ifdef BLIP_ASSERT
check_assumptions();
#endif
- }
+ }
return m;
}
@@ -178,13 +166,16 @@ void blip_delete( blip_t* m )
{
if ( m != NULL )
{
-#ifndef BLIP_MONO
- if (m->buffer[0] != NULL)
- free(m->buffer[0]);
- if (m->buffer[1] != NULL)
- free(m->buffer[1]);
+#ifdef BLIP_MONO
+ if (m->buffer != NULL)
+ free(m->buffer);
+#else
+ if (m->buffer[0] != NULL)
+ free(m->buffer[0]);
+ if (m->buffer[1] != NULL)
+ free(m->buffer[1]);
#endif
- /* Clear fields in case user tries to use after freeing */
+ /* Clear fields in case user tries to use after freeing */
memset( m, 0, sizeof *m );
free( m );
}
@@ -192,40 +183,32 @@ void blip_delete( blip_t* m )
void blip_set_rates( blip_t* m, double clock_rate, double sample_rate )
{
- double factor = time_unit * sample_rate / clock_rate;
- m->factor = (fixed_t) factor;
-
+ m->factor = (fixed_t) ((double) time_unit * sample_rate / clock_rate);
+
+ m->clock_rate = (int) clock_rate;
+ m->sample_rate = (int) sample_rate;
+
+#ifdef DEBUG_BLIP
+ printf("[blip_set_rates] %d %d %lld\n", (int) clock_rate, (int) sample_rate, m->factor); fflush(stdout);
+#endif
+
#ifdef BLIP_ASSERT
/* Fails if clock_rate exceeds maximum, relative to sample_rate */
assert( 0 <= factor - m->factor && factor - m->factor < 1 );
#endif
-
-/* Avoid requiring math.h. Equivalent to
- m->factor = (int) ceil( factor ) */
- if ( m->factor < factor )
- m->factor++;
-
- /* At this point, factor is most likely rounded up, but could still
- have been rounded down in the floating-point calculation. */
}
void blip_clear( blip_t* m )
{
- /* We could set offset to 0, factor/2, or factor-1. 0 is suitable if
- factor is rounded up. factor-1 is suitable if factor is rounded down.
- Since we don't know rounding direction, factor/2 accommodates either,
- with the slight loss of showing an error in half the time. Since for
- a 64-bit factor this is years, the halving isn't a problem. */
-
- m->offset = m->factor / 2;
+ m->offset = 0;
#ifdef BLIP_MONO
m->integrator = 0;
- memset( SAMPLES( m ), 0, (m->size + buf_extra) * sizeof (buf_t) );
+ memset( m->buffer, 0, m->size * sizeof (buf_t) );
#else
m->integrator[0] = 0;
m->integrator[1] = 0;
- memset( m->buffer[0], 0, (m->size + buf_extra) * sizeof (buf_t) );
- memset( m->buffer[1], 0, (m->size + buf_extra) * sizeof (buf_t) );
+ memset( m->buffer[0], 0, m->size * sizeof (buf_t) );
+ memset( m->buffer[1], 0, m->size * sizeof (buf_t) );
#endif
}
@@ -238,7 +221,12 @@ int blip_clocks_needed( const blip_t* m, int samples )
assert( (samples >= 0) && (((m->offset >> time_bits) + samples) <= m->size) );
#endif
- needed = (fixed_t) samples * time_unit;
+ needed = (fixed_t) samples * time_unit;
+
+#ifdef DEBUG_BLIP
+ printf("[blip_clocks_needed] %d %lld %lld\n", samples, time_unit, needed); fflush(stdout);
+#endif
+
if ( needed < m->offset )
return 0;
@@ -247,11 +235,19 @@ int blip_clocks_needed( const blip_t* m, int samples )
void blip_end_frame( blip_t* m, unsigned t )
{
- m->offset += t * m->factor;
+#ifdef DEBUG_BLIP
+ //printf("[blip_end_frame] %lld %d %lld\n", m->offset, t, m->factor); fflush(stdout);
+#endif
+
+ m->offset += (fixed_t) t * m->factor;
+
+#ifdef DEBUG_BLIP
+ //printf("[blip_end_frame] %lld %d %lld\n", m->offset, t, m->factor); fflush(stdout);
+#endif
#ifdef BLIP_ASSERT
/* Fails if buffer size was exceeded */
- assert( (m->offset >> time_bits) <= m->size );
+ assert( (m->offset >> time_bits) <= m->size );
#endif
}
@@ -263,12 +259,21 @@ int blip_samples_avail( const blip_t* m )
static void remove_samples( blip_t* m, int count )
{
#ifdef BLIP_MONO
- buf_t* buf = SAMPLES( m );
+ buf_t* buf = m->buffer;
#else
buf_t* buf = m->buffer[0];
#endif
- int remain = (m->offset >> time_bits) + buf_extra - count;
- m->offset -= count * time_unit;
+
+ int lpf_taps = blip_lpf_taps(m->sample_rate);
+
+ int remain = (m->offset >> time_bits) - count;
+ if( lpf_taps > remain ) remain = lpf_taps;
+
+ m->offset -= count * time_unit;
+
+#ifdef DEBUG_BLIP
+ printf("[blip_remove_samples] %d %d %d %lld\n", remain, lpf_taps, count, m->offset); fflush(stdout);
+#endif
memmove( &buf [0], &buf [count], remain * sizeof (buf_t) );
memset( &buf [remain], 0, count * sizeof (buf_t) );
@@ -281,37 +286,47 @@ static void remove_samples( blip_t* m, int count )
int blip_discard_samples_dirty(blip_t* m, int count)
{
+#ifdef BLIP_ASSERT
if (count > (m->offset >> time_bits))
count = m->offset >> time_bits;
+#endif
m->offset -= count * time_unit;
}
int blip_read_samples( blip_t* m, short out [], int count)
{
+#ifdef DEBUG_BLIP
+ printf("[blip_read_samples] %d\n", count); fflush(stdout);
+ //debug_me("blip_read_samples", count);
+#endif
+
#ifdef BLIP_ASSERT
assert( count >= 0 );
+#endif
- if ( count > (m->offset >> time_bits) )
- count = m->offset >> time_bits;
+ if ( count > blip_samples_avail(m) )
+ count = blip_samples_avail(m);
if ( count )
-#endif
- {
+ {
#ifdef BLIP_MONO
- buf_t const* in = SAMPLES( m );
- int sum = m->integrator;
+ buf_t const* in = m->buffer;
+ buf_t sum = m->integrator;
#else
buf_t const* in = m->buffer[0];
buf_t const* in2 = m->buffer[1];
- int sum = m->integrator[0];
- int sum2 = m->integrator[1];
+ buf_t sum = m->integrator[0];
+ buf_t sum2 = m->integrator[1];
#endif
buf_t const* end = in + count;
do
{
/* Eliminate fraction */
- int s = ARITH_SHIFT( sum, delta_bits );
+ buf_t s = ARITH_SHIFT( sum, lpf_frac );
+#ifdef DEBUG_BLIP
+ //printf("%d %d\n", sum, s); fflush(stdout);
+#endif
sum += *in++;
@@ -319,21 +334,15 @@ int blip_read_samples( blip_t* m, short out [], int count)
*out++ = s;
- /* High-pass filter */
- sum -= s << (delta_bits - bass_shift);
-
#ifndef BLIP_MONO
/* Eliminate fraction */
- s = ARITH_SHIFT( sum2, delta_bits );
+ s = ARITH_SHIFT( sum2, lpf_frac );
sum2 += *in2++;
CLAMP( s );
*out++ = s;
-
- /* High-pass filter */
- sum2 -= s << (delta_bits - bass_shift);
#endif
}
while ( in != end );
@@ -350,87 +359,170 @@ int blip_read_samples( blip_t* m, short out [], int count)
return count;
}
-int blip_mix_samples( blip_t* m1, blip_t* m2, blip_t* m3, short out [], int count)
+int blip_mix_samples_2( blip_t* m1, blip_t* m2, short out [], int count)
{
#ifdef BLIP_ASSERT
- assert( count >= 0 );
+ assert( count >= 0 );
+#endif
+
+#ifdef DEBUG_BLIP
+ printf("[blip_mix_samples] %d\n", count); fflush(stdout);
+ //debug_me("blip_mix_samples", count);
+#endif
- if ( count > (m1->offset >> time_bits) )
- count = m1->offset >> time_bits;
- if ( count > (m2->offset >> time_bits) )
- count = m2->offset >> time_bits;
- if ( count > (m3->offset >> time_bits) )
- count = m3->offset >> time_bits;
+ if ( count > blip_samples_avail(m1) )
+ count = blip_samples_avail(m1);
+ if ( count > blip_samples_avail(m2) )
+ count = blip_samples_avail(m2);
- if ( count )
+#ifdef DEBUG_BLIP
+ printf("[blip_mix_samples] %d\n", count); fflush(stdout);
+ //debug_me("blip_mix_samples", count);
#endif
- {
- buf_t const* end;
- buf_t const* in[3];
+
+ if ( count )
+ {
+ buf_t const* end;
+ buf_t const* in[2];
#ifdef BLIP_MONO
- int sum = m1->integrator;
- in[0] = SAMPLES( m1 );
- in[1] = SAMPLES( m2 );
- in[2] = SAMPLES( m3 );
+ buf_t sum = m1->integrator;
+ in[0] = m1->buffer;
+ in[1] = m2->buffer;
#else
- int sum = m1->integrator[0];
- int sum2 = m1->integrator[1];
- buf_t const* in2[3];
- in[0] = m1->buffer[0];
- in[1] = m2->buffer[0];
- in[2] = m3->buffer[0];
- in2[0] = m1->buffer[1];
- in2[1] = m2->buffer[1];
- in2[2] = m3->buffer[1];
+ buf_t sum = m1->integrator[0];
+ buf_t sum2 = m1->integrator[1];
+ buf_t const* in2[2];
+ in[0] = m1->buffer[0];
+ in[1] = m2->buffer[0];
+ in2[0] = m1->buffer[1];
+ in2[1] = m2->buffer[1];
#endif
- end = in[0] + count;
- do
- {
- /* Eliminate fraction */
- int s = ARITH_SHIFT( sum, delta_bits );
-
- sum += *in[0]++;
- sum += *in[1]++;
- sum += *in[2]++;
+ end = in[0] + count;
+ do
+ {
+ /* Eliminate fraction */
+ buf_t s = ARITH_SHIFT( sum, lpf_frac );
- CLAMP( s );
+ sum += *in[0]++;
+ sum += *in[1]++;
- *out++ = s;
+ CLAMP( s );
- /* High-pass filter */
- sum -= s << (delta_bits - bass_shift);
+ *out++ = s;
#ifndef BLIP_MONO
- /* Eliminate fraction */
- s = ARITH_SHIFT( sum2, delta_bits );
+ /* Eliminate fraction */
+ s = ARITH_SHIFT( sum2, lpf_frac );
+
+ sum2 += *in2[0]++;
+ sum2 += *in2[1]++;
+
+ CLAMP( s );
- sum2 += *in2[0]++;
- sum2 += *in2[1]++;
- sum2 += *in2[2]++;
+ *out++ = s;
+#endif
+ }
+ while ( in[0] != end );
+
+#ifdef BLIP_MONO
+ m1->integrator = sum;
+#else
+ m1->integrator[0] = sum;
+ m1->integrator[1] = sum2;
+#endif
+ remove_samples( m1, count );
+ remove_samples( m2, count );
+ }
+
+ return count;
+}
+
+int blip_mix_samples( blip_t* m1, blip_t* m2, blip_t* m3, short out [], int count)
+{
+#ifdef BLIP_ASSERT
+ assert( count >= 0 );
+#endif
- CLAMP( s );
+#ifdef DEBUG_BLIP
+ printf("[blip_mix_samples] %d\n", count); fflush(stdout);
+ //debug_me("blip_mix_samples", count);
+#endif
- *out++ = s;
+ if ( count > blip_samples_avail(m1) )
+ count = blip_samples_avail(m1);
+ if ( count > blip_samples_avail(m2) )
+ count = blip_samples_avail(m2);
+ if ( count > blip_samples_avail(m3) )
+ count = blip_samples_avail(m3);
- /* High-pass filter */
- sum2 -= s << (delta_bits - bass_shift);
+#ifdef DEBUG_BLIP
+ printf("[blip_mix_samples] %d\n", count); fflush(stdout);
+ //debug_me("blip_mix_samples", count);
#endif
- }
- while ( in[0] != end );
+ if ( count )
+ {
+ buf_t const* end;
+ buf_t const* in[3];
#ifdef BLIP_MONO
- m1->integrator = sum;
+ buf_t sum = m1->integrator;
+ in[0] = m1->buffer;
+ in[1] = m2->buffer;
+ in[2] = m3->buffer;
#else
- m1->integrator[0] = sum;
- m1->integrator[1] = sum2;
+ buf_t sum = m1->integrator[0];
+ buf_t sum2 = m1->integrator[1];
+ buf_t const* in2[3];
+ in[0] = m1->buffer[0];
+ in[1] = m2->buffer[0];
+ in[2] = m3->buffer[0];
+ in2[0] = m1->buffer[1];
+ in2[1] = m2->buffer[1];
+ in2[2] = m3->buffer[1];
+#endif
+
+ end = in[0] + count;
+ do
+ {
+ /* Eliminate fraction */
+ buf_t s = ARITH_SHIFT( sum, lpf_frac );
+
+ sum += *in[0]++;
+ sum += *in[1]++;
+ sum += *in[2]++;
+
+ CLAMP( s );
+
+ *out++ = s;
+
+#ifndef BLIP_MONO
+ /* Eliminate fraction */
+ s = ARITH_SHIFT( sum2, lpf_frac );
+
+ sum2 += *in2[0]++;
+ sum2 += *in2[1]++;
+ sum2 += *in2[2]++;
+
+ CLAMP( s );
+
+ *out++ = s;
#endif
- remove_samples( m1, count );
- remove_samples( m2, count );
- remove_samples( m3, count );
- }
+ }
+ while ( in[0] != end );
+
+#ifdef BLIP_MONO
+ m1->integrator = sum;
+#else
+ m1->integrator[0] = sum;
+ m1->integrator[1] = sum2;
+#endif
+ remove_samples( m1, count );
+ remove_samples( m2, count );
+ remove_samples( m3, count );
+ }
- return count;
+ return count;
}
/* Things that didn't help performance on x86:
@@ -439,271 +531,71 @@ int blip_mix_samples( blip_t* m1, blip_t* m2, blip_t* m3, short out [], int coun
restrict
*/
-/* Sinc_Generator( 0.9, 0.55, 4.5 ) */
-static short const bl_step [phase_count + 1] [half_width] =
-{
-{ 43, -115, 350, -488, 1136, -914, 5861,21022},
-{ 44, -118, 348, -473, 1076, -799, 5274,21001},
-{ 45, -121, 344, -454, 1011, -677, 4706,20936},
-{ 46, -122, 336, -431, 942, -549, 4156,20829},
-{ 47, -123, 327, -404, 868, -418, 3629,20679},
-{ 47, -122, 316, -375, 792, -285, 3124,20488},
-{ 47, -120, 303, -344, 714, -151, 2644,20256},
-{ 46, -117, 289, -310, 634, -17, 2188,19985},
-{ 46, -114, 273, -275, 553, 117, 1758,19675},
-{ 44, -108, 255, -237, 471, 247, 1356,19327},
-{ 43, -103, 237, -199, 390, 373, 981,18944},
-{ 42, -98, 218, -160, 310, 495, 633,18527},
-{ 40, -91, 198, -121, 231, 611, 314,18078},
-{ 38, -84, 178, -81, 153, 722, 22,17599},
-{ 36, -76, 157, -43, 80, 824, -241,17092},
-{ 34, -68, 135, -3, 8, 919, -476,16558},
-{ 32, -61, 115, 34, -60, 1006, -683,16001},
-{ 29, -52, 94, 70, -123, 1083, -862,15422},
-{ 27, -44, 73, 106, -184, 1152,-1015,14824},
-{ 25, -36, 53, 139, -239, 1211,-1142,14210},
-{ 22, -27, 34, 170, -290, 1261,-1244,13582},
-{ 20, -20, 16, 199, -335, 1301,-1322,12942},
-{ 18, -12, -3, 226, -375, 1331,-1376,12293},
-{ 15, -4, -19, 250, -410, 1351,-1408,11638},
-{ 13, 3, -35, 272, -439, 1361,-1419,10979},
-{ 11, 9, -49, 292, -464, 1362,-1410,10319},
-{ 9, 16, -63, 309, -483, 1354,-1383, 9660},
-{ 7, 22, -75, 322, -496, 1337,-1339, 9005},
-{ 6, 26, -85, 333, -504, 1312,-1280, 8355},
-{ 4, 31, -94, 341, -507, 1278,-1205, 7713},
-{ 3, 35, -102, 347, -506, 1238,-1119, 7082},
-{ 1, 40, -110, 350, -499, 1190,-1021, 6464},
-{ 0, 43, -115, 350, -488, 1136, -914, 5861}
-};
-
-/* Shifting by pre_shift allows calculation using unsigned int rather than
-possibly-wider fixed_t. On 32-bit platforms, this is likely more efficient.
-And by having pre_shift 32, a 32-bit platform can easily do the shift by
-simply ignoring the low half. */
-
#ifndef BLIP_MONO
void blip_add_delta( blip_t* m, unsigned time, int delta_l, int delta_r )
{
- if (delta_l | delta_r)
- {
- unsigned fixed = (unsigned) ((time * m->factor + m->offset) >> pre_shift);
- int phase = fixed >> phase_shift & (phase_count - 1);
- short const* in = bl_step [phase];
- short const* rev = bl_step [phase_count - phase];
- int interp = fixed >> (phase_shift - delta_bits) & (delta_unit - 1);
- int pos = fixed >> frac_bits;
+ if (!(delta_l | delta_r)) return;
+
+ //debug_me("blip_add_delta", time);
+
+ fixed_t fixed = (fixed_t) (time * m->factor + m->offset);
+ int pos = fixed >> time_bits;
+
+#ifdef DEBUG_BLIP
+ //printf("[blip_add_delta] %lld %d %d %d %d\n", fixed, pos, time, delta_l, delta_r); fflush(stdout);
+#endif
#ifdef BLIP_INVERT
- buf_t* out_l = m->buffer[1] + pos;
- buf_t* out_r = m->buffer[0] + pos;
+ buf_t* out_l = m->buffer[1] + pos;
+ buf_t* out_r = m->buffer[0] + pos;
#else
- buf_t* out_l = m->buffer[0] + pos;
- buf_t* out_r = m->buffer[1] + pos;
+ buf_t* out_l = m->buffer[0] + pos;
+ buf_t* out_r = m->buffer[1] + pos;
#endif
- int delta;
-
#ifdef BLIP_ASSERT
- /* Fails if buffer size was exceeded */
- assert( pos <= m->size + end_frame_extra );
-#endif
-
- if (delta_l == delta_r)
- {
- buf_t out;
- delta = (delta_l * interp) >> delta_bits;
- delta_l -= delta;
- out = in[0]*delta_l + in[half_width+0]*delta;
- out_l[0] += out;
- out_r[0] += out;
- out = in[1]*delta_l + in[half_width+1]*delta;
- out_l[1] += out;
- out_r[1] += out;
- out = in[2]*delta_l + in[half_width+2]*delta;
- out_l[2] += out;
- out_r[2] += out;
- out = in[3]*delta_l + in[half_width+3]*delta;
- out_l[3] += out;
- out_r[3] += out;
- out = in[4]*delta_l + in[half_width+4]*delta;
- out_l[4] += out;
- out_r[4] += out;
- out = in[5]*delta_l + in[half_width+5]*delta;
- out_l[5] += out;
- out_r[5] += out;
- out = in[6]*delta_l + in[half_width+6]*delta;
- out_l[6] += out;
- out_r[6] += out;
- out = in[7]*delta_l + in[half_width+7]*delta;
- out_l[7] += out;
- out_r[7] += out;
- out = rev[7]*delta_l + rev[7-half_width]*delta;
- out_l[8] += out;
- out_r[8] += out;
- out = rev[6]*delta_l + rev[6-half_width]*delta;
- out_l[9] += out;
- out_r[9] += out;
- out = rev[5]*delta_l + rev[5-half_width]*delta;
- out_l[10] += out;
- out_r[10] += out;
- out = rev[4]*delta_l + rev[4-half_width]*delta;
- out_l[11] += out;
- out_r[11] += out;
- out = rev[3]*delta_l + rev[3-half_width]*delta;
- out_l[12] += out;
- out_r[12] += out;
- out = rev[2]*delta_l + rev[2-half_width]*delta;
- out_l[13] += out;
- out_r[13] += out;
- out = rev[1]*delta_l + rev[1-half_width]*delta;
- out_l[14] += out;
- out_r[14] += out;
- out = rev[0]*delta_l + rev[0-half_width]*delta;
- out_l[15] += out;
- out_r[15] += out;
- }
- else
- {
- delta = (delta_l * interp) >> delta_bits;
- delta_l -= delta;
- out_l [0] += in[0]*delta_l + in[half_width+0]*delta;
- out_l [1] += in[1]*delta_l + in[half_width+1]*delta;
- out_l [2] += in[2]*delta_l + in[half_width+2]*delta;
- out_l [3] += in[3]*delta_l + in[half_width+3]*delta;
- out_l [4] += in[4]*delta_l + in[half_width+4]*delta;
- out_l [5] += in[5]*delta_l + in[half_width+5]*delta;
- out_l [6] += in[6]*delta_l + in[half_width+6]*delta;
- out_l [7] += in[7]*delta_l + in[half_width+7]*delta;
- out_l [8] += rev[7]*delta_l + rev[7-half_width]*delta;
- out_l [9] += rev[6]*delta_l + rev[6-half_width]*delta;
- out_l [10] += rev[5]*delta_l + rev[5-half_width]*delta;
- out_l [11] += rev[4]*delta_l + rev[4-half_width]*delta;
- out_l [12] += rev[3]*delta_l + rev[3-half_width]*delta;
- out_l [13] += rev[2]*delta_l + rev[2-half_width]*delta;
- out_l [14] += rev[1]*delta_l + rev[1-half_width]*delta;
- out_l [15] += rev[0]*delta_l + rev[0-half_width]*delta;
-
- delta = (delta_r * interp) >> delta_bits;
- delta_r -= delta;
- out_r [0] += in[0]*delta_r + in[half_width+0]*delta;
- out_r [1] += in[1]*delta_r + in[half_width+1]*delta;
- out_r [2] += in[2]*delta_r + in[half_width+2]*delta;
- out_r [3] += in[3]*delta_r + in[half_width+3]*delta;
- out_r [4] += in[4]*delta_r + in[half_width+4]*delta;
- out_r [5] += in[5]*delta_r + in[half_width+5]*delta;
- out_r [6] += in[6]*delta_r + in[half_width+6]*delta;
- out_r [7] += in[7]*delta_r + in[half_width+7]*delta;
- out_r [8] += rev[7]*delta_r + rev[7-half_width]*delta;
- out_r [9] += rev[6]*delta_r + rev[6-half_width]*delta;
- out_r [10] += rev[5]*delta_r + rev[5-half_width]*delta;
- out_r [11] += rev[4]*delta_r + rev[4-half_width]*delta;
- out_r [12] += rev[3]*delta_r + rev[3-half_width]*delta;
- out_r [13] += rev[2]*delta_r + rev[2-half_width]*delta;
- out_r [14] += rev[1]*delta_r + rev[1-half_width]*delta;
- out_r [15] += rev[0]*delta_r + rev[0-half_width]*delta;
- }
- }
+ /* Fails if buffer size was exceeded */
+ assert( pos <= m->size );
+#endif
+
+ blip_lpf_stereo(m->sample_rate, out_l, out_r, delta_l, delta_r);
}
+
void blip_add_delta_fast( blip_t* m, unsigned time, int delta_l, int delta_r )
{
- if (delta_l | delta_r)
- {
- unsigned fixed = (unsigned) ((time * m->factor + m->offset) >> pre_shift);
- int interp = fixed >> (frac_bits - delta_bits) & (delta_unit - 1);
- int pos = fixed >> frac_bits;
-
-#ifdef STEREO_INVERT
- buf_t* out_l = m->buffer[1] + pos;
- buf_t* out_r = m->buffer[0] + pos;
-#else
- buf_t* out_l = m->buffer[0] + pos;
- buf_t* out_r = m->buffer[1] + pos;
-#endif
-
- int delta = delta_l * interp;
-
-#ifdef BLIP_ASSERT
- /* Fails if buffer size was exceeded */
- assert( pos <= m->size + end_frame_extra );
-#endif
-
- if (delta_l == delta_r)
- {
- delta_l = delta_l * delta_unit - delta;
- out_l[7] += delta_l;
- out_l[8] += delta;
- out_r[7] += delta_l;
- out_r[8] += delta;
- }
- else
- {
- out_l[7] += delta_l * delta_unit - delta;
- out_l[8] += delta;
- delta = delta_r * interp;
- out_r[7] += delta_r * delta_unit - delta;
- out_r[8] += delta;
- }
- }
+ blip_add_delta(m, time, delta_l, delta_r);
}
#else
void blip_add_delta( blip_t* m, unsigned time, int delta )
{
- unsigned fixed = (unsigned) ((time * m->factor + m->offset) >> pre_shift);
- buf_t* out = SAMPLES( m ) + (fixed >> frac_bits);
-
- int phase = fixed >> phase_shift & (phase_count - 1);
- short const* in = bl_step [phase];
- short const* rev = bl_step [phase_count - phase];
-
- int interp = fixed >> (phase_shift - delta_bits) & (delta_unit - 1);
- int delta2 = (delta * interp) >> delta_bits;
- delta -= delta2;
-
+ if (!delta) return;
+
+ //debug_me("blip_add_delta", time);
+
+ fixed_t fixed = (fixed_t) (time * m->factor + m->offset);
+ int pos = fixed >> time_bits;
+
+ buf_t* out = m->buffer + pos;
+
+#ifdef DEBUG_BLIP
+ printf("[blip_add_delta] %lld %d %d %d\n", fixed, pos, time, delta); fflush(stdout);
+#endif
+
#ifdef BLIP_ASSERT
/* Fails if buffer size was exceeded */
- assert( out <= &SAMPLES( m ) [m->size + end_frame_extra] );
+ assert( pos <= m->size );
#endif
- out [0] += in[0]*delta + in[half_width+0]*delta2;
- out [1] += in[1]*delta + in[half_width+1]*delta2;
- out [2] += in[2]*delta + in[half_width+2]*delta2;
- out [3] += in[3]*delta + in[half_width+3]*delta2;
- out [4] += in[4]*delta + in[half_width+4]*delta2;
- out [5] += in[5]*delta + in[half_width+5]*delta2;
- out [6] += in[6]*delta + in[half_width+6]*delta2;
- out [7] += in[7]*delta + in[half_width+7]*delta2;
-
- in = rev;
- out [ 8] += in[7]*delta + in[7-half_width]*delta2;
- out [ 9] += in[6]*delta + in[6-half_width]*delta2;
- out [10] += in[5]*delta + in[5-half_width]*delta2;
- out [11] += in[4]*delta + in[4-half_width]*delta2;
- out [12] += in[3]*delta + in[3-half_width]*delta2;
- out [13] += in[2]*delta + in[2-half_width]*delta2;
- out [14] += in[1]*delta + in[1-half_width]*delta2;
- out [15] += in[0]*delta + in[0-half_width]*delta2;
+ blip_lpf_mono(m->sample_rate, out, delta);
}
void blip_add_delta_fast( blip_t* m, unsigned time, int delta )
{
- unsigned fixed = (unsigned) ((time * m->factor + m->offset) >> pre_shift);
- buf_t* out = SAMPLES( m ) + (fixed >> frac_bits);
-
- int interp = fixed >> (frac_bits - delta_bits) & (delta_unit - 1);
- int delta2 = delta * interp;
-
-#ifdef BLIP_ASSERT
- /* Fails if buffer size was exceeded */
- assert( out <= &SAMPLES( m ) [m->size + end_frame_extra] );
-#endif
-
- out [7] += delta * delta_unit - delta2;
- out [8] += delta2;
+ blip_add_delta(m, time, delta);
}
#endif
@@ -711,7 +603,7 @@ void blip_save_buffer_state(const blip_t *buf, blip_buffer_state_t *state)
{
#ifdef BLIP_MONO
state->integrator = buf->integrator;
- if (buf->buffer && buf->size >= BLIPSTATE_BUFFER_SIZE)
+ if (buf->buffer && buf->size >= BLIP_BUFFER_STATE_BUFFER_SIZE)
{
memcpy(state->buffer, buf->buffer, sizeof(state->buffer));
}
@@ -732,10 +624,10 @@ void blip_save_buffer_state(const blip_t *buf, blip_buffer_state_t *state)
void blip_load_buffer_state(blip_t *buf, const blip_buffer_state_t *state)
{
#ifdef BLIP_MONO
- state->integrator = buf->integrator;
- if (buf->buffer && buf->size >= BLIPSTATE_BUFFER_SIZE)
+ buf->integrator = state->integrator;
+ if (buf->buffer && buf->size >= BLIP_BUFFER_STATE_BUFFER_SIZE)
{
- memcpy(state->buffer, buf->buffer, sizeof(state->buffer));
+ memcpy(buf->buffer, state->buffer, sizeof(state->buffer));
}
#else
int c;
diff --git a/core/sound/blip_buf.h b/core/sound/blip_buf.h
index 4383563f3..03032feb5 100644
--- a/core/sound/blip_buf.h
+++ b/core/sound/blip_buf.h
@@ -10,7 +10,23 @@
/** First parameter of most functions is blip_t*, or const blip_t* if nothing
is changed. */
-typedef struct blip_t blip_t;
+typedef unsigned long long fixed_t;
+typedef signed int buf_t;
+typedef struct blip_t
+{
+ fixed_t factor;
+ fixed_t offset;
+ int size;
+ int clock_rate;
+ int sample_rate;
+#ifdef BLIP_MONO
+ buf_t integrator;
+ buf_t* buffer;
+#else
+ buf_t integrator[2];
+ buf_t* buffer[2];
+#endif
+} blip_t;
typedef struct blip_buffer_state_t blip_buffer_state_t;
/** Creates new buffer that can hold at most sample_count samples. Sets rates
@@ -24,7 +40,7 @@ void blip_set_rates( blip_t*, double clock_rate, double sample_rate );
enum { /** Maximum clock_rate/sample_rate ratio. For a given sample_rate,
clock_rate must not be greater than sample_rate*blip_max_ratio. */
-blip_max_ratio = 1 << 20 };
+blip_max_ratio = 1 << 30 };
/** Clears entire buffer. Afterwards, blip_samples_avail() == 0. */
void blip_clear( blip_t* );
@@ -52,7 +68,7 @@ samples available. */
int blip_clocks_needed( const blip_t*, int sample_count );
enum { /** Maximum number of samples that can be generated from one time frame. */
-blip_max_frame = 4000 };
+blip_max_frame = 768000 / 50 };
/** Makes input clocks before clock_duration available for reading as output
samples. Also begins new time frame at clock_duration, so that clock time 0 in
@@ -75,6 +91,7 @@ int blip_read_samples( blip_t*, short out [], int count);
/* Same as above function except sample is mixed from three blip buffers source */
int blip_mix_samples( blip_t* m1, blip_t* m2, blip_t* m3, short out [], int count);
+int blip_mix_samples_2( blip_t* m1, blip_t* m2, short out [], int count);
/** Frees buffer. No effect if NULL is passed. */
void blip_delete( blip_t* );
diff --git a/core/sound/blip_lpf.h b/core/sound/blip_lpf.h
new file mode 100644
index 000000000..89cb5654b
--- /dev/null
+++ b/core/sound/blip_lpf.h
@@ -0,0 +1,313 @@
+/* https://fiiir.com/ */
+
+
+/*
+note: use higher sampling rates for better de-aliasing [384K, 768K]
+ frontend can do nearest neighbor integer downsampling [48K target w/ 24K cutoff]
+*/
+
+
+/* 1.16.15 */
+enum { lpf_frac = 15 };
+enum { lpf_scale = 32768 };
+
+
+static int blip_lpf_cutoff = 0; /* set to nyquist (1/2) of final output sampling rate - 0 = none */
+
+
+#define LPF_TAPS(x) (buf_t) ((double) (x) * (double) (1UL << lpf_frac) * (double) lpf_scale)
+
+
+#include "blip_lpf_48K.h"
+#include "blip_lpf_96K.h"
+#include "blip_lpf_192K.h"
+#include "blip_lpf_384K.h"
+#include "blip_lpf_768K.h"
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void set_blip_lowpass(int rate)
+{
+ blip_lpf_cutoff = rate;
+}
+
+#ifdef __cplusplus
+}
+#endif
+
+
+static int blip_lpf_taps(int sample_rate)
+{
+ switch( sample_rate ) {
+ case 48000: return blip_lpf_48K_taps;
+ case 96000: return blip_lpf_96K_taps;
+ case 192000: return blip_lpf_192K_taps;
+ case 384000: return blip_lpf_384K_taps;
+ case 768000: return blip_lpf_768K_taps;
+ };
+
+ return 0;
+}
+
+
+static void blip_lpf_stereo(int sample_rate, buf_t* out_l, buf_t* out_r, int delta_l, int delta_r)
+{
+ /* 31-bit * 15-bit = 46-bit >> 15 = 31-bit */
+
+ if( blip_lpf_cutoff == 24000 ) {
+ switch( sample_rate ) {
+ case 48000:
+ for( int lcv = 0; lcv < blip_lpf_48K_taps; lcv++ ) {
+ out_l [lcv] += ((signed long long)blip_lpf_48K_24K[lcv] * delta_l) / lpf_scale;
+ out_r [lcv] += ((signed long long)blip_lpf_48K_24K[lcv] * delta_r) / lpf_scale;
+ }
+ return;
+
+ case 96000:
+ for( int lcv = 0; lcv < blip_lpf_96K_taps; lcv++ ) {
+ out_l [lcv] += ((signed long long)blip_lpf_96K_24K[lcv] * delta_l) / lpf_scale;
+ out_r [lcv] += ((signed long long)blip_lpf_96K_24K[lcv] * delta_r) / lpf_scale;
+ }
+ return;
+
+ case 192000:
+ for( int lcv = 0; lcv < blip_lpf_192K_taps; lcv++ ) {
+ out_l [lcv] += ((signed long long)blip_lpf_192K_24K[lcv] * delta_l) / lpf_scale;
+ out_r [lcv] += ((signed long long)blip_lpf_192K_24K[lcv] * delta_r) / lpf_scale;
+ }
+ return;
+
+ case 384000:
+ for( int lcv = 0; lcv < blip_lpf_384K_taps; lcv++ ) {
+ out_l [lcv] += ((signed long long)blip_lpf_384K_24K[lcv] * delta_l) / lpf_scale;
+ out_r [lcv] += ((signed long long)blip_lpf_384K_24K[lcv] * delta_r) / lpf_scale;
+ }
+ return;
+
+ case 768000:
+ for( int lcv = 0; lcv < blip_lpf_768K_taps; lcv++ ) {
+ out_l [lcv] += ((signed long long)blip_lpf_768K_24K[lcv] * delta_l) / lpf_scale;
+ out_r [lcv] += ((signed long long)blip_lpf_768K_24K[lcv] * delta_r) / lpf_scale;
+ }
+ return;
+ }
+ }
+
+
+ if( blip_lpf_cutoff == 48000 ) {
+ switch( sample_rate ) {
+ case 96000:
+ for( int lcv = 0; lcv < blip_lpf_96K_taps; lcv++ ) {
+ out_l [lcv] += ((signed long long)blip_lpf_96K_48K[lcv] * delta_l) / lpf_scale;
+ out_r [lcv] += ((signed long long)blip_lpf_96K_48K[lcv] * delta_r) / lpf_scale;
+ }
+ return;
+
+ case 192000:
+ for( int lcv = 0; lcv < blip_lpf_192K_taps; lcv++ ) {
+ out_l [lcv] += ((signed long long)blip_lpf_192K_48K[lcv] * delta_l) / lpf_scale;
+ out_r [lcv] += ((signed long long)blip_lpf_192K_48K[lcv] * delta_r) / lpf_scale;
+ }
+ return;
+
+ case 384000:
+ for( int lcv = 0; lcv < blip_lpf_384K_taps; lcv++ ) {
+ out_l [lcv] += ((signed long long)blip_lpf_384K_48K[lcv] * delta_l) / lpf_scale;
+ out_r [lcv] += ((signed long long)blip_lpf_384K_48K[lcv] * delta_r) / lpf_scale;
+ }
+ return;
+
+ case 768000:
+ for( int lcv = 0; lcv < blip_lpf_768K_taps; lcv++ ) {
+ out_l [lcv] += ((signed long long)blip_lpf_768K_48K[lcv] * delta_l) / lpf_scale;
+ out_r [lcv] += ((signed long long)blip_lpf_768K_48K[lcv] * delta_r) / lpf_scale;
+ }
+ return;
+ }
+ }
+
+
+ if( blip_lpf_cutoff == 96000 ) {
+ switch( sample_rate ) {
+ case 192000:
+ for( int lcv = 0; lcv < blip_lpf_192K_taps; lcv++ ) {
+ out_l [lcv] += ((signed long long)blip_lpf_192K_96K[lcv] * delta_l) / lpf_scale;
+ out_r [lcv] += ((signed long long)blip_lpf_192K_96K[lcv] * delta_r) / lpf_scale;
+ }
+ return;
+
+ case 384000:
+ for( int lcv = 0; lcv < blip_lpf_384K_taps; lcv++ ) {
+ out_l [lcv] += ((signed long long)blip_lpf_384K_96K[lcv] * delta_l) / lpf_scale;
+ out_r [lcv] += ((signed long long)blip_lpf_384K_96K[lcv] * delta_r) / lpf_scale;
+ }
+ return;
+
+ case 768000:
+ for( int lcv = 0; lcv < blip_lpf_768K_taps; lcv++ ) {
+ out_l [lcv] += ((signed long long)blip_lpf_768K_96K[lcv] * delta_l) / lpf_scale;
+ out_r [lcv] += ((signed long long)blip_lpf_768K_96K[lcv] * delta_r) / lpf_scale;
+ }
+ return;
+ }
+ }
+
+
+ if( blip_lpf_cutoff == 192000 ) {
+ switch( sample_rate ) {
+ case 384000:
+ for( int lcv = 0; lcv < blip_lpf_384K_taps; lcv++ ) {
+ out_l [lcv] += ((signed long long)blip_lpf_384K_192K[lcv] * delta_l) / lpf_scale;
+ out_r [lcv] += ((signed long long)blip_lpf_384K_192K[lcv] * delta_r) / lpf_scale;
+ }
+ return;
+
+ case 768000:
+ for( int lcv = 0; lcv < blip_lpf_768K_taps; lcv++ ) {
+ out_l [lcv] += ((signed long long)blip_lpf_768K_192K[lcv] * delta_l) / lpf_scale;
+ out_r [lcv] += ((signed long long)blip_lpf_768K_192K[lcv] * delta_r) / lpf_scale;
+ }
+ return;
+ }
+ }
+
+
+ if( blip_lpf_cutoff == 384000 ) {
+ switch( sample_rate ) {
+ case 768000:
+ for( int lcv = 0; lcv < blip_lpf_768K_taps; lcv++ ) {
+ out_l [lcv] += ((signed long long)blip_lpf_768K_384K[lcv] * delta_l) / lpf_scale;
+ out_r [lcv] += ((signed long long)blip_lpf_768K_384K[lcv] * delta_r) / lpf_scale;
+ }
+ return;
+ }
+ }
+
+
+ out_l [0] += (buf_t) delta_l * (1UL << lpf_frac);
+ out_r [0] += (buf_t) delta_r * (1UL << lpf_frac);
+}
+
+
+static void blip_lpf_mono(int sample_rate, buf_t* out, int delta)
+{
+ if( blip_lpf_cutoff == 24000 ) {
+ switch( sample_rate ) {
+ case 48000:
+ for( int lcv = 0; lcv < blip_lpf_48K_taps; lcv++ ) {
+ out [lcv] += ((signed long long)blip_lpf_48K_24K[lcv] * delta) / lpf_scale;
+ }
+ return;
+
+ case 96000:
+ for( int lcv = 0; lcv < blip_lpf_96K_taps; lcv++ ) {
+ out [lcv] += ((signed long long)blip_lpf_96K_24K[lcv] * delta) / lpf_scale;
+ }
+ return;
+
+ case 192000:
+ for( int lcv = 0; lcv < blip_lpf_192K_taps; lcv++ ) {
+ out [lcv] += ((signed long long)blip_lpf_192K_24K[lcv] * delta) / lpf_scale;
+ }
+ return;
+
+ case 384000:
+ for( int lcv = 0; lcv < blip_lpf_384K_taps; lcv++ ) {
+ out [lcv] += ((signed long long)blip_lpf_384K_24K[lcv] * delta) / lpf_scale;
+ }
+ return;
+
+ case 768000:
+ for( int lcv = 0; lcv < blip_lpf_768K_taps; lcv++ ) {
+ out [lcv] += ((signed long long)blip_lpf_768K_24K[lcv] * delta) / lpf_scale;
+ }
+ return;
+ }
+ }
+
+
+ if( blip_lpf_cutoff == 48000 ) {
+ switch( sample_rate ) {
+ case 96000:
+ for( int lcv = 0; lcv < blip_lpf_96K_taps; lcv++ ) {
+ out [lcv] += ((signed long long)blip_lpf_96K_48K[lcv] * delta) / lpf_scale;
+ }
+ return;
+
+ case 192000:
+ for( int lcv = 0; lcv < blip_lpf_192K_taps; lcv++ ) {
+ out [lcv] += ((signed long long)blip_lpf_192K_48K[lcv] * delta) / lpf_scale;
+ }
+ return;
+
+ case 384000:
+ for( int lcv = 0; lcv < blip_lpf_384K_taps; lcv++ ) {
+ out [lcv] += ((signed long long)blip_lpf_384K_48K[lcv] * delta) / lpf_scale;
+ }
+ return;
+
+ case 768000:
+ for( int lcv = 0; lcv < blip_lpf_768K_taps; lcv++ ) {
+ out [lcv] += ((signed long long)blip_lpf_768K_48K[lcv] * delta) / lpf_scale;
+ }
+ return;
+ }
+ }
+
+
+ if( blip_lpf_cutoff == 96000 ) {
+ switch( sample_rate ) {
+ case 192000:
+ for( int lcv = 0; lcv < blip_lpf_192K_taps; lcv++ ) {
+ out [lcv] += ((signed long long)blip_lpf_192K_96K[lcv] * delta) / lpf_scale;
+ }
+ return;
+
+ case 384000:
+ for( int lcv = 0; lcv < blip_lpf_384K_taps; lcv++ ) {
+ out [lcv] += ((signed long long)blip_lpf_384K_96K[lcv] * delta) / lpf_scale;
+ }
+ return;
+
+ case 768000:
+ for( int lcv = 0; lcv < blip_lpf_768K_taps; lcv++ ) {
+ out [lcv] += ((signed long long)blip_lpf_768K_96K[lcv] * delta) / lpf_scale;
+ }
+ return;
+ }
+ }
+
+
+ if( blip_lpf_cutoff == 192000 ) {
+ switch( sample_rate ) {
+ case 384000:
+ for( int lcv = 0; lcv < blip_lpf_384K_taps; lcv++ ) {
+ out [lcv] += ((signed long long)blip_lpf_384K_192K[lcv] * delta) / lpf_scale;
+ }
+ return;
+
+ case 768000:
+ for( int lcv = 0; lcv < blip_lpf_768K_taps; lcv++ ) {
+ out [lcv] += ((signed long long)blip_lpf_768K_192K[lcv] * delta) / lpf_scale;
+ }
+ return;
+ }
+ }
+
+
+ if( blip_lpf_cutoff == 384000 ) {
+ switch( sample_rate ) {
+ case 768000:
+ for( int lcv = 0; lcv < blip_lpf_768K_taps; lcv++ ) {
+ out [lcv] += ((signed long long)blip_lpf_768K_384K[lcv] * delta) / lpf_scale;
+ }
+ return;
+ }
+ }
+
+
+ out [0] += (buf_t) delta * (1UL << lpf_frac);
+}
diff --git a/core/sound/blip_lpf_192K.h b/core/sound/blip_lpf_192K.h
new file mode 100644
index 000000000..1b923ff45
--- /dev/null
+++ b/core/sound/blip_lpf_192K.h
@@ -0,0 +1,7 @@
+/* 192K sampling, 2K cutoff, 3K transition */
+enum { blip_lpf_192K_taps = 295 };
+
+
+#include "blip_lpf_192K_24K.h"
+#include "blip_lpf_192K_48K.h"
+#include "blip_lpf_192K_96K.h"
diff --git a/core/sound/blip_lpf_192K_24K.h b/core/sound/blip_lpf_192K_24K.h
new file mode 100644
index 000000000..73744dcc7
--- /dev/null
+++ b/core/sound/blip_lpf_192K_24K.h
@@ -0,0 +1,297 @@
+static buf_t const blip_lpf_192K_24K[blip_lpf_192K_taps] = {
+LPF_TAPS(0.000000000000000000),
+LPF_TAPS(-0.000000088867880174),
+LPF_TAPS(-0.000000238149160989),
+LPF_TAPS(0.000000000000000000),
+LPF_TAPS(0.000000967826707627),
+LPF_TAPS(0.000002293299391840),
+LPF_TAPS(0.000002794151684877),
+LPF_TAPS(0.000001194819042577),
+LPF_TAPS(-0.000002692542847324),
+LPF_TAPS(-0.000007189532013224),
+LPF_TAPS(-0.000009191703997209),
+LPF_TAPS(-0.000005935583389038),
+LPF_TAPS(0.000002786671528697),
+LPF_TAPS(0.000013451394329611),
+LPF_TAPS(0.000019852237874508),
+LPF_TAPS(0.000016344170879499),
+LPF_TAPS(0.000001741335735348),
+LPF_TAPS(-0.000018529842079338),
+LPF_TAPS(-0.000033904623197724),
+LPF_TAPS(-0.000033800086864146),
+LPF_TAPS(-0.000014089712842714),
+LPF_TAPS(0.000018750083838216),
+LPF_TAPS(0.000048910060055138),
+LPF_TAPS(0.000058402235278429),
+LPF_TAPS(0.000037111313024223),
+LPF_TAPS(-0.000009601521922410),
+LPF_TAPS(-0.000060722607418047),
+LPF_TAPS(-0.000088433378276437),
+LPF_TAPS(-0.000072615683850022),
+LPF_TAPS(-0.000013736274648311),
+LPF_TAPS(0.000063565979232706),
+LPF_TAPS(0.000119910156306053),
+LPF_TAPS(0.000120569818801960),
+LPF_TAPS(0.000055611400702006),
+LPF_TAPS(-0.000050408904084663),
+LPF_TAPS(-0.000146329682785647),
+LPF_TAPS(-0.000178286254100790),
+LPF_TAPS(-0.000118882157530363),
+LPF_TAPS(0.000013702800097689),
+LPF_TAPS(0.000158738425916860),
+LPF_TAPS(0.000239731180927390),
+LPF_TAPS(0.000203740441664265),
+LPF_TAPS(0.000053496004603635),
+LPF_TAPS(-0.000146241851067930),
+LPF_TAPS(-0.000295118409098363),
+LPF_TAPS(-0.000306513263908866),
+LPF_TAPS(-0.000156059832555650),
+LPF_TAPS(0.000097038599796698),
+LPF_TAPS(0.000330966493993223),
+LPF_TAPS(0.000418635208448877),
+LPF_TAPS(0.000295095855792692),
+LPF_TAPS(-0.000000000000000005),
+LPF_TAPS(-0.000330777418181525),
+LPF_TAPS(-0.000526021540293030),
+LPF_TAPS(-0.000466220696521015),
+LPF_TAPS(-0.000153270702730086),
+LPF_TAPS(0.000276441517410037),
+LPF_TAPS(0.000609077894058258),
+LPF_TAPS(0.000658065918351398),
+LPF_TAPS(0.000366064286993324),
+LPF_TAPS(-0.000150386402110856),
+LPF_TAPS(-0.000643549484484288),
+LPF_TAPS(-0.000851316283811722),
+LPF_TAPS(-0.000634138612347655),
+LPF_TAPS(-0.000061624390633655),
+LPF_TAPS(0.000602337744180382),
+LPF_TAPS(0.001018581734917155),
+LPF_TAPS(0.000943577962191536),
+LPF_TAPS(0.000367260061047211),
+LPF_TAPS(-0.000458299554997024),
+LPF_TAPS(-0.001125354793155152),
+LPF_TAPS(-0.001269318042621104),
+LPF_TAPS(-0.000764290283324042),
+LPF_TAPS(0.000187905638196626),
+LPF_TAPS(0.001132206574500079),
+LPF_TAPS(0.001574705433974788),
+LPF_TAPS(0.001237569662484544),
+LPF_TAPS(0.000224511362529855),
+LPF_TAPS(-0.000998234344597220),
+LPF_TAPS(-0.001812391534151866),
+LPF_TAPS(-0.001756794170294545),
+LPF_TAPS(-0.000782319104071645),
+LPF_TAPS(0.000685607318862552),
+LPF_TAPS(0.001926735087455666),
+LPF_TAPS(0.002275459232597814),
+LPF_TAPS(0.001472448638347935),
+LPF_TAPS(-0.000164888079687475),
+LPF_TAPS(-0.001857714543905295),
+LPF_TAPS(-0.002731352650618140),
+LPF_TAPS(-0.002262076797697579),
+LPF_TAPS(-0.000579338030693501),
+LPF_TAPS(0.001546150733363754),
+LPF_TAPS(0.003048749090619086),
+LPF_TAPS(0.003096593192501319),
+LPF_TAPS(0.001543084834901600),
+LPF_TAPS(-0.000939837302041592),
+LPF_TAPS(-0.003142245599040471),
+LPF_TAPS(-0.003899170603326770),
+LPF_TAPS(-0.002698408098877719),
+LPF_TAPS(0.000000000000000021),
+LPF_TAPS(0.002921903641535428),
+LPF_TAPS(0.004572008955895946),
+LPF_TAPS(0.003990141163815959),
+LPF_TAPS(0.001292615642227111),
+LPF_TAPS(-0.002299054442402459),
+LPF_TAPS(-0.004998959763464508),
+LPF_TAPS(-0.005334161275829722),
+LPF_TAPS(-0.002932772495491725),
+LPF_TAPS(0.001191775941151652),
+LPF_TAPS(0.005048722557538835),
+LPF_TAPS(0.006617006934658838),
+LPF_TAPS(0.004887582240540398),
+LPF_TAPS(0.000471391820742604),
+LPF_TAPS(-0.004577023938925431),
+LPF_TAPS(-0.007695957214193918),
+LPF_TAPS(-0.007095712754339889),
+LPF_TAPS(-0.002751638823885237),
+LPF_TAPS(0.003424817617303759),
+LPF_TAPS(0.008397388880842557),
+LPF_TAPS(0.009469292790600799),
+LPF_TAPS(0.005707632271462191),
+LPF_TAPS(-0.001406641214315407),
+LPF_TAPS(-0.008508488631453783),
+LPF_TAPS(-0.011898560218317223),
+LPF_TAPS(-0.009418303287613599),
+LPF_TAPS(-0.001724055500589014),
+LPF_TAPS(0.007750487581196339),
+LPF_TAPS(0.014258989316922464),
+LPF_TAPS(0.014039471720665702),
+LPF_TAPS(0.006367554689719202),
+LPF_TAPS(-0.005700613585608971),
+LPF_TAPS(-0.016420333624407701),
+LPF_TAPS(-0.019952098086170714),
+LPF_TAPS(-0.013341186324730379),
+LPF_TAPS(0.001551440842540053),
+LPF_TAPS(0.018256772503679127),
+LPF_TAPS(0.028227518365292050),
+LPF_TAPS(0.024784200946553939),
+LPF_TAPS(0.006795943777113442),
+LPF_TAPS(-0.019657185861938053),
+LPF_TAPS(-0.042666070096388911),
+LPF_TAPS(-0.048683868505890286),
+LPF_TAPS(-0.028025412280222081),
+LPF_TAPS(0.020534526388022348),
+LPF_TAPS(0.088073047119200415),
+LPF_TAPS(0.157675115394035670),
+LPF_TAPS(0.209836886946609902),
+LPF_TAPS(0.229166551041813965),
+LPF_TAPS(0.209836886946609930),
+LPF_TAPS(0.157675115394035670),
+LPF_TAPS(0.088073047119200415),
+LPF_TAPS(0.020534526388022348),
+LPF_TAPS(-0.028025412280222081),
+LPF_TAPS(-0.048683868505890293),
+LPF_TAPS(-0.042666070096388911),
+LPF_TAPS(-0.019657185861938053),
+LPF_TAPS(0.006795943777113443),
+LPF_TAPS(0.024784200946553946),
+LPF_TAPS(0.028227518365292050),
+LPF_TAPS(0.018256772503679127),
+LPF_TAPS(0.001551440842540053),
+LPF_TAPS(-0.013341186324730381),
+LPF_TAPS(-0.019952098086170714),
+LPF_TAPS(-0.016420333624407701),
+LPF_TAPS(-0.005700613585608974),
+LPF_TAPS(0.006367554689719204),
+LPF_TAPS(0.014039471720665702),
+LPF_TAPS(0.014258989316922464),
+LPF_TAPS(0.007750487581196341),
+LPF_TAPS(-0.001724055500589014),
+LPF_TAPS(-0.009418303287613601),
+LPF_TAPS(-0.011898560218317223),
+LPF_TAPS(-0.008508488631453785),
+LPF_TAPS(-0.001406641214315407),
+LPF_TAPS(0.005707632271462193),
+LPF_TAPS(0.009469292790600803),
+LPF_TAPS(0.008397388880842563),
+LPF_TAPS(0.003424817617303759),
+LPF_TAPS(-0.002751638823885237),
+LPF_TAPS(-0.007095712754339889),
+LPF_TAPS(-0.007695957214193918),
+LPF_TAPS(-0.004577023938925433),
+LPF_TAPS(0.000471391820742604),
+LPF_TAPS(0.004887582240540398),
+LPF_TAPS(0.006617006934658838),
+LPF_TAPS(0.005048722557538837),
+LPF_TAPS(0.001191775941151653),
+LPF_TAPS(-0.002932772495491724),
+LPF_TAPS(-0.005334161275829720),
+LPF_TAPS(-0.004998959763464509),
+LPF_TAPS(-0.002299054442402458),
+LPF_TAPS(0.001292615642227111),
+LPF_TAPS(0.003990141163815962),
+LPF_TAPS(0.004572008955895946),
+LPF_TAPS(0.002921903641535427),
+LPF_TAPS(0.000000000000000021),
+LPF_TAPS(-0.002698408098877721),
+LPF_TAPS(-0.003899170603326770),
+LPF_TAPS(-0.003142245599040471),
+LPF_TAPS(-0.000939837302041592),
+LPF_TAPS(0.001543084834901600),
+LPF_TAPS(0.003096593192501320),
+LPF_TAPS(0.003048749090619088),
+LPF_TAPS(0.001546150733363754),
+LPF_TAPS(-0.000579338030693501),
+LPF_TAPS(-0.002262076797697580),
+LPF_TAPS(-0.002731352650618141),
+LPF_TAPS(-0.001857714543905297),
+LPF_TAPS(-0.000164888079687475),
+LPF_TAPS(0.001472448638347934),
+LPF_TAPS(0.002275459232597816),
+LPF_TAPS(0.001926735087455665),
+LPF_TAPS(0.000685607318862552),
+LPF_TAPS(-0.000782319104071646),
+LPF_TAPS(-0.001756794170294546),
+LPF_TAPS(-0.001812391534151866),
+LPF_TAPS(-0.000998234344597222),
+LPF_TAPS(0.000224511362529855),
+LPF_TAPS(0.001237569662484545),
+LPF_TAPS(0.001574705433974788),
+LPF_TAPS(0.001132206574500079),
+LPF_TAPS(0.000187905638196626),
+LPF_TAPS(-0.000764290283324042),
+LPF_TAPS(-0.001269318042621104),
+LPF_TAPS(-0.001125354793155152),
+LPF_TAPS(-0.000458299554997024),
+LPF_TAPS(0.000367260061047211),
+LPF_TAPS(0.000943577962191536),
+LPF_TAPS(0.001018581734917156),
+LPF_TAPS(0.000602337744180382),
+LPF_TAPS(-0.000061624390633655),
+LPF_TAPS(-0.000634138612347655),
+LPF_TAPS(-0.000851316283811722),
+LPF_TAPS(-0.000643549484484288),
+LPF_TAPS(-0.000150386402110857),
+LPF_TAPS(0.000366064286993324),
+LPF_TAPS(0.000658065918351398),
+LPF_TAPS(0.000609077894058259),
+LPF_TAPS(0.000276441517410037),
+LPF_TAPS(-0.000153270702730086),
+LPF_TAPS(-0.000466220696521016),
+LPF_TAPS(-0.000526021540293030),
+LPF_TAPS(-0.000330777418181525),
+LPF_TAPS(-0.000000000000000005),
+LPF_TAPS(0.000295095855792692),
+LPF_TAPS(0.000418635208448877),
+LPF_TAPS(0.000330966493993224),
+LPF_TAPS(0.000097038599796698),
+LPF_TAPS(-0.000156059832555650),
+LPF_TAPS(-0.000306513263908867),
+LPF_TAPS(-0.000295118409098363),
+LPF_TAPS(-0.000146241851067930),
+LPF_TAPS(0.000053496004603635),
+LPF_TAPS(0.000203740441664265),
+LPF_TAPS(0.000239731180927390),
+LPF_TAPS(0.000158738425916860),
+LPF_TAPS(0.000013702800097689),
+LPF_TAPS(-0.000118882157530363),
+LPF_TAPS(-0.000178286254100791),
+LPF_TAPS(-0.000146329682785648),
+LPF_TAPS(-0.000050408904084663),
+LPF_TAPS(0.000055611400702006),
+LPF_TAPS(0.000120569818801959),
+LPF_TAPS(0.000119910156306052),
+LPF_TAPS(0.000063565979232706),
+LPF_TAPS(-0.000013736274648311),
+LPF_TAPS(-0.000072615683850022),
+LPF_TAPS(-0.000088433378276437),
+LPF_TAPS(-0.000060722607418047),
+LPF_TAPS(-0.000009601521922410),
+LPF_TAPS(0.000037111313024223),
+LPF_TAPS(0.000058402235278429),
+LPF_TAPS(0.000048910060055138),
+LPF_TAPS(0.000018750083838216),
+LPF_TAPS(-0.000014089712842714),
+LPF_TAPS(-0.000033800086864146),
+LPF_TAPS(-0.000033904623197724),
+LPF_TAPS(-0.000018529842079338),
+LPF_TAPS(0.000001741335735348),
+LPF_TAPS(0.000016344170879499),
+LPF_TAPS(0.000019852237874508),
+LPF_TAPS(0.000013451394329611),
+LPF_TAPS(0.000002786671528698),
+LPF_TAPS(-0.000005935583389038),
+LPF_TAPS(-0.000009191703997209),
+LPF_TAPS(-0.000007189532013224),
+LPF_TAPS(-0.000002692542847324),
+LPF_TAPS(0.000001194819042577),
+LPF_TAPS(0.000002794151684877),
+LPF_TAPS(0.000002293299391840),
+LPF_TAPS(0.000000967826707627),
+LPF_TAPS(0.000000000000000000),
+LPF_TAPS(-0.000000238149160989),
+LPF_TAPS(-0.000000088867880174),
+LPF_TAPS(0.000000000000000000),
+};
diff --git a/core/sound/blip_lpf_192K_48K.h b/core/sound/blip_lpf_192K_48K.h
new file mode 100644
index 000000000..38ab936fc
--- /dev/null
+++ b/core/sound/blip_lpf_192K_48K.h
@@ -0,0 +1,297 @@
+static buf_t const blip_lpf_192K_48K[blip_lpf_192K_taps] = {
+LPF_TAPS(0.000000000000000000),
+LPF_TAPS(-0.000000011699684035),
+LPF_TAPS(-0.000000360416908350),
+LPF_TAPS(0.000000000000000000),
+LPF_TAPS(0.000001464716937627),
+LPF_TAPS(0.000000301918738577),
+LPF_TAPS(-0.000003295928230852),
+LPF_TAPS(-0.000001194819620067),
+LPF_TAPS(0.000005764676411107),
+LPF_TAPS(0.000002978003106345),
+LPF_TAPS(-0.000008705808898682),
+LPF_TAPS(-0.000005935586257872),
+LPF_TAPS(0.000011876723517204),
+LPF_TAPS(0.000010321622883786),
+LPF_TAPS(-0.000014957735575653),
+LPF_TAPS(-0.000016344178779097),
+LPF_TAPS(0.000017554863172917),
+LPF_TAPS(0.000024148572024212),
+LPF_TAPS(-0.000019205435573849),
+LPF_TAPS(-0.000033800103200680),
+LPF_TAPS(0.000019386927628363),
+LPF_TAPS(0.000045266728576528),
+LPF_TAPS(-0.000017529388978758),
+LPF_TAPS(-0.000058402263505874),
+LPF_TAPS(0.000013031766421880),
+LPF_TAPS(0.000072930834880073),
+LPF_TAPS(-0.000005282309369841),
+LPF_TAPS(-0.000088433421018778),
+LPF_TAPS(-0.000006316897832758),
+LPF_TAPS(0.000104337415082632),
+LPF_TAPS(0.000022321414313687),
+LPF_TAPS(-0.000119910214262005),
+LPF_TAPS(-0.000043212280878318),
+LPF_TAPS(0.000134257862687919),
+LPF_TAPS(0.000069360801474369),
+LPF_TAPS(-0.000146329753510899),
+LPF_TAPS(-0.000100991099262988),
+LPF_TAPS(0.000154930318953823),
+LPF_TAPS(0.000138141528895099),
+LPF_TAPS(-0.000158738502639612),
+LPF_TAPS(-0.000180626266732152),
+LPF_TAPS(0.000156335614993112),
+LPF_TAPS(0.000227998617493814),
+LPF_TAPS(-0.000146241921750728),
+LPF_TAPS(-0.000279517755671161),
+LPF_TAPS(0.000126962012322580),
+LPF_TAPS(0.000334120749962844),
+LPF_TAPS(-0.000097038646698174),
+LPF_TAPS(-0.000390401787033481),
+LPF_TAPS(0.000055114397408641),
+LPF_TAPS(0.000446600506885053),
+LPF_TAPS(-0.000000000000000006),
+LPF_TAPS(-0.000500601278283534),
+LPF_TAPS(-0.000069252083035812),
+LPF_TAPS(0.000549945074130452),
+LPF_TAPS(0.000153270776810127),
+LPF_TAPS(-0.000591855351920665),
+LPF_TAPS(-0.000252288446198623),
+LPF_TAPS(0.000623279005681946),
+LPF_TAPS(0.000366064463922513),
+LPF_TAPS(-0.000640943039114649),
+LPF_TAPS(-0.000493813126218410),
+LPF_TAPS(0.000641427124992022),
+LPF_TAPS(0.000634138918844690),
+LPF_TAPS(-0.000621251676932805),
+LPF_TAPS(-0.000784982210639611),
+LPF_TAPS(0.000576980483533690),
+LPF_TAPS(0.000943578418249327),
+LPF_TAPS(-0.000505336361627272),
+LPF_TAPS(-0.001106433536073574),
+LPF_TAPS(0.000403327697534788),
+LPF_TAPS(0.001269318656118245),
+LPF_TAPS(-0.000268383186665769),
+LPF_TAPS(-0.001427285713983255),
+LPF_TAPS(0.000098491577542187),
+LPF_TAPS(0.001574706195074243),
+LPF_TAPS(0.000107657198890842),
+LPF_TAPS(-0.001705333929525307),
+LPF_TAPS(-0.000350533456054162),
+LPF_TAPS(0.001812392410131702),
+LPF_TAPS(0.000629635873110615),
+LPF_TAPS(-0.001888686304008138),
+LPF_TAPS(-0.000943370501630691),
+LPF_TAPS(0.001926736018700954),
+LPF_TAPS(0.001288944738825755),
+LPF_TAPS(-0.001918933353174580),
+LPF_TAPS(-0.001662280064090690),
+LPF_TAPS(0.001857715441791014),
+LPF_TAPS(0.002057946865741891),
+LPF_TAPS(-0.001735753414692443),
+LPF_TAPS(-0.002469124022221547),
+LPF_TAPS(0.001546151480661884),
+LPF_TAPS(0.002887585040926098),
+LPF_TAPS(-0.001282651517427551),
+LPF_TAPS(-0.003303711492255804),
+LPF_TAPS(0.000939837756291379),
+LPF_TAPS(0.003706533197250494),
+LPF_TAPS(-0.000513335796556813),
+LPF_TAPS(-0.004083793117000289),
+LPF_TAPS(0.000000000000000027),
+LPF_TAPS(0.004422033118268171),
+LPF_TAPS(0.000601916688958754),
+LPF_TAPS(-0.004706694693093308),
+LPF_TAPS(-0.001292616266984692),
+LPF_TAPS(0.004922226186722231),
+LPF_TAPS(0.002070637932581485),
+LPF_TAPS(-0.005052184961159095),
+LPF_TAPS(-0.002932773912983241),
+LPF_TAPS(0.005079318894153638),
+LPF_TAPS(0.003874022945641129),
+LPF_TAPS(-0.004985606189918983),
+LPF_TAPS(-0.004887584602846446),
+LPF_TAPS(0.004752224827174563),
+LPF_TAPS(0.005964896612310225),
+LPF_TAPS(-0.004359411682422675),
+LPF_TAPS(-0.007095716183897575),
+LPF_TAPS(0.003786154007080481),
+LPF_TAPS(0.008268245136622701),
+LPF_TAPS(-0.003009628201892344),
+LPF_TAPS(-0.009469297367376523),
+LPF_TAPS(0.002004254889476187),
+LPF_TAPS(0.010684505952884770),
+LPF_TAPS(-0.000740160397126897),
+LPF_TAPS(-0.011898565969226251),
+LPF_TAPS(-0.000819305919485099),
+LPF_TAPS(0.013095507988590082),
+LPF_TAPS(0.002721610624445016),
+LPF_TAPS(-0.014258996208693293),
+LPF_TAPS(-0.005031753397366375),
+LPF_TAPS(0.015372644321100564),
+LPF_TAPS(0.007843835020286348),
+LPF_TAPS(-0.016420341560817068),
+LPF_TAPS(-0.011301961155043415),
+LPF_TAPS(0.017386580925610604),
+LPF_TAPS(0.015640482853936873),
+LPF_TAPS(-0.018256781327691107),
+LPF_TAPS(-0.021268118905985057),
+LPF_TAPS(0.019017595453519179),
+LPF_TAPS(0.028964140354554850),
+LPF_TAPS(-0.019657195362809188),
+LPF_TAPS(-0.040410641251038312),
+LPF_TAPS(0.020165528350490871),
+LPF_TAPS(0.060001805818588987),
+LPF_TAPS(-0.020534536312936849),
+LPF_TAPS(-0.103889292749747980),
+LPF_TAPS(0.020758332782087250),
+LPF_TAPS(0.317568878837019564),
+LPF_TAPS(0.479166656500229882),
+LPF_TAPS(0.317568878837019619),
+LPF_TAPS(0.020758332782087250),
+LPF_TAPS(-0.103889292749747980),
+LPF_TAPS(-0.020534536312936849),
+LPF_TAPS(0.060001805818588987),
+LPF_TAPS(0.020165528350490871),
+LPF_TAPS(-0.040410641251038312),
+LPF_TAPS(-0.019657195362809188),
+LPF_TAPS(0.028964140354554854),
+LPF_TAPS(0.019017595453519186),
+LPF_TAPS(-0.021268118905985057),
+LPF_TAPS(-0.018256781327691107),
+LPF_TAPS(0.015640482853936873),
+LPF_TAPS(0.017386580925610604),
+LPF_TAPS(-0.011301961155043415),
+LPF_TAPS(-0.016420341560817068),
+LPF_TAPS(0.007843835020286349),
+LPF_TAPS(0.015372644321100568),
+LPF_TAPS(-0.005031753397366375),
+LPF_TAPS(-0.014258996208693293),
+LPF_TAPS(0.002721610624445017),
+LPF_TAPS(0.013095507988590084),
+LPF_TAPS(-0.000819305919485099),
+LPF_TAPS(-0.011898565969226251),
+LPF_TAPS(-0.000740160397126897),
+LPF_TAPS(0.010684505952884775),
+LPF_TAPS(0.002004254889476188),
+LPF_TAPS(-0.009469297367376528),
+LPF_TAPS(-0.003009628201892346),
+LPF_TAPS(0.008268245136622703),
+LPF_TAPS(0.003786154007080481),
+LPF_TAPS(-0.007095716183897575),
+LPF_TAPS(-0.004359411682422675),
+LPF_TAPS(0.005964896612310226),
+LPF_TAPS(0.004752224827174565),
+LPF_TAPS(-0.004887584602846446),
+LPF_TAPS(-0.004985606189918983),
+LPF_TAPS(0.003874022945641131),
+LPF_TAPS(0.005079318894153640),
+LPF_TAPS(-0.002932773912983241),
+LPF_TAPS(-0.005052184961159091),
+LPF_TAPS(0.002070637932581485),
+LPF_TAPS(0.004922226186722231),
+LPF_TAPS(-0.001292616266984692),
+LPF_TAPS(-0.004706694693093311),
+LPF_TAPS(0.000601916688958754),
+LPF_TAPS(0.004422033118268169),
+LPF_TAPS(0.000000000000000027),
+LPF_TAPS(-0.004083793117000291),
+LPF_TAPS(-0.000513335796556813),
+LPF_TAPS(0.003706533197250494),
+LPF_TAPS(0.000939837756291379),
+LPF_TAPS(-0.003303711492255802),
+LPF_TAPS(-0.001282651517427552),
+LPF_TAPS(0.002887585040926099),
+LPF_TAPS(0.001546151480661884),
+LPF_TAPS(-0.002469124022221548),
+LPF_TAPS(-0.001735753414692443),
+LPF_TAPS(0.002057946865741892),
+LPF_TAPS(0.001857715441791016),
+LPF_TAPS(-0.001662280064090690),
+LPF_TAPS(-0.001918933353174579),
+LPF_TAPS(0.001288944738825756),
+LPF_TAPS(0.001926736018700954),
+LPF_TAPS(-0.000943370501630691),
+LPF_TAPS(-0.001888686304008139),
+LPF_TAPS(0.000629635873110615),
+LPF_TAPS(0.001812392410131702),
+LPF_TAPS(-0.000350533456054163),
+LPF_TAPS(-0.001705333929525308),
+LPF_TAPS(0.000107657198890842),
+LPF_TAPS(0.001574706195074243),
+LPF_TAPS(0.000098491577542187),
+LPF_TAPS(-0.001427285713983254),
+LPF_TAPS(-0.000268383186665769),
+LPF_TAPS(0.001269318656118245),
+LPF_TAPS(0.000403327697534788),
+LPF_TAPS(-0.001106433536073575),
+LPF_TAPS(-0.000505336361627273),
+LPF_TAPS(0.000943578418249328),
+LPF_TAPS(0.000576980483533690),
+LPF_TAPS(-0.000784982210639612),
+LPF_TAPS(-0.000621251676932805),
+LPF_TAPS(0.000634138918844690),
+LPF_TAPS(0.000641427124992022),
+LPF_TAPS(-0.000493813126218410),
+LPF_TAPS(-0.000640943039114650),
+LPF_TAPS(0.000366064463922513),
+LPF_TAPS(0.000623279005681946),
+LPF_TAPS(-0.000252288446198623),
+LPF_TAPS(-0.000591855351920666),
+LPF_TAPS(0.000153270776810127),
+LPF_TAPS(0.000549945074130454),
+LPF_TAPS(-0.000069252083035812),
+LPF_TAPS(-0.000500601278283533),
+LPF_TAPS(-0.000000000000000006),
+LPF_TAPS(0.000446600506885053),
+LPF_TAPS(0.000055114397408641),
+LPF_TAPS(-0.000390401787033482),
+LPF_TAPS(-0.000097038646698174),
+LPF_TAPS(0.000334120749962844),
+LPF_TAPS(0.000126962012322581),
+LPF_TAPS(-0.000279517755671162),
+LPF_TAPS(-0.000146241921750728),
+LPF_TAPS(0.000227998617493814),
+LPF_TAPS(0.000156335614993112),
+LPF_TAPS(-0.000180626266732152),
+LPF_TAPS(-0.000158738502639613),
+LPF_TAPS(0.000138141528895099),
+LPF_TAPS(0.000154930318953823),
+LPF_TAPS(-0.000100991099262988),
+LPF_TAPS(-0.000146329753510899),
+LPF_TAPS(0.000069360801474369),
+LPF_TAPS(0.000134257862687919),
+LPF_TAPS(-0.000043212280878318),
+LPF_TAPS(-0.000119910214262005),
+LPF_TAPS(0.000022321414313687),
+LPF_TAPS(0.000104337415082632),
+LPF_TAPS(-0.000006316897832758),
+LPF_TAPS(-0.000088433421018778),
+LPF_TAPS(-0.000005282309369841),
+LPF_TAPS(0.000072930834880073),
+LPF_TAPS(0.000013031766421880),
+LPF_TAPS(-0.000058402263505874),
+LPF_TAPS(-0.000017529388978758),
+LPF_TAPS(0.000045266728576528),
+LPF_TAPS(0.000019386927628363),
+LPF_TAPS(-0.000033800103200680),
+LPF_TAPS(-0.000019205435573849),
+LPF_TAPS(0.000024148572024212),
+LPF_TAPS(0.000017554863172917),
+LPF_TAPS(-0.000016344178779097),
+LPF_TAPS(-0.000014957735575653),
+LPF_TAPS(0.000010321622883786),
+LPF_TAPS(0.000011876723517204),
+LPF_TAPS(-0.000005935586257872),
+LPF_TAPS(-0.000008705808898682),
+LPF_TAPS(0.000002978003106345),
+LPF_TAPS(0.000005764676411107),
+LPF_TAPS(-0.000001194819620067),
+LPF_TAPS(-0.000003295928230852),
+LPF_TAPS(0.000000301918738577),
+LPF_TAPS(0.000001464716937627),
+LPF_TAPS(0.000000000000000000),
+LPF_TAPS(-0.000000360416908350),
+LPF_TAPS(-0.000000011699684035),
+LPF_TAPS(0.000000000000000000),
+};
diff --git a/core/sound/blip_lpf_192K_96K.h b/core/sound/blip_lpf_192K_96K.h
new file mode 100644
index 000000000..4effb8d2e
--- /dev/null
+++ b/core/sound/blip_lpf_192K_96K.h
@@ -0,0 +1,297 @@
+static buf_t const blip_lpf_192K_96K[blip_lpf_192K_taps] = {
+LPF_TAPS(0.000000000000000000),
+LPF_TAPS(0.000000011699684267),
+LPF_TAPS(-0.000000023622972699),
+LPF_TAPS(0.000000000000000000),
+LPF_TAPS(0.000000096002622039),
+LPF_TAPS(-0.000000301918744560),
+LPF_TAPS(0.000000655600900104),
+LPF_TAPS(-0.000001194819643744),
+LPF_TAPS(0.000001956843997497),
+LPF_TAPS(-0.000002978003165359),
+LPF_TAPS(0.000004293229923365),
+LPF_TAPS(-0.000005935586375495),
+LPF_TAPS(0.000007935773099930),
+LPF_TAPS(-0.000010321623088325),
+LPF_TAPS(0.000013117582299463),
+LPF_TAPS(-0.000016344179102984),
+LPF_TAPS(0.000020017485373424),
+LPF_TAPS(-0.000024148572502755),
+LPF_TAPS(0.000028742966123913),
+LPF_TAPS(-0.000033800103870485),
+LPF_TAPS(0.000039312801030250),
+LPF_TAPS(-0.000045266729473564),
+LPF_TAPS(0.000051639915742486),
+LPF_TAPS(-0.000058402264663211),
+LPF_TAPS(0.000065515115283167),
+LPF_TAPS(-0.000072930836325319),
+LPF_TAPS(0.000080592468686167),
+LPF_TAPS(-0.000088433422771234),
+LPF_TAPS(0.000096377238653759),
+LPF_TAPS(-0.000104337417150253),
+LPF_TAPS(0.000112217329923088),
+LPF_TAPS(-0.000119910216638228),
+LPF_TAPS(0.000127299277019925),
+LPF_TAPS(-0.000134257865348465),
+LPF_TAPS(0.000140649794538436),
+LPF_TAPS(-0.000146329756410672),
+LPF_TAPS(0.000151143864130081),
+LPF_TAPS(-0.000154930322024030),
+LPF_TAPS(0.000157520227123526),
+LPF_TAPS(-0.000158738505785284),
+LPF_TAPS(0.000158404987661415),
+LPF_TAPS(-0.000156335618091171),
+LPF_TAPS(0.000152343808703457),
+LPF_TAPS(-0.000146241924648769),
+LPF_TAPS(0.000137842905435367),
+LPF_TAPS(-0.000126962014838557),
+LPF_TAPS(0.000113418713797108),
+LPF_TAPS(-0.000097038648621177),
+LPF_TAPS(0.000077655745226952),
+LPF_TAPS(-0.000055114398500844),
+LPF_TAPS(0.000029271744296376),
+LPF_TAPS(0.000000000000000005),
+LPF_TAPS(-0.000032811141918621),
+LPF_TAPS(0.000069252084408131),
+LPF_TAPS(-0.000109390878791837),
+LPF_TAPS(0.000153270779847421),
+LPF_TAPS(-0.000200907823821846),
+LPF_TAPS(0.000252288451198140),
+LPF_TAPS(-0.000307367196884387),
+LPF_TAPS(0.000366064471176646),
+LPF_TAPS(-0.000428264455346255),
+LPF_TAPS(0.000493813136004140),
+LPF_TAPS(-0.000562516502490292),
+LPF_TAPS(0.000634138931411217),
+LPF_TAPS(-0.000708401782100121),
+LPF_TAPS(0.000784982226195324),
+LPF_TAPS(-0.000863512333713981),
+LPF_TAPS(0.000943578436947906),
+LPF_TAPS(-0.001024720792217768),
+LPF_TAPS(0.001106433557999406),
+LPF_TAPS(-0.001188165106185149),
+LPF_TAPS(0.001269318681271905),
+LPF_TAPS(-0.001349253420085044),
+LPF_TAPS(0.001427285742267313),
+LPF_TAPS(-0.001502691119198399),
+LPF_TAPS(0.001574706226279688),
+LPF_TAPS(-0.001642531480640847),
+LPF_TAPS(0.001705333963319374),
+LPF_TAPS(-0.001762250721854476),
+LPF_TAPS(0.001812392446047311),
+LPF_TAPS(-0.001854847506395012),
+LPF_TAPS(0.001888686341435625),
+LPF_TAPS(-0.001912966176969622),
+LPF_TAPS(0.001926736056882465),
+LPF_TAPS(-0.001929042162111216),
+LPF_TAPS(0.001918933391201516),
+LPF_TAPS(-0.001895467172926061),
+LPF_TAPS(0.001857715478604782),
+LPF_TAPS(-0.001804770999109921),
+LPF_TAPS(0.001735753449089341),
+LPF_TAPS(-0.001649815958715717),
+LPF_TAPS(0.001546151511301517),
+LPF_TAPS(-0.001423999383428101),
+LPF_TAPS(0.001282651542845464),
+LPF_TAPS(-0.001121458958325758),
+LPF_TAPS(0.000939837774915927),
+LPF_TAPS(-0.000737275307646808),
+LPF_TAPS(0.000513335806729532),
+LPF_TAPS(-0.000267665947613575),
+LPF_TAPS(-0.000000000000000021),
+LPF_TAPS(0.000289835368998426),
+LPF_TAPS(-0.000601916700886649),
+LPF_TAPS(0.000936219802489234),
+LPF_TAPS(-0.001292616292599868),
+LPF_TAPS(0.001670870675282795),
+LPF_TAPS(-0.002070637973614653),
+LPF_TAPS(0.002491461954432159),
+LPF_TAPS(-0.002932773971101029),
+LPF_TAPS(0.003393892447508969),
+LPF_TAPS(-0.003874023022411256),
+LPF_TAPS(0.004372259368953546),
+LPF_TAPS(-0.004887584699702088),
+LPF_TAPS(0.005418873962854631),
+LPF_TAPS(-0.005964896730514600),
+LPF_TAPS(0.006524320775035389),
+LPF_TAPS(-0.007095716324511088),
+LPF_TAPS(0.007677560983540607),
+LPF_TAPS(-0.008268245300471832),
+LPF_TAPS(0.008866078957473050),
+LPF_TAPS(-0.009469297555026516),
+LPF_TAPS(0.010076069957823942),
+LPF_TAPS(-0.010684506164616164),
+LPF_TAPS(0.011292665660355927),
+LPF_TAPS(-0.011898566205016293),
+LPF_TAPS(0.012500193009798910),
+LPF_TAPS(-0.013095508248099581),
+LPF_TAPS(0.013682460845602764),
+LPF_TAPS(-0.014258996491259241),
+LPF_TAPS(0.014823067808685773),
+LPF_TAPS(-0.015372644625735333),
+LPF_TAPS(0.015905724278637460),
+LPF_TAPS(-0.016420341886213691),
+LPF_TAPS(0.016914580529250271),
+LPF_TAPS(-0.017386581270154931),
+LPF_TAPS(0.017834552948553309),
+LPF_TAPS(-0.018256781689479799),
+LPF_TAPS(0.018651640062293810),
+LPF_TAPS(-0.019017595830384797),
+LPF_TAPS(0.019353220234126459),
+LPF_TAPS(-0.019657195752349511),
+LPF_TAPS(0.019928323290854689),
+LPF_TAPS(-0.020165528750104574),
+LPF_TAPS(0.020367868928236835),
+LPF_TAPS(-0.020534536719863154),
+LPF_TAPS(0.020664865575759649),
+LPF_TAPS(-0.020758333193448456),
+LPF_TAPS(0.020814564413806608),
+LPF_TAPS(0.979166665295603811),
+LPF_TAPS(0.020814564413806608),
+LPF_TAPS(-0.020758333193448456),
+LPF_TAPS(0.020664865575759649),
+LPF_TAPS(-0.020534536719863154),
+LPF_TAPS(0.020367868928236835),
+LPF_TAPS(-0.020165528750104574),
+LPF_TAPS(0.019928323290854689),
+LPF_TAPS(-0.019657195752349511),
+LPF_TAPS(0.019353220234126459),
+LPF_TAPS(-0.019017595830384801),
+LPF_TAPS(0.018651640062293810),
+LPF_TAPS(-0.018256781689479803),
+LPF_TAPS(0.017834552948553309),
+LPF_TAPS(-0.017386581270154935),
+LPF_TAPS(0.016914580529250271),
+LPF_TAPS(-0.016420341886213691),
+LPF_TAPS(0.015905724278637463),
+LPF_TAPS(-0.015372644625735336),
+LPF_TAPS(0.014823067808685773),
+LPF_TAPS(-0.014258996491259241),
+LPF_TAPS(0.013682460845602765),
+LPF_TAPS(-0.013095508248099583),
+LPF_TAPS(0.012500193009798911),
+LPF_TAPS(-0.011898566205016293),
+LPF_TAPS(0.011292665660355928),
+LPF_TAPS(-0.010684506164616170),
+LPF_TAPS(0.010076069957823945),
+LPF_TAPS(-0.009469297555026519),
+LPF_TAPS(0.008866078957473053),
+LPF_TAPS(-0.008268245300471832),
+LPF_TAPS(0.007677560983540607),
+LPF_TAPS(-0.007095716324511088),
+LPF_TAPS(0.006524320775035389),
+LPF_TAPS(-0.005964896730514602),
+LPF_TAPS(0.005418873962854633),
+LPF_TAPS(-0.004887584699702088),
+LPF_TAPS(0.004372259368953546),
+LPF_TAPS(-0.003874023022411258),
+LPF_TAPS(0.003393892447508970),
+LPF_TAPS(-0.002932773971101028),
+LPF_TAPS(0.002491461954432157),
+LPF_TAPS(-0.002070637973614654),
+LPF_TAPS(0.001670870675282794),
+LPF_TAPS(-0.001292616292599868),
+LPF_TAPS(0.000936219802489234),
+LPF_TAPS(-0.000601916700886649),
+LPF_TAPS(0.000289835368998426),
+LPF_TAPS(-0.000000000000000021),
+LPF_TAPS(-0.000267665947613575),
+LPF_TAPS(0.000513335806729533),
+LPF_TAPS(-0.000737275307646808),
+LPF_TAPS(0.000939837774915926),
+LPF_TAPS(-0.001121458958325758),
+LPF_TAPS(0.001282651542845464),
+LPF_TAPS(-0.001423999383428102),
+LPF_TAPS(0.001546151511301517),
+LPF_TAPS(-0.001649815958715718),
+LPF_TAPS(0.001735753449089341),
+LPF_TAPS(-0.001804770999109922),
+LPF_TAPS(0.001857715478604784),
+LPF_TAPS(-0.001895467172926061),
+LPF_TAPS(0.001918933391201516),
+LPF_TAPS(-0.001929042162111217),
+LPF_TAPS(0.001926736056882465),
+LPF_TAPS(-0.001912966176969622),
+LPF_TAPS(0.001888686341435626),
+LPF_TAPS(-0.001854847506395012),
+LPF_TAPS(0.001812392446047311),
+LPF_TAPS(-0.001762250721854477),
+LPF_TAPS(0.001705333963319375),
+LPF_TAPS(-0.001642531480640848),
+LPF_TAPS(0.001574706226279688),
+LPF_TAPS(-0.001502691119198398),
+LPF_TAPS(0.001427285742267312),
+LPF_TAPS(-0.001349253420085045),
+LPF_TAPS(0.001269318681271905),
+LPF_TAPS(-0.001188165106185149),
+LPF_TAPS(0.001106433557999407),
+LPF_TAPS(-0.001024720792217768),
+LPF_TAPS(0.000943578436947906),
+LPF_TAPS(-0.000863512333713982),
+LPF_TAPS(0.000784982226195325),
+LPF_TAPS(-0.000708401782100121),
+LPF_TAPS(0.000634138931411218),
+LPF_TAPS(-0.000562516502490292),
+LPF_TAPS(0.000493813136004140),
+LPF_TAPS(-0.000428264455346255),
+LPF_TAPS(0.000366064471176646),
+LPF_TAPS(-0.000307367196884387),
+LPF_TAPS(0.000252288451198141),
+LPF_TAPS(-0.000200907823821847),
+LPF_TAPS(0.000153270779847421),
+LPF_TAPS(-0.000109390878791837),
+LPF_TAPS(0.000069252084408131),
+LPF_TAPS(-0.000032811141918621),
+LPF_TAPS(0.000000000000000005),
+LPF_TAPS(0.000029271744296376),
+LPF_TAPS(-0.000055114398500844),
+LPF_TAPS(0.000077655745226952),
+LPF_TAPS(-0.000097038648621177),
+LPF_TAPS(0.000113418713797108),
+LPF_TAPS(-0.000126962014838558),
+LPF_TAPS(0.000137842905435368),
+LPF_TAPS(-0.000146241924648769),
+LPF_TAPS(0.000152343808703457),
+LPF_TAPS(-0.000156335618091171),
+LPF_TAPS(0.000158404987661415),
+LPF_TAPS(-0.000158738505785285),
+LPF_TAPS(0.000157520227123526),
+LPF_TAPS(-0.000154930322024030),
+LPF_TAPS(0.000151143864130082),
+LPF_TAPS(-0.000146329756410672),
+LPF_TAPS(0.000140649794538436),
+LPF_TAPS(-0.000134257865348465),
+LPF_TAPS(0.000127299277019925),
+LPF_TAPS(-0.000119910216638228),
+LPF_TAPS(0.000112217329923088),
+LPF_TAPS(-0.000104337417150253),
+LPF_TAPS(0.000096377238653759),
+LPF_TAPS(-0.000088433422771235),
+LPF_TAPS(0.000080592468686167),
+LPF_TAPS(-0.000072930836325320),
+LPF_TAPS(0.000065515115283168),
+LPF_TAPS(-0.000058402264663211),
+LPF_TAPS(0.000051639915742486),
+LPF_TAPS(-0.000045266729473564),
+LPF_TAPS(0.000039312801030250),
+LPF_TAPS(-0.000033800103870485),
+LPF_TAPS(0.000028742966123913),
+LPF_TAPS(-0.000024148572502755),
+LPF_TAPS(0.000020017485373424),
+LPF_TAPS(-0.000016344179102984),
+LPF_TAPS(0.000013117582299463),
+LPF_TAPS(-0.000010321623088325),
+LPF_TAPS(0.000007935773099930),
+LPF_TAPS(-0.000005935586375495),
+LPF_TAPS(0.000004293229923365),
+LPF_TAPS(-0.000002978003165359),
+LPF_TAPS(0.000001956843997497),
+LPF_TAPS(-0.000001194819643744),
+LPF_TAPS(0.000000655600900104),
+LPF_TAPS(-0.000000301918744560),
+LPF_TAPS(0.000000096002622039),
+LPF_TAPS(0.000000000000000000),
+LPF_TAPS(-0.000000023622972699),
+LPF_TAPS(0.000000011699684267),
+LPF_TAPS(0.000000000000000000),
+};
diff --git a/core/sound/blip_lpf_384K.h b/core/sound/blip_lpf_384K.h
new file mode 100644
index 000000000..016afa3bc
--- /dev/null
+++ b/core/sound/blip_lpf_384K.h
@@ -0,0 +1,8 @@
+/* 384K sampling, 2K cutoff, 3K transition */
+enum { blip_lpf_384K_taps = 589 };
+
+
+#include "blip_lpf_384K_24K.h"
+#include "blip_lpf_384K_48K.h"
+#include "blip_lpf_384K_96K.h"
+#include "blip_lpf_384K_192K.h"
diff --git a/core/sound/blip_lpf_384K_192K.h b/core/sound/blip_lpf_384K_192K.h
new file mode 100644
index 000000000..740906680
--- /dev/null
+++ b/core/sound/blip_lpf_384K_192K.h
@@ -0,0 +1,591 @@
+static buf_t const blip_lpf_384K_192K[blip_lpf_384K_taps] = {
+LPF_TAPS(0.000000000000000000),
+LPF_TAPS(-0.000000001818683069),
+LPF_TAPS(0.000000005849842142),
+LPF_TAPS(-0.000000009919970318),
+LPF_TAPS(0.000000011811486367),
+LPF_TAPS(-0.000000009268046592),
+LPF_TAPS(0.000000000000000000),
+LPF_TAPS(0.000000018310012110),
+LPF_TAPS(-0.000000048001311091),
+LPF_TAPS(0.000000091429289498),
+LPF_TAPS(-0.000000150959372505),
+LPF_TAPS(0.000000228960831633),
+LPF_TAPS(-0.000000327800450540),
+LPF_TAPS(0.000000449836042893),
+LPF_TAPS(-0.000000597409822761),
+LPF_TAPS(0.000000772841628323),
+LPF_TAPS(-0.000000978422000204),
+LPF_TAPS(0.000001216405116219),
+LPF_TAPS(-0.000001489001584895),
+LPF_TAPS(0.000001798371100741),
+LPF_TAPS(-0.000002146614964877),
+LPF_TAPS(0.000002535768475343),
+LPF_TAPS(-0.000002967793192163),
+LPF_TAPS(0.000003444569082966),
+LPF_TAPS(-0.000003967886555867),
+LPF_TAPS(0.000004539438387109),
+LPF_TAPS(-0.000005160811551841),
+LPF_TAPS(0.000005833478967426),
+LPF_TAPS(-0.000006558791159490),
+LPF_TAPS(0.000007337967862007),
+LPF_TAPS(-0.000008172089563650),
+LPF_TAPS(0.000009062089013671),
+LPF_TAPS(-0.000010008742701603),
+LPF_TAPS(0.000011012662326107),
+LPF_TAPS(-0.000012074286269341),
+LPF_TAPS(0.000013193871094264),
+LPF_TAPS(-0.000014371483083336),
+LPF_TAPS(0.000015606989838136),
+LPF_TAPS(-0.000016900051960385),
+LPF_TAPS(0.000018250114835954),
+LPF_TAPS(-0.000019656400544368),
+LPF_TAPS(0.000021117899917293),
+LPF_TAPS(-0.000022633364770453),
+LPF_TAPS(0.000024201300334306),
+LPF_TAPS(-0.000025819957909655),
+LPF_TAPS(0.000027487327775239),
+LPF_TAPS(-0.000029201132375049),
+LPF_TAPS(0.000030958819813886),
+LPF_TAPS(-0.000032757557690317),
+LPF_TAPS(0.000034594227296746),
+LPF_TAPS(-0.000036465418216909),
+LPF_TAPS(0.000038367423351500),
+LPF_TAPS(-0.000040296234403032),
+LPF_TAPS(0.000042247537851347),
+LPF_TAPS(-0.000044216711451398),
+LPF_TAPS(0.000046198821285030),
+LPF_TAPS(-0.000048188619398569),
+LPF_TAPS(0.000050180542057917),
+LPF_TAPS(-0.000052168708652737),
+LPF_TAPS(0.000054146921281024),
+LPF_TAPS(-0.000056108665045016),
+LPF_TAPS(0.000058047109088909),
+LPF_TAPS(-0.000059955108408308),
+LPF_TAPS(0.000061825206460594),
+LPF_TAPS(-0.000063649638604653),
+LPF_TAPS(0.000065420336397474),
+LPF_TAPS(-0.000067128932774100),
+LPF_TAPS(0.000068766768136256),
+LPF_TAPS(-0.000070324897373838),
+LPF_TAPS(0.000071794097841849),
+LPF_TAPS(-0.000073164878314178),
+LPF_TAPS(0.000074427488933831),
+LPF_TAPS(-0.000075571932177465),
+LPF_TAPS(0.000076587974850560),
+LPF_TAPS(-0.000077465161127258),
+LPF_TAPS(0.000078192826647125),
+LPF_TAPS(-0.000078760113678928),
+LPF_TAPS(0.000079155987359146),
+LPF_TAPS(-0.000079369253010716),
+LPF_TAPS(0.000079388574545169),
+LPF_TAPS(-0.000079202493948537),
+LPF_TAPS(0.000078799451849036),
+LPF_TAPS(-0.000078167809161869),
+LPF_TAPS(0.000077295869803477),
+LPF_TAPS(-0.000076171904465048),
+LPF_TAPS(0.000074784175431958),
+LPF_TAPS(-0.000073120962433157),
+LPF_TAPS(0.000071170589501115),
+LPF_TAPS(-0.000068921452820213),
+LPF_TAPS(0.000066362049538439),
+LPF_TAPS(-0.000063481007513722),
+LPF_TAPS(0.000060267115963468),
+LPF_TAPS(-0.000056709356982912),
+LPF_TAPS(0.000052796937893741),
+LPF_TAPS(-0.000048519324382749),
+LPF_TAPS(0.000043866274386062),
+LPF_TAPS(-0.000038827872671237),
+LPF_TAPS(0.000033394566067721),
+LPF_TAPS(-0.000027557199291414),
+LPF_TAPS(0.000021307051307166),
+LPF_TAPS(-0.000014635872169941),
+LPF_TAPS(0.000007535920281846),
+LPF_TAPS(0.000000000000000000),
+LPF_TAPS(-0.000007978500472509),
+LPF_TAPS(0.000016405570983717),
+LPF_TAPS(-0.000025286541190957),
+LPF_TAPS(0.000034626042255596),
+LPF_TAPS(-0.000044427968552949),
+LPF_TAPS(0.000054695439477278),
+LPF_TAPS(-0.000065430761424673),
+LPF_TAPS(0.000076635390037745),
+LPF_TAPS(-0.000088309892798977),
+LPF_TAPS(0.000100453912060380),
+LPF_TAPS(-0.000113066128598582),
+LPF_TAPS(0.000126144225786715),
+LPF_TAPS(-0.000139684854474777),
+LPF_TAPS(0.000153683598670829),
+LPF_TAPS(-0.000168134942118076),
+LPF_TAPS(0.000183032235860659),
+LPF_TAPS(-0.000198367666893487),
+LPF_TAPS(0.000214132227991698),
+LPF_TAPS(-0.000230315688813067),
+LPF_TAPS(0.000246906568369384),
+LPF_TAPS(-0.000263892108960412),
+LPF_TAPS(0.000281258251663605),
+LPF_TAPS(-0.000298989613472842),
+LPF_TAPS(0.000317069466177310),
+LPF_TAPS(-0.000335479717070287),
+LPF_TAPS(0.000354200891577032),
+LPF_TAPS(-0.000373212117887880),
+LPF_TAPS(0.000392491113681582),
+LPF_TAPS(-0.000412014175020648),
+LPF_TAPS(0.000431756167499303),
+LPF_TAPS(-0.000451690519720436),
+LPF_TAPS(0.000471789219175841),
+LPF_TAPS(-0.000492022810600967),
+LPF_TAPS(0.000512360396871137),
+LPF_TAPS(-0.000532769642503142),
+LPF_TAPS(0.000553216779822719),
+LPF_TAPS(-0.000573666617853055),
+LPF_TAPS(0.000594082553976388),
+LPF_TAPS(-0.000614426588415893),
+LPF_TAPS(0.000634659341580137),
+LPF_TAPS(-0.000654740074307908),
+LPF_TAPS(0.000674626711046154),
+LPF_TAPS(-0.000694275865988328),
+LPF_TAPS(0.000713642872195339),
+LPF_TAPS(-0.000732681813715889),
+LPF_TAPS(0.000751345560716971),
+LPF_TAPS(-0.000769585807629875),
+LPF_TAPS(0.000787353114311179),
+LPF_TAPS(-0.000804596950211894),
+LPF_TAPS(0.000821265741542208),
+LPF_TAPS(-0.000837306921412881),
+LPF_TAPS(0.000852666982928181),
+LPF_TAPS(-0.000867291535198970),
+LPF_TAPS(0.000881125362238082),
+LPF_TAPS(-0.000894112484693921),
+LPF_TAPS(0.000906196224371776),
+LPF_TAPS(-0.000917319271485603),
+LPF_TAPS(0.000927423754577199),
+LPF_TAPS(-0.000936451313033140),
+LPF_TAPS(0.000944343172122700),
+LPF_TAPS(-0.000951040220475200),
+LPF_TAPS(0.000956483089907740),
+LPF_TAPS(-0.000960612237508392),
+LPF_TAPS(0.000963368029874411),
+LPF_TAPS(-0.000964690829398552),
+LPF_TAPS(0.000964521082490530),
+LPF_TAPS(-0.000962799409615877),
+LPF_TAPS(0.000959466697028092),
+LPF_TAPS(-0.000954464190064709),
+LPF_TAPS(0.000947733587872965),
+LPF_TAPS(-0.000939217139425856),
+LPF_TAPS(0.000928857740684234),
+LPF_TAPS(-0.000916599032755621),
+LPF_TAPS(0.000902385500897409),
+LPF_TAPS(-0.000886162574206814),
+LPF_TAPS(0.000867876725835767),
+LPF_TAPS(-0.000847475573567521),
+LPF_TAPS(0.000824907980585085),
+LPF_TAPS(-0.000800124156261971),
+LPF_TAPS(0.000773075756800786),
+LPF_TAPS(-0.000743715985543212),
+LPF_TAPS(0.000711999692773278),
+LPF_TAPS(-0.000677883474834165),
+LPF_TAPS(0.000641325772376801),
+LPF_TAPS(-0.000602286967556684),
+LPF_TAPS(0.000560729479997027),
+LPF_TAPS(-0.000516617861333690),
+LPF_TAPS(0.000469918888156992),
+LPF_TAPS(-0.000420601653169192),
+LPF_TAPS(0.000368637654371840),
+LPF_TAPS(-0.000314000882103524),
+LPF_TAPS(0.000256667903746495),
+LPF_TAPS(-0.000196617945923104),
+LPF_TAPS(0.000133832974005865),
+LPF_TAPS(-0.000068297768767573),
+LPF_TAPS(0.000000000000000002),
+LPF_TAPS(0.000071069703067951),
+LPF_TAPS(-0.000144917684714879),
+LPF_TAPS(0.000221547199195576),
+LPF_TAPS(-0.000300958350891157),
+LPF_TAPS(0.000383148038288760),
+LPF_TAPS(-0.000468109901940947),
+LPF_TAPS(0.000555834276542550),
+LPF_TAPS(-0.000646308147261596),
+LPF_TAPS(0.000739515110453973),
+LPF_TAPS(-0.000835435338884242),
+LPF_TAPS(0.000934045551568285),
+LPF_TAPS(-0.001035318988347563),
+LPF_TAPS(0.001139225389298674),
+LPF_TAPS(-0.001245730979069405),
+LPF_TAPS(0.001354798456232424),
+LPF_TAPS(-0.001466386987732098),
+LPF_TAPS(0.001580452208496668),
+LPF_TAPS(-0.001696946226279024),
+LPF_TAPS(0.001815817631778271),
+LPF_TAPS(-0.001937011514087372),
+LPF_TAPS(0.002060469481503738),
+LPF_TAPS(-0.002186129687729117),
+LPF_TAPS(0.002313926863475365),
+LPF_TAPS(-0.002443792353486666),
+LPF_TAPS(0.002575654158974951),
+LPF_TAPS(-0.002709436985458192),
+LPF_TAPS(0.002845062295982047),
+LPF_TAPS(-0.002982448369694321),
+LPF_TAPS(0.003121510365731584),
+LPF_TAPS(-0.003262160392370767),
+LPF_TAPS(0.003404307581384737),
+LPF_TAPS(-0.003547858167533667),
+LPF_TAPS(0.003692715573114637),
+LPF_TAPS(-0.003838780497481271),
+LPF_TAPS(0.003985951011435366),
+LPF_TAPS(-0.004134122656386202),
+LPF_TAPS(0.004283188548159220),
+LPF_TAPS(-0.004433039485331522),
+LPF_TAPS(0.004583564061959497),
+LPF_TAPS(-0.004734648784556964),
+LPF_TAPS(0.004886178193172272),
+LPF_TAPS(-0.005038034986406997),
+LPF_TAPS(0.005190100150207429),
+LPF_TAPS(-0.005342253090255694),
+LPF_TAPS(0.005494371767777562),
+LPF_TAPS(-0.005646332838577949),
+LPF_TAPS(0.005798011795107618),
+LPF_TAPS(-0.005949283111358818),
+LPF_TAPS(0.006100020390380346),
+LPF_TAPS(-0.006250096514197633),
+LPF_TAPS(0.006399383795917306),
+LPF_TAPS(-0.006547754133790769),
+LPF_TAPS(0.006695079167006964),
+LPF_TAPS(-0.006841230432978989),
+LPF_TAPS(0.006986079525887232),
+LPF_TAPS(-0.007129498256236060),
+LPF_TAPS(0.007271358811179647),
+LPF_TAPS(-0.007411533915368887),
+LPF_TAPS(0.007549896992069969),
+LPF_TAPS(-0.007686322324302492),
+LPF_TAPS(0.007820685215744338),
+LPF_TAPS(-0.007952862151150037),
+LPF_TAPS(0.008082730956027729),
+LPF_TAPS(-0.008210170955320985),
+LPF_TAPS(0.008335063130842599),
+LPF_TAPS(-0.008457290277206927),
+LPF_TAPS(0.008576737156010138),
+LPF_TAPS(-0.008693290648010277),
+LPF_TAPS(0.008806839903059112),
+LPF_TAPS(-0.008917276487542697),
+LPF_TAPS(0.009024494529091247),
+LPF_TAPS(-0.009128390858320101),
+LPF_TAPS(0.009228865147370027),
+LPF_TAPS(-0.009325820045020628),
+LPF_TAPS(0.009419161308151987),
+LPF_TAPS(-0.009508797929338439),
+LPF_TAPS(0.009594642260365112),
+LPF_TAPS(-0.009676610131458962),
+LPF_TAPS(0.009754620966039424),
+LPF_TAPS(-0.009828597890796587),
+LPF_TAPS(0.009898467840912336),
+LPF_TAPS(-0.009964161660250772),
+LPF_TAPS(0.010025614196349649),
+LPF_TAPS(-0.010082764390052302),
+LPF_TAPS(0.010135555359632321),
+LPF_TAPS(-0.010183934479268833),
+LPF_TAPS(0.010227853451738598),
+LPF_TAPS(-0.010267268375206008),
+LPF_TAPS(0.010302139803996540),
+LPF_TAPS(-0.010332432803251270),
+LPF_TAPS(0.010358116997370248),
+LPF_TAPS(-0.010379166612165125),
+LPF_TAPS(0.010395560510646093),
+LPF_TAPS(-0.010407282222386030),
+LPF_TAPS(0.010414319966410993),
+LPF_TAPS(0.989583333419875033),
+LPF_TAPS(0.010414319966410993),
+LPF_TAPS(-0.010407282222386032),
+LPF_TAPS(0.010395560510646093),
+LPF_TAPS(-0.010379166612165125),
+LPF_TAPS(0.010358116997370248),
+LPF_TAPS(-0.010332432803251270),
+LPF_TAPS(0.010302139803996540),
+LPF_TAPS(-0.010267268375206008),
+LPF_TAPS(0.010227853451738598),
+LPF_TAPS(-0.010183934479268833),
+LPF_TAPS(0.010135555359632320),
+LPF_TAPS(-0.010082764390052302),
+LPF_TAPS(0.010025614196349649),
+LPF_TAPS(-0.009964161660250772),
+LPF_TAPS(0.009898467840912336),
+LPF_TAPS(-0.009828597890796587),
+LPF_TAPS(0.009754620966039424),
+LPF_TAPS(-0.009676610131458964),
+LPF_TAPS(0.009594642260365114),
+LPF_TAPS(-0.009508797929338441),
+LPF_TAPS(0.009419161308151989),
+LPF_TAPS(-0.009325820045020628),
+LPF_TAPS(0.009228865147370027),
+LPF_TAPS(-0.009128390858320103),
+LPF_TAPS(0.009024494529091247),
+LPF_TAPS(-0.008917276487542697),
+LPF_TAPS(0.008806839903059114),
+LPF_TAPS(-0.008693290648010277),
+LPF_TAPS(0.008576737156010138),
+LPF_TAPS(-0.008457290277206927),
+LPF_TAPS(0.008335063130842599),
+LPF_TAPS(-0.008210170955320985),
+LPF_TAPS(0.008082730956027731),
+LPF_TAPS(-0.007952862151150038),
+LPF_TAPS(0.007820685215744340),
+LPF_TAPS(-0.007686322324302493),
+LPF_TAPS(0.007549896992069970),
+LPF_TAPS(-0.007411533915368887),
+LPF_TAPS(0.007271358811179648),
+LPF_TAPS(-0.007129498256236060),
+LPF_TAPS(0.006986079525887232),
+LPF_TAPS(-0.006841230432978991),
+LPF_TAPS(0.006695079167006965),
+LPF_TAPS(-0.006547754133790770),
+LPF_TAPS(0.006399383795917307),
+LPF_TAPS(-0.006250096514197633),
+LPF_TAPS(0.006100020390380349),
+LPF_TAPS(-0.005949283111358818),
+LPF_TAPS(0.005798011795107618),
+LPF_TAPS(-0.005646332838577950),
+LPF_TAPS(0.005494371767777562),
+LPF_TAPS(-0.005342253090255696),
+LPF_TAPS(0.005190100150207429),
+LPF_TAPS(-0.005038034986406999),
+LPF_TAPS(0.004886178193172272),
+LPF_TAPS(-0.004734648784556966),
+LPF_TAPS(0.004583564061959497),
+LPF_TAPS(-0.004433039485331523),
+LPF_TAPS(0.004283188548159220),
+LPF_TAPS(-0.004134122656386203),
+LPF_TAPS(0.003985951011435367),
+LPF_TAPS(-0.003838780497481271),
+LPF_TAPS(0.003692715573114637),
+LPF_TAPS(-0.003547858167533667),
+LPF_TAPS(0.003404307581384739),
+LPF_TAPS(-0.003262160392370767),
+LPF_TAPS(0.003121510365731586),
+LPF_TAPS(-0.002982448369694322),
+LPF_TAPS(0.002845062295982047),
+LPF_TAPS(-0.002709436985458192),
+LPF_TAPS(0.002575654158974950),
+LPF_TAPS(-0.002443792353486666),
+LPF_TAPS(0.002313926863475365),
+LPF_TAPS(-0.002186129687729117),
+LPF_TAPS(0.002060469481503738),
+LPF_TAPS(-0.001937011514087373),
+LPF_TAPS(0.001815817631778272),
+LPF_TAPS(-0.001696946226279024),
+LPF_TAPS(0.001580452208496668),
+LPF_TAPS(-0.001466386987732098),
+LPF_TAPS(0.001354798456232424),
+LPF_TAPS(-0.001245730979069404),
+LPF_TAPS(0.001139225389298675),
+LPF_TAPS(-0.001035318988347563),
+LPF_TAPS(0.000934045551568285),
+LPF_TAPS(-0.000835435338884242),
+LPF_TAPS(0.000739515110453974),
+LPF_TAPS(-0.000646308147261596),
+LPF_TAPS(0.000555834276542550),
+LPF_TAPS(-0.000468109901940947),
+LPF_TAPS(0.000383148038288759),
+LPF_TAPS(-0.000300958350891157),
+LPF_TAPS(0.000221547199195576),
+LPF_TAPS(-0.000144917684714879),
+LPF_TAPS(0.000071069703067951),
+LPF_TAPS(0.000000000000000002),
+LPF_TAPS(-0.000068297768767573),
+LPF_TAPS(0.000133832974005865),
+LPF_TAPS(-0.000196617945923104),
+LPF_TAPS(0.000256667903746495),
+LPF_TAPS(-0.000314000882103524),
+LPF_TAPS(0.000368637654371840),
+LPF_TAPS(-0.000420601653169192),
+LPF_TAPS(0.000469918888156992),
+LPF_TAPS(-0.000516617861333690),
+LPF_TAPS(0.000560729479997027),
+LPF_TAPS(-0.000602286967556683),
+LPF_TAPS(0.000641325772376801),
+LPF_TAPS(-0.000677883474834166),
+LPF_TAPS(0.000711999692773278),
+LPF_TAPS(-0.000743715985543212),
+LPF_TAPS(0.000773075756800786),
+LPF_TAPS(-0.000800124156261972),
+LPF_TAPS(0.000824907980585086),
+LPF_TAPS(-0.000847475573567521),
+LPF_TAPS(0.000867876725835767),
+LPF_TAPS(-0.000886162574206813),
+LPF_TAPS(0.000902385500897410),
+LPF_TAPS(-0.000916599032755622),
+LPF_TAPS(0.000928857740684235),
+LPF_TAPS(-0.000939217139425856),
+LPF_TAPS(0.000947733587872965),
+LPF_TAPS(-0.000954464190064709),
+LPF_TAPS(0.000959466697028092),
+LPF_TAPS(-0.000962799409615878),
+LPF_TAPS(0.000964521082490530),
+LPF_TAPS(-0.000964690829398553),
+LPF_TAPS(0.000963368029874411),
+LPF_TAPS(-0.000960612237508392),
+LPF_TAPS(0.000956483089907740),
+LPF_TAPS(-0.000951040220475200),
+LPF_TAPS(0.000944343172122701),
+LPF_TAPS(-0.000936451313033140),
+LPF_TAPS(0.000927423754577199),
+LPF_TAPS(-0.000917319271485603),
+LPF_TAPS(0.000906196224371776),
+LPF_TAPS(-0.000894112484693922),
+LPF_TAPS(0.000881125362238083),
+LPF_TAPS(-0.000867291535198970),
+LPF_TAPS(0.000852666982928181),
+LPF_TAPS(-0.000837306921412881),
+LPF_TAPS(0.000821265741542209),
+LPF_TAPS(-0.000804596950211894),
+LPF_TAPS(0.000787353114311179),
+LPF_TAPS(-0.000769585807629876),
+LPF_TAPS(0.000751345560716971),
+LPF_TAPS(-0.000732681813715889),
+LPF_TAPS(0.000713642872195338),
+LPF_TAPS(-0.000694275865988328),
+LPF_TAPS(0.000674626711046154),
+LPF_TAPS(-0.000654740074307908),
+LPF_TAPS(0.000634659341580137),
+LPF_TAPS(-0.000614426588415894),
+LPF_TAPS(0.000594082553976388),
+LPF_TAPS(-0.000573666617853055),
+LPF_TAPS(0.000553216779822720),
+LPF_TAPS(-0.000532769642503142),
+LPF_TAPS(0.000512360396871137),
+LPF_TAPS(-0.000492022810600967),
+LPF_TAPS(0.000471789219175841),
+LPF_TAPS(-0.000451690519720436),
+LPF_TAPS(0.000431756167499303),
+LPF_TAPS(-0.000412014175020649),
+LPF_TAPS(0.000392491113681583),
+LPF_TAPS(-0.000373212117887881),
+LPF_TAPS(0.000354200891577031),
+LPF_TAPS(-0.000335479717070286),
+LPF_TAPS(0.000317069466177310),
+LPF_TAPS(-0.000298989613472842),
+LPF_TAPS(0.000281258251663605),
+LPF_TAPS(-0.000263892108960412),
+LPF_TAPS(0.000246906568369384),
+LPF_TAPS(-0.000230315688813067),
+LPF_TAPS(0.000214132227991698),
+LPF_TAPS(-0.000198367666893488),
+LPF_TAPS(0.000183032235860659),
+LPF_TAPS(-0.000168134942118076),
+LPF_TAPS(0.000153683598670829),
+LPF_TAPS(-0.000139684854474777),
+LPF_TAPS(0.000126144225786715),
+LPF_TAPS(-0.000113066128598582),
+LPF_TAPS(0.000100453912060380),
+LPF_TAPS(-0.000088309892798977),
+LPF_TAPS(0.000076635390037745),
+LPF_TAPS(-0.000065430761424673),
+LPF_TAPS(0.000054695439477278),
+LPF_TAPS(-0.000044427968552949),
+LPF_TAPS(0.000034626042255596),
+LPF_TAPS(-0.000025286541190957),
+LPF_TAPS(0.000016405570983717),
+LPF_TAPS(-0.000007978500472509),
+LPF_TAPS(0.000000000000000000),
+LPF_TAPS(0.000007535920281846),
+LPF_TAPS(-0.000014635872169941),
+LPF_TAPS(0.000021307051307166),
+LPF_TAPS(-0.000027557199291414),
+LPF_TAPS(0.000033394566067721),
+LPF_TAPS(-0.000038827872671237),
+LPF_TAPS(0.000043866274386062),
+LPF_TAPS(-0.000048519324382749),
+LPF_TAPS(0.000052796937893741),
+LPF_TAPS(-0.000056709356982912),
+LPF_TAPS(0.000060267115963468),
+LPF_TAPS(-0.000063481007513722),
+LPF_TAPS(0.000066362049538439),
+LPF_TAPS(-0.000068921452820214),
+LPF_TAPS(0.000071170589501115),
+LPF_TAPS(-0.000073120962433157),
+LPF_TAPS(0.000074784175431958),
+LPF_TAPS(-0.000076171904465048),
+LPF_TAPS(0.000077295869803477),
+LPF_TAPS(-0.000078167809161870),
+LPF_TAPS(0.000078799451849036),
+LPF_TAPS(-0.000079202493948537),
+LPF_TAPS(0.000079388574545169),
+LPF_TAPS(-0.000079369253010717),
+LPF_TAPS(0.000079155987359147),
+LPF_TAPS(-0.000078760113678928),
+LPF_TAPS(0.000078192826647125),
+LPF_TAPS(-0.000077465161127258),
+LPF_TAPS(0.000076587974850560),
+LPF_TAPS(-0.000075571932177465),
+LPF_TAPS(0.000074427488933831),
+LPF_TAPS(-0.000073164878314178),
+LPF_TAPS(0.000071794097841849),
+LPF_TAPS(-0.000070324897373838),
+LPF_TAPS(0.000068766768136256),
+LPF_TAPS(-0.000067128932774100),
+LPF_TAPS(0.000065420336397474),
+LPF_TAPS(-0.000063649638604653),
+LPF_TAPS(0.000061825206460594),
+LPF_TAPS(-0.000059955108408308),
+LPF_TAPS(0.000058047109088909),
+LPF_TAPS(-0.000056108665045016),
+LPF_TAPS(0.000054146921281024),
+LPF_TAPS(-0.000052168708652737),
+LPF_TAPS(0.000050180542057917),
+LPF_TAPS(-0.000048188619398569),
+LPF_TAPS(0.000046198821285030),
+LPF_TAPS(-0.000044216711451398),
+LPF_TAPS(0.000042247537851347),
+LPF_TAPS(-0.000040296234403032),
+LPF_TAPS(0.000038367423351500),
+LPF_TAPS(-0.000036465418216909),
+LPF_TAPS(0.000034594227296746),
+LPF_TAPS(-0.000032757557690317),
+LPF_TAPS(0.000030958819813886),
+LPF_TAPS(-0.000029201132375049),
+LPF_TAPS(0.000027487327775239),
+LPF_TAPS(-0.000025819957909655),
+LPF_TAPS(0.000024201300334306),
+LPF_TAPS(-0.000022633364770453),
+LPF_TAPS(0.000021117899917293),
+LPF_TAPS(-0.000019656400544368),
+LPF_TAPS(0.000018250114835954),
+LPF_TAPS(-0.000016900051960385),
+LPF_TAPS(0.000015606989838136),
+LPF_TAPS(-0.000014371483083336),
+LPF_TAPS(0.000013193871094264),
+LPF_TAPS(-0.000012074286269341),
+LPF_TAPS(0.000011012662326106),
+LPF_TAPS(-0.000010008742701603),
+LPF_TAPS(0.000009062089013671),
+LPF_TAPS(-0.000008172089563650),
+LPF_TAPS(0.000007337967862007),
+LPF_TAPS(-0.000006558791159490),
+LPF_TAPS(0.000005833478967426),
+LPF_TAPS(-0.000005160811551841),
+LPF_TAPS(0.000004539438387109),
+LPF_TAPS(-0.000003967886555867),
+LPF_TAPS(0.000003444569082966),
+LPF_TAPS(-0.000002967793192163),
+LPF_TAPS(0.000002535768475343),
+LPF_TAPS(-0.000002146614964877),
+LPF_TAPS(0.000001798371100741),
+LPF_TAPS(-0.000001489001584895),
+LPF_TAPS(0.000001216405116219),
+LPF_TAPS(-0.000000978422000204),
+LPF_TAPS(0.000000772841628323),
+LPF_TAPS(-0.000000597409822761),
+LPF_TAPS(0.000000449836042893),
+LPF_TAPS(-0.000000327800450540),
+LPF_TAPS(0.000000228960831633),
+LPF_TAPS(-0.000000150959372505),
+LPF_TAPS(0.000000091429289498),
+LPF_TAPS(-0.000000048001311091),
+LPF_TAPS(0.000000018310012110),
+LPF_TAPS(0.000000000000000000),
+LPF_TAPS(-0.000000009268046592),
+LPF_TAPS(0.000000011811486367),
+LPF_TAPS(-0.000000009919970318),
+LPF_TAPS(0.000000005849842142),
+LPF_TAPS(-0.000000001818683069),
+LPF_TAPS(0.000000000000000000),
+};
diff --git a/core/sound/blip_lpf_384K_24K.h b/core/sound/blip_lpf_384K_24K.h
new file mode 100644
index 000000000..4ce080319
--- /dev/null
+++ b/core/sound/blip_lpf_384K_24K.h
@@ -0,0 +1,591 @@
+static buf_t const blip_lpf_384K_24K[blip_lpf_384K_taps] = {
+LPF_TAPS(0.000000000000000000),
+LPF_TAPS(-0.000000010873062592),
+LPF_TAPS(-0.000000044433940061),
+LPF_TAPS(-0.000000089256106800),
+LPF_TAPS(-0.000000119074580424),
+LPF_TAPS(-0.000000099778720099),
+LPF_TAPS(0.000000000000000000),
+LPF_TAPS(0.000000197123477448),
+LPF_TAPS(0.000000483913353528),
+LPF_TAPS(0.000000822645851364),
+LPF_TAPS(0.000001146649695244),
+LPF_TAPS(0.000001368850624164),
+LPF_TAPS(0.000001397075841614),
+LPF_TAPS(0.000001153882516618),
+LPF_TAPS(0.000000597409520936),
+LPF_TAPS(-0.000000260956550586),
+LPF_TAPS(-0.000001346271422868),
+LPF_TAPS(-0.000002520396942092),
+LPF_TAPS(-0.000003594766004492),
+LPF_TAPS(-0.000004355165268430),
+LPF_TAPS(-0.000004595851995894),
+LPF_TAPS(-0.000004158226808320),
+LPF_TAPS(-0.000002967791692768),
+LPF_TAPS(-0.000001062561235713),
+LPF_TAPS(0.000001393335763527),
+LPF_TAPS(0.000004115402656697),
+LPF_TAPS(0.000006725697160838),
+LPF_TAPS(0.000008799412983442),
+LPF_TAPS(0.000009926118931399),
+LPF_TAPS(0.000009777591229902),
+LPF_TAPS(0.000008172085434929),
+LPF_TAPS(0.000005124222565588),
+LPF_TAPS(0.000000870667867161),
+LPF_TAPS(-0.000004135526887174),
+LPF_TAPS(-0.000009264921034204),
+LPF_TAPS(-0.000013783975093675),
+LPF_TAPS(-0.000016952311588863),
+LPF_TAPS(-0.000018132931135849),
+LPF_TAPS(-0.000016900043422104),
+LPF_TAPS(-0.000013127866291288),
+LPF_TAPS(-0.000007044856417201),
+LPF_TAPS(0.000000758574386669),
+LPF_TAPS(0.000009375041913578),
+LPF_TAPS(0.000017676791840063),
+LPF_TAPS(0.000024455030013144),
+LPF_TAPS(0.000028585852155228),
+LPF_TAPS(0.000029201117621990),
+LPF_TAPS(0.000025839774290033),
+LPF_TAPS(0.000018555656501166),
+LPF_TAPS(0.000007961867914031),
+LPF_TAPS(-0.000004800760958373),
+LPF_TAPS(-0.000018173780752453),
+LPF_TAPS(-0.000030361303691115),
+LPF_TAPS(-0.000039560882481565),
+LPF_TAPS(-0.000044216689112137),
+LPF_TAPS(-0.000043260891228141),
+LPF_TAPS(-0.000036307841903594),
+LPF_TAPS(-0.000023769387926964),
+LPF_TAPS(-0.000006868137320104),
+LPF_TAPS(0.000012461924109274),
+LPF_TAPS(0.000031782989597605),
+LPF_TAPS(0.000048449010849361),
+LPF_TAPS(0.000059955078117661),
+LPF_TAPS(0.000064296035824224),
+LPF_TAPS(0.000060284909365420),
+LPF_TAPS(0.000047783451824105),
+LPF_TAPS(0.000027805700334601),
+LPF_TAPS(0.000002470165554645),
+LPF_TAPS(-0.000025204452027464),
+LPF_TAPS(-0.000051643692406506),
+LPF_TAPS(-0.000073164841349667),
+LPF_TAPS(-0.000086473339538773),
+LPF_TAPS(-0.000089143126997813),
+LPF_TAPS(-0.000080013419130200),
+LPF_TAPS(-0.000059441078730119),
+LPF_TAPS(-0.000029363338982690),
+LPF_TAPS(0.000006851400044803),
+LPF_TAPS(0.000044759314989653),
+LPF_TAPS(0.000079369212911613),
+LPF_TAPS(0.000105782560625035),
+LPF_TAPS(0.000119865590392991),
+LPF_TAPS(0.000118863704413853),
+LPF_TAPS(0.000101870220772043),
+LPF_TAPS(0.000070075546976098),
+LPF_TAPS(0.000026748002286040),
+LPF_TAPS(-0.000023069000488844),
+LPF_TAPS(-0.000073120925490834),
+LPF_TAPS(-0.000116707600123990),
+LPF_TAPS(-0.000147559204462142),
+LPF_TAPS(-0.000160710819459113),
+LPF_TAPS(-0.000153256631864033),
+LPF_TAPS(-0.000124873738820864),
+LPF_TAPS(-0.000078029916231798),
+LPF_TAPS(-0.000017827335238358),
+LPF_TAPS(0.000048519299869729),
+LPF_TAPS(0.000112522168650018),
+LPF_TAPS(0.000165483246898999),
+LPF_TAPS(0.000199650622682477),
+LPF_TAPS(0.000209317604100970),
+LPF_TAPS(0.000191712715464584),
+LPF_TAPS(0.000147547927809313),
+LPF_TAPS(0.000081130848127410),
+LPF_TAPS(-0.000000000000000002),
+LPF_TAPS(-0.000085895615387418),
+LPF_TAPS(-0.000165388708993206),
+LPF_TAPS(-0.000227518646599173),
+LPF_TAPS(-0.000263010769991375),
+LPF_TAPS(-0.000265614219035522),
+LPF_TAPS(-0.000233110348123005),
+LPF_TAPS(-0.000167837621839738),
+LPF_TAPS(-0.000076635351319839),
+LPF_TAPS(0.000029818586580912),
+LPF_TAPS(0.000138220758623487),
+LPF_TAPS(0.000234273533524654),
+LPF_TAPS(0.000304538946849493),
+LPF_TAPS(0.000338278693693145),
+LPF_TAPS(0.000329032958981615),
+LPF_TAPS(0.000275712562297710),
+LPF_TAPS(0.000183032143388698),
+LPF_TAPS(0.000061191338650244),
+LPF_TAPS(-0.000075193201011075),
+LPF_TAPS(-0.000208801555785383),
+LPF_TAPS(-0.000321774742052341),
+LPF_TAPS(-0.000398063601974186),
+LPF_TAPS(-0.000425658141654782),
+LPF_TAPS(-0.000398393435008102),
+LPF_TAPS(-0.000317069305986801),
+LPF_TAPS(-0.000189699387626334),
+LPF_TAPS(-0.000030812195298653),
+LPF_TAPS(0.000140150374400007),
+LPF_TAPS(0.000301168871912543),
+LPF_TAPS(0.000430441762402456),
+LPF_TAPS(0.000509290867158166),
+LPF_TAPS(0.000524795183039878),
+LPF_TAPS(0.000471788980817478),
+LPF_TAPS(0.000353927069933187),
+LPF_TAPS(0.000183630030415289),
+LPF_TAPS(-0.000019137575534522),
+LPF_TAPS(-0.000229149777363345),
+LPF_TAPS(-0.000419009939519924),
+LPF_TAPS(-0.000562677396245674),
+LPF_TAPS(-0.000638981997825178),
+LPF_TAPS(-0.000634659020936191),
+LPF_TAPS(-0.000546478704306668),
+LPF_TAPS(-0.000382145141436608),
+LPF_TAPS(-0.000159787721040352),
+LPF_TAPS(0.000093952819042894),
+LPF_TAPS(0.000347054805369461),
+LPF_TAPS(0.000566103286916117),
+LPF_TAPS(0.000720645397188631),
+LPF_TAPS(0.000787352716522965),
+LPF_TAPS(0.000753430069803305),
+LPF_TAPS(0.000618784830877275),
+LPF_TAPS(0.000396613352761790),
+LPF_TAPS(0.000112255681198712),
+LPF_TAPS(-0.000199607309825992),
+LPF_TAPS(-0.000499117172004200),
+LPF_TAPS(-0.000746270850545457),
+LPF_TAPS(-0.000906195766541403),
+LPF_TAPS(-0.000953979713424516),
+LPF_TAPS(-0.000878397084629140),
+LPF_TAPS(-0.000683990310445222),
+LPF_TAPS(-0.000391159551805093),
+LPF_TAPS(-0.000034162239368962),
+LPF_TAPS(0.000342803659229069),
+LPF_TAPS(0.000690997789610670),
+LPF_TAPS(0.000963367543159580),
+LPF_TAPS(0.001120822949094585),
+LPF_TAPS(0.001137729615627804),
+LPF_TAPS(0.001005861205368310),
+LPF_TAPS(0.000736224318739697),
+LPF_TAPS(0.000358424893452024),
+LPF_TAPS(-0.000082444039795107),
+LPF_TAPS(-0.000531086999098461),
+LPF_TAPS(-0.000928857271404751),
+LPF_TAPS(-0.001221336864993682),
+LPF_TAPS(-0.001365676324503511),
+LPF_TAPS(-0.001336716992459966),
+LPF_TAPS(-0.001131038398181634),
+LPF_TAPS(-0.000768311612478299),
+LPF_TAPS(-0.000289669015175886),
+LPF_TAPS(0.000246817785251053),
+LPF_TAPS(0.000773075366225870),
+LPF_TAPS(0.001219567077567143),
+LPF_TAPS(0.001524374544410374),
+LPF_TAPS(0.001641649248269317),
+LPF_TAPS(0.001548296595337379),
+LPF_TAPS(0.001247941340472507),
+LPF_TAPS(0.000771542416995697),
+LPF_TAPS(0.000174440415894133),
+LPF_TAPS(-0.000469918650743609),
+LPF_TAPS(-0.001078892858232290),
+LPF_TAPS(-0.001571122798593491),
+LPF_TAPS(-0.001877265645783939),
+LPF_TAPS(-0.001949585300513400),
+LPF_TAPS(-0.001769093234844250),
+LPF_TAPS(-0.001349204048643017),
+LPF_TAPS(-0.000735285897155893),
+LPF_TAPS(0.000000000000000010),
+LPF_TAPS(0.000765128221959373),
+LPF_TAPS(0.001460951819905955),
+LPF_TAPS(0.001993397141117926),
+LPF_TAPS(0.002286004476599548),
+LPF_TAPS(0.002290664423330716),
+LPF_TAPS(0.001995070580731165),
+LPF_TAPS(0.001425780490409142),
+LPF_TAPS(0.000646307820732324),
+LPF_TAPS(-0.000249703568309774),
+LPF_TAPS(-0.001149527220523168),
+LPF_TAPS(-0.001935346637858005),
+LPF_TAPS(-0.002499479880257908),
+LPF_TAPS(-0.002758893782458384),
+LPF_TAPS(-0.002667080636341654),
+LPF_TAPS(-0.002221637864557989),
+LPF_TAPS(-0.001466386246880898),
+LPF_TAPS(-0.000487528980025600),
+LPF_TAPS(0.000595887970224335),
+LPF_TAPS(0.001646199390461799),
+LPF_TAPS(0.002524361277280395),
+LPF_TAPS(0.003108080445438140),
+LPF_TAPS(0.003308503465377861),
+LPF_TAPS(0.003083228413154061),
+LPF_TAPS(0.002443791118828701),
+LPF_TAPS(0.001456421929056373),
+LPF_TAPS(0.000235695910232274),
+LPF_TAPS(-0.001068391209347100),
+LPF_TAPS(-0.002288511968112811),
+LPF_TAPS(-0.003261121836683584),
+LPF_TAPS(-0.003847978604827186),
+LPF_TAPS(-0.003955283855420899),
+LPF_TAPS(-0.003547856375077202),
+LPF_TAPS(-0.002656283356645106),
+LPF_TAPS(-0.001375819411131076),
+LPF_TAPS(0.000143179026116892),
+LPF_TAPS(0.001712408807641796),
+LPF_TAPS(0.003128469600049731),
+LPF_TAPS(0.004198694437944632),
+LPF_TAPS(0.004766745086702058),
+LPF_TAPS(0.004734646392507615),
+LPF_TAPS(0.004078247892247627),
+LPF_TAPS(0.002853816134047740),
+LPF_TAPS(0.001194502525004682),
+LPF_TAPS(-0.000703320606742842),
+LPF_TAPS(-0.002602559649764842),
+LPF_TAPS(-0.004254244313217478),
+LPF_TAPS(-0.005429297774939240),
+LPF_TAPS(-0.005949280105649362),
+LPF_TAPS(-0.005712100682603256),
+LPF_TAPS(-0.004709151641029054),
+LPF_TAPS(-0.003031243380414721),
+LPF_TAPS(-0.000862027749786030),
+LPF_TAPS(0.001540873728568918),
+LPF_TAPS(0.003875243788312313),
+LPF_TAPS(0.005830930222998419),
+LPF_TAPS(0.007129494654255819),
+LPF_TAPS(0.007561956900417036),
+LPF_TAPS(0.007019735856192181),
+LPF_TAPS(0.005514495324598487),
+LPF_TAPS(0.003183777342981615),
+LPF_TAPS(0.000280926205451193),
+LPF_TAPS(-0.002850306791123200),
+LPF_TAPS(-0.005814155812879863),
+LPF_TAPS(-0.008210166807360992),
+LPF_TAPS(-0.009684066391535082),
+LPF_TAPS(-0.009976049037200873),
+LPF_TAPS(-0.008960337000324321),
+LPF_TAPS(-0.006670593158430466),
+LPF_TAPS(-0.003307186049262837),
+LPF_TAPS(0.000775720420812459),
+LPF_TAPS(0.005102964497395414),
+LPF_TAPS(0.009128386246455083),
+LPF_TAPS(0.012297147197125468),
+LPF_TAPS(0.014113759174320867),
+LPF_TAPS(0.014208175048013237),
+LPF_TAPS(0.012392100465967349),
+LPF_TAPS(0.008698392373932410),
+LPF_TAPS(0.003397971886552389),
+LPF_TAPS(-0.003009050437933545),
+LPF_TAPS(-0.009828592925171522),
+LPF_TAPS(-0.016231795109683190),
+LPF_TAPS(-0.021333035035610928),
+LPF_TAPS(-0.024279308494577493),
+LPF_TAPS(-0.024341934238586781),
+LPF_TAPS(-0.021000916877291515),
+LPF_TAPS(-0.014012706131845489),
+LPF_TAPS(-0.003453521729232617),
+LPF_TAPS(0.010267263187954912),
+LPF_TAPS(0.026426203927856780),
+LPF_TAPS(0.044036523533624770),
+LPF_TAPS(0.061926377607317312),
+LPF_TAPS(0.078837557650514617),
+LPF_TAPS(0.093535285832901924),
+LPF_TAPS(0.104918443411417636),
+LPF_TAPS(0.112119366971203394),
+LPF_TAPS(0.114583275453318756),
+LPF_TAPS(0.112119366971203394),
+LPF_TAPS(0.104918443411417650),
+LPF_TAPS(0.093535285832901924),
+LPF_TAPS(0.078837557650514617),
+LPF_TAPS(0.061926377607317312),
+LPF_TAPS(0.044036523533624770),
+LPF_TAPS(0.026426203927856780),
+LPF_TAPS(0.010267263187954912),
+LPF_TAPS(-0.003453521729232617),
+LPF_TAPS(-0.014012706131845489),
+LPF_TAPS(-0.021000916877291515),
+LPF_TAPS(-0.024341934238586785),
+LPF_TAPS(-0.024279308494577493),
+LPF_TAPS(-0.021333035035610928),
+LPF_TAPS(-0.016231795109683190),
+LPF_TAPS(-0.009828592925171522),
+LPF_TAPS(-0.003009050437933545),
+LPF_TAPS(0.003397971886552389),
+LPF_TAPS(0.008698392373932410),
+LPF_TAPS(0.012392100465967353),
+LPF_TAPS(0.014208175048013239),
+LPF_TAPS(0.014113759174320867),
+LPF_TAPS(0.012297147197125468),
+LPF_TAPS(0.009128386246455084),
+LPF_TAPS(0.005102964497395414),
+LPF_TAPS(0.000775720420812459),
+LPF_TAPS(-0.003307186049262837),
+LPF_TAPS(-0.006670593158430466),
+LPF_TAPS(-0.008960337000324321),
+LPF_TAPS(-0.009976049037200873),
+LPF_TAPS(-0.009684066391535082),
+LPF_TAPS(-0.008210166807360992),
+LPF_TAPS(-0.005814155812879864),
+LPF_TAPS(-0.002850306791123202),
+LPF_TAPS(0.000280926205451193),
+LPF_TAPS(0.003183777342981615),
+LPF_TAPS(0.005514495324598487),
+LPF_TAPS(0.007019735856192181),
+LPF_TAPS(0.007561956900417038),
+LPF_TAPS(0.007129494654255819),
+LPF_TAPS(0.005830930222998419),
+LPF_TAPS(0.003875243788312314),
+LPF_TAPS(0.001540873728568918),
+LPF_TAPS(-0.000862027749786030),
+LPF_TAPS(-0.003031243380414722),
+LPF_TAPS(-0.004709151641029054),
+LPF_TAPS(-0.005712100682603258),
+LPF_TAPS(-0.005949280105649362),
+LPF_TAPS(-0.005429297774939240),
+LPF_TAPS(-0.004254244313217479),
+LPF_TAPS(-0.002602559649764842),
+LPF_TAPS(-0.000703320606742842),
+LPF_TAPS(0.001194502525004682),
+LPF_TAPS(0.002853816134047741),
+LPF_TAPS(0.004078247892247627),
+LPF_TAPS(0.004734646392507617),
+LPF_TAPS(0.004766745086702059),
+LPF_TAPS(0.004198694437944634),
+LPF_TAPS(0.003128469600049731),
+LPF_TAPS(0.001712408807641796),
+LPF_TAPS(0.000143179026116892),
+LPF_TAPS(-0.001375819411131076),
+LPF_TAPS(-0.002656283356645106),
+LPF_TAPS(-0.003547856375077202),
+LPF_TAPS(-0.003955283855420901),
+LPF_TAPS(-0.003847978604827186),
+LPF_TAPS(-0.003261121836683586),
+LPF_TAPS(-0.002288511968112812),
+LPF_TAPS(-0.001068391209347100),
+LPF_TAPS(0.000235695910232274),
+LPF_TAPS(0.001456421929056373),
+LPF_TAPS(0.002443791118828701),
+LPF_TAPS(0.003083228413154060),
+LPF_TAPS(0.003308503465377862),
+LPF_TAPS(0.003108080445438140),
+LPF_TAPS(0.002524361277280396),
+LPF_TAPS(0.001646199390461799),
+LPF_TAPS(0.000595887970224335),
+LPF_TAPS(-0.000487528980025600),
+LPF_TAPS(-0.001466386246880898),
+LPF_TAPS(-0.002221637864557990),
+LPF_TAPS(-0.002667080636341652),
+LPF_TAPS(-0.002758893782458385),
+LPF_TAPS(-0.002499479880257908),
+LPF_TAPS(-0.001935346637858006),
+LPF_TAPS(-0.001149527220523168),
+LPF_TAPS(-0.000249703568309774),
+LPF_TAPS(0.000646307820732324),
+LPF_TAPS(0.001425780490409142),
+LPF_TAPS(0.001995070580731166),
+LPF_TAPS(0.002290664423330716),
+LPF_TAPS(0.002286004476599548),
+LPF_TAPS(0.001993397141117926),
+LPF_TAPS(0.001460951819905955),
+LPF_TAPS(0.000765128221959373),
+LPF_TAPS(0.000000000000000010),
+LPF_TAPS(-0.000735285897155893),
+LPF_TAPS(-0.001349204048643017),
+LPF_TAPS(-0.001769093234844250),
+LPF_TAPS(-0.001949585300513400),
+LPF_TAPS(-0.001877265645783941),
+LPF_TAPS(-0.001571122798593491),
+LPF_TAPS(-0.001078892858232290),
+LPF_TAPS(-0.000469918650743609),
+LPF_TAPS(0.000174440415894133),
+LPF_TAPS(0.000771542416995697),
+LPF_TAPS(0.001247941340472507),
+LPF_TAPS(0.001548296595337380),
+LPF_TAPS(0.001641649248269319),
+LPF_TAPS(0.001524374544410374),
+LPF_TAPS(0.001219567077567144),
+LPF_TAPS(0.000773075366225870),
+LPF_TAPS(0.000246817785251053),
+LPF_TAPS(-0.000289669015175886),
+LPF_TAPS(-0.000768311612478299),
+LPF_TAPS(-0.001131038398181634),
+LPF_TAPS(-0.001336716992459966),
+LPF_TAPS(-0.001365676324503511),
+LPF_TAPS(-0.001221336864993683),
+LPF_TAPS(-0.000928857271404751),
+LPF_TAPS(-0.000531086999098461),
+LPF_TAPS(-0.000082444039795107),
+LPF_TAPS(0.000358424893452024),
+LPF_TAPS(0.000736224318739697),
+LPF_TAPS(0.001005861205368311),
+LPF_TAPS(0.001137729615627805),
+LPF_TAPS(0.001120822949094585),
+LPF_TAPS(0.000963367543159579),
+LPF_TAPS(0.000690997789610670),
+LPF_TAPS(0.000342803659229069),
+LPF_TAPS(-0.000034162239368962),
+LPF_TAPS(-0.000391159551805093),
+LPF_TAPS(-0.000683990310445222),
+LPF_TAPS(-0.000878397084629141),
+LPF_TAPS(-0.000953979713424516),
+LPF_TAPS(-0.000906195766541403),
+LPF_TAPS(-0.000746270850545458),
+LPF_TAPS(-0.000499117172004201),
+LPF_TAPS(-0.000199607309825992),
+LPF_TAPS(0.000112255681198712),
+LPF_TAPS(0.000396613352761790),
+LPF_TAPS(0.000618784830877275),
+LPF_TAPS(0.000753430069803305),
+LPF_TAPS(0.000787352716522965),
+LPF_TAPS(0.000720645397188631),
+LPF_TAPS(0.000566103286916117),
+LPF_TAPS(0.000347054805369461),
+LPF_TAPS(0.000093952819042894),
+LPF_TAPS(-0.000159787721040352),
+LPF_TAPS(-0.000382145141436609),
+LPF_TAPS(-0.000546478704306668),
+LPF_TAPS(-0.000634659020936191),
+LPF_TAPS(-0.000638981997825179),
+LPF_TAPS(-0.000562677396245674),
+LPF_TAPS(-0.000419009939519924),
+LPF_TAPS(-0.000229149777363346),
+LPF_TAPS(-0.000019137575534522),
+LPF_TAPS(0.000183630030415289),
+LPF_TAPS(0.000353927069933187),
+LPF_TAPS(0.000471788980817478),
+LPF_TAPS(0.000524795183039879),
+LPF_TAPS(0.000509290867158167),
+LPF_TAPS(0.000430441762402456),
+LPF_TAPS(0.000301168871912543),
+LPF_TAPS(0.000140150374400007),
+LPF_TAPS(-0.000030812195298653),
+LPF_TAPS(-0.000189699387626334),
+LPF_TAPS(-0.000317069305986801),
+LPF_TAPS(-0.000398393435008102),
+LPF_TAPS(-0.000425658141654782),
+LPF_TAPS(-0.000398063601974186),
+LPF_TAPS(-0.000321774742052341),
+LPF_TAPS(-0.000208801555785383),
+LPF_TAPS(-0.000075193201011075),
+LPF_TAPS(0.000061191338650244),
+LPF_TAPS(0.000183032143388699),
+LPF_TAPS(0.000275712562297710),
+LPF_TAPS(0.000329032958981615),
+LPF_TAPS(0.000338278693693145),
+LPF_TAPS(0.000304538946849494),
+LPF_TAPS(0.000234273533524654),
+LPF_TAPS(0.000138220758623487),
+LPF_TAPS(0.000029818586580912),
+LPF_TAPS(-0.000076635351319839),
+LPF_TAPS(-0.000167837621839738),
+LPF_TAPS(-0.000233110348123005),
+LPF_TAPS(-0.000265614219035522),
+LPF_TAPS(-0.000263010769991375),
+LPF_TAPS(-0.000227518646599173),
+LPF_TAPS(-0.000165388708993206),
+LPF_TAPS(-0.000085895615387418),
+LPF_TAPS(-0.000000000000000002),
+LPF_TAPS(0.000081130848127410),
+LPF_TAPS(0.000147547927809313),
+LPF_TAPS(0.000191712715464584),
+LPF_TAPS(0.000209317604100970),
+LPF_TAPS(0.000199650622682477),
+LPF_TAPS(0.000165483246899000),
+LPF_TAPS(0.000112522168650018),
+LPF_TAPS(0.000048519299869729),
+LPF_TAPS(-0.000017827335238358),
+LPF_TAPS(-0.000078029916231798),
+LPF_TAPS(-0.000124873738820864),
+LPF_TAPS(-0.000153256631864033),
+LPF_TAPS(-0.000160710819459113),
+LPF_TAPS(-0.000147559204462142),
+LPF_TAPS(-0.000116707600123990),
+LPF_TAPS(-0.000073120925490834),
+LPF_TAPS(-0.000023069000488844),
+LPF_TAPS(0.000026748002286040),
+LPF_TAPS(0.000070075546976099),
+LPF_TAPS(0.000101870220772043),
+LPF_TAPS(0.000118863704413853),
+LPF_TAPS(0.000119865590392991),
+LPF_TAPS(0.000105782560625035),
+LPF_TAPS(0.000079369212911613),
+LPF_TAPS(0.000044759314989653),
+LPF_TAPS(0.000006851400044803),
+LPF_TAPS(-0.000029363338982690),
+LPF_TAPS(-0.000059441078730119),
+LPF_TAPS(-0.000080013419130200),
+LPF_TAPS(-0.000089143126997813),
+LPF_TAPS(-0.000086473339538773),
+LPF_TAPS(-0.000073164841349667),
+LPF_TAPS(-0.000051643692406506),
+LPF_TAPS(-0.000025204452027464),
+LPF_TAPS(0.000002470165554645),
+LPF_TAPS(0.000027805700334601),
+LPF_TAPS(0.000047783451824105),
+LPF_TAPS(0.000060284909365420),
+LPF_TAPS(0.000064296035824224),
+LPF_TAPS(0.000059955078117661),
+LPF_TAPS(0.000048449010849361),
+LPF_TAPS(0.000031782989597605),
+LPF_TAPS(0.000012461924109274),
+LPF_TAPS(-0.000006868137320104),
+LPF_TAPS(-0.000023769387926964),
+LPF_TAPS(-0.000036307841903594),
+LPF_TAPS(-0.000043260891228141),
+LPF_TAPS(-0.000044216689112137),
+LPF_TAPS(-0.000039560882481565),
+LPF_TAPS(-0.000030361303691115),
+LPF_TAPS(-0.000018173780752453),
+LPF_TAPS(-0.000004800760958373),
+LPF_TAPS(0.000007961867914031),
+LPF_TAPS(0.000018555656501166),
+LPF_TAPS(0.000025839774290034),
+LPF_TAPS(0.000029201117621990),
+LPF_TAPS(0.000028585852155228),
+LPF_TAPS(0.000024455030013144),
+LPF_TAPS(0.000017676791840063),
+LPF_TAPS(0.000009375041913578),
+LPF_TAPS(0.000000758574386669),
+LPF_TAPS(-0.000007044856417201),
+LPF_TAPS(-0.000013127866291288),
+LPF_TAPS(-0.000016900043422104),
+LPF_TAPS(-0.000018132931135849),
+LPF_TAPS(-0.000016952311588863),
+LPF_TAPS(-0.000013783975093675),
+LPF_TAPS(-0.000009264921034204),
+LPF_TAPS(-0.000004135526887174),
+LPF_TAPS(0.000000870667867161),
+LPF_TAPS(0.000005124222565588),
+LPF_TAPS(0.000008172085434929),
+LPF_TAPS(0.000009777591229902),
+LPF_TAPS(0.000009926118931399),
+LPF_TAPS(0.000008799412983442),
+LPF_TAPS(0.000006725697160838),
+LPF_TAPS(0.000004115402656697),
+LPF_TAPS(0.000001393335763527),
+LPF_TAPS(-0.000001062561235713),
+LPF_TAPS(-0.000002967791692768),
+LPF_TAPS(-0.000004158226808320),
+LPF_TAPS(-0.000004595851995894),
+LPF_TAPS(-0.000004355165268430),
+LPF_TAPS(-0.000003594766004492),
+LPF_TAPS(-0.000002520396942092),
+LPF_TAPS(-0.000001346271422868),
+LPF_TAPS(-0.000000260956550586),
+LPF_TAPS(0.000000597409520936),
+LPF_TAPS(0.000001153882516618),
+LPF_TAPS(0.000001397075841614),
+LPF_TAPS(0.000001368850624164),
+LPF_TAPS(0.000001146649695244),
+LPF_TAPS(0.000000822645851364),
+LPF_TAPS(0.000000483913353528),
+LPF_TAPS(0.000000197123477448),
+LPF_TAPS(0.000000000000000000),
+LPF_TAPS(-0.000000099778720099),
+LPF_TAPS(-0.000000119074580424),
+LPF_TAPS(-0.000000089256106800),
+LPF_TAPS(-0.000000044433940061),
+LPF_TAPS(-0.000000010873062592),
+LPF_TAPS(0.000000000000000000),
+};
diff --git a/core/sound/blip_lpf_384K_48K.h b/core/sound/blip_lpf_384K_48K.h
new file mode 100644
index 000000000..5f729dd72
--- /dev/null
+++ b/core/sound/blip_lpf_384K_48K.h
@@ -0,0 +1,591 @@
+static buf_t const blip_lpf_384K_48K[blip_lpf_384K_taps] = {
+LPF_TAPS(0.000000000000000000),
+LPF_TAPS(0.000000006503202820),
+LPF_TAPS(-0.000000005849842015),
+LPF_TAPS(-0.000000078233669747),
+LPF_TAPS(-0.000000180208454089),
+LPF_TAPS(-0.000000193635170079),
+LPF_TAPS(0.000000000000000000),
+LPF_TAPS(0.000000382546880181),
+LPF_TAPS(0.000000732358468462),
+LPF_TAPS(0.000000721055467933),
+LPF_TAPS(0.000000150959369216),
+LPF_TAPS(-0.000000818712590339),
+LPF_TAPS(-0.000001647964114635),
+LPF_TAPS(-0.000001682261877696),
+LPF_TAPS(-0.000000597409809747),
+LPF_TAPS(0.000001255026676517),
+LPF_TAPS(0.000002882338204170),
+LPF_TAPS(0.000003145434327730),
+LPF_TAPS(0.000001489001552458),
+LPF_TAPS(-0.000001534929736759),
+LPF_TAPS(-0.000004352904447252),
+LPF_TAPS(-0.000005147636573837),
+LPF_TAPS(-0.000002967793127511),
+LPF_TAPS(0.000001481210903335),
+LPF_TAPS(0.000005938361755751),
+LPF_TAPS(0.000007689232639407),
+LPF_TAPS(0.000005160811439416),
+LPF_TAPS(-0.000000901303542104),
+LPF_TAPS(-0.000007478867784236),
+LPF_TAPS(-0.000010728673861079),
+LPF_TAPS(-0.000008172089385626),
+LPF_TAPS(-0.000000406244457850),
+LPF_TAPS(0.000008777431582245),
+LPF_TAPS(0.000014177858864022),
+LPF_TAPS(0.000012074286006310),
+LPF_TAPS(0.000002644067905706),
+LPF_TAPS(-0.000009602717782315),
+LPF_TAPS(-0.000017898314581276),
+LPF_TAPS(-0.000016900051592227),
+LPF_TAPS(-0.000006007031232565),
+LPF_TAPS(0.000009693463809528),
+LPF_TAPS(0.000021698487437919),
+LPF_TAPS(0.000022633364277399),
+LPF_TAPS(0.000010672062517435),
+LPF_TAPS(-0.000008764694485172),
+LPF_TAPS(-0.000025332465809854),
+LPF_TAPS(-0.000029201131738919),
+LPF_TAPS(-0.000016786881125153),
+LPF_TAPS(0.000006515883207812),
+LPF_TAPS(0.000028500473714422),
+LPF_TAPS(0.000036465417422531),
+LPF_TAPS(0.000024457806196456),
+LPF_TAPS(-0.000002641154683653),
+LPF_TAPS(-0.000030851477633416),
+LPF_TAPS(-0.000044216710488163),
+LPF_TAPS(-0.000033736922293091),
+LPF_TAPS(-0.000003158448914863),
+LPF_TAPS(0.000031988230255699),
+LPF_TAPS(0.000052168707516273),
+LPF_TAPS(0.000044608971706441),
+LPF_TAPS(0.000011160707151486),
+LPF_TAPS(-0.000031475034442276),
+LPF_TAPS(-0.000059955107102222),
+LPF_TAPS(-0.000056978435359620),
+LPF_TAPS(-0.000021606140428787),
+LPF_TAPS(0.000028848446583500),
+LPF_TAPS(0.000067128931311735),
+LPF_TAPS(0.000070657350418120),
+LPF_TAPS(0.000034680400720536),
+LPF_TAPS(-0.000023631050649621),
+LPF_TAPS(-0.000073164876720327),
+LPF_TAPS(-0.000085354486947704),
+LPF_TAPS(-0.000050495549607254),
+LPF_TAPS(0.000015348323840559),
+LPF_TAPS(0.000077465159439725),
+LPF_TAPS(0.000100666562503584),
+LPF_TAPS(0.000069070764414392),
+LPF_TAPS(-0.000003548484364012),
+LPF_TAPS(-0.000079369251281705),
+LPF_TAPS(-0.000116072206993584),
+LPF_TAPS(-0.000090313133322722),
+LPF_TAPS(-0.000012174934625460),
+LPF_TAPS(0.000078167807459032),
+LPF_TAPS(0.000130929395731458),
+LPF_TAPS(0.000113999308692182),
+LPF_TAPS(0.000032158198421559),
+LPF_TAPS(-0.000073120960840263),
+LPF_TAPS(-0.000144477042387634),
+LPF_TAPS(-0.000139758877768490),
+LPF_TAPS(-0.000056640747389047),
+LPF_TAPS(0.000063481006130816),
+LPF_TAPS(0.000155841382823267),
+LPF_TAPS(0.000167060374901225),
+LPF_TAPS(0.000085737572960195),
+LPF_TAPS(-0.000048519323325795),
+LPF_TAPS(-0.000164047684222058),
+LPF_TAPS(-0.000195200893423035),
+LPF_TAPS(-0.000119411479655871),
+LPF_TAPS(0.000027557198691092),
+LPF_TAPS(0.000168037681742167),
+LPF_TAPS(0.000223300253335332),
+LPF_TAPS(0.000157446252670375),
+LPF_TAPS(-0.000000000000000003),
+LPF_TAPS(-0.000166692979005046),
+LPF_TAPS(-0.000250300639021611),
+LPF_TAPS(-0.000199421858038953),
+LPF_TAPS(-0.000034626041501284),
+LPF_TAPS(0.000158864452745100),
+LPF_TAPS(0.000274972536933227),
+LPF_TAPS(0.000244692877132379),
+LPF_TAPS(0.000076635388368275),
+LPF_TAPS(-0.000143407481172504),
+LPF_TAPS(-0.000295927675818274),
+LPF_TAPS(-0.000292371412661462),
+LPF_TAPS(-0.000126144223038756),
+LPF_TAPS(0.000119222576930763),
+LPF_TAPS(0.000311639502691372),
+LPF_TAPS(0.000341315694158472),
+LPF_TAPS(0.000183032231873393),
+LPF_TAPS(-0.000085300757219496),
+LPF_TAPS(-0.000320471519403484),
+LPF_TAPS(-0.000390125553156118),
+LPF_TAPS(-0.000246906562990679),
+LPF_TAPS(0.000040772735080986),
+LPF_TAPS(0.000320713562342054),
+LPF_TAPS(0.000437145829897804),
+LPF_TAPS(0.000317069459270137),
+LPF_TAPS(0.000015039222807827),
+LPF_TAPS(-0.000310625838317288),
+LPF_TAPS(-0.000480478614259649),
+LPF_TAPS(-0.000392491105131392),
+LPF_TAPS(-0.000082568144639632),
+LPF_TAPS(0.000288490241628356),
+LPF_TAPS(0.000518005015648909),
+LPF_TAPS(0.000471789208898184),
+LPF_TAPS(0.000161949468098235),
+LPF_TAPS(-0.000252668180692344),
+LPF_TAPS(-0.000547416904163501),
+LPF_TAPS(-0.000553216767771218),
+LPF_TAPS(-0.000252970126618144),
+LPF_TAPS(0.000201663848670586),
+LPF_TAPS(0.000566258774624573),
+LPF_TAPS(0.000634659327754457),
+LPF_TAPS(0.000355021407836447),
+LPF_TAPS(-0.000134191593268466),
+LPF_TAPS(-0.000571979564666246),
+LPF_TAPS(-0.000713642856649047),
+LPF_TAPS(-0.000467057421066836),
+LPF_TAPS(0.000049245788747453),
+LPF_TAPS(0.000561993918193049),
+LPF_TAPS(0.000787353097159156),
+LPF_TAPS(0.000587560981677088),
+LPF_TAPS(0.000053828599419581),
+LPF_TAPS(-0.000533752038109352),
+LPF_TAPS(-0.000852666964353335),
+LPF_TAPS(-0.000714518621550615),
+LPF_TAPS(-0.000175266727942945),
+LPF_TAPS(0.000484816930467727),
+LPF_TAPS(0.000906196204630836),
+LPF_TAPS(0.000845406263993468),
+LPF_TAPS(0.000314817936404181),
+LPF_TAPS(-0.000412947520140350),
+LPF_TAPS(-0.000944343151550742),
+LPF_TAPS(-0.000977186858435632),
+LPF_TAPS(-0.000471685250588915),
+LPF_TAPS(0.000316185830334019),
+LPF_TAPS(0.000963368008888017),
+LPF_TAPS(0.001106320957296740),
+LPF_TAPS(0.000644472369103502),
+LPF_TAPS(-0.000192946179359307),
+LPF_TAPS(-0.000959466676126703),
+LPF_TAPS(-0.001228790838834765),
+LPF_TAPS(-0.000831140031646361),
+LPF_TAPS(0.000042104172341939),
+LPF_TAPS(0.000928857720449613),
+LPF_TAPS(0.001340138341942271),
+LPF_TAPS(0.001028973432376992),
+LPF_TAPS(0.000136916833243533),
+LPF_TAPS(-0.000867876706929601),
+LPF_TAPS(-0.001435516089365050),
+LPF_TAPS(-0.001234562010518128),
+LPF_TAPS(-0.000344064118248697),
+LPF_TAPS(0.000773075739959831),
+LPF_TAPS(0.001509751243047028),
+LPF_TAPS(0.001443792519769963),
+LPF_TAPS(0.000578581085490012),
+LPF_TAPS(-0.000641325758405910),
+LPF_TAPS(-0.001557420367308325),
+LPF_TAPS(-0.001651855745334937),
+LPF_TAPS(-0.000838941865677717),
+LPF_TAPS(0.000469918877920107),
+LPF_TAPS(0.001572933378730220),
+LPF_TAPS(0.001853266597735595),
+LPF_TAPS(0.001122796740918288),
+LPF_TAPS(-0.000256667898155195),
+LPF_TAPS(-0.001550623938785613),
+LPF_TAPS(-0.002041896557519943),
+LPF_TAPS(-0.001426929605946781),
+LPF_TAPS(0.000000000000000014),
+LPF_TAPS(0.001484842993021157),
+LPF_TAPS(0.002211016558072698),
+LPF_TAPS(0.001747228052000544),
+LPF_TAPS(0.000300958344334903),
+LPF_TAPS(-0.001370051465454246),
+LPF_TAPS(-0.002353347345416942),
+LPF_TAPS(-0.002078665835068547),
+LPF_TAPS(-0.000646308133182089),
+LPF_TAPS(0.001200907349311346),
+LPF_TAPS(0.002461113092179670),
+LPF_TAPS(0.002415296435696646),
+LPF_TAPS(0.001035318965793742),
+LPF_TAPS(-0.000972341540733622),
+LPF_TAPS(-0.002526092479366909),
+LPF_TAPS(-0.002750255061253166),
+LPF_TAPS(-0.001466386955787689),
+LPF_TAPS(0.000679615646265460),
+LPF_TAPS(0.002539659445857668),
+LPF_TAPS(0.003075764667526174),
+LPF_TAPS(0.001937011471890712),
+LPF_TAPS(-0.000318353499249274),
+LPF_TAPS(-0.002492803093762833),
+LPF_TAPS(-0.003383139191049453),
+LPF_TAPS(-0.002443792300250093),
+LPF_TAPS(-0.000115464020033783),
+LPF_TAPS(0.002376112412446640),
+LPF_TAPS(0.003662773859520006),
+LPF_TAPS(0.002982448304723403),
+LPF_TAPS(0.000625554495446453),
+LPF_TAPS(-0.002179705840164981),
+LPF_TAPS(-0.003904107624531098),
+LPF_TAPS(-0.003547858090245656),
+LPF_TAPS(-0.001215458531635024),
+LPF_TAPS(0.001893077002631478),
+LPF_TAPS(0.004095535459895290),
+LPF_TAPS(0.004134122566326785),
+LPF_TAPS(0.001888760328101881),
+LPF_TAPS(-0.001504814100223794),
+LPF_TAPS(-0.004224236740519411),
+LPF_TAPS(-0.004734648681415416),
+LPF_TAPS(-0.002649445068584514),
+LPF_TAPS(0.001002127444257027),
+LPF_TAPS(0.004275866942694263),
+LPF_TAPS(0.005342252973877862),
+LPF_TAPS(0.003502457765705811),
+LPF_TAPS(-0.000370080198385793),
+LPF_TAPS(-0.004234027361415646),
+LPF_TAPS(-0.005949282981757201),
+LPF_TAPS(-0.004454570661594240),
+LPF_TAPS(-0.000409652959545898),
+LPF_TAPS(0.004079369292625890),
+LPF_TAPS(0.006547753991151824),
+LPF_TAPS(0.005515744756444054),
+LPF_TAPS(0.001360805311569260),
+LPF_TAPS(-0.003788080011994879),
+LPF_TAPS(-0.007129498100924165),
+LPF_TAPS(-0.006701322514199400),
+LPF_TAPS(-0.002515876697475453),
+LPF_TAPS(0.003329282790038720),
+LPF_TAPS(0.007686322156860501),
+LPF_TAPS(0.008035696758406874),
+LPF_TAPS(0.003921917508260477),
+LPF_TAPS(-0.002660433522403174),
+LPF_TAPS(-0.008210170776467280),
+LPF_TAPS(-0.009558767162523707),
+LPF_TAPS(-0.005650980574808982),
+LPF_TAPS(0.001718788616915996),
+LPF_TAPS(0.008693290458632130),
+LPF_TAPS(0.011338051552494286),
+LPF_TAPS(0.007820241423214368),
+LPF_TAPS(-0.000404559134412800),
+LPF_TAPS(-0.009128390659463513),
+LPF_TAPS(-0.013493311245838014),
+LPF_TAPS(-0.010634059447887700),
+LPF_TAPS(-0.001455310544204177),
+LPF_TAPS(0.009508797722194937),
+LPF_TAPS(0.016252106569250600),
+LPF_TAPS(0.014482070170325378),
+LPF_TAPS(0.004194617841823830),
+LPF_TAPS(-0.009828597676686424),
+LPF_TAPS(-0.020093993429713325),
+LPF_TAPS(-0.020205320615819689),
+LPF_TAPS(-0.008556973225887702),
+LPF_TAPS(0.010082764170405253),
+LPF_TAPS(0.026208968816161637),
+LPF_TAPS(0.030000902894892705),
+LPF_TAPS(0.016609132395323946),
+LPF_TAPS(-0.010267268151539673),
+LPF_TAPS(-0.038527141888178663),
+LPF_TAPS(-0.051944646349938214),
+LPF_TAPS(-0.037038303614902512),
+LPF_TAPS(0.010379166386061156),
+LPF_TAPS(0.081984403352501831),
+LPF_TAPS(0.158784439342286088),
+LPF_TAPS(0.217583996578812361),
+LPF_TAPS(0.239583328135104134),
+LPF_TAPS(0.217583996578812361),
+LPF_TAPS(0.158784439342286116),
+LPF_TAPS(0.081984403352501831),
+LPF_TAPS(0.010379166386061156),
+LPF_TAPS(-0.037038303614902512),
+LPF_TAPS(-0.051944646349938214),
+LPF_TAPS(-0.038527141888178663),
+LPF_TAPS(-0.010267268151539673),
+LPF_TAPS(0.016609132395323946),
+LPF_TAPS(0.030000902894892705),
+LPF_TAPS(0.026208968816161634),
+LPF_TAPS(0.010082764170405253),
+LPF_TAPS(-0.008556973225887702),
+LPF_TAPS(-0.020205320615819689),
+LPF_TAPS(-0.020093993429713325),
+LPF_TAPS(-0.009828597676686424),
+LPF_TAPS(0.004194617841823830),
+LPF_TAPS(0.014482070170325380),
+LPF_TAPS(0.016252106569250604),
+LPF_TAPS(0.009508797722194940),
+LPF_TAPS(-0.001455310544204177),
+LPF_TAPS(-0.010634059447887700),
+LPF_TAPS(-0.013493311245838014),
+LPF_TAPS(-0.009128390659463513),
+LPF_TAPS(-0.000404559134412800),
+LPF_TAPS(0.007820241423214368),
+LPF_TAPS(0.011338051552494290),
+LPF_TAPS(0.008693290458632130),
+LPF_TAPS(0.001718788616915996),
+LPF_TAPS(-0.005650980574808982),
+LPF_TAPS(-0.009558767162523707),
+LPF_TAPS(-0.008210170776467280),
+LPF_TAPS(-0.002660433522403174),
+LPF_TAPS(0.003921917508260478),
+LPF_TAPS(0.008035696758406876),
+LPF_TAPS(0.007686322156860502),
+LPF_TAPS(0.003329282790038720),
+LPF_TAPS(-0.002515876697475453),
+LPF_TAPS(-0.006701322514199401),
+LPF_TAPS(-0.007129498100924165),
+LPF_TAPS(-0.003788080011994879),
+LPF_TAPS(0.001360805311569260),
+LPF_TAPS(0.005515744756444054),
+LPF_TAPS(0.006547753991151825),
+LPF_TAPS(0.004079369292625891),
+LPF_TAPS(-0.000409652959545898),
+LPF_TAPS(-0.004454570661594242),
+LPF_TAPS(-0.005949282981757201),
+LPF_TAPS(-0.004234027361415646),
+LPF_TAPS(-0.000370080198385794),
+LPF_TAPS(0.003502457765705811),
+LPF_TAPS(0.005342252973877865),
+LPF_TAPS(0.004275866942694263),
+LPF_TAPS(0.001002127444257027),
+LPF_TAPS(-0.002649445068584514),
+LPF_TAPS(-0.004734648681415419),
+LPF_TAPS(-0.004224236740519412),
+LPF_TAPS(-0.001504814100223794),
+LPF_TAPS(0.001888760328101881),
+LPF_TAPS(0.004134122566326786),
+LPF_TAPS(0.004095535459895291),
+LPF_TAPS(0.001893077002631478),
+LPF_TAPS(-0.001215458531635024),
+LPF_TAPS(-0.003547858090245656),
+LPF_TAPS(-0.003904107624531100),
+LPF_TAPS(-0.002179705840164981),
+LPF_TAPS(0.000625554495446453),
+LPF_TAPS(0.002982448304723404),
+LPF_TAPS(0.003662773859520006),
+LPF_TAPS(0.002376112412446641),
+LPF_TAPS(-0.000115464020033783),
+LPF_TAPS(-0.002443792300250093),
+LPF_TAPS(-0.003383139191049452),
+LPF_TAPS(-0.002492803093762834),
+LPF_TAPS(-0.000318353499249274),
+LPF_TAPS(0.001937011471890712),
+LPF_TAPS(0.003075764667526174),
+LPF_TAPS(0.002539659445857669),
+LPF_TAPS(0.000679615646265460),
+LPF_TAPS(-0.001466386955787688),
+LPF_TAPS(-0.002750255061253167),
+LPF_TAPS(-0.002526092479366907),
+LPF_TAPS(-0.000972341540733622),
+LPF_TAPS(0.001035318965793743),
+LPF_TAPS(0.002415296435696647),
+LPF_TAPS(0.002461113092179670),
+LPF_TAPS(0.001200907349311347),
+LPF_TAPS(-0.000646308133182089),
+LPF_TAPS(-0.002078665835068547),
+LPF_TAPS(-0.002353347345416943),
+LPF_TAPS(-0.001370051465454246),
+LPF_TAPS(0.000300958344334903),
+LPF_TAPS(0.001747228052000543),
+LPF_TAPS(0.002211016558072697),
+LPF_TAPS(0.001484842993021157),
+LPF_TAPS(0.000000000000000014),
+LPF_TAPS(-0.001426929605946781),
+LPF_TAPS(-0.002041896557519943),
+LPF_TAPS(-0.001550623938785614),
+LPF_TAPS(-0.000256667898155195),
+LPF_TAPS(0.001122796740918289),
+LPF_TAPS(0.001853266597735596),
+LPF_TAPS(0.001572933378730221),
+LPF_TAPS(0.000469918877920107),
+LPF_TAPS(-0.000838941865677717),
+LPF_TAPS(-0.001651855745334936),
+LPF_TAPS(-0.001557420367308325),
+LPF_TAPS(-0.000641325758405911),
+LPF_TAPS(0.000578581085490013),
+LPF_TAPS(0.001443792519769964),
+LPF_TAPS(0.001509751243047029),
+LPF_TAPS(0.000773075739959831),
+LPF_TAPS(-0.000344064118248697),
+LPF_TAPS(-0.001234562010518129),
+LPF_TAPS(-0.001435516089365050),
+LPF_TAPS(-0.000867876706929602),
+LPF_TAPS(0.000136916833243533),
+LPF_TAPS(0.001028973432376992),
+LPF_TAPS(0.001340138341942272),
+LPF_TAPS(0.000928857720449614),
+LPF_TAPS(0.000042104172341939),
+LPF_TAPS(-0.000831140031646360),
+LPF_TAPS(-0.001228790838834765),
+LPF_TAPS(-0.000959466676126702),
+LPF_TAPS(-0.000192946179359307),
+LPF_TAPS(0.000644472369103502),
+LPF_TAPS(0.001106320957296741),
+LPF_TAPS(0.000963368008888017),
+LPF_TAPS(0.000316185830334019),
+LPF_TAPS(-0.000471685250588915),
+LPF_TAPS(-0.000977186858435632),
+LPF_TAPS(-0.000944343151550742),
+LPF_TAPS(-0.000412947520140350),
+LPF_TAPS(0.000314817936404181),
+LPF_TAPS(0.000845406263993468),
+LPF_TAPS(0.000906196204630836),
+LPF_TAPS(0.000484816930467727),
+LPF_TAPS(-0.000175266727942945),
+LPF_TAPS(-0.000714518621550615),
+LPF_TAPS(-0.000852666964353335),
+LPF_TAPS(-0.000533752038109352),
+LPF_TAPS(0.000053828599419581),
+LPF_TAPS(0.000587560981677089),
+LPF_TAPS(0.000787353097159157),
+LPF_TAPS(0.000561993918193049),
+LPF_TAPS(0.000049245788747453),
+LPF_TAPS(-0.000467057421066836),
+LPF_TAPS(-0.000713642856649046),
+LPF_TAPS(-0.000571979564666246),
+LPF_TAPS(-0.000134191593268466),
+LPF_TAPS(0.000355021407836447),
+LPF_TAPS(0.000634659327754457),
+LPF_TAPS(0.000566258774624574),
+LPF_TAPS(0.000201663848670586),
+LPF_TAPS(-0.000252970126618144),
+LPF_TAPS(-0.000553216767771218),
+LPF_TAPS(-0.000547416904163501),
+LPF_TAPS(-0.000252668180692344),
+LPF_TAPS(0.000161949468098235),
+LPF_TAPS(0.000471789208898184),
+LPF_TAPS(0.000518005015648910),
+LPF_TAPS(0.000288490241628357),
+LPF_TAPS(-0.000082568144639632),
+LPF_TAPS(-0.000392491105131393),
+LPF_TAPS(-0.000480478614259649),
+LPF_TAPS(-0.000310625838317288),
+LPF_TAPS(0.000015039222807827),
+LPF_TAPS(0.000317069459270137),
+LPF_TAPS(0.000437145829897804),
+LPF_TAPS(0.000320713562342054),
+LPF_TAPS(0.000040772735080986),
+LPF_TAPS(-0.000246906562990679),
+LPF_TAPS(-0.000390125553156118),
+LPF_TAPS(-0.000320471519403484),
+LPF_TAPS(-0.000085300757219496),
+LPF_TAPS(0.000183032231873393),
+LPF_TAPS(0.000341315694158471),
+LPF_TAPS(0.000311639502691372),
+LPF_TAPS(0.000119222576930763),
+LPF_TAPS(-0.000126144223038757),
+LPF_TAPS(-0.000292371412661462),
+LPF_TAPS(-0.000295927675818274),
+LPF_TAPS(-0.000143407481172504),
+LPF_TAPS(0.000076635388368275),
+LPF_TAPS(0.000244692877132379),
+LPF_TAPS(0.000274972536933228),
+LPF_TAPS(0.000158864452745100),
+LPF_TAPS(-0.000034626041501284),
+LPF_TAPS(-0.000199421858038954),
+LPF_TAPS(-0.000250300639021611),
+LPF_TAPS(-0.000166692979005046),
+LPF_TAPS(-0.000000000000000003),
+LPF_TAPS(0.000157446252670375),
+LPF_TAPS(0.000223300253335332),
+LPF_TAPS(0.000168037681742168),
+LPF_TAPS(0.000027557198691092),
+LPF_TAPS(-0.000119411479655871),
+LPF_TAPS(-0.000195200893423036),
+LPF_TAPS(-0.000164047684222058),
+LPF_TAPS(-0.000048519323325795),
+LPF_TAPS(0.000085737572960195),
+LPF_TAPS(0.000167060374901225),
+LPF_TAPS(0.000155841382823267),
+LPF_TAPS(0.000063481006130817),
+LPF_TAPS(-0.000056640747389047),
+LPF_TAPS(-0.000139758877768490),
+LPF_TAPS(-0.000144477042387634),
+LPF_TAPS(-0.000073120960840263),
+LPF_TAPS(0.000032158198421559),
+LPF_TAPS(0.000113999308692182),
+LPF_TAPS(0.000130929395731458),
+LPF_TAPS(0.000078167807459032),
+LPF_TAPS(-0.000012174934625460),
+LPF_TAPS(-0.000090313133322722),
+LPF_TAPS(-0.000116072206993584),
+LPF_TAPS(-0.000079369251281705),
+LPF_TAPS(-0.000003548484364012),
+LPF_TAPS(0.000069070764414392),
+LPF_TAPS(0.000100666562503584),
+LPF_TAPS(0.000077465159439725),
+LPF_TAPS(0.000015348323840559),
+LPF_TAPS(-0.000050495549607254),
+LPF_TAPS(-0.000085354486947704),
+LPF_TAPS(-0.000073164876720327),
+LPF_TAPS(-0.000023631050649621),
+LPF_TAPS(0.000034680400720536),
+LPF_TAPS(0.000070657350418119),
+LPF_TAPS(0.000067128931311735),
+LPF_TAPS(0.000028848446583500),
+LPF_TAPS(-0.000021606140428787),
+LPF_TAPS(-0.000056978435359620),
+LPF_TAPS(-0.000059955107102221),
+LPF_TAPS(-0.000031475034442276),
+LPF_TAPS(0.000011160707151486),
+LPF_TAPS(0.000044608971706442),
+LPF_TAPS(0.000052168707516273),
+LPF_TAPS(0.000031988230255699),
+LPF_TAPS(-0.000003158448914863),
+LPF_TAPS(-0.000033736922293091),
+LPF_TAPS(-0.000044216710488163),
+LPF_TAPS(-0.000030851477633416),
+LPF_TAPS(-0.000002641154683653),
+LPF_TAPS(0.000024457806196456),
+LPF_TAPS(0.000036465417422531),
+LPF_TAPS(0.000028500473714422),
+LPF_TAPS(0.000006515883207812),
+LPF_TAPS(-0.000016786881125153),
+LPF_TAPS(-0.000029201131738919),
+LPF_TAPS(-0.000025332465809854),
+LPF_TAPS(-0.000008764694485172),
+LPF_TAPS(0.000010672062517435),
+LPF_TAPS(0.000022633364277399),
+LPF_TAPS(0.000021698487437919),
+LPF_TAPS(0.000009693463809528),
+LPF_TAPS(-0.000006007031232565),
+LPF_TAPS(-0.000016900051592227),
+LPF_TAPS(-0.000017898314581276),
+LPF_TAPS(-0.000009602717782315),
+LPF_TAPS(0.000002644067905706),
+LPF_TAPS(0.000012074286006310),
+LPF_TAPS(0.000014177858864022),
+LPF_TAPS(0.000008777431582245),
+LPF_TAPS(-0.000000406244457850),
+LPF_TAPS(-0.000008172089385626),
+LPF_TAPS(-0.000010728673861079),
+LPF_TAPS(-0.000007478867784236),
+LPF_TAPS(-0.000000901303542104),
+LPF_TAPS(0.000005160811439416),
+LPF_TAPS(0.000007689232639407),
+LPF_TAPS(0.000005938361755751),
+LPF_TAPS(0.000001481210903335),
+LPF_TAPS(-0.000002967793127511),
+LPF_TAPS(-0.000005147636573837),
+LPF_TAPS(-0.000004352904447252),
+LPF_TAPS(-0.000001534929736759),
+LPF_TAPS(0.000001489001552458),
+LPF_TAPS(0.000003145434327730),
+LPF_TAPS(0.000002882338204170),
+LPF_TAPS(0.000001255026676517),
+LPF_TAPS(-0.000000597409809747),
+LPF_TAPS(-0.000001682261877696),
+LPF_TAPS(-0.000001647964114635),
+LPF_TAPS(-0.000000818712590339),
+LPF_TAPS(0.000000150959369216),
+LPF_TAPS(0.000000721055467933),
+LPF_TAPS(0.000000732358468462),
+LPF_TAPS(0.000000382546880181),
+LPF_TAPS(0.000000000000000000),
+LPF_TAPS(-0.000000193635170079),
+LPF_TAPS(-0.000000180208454089),
+LPF_TAPS(-0.000000078233669747),
+LPF_TAPS(-0.000000005849842015),
+LPF_TAPS(0.000000006503202820),
+LPF_TAPS(0.000000000000000000),
+};
diff --git a/core/sound/blip_lpf_384K_96K.h b/core/sound/blip_lpf_384K_96K.h
new file mode 100644
index 000000000..7bce8e95a
--- /dev/null
+++ b/core/sound/blip_lpf_384K_96K.h
@@ -0,0 +1,591 @@
+static buf_t const blip_lpf_384K_96K[blip_lpf_384K_taps] = {
+LPF_TAPS(0.000000000000000000),
+LPF_TAPS(-0.000000011015600767),
+LPF_TAPS(0.000000005849842074),
+LPF_TAPS(0.000000100719147701),
+LPF_TAPS(-0.000000011811486228),
+LPF_TAPS(-0.000000283109532916),
+LPF_TAPS(0.000000000000000000),
+LPF_TAPS(0.000000559313003533),
+LPF_TAPS(0.000000048001310528),
+LPF_TAPS(-0.000000928297143806),
+LPF_TAPS(-0.000000150959370735),
+LPF_TAPS(0.000001386795289539),
+LPF_TAPS(0.000000327800446696),
+LPF_TAPS(-0.000001929241549214),
+LPF_TAPS(-0.000000597409815756),
+LPF_TAPS(0.000002547717384186),
+LPF_TAPS(0.000000978421988732),
+LPF_TAPS(-0.000003231910828620),
+LPF_TAPS(-0.000001489001567436),
+LPF_TAPS(0.000003969089552504),
+LPF_TAPS(0.000002146614939706),
+LPF_TAPS(-0.000004744089084507),
+LPF_TAPS(-0.000002967793157365),
+LPF_TAPS(0.000005539317611880),
+LPF_TAPS(0.000003967886509344),
+LPF_TAPS(-0.000006334778858395),
+LPF_TAPS(-0.000005160811491329),
+LPF_TAPS(0.000007108114604907),
+LPF_TAPS(0.000006558791082586),
+LPF_TAPS(-0.000007834668457273),
+LPF_TAPS(-0.000008172089467830),
+LPF_TAPS(0.000008487572479706),
+LPF_TAPS(0.000010008742584247),
+LPF_TAPS(-0.000009037858295623),
+LPF_TAPS(-0.000012074286127767),
+LPF_TAPS(0.000009454594209865),
+LPF_TAPS(0.000014371482914828),
+LPF_TAPS(-0.000009705049823939),
+LPF_TAPS(-0.000016900051762228),
+LPF_TAPS(0.000009754889497821),
+LPF_TAPS(0.000019656400313892),
+LPF_TAPS(-0.000009568395856687),
+LPF_TAPS(-0.000022633364505072),
+LPF_TAPS(0.000009108724348073),
+LPF_TAPS(0.000025819957606911),
+LPF_TAPS(-0.000008338189624081),
+LPF_TAPS(-0.000029201132032658),
+LPF_TAPS(0.000007218584254945),
+LPF_TAPS(0.000032757557306227),
+LPF_TAPS(-0.000005711529975318),
+LPF_TAPS(-0.000036465417789344),
+LPF_TAPS(0.000003778861324781),
+LPF_TAPS(0.000040296233930550),
+LPF_TAPS(-0.000001383041171332),
+LPF_TAPS(-0.000044216710932948),
+LPF_TAPS(-0.000001512392796211),
+LPF_TAPS(0.000048188618833547),
+LPF_TAPS(0.000004942351950558),
+LPF_TAPS(-0.000052168708041048),
+LPF_TAPS(-0.000008939692779225),
+LPF_TAPS(0.000056108664387130),
+LPF_TAPS(0.000013534687376105),
+LPF_TAPS(-0.000059955107705322),
+LPF_TAPS(-0.000018754471123261),
+LPF_TAPS(0.000063649637858348),
+LPF_TAPS(0.000024622470808229),
+LPF_TAPS(-0.000067128931986998),
+LPF_TAPS(-0.000031157816917856),
+LPF_TAPS(0.000070324896549265),
+LPF_TAPS(0.000038374744342056),
+LPF_TAPS(-0.000073164877456309),
+LPF_TAPS(-0.000046281986203924),
+LPF_TAPS(0.000075571931291371),
+LPF_TAPS(0.000054882165999193),
+LPF_TAPS(-0.000077465160218964),
+LPF_TAPS(-0.000064171193671817),
+LPF_TAPS(0.000078760112755455),
+LPF_TAPS(0.000074137671667086),
+LPF_TAPS(-0.000079369252080098),
+LPF_TAPS(-0.000084762317381802),
+LPF_TAPS(0.000079202493019870),
+LPF_TAPS(0.000096017408766624),
+LPF_TAPS(-0.000078167808245341),
+LPF_TAPS(-0.000107866260122152),
+LPF_TAPS(0.000076171903571917),
+LPF_TAPS(0.000120262735361821),
+LPF_TAPS(-0.000073120961575807),
+LPF_TAPS(-0.000133150806184833),
+LPF_TAPS(0.000068921452012099),
+LPF_TAPS(0.000146464162706635),
+LPF_TAPS(-0.000063481006769390),
+LPF_TAPS(-0.000160125884127777),
+LPF_TAPS(0.000056709356317991),
+LPF_TAPS(0.000174048176979626),
+LPF_TAPS(-0.000048519323813871),
+LPF_TAPS(-0.000188132188364734),
+LPF_TAPS(0.000038827872215975),
+LPF_TAPS(0.000202267901407275),
+LPF_TAPS(-0.000027557198968305),
+LPF_TAPS(-0.000216334119842647),
+LPF_TAPS(0.000014635871998353),
+LPF_TAPS(0.000230198548304553),
+LPF_TAPS(0.000000000000000002),
+LPF_TAPS(-0.000243717974411615),
+LPF_TAPS(-0.000016405570791358),
+LPF_TAPS(0.000256738558214805),
+LPF_TAPS(0.000034626041849581),
+LPF_TAPS(-0.000269096233943092),
+LPF_TAPS(-0.000054695438835973),
+LPF_TAPS(0.000280617228280185),
+LPF_TAPS(0.000076635389139154),
+LPF_TAPS(-0.000291118698623548),
+LPF_TAPS(-0.000100453910882524),
+LPF_TAPS(0.000300409493922405),
+LPF_TAPS(0.000126144224307666),
+LPF_TAPS(-0.000308291039769518),
+LPF_TAPS(-0.000153683596868854),
+LPF_TAPS(0.000314558348438531),
+LPF_TAPS(0.000183032233714526),
+LPF_TAPS(-0.000319001153521583),
+LPF_TAPS(-0.000214132225480944),
+LPF_TAPS(0.000321405167739016),
+LPF_TAPS(0.000246906565474358),
+LPF_TAPS(-0.000321553461372830),
+LPF_TAPS(-0.000281258248365758),
+LPF_TAPS(0.000319227957627963),
+LPF_TAPS(0.000317069462459603),
+LPF_TAPS(-0.000314211040060395),
+LPF_TAPS(-0.000354200887423921),
+LPF_TAPS(0.000306287266039554),
+LPF_TAPS(0.000392491109079526),
+LPF_TAPS(-0.000295245179045763),
+LPF_TAPS(-0.000431756162436877),
+LPF_TAPS(0.000280879211452807),
+LPF_TAPS(0.000471789213644001),
+LPF_TAPS(-0.000262991668324403),
+LPF_TAPS(-0.000512360390863583),
+LPF_TAPS(0.000241394781671497),
+LPF_TAPS(0.000553216773336134),
+LPF_TAPS(-0.000215912823589380),
+LPF_TAPS(-0.000594082547010641),
+LPF_TAPS(0.000186384265730750),
+LPF_TAPS(0.000634659334138613),
+LPF_TAPS(-0.000152663971685384),
+LPF_TAPS(-0.000674626703136016),
+LPF_TAPS(0.000114625408040413),
+LPF_TAPS(0.000713642863827721),
+LPF_TAPS(-0.000072162859201040),
+LPF_TAPS(-0.000751345551907282),
+LPF_TAPS(0.000025193630468347),
+LPF_TAPS(0.000787353105079299),
+LPF_TAPS(0.000026339776589673),
+LPF_TAPS(-0.000821265731912697),
+LPF_TAPS(-0.000082467532763677),
+LPF_TAPS(0.000852666972930490),
+LPF_TAPS(0.000143190410299827),
+LPF_TAPS(-0.000881125351906697),
+LPF_TAPS(-0.000208477788977746),
+LPF_TAPS(0.000906196213746451),
+LPF_TAPS(0.000278265755551535),
+LPF_TAPS(-0.000927423743702984),
+LPF_TAPS(-0.000352455312647677),
+LPF_TAPS(0.000944343161050078),
+LPF_TAPS(0.000430910712749655),
+LPF_TAPS(-0.000956483078692794),
+LPF_TAPS(-0.000513457932258434),
+LPF_TAPS(0.000963368018578731),
+LPF_TAPS(0.000599883299797623),
+LPF_TAPS(-0.000964521071181302),
+LPF_TAPS(-0.000689932291924013),
+LPF_TAPS(0.000959466685778196),
+LPF_TAPS(0.000783308508207108),
+LPF_TAPS(-0.000947733576760587),
+LPF_TAPS(-0.000879672836255881),
+LPF_TAPS(0.000928857729793189),
+LPF_TAPS(0.000978642815687279),
+LPF_TAPS(-0.000902385490316769),
+LPF_TAPS(-0.001079792208254300),
+LPF_TAPS(0.000867876715659763),
+LPF_TAPS(0.001182650779375594),
+LPF_TAPS(-0.000824907970912845),
+LPF_TAPS(-0.001286704294128211),
+LPF_TAPS(0.000773075747736378),
+LPF_TAPS(0.001391394728381238),
+LPF_TAPS(-0.000711999684424938),
+LPF_TAPS(-0.001496120693149179),
+LPF_TAPS(0.000641325764857145),
+LPF_TAPS(0.001600238067424449),
+LPF_TAPS(-0.000560729473422399),
+LPF_TAPS(-0.001703060831694894),
+LPF_TAPS(0.000469918882647158),
+LPF_TAPS(0.001803862091048397),
+LPF_TAPS(-0.000368637650049468),
+LPF_TAPS(-0.001901875273189507),
+LPF_TAPS(0.000256667900737123),
+LPF_TAPS(0.001996295482812222),
+LPF_TAPS(-0.000133832972436669),
+LPF_TAPS(-0.002086280989547721),
+LPF_TAPS(-0.000000000000000010),
+LPF_TAPS(0.002170954822083052),
+LPF_TAPS(0.000144917683015615),
+LPF_TAPS(-0.002249406435955790),
+LPF_TAPS(-0.000300958347362256),
+LPF_TAPS(0.002320693416880992),
+LPF_TAPS(0.000468109896452331),
+LPF_TAPS(-0.002383843175141072),
+LPF_TAPS(-0.000646308139683340),
+LPF_TAPS(0.002437854579416513),
+LPF_TAPS(0.000835435329088609),
+LPF_TAPS(-0.002481699470256925),
+LPF_TAPS(-0.001035318976208225),
+LPF_TAPS(0.002514323983937589),
+LPF_TAPS(0.001245730964462881),
+LPF_TAPS(-0.002534649606387051),
+LPF_TAPS(-0.001466386970538345),
+LPF_TAPS(0.002541573863783226),
+LPF_TAPS(0.001696946206381959),
+LPF_TAPS(-0.002533970540751470),
+LPF_TAPS(-0.001937011491375429),
+LPF_TAPS(0.002510689298140439),
+LPF_TAPS(0.002186129662096221),
+LPF_TAPS(-0.002470554539162156),
+LPF_TAPS(-0.002443792324832665),
+LPF_TAPS(0.002412363344034429),
+LPF_TAPS(0.002709436953689394),
+LPF_TAPS(-0.002334882257521798),
+LPF_TAPS(-0.002982448334724418),
+LPF_TAPS(0.002236842668768351),
+LPF_TAPS(0.003262160354121255),
+LPF_TAPS(-0.002116934465646910),
+LPF_TAPS(-0.003547858125934267),
+LPF_TAPS(0.001973797572585516),
+LPF_TAPS(0.003838780452470702),
+LPF_TAPS(-0.001806010886127095),
+LPF_TAPS(-0.004134122607912742),
+LPF_TAPS(0.001612077998994808),
+LPF_TAPS(0.004433039433353184),
+LPF_TAPS(-0.001390408940994410),
+LPF_TAPS(-0.004734648729042185),
+LPF_TAPS(0.001139296949435484),
+LPF_TAPS(0.005038034927334975),
+LPF_TAPS(-0.000856888992736507),
+LPF_TAPS(-0.005342253027616647),
+LPF_TAPS(0.000541148379629372),
+LPF_TAPS(0.005646332772373505),
+LPF_TAPS(-0.000189807251080793),
+LPF_TAPS(-0.005949283041602227),
+LPF_TAPS(-0.000199693988689541),
+LPF_TAPS(0.006250096440913952),
+LPF_TAPS(0.000630284283290779),
+LPF_TAPS(-0.006547754057017011),
+LPF_TAPS(-0.001105362031111897),
+LPF_TAPS(0.006841230352764132),
+LPF_TAPS(0.001628925261767635),
+LPF_TAPS(-0.007129498172641222),
+LPF_TAPS(-0.002205742554827556),
+LPF_TAPS(0.007411533828467142),
+LPF_TAPS(0.002841579981535849),
+LPF_TAPS(-0.007686322234178770),
+LPF_TAPS(-0.003543506329125897),
+LPF_TAPS(0.007952862057901125),
+LPF_TAPS(0.004320309654234472),
+LPF_TAPS(-0.008210170859055036),
+LPF_TAPS(-0.005183075263676913),
+LPF_TAPS(0.008457290178043437),
+LPF_TAPS(0.006146002858099756),
+LPF_TAPS(-0.008693290546079707),
+LPF_TAPS(-0.007227586637919146),
+LPF_TAPS(0.008917276382985836),
+LPF_TAPS(0.008452361402853461),
+LPF_TAPS(-0.009128390751287793),
+LPF_TAPS(-0.009853558917979684),
+LPF_TAPS(0.009325819935673612),
+LPF_TAPS(0.011477281127491516),
+LPF_TAPS(-0.009508797817845869),
+LPF_TAPS(-0.013389307610701225),
+LPF_TAPS(0.009676610017998718),
+LPF_TAPS(0.015686706352215952),
+LPF_TAPS(-0.009828597775554265),
+LPF_TAPS(-0.018518730591539998),
+LPF_TAPS(0.009964161543419017),
+LPF_TAPS(0.022127001789441349),
+LPF_TAPS(-0.010082764271829761),
+LPF_TAPS(-0.026929524287683412),
+LPF_TAPS(0.010183934359860159),
+LPF_TAPS(0.033716713860811466),
+LPF_TAPS(-0.010267268254820187),
+LPF_TAPS(-0.044183467442614553),
+LPF_TAPS(0.010332432682101312),
+LPF_TAPS(0.062738188702308406),
+LPF_TAPS(-0.010379166490467277),
+LPF_TAPS(-0.105547895901716732),
+LPF_TAPS(0.010407282100358520),
+LPF_TAPS(0.318124561856717447),
+LPF_TAPS(0.489583327635681576),
+LPF_TAPS(0.318124561856717447),
+LPF_TAPS(0.010407282100358520),
+LPF_TAPS(-0.105547895901716732),
+LPF_TAPS(-0.010379166490467277),
+LPF_TAPS(0.062738188702308406),
+LPF_TAPS(0.010332432682101312),
+LPF_TAPS(-0.044183467442614553),
+LPF_TAPS(-0.010267268254820187),
+LPF_TAPS(0.033716713860811466),
+LPF_TAPS(0.010183934359860159),
+LPF_TAPS(-0.026929524287683408),
+LPF_TAPS(-0.010082764271829761),
+LPF_TAPS(0.022127001789441349),
+LPF_TAPS(0.009964161543419017),
+LPF_TAPS(-0.018518730591539998),
+LPF_TAPS(-0.009828597775554265),
+LPF_TAPS(0.015686706352215956),
+LPF_TAPS(0.009676610017998718),
+LPF_TAPS(-0.013389307610701227),
+LPF_TAPS(-0.009508797817845869),
+LPF_TAPS(0.011477281127491518),
+LPF_TAPS(0.009325819935673612),
+LPF_TAPS(-0.009853558917979684),
+LPF_TAPS(-0.009128390751287794),
+LPF_TAPS(0.008452361402853461),
+LPF_TAPS(0.008917276382985836),
+LPF_TAPS(-0.007227586637919147),
+LPF_TAPS(-0.008693290546079709),
+LPF_TAPS(0.006146002858099756),
+LPF_TAPS(0.008457290178043437),
+LPF_TAPS(-0.005183075263676913),
+LPF_TAPS(-0.008210170859055036),
+LPF_TAPS(0.004320309654234473),
+LPF_TAPS(0.007952862057901126),
+LPF_TAPS(-0.003543506329125898),
+LPF_TAPS(-0.007686322234178772),
+LPF_TAPS(0.002841579981535850),
+LPF_TAPS(0.007411533828467142),
+LPF_TAPS(-0.002205742554827557),
+LPF_TAPS(-0.007129498172641222),
+LPF_TAPS(0.001628925261767635),
+LPF_TAPS(0.006841230352764133),
+LPF_TAPS(-0.001105362031111897),
+LPF_TAPS(-0.006547754057017012),
+LPF_TAPS(0.000630284283290779),
+LPF_TAPS(0.006250096440913953),
+LPF_TAPS(-0.000199693988689541),
+LPF_TAPS(-0.005949283041602227),
+LPF_TAPS(-0.000189807251080793),
+LPF_TAPS(0.005646332772373506),
+LPF_TAPS(0.000541148379629372),
+LPF_TAPS(-0.005342253027616649),
+LPF_TAPS(-0.000856888992736507),
+LPF_TAPS(0.005038034927334976),
+LPF_TAPS(0.001139296949435484),
+LPF_TAPS(-0.004734648729042187),
+LPF_TAPS(-0.001390408940994411),
+LPF_TAPS(0.004433039433353186),
+LPF_TAPS(0.001612077998994808),
+LPF_TAPS(-0.004134122607912742),
+LPF_TAPS(-0.001806010886127095),
+LPF_TAPS(0.003838780452470702),
+LPF_TAPS(0.001973797572585516),
+LPF_TAPS(-0.003547858125934267),
+LPF_TAPS(-0.002116934465646911),
+LPF_TAPS(0.003262160354121255),
+LPF_TAPS(0.002236842668768352),
+LPF_TAPS(-0.002982448334724419),
+LPF_TAPS(-0.002334882257521798),
+LPF_TAPS(0.002709436953689395),
+LPF_TAPS(0.002412363344034428),
+LPF_TAPS(-0.002443792324832665),
+LPF_TAPS(-0.002470554539162155),
+LPF_TAPS(0.002186129662096221),
+LPF_TAPS(0.002510689298140439),
+LPF_TAPS(-0.001937011491375430),
+LPF_TAPS(-0.002533970540751471),
+LPF_TAPS(0.001696946206381960),
+LPF_TAPS(0.002541573863783227),
+LPF_TAPS(-0.001466386970538345),
+LPF_TAPS(-0.002534649606387052),
+LPF_TAPS(0.001245730964462880),
+LPF_TAPS(0.002514323983937590),
+LPF_TAPS(-0.001035318976208226),
+LPF_TAPS(-0.002481699470256926),
+LPF_TAPS(0.000835435329088609),
+LPF_TAPS(0.002437854579416514),
+LPF_TAPS(-0.000646308139683340),
+LPF_TAPS(-0.002383843175141073),
+LPF_TAPS(0.000468109896452332),
+LPF_TAPS(0.002320693416880992),
+LPF_TAPS(-0.000300958347362256),
+LPF_TAPS(-0.002249406435955789),
+LPF_TAPS(0.000144917683015615),
+LPF_TAPS(0.002170954822083053),
+LPF_TAPS(-0.000000000000000010),
+LPF_TAPS(-0.002086280989547721),
+LPF_TAPS(-0.000133832972436669),
+LPF_TAPS(0.001996295482812222),
+LPF_TAPS(0.000256667900737123),
+LPF_TAPS(-0.001901875273189508),
+LPF_TAPS(-0.000368637650049468),
+LPF_TAPS(0.001803862091048397),
+LPF_TAPS(0.000469918882647158),
+LPF_TAPS(-0.001703060831694895),
+LPF_TAPS(-0.000560729473422398),
+LPF_TAPS(0.001600238067424449),
+LPF_TAPS(0.000641325764857145),
+LPF_TAPS(-0.001496120693149180),
+LPF_TAPS(-0.000711999684424938),
+LPF_TAPS(0.001391394728381239),
+LPF_TAPS(0.000773075747736378),
+LPF_TAPS(-0.001286704294128211),
+LPF_TAPS(-0.000824907970912845),
+LPF_TAPS(0.001182650779375594),
+LPF_TAPS(0.000867876715659763),
+LPF_TAPS(-0.001079792208254300),
+LPF_TAPS(-0.000902385490316769),
+LPF_TAPS(0.000978642815687280),
+LPF_TAPS(0.000928857729793190),
+LPF_TAPS(-0.000879672836255881),
+LPF_TAPS(-0.000947733576760587),
+LPF_TAPS(0.000783308508207108),
+LPF_TAPS(0.000959466685778196),
+LPF_TAPS(-0.000689932291924013),
+LPF_TAPS(-0.000964521071181302),
+LPF_TAPS(0.000599883299797623),
+LPF_TAPS(0.000963368018578730),
+LPF_TAPS(-0.000513457932258434),
+LPF_TAPS(-0.000956483078692794),
+LPF_TAPS(0.000430910712749655),
+LPF_TAPS(0.000944343161050079),
+LPF_TAPS(-0.000352455312647677),
+LPF_TAPS(-0.000927423743702985),
+LPF_TAPS(0.000278265755551534),
+LPF_TAPS(0.000906196213746451),
+LPF_TAPS(-0.000208477788977747),
+LPF_TAPS(-0.000881125351906698),
+LPF_TAPS(0.000143190410299827),
+LPF_TAPS(0.000852666972930490),
+LPF_TAPS(-0.000082467532763677),
+LPF_TAPS(-0.000821265731912697),
+LPF_TAPS(0.000026339776589673),
+LPF_TAPS(0.000787353105079299),
+LPF_TAPS(0.000025193630468347),
+LPF_TAPS(-0.000751345551907282),
+LPF_TAPS(-0.000072162859201040),
+LPF_TAPS(0.000713642863827721),
+LPF_TAPS(0.000114625408040413),
+LPF_TAPS(-0.000674626703136016),
+LPF_TAPS(-0.000152663971685384),
+LPF_TAPS(0.000634659334138613),
+LPF_TAPS(0.000186384265730751),
+LPF_TAPS(-0.000594082547010641),
+LPF_TAPS(-0.000215912823589380),
+LPF_TAPS(0.000553216773336135),
+LPF_TAPS(0.000241394781671497),
+LPF_TAPS(-0.000512360390863583),
+LPF_TAPS(-0.000262991668324403),
+LPF_TAPS(0.000471789213644001),
+LPF_TAPS(0.000280879211452807),
+LPF_TAPS(-0.000431756162436878),
+LPF_TAPS(-0.000295245179045763),
+LPF_TAPS(0.000392491109079526),
+LPF_TAPS(0.000306287266039554),
+LPF_TAPS(-0.000354200887423921),
+LPF_TAPS(-0.000314211040060394),
+LPF_TAPS(0.000317069462459603),
+LPF_TAPS(0.000319227957627964),
+LPF_TAPS(-0.000281258248365758),
+LPF_TAPS(-0.000321553461372831),
+LPF_TAPS(0.000246906565474358),
+LPF_TAPS(0.000321405167739016),
+LPF_TAPS(-0.000214132225480944),
+LPF_TAPS(-0.000319001153521584),
+LPF_TAPS(0.000183032233714526),
+LPF_TAPS(0.000314558348438530),
+LPF_TAPS(-0.000153683596868854),
+LPF_TAPS(-0.000308291039769518),
+LPF_TAPS(0.000126144224307666),
+LPF_TAPS(0.000300409493922405),
+LPF_TAPS(-0.000100453910882524),
+LPF_TAPS(-0.000291118698623548),
+LPF_TAPS(0.000076635389139154),
+LPF_TAPS(0.000280617228280184),
+LPF_TAPS(-0.000054695438835973),
+LPF_TAPS(-0.000269096233943092),
+LPF_TAPS(0.000034626041849581),
+LPF_TAPS(0.000256738558214805),
+LPF_TAPS(-0.000016405570791358),
+LPF_TAPS(-0.000243717974411615),
+LPF_TAPS(0.000000000000000002),
+LPF_TAPS(0.000230198548304554),
+LPF_TAPS(0.000014635871998353),
+LPF_TAPS(-0.000216334119842647),
+LPF_TAPS(-0.000027557198968305),
+LPF_TAPS(0.000202267901407275),
+LPF_TAPS(0.000038827872215975),
+LPF_TAPS(-0.000188132188364734),
+LPF_TAPS(-0.000048519323813871),
+LPF_TAPS(0.000174048176979626),
+LPF_TAPS(0.000056709356317991),
+LPF_TAPS(-0.000160125884127777),
+LPF_TAPS(-0.000063481006769391),
+LPF_TAPS(0.000146464162706635),
+LPF_TAPS(0.000068921452012099),
+LPF_TAPS(-0.000133150806184833),
+LPF_TAPS(-0.000073120961575807),
+LPF_TAPS(0.000120262735361821),
+LPF_TAPS(0.000076171903571917),
+LPF_TAPS(-0.000107866260122152),
+LPF_TAPS(-0.000078167808245341),
+LPF_TAPS(0.000096017408766624),
+LPF_TAPS(0.000079202493019870),
+LPF_TAPS(-0.000084762317381802),
+LPF_TAPS(-0.000079369252080098),
+LPF_TAPS(0.000074137671667086),
+LPF_TAPS(0.000078760112755455),
+LPF_TAPS(-0.000064171193671817),
+LPF_TAPS(-0.000077465160218964),
+LPF_TAPS(0.000054882165999193),
+LPF_TAPS(0.000075571931291371),
+LPF_TAPS(-0.000046281986203924),
+LPF_TAPS(-0.000073164877456309),
+LPF_TAPS(0.000038374744342056),
+LPF_TAPS(0.000070324896549265),
+LPF_TAPS(-0.000031157816917856),
+LPF_TAPS(-0.000067128931986999),
+LPF_TAPS(0.000024622470808229),
+LPF_TAPS(0.000063649637858348),
+LPF_TAPS(-0.000018754471123261),
+LPF_TAPS(-0.000059955107705322),
+LPF_TAPS(0.000013534687376105),
+LPF_TAPS(0.000056108664387130),
+LPF_TAPS(-0.000008939692779225),
+LPF_TAPS(-0.000052168708041048),
+LPF_TAPS(0.000004942351950558),
+LPF_TAPS(0.000048188618833547),
+LPF_TAPS(-0.000001512392796211),
+LPF_TAPS(-0.000044216710932948),
+LPF_TAPS(-0.000001383041171332),
+LPF_TAPS(0.000040296233930550),
+LPF_TAPS(0.000003778861324781),
+LPF_TAPS(-0.000036465417789344),
+LPF_TAPS(-0.000005711529975318),
+LPF_TAPS(0.000032757557306228),
+LPF_TAPS(0.000007218584254945),
+LPF_TAPS(-0.000029201132032658),
+LPF_TAPS(-0.000008338189624081),
+LPF_TAPS(0.000025819957606911),
+LPF_TAPS(0.000009108724348073),
+LPF_TAPS(-0.000022633364505072),
+LPF_TAPS(-0.000009568395856687),
+LPF_TAPS(0.000019656400313892),
+LPF_TAPS(0.000009754889497821),
+LPF_TAPS(-0.000016900051762228),
+LPF_TAPS(-0.000009705049823939),
+LPF_TAPS(0.000014371482914828),
+LPF_TAPS(0.000009454594209865),
+LPF_TAPS(-0.000012074286127767),
+LPF_TAPS(-0.000009037858295623),
+LPF_TAPS(0.000010008742584247),
+LPF_TAPS(0.000008487572479706),
+LPF_TAPS(-0.000008172089467830),
+LPF_TAPS(-0.000007834668457273),
+LPF_TAPS(0.000006558791082586),
+LPF_TAPS(0.000007108114604907),
+LPF_TAPS(-0.000005160811491329),
+LPF_TAPS(-0.000006334778858395),
+LPF_TAPS(0.000003967886509344),
+LPF_TAPS(0.000005539317611880),
+LPF_TAPS(-0.000002967793157365),
+LPF_TAPS(-0.000004744089084507),
+LPF_TAPS(0.000002146614939706),
+LPF_TAPS(0.000003969089552504),
+LPF_TAPS(-0.000001489001567436),
+LPF_TAPS(-0.000003231910828620),
+LPF_TAPS(0.000000978421988732),
+LPF_TAPS(0.000002547717384186),
+LPF_TAPS(-0.000000597409815756),
+LPF_TAPS(-0.000001929241549214),
+LPF_TAPS(0.000000327800446696),
+LPF_TAPS(0.000001386795289539),
+LPF_TAPS(-0.000000150959370735),
+LPF_TAPS(-0.000000928297143806),
+LPF_TAPS(0.000000048001310528),
+LPF_TAPS(0.000000559313003533),
+LPF_TAPS(0.000000000000000000),
+LPF_TAPS(-0.000000283109532916),
+LPF_TAPS(-0.000000011811486228),
+LPF_TAPS(0.000000100719147701),
+LPF_TAPS(0.000000005849842074),
+LPF_TAPS(-0.000000011015600767),
+LPF_TAPS(0.000000000000000000),
+};
diff --git a/core/sound/blip_lpf_48K.h b/core/sound/blip_lpf_48K.h
new file mode 100644
index 000000000..b6f070d34
--- /dev/null
+++ b/core/sound/blip_lpf_48K.h
@@ -0,0 +1,5 @@
+/* 48K sampling, 2K cutoff, 3K transition */
+enum { blip_lpf_48K_taps = 75 };
+
+
+#include "blip_lpf_48K_24K.h"
diff --git a/core/sound/blip_lpf_48K_24K.h b/core/sound/blip_lpf_48K_24K.h
new file mode 100644
index 000000000..cfc55509c
--- /dev/null
+++ b/core/sound/blip_lpf_48K_24K.h
@@ -0,0 +1,77 @@
+static buf_t const blip_lpf_48K_24K[blip_lpf_48K_taps] = {
+LPF_TAPS(0.000000000000000000),
+LPF_TAPS(0.000000000000000000),
+LPF_TAPS(0.000006172351880734),
+LPF_TAPS(-0.000027967518784738),
+LPF_TAPS(0.000073690439314385),
+LPF_TAPS(-0.000148511866632178),
+LPF_TAPS(0.000252294005948314),
+LPF_TAPS(-0.000377448480600132),
+LPF_TAPS(0.000507171487425029),
+LPF_TAPS(-0.000614507519940712),
+LPF_TAPS(0.000662742722649616),
+LPF_TAPS(-0.000607589638848393),
+LPF_TAPS(0.000401476982379787),
+LPF_TAPS(-0.000000000000000019),
+LPF_TAPS(-0.000629759853592583),
+LPF_TAPS(0.001499729835175342),
+LPF_TAPS(-0.002591217555386272),
+LPF_TAPS(0.003846516360834453),
+LPF_TAPS(-0.005163246483314691),
+LPF_TAPS(0.006392876984000919),
+LPF_TAPS(-0.007344587700569814),
+LPF_TAPS(0.007795122064233218),
+LPF_TAPS(-0.007504593248757817),
+LPF_TAPS(0.006237413639836052),
+LPF_TAPS(-0.003786722276039828),
+LPF_TAPS(0.000000000000000084),
+LPF_TAPS(0.005196903228349641),
+LPF_TAPS(-0.011780261796860798),
+LPF_TAPS(0.019616218693346690),
+LPF_TAPS(-0.028457941223227038),
+LPF_TAPS(0.037953457657094965),
+LPF_TAPS(-0.047664323241449508),
+LPF_TAPS(0.057094042553461788),
+LPF_TAPS(-0.065724003835937739),
+LPF_TAPS(0.073053711370429431),
+LPF_TAPS(-0.078641465941841002),
+LPF_TAPS(0.082141434075137285),
+LPF_TAPS(0.916666347460571185),
+LPF_TAPS(0.082141434075137298),
+LPF_TAPS(-0.078641465941841016),
+LPF_TAPS(0.073053711370429431),
+LPF_TAPS(-0.065724003835937739),
+LPF_TAPS(0.057094042553461788),
+LPF_TAPS(-0.047664323241449522),
+LPF_TAPS(0.037953457657094986),
+LPF_TAPS(-0.028457941223227038),
+LPF_TAPS(0.019616218693346690),
+LPF_TAPS(-0.011780261796860800),
+LPF_TAPS(0.005196903228349641),
+LPF_TAPS(0.000000000000000084),
+LPF_TAPS(-0.003786722276039829),
+LPF_TAPS(0.006237413639836052),
+LPF_TAPS(-0.007504593248757819),
+LPF_TAPS(0.007795122064233216),
+LPF_TAPS(-0.007344587700569819),
+LPF_TAPS(0.006392876984000925),
+LPF_TAPS(-0.005163246483314693),
+LPF_TAPS(0.003846516360834457),
+LPF_TAPS(-0.002591217555386270),
+LPF_TAPS(0.001499729835175344),
+LPF_TAPS(-0.000629759853592583),
+LPF_TAPS(-0.000000000000000019),
+LPF_TAPS(0.000401476982379787),
+LPF_TAPS(-0.000607589638848392),
+LPF_TAPS(0.000662742722649617),
+LPF_TAPS(-0.000614507519940712),
+LPF_TAPS(0.000507171487425029),
+LPF_TAPS(-0.000377448480600133),
+LPF_TAPS(0.000252294005948314),
+LPF_TAPS(-0.000148511866632178),
+LPF_TAPS(0.000073690439314385),
+LPF_TAPS(-0.000027967518784738),
+LPF_TAPS(0.000006172351880734),
+LPF_TAPS(0.000000000000000000),
+LPF_TAPS(0.000000000000000000),
+};
diff --git a/core/sound/blip_lpf_768K.h b/core/sound/blip_lpf_768K.h
new file mode 100644
index 000000000..49cf333e4
--- /dev/null
+++ b/core/sound/blip_lpf_768K.h
@@ -0,0 +1,9 @@
+/* 768K sampling, 2K cutoff, 3K transition */
+enum { blip_lpf_768K_taps = 1179 };
+
+
+#include "blip_lpf_768K_24K.h"
+#include "blip_lpf_768K_48K.h"
+#include "blip_lpf_768K_96K.h"
+#include "blip_lpf_768K_192K.h"
+#include "blip_lpf_768K_384K.h"
diff --git a/core/sound/blip_lpf_768K_192K.h b/core/sound/blip_lpf_768K_192K.h
new file mode 100644
index 000000000..3777532db
--- /dev/null
+++ b/core/sound/blip_lpf_768K_192K.h
@@ -0,0 +1,1181 @@
+static buf_t const blip_lpf_768K_192K[blip_lpf_768K_taps] = {
+LPF_TAPS(0.000000000000000000),
+LPF_TAPS(0.000000000270411187),
+LPF_TAPS(0.000000005464226025),
+LPF_TAPS(-0.000000002039181362),
+LPF_TAPS(-0.000000022053172665),
+LPF_TAPS(0.000000004555102289),
+LPF_TAPS(0.000000050015122713),
+LPF_TAPS(-0.000000006729075807),
+LPF_TAPS(-0.000000089535638879),
+LPF_TAPS(0.000000007450379996),
+LPF_TAPS(0.000000140736086864),
+LPF_TAPS(-0.000000005589328078),
+LPF_TAPS(-0.000000203672228149),
+LPF_TAPS(0.000000000000000000),
+LPF_TAPS(0.000000278332885067),
+LPF_TAPS(0.000000010476952729),
+LPF_TAPS(-0.000000364638680968),
+LPF_TAPS(-0.000000027011428462),
+LPF_TAPS(0.000000462440858539),
+LPF_TAPS(0.000000050780922643),
+LPF_TAPS(-0.000000571520179580),
+LPF_TAPS(-0.000000082967500509),
+LPF_TAPS(0.000000691585909819),
+LPF_TAPS(0.000000124754695030),
+LPF_TAPS(-0.000000822274892573),
+LPF_TAPS(-0.000000177324329996),
+LPF_TAPS(0.000000963150715332),
+LPF_TAPS(0.000000241853268333),
+LPF_TAPS(-0.000001113702973585),
+LPF_TAPS(-0.000000319510085909),
+LPF_TAPS(0.000001273346636437),
+LPF_TAPS(0.000000411451671308),
+LPF_TAPS(-0.000001441421518830),
+LPF_TAPS(-0.000000518819752302),
+LPF_TAPS(0.000001617191865353),
+LPF_TAPS(0.000000642737349976),
+LPF_TAPS(-0.000001799846050903),
+LPF_TAPS(-0.000000784305161806),
+LPF_TAPS(0.000001988496403598),
+LPF_TAPS(0.000000944597875235),
+LPF_TAPS(-0.000002182179155572),
+LPF_TAPS(-0.000001124660413670),
+LPF_TAPS(0.000002379854527418),
+LPF_TAPS(0.000001325504117162),
+LPF_TAPS(-0.000002580406952221),
+LPF_TAPS(-0.000001548102860405),
+LPF_TAPS(0.000002782645445234),
+LPF_TAPS(0.000001793389111064),
+LPF_TAPS(-0.000002985304125357),
+LPF_TAPS(-0.000002062249931914),
+LPF_TAPS(0.000003187042894687),
+LPF_TAPS(0.000002355522930638),
+LPF_TAPS(-0.000003386448282433),
+LPF_TAPS(-0.000002673992161604),
+LPF_TAPS(0.000003582034459542),
+LPF_TAPS(0.000003018383984428),
+LPF_TAPS(-0.000003772244430401),
+LPF_TAPS(-0.000003389362884580),
+LPF_TAPS(0.000003955451407915),
+LPF_TAPS(0.000003787527261756),
+LPF_TAPS(-0.000004129960378251),
+LPF_TAPS(-0.000004213405192313),
+LPF_TAPS(0.000004294009861432),
+LPF_TAPS(0.000004667450172476),
+LPF_TAPS(-0.000004445773873841),
+LPF_TAPS(-0.000005150036849619),
+LPF_TAPS(0.000004583364098553),
+LPF_TAPS(0.000005661456749387),
+LPF_TAPS(-0.000004704832269243),
+LPF_TAPS(-0.000006201914006984),
+LPF_TAPS(0.000004808172773150),
+LPF_TAPS(0.000006771521111433),
+LPF_TAPS(-0.000004891325478376),
+LPF_TAPS(-0.000007370294672177),
+LPF_TAPS(0.000004952178790474),
+LPF_TAPS(0.000007998151217884),
+LPF_TAPS(-0.000004988572942947),
+LPF_TAPS(-0.000008654903037807),
+LPF_TAPS(0.000004998303525934),
+LPF_TAPS(0.000009340254076601),
+LPF_TAPS(-0.000004979125256946),
+LPF_TAPS(-0.000010053795893948),
+LPF_TAPS(0.000004928755997066),
+LPF_TAPS(0.000010795003700833),
+LPF_TAPS(-0.000004844881015559),
+LPF_TAPS(-0.000011563232484775),
+LPF_TAPS(0.000004725157505337),
+LPF_TAPS(0.000012357713236772),
+LPF_TAPS(-0.000004567219351147),
+LPF_TAPS(-0.000013177549293115),
+LPF_TAPS(0.000004368682151773),
+LPF_TAPS(0.000014021712805663),
+LPF_TAPS(-0.000004127148496975),
+LPF_TAPS(-0.000014889041354518),
+LPF_TAPS(0.000003840213499109),
+LPF_TAPS(0.000015778234717405),
+LPF_TAPS(-0.000003505470578851),
+LPF_TAPS(-0.000016687851810380),
+LPF_TAPS(0.000003120517503602),
+LPF_TAPS(0.000017616307814767),
+LPF_TAPS(-0.000002682962676418),
+LPF_TAPS(-0.000018561871505499),
+LPF_TAPS(0.000002190431672634),
+LPF_TAPS(0.000019522662796228),
+LPF_TAPS(-0.000001640574020396),
+LPF_TAPS(-0.000020496650516781),
+LPF_TAPS(0.000001031070220591),
+LPF_TAPS(0.000021481650438649),
+LPF_TAPS(-0.000000359639000791),
+LPF_TAPS(-0.000022475323564316),
+LPF_TAPS(-0.000000375955203094),
+LPF_TAPS(0.000023475174696270),
+LPF_TAPS(0.000001177894544622),
+LPF_TAPS(-0.000024478551301565),
+LPF_TAPS(-0.000002048299852131),
+LPF_TAPS(0.000025482642687743),
+LPF_TAPS(0.000002989222510623),
+LPF_TAPS(-0.000026484479505846),
+LPF_TAPS(-0.000004002636150150),
+LPF_TAPS(0.000027480933596112),
+LPF_TAPS(0.000005090428151623),
+LPF_TAPS(-0.000028468718191753),
+LPF_TAPS(-0.000006254390981889),
+LPF_TAPS(0.000029444388495961),
+LPF_TAPS(0.000007496213370957),
+LPF_TAPS(-0.000030404342647009),
+LPF_TAPS(-0.000008817471345155),
+LPF_TAPS(0.000031344823085946),
+LPF_TAPS(0.000010219619130956),
+LPF_TAPS(-0.000032261918340969),
+LPF_TAPS(-0.000011703979945270),
+LPF_TAPS(0.000033151565242131),
+LPF_TAPS(0.000013271736688854),
+LPF_TAPS(-0.000034009551579453),
+LPF_TAPS(-0.000014923922560452),
+LPF_TAPS(0.000034831519217002),
+LPF_TAPS(0.000016661411610296),
+LPF_TAPS(-0.000035612967674835),
+LPF_TAPS(-0.000018484909252414),
+LPF_TAPS(0.000036349258189961),
+LPF_TAPS(0.000020394942756081),
+LPF_TAPS(-0.000037035618266847),
+LPF_TAPS(-0.000022391851737813),
+LPF_TAPS(0.000037667146727081),
+LPF_TAPS(0.000024475778675831),
+LPF_TAPS(-0.000038238819266954),
+LPF_TAPS(-0.000026646659470014),
+LPF_TAPS(0.000038745494530907),
+LPF_TAPS(0.000028904214071107),
+LPF_TAPS(-0.000039181920707691),
+LPF_TAPS(-0.000031247937203481),
+LPF_TAPS(0.000039542742655132),
+LPF_TAPS(0.000033677089206780),
+LPF_TAPS(-0.000039822509558359),
+LPF_TAPS(-0.000036190687022217),
+LPF_TAPS(0.000040015683125125),
+LPF_TAPS(0.000038787495349966),
+LPF_TAPS(-0.000040116646320761),
+LPF_TAPS(-0.000041466018004756),
+LPF_TAPS(0.000040119712644108),
+LPF_TAPS(0.000044224489497212),
+LPF_TAPS(-0.000040019135944408),
+LPF_TAPS(-0.000047060866868922),
+LPF_TAPS(0.000039809120777898),
+LPF_TAPS(0.000049972821809768),
+LPF_TAPS(-0.000039483833301589),
+LPF_TAPS(-0.000052957733086275),
+LPF_TAPS(0.000039037412700123),
+LPF_TAPS(0.000056012679310092),
+LPF_TAPS(-0.000038463983140413),
+LPF_TAPS(-0.000059134432075883),
+LPF_TAPS(0.000037757666247151),
+LPF_TAPS(0.000062319449498186),
+LPF_TAPS(-0.000036912594090979),
+LPF_TAPS(-0.000065563870176755),
+LPF_TAPS(0.000035922922679381),
+LPF_TAPS(0.000068863507619961),
+LPF_TAPS(-0.000034782845939036),
+LPF_TAPS(-0.000072213845155834),
+LPF_TAPS(0.000033486610176828),
+LPF_TAPS(0.000075610031360122),
+LPF_TAPS(-0.000032028529004963),
+LPF_TAPS(-0.000079046876030527),
+LPF_TAPS(0.000030402998714268),
+LPF_TAPS(0.000082518846736081),
+LPF_TAPS(-0.000028604514078264),
+LPF_TAPS(-0.000086020065970184),
+LPF_TAPS(0.000026627684568545),
+LPF_TAPS(0.000089544308935324),
+LPF_TAPS(-0.000024467250961158),
+LPF_TAPS(-0.000093085001987199),
+LPF_TAPS(0.000022118102311547),
+LPF_TAPS(0.000096635221765021),
+LPF_TAPS(-0.000019575293274054),
+LPF_TAPS(-0.000100187695034352),
+LPF_TAPS(0.000016834061741043),
+LPF_TAPS(0.000103734799267992),
+LPF_TAPS(-0.000013889846774370),
+LPF_TAPS(-0.000107268563989415),
+LPF_TAPS(0.000010738306800940),
+LPF_TAPS(0.000110780672902561),
+LPF_TAPS(-0.000007375338042619),
+LPF_TAPS(-0.000114262466830563),
+LPF_TAPS(0.000003797093148942),
+LPF_TAPS(0.000117704947484981),
+LPF_TAPS(0.000000000000000000),
+LPF_TAPS(-0.000121098782085899),
+LPF_TAPS(-0.000004019219354460),
+LPF_TAPS(0.000124434308851991),
+LPF_TAPS(0.000008263529655400),
+LPF_TAPS(-0.000127701543378277),
+LPF_TAPS(-0.000012735563330892),
+LPF_TAPS(0.000130890185917930),
+LPF_TAPS(0.000017437601366372),
+LPF_TAPS(-0.000133989629582932),
+LPF_TAPS(-0.000022371554188088),
+LPF_TAPS(0.000136988969476841),
+LPF_TAPS(0.000027538942599739),
+LPF_TAPS(-0.000139877012771326),
+LPF_TAPS(-0.000032940878813716),
+LPF_TAPS(0.000142642289736313),
+LPF_TAPS(0.000038578047618915),
+LPF_TAPS(-0.000145273065731922),
+LPF_TAPS(-0.000044450687728521),
+LPF_TAPS(0.000147757354168510),
+LPF_TAPS(0.000050558573351575),
+LPF_TAPS(-0.000150082930439164),
+LPF_TAPS(-0.000056900996032834),
+LPF_TAPS(0.000152237346827124),
+LPF_TAPS(0.000063476746806541),
+LPF_TAPS(-0.000154207948388639),
+LPF_TAPS(-0.000070284098709880),
+LPF_TAPS(0.000155981889809562),
+LPF_TAPS(0.000077320789702193),
+LPF_TAPS(-0.000157546153231995),
+LPF_TAPS(-0.000084584006037386),
+LPF_TAPS(0.000158887567045323),
+LPF_TAPS(0.000092070366135805),
+LPF_TAPS(-0.000159992825633266),
+LPF_TAPS(-0.000099775905003113),
+LPF_TAPS(0.000160848510067184),
+LPF_TAPS(0.000107696059243807),
+LPF_TAPS(-0.000161441109732858),
+LPF_TAPS(-0.000115825652715863),
+LPF_TAPS(0.000161757044876159),
+LPF_TAPS(0.000124158882874344),
+LPF_TAPS(-0.000161782690050796),
+LPF_TAPS(-0.000132689307850565),
+LPF_TAPS(0.000161504398448678),
+LPF_TAPS(0.000141409834313202),
+LPF_TAPS(-0.000160908527091470),
+LPF_TAPS(-0.000150312706157744),
+LPF_TAPS(0.000159981462859707),
+LPF_TAPS(0.000159389494069615),
+LPF_TAPS(-0.000158709649333105),
+LPF_TAPS(-0.000168631086005580),
+LPF_TAPS(0.000157079614413859),
+LPF_TAPS(0.000178027678637799),
+LPF_TAPS(-0.000155077998702502),
+LPF_TAPS(-0.000187568769803267),
+LPF_TAPS(0.000152691584593175),
+LPF_TAPS(0.000197243152000898),
+LPF_TAPS(-0.000149907326053507),
+LPF_TAPS(-0.000207038906976828),
+LPF_TAPS(0.000146712379051885),
+LPF_TAPS(0.000216943401437930),
+LPF_TAPS(-0.000143094132592875),
+LPF_TAPS(-0.000226943283931415),
+LPF_TAPS(0.000139040240319026),
+LPF_TAPS(0.000237024482927353),
+LPF_TAPS(-0.000134538652636258),
+LPF_TAPS(-0.000247172206139378),
+LPF_TAPS(0.000129577649317022),
+LPF_TAPS(0.000257370941116722),
+LPF_TAPS(-0.000124145872533844),
+LPF_TAPS(-0.000267604457139195),
+LPF_TAPS(0.000118232360274576),
+LPF_TAPS(0.000277855808445009),
+LPF_TAPS(-0.000111826580088162),
+LPF_TAPS(-0.000288107338818654),
+LPF_TAPS(0.000104918463108302),
+LPF_TAPS(0.000298340687564529),
+LPF_TAPS(-0.000097498438301123),
+LPF_TAPS(-0.000308536796889542),
+LPF_TAPS(0.000089557466881093),
+LPF_TAPS(0.000318675920715468),
+LPF_TAPS(-0.000081087076837988),
+LPF_TAPS(-0.000328737634939617),
+LPF_TAPS(0.000072079397516850),
+LPF_TAPS(0.000338700849159800),
+LPF_TAPS(-0.000062527194191441),
+LPF_TAPS(-0.000348543819876908),
+LPF_TAPS(0.000052423902570022),
+LPF_TAPS(0.000358244165185824),
+LPF_TAPS(-0.000041763663172922),
+LPF_TAPS(-0.000367778880962728),
+LPF_TAPS(0.000030541355518856),
+LPF_TAPS(0.000377124358553825),
+LPF_TAPS(-0.000018752632056849),
+LPF_TAPS(-0.000386256403967828),
+LPF_TAPS(0.000006393951780809),
+LPF_TAPS(0.000395150258571598),
+LPF_TAPS(0.000006537386537703),
+LPF_TAPS(-0.000403780621285212),
+LPF_TAPS(-0.000020043211562898),
+LPF_TAPS(0.000412121672269845),
+LPF_TAPS(0.000034124447118409),
+LPF_TAPS(-0.000420147098098687),
+LPF_TAPS(-0.000048781080485743),
+LPF_TAPS(0.000427830118398051),
+LPF_TAPS(0.000064012131341976),
+LPF_TAPS(-0.000435143513942678),
+LPF_TAPS(-0.000079815621400166),
+LPF_TAPS(0.000442059656186037),
+LPF_TAPS(0.000096188544815881),
+LPF_TAPS(-0.000448550538203314),
+LPF_TAPS(-0.000113126839423332),
+LPF_TAPS(0.000454587807021607),
+LPF_TAPS(0.000130625358861683),
+LPF_TAPS(-0.000460142797308446),
+LPF_TAPS(-0.000148677845653371),
+LPF_TAPS(0.000465186566386890),
+LPF_TAPS(0.000167276905294243),
+LPF_TAPS(-0.000469689930542188),
+LPF_TAPS(-0.000186413981413071),
+LPF_TAPS(0.000473623502581409),
+LPF_TAPS(0.000206079332057869),
+LPF_TAPS(-0.000476957730605114),
+LPF_TAPS(-0.000226262007164247),
+LPF_TAPS(0.000479662937946381),
+LPF_TAPS(0.000246949827258589),
+LPF_TAPS(-0.000481709364229588),
+LPF_TAPS(-0.000268129363447485),
+LPF_TAPS(0.000483067207498627),
+LPF_TAPS(0.000289785918742595),
+LPF_TAPS(-0.000483706667360984),
+LPF_TAPS(-0.000311903510766968),
+LPF_TAPS(0.000483597989091136),
+LPF_TAPS(0.000334464855886926),
+LPF_TAPS(-0.000482711508634332),
+LPF_TAPS(-0.000357451354810840),
+LPF_TAPS(0.000481017698448667),
+LPF_TAPS(0.000380843079692384),
+LPF_TAPS(-0.000478487214120758),
+LPF_TAPS(-0.000404618762773439),
+LPF_TAPS(0.000475090941687849),
+LPF_TAPS(0.000428755786598220),
+LPF_TAPS(-0.000470800045596781),
+LPF_TAPS(-0.000453230175826497),
+LPF_TAPS(0.000465586017227704),
+LPF_TAPS(0.000478016590669961),
+LPF_TAPS(-0.000459420723907908),
+LPF_TAPS(-0.000503088321972070),
+LPF_TAPS(0.000452276458339745),
+LPF_TAPS(0.000528417287947738),
+LPF_TAPS(-0.000444125988363888),
+LPF_TAPS(-0.000553974032593938),
+LPF_TAPS(0.000434942606977188),
+LPF_TAPS(0.000579727725779194),
+LPF_TAPS(-0.000424700182523640),
+LPF_TAPS(-0.000605646165013736),
+LPF_TAPS(0.000413373208973718),
+LPF_TAPS(0.000631695778898094),
+LPF_TAPS(-0.000400936856207481),
+LPF_TAPS(-0.000657841632242460),
+LPF_TAPS(0.000387367020214454),
+LPF_TAPS(0.000684047432843816),
+LPF_TAPS(-0.000372640373122280),
+LPF_TAPS(-0.000710275539901573),
+LPF_TAPS(0.000356734412965341),
+LPF_TAPS(0.000736486974048094),
+LPF_TAPS(-0.000339627513103736),
+LPF_TAPS(-0.000762641428962928),
+LPF_TAPS(0.000321298971202047),
+LPF_TAPS(0.000788697284533992),
+LPF_TAPS(-0.000301729057676401),
+LPF_TAPS(-0.000814611621522312),
+LPF_TAPS(0.000280899063519201),
+LPF_TAPS(0.000840340237680266),
+LPF_TAPS(-0.000258791347409589),
+LPF_TAPS(-0.000865837665265529),
+LPF_TAPS(0.000235389382017556),
+LPF_TAPS(0.000891057189886533),
+LPF_TAPS(-0.000210677799411442),
+LPF_TAPS(-0.000915950870606544),
+LPF_TAPS(0.000184642435476311),
+LPF_TAPS(0.000940469561226123),
+LPF_TAPS(-0.000157270373253856),
+LPF_TAPS(-0.000964562932655105),
+LPF_TAPS(0.000128549985113490),
+LPF_TAPS(0.000988179496276455),
+LPF_TAPS(-0.000098470973665477),
+LPF_TAPS(-0.001011266628194997),
+LPF_TAPS(0.000067024411328462),
+LPF_TAPS(0.001033770594254893),
+LPF_TAPS(-0.000034202778465029),
+LPF_TAPS(-0.001055636575699028),
+LPF_TAPS(0.000000000000000001),
+LPF_TAPS(0.001076808695333126),
+LPF_TAPS(0.000035588519562657),
+LPF_TAPS(-0.001097230044046120),
+LPF_TAPS(-0.000072565862804956),
+LPF_TAPS(0.001116842707526315),
+LPF_TAPS(0.000110933567822261),
+LPF_TAPS(-0.001135587793000342),
+LPF_TAPS(-0.000150691598491106),
+LPF_TAPS(0.001153405455808370),
+LPF_TAPS(0.000191838316651094),
+LPF_TAPS(-0.001170234925614872),
+LPF_TAPS(-0.000234370456275451),
+LPF_TAPS(0.001186014532038874),
+LPF_TAPS(0.000278283099698674),
+LPF_TAPS(-0.001200681729471176),
+LPF_TAPS(-0.000323569655969105),
+LPF_TAPS(0.001214173120828369),
+LPF_TAPS(0.000370221841390830),
+LPF_TAPS(-0.001226424479975013),
+LPF_TAPS(-0.000418229662315629),
+LPF_TAPS(0.001237370772523770),
+LPF_TAPS(0.000467581400242392),
+LPF_TAPS(-0.001246946174701972),
+LPF_TAPS(-0.000518263599278438),
+LPF_TAPS(0.001255084089948550),
+LPF_TAPS(0.000570261056014149),
+LPF_TAPS(-0.001261717162878848),
+LPF_TAPS(-0.000623556811856089),
+LPF_TAPS(0.001266777290225573),
+LPF_TAPS(0.000678132147863779),
+LPF_TAPS(-0.001270195628333515),
+LPF_TAPS(-0.000733966582127434),
+LPF_TAPS(0.001271902596749720),
+LPF_TAPS(0.000791037869722423),
+LPF_TAPS(-0.001271827877412626),
+LPF_TAPS(-0.000849322005271670),
+LPF_TAPS(0.001269900408902514),
+LPF_TAPS(0.000908793228141729),
+LPF_TAPS(-0.001266048375166084),
+LPF_TAPS(-0.000969424030294818),
+LPF_TAPS(0.001260199188078141),
+LPF_TAPS(0.001031185166814938),
+LPF_TAPS(-0.001252279463143894),
+LPF_TAPS(-0.001094045669120904),
+LPF_TAPS(0.001242214987580476),
+LPF_TAPS(0.001157972860874287),
+LPF_TAPS(-0.001229930679943168),
+LPF_TAPS(-0.001222932376587285),
+LPF_TAPS(0.001215350540382264),
+LPF_TAPS(0.001288888182928606),
+LPF_TAPS(-0.001198397590521112),
+LPF_TAPS(-0.001355802602721991),
+LPF_TAPS(0.001178993801846175),
+LPF_TAPS(0.001423636341627361),
+LPF_TAPS(-0.001157060011381363),
+LPF_TAPS(-0.001492348517489139),
+LPF_TAPS(0.001132515823287145),
+LPF_TAPS(0.001561896692331240),
+LPF_TAPS(-0.001105279494874691),
+LPF_TAPS(-0.001632236906974967),
+LPF_TAPS(0.001075267805358061),
+LPF_TAPS(0.001703323718249198),
+LPF_TAPS(-0.001042395905468702),
+LPF_TAPS(-0.001775110238758652),
+LPF_TAPS(0.001006577145840449),
+LPF_TAPS(0.001847548179171371),
+LPF_TAPS(-0.000967722881817869),
+LPF_TAPS(-0.001920587892981246),
+LPF_TAPS(0.000925742252050820),
+LPF_TAPS(0.001994178423696552),
+LPF_TAPS(-0.000880541927906545),
+LPF_TAPS(-0.002068267554402306),
+LPF_TAPS(0.000832025830346419),
+LPF_TAPS(0.002142801859637292),
+LPF_TAPS(-0.000780094810472054),
+LPF_TAPS(-0.002217726759524548),
+LPF_TAPS(0.000724646289434996),
+LPF_TAPS(0.002292986576088003),
+LPF_TAPS(-0.000665573852808821),
+LPF_TAPS(-0.002368524591684551),
+LPF_TAPS(0.000602766793834741),
+LPF_TAPS(0.002444283109475893),
+LPF_TAPS(-0.000536109599146661),
+LPF_TAPS(-0.002520203515861609),
+LPF_TAPS(0.000465481369642675),
+LPF_TAPS(0.002596226344789195),
+LPF_TAPS(-0.000390755168068576),
+LPF_TAPS(-0.002672291343854694),
+LPF_TAPS(0.000311797283586851),
+LPF_TAPS(0.002748337542102629),
+LPF_TAPS(-0.000228466402077559),
+LPF_TAPS(-0.002824303319430995),
+LPF_TAPS(0.000140612669117720),
+LPF_TAPS(0.002900126477503273),
+LPF_TAPS(-0.000048076630447099),
+LPF_TAPS(-0.002975744312066664),
+LPF_TAPS(-0.000049311967813908),
+LPF_TAPS(0.003051093686572026),
+LPF_TAPS(0.000151735539964805),
+LPF_TAPS(-0.003126111106988650),
+LPF_TAPS(-0.000259390206949400),
+LPF_TAPS(0.003200732797703957),
+LPF_TAPS(0.000372487556785411),
+LPF_TAPS(-0.003274894778395678),
+LPF_TAPS(-0.000491256653256188),
+LPF_TAPS(0.003348532941762045),
+LPF_TAPS(0.000615946333320373),
+LPF_TAPS(-0.003421583131992657),
+LPF_TAPS(-0.000746827841480148),
+LPF_TAPS(0.003493981223861782),
+LPF_TAPS(0.000884197858865158),
+LPF_TAPS(-0.003565663202323037),
+LPF_TAPS(-0.001028381996475798),
+LPF_TAPS(0.003636565242483652),
+LPF_TAPS(0.001179738836445650),
+LPF_TAPS(-0.003706623789834758),
+LPF_TAPS(-0.001338664623068026),
+LPF_TAPS(0.003775775640613427),
+LPF_TAPS(0.001505598727615959),
+LPF_TAPS(-0.003843958022170892),
+LPF_TAPS(-0.001681030038931735),
+LPF_TAPS(0.003911108673221020),
+LPF_TAPS(0.001865504466995201),
+LPF_TAPS(-0.003977165923842889),
+LPF_TAPS(-0.002059633791377601),
+LPF_TAPS(0.004042068775110544),
+LPF_TAPS(0.002264106143571020),
+LPF_TAPS(-0.004105756978223527),
+LPF_TAPS(-0.002479698485574325),
+LPF_TAPS(0.004168171113012271),
+LPF_TAPS(0.002707291542161917),
+LPF_TAPS(-0.004229252665692150),
+LPF_TAPS(-0.002947887768313048),
+LPF_TAPS(0.004288944105741360),
+LPF_TAPS(0.003202633096500789),
+LPF_TAPS(-0.004347188961779128),
+LPF_TAPS(-0.003472843425182641),
+LPF_TAPS(0.004403931896320721),
+LPF_TAPS(0.003760037100055920),
+LPF_TAPS(-0.004459118779288241),
+LPF_TAPS(-0.004065975032297385),
+LPF_TAPS(0.004512696760158023),
+LPF_TAPS(0.004392710634902094),
+LPF_TAPS(-0.004564614338625998),
+LPF_TAPS(-0.004742652500755700),
+LPF_TAPS(0.004614821433675697),
+LPF_TAPS(0.005118643785605256),
+LPF_TAPS(-0.004663269450936213),
+LPF_TAPS(-0.005524063733774922),
+LPF_TAPS(0.004709911348218218),
+LPF_TAPS(0.005962958906579988),
+LPF_TAPS(-0.004754701699120422),
+LPF_TAPS(-0.006440214774937782),
+LPF_TAPS(0.004797596754602302),
+LPF_TAPS(0.006961782948076841),
+LPF_TAPS(-0.004838554502419361),
+LPF_TAPS(-0.007534986291718715),
+LPF_TAPS(0.004877534724323964),
+LPF_TAPS(0.008168934978658603),
+LPF_TAPS(-0.004914499050936128),
+LPF_TAPS(-0.008875103569123370),
+LPF_TAPS(0.004949411014192367),
+LPF_TAPS(0.009668146858266438),
+LPF_TAPS(-0.004982236097286190),
+LPF_TAPS(-0.010567078294794799),
+LPF_TAPS(0.005012941782016459),
+LPF_TAPS(0.011597014009338947),
+LPF_TAPS(-0.005041497593463745),
+LPF_TAPS(-0.012791826735496585),
+LPF_TAPS(0.005067875141921109),
+LPF_TAPS(0.014198316217362795),
+LPF_TAPS(-0.005092048162008614),
+LPF_TAPS(-0.015883013513289131),
+LPF_TAPS(0.005113992548904921),
+LPF_TAPS(0.017943788285475964),
+LPF_TAPS(-0.005133686391636841),
+LPF_TAPS(-0.020530741860699774),
+LPF_TAPS(0.005151110003369837),
+LPF_TAPS(0.023886386121836339),
+LPF_TAPS(-0.005166245948648558),
+LPF_TAPS(-0.028429653831338730),
+LPF_TAPS(0.005179079067541477),
+LPF_TAPS(0.034951922612326908),
+LPF_TAPS(-0.005189596496650059),
+LPF_TAPS(-0.045149079900442757),
+LPF_TAPS(0.005197787686945111),
+LPF_TAPS(0.063430543582118512),
+LPF_TAPS(-0.005203644418401950),
+LPF_TAPS(-0.105964364852374607),
+LPF_TAPS(0.005207160811409030),
+LPF_TAPS(0.318263564357176620),
+LPF_TAPS(0.494791666818391318),
+LPF_TAPS(0.318263564357176620),
+LPF_TAPS(0.005207160811409030),
+LPF_TAPS(-0.105964364852374607),
+LPF_TAPS(-0.005203644418401950),
+LPF_TAPS(0.063430543582118512),
+LPF_TAPS(0.005197787686945111),
+LPF_TAPS(-0.045149079900442757),
+LPF_TAPS(-0.005189596496650059),
+LPF_TAPS(0.034951922612326908),
+LPF_TAPS(0.005179079067541477),
+LPF_TAPS(-0.028429653831338730),
+LPF_TAPS(-0.005166245948648558),
+LPF_TAPS(0.023886386121836339),
+LPF_TAPS(0.005151110003369838),
+LPF_TAPS(-0.020530741860699774),
+LPF_TAPS(-0.005133686391636841),
+LPF_TAPS(0.017943788285475964),
+LPF_TAPS(0.005113992548904922),
+LPF_TAPS(-0.015883013513289131),
+LPF_TAPS(-0.005092048162008615),
+LPF_TAPS(0.014198316217362795),
+LPF_TAPS(0.005067875141921110),
+LPF_TAPS(-0.012791826735496585),
+LPF_TAPS(-0.005041497593463745),
+LPF_TAPS(0.011597014009338947),
+LPF_TAPS(0.005012941782016459),
+LPF_TAPS(-0.010567078294794799),
+LPF_TAPS(-0.004982236097286190),
+LPF_TAPS(0.009668146858266438),
+LPF_TAPS(0.004949411014192368),
+LPF_TAPS(-0.008875103569123370),
+LPF_TAPS(-0.004914499050936128),
+LPF_TAPS(0.008168934978658605),
+LPF_TAPS(0.004877534724323964),
+LPF_TAPS(-0.007534986291718715),
+LPF_TAPS(-0.004838554502419361),
+LPF_TAPS(0.006961782948076841),
+LPF_TAPS(0.004797596754602302),
+LPF_TAPS(-0.006440214774937783),
+LPF_TAPS(-0.004754701699120422),
+LPF_TAPS(0.005962958906579988),
+LPF_TAPS(0.004709911348218218),
+LPF_TAPS(-0.005524063733774922),
+LPF_TAPS(-0.004663269450936213),
+LPF_TAPS(0.005118643785605256),
+LPF_TAPS(0.004614821433675698),
+LPF_TAPS(-0.004742652500755700),
+LPF_TAPS(-0.004564614338625999),
+LPF_TAPS(0.004392710634902094),
+LPF_TAPS(0.004512696760158023),
+LPF_TAPS(-0.004065975032297386),
+LPF_TAPS(-0.004459118779288240),
+LPF_TAPS(0.003760037100055921),
+LPF_TAPS(0.004403931896320721),
+LPF_TAPS(-0.003472843425182641),
+LPF_TAPS(-0.004347188961779128),
+LPF_TAPS(0.003202633096500789),
+LPF_TAPS(0.004288944105741361),
+LPF_TAPS(-0.002947887768313048),
+LPF_TAPS(-0.004229252665692151),
+LPF_TAPS(0.002707291542161917),
+LPF_TAPS(0.004168171113012272),
+LPF_TAPS(-0.002479698485574325),
+LPF_TAPS(-0.004105756978223527),
+LPF_TAPS(0.002264106143571020),
+LPF_TAPS(0.004042068775110545),
+LPF_TAPS(-0.002059633791377602),
+LPF_TAPS(-0.003977165923842889),
+LPF_TAPS(0.001865504466995201),
+LPF_TAPS(0.003911108673221020),
+LPF_TAPS(-0.001681030038931735),
+LPF_TAPS(-0.003843958022170892),
+LPF_TAPS(0.001505598727615959),
+LPF_TAPS(0.003775775640613427),
+LPF_TAPS(-0.001338664623068026),
+LPF_TAPS(-0.003706623789834758),
+LPF_TAPS(0.001179738836445650),
+LPF_TAPS(0.003636565242483653),
+LPF_TAPS(-0.001028381996475798),
+LPF_TAPS(-0.003565663202323037),
+LPF_TAPS(0.000884197858865158),
+LPF_TAPS(0.003493981223861783),
+LPF_TAPS(-0.000746827841480148),
+LPF_TAPS(-0.003421583131992658),
+LPF_TAPS(0.000615946333320373),
+LPF_TAPS(0.003348532941762046),
+LPF_TAPS(-0.000491256653256187),
+LPF_TAPS(-0.003274894778395678),
+LPF_TAPS(0.000372487556785411),
+LPF_TAPS(0.003200732797703957),
+LPF_TAPS(-0.000259390206949401),
+LPF_TAPS(-0.003126111106988651),
+LPF_TAPS(0.000151735539964805),
+LPF_TAPS(0.003051093686572026),
+LPF_TAPS(-0.000049311967813908),
+LPF_TAPS(-0.002975744312066664),
+LPF_TAPS(-0.000048076630447099),
+LPF_TAPS(0.002900126477503272),
+LPF_TAPS(0.000140612669117720),
+LPF_TAPS(-0.002824303319430995),
+LPF_TAPS(-0.000228466402077559),
+LPF_TAPS(0.002748337542102630),
+LPF_TAPS(0.000311797283586851),
+LPF_TAPS(-0.002672291343854695),
+LPF_TAPS(-0.000390755168068576),
+LPF_TAPS(0.002596226344789195),
+LPF_TAPS(0.000465481369642675),
+LPF_TAPS(-0.002520203515861609),
+LPF_TAPS(-0.000536109599146661),
+LPF_TAPS(0.002444283109475894),
+LPF_TAPS(0.000602766793834741),
+LPF_TAPS(-0.002368524591684551),
+LPF_TAPS(-0.000665573852808821),
+LPF_TAPS(0.002292986576088003),
+LPF_TAPS(0.000724646289434996),
+LPF_TAPS(-0.002217726759524548),
+LPF_TAPS(-0.000780094810472054),
+LPF_TAPS(0.002142801859637292),
+LPF_TAPS(0.000832025830346418),
+LPF_TAPS(-0.002068267554402307),
+LPF_TAPS(-0.000880541927906545),
+LPF_TAPS(0.001994178423696553),
+LPF_TAPS(0.000925742252050820),
+LPF_TAPS(-0.001920587892981246),
+LPF_TAPS(-0.000967722881817869),
+LPF_TAPS(0.001847548179171371),
+LPF_TAPS(0.001006577145840448),
+LPF_TAPS(-0.001775110238758653),
+LPF_TAPS(-0.001042395905468702),
+LPF_TAPS(0.001703323718249198),
+LPF_TAPS(0.001075267805358061),
+LPF_TAPS(-0.001632236906974967),
+LPF_TAPS(-0.001105279494874691),
+LPF_TAPS(0.001561896692331240),
+LPF_TAPS(0.001132515823287146),
+LPF_TAPS(-0.001492348517489139),
+LPF_TAPS(-0.001157060011381363),
+LPF_TAPS(0.001423636341627361),
+LPF_TAPS(0.001178993801846175),
+LPF_TAPS(-0.001355802602721991),
+LPF_TAPS(-0.001198397590521113),
+LPF_TAPS(0.001288888182928606),
+LPF_TAPS(0.001215350540382264),
+LPF_TAPS(-0.001222932376587285),
+LPF_TAPS(-0.001229930679943168),
+LPF_TAPS(0.001157972860874288),
+LPF_TAPS(0.001242214987580477),
+LPF_TAPS(-0.001094045669120904),
+LPF_TAPS(-0.001252279463143894),
+LPF_TAPS(0.001031185166814938),
+LPF_TAPS(0.001260199188078142),
+LPF_TAPS(-0.000969424030294817),
+LPF_TAPS(-0.001266048375166084),
+LPF_TAPS(0.000908793228141729),
+LPF_TAPS(0.001269900408902515),
+LPF_TAPS(-0.000849322005271671),
+LPF_TAPS(-0.001271827877412626),
+LPF_TAPS(0.000791037869722423),
+LPF_TAPS(0.001271902596749720),
+LPF_TAPS(-0.000733966582127433),
+LPF_TAPS(-0.001270195628333515),
+LPF_TAPS(0.000678132147863779),
+LPF_TAPS(0.001266777290225573),
+LPF_TAPS(-0.000623556811856090),
+LPF_TAPS(-0.001261717162878848),
+LPF_TAPS(0.000570261056014149),
+LPF_TAPS(0.001255084089948549),
+LPF_TAPS(-0.000518263599278438),
+LPF_TAPS(-0.001246946174701972),
+LPF_TAPS(0.000467581400242392),
+LPF_TAPS(0.001237370772523770),
+LPF_TAPS(-0.000418229662315629),
+LPF_TAPS(-0.001226424479975014),
+LPF_TAPS(0.000370221841390830),
+LPF_TAPS(0.001214173120828369),
+LPF_TAPS(-0.000323569655969105),
+LPF_TAPS(-0.001200681729471177),
+LPF_TAPS(0.000278283099698674),
+LPF_TAPS(0.001186014532038875),
+LPF_TAPS(-0.000234370456275451),
+LPF_TAPS(-0.001170234925614872),
+LPF_TAPS(0.000191838316651094),
+LPF_TAPS(0.001153405455808370),
+LPF_TAPS(-0.000150691598491106),
+LPF_TAPS(-0.001135587793000342),
+LPF_TAPS(0.000110933567822261),
+LPF_TAPS(0.001116842707526315),
+LPF_TAPS(-0.000072565862804956),
+LPF_TAPS(-0.001097230044046120),
+LPF_TAPS(0.000035588519562657),
+LPF_TAPS(0.001076808695333126),
+LPF_TAPS(0.000000000000000001),
+LPF_TAPS(-0.001055636575699027),
+LPF_TAPS(-0.000034202778465030),
+LPF_TAPS(0.001033770594254894),
+LPF_TAPS(0.000067024411328462),
+LPF_TAPS(-0.001011266628194997),
+LPF_TAPS(-0.000098470973665477),
+LPF_TAPS(0.000988179496276456),
+LPF_TAPS(0.000128549985113490),
+LPF_TAPS(-0.000964562932655105),
+LPF_TAPS(-0.000157270373253856),
+LPF_TAPS(0.000940469561226123),
+LPF_TAPS(0.000184642435476311),
+LPF_TAPS(-0.000915950870606545),
+LPF_TAPS(-0.000210677799411442),
+LPF_TAPS(0.000891057189886533),
+LPF_TAPS(0.000235389382017556),
+LPF_TAPS(-0.000865837665265529),
+LPF_TAPS(-0.000258791347409589),
+LPF_TAPS(0.000840340237680265),
+LPF_TAPS(0.000280899063519201),
+LPF_TAPS(-0.000814611621522313),
+LPF_TAPS(-0.000301729057676401),
+LPF_TAPS(0.000788697284533992),
+LPF_TAPS(0.000321298971202047),
+LPF_TAPS(-0.000762641428962928),
+LPF_TAPS(-0.000339627513103736),
+LPF_TAPS(0.000736486974048094),
+LPF_TAPS(0.000356734412965341),
+LPF_TAPS(-0.000710275539901574),
+LPF_TAPS(-0.000372640373122280),
+LPF_TAPS(0.000684047432843816),
+LPF_TAPS(0.000387367020214454),
+LPF_TAPS(-0.000657841632242460),
+LPF_TAPS(-0.000400936856207481),
+LPF_TAPS(0.000631695778898094),
+LPF_TAPS(0.000413373208973719),
+LPF_TAPS(-0.000605646165013736),
+LPF_TAPS(-0.000424700182523640),
+LPF_TAPS(0.000579727725779194),
+LPF_TAPS(0.000434942606977188),
+LPF_TAPS(-0.000553974032593938),
+LPF_TAPS(-0.000444125988363888),
+LPF_TAPS(0.000528417287947739),
+LPF_TAPS(0.000452276458339745),
+LPF_TAPS(-0.000503088321972070),
+LPF_TAPS(-0.000459420723907908),
+LPF_TAPS(0.000478016590669961),
+LPF_TAPS(0.000465586017227704),
+LPF_TAPS(-0.000453230175826497),
+LPF_TAPS(-0.000470800045596782),
+LPF_TAPS(0.000428755786598220),
+LPF_TAPS(0.000475090941687848),
+LPF_TAPS(-0.000404618762773439),
+LPF_TAPS(-0.000478487214120758),
+LPF_TAPS(0.000380843079692384),
+LPF_TAPS(0.000481017698448667),
+LPF_TAPS(-0.000357451354810840),
+LPF_TAPS(-0.000482711508634332),
+LPF_TAPS(0.000334464855886926),
+LPF_TAPS(0.000483597989091137),
+LPF_TAPS(-0.000311903510766968),
+LPF_TAPS(-0.000483706667360984),
+LPF_TAPS(0.000289785918742595),
+LPF_TAPS(0.000483067207498627),
+LPF_TAPS(-0.000268129363447485),
+LPF_TAPS(-0.000481709364229587),
+LPF_TAPS(0.000246949827258589),
+LPF_TAPS(0.000479662937946381),
+LPF_TAPS(-0.000226262007164248),
+LPF_TAPS(-0.000476957730605114),
+LPF_TAPS(0.000206079332057869),
+LPF_TAPS(0.000473623502581409),
+LPF_TAPS(-0.000186413981413071),
+LPF_TAPS(-0.000469689930542188),
+LPF_TAPS(0.000167276905294243),
+LPF_TAPS(0.000465186566386891),
+LPF_TAPS(-0.000148677845653371),
+LPF_TAPS(-0.000460142797308446),
+LPF_TAPS(0.000130625358861683),
+LPF_TAPS(0.000454587807021608),
+LPF_TAPS(-0.000113126839423332),
+LPF_TAPS(-0.000448550538203314),
+LPF_TAPS(0.000096188544815881),
+LPF_TAPS(0.000442059656186037),
+LPF_TAPS(-0.000079815621400166),
+LPF_TAPS(-0.000435143513942679),
+LPF_TAPS(0.000064012131341976),
+LPF_TAPS(0.000427830118398051),
+LPF_TAPS(-0.000048781080485743),
+LPF_TAPS(-0.000420147098098687),
+LPF_TAPS(0.000034124447118409),
+LPF_TAPS(0.000412121672269845),
+LPF_TAPS(-0.000020043211562898),
+LPF_TAPS(-0.000403780621285212),
+LPF_TAPS(0.000006537386537703),
+LPF_TAPS(0.000395150258571598),
+LPF_TAPS(0.000006393951780809),
+LPF_TAPS(-0.000386256403967828),
+LPF_TAPS(-0.000018752632056849),
+LPF_TAPS(0.000377124358553826),
+LPF_TAPS(0.000030541355518856),
+LPF_TAPS(-0.000367778880962729),
+LPF_TAPS(-0.000041763663172922),
+LPF_TAPS(0.000358244165185824),
+LPF_TAPS(0.000052423902570022),
+LPF_TAPS(-0.000348543819876908),
+LPF_TAPS(-0.000062527194191441),
+LPF_TAPS(0.000338700849159801),
+LPF_TAPS(0.000072079397516850),
+LPF_TAPS(-0.000328737634939617),
+LPF_TAPS(-0.000081087076837988),
+LPF_TAPS(0.000318675920715468),
+LPF_TAPS(0.000089557466881093),
+LPF_TAPS(-0.000308536796889541),
+LPF_TAPS(-0.000097498438301123),
+LPF_TAPS(0.000298340687564529),
+LPF_TAPS(0.000104918463108302),
+LPF_TAPS(-0.000288107338818654),
+LPF_TAPS(-0.000111826580088162),
+LPF_TAPS(0.000277855808445009),
+LPF_TAPS(0.000118232360274576),
+LPF_TAPS(-0.000267604457139195),
+LPF_TAPS(-0.000124145872533844),
+LPF_TAPS(0.000257370941116722),
+LPF_TAPS(0.000129577649317022),
+LPF_TAPS(-0.000247172206139378),
+LPF_TAPS(-0.000134538652636258),
+LPF_TAPS(0.000237024482927353),
+LPF_TAPS(0.000139040240319026),
+LPF_TAPS(-0.000226943283931415),
+LPF_TAPS(-0.000143094132592875),
+LPF_TAPS(0.000216943401437930),
+LPF_TAPS(0.000146712379051885),
+LPF_TAPS(-0.000207038906976829),
+LPF_TAPS(-0.000149907326053507),
+LPF_TAPS(0.000197243152000898),
+LPF_TAPS(0.000152691584593175),
+LPF_TAPS(-0.000187568769803268),
+LPF_TAPS(-0.000155077998702502),
+LPF_TAPS(0.000178027678637799),
+LPF_TAPS(0.000157079614413860),
+LPF_TAPS(-0.000168631086005580),
+LPF_TAPS(-0.000158709649333105),
+LPF_TAPS(0.000159389494069615),
+LPF_TAPS(0.000159981462859707),
+LPF_TAPS(-0.000150312706157744),
+LPF_TAPS(-0.000160908527091470),
+LPF_TAPS(0.000141409834313202),
+LPF_TAPS(0.000161504398448678),
+LPF_TAPS(-0.000132689307850565),
+LPF_TAPS(-0.000161782690050796),
+LPF_TAPS(0.000124158882874344),
+LPF_TAPS(0.000161757044876159),
+LPF_TAPS(-0.000115825652715863),
+LPF_TAPS(-0.000161441109732857),
+LPF_TAPS(0.000107696059243807),
+LPF_TAPS(0.000160848510067184),
+LPF_TAPS(-0.000099775905003113),
+LPF_TAPS(-0.000159992825633266),
+LPF_TAPS(0.000092070366135805),
+LPF_TAPS(0.000158887567045323),
+LPF_TAPS(-0.000084584006037386),
+LPF_TAPS(-0.000157546153231995),
+LPF_TAPS(0.000077320789702193),
+LPF_TAPS(0.000155981889809561),
+LPF_TAPS(-0.000070284098709880),
+LPF_TAPS(-0.000154207948388639),
+LPF_TAPS(0.000063476746806541),
+LPF_TAPS(0.000152237346827124),
+LPF_TAPS(-0.000056900996032834),
+LPF_TAPS(-0.000150082930439164),
+LPF_TAPS(0.000050558573351575),
+LPF_TAPS(0.000147757354168510),
+LPF_TAPS(-0.000044450687728521),
+LPF_TAPS(-0.000145273065731922),
+LPF_TAPS(0.000038578047618915),
+LPF_TAPS(0.000142642289736313),
+LPF_TAPS(-0.000032940878813716),
+LPF_TAPS(-0.000139877012771326),
+LPF_TAPS(0.000027538942599739),
+LPF_TAPS(0.000136988969476841),
+LPF_TAPS(-0.000022371554188088),
+LPF_TAPS(-0.000133989629582932),
+LPF_TAPS(0.000017437601366372),
+LPF_TAPS(0.000130890185917930),
+LPF_TAPS(-0.000012735563330892),
+LPF_TAPS(-0.000127701543378277),
+LPF_TAPS(0.000008263529655400),
+LPF_TAPS(0.000124434308851991),
+LPF_TAPS(-0.000004019219354460),
+LPF_TAPS(-0.000121098782085899),
+LPF_TAPS(0.000000000000000000),
+LPF_TAPS(0.000117704947484981),
+LPF_TAPS(0.000003797093148942),
+LPF_TAPS(-0.000114262466830563),
+LPF_TAPS(-0.000007375338042619),
+LPF_TAPS(0.000110780672902561),
+LPF_TAPS(0.000010738306800940),
+LPF_TAPS(-0.000107268563989415),
+LPF_TAPS(-0.000013889846774370),
+LPF_TAPS(0.000103734799267992),
+LPF_TAPS(0.000016834061741043),
+LPF_TAPS(-0.000100187695034353),
+LPF_TAPS(-0.000019575293274054),
+LPF_TAPS(0.000096635221765021),
+LPF_TAPS(0.000022118102311547),
+LPF_TAPS(-0.000093085001987199),
+LPF_TAPS(-0.000024467250961158),
+LPF_TAPS(0.000089544308935324),
+LPF_TAPS(0.000026627684568545),
+LPF_TAPS(-0.000086020065970184),
+LPF_TAPS(-0.000028604514078264),
+LPF_TAPS(0.000082518846736081),
+LPF_TAPS(0.000030402998714268),
+LPF_TAPS(-0.000079046876030527),
+LPF_TAPS(-0.000032028529004963),
+LPF_TAPS(0.000075610031360122),
+LPF_TAPS(0.000033486610176828),
+LPF_TAPS(-0.000072213845155834),
+LPF_TAPS(-0.000034782845939036),
+LPF_TAPS(0.000068863507619961),
+LPF_TAPS(0.000035922922679381),
+LPF_TAPS(-0.000065563870176755),
+LPF_TAPS(-0.000036912594090979),
+LPF_TAPS(0.000062319449498186),
+LPF_TAPS(0.000037757666247151),
+LPF_TAPS(-0.000059134432075883),
+LPF_TAPS(-0.000038463983140413),
+LPF_TAPS(0.000056012679310092),
+LPF_TAPS(0.000039037412700123),
+LPF_TAPS(-0.000052957733086275),
+LPF_TAPS(-0.000039483833301589),
+LPF_TAPS(0.000049972821809768),
+LPF_TAPS(0.000039809120777898),
+LPF_TAPS(-0.000047060866868922),
+LPF_TAPS(-0.000040019135944408),
+LPF_TAPS(0.000044224489497212),
+LPF_TAPS(0.000040119712644108),
+LPF_TAPS(-0.000041466018004756),
+LPF_TAPS(-0.000040116646320761),
+LPF_TAPS(0.000038787495349966),
+LPF_TAPS(0.000040015683125125),
+LPF_TAPS(-0.000036190687022217),
+LPF_TAPS(-0.000039822509558359),
+LPF_TAPS(0.000033677089206780),
+LPF_TAPS(0.000039542742655132),
+LPF_TAPS(-0.000031247937203481),
+LPF_TAPS(-0.000039181920707691),
+LPF_TAPS(0.000028904214071107),
+LPF_TAPS(0.000038745494530907),
+LPF_TAPS(-0.000026646659470014),
+LPF_TAPS(-0.000038238819266954),
+LPF_TAPS(0.000024475778675831),
+LPF_TAPS(0.000037667146727081),
+LPF_TAPS(-0.000022391851737813),
+LPF_TAPS(-0.000037035618266847),
+LPF_TAPS(0.000020394942756081),
+LPF_TAPS(0.000036349258189961),
+LPF_TAPS(-0.000018484909252414),
+LPF_TAPS(-0.000035612967674835),
+LPF_TAPS(0.000016661411610296),
+LPF_TAPS(0.000034831519217002),
+LPF_TAPS(-0.000014923922560452),
+LPF_TAPS(-0.000034009551579453),
+LPF_TAPS(0.000013271736688854),
+LPF_TAPS(0.000033151565242131),
+LPF_TAPS(-0.000011703979945270),
+LPF_TAPS(-0.000032261918340969),
+LPF_TAPS(0.000010219619130956),
+LPF_TAPS(0.000031344823085946),
+LPF_TAPS(-0.000008817471345155),
+LPF_TAPS(-0.000030404342647009),
+LPF_TAPS(0.000007496213370957),
+LPF_TAPS(0.000029444388495961),
+LPF_TAPS(-0.000006254390981889),
+LPF_TAPS(-0.000028468718191753),
+LPF_TAPS(0.000005090428151623),
+LPF_TAPS(0.000027480933596112),
+LPF_TAPS(-0.000004002636150150),
+LPF_TAPS(-0.000026484479505846),
+LPF_TAPS(0.000002989222510623),
+LPF_TAPS(0.000025482642687743),
+LPF_TAPS(-0.000002048299852131),
+LPF_TAPS(-0.000024478551301565),
+LPF_TAPS(0.000001177894544622),
+LPF_TAPS(0.000023475174696270),
+LPF_TAPS(-0.000000375955203094),
+LPF_TAPS(-0.000022475323564316),
+LPF_TAPS(-0.000000359639000791),
+LPF_TAPS(0.000021481650438649),
+LPF_TAPS(0.000001031070220591),
+LPF_TAPS(-0.000020496650516781),
+LPF_TAPS(-0.000001640574020396),
+LPF_TAPS(0.000019522662796228),
+LPF_TAPS(0.000002190431672634),
+LPF_TAPS(-0.000018561871505499),
+LPF_TAPS(-0.000002682962676418),
+LPF_TAPS(0.000017616307814767),
+LPF_TAPS(0.000003120517503602),
+LPF_TAPS(-0.000016687851810380),
+LPF_TAPS(-0.000003505470578851),
+LPF_TAPS(0.000015778234717405),
+LPF_TAPS(0.000003840213499109),
+LPF_TAPS(-0.000014889041354518),
+LPF_TAPS(-0.000004127148496975),
+LPF_TAPS(0.000014021712805663),
+LPF_TAPS(0.000004368682151773),
+LPF_TAPS(-0.000013177549293115),
+LPF_TAPS(-0.000004567219351147),
+LPF_TAPS(0.000012357713236772),
+LPF_TAPS(0.000004725157505337),
+LPF_TAPS(-0.000011563232484775),
+LPF_TAPS(-0.000004844881015559),
+LPF_TAPS(0.000010795003700833),
+LPF_TAPS(0.000004928755997066),
+LPF_TAPS(-0.000010053795893948),
+LPF_TAPS(-0.000004979125256946),
+LPF_TAPS(0.000009340254076601),
+LPF_TAPS(0.000004998303525934),
+LPF_TAPS(-0.000008654903037807),
+LPF_TAPS(-0.000004988572942947),
+LPF_TAPS(0.000007998151217884),
+LPF_TAPS(0.000004952178790474),
+LPF_TAPS(-0.000007370294672177),
+LPF_TAPS(-0.000004891325478376),
+LPF_TAPS(0.000006771521111433),
+LPF_TAPS(0.000004808172773150),
+LPF_TAPS(-0.000006201914006985),
+LPF_TAPS(-0.000004704832269243),
+LPF_TAPS(0.000005661456749387),
+LPF_TAPS(0.000004583364098553),
+LPF_TAPS(-0.000005150036849619),
+LPF_TAPS(-0.000004445773873841),
+LPF_TAPS(0.000004667450172476),
+LPF_TAPS(0.000004294009861432),
+LPF_TAPS(-0.000004213405192313),
+LPF_TAPS(-0.000004129960378251),
+LPF_TAPS(0.000003787527261756),
+LPF_TAPS(0.000003955451407915),
+LPF_TAPS(-0.000003389362884580),
+LPF_TAPS(-0.000003772244430401),
+LPF_TAPS(0.000003018383984428),
+LPF_TAPS(0.000003582034459542),
+LPF_TAPS(-0.000002673992161604),
+LPF_TAPS(-0.000003386448282433),
+LPF_TAPS(0.000002355522930638),
+LPF_TAPS(0.000003187042894687),
+LPF_TAPS(-0.000002062249931914),
+LPF_TAPS(-0.000002985304125357),
+LPF_TAPS(0.000001793389111064),
+LPF_TAPS(0.000002782645445234),
+LPF_TAPS(-0.000001548102860405),
+LPF_TAPS(-0.000002580406952221),
+LPF_TAPS(0.000001325504117162),
+LPF_TAPS(0.000002379854527418),
+LPF_TAPS(-0.000001124660413670),
+LPF_TAPS(-0.000002182179155572),
+LPF_TAPS(0.000000944597875235),
+LPF_TAPS(0.000001988496403598),
+LPF_TAPS(-0.000000784305161806),
+LPF_TAPS(-0.000001799846050903),
+LPF_TAPS(0.000000642737349976),
+LPF_TAPS(0.000001617191865353),
+LPF_TAPS(-0.000000518819752302),
+LPF_TAPS(-0.000001441421518830),
+LPF_TAPS(0.000000411451671308),
+LPF_TAPS(0.000001273346636437),
+LPF_TAPS(-0.000000319510085909),
+LPF_TAPS(-0.000001113702973585),
+LPF_TAPS(0.000000241853268333),
+LPF_TAPS(0.000000963150715332),
+LPF_TAPS(-0.000000177324329996),
+LPF_TAPS(-0.000000822274892573),
+LPF_TAPS(0.000000124754695030),
+LPF_TAPS(0.000000691585909819),
+LPF_TAPS(-0.000000082967500509),
+LPF_TAPS(-0.000000571520179580),
+LPF_TAPS(0.000000050780922643),
+LPF_TAPS(0.000000462440858539),
+LPF_TAPS(-0.000000027011428462),
+LPF_TAPS(-0.000000364638680968),
+LPF_TAPS(0.000000010476952729),
+LPF_TAPS(0.000000278332885067),
+LPF_TAPS(0.000000000000000000),
+LPF_TAPS(-0.000000203672228149),
+LPF_TAPS(-0.000000005589328078),
+LPF_TAPS(0.000000140736086864),
+LPF_TAPS(0.000000007450379996),
+LPF_TAPS(-0.000000089535638879),
+LPF_TAPS(-0.000000006729075807),
+LPF_TAPS(0.000000050015122713),
+LPF_TAPS(0.000000004555102289),
+LPF_TAPS(-0.000000022053172665),
+LPF_TAPS(-0.000000002039181362),
+LPF_TAPS(0.000000005464226025),
+LPF_TAPS(0.000000000270411187),
+LPF_TAPS(0.000000000000000000),
+};
diff --git a/core/sound/blip_lpf_768K_24K.h b/core/sound/blip_lpf_768K_24K.h
new file mode 100644
index 000000000..53ff7b178
--- /dev/null
+++ b/core/sound/blip_lpf_768K_24K.h
@@ -0,0 +1,1181 @@
+static buf_t const blip_lpf_768K_24K[blip_lpf_768K_taps] = {
+LPF_TAPS(0.000000000000000000),
+LPF_TAPS(-0.000000001152484340),
+LPF_TAPS(-0.000000005095710178),
+LPF_TAPS(-0.000000012191318007),
+LPF_TAPS(-0.000000022267607829),
+LPF_TAPS(-0.000000034599414872),
+LPF_TAPS(-0.000000047931559441),
+LPF_TAPS(-0.000000060545647801),
+LPF_TAPS(-0.000000070367396870),
+LPF_TAPS(-0.000000075109154481),
+LPF_TAPS(-0.000000072440019472),
+LPF_TAPS(-0.000000060174053095),
+LPF_TAPS(-0.000000036465621112),
+LPF_TAPS(0.000000000000000000),
+LPF_TAPS(0.000000049832918420),
+LPF_TAPS(0.000000112793649081),
+LPF_TAPS(0.000000187687704968),
+LPF_TAPS(0.000000272309003584),
+LPF_TAPS(0.000000363439182757),
+LPF_TAPS(0.000000456907299830),
+LPF_TAPS(0.000000547711411542),
+LPF_TAPS(0.000000630200331088),
+LPF_TAPS(0.000000698310581159),
+LPF_TAPS(0.000000745850363362),
+LPF_TAPS(0.000000766819403203),
+LPF_TAPS(0.000000755750958378),
+LPF_TAPS(0.000000708060236928),
+LPF_TAPS(0.000000620382081976),
+LPF_TAPS(0.000000490880137644),
+LPF_TAPS(0.000000319509882033),
+LPF_TAPS(0.000000108218929585),
+LPF_TAPS(-0.000000138930138694),
+LPF_TAPS(-0.000000415726506026),
+LPF_TAPS(-0.000000713876132379),
+LPF_TAPS(-0.000001023169801964),
+LPF_TAPS(-0.000001331754540171),
+LPF_TAPS(-0.000001626504038801),
+LPF_TAPS(-0.000001893478950466),
+LPF_TAPS(-0.000002118463259581),
+LPF_TAPS(-0.000002287558619334),
+LPF_TAPS(-0.000002387814767604),
+LPF_TAPS(-0.000002407871092248),
+LPF_TAPS(-0.000002338582277506),
+LPF_TAPS(-0.000002173599867573),
+LPF_TAPS(-0.000001909881632425),
+LPF_TAPS(-0.000001548101872579),
+LPF_TAPS(-0.000001092938263905),
+LPF_TAPS(-0.000000553214480790),
+LPF_TAPS(0.000000058117445035),
+LPF_TAPS(0.000000724165411796),
+LPF_TAPS(0.000001424460145696),
+LPF_TAPS(0.000002135489726262),
+LPF_TAPS(0.000002831395534679),
+LPF_TAPS(0.000003484812208163),
+LPF_TAPS(0.000004067827273334),
+LPF_TAPS(0.000004553029819940),
+LPF_TAPS(0.000004914612148722),
+LPF_TAPS(0.000005129484047575),
+LPF_TAPS(0.000005178356448336),
+LPF_TAPS(0.000005046749878656),
+LPF_TAPS(0.000004725883481839),
+LPF_TAPS(0.000004213402503791),
+LPF_TAPS(0.000003513906045182),
+LPF_TAPS(0.000002639242484125),
+LPF_TAPS(0.000001608547155233),
+LPF_TAPS(0.000000448005422616),
+LPF_TAPS(-0.000000809666058306),
+LPF_TAPS(-0.000002126016652791),
+LPF_TAPS(-0.000003457923533233),
+LPF_TAPS(-0.000004758892958091),
+LPF_TAPS(-0.000005980565575676),
+LPF_TAPS(-0.000007074380617936),
+LPF_TAPS(-0.000007993345409950),
+LPF_TAPS(-0.000008693849789841),
+LPF_TAPS(-0.000009137460147870),
+LPF_TAPS(-0.000009292625130319),
+LPF_TAPS(-0.000009136224819149),
+LPF_TAPS(-0.000008654897515219),
+LPF_TAPS(-0.000007846083153315),
+LPF_TAPS(-0.000006718729797308),
+LPF_TAPS(-0.000005293619442137),
+LPF_TAPS(-0.000003603281228946),
+LPF_TAPS(-0.000001691473813720),
+LPF_TAPS(0.000000387766409326),
+LPF_TAPS(0.000002571498736137),
+LPF_TAPS(0.000004789644663852),
+LPF_TAPS(0.000006967103138217),
+LPF_TAPS(0.000009026155308364),
+LPF_TAPS(0.000010889086159912),
+LPF_TAPS(0.000012480939038455),
+LPF_TAPS(0.000013732310264828),
+LPF_TAPS(0.000014582085215692),
+LPF_TAPS(0.000014980014741443),
+LPF_TAPS(0.000014889031854004),
+LPF_TAPS(0.000014287213355241),
+LPF_TAPS(0.000013169299478268),
+LPF_TAPS(0.000011547696530582),
+LPF_TAPS(0.000009452902677324),
+LPF_TAPS(0.000006933314973567),
+LPF_TAPS(0.000004054396015711),
+LPF_TAPS(0.000000897200498571),
+LPF_TAPS(-0.000002443715184290),
+LPF_TAPS(-0.000005862954157649),
+LPF_TAPS(-0.000009247442627863),
+LPF_TAPS(-0.000012480006488093),
+LPF_TAPS(-0.000015443253135853),
+LPF_TAPS(-0.000018023635212619),
+LPF_TAPS(-0.000020115561256850),
+LPF_TAPS(-0.000021625410855532),
+LPF_TAPS(-0.000022475309223088),
+LPF_TAPS(-0.000022606518515204),
+LPF_TAPS(-0.000021982310715217),
+LPF_TAPS(-0.000020590199549203),
+LPF_TAPS(-0.000018443426346149),
+LPF_TAPS(-0.000015581616633170),
+LPF_TAPS(-0.000012070549940901),
+LPF_TAPS(-0.000008001014031039),
+LPF_TAPS(-0.000003486745649395),
+LPF_TAPS(0.000001338508053458),
+LPF_TAPS(0.000006324741191609),
+LPF_TAPS(0.000011310156627793),
+LPF_TAPS(0.000016126223163572),
+LPF_TAPS(0.000020603170792004),
+LPF_TAPS(0.000024575751153583),
+LPF_TAPS(0.000027889074347600),
+LPF_TAPS(0.000030404323246372),
+LPF_TAPS(0.000032004143012902),
+LPF_TAPS(0.000032597506998249),
+LPF_TAPS(0.000032123870727846),
+LPF_TAPS(0.000030556443168657),
+LPF_TAPS(0.000027904428545995),
+LPF_TAPS(0.000024214122051354),
+LPF_TAPS(0.000019568778020638),
+LPF_TAPS(0.000014087208525556),
+LPF_TAPS(0.000007921112588556),
+LPF_TAPS(0.000001251180037771),
+LPF_TAPS(-0.000005717942104500),
+LPF_TAPS(-0.000012763690379575),
+LPF_TAPS(-0.000019652463024142),
+LPF_TAPS(-0.000026147130699873),
+LPF_TAPS(-0.000032014945859340),
+LPF_TAPS(-0.000037035594634876),
+LPF_TAPS(-0.000041009121031896),
+LPF_TAPS(-0.000043763447917918),
+LPF_TAPS(-0.000045161223312182),
+LPF_TAPS(-0.000045105733981406),
+LPF_TAPS(-0.000043545651195518),
+LPF_TAPS(-0.000040478405225530),
+LPF_TAPS(-0.000035952024983577),
+LPF_TAPS(-0.000030065326015535),
+LPF_TAPS(-0.000022966382484504),
+LPF_TAPS(-0.000014849275213654),
+LPF_TAPS(-0.000005949166482728),
+LPF_TAPS(0.000003464188848603),
+LPF_TAPS(0.000013094329200604),
+LPF_TAPS(0.000022627149092650),
+LPF_TAPS(0.000031740871303510),
+LPF_TAPS(0.000040116620722822),
+LPF_TAPS(0.000047449261396865),
+LPF_TAPS(0.000053458137968486),
+LPF_TAPS(0.000057897353992016),
+LPF_TAPS(0.000060565223145184),
+LPF_TAPS(0.000061312545438306),
+LPF_TAPS(0.000060049388991730),
+LPF_TAPS(0.000056750098241436),
+LPF_TAPS(0.000051456300542010),
+LPF_TAPS(0.000044277743665853),
+LPF_TAPS(0.000035390864880425),
+LPF_TAPS(0.000025035066036882),
+LPF_TAPS(0.000013506746083069),
+LPF_TAPS(0.000001151220097359),
+LPF_TAPS(-0.000011647270299523),
+LPF_TAPS(-0.000024477179102611),
+LPF_TAPS(-0.000036912570537509),
+LPF_TAPS(-0.000048526931495632),
+LPF_TAPS(-0.000058907444320778),
+LPF_TAPS(-0.000067669253154571),
+LPF_TAPS(-0.000074469242648514),
+LPF_TAPS(-0.000079018849322365),
+LPF_TAPS(-0.000081095443628076),
+LPF_TAPS(-0.000080551854759354),
+LPF_TAPS(-0.000077323659767323),
+LPF_TAPS(-0.000071433922392276),
+LPF_TAPS(-0.000062995143465779),
+LPF_TAPS(-0.000052208271561396),
+LPF_TAPS(-0.000039358717142457),
+LPF_TAPS(-0.000024809412796150),
+LPF_TAPS(-0.000008991063029236),
+LPF_TAPS(0.000007610173841222),
+LPF_TAPS(0.000024467235348915),
+LPF_TAPS(0.000041028514488886),
+LPF_TAPS(0.000056735534135903),
+LPF_TAPS(0.000071041382131944),
+LPF_TAPS(0.000083429310872019),
+LPF_TAPS(0.000093430882066834),
+LPF_TAPS(0.000100643034423825),
+LPF_TAPS(0.000104743469950318),
+LPF_TAPS(0.000105503793440806),
+LPF_TAPS(0.000102799898754107),
+LPF_TAPS(0.000096619173300672),
+LPF_TAPS(0.000087064186655507),
+LPF_TAPS(0.000074352637674032),
+LPF_TAPS(0.000058813453653570),
+LPF_TAPS(0.000040879061234729),
+LPF_TAPS(0.000021073977816960),
+LPF_TAPS(-0.000000000000000001),
+LPF_TAPS(-0.000021681612386472),
+LPF_TAPS(-0.000043270446012788),
+LPF_TAPS(-0.000064049128813514),
+LPF_TAPS(-0.000083306720698925),
+LPF_TAPS(-0.000100362551675977),
+LPF_TAPS(-0.000114589722882715),
+LPF_TAPS(-0.000125437475434065),
+LPF_TAPS(-0.000132451647778846),
+LPF_TAPS(-0.000135292484671578),
+LPF_TAPS(-0.000133749129170364),
+LPF_TAPS(-0.000127750221693984),
+LPF_TAPS(-0.000117370144655030),
+LPF_TAPS(-0.000102830584276255),
+LPF_TAPS(-0.000084497228924858),
+LPF_TAPS(-0.000062871581095080),
+LPF_TAPS(-0.000038578023002731),
+LPF_TAPS(-0.000012346438291968),
+LPF_TAPS(0.000015009150871958),
+LPF_TAPS(0.000042615326457718),
+LPF_TAPS(0.000069566662877976),
+LPF_TAPS(0.000094954918773381),
+LPF_TAPS(0.000117899107325585),
+LPF_TAPS(0.000137575466160802),
+LPF_TAPS(0.000153246325251039),
+LPF_TAPS(0.000164286881487674),
+LPF_TAPS(0.000170208932309904),
+LPF_TAPS(0.000170680697327237),
+LPF_TAPS(0.000165541964570681),
+LPF_TAPS(0.000154813934042112),
+LPF_TAPS(0.000138703291782455),
+LPF_TAPS(0.000117600228002549),
+LPF_TAPS(0.000092070307386824),
+LPF_TAPS(0.000062840302340481),
+LPF_TAPS(0.000030778304128856),
+LPF_TAPS(-0.000003131374242035),
+LPF_TAPS(-0.000037817802723216),
+LPF_TAPS(-0.000072156677613199),
+LPF_TAPS(-0.000105006191277136),
+LPF_TAPS(-0.000135244402503110),
+LPF_TAPS(-0.000161806903178408),
+LPF_TAPS(-0.000183723536547474),
+LPF_TAPS(-0.000200152922407314),
+LPF_TAPS(-0.000210413586217004),
+LPF_TAPS(-0.000214010571892406),
+LPF_TAPS(-0.000210656540284900),
+LPF_TAPS(-0.000200286513900972),
+LPF_TAPS(-0.000183065618912633),
+LPF_TAPS(-0.000159389392365138),
+LPF_TAPS(-0.000129876459117940),
+LPF_TAPS(-0.000095353632044028),
+LPF_TAPS(-0.000056833742354112),
+LPF_TAPS(-0.000015486756257180),
+LPF_TAPS(0.000027395028900060),
+LPF_TAPS(0.000070436699562965),
+LPF_TAPS(0.000112224154544881),
+LPF_TAPS(0.000151349897149756),
+LPF_TAPS(0.000186459729305847),
+LPF_TAPS(0.000216298820689293),
+LPF_TAPS(0.000239755609570793),
+LPF_TAPS(0.000255902026837354),
+LPF_TAPS(0.000264028620387530),
+LPF_TAPS(0.000263673292235667),
+LPF_TAPS(0.000254642541863430),
+LPF_TAPS(0.000237024331684940),
+LPF_TAPS(0.000211191947516224),
+LPF_TAPS(0.000177798510922227),
+LPF_TAPS(0.000137762102436393),
+LPF_TAPS(0.000092241765277955),
+LPF_TAPS(0.000042604968190238),
+LPF_TAPS(-0.000009612596932831),
+LPF_TAPS(-0.000062753732040099),
+LPF_TAPS(-0.000115091570803501),
+LPF_TAPS(-0.000164884941123817),
+LPF_TAPS(-0.000210435501765685),
+LPF_TAPS(-0.000250144802934651),
+LPF_TAPS(-0.000282569380038599),
+LPF_TAPS(-0.000306472011140359),
+LPF_TAPS(-0.000320867352425224),
+LPF_TAPS(-0.000325060311027916),
+LPF_TAPS(-0.000318675717372279),
+LPF_TAPS(-0.000301678114356434),
+LPF_TAPS(-0.000274380780983162),
+LPF_TAPS(-0.000237443444441768),
+LPF_TAPS(-0.000191858496840385),
+LPF_TAPS(-0.000138925909321826),
+LPF_TAPS(-0.000080217414992324),
+LPF_TAPS(-0.000017530900424471),
+LPF_TAPS(0.000047163708998224),
+LPF_TAPS(0.000111785473930746),
+LPF_TAPS(0.000174208515351682),
+LPF_TAPS(0.000232331068450502),
+LPF_TAPS(0.000284145301110270),
+LPF_TAPS(0.000327805606950321),
+LPF_TAPS(0.000361693082058822),
+LPF_TAPS(0.000384473969581270),
+LPF_TAPS(0.000395150006431077),
+LPF_TAPS(0.000393098828235401),
+LPF_TAPS(0.000378102876452084),
+LPF_TAPS(0.000350365597303463),
+LPF_TAPS(0.000310514115583092),
+LPF_TAPS(0.000259587995509967),
+LPF_TAPS(0.000199014152192461),
+LPF_TAPS(0.000130568436450885),
+LPF_TAPS(0.000056324867689981),
+LPF_TAPS(-0.000021406080919213),
+LPF_TAPS(-0.000100148348209094),
+LPF_TAPS(-0.000177338163410176),
+LPF_TAPS(-0.000250406520562381),
+LPF_TAPS(-0.000316863627940003),
+LPF_TAPS(-0.000374382589341350),
+LPF_TAPS(-0.000420879540010174),
+LPF_TAPS(-0.000454587516954722),
+LPF_TAPS(-0.000474121491579033),
+LPF_TAPS(-0.000478532228889226),
+LPF_TAPS(-0.000467346956149880),
+LPF_TAPS(-0.000440595215956922),
+LPF_TAPS(-0.000398818732858811),
+LPF_TAPS(-0.000343064625195643),
+LPF_TAPS(-0.000274861829143962),
+LPF_TAPS(-0.000196181153047007),
+LPF_TAPS(-0.000109379929089854),
+LPF_TAPS(-0.000017132758053872),
+LPF_TAPS(0.000077649666647308),
+LPF_TAPS(0.000171911234199990),
+LPF_TAPS(0.000262547804955242),
+LPF_TAPS(0.000346508246194215),
+LPF_TAPS(0.000420895864074487),
+LPF_TAPS(0.000483066899259388),
+LPF_TAPS(0.000530722780509705),
+LPF_TAPS(0.000561992966921032),
+LPF_TAPS(0.000575505453295788),
+LPF_TAPS(0.000570442358525909),
+LPF_TAPS(0.000546578454533896),
+LPF_TAPS(0.000504301010739203),
+LPF_TAPS(0.000444609910754149),
+LPF_TAPS(0.000369097626198387),
+LPF_TAPS(0.000279909287382278),
+LPF_TAPS(0.000179683751090833),
+LPF_TAPS(0.000071477210129250),
+LPF_TAPS(-0.000041328503916990),
+LPF_TAPS(-0.000155130224881734),
+LPF_TAPS(-0.000266217192675056),
+LPF_TAPS(-0.000370890684020134),
+LPF_TAPS(-0.000465585720142990),
+LPF_TAPS(-0.000546990891677487),
+LPF_TAPS(-0.000612162321851922),
+LPF_TAPS(-0.000658627900460039),
+LPF_TAPS(-0.000684478162165066),
+LPF_TAPS(-0.000688440548023091),
+LPF_TAPS(-0.000669934269219190),
+LPF_TAPS(-0.000629103573390101),
+LPF_TAPS(-0.000566827879456252),
+LPF_TAPS(-0.000484707976382240),
+LPF_TAPS(-0.000385028251996259),
+LPF_TAPS(-0.000270695705380619),
+LPF_TAPS(-0.000145157274813930),
+LPF_TAPS(-0.000012297757001391),
+LPF_TAPS(0.000123678722798222),
+LPF_TAPS(0.000258380129850500),
+LPF_TAPS(0.000387366773040352),
+LPF_TAPS(0.000506295964894752),
+LPF_TAPS(0.000611066427620510),
+LPF_TAPS(0.000697957698936131),
+LPF_TAPS(0.000763759860442502),
+LPF_TAPS(0.000805889135312000),
+LPF_TAPS(0.000822485276891549),
+LPF_TAPS(0.000812487186081086),
+LPF_TAPS(0.000775683838897867),
+LPF_TAPS(0.000712738357840256),
+LPF_TAPS(0.000625183898955119),
+LPF_TAPS(0.000515390925051658),
+LPF_TAPS(0.000386506365966708),
+LPF_TAPS(0.000242366099243077),
+LPF_TAPS(0.000087383088454098),
+LPF_TAPS(-0.000073585638543570),
+LPF_TAPS(-0.000235389231818504),
+LPF_TAPS(-0.000392745899395397),
+LPF_TAPS(-0.000540413337085645),
+LPF_TAPS(-0.000673361271639362),
+LPF_TAPS(-0.000786940503718210),
+LPF_TAPS(-0.000877042840762386),
+LPF_TAPS(-0.000940246497411816),
+LPF_TAPS(-0.000973941910185252),
+LPF_TAPS(-0.000976433455066244),
+LPF_TAPS(-0.000947013257100458),
+LPF_TAPS(-0.000886004120206203),
+LPF_TAPS(-0.000794769558342508),
+LPF_TAPS(-0.000675689946958247),
+LPF_TAPS(-0.000532104903912070),
+LPF_TAPS(-0.000368223117113155),
+LPF_TAPS(-0.000189001926039628),
+LPF_TAPS(0.000000000000000005),
+LPF_TAPS(0.000192792597451849),
+LPF_TAPS(0.000383141843876918),
+LPF_TAPS(0.000564768905597874),
+LPF_TAPS(0.000731554712944432),
+LPF_TAPS(0.000877743377118140),
+LPF_TAPS(0.000998137770969946),
+LPF_TAPS(0.001088280720886277),
+LPF_TAPS(0.001144615598626183),
+LPF_TAPS(0.001164620653372918),
+LPF_TAPS(0.001146912171496028),
+LPF_TAPS(0.001091312473933286),
+LPF_TAPS(0.000998879831943005),
+LPF_TAPS(0.000871898569131351),
+LPF_TAPS(0.000713828884594515),
+LPF_TAPS(0.000529217238894420),
+LPF_TAPS(0.000323569449503238),
+LPF_TAPS(0.000103189902660546),
+LPF_TAPS(-0.000125008537718581),
+LPF_TAPS(-0.000353718296351377),
+LPF_TAPS(-0.000575468016503558),
+LPF_TAPS(-0.000782863453250455),
+LPF_TAPS(-0.000968830662626959),
+LPF_TAPS(-0.001126853593007360),
+LPF_TAPS(-0.001251198211887599),
+LPF_TAPS(-0.001337115585136943),
+LPF_TAPS(-0.001381016862473527),
+LPF_TAPS(-0.001380613899811274),
+LPF_TAPS(-0.001335020245572579),
+LPF_TAPS(-0.001244808405865867),
+LPF_TAPS(-0.001112020647622544),
+LPF_TAPS(-0.000940132058647822),
+LPF_TAPS(-0.000733966113792357),
+LPF_TAPS(-0.000499564548666700),
+LPF_TAPS(-0.000244014866424895),
+LPF_TAPS(0.000024759750985369),
+LPF_TAPS(0.000298242036610992),
+LPF_TAPS(0.000567586499855441),
+LPF_TAPS(0.000823901383743757),
+LPF_TAPS(0.001058537859482148),
+LPF_TAPS(0.001263377187176217),
+LPF_TAPS(0.001431106452212325),
+LPF_TAPS(0.001555473670218642),
+LPF_TAPS(0.001631513539674637),
+LPF_TAPS(0.001655735900279768),
+LPF_TAPS(0.001626270007586307),
+LPF_TAPS(0.001542959031374493),
+LPF_TAPS(0.001407400689546614),
+LPF_TAPS(0.001222931596249173),
+LPF_TAPS(0.000994554681679378),
+LPF_TAPS(0.000728810876167928),
+LPF_TAPS(0.000433598084332047),
+LPF_TAPS(0.000117942246968937),
+LPF_TAPS(-0.000208273059652547),
+LPF_TAPS(-0.000534610561168048),
+LPF_TAPS(-0.000850407583894923),
+LPF_TAPS(-0.001145118562253254),
+LPF_TAPS(-0.001408660933417868),
+LPF_TAPS(-0.001631753265716173),
+LPF_TAPS(-0.001806234489224940),
+LPF_TAPS(-0.001925353479318096),
+LPF_TAPS(-0.001984018981432122),
+LPF_TAPS(-0.001979000941352422),
+LPF_TAPS(-0.001909075691954721),
+LPF_TAPS(-0.001775109106082625),
+LPF_TAPS(-0.001580073708111861),
+LPF_TAPS(-0.001328997787593093),
+LPF_TAPS(-0.001028846714519885),
+LPF_TAPS(-0.000688338849954788),
+LPF_TAPS(-0.000317700608131232),
+LPF_TAPS(0.000071632713461015),
+LPF_TAPS(0.000467361829414448),
+LPF_TAPS(0.000856703924997078),
+LPF_TAPS(0.001226797152716265),
+LPF_TAPS(0.001565116620653128),
+LPF_TAPS(0.001859888687412874),
+LPF_TAPS(0.002100490149867073),
+LPF_TAPS(0.002277819107241694),
+LPF_TAPS(0.002384624910977274),
+LPF_TAPS(0.002415785652952178),
+LPF_TAPS(0.002368523080358119),
+LPF_TAPS(0.002242546615955572),
+LPF_TAPS(0.002040120257740298),
+LPF_TAPS(0.001766048471616154),
+LPF_TAPS(0.001427579704876770),
+LPF_TAPS(0.001034228760561114),
+LPF_TAPS(0.000597521901801380),
+LPF_TAPS(0.000130671117675938),
+LPF_TAPS(-0.000351813605211574),
+LPF_TAPS(-0.000834562978150250),
+LPF_TAPS(-0.001301825166365410),
+LPF_TAPS(-0.001737966190365439),
+LPF_TAPS(-0.002127978474272729),
+LPF_TAPS(-0.002457981429236488),
+LPF_TAPS(-0.002715697845351253),
+LPF_TAPS(-0.002890890264067375),
+LPF_TAPS(-0.002975742413280810),
+LPF_TAPS(-0.002965172191343571),
+LPF_TAPS(-0.002857064550412904),
+LPF_TAPS(-0.002652414904921744),
+LPF_TAPS(-0.002355376314608072),
+LPF_TAPS(-0.001973206588323283),
+LPF_TAPS(-0.001516114539436932),
+LPF_TAPS(-0.000997007803078406),
+LPF_TAPS(-0.000431147801801422),
+LPF_TAPS(0.000164279480330407),
+LPF_TAPS(0.000770665383479393),
+LPF_TAPS(0.001368539010210255),
+LPF_TAPS(0.001938169916452744),
+LPF_TAPS(0.002460195023751910),
+LPF_TAPS(0.002916250514243055),
+LPF_TAPS(0.003289588836867587),
+LPF_TAPS(0.003565660927117201),
+LPF_TAPS(0.003732644337448212),
+LPF_TAPS(0.003781899186874162),
+LPF_TAPS(0.003708335642353476),
+LPF_TAPS(0.003510678998832139),
+LPF_TAPS(0.003191621268673138),
+LPF_TAPS(0.002757851447814955),
+LPF_TAPS(0.002219960204124247),
+LPF_TAPS(0.001592218530000328),
+LPF_TAPS(0.000892233804429490),
+LPF_TAPS(0.000140490601831083),
+LPF_TAPS(-0.000640212653492852),
+LPF_TAPS(-0.001425416575883931),
+LPF_TAPS(-0.002189725487726716),
+LPF_TAPS(-0.002907583423253569),
+LPF_TAPS(-0.003554078894612804),
+LPF_TAPS(-0.004105754358390497),
+LPF_TAPS(-0.004541395526739372),
+LPF_TAPS(-0.004842775608648294),
+LPF_TAPS(-0.004995330262056102),
+LPF_TAPS(-0.004988740482468818),
+LPF_TAPS(-0.004817402821803838),
+LPF_TAPS(-0.004480769173390059),
+LPF_TAPS(-0.003983541805197440),
+LPF_TAPS(-0.003335713283738389),
+LPF_TAPS(-0.002552445298778380),
+LPF_TAPS(-0.001653785052822236),
+LPF_TAPS(-0.000664222687184143),
+LPF_TAPS(0.000387901961004376),
+LPF_TAPS(0.001471130281711834),
+LPF_TAPS(0.002551736080144651),
+LPF_TAPS(0.003594675595265330),
+LPF_TAPS(0.004564611426001721),
+LPF_TAPS(0.005426982600476230),
+LPF_TAPS(0.006149090924198915),
+LPF_TAPS(0.006701172463119070),
+LPF_TAPS(0.007057422610883705),
+LPF_TAPS(0.007196943686238185),
+LPF_TAPS(0.007104585410053790),
+LPF_TAPS(0.006771650899488136),
+LPF_TAPS(0.006196443940707756),
+LPF_TAPS(0.005384637187795986),
+LPF_TAPS(0.004349445487004629),
+LPF_TAPS(0.003111593624626861),
+LPF_TAPS(0.001699073308000820),
+LPF_TAPS(0.000146689962985106),
+LPF_TAPS(-0.001504594191750185),
+LPF_TAPS(-0.003208508517971278),
+LPF_TAPS(-0.004914495915054737),
+LPF_TAPS(-0.006568885298479145),
+LPF_TAPS(-0.008116186879932121),
+LPF_TAPS(-0.009500478553868536),
+LPF_TAPS(-0.010666848523875708),
+LPF_TAPS(-0.011562857035962059),
+LPF_TAPS(-0.012139978801904341),
+LPF_TAPS(-0.012354987444366434),
+LPF_TAPS(-0.012171244098485332),
+LPF_TAPS(-0.011559854154464340),
+LPF_TAPS(-0.010500658985394174),
+LPF_TAPS(-0.008983033308274631),
+LPF_TAPS(-0.007006463481110434),
+LPF_TAPS(-0.004580887427296669),
+LPF_TAPS(-0.001726782860894111),
+LPF_TAPS(0.001525003094514639),
+LPF_TAPS(0.005133683115894706),
+LPF_TAPS(0.009049211171689249),
+LPF_TAPS(0.013213203073096175),
+LPF_TAPS(0.017560076473553177),
+LPF_TAPS(0.022018384769864386),
+LPF_TAPS(0.026512314046210402),
+LPF_TAPS(0.030963307661350890),
+LPF_TAPS(0.035291779438375498),
+LPF_TAPS(0.039418873780099187),
+LPF_TAPS(0.043268229479278157),
+LPF_TAPS(0.046767703569527926),
+LPF_TAPS(0.049851012287597349),
+LPF_TAPS(0.052459248076485478),
+LPF_TAPS(0.054542234506598564),
+LPF_TAPS(0.056059684953538136),
+LPF_TAPS(0.056982135742987355),
+LPF_TAPS(0.057291630127126743),
+LPF_TAPS(0.056982135742987355),
+LPF_TAPS(0.056059684953538136),
+LPF_TAPS(0.054542234506598564),
+LPF_TAPS(0.052459248076485478),
+LPF_TAPS(0.049851012287597349),
+LPF_TAPS(0.046767703569527926),
+LPF_TAPS(0.043268229479278157),
+LPF_TAPS(0.039418873780099187),
+LPF_TAPS(0.035291779438375505),
+LPF_TAPS(0.030963307661350890),
+LPF_TAPS(0.026512314046210402),
+LPF_TAPS(0.022018384769864386),
+LPF_TAPS(0.017560076473553177),
+LPF_TAPS(0.013213203073096178),
+LPF_TAPS(0.009049211171689249),
+LPF_TAPS(0.005133683115894706),
+LPF_TAPS(0.001525003094514639),
+LPF_TAPS(-0.001726782860894111),
+LPF_TAPS(-0.004580887427296669),
+LPF_TAPS(-0.007006463481110434),
+LPF_TAPS(-0.008983033308274629),
+LPF_TAPS(-0.010500658985394175),
+LPF_TAPS(-0.011559854154464340),
+LPF_TAPS(-0.012171244098485332),
+LPF_TAPS(-0.012354987444366434),
+LPF_TAPS(-0.012139978801904341),
+LPF_TAPS(-0.011562857035962061),
+LPF_TAPS(-0.010666848523875708),
+LPF_TAPS(-0.009500478553868536),
+LPF_TAPS(-0.008116186879932121),
+LPF_TAPS(-0.006568885298479145),
+LPF_TAPS(-0.004914495915054737),
+LPF_TAPS(-0.003208508517971279),
+LPF_TAPS(-0.001504594191750185),
+LPF_TAPS(0.000146689962985106),
+LPF_TAPS(0.001699073308000820),
+LPF_TAPS(0.003111593624626861),
+LPF_TAPS(0.004349445487004629),
+LPF_TAPS(0.005384637187795987),
+LPF_TAPS(0.006196443940707756),
+LPF_TAPS(0.006771650899488136),
+LPF_TAPS(0.007104585410053790),
+LPF_TAPS(0.007196943686238185),
+LPF_TAPS(0.007057422610883705),
+LPF_TAPS(0.006701172463119071),
+LPF_TAPS(0.006149090924198916),
+LPF_TAPS(0.005426982600476230),
+LPF_TAPS(0.004564611426001722),
+LPF_TAPS(0.003594675595265330),
+LPF_TAPS(0.002551736080144652),
+LPF_TAPS(0.001471130281711834),
+LPF_TAPS(0.000387901961004376),
+LPF_TAPS(-0.000664222687184143),
+LPF_TAPS(-0.001653785052822236),
+LPF_TAPS(-0.002552445298778380),
+LPF_TAPS(-0.003335713283738390),
+LPF_TAPS(-0.003983541805197441),
+LPF_TAPS(-0.004480769173390060),
+LPF_TAPS(-0.004817402821803838),
+LPF_TAPS(-0.004988740482468819),
+LPF_TAPS(-0.004995330262056103),
+LPF_TAPS(-0.004842775608648295),
+LPF_TAPS(-0.004541395526739372),
+LPF_TAPS(-0.004105754358390497),
+LPF_TAPS(-0.003554078894612804),
+LPF_TAPS(-0.002907583423253569),
+LPF_TAPS(-0.002189725487726717),
+LPF_TAPS(-0.001425416575883931),
+LPF_TAPS(-0.000640212653492852),
+LPF_TAPS(0.000140490601831083),
+LPF_TAPS(0.000892233804429491),
+LPF_TAPS(0.001592218530000328),
+LPF_TAPS(0.002219960204124247),
+LPF_TAPS(0.002757851447814955),
+LPF_TAPS(0.003191621268673138),
+LPF_TAPS(0.003510678998832139),
+LPF_TAPS(0.003708335642353476),
+LPF_TAPS(0.003781899186874163),
+LPF_TAPS(0.003732644337448212),
+LPF_TAPS(0.003565660927117202),
+LPF_TAPS(0.003289588836867588),
+LPF_TAPS(0.002916250514243056),
+LPF_TAPS(0.002460195023751910),
+LPF_TAPS(0.001938169916452745),
+LPF_TAPS(0.001368539010210255),
+LPF_TAPS(0.000770665383479393),
+LPF_TAPS(0.000164279480330407),
+LPF_TAPS(-0.000431147801801422),
+LPF_TAPS(-0.000997007803078406),
+LPF_TAPS(-0.001516114539436932),
+LPF_TAPS(-0.001973206588323284),
+LPF_TAPS(-0.002355376314608072),
+LPF_TAPS(-0.002652414904921744),
+LPF_TAPS(-0.002857064550412904),
+LPF_TAPS(-0.002965172191343571),
+LPF_TAPS(-0.002975742413280810),
+LPF_TAPS(-0.002890890264067375),
+LPF_TAPS(-0.002715697845351253),
+LPF_TAPS(-0.002457981429236488),
+LPF_TAPS(-0.002127978474272729),
+LPF_TAPS(-0.001737966190365439),
+LPF_TAPS(-0.001301825166365411),
+LPF_TAPS(-0.000834562978150250),
+LPF_TAPS(-0.000351813605211574),
+LPF_TAPS(0.000130671117675938),
+LPF_TAPS(0.000597521901801380),
+LPF_TAPS(0.001034228760561114),
+LPF_TAPS(0.001427579704876769),
+LPF_TAPS(0.001766048471616154),
+LPF_TAPS(0.002040120257740299),
+LPF_TAPS(0.002242546615955573),
+LPF_TAPS(0.002368523080358119),
+LPF_TAPS(0.002415785652952178),
+LPF_TAPS(0.002384624910977274),
+LPF_TAPS(0.002277819107241695),
+LPF_TAPS(0.002100490149867073),
+LPF_TAPS(0.001859888687412874),
+LPF_TAPS(0.001565116620653128),
+LPF_TAPS(0.001226797152716265),
+LPF_TAPS(0.000856703924997079),
+LPF_TAPS(0.000467361829414448),
+LPF_TAPS(0.000071632713461015),
+LPF_TAPS(-0.000317700608131232),
+LPF_TAPS(-0.000688338849954788),
+LPF_TAPS(-0.001028846714519885),
+LPF_TAPS(-0.001328997787593093),
+LPF_TAPS(-0.001580073708111861),
+LPF_TAPS(-0.001775109106082626),
+LPF_TAPS(-0.001909075691954721),
+LPF_TAPS(-0.001979000941352422),
+LPF_TAPS(-0.001984018981432122),
+LPF_TAPS(-0.001925353479318096),
+LPF_TAPS(-0.001806234489224941),
+LPF_TAPS(-0.001631753265716172),
+LPF_TAPS(-0.001408660933417869),
+LPF_TAPS(-0.001145118562253254),
+LPF_TAPS(-0.000850407583894923),
+LPF_TAPS(-0.000534610561168048),
+LPF_TAPS(-0.000208273059652547),
+LPF_TAPS(0.000117942246968937),
+LPF_TAPS(0.000433598084332047),
+LPF_TAPS(0.000728810876167928),
+LPF_TAPS(0.000994554681679379),
+LPF_TAPS(0.001222931596249174),
+LPF_TAPS(0.001407400689546613),
+LPF_TAPS(0.001542959031374494),
+LPF_TAPS(0.001626270007586307),
+LPF_TAPS(0.001655735900279769),
+LPF_TAPS(0.001631513539674637),
+LPF_TAPS(0.001555473670218643),
+LPF_TAPS(0.001431106452212325),
+LPF_TAPS(0.001263377187176217),
+LPF_TAPS(0.001058537859482148),
+LPF_TAPS(0.000823901383743757),
+LPF_TAPS(0.000567586499855442),
+LPF_TAPS(0.000298242036610992),
+LPF_TAPS(0.000024759750985369),
+LPF_TAPS(-0.000244014866424895),
+LPF_TAPS(-0.000499564548666700),
+LPF_TAPS(-0.000733966113792357),
+LPF_TAPS(-0.000940132058647823),
+LPF_TAPS(-0.001112020647622544),
+LPF_TAPS(-0.001244808405865867),
+LPF_TAPS(-0.001335020245572579),
+LPF_TAPS(-0.001380613899811275),
+LPF_TAPS(-0.001381016862473528),
+LPF_TAPS(-0.001337115585136942),
+LPF_TAPS(-0.001251198211887600),
+LPF_TAPS(-0.001126853593007361),
+LPF_TAPS(-0.000968830662626959),
+LPF_TAPS(-0.000782863453250455),
+LPF_TAPS(-0.000575468016503558),
+LPF_TAPS(-0.000353718296351377),
+LPF_TAPS(-0.000125008537718581),
+LPF_TAPS(0.000103189902660546),
+LPF_TAPS(0.000323569449503238),
+LPF_TAPS(0.000529217238894420),
+LPF_TAPS(0.000713828884594515),
+LPF_TAPS(0.000871898569131352),
+LPF_TAPS(0.000998879831943005),
+LPF_TAPS(0.001091312473933286),
+LPF_TAPS(0.001146912171496027),
+LPF_TAPS(0.001164620653372918),
+LPF_TAPS(0.001144615598626185),
+LPF_TAPS(0.001088280720886277),
+LPF_TAPS(0.000998137770969946),
+LPF_TAPS(0.000877743377118140),
+LPF_TAPS(0.000731554712944432),
+LPF_TAPS(0.000564768905597874),
+LPF_TAPS(0.000383141843876918),
+LPF_TAPS(0.000192792597451849),
+LPF_TAPS(0.000000000000000005),
+LPF_TAPS(-0.000189001926039628),
+LPF_TAPS(-0.000368223117113155),
+LPF_TAPS(-0.000532104903912071),
+LPF_TAPS(-0.000675689946958247),
+LPF_TAPS(-0.000794769558342508),
+LPF_TAPS(-0.000886004120206203),
+LPF_TAPS(-0.000947013257100459),
+LPF_TAPS(-0.000976433455066244),
+LPF_TAPS(-0.000973941910185252),
+LPF_TAPS(-0.000940246497411816),
+LPF_TAPS(-0.000877042840762386),
+LPF_TAPS(-0.000786940503718210),
+LPF_TAPS(-0.000673361271639363),
+LPF_TAPS(-0.000540413337085645),
+LPF_TAPS(-0.000392745899395397),
+LPF_TAPS(-0.000235389231818504),
+LPF_TAPS(-0.000073585638543570),
+LPF_TAPS(0.000087383088454098),
+LPF_TAPS(0.000242366099243077),
+LPF_TAPS(0.000386506365966708),
+LPF_TAPS(0.000515390925051659),
+LPF_TAPS(0.000625183898955119),
+LPF_TAPS(0.000712738357840256),
+LPF_TAPS(0.000775683838897867),
+LPF_TAPS(0.000812487186081086),
+LPF_TAPS(0.000822485276891549),
+LPF_TAPS(0.000805889135312000),
+LPF_TAPS(0.000763759860442503),
+LPF_TAPS(0.000697957698936132),
+LPF_TAPS(0.000611066427620510),
+LPF_TAPS(0.000506295964894752),
+LPF_TAPS(0.000387366773040352),
+LPF_TAPS(0.000258380129850500),
+LPF_TAPS(0.000123678722798222),
+LPF_TAPS(-0.000012297757001391),
+LPF_TAPS(-0.000145157274813930),
+LPF_TAPS(-0.000270695705380619),
+LPF_TAPS(-0.000385028251996259),
+LPF_TAPS(-0.000484707976382240),
+LPF_TAPS(-0.000566827879456253),
+LPF_TAPS(-0.000629103573390101),
+LPF_TAPS(-0.000669934269219190),
+LPF_TAPS(-0.000688440548023092),
+LPF_TAPS(-0.000684478162165066),
+LPF_TAPS(-0.000658627900460040),
+LPF_TAPS(-0.000612162321851922),
+LPF_TAPS(-0.000546990891677487),
+LPF_TAPS(-0.000465585720142990),
+LPF_TAPS(-0.000370890684020135),
+LPF_TAPS(-0.000266217192675056),
+LPF_TAPS(-0.000155130224881734),
+LPF_TAPS(-0.000041328503916990),
+LPF_TAPS(0.000071477210129250),
+LPF_TAPS(0.000179683751090833),
+LPF_TAPS(0.000279909287382278),
+LPF_TAPS(0.000369097626198387),
+LPF_TAPS(0.000444609910754149),
+LPF_TAPS(0.000504301010739204),
+LPF_TAPS(0.000546578454533897),
+LPF_TAPS(0.000570442358525909),
+LPF_TAPS(0.000575505453295788),
+LPF_TAPS(0.000561992966921032),
+LPF_TAPS(0.000530722780509705),
+LPF_TAPS(0.000483066899259388),
+LPF_TAPS(0.000420895864074487),
+LPF_TAPS(0.000346508246194215),
+LPF_TAPS(0.000262547804955242),
+LPF_TAPS(0.000171911234199990),
+LPF_TAPS(0.000077649666647308),
+LPF_TAPS(-0.000017132758053872),
+LPF_TAPS(-0.000109379929089854),
+LPF_TAPS(-0.000196181153047007),
+LPF_TAPS(-0.000274861829143962),
+LPF_TAPS(-0.000343064625195643),
+LPF_TAPS(-0.000398818732858811),
+LPF_TAPS(-0.000440595215956923),
+LPF_TAPS(-0.000467346956149880),
+LPF_TAPS(-0.000478532228889226),
+LPF_TAPS(-0.000474121491579033),
+LPF_TAPS(-0.000454587516954723),
+LPF_TAPS(-0.000420879540010174),
+LPF_TAPS(-0.000374382589341350),
+LPF_TAPS(-0.000316863627940004),
+LPF_TAPS(-0.000250406520562381),
+LPF_TAPS(-0.000177338163410176),
+LPF_TAPS(-0.000100148348209094),
+LPF_TAPS(-0.000021406080919213),
+LPF_TAPS(0.000056324867689981),
+LPF_TAPS(0.000130568436450885),
+LPF_TAPS(0.000199014152192461),
+LPF_TAPS(0.000259587995509968),
+LPF_TAPS(0.000310514115583092),
+LPF_TAPS(0.000350365597303463),
+LPF_TAPS(0.000378102876452084),
+LPF_TAPS(0.000393098828235401),
+LPF_TAPS(0.000395150006431077),
+LPF_TAPS(0.000384473969581270),
+LPF_TAPS(0.000361693082058822),
+LPF_TAPS(0.000327805606950321),
+LPF_TAPS(0.000284145301110270),
+LPF_TAPS(0.000232331068450502),
+LPF_TAPS(0.000174208515351682),
+LPF_TAPS(0.000111785473930746),
+LPF_TAPS(0.000047163708998224),
+LPF_TAPS(-0.000017530900424471),
+LPF_TAPS(-0.000080217414992324),
+LPF_TAPS(-0.000138925909321826),
+LPF_TAPS(-0.000191858496840385),
+LPF_TAPS(-0.000237443444441768),
+LPF_TAPS(-0.000274380780983162),
+LPF_TAPS(-0.000301678114356435),
+LPF_TAPS(-0.000318675717372279),
+LPF_TAPS(-0.000325060311027916),
+LPF_TAPS(-0.000320867352425224),
+LPF_TAPS(-0.000306472011140359),
+LPF_TAPS(-0.000282569380038600),
+LPF_TAPS(-0.000250144802934651),
+LPF_TAPS(-0.000210435501765685),
+LPF_TAPS(-0.000164884941123817),
+LPF_TAPS(-0.000115091570803501),
+LPF_TAPS(-0.000062753732040099),
+LPF_TAPS(-0.000009612596932831),
+LPF_TAPS(0.000042604968190238),
+LPF_TAPS(0.000092241765277955),
+LPF_TAPS(0.000137762102436393),
+LPF_TAPS(0.000177798510922227),
+LPF_TAPS(0.000211191947516224),
+LPF_TAPS(0.000237024331684940),
+LPF_TAPS(0.000254642541863430),
+LPF_TAPS(0.000263673292235667),
+LPF_TAPS(0.000264028620387531),
+LPF_TAPS(0.000255902026837354),
+LPF_TAPS(0.000239755609570794),
+LPF_TAPS(0.000216298820689293),
+LPF_TAPS(0.000186459729305847),
+LPF_TAPS(0.000151349897149756),
+LPF_TAPS(0.000112224154544882),
+LPF_TAPS(0.000070436699562966),
+LPF_TAPS(0.000027395028900060),
+LPF_TAPS(-0.000015486756257180),
+LPF_TAPS(-0.000056833742354112),
+LPF_TAPS(-0.000095353632044028),
+LPF_TAPS(-0.000129876459117940),
+LPF_TAPS(-0.000159389392365138),
+LPF_TAPS(-0.000183065618912633),
+LPF_TAPS(-0.000200286513900972),
+LPF_TAPS(-0.000210656540284900),
+LPF_TAPS(-0.000214010571892406),
+LPF_TAPS(-0.000210413586217005),
+LPF_TAPS(-0.000200152922407313),
+LPF_TAPS(-0.000183723536547474),
+LPF_TAPS(-0.000161806903178408),
+LPF_TAPS(-0.000135244402503110),
+LPF_TAPS(-0.000105006191277136),
+LPF_TAPS(-0.000072156677613199),
+LPF_TAPS(-0.000037817802723216),
+LPF_TAPS(-0.000003131374242035),
+LPF_TAPS(0.000030778304128856),
+LPF_TAPS(0.000062840302340481),
+LPF_TAPS(0.000092070307386824),
+LPF_TAPS(0.000117600228002548),
+LPF_TAPS(0.000138703291782456),
+LPF_TAPS(0.000154813934042112),
+LPF_TAPS(0.000165541964570681),
+LPF_TAPS(0.000170680697327237),
+LPF_TAPS(0.000170208932309904),
+LPF_TAPS(0.000164286881487674),
+LPF_TAPS(0.000153246325251040),
+LPF_TAPS(0.000137575466160802),
+LPF_TAPS(0.000117899107325585),
+LPF_TAPS(0.000094954918773381),
+LPF_TAPS(0.000069566662877977),
+LPF_TAPS(0.000042615326457718),
+LPF_TAPS(0.000015009150871958),
+LPF_TAPS(-0.000012346438291968),
+LPF_TAPS(-0.000038578023002731),
+LPF_TAPS(-0.000062871581095080),
+LPF_TAPS(-0.000084497228924858),
+LPF_TAPS(-0.000102830584276255),
+LPF_TAPS(-0.000117370144655030),
+LPF_TAPS(-0.000127750221693984),
+LPF_TAPS(-0.000133749129170364),
+LPF_TAPS(-0.000135292484671579),
+LPF_TAPS(-0.000132451647778846),
+LPF_TAPS(-0.000125437475434065),
+LPF_TAPS(-0.000114589722882715),
+LPF_TAPS(-0.000100362551675977),
+LPF_TAPS(-0.000083306720698925),
+LPF_TAPS(-0.000064049128813514),
+LPF_TAPS(-0.000043270446012788),
+LPF_TAPS(-0.000021681612386472),
+LPF_TAPS(-0.000000000000000001),
+LPF_TAPS(0.000021073977816960),
+LPF_TAPS(0.000040879061234729),
+LPF_TAPS(0.000058813453653570),
+LPF_TAPS(0.000074352637674032),
+LPF_TAPS(0.000087064186655507),
+LPF_TAPS(0.000096619173300672),
+LPF_TAPS(0.000102799898754107),
+LPF_TAPS(0.000105503793440806),
+LPF_TAPS(0.000104743469950318),
+LPF_TAPS(0.000100643034423825),
+LPF_TAPS(0.000093430882066834),
+LPF_TAPS(0.000083429310872019),
+LPF_TAPS(0.000071041382131944),
+LPF_TAPS(0.000056735534135903),
+LPF_TAPS(0.000041028514488886),
+LPF_TAPS(0.000024467235348915),
+LPF_TAPS(0.000007610173841222),
+LPF_TAPS(-0.000008991063029236),
+LPF_TAPS(-0.000024809412796150),
+LPF_TAPS(-0.000039358717142457),
+LPF_TAPS(-0.000052208271561396),
+LPF_TAPS(-0.000062995143465779),
+LPF_TAPS(-0.000071433922392276),
+LPF_TAPS(-0.000077323659767323),
+LPF_TAPS(-0.000080551854759354),
+LPF_TAPS(-0.000081095443628076),
+LPF_TAPS(-0.000079018849322365),
+LPF_TAPS(-0.000074469242648514),
+LPF_TAPS(-0.000067669253154571),
+LPF_TAPS(-0.000058907444320778),
+LPF_TAPS(-0.000048526931495632),
+LPF_TAPS(-0.000036912570537509),
+LPF_TAPS(-0.000024477179102611),
+LPF_TAPS(-0.000011647270299523),
+LPF_TAPS(0.000001151220097359),
+LPF_TAPS(0.000013506746083069),
+LPF_TAPS(0.000025035066036882),
+LPF_TAPS(0.000035390864880425),
+LPF_TAPS(0.000044277743665853),
+LPF_TAPS(0.000051456300542010),
+LPF_TAPS(0.000056750098241436),
+LPF_TAPS(0.000060049388991730),
+LPF_TAPS(0.000061312545438306),
+LPF_TAPS(0.000060565223145184),
+LPF_TAPS(0.000057897353992016),
+LPF_TAPS(0.000053458137968486),
+LPF_TAPS(0.000047449261396865),
+LPF_TAPS(0.000040116620722822),
+LPF_TAPS(0.000031740871303510),
+LPF_TAPS(0.000022627149092650),
+LPF_TAPS(0.000013094329200604),
+LPF_TAPS(0.000003464188848603),
+LPF_TAPS(-0.000005949166482728),
+LPF_TAPS(-0.000014849275213654),
+LPF_TAPS(-0.000022966382484504),
+LPF_TAPS(-0.000030065326015535),
+LPF_TAPS(-0.000035952024983576),
+LPF_TAPS(-0.000040478405225530),
+LPF_TAPS(-0.000043545651195518),
+LPF_TAPS(-0.000045105733981406),
+LPF_TAPS(-0.000045161223312182),
+LPF_TAPS(-0.000043763447917918),
+LPF_TAPS(-0.000041009121031896),
+LPF_TAPS(-0.000037035594634876),
+LPF_TAPS(-0.000032014945859340),
+LPF_TAPS(-0.000026147130699873),
+LPF_TAPS(-0.000019652463024142),
+LPF_TAPS(-0.000012763690379575),
+LPF_TAPS(-0.000005717942104500),
+LPF_TAPS(0.000001251180037771),
+LPF_TAPS(0.000007921112588556),
+LPF_TAPS(0.000014087208525556),
+LPF_TAPS(0.000019568778020638),
+LPF_TAPS(0.000024214122051354),
+LPF_TAPS(0.000027904428545995),
+LPF_TAPS(0.000030556443168657),
+LPF_TAPS(0.000032123870727846),
+LPF_TAPS(0.000032597506998249),
+LPF_TAPS(0.000032004143012902),
+LPF_TAPS(0.000030404323246372),
+LPF_TAPS(0.000027889074347600),
+LPF_TAPS(0.000024575751153583),
+LPF_TAPS(0.000020603170792004),
+LPF_TAPS(0.000016126223163572),
+LPF_TAPS(0.000011310156627793),
+LPF_TAPS(0.000006324741191609),
+LPF_TAPS(0.000001338508053458),
+LPF_TAPS(-0.000003486745649395),
+LPF_TAPS(-0.000008001014031039),
+LPF_TAPS(-0.000012070549940901),
+LPF_TAPS(-0.000015581616633170),
+LPF_TAPS(-0.000018443426346149),
+LPF_TAPS(-0.000020590199549203),
+LPF_TAPS(-0.000021982310715217),
+LPF_TAPS(-0.000022606518515204),
+LPF_TAPS(-0.000022475309223088),
+LPF_TAPS(-0.000021625410855532),
+LPF_TAPS(-0.000020115561256850),
+LPF_TAPS(-0.000018023635212619),
+LPF_TAPS(-0.000015443253135853),
+LPF_TAPS(-0.000012480006488093),
+LPF_TAPS(-0.000009247442627863),
+LPF_TAPS(-0.000005862954157649),
+LPF_TAPS(-0.000002443715184290),
+LPF_TAPS(0.000000897200498571),
+LPF_TAPS(0.000004054396015711),
+LPF_TAPS(0.000006933314973567),
+LPF_TAPS(0.000009452902677324),
+LPF_TAPS(0.000011547696530582),
+LPF_TAPS(0.000013169299478268),
+LPF_TAPS(0.000014287213355241),
+LPF_TAPS(0.000014889031854004),
+LPF_TAPS(0.000014980014741443),
+LPF_TAPS(0.000014582085215692),
+LPF_TAPS(0.000013732310264828),
+LPF_TAPS(0.000012480939038455),
+LPF_TAPS(0.000010889086159912),
+LPF_TAPS(0.000009026155308364),
+LPF_TAPS(0.000006967103138217),
+LPF_TAPS(0.000004789644663852),
+LPF_TAPS(0.000002571498736137),
+LPF_TAPS(0.000000387766409326),
+LPF_TAPS(-0.000001691473813720),
+LPF_TAPS(-0.000003603281228946),
+LPF_TAPS(-0.000005293619442137),
+LPF_TAPS(-0.000006718729797308),
+LPF_TAPS(-0.000007846083153315),
+LPF_TAPS(-0.000008654897515219),
+LPF_TAPS(-0.000009136224819149),
+LPF_TAPS(-0.000009292625130319),
+LPF_TAPS(-0.000009137460147870),
+LPF_TAPS(-0.000008693849789841),
+LPF_TAPS(-0.000007993345409950),
+LPF_TAPS(-0.000007074380617936),
+LPF_TAPS(-0.000005980565575676),
+LPF_TAPS(-0.000004758892958091),
+LPF_TAPS(-0.000003457923533233),
+LPF_TAPS(-0.000002126016652791),
+LPF_TAPS(-0.000000809666058306),
+LPF_TAPS(0.000000448005422616),
+LPF_TAPS(0.000001608547155233),
+LPF_TAPS(0.000002639242484125),
+LPF_TAPS(0.000003513906045182),
+LPF_TAPS(0.000004213402503791),
+LPF_TAPS(0.000004725883481839),
+LPF_TAPS(0.000005046749878656),
+LPF_TAPS(0.000005178356448336),
+LPF_TAPS(0.000005129484047575),
+LPF_TAPS(0.000004914612148722),
+LPF_TAPS(0.000004553029819940),
+LPF_TAPS(0.000004067827273334),
+LPF_TAPS(0.000003484812208163),
+LPF_TAPS(0.000002831395534679),
+LPF_TAPS(0.000002135489726262),
+LPF_TAPS(0.000001424460145696),
+LPF_TAPS(0.000000724165411796),
+LPF_TAPS(0.000000058117445035),
+LPF_TAPS(-0.000000553214480790),
+LPF_TAPS(-0.000001092938263905),
+LPF_TAPS(-0.000001548101872579),
+LPF_TAPS(-0.000001909881632425),
+LPF_TAPS(-0.000002173599867573),
+LPF_TAPS(-0.000002338582277506),
+LPF_TAPS(-0.000002407871092248),
+LPF_TAPS(-0.000002387814767604),
+LPF_TAPS(-0.000002287558619334),
+LPF_TAPS(-0.000002118463259581),
+LPF_TAPS(-0.000001893478950466),
+LPF_TAPS(-0.000001626504038801),
+LPF_TAPS(-0.000001331754540171),
+LPF_TAPS(-0.000001023169801964),
+LPF_TAPS(-0.000000713876132379),
+LPF_TAPS(-0.000000415726506026),
+LPF_TAPS(-0.000000138930138694),
+LPF_TAPS(0.000000108218929585),
+LPF_TAPS(0.000000319509882033),
+LPF_TAPS(0.000000490880137644),
+LPF_TAPS(0.000000620382081976),
+LPF_TAPS(0.000000708060236928),
+LPF_TAPS(0.000000755750958378),
+LPF_TAPS(0.000000766819403203),
+LPF_TAPS(0.000000745850363362),
+LPF_TAPS(0.000000698310581159),
+LPF_TAPS(0.000000630200331088),
+LPF_TAPS(0.000000547711411542),
+LPF_TAPS(0.000000456907299830),
+LPF_TAPS(0.000000363439182757),
+LPF_TAPS(0.000000272309003584),
+LPF_TAPS(0.000000187687704968),
+LPF_TAPS(0.000000112793649081),
+LPF_TAPS(0.000000049832918420),
+LPF_TAPS(0.000000000000000000),
+LPF_TAPS(-0.000000036465621112),
+LPF_TAPS(-0.000000060174053095),
+LPF_TAPS(-0.000000072440019472),
+LPF_TAPS(-0.000000075109154481),
+LPF_TAPS(-0.000000070367396870),
+LPF_TAPS(-0.000000060545647801),
+LPF_TAPS(-0.000000047931559441),
+LPF_TAPS(-0.000000034599414872),
+LPF_TAPS(-0.000000022267607829),
+LPF_TAPS(-0.000000012191318007),
+LPF_TAPS(-0.000000005095710178),
+LPF_TAPS(-0.000000001152484340),
+LPF_TAPS(0.000000000000000000),
+};
diff --git a/core/sound/blip_lpf_768K_384K.h b/core/sound/blip_lpf_768K_384K.h
new file mode 100644
index 000000000..e198f897e
--- /dev/null
+++ b/core/sound/blip_lpf_768K_384K.h
@@ -0,0 +1,1181 @@
+static buf_t const blip_lpf_768K_384K[blip_lpf_768K_taps] = {
+LPF_TAPS(0.000000000000000000),
+LPF_TAPS(0.000000000270411186),
+LPF_TAPS(-0.000000000994249696),
+LPF_TAPS(0.000000002039181362),
+LPF_TAPS(-0.000000003271279145),
+LPF_TAPS(0.000000004555102288),
+LPF_TAPS(-0.000000005753776591),
+LPF_TAPS(0.000000006729075805),
+LPF_TAPS(-0.000000007341504155),
+LPF_TAPS(0.000000007450379994),
+LPF_TAPS(-0.000000006913920594),
+LPF_TAPS(0.000000005589328076),
+LPF_TAPS(-0.000000003332876482),
+LPF_TAPS(0.000000000000000000),
+LPF_TAPS(0.000000004554617657),
+LPF_TAPS(-0.000000010476952726),
+LPF_TAPS(0.000000017913549694),
+LPF_TAPS(-0.000000027011428453),
+LPF_TAPS(0.000000037917990275),
+LPF_TAPS(-0.000000050780922627),
+LPF_TAPS(0.000000065748102820),
+LPF_TAPS(-0.000000082967500483),
+LPF_TAPS(0.000000102587078868),
+LPF_TAPS(-0.000000124754694991),
+LPF_TAPS(0.000000149617998591),
+LPF_TAPS(-0.000000177324329941),
+LPF_TAPS(0.000000208020616472),
+LPF_TAPS(-0.000000241853268257),
+LPF_TAPS(0.000000278968072322),
+LPF_TAPS(-0.000000319510085809),
+LPF_TAPS(0.000000363623527997),
+LPF_TAPS(-0.000000411451671180),
+LPF_TAPS(0.000000463136730412),
+LPF_TAPS(-0.000000518819752139),
+LPF_TAPS(0.000000578640501706),
+LPF_TAPS(-0.000000642737349775),
+LPF_TAPS(0.000000711247157657),
+LPF_TAPS(-0.000000784305161561),
+LPF_TAPS(0.000000862044855799),
+LPF_TAPS(-0.000000944597874939),
+LPF_TAPS(0.000001032093874948),
+LPF_TAPS(-0.000001124660413318),
+LPF_TAPS(0.000001222422828231),
+LPF_TAPS(-0.000001325504116749),
+LPF_TAPS(0.000001434024812076),
+LPF_TAPS(-0.000001548102859921),
+LPF_TAPS(0.000001667853493968),
+LPF_TAPS(-0.000001793389110503),
+LPF_TAPS(0.000001924819142227),
+LPF_TAPS(-0.000002062249931271),
+LPF_TAPS(0.000002205784601466),
+LPF_TAPS(-0.000002355522929902),
+LPF_TAPS(0.000002511561217805),
+LPF_TAPS(-0.000002673992160767),
+LPF_TAPS(0.000002842904718416),
+LPF_TAPS(-0.000003018383983486),
+LPF_TAPS(0.000003200511050424),
+LPF_TAPS(-0.000003389362883522),
+LPF_TAPS(0.000003585012184637),
+LPF_TAPS(-0.000003787527260573),
+LPF_TAPS(0.000003996971890143),
+LPF_TAPS(-0.000004213405190998),
+LPF_TAPS(0.000004436881486255),
+LPF_TAPS(-0.000004667450171018),
+LPF_TAPS(0.000004905155578810),
+LPF_TAPS(-0.000005150036848010),
+LPF_TAPS(0.000005402127788367),
+LPF_TAPS(-0.000005661456747620),
+LPF_TAPS(0.000005928046478342),
+LPF_TAPS(-0.000006201914005048),
+LPF_TAPS(0.000006483070491646),
+LPF_TAPS(-0.000006771521109318),
+LPF_TAPS(0.000007067264904908),
+LPF_TAPS(-0.000007370294669877),
+LPF_TAPS(0.000007680596809926),
+LPF_TAPS(-0.000007998151215387),
+LPF_TAPS(0.000008322931132410),
+LPF_TAPS(-0.000008654903035105),
+LPF_TAPS(0.000008994026498681),
+LPF_TAPS(-0.000009340254073686),
+LPF_TAPS(0.000009693531161449),
+LPF_TAPS(-0.000010053795890810),
+LPF_TAPS(0.000010420978996245),
+LPF_TAPS(-0.000010795003697464),
+LPF_TAPS(0.000011175785580615),
+LPF_TAPS(-0.000011563232481166),
+LPF_TAPS(0.000011957244368585),
+LPF_TAPS(-0.000012357713232915),
+LPF_TAPS(0.000012764522973365),
+LPF_TAPS(-0.000013177549289003),
+LPF_TAPS(0.000013596659571678),
+LPF_TAPS(-0.000014021712801288),
+LPF_TAPS(0.000014452559443468),
+LPF_TAPS(-0.000014889041349871),
+LPF_TAPS(0.000015330991661110),
+LPF_TAPS(-0.000015778234712481),
+LPF_TAPS(0.000016230585942621),
+LPF_TAPS(-0.000016687851805172),
+LPF_TAPS(0.000017149829683597),
+LPF_TAPS(-0.000017616307809269),
+LPF_TAPS(0.000018087065182938),
+LPF_TAPS(-0.000018561871499706),
+LPF_TAPS(0.000019040487077642),
+LPF_TAPS(-0.000019522662790136),
+LPF_TAPS(0.000020008140002136),
+LPF_TAPS(-0.000020496650510385),
+LPF_TAPS(0.000020987916487774),
+LPF_TAPS(-0.000021481650431946),
+LPF_TAPS(0.000021977555118269),
+LPF_TAPS(-0.000022475323557302),
+LPF_TAPS(0.000022974638956881),
+LPF_TAPS(-0.000023475174688944),
+LPF_TAPS(0.000023976594261223),
+LPF_TAPS(-0.000024478551293927),
+LPF_TAPS(0.000024980689501528),
+LPF_TAPS(-0.000025482642679791),
+LPF_TAPS(0.000025984034698155),
+LPF_TAPS(-0.000026484479497582),
+LPF_TAPS(0.000026983581094014),
+LPF_TAPS(-0.000027480933587538),
+LPF_TAPS(0.000027976121177382),
+LPF_TAPS(-0.000028468718182870),
+LPF_TAPS(0.000028958289070426),
+LPF_TAPS(-0.000029444388486774),
+LPF_TAPS(0.000029926561298414),
+LPF_TAPS(-0.000030404342637523),
+LPF_TAPS(0.000030877257954332),
+LPF_TAPS(-0.000031344823076165),
+LPF_TAPS(0.000031806544273172),
+LPF_TAPS(-0.000032261918330903),
+LPF_TAPS(0.000032710432629812),
+LPF_TAPS(-0.000033151565231787),
+LPF_TAPS(0.000033584784973814),
+LPF_TAPS(-0.000034009551568840),
+LPF_TAPS(0.000034425315713993),
+LPF_TAPS(-0.000034831519206137),
+LPF_TAPS(0.000035227595064980),
+LPF_TAPS(-0.000035612967663724),
+LPF_TAPS(0.000035987052867338),
+LPF_TAPS(-0.000036349258178619),
+LPF_TAPS(0.000036698982892007),
+LPF_TAPS(-0.000037035618255292),
+LPF_TAPS(0.000037358547639259),
+LPF_TAPS(-0.000037667146715327),
+LPF_TAPS(0.000037960783641273),
+LPF_TAPS(-0.000038238819255021),
+LPF_TAPS(0.000038500607276709),
+LPF_TAPS(-0.000038745494518822),
+LPF_TAPS(0.000038972821104735),
+LPF_TAPS(-0.000039181920695467),
+LPF_TAPS(0.000039372120724805),
+LPF_TAPS(-0.000039542742642795),
+LPF_TAPS(0.000039693102167627),
+LPF_TAPS(-0.000039822509545943),
+LPF_TAPS(0.000039930269821541),
+LPF_TAPS(-0.000040015683112645),
+LPF_TAPS(0.000040078044897437),
+LPF_TAPS(-0.000040116646308240),
+LPF_TAPS(0.000040130774434075),
+LPF_TAPS(-0.000040119712631595),
+LPF_TAPS(0.000040082740844612),
+LPF_TAPS(-0.000040019135931921),
+LPF_TAPS(0.000039928172003567),
+LPF_TAPS(-0.000039809120765476),
+LPF_TAPS(0.000039661251872419),
+LPF_TAPS(-0.000039483833289280),
+LPF_TAPS(0.000039276131660508),
+LPF_TAPS(-0.000039037412687953),
+LPF_TAPS(0.000038766941516558),
+LPF_TAPS(-0.000038463983128416),
+LPF_TAPS(0.000038127802744662),
+LPF_TAPS(-0.000037757666235375),
+LPF_TAPS(0.000037352840537317),
+LPF_TAPS(-0.000036912594079466),
+LPF_TAPS(0.000036436197216230),
+LPF_TAPS(-0.000035922922668168),
+LPF_TAPS(0.000035372045970431),
+LPF_TAPS(-0.000034782845928194),
+LPF_TAPS(0.000034154605079717),
+LPF_TAPS(-0.000033486610166390),
+LPF_TAPS(0.000032778152609630),
+LPF_TAPS(-0.000032028528994971),
+LPF_TAPS(0.000031237041562635),
+LPF_TAPS(-0.000030402998704811),
+LPF_TAPS(0.000029525715469236),
+LPF_TAPS(-0.000028604514069339),
+LPF_TAPS(0.000027638724400135),
+LPF_TAPS(-0.000026627684560227),
+LPF_TAPS(0.000025570741379770),
+LPF_TAPS(-0.000024467250953544),
+LPF_TAPS(0.000023316579179911),
+LPF_TAPS(-0.000022118102304654),
+LPF_TAPS(0.000020871207469923),
+LPF_TAPS(-0.000019575293267954),
+LPF_TAPS(0.000018229770299364),
+LPF_TAPS(-0.000016834061735821),
+LPF_TAPS(0.000015387603886708),
+LPF_TAPS(-0.000013889846770054),
+LPF_TAPS(0.000012340254686558),
+LPF_TAPS(-0.000010738306797607),
+LPF_TAPS(0.000009083497706100),
+LPF_TAPS(-0.000007375338040335),
+LPF_TAPS(0.000005613355040533),
+LPF_TAPS(-0.000003797093147761),
+LPF_TAPS(0.000001926114595016),
+LPF_TAPS(-0.000000000000000003),
+LPF_TAPS(-0.000001981651040116),
+LPF_TAPS(0.000004019219353176),
+LPF_TAPS(-0.000006113065595237),
+LPF_TAPS(0.000008263529652806),
+LPF_TAPS(-0.000010470930045337),
+LPF_TAPS(0.000012735563326905),
+LPF_TAPS(-0.000015057703488542),
+LPF_TAPS(0.000017437601360918),
+LPF_TAPS(-0.000019875484017872),
+LPF_TAPS(0.000022371554181095),
+LPF_TAPS(-0.000024925989626264),
+LPF_TAPS(0.000027538942591151),
+LPF_TAPS(-0.000030210539185376),
+LPF_TAPS(0.000032940878803412),
+LPF_TAPS(-0.000035730033539605),
+LPF_TAPS(0.000038578047606853),
+LPF_TAPS(-0.000041484936758591),
+LPF_TAPS(0.000044450687714644),
+LPF_TAPS(-0.000047475257591278),
+LPF_TAPS(0.000050558573335760),
+LPF_TAPS(-0.000053700531166021),
+LPF_TAPS(0.000056900996015075),
+LPF_TAPS(-0.000060159800981691),
+LPF_TAPS(0.000063476746786749),
+LPF_TAPS(-0.000066851601235593),
+LPF_TAPS(0.000070284098687913),
+LPF_TAPS(-0.000073773939533842),
+LPF_TAPS(0.000077320789678049),
+LPF_TAPS(-0.000080924280031426),
+LPF_TAPS(0.000084584006010995),
+LPF_TAPS(-0.000088299527048358),
+LPF_TAPS(0.000092070366107026),
+LPF_TAPS(-0.000095896009209253),
+LPF_TAPS(0.000099775904971949),
+LPF_TAPS(-0.000103709464153514),
+LPF_TAPS(0.000107696059210172),
+LPF_TAPS(-0.000111735023863637),
+LPF_TAPS(0.000115825652679693),
+LPF_TAPS(-0.000119967200658306),
+LPF_TAPS(0.000124158882835594),
+LPF_TAPS(-0.000128399873897980),
+LPF_TAPS(0.000132689307809155),
+LPF_TAPS(-0.000137026277449419),
+LPF_TAPS(0.000141409834269035),
+LPF_TAPS(-0.000145838987954894),
+LPF_TAPS(0.000150312706110820),
+LPF_TAPS(-0.000154829913953110),
+LPF_TAPS(0.000159389494019859),
+LPF_TAPS(-0.000163990285895906),
+LPF_TAPS(0.000168631085952943),
+LPF_TAPS(-0.000173310647105377),
+LPF_TAPS(0.000178027678582232),
+LPF_TAPS(-0.000182780845715392),
+LPF_TAPS(0.000187568769744742),
+LPF_TAPS(-0.000192390027639763),
+LPF_TAPS(0.000197243151939321),
+LPF_TAPS(-0.000202126630608231),
+LPF_TAPS(0.000207038906912205),
+LPF_TAPS(-0.000211978379311058),
+LPF_TAPS(0.000216943401370225),
+LPF_TAPS(-0.000221932281691084),
+LPF_TAPS(0.000226943283860568),
+LPF_TAPS(-0.000231974626419998),
+LPF_TAPS(0.000237024482853370),
+LPF_TAPS(-0.000242090981595875),
+LPF_TAPS(0.000247172206062245),
+LPF_TAPS(-0.000252266194695467),
+LPF_TAPS(0.000257370941036386),
+LPF_TAPS(-0.000262484393813786),
+LPF_TAPS(0.000267604457055676),
+LPF_TAPS(-0.000272728990221946),
+LPF_TAPS(0.000277855808358299),
+LPF_TAPS(-0.000282982682271836),
+LPF_TAPS(0.000288107338728734),
+LPF_TAPS(-0.000293227460673635),
+LPF_TAPS(0.000298340687471423),
+LPF_TAPS(-0.000303444615171273),
+LPF_TAPS(0.000308536796793261),
+LPF_TAPS(-0.000313614742637452),
+LPF_TAPS(0.000318675920616005),
+LPF_TAPS(-0.000323717756607956),
+LPF_TAPS(0.000328737634837030),
+LPF_TAPS(-0.000333732898272658),
+LPF_TAPS(0.000338700849054109),
+LPF_TAPS(-0.000343638748937800),
+LPF_TAPS(0.000348543819768130),
+LPF_TAPS(-0.000353413243971537),
+LPF_TAPS(0.000358244165074024),
+LPF_TAPS(-0.000363033688242245),
+LPF_TAPS(0.000367778880847963),
+LPF_TAPS(-0.000372476773056069),
+LPF_TAPS(0.000377124358436137),
+LPF_TAPS(-0.000381718594597412),
+LPF_TAPS(0.000386256403847293),
+LPF_TAPS(-0.000390734673873283),
+LPF_TAPS(0.000395150258448289),
+LPF_TAPS(-0.000399499978159282),
+LPF_TAPS(0.000403780621159213),
+LPF_TAPS(-0.000407988943942102),
+LPF_TAPS(0.000412121672141243),
+LPF_TAPS(-0.000416175501350349),
+LPF_TAPS(0.000420147097967579),
+LPF_TAPS(-0.000424033100062336),
+LPF_TAPS(0.000427830118264552),
+LPF_TAPS(-0.000431534736676509),
+LPF_TAPS(0.000435143513806895),
+LPF_TAPS(-0.000438652983526867),
+LPF_TAPS(0.000442059656048091),
+LPF_TAPS(-0.000445360018922507),
+LPF_TAPS(0.000448550538063360),
+LPF_TAPS(-0.000451627658787709),
+LPF_TAPS(0.000454587806879764),
+LPF_TAPS(-0.000457427389675035),
+LPF_TAPS(0.000460142797164853),
+LPF_TAPS(-0.000462730403121316),
+LPF_TAPS(0.000465186566241766),
+LPF_TAPS(-0.000467507631313145),
+LPF_TAPS(0.000469689930395631),
+LPF_TAPS(-0.000471729784024983),
+LPF_TAPS(0.000473623502433613),
+LPF_TAPS(-0.000475367386790137),
+LPF_TAPS(0.000476957730456324),
+LPF_TAPS(-0.000478390820261935),
+LPF_TAPS(0.000479662937796735),
+LPF_TAPS(-0.000480770360718725),
+LPF_TAPS(0.000481709364079260),
+LPF_TAPS(-0.000482476221663812),
+LPF_TAPS(0.000483067207347903),
+LPF_TAPS(-0.000483478596468587),
+LPF_TAPS(0.000483706667210077),
+LPF_TAPS(-0.000483747702003447),
+LPF_TAPS(0.000483597988940244),
+LPF_TAPS(-0.000483253823198865),
+LPF_TAPS(0.000482711508483713),
+LPF_TAPS(-0.000481967358476406),
+LPF_TAPS(0.000481017698298616),
+LPF_TAPS(-0.000479858865985737),
+LPF_TAPS(0.000478487213971473),
+LPF_TAPS(-0.000476899110581980),
+LPF_TAPS(0.000475090941539597),
+LPF_TAPS(-0.000473059111475377),
+LPF_TAPS(0.000470800045449915),
+LPF_TAPS(-0.000468310190481600),
+LPF_TAPS(0.000465586017082436),
+LPF_TAPS(-0.000462624020799889),
+LPF_TAPS(0.000459420723764587),
+LPF_TAPS(-0.000455972676243683),
+LPF_TAPS(0.000452276458198651),
+LPF_TAPS(-0.000448328680846479),
+LPF_TAPS(0.000444125988225302),
+LPF_TAPS(-0.000439665058761943),
+LPF_TAPS(0.000434942606841526),
+LPF_TAPS(-0.000429955384379064),
+LPF_TAPS(0.000424700182391138),
+LPF_TAPS(-0.000419173832567952),
+LPF_TAPS(0.000413373208844710),
+LPF_TAPS(-0.000407295228971762),
+LPF_TAPS(0.000400936856082419),
+LPF_TAPS(-0.000394295100258801),
+LPF_TAPS(0.000387367020093622),
+LPF_TAPS(-0.000380149724248259),
+LPF_TAPS(0.000372640373005998),
+LPF_TAPS(-0.000364836179819894),
+LPF_TAPS(0.000356734412854055),
+LPF_TAPS(-0.000348332396518861),
+LPF_TAPS(0.000339627512997867),
+LPF_TAPS(-0.000330617203766392),
+LPF_TAPS(0.000321298971101761),
+LPF_TAPS(-0.000311670379583514),
+LPF_TAPS(0.000301729057582259),
+LPF_TAPS(-0.000291472698739046),
+LPF_TAPS(0.000280899063431644),
+LPF_TAPS(-0.000270005980228271),
+LPF_TAPS(0.000258791347328876),
+LPF_TAPS(-0.000247253133991462),
+LPF_TAPS(0.000235389381944138),
+LPF_TAPS(-0.000223198206781637),
+LPF_TAPS(0.000210677799345778),
+LPF_TAPS(-0.000197826427088561),
+LPF_TAPS(0.000184642435418710),
+LPF_TAPS(-0.000171124249029053),
+LPF_TAPS(0.000157270373204788),
+LPF_TAPS(-0.000143079395113615),
+LPF_TAPS(0.000128549985073485),
+LPF_TAPS(-0.000113680897800369),
+LPF_TAPS(0.000098470973634793),
+LPF_TAPS(-0.000082919139745099),
+LPF_TAPS(0.000067024411307639),
+LPF_TAPS(-0.000050785892664286),
+LPF_TAPS(0.000034202778454439),
+LPF_TAPS(-0.000017274354722572),
+LPF_TAPS(0.000000000000000014),
+LPF_TAPS(0.000017620813639447),
+LPF_TAPS(-0.000035588519551489),
+LPF_TAPS(0.000053903455519512),
+LPF_TAPS(-0.000072565862782260),
+LPF_TAPS(0.000091575885089580),
+LPF_TAPS(-0.000110933567787666),
+LPF_TAPS(0.000130638856934091),
+LPF_TAPS(-0.000150691598443988),
+LPF_TAPS(0.000171091537266013),
+LPF_TAPS(-0.000191838316591080),
+LPF_TAPS(0.000212931477093403),
+LPF_TAPS(-0.000234370456202377),
+LPF_TAPS(0.000256154587410179),
+LPF_TAPS(-0.000278283099611775),
+LPF_TAPS(0.000300755116478590),
+LPF_TAPS(-0.000323569655867949),
+LPF_TAPS(0.000346725629267694),
+LPF_TAPS(-0.000370221841275197),
+LPF_TAPS(0.000394056989113803),
+LPF_TAPS(-0.000418229662185097),
+LPF_TAPS(0.000442738341658212),
+LPF_TAPS(-0.000467581400096332),
+LPF_TAPS(0.000492757101121587),
+LPF_TAPS(-0.000518263599116645),
+LPF_TAPS(0.000544098938966130),
+LPF_TAPS(-0.000570261055836143),
+LPF_TAPS(0.000596747774993021),
+LPF_TAPS(-0.000623556811661394),
+LPF_TAPS(0.000650685770922677),
+LPF_TAPS(-0.000678132147652138),
+LPF_TAPS(0.000705893326497600),
+LPF_TAPS(-0.000733966581898311),
+LPF_TAPS(0.000762349078143984),
+LPF_TAPS(-0.000791037869475468),
+LPF_TAPS(0.000820029900226574),
+LPF_TAPS(-0.000849322005006614),
+LPF_TAPS(0.000878910908925097),
+LPF_TAPS(-0.000908793227858092),
+LPF_TAPS(0.000938965468755724),
+LPF_TAPS(-0.000969424029992167),
+LPF_TAPS(0.001000165201758039),
+LPF_TAPS(-0.001031185166493171),
+LPF_TAPS(0.001062479999363495),
+LPF_TAPS(-0.001094045668779393),
+LPF_TAPS(0.001125878036955373),
+LPF_TAPS(-0.001157972860512807),
+LPF_TAPS(0.001190325791125529),
+LPF_TAPS(-0.001222932376205617),
+LPF_TAPS(0.001255788059632947),
+LPF_TAPS(-0.001288888182526336),
+LPF_TAPS(0.001322227984056061),
+LPF_TAPS(-0.001355802602298820),
+LPF_TAPS(0.001389607075134370),
+LPF_TAPS(-0.001423636341183102),
+LPF_TAPS(0.001457885240785600),
+LPF_TAPS(-0.001492348517023386),
+LPF_TAPS(0.001527020816780052),
+LPF_TAPS(-0.001561896691843702),
+LPF_TAPS(0.001596970600050276),
+LPF_TAPS(-0.001632236906465618),
+LPF_TAPS(0.001667689884609320),
+LPF_TAPS(-0.001703323717717588),
+LPF_TAPS(0.001739132500044762),
+LPF_TAPS(-0.001775110238204683),
+LPF_TAPS(0.001811250852550967),
+LPF_TAPS(-0.001847548178594808),
+LPF_TAPS(0.001883995968461036),
+LPF_TAPS(-0.001920587892381849),
+LPF_TAPS(0.001957317540227685),
+LPF_TAPS(-0.001994178423074255),
+LPF_TAPS(0.002031163974806278),
+LPF_TAPS(-0.002068267553756874),
+LPF_TAPS(0.002105482444381715),
+LPF_TAPS(-0.002142801858968588),
+LPF_TAPS(0.002180218939380428),
+LPF_TAPS(-0.002217726758832453),
+LPF_TAPS(0.002255318323702332),
+LPF_TAPS(-0.002292986575372473),
+LPF_TAPS(0.002330724392104569),
+LPF_TAPS(-0.002368524590945418),
+LPF_TAPS(0.002406379929663035),
+LPF_TAPS(-0.002444283108713129),
+LPF_TAPS(0.002482226773234861),
+LPF_TAPS(-0.002520203515075174),
+LPF_TAPS(0.002558205874840951),
+LPF_TAPS(-0.002596226343979004),
+LPF_TAPS(0.002634257366882061),
+LPF_TAPS(-0.002672291343020784),
+LPF_TAPS(0.002710320629100963),
+LPF_TAPS(-0.002748337541244994),
+LPF_TAPS(0.002786334357196795),
+LPF_TAPS(-0.002824303318549647),
+LPF_TAPS(0.002862236632995987),
+LPF_TAPS(-0.002900126476598270),
+LPF_TAPS(0.002937964996080315),
+LPF_TAPS(-0.002975744311138068),
+LPF_TAPS(0.003013456516769105),
+LPF_TAPS(-0.003051093685619919),
+LPF_TAPS(0.003088647870350189),
+LPF_TAPS(-0.003126111106013140),
+LPF_TAPS(0.003163475412451058),
+LPF_TAPS(-0.003200732796705143),
+LPF_TAPS(0.003237875255438910),
+LPF_TAPS(-0.003274894777373765),
+LPF_TAPS(0.003311783345736453),
+LPF_TAPS(-0.003348532940717123),
+LPF_TAPS(0.003385135541937034),
+LPF_TAPS(-0.003421583130924953),
+LPF_TAPS(0.003457867693601739),
+LPF_TAPS(-0.003493981222771505),
+LPF_TAPS(0.003529915720618663),
+LPF_TAPS(-0.003565663201210385),
+LPF_TAPS(0.003601215693002516),
+LPF_TAPS(-0.003636565241348854),
+LPF_TAPS(0.003671703911012522),
+LPF_TAPS(-0.003706623788678157),
+LPF_TAPS(0.003741316985464251),
+LPF_TAPS(-0.003775775639435239),
+LPF_TAPS(0.003809991918110436),
+LPF_TAPS(-0.003843958020971396),
+LPF_TAPS(0.003877666181964841),
+LPF_TAPS(-0.003911108672000603),
+LPF_TAPS(0.003944277801444062),
+LPF_TAPS(-0.003977165922601843),
+LPF_TAPS(0.004009765432199282),
+LPF_TAPS(-0.004042068773849197),
+LPF_TAPS(0.004074068440511907),
+LPF_TAPS(-0.004105756976942348),
+LPF_TAPS(0.004137126982127919),
+LPF_TAPS(-0.004168171111711666),
+LPF_TAPS(0.004198882080402778),
+LPF_TAPS(-0.004229252664372421),
+LPF_TAPS(0.004259275703633247),
+LPF_TAPS(-0.004288944104403062),
+LPF_TAPS(0.004318250841450483),
+LPF_TAPS(-0.004347188960422623),
+LPF_TAPS(0.004375751580152430),
+LPF_TAPS(-0.004403931894946425),
+LPF_TAPS(0.004431723176851317),
+LPF_TAPS(-0.004459118777896791),
+LPF_TAPS(0.004486112132317764),
+LPF_TAPS(-0.004512696758749931),
+LPF_TAPS(0.004538866262402050),
+LPF_TAPS(-0.004564614337201600),
+LPF_TAPS(0.004589934767914467),
+LPF_TAPS(-0.004614821432235720),
+LPF_TAPS(0.004639268302853067),
+LPF_TAPS(-0.004663269449481221),
+LPF_TAPS(0.004686819040863900),
+LPF_TAPS(-0.004709911346748542),
+LPF_TAPS(0.004732540739825469),
+LPF_TAPS(-0.004754701697636799),
+LPF_TAPS(0.004776388804451371),
+LPF_TAPS(-0.004797596753105372),
+LPF_TAPS(0.004818320346807375),
+LPF_TAPS(-0.004838554500909534),
+LPF_TAPS(0.004858294244640562),
+LPF_TAPS(-0.004877534722802006),
+LPF_TAPS(0.004896271197427504),
+LPF_TAPS(-0.004914499049402611),
+LPF_TAPS(0.004932213780045447),
+LPF_TAPS(-0.004949411012647929),
+LPF_TAPS(0.004966086493976694),
+LPF_TAPS(-0.004982236095731548),
+LPF_TAPS(0.004997855815964010),
+LPF_TAPS(-0.005012941780452204),
+LPF_TAPS(0.005027490244032875),
+LPF_TAPS(-0.005041497591890537),
+LPF_TAPS(0.005054960340802851),
+LPF_TAPS(-0.005067875140339913),
+LPF_TAPS(0.005080238774019983),
+LPF_TAPS(-0.005092048160419741),
+LPF_TAPS(0.005103300354237250),
+LPF_TAPS(-0.005113992547309152),
+LPF_TAPS(0.005124122069582142),
+LPF_TAPS(-0.005133686390034935),
+LPF_TAPS(0.005142683117554329),
+LPF_TAPS(-0.005151110001762504),
+LPF_TAPS(0.005158964933796077),
+LPF_TAPS(-0.005166245947036424),
+LPF_TAPS(0.005172951217791205),
+LPF_TAPS(-0.005179079065925450),
+LPF_TAPS(0.005184627955445600),
+LPF_TAPS(-0.005189596495030709),
+LPF_TAPS(0.005193983438515609),
+LPF_TAPS(-0.005197787685323134),
+LPF_TAPS(0.005201008280846106),
+LPF_TAPS(-0.005203644416778216),
+LPF_TAPS(0.005205695431395181),
+LPF_TAPS(-0.005207160809784200),
+LPF_TAPS(0.005208040184022438),
+LPF_TAPS(0.994791666661283269),
+LPF_TAPS(0.005208040184022438),
+LPF_TAPS(-0.005207160809784200),
+LPF_TAPS(0.005205695431395181),
+LPF_TAPS(-0.005203644416778216),
+LPF_TAPS(0.005201008280846106),
+LPF_TAPS(-0.005197787685323134),
+LPF_TAPS(0.005193983438515609),
+LPF_TAPS(-0.005189596495030709),
+LPF_TAPS(0.005184627955445601),
+LPF_TAPS(-0.005179079065925450),
+LPF_TAPS(0.005172951217791205),
+LPF_TAPS(-0.005166245947036424),
+LPF_TAPS(0.005158964933796077),
+LPF_TAPS(-0.005151110001762505),
+LPF_TAPS(0.005142683117554329),
+LPF_TAPS(-0.005133686390034935),
+LPF_TAPS(0.005124122069582142),
+LPF_TAPS(-0.005113992547309153),
+LPF_TAPS(0.005103300354237250),
+LPF_TAPS(-0.005092048160419742),
+LPF_TAPS(0.005080238774019983),
+LPF_TAPS(-0.005067875140339913),
+LPF_TAPS(0.005054960340802851),
+LPF_TAPS(-0.005041497591890537),
+LPF_TAPS(0.005027490244032875),
+LPF_TAPS(-0.005012941780452204),
+LPF_TAPS(0.004997855815964010),
+LPF_TAPS(-0.004982236095731548),
+LPF_TAPS(0.004966086493976694),
+LPF_TAPS(-0.004949411012647929),
+LPF_TAPS(0.004932213780045447),
+LPF_TAPS(-0.004914499049402611),
+LPF_TAPS(0.004896271197427504),
+LPF_TAPS(-0.004877534722802006),
+LPF_TAPS(0.004858294244640562),
+LPF_TAPS(-0.004838554500909534),
+LPF_TAPS(0.004818320346807375),
+LPF_TAPS(-0.004797596753105372),
+LPF_TAPS(0.004776388804451371),
+LPF_TAPS(-0.004754701697636799),
+LPF_TAPS(0.004732540739825469),
+LPF_TAPS(-0.004709911346748542),
+LPF_TAPS(0.004686819040863900),
+LPF_TAPS(-0.004663269449481221),
+LPF_TAPS(0.004639268302853067),
+LPF_TAPS(-0.004614821432235721),
+LPF_TAPS(0.004589934767914467),
+LPF_TAPS(-0.004564614337201602),
+LPF_TAPS(0.004538866262402050),
+LPF_TAPS(-0.004512696758749932),
+LPF_TAPS(0.004486112132317765),
+LPF_TAPS(-0.004459118777896791),
+LPF_TAPS(0.004431723176851318),
+LPF_TAPS(-0.004403931894946425),
+LPF_TAPS(0.004375751580152430),
+LPF_TAPS(-0.004347188960422624),
+LPF_TAPS(0.004318250841450484),
+LPF_TAPS(-0.004288944104403062),
+LPF_TAPS(0.004259275703633247),
+LPF_TAPS(-0.004229252664372422),
+LPF_TAPS(0.004198882080402778),
+LPF_TAPS(-0.004168171111711667),
+LPF_TAPS(0.004137126982127919),
+LPF_TAPS(-0.004105756976942348),
+LPF_TAPS(0.004074068440511907),
+LPF_TAPS(-0.004042068773849197),
+LPF_TAPS(0.004009765432199283),
+LPF_TAPS(-0.003977165922601843),
+LPF_TAPS(0.003944277801444063),
+LPF_TAPS(-0.003911108672000603),
+LPF_TAPS(0.003877666181964843),
+LPF_TAPS(-0.003843958020971395),
+LPF_TAPS(0.003809991918110436),
+LPF_TAPS(-0.003775775639435239),
+LPF_TAPS(0.003741316985464251),
+LPF_TAPS(-0.003706623788678157),
+LPF_TAPS(0.003671703911012522),
+LPF_TAPS(-0.003636565241348854),
+LPF_TAPS(0.003601215693002516),
+LPF_TAPS(-0.003565663201210386),
+LPF_TAPS(0.003529915720618663),
+LPF_TAPS(-0.003493981222771505),
+LPF_TAPS(0.003457867693601739),
+LPF_TAPS(-0.003421583130924954),
+LPF_TAPS(0.003385135541937035),
+LPF_TAPS(-0.003348532940717124),
+LPF_TAPS(0.003311783345736452),
+LPF_TAPS(-0.003274894777373765),
+LPF_TAPS(0.003237875255438911),
+LPF_TAPS(-0.003200732796705143),
+LPF_TAPS(0.003163475412451059),
+LPF_TAPS(-0.003126111106013141),
+LPF_TAPS(0.003088647870350190),
+LPF_TAPS(-0.003051093685619919),
+LPF_TAPS(0.003013456516769106),
+LPF_TAPS(-0.002975744311138068),
+LPF_TAPS(0.002937964996080315),
+LPF_TAPS(-0.002900126476598269),
+LPF_TAPS(0.002862236632995987),
+LPF_TAPS(-0.002824303318549648),
+LPF_TAPS(0.002786334357196794),
+LPF_TAPS(-0.002748337541244995),
+LPF_TAPS(0.002710320629100963),
+LPF_TAPS(-0.002672291343020785),
+LPF_TAPS(0.002634257366882061),
+LPF_TAPS(-0.002596226343979004),
+LPF_TAPS(0.002558205874840951),
+LPF_TAPS(-0.002520203515075174),
+LPF_TAPS(0.002482226773234862),
+LPF_TAPS(-0.002444283108713130),
+LPF_TAPS(0.002406379929663036),
+LPF_TAPS(-0.002368524590945418),
+LPF_TAPS(0.002330724392104569),
+LPF_TAPS(-0.002292986575372473),
+LPF_TAPS(0.002255318323702333),
+LPF_TAPS(-0.002217726758832453),
+LPF_TAPS(0.002180218939380428),
+LPF_TAPS(-0.002142801858968588),
+LPF_TAPS(0.002105482444381714),
+LPF_TAPS(-0.002068267553756875),
+LPF_TAPS(0.002031163974806278),
+LPF_TAPS(-0.001994178423074256),
+LPF_TAPS(0.001957317540227685),
+LPF_TAPS(-0.001920587892381849),
+LPF_TAPS(0.001883995968461037),
+LPF_TAPS(-0.001847548178594808),
+LPF_TAPS(0.001811250852550967),
+LPF_TAPS(-0.001775110238204684),
+LPF_TAPS(0.001739132500044762),
+LPF_TAPS(-0.001703323717717588),
+LPF_TAPS(0.001667689884609320),
+LPF_TAPS(-0.001632236906465618),
+LPF_TAPS(0.001596970600050276),
+LPF_TAPS(-0.001561896691843702),
+LPF_TAPS(0.001527020816780052),
+LPF_TAPS(-0.001492348517023386),
+LPF_TAPS(0.001457885240785600),
+LPF_TAPS(-0.001423636341183102),
+LPF_TAPS(0.001389607075134370),
+LPF_TAPS(-0.001355802602298820),
+LPF_TAPS(0.001322227984056061),
+LPF_TAPS(-0.001288888182526336),
+LPF_TAPS(0.001255788059632947),
+LPF_TAPS(-0.001222932376205617),
+LPF_TAPS(0.001190325791125529),
+LPF_TAPS(-0.001157972860512807),
+LPF_TAPS(0.001125878036955374),
+LPF_TAPS(-0.001094045668779393),
+LPF_TAPS(0.001062479999363495),
+LPF_TAPS(-0.001031185166493171),
+LPF_TAPS(0.001000165201758039),
+LPF_TAPS(-0.000969424029992166),
+LPF_TAPS(0.000938965468755724),
+LPF_TAPS(-0.000908793227858092),
+LPF_TAPS(0.000878910908925098),
+LPF_TAPS(-0.000849322005006615),
+LPF_TAPS(0.000820029900226574),
+LPF_TAPS(-0.000791037869475468),
+LPF_TAPS(0.000762349078143985),
+LPF_TAPS(-0.000733966581898311),
+LPF_TAPS(0.000705893326497601),
+LPF_TAPS(-0.000678132147652138),
+LPF_TAPS(0.000650685770922677),
+LPF_TAPS(-0.000623556811661394),
+LPF_TAPS(0.000596747774993021),
+LPF_TAPS(-0.000570261055836143),
+LPF_TAPS(0.000544098938966130),
+LPF_TAPS(-0.000518263599116645),
+LPF_TAPS(0.000492757101121588),
+LPF_TAPS(-0.000467581400096331),
+LPF_TAPS(0.000442738341658212),
+LPF_TAPS(-0.000418229662185096),
+LPF_TAPS(0.000394056989113803),
+LPF_TAPS(-0.000370221841275197),
+LPF_TAPS(0.000346725629267694),
+LPF_TAPS(-0.000323569655867949),
+LPF_TAPS(0.000300755116478590),
+LPF_TAPS(-0.000278283099611775),
+LPF_TAPS(0.000256154587410179),
+LPF_TAPS(-0.000234370456202377),
+LPF_TAPS(0.000212931477093403),
+LPF_TAPS(-0.000191838316591080),
+LPF_TAPS(0.000171091537266013),
+LPF_TAPS(-0.000150691598443988),
+LPF_TAPS(0.000130638856934091),
+LPF_TAPS(-0.000110933567787667),
+LPF_TAPS(0.000091575885089580),
+LPF_TAPS(-0.000072565862782260),
+LPF_TAPS(0.000053903455519512),
+LPF_TAPS(-0.000035588519551489),
+LPF_TAPS(0.000017620813639447),
+LPF_TAPS(0.000000000000000014),
+LPF_TAPS(-0.000017274354722572),
+LPF_TAPS(0.000034202778454439),
+LPF_TAPS(-0.000050785892664286),
+LPF_TAPS(0.000067024411307639),
+LPF_TAPS(-0.000082919139745099),
+LPF_TAPS(0.000098470973634793),
+LPF_TAPS(-0.000113680897800369),
+LPF_TAPS(0.000128549985073485),
+LPF_TAPS(-0.000143079395113615),
+LPF_TAPS(0.000157270373204788),
+LPF_TAPS(-0.000171124249029052),
+LPF_TAPS(0.000184642435418710),
+LPF_TAPS(-0.000197826427088561),
+LPF_TAPS(0.000210677799345778),
+LPF_TAPS(-0.000223198206781637),
+LPF_TAPS(0.000235389381944138),
+LPF_TAPS(-0.000247253133991462),
+LPF_TAPS(0.000258791347328876),
+LPF_TAPS(-0.000270005980228271),
+LPF_TAPS(0.000280899063431644),
+LPF_TAPS(-0.000291472698739046),
+LPF_TAPS(0.000301729057582259),
+LPF_TAPS(-0.000311670379583514),
+LPF_TAPS(0.000321298971101761),
+LPF_TAPS(-0.000330617203766392),
+LPF_TAPS(0.000339627512997867),
+LPF_TAPS(-0.000348332396518861),
+LPF_TAPS(0.000356734412854056),
+LPF_TAPS(-0.000364836179819894),
+LPF_TAPS(0.000372640373005998),
+LPF_TAPS(-0.000380149724248259),
+LPF_TAPS(0.000387367020093622),
+LPF_TAPS(-0.000394295100258801),
+LPF_TAPS(0.000400936856082419),
+LPF_TAPS(-0.000407295228971762),
+LPF_TAPS(0.000413373208844710),
+LPF_TAPS(-0.000419173832567952),
+LPF_TAPS(0.000424700182391138),
+LPF_TAPS(-0.000429955384379064),
+LPF_TAPS(0.000434942606841526),
+LPF_TAPS(-0.000439665058761943),
+LPF_TAPS(0.000444125988225302),
+LPF_TAPS(-0.000448328680846479),
+LPF_TAPS(0.000452276458198651),
+LPF_TAPS(-0.000455972676243683),
+LPF_TAPS(0.000459420723764588),
+LPF_TAPS(-0.000462624020799889),
+LPF_TAPS(0.000465586017082436),
+LPF_TAPS(-0.000468310190481601),
+LPF_TAPS(0.000470800045449915),
+LPF_TAPS(-0.000473059111475377),
+LPF_TAPS(0.000475090941539597),
+LPF_TAPS(-0.000476899110581980),
+LPF_TAPS(0.000478487213971474),
+LPF_TAPS(-0.000479858865985737),
+LPF_TAPS(0.000481017698298616),
+LPF_TAPS(-0.000481967358476406),
+LPF_TAPS(0.000482711508483713),
+LPF_TAPS(-0.000483253823198866),
+LPF_TAPS(0.000483597988940244),
+LPF_TAPS(-0.000483747702003447),
+LPF_TAPS(0.000483706667210077),
+LPF_TAPS(-0.000483478596468587),
+LPF_TAPS(0.000483067207347904),
+LPF_TAPS(-0.000482476221663813),
+LPF_TAPS(0.000481709364079260),
+LPF_TAPS(-0.000480770360718725),
+LPF_TAPS(0.000479662937796735),
+LPF_TAPS(-0.000478390820261935),
+LPF_TAPS(0.000476957730456324),
+LPF_TAPS(-0.000475367386790138),
+LPF_TAPS(0.000473623502433613),
+LPF_TAPS(-0.000471729784024983),
+LPF_TAPS(0.000469689930395632),
+LPF_TAPS(-0.000467507631313146),
+LPF_TAPS(0.000465186566241767),
+LPF_TAPS(-0.000462730403121316),
+LPF_TAPS(0.000460142797164853),
+LPF_TAPS(-0.000457427389675035),
+LPF_TAPS(0.000454587806879764),
+LPF_TAPS(-0.000451627658787709),
+LPF_TAPS(0.000448550538063360),
+LPF_TAPS(-0.000445360018922507),
+LPF_TAPS(0.000442059656048091),
+LPF_TAPS(-0.000438652983526867),
+LPF_TAPS(0.000435143513806896),
+LPF_TAPS(-0.000431534736676510),
+LPF_TAPS(0.000427830118264552),
+LPF_TAPS(-0.000424033100062336),
+LPF_TAPS(0.000420147097967580),
+LPF_TAPS(-0.000416175501350349),
+LPF_TAPS(0.000412121672141243),
+LPF_TAPS(-0.000407988943942102),
+LPF_TAPS(0.000403780621159213),
+LPF_TAPS(-0.000399499978159282),
+LPF_TAPS(0.000395150258448289),
+LPF_TAPS(-0.000390734673873283),
+LPF_TAPS(0.000386256403847293),
+LPF_TAPS(-0.000381718594597412),
+LPF_TAPS(0.000377124358436137),
+LPF_TAPS(-0.000372476773056069),
+LPF_TAPS(0.000367778880847964),
+LPF_TAPS(-0.000363033688242245),
+LPF_TAPS(0.000358244165074024),
+LPF_TAPS(-0.000353413243971538),
+LPF_TAPS(0.000348543819768130),
+LPF_TAPS(-0.000343638748937801),
+LPF_TAPS(0.000338700849054109),
+LPF_TAPS(-0.000333732898272658),
+LPF_TAPS(0.000328737634837030),
+LPF_TAPS(-0.000323717756607956),
+LPF_TAPS(0.000318675920616005),
+LPF_TAPS(-0.000313614742637452),
+LPF_TAPS(0.000308536796793261),
+LPF_TAPS(-0.000303444615171273),
+LPF_TAPS(0.000298340687471424),
+LPF_TAPS(-0.000293227460673635),
+LPF_TAPS(0.000288107338728734),
+LPF_TAPS(-0.000282982682271836),
+LPF_TAPS(0.000277855808358299),
+LPF_TAPS(-0.000272728990221946),
+LPF_TAPS(0.000267604457055676),
+LPF_TAPS(-0.000262484393813786),
+LPF_TAPS(0.000257370941036386),
+LPF_TAPS(-0.000252266194695467),
+LPF_TAPS(0.000247172206062245),
+LPF_TAPS(-0.000242090981595876),
+LPF_TAPS(0.000237024482853370),
+LPF_TAPS(-0.000231974626419998),
+LPF_TAPS(0.000226943283860568),
+LPF_TAPS(-0.000221932281691084),
+LPF_TAPS(0.000216943401370225),
+LPF_TAPS(-0.000211978379311058),
+LPF_TAPS(0.000207038906912205),
+LPF_TAPS(-0.000202126630608231),
+LPF_TAPS(0.000197243151939321),
+LPF_TAPS(-0.000192390027639763),
+LPF_TAPS(0.000187568769744742),
+LPF_TAPS(-0.000182780845715392),
+LPF_TAPS(0.000178027678582232),
+LPF_TAPS(-0.000173310647105377),
+LPF_TAPS(0.000168631085952943),
+LPF_TAPS(-0.000163990285895906),
+LPF_TAPS(0.000159389494019859),
+LPF_TAPS(-0.000154829913953110),
+LPF_TAPS(0.000150312706110820),
+LPF_TAPS(-0.000145838987954894),
+LPF_TAPS(0.000141409834269036),
+LPF_TAPS(-0.000137026277449419),
+LPF_TAPS(0.000132689307809155),
+LPF_TAPS(-0.000128399873897980),
+LPF_TAPS(0.000124158882835594),
+LPF_TAPS(-0.000119967200658306),
+LPF_TAPS(0.000115825652679693),
+LPF_TAPS(-0.000111735023863637),
+LPF_TAPS(0.000107696059210172),
+LPF_TAPS(-0.000103709464153514),
+LPF_TAPS(0.000099775904971949),
+LPF_TAPS(-0.000095896009209253),
+LPF_TAPS(0.000092070366107026),
+LPF_TAPS(-0.000088299527048358),
+LPF_TAPS(0.000084584006010995),
+LPF_TAPS(-0.000080924280031426),
+LPF_TAPS(0.000077320789678049),
+LPF_TAPS(-0.000073773939533842),
+LPF_TAPS(0.000070284098687913),
+LPF_TAPS(-0.000066851601235593),
+LPF_TAPS(0.000063476746786749),
+LPF_TAPS(-0.000060159800981691),
+LPF_TAPS(0.000056900996015075),
+LPF_TAPS(-0.000053700531166021),
+LPF_TAPS(0.000050558573335760),
+LPF_TAPS(-0.000047475257591278),
+LPF_TAPS(0.000044450687714644),
+LPF_TAPS(-0.000041484936758591),
+LPF_TAPS(0.000038578047606853),
+LPF_TAPS(-0.000035730033539605),
+LPF_TAPS(0.000032940878803412),
+LPF_TAPS(-0.000030210539185376),
+LPF_TAPS(0.000027538942591151),
+LPF_TAPS(-0.000024925989626264),
+LPF_TAPS(0.000022371554181096),
+LPF_TAPS(-0.000019875484017872),
+LPF_TAPS(0.000017437601360918),
+LPF_TAPS(-0.000015057703488542),
+LPF_TAPS(0.000012735563326905),
+LPF_TAPS(-0.000010470930045337),
+LPF_TAPS(0.000008263529652806),
+LPF_TAPS(-0.000006113065595237),
+LPF_TAPS(0.000004019219353176),
+LPF_TAPS(-0.000001981651040116),
+LPF_TAPS(-0.000000000000000003),
+LPF_TAPS(0.000001926114595016),
+LPF_TAPS(-0.000003797093147761),
+LPF_TAPS(0.000005613355040533),
+LPF_TAPS(-0.000007375338040335),
+LPF_TAPS(0.000009083497706100),
+LPF_TAPS(-0.000010738306797607),
+LPF_TAPS(0.000012340254686558),
+LPF_TAPS(-0.000013889846770054),
+LPF_TAPS(0.000015387603886708),
+LPF_TAPS(-0.000016834061735821),
+LPF_TAPS(0.000018229770299364),
+LPF_TAPS(-0.000019575293267954),
+LPF_TAPS(0.000020871207469923),
+LPF_TAPS(-0.000022118102304654),
+LPF_TAPS(0.000023316579179911),
+LPF_TAPS(-0.000024467250953544),
+LPF_TAPS(0.000025570741379770),
+LPF_TAPS(-0.000026627684560227),
+LPF_TAPS(0.000027638724400135),
+LPF_TAPS(-0.000028604514069339),
+LPF_TAPS(0.000029525715469236),
+LPF_TAPS(-0.000030402998704811),
+LPF_TAPS(0.000031237041562636),
+LPF_TAPS(-0.000032028528994971),
+LPF_TAPS(0.000032778152609630),
+LPF_TAPS(-0.000033486610166390),
+LPF_TAPS(0.000034154605079718),
+LPF_TAPS(-0.000034782845928194),
+LPF_TAPS(0.000035372045970431),
+LPF_TAPS(-0.000035922922668168),
+LPF_TAPS(0.000036436197216230),
+LPF_TAPS(-0.000036912594079466),
+LPF_TAPS(0.000037352840537317),
+LPF_TAPS(-0.000037757666235375),
+LPF_TAPS(0.000038127802744662),
+LPF_TAPS(-0.000038463983128416),
+LPF_TAPS(0.000038766941516558),
+LPF_TAPS(-0.000039037412687953),
+LPF_TAPS(0.000039276131660508),
+LPF_TAPS(-0.000039483833289280),
+LPF_TAPS(0.000039661251872419),
+LPF_TAPS(-0.000039809120765477),
+LPF_TAPS(0.000039928172003567),
+LPF_TAPS(-0.000040019135931921),
+LPF_TAPS(0.000040082740844612),
+LPF_TAPS(-0.000040119712631595),
+LPF_TAPS(0.000040130774434076),
+LPF_TAPS(-0.000040116646308240),
+LPF_TAPS(0.000040078044897437),
+LPF_TAPS(-0.000040015683112645),
+LPF_TAPS(0.000039930269821541),
+LPF_TAPS(-0.000039822509545943),
+LPF_TAPS(0.000039693102167627),
+LPF_TAPS(-0.000039542742642795),
+LPF_TAPS(0.000039372120724805),
+LPF_TAPS(-0.000039181920695467),
+LPF_TAPS(0.000038972821104735),
+LPF_TAPS(-0.000038745494518822),
+LPF_TAPS(0.000038500607276709),
+LPF_TAPS(-0.000038238819255021),
+LPF_TAPS(0.000037960783641273),
+LPF_TAPS(-0.000037667146715327),
+LPF_TAPS(0.000037358547639259),
+LPF_TAPS(-0.000037035618255292),
+LPF_TAPS(0.000036698982892007),
+LPF_TAPS(-0.000036349258178619),
+LPF_TAPS(0.000035987052867338),
+LPF_TAPS(-0.000035612967663724),
+LPF_TAPS(0.000035227595064980),
+LPF_TAPS(-0.000034831519206137),
+LPF_TAPS(0.000034425315713993),
+LPF_TAPS(-0.000034009551568840),
+LPF_TAPS(0.000033584784973814),
+LPF_TAPS(-0.000033151565231787),
+LPF_TAPS(0.000032710432629812),
+LPF_TAPS(-0.000032261918330903),
+LPF_TAPS(0.000031806544273172),
+LPF_TAPS(-0.000031344823076165),
+LPF_TAPS(0.000030877257954332),
+LPF_TAPS(-0.000030404342637523),
+LPF_TAPS(0.000029926561298414),
+LPF_TAPS(-0.000029444388486774),
+LPF_TAPS(0.000028958289070426),
+LPF_TAPS(-0.000028468718182870),
+LPF_TAPS(0.000027976121177382),
+LPF_TAPS(-0.000027480933587537),
+LPF_TAPS(0.000026983581094014),
+LPF_TAPS(-0.000026484479497582),
+LPF_TAPS(0.000025984034698156),
+LPF_TAPS(-0.000025482642679791),
+LPF_TAPS(0.000024980689501528),
+LPF_TAPS(-0.000024478551293927),
+LPF_TAPS(0.000023976594261223),
+LPF_TAPS(-0.000023475174688944),
+LPF_TAPS(0.000022974638956881),
+LPF_TAPS(-0.000022475323557302),
+LPF_TAPS(0.000021977555118269),
+LPF_TAPS(-0.000021481650431946),
+LPF_TAPS(0.000020987916487774),
+LPF_TAPS(-0.000020496650510385),
+LPF_TAPS(0.000020008140002136),
+LPF_TAPS(-0.000019522662790136),
+LPF_TAPS(0.000019040487077642),
+LPF_TAPS(-0.000018561871499706),
+LPF_TAPS(0.000018087065182938),
+LPF_TAPS(-0.000017616307809269),
+LPF_TAPS(0.000017149829683597),
+LPF_TAPS(-0.000016687851805172),
+LPF_TAPS(0.000016230585942621),
+LPF_TAPS(-0.000015778234712481),
+LPF_TAPS(0.000015330991661110),
+LPF_TAPS(-0.000014889041349871),
+LPF_TAPS(0.000014452559443468),
+LPF_TAPS(-0.000014021712801288),
+LPF_TAPS(0.000013596659571678),
+LPF_TAPS(-0.000013177549289003),
+LPF_TAPS(0.000012764522973365),
+LPF_TAPS(-0.000012357713232915),
+LPF_TAPS(0.000011957244368585),
+LPF_TAPS(-0.000011563232481166),
+LPF_TAPS(0.000011175785580615),
+LPF_TAPS(-0.000010795003697464),
+LPF_TAPS(0.000010420978996245),
+LPF_TAPS(-0.000010053795890810),
+LPF_TAPS(0.000009693531161449),
+LPF_TAPS(-0.000009340254073686),
+LPF_TAPS(0.000008994026498681),
+LPF_TAPS(-0.000008654903035105),
+LPF_TAPS(0.000008322931132410),
+LPF_TAPS(-0.000007998151215387),
+LPF_TAPS(0.000007680596809926),
+LPF_TAPS(-0.000007370294669877),
+LPF_TAPS(0.000007067264904908),
+LPF_TAPS(-0.000006771521109318),
+LPF_TAPS(0.000006483070491646),
+LPF_TAPS(-0.000006201914005048),
+LPF_TAPS(0.000005928046478342),
+LPF_TAPS(-0.000005661456747620),
+LPF_TAPS(0.000005402127788367),
+LPF_TAPS(-0.000005150036848010),
+LPF_TAPS(0.000004905155578810),
+LPF_TAPS(-0.000004667450171018),
+LPF_TAPS(0.000004436881486255),
+LPF_TAPS(-0.000004213405190998),
+LPF_TAPS(0.000003996971890143),
+LPF_TAPS(-0.000003787527260573),
+LPF_TAPS(0.000003585012184637),
+LPF_TAPS(-0.000003389362883522),
+LPF_TAPS(0.000003200511050424),
+LPF_TAPS(-0.000003018383983486),
+LPF_TAPS(0.000002842904718416),
+LPF_TAPS(-0.000002673992160767),
+LPF_TAPS(0.000002511561217805),
+LPF_TAPS(-0.000002355522929902),
+LPF_TAPS(0.000002205784601466),
+LPF_TAPS(-0.000002062249931271),
+LPF_TAPS(0.000001924819142227),
+LPF_TAPS(-0.000001793389110503),
+LPF_TAPS(0.000001667853493968),
+LPF_TAPS(-0.000001548102859921),
+LPF_TAPS(0.000001434024812076),
+LPF_TAPS(-0.000001325504116749),
+LPF_TAPS(0.000001222422828231),
+LPF_TAPS(-0.000001124660413318),
+LPF_TAPS(0.000001032093874948),
+LPF_TAPS(-0.000000944597874939),
+LPF_TAPS(0.000000862044855799),
+LPF_TAPS(-0.000000784305161561),
+LPF_TAPS(0.000000711247157657),
+LPF_TAPS(-0.000000642737349775),
+LPF_TAPS(0.000000578640501706),
+LPF_TAPS(-0.000000518819752139),
+LPF_TAPS(0.000000463136730412),
+LPF_TAPS(-0.000000411451671180),
+LPF_TAPS(0.000000363623527997),
+LPF_TAPS(-0.000000319510085809),
+LPF_TAPS(0.000000278968072322),
+LPF_TAPS(-0.000000241853268257),
+LPF_TAPS(0.000000208020616472),
+LPF_TAPS(-0.000000177324329941),
+LPF_TAPS(0.000000149617998591),
+LPF_TAPS(-0.000000124754694991),
+LPF_TAPS(0.000000102587078868),
+LPF_TAPS(-0.000000082967500483),
+LPF_TAPS(0.000000065748102820),
+LPF_TAPS(-0.000000050780922627),
+LPF_TAPS(0.000000037917990275),
+LPF_TAPS(-0.000000027011428453),
+LPF_TAPS(0.000000017913549694),
+LPF_TAPS(-0.000000010476952726),
+LPF_TAPS(0.000000004554617657),
+LPF_TAPS(0.000000000000000000),
+LPF_TAPS(-0.000000003332876482),
+LPF_TAPS(0.000000005589328076),
+LPF_TAPS(-0.000000006913920594),
+LPF_TAPS(0.000000007450379994),
+LPF_TAPS(-0.000000007341504155),
+LPF_TAPS(0.000000006729075805),
+LPF_TAPS(-0.000000005753776591),
+LPF_TAPS(0.000000004555102288),
+LPF_TAPS(-0.000000003271279145),
+LPF_TAPS(0.000000002039181362),
+LPF_TAPS(-0.000000000994249696),
+LPF_TAPS(0.000000000270411186),
+LPF_TAPS(0.000000000000000000),
+};
diff --git a/core/sound/blip_lpf_768K_48K.h b/core/sound/blip_lpf_768K_48K.h
new file mode 100644
index 000000000..d9f39a406
--- /dev/null
+++ b/core/sound/blip_lpf_768K_48K.h
@@ -0,0 +1,1181 @@
+static buf_t const blip_lpf_768K_48K[blip_lpf_768K_taps] = {
+LPF_TAPS(0.000000000000000000),
+LPF_TAPS(0.000000001359448860),
+LPF_TAPS(0.000000004667803778),
+LPF_TAPS(0.000000007291655555),
+LPF_TAPS(0.000000005417116054),
+LPF_TAPS(-0.000000004555102366),
+LPF_TAPS(-0.000000024455755672),
+LPF_TAPS(-0.000000053068738903),
+LPF_TAPS(-0.000000085529617644),
+LPF_TAPS(-0.000000113670834618),
+LPF_TAPS(-0.000000127377349425),
+LPF_TAPS(-0.000000116776553081),
+LPF_TAPS(-0.000000074862812243),
+LPF_TAPS(0.000000000000000000),
+LPF_TAPS(0.000000102305467491),
+LPF_TAPS(0.000000218892576977),
+LPF_TAPS(0.000000330027000994),
+LPF_TAPS(0.000000412114767172),
+LPF_TAPS(0.000000441750238329),
+LPF_TAPS(0.000000400482860087),
+LPF_TAPS(0.000000279454635221),
+LPF_TAPS(0.000000082967501909),
+LPF_TAPS(-0.000000169880370116),
+LPF_TAPS(-0.000000446094830917),
+LPF_TAPS(-0.000000702426625941),
+LPF_TAPS(-0.000000891469622152),
+LPF_TAPS(-0.000000969441292523),
+LPF_TAPS(-0.000000904464094134),
+LPF_TAPS(-0.000000683928580435),
+LPF_TAPS(-0.000000319510091302),
+LPF_TAPS(0.000000151344328816),
+LPF_TAPS(0.000000668161269568),
+LPF_TAPS(0.000001154465104752),
+LPF_TAPS(0.000001528393730563),
+LPF_TAPS(0.000001715526626870),
+LPF_TAPS(0.000001662018825424),
+LPF_TAPS(0.000001345877978929),
+LPF_TAPS(0.000000784305175046),
+LPF_TAPS(0.000000035460970252),
+LPF_TAPS(-0.000000806224823920),
+LPF_TAPS(-0.000001621105458760),
+LPF_TAPS(-0.000002280585752777),
+LPF_TAPS(-0.000002666499897103),
+LPF_TAPS(-0.000002690787350045),
+LPF_TAPS(-0.000002312345201813),
+LPF_TAPS(-0.000001548102886537),
+LPF_TAPS(-0.000000476023404783),
+LPF_TAPS(0.000000771181400041),
+LPF_TAPS(0.000002021465017603),
+LPF_TAPS(0.000003086375184260),
+LPF_TAPS(0.000003788560986201),
+LPF_TAPS(0.000003989957117356),
+LPF_TAPS(0.000003616317717796),
+LPF_TAPS(0.000002673992206742),
+LPF_TAPS(0.000001255716262414),
+LPF_TAPS(-0.000000466356405324),
+LPF_TAPS(-0.000002260316904552),
+LPF_TAPS(-0.000003864827717528),
+LPF_TAPS(-0.000005026285450778),
+LPF_TAPS(-0.000005537656619195),
+LPF_TAPS(-0.000005273188024575),
+LPF_TAPS(-0.000004213405263437),
+LPF_TAPS(-0.000002455897603684),
+LPF_TAPS(-0.000000209237167646),
+LPF_TAPS(0.000002230237752093),
+LPF_TAPS(0.000004516461176901),
+LPF_TAPS(0.000006301781191850),
+LPF_TAPS(0.000007288640610621),
+LPF_TAPS(0.000007277262295166),
+LPF_TAPS(0.000006201914111676),
+LPF_TAPS(0.000004149568146742),
+LPF_TAPS(0.000001357021165956),
+LPF_TAPS(-0.000001814470334864),
+LPF_TAPS(-0.000004924673538250),
+LPF_TAPS(-0.000007514453903456),
+LPF_TAPS(-0.000009172392215667),
+LPF_TAPS(-0.000009598430104571),
+LPF_TAPS(-0.000008654903183906),
+LPF_TAPS(-0.000006396629158261),
+LPF_TAPS(-0.000003074347785313),
+LPF_TAPS(0.000000890558151977),
+LPF_TAPS(0.000004957983543046),
+LPF_TAPS(0.000008541512942748),
+LPF_TAPS(0.000011091787638396),
+LPF_TAPS(0.000012179135462912),
+LPF_TAPS(0.000011563232679969),
+LPF_TAPS(0.000009238814004167),
+LPF_TAPS(0.000005449388731714),
+LPF_TAPS(0.000000665210997690),
+LPF_TAPS(-0.000004473175304439),
+LPF_TAPS(-0.000009239352535250),
+LPF_TAPS(-0.000012922484749463),
+LPF_TAPS(-0.000014931815471149),
+LPF_TAPS(-0.000014889041605853),
+LPF_TAPS(-0.000012694403544655),
+LPF_TAPS(-0.000008555473445022),
+LPF_TAPS(-0.000002972543870313),
+LPF_TAPS(0.000003319420166117),
+LPF_TAPS(0.000009445938101717),
+LPF_TAPS(0.000014513205712786),
+LPF_TAPS(0.000017736994996257),
+LPF_TAPS(0.000018561871818833),
+LPF_TAPS(0.000016752874677521),
+LPF_TAPS(0.000012444972319258),
+LPF_TAPS(0.000006141091038300),
+LPF_TAPS(-0.000001343421473661),
+LPF_TAPS(-0.000008984312747285),
+LPF_TAPS(-0.000015687084203430),
+LPF_TAPS(-0.000020442241587054),
+LPF_TAPS(-0.000022475323943711),
+LPF_TAPS(-0.000021369670893989),
+LPF_TAPS(-0.000017142865405167),
+LPF_TAPS(-0.000010263678225663),
+LPF_TAPS(-0.000001604409044088),
+LPF_TAPS(0.000007667313823874),
+LPF_TAPS(0.000016244238103206),
+LPF_TAPS(0.000022862192292638),
+LPF_TAPS(0.000026484479952918),
+LPF_TAPS(0.000026461321281526),
+LPF_TAPS(0.000022640183553416),
+LPF_TAPS(0.000015408940720877),
+LPF_TAPS(0.000005662780227376),
+LPF_TAPS(-0.000005303553733386),
+LPF_TAPS(-0.000015965707722944),
+LPF_TAPS(-0.000024779861226435),
+LPF_TAPS(-0.000030404343160250),
+LPF_TAPS(-0.000031901167390632),
+LPF_TAPS(-0.000028887554888383),
+LPF_TAPS(-0.000021613534847926),
+LPF_TAPS(-0.000010951445764810),
+LPF_TAPS(0.000001704673145246),
+LPF_TAPS(0.000014618866986779),
+LPF_TAPS(0.000025949422139282),
+LPF_TAPS(0.000034009552153551),
+LPF_TAPS(0.000037515983141392),
+LPF_TAPS(0.000035789132174905),
+LPF_TAPS(0.000028874154654551),
+LPF_TAPS(0.000017562372412707),
+LPF_TAPS(0.000003306180458168),
+LPF_TAPS(-0.000011964370615358),
+LPF_TAPS(-0.000026100632912291),
+LPF_TAPS(-0.000037035618892028),
+LPF_TAPS(-0.000043083788946342),
+LPF_TAPS(-0.000043197213207640),
+LPF_TAPS(-0.000037139634571452),
+LPF_TAPS(-0.000025550362604739),
+LPF_TAPS(-0.000009884758915617),
+LPF_TAPS(0.000007764644796739),
+LPF_TAPS(0.000024945028324660),
+LPF_TAPS(0.000039181921369101),
+LPF_TAPS(0.000048333165179803),
+LPF_TAPS(0.000050907893980236),
+LPF_TAPS(0.000046303466797793),
+LPF_TAPS(0.000034923404169512),
+LPF_TAPS(0.000018155182598477),
+LPF_TAPS(-0.000001793863434875),
+LPF_TAPS(-0.000022183953916465),
+LPF_TAPS(-0.000040116646997951),
+LPF_TAPS(-0.000052944360125334),
+LPF_TAPS(-0.000058658110405480),
+LPF_TAPS(-0.000056197102480673),
+LPF_TAPS(-0.000045633079459602),
+LPF_TAPS(-0.000028198722243287),
+LPF_TAPS(-0.000006150721233903),
+LPF_TAPS(0.000017518448170727),
+LPF_TAPS(0.000039483833968097),
+LPF_TAPS(0.000056552462191051),
+LPF_TAPS(0.000066124426393850),
+LPF_TAPS(0.000066584435346170),
+LPF_TAPS(0.000057565419794740),
+LPF_TAPS(0.000040042213710101),
+LPF_TAPS(0.000016236303510003),
+LPF_TAPS(-0.000010660904207243),
+LPF_TAPS(-0.000036912594714084),
+LPF_TAPS(-0.000058752864731266),
+LPF_TAPS(-0.000072923912246472),
+LPF_TAPS(-0.000077157882495439),
+LPF_TAPS(-0.000070532635385286),
+LPF_TAPS(-0.000053646492901935),
+LPF_TAPS(-0.000028581195343862),
+LPF_TAPS(0.000001348358019648),
+LPF_TAPS(0.000032028529545616),
+LPF_TAPS(0.000059109194199816),
+LPF_TAPS(0.000078617426254042),
+LPF_TAPS(0.000087536477165891),
+LPF_TAPS(0.000084266182598215),
+LPF_TAPS(0.000068895297575180),
+LPF_TAPS(0.000043241014115690),
+LPF_TAPS(0.000010642839072521),
+LPF_TAPS(-0.000024467251374184),
+LPF_TAPS(-0.000057163799306339),
+LPF_TAPS(-0.000082715563486318),
+LPF_TAPS(-0.000097266370464980),
+LPF_TAPS(-0.000098411646607848),
+LPF_TAPS(-0.000085585131224879),
+LPF_TAPS(-0.000060194832140154),
+LPF_TAPS(-0.000025481297179959),
+LPF_TAPS(0.000013889847008835),
+LPF_TAPS(0.000052450811872167),
+LPF_TAPS(0.000084687469158516),
+LPF_TAPS(0.000105824102159998),
+LPF_TAPS(0.000112525915634239),
+LPF_TAPS(0.000103416618210071),
+LPF_TAPS(0.000079331798651948),
+LPF_TAPS(0.000043264236188097),
+LPF_TAPS(-0.000000000000000002),
+LPF_TAPS(-0.000044511691498128),
+LPF_TAPS(-0.000083972630656939),
+LPF_TAPS(-0.000112622944066689),
+LPF_TAPS(-0.000126077101208288),
+LPF_TAPS(-0.000121987895707572),
+LPF_TAPS(-0.000100438797921751),
+LPF_TAPS(-0.000064001010754390),
+LPF_TAPS(-0.000017437601660726),
+LPF_TAPS(0.000032913059017108),
+LPF_TAPS(0.000079995664135062),
+LPF_TAPS(0.000117022543786603),
+LPF_TAPS(0.000138447616040141),
+LPF_TAPS(0.000140790584377543),
+LPF_TAPS(0.000123189743606017),
+LPF_TAPS(0.000087597089208893),
+LPF_TAPS(0.000038578048270125),
+LPF_TAPS(-0.000017266511725195),
+LPF_TAPS(-0.000072184001225267),
+LPF_TAPS(-0.000118342002758861),
+LPF_TAPS(-0.000148940756773300),
+LPF_TAPS(-0.000159208853892438),
+LPF_TAPS(-0.000147137126223414),
+LPF_TAPS(-0.000113839121163930),
+LPF_TAPS(-0.000063476747878071),
+LPF_TAPS(-0.000002749999175545),
+LPF_TAPS(0.000059988262299059),
+LPF_TAPS(0.000115876412984811),
+LPF_TAPS(0.000156791053766152),
+LPF_TAPS(0.000176522050630483),
+LPF_TAPS(0.000171706425136369),
+LPF_TAPS(0.000142381767716384),
+LPF_TAPS(0.000092070367689991),
+LPF_TAPS(0.000027369756980472),
+LPF_TAPS(-0.000042904978978613),
+LPF_TAPS(-0.000108916754401175),
+LPF_TAPS(-0.000161178545601417),
+LPF_TAPS(-0.000191911282688537),
+LPF_TAPS(-0.000196193966704777),
+LPF_TAPS(-0.000172736985353814),
+LPF_TAPS(-0.000124158884970213),
+LPF_TAPS(-0.000056714461339902),
+LPF_TAPS(0.000020501204933958),
+LPF_TAPS(0.000096772923575936),
+LPF_TAPS(0.000161247014791811),
+LPF_TAPS(0.000204470262738553),
+LPF_TAPS(0.000219768755358778),
+LPF_TAPS(0.000204266447336485),
+LPF_TAPS(0.000159389496760190),
+LPF_TAPS(0.000090771716893217),
+LPF_TAPS(0.000007559564539307),
+LPF_TAPS(-0.000078799528741505),
+LPF_TAPS(-0.000156126086562068),
+LPF_TAPS(-0.000213220593974129),
+LPF_TAPS(-0.000241478724185279),
+LPF_TAPS(-0.000236177752523331),
+LPF_TAPS(-0.000197243155330462),
+LPF_TAPS(-0.000129373609165754),
+LPF_TAPS(-0.000041490851807240),
+LPF_TAPS(0.000054423951283517),
+LPF_TAPS(0.000144956948925325),
+LPF_TAPS(0.000217131551326968),
+LPF_TAPS(0.000260261747274281),
+LPF_TAPS(0.000267525010396375),
+LPF_TAPS(0.000237024486928444),
+LPF_TAPS(0.000172177192501632),
+LPF_TAPS(0.000081356815168347),
+LPF_TAPS(-0.000023176045180278),
+LPF_TAPS(-0.000126921304547573),
+LPF_TAPS(-0.000215144263109794),
+LPF_TAPS(-0.000274961629651598),
+LPF_TAPS(-0.000297214302530807),
+LPF_TAPS(-0.000277855813135357),
+LPF_TAPS(-0.000218647732480789),
+LPF_TAPS(-0.000127046877978245),
+LPF_TAPS(-0.000015281270758960),
+LPF_TAPS(0.000101273018695546),
+LPF_TAPS(0.000206200041981676),
+LPF_TAPS(0.000284349145337142),
+LPF_TAPS(0.000324014406196469),
+LPF_TAPS(0.000318675926094879),
+LPF_TAPS(0.000268045533373828),
+LPF_TAPS(0.000178252266903005),
+LPF_TAPS(0.000061121371994166),
+LPF_TAPS(-0.000067371788877151),
+LPF_TAPS(-0.000189272454112044),
+LPF_TAPS(-0.000287148034138770),
+LPF_TAPS(-0.000346573027549407),
+LPF_TAPS(-0.000358244171233166),
+LPF_TAPS(-0.000319417137704527),
+LPF_TAPS(-0.000234445374637796),
+LPF_TAPS(-0.000114324158704671),
+LPF_TAPS(0.000024718036788845),
+LPF_TAPS(0.000163402557720058),
+LPF_TAPS(0.000282065698371838),
+LPF_TAPS(0.000363438633495539),
+LPF_TAPS(0.000395150265241936),
+LPF_TAPS(0.000371591608966844),
+LPF_TAPS(0.000294862846963479),
+LPF_TAPS(0.000174648125360398),
+LPF_TAPS(0.000027011881957749),
+LPF_TAPS(-0.000127736593278010),
+LPF_TAPS(-0.000267828167726443),
+LPF_TAPS(-0.000373087797360296),
+LPF_TAPS(-0.000427830125620042),
+LPF_TAPS(-0.000423182500185979),
+LPF_TAPS(-0.000358493243807931),
+LPF_TAPS(-0.000241605252470305),
+LPF_TAPS(-0.000087931134219321),
+LPF_TAPS(0.000081565274292044),
+LPF_TAPS(0.000243218730553891),
+LPF_TAPS(0.000373957789509607),
+LPF_TAPS(0.000454587814695286),
+LPF_TAPS(0.000472595971723450),
+LPF_TAPS(0.000424070037890936),
+LPF_TAPS(0.000314439682826313),
+LPF_TAPS(0.000157909563791660),
+LPF_TAPS(-0.000024363716411711),
+LPF_TAPS(-0.000207119469909664),
+LPF_TAPS(-0.000364483956377314),
+LPF_TAPS(-0.000473623510576415),
+LPF_TAPS(-0.000518045354092092),
+LPF_TAPS(-0.000490070592560787),
+LPF_TAPS(-0.000392111085189919),
+LPF_TAPS(-0.000236543587877976),
+LPF_TAPS(-0.000044169039830351),
+LPF_TAPS(0.000158554800002030),
+LPF_TAPS(0.000343141246928103),
+LPF_TAPS(0.000483067215653052),
+LPF_TAPS(0.000557572259271586),
+LPF_TAPS(0.000554721603718573),
+LPF_TAPS(0.000473283508764436),
+LPF_TAPS(0.000323129851106015),
+LPF_TAPS(0.000124072004969681),
+LPF_TAPS(-0.000096735980511317),
+LPF_TAPS(-0.000308489071818717),
+LPF_TAPS(-0.000481017706568504),
+LPF_TAPS(-0.000589074131789658),
+LPF_TAPS(-0.000616011301487119),
+LPF_TAPS(-0.000556320391373693),
+LPF_TAPS(-0.000416643580674457),
+LPF_TAPS(-0.000215086814767172),
+LPF_TAPS(0.000021105499668541),
+LPF_TAPS(0.000259218525026417),
+LPF_TAPS(0.000465586025087031),
+LPF_TAPS(0.000610337904146259),
+LPF_TAPS(0.000671708488657673),
+LPF_TAPS(0.000639286203371008),
+LPF_TAPS(0.000515722468116167),
+LPF_TAPS(0.000316625963837260),
+LPF_TAPS(0.000068619831178850),
+LPF_TAPS(-0.000194200868121255),
+LPF_TAPS(-0.000434942614319249),
+LPF_TAPS(-0.000619079186033522),
+LPF_TAPS(-0.000719388248767022),
+LPF_TAPS(-0.000719954989008131),
+LPF_TAPS(-0.000618656737124804),
+LPF_TAPS(-0.000427745671860825),
+LPF_TAPS(-0.000172408232095687),
+LPF_TAPS(0.000112536081132703),
+LPF_TAPS(0.000387367026753429),
+LPF_TAPS(0.000612986179481084),
+LPF_TAPS(0.000756463891081504),
+LPF_TAPS(0.000795825808780393),
+LPF_TAPS(0.000723385841491201),
+LPF_TAPS(0.000547124213374555),
+LPF_TAPS(0.000289875871129091),
+LPF_TAPS(-0.000013600228281345),
+LPF_TAPS(-0.000321298976625744),
+LPF_TAPS(-0.000589767278575103),
+LPF_TAPS(-0.000780224416792033),
+LPF_TAPS(-0.000864144791486477),
+LPF_TAPS(-0.000827501970962114),
+LPF_TAPS(-0.000673046341994755),
+LPF_TAPS(-0.000420254351351959),
+LPF_TAPS(-0.000102909621436732),
+LPF_TAPS(0.000235389385991059),
+LPF_TAPS(0.000547201088099536),
+LPF_TAPS(0.000787876493512615),
+LPF_TAPS(0.000921933173856351),
+LPF_TAPS(0.000928260223461724),
+LPF_TAPS(0.000803394177128660),
+LPF_TAPS(0.000562363609226324),
+LPF_TAPS(0.000236934133089329),
+LPF_TAPS(-0.000128549987283509),
+LPF_TAPS(-0.000483187384332318),
+LPF_TAPS(-0.000776589615094117),
+LPF_TAPS(-0.000966020337024241),
+LPF_TAPS(-0.001022594925275672),
+LPF_TAPS(-0.000935644589411755),
+LPF_TAPS(-0.000714590827271672),
+LPF_TAPS(-0.000388015211898054),
+LPF_TAPS(0.000000000000000007),
+LPF_TAPS(0.000395797345139045),
+LPF_TAPS(0.000743542799064008),
+LPF_TAPS(0.000993080437533362),
+LPF_TAPS(0.001107141138307767),
+LPF_TAPS(0.001066872710566303),
+LPF_TAPS(0.000874875646388696),
+LPF_TAPS(0.000555265209860269),
+LPF_TAPS(0.000150691601034830),
+LPF_TAPS(-0.000283321194004648),
+LPF_TAPS(-0.000685970827866444),
+LPF_TAPS(-0.000999670764342302),
+LPF_TAPS(-0.001178259870510930),
+LPF_TAPS(-0.001193760688319778),
+LPF_TAPS(-0.001040701551881250),
+LPF_TAPS(-0.000737342514358144),
+LPF_TAPS(-0.000323569661431093),
+LPF_TAPS(0.000144311227422484),
+LPF_TAPS(0.000601207657703439),
+LPF_TAPS(0.000982269410612325),
+LPF_TAPS(0.001232064876063025),
+LPF_TAPS(0.001312610181298188),
+LPF_TAPS(0.001209092780511007),
+LPF_TAPS(0.000932433858217402),
+LPF_TAPS(0.000518263608026988),
+LPF_TAPS(0.000022381986458309),
+LPF_TAPS(-0.000486724172822189),
+LPF_TAPS(-0.000937309191562415),
+LPF_TAPS(-0.001264448151532591),
+LPF_TAPS(-0.001419356298934519),
+LPF_TAPS(-0.001376615418620143),
+LPF_TAPS(-0.001138243238730974),
+LPF_TAPS(-0.000733966594517146),
+LPF_TAPS(-0.000217582662460545),
+LPF_TAPS(0.000340156906325913),
+LPF_TAPS(0.000861203902397716),
+LPF_TAPS(0.001271100228905015),
+LPF_TAPS(0.001509579665070793),
+LPF_TAPS(0.001539380475420018),
+LPF_TAPS(0.001351986739160018),
+LPF_TAPS(0.000969424046659185),
+LPF_TAPS(0.000441774816022595),
+LPF_TAPS(-0.000159323601669108),
+LPF_TAPS(-0.000750361884546773),
+LPF_TAPS(-0.001247520011945825),
+LPF_TAPS(-0.001578511900391426),
+LPF_TAPS(-0.001693045524085645),
+LPF_TAPS(-0.001570391756465221),
+LPF_TAPS(-0.001222932397231006),
+LPF_TAPS(-0.000695102381242500),
+LPF_TAPS(-0.000057779580465230),
+LPF_TAPS(0.000601180272375858),
+LPF_TAPS(0.001189006991122532),
+LPF_TAPS(0.001621027875164315),
+LPF_TAPS(0.001832809842707534),
+LPF_TAPS(0.001789698061951320),
+LPF_TAPS(0.001492348542680722),
+LPF_TAPS(0.000977388252817532),
+LPF_TAPS(0.000313006019718721),
+LPF_TAPS(-0.000410010919136253),
+LPF_TAPS(-0.001090625851674463),
+LPF_TAPS(-0.001631615234243192),
+LPF_TAPS(-0.001953395577104861),
+LPF_TAPS(-0.002005656598462505),
+LPF_TAPS(-0.001775110268723410),
+LPF_TAPS(-0.001288177216072311),
+LPF_TAPS(-0.000608121107446455),
+LPF_TAPS(0.000173085322578482),
+LPF_TAPS(0.000947129150702814),
+LPF_TAPS(0.001604307340888672),
+LPF_TAPS(0.002049003798581933),
+LPF_TAPS(0.002213519668761413),
+LPF_TAPS(0.002068267589315719),
+LPF_TAPS(0.001626809663921161),
+LPF_TAPS(0.000944912710343187),
+LPF_TAPS(0.000113620040394409),
+LPF_TAPS(-0.000752816806223807),
+LPF_TAPS(-0.001532558858449233),
+LPF_TAPS(-0.002113228567072949),
+LPF_TAPS(-0.002408012689596018),
+LPF_TAPS(-0.002368524631666443),
+LPF_TAPS(-0.001992536333210033),
+LPF_TAPS(-0.001325370018242146),
+LPF_TAPS(-0.000454606383626016),
+LPF_TAPS(0.000501299656080775),
+LPF_TAPS(0.001409031739149504),
+LPF_TAPS(0.002138902624492951),
+LPF_TAPS(0.002583272037926706),
+LPF_TAPS(0.002672291388964332),
+LPF_TAPS(0.002384690142120560),
+LPF_TAPS(0.001751963089894417),
+LPF_TAPS(0.000855208577551981),
+LPF_TAPS(-0.000185114622720898),
+LPF_TAPS(-0.001225239726990133),
+LPF_TAPS(-0.002117832071754483),
+LPF_TAPS(-0.002732723904046048),
+LPF_TAPS(-0.002975744362298746),
+LPF_TAPS(-0.002802941719239318),
+LPF_TAPS(-0.002228076641992786),
+LPF_TAPS(-0.001322159750808357),
+LPF_TAPS(-0.000204896150555957),
+LPF_TAPS(0.000970964342673048),
+LPF_TAPS(0.002040348260098252),
+LPF_TAPS(0.002848861909604556),
+LPF_TAPS(0.003274894833677578),
+LPF_TAPS(0.003247684687255261),
+LPF_TAPS(0.002758690863649444),
+LPF_TAPS(0.001864495530567434),
+LPF_TAPS(0.000680595212459752),
+LPF_TAPS(-0.000633289731702014),
+LPF_TAPS(-0.001894550570044378),
+LPF_TAPS(-0.002922849064605867),
+LPF_TAPS(-0.003565663262513257),
+LPF_TAPS(-0.003720634286961690),
+LPF_TAPS(-0.003351477778623521),
+LPF_TAPS(-0.002495036862551363),
+LPF_TAPS(-0.001258229252703277),
+LPF_TAPS(0.000194975183151831),
+LPF_TAPS(0.001665006205857837),
+LPF_TAPS(0.002943805914118389),
+LPF_TAPS(0.003843958087058865),
+LPF_TAPS(0.004225798837087251),
+LPF_TAPS(0.004018635661116777),
+LPF_TAPS(0.003232911217167509),
+LPF_TAPS(0.001961321217018796),
+LPF_TAPS(0.000368382711489133),
+LPF_TAPS(-0.001330448303111322),
+LPF_TAPS(-0.002897512586064453),
+LPF_TAPS(-0.004105757047530809),
+LPF_TAPS(-0.004771146551610363),
+LPF_TAPS(-0.004780117208221306),
+LPF_TAPS(-0.004108053920816586),
+LPF_TAPS(-0.002825896333281318),
+LPF_TAPS(-0.001093538945580079),
+LPF_TAPS(0.000859509678153194),
+LPF_TAPS(0.002763948990592597),
+LPF_TAPS(0.004347189035161921),
+LPF_TAPS(0.005371667058210150),
+LPF_TAPS(0.005669685080505564),
+LPF_TAPS(0.005169768442631645),
+LPF_TAPS(0.003910542281136750),
+LPF_TAPS(0.002039710357167114),
+LPF_TAPS(-0.000202299725470556),
+LPF_TAPS(-0.002512348101206461),
+LPF_TAPS(-0.004564614415679022),
+LPF_TAPS(-0.006055481428685038),
+LPF_TAPS(-0.006747224427039125),
+LPF_TAPS(-0.006504381455886494),
+LPF_TAPS(-0.005317439779102889),
+LPF_TAPS(-0.003310001477805524),
+LPF_TAPS(-0.000727706394243490),
+LPF_TAPS(0.002090371981529391),
+LPF_TAPS(0.004754701779382235),
+LPF_TAPS(0.006877371468460783),
+LPF_TAPS(0.008126520471630896),
+LPF_TAPS(0.008275740284339120),
+LPF_TAPS(0.007241408673530529),
+LPF_TAPS(0.005102230981241567),
+LPF_TAPS(0.002097405428776219),
+LPF_TAPS(-0.001397448693528728),
+LPF_TAPS(-0.004914499133895396),
+LPF_TAPS(-0.007953126593456580),
+LPF_TAPS(-0.010047356605476896),
+LPF_TAPS(-0.010832642208056086),
+LPF_TAPS(-0.010102975549189539),
+LPF_TAPS(-0.007850110868803264),
+LPF_TAPS(-0.004278601732532487),
+LPF_TAPS(0.000206810215022680),
+LPF_TAPS(0.005041497678566803),
+LPF_TAPS(0.009565394720809384),
+LPF_TAPS(0.013104736936610281),
+LPF_TAPS(0.015061657215475832),
+LPF_TAPS(0.015000690417068760),
+LPF_TAPS(0.012721042817706861),
+LPF_TAPS(0.008304673409568883),
+LPF_TAPS(0.002132719023066271),
+LPF_TAPS(-0.005133686478296106),
+LPF_TAPS(-0.012607994653065960),
+LPF_TAPS(-0.019263721656912779),
+LPF_TAPS(-0.024042394058406389),
+LPF_TAPS(-0.025972472722104633),
+LPF_TAPS(-0.024285972973015362),
+LPF_TAPS(-0.018519226073113456),
+LPF_TAPS(-0.008585550204756025),
+LPF_TAPS(0.005189596584253116),
+LPF_TAPS(0.022076420229632895),
+LPF_TAPS(0.040992261870568814),
+LPF_TAPS(0.060592521675711608),
+LPF_TAPS(0.079392273199095378),
+LPF_TAPS(0.095906176085457207),
+LPF_TAPS(0.108792019799307069),
+LPF_TAPS(0.116982593447661723),
+LPF_TAPS(0.119791668725544434),
+LPF_TAPS(0.116982593447661723),
+LPF_TAPS(0.108792019799307069),
+LPF_TAPS(0.095906176085457207),
+LPF_TAPS(0.079392273199095378),
+LPF_TAPS(0.060592521675711608),
+LPF_TAPS(0.040992261870568814),
+LPF_TAPS(0.022076420229632895),
+LPF_TAPS(0.005189596584253116),
+LPF_TAPS(-0.008585550204756025),
+LPF_TAPS(-0.018519226073113456),
+LPF_TAPS(-0.024285972973015362),
+LPF_TAPS(-0.025972472722104633),
+LPF_TAPS(-0.024042394058406389),
+LPF_TAPS(-0.019263721656912779),
+LPF_TAPS(-0.012607994653065960),
+LPF_TAPS(-0.005133686478296106),
+LPF_TAPS(0.002132719023066271),
+LPF_TAPS(0.008304673409568883),
+LPF_TAPS(0.012721042817706861),
+LPF_TAPS(0.015000690417068762),
+LPF_TAPS(0.015061657215475832),
+LPF_TAPS(0.013104736936610281),
+LPF_TAPS(0.009565394720809384),
+LPF_TAPS(0.005041497678566803),
+LPF_TAPS(0.000206810215022680),
+LPF_TAPS(-0.004278601732532487),
+LPF_TAPS(-0.007850110868803264),
+LPF_TAPS(-0.010102975549189539),
+LPF_TAPS(-0.010832642208056086),
+LPF_TAPS(-0.010047356605476898),
+LPF_TAPS(-0.007953126593456580),
+LPF_TAPS(-0.004914499133895396),
+LPF_TAPS(-0.001397448693528728),
+LPF_TAPS(0.002097405428776219),
+LPF_TAPS(0.005102230981241567),
+LPF_TAPS(0.007241408673530529),
+LPF_TAPS(0.008275740284339120),
+LPF_TAPS(0.008126520471630896),
+LPF_TAPS(0.006877371468460784),
+LPF_TAPS(0.004754701779382235),
+LPF_TAPS(0.002090371981529391),
+LPF_TAPS(-0.000727706394243490),
+LPF_TAPS(-0.003310001477805524),
+LPF_TAPS(-0.005317439779102889),
+LPF_TAPS(-0.006504381455886495),
+LPF_TAPS(-0.006747224427039125),
+LPF_TAPS(-0.006055481428685038),
+LPF_TAPS(-0.004564614415679024),
+LPF_TAPS(-0.002512348101206461),
+LPF_TAPS(-0.000202299725470556),
+LPF_TAPS(0.002039710357167115),
+LPF_TAPS(0.003910542281136750),
+LPF_TAPS(0.005169768442631646),
+LPF_TAPS(0.005669685080505564),
+LPF_TAPS(0.005371667058210150),
+LPF_TAPS(0.004347189035161921),
+LPF_TAPS(0.002763948990592597),
+LPF_TAPS(0.000859509678153194),
+LPF_TAPS(-0.001093538945580079),
+LPF_TAPS(-0.002825896333281318),
+LPF_TAPS(-0.004108053920816587),
+LPF_TAPS(-0.004780117208221306),
+LPF_TAPS(-0.004771146551610363),
+LPF_TAPS(-0.004105757047530809),
+LPF_TAPS(-0.002897512586064453),
+LPF_TAPS(-0.001330448303111323),
+LPF_TAPS(0.000368382711489133),
+LPF_TAPS(0.001961321217018796),
+LPF_TAPS(0.003232911217167510),
+LPF_TAPS(0.004018635661116777),
+LPF_TAPS(0.004225798837087253),
+LPF_TAPS(0.003843958087058864),
+LPF_TAPS(0.002943805914118389),
+LPF_TAPS(0.001665006205857837),
+LPF_TAPS(0.000194975183151831),
+LPF_TAPS(-0.001258229252703277),
+LPF_TAPS(-0.002495036862551363),
+LPF_TAPS(-0.003351477778623522),
+LPF_TAPS(-0.003720634286961690),
+LPF_TAPS(-0.003565663262513257),
+LPF_TAPS(-0.002922849064605867),
+LPF_TAPS(-0.001894550570044379),
+LPF_TAPS(-0.000633289731702014),
+LPF_TAPS(0.000680595212459752),
+LPF_TAPS(0.001864495530567434),
+LPF_TAPS(0.002758690863649444),
+LPF_TAPS(0.003247684687255260),
+LPF_TAPS(0.003274894833677578),
+LPF_TAPS(0.002848861909604557),
+LPF_TAPS(0.002040348260098252),
+LPF_TAPS(0.000970964342673048),
+LPF_TAPS(-0.000204896150555957),
+LPF_TAPS(-0.001322159750808358),
+LPF_TAPS(-0.002228076641992786),
+LPF_TAPS(-0.002802941719239318),
+LPF_TAPS(-0.002975744362298747),
+LPF_TAPS(-0.002732723904046048),
+LPF_TAPS(-0.002117832071754483),
+LPF_TAPS(-0.001225239726990133),
+LPF_TAPS(-0.000185114622720898),
+LPF_TAPS(0.000855208577551981),
+LPF_TAPS(0.001751963089894417),
+LPF_TAPS(0.002384690142120560),
+LPF_TAPS(0.002672291388964333),
+LPF_TAPS(0.002583272037926706),
+LPF_TAPS(0.002138902624492951),
+LPF_TAPS(0.001409031739149504),
+LPF_TAPS(0.000501299656080775),
+LPF_TAPS(-0.000454606383626017),
+LPF_TAPS(-0.001325370018242146),
+LPF_TAPS(-0.001992536333210033),
+LPF_TAPS(-0.002368524631666444),
+LPF_TAPS(-0.002408012689596018),
+LPF_TAPS(-0.002113228567072950),
+LPF_TAPS(-0.001532558858449234),
+LPF_TAPS(-0.000752816806223807),
+LPF_TAPS(0.000113620040394409),
+LPF_TAPS(0.000944912710343188),
+LPF_TAPS(0.001626809663921161),
+LPF_TAPS(0.002068267589315719),
+LPF_TAPS(0.002213519668761413),
+LPF_TAPS(0.002049003798581933),
+LPF_TAPS(0.001604307340888671),
+LPF_TAPS(0.000947129150702814),
+LPF_TAPS(0.000173085322578483),
+LPF_TAPS(-0.000608121107446455),
+LPF_TAPS(-0.001288177216072311),
+LPF_TAPS(-0.001775110268723411),
+LPF_TAPS(-0.002005656598462505),
+LPF_TAPS(-0.001953395577104861),
+LPF_TAPS(-0.001631615234243192),
+LPF_TAPS(-0.001090625851674463),
+LPF_TAPS(-0.000410010919136254),
+LPF_TAPS(0.000313006019718720),
+LPF_TAPS(0.000977388252817533),
+LPF_TAPS(0.001492348542680722),
+LPF_TAPS(0.001789698061951319),
+LPF_TAPS(0.001832809842707535),
+LPF_TAPS(0.001621027875164315),
+LPF_TAPS(0.001189006991122532),
+LPF_TAPS(0.000601180272375858),
+LPF_TAPS(-0.000057779580465230),
+LPF_TAPS(-0.000695102381242500),
+LPF_TAPS(-0.001222932397231007),
+LPF_TAPS(-0.001570391756465220),
+LPF_TAPS(-0.001693045524085646),
+LPF_TAPS(-0.001578511900391427),
+LPF_TAPS(-0.001247520011945825),
+LPF_TAPS(-0.000750361884546773),
+LPF_TAPS(-0.000159323601669108),
+LPF_TAPS(0.000441774816022596),
+LPF_TAPS(0.000969424046659185),
+LPF_TAPS(0.001351986739160019),
+LPF_TAPS(0.001539380475420018),
+LPF_TAPS(0.001509579665070794),
+LPF_TAPS(0.001271100228905015),
+LPF_TAPS(0.000861203902397716),
+LPF_TAPS(0.000340156906325913),
+LPF_TAPS(-0.000217582662460545),
+LPF_TAPS(-0.000733966594517146),
+LPF_TAPS(-0.001138243238730974),
+LPF_TAPS(-0.001376615418620143),
+LPF_TAPS(-0.001419356298934519),
+LPF_TAPS(-0.001264448151532591),
+LPF_TAPS(-0.000937309191562415),
+LPF_TAPS(-0.000486724172822189),
+LPF_TAPS(0.000022381986458309),
+LPF_TAPS(0.000518263608026988),
+LPF_TAPS(0.000932433858217402),
+LPF_TAPS(0.001209092780511007),
+LPF_TAPS(0.001312610181298188),
+LPF_TAPS(0.001232064876063025),
+LPF_TAPS(0.000982269410612325),
+LPF_TAPS(0.000601207657703440),
+LPF_TAPS(0.000144311227422484),
+LPF_TAPS(-0.000323569661431093),
+LPF_TAPS(-0.000737342514358145),
+LPF_TAPS(-0.001040701551881250),
+LPF_TAPS(-0.001193760688319779),
+LPF_TAPS(-0.001178259870510930),
+LPF_TAPS(-0.000999670764342301),
+LPF_TAPS(-0.000685970827866444),
+LPF_TAPS(-0.000283321194004648),
+LPF_TAPS(0.000150691601034830),
+LPF_TAPS(0.000555265209860269),
+LPF_TAPS(0.000874875646388696),
+LPF_TAPS(0.001066872710566303),
+LPF_TAPS(0.001107141138307768),
+LPF_TAPS(0.000993080437533362),
+LPF_TAPS(0.000743542799064008),
+LPF_TAPS(0.000395797345139045),
+LPF_TAPS(0.000000000000000007),
+LPF_TAPS(-0.000388015211898053),
+LPF_TAPS(-0.000714590827271673),
+LPF_TAPS(-0.000935644589411756),
+LPF_TAPS(-0.001022594925275672),
+LPF_TAPS(-0.000966020337024242),
+LPF_TAPS(-0.000776589615094116),
+LPF_TAPS(-0.000483187384332319),
+LPF_TAPS(-0.000128549987283509),
+LPF_TAPS(0.000236934133089329),
+LPF_TAPS(0.000562363609226325),
+LPF_TAPS(0.000803394177128660),
+LPF_TAPS(0.000928260223461724),
+LPF_TAPS(0.000921933173856352),
+LPF_TAPS(0.000787876493512615),
+LPF_TAPS(0.000547201088099536),
+LPF_TAPS(0.000235389385991059),
+LPF_TAPS(-0.000102909621436732),
+LPF_TAPS(-0.000420254351351959),
+LPF_TAPS(-0.000673046341994754),
+LPF_TAPS(-0.000827501970962114),
+LPF_TAPS(-0.000864144791486477),
+LPF_TAPS(-0.000780224416792033),
+LPF_TAPS(-0.000589767278575103),
+LPF_TAPS(-0.000321298976625744),
+LPF_TAPS(-0.000013600228281345),
+LPF_TAPS(0.000289875871129091),
+LPF_TAPS(0.000547124213374555),
+LPF_TAPS(0.000723385841491201),
+LPF_TAPS(0.000795825808780393),
+LPF_TAPS(0.000756463891081504),
+LPF_TAPS(0.000612986179481084),
+LPF_TAPS(0.000387367026753429),
+LPF_TAPS(0.000112536081132703),
+LPF_TAPS(-0.000172408232095687),
+LPF_TAPS(-0.000427745671860825),
+LPF_TAPS(-0.000618656737124805),
+LPF_TAPS(-0.000719954989008130),
+LPF_TAPS(-0.000719388248767023),
+LPF_TAPS(-0.000619079186033522),
+LPF_TAPS(-0.000434942614319249),
+LPF_TAPS(-0.000194200868121255),
+LPF_TAPS(0.000068619831178850),
+LPF_TAPS(0.000316625963837260),
+LPF_TAPS(0.000515722468116167),
+LPF_TAPS(0.000639286203371008),
+LPF_TAPS(0.000671708488657673),
+LPF_TAPS(0.000610337904146259),
+LPF_TAPS(0.000465586025087032),
+LPF_TAPS(0.000259218525026417),
+LPF_TAPS(0.000021105499668541),
+LPF_TAPS(-0.000215086814767172),
+LPF_TAPS(-0.000416643580674457),
+LPF_TAPS(-0.000556320391373693),
+LPF_TAPS(-0.000616011301487119),
+LPF_TAPS(-0.000589074131789658),
+LPF_TAPS(-0.000481017706568504),
+LPF_TAPS(-0.000308489071818717),
+LPF_TAPS(-0.000096735980511317),
+LPF_TAPS(0.000124072004969681),
+LPF_TAPS(0.000323129851106015),
+LPF_TAPS(0.000473283508764437),
+LPF_TAPS(0.000554721603718573),
+LPF_TAPS(0.000557572259271585),
+LPF_TAPS(0.000483067215653052),
+LPF_TAPS(0.000343141246928103),
+LPF_TAPS(0.000158554800002030),
+LPF_TAPS(-0.000044169039830351),
+LPF_TAPS(-0.000236543587877976),
+LPF_TAPS(-0.000392111085189920),
+LPF_TAPS(-0.000490070592560787),
+LPF_TAPS(-0.000518045354092093),
+LPF_TAPS(-0.000473623510576415),
+LPF_TAPS(-0.000364483956377313),
+LPF_TAPS(-0.000207119469909664),
+LPF_TAPS(-0.000024363716411711),
+LPF_TAPS(0.000157909563791660),
+LPF_TAPS(0.000314439682826313),
+LPF_TAPS(0.000424070037890936),
+LPF_TAPS(0.000472595971723450),
+LPF_TAPS(0.000454587814695287),
+LPF_TAPS(0.000373957789509607),
+LPF_TAPS(0.000243218730553891),
+LPF_TAPS(0.000081565274292044),
+LPF_TAPS(-0.000087931134219321),
+LPF_TAPS(-0.000241605252470305),
+LPF_TAPS(-0.000358493243807931),
+LPF_TAPS(-0.000423182500185980),
+LPF_TAPS(-0.000427830125620041),
+LPF_TAPS(-0.000373087797360296),
+LPF_TAPS(-0.000267828167726444),
+LPF_TAPS(-0.000127736593278010),
+LPF_TAPS(0.000027011881957749),
+LPF_TAPS(0.000174648125360398),
+LPF_TAPS(0.000294862846963479),
+LPF_TAPS(0.000371591608966844),
+LPF_TAPS(0.000395150265241936),
+LPF_TAPS(0.000363438633495539),
+LPF_TAPS(0.000282065698371838),
+LPF_TAPS(0.000163402557720058),
+LPF_TAPS(0.000024718036788845),
+LPF_TAPS(-0.000114324158704671),
+LPF_TAPS(-0.000234445374637796),
+LPF_TAPS(-0.000319417137704526),
+LPF_TAPS(-0.000358244171233166),
+LPF_TAPS(-0.000346573027549407),
+LPF_TAPS(-0.000287148034138770),
+LPF_TAPS(-0.000189272454112044),
+LPF_TAPS(-0.000067371788877151),
+LPF_TAPS(0.000061121371994166),
+LPF_TAPS(0.000178252266903006),
+LPF_TAPS(0.000268045533373828),
+LPF_TAPS(0.000318675926094879),
+LPF_TAPS(0.000324014406196470),
+LPF_TAPS(0.000284349145337142),
+LPF_TAPS(0.000206200041981676),
+LPF_TAPS(0.000101273018695546),
+LPF_TAPS(-0.000015281270758960),
+LPF_TAPS(-0.000127046877978245),
+LPF_TAPS(-0.000218647732480789),
+LPF_TAPS(-0.000277855813135357),
+LPF_TAPS(-0.000297214302530807),
+LPF_TAPS(-0.000274961629651599),
+LPF_TAPS(-0.000215144263109794),
+LPF_TAPS(-0.000126921304547573),
+LPF_TAPS(-0.000023176045180278),
+LPF_TAPS(0.000081356815168347),
+LPF_TAPS(0.000172177192501632),
+LPF_TAPS(0.000237024486928444),
+LPF_TAPS(0.000267525010396375),
+LPF_TAPS(0.000260261747274281),
+LPF_TAPS(0.000217131551326968),
+LPF_TAPS(0.000144956948925325),
+LPF_TAPS(0.000054423951283517),
+LPF_TAPS(-0.000041490851807240),
+LPF_TAPS(-0.000129373609165754),
+LPF_TAPS(-0.000197243155330462),
+LPF_TAPS(-0.000236177752523331),
+LPF_TAPS(-0.000241478724185279),
+LPF_TAPS(-0.000213220593974129),
+LPF_TAPS(-0.000156126086562068),
+LPF_TAPS(-0.000078799528741505),
+LPF_TAPS(0.000007559564539307),
+LPF_TAPS(0.000090771716893217),
+LPF_TAPS(0.000159389496760190),
+LPF_TAPS(0.000204266447336485),
+LPF_TAPS(0.000219768755358778),
+LPF_TAPS(0.000204470262738553),
+LPF_TAPS(0.000161247014791811),
+LPF_TAPS(0.000096772923575936),
+LPF_TAPS(0.000020501204933958),
+LPF_TAPS(-0.000056714461339902),
+LPF_TAPS(-0.000124158884970214),
+LPF_TAPS(-0.000172736985353814),
+LPF_TAPS(-0.000196193966704777),
+LPF_TAPS(-0.000191911282688537),
+LPF_TAPS(-0.000161178545601417),
+LPF_TAPS(-0.000108916754401175),
+LPF_TAPS(-0.000042904978978614),
+LPF_TAPS(0.000027369756980472),
+LPF_TAPS(0.000092070367689991),
+LPF_TAPS(0.000142381767716384),
+LPF_TAPS(0.000171706425136369),
+LPF_TAPS(0.000176522050630483),
+LPF_TAPS(0.000156791053766152),
+LPF_TAPS(0.000115876412984811),
+LPF_TAPS(0.000059988262299059),
+LPF_TAPS(-0.000002749999175545),
+LPF_TAPS(-0.000063476747878071),
+LPF_TAPS(-0.000113839121163930),
+LPF_TAPS(-0.000147137126223414),
+LPF_TAPS(-0.000159208853892438),
+LPF_TAPS(-0.000148940756773300),
+LPF_TAPS(-0.000118342002758861),
+LPF_TAPS(-0.000072184001225267),
+LPF_TAPS(-0.000017266511725195),
+LPF_TAPS(0.000038578048270125),
+LPF_TAPS(0.000087597089208893),
+LPF_TAPS(0.000123189743606018),
+LPF_TAPS(0.000140790584377544),
+LPF_TAPS(0.000138447616040141),
+LPF_TAPS(0.000117022543786603),
+LPF_TAPS(0.000079995664135062),
+LPF_TAPS(0.000032913059017108),
+LPF_TAPS(-0.000017437601660726),
+LPF_TAPS(-0.000064001010754390),
+LPF_TAPS(-0.000100438797921751),
+LPF_TAPS(-0.000121987895707572),
+LPF_TAPS(-0.000126077101208288),
+LPF_TAPS(-0.000112622944066690),
+LPF_TAPS(-0.000083972630656939),
+LPF_TAPS(-0.000044511691498128),
+LPF_TAPS(-0.000000000000000002),
+LPF_TAPS(0.000043264236188097),
+LPF_TAPS(0.000079331798651948),
+LPF_TAPS(0.000103416618210071),
+LPF_TAPS(0.000112525915634239),
+LPF_TAPS(0.000105824102159998),
+LPF_TAPS(0.000084687469158516),
+LPF_TAPS(0.000052450811872168),
+LPF_TAPS(0.000013889847008835),
+LPF_TAPS(-0.000025481297179959),
+LPF_TAPS(-0.000060194832140154),
+LPF_TAPS(-0.000085585131224879),
+LPF_TAPS(-0.000098411646607848),
+LPF_TAPS(-0.000097266370464980),
+LPF_TAPS(-0.000082715563486318),
+LPF_TAPS(-0.000057163799306339),
+LPF_TAPS(-0.000024467251374184),
+LPF_TAPS(0.000010642839072521),
+LPF_TAPS(0.000043241014115690),
+LPF_TAPS(0.000068895297575180),
+LPF_TAPS(0.000084266182598215),
+LPF_TAPS(0.000087536477165891),
+LPF_TAPS(0.000078617426254042),
+LPF_TAPS(0.000059109194199816),
+LPF_TAPS(0.000032028529545616),
+LPF_TAPS(0.000001348358019648),
+LPF_TAPS(-0.000028581195343862),
+LPF_TAPS(-0.000053646492901935),
+LPF_TAPS(-0.000070532635385286),
+LPF_TAPS(-0.000077157882495440),
+LPF_TAPS(-0.000072923912246472),
+LPF_TAPS(-0.000058752864731266),
+LPF_TAPS(-0.000036912594714084),
+LPF_TAPS(-0.000010660904207243),
+LPF_TAPS(0.000016236303510003),
+LPF_TAPS(0.000040042213710101),
+LPF_TAPS(0.000057565419794740),
+LPF_TAPS(0.000066584435346171),
+LPF_TAPS(0.000066124426393850),
+LPF_TAPS(0.000056552462191051),
+LPF_TAPS(0.000039483833968097),
+LPF_TAPS(0.000017518448170727),
+LPF_TAPS(-0.000006150721233903),
+LPF_TAPS(-0.000028198722243287),
+LPF_TAPS(-0.000045633079459602),
+LPF_TAPS(-0.000056197102480673),
+LPF_TAPS(-0.000058658110405480),
+LPF_TAPS(-0.000052944360125334),
+LPF_TAPS(-0.000040116646997951),
+LPF_TAPS(-0.000022183953916465),
+LPF_TAPS(-0.000001793863434875),
+LPF_TAPS(0.000018155182598477),
+LPF_TAPS(0.000034923404169512),
+LPF_TAPS(0.000046303466797793),
+LPF_TAPS(0.000050907893980236),
+LPF_TAPS(0.000048333165179803),
+LPF_TAPS(0.000039181921369101),
+LPF_TAPS(0.000024945028324660),
+LPF_TAPS(0.000007764644796739),
+LPF_TAPS(-0.000009884758915617),
+LPF_TAPS(-0.000025550362604739),
+LPF_TAPS(-0.000037139634571452),
+LPF_TAPS(-0.000043197213207640),
+LPF_TAPS(-0.000043083788946342),
+LPF_TAPS(-0.000037035618892028),
+LPF_TAPS(-0.000026100632912291),
+LPF_TAPS(-0.000011964370615358),
+LPF_TAPS(0.000003306180458168),
+LPF_TAPS(0.000017562372412707),
+LPF_TAPS(0.000028874154654551),
+LPF_TAPS(0.000035789132174905),
+LPF_TAPS(0.000037515983141392),
+LPF_TAPS(0.000034009552153551),
+LPF_TAPS(0.000025949422139282),
+LPF_TAPS(0.000014618866986779),
+LPF_TAPS(0.000001704673145246),
+LPF_TAPS(-0.000010951445764810),
+LPF_TAPS(-0.000021613534847926),
+LPF_TAPS(-0.000028887554888383),
+LPF_TAPS(-0.000031901167390632),
+LPF_TAPS(-0.000030404343160250),
+LPF_TAPS(-0.000024779861226435),
+LPF_TAPS(-0.000015965707722944),
+LPF_TAPS(-0.000005303553733386),
+LPF_TAPS(0.000005662780227376),
+LPF_TAPS(0.000015408940720877),
+LPF_TAPS(0.000022640183553416),
+LPF_TAPS(0.000026461321281526),
+LPF_TAPS(0.000026484479952918),
+LPF_TAPS(0.000022862192292638),
+LPF_TAPS(0.000016244238103206),
+LPF_TAPS(0.000007667313823874),
+LPF_TAPS(-0.000001604409044088),
+LPF_TAPS(-0.000010263678225663),
+LPF_TAPS(-0.000017142865405167),
+LPF_TAPS(-0.000021369670893989),
+LPF_TAPS(-0.000022475323943711),
+LPF_TAPS(-0.000020442241587054),
+LPF_TAPS(-0.000015687084203430),
+LPF_TAPS(-0.000008984312747285),
+LPF_TAPS(-0.000001343421473661),
+LPF_TAPS(0.000006141091038300),
+LPF_TAPS(0.000012444972319258),
+LPF_TAPS(0.000016752874677521),
+LPF_TAPS(0.000018561871818833),
+LPF_TAPS(0.000017736994996257),
+LPF_TAPS(0.000014513205712786),
+LPF_TAPS(0.000009445938101717),
+LPF_TAPS(0.000003319420166117),
+LPF_TAPS(-0.000002972543870313),
+LPF_TAPS(-0.000008555473445022),
+LPF_TAPS(-0.000012694403544655),
+LPF_TAPS(-0.000014889041605853),
+LPF_TAPS(-0.000014931815471149),
+LPF_TAPS(-0.000012922484749463),
+LPF_TAPS(-0.000009239352535250),
+LPF_TAPS(-0.000004473175304439),
+LPF_TAPS(0.000000665210997690),
+LPF_TAPS(0.000005449388731714),
+LPF_TAPS(0.000009238814004167),
+LPF_TAPS(0.000011563232679969),
+LPF_TAPS(0.000012179135462912),
+LPF_TAPS(0.000011091787638396),
+LPF_TAPS(0.000008541512942748),
+LPF_TAPS(0.000004957983543046),
+LPF_TAPS(0.000000890558151977),
+LPF_TAPS(-0.000003074347785313),
+LPF_TAPS(-0.000006396629158261),
+LPF_TAPS(-0.000008654903183906),
+LPF_TAPS(-0.000009598430104571),
+LPF_TAPS(-0.000009172392215667),
+LPF_TAPS(-0.000007514453903456),
+LPF_TAPS(-0.000004924673538250),
+LPF_TAPS(-0.000001814470334864),
+LPF_TAPS(0.000001357021165956),
+LPF_TAPS(0.000004149568146742),
+LPF_TAPS(0.000006201914111676),
+LPF_TAPS(0.000007277262295166),
+LPF_TAPS(0.000007288640610621),
+LPF_TAPS(0.000006301781191850),
+LPF_TAPS(0.000004516461176901),
+LPF_TAPS(0.000002230237752093),
+LPF_TAPS(-0.000000209237167646),
+LPF_TAPS(-0.000002455897603684),
+LPF_TAPS(-0.000004213405263437),
+LPF_TAPS(-0.000005273188024575),
+LPF_TAPS(-0.000005537656619195),
+LPF_TAPS(-0.000005026285450778),
+LPF_TAPS(-0.000003864827717528),
+LPF_TAPS(-0.000002260316904552),
+LPF_TAPS(-0.000000466356405324),
+LPF_TAPS(0.000001255716262414),
+LPF_TAPS(0.000002673992206742),
+LPF_TAPS(0.000003616317717796),
+LPF_TAPS(0.000003989957117356),
+LPF_TAPS(0.000003788560986201),
+LPF_TAPS(0.000003086375184260),
+LPF_TAPS(0.000002021465017603),
+LPF_TAPS(0.000000771181400041),
+LPF_TAPS(-0.000000476023404783),
+LPF_TAPS(-0.000001548102886537),
+LPF_TAPS(-0.000002312345201813),
+LPF_TAPS(-0.000002690787350045),
+LPF_TAPS(-0.000002666499897103),
+LPF_TAPS(-0.000002280585752777),
+LPF_TAPS(-0.000001621105458760),
+LPF_TAPS(-0.000000806224823920),
+LPF_TAPS(0.000000035460970252),
+LPF_TAPS(0.000000784305175046),
+LPF_TAPS(0.000001345877978929),
+LPF_TAPS(0.000001662018825424),
+LPF_TAPS(0.000001715526626870),
+LPF_TAPS(0.000001528393730563),
+LPF_TAPS(0.000001154465104752),
+LPF_TAPS(0.000000668161269568),
+LPF_TAPS(0.000000151344328816),
+LPF_TAPS(-0.000000319510091302),
+LPF_TAPS(-0.000000683928580435),
+LPF_TAPS(-0.000000904464094134),
+LPF_TAPS(-0.000000969441292523),
+LPF_TAPS(-0.000000891469622152),
+LPF_TAPS(-0.000000702426625941),
+LPF_TAPS(-0.000000446094830917),
+LPF_TAPS(-0.000000169880370116),
+LPF_TAPS(0.000000082967501909),
+LPF_TAPS(0.000000279454635221),
+LPF_TAPS(0.000000400482860087),
+LPF_TAPS(0.000000441750238329),
+LPF_TAPS(0.000000412114767172),
+LPF_TAPS(0.000000330027000994),
+LPF_TAPS(0.000000218892576977),
+LPF_TAPS(0.000000102305467491),
+LPF_TAPS(0.000000000000000000),
+LPF_TAPS(-0.000000074862812243),
+LPF_TAPS(-0.000000116776553081),
+LPF_TAPS(-0.000000127377349425),
+LPF_TAPS(-0.000000113670834618),
+LPF_TAPS(-0.000000085529617644),
+LPF_TAPS(-0.000000053068738903),
+LPF_TAPS(-0.000000024455755672),
+LPF_TAPS(-0.000000004555102366),
+LPF_TAPS(0.000000005417116054),
+LPF_TAPS(0.000000007291655555),
+LPF_TAPS(0.000000004667803778),
+LPF_TAPS(0.000000001359448860),
+LPF_TAPS(0.000000000000000000),
+};
diff --git a/core/sound/blip_lpf_768K_96K.h b/core/sound/blip_lpf_768K_96K.h
new file mode 100644
index 000000000..4ce32869f
--- /dev/null
+++ b/core/sound/blip_lpf_768K_96K.h
@@ -0,0 +1,1181 @@
+static buf_t const blip_lpf_768K_96K[blip_lpf_768K_taps] = {
+LPF_TAPS(0.000000000000000000),
+LPF_TAPS(-0.000000000270411184),
+LPF_TAPS(-0.000000004566831930),
+LPF_TAPS(-0.000000012351139235),
+LPF_TAPS(-0.000000013280804131),
+LPF_TAPS(0.000000004555102241),
+LPF_TAPS(0.000000039434566462),
+LPF_TAPS(0.000000068321452499),
+LPF_TAPS(0.000000058120029422),
+LPF_TAPS(-0.000000007450379918),
+LPF_TAPS(-0.000000104404320415),
+LPF_TAPS(-0.000000170736308622),
+LPF_TAPS(-0.000000141661312606),
+LPF_TAPS(0.000000000000000000),
+LPF_TAPS(0.000000193590467381),
+LPF_TAPS(0.000000320037795188),
+LPF_TAPS(0.000000270505273607),
+LPF_TAPS(0.000000027011428177),
+LPF_TAPS(-0.000000300182995740),
+LPF_TAPS(-0.000000515587354585),
+LPF_TAPS(-0.000000450616719176),
+LPF_TAPS(-0.000000082967499633),
+LPF_TAPS(0.000000416485063055),
+LPF_TAPS(0.000000755628036388),
+LPF_TAPS(0.000000687232046705),
+LPF_TAPS(0.000000177324328124),
+LPF_TAPS(-0.000000533957607898),
+LPF_TAPS(-0.000001037252087726),
+LPF_TAPS(-0.000000984767130185),
+LPF_TAPS(-0.000000319510082535),
+LPF_TAPS(0.000000643271372107),
+LPF_TAPS(0.000001356374370310),
+LPF_TAPS(0.000001346726039086),
+LPF_TAPS(0.000000518819746823),
+LPF_TAPS(-0.000000734366703963),
+LPF_TAPS(-0.000001707712156148),
+LPF_TAPS(-0.000001775611017371),
+LPF_TAPS(-0.000000784305153524),
+LPF_TAPS(0.000000796521519526),
+LPF_TAPS(0.000002084771914283),
+LPF_TAPS(0.000002272834232693),
+LPF_TAPS(0.000001124660401793),
+LPF_TAPS(-0.000000818427794343),
+LPF_TAPS(-0.000002479843756310),
+LPF_TAPS(-0.000002838631893487),
+LPF_TAPS(-0.000001548102844057),
+LPF_TAPS(0.000000788276939661),
+LPF_TAPS(0.000002884004257187),
+LPF_TAPS(0.000003471981422733),
+LPF_TAPS(0.000002062249910138),
+LPF_TAPS(-0.000000693854385419),
+LPF_TAPS(-0.000003287128408051),
+LPF_TAPS(-0.000004170522469635),
+LPF_TAPS(-0.000002673992133367),
+LPF_TAPS(0.000000522643645980),
+LPF_TAPS(0.000003677911487767),
+LPF_TAPS(0.000004930482632690),
+LPF_TAPS(0.000003389362848789),
+LPF_TAPS(-0.000000261940083240),
+LPF_TAPS(-0.000004043901657974),
+LPF_TAPS(-0.000005746608857426),
+LPF_TAPS(-0.000004213405147821),
+LPF_TAPS(-0.000000101025494664),
+LPF_TAPS(0.000004371544091072),
+LPF_TAPS(0.000006612105557627),
+LPF_TAPS(0.000005150036795236),
+LPF_TAPS(0.000000578953352335),
+LPF_TAPS(-0.000004646237430354),
+LPF_TAPS(-0.000007518580587867),
+LPF_TAPS(-0.000006201913941494),
+LPF_TAPS(-0.000001184331523467),
+LPF_TAPS(0.000004852403355266),
+LPF_TAPS(0.000008456000265721),
+LPF_TAPS(0.000007370294594349),
+LPF_TAPS(0.000001929282864789),
+LPF_TAPS(-0.000004973569981430),
+LPF_TAPS(-0.000009412654701919),
+LPF_TAPS(-0.000008654902946414),
+LPF_TAPS(-0.000002825402781922),
+LPF_TAPS(0.000004992469763834),
+LPF_TAPS(0.000010375134744049),
+LPF_TAPS(0.000010053795787783),
+LPF_TAPS(0.000003883588087799),
+LPF_TAPS(-0.000004891152491910),
+LPF_TAPS(-0.000011328321872127),
+LPF_TAPS(-0.000011563232362672),
+LPF_TAPS(-0.000005113857611770),
+LPF_TAPS(0.000004651113866717),
+LPF_TAPS(0.000012255392400844),
+LPF_TAPS(0.000013177549153965),
+LPF_TAPS(0.000006525165344348),
+LPF_TAPS(-0.000004253440033178),
+LPF_TAPS(-0.000013137837341611),
+LPF_TAPS(-0.000014889041197294),
+LPF_TAPS(-0.000008125207077045),
+LPF_TAPS(0.000003678968304326),
+LPF_TAPS(0.000013955499256432),
+LPF_TAPS(0.000016687851634161),
+LPF_TAPS(0.000009920221676887),
+LPF_TAPS(-0.000002908464160586),
+LPF_TAPS(-0.000014686627393690),
+LPF_TAPS(-0.000018561871309492),
+LPF_TAPS(-0.000011914788318634),
+LPF_TAPS(0.000001922814435766),
+LPF_TAPS(0.000015307952332069),
+LPF_TAPS(0.000020496650300343),
+LPF_TAPS(0.000014111621182239),
+LPF_TAPS(-0.000000703236414013),
+LPF_TAPS(-0.000015794781272331),
+LPF_TAPS(-0.000022475323326984),
+LPF_TAPS(-0.000016511363305968),
+LPF_TAPS(-0.000000768497640292),
+LPF_TAPS(0.000016121115006902),
+LPF_TAPS(0.000024478551043080),
+LPF_TAPS(0.000019112381464281),
+LPF_TAPS(0.000002509821213062),
+LPF_TAPS(-0.000016259787463951),
+LPF_TAPS(-0.000026484479226179),
+LPF_TAPS(-0.000021910564111253),
+LPF_TAPS(-0.000004537120451352),
+LPF_TAPS(0.000016182628565960),
+LPF_TAPS(0.000028468717891133),
+LPF_TAPS(0.000024899124592205),
+LPF_TAPS(0.000006865468409934),
+LPF_TAPS(-0.000015860650962998),
+LPF_TAPS(-0.000030404342325949),
+LPF_TAPS(-0.000028068411975450),
+LPF_TAPS(-0.000009508348030975),
+LPF_TAPS(0.000015264260998860),
+LPF_TAPS(0.000032261918000294),
+LPF_TAPS(0.000031405731989841),
+LPF_TAPS(0.000012477365500132),
+LPF_TAPS(-0.000014363494044602),
+LPF_TAPS(-0.000034009551220323),
+LPF_TAPS(-0.000034895180669362),
+LPF_TAPS(-0.000015781955869275),
+LPF_TAPS(0.000013128274090703),
+LPF_TAPS(0.000035612967298774),
+LPF_TAPS(0.000038517493400618),
+LPF_TAPS(0.000019429083080919),
+LPF_TAPS(-0.000011528697227208),
+LPF_TAPS(-0.000037035617875765),
+LPF_TAPS(-0.000042249912140231),
+LPF_TAPS(-0.000023422936769313),
+LPF_TAPS(0.000009535338363085),
+LPF_TAPS(0.000038238818863166),
+LPF_TAPS(0.000046066073614426),
+LPF_TAPS(0.000027764628444526),
+LPF_TAPS(-0.000007119580243999),
+LPF_TAPS(-0.000039181920293943),
+LPF_TAPS(-0.000049935921330255),
+LPF_TAPS(-0.000032451889885582),
+LPF_TAPS(0.000004253963524157),
+LPF_TAPS(0.000039822509137849),
+LPF_TAPS(0.000053825644215059),
+LPF_TAPS(0.000037478776773538),
+LPF_TAPS(-0.000000912556335678),
+LPF_TAPS(-0.000040116645897143),
+LPF_TAPS(-0.000057697644656153),
+LPF_TAPS(-0.000042835380781845),
+LPF_TAPS(-0.000002928658518456),
+LPF_TAPS(0.000040019135521818),
+LPF_TAPS(0.000061510538634914),
+LPF_TAPS(0.000048507553506201),
+LPF_TAPS(0.000007291380941630),
+LPF_TAPS(-0.000039483832884655),
+LPF_TAPS(-0.000065219190537468),
+LPF_TAPS(-0.000054476645756378),
+LPF_TAPS(-0.000012194578003053),
+LPF_TAPS(0.000038463982734246),
+LPF_TAPS(0.000068774785077135),
+LPF_TAPS(0.000060719265845020),
+LPF_TAPS(0.000017654058304802),
+LPF_TAPS(-0.000036912593701199),
+LPF_TAPS(-0.000072124938581478),
+LPF_TAPS(-0.000067207060590316),
+LPF_TAPS(-0.000023682039386360),
+LPF_TAPS(0.000034782845571742),
+LPF_TAPS(0.000075213851679169),
+LPF_TAPS(0.000073906522798216),
+LPF_TAPS(0.000030286711588387),
+LPF_TAPS(-0.000032028528666751),
+LPF_TAPS(-0.000077982505169364),
+LPF_TAPS(-0.000080778829003251),
+LPF_TAPS(-0.000037471802072891),
+LPF_TAPS(0.000028604513776213),
+LPF_TAPS(0.000080368900569730),
+LPF_TAPS(0.000087779711222512),
+LPF_TAPS(0.000045236142951916),
+LPF_TAPS(-0.000024467250702803),
+LPF_TAPS(-0.000082308346520089),
+LPF_TAPS(-0.000094859366413814),
+LPF_TAPS(-0.000053573247707659),
+LPF_TAPS(0.000019575293067346),
+LPF_TAPS(0.000083733791868213),
+LPF_TAPS(0.000101962407224727),
+LPF_TAPS(0.000062470900289848),
+LPF_TAPS(-0.000013889846627700),
+LPF_TAPS(-0.000084576205885109),
+LPF_TAPS(-0.000109027857473073),
+LPF_TAPS(-0.000071910761447583),
+LPF_TAPS(0.000007375337964748),
+LPF_TAPS(0.000084765005651504),
+LPF_TAPS(0.000115989195611307),
+LPF_TAPS(0.000081867996989454),
+LPF_TAPS(0.000000000000000001),
+LPF_TAPS(-0.000084228530228097),
+LPF_TAPS(-0.000122774449196541),
+LPF_TAPS(-0.000092310932764303),
+LPF_TAPS(-0.000008263529568140),
+LPF_TAPS(0.000082894560772723),
+LPF_TAPS(0.000129306343115324),
+LPF_TAPS(0.000103200741212745),
+LPF_TAPS(0.000017437601182228),
+LPF_TAPS(-0.000080690885301903),
+LPF_TAPS(-0.000135502503998360),
+LPF_TAPS(-0.000114491164353880),
+LPF_TAPS(-0.000027538942308942),
+LPF_TAPS(0.000077545906315897),
+LPF_TAPS(0.000141275722906486),
+LPF_TAPS(0.000126128278040423),
+LPF_TAPS(0.000038578047211531),
+LPF_TAPS(-0.000073389289019584),
+LPF_TAPS(-0.000146534277977077),
+LPF_TAPS(-0.000138050302236821),
+LPF_TAPS(-0.000050558572817687),
+LPF_TAPS(0.000068152647381547),
+LPF_TAPS(0.000151182318291936),
+LPF_TAPS(0.000150187461947657),
+LPF_TAPS(0.000063476746136257),
+LPF_TAPS(-0.000061770264784565),
+LPF_TAPS(-0.000155120309766295),
+LPF_TAPS(-0.000162461903246604),
+LPF_TAPS(-0.000077320788885710),
+LPF_TAPS(0.000054179845537360),
+LPF_TAPS(0.000158245543366951),
+LPF_TAPS(0.000174787668629224),
+LPF_TAPS(0.000092070365163552),
+LPF_TAPS(-0.000045323293046136),
+LPF_TAPS(-0.000160452705449426),
+LPF_TAPS(-0.000187070735635932),
+LPF_TAPS(-0.000107696058106567),
+LPF_TAPS(0.000035147509988554),
+LPF_TAPS(0.000161634509463345),
+LPF_TAPS(0.000199209122364984),
+LPF_TAPS(0.000124158881563270),
+LPF_TAPS(-0.000023605215399143),
+LPF_TAPS(-0.000161682387716431),
+LPF_TAPS(-0.000211093063120905),
+LPF_TAPS(-0.000141409832819943),
+LPF_TAPS(0.000010655773168138),
+LPF_TAPS(0.000160487241315340),
+LPF_TAPS(0.000222605257022561),
+LPF_TAPS(0.000159389492386513),
+LPF_TAPS(0.000003733973919304),
+LPF_TAPS(-0.000157940245821130),
+LPF_TAPS(-0.000233621191929531),
+LPF_TAPS(-0.000178027676757870),
+LPF_TAPS(-0.000019588870814477),
+LPF_TAPS(0.000153933709573879),
+LPF_TAPS(0.000244009545538508),
+LPF_TAPS(0.000197243149918067),
+LPF_TAPS(0.000036924624014180),
+LPF_TAPS(-0.000148361981060471),
+LPF_TAPS(-0.000253632664955913),
+LPF_TAPS(-0.000216943399147082),
+LPF_TAPS(-0.000055746989303841),
+LPF_TAPS(0.000141122401127468),
+LPF_TAPS(0.000262347125473069),
+LPF_TAPS(0.000237024480424446),
+LPF_TAPS(0.000076050980390099),
+LPF_TAPS(-0.000132116295283923),
+LPF_TAPS(-0.000270004368660097),
+LPF_TAPS(-0.000257370938398958),
+LPF_TAPS(-0.000097820105521335),
+LPF_TAPS(0.000121250000801888),
+LPF_TAPS(0.000276451419258909),
+LPF_TAPS(0.000277855805510942),
+LPF_TAPS(0.000121025639279983),
+LPF_TAPS(-0.000108435922812569),
+LPF_TAPS(-0.000281531679699815),
+LPF_TAPS(-0.000298340684414147),
+LPF_TAPS(-0.000145625936753519),
+LPF_TAPS(0.000093593613118962),
+LPF_TAPS(0.000285085800395328),
+LPF_TAPS(0.000318675917350350),
+LPF_TAPS(0.000171565797249006),
+LPF_TAPS(-0.000076650865007591),
+LPF_TAPS(-0.000286952623285186),
+LPF_TAPS(-0.000338700845583232),
+LPF_TAPS(-0.000198775884607860),
+LPF_TAPS(0.000057544816948299),
+LPF_TAPS(0.000286970195424600),
+LPF_TAPS(0.000358244161402881),
+LPF_TAPS(0.000227172210999713),
+LPF_TAPS(-0.000036223057728650),
+LPF_TAPS(-0.000284976848729387),
+LPF_TAPS(-0.000377124354571514),
+LPF_TAPS(-0.000256655690826361),
+LPF_TAPS(0.000012644725282694),
+LPF_TAPS(0.000280812341324255),
+LPF_TAPS(0.000395150254398941),
+LPF_TAPS(0.000287111771048686),
+LPF_TAPS(0.000013218408751720),
+LPF_TAPS(-0.000274319055291023),
+LPF_TAPS(-0.000412121667917977),
+LPF_TAPS(-0.000318410143859715),
+LPF_TAPS(-0.000041380876871214),
+LPF_TAPS(0.000265343244988183),
+LPF_TAPS(0.000427830113880310),
+LPF_TAPS(0.000350404547166695),
+LPF_TAPS(0.000071842484152793),
+LPF_TAPS(-0.000253736329520328),
+LPF_TAPS(-0.000442059651518030),
+LPF_TAPS(-0.000382932657815871),
+LPF_TAPS(-0.000104587315532687),
+LPF_TAPS(0.000239356222381871),
+LPF_TAPS(0.000454587802221318),
+LPF_TAPS(0.000415816081895713),
+LPF_TAPS(0.000139582790075373),
+LPF_TAPS(-0.000222068690791697),
+LPF_TAPS(-0.000465186561474685),
+LPF_TAPS(-0.000448860445790772),
+LPF_TAPS(-0.000176778770242168),
+LPF_TAPS(0.000201748736780270),
+LPF_TAPS(0.000473623497580100),
+LPF_TAPS(0.000481855590931383),
+LPF_TAPS(0.000216106733933253),
+LPF_TAPS(-0.000178281991696848),
+LPF_TAPS(-0.000479662932881307),
+LPF_TAPS(-0.000514575874397409),
+LPF_TAPS(-0.000257479016753594),
+LPF_TAPS(0.000151566115476765),
+LPF_TAPS(0.000483067202397602),
+LPF_TAPS(0.000546780576689613),
+LPF_TAPS(0.000300788131540266),
+LPF_TAPS(-0.000121512191754436),
+LPF_TAPS(-0.000483597983984493),
+LPF_TAPS(-0.000578214417085337),
+LPF_TAPS(-0.000345906171682450),
+LPF_TAPS(0.000088046109734778),
+LPF_TAPS(0.000481017693369305),
+LPF_TAPS(0.000608608176048614),
+LPF_TAPS(0.000392684304164982),
+LPF_TAPS(-0.000051109923647480),
+LPF_TAPS(-0.000475090936671043),
+LPF_TAPS(-0.000637679423173593),
+LPF_TAPS(-0.000440952357572390),
+LPF_TAPS(0.000010663180613739),
+LPF_TAPS(0.000465586012311272),
+LPF_TAPS(0.000665133348108232),
+LPF_TAPS(0.000490518509497743),
+LPF_TAPS(0.000033315792142107),
+LPF_TAPS(-0.000452276453563864),
+LPF_TAPS(-0.000690663690836736),
+LPF_TAPS(-0.000541169076912061),
+LPF_TAPS(-0.000080828649596569),
+LPF_TAPS(0.000434942602384353),
+LPF_TAPS(0.000713953766598160),
+LPF_TAPS(0.000592668412062428),
+LPF_TAPS(0.000131855849291230),
+LPF_TAPS(-0.000413373204608622),
+LPF_TAPS(-0.000734677579588487),
+LPF_TAPS(-0.000644758905377691),
+LPF_TAPS(-0.000186355537869023),
+LPF_TAPS(0.000387367016124019),
+LPF_TAPS(0.000752501018436972),
+LPF_TAPS(0.000697161095670107),
+LPF_TAPS(0.000244262511342674),
+LPF_TAPS(-0.000356734409198346),
+LPF_TAPS(-0.000767083125267112),
+LPF_TAPS(-0.000749573886623857),
+LPF_TAPS(-0.000305487255974598),
+LPF_TAPS(0.000321298967809247),
+LPF_TAPS(0.000778077428948392),
+LPF_TAPS(0.000801674867154103),
+LPF_TAPS(0.000369915075832187),
+LPF_TAPS(-0.000280899060553020),
+LPF_TAPS(-0.000785133331916735),
+LPF_TAPS(-0.000853120731696567),
+LPF_TAPS(-0.000437405312127583),
+LPF_TAPS(0.000235389379531954),
+LPF_TAPS(0.000787897538687086),
+LPF_TAPS(0.000903547794839195),
+LPF_TAPS(0.000507790658341669),
+LPF_TAPS(-0.000184642433526538),
+LPF_TAPS(-0.000786015512894042),
+LPF_TAPS(-0.000952572592922852),
+LPF_TAPS(-0.000580876573863251),
+LPF_TAPS(0.000128549983756101),
+LPF_TAPS(0.000779132948370268),
+LPF_TAPS(0.000999792563301986),
+LPF_TAPS(0.000656440797430408),
+LPF_TAPS(-0.000067024410620718),
+LPF_TAPS(-0.000766897238393383),
+LPF_TAPS(-0.001044786789848272),
+LPF_TAPS(-0.000734232960023326),
+LPF_TAPS(-0.000000000000000005),
+LPF_TAPS(0.000748958925783496),
+LPF_TAPS(0.001087116800973934),
+LPF_TAPS(0.000813974295010493),
+LPF_TAPS(0.000072565862038648),
+LPF_TAPS(-0.000724973114994913),
+LPF_TAPS(-0.001126327403911303),
+LPF_TAPS(-0.000895357441261970),
+LPF_TAPS(-0.000150691596899802),
+LPF_TAPS(0.000694600825682697),
+LPF_TAPS(0.001161947536166415),
+LPF_TAPS(0.000978046332583554),
+LPF_TAPS(0.000234370453800612),
+LPF_TAPS(-0.000657510265401049),
+LPF_TAPS(-0.001193491111907350),
+LPF_TAPS(-0.001061676164149838),
+LPF_TAPS(-0.000323569652552237),
+LPF_TAPS(0.000613377997052172),
+LPF_TAPS(0.001220457837477517),
+LPF_TAPS(0.001145853423567000),
+LPF_TAPS(0.000418229657899272),
+LPF_TAPS(-0.000561889974384736),
+LPF_TAPS(-0.001242333966140826),
+LPF_TAPS(-0.001230155970706029),
+LPF_TAPS(-0.000518263593805743),
+LPF_TAPS(0.000502742416153757),
+LPF_TAPS(0.001258592957444364),
+LPF_TAPS(0.001314133146421481),
+LPF_TAPS(0.000623556805271501),
+LPF_TAPS(-0.000435642486386754),
+LPF_TAPS(-0.001268696001060263),
+LPF_TAPS(-0.001397305885589659),
+LPF_TAPS(-0.000733966574376959),
+LPF_TAPS(0.000360308744410595),
+LPF_TAPS(0.001272092358430086),
+LPF_TAPS(0.001479166804407970),
+LPF_TAPS(0.000849321996303103),
+LPF_TAPS(-0.000276471323693381),
+LPF_TAPS(-0.001268219467708550),
+LPF_TAPS(-0.001559180225390086),
+LPF_TAPS(-0.000969424020057980),
+LPF_TAPS(0.000183871792903588),
+LPF_TAPS(0.001256502748029804),
+LPF_TAPS(0.001636782095705366),
+LPF_TAPS(0.001094045657568108),
+LPF_TAPS(-0.000082262645572483),
+LPF_TAPS(-0.001236355027529776),
+LPF_TAPS(-0.001711379745094407),
+LPF_TAPS(-0.001222932363673510),
+LPF_TAPS(-0.000028593644051682),
+LPF_TAPS(0.001207175505238442),
+LPF_TAPS(0.001782351418086488),
+LPF_TAPS(0.001355802588405122),
+LPF_TAPS(0.000148926072484010),
+LPF_TAPS(-0.001168348139089120),
+LPF_TAPS(-0.001849045501035285),
+LPF_TAPS(-0.001492348501730395),
+LPF_TAPS(-0.000278957153502074),
+LPF_TAPS(0.001119239329794093),
+LPF_TAPS(0.001910779346758653),
+LPF_TAPS(0.001632236889739083),
+LPF_TAPS(0.000418905665507703),
+LPF_TAPS(-0.001059194741754679),
+LPF_TAPS(-0.001966837577216155),
+LPF_TAPS(-0.001775110220014063),
+LPF_TAPS(-0.000568990229048854),
+LPF_TAPS(0.000987535065544672),
+LPF_TAPS(0.002016469716192195),
+LPF_TAPS(0.001920587872700438),
+LPF_TAPS(0.000729433874303646),
+LPF_TAPS(-0.000903550479155667),
+LPF_TAPS(-0.002058886967336214),
+LPF_TAPS(-0.002068267532562079),
+LPF_TAPS(-0.000900469798287184),
+LPF_TAPS(0.000806493503452518),
+LPF_TAPS(0.002093257905337432),
+LPF_TAPS(0.002217726736106073),
+LPF_TAPS(0.001082348564271453),
+LPF_TAPS(-0.000695569866067479),
+LPF_TAPS(-0.002118702785577123),
+LPF_TAPS(-0.002368524566673696),
+LPF_TAPS(-0.001275347066045030),
+LPF_TAPS(0.000569926880137041),
+LPF_TAPS(0.002134286094823393),
+LPF_TAPS(0.002520203489249087),
+LPF_TAPS(0.001479779673719473),
+LPF_TAPS(-0.000428638699776618),
+LPF_TAPS(-0.002139006854631970),
+LPF_TAPS(-0.002672291315636172),
+LPF_TAPS(-0.001696012105135989),
+LPF_TAPS(0.000270687618562523),
+LPF_TAPS(0.002131786038913134),
+LPF_TAPS(0.002824303289607278),
+LPF_TAPS(0.001924478741007838),
+LPF_TAPS(-0.000094940309639865),
+LPF_TAPS(-0.002111450261374951),
+LPF_TAPS(-0.002975744280643784),
+LPF_TAPS(-0.002165704342448907),
+LPF_TAPS(-0.000099882464296025),
+LPF_TAPS(0.002076710603318021),
+LPF_TAPS(0.003126111073977952),
+LPF_TAPS(0.002420331465708461),
+LPF_TAPS(0.000315244661688287),
+LPF_TAPS(-0.002026135051765541),
+LPF_TAPS(-0.003274894743813884),
+LPF_TAPS(-0.002689155344745519),
+LPF_TAPS(-0.000552845020310631),
+LPF_TAPS(0.001958112447871428),
+LPF_TAPS(0.003421583095861868),
+LPF_TAPS(0.002973168695048461),
+LPF_TAPS(0.000814682149728468),
+LPF_TAPS(-0.001870805022176066),
+LPF_TAPS(-0.003565663164670819),
+LPF_TAPS(-0.003273619886621902),
+LPF_TAPS(-0.001103139994380340),
+LPF_TAPS(0.001762085384909424),
+LPF_TAPS(0.003706623750694053),
+LPF_TAPS(0.003592089406590396),
+LPF_TAPS(0.001421101307595647),
+LPF_TAPS(-0.001629452035153002),
+LPF_TAPS(-0.003843957981579970),
+LPF_TAPS(-0.003930591751701837),
+LPF_TAPS(-0.001772100266318171),
+LPF_TAPS(0.001469914706687037),
+LPF_TAPS(0.003977165881845358),
+LPF_TAPS(0.004291713304285165),
+LPF_TAPS(0.002160530749761068),
+LPF_TAPS(-0.001279836601243179),
+LPF_TAPS(-0.004105756934868098),
+LPF_TAPS(-0.004678802109646364),
+LPF_TAPS(-0.002591935331103227),
+LPF_TAPS(0.001054713774132877),
+LPF_TAPS(0.004229252621032640),
+LPF_TAPS(0.005096234111258445),
+LPF_TAPS(0.003073413849970708),
+LPF_TAPS(-0.000788860865288700),
+LPF_TAPS(-0.004347188915874286),
+LPF_TAPS(-0.005549794693420798),
+LPF_TAPS(-0.003614213465399337),
+LPF_TAPS(0.000474953775693102),
+LPF_TAPS(0.004459118732201452),
+LPF_TAPS(0.006047238764530833),
+LPF_TAPS(0.004226601704931117),
+LPF_TAPS(-0.000103347635223954),
+LPF_TAPS(-0.004564614290425168),
+LPF_TAPS(-0.006599135675019976),
+LPF_TAPS(-0.004927194646314364),
+LPF_TAPS(-0.000338969649985560),
+LPF_TAPS(0.004663269401693712),
+LPF_TAPS(0.007220184376639409),
+LPF_TAPS(0.005739043522408302),
+LPF_TAPS(0.000870037019175714),
+LPF_TAPS(-0.004754701648912377),
+LPF_TAPS(-0.007931336370168995),
+LPF_TAPS(-0.006695038446581728),
+LPF_TAPS(-0.001515656923509417),
+LPF_TAPS(0.004838554451325837),
+LPF_TAPS(0.008763372616940504),
+LPF_TAPS(0.007843713794596620),
+LPF_TAPS(0.002314122726735356),
+LPF_TAPS(-0.004914498999040660),
+LPF_TAPS(-0.009763247625583497),
+LPF_TAPS(-0.009259696625635633),
+LPF_TAPS(-0.003324858732932616),
+LPF_TAPS(0.004982236044675482),
+LPF_TAPS(0.011006070343321725),
+LPF_TAPS(0.011063798161185320),
+LPF_TAPS(0.004645354753451371),
+LPF_TAPS(-0.005041497540227182),
+LPF_TAPS(-0.012619584031900466),
+LPF_TAPS(-0.013465021110133799),
+LPF_TAPS(-0.006447454322367885),
+LPF_TAPS(0.005092048108238308),
+LPF_TAPS(0.014839564692262223),
+LPF_TAPS(0.016858573939520928),
+LPF_TAPS(0.009064872816953886),
+LPF_TAPS(-0.005133686337426830),
+LPF_TAPS(-0.018153852707843591),
+LPF_TAPS(-0.022091905732457218),
+LPF_TAPS(-0.013242286375227360),
+LPF_TAPS(0.005166245894094694),
+LPF_TAPS(0.023760629646010001),
+LPF_TAPS(0.031369218971440446),
+LPF_TAPS(0.021048655686047999),
+LPF_TAPS(-0.005189596441849655),
+LPF_TAPS(-0.035597921097925082),
+LPF_TAPS(-0.052774023466892729),
+LPF_TAPS(-0.041174498840934465),
+LPF_TAPS(0.005203644363453204),
+LPF_TAPS(0.078609102662633309),
+LPF_TAPS(0.159062306412752513),
+LPF_TAPS(0.221363681692069797),
+LPF_TAPS(0.244791664156811084),
+LPF_TAPS(0.221363681692069797),
+LPF_TAPS(0.159062306412752513),
+LPF_TAPS(0.078609102662633309),
+LPF_TAPS(0.005203644363453204),
+LPF_TAPS(-0.041174498840934465),
+LPF_TAPS(-0.052774023466892729),
+LPF_TAPS(-0.035597921097925082),
+LPF_TAPS(-0.005189596441849655),
+LPF_TAPS(0.021048655686048003),
+LPF_TAPS(0.031369218971440446),
+LPF_TAPS(0.023760629646010001),
+LPF_TAPS(0.005166245894094694),
+LPF_TAPS(-0.013242286375227360),
+LPF_TAPS(-0.022091905732457225),
+LPF_TAPS(-0.018153852707843591),
+LPF_TAPS(-0.005133686337426830),
+LPF_TAPS(0.009064872816953886),
+LPF_TAPS(0.016858573939520932),
+LPF_TAPS(0.014839564692262223),
+LPF_TAPS(0.005092048108238309),
+LPF_TAPS(-0.006447454322367884),
+LPF_TAPS(-0.013465021110133800),
+LPF_TAPS(-0.012619584031900466),
+LPF_TAPS(-0.005041497540227182),
+LPF_TAPS(0.004645354753451371),
+LPF_TAPS(0.011063798161185320),
+LPF_TAPS(0.011006070343321727),
+LPF_TAPS(0.004982236044675482),
+LPF_TAPS(-0.003324858732932616),
+LPF_TAPS(-0.009259696625635633),
+LPF_TAPS(-0.009763247625583497),
+LPF_TAPS(-0.004914498999040660),
+LPF_TAPS(0.002314122726735356),
+LPF_TAPS(0.007843713794596620),
+LPF_TAPS(0.008763372616940504),
+LPF_TAPS(0.004838554451325837),
+LPF_TAPS(-0.001515656923509417),
+LPF_TAPS(-0.006695038446581728),
+LPF_TAPS(-0.007931336370168997),
+LPF_TAPS(-0.004754701648912377),
+LPF_TAPS(0.000870037019175714),
+LPF_TAPS(0.005739043522408302),
+LPF_TAPS(0.007220184376639409),
+LPF_TAPS(0.004663269401693713),
+LPF_TAPS(-0.000338969649985560),
+LPF_TAPS(-0.004927194646314365),
+LPF_TAPS(-0.006599135675019976),
+LPF_TAPS(-0.004564614290425169),
+LPF_TAPS(-0.000103347635223954),
+LPF_TAPS(0.004226601704931118),
+LPF_TAPS(0.006047238764530834),
+LPF_TAPS(0.004459118732201452),
+LPF_TAPS(0.000474953775693102),
+LPF_TAPS(-0.003614213465399337),
+LPF_TAPS(-0.005549794693420798),
+LPF_TAPS(-0.004347188915874287),
+LPF_TAPS(-0.000788860865288701),
+LPF_TAPS(0.003073413849970708),
+LPF_TAPS(0.005096234111258445),
+LPF_TAPS(0.004229252621032641),
+LPF_TAPS(0.001054713774132877),
+LPF_TAPS(-0.002591935331103227),
+LPF_TAPS(-0.004678802109646364),
+LPF_TAPS(-0.004105756934868098),
+LPF_TAPS(-0.001279836601243179),
+LPF_TAPS(0.002160530749761068),
+LPF_TAPS(0.004291713304285166),
+LPF_TAPS(0.003977165881845358),
+LPF_TAPS(0.001469914706687038),
+LPF_TAPS(-0.001772100266318171),
+LPF_TAPS(-0.003930591751701838),
+LPF_TAPS(-0.003843957981579969),
+LPF_TAPS(-0.001629452035153002),
+LPF_TAPS(0.001421101307595647),
+LPF_TAPS(0.003592089406590396),
+LPF_TAPS(0.003706623750694053),
+LPF_TAPS(0.001762085384909424),
+LPF_TAPS(-0.001103139994380340),
+LPF_TAPS(-0.003273619886621902),
+LPF_TAPS(-0.003565663164670820),
+LPF_TAPS(-0.001870805022176066),
+LPF_TAPS(0.000814682149728468),
+LPF_TAPS(0.002973168695048460),
+LPF_TAPS(0.003421583095861869),
+LPF_TAPS(0.001958112447871428),
+LPF_TAPS(-0.000552845020310631),
+LPF_TAPS(-0.002689155344745519),
+LPF_TAPS(-0.003274894743813884),
+LPF_TAPS(-0.002026135051765542),
+LPF_TAPS(0.000315244661688287),
+LPF_TAPS(0.002420331465708461),
+LPF_TAPS(0.003126111073977953),
+LPF_TAPS(0.002076710603318022),
+LPF_TAPS(-0.000099882464296025),
+LPF_TAPS(-0.002165704342448908),
+LPF_TAPS(-0.002975744280643785),
+LPF_TAPS(-0.002111450261374951),
+LPF_TAPS(-0.000094940309639865),
+LPF_TAPS(0.001924478741007838),
+LPF_TAPS(0.002824303289607278),
+LPF_TAPS(0.002131786038913134),
+LPF_TAPS(0.000270687618562523),
+LPF_TAPS(-0.001696012105135989),
+LPF_TAPS(-0.002672291315636172),
+LPF_TAPS(-0.002139006854631970),
+LPF_TAPS(-0.000428638699776618),
+LPF_TAPS(0.001479779673719473),
+LPF_TAPS(0.002520203489249086),
+LPF_TAPS(0.002134286094823393),
+LPF_TAPS(0.000569926880137041),
+LPF_TAPS(-0.001275347066045031),
+LPF_TAPS(-0.002368524566673696),
+LPF_TAPS(-0.002118702785577123),
+LPF_TAPS(-0.000695569866067479),
+LPF_TAPS(0.001082348564271454),
+LPF_TAPS(0.002217726736106073),
+LPF_TAPS(0.002093257905337432),
+LPF_TAPS(0.000806493503452518),
+LPF_TAPS(-0.000900469798287184),
+LPF_TAPS(-0.002068267532562080),
+LPF_TAPS(-0.002058886967336214),
+LPF_TAPS(-0.000903550479155668),
+LPF_TAPS(0.000729433874303646),
+LPF_TAPS(0.001920587872700438),
+LPF_TAPS(0.002016469716192196),
+LPF_TAPS(0.000987535065544672),
+LPF_TAPS(-0.000568990229048854),
+LPF_TAPS(-0.001775110220014063),
+LPF_TAPS(-0.001966837577216155),
+LPF_TAPS(-0.001059194741754679),
+LPF_TAPS(0.000418905665507703),
+LPF_TAPS(0.001632236889739084),
+LPF_TAPS(0.001910779346758654),
+LPF_TAPS(0.001119239329794093),
+LPF_TAPS(-0.000278957153502074),
+LPF_TAPS(-0.001492348501730395),
+LPF_TAPS(-0.001849045501035285),
+LPF_TAPS(-0.001168348139089120),
+LPF_TAPS(0.000148926072484010),
+LPF_TAPS(0.001355802588405122),
+LPF_TAPS(0.001782351418086488),
+LPF_TAPS(0.001207175505238443),
+LPF_TAPS(-0.000028593644051682),
+LPF_TAPS(-0.001222932363673511),
+LPF_TAPS(-0.001711379745094406),
+LPF_TAPS(-0.001236355027529776),
+LPF_TAPS(-0.000082262645572483),
+LPF_TAPS(0.001094045657568108),
+LPF_TAPS(0.001636782095705366),
+LPF_TAPS(0.001256502748029804),
+LPF_TAPS(0.000183871792903588),
+LPF_TAPS(-0.000969424020057980),
+LPF_TAPS(-0.001559180225390086),
+LPF_TAPS(-0.001268219467708550),
+LPF_TAPS(-0.000276471323693381),
+LPF_TAPS(0.000849321996303103),
+LPF_TAPS(0.001479166804407970),
+LPF_TAPS(0.001272092358430086),
+LPF_TAPS(0.000360308744410595),
+LPF_TAPS(-0.000733966574376958),
+LPF_TAPS(-0.001397305885589660),
+LPF_TAPS(-0.001268696001060262),
+LPF_TAPS(-0.000435642486386754),
+LPF_TAPS(0.000623556805271501),
+LPF_TAPS(0.001314133146421482),
+LPF_TAPS(0.001258592957444364),
+LPF_TAPS(0.000502742416153757),
+LPF_TAPS(-0.000518263593805743),
+LPF_TAPS(-0.001230155970706030),
+LPF_TAPS(-0.001242333966140826),
+LPF_TAPS(-0.000561889974384736),
+LPF_TAPS(0.000418229657899272),
+LPF_TAPS(0.001145853423567001),
+LPF_TAPS(0.001220457837477517),
+LPF_TAPS(0.000613377997052172),
+LPF_TAPS(-0.000323569652552237),
+LPF_TAPS(-0.001061676164149839),
+LPF_TAPS(-0.001193491111907350),
+LPF_TAPS(-0.000657510265401049),
+LPF_TAPS(0.000234370453800612),
+LPF_TAPS(0.000978046332583554),
+LPF_TAPS(0.001161947536166415),
+LPF_TAPS(0.000694600825682696),
+LPF_TAPS(-0.000150691596899802),
+LPF_TAPS(-0.000895357441261970),
+LPF_TAPS(-0.001126327403911303),
+LPF_TAPS(-0.000724973114994913),
+LPF_TAPS(0.000072565862038648),
+LPF_TAPS(0.000813974295010493),
+LPF_TAPS(0.001087116800973934),
+LPF_TAPS(0.000748958925783496),
+LPF_TAPS(-0.000000000000000005),
+LPF_TAPS(-0.000734232960023325),
+LPF_TAPS(-0.001044786789848272),
+LPF_TAPS(-0.000766897238393383),
+LPF_TAPS(-0.000067024410620718),
+LPF_TAPS(0.000656440797430408),
+LPF_TAPS(0.000999792563301986),
+LPF_TAPS(0.000779132948370269),
+LPF_TAPS(0.000128549983756101),
+LPF_TAPS(-0.000580876573863252),
+LPF_TAPS(-0.000952572592922853),
+LPF_TAPS(-0.000786015512894041),
+LPF_TAPS(-0.000184642433526538),
+LPF_TAPS(0.000507790658341669),
+LPF_TAPS(0.000903547794839196),
+LPF_TAPS(0.000787897538687086),
+LPF_TAPS(0.000235389379531954),
+LPF_TAPS(-0.000437405312127583),
+LPF_TAPS(-0.000853120731696568),
+LPF_TAPS(-0.000785133331916735),
+LPF_TAPS(-0.000280899060553020),
+LPF_TAPS(0.000369915075832187),
+LPF_TAPS(0.000801674867154103),
+LPF_TAPS(0.000778077428948392),
+LPF_TAPS(0.000321298967809247),
+LPF_TAPS(-0.000305487255974598),
+LPF_TAPS(-0.000749573886623857),
+LPF_TAPS(-0.000767083125267112),
+LPF_TAPS(-0.000356734409198346),
+LPF_TAPS(0.000244262511342674),
+LPF_TAPS(0.000697161095670107),
+LPF_TAPS(0.000752501018436972),
+LPF_TAPS(0.000387367016124019),
+LPF_TAPS(-0.000186355537869023),
+LPF_TAPS(-0.000644758905377691),
+LPF_TAPS(-0.000734677579588487),
+LPF_TAPS(-0.000413373204608623),
+LPF_TAPS(0.000131855849291230),
+LPF_TAPS(0.000592668412062428),
+LPF_TAPS(0.000713953766598160),
+LPF_TAPS(0.000434942602384354),
+LPF_TAPS(-0.000080828649596569),
+LPF_TAPS(-0.000541169076912061),
+LPF_TAPS(-0.000690663690836736),
+LPF_TAPS(-0.000452276453563864),
+LPF_TAPS(0.000033315792142107),
+LPF_TAPS(0.000490518509497743),
+LPF_TAPS(0.000665133348108233),
+LPF_TAPS(0.000465586012311272),
+LPF_TAPS(0.000010663180613739),
+LPF_TAPS(-0.000440952357572390),
+LPF_TAPS(-0.000637679423173593),
+LPF_TAPS(-0.000475090936671043),
+LPF_TAPS(-0.000051109923647480),
+LPF_TAPS(0.000392684304164983),
+LPF_TAPS(0.000608608176048614),
+LPF_TAPS(0.000481017693369305),
+LPF_TAPS(0.000088046109734778),
+LPF_TAPS(-0.000345906171682450),
+LPF_TAPS(-0.000578214417085338),
+LPF_TAPS(-0.000483597983984493),
+LPF_TAPS(-0.000121512191754436),
+LPF_TAPS(0.000300788131540266),
+LPF_TAPS(0.000546780576689613),
+LPF_TAPS(0.000483067202397602),
+LPF_TAPS(0.000151566115476765),
+LPF_TAPS(-0.000257479016753594),
+LPF_TAPS(-0.000514575874397409),
+LPF_TAPS(-0.000479662932881307),
+LPF_TAPS(-0.000178281991696848),
+LPF_TAPS(0.000216106733933253),
+LPF_TAPS(0.000481855590931383),
+LPF_TAPS(0.000473623497580101),
+LPF_TAPS(0.000201748736780270),
+LPF_TAPS(-0.000176778770242168),
+LPF_TAPS(-0.000448860445790772),
+LPF_TAPS(-0.000465186561474686),
+LPF_TAPS(-0.000222068690791697),
+LPF_TAPS(0.000139582790075373),
+LPF_TAPS(0.000415816081895713),
+LPF_TAPS(0.000454587802221318),
+LPF_TAPS(0.000239356222381871),
+LPF_TAPS(-0.000104587315532687),
+LPF_TAPS(-0.000382932657815871),
+LPF_TAPS(-0.000442059651518030),
+LPF_TAPS(-0.000253736329520328),
+LPF_TAPS(0.000071842484152793),
+LPF_TAPS(0.000350404547166695),
+LPF_TAPS(0.000427830113880309),
+LPF_TAPS(0.000265343244988183),
+LPF_TAPS(-0.000041380876871214),
+LPF_TAPS(-0.000318410143859715),
+LPF_TAPS(-0.000412121667917977),
+LPF_TAPS(-0.000274319055291023),
+LPF_TAPS(0.000013218408751720),
+LPF_TAPS(0.000287111771048686),
+LPF_TAPS(0.000395150254398941),
+LPF_TAPS(0.000280812341324255),
+LPF_TAPS(0.000012644725282694),
+LPF_TAPS(-0.000256655690826361),
+LPF_TAPS(-0.000377124354571515),
+LPF_TAPS(-0.000284976848729387),
+LPF_TAPS(-0.000036223057728650),
+LPF_TAPS(0.000227172210999713),
+LPF_TAPS(0.000358244161402881),
+LPF_TAPS(0.000286970195424601),
+LPF_TAPS(0.000057544816948299),
+LPF_TAPS(-0.000198775884607860),
+LPF_TAPS(-0.000338700845583232),
+LPF_TAPS(-0.000286952623285186),
+LPF_TAPS(-0.000076650865007591),
+LPF_TAPS(0.000171565797249007),
+LPF_TAPS(0.000318675917350350),
+LPF_TAPS(0.000285085800395328),
+LPF_TAPS(0.000093593613118962),
+LPF_TAPS(-0.000145625936753519),
+LPF_TAPS(-0.000298340684414148),
+LPF_TAPS(-0.000281531679699815),
+LPF_TAPS(-0.000108435922812569),
+LPF_TAPS(0.000121025639279983),
+LPF_TAPS(0.000277855805510942),
+LPF_TAPS(0.000276451419258910),
+LPF_TAPS(0.000121250000801888),
+LPF_TAPS(-0.000097820105521335),
+LPF_TAPS(-0.000257370938398959),
+LPF_TAPS(-0.000270004368660097),
+LPF_TAPS(-0.000132116295283924),
+LPF_TAPS(0.000076050980390099),
+LPF_TAPS(0.000237024480424446),
+LPF_TAPS(0.000262347125473069),
+LPF_TAPS(0.000141122401127468),
+LPF_TAPS(-0.000055746989303841),
+LPF_TAPS(-0.000216943399147082),
+LPF_TAPS(-0.000253632664955913),
+LPF_TAPS(-0.000148361981060471),
+LPF_TAPS(0.000036924624014180),
+LPF_TAPS(0.000197243149918068),
+LPF_TAPS(0.000244009545538509),
+LPF_TAPS(0.000153933709573879),
+LPF_TAPS(-0.000019588870814477),
+LPF_TAPS(-0.000178027676757870),
+LPF_TAPS(-0.000233621191929532),
+LPF_TAPS(-0.000157940245821130),
+LPF_TAPS(0.000003733973919304),
+LPF_TAPS(0.000159389492386513),
+LPF_TAPS(0.000222605257022561),
+LPF_TAPS(0.000160487241315340),
+LPF_TAPS(0.000010655773168138),
+LPF_TAPS(-0.000141409832819944),
+LPF_TAPS(-0.000211093063120906),
+LPF_TAPS(-0.000161682387716431),
+LPF_TAPS(-0.000023605215399143),
+LPF_TAPS(0.000124158881563270),
+LPF_TAPS(0.000199209122364984),
+LPF_TAPS(0.000161634509463345),
+LPF_TAPS(0.000035147509988554),
+LPF_TAPS(-0.000107696058106567),
+LPF_TAPS(-0.000187070735635932),
+LPF_TAPS(-0.000160452705449426),
+LPF_TAPS(-0.000045323293046136),
+LPF_TAPS(0.000092070365163552),
+LPF_TAPS(0.000174787668629224),
+LPF_TAPS(0.000158245543366951),
+LPF_TAPS(0.000054179845537360),
+LPF_TAPS(-0.000077320788885710),
+LPF_TAPS(-0.000162461903246604),
+LPF_TAPS(-0.000155120309766295),
+LPF_TAPS(-0.000061770264784565),
+LPF_TAPS(0.000063476746136257),
+LPF_TAPS(0.000150187461947657),
+LPF_TAPS(0.000151182318291936),
+LPF_TAPS(0.000068152647381547),
+LPF_TAPS(-0.000050558572817687),
+LPF_TAPS(-0.000138050302236821),
+LPF_TAPS(-0.000146534277977078),
+LPF_TAPS(-0.000073389289019584),
+LPF_TAPS(0.000038578047211531),
+LPF_TAPS(0.000126128278040423),
+LPF_TAPS(0.000141275722906487),
+LPF_TAPS(0.000077545906315898),
+LPF_TAPS(-0.000027538942308942),
+LPF_TAPS(-0.000114491164353880),
+LPF_TAPS(-0.000135502503998360),
+LPF_TAPS(-0.000080690885301903),
+LPF_TAPS(0.000017437601182228),
+LPF_TAPS(0.000103200741212745),
+LPF_TAPS(0.000129306343115324),
+LPF_TAPS(0.000082894560772723),
+LPF_TAPS(-0.000008263529568140),
+LPF_TAPS(-0.000092310932764303),
+LPF_TAPS(-0.000122774449196541),
+LPF_TAPS(-0.000084228530228097),
+LPF_TAPS(0.000000000000000001),
+LPF_TAPS(0.000081867996989454),
+LPF_TAPS(0.000115989195611307),
+LPF_TAPS(0.000084765005651504),
+LPF_TAPS(0.000007375337964748),
+LPF_TAPS(-0.000071910761447583),
+LPF_TAPS(-0.000109027857473073),
+LPF_TAPS(-0.000084576205885109),
+LPF_TAPS(-0.000013889846627700),
+LPF_TAPS(0.000062470900289848),
+LPF_TAPS(0.000101962407224727),
+LPF_TAPS(0.000083733791868213),
+LPF_TAPS(0.000019575293067346),
+LPF_TAPS(-0.000053573247707659),
+LPF_TAPS(-0.000094859366413814),
+LPF_TAPS(-0.000082308346520089),
+LPF_TAPS(-0.000024467250702803),
+LPF_TAPS(0.000045236142951916),
+LPF_TAPS(0.000087779711222512),
+LPF_TAPS(0.000080368900569730),
+LPF_TAPS(0.000028604513776213),
+LPF_TAPS(-0.000037471802072892),
+LPF_TAPS(-0.000080778829003251),
+LPF_TAPS(-0.000077982505169364),
+LPF_TAPS(-0.000032028528666751),
+LPF_TAPS(0.000030286711588387),
+LPF_TAPS(0.000073906522798216),
+LPF_TAPS(0.000075213851679169),
+LPF_TAPS(0.000034782845571742),
+LPF_TAPS(-0.000023682039386360),
+LPF_TAPS(-0.000067207060590316),
+LPF_TAPS(-0.000072124938581478),
+LPF_TAPS(-0.000036912593701199),
+LPF_TAPS(0.000017654058304802),
+LPF_TAPS(0.000060719265845020),
+LPF_TAPS(0.000068774785077135),
+LPF_TAPS(0.000038463982734246),
+LPF_TAPS(-0.000012194578003053),
+LPF_TAPS(-0.000054476645756378),
+LPF_TAPS(-0.000065219190537468),
+LPF_TAPS(-0.000039483832884655),
+LPF_TAPS(0.000007291380941630),
+LPF_TAPS(0.000048507553506201),
+LPF_TAPS(0.000061510538634914),
+LPF_TAPS(0.000040019135521818),
+LPF_TAPS(-0.000002928658518456),
+LPF_TAPS(-0.000042835380781844),
+LPF_TAPS(-0.000057697644656153),
+LPF_TAPS(-0.000040116645897143),
+LPF_TAPS(-0.000000912556335678),
+LPF_TAPS(0.000037478776773538),
+LPF_TAPS(0.000053825644215059),
+LPF_TAPS(0.000039822509137849),
+LPF_TAPS(0.000004253963524157),
+LPF_TAPS(-0.000032451889885582),
+LPF_TAPS(-0.000049935921330255),
+LPF_TAPS(-0.000039181920293943),
+LPF_TAPS(-0.000007119580243999),
+LPF_TAPS(0.000027764628444526),
+LPF_TAPS(0.000046066073614426),
+LPF_TAPS(0.000038238818863166),
+LPF_TAPS(0.000009535338363085),
+LPF_TAPS(-0.000023422936769313),
+LPF_TAPS(-0.000042249912140231),
+LPF_TAPS(-0.000037035617875765),
+LPF_TAPS(-0.000011528697227208),
+LPF_TAPS(0.000019429083080919),
+LPF_TAPS(0.000038517493400618),
+LPF_TAPS(0.000035612967298774),
+LPF_TAPS(0.000013128274090703),
+LPF_TAPS(-0.000015781955869275),
+LPF_TAPS(-0.000034895180669362),
+LPF_TAPS(-0.000034009551220323),
+LPF_TAPS(-0.000014363494044602),
+LPF_TAPS(0.000012477365500132),
+LPF_TAPS(0.000031405731989841),
+LPF_TAPS(0.000032261918000294),
+LPF_TAPS(0.000015264260998860),
+LPF_TAPS(-0.000009508348030975),
+LPF_TAPS(-0.000028068411975450),
+LPF_TAPS(-0.000030404342325949),
+LPF_TAPS(-0.000015860650962998),
+LPF_TAPS(0.000006865468409934),
+LPF_TAPS(0.000024899124592205),
+LPF_TAPS(0.000028468717891133),
+LPF_TAPS(0.000016182628565960),
+LPF_TAPS(-0.000004537120451352),
+LPF_TAPS(-0.000021910564111253),
+LPF_TAPS(-0.000026484479226179),
+LPF_TAPS(-0.000016259787463952),
+LPF_TAPS(0.000002509821213062),
+LPF_TAPS(0.000019112381464281),
+LPF_TAPS(0.000024478551043080),
+LPF_TAPS(0.000016121115006902),
+LPF_TAPS(-0.000000768497640292),
+LPF_TAPS(-0.000016511363305968),
+LPF_TAPS(-0.000022475323326984),
+LPF_TAPS(-0.000015794781272331),
+LPF_TAPS(-0.000000703236414013),
+LPF_TAPS(0.000014111621182239),
+LPF_TAPS(0.000020496650300343),
+LPF_TAPS(0.000015307952332069),
+LPF_TAPS(0.000001922814435766),
+LPF_TAPS(-0.000011914788318634),
+LPF_TAPS(-0.000018561871309492),
+LPF_TAPS(-0.000014686627393690),
+LPF_TAPS(-0.000002908464160586),
+LPF_TAPS(0.000009920221676887),
+LPF_TAPS(0.000016687851634161),
+LPF_TAPS(0.000013955499256432),
+LPF_TAPS(0.000003678968304326),
+LPF_TAPS(-0.000008125207077045),
+LPF_TAPS(-0.000014889041197294),
+LPF_TAPS(-0.000013137837341611),
+LPF_TAPS(-0.000004253440033178),
+LPF_TAPS(0.000006525165344347),
+LPF_TAPS(0.000013177549153965),
+LPF_TAPS(0.000012255392400844),
+LPF_TAPS(0.000004651113866717),
+LPF_TAPS(-0.000005113857611770),
+LPF_TAPS(-0.000011563232362672),
+LPF_TAPS(-0.000011328321872127),
+LPF_TAPS(-0.000004891152491910),
+LPF_TAPS(0.000003883588087799),
+LPF_TAPS(0.000010053795787783),
+LPF_TAPS(0.000010375134744049),
+LPF_TAPS(0.000004992469763834),
+LPF_TAPS(-0.000002825402781922),
+LPF_TAPS(-0.000008654902946414),
+LPF_TAPS(-0.000009412654701919),
+LPF_TAPS(-0.000004973569981430),
+LPF_TAPS(0.000001929282864789),
+LPF_TAPS(0.000007370294594349),
+LPF_TAPS(0.000008456000265721),
+LPF_TAPS(0.000004852403355266),
+LPF_TAPS(-0.000001184331523467),
+LPF_TAPS(-0.000006201913941494),
+LPF_TAPS(-0.000007518580587867),
+LPF_TAPS(-0.000004646237430354),
+LPF_TAPS(0.000000578953352335),
+LPF_TAPS(0.000005150036795236),
+LPF_TAPS(0.000006612105557627),
+LPF_TAPS(0.000004371544091072),
+LPF_TAPS(-0.000000101025494664),
+LPF_TAPS(-0.000004213405147821),
+LPF_TAPS(-0.000005746608857426),
+LPF_TAPS(-0.000004043901657974),
+LPF_TAPS(-0.000000261940083240),
+LPF_TAPS(0.000003389362848789),
+LPF_TAPS(0.000004930482632690),
+LPF_TAPS(0.000003677911487767),
+LPF_TAPS(0.000000522643645981),
+LPF_TAPS(-0.000002673992133367),
+LPF_TAPS(-0.000004170522469635),
+LPF_TAPS(-0.000003287128408051),
+LPF_TAPS(-0.000000693854385419),
+LPF_TAPS(0.000002062249910138),
+LPF_TAPS(0.000003471981422733),
+LPF_TAPS(0.000002884004257187),
+LPF_TAPS(0.000000788276939661),
+LPF_TAPS(-0.000001548102844057),
+LPF_TAPS(-0.000002838631893487),
+LPF_TAPS(-0.000002479843756310),
+LPF_TAPS(-0.000000818427794343),
+LPF_TAPS(0.000001124660401793),
+LPF_TAPS(0.000002272834232693),
+LPF_TAPS(0.000002084771914283),
+LPF_TAPS(0.000000796521519526),
+LPF_TAPS(-0.000000784305153524),
+LPF_TAPS(-0.000001775611017371),
+LPF_TAPS(-0.000001707712156148),
+LPF_TAPS(-0.000000734366703963),
+LPF_TAPS(0.000000518819746823),
+LPF_TAPS(0.000001346726039086),
+LPF_TAPS(0.000001356374370310),
+LPF_TAPS(0.000000643271372107),
+LPF_TAPS(-0.000000319510082535),
+LPF_TAPS(-0.000000984767130185),
+LPF_TAPS(-0.000001037252087726),
+LPF_TAPS(-0.000000533957607898),
+LPF_TAPS(0.000000177324328124),
+LPF_TAPS(0.000000687232046705),
+LPF_TAPS(0.000000755628036388),
+LPF_TAPS(0.000000416485063055),
+LPF_TAPS(-0.000000082967499633),
+LPF_TAPS(-0.000000450616719176),
+LPF_TAPS(-0.000000515587354585),
+LPF_TAPS(-0.000000300182995740),
+LPF_TAPS(0.000000027011428177),
+LPF_TAPS(0.000000270505273607),
+LPF_TAPS(0.000000320037795188),
+LPF_TAPS(0.000000193590467381),
+LPF_TAPS(0.000000000000000000),
+LPF_TAPS(-0.000000141661312606),
+LPF_TAPS(-0.000000170736308622),
+LPF_TAPS(-0.000000104404320415),
+LPF_TAPS(-0.000000007450379918),
+LPF_TAPS(0.000000058120029422),
+LPF_TAPS(0.000000068321452499),
+LPF_TAPS(0.000000039434566462),
+LPF_TAPS(0.000000004555102241),
+LPF_TAPS(-0.000000013280804131),
+LPF_TAPS(-0.000000012351139235),
+LPF_TAPS(-0.000000004566831930),
+LPF_TAPS(-0.000000000270411184),
+LPF_TAPS(0.000000000000000000),
+};
diff --git a/core/sound/blip_lpf_96K.h b/core/sound/blip_lpf_96K.h
new file mode 100644
index 000000000..337bc7542
--- /dev/null
+++ b/core/sound/blip_lpf_96K.h
@@ -0,0 +1,6 @@
+/* 96K sampling, 2K cutoff, 3K transition */
+enum { blip_lpf_96K_taps = 149 };
+
+
+#include "blip_lpf_96K_24K.h"
+#include "blip_lpf_96K_48K.h"
diff --git a/core/sound/blip_lpf_96K_24K.h b/core/sound/blip_lpf_96K_24K.h
new file mode 100644
index 000000000..3bea654e0
--- /dev/null
+++ b/core/sound/blip_lpf_96K_24K.h
@@ -0,0 +1,151 @@
+static buf_t const blip_lpf_96K_24K[blip_lpf_96K_taps] = {
+LPF_TAPS(0.000000000000000000),
+LPF_TAPS(-0.000000701708496922),
+LPF_TAPS(0.000000000000000000),
+LPF_TAPS(0.000006526941230716),
+LPF_TAPS(0.000003086174321712),
+LPF_TAPS(-0.000017562355331373),
+LPF_TAPS(-0.000013983752058089),
+LPF_TAPS(0.000030897117874493),
+LPF_TAPS(0.000036845200332407),
+LPF_TAPS(-0.000041175536588245),
+LPF_TAPS(-0.000074255894369925),
+LPF_TAPS(0.000040812226421973),
+LPF_TAPS(0.000126146936811878),
+LPF_TAPS(-0.000020604771748354),
+LPF_TAPS(-0.000188724141316930),
+LPF_TAPS(-0.000029173032704737),
+LPF_TAPS(0.000253585610710458),
+LPF_TAPS(0.000117164314451904),
+LPF_TAPS(-0.000307253598820201),
+LPF_TAPS(-0.000248860398155740),
+LPF_TAPS(0.000331371187525320),
+LPF_TAPS(0.000424233064773930),
+LPF_TAPS(-0.000303794660088205),
+LPF_TAPS(-0.000635351123521239),
+LPF_TAPS(0.000200738385905457),
+LPF_TAPS(0.000864371546408451),
+LPF_TAPS(-0.000000000000000010),
+LPF_TAPS(-0.001082363393076616),
+LPF_TAPS(-0.000314879761646322),
+LPF_TAPS(0.001249428733550099),
+LPF_TAPS(0.000749864524294362),
+LPF_TAPS(-0.001316512932465652),
+LPF_TAPS(-0.001295608098165062),
+LPF_TAPS(0.001229142584712964),
+LPF_TAPS(0.001923257171696114),
+LPF_TAPS(-0.000933102744204027),
+LPF_TAPS(-0.002581621887633276),
+LPF_TAPS(0.000381790053630705),
+LPF_TAPS(0.003196436815514680),
+LPF_TAPS(0.000455308268491780),
+LPF_TAPS(-0.003672291924219871),
+LPF_TAPS(-0.001583812755983461),
+LPF_TAPS(0.003897558987902193),
+LPF_TAPS(0.002976302417062643),
+LPF_TAPS(-0.003752294656353574),
+LPF_TAPS(-0.004565839676857047),
+LPF_TAPS(0.003118705184201384),
+LPF_TAPS(0.006242078083372391),
+LPF_TAPS(-0.001893360144979369),
+LPF_TAPS(-0.007850564394344390),
+LPF_TAPS(0.000000000000000042),
+LPF_TAPS(0.009195349733646911),
+LPF_TAPS(0.002598450251324513),
+LPF_TAPS(-0.010044302454275438),
+LPF_TAPS(-0.005890127809141893),
+LPF_TAPS(0.010135492919056117),
+LPF_TAPS(0.009808104202461783),
+LPF_TAPS(-0.009181469455383524),
+LPF_TAPS(-0.014228963148724134),
+LPF_TAPS(0.006865511849241973),
+LPF_TAPS(0.018976718875527550),
+LPF_TAPS(-0.002818154096629675),
+LPF_TAPS(-0.023832149121100512),
+LPF_TAPS(-0.003452366427128846),
+LPF_TAPS(0.028547006304230925),
+LPF_TAPS(0.012745589635669397),
+LPF_TAPS(-0.032861984682323937),
+LPF_TAPS(-0.026695612427201355),
+LPF_TAPS(0.036526836527406958),
+LPF_TAPS(0.049580913855936638),
+LPF_TAPS(-0.039320712347764498),
+LPF_TAPS(-0.097376548791218737),
+LPF_TAPS(0.041070695496571295),
+LPF_TAPS(0.315353296251168147),
+LPF_TAPS(0.458332933341161874),
+LPF_TAPS(0.315353296251168147),
+LPF_TAPS(0.041070695496571302),
+LPF_TAPS(-0.097376548791218737),
+LPF_TAPS(-0.039320712347764505),
+LPF_TAPS(0.049580913855936638),
+LPF_TAPS(0.036526836527406958),
+LPF_TAPS(-0.026695612427201365),
+LPF_TAPS(-0.032861984682323937),
+LPF_TAPS(0.012745589635669397),
+LPF_TAPS(0.028547006304230925),
+LPF_TAPS(-0.003452366427128846),
+LPF_TAPS(-0.023832149121100522),
+LPF_TAPS(-0.002818154096629675),
+LPF_TAPS(0.018976718875527557),
+LPF_TAPS(0.006865511849241973),
+LPF_TAPS(-0.014228963148724134),
+LPF_TAPS(-0.009181469455383529),
+LPF_TAPS(0.009808104202461783),
+LPF_TAPS(0.010135492919056122),
+LPF_TAPS(-0.005890127809141894),
+LPF_TAPS(-0.010044302454275435),
+LPF_TAPS(0.002598450251324513),
+LPF_TAPS(0.009195349733646914),
+LPF_TAPS(0.000000000000000042),
+LPF_TAPS(-0.007850564394344388),
+LPF_TAPS(-0.001893360144979369),
+LPF_TAPS(0.006242078083372392),
+LPF_TAPS(0.003118705184201384),
+LPF_TAPS(-0.004565839676857049),
+LPF_TAPS(-0.003752294656353575),
+LPF_TAPS(0.002976302417062643),
+LPF_TAPS(0.003897558987902192),
+LPF_TAPS(-0.001583812755983463),
+LPF_TAPS(-0.003672291924219874),
+LPF_TAPS(0.000455308268491780),
+LPF_TAPS(0.003196436815514683),
+LPF_TAPS(0.000381790053630706),
+LPF_TAPS(-0.002581621887633277),
+LPF_TAPS(-0.000933102744204027),
+LPF_TAPS(0.001923257171696116),
+LPF_TAPS(0.001229142584712963),
+LPF_TAPS(-0.001295608098165061),
+LPF_TAPS(-0.001316512932465654),
+LPF_TAPS(0.000749864524294363),
+LPF_TAPS(0.001249428733550099),
+LPF_TAPS(-0.000314879761646322),
+LPF_TAPS(-0.001082363393076616),
+LPF_TAPS(-0.000000000000000010),
+LPF_TAPS(0.000864371546408451),
+LPF_TAPS(0.000200738385905457),
+LPF_TAPS(-0.000635351123521240),
+LPF_TAPS(-0.000303794660088205),
+LPF_TAPS(0.000424233064773931),
+LPF_TAPS(0.000331371187525320),
+LPF_TAPS(-0.000248860398155740),
+LPF_TAPS(-0.000307253598820201),
+LPF_TAPS(0.000117164314451904),
+LPF_TAPS(0.000253585610710458),
+LPF_TAPS(-0.000029173032704737),
+LPF_TAPS(-0.000188724141316931),
+LPF_TAPS(-0.000020604771748354),
+LPF_TAPS(0.000126146936811877),
+LPF_TAPS(0.000040812226421973),
+LPF_TAPS(-0.000074255894369925),
+LPF_TAPS(-0.000041175536588245),
+LPF_TAPS(0.000036845200332407),
+LPF_TAPS(0.000030897117874494),
+LPF_TAPS(-0.000013983752058089),
+LPF_TAPS(-0.000017562355331373),
+LPF_TAPS(0.000003086174321712),
+LPF_TAPS(0.000006526941230715),
+LPF_TAPS(0.000000000000000000),
+LPF_TAPS(-0.000000701708496923),
+LPF_TAPS(0.000000000000000000),
+};
diff --git a/core/sound/blip_lpf_96K_48K.h b/core/sound/blip_lpf_96K_48K.h
new file mode 100644
index 000000000..fbbd96fcb
--- /dev/null
+++ b/core/sound/blip_lpf_96K_48K.h
@@ -0,0 +1,151 @@
+static buf_t const blip_lpf_96K_48K[blip_lpf_96K_taps] = {
+LPF_TAPS(0.000000000000000000),
+LPF_TAPS(-0.000000092381758809),
+LPF_TAPS(0.000000000000000000),
+LPF_TAPS(0.000000859288883037),
+LPF_TAPS(-0.000003086177081482),
+LPF_TAPS(0.000007274572270650),
+LPF_TAPS(-0.000013983764562867),
+LPF_TAPS(0.000023708213596591),
+LPF_TAPS(-0.000036845233280721),
+LPF_TAPS(0.000053661052007767),
+LPF_TAPS(-0.000074255960772238),
+LPF_TAPS(0.000098529518647157),
+LPF_TAPS(-0.000126147049617042),
+LPF_TAPS(0.000156508919705138),
+LPF_TAPS(-0.000188724310080899),
+LPF_TAPS(0.000221591381302565),
+LPF_TAPS(-0.000253585837475903),
+LPF_TAPS(0.000282859929919310),
+LPF_TAPS(-0.000307253873577503),
+LPF_TAPS(0.000324321475191690),
+LPF_TAPS(-0.000331371483849456),
+LPF_TAPS(0.000325525770890753),
+LPF_TAPS(-0.000303794931752394),
+LPF_TAPS(0.000263171287568576),
+LPF_TAPS(-0.000200738565412977),
+LPF_TAPS(0.000113796774689262),
+LPF_TAPS(-0.000000000000000012),
+LPF_TAPS(-0.000142495971420656),
+LPF_TAPS(0.000314880043223212),
+LPF_TAPS(-0.000517530789449474),
+LPF_TAPS(0.000749865194850437),
+LPF_TAPS(-0.001010196806458020),
+LPF_TAPS(0.001295609256744784),
+LPF_TAPS(-0.001601851235669701),
+LPF_TAPS(0.001923258891542412),
+LPF_TAPS(-0.002252711314599227),
+LPF_TAPS(0.002581624196213172),
+LPF_TAPS(-0.002899985963333183),
+LPF_TAPS(0.003196439673884358),
+LPF_TAPS(-0.003458412745589792),
+LPF_TAPS(0.003672295208116436),
+LPF_TAPS(-0.003823665655012165),
+LPF_TAPS(0.003897562473240722),
+LPF_TAPS(-0.003878796295721843),
+LPF_TAPS(0.003752298011791477),
+LPF_TAPS(-0.003503495139787102),
+LPF_TAPS(0.003118707973060552),
+LPF_TAPS(-0.002585555711620335),
+LPF_TAPS(0.001893361838090584),
+LPF_TAPS(-0.001033547334220734),
+LPF_TAPS(0.000000000000000055),
+LPF_TAPS(0.001210591841178303),
+LPF_TAPS(-0.002598452574953052),
+LPF_TAPS(0.004160490021595888),
+LPF_TAPS(-0.005890133076307769),
+LPF_TAPS(0.007777244207948916),
+LPF_TAPS(-0.009808112973224117),
+LPF_TAPS(0.011965534654227609),
+LPF_TAPS(-0.014228975872778828),
+LPF_TAPS(0.016574826640870784),
+LPF_TAPS(-0.018976735845197538),
+LPF_TAPS(0.021406024711794043),
+LPF_TAPS(-0.023832170432672221),
+LPF_TAPS(0.026223349937347668),
+LPF_TAPS(-0.028547031831998824),
+LPF_TAPS(0.030770602875039004),
+LPF_TAPS(-0.032862014068701928),
+LPF_TAPS(0.034790430569500291),
+LPF_TAPS(-0.036526869191028370),
+LPF_TAPS(0.038044807311335589),
+LPF_TAPS(-0.039320747509770888),
+LPF_TAPS(0.040334723235147786),
+LPF_TAPS(-0.041070732223476049),
+LPF_TAPS(0.041517086199934598),
+LPF_TAPS(0.958333353961726031),
+LPF_TAPS(0.041517086199934598),
+LPF_TAPS(-0.041070732223476056),
+LPF_TAPS(0.040334723235147786),
+LPF_TAPS(-0.039320747509770895),
+LPF_TAPS(0.038044807311335589),
+LPF_TAPS(-0.036526869191028370),
+LPF_TAPS(0.034790430569500298),
+LPF_TAPS(-0.032862014068701928),
+LPF_TAPS(0.030770602875039004),
+LPF_TAPS(-0.028547031831998824),
+LPF_TAPS(0.026223349937347668),
+LPF_TAPS(-0.023832170432672228),
+LPF_TAPS(0.021406024711794047),
+LPF_TAPS(-0.018976735845197549),
+LPF_TAPS(0.016574826640870784),
+LPF_TAPS(-0.014228975872778828),
+LPF_TAPS(0.011965534654227615),
+LPF_TAPS(-0.009808112973224117),
+LPF_TAPS(0.007777244207948919),
+LPF_TAPS(-0.005890133076307770),
+LPF_TAPS(0.004160490021595888),
+LPF_TAPS(-0.002598452574953052),
+LPF_TAPS(0.001210591841178303),
+LPF_TAPS(0.000000000000000055),
+LPF_TAPS(-0.001033547334220734),
+LPF_TAPS(0.001893361838090585),
+LPF_TAPS(-0.002585555711620336),
+LPF_TAPS(0.003118707973060552),
+LPF_TAPS(-0.003503495139787103),
+LPF_TAPS(0.003752298011791478),
+LPF_TAPS(-0.003878796295721843),
+LPF_TAPS(0.003897562473240721),
+LPF_TAPS(-0.003823665655012169),
+LPF_TAPS(0.003672295208116439),
+LPF_TAPS(-0.003458412745589795),
+LPF_TAPS(0.003196439673884361),
+LPF_TAPS(-0.002899985963333184),
+LPF_TAPS(0.002581624196213173),
+LPF_TAPS(-0.002252711314599227),
+LPF_TAPS(0.001923258891542414),
+LPF_TAPS(-0.001601851235669700),
+LPF_TAPS(0.001295609256744783),
+LPF_TAPS(-0.001010196806458021),
+LPF_TAPS(0.000749865194850438),
+LPF_TAPS(-0.000517530789449474),
+LPF_TAPS(0.000314880043223212),
+LPF_TAPS(-0.000142495971420657),
+LPF_TAPS(-0.000000000000000012),
+LPF_TAPS(0.000113796774689262),
+LPF_TAPS(-0.000200738565412977),
+LPF_TAPS(0.000263171287568577),
+LPF_TAPS(-0.000303794931752394),
+LPF_TAPS(0.000325525770890754),
+LPF_TAPS(-0.000331371483849456),
+LPF_TAPS(0.000324321475191690),
+LPF_TAPS(-0.000307253873577503),
+LPF_TAPS(0.000282859929919310),
+LPF_TAPS(-0.000253585837475903),
+LPF_TAPS(0.000221591381302565),
+LPF_TAPS(-0.000188724310080900),
+LPF_TAPS(0.000156508919705138),
+LPF_TAPS(-0.000126147049617042),
+LPF_TAPS(0.000098529518647157),
+LPF_TAPS(-0.000074255960772238),
+LPF_TAPS(0.000053661052007767),
+LPF_TAPS(-0.000036845233280721),
+LPF_TAPS(0.000023708213596591),
+LPF_TAPS(-0.000013983764562867),
+LPF_TAPS(0.000007274572270650),
+LPF_TAPS(-0.000003086177081482),
+LPF_TAPS(0.000000859288883036),
+LPF_TAPS(0.000000000000000000),
+LPF_TAPS(-0.000000092381758809),
+LPF_TAPS(0.000000000000000000),
+};
diff --git a/core/sound/opll.c b/core/sound/opll.c
index 260f56608..5ccd217bc 100644
--- a/core/sound/opll.c
+++ b/core/sound/opll.c
@@ -1,6 +1,6 @@
#ifdef HAVE_OPLL_CORE
/*
- * Copyright (C) 2019 Nuke.YKT
+ * Copyright (C) 2019-2023 Nuke.YKT
*
* Redistribution and use of this code or any derivative works are permitted
* provided that the following conditions are met:
@@ -38,7 +38,7 @@
* siliconpr0n.org(digshadow, John McMaster):
* VRC VII decap and die shot.
*
- * version: 1.0
+ * version: 1.0.2
*/
#include
@@ -153,7 +153,7 @@ static const opll_patch_t patch_ds1001[opll_patch_max] = {
{ 0x00, 0x00, 0x00, 0x00,{ 0x00, 0x00 },{ 0x00, 0x00 },{ 0x00, 0x00 },{ 0x00, 0x00 },{ 0x01, 0x00 },{ 0x00, 0x00 },{ 0x0c, 0x00 },{ 0x08, 0x00 },{ 0x0a, 0x00 },{ 0x07, 0x00 } },
{ 0x00, 0x00, 0x00, 0x00,{ 0x00, 0x00 },{ 0x00, 0x00 },{ 0x00, 0x00 },{ 0x00, 0x00 },{ 0x05, 0x00 },{ 0x00, 0x00 },{ 0x0f, 0x00 },{ 0x08, 0x00 },{ 0x05, 0x00 },{ 0x09, 0x00 } },
{ 0x00, 0x00, 0x00, 0x00,{ 0x00, 0x00 },{ 0x00, 0x00 },{ 0x00, 0x00 },{ 0x00, 0x00 },{ 0x00, 0x01 },{ 0x00, 0x00 },{ 0x00, 0x0f },{ 0x00, 0x08 },{ 0x00, 0x06 },{ 0x00, 0x0d } },
- { 0x00, 0x00, 0x00, 0x00,{ 0x00, 0x00 },{ 0x00, 0x00 },{ 0x00, 0x00 },{ 0x00, 0x00 },{ 0x00, 0x01 },{ 0x00, 0x00 },{ 0x00, 0x0d },{ 0x00, 0x08 },{ 0x00, 0x06 },{ 0x00, 0x08 } },
+ { 0x00, 0x00, 0x00, 0x00,{ 0x00, 0x00 },{ 0x00, 0x00 },{ 0x00, 0x00 },{ 0x00, 0x00 },{ 0x00, 0x01 },{ 0x00, 0x00 },{ 0x00, 0x0d },{ 0x00, 0x08 },{ 0x00, 0x04 },{ 0x00, 0x08 } },
{ 0x00, 0x00, 0x00, 0x00,{ 0x00, 0x00 },{ 0x00, 0x00 },{ 0x00, 0x00 },{ 0x00, 0x00 },{ 0x00, 0x01 },{ 0x00, 0x00 },{ 0x00, 0x0a },{ 0x00, 0x0a },{ 0x00, 0x05 },{ 0x00, 0x05 } }
};
@@ -417,8 +417,8 @@ void OPLL_PreparePatch2(opll_t *chip) {
void OPLL_PhaseGenerate(opll_t *chip) {
uint32_t ismod;
uint32_t phase;
- uint8_t rm_bit;
uint16_t pg_out;
+ uint8_t rm_bit;
chip->pg_phase[(chip->cycles + 17) % 18] = chip->pg_phase_next + chip->pg_inc;
@@ -953,6 +953,9 @@ void OPLL_Operator(opll_t *chip) {
}
}
+ if (!(chip->rm_enable & 0x80))
+ routput = 0;
+
chip->ch_out = ismod1 ? routput : (output>>3);
}
diff --git a/core/sound/sound.c b/core/sound/sound.c
index 40c2bbddb..1b209557b 100644
--- a/core/sound/sound.c
+++ b/core/sound/sound.c
@@ -239,7 +239,7 @@ static void OPLL2413_Update(int* buffer, int length)
int i, j;
for (i = 0; i < length; i++)
{
- OPLL_Clock(&opll, opll_accm[opll_cycles]);
+ OPLL_Clock(&opll, (int32_t *)opll_accm[opll_cycles]);
opll_cycles = (opll_cycles + 1) % 18;
if (opll_cycles == 0)
{
diff --git a/core/sound/ym2413.c b/core/sound/ym2413.c
index 82bc43cf3..edef50e53 100644
--- a/core/sound/ym2413.c
+++ b/core/sound/ym2413.c
@@ -1183,7 +1183,7 @@ static int init_tables(void)
n = n>>1;
/* waveform 0: standard sinus */
- sin_tab[ i ] = n*2 + (m>=0.0? 0: 1 );
+ sin_tab[ i ] = n*2 + ((m>=0.0)? 0: 1 );
/* waveform 1: __ __ */
/* / \____/ \____*/
diff --git a/core/sound/ym2612.c b/core/sound/ym2612.c
index 3cba674ca..fc55e2c19 100644
--- a/core/sound/ym2612.c
+++ b/core/sound/ym2612.c
@@ -1843,7 +1843,7 @@ static void init_tables(void)
n = n>>1;
/* 13-bits (8.5) value is formatted for above 'Power' table */
- sin_tab[ i ] = n*2 + (m>=0.0? 0: 1 );
+ sin_tab[ i ] = n*2 + ((m>=0.0)? 0: 1 );
}
/* build LFO PM modulation table */
diff --git a/core/sound/ym3438.c b/core/sound/ym3438.c
index d2debad7a..9ecc45477 100644
--- a/core/sound/ym3438.c
+++ b/core/sound/ym3438.c
@@ -983,6 +983,36 @@ static void OPN2_ChOutput(ym3438_t *chip)
chip->mol = 0;
chip->mor = 0;
+#if 1
+/* https://jsgroth.dev/blog/posts/sega-cd-pcm-interpolation/ */
+ {
+ static Bit16s ym[6][6] = {0,0,0,0,0,0}; /* hermite 6p */
+ float x = 0; /* fractional pitch */
+ float c0,c1,c2,c3;
+ int ch = 0; //chip->channel;
+ int out_ex;
+
+ ym[ch][0] = ym[ch][1];
+ ym[ch][1] = ym[ch][2];
+ ym[ch][2] = ym[ch][3];
+ ym[ch][3] = ym[ch][4];
+ ym[ch][4] = ym[ch][5];
+ ym[ch][5] = out;
+
+ c0 = ym[ch][2];
+ c1 = 1.0/12.0 * (ym[ch][0] - ym[ch][4]) + 2.0/3.0 * (ym[ch][3] - ym[ch][1]);
+ c2 = 5.0/4.0 * ym[ch][1] - 7/3 * ym[ch][2] + 5.0/3.0 * ym[ch][3] - 1.0/2.0 * ym[ch][4] + 1.0/12.0 * ym[ch][5] - 1.0/6.0 * ym[ch][0];
+ c3 = 1.0/12.0 * (ym[ch][0] - ym[ch][5]) + 7.0/12.0 * (ym[ch][4] - ym[ch][1]) + 4.0/3.0 * (ym[ch][2] - ym[ch][3]);
+
+ out_ex = (Bit16s) (((c3 * x + c2) * x + c1) * x + c0);
+ if (out_ex > 32767)
+ out_ex = 32767;
+ else if(out_ex < -32768)
+ out_ex = -32768;
+ out = (Bit16s) out_ex;
+ }
+#endif
+
if (chip_type & ym3438_mode_ym2612)
{
out_en = ((cycles & 3) == 3) || test_dac;
diff --git a/core/state.h b/core/state.h
index 7f6e46b58..9cb5af5b6 100644
--- a/core/state.h
+++ b/core/state.h
@@ -39,7 +39,8 @@
#ifndef _STATE_H_
#define _STATE_H_
-#define STATE_SIZE 0xfd000
+//#define STATE_SIZE 0x120000
+#define STATE_SIZE 0x200000
#define STATE_VERSION "GENPLUS-GX 1.7.6"
#define load_param(param, size) \
diff --git a/core/system.c b/core/system.c
index 17491b628..9da3e3f96 100644
--- a/core/system.c
+++ b/core/system.c
@@ -42,8 +42,6 @@
#include "shared.h"
#include "eq.h"
-extern int8 audio_hard_disable;
-
/* Global variables */
t_bitmap bitmap;
t_snd snd;
@@ -89,6 +87,14 @@ int audio_init(int samplerate, double framerate)
}
}
+ /* Cart sound */
+ snd.blips[3] = blip_new(samplerate / 10);
+ if (!snd.blips[3])
+ {
+ audio_shutdown();
+ return -1;
+ }
+
/* Initialize resampler internal rates */
audio_set_rate(samplerate, framerate);
@@ -145,6 +151,8 @@ void audio_set_rate(int samplerate, double framerate)
cdd_init(samplerate);
}
+ blip_set_rates(snd.blips[3], 48000, samplerate);
+
/* Reinitialize internal rates */
snd.sample_rate = samplerate;
snd.frame_rate = framerate;
@@ -155,7 +163,7 @@ void audio_reset(void)
int i;
/* Clear blip buffers */
- for (i=0; i<3; i++)
+ for (i=0; i<4; i++)
{
if (snd.blips[i])
{
@@ -185,12 +193,11 @@ void audio_shutdown(void)
int i;
/* Delete blip buffers */
- for (i=0; i<3; i++)
+ for (i=0; i<4; i++)
{
- blip_delete(snd.blips[i]);
+ if (snd.blips[i])
+ blip_delete(snd.blips[i]);
snd.blips[i] = 0;
- blip_delete_buffer_state(snd.blip_states[i]);
- snd.blip_states[i] = 0;
}
}
@@ -199,8 +206,22 @@ int audio_update(int16 *buffer)
/* run sound chips until end of frame */
int size = sound_update(mcycles_vdp);
+ if (cart.special & HW_PAPRIUM)
+ {
+ extern void paprium_audio(int samples);
+ paprium_audio(size);
+
+#ifdef ALIGN_SND
+ /* return an aligned number of samples if required */
+ size &= ALIGN_SND;
+#endif
+
+ /* resample & mix FM/PSG, PCM & Cart streams to output buffer */
+ blip_mix_samples_2(snd.blips[0], snd.blips[3], buffer, size);
+ }
+
/* Mega CD sound hardware enabled ? */
- if (snd.blips[1] && snd.blips[2])
+ else if (snd.blips[1] && snd.blips[2])
{
/* sync PCM chip with other sound chips */
pcm_update(size);
@@ -213,14 +234,6 @@ int audio_update(int16 *buffer)
size &= ALIGN_SND;
#endif
- if (audio_hard_disable)
- {
- blip_discard_samples_dirty(snd.blips[0], size);
- blip_discard_samples_dirty(snd.blips[1], size);
- blip_discard_samples_dirty(snd.blips[2], size);
- return 0;
- }
-
/* resample & mix FM/PSG, PCM & CD-DA streams to output buffer */
blip_mix_samples(snd.blips[0], snd.blips[1], snd.blips[2], buffer, size);
}
@@ -231,12 +244,6 @@ int audio_update(int16 *buffer)
size &= ALIGN_SND;
#endif
- if (audio_hard_disable)
- {
- blip_discard_samples_dirty(snd.blips[0], size);
- return 0;
- }
-
/* resample FM/PSG mixed stream to output buffer */
blip_read_samples(snd.blips[0], buffer, size);
}
diff --git a/core/system.h b/core/system.h
index 5857f838e..633c4c678 100644
--- a/core/system.h
+++ b/core/system.h
@@ -92,8 +92,8 @@ typedef struct
int sample_rate; /* Output Sample rate (8000-48000) */
double frame_rate; /* Output Frame rate (usually 50 or 60 frames per second) */
int enabled; /* 1= sound emulation is enabled */
- blip_t* blips[3]; /* Blip Buffer resampling (stereo) */
- blip_buffer_state_t *blip_states[3]; /* states for suspending and restoring the sound buffer */
+ blip_t* blips[4]; /* Blip Buffer resampling (stereo) */
+ blip_buffer_state_t *blip_states[4]; /* states for suspending and restoring the sound buffer */
int fm_last_save[2]; /* For saving and restoring the sound buffer */
int16 cd_last_save[2]; /* For saving and restoring the sound buffer */
} t_snd;
diff --git a/core/vdp_ctrl.c b/core/vdp_ctrl.c
index b09880d29..9d01d4981 100644
--- a/core/vdp_ctrl.c
+++ b/core/vdp_ctrl.c
@@ -42,10 +42,23 @@
#include "shared.h"
#include "hvc.h"
+#if 0
+#include
+#include
+#endif
+
+//#define DEBUG_DMA
+//#define DEBUG_VDP
+
+extern retro_log_printf_t log_cb;
+static int debug_dma;
+static int debug_dma_once;
+
extern int8 reset_do_not_clear_buffers;
static int8 do_not_invalidate_tile_cache;
static void vdp_set_all_vram(const uint8 *src);
+ static char error_str[512];
/* Mark a pattern as modified */
#define MARK_BG_DIRTY(addr) \
@@ -689,8 +702,19 @@ void vdp_dma_update(unsigned int cycles)
error("[%d(%d)][%d(%d)] DMA type %d (%d access/line)(%d cycles left)-> %d access (%d remaining) (%x)\n", v_counter, (v_counter + (cycles - mcycles_vdp)/MCYCLES_PER_LINE)%lines_per_frame, cycles, cycles%MCYCLES_PER_LINE,dma_type, rate, dma_cycles, dma_bytes, dma_length, m68k_get_reg(M68K_REG_PC));
#endif
+#if 0
+static char error_str[512];
+sprintf(error_str, "[%d(%d)][%d(%d)] DMA type %d (%d access/line)(%d cycles left)-> %d access (%d remaining) (%x)\n", v_counter, (v_counter + (cycles - mcycles_vdp)/MCYCLES_PER_LINE)%lines_per_frame, cycles, cycles%MCYCLES_PER_LINE,dma_type, rate, dma_cycles, dma_bytes, dma_length, m68k_get_reg(M68K_REG_PC));
+log_cb(RETRO_LOG_ERROR, error_str);
+#endif
+
/* Check if DMA can be finished within current timeframe */
- if (dma_length < dma_bytes)
+ extern int fast_dma_hack;
+ if( fast_dma_hack ) {
+ dma_bytes = dma_length;
+ dma_cycles = (1 * MCYCLES_PER_LINE) / rate;
+ }
+ else if (dma_length < dma_bytes)
{
/* Adjust remaining DMA bytes */
dma_bytes = dma_length;
@@ -740,6 +764,8 @@ void vdp_dma_update(unsigned int cycles)
/* Check if DMA is finished */
if (!dma_length)
{
+ debug_dma = 0;
+
/* DMA source address registers are incremented during DMA (even DMA Fill) */
uint16 end = reg[21] + (reg[22] << 8) + reg[19] + (reg[20] << 8);
reg[21] = end & 0xff;
@@ -1222,6 +1248,55 @@ unsigned int vdp_68k_ctrl_r(unsigned int cycles)
{
unsigned int temp;
+#if 0
+ static int debug_dump = 0;
+
+ if( GetAsyncKeyState(VK_OEM_PERIOD) ) {
+ if( debug_dump == 0 ) {
+ FILE *fp = fopen("vram.bin","wb");
+ int lcv;
+ if(fp) {
+ debug_dump = 1;
+ for( lcv = 0; lcv < 0x10000; lcv += 2 ) {
+ fwrite(vram + lcv + 1, 1, 1, fp);
+ fwrite(vram + lcv + 0, 1, 1, fp);
+ }
+ fclose(fp);
+ }
+
+ fp = fopen("ram.bin","wb");
+ if(fp) {
+ debug_dump = 1;
+ for( lcv = 0; lcv < 0x10000; lcv += 2 ) {
+ fwrite(m68k.memory_map[0xff].base + lcv + 1, 1, 1, fp);
+ fwrite(m68k.memory_map[0xff].base + lcv + 0, 1, 1, fp);
+ }
+ fclose(fp);
+ }
+
+ fp = fopen("stm32.bin","wb");
+ if(fp) {
+ debug_dump = 1;
+ for( lcv = 0; lcv < 0x10000; lcv += 2 ) {
+ fwrite(m68k.memory_map[0x00].base + lcv + 1, 1, 1, fp);
+ fwrite(m68k.memory_map[0x00].base + lcv + 0, 1, 1, fp);
+ }
+ fclose(fp);
+ }
+
+ fp = fopen("z80.bin","wb");
+ if(fp) {
+ debug_dump = 1;
+ fwrite(zram, 1, 0x2000, fp);
+ fclose(fp);
+ }
+ }
+ }
+ else {
+ debug_dump = 0;
+ }
+#endif
+
/* Cycle-accurate VDP status read (adjust CPU time with current instruction execution time) */
cycles += m68k_cycles();
@@ -1288,6 +1363,13 @@ unsigned int vdp_68k_ctrl_r(unsigned int cycles)
#ifdef LOGVDP
error("[%d(%d)][%d(%d)] VDP 68k status read -> 0x%x (0x%x) (%x)\n", v_counter, (v_counter + cycles/MCYCLES_PER_LINE)%lines_per_frame, cycles + mcycles_vdp, cycles%MCYCLES_PER_LINE, temp, status, m68k_get_reg(M68K_REG_PC));
#endif
+
+#ifdef VDP_DEBUG
+ static char error_str[512];
+ sprintf(error_str, "[%d(%d)][%d(%d)] VDP 68k status read -> 0x%x (0x%x) (%x)\n", v_counter, (v_counter + cycles/MCYCLES_PER_LINE)%lines_per_frame, cycles + mcycles_vdp, cycles%MCYCLES_PER_LINE, temp, status, m68k_get_reg(M68K_REG_PC));
+ log_cb(RETRO_LOG_ERROR, error_str);
+#endif
+
return (temp);
}
@@ -1398,6 +1480,7 @@ unsigned int vdp_z80_ctrl_r(unsigned int cycles)
#ifdef LOGVDP
error("[%d(%d)][%d(%d)] VDP Z80 status read -> 0x%x (0x%x) (%x)\n", v_counter, (v_counter + (cycles - mcycles_vdp)/MCYCLES_PER_LINE)%lines_per_frame, cycles, cycles%MCYCLES_PER_LINE, temp, status, Z80.pc.w.l);
#endif
+
return (temp);
}
@@ -1537,6 +1620,12 @@ static void vdp_reg_w(unsigned int r, unsigned int d, unsigned int cycles)
error("[%d(%d)][%d(%d)] VDP register %d write -> 0x%x (%x)\n", v_counter, (v_counter + (cycles - mcycles_vdp)/MCYCLES_PER_LINE)%lines_per_frame, cycles, cycles%MCYCLES_PER_LINE, r, d, m68k_get_reg(M68K_REG_PC));
#endif
+#ifdef DEBUG_VDP
+ static char error_str[512];
+ sprintf(error_str, "[%d(%d)][%d(%d)] VDP register %d write -> 0x%x (%x)\n", v_counter, (v_counter + (cycles - mcycles_vdp)/MCYCLES_PER_LINE)%lines_per_frame, cycles, cycles%MCYCLES_PER_LINE, r, d, m68k_get_reg(M68K_REG_PC));
+ log_cb(RETRO_LOG_ERROR, error_str);
+#endif
+
/* VDP registers #11 to #23 cannot be updated in Mode 4 (Captain Planet & Avengers, Bass Master Classic Pro Edition) */
if (!(reg[1] & 4) && (r > 10))
{
@@ -2160,6 +2249,35 @@ static void vdp_bus_w(unsigned int data)
/* increment FIFO write pointer */
fifo_idx = (fifo_idx + 1) & 3;
+
+ if( debug_dma == 1 ) {
+ int test = ((reg[23] & 0x7f) << 16) + reg[21] + (reg[22] << 8);
+ test *= 2;
+
+ debug_dma_once = 1;
+ debug_dma = 2;
+
+#ifdef DEBUG_DMA
+ sprintf(error_str, "[%d] DMA %02X:%04X ==>", v_counter, (test>>16) & 0xff, test & 0xffff);
+
+ if( code & 0x04 ) {
+ sprintf(error_str, "%s VSRAM", error_str);
+ }
+ else if( code & 0x02 ) {
+ sprintf(error_str, "%s CRAM", error_str);
+ }
+ else {
+ sprintf(error_str, "%s VRAM", error_str);
+ }
+
+ sprintf(error_str, "%s %04X @ %04X len\n", error_str, addr, (reg[19] + (reg[20] << 8)) * 2);
+ log_cb(RETRO_LOG_ERROR, error_str);
+#endif
+
+ //if(addr == 0xc800) memset(vram + 0xc000, 0xAA, 0x400);
+ }
+
+
/* Check destination code (CD0-CD3) */
switch (code & 0x0F)
{
@@ -2204,6 +2322,19 @@ static void vdp_bus_w(unsigned int data)
#ifdef LOGVDP
error("[%d(%d)][%d(%d)] VRAM 0x%x write -> 0x%x (%x)\n", v_counter, (v_counter + (m68k.cycles - mcycles_vdp)/MCYCLES_PER_LINE)%lines_per_frame, m68k.cycles, m68k.cycles%MCYCLES_PER_LINE, addr, data, m68k_get_reg(M68K_REG_PC));
#endif
+
+#ifdef DEBUG_VDP
+ {
+ static int once = 0;
+ if (data != 0) once = 1;
+ if (!debug_dma && debug_dma_once && once) {
+ //if (once) {
+ sprintf(error_str, "[%d(%d)][%d(%d)] VRAM 0x%x write -> 0x%x (%x)\n", v_counter, (v_counter + (m68k.cycles - mcycles_vdp)/MCYCLES_PER_LINE)%lines_per_frame, m68k.cycles, m68k.cycles%MCYCLES_PER_LINE, addr, data, m68k_get_reg(M68K_REG_PC));
+ log_cb(RETRO_LOG_ERROR, error_str);
+ }
+ }
+#endif
+
break;
}
@@ -2253,6 +2384,17 @@ static void vdp_bus_w(unsigned int data)
#ifdef LOGVDP
error("[%d(%d)][%d(%d)] CRAM 0x%x write -> 0x%x (%x)\n", v_counter, (v_counter + (m68k.cycles - mcycles_vdp)/MCYCLES_PER_LINE)%lines_per_frame, m68k.cycles, m68k.cycles%MCYCLES_PER_LINE, addr, data, m68k_get_reg(M68K_REG_PC));
#endif
+
+#ifdef DEBUG_VDP
+ {
+ static int once = 0;
+ if (data != 0) once = 1;
+ if (!debug_dma && debug_dma_once && once) {
+ sprintf(error_str, "[%d(%d)][%d(%d)] CRAM 0x%x write -> 0x%x (%x)\n", v_counter, (v_counter + (m68k.cycles - mcycles_vdp)/MCYCLES_PER_LINE)%lines_per_frame, m68k.cycles, m68k.cycles%MCYCLES_PER_LINE, addr, data, m68k_get_reg(M68K_REG_PC));
+ log_cb(RETRO_LOG_ERROR, error_str);
+ }
+ }
+#endif
break;
}
@@ -2279,6 +2421,17 @@ static void vdp_bus_w(unsigned int data)
#ifdef LOGVDP
error("[%d(%d)][%d(%d)] VSRAM 0x%x write -> 0x%x (%x)\n", v_counter, (v_counter + (m68k.cycles - mcycles_vdp)/MCYCLES_PER_LINE)%lines_per_frame, m68k.cycles, m68k.cycles%MCYCLES_PER_LINE, addr, data, m68k_get_reg(M68K_REG_PC));
#endif
+
+#ifdef DEBUG_VDP
+ {
+ static int once = 0;
+ if (data != 0) once = 1;
+ if (!debug_dma && debug_dma_once && once) {
+ sprintf(error_str, "[%d(%d)][%d(%d)] VSRAM 0x%x write -> 0x%x (%x)\n", v_counter, (v_counter + (m68k.cycles - mcycles_vdp)/MCYCLES_PER_LINE)%lines_per_frame, m68k.cycles, m68k.cycles%MCYCLES_PER_LINE, addr, data, m68k_get_reg(M68K_REG_PC));
+ log_cb(RETRO_LOG_ERROR, error_str);
+ }
+ }
+#endif
break;
}
@@ -2287,6 +2440,10 @@ static void vdp_bus_w(unsigned int data)
#ifdef LOGERROR
error("[%d(%d)][%d(%d)] Invalid (%d) 0x%x write -> 0x%x (%x)\n", v_counter, (v_counter + (m68k.cycles - mcycles_vdp)/MCYCLES_PER_LINE)%lines_per_frame, m68k.cycles, m68k.cycles%MCYCLES_PER_LINE, code, addr, data, m68k_get_reg(M68K_REG_PC));
#endif
+
+ sprintf(error_str, "[%d(%d)][%d(%d)] Invalid (%d) 0x%x write -> 0x%x (%x)\n", v_counter, (v_counter + (m68k.cycles - mcycles_vdp)/MCYCLES_PER_LINE)%lines_per_frame, m68k.cycles, m68k.cycles%MCYCLES_PER_LINE, code, addr, data, m68k_get_reg(M68K_REG_PC));
+ log_cb(RETRO_LOG_ERROR, error_str);
+
break;
}
}
@@ -3014,6 +3171,8 @@ static void vdp_dma_68k_ext(unsigned int length)
/* 68k bus source address */
uint32 source = (reg[23] << 17) | (dma_src << 1);
+ if( debug_dma == 0 ) debug_dma = 1;
+
do
{
/* Read data word from 68k bus */
@@ -3049,6 +3208,8 @@ static void vdp_dma_68k_ram(unsigned int length)
/* 68k bus source address */
uint32 source = (reg[23] << 17) | (dma_src << 1);
+ if( debug_dma == 0 ) debug_dma = 1;
+
do
{
/* access Work-RAM by default */
@@ -3077,6 +3238,8 @@ static void vdp_dma_68k_io(unsigned int length)
/* 68k bus source address */
uint32 source = (reg[23] << 17) | (dma_src << 1);
+ if( debug_dma == 0 ) debug_dma = 1;
+
do
{
/* Z80 area */
@@ -3120,6 +3283,8 @@ static void vdp_dma_68k_io(unsigned int length)
/* VRAM Copy */
static void vdp_dma_copy(unsigned int length)
{
+ if( debug_dma == 0 ) debug_dma = 1;
+
/* CD4 should be set (CD0-CD3 ignored) otherwise VDP locks (hard reset needed) */
if (code & 0x10)
{
@@ -3163,6 +3328,8 @@ static void vdp_dma_copy(unsigned int length)
/* DMA Fill */
static void vdp_dma_fill(unsigned int length)
{
+ if( debug_dma == 0 ) debug_dma = 1;
+
/* Check destination code (CD0-CD3) */
switch (code & 0x0F)
{
diff --git a/core/vdp_render.c b/core/vdp_render.c
index d3c913006..abf87d6ca 100644
--- a/core/vdp_render.c
+++ b/core/vdp_render.c
@@ -968,6 +968,81 @@ INLINE void merge(uint8 *srca, uint8 *srcb, uint8 *dst, uint8 *table, int width)
/* Pixel color lookup tables initialization */
/*--------------------------------------------------------------------------*/
+void palette_libretro_init(int type)
+{
+ int r, g, b, i;
+
+ /* Initialize Mode 5 pixel color look-up tables */
+ for (i = 0; i < 0x200; i++)
+ {
+ /* CRAM 9-bit value (BBBGGGRRR) */
+ r = (i >> 0) & 7;
+ g = (i >> 3) & 7;
+ b = (i >> 6) & 7;
+
+ /* Convert to output pixel format */
+ if (type == 0)
+ {
+ static int linear_lut[15] = { 0, 18, 36, 55, 73, 91, 109, 128, 146, 164, 182, 200, 219, 237, 255 };
+
+ pixel_lut[0][i] = (0xff << 24) | (linear_lut[r+0] << 16) | (linear_lut[g+0] << 8) | (linear_lut[b+0] << 0);
+ pixel_lut[1][i] = (0xff << 24) | (linear_lut[r*2] << 16) | (linear_lut[g*2] << 8) | (linear_lut[b*2] << 0);
+ pixel_lut[2][i] = (0xff << 24) | (linear_lut[r+7] << 16) | (linear_lut[g+7] << 8) | (linear_lut[b+7] << 0);
+ }
+ else if (type == 1)
+ {
+ static int hardware_lut[15] = { 0, 27, 49, 71, 87, 103, 119, 130, 146, 157, 174, 190, 206, 228, 255 }; /* non-linear dac ramp */
+
+ pixel_lut[0][i] = (0xff << 24) | (hardware_lut[r+0] << 16) | (hardware_lut[g+0] << 8) | (hardware_lut[b+0] << 0);
+ pixel_lut[1][i] = (0xff << 24) | (hardware_lut[r*2] << 16) | (hardware_lut[g*2] << 8) | (hardware_lut[b*2] << 0);
+ pixel_lut[2][i] = (0xff << 24) | (hardware_lut[r+7] << 16) | (hardware_lut[g+7] << 8) | (hardware_lut[b+7] << 0);
+ }
+ else if (type == 2)
+ {
+ static int sgb_lut[15] = { 0, 9, 27, 42, 58, 76, 94, 114, 133, 153, 173, 192, 211, 229, 255 };
+ static int hardware_lut[15] = { 0, 27, 49, 71, 87, 103, 119, 130, 146, 157, 174, 190, 206, 228, 255 };
+
+ static int sgb_hardware[15];
+ for(int lcv = 0; lcv < 15; lcv++) {
+#if 1
+ sgb_hardware[lcv] = (sgb_lut[lcv] + hardware_lut[lcv]) / 2;
+#else
+ sgb_hardware[lcv] = sgb_lut[lcv];
+#endif
+ }
+
+ pixel_lut[0][i] = (0xff << 24) | (sgb_hardware[r+0] << 16) | (sgb_hardware[g+0] << 8) | (sgb_hardware[b+0] << 0);
+ pixel_lut[1][i] = (0xff << 24) | (sgb_hardware[r*2] << 16) | (sgb_hardware[g*2] << 8) | (sgb_hardware[b*2] << 0);
+ pixel_lut[2][i] = (0xff << 24) | (sgb_hardware[r+7] << 16) | (sgb_hardware[g+7] << 8) | (sgb_hardware[b+7] << 0);
+ }
+ }
+
+
+ /* Mega Drive VDP only */
+ if (system_hw & SYSTEM_MD)
+ {
+ /* Reset color palette */
+ if (reg[1] & 0x04)
+ {
+ /* Mode 5 */
+ /* color_update_m5(0x00, *(uint16 *)&cram[border << 1]); */
+ for (i = 1; i < 0x40; i++)
+ {
+ color_update_m5(i, *(uint16 *)&cram[i << 1]);
+ }
+ }
+ else
+ {
+ /* Mode 4 */
+ for (i = 0; i < 0x20; i++)
+ {
+ color_update_m4(i, *(uint16 *)&cram[i << 1]);
+ }
+ /* color_update_m4(0x40, *(uint16 *)&cram[(0x10 | (border & 0x0F)) << 1]); */
+ }
+ }
+}
+
static void palette_init(void)
{
int r, g, b, i;
diff --git a/core/z80/z80.c b/core/z80/z80.c
index 74d5053c6..9fa286da0 100644
--- a/core/z80/z80.c
+++ b/core/z80/z80.c
@@ -3428,6 +3428,16 @@ void z80_run(unsigned int cycles)
if (Z80.cycles >= cycles) return;
}
+
+//if(PC == 0x28C)
+ if(0)
+ {
+ static FILE *fp = 0;
+ if(!fp) fp = fopen("trace-z80.txt", "w");
+ fprintf(fp, "%X %X - %X %X %X %X\n", PC, zbank, A, BC, DE, HL);
+ }
+
+
Z80.after_ei = FALSE;
R++;
EXEC_INLINE(op,ROP());
diff --git a/libretro/libretro.c b/libretro/libretro.c
index 798c6cc5f..8a7d3b8ab 100644
--- a/libretro/libretro.c
+++ b/libretro/libretro.c
@@ -144,14 +144,22 @@ static uint8_t brm_format[0x40] =
};
uint8_t cart_size;
+#define MAX_SOUND 768000
+
+#ifdef FRONTEND_SUPPORTS_RGB888
+ #define RETRO_PITCH uint32_t
+#else
+ #define RETRO_PITCH uint16_t
+#endif
+
static bool is_running = 0;
static bool restart_eq = false;
static uint8_t temp[0x10000];
-static int16 soundbuffer[3068];
-static uint16_t bitmap_data_[720 * 576];
+static int16 soundbuffer[MAX_SOUND / 50 * 4 * 2];
+static RETRO_PITCH bitmap_data_[720 * 576];
static uint8_t reg0_prev = 0;
-static char g_rom_dir[256];
+char g_rom_dir[256];
static char g_rom_name[256];
static const void *g_rom_data = NULL;
static size_t g_rom_size = 0;
@@ -201,7 +209,7 @@ static uint32_t overclock_delay;
static bool libretro_supports_option_categories = false;
static bool libretro_supports_bitmasks = false;
-#define SOUND_FREQUENCY 44100
+#define SOUND_FREQUENCY MAX_SOUND
/*EQ settings*/
#define HAVE_EQ
@@ -226,6 +234,10 @@ static bool update_audio_latency = false;
static bool show_advanced_av_settings = true;
#endif
+static unsigned video_ramp = 0;
+static unsigned volume_master = 100;
+static unsigned sampling_rate = 48000;
+
static void retro_audio_buff_status_cb(
bool active, unsigned occupancy, bool underrun_likely)
{
@@ -937,7 +949,8 @@ static void draw_cursor(int16_t x, int16_t y, uint16_t color)
int i;
/* crosshair center position */
- uint16_t *ptr = (uint16_t *)bitmap.data + ((bitmap.viewport.y + y) * bitmap.width) + x + bitmap.viewport.x;
+ RETRO_PITCH *ptr = (uint32_t *)bitmap.data + ((bitmap.viewport.y + y) * bitmap.width) + x + bitmap.viewport.x;
+ RETRO_PITCH white = (RETRO_PITCH) (-1);
/* default crosshair dimension */
int x_start = x - 3;
@@ -957,9 +970,9 @@ static void draw_cursor(int16_t x, int16_t y, uint16_t color)
/* draw crosshair */
for (i = (x_start - x); i <= (x_end - x); i++)
- ptr[i] = (i & 1) ? color : 0xffff;
+ ptr[i] = (i & 1) ? color : white;
for (i = (y_start - y); i <= (y_end - y); i++)
- ptr[i * bitmap.width] = (i & 1) ? color : 0xffff;
+ ptr[i * bitmap.width] = (i & 1) ? color : white;
}
static void init_bitmap(void)
@@ -967,7 +980,7 @@ static void init_bitmap(void)
memset(&bitmap, 0, sizeof(bitmap));
bitmap.width = 720;
bitmap.height = 576;
- bitmap.pitch = 720 * 2;
+ bitmap.pitch = 720 * sizeof(RETRO_PITCH);
bitmap.data = (uint8_t *)bitmap_data_;
}
@@ -1320,9 +1333,9 @@ static bool update_viewport(void)
else
bmdoffset = vwoffset = 0;
- vwidth = bitmap.viewport.w + (bitmap.viewport.x * 2);
- vheight = bitmap.viewport.h + (bitmap.viewport.y * 2);
- vaspect_ratio = calculate_display_aspect_ratio();
+ vwidth = bitmap.viewport.w + (bitmap.viewport.x * 2);
+ vheight = bitmap.viewport.h + (bitmap.viewport.y * 2);
+ vaspect_ratio = calculate_display_aspect_ratio();
if (config.ntsc)
{
@@ -1607,7 +1620,7 @@ static void check_variables(bool first_run)
};
/* framerate might have changed, reinitialize audio timings */
- audio_set_rate(44100, 0);
+ audio_set_rate(sampling_rate, 0);
/* reinitialize I/O region register */
if (system_hw == SYSTEM_MD)
@@ -1688,7 +1701,7 @@ static void check_variables(bool first_run)
};
/* framerate might have changed, reinitialize audio timings */
- audio_set_rate(44100, 0);
+ audio_set_rate(sampling_rate, 0);
/* reinitialize I/O region register */
if (system_hw == SYSTEM_MD)
@@ -1859,11 +1872,35 @@ static void check_variables(bool first_run)
config.mono = 0;
}
+ var.key = "genesis_plus_gx_audio_master_volume";
+ environ_cb(RETRO_ENVIRONMENT_GET_VARIABLE, &var);
+ {
+ volume_master = (!var.value) ? 100 : atoi(var.value);
+ }
+
+ var.key = "genesis_plus_gx_audio_sampling_rate";
+ environ_cb(RETRO_ENVIRONMENT_GET_VARIABLE, &var);
+ {
+ unsigned old_value = sampling_rate;
+ sampling_rate = (!var.value) ? 48000 : atoi(var.value);
+ }
+
+ var.key = "genesis_plus_gx_audio_lowpass_cutoff";
+ environ_cb(RETRO_ENVIRONMENT_GET_VARIABLE, &var);
+ {
+ extern int set_blip_lowpass(int rate);
+ unsigned new_value;
+
+ new_value = (!var.value) ? 0 : atoi(var.value);
+ set_blip_lowpass(new_value);
+ }
var.key = "genesis_plus_gx_psg_preamp";
environ_cb(RETRO_ENVIRONMENT_GET_VARIABLE, &var);
{
config.psg_preamp = (!var.value) ? 150: atoi(var.value);
+ config.psg_preamp = (config.psg_preamp * volume_master) / 100;
+
if ((system_hw & SYSTEM_PBC) == SYSTEM_MD)
{
psg_config(0, config.psg_preamp, 0xff);
@@ -1878,18 +1915,21 @@ static void check_variables(bool first_run)
environ_cb(RETRO_ENVIRONMENT_GET_VARIABLE, &var);
{
config.fm_preamp = (!var.value) ? 100: atoi(var.value);
+ config.fm_preamp = (config.fm_preamp * volume_master) / 100;
}
var.key = "genesis_plus_gx_cdda_volume";
environ_cb(RETRO_ENVIRONMENT_GET_VARIABLE, &var);
{
config.cdda_volume = (!var.value) ? 100: atoi(var.value);
+ config.cdda_volume = (config.cdda_volume * volume_master) / 100;
}
var.key = "genesis_plus_gx_pcm_volume";
environ_cb(RETRO_ENVIRONMENT_GET_VARIABLE, &var);
{
config.pcm_volume = (!var.value) ? 100: atoi(var.value);
+ config.pcm_volume = (config.pcm_volume * volume_master) / 100;
}
var.key = "genesis_plus_gx_audio_filter";
@@ -2011,6 +2051,7 @@ static void check_variables(bool first_run)
{
orig_value = config.ntsc;
+#if 0
if (!var.value || !strcmp(var.value, "disabled"))
config.ntsc = 0;
else if (var.value && !strcmp(var.value, "monochrome"))
@@ -2037,6 +2078,7 @@ static void check_variables(bool first_run)
sms_ntsc_init(sms_ntsc, &sms_ntsc_rgb);
md_ntsc_init(md_ntsc, &md_ntsc_rgb);
}
+#endif
if (orig_value != config.ntsc)
update_viewports = true;
@@ -2109,6 +2151,23 @@ static void check_variables(bool first_run)
update_viewports = true;
}
+ var.key = "genesis_plus_gx_video_ramp";
+ environ_cb(RETRO_ENVIRONMENT_GET_VARIABLE, &var);
+ {
+ extern void palette_libretro_init(int type);
+ int old_value = video_ramp;
+
+ if (!var.value || !strcmp(var.value, "Linear"))
+ video_ramp = 0;
+ else if (!strcmp(var.value, "Hardware"))
+ video_ramp = 1;
+ else if (!strcmp(var.value, "Sgb"))
+ video_ramp = 2;
+
+ if (old_value != video_ramp)
+ palette_libretro_init(video_ramp);
+ }
+
var.key = "genesis_plus_gx_gun_cursor";
environ_cb(RETRO_ENVIRONMENT_GET_VARIABLE, &var);
{
@@ -2273,7 +2332,7 @@ static void check_variables(bool first_run)
#ifdef HAVE_OVERCLOCK
overclock_delay = OVERCLOCK_FRAME_DELAY;
#endif
- audio_init(SOUND_FREQUENCY, 0);
+ audio_init(sampling_rate, 0);
memcpy(temp, sram.sram, sizeof(temp));
system_init();
system_reset();
@@ -3165,7 +3224,7 @@ void retro_get_system_av_info(struct retro_system_av_info *info)
info->geometry.aspect_ratio = vaspect_ratio;
info->timing.fps = (double)(system_clock) / (double)lines_per_frame / (double)MCYCLES_PER_LINE;
- info->timing.sample_rate = SOUND_FREQUENCY;
+ info->timing.sample_rate = sampling_rate;
if (!retro_fps)
retro_fps = info->timing.fps;
@@ -3491,6 +3550,13 @@ bool retro_load_game(const struct retro_game_info *info)
if (log_cb)
log_cb(RETRO_LOG_INFO, "Frontend supports RGB565 - will use that instead of XRGB1555.\n");
}
+#elif defined(FRONTEND_SUPPORTS_RGB888)
+ {
+ unsigned rgb888 = RETRO_PIXEL_FORMAT_XRGB8888;
+ if(environ_cb(RETRO_ENVIRONMENT_SET_PIXEL_FORMAT, &rgb888))
+ if (log_cb)
+ log_cb(RETRO_LOG_INFO, "Frontend supports RGB888 - will use that instead of XRGB565.\n");
+ }
#endif
sms_ntsc = calloc(1, sizeof(sms_ntsc_t));
@@ -3666,7 +3732,7 @@ bool retro_load_game(const struct retro_game_info *info)
}
}
- audio_init(SOUND_FREQUENCY, 0);
+ audio_init(sampling_rate, 0);
system_init();
system_reset();
is_running = false;
@@ -4006,9 +4072,9 @@ void retro_run(void)
retro_led_interface();
if (!do_skip)
- video_cb(bitmap.data + bmdoffset, vwidth - vwoffset, vheight, 720 * 2);
+ video_cb(bitmap.data + bmdoffset, vwidth - vwoffset, vheight, 720 * sizeof(RETRO_PITCH));
else
- video_cb(NULL, vwidth - vwoffset, vheight, 720 * 2);
+ video_cb(NULL, vwidth - vwoffset, vheight, 720 * sizeof(RETRO_PITCH));
audio_cb(soundbuffer, soundbuffer_size);
}
diff --git a/libretro/libretro_core_options.h b/libretro/libretro_core_options.h
index 284e4ce6c..ff9763afc 100644
--- a/libretro/libretro_core_options.h
+++ b/libretro/libretro_core_options.h
@@ -389,6 +389,20 @@ struct retro_core_option_v2_definition option_defs_us[] = {
},
"33"
},
+ {
+ "genesis_plus_gx_video_ramp",
+ "Video Ramp",
+ NULL,
+ "Lookup-table gamma ramp.",
+ NULL,
+ "video",
+ {
+ { "Linear", NULL },
+ { "Hardware", NULL },
+ { "Sgb", "Sgb (TV)" },
+ },
+ "Linear"
+ },
{
"genesis_plus_gx_ym2413",
"Master System FM (YM2413)",
@@ -474,6 +488,347 @@ struct retro_core_option_v2_definition option_defs_us[] = {
},
"disabled"
},
+#ifdef HAVE_EQ
+ {
+ "genesis_plus_gx_audio_eq_low",
+ "EQ Low",
+ NULL,
+ "Adjust the low range band of the internal audio equalizer.",
+ NULL,
+ "audio",
+ {
+ { "0", "0%" },
+ { "1", "1%" },
+ { "2", "2%" },
+ { "3", "3%" },
+ { "4", "4%" },
+ { "5", "5%" },
+ { "6", "6%" },
+ { "7", "7%" },
+ { "8", "8%" },
+ { "9", "9%" },
+ { "10", "10%" },
+ { "11", "11%" },
+ { "12", "12%" },
+ { "13", "13%" },
+ { "14", "14%" },
+ { "15", "15%" },
+ { "16", "16%" },
+ { "17", "17%" },
+ { "18", "18%" },
+ { "19", "19%" },
+ { "20", "20%" },
+ { "21", "21%" },
+ { "22", "22%" },
+ { "23", "23%" },
+ { "24", "24%" },
+ { "25", "25%" },
+ { "26", "26%" },
+ { "27", "27%" },
+ { "28", "28%" },
+ { "29", "29%" },
+ { "30", "30%" },
+ { "31", "31%" },
+ { "32", "32%" },
+ { "33", "33%" },
+ { "34", "34%" },
+ { "35", "35%" },
+ { "36", "36%" },
+ { "37", "37%" },
+ { "38", "38%" },
+ { "39", "39%" },
+ { "40", "40%" },
+ { "41", "41%" },
+ { "42", "42%" },
+ { "43", "43%" },
+ { "44", "44%" },
+ { "45", "45%" },
+ { "46", "46%" },
+ { "47", "47%" },
+ { "48", "48%" },
+ { "49", "49%" },
+ { "50", "50%" },
+ { "51", "51%" },
+ { "52", "52%" },
+ { "53", "53%" },
+ { "54", "54%" },
+ { "55", "55%" },
+ { "56", "56%" },
+ { "57", "57%" },
+ { "58", "58%" },
+ { "59", "59%" },
+ { "60", "60%" },
+ { "61", "61%" },
+ { "62", "62%" },
+ { "63", "63%" },
+ { "64", "64%" },
+ { "65", "65%" },
+ { "66", "66%" },
+ { "67", "67%" },
+ { "68", "68%" },
+ { "69", "69%" },
+ { "70", "70%" },
+ { "71", "71%" },
+ { "72", "72%" },
+ { "73", "73%" },
+ { "74", "74%" },
+ { "75", "75%" },
+ { "76", "76%" },
+ { "77", "77%" },
+ { "78", "78%" },
+ { "79", "79%" },
+ { "80", "80%" },
+ { "81", "81%" },
+ { "82", "82%" },
+ { "83", "83%" },
+ { "84", "84%" },
+ { "85", "85%" },
+ { "86", "86%" },
+ { "87", "87%" },
+ { "88", "88%" },
+ { "89", "89%" },
+ { "90", "90%" },
+ { "91", "91%" },
+ { "92", "92%" },
+ { "93", "93%" },
+ { "94", "94%" },
+ { "95", "95%" },
+ { "96", "96%" },
+ { "97", "97%" },
+ { "98", "98%" },
+ { "99", "99%" },
+ { "100", "100%" },
+ { NULL, NULL },
+ },
+ "100"
+ },
+ {
+ "genesis_plus_gx_audio_eq_mid",
+ "EQ Mid",
+ NULL,
+ "Adjust the middle range band of the internal audio equalizer.",
+ NULL,
+ "audio",
+ {
+ { "0", "0%" },
+ { "1", "1%" },
+ { "2", "2%" },
+ { "3", "3%" },
+ { "4", "4%" },
+ { "5", "5%" },
+ { "6", "6%" },
+ { "7", "7%" },
+ { "8", "8%" },
+ { "9", "9%" },
+ { "10", "10%" },
+ { "11", "11%" },
+ { "12", "12%" },
+ { "13", "13%" },
+ { "14", "14%" },
+ { "15", "15%" },
+ { "16", "16%" },
+ { "17", "17%" },
+ { "18", "18%" },
+ { "19", "19%" },
+ { "20", "20%" },
+ { "21", "21%" },
+ { "22", "22%" },
+ { "23", "23%" },
+ { "24", "24%" },
+ { "25", "25%" },
+ { "26", "26%" },
+ { "27", "27%" },
+ { "28", "28%" },
+ { "29", "29%" },
+ { "30", "30%" },
+ { "31", "31%" },
+ { "32", "32%" },
+ { "33", "33%" },
+ { "34", "34%" },
+ { "35", "35%" },
+ { "36", "36%" },
+ { "37", "37%" },
+ { "38", "38%" },
+ { "39", "39%" },
+ { "40", "40%" },
+ { "41", "41%" },
+ { "42", "42%" },
+ { "43", "43%" },
+ { "44", "44%" },
+ { "45", "45%" },
+ { "46", "46%" },
+ { "47", "47%" },
+ { "48", "48%" },
+ { "49", "49%" },
+ { "50", "50%" },
+ { "51", "51%" },
+ { "52", "52%" },
+ { "53", "53%" },
+ { "54", "54%" },
+ { "55", "55%" },
+ { "56", "56%" },
+ { "57", "57%" },
+ { "58", "58%" },
+ { "59", "59%" },
+ { "60", "60%" },
+ { "61", "61%" },
+ { "62", "62%" },
+ { "63", "63%" },
+ { "64", "64%" },
+ { "65", "65%" },
+ { "66", "66%" },
+ { "67", "67%" },
+ { "68", "68%" },
+ { "69", "69%" },
+ { "70", "70%" },
+ { "71", "71%" },
+ { "72", "72%" },
+ { "73", "73%" },
+ { "74", "74%" },
+ { "75", "75%" },
+ { "76", "76%" },
+ { "77", "77%" },
+ { "78", "78%" },
+ { "79", "79%" },
+ { "80", "80%" },
+ { "81", "81%" },
+ { "82", "82%" },
+ { "83", "83%" },
+ { "84", "84%" },
+ { "85", "85%" },
+ { "86", "86%" },
+ { "87", "87%" },
+ { "88", "88%" },
+ { "89", "89%" },
+ { "90", "90%" },
+ { "91", "91%" },
+ { "92", "92%" },
+ { "93", "93%" },
+ { "94", "94%" },
+ { "95", "95%" },
+ { "96", "96%" },
+ { "97", "97%" },
+ { "98", "98%" },
+ { "99", "99%" },
+ { "100", "100%" },
+ { NULL, NULL },
+ },
+ "100"
+ },
+ {
+ "genesis_plus_gx_audio_eq_high",
+ "EQ High",
+ NULL,
+ "Adjust the high range band of the internal audio equalizer.",
+ NULL,
+ "audio",
+ {
+ { "0", "0%" },
+ { "1", "1%" },
+ { "2", "2%" },
+ { "3", "3%" },
+ { "4", "4%" },
+ { "5", "5%" },
+ { "6", "6%" },
+ { "7", "7%" },
+ { "8", "8%" },
+ { "9", "9%" },
+ { "10", "10%" },
+ { "11", "11%" },
+ { "12", "12%" },
+ { "13", "13%" },
+ { "14", "14%" },
+ { "15", "15%" },
+ { "16", "16%" },
+ { "17", "17%" },
+ { "18", "18%" },
+ { "19", "19%" },
+ { "20", "20%" },
+ { "21", "21%" },
+ { "22", "22%" },
+ { "23", "23%" },
+ { "24", "24%" },
+ { "25", "25%" },
+ { "26", "26%" },
+ { "27", "27%" },
+ { "28", "28%" },
+ { "29", "29%" },
+ { "30", "30%" },
+ { "31", "31%" },
+ { "32", "32%" },
+ { "33", "33%" },
+ { "34", "34%" },
+ { "35", "35%" },
+ { "36", "36%" },
+ { "37", "37%" },
+ { "38", "38%" },
+ { "39", "39%" },
+ { "40", "40%" },
+ { "41", "41%" },
+ { "42", "42%" },
+ { "43", "43%" },
+ { "44", "44%" },
+ { "45", "45%" },
+ { "46", "46%" },
+ { "47", "47%" },
+ { "48", "48%" },
+ { "49", "49%" },
+ { "50", "50%" },
+ { "51", "51%" },
+ { "52", "52%" },
+ { "53", "53%" },
+ { "54", "54%" },
+ { "55", "55%" },
+ { "56", "56%" },
+ { "57", "57%" },
+ { "58", "58%" },
+ { "59", "59%" },
+ { "60", "60%" },
+ { "61", "61%" },
+ { "62", "62%" },
+ { "63", "63%" },
+ { "64", "64%" },
+ { "65", "65%" },
+ { "66", "66%" },
+ { "67", "67%" },
+ { "68", "68%" },
+ { "69", "69%" },
+ { "70", "70%" },
+ { "71", "71%" },
+ { "72", "72%" },
+ { "73", "73%" },
+ { "74", "74%" },
+ { "75", "75%" },
+ { "76", "76%" },
+ { "77", "77%" },
+ { "78", "78%" },
+ { "79", "79%" },
+ { "80", "80%" },
+ { "81", "81%" },
+ { "82", "82%" },
+ { "83", "83%" },
+ { "84", "84%" },
+ { "85", "85%" },
+ { "86", "86%" },
+ { "87", "87%" },
+ { "88", "88%" },
+ { "89", "89%" },
+ { "90", "90%" },
+ { "91", "91%" },
+ { "92", "92%" },
+ { "93", "93%" },
+ { "94", "94%" },
+ { "95", "95%" },
+ { "96", "96%" },
+ { "97", "97%" },
+ { "98", "98%" },
+ { "99", "99%" },
+ { "100", "100%" },
+ { NULL, NULL },
+ },
+ "100"
+ },
+#endif
{
"genesis_plus_gx_lowpass_range",
"Low-Pass Filter %",
@@ -482,302 +837,713 @@ struct retro_core_option_v2_definition option_defs_us[] = {
NULL,
"audio",
{
- { "5", NULL },
- { "10", NULL },
- { "15", NULL },
- { "20", NULL },
- { "25", NULL },
- { "30", NULL },
- { "35", NULL },
- { "40", NULL },
- { "45", NULL },
- { "50", NULL },
- { "55", NULL },
- { "60", NULL },
- { "65", NULL },
- { "70", NULL },
- { "75", NULL },
- { "80", NULL },
- { "85", NULL },
- { "90", NULL },
- { "95", NULL },
+ { "0", "0%" },
+ { "1", "1%" },
+ { "2", "2%" },
+ { "3", "3%" },
+ { "4", "4%" },
+ { "5", "5%" },
+ { "6", "6%" },
+ { "7", "7%" },
+ { "8", "8%" },
+ { "9", "9%" },
+ { "10", "10%" },
+ { "11", "11%" },
+ { "12", "12%" },
+ { "13", "13%" },
+ { "14", "14%" },
+ { "15", "15%" },
+ { "16", "16%" },
+ { "17", "17%" },
+ { "18", "18%" },
+ { "19", "19%" },
+ { "20", "20%" },
+ { "21", "21%" },
+ { "22", "22%" },
+ { "23", "23%" },
+ { "24", "24%" },
+ { "25", "25%" },
+ { "26", "26%" },
+ { "27", "27%" },
+ { "28", "28%" },
+ { "29", "29%" },
+ { "30", "30%" },
+ { "31", "31%" },
+ { "32", "32%" },
+ { "33", "33%" },
+ { "34", "34%" },
+ { "35", "35%" },
+ { "36", "36%" },
+ { "37", "37%" },
+ { "38", "38%" },
+ { "39", "39%" },
+ { "40", "40%" },
+ { "41", "41%" },
+ { "42", "42%" },
+ { "43", "43%" },
+ { "44", "44%" },
+ { "45", "45%" },
+ { "46", "46%" },
+ { "47", "47%" },
+ { "48", "48%" },
+ { "49", "49%" },
+ { "50", "50%" },
+ { "51", "51%" },
+ { "52", "52%" },
+ { "53", "53%" },
+ { "54", "54%" },
+ { "55", "55%" },
+ { "56", "56%" },
+ { "57", "57%" },
+ { "58", "58%" },
+ { "59", "59%" },
+ { "60", "60%" },
+ { "61", "61%" },
+ { "62", "62%" },
+ { "63", "63%" },
+ { "64", "64%" },
+ { "65", "65%" },
+ { "66", "66%" },
+ { "67", "67%" },
+ { "68", "68%" },
+ { "69", "69%" },
+ { "70", "70%" },
+ { "71", "71%" },
+ { "72", "72%" },
+ { "73", "73%" },
+ { "74", "74%" },
+ { "75", "75%" },
+ { "76", "76%" },
+ { "77", "77%" },
+ { "78", "78%" },
+ { "79", "79%" },
+ { "80", "80%" },
+ { "81", "81%" },
+ { "82", "82%" },
+ { "83", "83%" },
+ { "84", "84%" },
+ { "85", "85%" },
+ { "86", "86%" },
+ { "87", "87%" },
+ { "88", "88%" },
+ { "89", "89%" },
+ { "90", "90%" },
+ { "91", "91%" },
+ { "92", "92%" },
+ { "93", "93%" },
+ { "94", "94%" },
+ { "95", "95%" },
+ { "96", "96%" },
+ { "97", "97%" },
+ { "98", "98%" },
+ { "99", "99%" },
+ { "100", "100%" },
{ NULL, NULL },
},
"60"
},
{
- "genesis_plus_gx_psg_preamp",
- "PSG Preamp Level",
+ "genesis_plus_gx_audio_sampling_rate",
+ "Sampling Rate (Reboot core)",
NULL,
- "Set the audio preamplifier level of the emulated SN76496 4-channel Programmable Sound Generator found in the SG-1000, Sega Mark III, Master System, Game Gear and Mega Drive/Genesis.",
+ "Internal sampling rate. Higher gives less audio lag, better downsampling.",
NULL,
"audio",
{
- { "0", NULL },
- { "5", NULL },
- { "10", NULL },
- { "15", NULL },
- { "20", NULL },
- { "25", NULL },
- { "30", NULL },
- { "35", NULL },
- { "40", NULL },
- { "45", NULL },
- { "50", NULL },
- { "55", NULL },
- { "60", NULL },
- { "65", NULL },
- { "70", NULL },
- { "75", NULL },
- { "80", NULL },
- { "85", NULL },
- { "90", NULL },
- { "95", NULL },
- { "100", NULL },
- { "105", NULL },
- { "110", NULL },
- { "115", NULL },
- { "120", NULL },
- { "125", NULL },
- { "130", NULL },
- { "135", NULL },
- { "140", NULL },
- { "145", NULL },
- { "150", NULL },
- { "155", NULL },
- { "160", NULL },
- { "165", NULL },
- { "170", NULL },
- { "175", NULL },
- { "180", NULL },
- { "185", NULL },
- { "190", NULL },
- { "195", NULL },
- { "200", NULL },
+ { "22050", NULL },
+ { "44100", NULL },
+ { "48000", NULL },
+ { "96000", NULL },
+ { "192000", NULL },
+ { "384000", NULL },
+ { "768000", NULL },
{ NULL, NULL },
},
- "150"
+ "48000"
},
{
- "genesis_plus_gx_fm_preamp",
- "FM Preamp Level",
+ "genesis_plus_gx_audio_lowpass_cutoff",
+ "Lowpass Cutoff Rate",
NULL,
- "Set the audio preamplifier level of the emulated Mega Drive/Genesis FM sound synthesizer or Sega Mark III/Master System FM Sound Unit.",
+ "Remove high frequency, aliasing sounds beyond nyquist.",
NULL,
"audio",
{
- { "0", NULL },
- { "5", NULL },
- { "10", NULL },
- { "15", NULL },
- { "20", NULL },
- { "25", NULL },
- { "30", NULL },
- { "35", NULL },
- { "40", NULL },
- { "45", NULL },
- { "50", NULL },
- { "55", NULL },
- { "60", NULL },
- { "65", NULL },
- { "70", NULL },
- { "75", NULL },
- { "80", NULL },
- { "85", NULL },
- { "90", NULL },
- { "95", NULL },
- { "100", NULL },
- { "105", NULL },
- { "110", NULL },
- { "115", NULL },
- { "120", NULL },
- { "125", NULL },
- { "130", NULL },
- { "135", NULL },
- { "140", NULL },
- { "145", NULL },
- { "150", NULL },
- { "155", NULL },
- { "160", NULL },
- { "165", NULL },
- { "170", NULL },
- { "175", NULL },
- { "180", NULL },
- { "185", NULL },
- { "190", NULL },
- { "195", NULL },
- { "200", NULL },
+ { "0", "Disabled" },
+ { "24000" },
+ { "48000" },
+ { "96000" },
+ { "192000" },
+ { "384000" },
{ NULL, NULL },
},
- "100"
+ "24000"
},
{
- "genesis_plus_gx_cdda_volume",
- "CD-DA Volume",
+ "genesis_plus_gx_psg_preamp",
+ "PSG Preamp Level",
NULL,
- "Adjust the mixing volume of the emulated CD audio playback output.",
+ "Set the audio preamplifier level of the emulated SN76496 4-channel Programmable Sound Generator found in the SG-1000, Sega Mark III, Master System, Game Gear and Mega Drive/Genesis.",
NULL,
"audio",
{
- { "0", NULL },
- { "5", NULL },
- { "10", NULL },
- { "15", NULL },
- { "20", NULL },
- { "25", NULL },
- { "30", NULL },
- { "35", NULL },
- { "40", NULL },
- { "45", NULL },
- { "50", NULL },
- { "55", NULL },
- { "60", NULL },
- { "65", NULL },
- { "70", NULL },
- { "75", NULL },
- { "80", NULL },
- { "85", NULL },
- { "90", NULL },
- { "95", NULL },
- { "100", NULL },
+ { "0", "0%" },
+ { "2", "2%" },
+ { "4", "4%" },
+ { "6", "6%" },
+ { "8", "8%" },
+ { "10", "10%" },
+ { "12", "12%" },
+ { "14", "14%" },
+ { "16", "16%" },
+ { "18", "18%" },
+ { "20", "20%" },
+ { "22", "22%" },
+ { "24", "24%" },
+ { "26", "26%" },
+ { "28", "28%" },
+ { "30", "30%" },
+ { "32", "32%" },
+ { "34", "34%" },
+ { "36", "36%" },
+ { "38", "38%" },
+ { "40", "40%" },
+ { "42", "42%" },
+ { "44", "44%" },
+ { "46", "46%" },
+ { "48", "48%" },
+ { "50", "50%" },
+ { "52", "52%" },
+ { "54", "54%" },
+ { "56", "56%" },
+ { "58", "58%" },
+ { "60", "60%" },
+ { "62", "62%" },
+ { "64", "64%" },
+ { "66", "66%" },
+ { "68", "68%" },
+ { "70", "70%" },
+ { "72", "72%" },
+ { "74", "74%" },
+ { "76", "76%" },
+ { "78", "78%" },
+ { "80", "80%" },
+ { "82", "82%" },
+ { "84", "84%" },
+ { "86", "86%" },
+ { "88", "88%" },
+ { "90", "90%" },
+ { "92", "92%" },
+ { "94", "94%" },
+ { "96", "96%" },
+ { "98", "98%" },
+ { "100", "100%" },
+ { "102", "102%" },
+ { "104", "104%" },
+ { "106", "106%" },
+ { "108", "108%" },
+ { "110", "110%" },
+ { "112", "112%" },
+ { "114", "114%" },
+ { "116", "116%" },
+ { "118", "118%" },
+ { "120", "120%" },
+ { "122", "122%" },
+ { "124", "124%" },
+ { "126", "126%" },
+ { "128", "128%" },
+ { "130", "130%" },
+ { "132", "132%" },
+ { "134", "134%" },
+ { "136", "136%" },
+ { "138", "138%" },
+ { "140", "140%" },
+ { "142", "142%" },
+ { "144", "144%" },
+ { "146", "146%" },
+ { "148", "148%" },
+ { "150", "150%" },
+ { "152", "152%" },
+ { "154", "154%" },
+ { "156", "156%" },
+ { "158", "158%" },
+ { "160", "160%" },
+ { "162", "162%" },
+ { "164", "164%" },
+ { "166", "166%" },
+ { "168", "168%" },
+ { "170", "170%" },
+ { "172", "172%" },
+ { "174", "174%" },
+ { "176", "176%" },
+ { "178", "178%" },
+ { "180", "180%" },
+ { "182", "182%" },
+ { "184", "184%" },
+ { "186", "186%" },
+ { "188", "188%" },
+ { "190", "190%" },
+ { "192", "192%" },
+ { "194", "194%" },
+ { "196", "196%" },
+ { "198", "198%" },
+ { "200", "200%" },
{ NULL, NULL },
},
- "100"
+ "150"
},
{
- "genesis_plus_gx_pcm_volume",
- "PCM Volume",
+ "genesis_plus_gx_fm_preamp",
+ "FM Preamp Level",
NULL,
- "Adjust the mixing volume of the emulated Sega CD/Mega-CD RF5C164 PCM sound generator output.",
+ "Set the audio preamplifier level of the emulated Mega Drive/Genesis FM sound synthesizer or Sega Mark III/Master System FM Sound Unit.",
NULL,
"audio",
{
- { "0", NULL },
- { "5", NULL },
- { "10", NULL },
- { "15", NULL },
- { "20", NULL },
- { "25", NULL },
- { "30", NULL },
- { "35", NULL },
- { "40", NULL },
- { "45", NULL },
- { "50", NULL },
- { "55", NULL },
- { "60", NULL },
- { "65", NULL },
- { "70", NULL },
- { "75", NULL },
- { "80", NULL },
- { "85", NULL },
- { "90", NULL },
- { "95", NULL },
- { "100", NULL },
+ { "0", "0%" },
+ { "2", "2%" },
+ { "4", "4%" },
+ { "6", "6%" },
+ { "8", "8%" },
+ { "10", "10%" },
+ { "12", "12%" },
+ { "14", "14%" },
+ { "16", "16%" },
+ { "18", "18%" },
+ { "20", "20%" },
+ { "22", "22%" },
+ { "24", "24%" },
+ { "26", "26%" },
+ { "28", "28%" },
+ { "30", "30%" },
+ { "32", "32%" },
+ { "34", "34%" },
+ { "36", "36%" },
+ { "38", "38%" },
+ { "40", "40%" },
+ { "42", "42%" },
+ { "44", "44%" },
+ { "46", "46%" },
+ { "48", "48%" },
+ { "50", "50%" },
+ { "52", "52%" },
+ { "54", "54%" },
+ { "56", "56%" },
+ { "58", "58%" },
+ { "60", "60%" },
+ { "62", "62%" },
+ { "64", "64%" },
+ { "66", "66%" },
+ { "68", "68%" },
+ { "70", "70%" },
+ { "72", "72%" },
+ { "74", "74%" },
+ { "76", "76%" },
+ { "78", "78%" },
+ { "80", "80%" },
+ { "82", "82%" },
+ { "84", "84%" },
+ { "86", "86%" },
+ { "88", "88%" },
+ { "90", "90%" },
+ { "92", "92%" },
+ { "94", "94%" },
+ { "96", "96%" },
+ { "98", "98%" },
+ { "100", "100%" },
+ { "102", "102%" },
+ { "104", "104%" },
+ { "106", "106%" },
+ { "108", "108%" },
+ { "110", "110%" },
+ { "112", "112%" },
+ { "114", "114%" },
+ { "116", "116%" },
+ { "118", "118%" },
+ { "120", "120%" },
+ { "122", "122%" },
+ { "124", "124%" },
+ { "126", "126%" },
+ { "128", "128%" },
+ { "130", "130%" },
+ { "132", "132%" },
+ { "134", "134%" },
+ { "136", "136%" },
+ { "138", "138%" },
+ { "140", "140%" },
+ { "142", "142%" },
+ { "144", "144%" },
+ { "146", "146%" },
+ { "148", "148%" },
+ { "150", "150%" },
+ { "152", "152%" },
+ { "154", "154%" },
+ { "156", "156%" },
+ { "158", "158%" },
+ { "160", "160%" },
+ { "162", "162%" },
+ { "164", "164%" },
+ { "166", "166%" },
+ { "168", "168%" },
+ { "170", "170%" },
+ { "172", "172%" },
+ { "174", "174%" },
+ { "176", "176%" },
+ { "178", "178%" },
+ { "180", "180%" },
+ { "182", "182%" },
+ { "184", "184%" },
+ { "186", "186%" },
+ { "188", "188%" },
+ { "190", "190%" },
+ { "192", "192%" },
+ { "194", "194%" },
+ { "196", "196%" },
+ { "198", "198%" },
+ { "200", "200%" },
{ NULL, NULL },
},
"100"
},
-#ifdef HAVE_EQ
{
- "genesis_plus_gx_audio_eq_low",
- "EQ Low",
+ "genesis_plus_gx_cdda_volume",
+ "CD-DA Volume",
NULL,
- "Adjust the low range band of the internal audio equalizer.",
+ "Adjust the mixing volume of the emulated CD audio playback output.",
NULL,
"audio",
{
- { "0", NULL },
- { "5", NULL },
- { "10", NULL },
- { "15", NULL },
- { "20", NULL },
- { "25", NULL },
- { "30", NULL },
- { "35", NULL },
- { "40", NULL },
- { "45", NULL },
- { "50", NULL },
- { "55", NULL },
- { "60", NULL },
- { "65", NULL },
- { "70", NULL },
- { "75", NULL },
- { "80", NULL },
- { "85", NULL },
- { "90", NULL },
- { "95", NULL },
- { "100", NULL },
+ { "0", "0%" },
+ { "2", "2%" },
+ { "4", "4%" },
+ { "6", "6%" },
+ { "8", "8%" },
+ { "10", "10%" },
+ { "12", "12%" },
+ { "14", "14%" },
+ { "16", "16%" },
+ { "18", "18%" },
+ { "20", "20%" },
+ { "22", "22%" },
+ { "24", "24%" },
+ { "26", "26%" },
+ { "28", "28%" },
+ { "30", "30%" },
+ { "32", "32%" },
+ { "34", "34%" },
+ { "36", "36%" },
+ { "38", "38%" },
+ { "40", "40%" },
+ { "42", "42%" },
+ { "44", "44%" },
+ { "46", "46%" },
+ { "48", "48%" },
+ { "50", "50%" },
+ { "52", "52%" },
+ { "54", "54%" },
+ { "56", "56%" },
+ { "58", "58%" },
+ { "60", "60%" },
+ { "62", "62%" },
+ { "64", "64%" },
+ { "66", "66%" },
+ { "68", "68%" },
+ { "70", "70%" },
+ { "72", "72%" },
+ { "74", "74%" },
+ { "76", "76%" },
+ { "78", "78%" },
+ { "80", "80%" },
+ { "82", "82%" },
+ { "84", "84%" },
+ { "86", "86%" },
+ { "88", "88%" },
+ { "90", "90%" },
+ { "92", "92%" },
+ { "94", "94%" },
+ { "96", "96%" },
+ { "98", "98%" },
+ { "100", "100%" },
+ { "102", "102%" },
+ { "104", "104%" },
+ { "106", "106%" },
+ { "108", "108%" },
+ { "110", "110%" },
+ { "112", "112%" },
+ { "114", "114%" },
+ { "116", "116%" },
+ { "118", "118%" },
+ { "120", "120%" },
+ { "122", "122%" },
+ { "124", "124%" },
+ { "126", "126%" },
+ { "128", "128%" },
+ { "130", "130%" },
+ { "132", "132%" },
+ { "134", "134%" },
+ { "136", "136%" },
+ { "138", "138%" },
+ { "140", "140%" },
+ { "142", "142%" },
+ { "144", "144%" },
+ { "146", "146%" },
+ { "148", "148%" },
+ { "150", "150%" },
+ { "152", "152%" },
+ { "154", "154%" },
+ { "156", "156%" },
+ { "158", "158%" },
+ { "160", "160%" },
+ { "162", "162%" },
+ { "164", "164%" },
+ { "166", "166%" },
+ { "168", "168%" },
+ { "170", "170%" },
+ { "172", "172%" },
+ { "174", "174%" },
+ { "176", "176%" },
+ { "178", "178%" },
+ { "180", "180%" },
+ { "182", "182%" },
+ { "184", "184%" },
+ { "186", "186%" },
+ { "188", "188%" },
+ { "190", "190%" },
+ { "192", "192%" },
+ { "194", "194%" },
+ { "196", "196%" },
+ { "198", "198%" },
+ { "200", "200%" },
{ NULL, NULL },
},
"100"
},
{
- "genesis_plus_gx_audio_eq_mid",
- "EQ Mid",
+ "genesis_plus_gx_pcm_volume",
+ "PCM Volume",
NULL,
- "Adjust the middle range band of the internal audio equalizer.",
+ "Adjust the mixing volume of the emulated Sega CD/Mega-CD RF5C164 PCM sound generator output.",
NULL,
"audio",
{
- { "0", NULL },
- { "5", NULL },
- { "10", NULL },
- { "15", NULL },
- { "20", NULL },
- { "25", NULL },
- { "30", NULL },
- { "35", NULL },
- { "40", NULL },
- { "45", NULL },
- { "50", NULL },
- { "55", NULL },
- { "60", NULL },
- { "65", NULL },
- { "70", NULL },
- { "75", NULL },
- { "80", NULL },
- { "85", NULL },
- { "90", NULL },
- { "95", NULL },
- { "100", NULL },
+ { "0", "0%" },
+ { "2", "2%" },
+ { "4", "4%" },
+ { "6", "6%" },
+ { "8", "8%" },
+ { "10", "10%" },
+ { "12", "12%" },
+ { "14", "14%" },
+ { "16", "16%" },
+ { "18", "18%" },
+ { "20", "20%" },
+ { "22", "22%" },
+ { "24", "24%" },
+ { "26", "26%" },
+ { "28", "28%" },
+ { "30", "30%" },
+ { "32", "32%" },
+ { "34", "34%" },
+ { "36", "36%" },
+ { "38", "38%" },
+ { "40", "40%" },
+ { "42", "42%" },
+ { "44", "44%" },
+ { "46", "46%" },
+ { "48", "48%" },
+ { "50", "50%" },
+ { "52", "52%" },
+ { "54", "54%" },
+ { "56", "56%" },
+ { "58", "58%" },
+ { "60", "60%" },
+ { "62", "62%" },
+ { "64", "64%" },
+ { "66", "66%" },
+ { "68", "68%" },
+ { "70", "70%" },
+ { "72", "72%" },
+ { "74", "74%" },
+ { "76", "76%" },
+ { "78", "78%" },
+ { "80", "80%" },
+ { "82", "82%" },
+ { "84", "84%" },
+ { "86", "86%" },
+ { "88", "88%" },
+ { "90", "90%" },
+ { "92", "92%" },
+ { "94", "94%" },
+ { "96", "96%" },
+ { "98", "98%" },
+ { "100", "100%" },
+ { "102", "102%" },
+ { "104", "104%" },
+ { "106", "106%" },
+ { "108", "108%" },
+ { "110", "110%" },
+ { "112", "112%" },
+ { "114", "114%" },
+ { "116", "116%" },
+ { "118", "118%" },
+ { "120", "120%" },
+ { "122", "122%" },
+ { "124", "124%" },
+ { "126", "126%" },
+ { "128", "128%" },
+ { "130", "130%" },
+ { "132", "132%" },
+ { "134", "134%" },
+ { "136", "136%" },
+ { "138", "138%" },
+ { "140", "140%" },
+ { "142", "142%" },
+ { "144", "144%" },
+ { "146", "146%" },
+ { "148", "148%" },
+ { "150", "150%" },
+ { "152", "152%" },
+ { "154", "154%" },
+ { "156", "156%" },
+ { "158", "158%" },
+ { "160", "160%" },
+ { "162", "162%" },
+ { "164", "164%" },
+ { "166", "166%" },
+ { "168", "168%" },
+ { "170", "170%" },
+ { "172", "172%" },
+ { "174", "174%" },
+ { "176", "176%" },
+ { "178", "178%" },
+ { "180", "180%" },
+ { "182", "182%" },
+ { "184", "184%" },
+ { "186", "186%" },
+ { "188", "188%" },
+ { "190", "190%" },
+ { "192", "192%" },
+ { "194", "194%" },
+ { "196", "196%" },
+ { "198", "198%" },
+ { "200", "200%" },
{ NULL, NULL },
},
"100"
},
{
- "genesis_plus_gx_audio_eq_high",
- "EQ High",
+ "genesis_plus_gx_audio_master_volume",
+ "Master Volume",
NULL,
- "Adjust the high range band of the internal audio equalizer.",
+ "Adjust the output volume level.",
NULL,
"audio",
{
- { "0", NULL },
- { "5", NULL },
- { "10", NULL },
- { "15", NULL },
- { "20", NULL },
- { "25", NULL },
- { "30", NULL },
- { "35", NULL },
- { "40", NULL },
- { "45", NULL },
- { "50", NULL },
- { "55", NULL },
- { "60", NULL },
- { "65", NULL },
- { "70", NULL },
- { "75", NULL },
- { "80", NULL },
- { "85", NULL },
- { "90", NULL },
- { "95", NULL },
- { "100", NULL },
+ { "0", "0%" },
+ { "2", "2%" },
+ { "4", "4%" },
+ { "6", "6%" },
+ { "8", "8%" },
+ { "10", "10%" },
+ { "12", "12%" },
+ { "14", "14%" },
+ { "16", "16%" },
+ { "18", "18%" },
+ { "20", "20%" },
+ { "22", "22%" },
+ { "24", "24%" },
+ { "26", "26%" },
+ { "28", "28%" },
+ { "30", "30%" },
+ { "32", "32%" },
+ { "34", "34%" },
+ { "36", "36%" },
+ { "38", "38%" },
+ { "40", "40%" },
+ { "42", "42%" },
+ { "44", "44%" },
+ { "46", "46%" },
+ { "48", "48%" },
+ { "50", "50%" },
+ { "52", "52%" },
+ { "54", "54%" },
+ { "56", "56%" },
+ { "58", "58%" },
+ { "60", "60%" },
+ { "62", "62%" },
+ { "64", "64%" },
+ { "66", "66%" },
+ { "68", "68%" },
+ { "70", "70%" },
+ { "72", "72%" },
+ { "74", "74%" },
+ { "76", "76%" },
+ { "78", "78%" },
+ { "80", "80%" },
+ { "82", "82%" },
+ { "84", "84%" },
+ { "86", "86%" },
+ { "88", "88%" },
+ { "90", "90%" },
+ { "92", "92%" },
+ { "94", "94%" },
+ { "96", "96%" },
+ { "98", "98%" },
+ { "100", "100%" },
+ { "102", "102%" },
+ { "104", "104%" },
+ { "106", "106%" },
+ { "108", "108%" },
+ { "110", "110%" },
+ { "112", "112%" },
+ { "114", "114%" },
+ { "116", "116%" },
+ { "118", "118%" },
+ { "120", "120%" },
+ { "122", "122%" },
+ { "124", "124%" },
+ { "126", "126%" },
+ { "128", "128%" },
+ { "130", "130%" },
+ { "132", "132%" },
+ { "134", "134%" },
+ { "136", "136%" },
+ { "138", "138%" },
+ { "140", "140%" },
+ { "142", "142%" },
+ { "144", "144%" },
+ { "146", "146%" },
+ { "148", "148%" },
+ { "150", "150%" },
+ { "152", "152%" },
+ { "154", "154%" },
+ { "156", "156%" },
+ { "158", "158%" },
+ { "160", "160%" },
+ { "162", "162%" },
+ { "164", "164%" },
+ { "166", "166%" },
+ { "168", "168%" },
+ { "170", "170%" },
+ { "172", "172%" },
+ { "174", "174%" },
+ { "176", "176%" },
+ { "178", "178%" },
+ { "180", "180%" },
+ { "182", "182%" },
+ { "184", "184%" },
+ { "186", "186%" },
+ { "188", "188%" },
+ { "190", "190%" },
+ { "192", "192%" },
+ { "194", "194%" },
+ { "196", "196%" },
+ { "198", "198%" },
+ { "200", "200%" },
{ NULL, NULL },
},
"100"
},
-#endif
{
"genesis_plus_gx_gun_input",
"Light Gun Input",
@@ -985,17 +1751,107 @@ struct retro_core_option_v2_definition option_defs_us[] = {
NULL,
"channel_volume",
{
- { "0", NULL },
- { "10", NULL },
- { "20", NULL },
- { "30", NULL },
- { "40", NULL },
- { "50", NULL },
- { "60", NULL },
- { "70", NULL },
- { "80", NULL },
- { "90", NULL },
- { "100", NULL },
+ { "0", "0%" },
+ { "2", "2%" },
+ { "4", "4%" },
+ { "6", "6%" },
+ { "8", "8%" },
+ { "10", "10%" },
+ { "12", "12%" },
+ { "14", "14%" },
+ { "16", "16%" },
+ { "18", "18%" },
+ { "20", "20%" },
+ { "22", "22%" },
+ { "24", "24%" },
+ { "26", "26%" },
+ { "28", "28%" },
+ { "30", "30%" },
+ { "32", "32%" },
+ { "34", "34%" },
+ { "36", "36%" },
+ { "38", "38%" },
+ { "40", "40%" },
+ { "42", "42%" },
+ { "44", "44%" },
+ { "46", "46%" },
+ { "48", "48%" },
+ { "50", "50%" },
+ { "52", "52%" },
+ { "54", "54%" },
+ { "56", "56%" },
+ { "58", "58%" },
+ { "60", "60%" },
+ { "62", "62%" },
+ { "64", "64%" },
+ { "66", "66%" },
+ { "68", "68%" },
+ { "70", "70%" },
+ { "72", "72%" },
+ { "74", "74%" },
+ { "76", "76%" },
+ { "78", "78%" },
+ { "80", "80%" },
+ { "82", "82%" },
+ { "84", "84%" },
+ { "86", "86%" },
+ { "88", "88%" },
+ { "90", "90%" },
+ { "92", "92%" },
+ { "94", "94%" },
+ { "96", "96%" },
+ { "98", "98%" },
+ { "100", "100%" },
+ { "102", "102%" },
+ { "104", "104%" },
+ { "106", "106%" },
+ { "108", "108%" },
+ { "110", "110%" },
+ { "112", "112%" },
+ { "114", "114%" },
+ { "116", "116%" },
+ { "118", "118%" },
+ { "120", "120%" },
+ { "122", "122%" },
+ { "124", "124%" },
+ { "126", "126%" },
+ { "128", "128%" },
+ { "130", "130%" },
+ { "132", "132%" },
+ { "134", "134%" },
+ { "136", "136%" },
+ { "138", "138%" },
+ { "140", "140%" },
+ { "142", "142%" },
+ { "144", "144%" },
+ { "146", "146%" },
+ { "148", "148%" },
+ { "150", "150%" },
+ { "152", "152%" },
+ { "154", "154%" },
+ { "156", "156%" },
+ { "158", "158%" },
+ { "160", "160%" },
+ { "162", "162%" },
+ { "164", "164%" },
+ { "166", "166%" },
+ { "168", "168%" },
+ { "170", "170%" },
+ { "172", "172%" },
+ { "174", "174%" },
+ { "176", "176%" },
+ { "178", "178%" },
+ { "180", "180%" },
+ { "182", "182%" },
+ { "184", "184%" },
+ { "186", "186%" },
+ { "188", "188%" },
+ { "190", "190%" },
+ { "192", "192%" },
+ { "194", "194%" },
+ { "196", "196%" },
+ { "198", "198%" },
+ { "200", "200%" },
{ NULL, NULL },
},
"100"
@@ -1008,17 +1864,107 @@ struct retro_core_option_v2_definition option_defs_us[] = {
NULL,
"channel_volume",
{
- { "0", NULL },
- { "10", NULL },
- { "20", NULL },
- { "30", NULL },
- { "40", NULL },
- { "50", NULL },
- { "60", NULL },
- { "70", NULL },
- { "80", NULL },
- { "90", NULL },
- { "100", NULL },
+ { "0", "0%" },
+ { "2", "2%" },
+ { "4", "4%" },
+ { "6", "6%" },
+ { "8", "8%" },
+ { "10", "10%" },
+ { "12", "12%" },
+ { "14", "14%" },
+ { "16", "16%" },
+ { "18", "18%" },
+ { "20", "20%" },
+ { "22", "22%" },
+ { "24", "24%" },
+ { "26", "26%" },
+ { "28", "28%" },
+ { "30", "30%" },
+ { "32", "32%" },
+ { "34", "34%" },
+ { "36", "36%" },
+ { "38", "38%" },
+ { "40", "40%" },
+ { "42", "42%" },
+ { "44", "44%" },
+ { "46", "46%" },
+ { "48", "48%" },
+ { "50", "50%" },
+ { "52", "52%" },
+ { "54", "54%" },
+ { "56", "56%" },
+ { "58", "58%" },
+ { "60", "60%" },
+ { "62", "62%" },
+ { "64", "64%" },
+ { "66", "66%" },
+ { "68", "68%" },
+ { "70", "70%" },
+ { "72", "72%" },
+ { "74", "74%" },
+ { "76", "76%" },
+ { "78", "78%" },
+ { "80", "80%" },
+ { "82", "82%" },
+ { "84", "84%" },
+ { "86", "86%" },
+ { "88", "88%" },
+ { "90", "90%" },
+ { "92", "92%" },
+ { "94", "94%" },
+ { "96", "96%" },
+ { "98", "98%" },
+ { "100", "100%" },
+ { "102", "102%" },
+ { "104", "104%" },
+ { "106", "106%" },
+ { "108", "108%" },
+ { "110", "110%" },
+ { "112", "112%" },
+ { "114", "114%" },
+ { "116", "116%" },
+ { "118", "118%" },
+ { "120", "120%" },
+ { "122", "122%" },
+ { "124", "124%" },
+ { "126", "126%" },
+ { "128", "128%" },
+ { "130", "130%" },
+ { "132", "132%" },
+ { "134", "134%" },
+ { "136", "136%" },
+ { "138", "138%" },
+ { "140", "140%" },
+ { "142", "142%" },
+ { "144", "144%" },
+ { "146", "146%" },
+ { "148", "148%" },
+ { "150", "150%" },
+ { "152", "152%" },
+ { "154", "154%" },
+ { "156", "156%" },
+ { "158", "158%" },
+ { "160", "160%" },
+ { "162", "162%" },
+ { "164", "164%" },
+ { "166", "166%" },
+ { "168", "168%" },
+ { "170", "170%" },
+ { "172", "172%" },
+ { "174", "174%" },
+ { "176", "176%" },
+ { "178", "178%" },
+ { "180", "180%" },
+ { "182", "182%" },
+ { "184", "184%" },
+ { "186", "186%" },
+ { "188", "188%" },
+ { "190", "190%" },
+ { "192", "192%" },
+ { "194", "194%" },
+ { "196", "196%" },
+ { "198", "198%" },
+ { "200", "200%" },
{ NULL, NULL },
},
"100"
@@ -1031,17 +1977,107 @@ struct retro_core_option_v2_definition option_defs_us[] = {
NULL,
"channel_volume",
{
- { "0", NULL },
- { "10", NULL },
- { "20", NULL },
- { "30", NULL },
- { "40", NULL },
- { "50", NULL },
- { "60", NULL },
- { "70", NULL },
- { "80", NULL },
- { "90", NULL },
- { "100", NULL },
+ { "0", "0%" },
+ { "2", "2%" },
+ { "4", "4%" },
+ { "6", "6%" },
+ { "8", "8%" },
+ { "10", "10%" },
+ { "12", "12%" },
+ { "14", "14%" },
+ { "16", "16%" },
+ { "18", "18%" },
+ { "20", "20%" },
+ { "22", "22%" },
+ { "24", "24%" },
+ { "26", "26%" },
+ { "28", "28%" },
+ { "30", "30%" },
+ { "32", "32%" },
+ { "34", "34%" },
+ { "36", "36%" },
+ { "38", "38%" },
+ { "40", "40%" },
+ { "42", "42%" },
+ { "44", "44%" },
+ { "46", "46%" },
+ { "48", "48%" },
+ { "50", "50%" },
+ { "52", "52%" },
+ { "54", "54%" },
+ { "56", "56%" },
+ { "58", "58%" },
+ { "60", "60%" },
+ { "62", "62%" },
+ { "64", "64%" },
+ { "66", "66%" },
+ { "68", "68%" },
+ { "70", "70%" },
+ { "72", "72%" },
+ { "74", "74%" },
+ { "76", "76%" },
+ { "78", "78%" },
+ { "80", "80%" },
+ { "82", "82%" },
+ { "84", "84%" },
+ { "86", "86%" },
+ { "88", "88%" },
+ { "90", "90%" },
+ { "92", "92%" },
+ { "94", "94%" },
+ { "96", "96%" },
+ { "98", "98%" },
+ { "100", "100%" },
+ { "102", "102%" },
+ { "104", "104%" },
+ { "106", "106%" },
+ { "108", "108%" },
+ { "110", "110%" },
+ { "112", "112%" },
+ { "114", "114%" },
+ { "116", "116%" },
+ { "118", "118%" },
+ { "120", "120%" },
+ { "122", "122%" },
+ { "124", "124%" },
+ { "126", "126%" },
+ { "128", "128%" },
+ { "130", "130%" },
+ { "132", "132%" },
+ { "134", "134%" },
+ { "136", "136%" },
+ { "138", "138%" },
+ { "140", "140%" },
+ { "142", "142%" },
+ { "144", "144%" },
+ { "146", "146%" },
+ { "148", "148%" },
+ { "150", "150%" },
+ { "152", "152%" },
+ { "154", "154%" },
+ { "156", "156%" },
+ { "158", "158%" },
+ { "160", "160%" },
+ { "162", "162%" },
+ { "164", "164%" },
+ { "166", "166%" },
+ { "168", "168%" },
+ { "170", "170%" },
+ { "172", "172%" },
+ { "174", "174%" },
+ { "176", "176%" },
+ { "178", "178%" },
+ { "180", "180%" },
+ { "182", "182%" },
+ { "184", "184%" },
+ { "186", "186%" },
+ { "188", "188%" },
+ { "190", "190%" },
+ { "192", "192%" },
+ { "194", "194%" },
+ { "196", "196%" },
+ { "198", "198%" },
+ { "200", "200%" },
{ NULL, NULL },
},
"100"
@@ -1054,17 +2090,107 @@ struct retro_core_option_v2_definition option_defs_us[] = {
NULL,
"channel_volume",
{
- { "0", NULL },
- { "10", NULL },
- { "20", NULL },
- { "30", NULL },
- { "40", NULL },
- { "50", NULL },
- { "60", NULL },
- { "70", NULL },
- { "80", NULL },
- { "90", NULL },
- { "100", NULL },
+ { "0", "0%" },
+ { "2", "2%" },
+ { "4", "4%" },
+ { "6", "6%" },
+ { "8", "8%" },
+ { "10", "10%" },
+ { "12", "12%" },
+ { "14", "14%" },
+ { "16", "16%" },
+ { "18", "18%" },
+ { "20", "20%" },
+ { "22", "22%" },
+ { "24", "24%" },
+ { "26", "26%" },
+ { "28", "28%" },
+ { "30", "30%" },
+ { "32", "32%" },
+ { "34", "34%" },
+ { "36", "36%" },
+ { "38", "38%" },
+ { "40", "40%" },
+ { "42", "42%" },
+ { "44", "44%" },
+ { "46", "46%" },
+ { "48", "48%" },
+ { "50", "50%" },
+ { "52", "52%" },
+ { "54", "54%" },
+ { "56", "56%" },
+ { "58", "58%" },
+ { "60", "60%" },
+ { "62", "62%" },
+ { "64", "64%" },
+ { "66", "66%" },
+ { "68", "68%" },
+ { "70", "70%" },
+ { "72", "72%" },
+ { "74", "74%" },
+ { "76", "76%" },
+ { "78", "78%" },
+ { "80", "80%" },
+ { "82", "82%" },
+ { "84", "84%" },
+ { "86", "86%" },
+ { "88", "88%" },
+ { "90", "90%" },
+ { "92", "92%" },
+ { "94", "94%" },
+ { "96", "96%" },
+ { "98", "98%" },
+ { "100", "100%" },
+ { "102", "102%" },
+ { "104", "104%" },
+ { "106", "106%" },
+ { "108", "108%" },
+ { "110", "110%" },
+ { "112", "112%" },
+ { "114", "114%" },
+ { "116", "116%" },
+ { "118", "118%" },
+ { "120", "120%" },
+ { "122", "122%" },
+ { "124", "124%" },
+ { "126", "126%" },
+ { "128", "128%" },
+ { "130", "130%" },
+ { "132", "132%" },
+ { "134", "134%" },
+ { "136", "136%" },
+ { "138", "138%" },
+ { "140", "140%" },
+ { "142", "142%" },
+ { "144", "144%" },
+ { "146", "146%" },
+ { "148", "148%" },
+ { "150", "150%" },
+ { "152", "152%" },
+ { "154", "154%" },
+ { "156", "156%" },
+ { "158", "158%" },
+ { "160", "160%" },
+ { "162", "162%" },
+ { "164", "164%" },
+ { "166", "166%" },
+ { "168", "168%" },
+ { "170", "170%" },
+ { "172", "172%" },
+ { "174", "174%" },
+ { "176", "176%" },
+ { "178", "178%" },
+ { "180", "180%" },
+ { "182", "182%" },
+ { "184", "184%" },
+ { "186", "186%" },
+ { "188", "188%" },
+ { "190", "190%" },
+ { "192", "192%" },
+ { "194", "194%" },
+ { "196", "196%" },
+ { "198", "198%" },
+ { "200", "200%" },
{ NULL, NULL },
},
"100"
@@ -1077,17 +2203,107 @@ struct retro_core_option_v2_definition option_defs_us[] = {
NULL,
"channel_volume",
{
- { "0", NULL },
- { "10", NULL },
- { "20", NULL },
- { "30", NULL },
- { "40", NULL },
- { "50", NULL },
- { "60", NULL },
- { "70", NULL },
- { "80", NULL },
- { "90", NULL },
- { "100", NULL },
+ { "0", "0%" },
+ { "2", "2%" },
+ { "4", "4%" },
+ { "6", "6%" },
+ { "8", "8%" },
+ { "10", "10%" },
+ { "12", "12%" },
+ { "14", "14%" },
+ { "16", "16%" },
+ { "18", "18%" },
+ { "20", "20%" },
+ { "22", "22%" },
+ { "24", "24%" },
+ { "26", "26%" },
+ { "28", "28%" },
+ { "30", "30%" },
+ { "32", "32%" },
+ { "34", "34%" },
+ { "36", "36%" },
+ { "38", "38%" },
+ { "40", "40%" },
+ { "42", "42%" },
+ { "44", "44%" },
+ { "46", "46%" },
+ { "48", "48%" },
+ { "50", "50%" },
+ { "52", "52%" },
+ { "54", "54%" },
+ { "56", "56%" },
+ { "58", "58%" },
+ { "60", "60%" },
+ { "62", "62%" },
+ { "64", "64%" },
+ { "66", "66%" },
+ { "68", "68%" },
+ { "70", "70%" },
+ { "72", "72%" },
+ { "74", "74%" },
+ { "76", "76%" },
+ { "78", "78%" },
+ { "80", "80%" },
+ { "82", "82%" },
+ { "84", "84%" },
+ { "86", "86%" },
+ { "88", "88%" },
+ { "90", "90%" },
+ { "92", "92%" },
+ { "94", "94%" },
+ { "96", "96%" },
+ { "98", "98%" },
+ { "100", "100%" },
+ { "102", "102%" },
+ { "104", "104%" },
+ { "106", "106%" },
+ { "108", "108%" },
+ { "110", "110%" },
+ { "112", "112%" },
+ { "114", "114%" },
+ { "116", "116%" },
+ { "118", "118%" },
+ { "120", "120%" },
+ { "122", "122%" },
+ { "124", "124%" },
+ { "126", "126%" },
+ { "128", "128%" },
+ { "130", "130%" },
+ { "132", "132%" },
+ { "134", "134%" },
+ { "136", "136%" },
+ { "138", "138%" },
+ { "140", "140%" },
+ { "142", "142%" },
+ { "144", "144%" },
+ { "146", "146%" },
+ { "148", "148%" },
+ { "150", "150%" },
+ { "152", "152%" },
+ { "154", "154%" },
+ { "156", "156%" },
+ { "158", "158%" },
+ { "160", "160%" },
+ { "162", "162%" },
+ { "164", "164%" },
+ { "166", "166%" },
+ { "168", "168%" },
+ { "170", "170%" },
+ { "172", "172%" },
+ { "174", "174%" },
+ { "176", "176%" },
+ { "178", "178%" },
+ { "180", "180%" },
+ { "182", "182%" },
+ { "184", "184%" },
+ { "186", "186%" },
+ { "188", "188%" },
+ { "190", "190%" },
+ { "192", "192%" },
+ { "194", "194%" },
+ { "196", "196%" },
+ { "198", "198%" },
+ { "200", "200%" },
{ NULL, NULL },
},
"100"
@@ -1100,17 +2316,107 @@ struct retro_core_option_v2_definition option_defs_us[] = {
NULL,
"channel_volume",
{
- { "0", NULL },
- { "10", NULL },
- { "20", NULL },
- { "30", NULL },
- { "40", NULL },
- { "50", NULL },
- { "60", NULL },
- { "70", NULL },
- { "80", NULL },
- { "90", NULL },
- { "100", NULL },
+ { "0", "0%" },
+ { "2", "2%" },
+ { "4", "4%" },
+ { "6", "6%" },
+ { "8", "8%" },
+ { "10", "10%" },
+ { "12", "12%" },
+ { "14", "14%" },
+ { "16", "16%" },
+ { "18", "18%" },
+ { "20", "20%" },
+ { "22", "22%" },
+ { "24", "24%" },
+ { "26", "26%" },
+ { "28", "28%" },
+ { "30", "30%" },
+ { "32", "32%" },
+ { "34", "34%" },
+ { "36", "36%" },
+ { "38", "38%" },
+ { "40", "40%" },
+ { "42", "42%" },
+ { "44", "44%" },
+ { "46", "46%" },
+ { "48", "48%" },
+ { "50", "50%" },
+ { "52", "52%" },
+ { "54", "54%" },
+ { "56", "56%" },
+ { "58", "58%" },
+ { "60", "60%" },
+ { "62", "62%" },
+ { "64", "64%" },
+ { "66", "66%" },
+ { "68", "68%" },
+ { "70", "70%" },
+ { "72", "72%" },
+ { "74", "74%" },
+ { "76", "76%" },
+ { "78", "78%" },
+ { "80", "80%" },
+ { "82", "82%" },
+ { "84", "84%" },
+ { "86", "86%" },
+ { "88", "88%" },
+ { "90", "90%" },
+ { "92", "92%" },
+ { "94", "94%" },
+ { "96", "96%" },
+ { "98", "98%" },
+ { "100", "100%" },
+ { "102", "102%" },
+ { "104", "104%" },
+ { "106", "106%" },
+ { "108", "108%" },
+ { "110", "110%" },
+ { "112", "112%" },
+ { "114", "114%" },
+ { "116", "116%" },
+ { "118", "118%" },
+ { "120", "120%" },
+ { "122", "122%" },
+ { "124", "124%" },
+ { "126", "126%" },
+ { "128", "128%" },
+ { "130", "130%" },
+ { "132", "132%" },
+ { "134", "134%" },
+ { "136", "136%" },
+ { "138", "138%" },
+ { "140", "140%" },
+ { "142", "142%" },
+ { "144", "144%" },
+ { "146", "146%" },
+ { "148", "148%" },
+ { "150", "150%" },
+ { "152", "152%" },
+ { "154", "154%" },
+ { "156", "156%" },
+ { "158", "158%" },
+ { "160", "160%" },
+ { "162", "162%" },
+ { "164", "164%" },
+ { "166", "166%" },
+ { "168", "168%" },
+ { "170", "170%" },
+ { "172", "172%" },
+ { "174", "174%" },
+ { "176", "176%" },
+ { "178", "178%" },
+ { "180", "180%" },
+ { "182", "182%" },
+ { "184", "184%" },
+ { "186", "186%" },
+ { "188", "188%" },
+ { "190", "190%" },
+ { "192", "192%" },
+ { "194", "194%" },
+ { "196", "196%" },
+ { "198", "198%" },
+ { "200", "200%" },
{ NULL, NULL },
},
"100"
@@ -1123,17 +2429,107 @@ struct retro_core_option_v2_definition option_defs_us[] = {
NULL,
"channel_volume",
{
- { "0", NULL },
- { "10", NULL },
- { "20", NULL },
- { "30", NULL },
- { "40", NULL },
- { "50", NULL },
- { "60", NULL },
- { "70", NULL },
- { "80", NULL },
- { "90", NULL },
- { "100", NULL },
+ { "0", "0%" },
+ { "2", "2%" },
+ { "4", "4%" },
+ { "6", "6%" },
+ { "8", "8%" },
+ { "10", "10%" },
+ { "12", "12%" },
+ { "14", "14%" },
+ { "16", "16%" },
+ { "18", "18%" },
+ { "20", "20%" },
+ { "22", "22%" },
+ { "24", "24%" },
+ { "26", "26%" },
+ { "28", "28%" },
+ { "30", "30%" },
+ { "32", "32%" },
+ { "34", "34%" },
+ { "36", "36%" },
+ { "38", "38%" },
+ { "40", "40%" },
+ { "42", "42%" },
+ { "44", "44%" },
+ { "46", "46%" },
+ { "48", "48%" },
+ { "50", "50%" },
+ { "52", "52%" },
+ { "54", "54%" },
+ { "56", "56%" },
+ { "58", "58%" },
+ { "60", "60%" },
+ { "62", "62%" },
+ { "64", "64%" },
+ { "66", "66%" },
+ { "68", "68%" },
+ { "70", "70%" },
+ { "72", "72%" },
+ { "74", "74%" },
+ { "76", "76%" },
+ { "78", "78%" },
+ { "80", "80%" },
+ { "82", "82%" },
+ { "84", "84%" },
+ { "86", "86%" },
+ { "88", "88%" },
+ { "90", "90%" },
+ { "92", "92%" },
+ { "94", "94%" },
+ { "96", "96%" },
+ { "98", "98%" },
+ { "100", "100%" },
+ { "102", "102%" },
+ { "104", "104%" },
+ { "106", "106%" },
+ { "108", "108%" },
+ { "110", "110%" },
+ { "112", "112%" },
+ { "114", "114%" },
+ { "116", "116%" },
+ { "118", "118%" },
+ { "120", "120%" },
+ { "122", "122%" },
+ { "124", "124%" },
+ { "126", "126%" },
+ { "128", "128%" },
+ { "130", "130%" },
+ { "132", "132%" },
+ { "134", "134%" },
+ { "136", "136%" },
+ { "138", "138%" },
+ { "140", "140%" },
+ { "142", "142%" },
+ { "144", "144%" },
+ { "146", "146%" },
+ { "148", "148%" },
+ { "150", "150%" },
+ { "152", "152%" },
+ { "154", "154%" },
+ { "156", "156%" },
+ { "158", "158%" },
+ { "160", "160%" },
+ { "162", "162%" },
+ { "164", "164%" },
+ { "166", "166%" },
+ { "168", "168%" },
+ { "170", "170%" },
+ { "172", "172%" },
+ { "174", "174%" },
+ { "176", "176%" },
+ { "178", "178%" },
+ { "180", "180%" },
+ { "182", "182%" },
+ { "184", "184%" },
+ { "186", "186%" },
+ { "188", "188%" },
+ { "190", "190%" },
+ { "192", "192%" },
+ { "194", "194%" },
+ { "196", "196%" },
+ { "198", "198%" },
+ { "200", "200%" },
{ NULL, NULL },
},
"100"
@@ -1146,17 +2542,107 @@ struct retro_core_option_v2_definition option_defs_us[] = {
NULL,
"channel_volume",
{
- { "0", NULL },
- { "10", NULL },
- { "20", NULL },
- { "30", NULL },
- { "40", NULL },
- { "50", NULL },
- { "60", NULL },
- { "70", NULL },
- { "80", NULL },
- { "90", NULL },
- { "100", NULL },
+ { "0", "0%" },
+ { "2", "2%" },
+ { "4", "4%" },
+ { "6", "6%" },
+ { "8", "8%" },
+ { "10", "10%" },
+ { "12", "12%" },
+ { "14", "14%" },
+ { "16", "16%" },
+ { "18", "18%" },
+ { "20", "20%" },
+ { "22", "22%" },
+ { "24", "24%" },
+ { "26", "26%" },
+ { "28", "28%" },
+ { "30", "30%" },
+ { "32", "32%" },
+ { "34", "34%" },
+ { "36", "36%" },
+ { "38", "38%" },
+ { "40", "40%" },
+ { "42", "42%" },
+ { "44", "44%" },
+ { "46", "46%" },
+ { "48", "48%" },
+ { "50", "50%" },
+ { "52", "52%" },
+ { "54", "54%" },
+ { "56", "56%" },
+ { "58", "58%" },
+ { "60", "60%" },
+ { "62", "62%" },
+ { "64", "64%" },
+ { "66", "66%" },
+ { "68", "68%" },
+ { "70", "70%" },
+ { "72", "72%" },
+ { "74", "74%" },
+ { "76", "76%" },
+ { "78", "78%" },
+ { "80", "80%" },
+ { "82", "82%" },
+ { "84", "84%" },
+ { "86", "86%" },
+ { "88", "88%" },
+ { "90", "90%" },
+ { "92", "92%" },
+ { "94", "94%" },
+ { "96", "96%" },
+ { "98", "98%" },
+ { "100", "100%" },
+ { "102", "102%" },
+ { "104", "104%" },
+ { "106", "106%" },
+ { "108", "108%" },
+ { "110", "110%" },
+ { "112", "112%" },
+ { "114", "114%" },
+ { "116", "116%" },
+ { "118", "118%" },
+ { "120", "120%" },
+ { "122", "122%" },
+ { "124", "124%" },
+ { "126", "126%" },
+ { "128", "128%" },
+ { "130", "130%" },
+ { "132", "132%" },
+ { "134", "134%" },
+ { "136", "136%" },
+ { "138", "138%" },
+ { "140", "140%" },
+ { "142", "142%" },
+ { "144", "144%" },
+ { "146", "146%" },
+ { "148", "148%" },
+ { "150", "150%" },
+ { "152", "152%" },
+ { "154", "154%" },
+ { "156", "156%" },
+ { "158", "158%" },
+ { "160", "160%" },
+ { "162", "162%" },
+ { "164", "164%" },
+ { "166", "166%" },
+ { "168", "168%" },
+ { "170", "170%" },
+ { "172", "172%" },
+ { "174", "174%" },
+ { "176", "176%" },
+ { "178", "178%" },
+ { "180", "180%" },
+ { "182", "182%" },
+ { "184", "184%" },
+ { "186", "186%" },
+ { "188", "188%" },
+ { "190", "190%" },
+ { "192", "192%" },
+ { "194", "194%" },
+ { "196", "196%" },
+ { "198", "198%" },
+ { "200", "200%" },
{ NULL, NULL },
},
"100"
@@ -1169,17 +2655,107 @@ struct retro_core_option_v2_definition option_defs_us[] = {
NULL,
"channel_volume",
{
- { "0", NULL },
- { "10", NULL },
- { "20", NULL },
- { "30", NULL },
- { "40", NULL },
- { "50", NULL },
- { "60", NULL },
- { "70", NULL },
- { "80", NULL },
- { "90", NULL },
- { "100", NULL },
+ { "0", "0%" },
+ { "2", "2%" },
+ { "4", "4%" },
+ { "6", "6%" },
+ { "8", "8%" },
+ { "10", "10%" },
+ { "12", "12%" },
+ { "14", "14%" },
+ { "16", "16%" },
+ { "18", "18%" },
+ { "20", "20%" },
+ { "22", "22%" },
+ { "24", "24%" },
+ { "26", "26%" },
+ { "28", "28%" },
+ { "30", "30%" },
+ { "32", "32%" },
+ { "34", "34%" },
+ { "36", "36%" },
+ { "38", "38%" },
+ { "40", "40%" },
+ { "42", "42%" },
+ { "44", "44%" },
+ { "46", "46%" },
+ { "48", "48%" },
+ { "50", "50%" },
+ { "52", "52%" },
+ { "54", "54%" },
+ { "56", "56%" },
+ { "58", "58%" },
+ { "60", "60%" },
+ { "62", "62%" },
+ { "64", "64%" },
+ { "66", "66%" },
+ { "68", "68%" },
+ { "70", "70%" },
+ { "72", "72%" },
+ { "74", "74%" },
+ { "76", "76%" },
+ { "78", "78%" },
+ { "80", "80%" },
+ { "82", "82%" },
+ { "84", "84%" },
+ { "86", "86%" },
+ { "88", "88%" },
+ { "90", "90%" },
+ { "92", "92%" },
+ { "94", "94%" },
+ { "96", "96%" },
+ { "98", "98%" },
+ { "100", "100%" },
+ { "102", "102%" },
+ { "104", "104%" },
+ { "106", "106%" },
+ { "108", "108%" },
+ { "110", "110%" },
+ { "112", "112%" },
+ { "114", "114%" },
+ { "116", "116%" },
+ { "118", "118%" },
+ { "120", "120%" },
+ { "122", "122%" },
+ { "124", "124%" },
+ { "126", "126%" },
+ { "128", "128%" },
+ { "130", "130%" },
+ { "132", "132%" },
+ { "134", "134%" },
+ { "136", "136%" },
+ { "138", "138%" },
+ { "140", "140%" },
+ { "142", "142%" },
+ { "144", "144%" },
+ { "146", "146%" },
+ { "148", "148%" },
+ { "150", "150%" },
+ { "152", "152%" },
+ { "154", "154%" },
+ { "156", "156%" },
+ { "158", "158%" },
+ { "160", "160%" },
+ { "162", "162%" },
+ { "164", "164%" },
+ { "166", "166%" },
+ { "168", "168%" },
+ { "170", "170%" },
+ { "172", "172%" },
+ { "174", "174%" },
+ { "176", "176%" },
+ { "178", "178%" },
+ { "180", "180%" },
+ { "182", "182%" },
+ { "184", "184%" },
+ { "186", "186%" },
+ { "188", "188%" },
+ { "190", "190%" },
+ { "192", "192%" },
+ { "194", "194%" },
+ { "196", "196%" },
+ { "198", "198%" },
+ { "200", "200%" },
{ NULL, NULL },
},
"100"
@@ -1192,17 +2768,107 @@ struct retro_core_option_v2_definition option_defs_us[] = {
NULL,
"channel_volume",
{
- { "0", NULL },
- { "10", NULL },
- { "20", NULL },
- { "30", NULL },
- { "40", NULL },
- { "50", NULL },
- { "60", NULL },
- { "70", NULL },
- { "80", NULL },
- { "90", NULL },
- { "100", NULL },
+ { "0", "0%" },
+ { "2", "2%" },
+ { "4", "4%" },
+ { "6", "6%" },
+ { "8", "8%" },
+ { "10", "10%" },
+ { "12", "12%" },
+ { "14", "14%" },
+ { "16", "16%" },
+ { "18", "18%" },
+ { "20", "20%" },
+ { "22", "22%" },
+ { "24", "24%" },
+ { "26", "26%" },
+ { "28", "28%" },
+ { "30", "30%" },
+ { "32", "32%" },
+ { "34", "34%" },
+ { "36", "36%" },
+ { "38", "38%" },
+ { "40", "40%" },
+ { "42", "42%" },
+ { "44", "44%" },
+ { "46", "46%" },
+ { "48", "48%" },
+ { "50", "50%" },
+ { "52", "52%" },
+ { "54", "54%" },
+ { "56", "56%" },
+ { "58", "58%" },
+ { "60", "60%" },
+ { "62", "62%" },
+ { "64", "64%" },
+ { "66", "66%" },
+ { "68", "68%" },
+ { "70", "70%" },
+ { "72", "72%" },
+ { "74", "74%" },
+ { "76", "76%" },
+ { "78", "78%" },
+ { "80", "80%" },
+ { "82", "82%" },
+ { "84", "84%" },
+ { "86", "86%" },
+ { "88", "88%" },
+ { "90", "90%" },
+ { "92", "92%" },
+ { "94", "94%" },
+ { "96", "96%" },
+ { "98", "98%" },
+ { "100", "100%" },
+ { "102", "102%" },
+ { "104", "104%" },
+ { "106", "106%" },
+ { "108", "108%" },
+ { "110", "110%" },
+ { "112", "112%" },
+ { "114", "114%" },
+ { "116", "116%" },
+ { "118", "118%" },
+ { "120", "120%" },
+ { "122", "122%" },
+ { "124", "124%" },
+ { "126", "126%" },
+ { "128", "128%" },
+ { "130", "130%" },
+ { "132", "132%" },
+ { "134", "134%" },
+ { "136", "136%" },
+ { "138", "138%" },
+ { "140", "140%" },
+ { "142", "142%" },
+ { "144", "144%" },
+ { "146", "146%" },
+ { "148", "148%" },
+ { "150", "150%" },
+ { "152", "152%" },
+ { "154", "154%" },
+ { "156", "156%" },
+ { "158", "158%" },
+ { "160", "160%" },
+ { "162", "162%" },
+ { "164", "164%" },
+ { "166", "166%" },
+ { "168", "168%" },
+ { "170", "170%" },
+ { "172", "172%" },
+ { "174", "174%" },
+ { "176", "176%" },
+ { "178", "178%" },
+ { "180", "180%" },
+ { "182", "182%" },
+ { "184", "184%" },
+ { "186", "186%" },
+ { "188", "188%" },
+ { "190", "190%" },
+ { "192", "192%" },
+ { "194", "194%" },
+ { "196", "196%" },
+ { "198", "198%" },
+ { "200", "200%" },
{ NULL, NULL },
},
"100"
@@ -1215,17 +2881,107 @@ struct retro_core_option_v2_definition option_defs_us[] = {
NULL,
"channel_volume",
{
- { "0", NULL },
- { "10", NULL },
- { "20", NULL },
- { "30", NULL },
- { "40", NULL },
- { "50", NULL },
- { "60", NULL },
- { "70", NULL },
- { "80", NULL },
- { "90", NULL },
- { "100", NULL },
+ { "0", "0%" },
+ { "2", "2%" },
+ { "4", "4%" },
+ { "6", "6%" },
+ { "8", "8%" },
+ { "10", "10%" },
+ { "12", "12%" },
+ { "14", "14%" },
+ { "16", "16%" },
+ { "18", "18%" },
+ { "20", "20%" },
+ { "22", "22%" },
+ { "24", "24%" },
+ { "26", "26%" },
+ { "28", "28%" },
+ { "30", "30%" },
+ { "32", "32%" },
+ { "34", "34%" },
+ { "36", "36%" },
+ { "38", "38%" },
+ { "40", "40%" },
+ { "42", "42%" },
+ { "44", "44%" },
+ { "46", "46%" },
+ { "48", "48%" },
+ { "50", "50%" },
+ { "52", "52%" },
+ { "54", "54%" },
+ { "56", "56%" },
+ { "58", "58%" },
+ { "60", "60%" },
+ { "62", "62%" },
+ { "64", "64%" },
+ { "66", "66%" },
+ { "68", "68%" },
+ { "70", "70%" },
+ { "72", "72%" },
+ { "74", "74%" },
+ { "76", "76%" },
+ { "78", "78%" },
+ { "80", "80%" },
+ { "82", "82%" },
+ { "84", "84%" },
+ { "86", "86%" },
+ { "88", "88%" },
+ { "90", "90%" },
+ { "92", "92%" },
+ { "94", "94%" },
+ { "96", "96%" },
+ { "98", "98%" },
+ { "100", "100%" },
+ { "102", "102%" },
+ { "104", "104%" },
+ { "106", "106%" },
+ { "108", "108%" },
+ { "110", "110%" },
+ { "112", "112%" },
+ { "114", "114%" },
+ { "116", "116%" },
+ { "118", "118%" },
+ { "120", "120%" },
+ { "122", "122%" },
+ { "124", "124%" },
+ { "126", "126%" },
+ { "128", "128%" },
+ { "130", "130%" },
+ { "132", "132%" },
+ { "134", "134%" },
+ { "136", "136%" },
+ { "138", "138%" },
+ { "140", "140%" },
+ { "142", "142%" },
+ { "144", "144%" },
+ { "146", "146%" },
+ { "148", "148%" },
+ { "150", "150%" },
+ { "152", "152%" },
+ { "154", "154%" },
+ { "156", "156%" },
+ { "158", "158%" },
+ { "160", "160%" },
+ { "162", "162%" },
+ { "164", "164%" },
+ { "166", "166%" },
+ { "168", "168%" },
+ { "170", "170%" },
+ { "172", "172%" },
+ { "174", "174%" },
+ { "176", "176%" },
+ { "178", "178%" },
+ { "180", "180%" },
+ { "182", "182%" },
+ { "184", "184%" },
+ { "186", "186%" },
+ { "188", "188%" },
+ { "190", "190%" },
+ { "192", "192%" },
+ { "194", "194%" },
+ { "196", "196%" },
+ { "198", "198%" },
+ { "200", "200%" },
{ NULL, NULL },
},
"100"
@@ -1238,17 +2994,107 @@ struct retro_core_option_v2_definition option_defs_us[] = {
NULL,
"channel_volume",
{
- { "0", NULL },
- { "10", NULL },
- { "20", NULL },
- { "30", NULL },
- { "40", NULL },
- { "50", NULL },
- { "60", NULL },
- { "70", NULL },
- { "80", NULL },
- { "90", NULL },
- { "100", NULL },
+ { "0", "0%" },
+ { "2", "2%" },
+ { "4", "4%" },
+ { "6", "6%" },
+ { "8", "8%" },
+ { "10", "10%" },
+ { "12", "12%" },
+ { "14", "14%" },
+ { "16", "16%" },
+ { "18", "18%" },
+ { "20", "20%" },
+ { "22", "22%" },
+ { "24", "24%" },
+ { "26", "26%" },
+ { "28", "28%" },
+ { "30", "30%" },
+ { "32", "32%" },
+ { "34", "34%" },
+ { "36", "36%" },
+ { "38", "38%" },
+ { "40", "40%" },
+ { "42", "42%" },
+ { "44", "44%" },
+ { "46", "46%" },
+ { "48", "48%" },
+ { "50", "50%" },
+ { "52", "52%" },
+ { "54", "54%" },
+ { "56", "56%" },
+ { "58", "58%" },
+ { "60", "60%" },
+ { "62", "62%" },
+ { "64", "64%" },
+ { "66", "66%" },
+ { "68", "68%" },
+ { "70", "70%" },
+ { "72", "72%" },
+ { "74", "74%" },
+ { "76", "76%" },
+ { "78", "78%" },
+ { "80", "80%" },
+ { "82", "82%" },
+ { "84", "84%" },
+ { "86", "86%" },
+ { "88", "88%" },
+ { "90", "90%" },
+ { "92", "92%" },
+ { "94", "94%" },
+ { "96", "96%" },
+ { "98", "98%" },
+ { "100", "100%" },
+ { "102", "102%" },
+ { "104", "104%" },
+ { "106", "106%" },
+ { "108", "108%" },
+ { "110", "110%" },
+ { "112", "112%" },
+ { "114", "114%" },
+ { "116", "116%" },
+ { "118", "118%" },
+ { "120", "120%" },
+ { "122", "122%" },
+ { "124", "124%" },
+ { "126", "126%" },
+ { "128", "128%" },
+ { "130", "130%" },
+ { "132", "132%" },
+ { "134", "134%" },
+ { "136", "136%" },
+ { "138", "138%" },
+ { "140", "140%" },
+ { "142", "142%" },
+ { "144", "144%" },
+ { "146", "146%" },
+ { "148", "148%" },
+ { "150", "150%" },
+ { "152", "152%" },
+ { "154", "154%" },
+ { "156", "156%" },
+ { "158", "158%" },
+ { "160", "160%" },
+ { "162", "162%" },
+ { "164", "164%" },
+ { "166", "166%" },
+ { "168", "168%" },
+ { "170", "170%" },
+ { "172", "172%" },
+ { "174", "174%" },
+ { "176", "176%" },
+ { "178", "178%" },
+ { "180", "180%" },
+ { "182", "182%" },
+ { "184", "184%" },
+ { "186", "186%" },
+ { "188", "188%" },
+ { "190", "190%" },
+ { "192", "192%" },
+ { "194", "194%" },
+ { "196", "196%" },
+ { "198", "198%" },
+ { "200", "200%" },
{ NULL, NULL },
},
"100"
@@ -1261,17 +3107,107 @@ struct retro_core_option_v2_definition option_defs_us[] = {
NULL,
"channel_volume",
{
- { "0", NULL },
- { "10", NULL },
- { "20", NULL },
- { "30", NULL },
- { "40", NULL },
- { "50", NULL },
- { "60", NULL },
- { "70", NULL },
- { "80", NULL },
- { "90", NULL },
- { "100", NULL },
+ { "0", "0%" },
+ { "2", "2%" },
+ { "4", "4%" },
+ { "6", "6%" },
+ { "8", "8%" },
+ { "10", "10%" },
+ { "12", "12%" },
+ { "14", "14%" },
+ { "16", "16%" },
+ { "18", "18%" },
+ { "20", "20%" },
+ { "22", "22%" },
+ { "24", "24%" },
+ { "26", "26%" },
+ { "28", "28%" },
+ { "30", "30%" },
+ { "32", "32%" },
+ { "34", "34%" },
+ { "36", "36%" },
+ { "38", "38%" },
+ { "40", "40%" },
+ { "42", "42%" },
+ { "44", "44%" },
+ { "46", "46%" },
+ { "48", "48%" },
+ { "50", "50%" },
+ { "52", "52%" },
+ { "54", "54%" },
+ { "56", "56%" },
+ { "58", "58%" },
+ { "60", "60%" },
+ { "62", "62%" },
+ { "64", "64%" },
+ { "66", "66%" },
+ { "68", "68%" },
+ { "70", "70%" },
+ { "72", "72%" },
+ { "74", "74%" },
+ { "76", "76%" },
+ { "78", "78%" },
+ { "80", "80%" },
+ { "82", "82%" },
+ { "84", "84%" },
+ { "86", "86%" },
+ { "88", "88%" },
+ { "90", "90%" },
+ { "92", "92%" },
+ { "94", "94%" },
+ { "96", "96%" },
+ { "98", "98%" },
+ { "100", "100%" },
+ { "102", "102%" },
+ { "104", "104%" },
+ { "106", "106%" },
+ { "108", "108%" },
+ { "110", "110%" },
+ { "112", "112%" },
+ { "114", "114%" },
+ { "116", "116%" },
+ { "118", "118%" },
+ { "120", "120%" },
+ { "122", "122%" },
+ { "124", "124%" },
+ { "126", "126%" },
+ { "128", "128%" },
+ { "130", "130%" },
+ { "132", "132%" },
+ { "134", "134%" },
+ { "136", "136%" },
+ { "138", "138%" },
+ { "140", "140%" },
+ { "142", "142%" },
+ { "144", "144%" },
+ { "146", "146%" },
+ { "148", "148%" },
+ { "150", "150%" },
+ { "152", "152%" },
+ { "154", "154%" },
+ { "156", "156%" },
+ { "158", "158%" },
+ { "160", "160%" },
+ { "162", "162%" },
+ { "164", "164%" },
+ { "166", "166%" },
+ { "168", "168%" },
+ { "170", "170%" },
+ { "172", "172%" },
+ { "174", "174%" },
+ { "176", "176%" },
+ { "178", "178%" },
+ { "180", "180%" },
+ { "182", "182%" },
+ { "184", "184%" },
+ { "186", "186%" },
+ { "188", "188%" },
+ { "190", "190%" },
+ { "192", "192%" },
+ { "194", "194%" },
+ { "196", "196%" },
+ { "198", "198%" },
+ { "200", "200%" },
{ NULL, NULL },
},
"100"
@@ -1284,17 +3220,107 @@ struct retro_core_option_v2_definition option_defs_us[] = {
NULL,
"channel_volume",
{
- { "0", NULL },
- { "10", NULL },
- { "20", NULL },
- { "30", NULL },
- { "40", NULL },
- { "50", NULL },
- { "60", NULL },
- { "70", NULL },
- { "80", NULL },
- { "90", NULL },
- { "100", NULL },
+ { "0", "0%" },
+ { "2", "2%" },
+ { "4", "4%" },
+ { "6", "6%" },
+ { "8", "8%" },
+ { "10", "10%" },
+ { "12", "12%" },
+ { "14", "14%" },
+ { "16", "16%" },
+ { "18", "18%" },
+ { "20", "20%" },
+ { "22", "22%" },
+ { "24", "24%" },
+ { "26", "26%" },
+ { "28", "28%" },
+ { "30", "30%" },
+ { "32", "32%" },
+ { "34", "34%" },
+ { "36", "36%" },
+ { "38", "38%" },
+ { "40", "40%" },
+ { "42", "42%" },
+ { "44", "44%" },
+ { "46", "46%" },
+ { "48", "48%" },
+ { "50", "50%" },
+ { "52", "52%" },
+ { "54", "54%" },
+ { "56", "56%" },
+ { "58", "58%" },
+ { "60", "60%" },
+ { "62", "62%" },
+ { "64", "64%" },
+ { "66", "66%" },
+ { "68", "68%" },
+ { "70", "70%" },
+ { "72", "72%" },
+ { "74", "74%" },
+ { "76", "76%" },
+ { "78", "78%" },
+ { "80", "80%" },
+ { "82", "82%" },
+ { "84", "84%" },
+ { "86", "86%" },
+ { "88", "88%" },
+ { "90", "90%" },
+ { "92", "92%" },
+ { "94", "94%" },
+ { "96", "96%" },
+ { "98", "98%" },
+ { "100", "100%" },
+ { "102", "102%" },
+ { "104", "104%" },
+ { "106", "106%" },
+ { "108", "108%" },
+ { "110", "110%" },
+ { "112", "112%" },
+ { "114", "114%" },
+ { "116", "116%" },
+ { "118", "118%" },
+ { "120", "120%" },
+ { "122", "122%" },
+ { "124", "124%" },
+ { "126", "126%" },
+ { "128", "128%" },
+ { "130", "130%" },
+ { "132", "132%" },
+ { "134", "134%" },
+ { "136", "136%" },
+ { "138", "138%" },
+ { "140", "140%" },
+ { "142", "142%" },
+ { "144", "144%" },
+ { "146", "146%" },
+ { "148", "148%" },
+ { "150", "150%" },
+ { "152", "152%" },
+ { "154", "154%" },
+ { "156", "156%" },
+ { "158", "158%" },
+ { "160", "160%" },
+ { "162", "162%" },
+ { "164", "164%" },
+ { "166", "166%" },
+ { "168", "168%" },
+ { "170", "170%" },
+ { "172", "172%" },
+ { "174", "174%" },
+ { "176", "176%" },
+ { "178", "178%" },
+ { "180", "180%" },
+ { "182", "182%" },
+ { "184", "184%" },
+ { "186", "186%" },
+ { "188", "188%" },
+ { "190", "190%" },
+ { "192", "192%" },
+ { "194", "194%" },
+ { "196", "196%" },
+ { "198", "198%" },
+ { "200", "200%" },
{ NULL, NULL },
},
"100"
@@ -1307,17 +3333,107 @@ struct retro_core_option_v2_definition option_defs_us[] = {
NULL,
"channel_volume",
{
- { "0", NULL },
- { "10", NULL },
- { "20", NULL },
- { "30", NULL },
- { "40", NULL },
- { "50", NULL },
- { "60", NULL },
- { "70", NULL },
- { "80", NULL },
- { "90", NULL },
- { "100", NULL },
+ { "0", "0%" },
+ { "2", "2%" },
+ { "4", "4%" },
+ { "6", "6%" },
+ { "8", "8%" },
+ { "10", "10%" },
+ { "12", "12%" },
+ { "14", "14%" },
+ { "16", "16%" },
+ { "18", "18%" },
+ { "20", "20%" },
+ { "22", "22%" },
+ { "24", "24%" },
+ { "26", "26%" },
+ { "28", "28%" },
+ { "30", "30%" },
+ { "32", "32%" },
+ { "34", "34%" },
+ { "36", "36%" },
+ { "38", "38%" },
+ { "40", "40%" },
+ { "42", "42%" },
+ { "44", "44%" },
+ { "46", "46%" },
+ { "48", "48%" },
+ { "50", "50%" },
+ { "52", "52%" },
+ { "54", "54%" },
+ { "56", "56%" },
+ { "58", "58%" },
+ { "60", "60%" },
+ { "62", "62%" },
+ { "64", "64%" },
+ { "66", "66%" },
+ { "68", "68%" },
+ { "70", "70%" },
+ { "72", "72%" },
+ { "74", "74%" },
+ { "76", "76%" },
+ { "78", "78%" },
+ { "80", "80%" },
+ { "82", "82%" },
+ { "84", "84%" },
+ { "86", "86%" },
+ { "88", "88%" },
+ { "90", "90%" },
+ { "92", "92%" },
+ { "94", "94%" },
+ { "96", "96%" },
+ { "98", "98%" },
+ { "100", "100%" },
+ { "102", "102%" },
+ { "104", "104%" },
+ { "106", "106%" },
+ { "108", "108%" },
+ { "110", "110%" },
+ { "112", "112%" },
+ { "114", "114%" },
+ { "116", "116%" },
+ { "118", "118%" },
+ { "120", "120%" },
+ { "122", "122%" },
+ { "124", "124%" },
+ { "126", "126%" },
+ { "128", "128%" },
+ { "130", "130%" },
+ { "132", "132%" },
+ { "134", "134%" },
+ { "136", "136%" },
+ { "138", "138%" },
+ { "140", "140%" },
+ { "142", "142%" },
+ { "144", "144%" },
+ { "146", "146%" },
+ { "148", "148%" },
+ { "150", "150%" },
+ { "152", "152%" },
+ { "154", "154%" },
+ { "156", "156%" },
+ { "158", "158%" },
+ { "160", "160%" },
+ { "162", "162%" },
+ { "164", "164%" },
+ { "166", "166%" },
+ { "168", "168%" },
+ { "170", "170%" },
+ { "172", "172%" },
+ { "174", "174%" },
+ { "176", "176%" },
+ { "178", "178%" },
+ { "180", "180%" },
+ { "182", "182%" },
+ { "184", "184%" },
+ { "186", "186%" },
+ { "188", "188%" },
+ { "190", "190%" },
+ { "192", "192%" },
+ { "194", "194%" },
+ { "196", "196%" },
+ { "198", "198%" },
+ { "200", "200%" },
{ NULL, NULL },
},
"100"
@@ -1330,17 +3446,107 @@ struct retro_core_option_v2_definition option_defs_us[] = {
NULL,
"channel_volume",
{
- { "0", NULL },
- { "10", NULL },
- { "20", NULL },
- { "30", NULL },
- { "40", NULL },
- { "50", NULL },
- { "60", NULL },
- { "70", NULL },
- { "80", NULL },
- { "90", NULL },
- { "100", NULL },
+ { "0", "0%" },
+ { "2", "2%" },
+ { "4", "4%" },
+ { "6", "6%" },
+ { "8", "8%" },
+ { "10", "10%" },
+ { "12", "12%" },
+ { "14", "14%" },
+ { "16", "16%" },
+ { "18", "18%" },
+ { "20", "20%" },
+ { "22", "22%" },
+ { "24", "24%" },
+ { "26", "26%" },
+ { "28", "28%" },
+ { "30", "30%" },
+ { "32", "32%" },
+ { "34", "34%" },
+ { "36", "36%" },
+ { "38", "38%" },
+ { "40", "40%" },
+ { "42", "42%" },
+ { "44", "44%" },
+ { "46", "46%" },
+ { "48", "48%" },
+ { "50", "50%" },
+ { "52", "52%" },
+ { "54", "54%" },
+ { "56", "56%" },
+ { "58", "58%" },
+ { "60", "60%" },
+ { "62", "62%" },
+ { "64", "64%" },
+ { "66", "66%" },
+ { "68", "68%" },
+ { "70", "70%" },
+ { "72", "72%" },
+ { "74", "74%" },
+ { "76", "76%" },
+ { "78", "78%" },
+ { "80", "80%" },
+ { "82", "82%" },
+ { "84", "84%" },
+ { "86", "86%" },
+ { "88", "88%" },
+ { "90", "90%" },
+ { "92", "92%" },
+ { "94", "94%" },
+ { "96", "96%" },
+ { "98", "98%" },
+ { "100", "100%" },
+ { "102", "102%" },
+ { "104", "104%" },
+ { "106", "106%" },
+ { "108", "108%" },
+ { "110", "110%" },
+ { "112", "112%" },
+ { "114", "114%" },
+ { "116", "116%" },
+ { "118", "118%" },
+ { "120", "120%" },
+ { "122", "122%" },
+ { "124", "124%" },
+ { "126", "126%" },
+ { "128", "128%" },
+ { "130", "130%" },
+ { "132", "132%" },
+ { "134", "134%" },
+ { "136", "136%" },
+ { "138", "138%" },
+ { "140", "140%" },
+ { "142", "142%" },
+ { "144", "144%" },
+ { "146", "146%" },
+ { "148", "148%" },
+ { "150", "150%" },
+ { "152", "152%" },
+ { "154", "154%" },
+ { "156", "156%" },
+ { "158", "158%" },
+ { "160", "160%" },
+ { "162", "162%" },
+ { "164", "164%" },
+ { "166", "166%" },
+ { "168", "168%" },
+ { "170", "170%" },
+ { "172", "172%" },
+ { "174", "174%" },
+ { "176", "176%" },
+ { "178", "178%" },
+ { "180", "180%" },
+ { "182", "182%" },
+ { "184", "184%" },
+ { "186", "186%" },
+ { "188", "188%" },
+ { "190", "190%" },
+ { "192", "192%" },
+ { "194", "194%" },
+ { "196", "196%" },
+ { "198", "198%" },
+ { "200", "200%" },
{ NULL, NULL },
},
"100"
@@ -1353,17 +3559,107 @@ struct retro_core_option_v2_definition option_defs_us[] = {
NULL,
"channel_volume",
{
- { "0", NULL },
- { "10", NULL },
- { "20", NULL },
- { "30", NULL },
- { "40", NULL },
- { "50", NULL },
- { "60", NULL },
- { "70", NULL },
- { "80", NULL },
- { "90", NULL },
- { "100", NULL },
+ { "0", "0%" },
+ { "2", "2%" },
+ { "4", "4%" },
+ { "6", "6%" },
+ { "8", "8%" },
+ { "10", "10%" },
+ { "12", "12%" },
+ { "14", "14%" },
+ { "16", "16%" },
+ { "18", "18%" },
+ { "20", "20%" },
+ { "22", "22%" },
+ { "24", "24%" },
+ { "26", "26%" },
+ { "28", "28%" },
+ { "30", "30%" },
+ { "32", "32%" },
+ { "34", "34%" },
+ { "36", "36%" },
+ { "38", "38%" },
+ { "40", "40%" },
+ { "42", "42%" },
+ { "44", "44%" },
+ { "46", "46%" },
+ { "48", "48%" },
+ { "50", "50%" },
+ { "52", "52%" },
+ { "54", "54%" },
+ { "56", "56%" },
+ { "58", "58%" },
+ { "60", "60%" },
+ { "62", "62%" },
+ { "64", "64%" },
+ { "66", "66%" },
+ { "68", "68%" },
+ { "70", "70%" },
+ { "72", "72%" },
+ { "74", "74%" },
+ { "76", "76%" },
+ { "78", "78%" },
+ { "80", "80%" },
+ { "82", "82%" },
+ { "84", "84%" },
+ { "86", "86%" },
+ { "88", "88%" },
+ { "90", "90%" },
+ { "92", "92%" },
+ { "94", "94%" },
+ { "96", "96%" },
+ { "98", "98%" },
+ { "100", "100%" },
+ { "102", "102%" },
+ { "104", "104%" },
+ { "106", "106%" },
+ { "108", "108%" },
+ { "110", "110%" },
+ { "112", "112%" },
+ { "114", "114%" },
+ { "116", "116%" },
+ { "118", "118%" },
+ { "120", "120%" },
+ { "122", "122%" },
+ { "124", "124%" },
+ { "126", "126%" },
+ { "128", "128%" },
+ { "130", "130%" },
+ { "132", "132%" },
+ { "134", "134%" },
+ { "136", "136%" },
+ { "138", "138%" },
+ { "140", "140%" },
+ { "142", "142%" },
+ { "144", "144%" },
+ { "146", "146%" },
+ { "148", "148%" },
+ { "150", "150%" },
+ { "152", "152%" },
+ { "154", "154%" },
+ { "156", "156%" },
+ { "158", "158%" },
+ { "160", "160%" },
+ { "162", "162%" },
+ { "164", "164%" },
+ { "166", "166%" },
+ { "168", "168%" },
+ { "170", "170%" },
+ { "172", "172%" },
+ { "174", "174%" },
+ { "176", "176%" },
+ { "178", "178%" },
+ { "180", "180%" },
+ { "182", "182%" },
+ { "184", "184%" },
+ { "186", "186%" },
+ { "188", "188%" },
+ { "190", "190%" },
+ { "192", "192%" },
+ { "194", "194%" },
+ { "196", "196%" },
+ { "198", "198%" },
+ { "200", "200%" },
{ NULL, NULL },
},
"100"
@@ -1376,17 +3672,107 @@ struct retro_core_option_v2_definition option_defs_us[] = {
NULL,
"channel_volume",
{
- { "0", NULL },
- { "10", NULL },
- { "20", NULL },
- { "30", NULL },
- { "40", NULL },
- { "50", NULL },
- { "60", NULL },
- { "70", NULL },
- { "80", NULL },
- { "90", NULL },
- { "100", NULL },
+ { "0", "0%" },
+ { "2", "2%" },
+ { "4", "4%" },
+ { "6", "6%" },
+ { "8", "8%" },
+ { "10", "10%" },
+ { "12", "12%" },
+ { "14", "14%" },
+ { "16", "16%" },
+ { "18", "18%" },
+ { "20", "20%" },
+ { "22", "22%" },
+ { "24", "24%" },
+ { "26", "26%" },
+ { "28", "28%" },
+ { "30", "30%" },
+ { "32", "32%" },
+ { "34", "34%" },
+ { "36", "36%" },
+ { "38", "38%" },
+ { "40", "40%" },
+ { "42", "42%" },
+ { "44", "44%" },
+ { "46", "46%" },
+ { "48", "48%" },
+ { "50", "50%" },
+ { "52", "52%" },
+ { "54", "54%" },
+ { "56", "56%" },
+ { "58", "58%" },
+ { "60", "60%" },
+ { "62", "62%" },
+ { "64", "64%" },
+ { "66", "66%" },
+ { "68", "68%" },
+ { "70", "70%" },
+ { "72", "72%" },
+ { "74", "74%" },
+ { "76", "76%" },
+ { "78", "78%" },
+ { "80", "80%" },
+ { "82", "82%" },
+ { "84", "84%" },
+ { "86", "86%" },
+ { "88", "88%" },
+ { "90", "90%" },
+ { "92", "92%" },
+ { "94", "94%" },
+ { "96", "96%" },
+ { "98", "98%" },
+ { "100", "100%" },
+ { "102", "102%" },
+ { "104", "104%" },
+ { "106", "106%" },
+ { "108", "108%" },
+ { "110", "110%" },
+ { "112", "112%" },
+ { "114", "114%" },
+ { "116", "116%" },
+ { "118", "118%" },
+ { "120", "120%" },
+ { "122", "122%" },
+ { "124", "124%" },
+ { "126", "126%" },
+ { "128", "128%" },
+ { "130", "130%" },
+ { "132", "132%" },
+ { "134", "134%" },
+ { "136", "136%" },
+ { "138", "138%" },
+ { "140", "140%" },
+ { "142", "142%" },
+ { "144", "144%" },
+ { "146", "146%" },
+ { "148", "148%" },
+ { "150", "150%" },
+ { "152", "152%" },
+ { "154", "154%" },
+ { "156", "156%" },
+ { "158", "158%" },
+ { "160", "160%" },
+ { "162", "162%" },
+ { "164", "164%" },
+ { "166", "166%" },
+ { "168", "168%" },
+ { "170", "170%" },
+ { "172", "172%" },
+ { "174", "174%" },
+ { "176", "176%" },
+ { "178", "178%" },
+ { "180", "180%" },
+ { "182", "182%" },
+ { "184", "184%" },
+ { "186", "186%" },
+ { "188", "188%" },
+ { "190", "190%" },
+ { "192", "192%" },
+ { "194", "194%" },
+ { "196", "196%" },
+ { "198", "198%" },
+ { "200", "200%" },
{ NULL, NULL },
},
"100"
@@ -1399,17 +3785,107 @@ struct retro_core_option_v2_definition option_defs_us[] = {
NULL,
"channel_volume",
{
- { "0", NULL },
- { "10", NULL },
- { "20", NULL },
- { "30", NULL },
- { "40", NULL },
- { "50", NULL },
- { "60", NULL },
- { "70", NULL },
- { "80", NULL },
- { "90", NULL },
- { "100", NULL },
+ { "0", "0%" },
+ { "2", "2%" },
+ { "4", "4%" },
+ { "6", "6%" },
+ { "8", "8%" },
+ { "10", "10%" },
+ { "12", "12%" },
+ { "14", "14%" },
+ { "16", "16%" },
+ { "18", "18%" },
+ { "20", "20%" },
+ { "22", "22%" },
+ { "24", "24%" },
+ { "26", "26%" },
+ { "28", "28%" },
+ { "30", "30%" },
+ { "32", "32%" },
+ { "34", "34%" },
+ { "36", "36%" },
+ { "38", "38%" },
+ { "40", "40%" },
+ { "42", "42%" },
+ { "44", "44%" },
+ { "46", "46%" },
+ { "48", "48%" },
+ { "50", "50%" },
+ { "52", "52%" },
+ { "54", "54%" },
+ { "56", "56%" },
+ { "58", "58%" },
+ { "60", "60%" },
+ { "62", "62%" },
+ { "64", "64%" },
+ { "66", "66%" },
+ { "68", "68%" },
+ { "70", "70%" },
+ { "72", "72%" },
+ { "74", "74%" },
+ { "76", "76%" },
+ { "78", "78%" },
+ { "80", "80%" },
+ { "82", "82%" },
+ { "84", "84%" },
+ { "86", "86%" },
+ { "88", "88%" },
+ { "90", "90%" },
+ { "92", "92%" },
+ { "94", "94%" },
+ { "96", "96%" },
+ { "98", "98%" },
+ { "100", "100%" },
+ { "102", "102%" },
+ { "104", "104%" },
+ { "106", "106%" },
+ { "108", "108%" },
+ { "110", "110%" },
+ { "112", "112%" },
+ { "114", "114%" },
+ { "116", "116%" },
+ { "118", "118%" },
+ { "120", "120%" },
+ { "122", "122%" },
+ { "124", "124%" },
+ { "126", "126%" },
+ { "128", "128%" },
+ { "130", "130%" },
+ { "132", "132%" },
+ { "134", "134%" },
+ { "136", "136%" },
+ { "138", "138%" },
+ { "140", "140%" },
+ { "142", "142%" },
+ { "144", "144%" },
+ { "146", "146%" },
+ { "148", "148%" },
+ { "150", "150%" },
+ { "152", "152%" },
+ { "154", "154%" },
+ { "156", "156%" },
+ { "158", "158%" },
+ { "160", "160%" },
+ { "162", "162%" },
+ { "164", "164%" },
+ { "166", "166%" },
+ { "168", "168%" },
+ { "170", "170%" },
+ { "172", "172%" },
+ { "174", "174%" },
+ { "176", "176%" },
+ { "178", "178%" },
+ { "180", "180%" },
+ { "182", "182%" },
+ { "184", "184%" },
+ { "186", "186%" },
+ { "188", "188%" },
+ { "190", "190%" },
+ { "192", "192%" },
+ { "194", "194%" },
+ { "196", "196%" },
+ { "198", "198%" },
+ { "200", "200%" },
{ NULL, NULL },
},
"100"
diff --git a/libretro/libretro_core_options_intl.h b/libretro/libretro_core_options_intl.h
index 34473c9e6..6696b6b34 100644
--- a/libretro/libretro_core_options_intl.h
+++ b/libretro/libretro_core_options_intl.h
@@ -1779,7 +1779,7 @@ struct retro_core_options_v2 options_ar = {
#define OPTION_VAL_475_AST NULL
#define OPTION_VAL_500_AST NULL
#define GENESIS_PLUS_GX_FORCE_DTACK_LABEL_AST "Bloqueos del sistema"
-#define GENESIS_PLUS_GX_FORCE_DTACK_INFO_0_AST "Emula los bloqueos del sistema que se producen nel hardware real cuando s'accede a direiciones illegales. Esta opción namás habría desactivase cuando se xueguen ciertes demos ya programes homebrew que s'enconten nel comportamientu illegal pa funcionar correutamente."
+#define GENESIS_PLUS_GX_FORCE_DTACK_INFO_0_AST "Emula los bloqueos del sistema que se producen nel hardware real cuando s'accede a direiciones illegales. Esta opción namás habría desactivase cuando se xueguen ciertes demos y programes homebrew que s'enconten nel comportamientu illegal pa funcionar correutamente."
#define GENESIS_PLUS_GX_ADDR_ERROR_LABEL_AST NULL
#define GENESIS_PLUS_GX_ADDR_ERROR_INFO_0_AST NULL
#define GENESIS_PLUS_GX_CD_LATENCY_LABEL_AST NULL
@@ -22140,11 +22140,11 @@ struct retro_core_options_v2 options_eo = {
#define GENESIS_PLUS_GX_SYSTEM_BRAM_INFO_0_ES "Al ejecutar contenidos para Mega-CD/Sega CD, especifica si se debe compartir un archivo de guardado entre todos los juegos de la misma región («Una por BIOS») o si se debe crear un archivo de guardado individual para cada juego («Una por cada juego»). Nota: la Mega-CD/Sega CD tiene un almacenamiento interno limitado, suficiente para unos pocos títulos. Se recomienda seleccionar «Una por cada juego» para que no te quedes sin espacio libre."
#define OPTION_VAL_PER_BIOS_ES "Uno por BIOS"
#define OPTION_VAL_PER_GAME_ES "Uno por cada juego"
-#define GENESIS_PLUS_GX_CART_BRAM_LABEL_ES "Cartucho de BRAM de CD (es necesario reiniciar)"
+#define GENESIS_PLUS_GX_CART_BRAM_LABEL_ES "BRAM de memoria de CD (es necesario reiniciar)"
#define GENESIS_PLUS_GX_CART_BRAM_INFO_0_ES "Al ejecutar contenidos para Mega-CD/Sega CD, especifica si se debe compartir un cartucho de RAM para guardados entre todos los juegos de la misma región («Una por cartucho») o si se debe crear un archivo de guardado individual para cada juego («Una por cada juego»)."
#define OPTION_VAL_PER_CART_ES "Una por cartucho"
-#define GENESIS_PLUS_GX_CART_SIZE_LABEL_ES "Tamaño del cartucho de BRAM de CD (es necesario reiniciar)"
-#define GENESIS_PLUS_GX_CART_SIZE_INFO_0_ES "Establece el tamaño del cartucho de RAM para los contenidos de Sega CD/Mega-CD. Este ajuste es ideal si se utiliza un archivo de cartucho de RAM por cada juego para así no tener varios cartuchos de gran tamaño."
+#define GENESIS_PLUS_GX_CART_SIZE_LABEL_ES "Tamaño de la BRAM de memoria de CD (es necesario reiniciar)"
+#define GENESIS_PLUS_GX_CART_SIZE_INFO_0_ES "Establece el tamaño del cartucho de memoria BRAM para los contenidos de Sega CD/Mega-CD. Este ajuste es ideal al configurar las BRAM de memoria para que haya una por cada juego y evitar tener varios cartuchos con un tamaño grande."
#define OPTION_VAL_128K_ES "128 Kbit"
#define OPTION_VAL_256K_ES "256 Kbit"
#define OPTION_VAL_512K_ES "512 Kbit"
@@ -22244,7 +22244,7 @@ struct retro_core_options_v2 options_eo = {
#define GENESIS_PLUS_GX_NO_SPRITE_LIMIT_LABEL_ES "Eliminar límite de sprites por línea"
#define GENESIS_PLUS_GX_NO_SPRITE_LIMIT_INFO_0_ES "Elimina el límite de sprites por líneas de barrido que tenía el hardware original. Reduce los parpadeos, pero puede provocar fallos gráficos, ya que algunos juegos aprovechan esta limitación para generar efectos especiales."
#define GENESIS_PLUS_GX_ENHANCED_VSCROLL_LABEL_ES "Mejorar desplazamiento vertical de «tiles»"
-#define GENESIS_PLUS_GX_ENHANCED_VSCROLL_INFO_0_ES "Permite que cada celda individual pueda desplazarse en vertical de forma fluida en vez de hacerlo por parejas de 16 píxeles, haciendo un promedio del valor «vscroll» de las celdas colindantes. Este arreglo solo afecta a unos pocos juegos que utilizan el modo de desplazamiento vertical por parejas de dos celdas."
+#define GENESIS_PLUS_GX_ENHANCED_VSCROLL_INFO_0_ES "Permite que cada celda individual pueda desplazarse verticalmente, en vez de hacerlo por parejas de 16 píxeles, haciendo un promedio del valor «vscroll» de las celdas colindantes. Este arreglo solo se aplica a unos pocos juegos que utilizan el modo de desplazamiento vertical por parejas de dos celdas."
#define GENESIS_PLUS_GX_ENHANCED_VSCROLL_LIMIT_LABEL_ES "Límite de la mejora del desplazamiento vertical de «tiles»"
#define GENESIS_PLUS_GX_ENHANCED_VSCROLL_LIMIT_INFO_0_ES "Esta opción solo se aplicará si la mejora del desplazamiento vertical de «tiles» está activada. Ajusta el límite de esta mejora. Cuando la diferencia del valor «vscroll» entre celdas colindantes sea superior a este límite, se desactivará la mejora."
#define GENESIS_PLUS_GX_OVERCLOCK_LABEL_ES "Velocidad de la CPU"
@@ -22271,9 +22271,9 @@ struct retro_core_options_v2 options_eo = {
#define GENESIS_PLUS_GX_ADDR_ERROR_LABEL_ES "Error de dirección del 68K"
#define GENESIS_PLUS_GX_ADDR_ERROR_INFO_0_ES "La CPU principal de la Mega Drive/Genesis (el Motorola 68000) genera una excepción (cuelgue) de error de memoria al intentar acceder a una memoria no alineada. Activa esta opción para simular este comportamiento. Solo debe desactivarse para jugar a modificaciones de juegos, ya que estas suelen desarrollarse con emuladores menos precisos y pueden depender de accesos a RAM no válidos para funcionar correctamente."
#define GENESIS_PLUS_GX_CD_LATENCY_LABEL_ES "Tiempo de acceso al CD"
-#define GENESIS_PLUS_GX_CD_LATENCY_INFO_0_ES "Simula la latencia del lector original de CD al empezar a leer o buscar una ubicación concreta del disco que esté cargado. Esto es necesario para algunos juegos en formato CD que se colgarán si los datos aparecen demasiado pronto, también corrige problemas de desincronización del audio de CD en algunos juegos. Desactivar esta opción podría venir bien para juegos MSU-MD, ya que hará que los bucles en las pistas de audio de CD queden más disimulados."
+#define GENESIS_PLUS_GX_CD_LATENCY_INFO_0_ES "Simula la latencia del lector original de CD al iniciar una lectura o búsqueda a una ubicación concreta del disco que esté cargada. Necesario para algunos juegos en formato CD que se colgarán si los datos aparecen demasiado pronto y también corrige problemas de desincronización del audio de CD en algunos juegos. Desactivar esta opción podría venir bien para juegos MSU-MD, ya que hará que los bucles de las pistas de audio de CD parezcan más uniformes."
#define GENESIS_PLUS_GX_CD_PRECACHE_LABEL_ES "Cachear imagen del CD"
-#define GENESIS_PLUS_GX_CD_PRECACHE_INFO_0_ES "Carga la imagen del CD a la memoria al iniciar la emulación. Solo se admiten imágenes CHD. Es necesario reiniciar."
+#define GENESIS_PLUS_GX_CD_PRECACHE_INFO_0_ES "Carga la imagen del CD a la memoria al iniciar la emulación. Solo se admiten imágenes CDH. Es necesario reiniciar."
#define GENESIS_PLUS_GX_SHOW_ADVANCED_AUDIO_SETTINGS_LABEL_ES "Mostrar Ajustes avanzados de volumen de audio (es necesario reabrir el menú)"
#define GENESIS_PLUS_GX_SHOW_ADVANCED_AUDIO_SETTINGS_INFO_0_ES "Permite configurar los parámetros de los canales de audio a un bajo nivel. NOTA: es necesario salir y volver a entrar del menú rápido para que el cambio surta efecto."
#define GENESIS_PLUS_GX_PSG_CHANNEL_0_VOLUME_LABEL_ES "Volumen del canal tonal 0 del PSG (%)"
@@ -28404,1582 +28404,6 @@ struct retro_core_options_v2 options_fr = {
option_defs_fr
};
-/* RETRO_LANGUAGE_GA */
-
-#define CATEGORY_SYSTEM_LABEL_GA "Córas"
-#define CATEGORY_SYSTEM_INFO_0_GA "Athraigh an rogha crua-earraí bunúsach, an réigiún, an BIOS agus socruithe comhaid sábhála Sega CD/Mega-CD."
-#define CATEGORY_VIDEO_LABEL_GA "Físeán"
-#define CATEGORY_VIDEO_INFO_0_GA "Athraigh cóimheas gné, bearradh taispeána, scagaire físe agus socruithe scipeála frámaí."
-#define CATEGORY_AUDIO_LABEL_GA "Fuaim"
-#define CATEGORY_AUDIO_INFO_0_GA "Athraigh socruithe gléis fuaime."
-#define CATEGORY_INPUT_LABEL_GA "Ionchur"
-#define CATEGORY_INPUT_INFO_0_GA "Athraigh socruithe ionchuir an ghunna solais agus/nó an luiche."
-#define CATEGORY_HACKS_LABEL_GA "Cleasanna Aithrise"
-#define CATEGORY_HACKS_INFO_0_GA "Athraigh socruithe róchlogála agus cruinneas aithrise próiseálaí a mbíonn tionchar acu ar fheidhmíocht agus comhoiriúnacht íseal-leibhéil."
-#define CATEGORY_CHANNEL_VOLUME_LABEL_GA "Socruithe Ardleibhéil Imleabhair Cainéal"
-#define CATEGORY_CHANNEL_VOLUME_INFO_0_GA "Athraigh toirt na gcainéal fuaime crua-earraí aonair."
-#define GENESIS_PLUS_GX_SYSTEM_HW_LABEL_GA "Crua-earraí an Chórais"
-#define GENESIS_PLUS_GX_SYSTEM_HW_INFO_0_GA "Rith ábhar luchtaithe le consól aithriste ar leith. Roghnóidh 'Auto' an córas is oiriúnaí don chluiche reatha."
-#define OPTION_VAL_AUTO_GA "Uathoibríoch"
-#define OPTION_VAL_SG_1000_GA NULL
-#define OPTION_VAL_SG_1000_II_GA NULL
-#define OPTION_VAL_SG_1000_II_RAM_EXT_GA NULL
-#define OPTION_VAL_MARK_III_GA NULL
-#define OPTION_VAL_MASTER_SYSTEM_GA NULL
-#define OPTION_VAL_MASTER_SYSTEM_II_GA NULL
-#define OPTION_VAL_GAME_GEAR_GA NULL
-#define OPTION_VAL_MEGA_DRIVE_GENESIS_GA NULL
-#define GENESIS_PLUS_GX_REGION_DETECT_LABEL_GA "Réigiún an Chórais"
-#define GENESIS_PLUS_GX_REGION_DETECT_INFO_0_GA "Sonraigh cén réigiún as a bhfuil an córas. I gcás consóil seachas an Game Gear, is é 50 Hz an 'PAL', agus is é 60 Hz an 'NTSC'. Féadfaidh cluichí rith níos tapúla nó níos moille ná mar is gnách má roghnaítear an réigiún mícheart."
-#define OPTION_VAL_NTSC_U_GA NULL
-#define OPTION_VAL_PAL_GA NULL
-#define OPTION_VAL_NTSC_J_GA NULL
-#define GENESIS_PLUS_GX_VDP_MODE_LABEL_GA "Mód VDP Fórsála"
-#define GENESIS_PLUS_GX_VDP_MODE_INFO_0_GA "Sáraíonn sé an modh VDP chun é a chur ag rith ag NTSC 60Hz nó PAL 50Hz, beag beann ar réigiún an chórais."
-#define OPTION_VAL_60HZ_GA NULL
-#define OPTION_VAL_50HZ_GA NULL
-#define GENESIS_PLUS_GX_BIOS_LABEL_GA "ROM Tosaithe Córais"
-#define GENESIS_PLUS_GX_BIOS_INFO_0_GA "Bain úsáid as an BIOS/tosaitheoir oifigiúil le haghaidh crua-earraí aithriste, má tá sé i láthair in eolaire córais RetroArch. Taispeánann sé seicheamh/beochan tosaithe atá sainiúil don chonsól, agus ansin ritheann sé ábhar luchtaithe."
-#define GENESIS_PLUS_GX_SYSTEM_BRAM_LABEL_GA "Córas CD BRAM (Atosú Éilitheach)"
-#define GENESIS_PLUS_GX_SYSTEM_BRAM_INFO_0_GA "Agus ábhar Sega CD/Mega-CD á rith, sonraítear an ndéanfar comhad sábhála aonair a roinnt idir na cluichí go léir ó réigiún ar leith (In aghaidh an BIOS) nó comhad sábhála ar leith a chruthú do gach cluiche (In aghaidh an Chluiche). Tabhair faoi deara go bhfuil stóráil inmheánach theoranta ag an Sega CD/Mega-CD, nach leor ach do roinnt teidil. Chun nach rithfidh tú as spás, moltar an socrú 'In aghaidh an Chluiche'."
-#define OPTION_VAL_PER_BIOS_GA "In aghaidh an BIOS"
-#define OPTION_VAL_PER_GAME_GA "In aghaidh an Chluiche"
-#define GENESIS_PLUS_GX_CART_BRAM_LABEL_GA "Cairt Cúltaca CD BRAM (Atosú Éilitheach)"
-#define GENESIS_PLUS_GX_CART_BRAM_INFO_0_GA "Agus ábhar Sega CD/Mega-CD á rith, sonraítear ann an ndéanfar cairt RAM cúltaca aonair a roinnt do gach cluiche (In aghaidh an Chairt) nó cairt RAM cúltaca ar leith a chruthú do gach cluiche (In aghaidh an Chluiche)."
-#define OPTION_VAL_PER_CART_GA "In aghaidh an cartúis"
-#define GENESIS_PLUS_GX_CART_SIZE_LABEL_GA "Méid BRAM Cairt Cúltaca CD (Atosú Éilitheach)"
-#define GENESIS_PLUS_GX_CART_SIZE_INFO_0_GA "Socraíonn sé seo méid an chairt reithe cúltaca agus ábhar Sega CD/Mega-CD á rith. Úsáideach nuair a shocraítear an chairt reithe cúltaca go In aghaidh an Chluiche chun méideanna cairte níos mó iolracha a sheachaint."
-#define OPTION_VAL_128K_GA NULL
-#define OPTION_VAL_256K_GA NULL
-#define OPTION_VAL_512K_GA NULL
-#define OPTION_VAL_1MEG_GA NULL
-#define OPTION_VAL_2MEG_GA NULL
-#define OPTION_VAL_4MEG_GA NULL
-#define GENESIS_PLUS_GX_ADD_ON_LABEL_GA "Breiseán CD (mód MD) (Éilíonn Atosú)"
-#define GENESIS_PLUS_GX_ADD_ON_INFO_0_GA "Sonraigh cén breiseán atá le húsáid le haghaidh athsheinm fuaime CD le cluichí Mega Drive/Genesis a dtacaítear leo."
-#define OPTION_VAL_SEGA_MEGA_CD_GA NULL
-#define OPTION_VAL_MEGASD_GA NULL
-#define OPTION_VAL_NONE_GA "Dada"
-#define GENESIS_PLUS_GX_LOCK_ON_LABEL_GA "Glasáil Cartús-Ar"
-#define GENESIS_PLUS_GX_LOCK_ON_INFO_0_GA "Is gné Mega Drive/Genesis í an Teicneolaíocht Glasála a chuir ar chumas cluiche níos sine ceangal le port pas-trí cartús speisialta le haghaidh súgartha sínte nó athraithe. Sonraíonn an rogha seo cén cineál cartús speisialta 'glasála' atá le haithris. Ní mór comhad bios comhfhreagrach a bheith i láthair in eolaire córais RetroArch."
-#define OPTION_VAL_GAME_GENIE_GA NULL
-#define OPTION_VAL_ACTION_REPLAY_PRO_GA NULL
-#define OPTION_VAL_SONIC_KNUCKLES_GA NULL
-#define GENESIS_PLUS_GX_ASPECT_RATIO_LABEL_GA "Cóimheas Gnéithe arna Sholáthrú ag an gCroí"
-#define GENESIS_PLUS_GX_ASPECT_RATIO_INFO_0_GA "Roghnaigh an cóimheas gné ábhair is fearr leat. Ní bheidh feidhm ag seo ach amháin nuair a bheidh cóimheas gné RetroArch socraithe go 'Croílár curtha ar fáil' sna socruithe Físeáin."
-#define OPTION_VAL_NTSC_PAR_GA NULL
-#define OPTION_VAL_PAL_PAR_GA NULL
-#define OPTION_VAL_4_3_GA NULL
-#define OPTION_VAL_UNCORRECTED_GA "Gan cheartú"
-#define GENESIS_PLUS_GX_OVERSCAN_LABEL_GA "Teorainneacha"
-#define GENESIS_PLUS_GX_OVERSCAN_INFO_0_GA "Cumasaigh é seo chun na réigiúin ró-scan a thaispeáint ag barr/bun agus/nó ar chlé/ar dheis an scáileáin. De ghnáth, bheadh siad seo i bhfolach ag an mbezel timpeall imeall teilifíse caighdeánach sainmhínithe."
-#define OPTION_VAL_TOP_BOTTOM_GA "Barr/Bun"
-#define OPTION_VAL_LEFT_RIGHT_GA "Clé/Deas"
-#define OPTION_VAL_FULL_GA "Lán"
-#define GENESIS_PLUS_GX_LEFT_BORDER_LABEL_GA "Folaigh Teorainneacha Taobh an Mháistirchórais"
-#define GENESIS_PLUS_GX_LEFT_BORDER_INFO_0_GA "Gearrann sé 8 bpicteil ó thaobh clé an scáileáin, nó ón dá thaobh clé agus deas agus cluichí Master System á reáchtáil."
-#define OPTION_VAL_LEFT_BORDER_GA "Imeall Clé Amháin"
-#define OPTION_VAL_LEFT_RIGHT_BORDERS_GA "Teorainneacha Clé & Deis"
-#define GENESIS_PLUS_GX_GG_EXTRA_LABEL_GA "Scáileán Leathnaithe Game Gear"
-#define GENESIS_PLUS_GX_GG_EXTRA_INFO_0_GA "Éiríonn sé seo le teidil Game Gear a rith i mód SMS, le taifeach méadaithe de 256x192. Féadfaidh sé ábhar breise a thaispeáint, ach de ghnáth taispeánann sé teorainn de shonraí íomhá truaillithe/nach dteastaíonn."
-#define GENESIS_PLUS_GX_BLARGG_NTSC_FILTER_LABEL_GA "Scagaire NTSC Blargg"
-#define GENESIS_PLUS_GX_BLARGG_NTSC_FILTER_INFO_0_GA "Cuir scagaire físe i bhfeidhm chun comharthaí teilifíse NTSC éagsúla a aithris."
-#define OPTION_VAL_MONOCHROME_GA "Monacrómach"
-#define OPTION_VAL_COMPOSITE_GA "Ilchodach"
-#define OPTION_VAL_SVIDEO_GA "S-Físeán"
-#define OPTION_VAL_RGB_GA NULL
-#define GENESIS_PLUS_GX_LCD_FILTER_LABEL_GA "Scagaire Taibhse LCD"
-#define GENESIS_PLUS_GX_LCD_FILTER_INFO_0_GA "Cuir scagaire 'taibhsithe' íomhá i bhfeidhm chun tréithe taispeána phainéil LCD Game Gear agus Genesis Nomad a aithris."
-#define GENESIS_PLUS_GX_RENDER_LABEL_GA "Aschur Mód Idirfhite 2"
-#define GENESIS_PLUS_GX_RENDER_INFO_0_GA "Ligeann Mód Idirfhite 2 don Mega Drive/Genesis íomhá 320x448 airde dhúbailte (ardtaifigh) a aschur trí línte scanadh malartacha a tharraingt i ngach fráma (úsáideann modhanna il-imreora Sonic the Hedgehog 2 agus Combat Cars é seo). Déanann 'Double Field' aithris ar chrua-earraí bunaidh, ag táirgeadh íomhá ghéar le déantáin splancacha/idirfhite. Cuireann 'Single Field' scagaire dí-idirfhite i bhfeidhm, rud a chobhsaíonn an íomhá ach a chruthaíonn doiléiriú beag."
-#define OPTION_VAL_SINGLE_FIELD_GA "Réimse Aonair"
-#define OPTION_VAL_DOUBLE_FIELD_GA "Réimse Dúbailte"
-#define GENESIS_PLUS_GX_FRAMESKIP_LABEL_GA "Fráma-léim"
-#define GENESIS_PLUS_GX_FRAMESKIP_INFO_0_GA "Léim frámaí chun fo-rith maoláin fuaime (crágáil) a sheachaint. Feabhsaíonn sé feidhmíocht ar chostas réidhe amhairc. Léimeann 'Uath' frámaí nuair a thugann an tosaitheoir comhairle. Úsáideann 'Lámhleabhar' an socrú 'Tairseach Léim Frámaí (%)'."
-#define OPTION_VAL_MANUAL_GA "Lámhleabhar"
-#define GENESIS_PLUS_GX_FRAMESKIP_THRESHOLD_LABEL_GA "Tairseach Léim Fráma (%)"
-#define GENESIS_PLUS_GX_FRAMESKIP_THRESHOLD_INFO_0_GA "Nuair a shocraítear 'Frameskip' go 'Lámhleabhar', sonraítear an tairseach áitíochta maoláin fuaime (céatadán) faoina mbeidh frámaí á scipeáil. Laghdaíonn luachanna níos airde an baol go mbeidh frámaí ag scoilteadh trína chur faoi deara go gcaillfear frámaí níos minice."
-#define GENESIS_PLUS_GX_YM2413_LABEL_GA NULL
-#define GENESIS_PLUS_GX_YM2413_INFO_0_GA "Cumasaigh aithris ar an Aonad Fuaime FM a úsáideann cluichí áirithe Sega Mark III/Master System le haghaidh aschur fuaime feabhsaithe."
-#define GENESIS_PLUS_GX_YM2413_CORE_LABEL_GA "Croílár an Mháistirchórais FM (YM2413)"
-#define GENESIS_PLUS_GX_YM2413_CORE_INFO_0_GA "Roghnaigh an modh a úsáidtear chun Aonad Fuaime FM an Chórais Sega Mark III/Master a aithris. Tá an rogha 'MAME' gasta, agus ritheann sé ar lánluas ar fhormhór na gcóras. Tá an rogha 'Nuked' cruinn ó thaobh timthrialla de, ardchaighdeáin, agus tá riachtanais shuntasacha LAP aige."
-#define OPTION_VAL_MAME_GA NULL
-#define OPTION_VAL_NUKED_GA NULL
-#define GENESIS_PLUS_GX_YM2612_LABEL_GA NULL
-#define GENESIS_PLUS_GX_YM2612_INFO_0_GA "Roghnaigh an modh a úsáidtear chun sintéiseoir FM (príomhghineadóir fuaime) an Mega Drive/Genesis a aithris. Tá roghanna 'MAME' gasta, agus ritheann siad ar lánluas ar fhormhór na gcóras. Tá roghanna 'Nuked' cruinn ó thaobh timthrialla de, ardchaighdeáin, agus tá riachtanais shuntasacha LAP acu. Úsáideann an Model 1 Mega Drive/Genesis bunaidh an tslis YM2612. Úsáidtear an YM3438 in athbhreithnithe níos déanaí ar Mega Drive/Genesis."
-#define GENESIS_PLUS_GX_YM2612_INFO_1_GA "Roghnaigh an modh a úsáidtear chun sintéiseoir FM (príomhghineadóir fuaime) an Mega Drive/Genesis a aithris. Úsáideann an Mega Drive/Genesis bunaidh an tslis YM2612. Úsáidtear an YM3438 in athbhreithnithe níos déanaí ar an Mega Drive/Genesis."
-#define OPTION_VAL_MAME_YM2612_GA NULL
-#define OPTION_VAL_MAME_ASIC_YM3438_GA NULL
-#define OPTION_VAL_MAME_ENHANCED_YM3438_GA "MAME (YM3438 Feabhsaithe)"
-#define OPTION_VAL_NUKED_YM2612_GA NULL
-#define OPTION_VAL_NUKED_YM3438_GA NULL
-#define GENESIS_PLUS_GX_SOUND_OUTPUT_LABEL_GA "Aschur Fuaime"
-#define GENESIS_PLUS_GX_SOUND_OUTPUT_INFO_0_GA "Roghnaigh athsheinm fuaime steiréó nó mona."
-#define OPTION_VAL_STEREO_GA "Steiréó"
-#define OPTION_VAL_MONO_GA NULL
-#define GENESIS_PLUS_GX_AUDIO_FILTER_LABEL_GA "Scagaire Fuaime"
-#define GENESIS_PLUS_GX_AUDIO_FILTER_INFO_0_GA "Cumasaigh scagaire fuaime ísealpas chun fuaim shainiúil Model 1 Mega Drive/Genesis a insamhladh níos fearr."
-#define OPTION_VAL_LOW_PASS_GA "Íseal-Phas"
-#define OPTION_VAL_EQ_GA NULL
-#define GENESIS_PLUS_GX_LOWPASS_RANGE_LABEL_GA "Scagaire Íseal-Phas %"
-#define GENESIS_PLUS_GX_LOWPASS_RANGE_INFO_0_GA "Sonraigh minicíocht scoite an scagaire íseal-phas fuaime. Méadaíonn luach níos airde 'neart' braite an scagaire, ós rud é go laghdaítear raon níos leithne den speictream ardmhinicíochta."
-#define GENESIS_PLUS_GX_PSG_PREAMP_LABEL_GA "Leibhéal Réamh-Amp PSG"
-#define GENESIS_PLUS_GX_PSG_PREAMP_INFO_0_GA "Socraigh leibhéal an réamh-aimplitheora fuaime don Ghineadóir Fuaime In-ríomhchláraithe 4-chainéil SN76496 aithriste atá le fáil sa SG-1000, Sega Mark III, Master System, Game Gear agus Mega Drive/Genesis."
-#define GENESIS_PLUS_GX_FM_PREAMP_LABEL_GA "Leibhéal Réamh-Aimplitheoir FM"
-#define GENESIS_PLUS_GX_FM_PREAMP_INFO_0_GA "Socraigh leibhéal an réamh-aimplitheora fuaime don sintéiseoir fuaime aithrisithe Mega Drive/Genesis FM nó don Aonad Fuaime FM Sega Mark III/Master System."
-#define GENESIS_PLUS_GX_CDDA_VOLUME_LABEL_GA "Imleabhar CD-DA"
-#define GENESIS_PLUS_GX_CDDA_VOLUME_INFO_0_GA "Coigeartaigh toirt mheasctha aschur athsheinm fuaime an CD aithrisithe."
-#define GENESIS_PLUS_GX_PCM_VOLUME_LABEL_GA "Imleabhar PCM"
-#define GENESIS_PLUS_GX_PCM_VOLUME_INFO_0_GA "Coigeartaigh toirt mheasctha aschur gineadóir fuaime Sega CD/Mega-CD RF5C164 PCM aithrisithe."
-#define GENESIS_PLUS_GX_AUDIO_EQ_LOW_LABEL_GA "Cothromóir Íseal"
-#define GENESIS_PLUS_GX_AUDIO_EQ_LOW_INFO_0_GA "Coigeartaigh an banda íseal-raoin den chothromóir fuaime inmheánaigh."
-#define GENESIS_PLUS_GX_AUDIO_EQ_MID_LABEL_GA "EQ Lár"
-#define GENESIS_PLUS_GX_AUDIO_EQ_MID_INFO_0_GA "Coigeartaigh banda lár-raoin an chothromóra fuaime inmheánaigh."
-#define GENESIS_PLUS_GX_AUDIO_EQ_HIGH_LABEL_GA "Ard-EQ"
-#define GENESIS_PLUS_GX_AUDIO_EQ_HIGH_INFO_0_GA "Coigeartaigh an banda ard-raoin den chothromóir fuaime inmheánaigh."
-#define GENESIS_PLUS_GX_GUN_INPUT_LABEL_GA "Ionchur Gunna Solais"
-#define GENESIS_PLUS_GX_GUN_INPUT_INFO_0_GA "Bain úsáid as ionchur 'Gunna Solais' nó 'Scáileán Tadhaill' atá rialaithe ag an luch."
-#define OPTION_VAL_LIGHTGUN_GA "Gunna Solais"
-#define OPTION_VAL_TOUCHSCREEN_GA "Scáileán tadhaill"
-#define GENESIS_PLUS_GX_GUN_CURSOR_LABEL_GA "Taispeáin Crosghruaig Gunna Solais"
-#define GENESIS_PLUS_GX_GUN_CURSOR_INFO_0_GA "Taispeáin crosrianta gunna solais agus na cineálacha gléasanna ionchuir MD Menacer, MD Justifiers agus MS Light Phaser in úsáid."
-#define GENESIS_PLUS_GX_INVERT_MOUSE_LABEL_GA "Inbhéartaigh Ais-Y na Luiche"
-#define GENESIS_PLUS_GX_INVERT_MOUSE_INFO_0_GA "Déanann sé ais-Y an chineáil gléis ionchuir Luch MD a aisiompú."
-#define GENESIS_PLUS_GX_NO_SPRITE_LIMIT_LABEL_GA "Bain Teorainn Sprite In Aghaidh na Líne"
-#define GENESIS_PLUS_GX_NO_SPRITE_LIMIT_INFO_0_GA "Baintear an teorainn crua-earraí bunaidh sprite-in-aghaidh-scannánlíne. Laghdaíonn sé seo an caochadh ach is féidir leis fabhtanna amhairc a chur faoi deara, toisc go mbaintear leas as an teorainn crua-earraí i roinnt cluichí chun éifeachtaí speisialta a ghiniúint."
-#define GENESIS_PLUS_GX_ENHANCED_VSCROLL_LABEL_GA "Scrollaigh ingearach feabhsaithe in aghaidh an tíle"
-#define GENESIS_PLUS_GX_ENHANCED_VSCROLL_INFO_0_GA "Ceadaíonn sé seo gach cill aonair a scrollú go hingearach, in ionad 16px 2-chill, trí mheán a bhaint amach le luach vscroll na cille comharsanachta. Ní bhaineann an cleas seo ach le cúpla cluiche a úsáideann mód scrollú ingearach 2-chill."
-#define GENESIS_PLUS_GX_ENHANCED_VSCROLL_LIMIT_LABEL_GA "Teorainn scrollaithe ingearach feabhsaithe in aghaidh an tíle"
-#define GENESIS_PLUS_GX_ENHANCED_VSCROLL_LIMIT_INFO_0_GA "Nuair a bhíonn scrolla ingearach feabhsaithe in aghaidh an tíle cumasaithe amháin. Coigeartaíonn sé teorainn an fheabhsaithe scrolla ingearach. Nuair a bhíonn an difríocht vscroll idir tíleanna comharsanacha níos mó ná an teorainn seo, díchumasaítear an feabhsú."
-#define GENESIS_PLUS_GX_OVERCLOCK_LABEL_GA "Luas LAP"
-#define GENESIS_PLUS_GX_OVERCLOCK_INFO_0_GA "Róchlogáil an LAP aithrisithe. Is féidir leis an moilliú a laghdú, ach d'fhéadfadh sé go mbeadh teipeanna mar thoradh air."
-#define OPTION_VAL_100_GA NULL
-#define OPTION_VAL_125_GA NULL
-#define OPTION_VAL_150_GA NULL
-#define OPTION_VAL_175_GA NULL
-#define OPTION_VAL_200_GA NULL
-#define OPTION_VAL_225_GA NULL
-#define OPTION_VAL_250_GA NULL
-#define OPTION_VAL_275_GA NULL
-#define OPTION_VAL_300_GA NULL
-#define OPTION_VAL_325_GA NULL
-#define OPTION_VAL_350_GA NULL
-#define OPTION_VAL_375_GA NULL
-#define OPTION_VAL_400_GA NULL
-#define OPTION_VAL_425_GA NULL
-#define OPTION_VAL_450_GA NULL
-#define OPTION_VAL_475_GA NULL
-#define OPTION_VAL_500_GA NULL
-#define GENESIS_PLUS_GX_FORCE_DTACK_LABEL_GA "Glasálacha Córais"
-#define GENESIS_PLUS_GX_FORCE_DTACK_INFO_0_GA "Déan aithris ar ghlasálacha córais a tharlaíonn ar chrua-earraí fíor agus rochtain neamhdhleathach seoltaí á déanamh. Níor cheart é seo a dhíchumasú ach amháin agus taispeántais agus grúdaireacht bhaile áirithe á n-imirt a bhraitheann ar iompar neamhdhleathach le haghaidh oibriú ceart."
-#define GENESIS_PLUS_GX_ADDR_ERROR_LABEL_GA "Earráid Seoladh 68K"
-#define GENESIS_PLUS_GX_ADDR_ERROR_INFO_0_GA "Gineann príomh-LAP Mega Drive/Genesis (Motorola 68000) eisceacht Earráid Seolta (tuairteáil) agus iarracht á déanamh rochtain neamhailínithe ar chuimhne. Má chumasaítear é seo, déanfar an t-iompar seo a insamhladh. Níor cheart é a dhíchumasú ach amháin agus hacks ROM á n-imirt, ós rud é go bhforbraítear iad seo de ghnáth ag baint úsáide as aithriseoirí nach bhfuil chomh cruinn agus go bhféadfadh siad brath ar rochtain RAM neamhbhailí le haghaidh oibriú ceart."
-#define GENESIS_PLUS_GX_CD_LATENCY_LABEL_GA "Am Rochtana CD"
-#define GENESIS_PLUS_GX_CD_LATENCY_INFO_0_GA "Insamhladh a dhéanamh ar mhoill chrua-earraí bunaidh CD agus léamh á thosú nó nuair a bhíonn suíomh ar leith á lorg ar dhiosca luchtaithe. Tá sé seo riachtanach i gcás roinnt cluichí CD a thuairteálann má bhíonn sonraí CD ar fáil ró-luath agus réitíonn sé fadhbanna díshioncrónaithe fuaime CD i roinnt cluichí freisin. Is féidir é seo a dhíchumasú a bheith úsáideach le cluichí MSU-MD mar go ndéanann sé lúba rianta fuaime CD níos gan uaim."
-#define GENESIS_PLUS_GX_CD_PRECACHE_LABEL_GA "Taisce Íomhá CD"
-#define GENESIS_PLUS_GX_CD_PRECACHE_INFO_0_GA "Luchtaigh íomhá CD isteach sa chuimhne ag am tosaithe. Tacaítear le CHD amháin. Atosú Riachtanach."
-#define GENESIS_PLUS_GX_SHOW_ADVANCED_AUDIO_SETTINGS_LABEL_GA "Taispeáin Socruithe Ardleibhéil Imleabhair Fuaime (Athoscail an roghchlár)"
-#define GENESIS_PLUS_GX_SHOW_ADVANCED_AUDIO_SETTINGS_INFO_0_GA "Cumasaigh cumraíocht paraiméadair chainéil fuaime íseal-leibhéil. TABHAIR FAOI DEARA: Ní mór an Roghchlár Tapa a athrú chun go dtiocfaidh an socrú seo i bhfeidhm."
-#define GENESIS_PLUS_GX_PSG_CHANNEL_0_VOLUME_LABEL_GA "Cainéal Ton PSG 0 Imleabhar %"
-#define GENESIS_PLUS_GX_PSG_CHANNEL_0_VOLUME_INFO_0_GA "Laghdaigh toirt Chainéal Tóin PSG 0."
-#define GENESIS_PLUS_GX_PSG_CHANNEL_1_VOLUME_LABEL_GA "% Imleabhar Cainéal 1 Ton PSG"
-#define GENESIS_PLUS_GX_PSG_CHANNEL_1_VOLUME_INFO_0_GA "Laghdaigh toirt Chainéal 1 Tóin PSG."
-#define GENESIS_PLUS_GX_PSG_CHANNEL_2_VOLUME_LABEL_GA "% Imleabhar Cainéal 2 Ton PSG"
-#define GENESIS_PLUS_GX_PSG_CHANNEL_2_VOLUME_INFO_0_GA "Laghdaigh toirt Chainéal 2 Tone PSG."
-#define GENESIS_PLUS_GX_PSG_CHANNEL_3_VOLUME_LABEL_GA "Torann PSG Cainéal 3 Imleabhar %"
-#define GENESIS_PLUS_GX_PSG_CHANNEL_3_VOLUME_INFO_0_GA "Laghdaigh toirt Chainéal Torainn PSG 3."
-#define GENESIS_PLUS_GX_MD_CHANNEL_0_VOLUME_LABEL_GA "Cainéal Mega Drive/Genesis FM 0 % Imleabhar"
-#define GENESIS_PLUS_GX_MD_CHANNEL_0_VOLUME_INFO_0_GA "Laghdaigh toirt Cainéal 0 Mega Drive/Genesis FM. Ní oibríonn sé ach le hinslitheoirí MAME FM."
-#define GENESIS_PLUS_GX_MD_CHANNEL_1_VOLUME_LABEL_GA "Cainéal 1 Mega Drive/Genesis FM % Toirt"
-#define GENESIS_PLUS_GX_MD_CHANNEL_1_VOLUME_INFO_0_GA "Laghdaigh toirt Cainéal 1 Mega Drive/Genesis FM. Ní oibríonn sé ach le hinslitheoirí MAME FM."
-#define GENESIS_PLUS_GX_MD_CHANNEL_2_VOLUME_LABEL_GA "Cainéal 2 Mega Drive/Genesis FM % Toirt"
-#define GENESIS_PLUS_GX_MD_CHANNEL_2_VOLUME_INFO_0_GA "Laghdaigh toirt Cainéal 2 Mega Drive/Genesis FM. Ní oibríonn sé ach le hinslitheoirí MAME FM."
-#define GENESIS_PLUS_GX_MD_CHANNEL_3_VOLUME_LABEL_GA "Cainéal 3 Mega Drive/Genesis FM % Toirt"
-#define GENESIS_PLUS_GX_MD_CHANNEL_3_VOLUME_INFO_0_GA "Laghdaigh toirt Cainéal 3 Mega Drive/Genesis FM. Ní oibríonn sé ach le hinslitheoirí MAME FM."
-#define GENESIS_PLUS_GX_MD_CHANNEL_4_VOLUME_LABEL_GA "Mega Drive/Genesis FM Cainéal 4 % Toirt"
-#define GENESIS_PLUS_GX_MD_CHANNEL_4_VOLUME_INFO_0_GA "Laghdaigh toirt Cainéal 4 Mega Drive/Genesis FM. Ní oibríonn sé ach le hinslitheoirí MAME FM."
-#define GENESIS_PLUS_GX_MD_CHANNEL_5_VOLUME_LABEL_GA "Cainéal 5 Mega Drive/Genesis FM % Toirt"
-#define GENESIS_PLUS_GX_MD_CHANNEL_5_VOLUME_INFO_0_GA "Laghdaigh toirt Cainéal 5 Mega Drive/Genesis FM. Ní oibríonn sé ach le hinslitheoirí MAME FM."
-#define GENESIS_PLUS_GX_SMS_FM_CHANNEL_0_VOLUME_LABEL_GA "Córas Máistir FM (YM2413) Cainéal 0 Imleabhar %"
-#define GENESIS_PLUS_GX_SMS_FM_CHANNEL_0_VOLUME_INFO_0_GA "Laghdaigh toirt Chainéal FM 0 an Mháistirchórais."
-#define GENESIS_PLUS_GX_SMS_FM_CHANNEL_1_VOLUME_LABEL_GA "Córas Máistir FM (YM2413) Cainéal 1 Imleabhar %"
-#define GENESIS_PLUS_GX_SMS_FM_CHANNEL_1_VOLUME_INFO_0_GA "Laghdaigh toirt Chainéal 1 FM an Mháistirchórais."
-#define GENESIS_PLUS_GX_SMS_FM_CHANNEL_2_VOLUME_LABEL_GA "Córas Máistir FM (YM2413) Cainéal 2 Imleabhar %"
-#define GENESIS_PLUS_GX_SMS_FM_CHANNEL_2_VOLUME_INFO_0_GA "Laghdaigh toirt Chainéal 2 FM an Mháistirchórais."
-#define GENESIS_PLUS_GX_SMS_FM_CHANNEL_3_VOLUME_LABEL_GA "Córas Máistir FM (YM2413) Cainéal 3 Imleabhar %"
-#define GENESIS_PLUS_GX_SMS_FM_CHANNEL_3_VOLUME_INFO_0_GA "Laghdaigh toirt Chainéal 3 FM an Mháistirchórais."
-#define GENESIS_PLUS_GX_SMS_FM_CHANNEL_4_VOLUME_LABEL_GA "Córas Máistir FM (YM2413) Cainéal 4 Imleabhar %"
-#define GENESIS_PLUS_GX_SMS_FM_CHANNEL_4_VOLUME_INFO_0_GA "Laghdaigh toirt Cainéal 4 FM an Mháistirchórais."
-#define GENESIS_PLUS_GX_SMS_FM_CHANNEL_5_VOLUME_LABEL_GA "Córas Máistir FM (YM2413) Cainéal 5 Imleabhar %"
-#define GENESIS_PLUS_GX_SMS_FM_CHANNEL_5_VOLUME_INFO_0_GA "Laghdaigh toirt Chainéal 5 FM an Mháistirchórais."
-#define GENESIS_PLUS_GX_SMS_FM_CHANNEL_6_VOLUME_LABEL_GA "Córas Máistir FM (YM2413) Cainéal 6 Imleabhar %"
-#define GENESIS_PLUS_GX_SMS_FM_CHANNEL_6_VOLUME_INFO_0_GA "Laghdaigh toirt Chainéal 6 FM an Mháistirchórais."
-#define GENESIS_PLUS_GX_SMS_FM_CHANNEL_7_VOLUME_LABEL_GA "Córas Máistir FM (YM2413) Cainéal 7 Imleabhar %"
-#define GENESIS_PLUS_GX_SMS_FM_CHANNEL_7_VOLUME_INFO_0_GA "Laghdaigh toirt Chainéal 7 FM an Mháistirchórais."
-#define GENESIS_PLUS_GX_SMS_FM_CHANNEL_8_VOLUME_LABEL_GA "Córas Máistir FM (YM2413) Cainéal 8 Imleabhar %"
-#define GENESIS_PLUS_GX_SMS_FM_CHANNEL_8_VOLUME_INFO_0_GA "Laghdaigh toirt Chainéal 8 FM an Mháistirchórais."
-
-struct retro_core_option_v2_category option_cats_ga[] = {
- {
- "system",
- CATEGORY_SYSTEM_LABEL_GA,
- CATEGORY_SYSTEM_INFO_0_GA
- },
- {
- "video",
- CATEGORY_VIDEO_LABEL_GA,
- CATEGORY_VIDEO_INFO_0_GA
- },
- {
- "audio",
- CATEGORY_AUDIO_LABEL_GA,
- CATEGORY_AUDIO_INFO_0_GA
- },
- {
- "input",
- CATEGORY_INPUT_LABEL_GA,
- CATEGORY_INPUT_INFO_0_GA
- },
- {
- "hacks",
- CATEGORY_HACKS_LABEL_GA,
- CATEGORY_HACKS_INFO_0_GA
- },
- {
- "channel_volume",
- CATEGORY_CHANNEL_VOLUME_LABEL_GA,
- CATEGORY_CHANNEL_VOLUME_INFO_0_GA
- },
- { NULL, NULL, NULL },
-};
-struct retro_core_option_v2_definition option_defs_ga[] = {
- {
- "genesis_plus_gx_system_hw",
- GENESIS_PLUS_GX_SYSTEM_HW_LABEL_GA,
- NULL,
- GENESIS_PLUS_GX_SYSTEM_HW_INFO_0_GA,
- NULL,
- "system",
- {
- { "auto", OPTION_VAL_AUTO_GA },
- { "sg-1000", OPTION_VAL_SG_1000_GA },
- { "sg-1000 II", OPTION_VAL_SG_1000_II_GA },
- { "sg-1000 II + ram ext.",OPTION_VAL_SG_1000_II_RAM_EXT_GA},
- { "mark-III", OPTION_VAL_MARK_III_GA },
- { "master system", OPTION_VAL_MASTER_SYSTEM_GA },
- { "master system II", OPTION_VAL_MASTER_SYSTEM_II_GA },
- { "game gear", OPTION_VAL_GAME_GEAR_GA },
- { "mega drive / genesis", OPTION_VAL_MEGA_DRIVE_GENESIS_GA },
- { NULL, NULL },
- },
- "auto"
- },
- {
- "genesis_plus_gx_region_detect",
- GENESIS_PLUS_GX_REGION_DETECT_LABEL_GA,
- NULL,
- GENESIS_PLUS_GX_REGION_DETECT_INFO_0_GA,
- NULL,
- "system",
- {
- { "auto", OPTION_VAL_AUTO_GA },
- { "ntsc-u", OPTION_VAL_NTSC_U_GA },
- { "pal", OPTION_VAL_PAL_GA },
- { "ntsc-j", OPTION_VAL_NTSC_J_GA },
- { NULL, NULL },
- },
- "auto"
- },
- {
- "genesis_plus_gx_vdp_mode",
- GENESIS_PLUS_GX_VDP_MODE_LABEL_GA,
- NULL,
- GENESIS_PLUS_GX_VDP_MODE_INFO_0_GA,
- NULL,
- "system",
- {
- { "auto", "Disabled" },
- { "60hz", OPTION_VAL_60HZ_GA },
- { "50hz", OPTION_VAL_50HZ_GA },
- { NULL, NULL },
- },
- "auto"
- },
- {
- "genesis_plus_gx_bios",
- GENESIS_PLUS_GX_BIOS_LABEL_GA,
- NULL,
- GENESIS_PLUS_GX_BIOS_INFO_0_GA,
- NULL,
- "system",
- {
- { "disabled", NULL },
- { "enabled", NULL },
- { NULL, NULL },
- },
- "disabled"
- },
- {
- "genesis_plus_gx_system_bram",
- GENESIS_PLUS_GX_SYSTEM_BRAM_LABEL_GA,
- NULL,
- GENESIS_PLUS_GX_SYSTEM_BRAM_INFO_0_GA,
- NULL,
- "system",
- {
- { "per bios", OPTION_VAL_PER_BIOS_GA },
- { "per game", OPTION_VAL_PER_GAME_GA },
- { NULL, NULL },
- },
- "per bios"
- },
- {
- "genesis_plus_gx_cart_bram",
- GENESIS_PLUS_GX_CART_BRAM_LABEL_GA,
- NULL,
- GENESIS_PLUS_GX_CART_BRAM_INFO_0_GA,
- NULL,
- "system",
- {
- { "per cart", OPTION_VAL_PER_CART_GA },
- { "per game", OPTION_VAL_PER_GAME_GA },
- { NULL, NULL },
- },
- "per cart"
- },
- {
- "genesis_plus_gx_cart_size",
- GENESIS_PLUS_GX_CART_SIZE_LABEL_GA,
- NULL,
- GENESIS_PLUS_GX_CART_SIZE_INFO_0_GA,
- NULL,
- "system",
- {
- { "disabled", "Disabled" },
- { "128k", OPTION_VAL_128K_GA },
- { "256k", OPTION_VAL_256K_GA },
- { "512k", OPTION_VAL_512K_GA },
- { "1meg", OPTION_VAL_1MEG_GA },
- { "2meg", OPTION_VAL_2MEG_GA },
- { "4meg", OPTION_VAL_4MEG_GA },
- { NULL, NULL },
- },
- "4meg"
- },
- {
- "genesis_plus_gx_add_on",
- GENESIS_PLUS_GX_ADD_ON_LABEL_GA,
- NULL,
- GENESIS_PLUS_GX_ADD_ON_INFO_0_GA,
- NULL,
- "system",
- {
- { "auto", OPTION_VAL_AUTO_GA },
- { "sega/mega cd", OPTION_VAL_SEGA_MEGA_CD_GA },
- { "megasd", OPTION_VAL_MEGASD_GA },
- { "none", OPTION_VAL_NONE_GA },
- { NULL, NULL },
- },
- "auto"
- },
- {
- "genesis_plus_gx_lock_on",
- GENESIS_PLUS_GX_LOCK_ON_LABEL_GA,
- NULL,
- GENESIS_PLUS_GX_LOCK_ON_INFO_0_GA,
- NULL,
- "system",
- {
- { "disabled", NULL },
- { "game genie", OPTION_VAL_GAME_GENIE_GA },
- { "action replay (pro)", OPTION_VAL_ACTION_REPLAY_PRO_GA },
- { "sonic & knuckles", OPTION_VAL_SONIC_KNUCKLES_GA },
- { NULL, NULL },
- },
- "disabled"
- },
- {
- "genesis_plus_gx_aspect_ratio",
- GENESIS_PLUS_GX_ASPECT_RATIO_LABEL_GA,
- NULL,
- GENESIS_PLUS_GX_ASPECT_RATIO_INFO_0_GA,
- NULL,
- "video",
- {
- { "auto", OPTION_VAL_AUTO_GA },
- { "NTSC PAR", OPTION_VAL_NTSC_PAR_GA },
- { "PAL PAR", OPTION_VAL_PAL_PAR_GA },
- { "4:3", OPTION_VAL_4_3_GA },
- { "Uncorrected", OPTION_VAL_UNCORRECTED_GA },
- },
- "auto"
- },
- {
- "genesis_plus_gx_overscan",
- GENESIS_PLUS_GX_OVERSCAN_LABEL_GA,
- NULL,
- GENESIS_PLUS_GX_OVERSCAN_INFO_0_GA,
- NULL,
- "video",
- {
- { "disabled", NULL },
- { "top/bottom", OPTION_VAL_TOP_BOTTOM_GA },
- { "left/right", OPTION_VAL_LEFT_RIGHT_GA },
- { "full", OPTION_VAL_FULL_GA },
- { NULL, NULL },
- },
- "disabled"
- },
- {
- "genesis_plus_gx_left_border",
- GENESIS_PLUS_GX_LEFT_BORDER_LABEL_GA,
- NULL,
- GENESIS_PLUS_GX_LEFT_BORDER_INFO_0_GA,
- NULL,
- "video",
- {
- { "disabled", NULL },
- { "left border", OPTION_VAL_LEFT_BORDER_GA },
- { "left & right borders", OPTION_VAL_LEFT_RIGHT_BORDERS_GA },
- { NULL, NULL },
- },
- "disabled"
- },
- {
- "genesis_plus_gx_gg_extra",
- GENESIS_PLUS_GX_GG_EXTRA_LABEL_GA,
- NULL,
- GENESIS_PLUS_GX_GG_EXTRA_INFO_0_GA,
- NULL,
- "video",
- {
- { "disabled", NULL },
- { "enabled", NULL },
- { NULL, NULL },
- },
- "disabled"
- },
- {
- "genesis_plus_gx_blargg_ntsc_filter",
- GENESIS_PLUS_GX_BLARGG_NTSC_FILTER_LABEL_GA,
- NULL,
- GENESIS_PLUS_GX_BLARGG_NTSC_FILTER_INFO_0_GA,
- NULL,
- "video",
- {
- { "disabled", NULL },
- { "monochrome", OPTION_VAL_MONOCHROME_GA },
- { "composite", OPTION_VAL_COMPOSITE_GA },
- { "svideo", OPTION_VAL_SVIDEO_GA },
- { "rgb", OPTION_VAL_RGB_GA },
- { NULL, NULL },
- },
- "disabled"
- },
- {
- "genesis_plus_gx_lcd_filter",
- GENESIS_PLUS_GX_LCD_FILTER_LABEL_GA,
- NULL,
- GENESIS_PLUS_GX_LCD_FILTER_INFO_0_GA,
- NULL,
- "video",
- {
- { "disabled", NULL },
- { "enabled", NULL },
- { NULL, NULL },
- },
- "disabled"
- },
- {
- "genesis_plus_gx_render",
- GENESIS_PLUS_GX_RENDER_LABEL_GA,
- NULL,
- GENESIS_PLUS_GX_RENDER_INFO_0_GA,
- NULL,
- "video",
- {
- { "single field", OPTION_VAL_SINGLE_FIELD_GA },
- { "double field", OPTION_VAL_DOUBLE_FIELD_GA },
- { NULL, NULL },
- },
- "single field"
- },
- {
- "genesis_plus_gx_frameskip",
- GENESIS_PLUS_GX_FRAMESKIP_LABEL_GA,
- NULL,
- GENESIS_PLUS_GX_FRAMESKIP_INFO_0_GA,
- NULL,
- "video",
- {
- { "disabled", NULL },
- { "auto", OPTION_VAL_AUTO_GA },
- { "manual", OPTION_VAL_MANUAL_GA },
- { NULL, NULL },
- },
- "disabled"
- },
- {
- "genesis_plus_gx_frameskip_threshold",
- GENESIS_PLUS_GX_FRAMESKIP_THRESHOLD_LABEL_GA,
- NULL,
- GENESIS_PLUS_GX_FRAMESKIP_THRESHOLD_INFO_0_GA,
- NULL,
- "video",
- {
- { "15", NULL },
- { "18", NULL },
- { "21", NULL },
- { "24", NULL },
- { "27", NULL },
- { "30", NULL },
- { "33", NULL },
- { "36", NULL },
- { "39", NULL },
- { "42", NULL },
- { "45", NULL },
- { "48", NULL },
- { "51", NULL },
- { "54", NULL },
- { "57", NULL },
- { "60", NULL },
- { NULL, NULL },
- },
- "33"
- },
- {
- "genesis_plus_gx_ym2413",
- GENESIS_PLUS_GX_YM2413_LABEL_GA,
- NULL,
- GENESIS_PLUS_GX_YM2413_INFO_0_GA,
- NULL,
- "audio",
- {
- { "auto", OPTION_VAL_AUTO_GA },
- { "disabled", NULL },
- { "enabled", NULL },
- { NULL, NULL },
- },
- "auto"
- },
-#ifdef HAVE_OPLL_CORE
- {
- "genesis_plus_gx_ym2413_core",
- GENESIS_PLUS_GX_YM2413_CORE_LABEL_GA,
- NULL,
- GENESIS_PLUS_GX_YM2413_CORE_INFO_0_GA,
- NULL,
- "audio",
- {
- { "mame", OPTION_VAL_MAME_GA },
- { "nuked", OPTION_VAL_NUKED_GA },
- { NULL, NULL },
- },
- "mame"
- },
-#endif
- {
- "genesis_plus_gx_ym2612",
- GENESIS_PLUS_GX_YM2612_LABEL_GA,
- NULL,
-#ifdef HAVE_YM3438_CORE
- GENESIS_PLUS_GX_YM2612_INFO_0_GA,
-#else
- GENESIS_PLUS_GX_YM2612_INFO_1_GA,
-#endif
- NULL,
- "audio",
- {
- { "mame (ym2612)", OPTION_VAL_MAME_YM2612_GA },
- { "mame (asic ym3438)", OPTION_VAL_MAME_ASIC_YM3438_GA },
- { "mame (enhanced ym3438)", OPTION_VAL_MAME_ENHANCED_YM3438_GA },
-#ifdef HAVE_YM3438_CORE
- { "nuked (ym2612)", OPTION_VAL_NUKED_YM2612_GA },
- { "nuked (ym3438)", OPTION_VAL_NUKED_YM3438_GA },
-#endif
- { NULL, NULL },
- },
- "mame (ym2612)"
- },
- {
- "genesis_plus_gx_sound_output",
- GENESIS_PLUS_GX_SOUND_OUTPUT_LABEL_GA,
- NULL,
- GENESIS_PLUS_GX_SOUND_OUTPUT_INFO_0_GA,
- NULL,
- "audio",
- {
- { "stereo", OPTION_VAL_STEREO_GA },
- { "mono", OPTION_VAL_MONO_GA },
- { NULL, NULL },
- },
- "stereo"
- },
- {
- "genesis_plus_gx_audio_filter",
- GENESIS_PLUS_GX_AUDIO_FILTER_LABEL_GA,
- NULL,
- GENESIS_PLUS_GX_AUDIO_FILTER_INFO_0_GA,
- NULL,
- "audio",
- {
- { "disabled", NULL },
- { "low-pass", OPTION_VAL_LOW_PASS_GA },
-#ifdef HAVE_EQ
- { "EQ", OPTION_VAL_EQ_GA },
-#endif
- { NULL, NULL },
- },
- "disabled"
- },
- {
- "genesis_plus_gx_lowpass_range",
- GENESIS_PLUS_GX_LOWPASS_RANGE_LABEL_GA,
- NULL,
- GENESIS_PLUS_GX_LOWPASS_RANGE_INFO_0_GA,
- NULL,
- "audio",
- {
- { "5", NULL },
- { "10", NULL },
- { "15", NULL },
- { "20", NULL },
- { "25", NULL },
- { "30", NULL },
- { "35", NULL },
- { "40", NULL },
- { "45", NULL },
- { "50", NULL },
- { "55", NULL },
- { "60", NULL },
- { "65", NULL },
- { "70", NULL },
- { "75", NULL },
- { "80", NULL },
- { "85", NULL },
- { "90", NULL },
- { "95", NULL },
- { NULL, NULL },
- },
- "60"
- },
- {
- "genesis_plus_gx_psg_preamp",
- GENESIS_PLUS_GX_PSG_PREAMP_LABEL_GA,
- NULL,
- GENESIS_PLUS_GX_PSG_PREAMP_INFO_0_GA,
- NULL,
- "audio",
- {
- { "0", NULL },
- { "5", NULL },
- { "10", NULL },
- { "15", NULL },
- { "20", NULL },
- { "25", NULL },
- { "30", NULL },
- { "35", NULL },
- { "40", NULL },
- { "45", NULL },
- { "50", NULL },
- { "55", NULL },
- { "60", NULL },
- { "65", NULL },
- { "70", NULL },
- { "75", NULL },
- { "80", NULL },
- { "85", NULL },
- { "90", NULL },
- { "95", NULL },
- { "100", NULL },
- { "105", NULL },
- { "110", NULL },
- { "115", NULL },
- { "120", NULL },
- { "125", NULL },
- { "130", NULL },
- { "135", NULL },
- { "140", NULL },
- { "145", NULL },
- { "150", NULL },
- { "155", NULL },
- { "160", NULL },
- { "165", NULL },
- { "170", NULL },
- { "175", NULL },
- { "180", NULL },
- { "185", NULL },
- { "190", NULL },
- { "195", NULL },
- { "200", NULL },
- { NULL, NULL },
- },
- "150"
- },
- {
- "genesis_plus_gx_fm_preamp",
- GENESIS_PLUS_GX_FM_PREAMP_LABEL_GA,
- NULL,
- GENESIS_PLUS_GX_FM_PREAMP_INFO_0_GA,
- NULL,
- "audio",
- {
- { "0", NULL },
- { "5", NULL },
- { "10", NULL },
- { "15", NULL },
- { "20", NULL },
- { "25", NULL },
- { "30", NULL },
- { "35", NULL },
- { "40", NULL },
- { "45", NULL },
- { "50", NULL },
- { "55", NULL },
- { "60", NULL },
- { "65", NULL },
- { "70", NULL },
- { "75", NULL },
- { "80", NULL },
- { "85", NULL },
- { "90", NULL },
- { "95", NULL },
- { "100", NULL },
- { "105", NULL },
- { "110", NULL },
- { "115", NULL },
- { "120", NULL },
- { "125", NULL },
- { "130", NULL },
- { "135", NULL },
- { "140", NULL },
- { "145", NULL },
- { "150", NULL },
- { "155", NULL },
- { "160", NULL },
- { "165", NULL },
- { "170", NULL },
- { "175", NULL },
- { "180", NULL },
- { "185", NULL },
- { "190", NULL },
- { "195", NULL },
- { "200", NULL },
- { NULL, NULL },
- },
- "100"
- },
- {
- "genesis_plus_gx_cdda_volume",
- GENESIS_PLUS_GX_CDDA_VOLUME_LABEL_GA,
- NULL,
- GENESIS_PLUS_GX_CDDA_VOLUME_INFO_0_GA,
- NULL,
- "audio",
- {
- { "0", NULL },
- { "5", NULL },
- { "10", NULL },
- { "15", NULL },
- { "20", NULL },
- { "25", NULL },
- { "30", NULL },
- { "35", NULL },
- { "40", NULL },
- { "45", NULL },
- { "50", NULL },
- { "55", NULL },
- { "60", NULL },
- { "65", NULL },
- { "70", NULL },
- { "75", NULL },
- { "80", NULL },
- { "85", NULL },
- { "90", NULL },
- { "95", NULL },
- { "100", NULL },
- { NULL, NULL },
- },
- "100"
- },
- {
- "genesis_plus_gx_pcm_volume",
- GENESIS_PLUS_GX_PCM_VOLUME_LABEL_GA,
- NULL,
- GENESIS_PLUS_GX_PCM_VOLUME_INFO_0_GA,
- NULL,
- "audio",
- {
- { "0", NULL },
- { "5", NULL },
- { "10", NULL },
- { "15", NULL },
- { "20", NULL },
- { "25", NULL },
- { "30", NULL },
- { "35", NULL },
- { "40", NULL },
- { "45", NULL },
- { "50", NULL },
- { "55", NULL },
- { "60", NULL },
- { "65", NULL },
- { "70", NULL },
- { "75", NULL },
- { "80", NULL },
- { "85", NULL },
- { "90", NULL },
- { "95", NULL },
- { "100", NULL },
- { NULL, NULL },
- },
- "100"
- },
-#ifdef HAVE_EQ
- {
- "genesis_plus_gx_audio_eq_low",
- GENESIS_PLUS_GX_AUDIO_EQ_LOW_LABEL_GA,
- NULL,
- GENESIS_PLUS_GX_AUDIO_EQ_LOW_INFO_0_GA,
- NULL,
- "audio",
- {
- { "0", NULL },
- { "5", NULL },
- { "10", NULL },
- { "15", NULL },
- { "20", NULL },
- { "25", NULL },
- { "30", NULL },
- { "35", NULL },
- { "40", NULL },
- { "45", NULL },
- { "50", NULL },
- { "55", NULL },
- { "60", NULL },
- { "65", NULL },
- { "70", NULL },
- { "75", NULL },
- { "80", NULL },
- { "85", NULL },
- { "90", NULL },
- { "95", NULL },
- { "100", NULL },
- { NULL, NULL },
- },
- "100"
- },
- {
- "genesis_plus_gx_audio_eq_mid",
- GENESIS_PLUS_GX_AUDIO_EQ_MID_LABEL_GA,
- NULL,
- GENESIS_PLUS_GX_AUDIO_EQ_MID_INFO_0_GA,
- NULL,
- "audio",
- {
- { "0", NULL },
- { "5", NULL },
- { "10", NULL },
- { "15", NULL },
- { "20", NULL },
- { "25", NULL },
- { "30", NULL },
- { "35", NULL },
- { "40", NULL },
- { "45", NULL },
- { "50", NULL },
- { "55", NULL },
- { "60", NULL },
- { "65", NULL },
- { "70", NULL },
- { "75", NULL },
- { "80", NULL },
- { "85", NULL },
- { "90", NULL },
- { "95", NULL },
- { "100", NULL },
- { NULL, NULL },
- },
- "100"
- },
- {
- "genesis_plus_gx_audio_eq_high",
- GENESIS_PLUS_GX_AUDIO_EQ_HIGH_LABEL_GA,
- NULL,
- GENESIS_PLUS_GX_AUDIO_EQ_HIGH_INFO_0_GA,
- NULL,
- "audio",
- {
- { "0", NULL },
- { "5", NULL },
- { "10", NULL },
- { "15", NULL },
- { "20", NULL },
- { "25", NULL },
- { "30", NULL },
- { "35", NULL },
- { "40", NULL },
- { "45", NULL },
- { "50", NULL },
- { "55", NULL },
- { "60", NULL },
- { "65", NULL },
- { "70", NULL },
- { "75", NULL },
- { "80", NULL },
- { "85", NULL },
- { "90", NULL },
- { "95", NULL },
- { "100", NULL },
- { NULL, NULL },
- },
- "100"
- },
-#endif
- {
- "genesis_plus_gx_gun_input",
- GENESIS_PLUS_GX_GUN_INPUT_LABEL_GA,
- NULL,
- GENESIS_PLUS_GX_GUN_INPUT_INFO_0_GA,
- NULL,
- "input",
- {
- { "lightgun", OPTION_VAL_LIGHTGUN_GA },
- { "touchscreen", OPTION_VAL_TOUCHSCREEN_GA },
- { NULL, NULL },
- },
- "lightgun"
- },
- {
- "genesis_plus_gx_gun_cursor",
- GENESIS_PLUS_GX_GUN_CURSOR_LABEL_GA,
- NULL,
- GENESIS_PLUS_GX_GUN_CURSOR_INFO_0_GA,
- NULL,
- "input",
- {
- { "disabled", NULL },
- { "enabled", NULL },
- { NULL, NULL },
- },
- "disabled"
- },
- {
- "genesis_plus_gx_invert_mouse",
- GENESIS_PLUS_GX_INVERT_MOUSE_LABEL_GA,
- NULL,
- GENESIS_PLUS_GX_INVERT_MOUSE_INFO_0_GA,
- NULL,
- "input",
- {
- { "disabled", NULL },
- { "enabled", NULL },
- { NULL, NULL },
- },
- "disabled"
- },
- {
- "genesis_plus_gx_no_sprite_limit",
- GENESIS_PLUS_GX_NO_SPRITE_LIMIT_LABEL_GA,
- NULL,
- GENESIS_PLUS_GX_NO_SPRITE_LIMIT_INFO_0_GA,
- NULL,
- "hacks",
- {
- { "disabled", NULL },
- { "enabled", NULL },
- { NULL, NULL },
- },
- "disabled"
- },
- {
- "genesis_plus_gx_enhanced_vscroll",
- GENESIS_PLUS_GX_ENHANCED_VSCROLL_LABEL_GA,
- NULL,
- GENESIS_PLUS_GX_ENHANCED_VSCROLL_INFO_0_GA,
- NULL,
- "hacks",
- {
- { "disabled", NULL },
- { "enabled", NULL },
- { NULL, NULL },
- },
- "disabled"
- },
- {
- "genesis_plus_gx_enhanced_vscroll_limit",
- GENESIS_PLUS_GX_ENHANCED_VSCROLL_LIMIT_LABEL_GA,
- NULL,
- GENESIS_PLUS_GX_ENHANCED_VSCROLL_LIMIT_INFO_0_GA,
- NULL,
- "hacks",
- {
- { "2", NULL },
- { "3", NULL },
- { "4", NULL },
- { "5", NULL },
- { "6", NULL },
- { "7", NULL },
- { "8", NULL },
- { "9", NULL },
- { "10", NULL },
- { "11", NULL },
- { "12", NULL },
- { "13", NULL },
- { "14", NULL },
- { "15", NULL },
- { "16", NULL },
- { NULL, NULL },
- },
- "8"
- },
-#ifdef HAVE_OVERCLOCK
- {
- "genesis_plus_gx_overclock",
- GENESIS_PLUS_GX_OVERCLOCK_LABEL_GA,
- NULL,
- GENESIS_PLUS_GX_OVERCLOCK_INFO_0_GA,
- NULL,
- "hacks",
- {
- { "100", OPTION_VAL_100_GA },
- { "125", OPTION_VAL_125_GA },
- { "150", OPTION_VAL_150_GA },
- { "175", OPTION_VAL_175_GA },
- { "200", OPTION_VAL_200_GA },
- { "225", OPTION_VAL_225_GA },
- { "250", OPTION_VAL_250_GA },
- { "275", OPTION_VAL_275_GA },
- { "300", OPTION_VAL_300_GA },
- { "325", OPTION_VAL_325_GA },
- { "350", OPTION_VAL_350_GA },
- { "375", OPTION_VAL_375_GA },
- { "400", OPTION_VAL_400_GA },
- { "425", OPTION_VAL_425_GA },
- { "450", OPTION_VAL_450_GA },
- { "475", OPTION_VAL_475_GA },
- { "500", OPTION_VAL_500_GA },
- { NULL, NULL },
- },
- "100%"
- },
-#endif
- {
- "genesis_plus_gx_force_dtack",
- GENESIS_PLUS_GX_FORCE_DTACK_LABEL_GA,
- NULL,
- GENESIS_PLUS_GX_FORCE_DTACK_INFO_0_GA,
- NULL,
- "hacks",
- {
- { "enabled", NULL },
- { "disabled", NULL },
- { NULL, NULL },
- },
- "enabled"
- },
- {
- "genesis_plus_gx_addr_error",
- GENESIS_PLUS_GX_ADDR_ERROR_LABEL_GA,
- NULL,
- GENESIS_PLUS_GX_ADDR_ERROR_INFO_0_GA,
- NULL,
- "hacks",
- {
- { "enabled", NULL },
- { "disabled", NULL },
- { NULL, NULL },
- },
- "enabled"
- },
- {
- "genesis_plus_gx_cd_latency",
- GENESIS_PLUS_GX_CD_LATENCY_LABEL_GA,
- NULL,
- GENESIS_PLUS_GX_CD_LATENCY_INFO_0_GA,
- NULL,
- "hacks",
- {
- { "enabled", NULL },
- { "disabled", NULL },
- { NULL, NULL },
- },
- "enabled"
- },
- {
- "genesis_plus_gx_cd_precache",
- GENESIS_PLUS_GX_CD_PRECACHE_LABEL_GA,
- NULL,
- GENESIS_PLUS_GX_CD_PRECACHE_INFO_0_GA,
- NULL,
- "hacks",
- {
- { "disabled", NULL },
- { "enabled", NULL },
- { NULL, NULL },
- },
- "disabled"
- },
-#ifdef USE_PER_SOUND_CHANNELS_CONFIG
- {
- "genesis_plus_gx_show_advanced_audio_settings",
- GENESIS_PLUS_GX_SHOW_ADVANCED_AUDIO_SETTINGS_LABEL_GA,
- NULL,
- GENESIS_PLUS_GX_SHOW_ADVANCED_AUDIO_SETTINGS_INFO_0_GA,
- NULL,
- "channel_volume",
- {
- { "enabled", NULL },
- { "disabled", NULL },
- { NULL, NULL},
- },
- "disabled"
- },
- {
- "genesis_plus_gx_psg_channel_0_volume",
- GENESIS_PLUS_GX_PSG_CHANNEL_0_VOLUME_LABEL_GA,
- NULL,
- GENESIS_PLUS_GX_PSG_CHANNEL_0_VOLUME_INFO_0_GA,
- NULL,
- "channel_volume",
- {
- { "0", NULL },
- { "10", NULL },
- { "20", NULL },
- { "30", NULL },
- { "40", NULL },
- { "50", NULL },
- { "60", NULL },
- { "70", NULL },
- { "80", NULL },
- { "90", NULL },
- { "100", NULL },
- { NULL, NULL },
- },
- "100"
- },
- {
- "genesis_plus_gx_psg_channel_1_volume",
- GENESIS_PLUS_GX_PSG_CHANNEL_1_VOLUME_LABEL_GA,
- NULL,
- GENESIS_PLUS_GX_PSG_CHANNEL_1_VOLUME_INFO_0_GA,
- NULL,
- "channel_volume",
- {
- { "0", NULL },
- { "10", NULL },
- { "20", NULL },
- { "30", NULL },
- { "40", NULL },
- { "50", NULL },
- { "60", NULL },
- { "70", NULL },
- { "80", NULL },
- { "90", NULL },
- { "100", NULL },
- { NULL, NULL },
- },
- "100"
- },
- {
- "genesis_plus_gx_psg_channel_2_volume",
- GENESIS_PLUS_GX_PSG_CHANNEL_2_VOLUME_LABEL_GA,
- NULL,
- GENESIS_PLUS_GX_PSG_CHANNEL_2_VOLUME_INFO_0_GA,
- NULL,
- "channel_volume",
- {
- { "0", NULL },
- { "10", NULL },
- { "20", NULL },
- { "30", NULL },
- { "40", NULL },
- { "50", NULL },
- { "60", NULL },
- { "70", NULL },
- { "80", NULL },
- { "90", NULL },
- { "100", NULL },
- { NULL, NULL },
- },
- "100"
- },
- {
- "genesis_plus_gx_psg_channel_3_volume",
- GENESIS_PLUS_GX_PSG_CHANNEL_3_VOLUME_LABEL_GA,
- NULL,
- GENESIS_PLUS_GX_PSG_CHANNEL_3_VOLUME_INFO_0_GA,
- NULL,
- "channel_volume",
- {
- { "0", NULL },
- { "10", NULL },
- { "20", NULL },
- { "30", NULL },
- { "40", NULL },
- { "50", NULL },
- { "60", NULL },
- { "70", NULL },
- { "80", NULL },
- { "90", NULL },
- { "100", NULL },
- { NULL, NULL },
- },
- "100"
- },
- {
- "genesis_plus_gx_md_channel_0_volume",
- GENESIS_PLUS_GX_MD_CHANNEL_0_VOLUME_LABEL_GA,
- NULL,
- GENESIS_PLUS_GX_MD_CHANNEL_0_VOLUME_INFO_0_GA,
- NULL,
- "channel_volume",
- {
- { "0", NULL },
- { "10", NULL },
- { "20", NULL },
- { "30", NULL },
- { "40", NULL },
- { "50", NULL },
- { "60", NULL },
- { "70", NULL },
- { "80", NULL },
- { "90", NULL },
- { "100", NULL },
- { NULL, NULL },
- },
- "100"
- },
- {
- "genesis_plus_gx_md_channel_1_volume",
- GENESIS_PLUS_GX_MD_CHANNEL_1_VOLUME_LABEL_GA,
- NULL,
- GENESIS_PLUS_GX_MD_CHANNEL_1_VOLUME_INFO_0_GA,
- NULL,
- "channel_volume",
- {
- { "0", NULL },
- { "10", NULL },
- { "20", NULL },
- { "30", NULL },
- { "40", NULL },
- { "50", NULL },
- { "60", NULL },
- { "70", NULL },
- { "80", NULL },
- { "90", NULL },
- { "100", NULL },
- { NULL, NULL },
- },
- "100"
- },
- {
- "genesis_plus_gx_md_channel_2_volume",
- GENESIS_PLUS_GX_MD_CHANNEL_2_VOLUME_LABEL_GA,
- NULL,
- GENESIS_PLUS_GX_MD_CHANNEL_2_VOLUME_INFO_0_GA,
- NULL,
- "channel_volume",
- {
- { "0", NULL },
- { "10", NULL },
- { "20", NULL },
- { "30", NULL },
- { "40", NULL },
- { "50", NULL },
- { "60", NULL },
- { "70", NULL },
- { "80", NULL },
- { "90", NULL },
- { "100", NULL },
- { NULL, NULL },
- },
- "100"
- },
- {
- "genesis_plus_gx_md_channel_3_volume",
- GENESIS_PLUS_GX_MD_CHANNEL_3_VOLUME_LABEL_GA,
- NULL,
- GENESIS_PLUS_GX_MD_CHANNEL_3_VOLUME_INFO_0_GA,
- NULL,
- "channel_volume",
- {
- { "0", NULL },
- { "10", NULL },
- { "20", NULL },
- { "30", NULL },
- { "40", NULL },
- { "50", NULL },
- { "60", NULL },
- { "70", NULL },
- { "80", NULL },
- { "90", NULL },
- { "100", NULL },
- { NULL, NULL },
- },
- "100"
- },
- {
- "genesis_plus_gx_md_channel_4_volume",
- GENESIS_PLUS_GX_MD_CHANNEL_4_VOLUME_LABEL_GA,
- NULL,
- GENESIS_PLUS_GX_MD_CHANNEL_4_VOLUME_INFO_0_GA,
- NULL,
- "channel_volume",
- {
- { "0", NULL },
- { "10", NULL },
- { "20", NULL },
- { "30", NULL },
- { "40", NULL },
- { "50", NULL },
- { "60", NULL },
- { "70", NULL },
- { "80", NULL },
- { "90", NULL },
- { "100", NULL },
- { NULL, NULL },
- },
- "100"
- },
- {
- "genesis_plus_gx_md_channel_5_volume",
- GENESIS_PLUS_GX_MD_CHANNEL_5_VOLUME_LABEL_GA,
- NULL,
- GENESIS_PLUS_GX_MD_CHANNEL_5_VOLUME_INFO_0_GA,
- NULL,
- "channel_volume",
- {
- { "0", NULL },
- { "10", NULL },
- { "20", NULL },
- { "30", NULL },
- { "40", NULL },
- { "50", NULL },
- { "60", NULL },
- { "70", NULL },
- { "80", NULL },
- { "90", NULL },
- { "100", NULL },
- { NULL, NULL },
- },
- "100"
- },
- {
- "genesis_plus_gx_sms_fm_channel_0_volume",
- GENESIS_PLUS_GX_SMS_FM_CHANNEL_0_VOLUME_LABEL_GA,
- NULL,
- GENESIS_PLUS_GX_SMS_FM_CHANNEL_0_VOLUME_INFO_0_GA,
- NULL,
- "channel_volume",
- {
- { "0", NULL },
- { "10", NULL },
- { "20", NULL },
- { "30", NULL },
- { "40", NULL },
- { "50", NULL },
- { "60", NULL },
- { "70", NULL },
- { "80", NULL },
- { "90", NULL },
- { "100", NULL },
- { NULL, NULL },
- },
- "100"
- },
- {
- "genesis_plus_gx_sms_fm_channel_1_volume",
- GENESIS_PLUS_GX_SMS_FM_CHANNEL_1_VOLUME_LABEL_GA,
- NULL,
- GENESIS_PLUS_GX_SMS_FM_CHANNEL_1_VOLUME_INFO_0_GA,
- NULL,
- "channel_volume",
- {
- { "0", NULL },
- { "10", NULL },
- { "20", NULL },
- { "30", NULL },
- { "40", NULL },
- { "50", NULL },
- { "60", NULL },
- { "70", NULL },
- { "80", NULL },
- { "90", NULL },
- { "100", NULL },
- { NULL, NULL },
- },
- "100"
- },
- {
- "genesis_plus_gx_sms_fm_channel_2_volume",
- GENESIS_PLUS_GX_SMS_FM_CHANNEL_2_VOLUME_LABEL_GA,
- NULL,
- GENESIS_PLUS_GX_SMS_FM_CHANNEL_2_VOLUME_INFO_0_GA,
- NULL,
- "channel_volume",
- {
- { "0", NULL },
- { "10", NULL },
- { "20", NULL },
- { "30", NULL },
- { "40", NULL },
- { "50", NULL },
- { "60", NULL },
- { "70", NULL },
- { "80", NULL },
- { "90", NULL },
- { "100", NULL },
- { NULL, NULL },
- },
- "100"
- },
- {
- "genesis_plus_gx_sms_fm_channel_3_volume",
- GENESIS_PLUS_GX_SMS_FM_CHANNEL_3_VOLUME_LABEL_GA,
- NULL,
- GENESIS_PLUS_GX_SMS_FM_CHANNEL_3_VOLUME_INFO_0_GA,
- NULL,
- "channel_volume",
- {
- { "0", NULL },
- { "10", NULL },
- { "20", NULL },
- { "30", NULL },
- { "40", NULL },
- { "50", NULL },
- { "60", NULL },
- { "70", NULL },
- { "80", NULL },
- { "90", NULL },
- { "100", NULL },
- { NULL, NULL },
- },
- "100"
- },
- {
- "genesis_plus_gx_sms_fm_channel_4_volume",
- GENESIS_PLUS_GX_SMS_FM_CHANNEL_4_VOLUME_LABEL_GA,
- NULL,
- GENESIS_PLUS_GX_SMS_FM_CHANNEL_4_VOLUME_INFO_0_GA,
- NULL,
- "channel_volume",
- {
- { "0", NULL },
- { "10", NULL },
- { "20", NULL },
- { "30", NULL },
- { "40", NULL },
- { "50", NULL },
- { "60", NULL },
- { "70", NULL },
- { "80", NULL },
- { "90", NULL },
- { "100", NULL },
- { NULL, NULL },
- },
- "100"
- },
- {
- "genesis_plus_gx_sms_fm_channel_5_volume",
- GENESIS_PLUS_GX_SMS_FM_CHANNEL_5_VOLUME_LABEL_GA,
- NULL,
- GENESIS_PLUS_GX_SMS_FM_CHANNEL_5_VOLUME_INFO_0_GA,
- NULL,
- "channel_volume",
- {
- { "0", NULL },
- { "10", NULL },
- { "20", NULL },
- { "30", NULL },
- { "40", NULL },
- { "50", NULL },
- { "60", NULL },
- { "70", NULL },
- { "80", NULL },
- { "90", NULL },
- { "100", NULL },
- { NULL, NULL },
- },
- "100"
- },
- {
- "genesis_plus_gx_sms_fm_channel_6_volume",
- GENESIS_PLUS_GX_SMS_FM_CHANNEL_6_VOLUME_LABEL_GA,
- NULL,
- GENESIS_PLUS_GX_SMS_FM_CHANNEL_6_VOLUME_INFO_0_GA,
- NULL,
- "channel_volume",
- {
- { "0", NULL },
- { "10", NULL },
- { "20", NULL },
- { "30", NULL },
- { "40", NULL },
- { "50", NULL },
- { "60", NULL },
- { "70", NULL },
- { "80", NULL },
- { "90", NULL },
- { "100", NULL },
- { NULL, NULL },
- },
- "100"
- },
- {
- "genesis_plus_gx_sms_fm_channel_7_volume",
- GENESIS_PLUS_GX_SMS_FM_CHANNEL_7_VOLUME_LABEL_GA,
- NULL,
- GENESIS_PLUS_GX_SMS_FM_CHANNEL_7_VOLUME_INFO_0_GA,
- NULL,
- "channel_volume",
- {
- { "0", NULL },
- { "10", NULL },
- { "20", NULL },
- { "30", NULL },
- { "40", NULL },
- { "50", NULL },
- { "60", NULL },
- { "70", NULL },
- { "80", NULL },
- { "90", NULL },
- { "100", NULL },
- { NULL, NULL },
- },
- "100"
- },
- {
- "genesis_plus_gx_sms_fm_channel_8_volume",
- GENESIS_PLUS_GX_SMS_FM_CHANNEL_8_VOLUME_LABEL_GA,
- NULL,
- GENESIS_PLUS_GX_SMS_FM_CHANNEL_8_VOLUME_INFO_0_GA,
- NULL,
- "channel_volume",
- {
- { "0", NULL },
- { "10", NULL },
- { "20", NULL },
- { "30", NULL },
- { "40", NULL },
- { "50", NULL },
- { "60", NULL },
- { "70", NULL },
- { "80", NULL },
- { "90", NULL },
- { "100", NULL },
- { NULL, NULL },
- },
- "100"
- },
-#endif
- { NULL, NULL, NULL, NULL, NULL, NULL, {{0}}, NULL },
-};
-struct retro_core_options_v2 options_ga = {
- option_cats_ga,
- option_defs_ga
-};
-
/* RETRO_LANGUAGE_GL */
#define CATEGORY_SYSTEM_LABEL_GL "Sistema"
@@ -56775,7 +55199,7 @@ struct retro_core_options_v2 options_sr = {
/* RETRO_LANGUAGE_SV */
#define CATEGORY_SYSTEM_LABEL_SV NULL
-#define CATEGORY_SYSTEM_INFO_0_SV "Ändra val av basmaskinvara, region, BIOS och inställningar för Sega CD/Mega-CD-sparfil."
+#define CATEGORY_SYSTEM_INFO_0_SV NULL
#define CATEGORY_VIDEO_LABEL_SV NULL
#define CATEGORY_VIDEO_INFO_0_SV "Ändra bildformat, beskärning, videofilter och inställningar för bildruteskippning."
#define CATEGORY_AUDIO_LABEL_SV "Ljud"
@@ -56812,19 +55236,19 @@ struct retro_core_options_v2 options_sr = {
#define GENESIS_PLUS_GX_SYSTEM_BRAM_INFO_0_SV "När du kör Sega CD/Mega-CD-innehåll anger du om en enda sparfil ska delas mellan alla spel från en viss region (Per-BIOS) eller om en separat sparfil ska skapas för varje spel (Per-Game). Observera att Sega CD/Mega-CD har ett begränsat internt lagringsutrymme, som endast räcker till en handfull titlar. För att undvika att utrymmet tar slut rekommenderas inställningen ”Per-Game”."
#define OPTION_VAL_PER_BIOS_SV NULL
#define OPTION_VAL_PER_GAME_SV "Per-Spel"
-#define GENESIS_PLUS_GX_CART_BRAM_LABEL_SV "CD Backup Cart BRAM (kräver omstart)"
+#define GENESIS_PLUS_GX_CART_BRAM_LABEL_SV NULL
#define GENESIS_PLUS_GX_CART_BRAM_INFO_0_SV "När du kör Sega CD/Mega-CD-innehåll anger du om en enda ramkassett för säkerhetskopiering ska delas för alla spel (Per-Cart) eller om en separat ramkassett för säkerhetskopiering ska skapas för varje spel (Per-Game)."
-#define OPTION_VAL_PER_CART_SV "Per-kassett"
-#define GENESIS_PLUS_GX_CART_SIZE_LABEL_SV "CD Backup Cart BRAM-storlek (kräver omstart)"
-#define GENESIS_PLUS_GX_CART_SIZE_INFO_0_SV "Ställer in storleken på backup-ramkortet när du kör Sega CD/Mega-CD-innehåll. Användbart när du ställer in backup-ramkortet på Per spel för att undvika flera större kortstorlekar."
+#define OPTION_VAL_PER_CART_SV NULL
+#define GENESIS_PLUS_GX_CART_SIZE_LABEL_SV NULL
+#define GENESIS_PLUS_GX_CART_SIZE_INFO_0_SV NULL
#define OPTION_VAL_128K_SV NULL
#define OPTION_VAL_256K_SV NULL
#define OPTION_VAL_512K_SV NULL
#define OPTION_VAL_1MEG_SV NULL
#define OPTION_VAL_2MEG_SV NULL
#define OPTION_VAL_4MEG_SV NULL
-#define GENESIS_PLUS_GX_ADD_ON_LABEL_SV "CD-tillägg (MD-läge) (kräver omstart)"
-#define GENESIS_PLUS_GX_ADD_ON_INFO_0_SV "Ange vilket tillägg som ska användas för uppspelning av CD-ljud med Mega Drive/Genesis-spel som stöds."
+#define GENESIS_PLUS_GX_ADD_ON_LABEL_SV NULL
+#define GENESIS_PLUS_GX_ADD_ON_INFO_0_SV NULL
#define OPTION_VAL_SEGA_MEGA_CD_SV NULL
#define OPTION_VAL_MEGASD_SV NULL
#define OPTION_VAL_NONE_SV "Ingen"
@@ -56840,15 +55264,15 @@ struct retro_core_options_v2 options_sr = {
#define OPTION_VAL_4_3_SV NULL
#define OPTION_VAL_UNCORRECTED_SV "Okorrigerad"
#define GENESIS_PLUS_GX_OVERSCAN_LABEL_SV "Ramar"
-#define GENESIS_PLUS_GX_OVERSCAN_INFO_0_SV "Aktivera detta för att visa överskanningsområdena längst upp/ned och/eller till vänster/höger på skärmen. Dessa skulle normalt vara dolda av ramen runt kanten på en standard-Tv."
+#define GENESIS_PLUS_GX_OVERSCAN_INFO_0_SV NULL
#define OPTION_VAL_TOP_BOTTOM_SV "Topp/Botten"
#define OPTION_VAL_LEFT_RIGHT_SV "Vänster/Höger"
#define OPTION_VAL_FULL_SV NULL
#define GENESIS_PLUS_GX_LEFT_BORDER_LABEL_SV "Dölj sidokanter för Master System"
-#define GENESIS_PLUS_GX_LEFT_BORDER_INFO_0_SV "Skär bort 8 bildpunkter från antingen vänster sida av skärmen eller från både vänster och höger sida när Master System-spel körs."
+#define GENESIS_PLUS_GX_LEFT_BORDER_INFO_0_SV NULL
#define OPTION_VAL_LEFT_BORDER_SV "Endast vänster ram"
#define OPTION_VAL_LEFT_RIGHT_BORDERS_SV "Vänstra och högra ramar"
-#define GENESIS_PLUS_GX_GG_EXTRA_LABEL_SV "Utökad skärm för Game Gear"
+#define GENESIS_PLUS_GX_GG_EXTRA_LABEL_SV NULL
#define GENESIS_PLUS_GX_GG_EXTRA_INFO_0_SV "Tvingar Game Gear-titlar att köras i SMS-läge, med en ökad upplösning på 256x192. Kan visa ytterligare innehåll, men visar vanligtvis en kant av korrupt/olämplig bilddata."
#define GENESIS_PLUS_GX_BLARGG_NTSC_FILTER_LABEL_SV "Blargg NTSC-filter"
#define GENESIS_PLUS_GX_BLARGG_NTSC_FILTER_INFO_0_SV "Använd ett videofilter för att efterlikna olika NTSC-TV-signaler."
@@ -56868,8 +55292,8 @@ struct retro_core_options_v2 options_sr = {
#define GENESIS_PLUS_GX_FRAMESKIP_THRESHOLD_LABEL_SV "Frameskip Tröskelvärde (%)"
#define GENESIS_PLUS_GX_FRAMESKIP_THRESHOLD_INFO_0_SV "När 'Frameskip' är satt till 'Manuell', ange ljudbuffertens tröskel (i procent) under vilka ramar som kommer att hoppas över. Högre värden minskar risken för hackigt ljud genom att bildrutor tappas oftare."
#define GENESIS_PLUS_GX_YM2413_LABEL_SV NULL
-#define GENESIS_PLUS_GX_YM2413_INFO_0_SV "Aktivera emulering av FM-ljudkortet som används av vissa Sega Mark III/Master System-spel för förbättrad ljudutgång."
-#define GENESIS_PLUS_GX_YM2413_CORE_LABEL_SV "Kärna för Master System FM (YM2413)"
+#define GENESIS_PLUS_GX_YM2413_INFO_0_SV NULL
+#define GENESIS_PLUS_GX_YM2413_CORE_LABEL_SV NULL
#define GENESIS_PLUS_GX_YM2413_CORE_INFO_0_SV "Välj metod som används för att emulera FM-ljudenheten i Sega Mark III/Master System. ”MAME\"-alternativet är snabbt och körs i full hastighet på de flesta system. Alternativet ”Nuked” är cykelnoggrannt, av mycket hög kvalitet och har betydande CPU-krav."
#define OPTION_VAL_MAME_SV NULL
#define OPTION_VAL_NUKED_SV NULL
@@ -56889,22 +55313,22 @@ struct retro_core_options_v2 options_sr = {
#define GENESIS_PLUS_GX_AUDIO_FILTER_INFO_0_SV "Aktivera ett lågpassljudfilter för att bättre simulera det karakteristiska ljudet från en Model 1 Mega Drive/Genesis."
#define OPTION_VAL_LOW_PASS_SV "Lågpass"
#define OPTION_VAL_EQ_SV NULL
-#define GENESIS_PLUS_GX_LOWPASS_RANGE_LABEL_SV "Lågpassfilter %"
-#define GENESIS_PLUS_GX_LOWPASS_RANGE_INFO_0_SV "Ange gränsfrekvensen för ljudets lågpassfilter. Ett högre värde ökar den upplevda ”styrkan” hos filtret, eftersom ett bredare spektrum av höga frekvenser dämpas."
-#define GENESIS_PLUS_GX_PSG_PREAMP_LABEL_SV "PSG-förförstärkarens nivå"
-#define GENESIS_PLUS_GX_PSG_PREAMP_INFO_0_SV "Ställ in ljudförförstärkarnivån för den emulerade SN76496 4-kanals programmerbara ljudgeneratorn som finns i SG-1000, Sega Mark III, Master System, Game Gear och Mega Drive/Genesis."
-#define GENESIS_PLUS_GX_FM_PREAMP_LABEL_SV "FM-förförstärkarnivå"
-#define GENESIS_PLUS_GX_FM_PREAMP_INFO_0_SV "Ställ in ljudförförstärkarens nivå för den emulerade Mega Drive/Genesis FM-ljudsyntetisatorn eller Sega Mark III/Master System FM-ljudkällan."
+#define GENESIS_PLUS_GX_LOWPASS_RANGE_LABEL_SV NULL
+#define GENESIS_PLUS_GX_LOWPASS_RANGE_INFO_0_SV NULL
+#define GENESIS_PLUS_GX_PSG_PREAMP_LABEL_SV NULL
+#define GENESIS_PLUS_GX_PSG_PREAMP_INFO_0_SV NULL
+#define GENESIS_PLUS_GX_FM_PREAMP_LABEL_SV NULL
+#define GENESIS_PLUS_GX_FM_PREAMP_INFO_0_SV NULL
#define GENESIS_PLUS_GX_CDDA_VOLUME_LABEL_SV "CD-DA-volym"
#define GENESIS_PLUS_GX_CDDA_VOLUME_INFO_0_SV "Justera mixningsvolymen för den emulerade uppspelningen av CD-ljud."
#define GENESIS_PLUS_GX_PCM_VOLUME_LABEL_SV "PCM-volym"
-#define GENESIS_PLUS_GX_PCM_VOLUME_INFO_0_SV "Justera mixningsvolymen för den emulerade Sega CD/Mega-CD RF5C164 PCM-ljudgeneratorns utgång."
+#define GENESIS_PLUS_GX_PCM_VOLUME_INFO_0_SV NULL
#define GENESIS_PLUS_GX_AUDIO_EQ_LOW_LABEL_SV "EQ låg"
-#define GENESIS_PLUS_GX_AUDIO_EQ_LOW_INFO_0_SV "Justera det låga frekvensområdet för den interna ljudequalizern."
+#define GENESIS_PLUS_GX_AUDIO_EQ_LOW_INFO_0_SV NULL
#define GENESIS_PLUS_GX_AUDIO_EQ_MID_LABEL_SV "EQ mid"
-#define GENESIS_PLUS_GX_AUDIO_EQ_MID_INFO_0_SV "Justera det mellersta frekvensområdet för den interna ljudequalizern."
+#define GENESIS_PLUS_GX_AUDIO_EQ_MID_INFO_0_SV NULL
#define GENESIS_PLUS_GX_AUDIO_EQ_HIGH_LABEL_SV "EQ hög"
-#define GENESIS_PLUS_GX_AUDIO_EQ_HIGH_INFO_0_SV "Justera det höga frekvensområdet för den interna ljudequalizern."
+#define GENESIS_PLUS_GX_AUDIO_EQ_HIGH_INFO_0_SV NULL
#define GENESIS_PLUS_GX_GUN_INPUT_LABEL_SV "Inmatning för ljuspistol"
#define GENESIS_PLUS_GX_GUN_INPUT_INFO_0_SV "Använd en musstyrd 'ljuspistol' eller 'pekskärm'."
#define OPTION_VAL_LIGHTGUN_SV "Ljuspistol"
@@ -56912,13 +55336,13 @@ struct retro_core_options_v2 options_sr = {
#define GENESIS_PLUS_GX_GUN_CURSOR_LABEL_SV "Visa hårkors för ljuspistol"
#define GENESIS_PLUS_GX_GUN_CURSOR_INFO_0_SV "Visa hårkorset för ljuspistoler när du använder inmatningsenhetstyperna MD Menacer, MD Justifiers och MS Light Phaser."
#define GENESIS_PLUS_GX_INVERT_MOUSE_LABEL_SV "Invertera musens Y-axel"
-#define GENESIS_PLUS_GX_INVERT_MOUSE_INFO_0_SV "Inverterar Y-axeln för inmatningsenhetstypen MD Mouse."
+#define GENESIS_PLUS_GX_INVERT_MOUSE_INFO_0_SV NULL
#define GENESIS_PLUS_GX_NO_SPRITE_LIMIT_LABEL_SV "Ta bort blockfigursgräns per rad"
-#define GENESIS_PLUS_GX_NO_SPRITE_LIMIT_INFO_0_SV "Tar bort den ursprungliga hårdvarubegränsningen för sprite per skanlinje. Detta minskar flimret men kan orsaka visuella störningar, eftersom vissa spel utnyttjar hårdvarubegränsningen för att skapa specialeffekter."
-#define GENESIS_PLUS_GX_ENHANCED_VSCROLL_LABEL_SV "Förbättrad vertikal rullning per ruta"
-#define GENESIS_PLUS_GX_ENHANCED_VSCROLL_INFO_0_SV "Gör det möjligt att bläddra vertikalt i varje enskild cell, istället för 16px 2-cell, genom att beräkna genomsnittet med vscroll-värdet för den angränsande cellen. Detta hack gäller endast för ett fåtal spel som använder 2-cell vertikalt bläddringsläge."
-#define GENESIS_PLUS_GX_ENHANCED_VSCROLL_LIMIT_LABEL_SV "Förbättrad vertikal rullningsgräns per ruta"
-#define GENESIS_PLUS_GX_ENHANCED_VSCROLL_LIMIT_INFO_0_SV "Endast när Förbättrad vertikal rullning per ruta är aktiverat. Justerar gränsen för förbättrad vertikal rullning. När skillnaden i vertikal rullning mellan angränsande rutor är större än denna gräns inaktiveras förbättringen."
+#define GENESIS_PLUS_GX_NO_SPRITE_LIMIT_INFO_0_SV NULL
+#define GENESIS_PLUS_GX_ENHANCED_VSCROLL_LABEL_SV NULL
+#define GENESIS_PLUS_GX_ENHANCED_VSCROLL_INFO_0_SV NULL
+#define GENESIS_PLUS_GX_ENHANCED_VSCROLL_LIMIT_LABEL_SV NULL
+#define GENESIS_PLUS_GX_ENHANCED_VSCROLL_LIMIT_INFO_0_SV NULL
#define GENESIS_PLUS_GX_OVERCLOCK_LABEL_SV "CPU-hastighet"
#define GENESIS_PLUS_GX_OVERCLOCK_INFO_0_SV "Överklocka den emulerade processorn. Kan minska långsamheter, men kan orsaka glitchar."
#define OPTION_VAL_100_SV NULL
@@ -56942,9 +55366,9 @@ struct retro_core_options_v2 options_sr = {
#define GENESIS_PLUS_GX_FORCE_DTACK_INFO_0_SV "Emulera systemlåsningar som inträffar på riktig hårdvara när man utför olaglig adressåtkomst. Detta bör endast inaktiveras när du spelar vissa demos och homebrew som förlitar sig på otillåtet beteende för korrekt funktion."
#define GENESIS_PLUS_GX_ADDR_ERROR_LABEL_SV "68K-adressfel"
#define GENESIS_PLUS_GX_ADDR_ERROR_INFO_0_SV "Mega Drive/Genesis huvudprocessor (Motorola 68000) genererar ett Address Error-undantag (krasch) när den försöker utföra ojusterad minnesåtkomst. Om du aktiverar detta kommer du att simulera detta beteende. Det bör endast inaktiveras när du spelar ROM-hack, eftersom dessa vanligtvis utvecklas med mindre exakta emulatorer och kan förlita sig på ogiltig RAM-åtkomst för korrekt funktion."
-#define GENESIS_PLUS_GX_CD_LATENCY_LABEL_SV "CD-åtkomsttid"
+#define GENESIS_PLUS_GX_CD_LATENCY_LABEL_SV NULL
#define GENESIS_PLUS_GX_CD_LATENCY_INFO_0_SV "Simulera den ursprungliga CD-maskinvarans latens när du initierar en läsning eller sökning till en specifik plats på den inlästa skivan. Detta krävs av några CD-spel som kraschar om CD-data är tillgängliga för tidigt och åtgärdar även problem med desynkronisering av CD-ljud i vissa spel. Att inaktivera detta kan vara användbart med MSU-MD-spel eftersom det gör CD-ljudspårsloopar mer sömlösa."
-#define GENESIS_PLUS_GX_CD_PRECACHE_LABEL_SV "CD-avbildningscache"
+#define GENESIS_PLUS_GX_CD_PRECACHE_LABEL_SV NULL
#define GENESIS_PLUS_GX_CD_PRECACHE_INFO_0_SV "Läs in cd-avbildning till minnet vid uppstart. CHD stöds endast. Kräver omstart."
#define GENESIS_PLUS_GX_SHOW_ADVANCED_AUDIO_SETTINGS_LABEL_SV "Visa avancerade inställningar för ljudvolym (Öppnar menyn igen)"
#define GENESIS_PLUS_GX_SHOW_ADVANCED_AUDIO_SETTINGS_INFO_0_SV "Aktiverar konfiguration av parametrar för lågnivå-ljudkanaler. OBS: Snabbmenyn måste vara aktiverad för att den här inställningen ska träda i kraft."
@@ -66233,4 +64657,4 @@ struct retro_core_options_v2 options_vn = {
}
#endif
-#endif
\ No newline at end of file
+#endif