[Scummvm-git-logs] scummvm master -> 3468a1866496519682e8a55c1dbf968b6c4724cf

bluegr noreply at scummvm.org
Mon Sep 21 22:11:13 UTC 2026


This automated email contains information about 3 new commits which have been
pushed to the 'scummvm' repo located at https://api.github.com/repos/scummvm/scummvm .

Summary:
c603c8b439 SCUMM: Add option for using PAL timing for the C64 music (bug #17201)
e868c171bc SCUMM: Adjust texts and only include SID stuff when necessary
3468a18664 SCUMM: Cleanup


Commit: c603c8b4396cc6516034f4c1942f74e8b3b10180
    https://github.com/scummvm/scummvm/commit/c603c8b4396cc6516034f4c1942f74e8b3b10180
Author: Torbjörn Andersson (eriktorbjorn at users.sourceforge.net)
Date: 2026-09-22T01:11:08+03:00

Commit Message:
SCUMM: Add option for using PAL timing for the C64 music (bug #17201)

This makes the music lower pitched and slower than with NTSC timing, and
probably doesn't reflect the intention of the composer. However, it is
probably the way a lot of non-US players experienced the game.

Changed paths:
    audio/sid.cpp
    audio/sid.h
    engines/scumm/dialogs.cpp
    engines/scumm/dialogs.h
    engines/scumm/metaengine.cpp
    engines/scumm/players/player_sid.cpp


diff --git a/audio/sid.cpp b/audio/sid.cpp
index 4c1c0357b01..d7f47acf60c 100644
--- a/audio/sid.cpp
+++ b/audio/sid.cpp
@@ -22,6 +22,7 @@
 #include "audio/sid.h"
 #include "audio/softsynth/sid.h"
 
+#include "common/str.h"
 #include "common/textconsole.h"
 
 namespace SID {
@@ -36,6 +37,14 @@ SID *Config::create(SidType type) {
 #endif
 }
 
+Config::SidType Config::parseSidType(const Common::String &str) {
+	if (str.equalsIgnoreCase("ntsc"))
+		return kSidNTSC;
+	if (str.equalsIgnoreCase("pal"))
+		return kSidPAL;
+	error("parseSidType: Unknow SID type '%s'", str.c_str());
+}
+
 bool SID::_hasInstance = false;
 
 SID::SID() {
diff --git a/audio/sid.h b/audio/sid.h
index e7c77efbcc9..66a9aec756f 100644
--- a/audio/sid.h
+++ b/audio/sid.h
@@ -24,6 +24,10 @@
 
 #include "audio/chip.h"
 
+namespace Common {
+class String;
+}
+
 namespace SID {
 
 class SID;
@@ -39,6 +43,8 @@ public:
 	 * Creates a SID driver.
 	 */
 	static SID *create(SidType type);
+
+	static SidType parseSidType(const Common::String &str);
 };
 
 class SID : virtual public Audio::Chip {
diff --git a/engines/scumm/dialogs.cpp b/engines/scumm/dialogs.cpp
index 121e98354e3..0a9c8fb1531 100644
--- a/engines/scumm/dialogs.cpp
+++ b/engines/scumm/dialogs.cpp
@@ -28,6 +28,8 @@
 #include "common/translation.h"
 #include "common/ustr.h"
 
+#include "audio/sid.h"
+
 #include "graphics/scaler.h"
 
 #include "gui/gui-manager.h"
@@ -1289,6 +1291,8 @@ ScummGameOptionsWidget::ScummGameOptionsWidget(GuiObject *boss, const Common::St
 				_smoothScrollCheckbox->setCmd(kSmoothScrollCmd);
 			} else if (strcmp(_options[i].configOption, "semi_smooth_scroll") == 0) {
 				_semiSmoothScrollCheckbox = checkbox;
+			} else if (strcmp(_options[i].configOption, "c64_sid_type") == 0) {
+				_c64SidTypeCheckbox = checkbox;
 			}
 		}
 		_checkboxes.push_back(checkbox);
@@ -1302,9 +1306,14 @@ void ScummGameOptionsWidget::load() {
 		if (!_checkboxes[i])
 			continue;
 
-		bool isChecked = _options[i].defaultState;
-		if (ConfMan.hasKey(_options[i].configOption, _domain))
-			isChecked = ConfMan.getBool(_options[i].configOption, _domain);
+		bool isChecked;
+		if (_checkboxes[i] == _c64SidTypeCheckbox) {
+			isChecked = SID::Config::parseSidType(ConfMan.get(_options[i].configOption, _domain)) == SID::Config::kSidPAL;
+		} else {
+			isChecked = _options[i].defaultState;
+			if (ConfMan.hasKey(_options[i].configOption, _domain))
+				isChecked = ConfMan.getBool(_options[i].configOption, _domain);
+		}
 		_checkboxes[i]->setState(isChecked);
 	}
 
@@ -1316,8 +1325,13 @@ bool ScummGameOptionsWidget::save() {
 	ScummOptionsContainerWidget::save();
 
 	for (uint i = 0; i < _options.size(); i++) {
-		if (_checkboxes[i])
-			ConfMan.setBool(_options[i].configOption, _checkboxes[i]->isEnabled() && _checkboxes[i]->getState(), _domain);
+		if (_checkboxes[i]) {
+			bool isChecked = _checkboxes[i]->isEnabled() && _checkboxes[i]->getState();
+			if (_checkboxes[i] == _c64SidTypeCheckbox)
+				ConfMan.set(_options[i].configOption, isChecked ? "pal" : "ntsc", _domain);
+			else
+				ConfMan.setBool(_options[i].configOption, isChecked, _domain);
+		}
 	}
 
 	return true;
diff --git a/engines/scumm/dialogs.h b/engines/scumm/dialogs.h
index 31b78863a10..6c27b4e2ec3 100644
--- a/engines/scumm/dialogs.h
+++ b/engines/scumm/dialogs.h
@@ -267,6 +267,7 @@ private:
 		kSmoothScrollCmd = 'SMSC'
 	};
 
+	GUI::CheckboxWidget *_c64SidTypeCheckbox = nullptr;
 	GUI::CheckboxWidget *_smoothScrollCheckbox = nullptr;
 	GUI::CheckboxWidget *_semiSmoothScrollCheckbox = nullptr;
 
diff --git a/engines/scumm/metaengine.cpp b/engines/scumm/metaengine.cpp
index d69986ea5e0..e517d8ea235 100644
--- a/engines/scumm/metaengine.cpp
+++ b/engines/scumm/metaengine.cpp
@@ -731,6 +731,15 @@ static const ExtraGuiOption mmnesClassicPaletteOption = {
 	0
 };
 
+static const ExtraGuiOption c64SidTypeOption = {
+	_s("Use PAL timing for SID music"),
+	_s("This makes the music slower and lower pitched than how it was originally composed, but is how a lot of players outside the US would have experienced the game."),
+	"c64_sid_type",
+	false,
+	0,
+	0
+};
+
 static const ExtraGuiOption fmtownsTrimTo200 = {
 	_s("Trim FM-TOWNS games to 200 pixels height"),
 	_s("Cut the extra 40 pixels at the bottom of the screen, to make it standard 200 pixels height, allowing using 'aspect ratio correction'"),
@@ -1016,6 +1025,9 @@ const ExtraGuiOptions ScummMetaEngine::getExtraGuiOptions(const Common::String &
 	if (target.empty() || platform == Common::kPlatformNES) {
 		options.push_back(mmnesClassicPaletteOption);
 	}
+	if (target.empty() || platform == Common::kPlatformC64) {
+		options.push_back(c64SidTypeOption);
+	}
 	if (target.empty() || platform == Common::kPlatformFMTowns) {
 		options.push_back(smoothScrolling);
 		if (target.empty() || gameid == "loom")
@@ -1066,7 +1078,9 @@ const ExtraGuiOptions ScummMetaEngine::getExtraGuiOptions(const Common::String &
 void ScummMetaEngine::registerDefaultSettings(const Common::String &) const {
 	const ExtraGuiOptions engineOptions = getExtraGuiOptions("");
 	for (uint i = 0; i < engineOptions.size(); i++) {
-		if (strcmp(engineOptions[i].configOption, "enhancements") == 0)
+		if (strcmp(engineOptions[i].configOption, "c64_sid_type") == 0)
+			ConfMan.registerDefault(engineOptions[i].configOption, "ntsc");
+		else if (strcmp(engineOptions[i].configOption, "enhancements") == 0)
 			ConfMan.registerDefault(engineOptions[i].configOption, kEnhGameBreakingBugFixes | kEnhGrp1);
 		else
 			ConfMan.registerDefault(engineOptions[i].configOption, engineOptions[i].defaultState);
diff --git a/engines/scumm/players/player_sid.cpp b/engines/scumm/players/player_sid.cpp
index cb362b06dda..d201081401a 100644
--- a/engines/scumm/players/player_sid.cpp
+++ b/engines/scumm/players/player_sid.cpp
@@ -19,6 +19,7 @@
  *
  */
 
+#include "common/config-manager.h"
 #include "engines/engine.h"
 #include "scumm/players/player_sid.h"
 #include "scumm/scumm.h"
@@ -1270,9 +1271,15 @@ void Player_SID::initSID() {
 	// sound speed is slightly different on NTSC and PAL machines
 	// as the SID clock depends on the frame rate.
 	// ScummVM does not distinguish between NTSC and PAL targets
-	// so we use the NTSC timing here as the music was composed for
-	// NTSC systems (music on PAL systems is slower).
-	_sid = SID::Config::create(SID::Config::kSidNTSC);
+	// so we use the NTSC timing by default here as the music was composed
+	// for NTSC systems (music on PAL systems is slower).
+	// But who are we to argue with nostalgia, when there are players who
+	// originally experienced it in PAL mode and think that just adds to
+	// the mood of the game?
+
+	SID::Config::SidType sidType = SID::Config::parseSidType(ConfMan.get("c64_sid_type"));
+
+	_sid = SID::Config::create(sidType);
 	if (!_sid || !_sid->init())
 		error("Failed to initialise SID emulator");
 
@@ -1284,7 +1291,7 @@ void Player_SID::initSID() {
 	SID_Write(11, 0x00);
 	SID_Write(18, 0x00);
 
-	_sid->start(new Common::Functor0Mem<void, Player_SID>(this, &Player_SID::onTimer), 60);
+	_sid->start(new Common::Functor0Mem<void, Player_SID>(this, &Player_SID::onTimer), sidType == SID::Config::kSidNTSC ? 60 : 50);
 }
 
 void Player_SID::startSound(int nr) {


Commit: e868c171bc0c635571c9b57fba36ae513848470a
    https://github.com/scummvm/scummvm/commit/e868c171bc0c635571c9b57fba36ae513848470a
Author: Torbjörn Andersson (eriktorbjorn at users.sourceforge.net)
Date: 2026-09-22T01:11:08+03:00

Commit Message:
SCUMM: Adjust texts and only include SID stuff when necessary

Changed paths:
    audio/sid.cpp
    engines/scumm/dialogs.cpp
    engines/scumm/dialogs.h
    engines/scumm/metaengine.cpp


diff --git a/audio/sid.cpp b/audio/sid.cpp
index d7f47acf60c..4bd572e9d0d 100644
--- a/audio/sid.cpp
+++ b/audio/sid.cpp
@@ -42,7 +42,7 @@ Config::SidType Config::parseSidType(const Common::String &str) {
 		return kSidNTSC;
 	if (str.equalsIgnoreCase("pal"))
 		return kSidPAL;
-	error("parseSidType: Unknow SID type '%s'", str.c_str());
+	error("parseSidType: Unknown SID type '%s'", str.c_str());
 }
 
 bool SID::_hasInstance = false;
diff --git a/engines/scumm/dialogs.cpp b/engines/scumm/dialogs.cpp
index 0a9c8fb1531..dfaff92a83a 100644
--- a/engines/scumm/dialogs.cpp
+++ b/engines/scumm/dialogs.cpp
@@ -28,7 +28,9 @@
 #include "common/translation.h"
 #include "common/ustr.h"
 
+#ifdef USE_SID_AUDIO
 #include "audio/sid.h"
+#endif
 
 #include "graphics/scaler.h"
 
@@ -1291,8 +1293,10 @@ ScummGameOptionsWidget::ScummGameOptionsWidget(GuiObject *boss, const Common::St
 				_smoothScrollCheckbox->setCmd(kSmoothScrollCmd);
 			} else if (strcmp(_options[i].configOption, "semi_smooth_scroll") == 0) {
 				_semiSmoothScrollCheckbox = checkbox;
+#ifdef USE_SID_AUDIO
 			} else if (strcmp(_options[i].configOption, "c64_sid_type") == 0) {
 				_c64SidTypeCheckbox = checkbox;
+#endif
 			}
 		}
 		_checkboxes.push_back(checkbox);
@@ -1307,13 +1311,17 @@ void ScummGameOptionsWidget::load() {
 			continue;
 
 		bool isChecked;
+#ifdef USE_SID_AUDIO
 		if (_checkboxes[i] == _c64SidTypeCheckbox) {
 			isChecked = SID::Config::parseSidType(ConfMan.get(_options[i].configOption, _domain)) == SID::Config::kSidPAL;
 		} else {
+#endif
 			isChecked = _options[i].defaultState;
 			if (ConfMan.hasKey(_options[i].configOption, _domain))
 				isChecked = ConfMan.getBool(_options[i].configOption, _domain);
+#ifdef USE_SID_AUDIO
 		}
+#endif
 		_checkboxes[i]->setState(isChecked);
 	}
 
@@ -1327,9 +1335,11 @@ bool ScummGameOptionsWidget::save() {
 	for (uint i = 0; i < _options.size(); i++) {
 		if (_checkboxes[i]) {
 			bool isChecked = _checkboxes[i]->isEnabled() && _checkboxes[i]->getState();
+#ifdef USE_SID_AUDIO
 			if (_checkboxes[i] == _c64SidTypeCheckbox)
 				ConfMan.set(_options[i].configOption, isChecked ? "pal" : "ntsc", _domain);
 			else
+#endif
 				ConfMan.setBool(_options[i].configOption, isChecked, _domain);
 		}
 	}
diff --git a/engines/scumm/dialogs.h b/engines/scumm/dialogs.h
index 6c27b4e2ec3..6865310d397 100644
--- a/engines/scumm/dialogs.h
+++ b/engines/scumm/dialogs.h
@@ -267,7 +267,9 @@ private:
 		kSmoothScrollCmd = 'SMSC'
 	};
 
+#ifdef USE_SID_AUDIO
 	GUI::CheckboxWidget *_c64SidTypeCheckbox = nullptr;
+#endif
 	GUI::CheckboxWidget *_smoothScrollCheckbox = nullptr;
 	GUI::CheckboxWidget *_semiSmoothScrollCheckbox = nullptr;
 
diff --git a/engines/scumm/metaengine.cpp b/engines/scumm/metaengine.cpp
index e517d8ea235..b04e07257be 100644
--- a/engines/scumm/metaengine.cpp
+++ b/engines/scumm/metaengine.cpp
@@ -731,14 +731,16 @@ static const ExtraGuiOption mmnesClassicPaletteOption = {
 	0
 };
 
+#ifdef USE_SID_AUDIO
 static const ExtraGuiOption c64SidTypeOption = {
-	_s("Use PAL timing for SID music"),
-	_s("This makes the music slower and lower pitched than how it was originally composed, but is how a lot of players outside the US would have experienced the game."),
+	_s("Use PAL timing for SID audio"),
+	_s("This lowers the pitch and slows down playback compared to the original NTSC timing."),
 	"c64_sid_type",
 	false,
 	0,
 	0
 };
+#endif
 
 static const ExtraGuiOption fmtownsTrimTo200 = {
 	_s("Trim FM-TOWNS games to 200 pixels height"),
@@ -1025,9 +1027,11 @@ const ExtraGuiOptions ScummMetaEngine::getExtraGuiOptions(const Common::String &
 	if (target.empty() || platform == Common::kPlatformNES) {
 		options.push_back(mmnesClassicPaletteOption);
 	}
+#ifdef USE_SID_AUDIO
 	if (target.empty() || platform == Common::kPlatformC64) {
 		options.push_back(c64SidTypeOption);
 	}
+#endif
 	if (target.empty() || platform == Common::kPlatformFMTowns) {
 		options.push_back(smoothScrolling);
 		if (target.empty() || gameid == "loom")


Commit: 3468a1866496519682e8a55c1dbf968b6c4724cf
    https://github.com/scummvm/scummvm/commit/3468a1866496519682e8a55c1dbf968b6c4724cf
Author: Torbjörn Andersson (eriktorbjorn at users.sourceforge.net)
Date: 2026-09-22T01:11:08+03:00

Commit Message:
SCUMM: Cleanup

Changed paths:
    engines/scumm/dialogs.cpp


diff --git a/engines/scumm/dialogs.cpp b/engines/scumm/dialogs.cpp
index dfaff92a83a..7fb9ea521f6 100644
--- a/engines/scumm/dialogs.cpp
+++ b/engines/scumm/dialogs.cpp
@@ -1314,14 +1314,13 @@ void ScummGameOptionsWidget::load() {
 #ifdef USE_SID_AUDIO
 		if (_checkboxes[i] == _c64SidTypeCheckbox) {
 			isChecked = SID::Config::parseSidType(ConfMan.get(_options[i].configOption, _domain)) == SID::Config::kSidPAL;
-		} else {
+		} else
 #endif
+		{
 			isChecked = _options[i].defaultState;
 			if (ConfMan.hasKey(_options[i].configOption, _domain))
 				isChecked = ConfMan.getBool(_options[i].configOption, _domain);
-#ifdef USE_SID_AUDIO
 		}
-#endif
 		_checkboxes[i]->setState(isChecked);
 	}
 




More information about the Scummvm-git-logs mailing list