[Scummvm-git-logs] scummvm master -> cc8de3a293f5d6b5a36c74aeda83339f1dc16870
sev-
noreply at scummvm.org
Thu Dec 22 22:46:56 UTC 2022
This automated email contains information about 2 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
5870b7d599 AUDIO: Reduce the static table sizes in the SID emulator
cc8de3a293 CONFIGURE: Enable SID emulation in the DS and 3DS ports
Commit: 5870b7d599d84bac5dd8b9b7a36d5ea336e62b23
https://github.com/scummvm/scummvm/commit/5870b7d599d84bac5dd8b9b7a36d5ea336e62b23
Author: Cameron Cawley (ccawley2011 at gmail.com)
Date: 2022-12-22T23:46:52+01:00
Commit Message:
AUDIO: Reduce the static table sizes in the SID emulator
Changed paths:
audio/softsynth/sid.cpp
audio/softsynth/sid.h
audio/softsynth/wave6581.cpp
diff --git a/audio/softsynth/sid.cpp b/audio/softsynth/sid.cpp
index 5ce50cda9d8..85eef474159 100644
--- a/audio/softsynth/sid.cpp
+++ b/audio/softsynth/sid.cpp
@@ -430,7 +430,7 @@ public:
}
};
-fc_point Filter::f0_points_6581[] = {
+const fc_point Filter::f0_points_6581[] = {
// FC f FCHI FCLO
// ----------------------------
{ 0, 220 }, // 0x00 - repeated end point
@@ -798,7 +798,7 @@ void EnvelopeGenerator::reset() {
hold_zero = true;
}
-reg16 EnvelopeGenerator::rate_counter_period[] = {
+const data16 EnvelopeGenerator::rate_counter_period[] = {
9, // 2ms*1.0MHz/256 = 7.81
32, // 8ms*1.0MHz/256 = 31.25
63, // 16ms*1.0MHz/256 = 62.50
@@ -818,7 +818,7 @@ reg16 EnvelopeGenerator::rate_counter_period[] = {
};
-reg8 EnvelopeGenerator::sustain_level[] = {
+const data8 EnvelopeGenerator::sustain_level[] = {
0x00,
0x11,
0x22,
diff --git a/audio/softsynth/sid.h b/audio/softsynth/sid.h
index 2269ca7b2c9..d834e6c4c07 100644
--- a/audio/softsynth/sid.h
+++ b/audio/softsynth/sid.h
@@ -49,7 +49,10 @@ typedef unsigned int reg24;
typedef int cycle_count;
typedef int sound_sample;
-typedef sound_sample fc_point[2];
+
+typedef unsigned char data8;
+typedef unsigned short data16;
+typedef unsigned short fc_point[2];
class WaveformGenerator {
@@ -116,10 +119,10 @@ protected:
reg12 outputNPST();
// Sample data for combinations of waveforms.
- static const reg8 wave6581__ST[];
- static const reg8 wave6581_P_T[];
- static const reg8 wave6581_PS_[];
- static const reg8 wave6581_PST[];
+ static const data8 wave6581__ST[];
+ static const data8 wave6581_P_T[];
+ static const data8 wave6581_PS_[];
+ static const data8 wave6581_PST[];
friend class Voice;
friend class SID;
@@ -186,8 +189,8 @@ protected:
// FC is an 11 bit register.
sound_sample f0_6581[2048];
sound_sample* f0;
- static fc_point f0_points_6581[];
- fc_point* f0_points;
+ static const fc_point f0_points_6581[];
+ const fc_point* f0_points;
int f0_count;
friend class SID;
@@ -229,10 +232,10 @@ protected:
// Lookup table to convert from attack, decay, or release value to rate
// counter period.
- static reg16 rate_counter_period[];
+ static const data16 rate_counter_period[];
// The 16 selectable sustain levels.
- static reg8 sustain_level[];
+ static const data8 sustain_level[];
friend class SID;
};
diff --git a/audio/softsynth/wave6581.cpp b/audio/softsynth/wave6581.cpp
index 1272c6ec3a5..45db3827b71 100644
--- a/audio/softsynth/wave6581.cpp
+++ b/audio/softsynth/wave6581.cpp
@@ -30,7 +30,7 @@
namespace Resid {
-const reg8 WaveformGenerator::wave6581__ST[] = {
+const data8 WaveformGenerator::wave6581__ST[] = {
/* 0x000: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
/* 0x008: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
/* 0x010: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -545,7 +545,7 @@ const reg8 WaveformGenerator::wave6581__ST[] = {
/* 0xff8: */ 0x3e, 0x3e, 0x3f, 0x3f, 0x7f, 0x7f, 0x7f, 0x7f,
};
-const reg8 WaveformGenerator::wave6581_P_T[] = {
+const data8 WaveformGenerator::wave6581_P_T[] = {
/* 0x000: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
/* 0x008: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
/* 0x010: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -1060,7 +1060,7 @@ const reg8 WaveformGenerator::wave6581_P_T[] = {
/* 0xff8: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
};
-const reg8 WaveformGenerator::wave6581_PS_[] = {
+const data8 WaveformGenerator::wave6581_PS_[] = {
/* 0x000: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
/* 0x008: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
/* 0x010: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -1575,7 +1575,7 @@ const reg8 WaveformGenerator::wave6581_PS_[] = {
/* 0xff8: */ 0x7e, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f,
};
-const reg8 WaveformGenerator::wave6581_PST[] = {
+const data8 WaveformGenerator::wave6581_PST[] = {
/* 0x000: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
/* 0x008: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
/* 0x010: */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
Commit: cc8de3a293f5d6b5a36c74aeda83339f1dc16870
https://github.com/scummvm/scummvm/commit/cc8de3a293f5d6b5a36c74aeda83339f1dc16870
Author: Cameron Cawley (ccawley2011 at gmail.com)
Date: 2022-12-22T23:46:52+01:00
Commit Message:
CONFIGURE: Enable SID emulation in the DS and 3DS ports
Changed paths:
configure
diff --git a/configure b/configure
index de90c59bdc9..653d0b8ba30 100755
--- a/configure
+++ b/configure
@@ -3208,7 +3208,6 @@ if test -n "$_host"; then
3ds)
append_var DEFINES "-DDISABLE_FANCY_THEMES"
append_var DEFINES "-DDISABLE_HELP_STRINGS"
- append_var DEFINES "-DDISABLE_SID"
append_var DEFINES "-DDISABLE_NES_APU"
_backend="3ds"
_build_scalers=no
@@ -3376,7 +3375,6 @@ if test -n "$_host"; then
append_var DEFINES "-DDISABLE_HELP_STRINGS"
append_var DEFINES "-DDISABLE_DOSBOX_OPL"
append_var DEFINES "-DDISABLE_FANCY_THEMES"
- append_var DEFINES "-DDISABLE_SID"
append_var DEFINES "-DDISABLE_NES_APU"
append_var DEFINES "-DREDUCE_MEMORY_USAGE"
append_var DEFINES "-DSTREAM_AUDIO_FROM_DISK"
More information about the Scummvm-git-logs
mailing list