[Scummvm-git-logs] scummvm master -> a0e30678ca9755ff6109b7575b1020071d6bc808
eriktorbjorn
noreply at scummvm.org
Mon Sep 28 05:27:28 UTC 2026
This automated email contains information about 2 new commits which have been
pushed to the 'scummvm' repo located at https://api.github.com/repos/scummvm/scummvm .
Summary:
238573ed73 SCUMM: When using SID PAL audio timing, also adjust game frame rate
a0e30678ca NEWS: Add note about SCUMM C64 SID timing option
Commit: 238573ed733ceba6d424b57dda046ed8162d016b
https://github.com/scummvm/scummvm/commit/238573ed733ceba6d424b57dda046ed8162d016b
Author: Torbjörn Andersson (eriktorbjorn at users.sourceforge.net)
Date: 2026-09-28T07:25:57+02:00
Commit Message:
SCUMM: When using SID PAL audio timing, also adjust game frame rate
This is similar to what we do for the Amiga version of The Secret of
Monkey Island, and should help when there is any sort of syncing between
audio and video. Not that there would have been much of that in these
early games.
Changed paths:
engines/scumm/players/player_sid.cpp
engines/scumm/scumm.cpp
engines/scumm/scumm.h
engines/scumm/sound.cpp
diff --git a/engines/scumm/players/player_sid.cpp b/engines/scumm/players/player_sid.cpp
index d201081401a..5e38723ea24 100644
--- a/engines/scumm/players/player_sid.cpp
+++ b/engines/scumm/players/player_sid.cpp
@@ -1277,7 +1277,7 @@ void Player_SID::initSID() {
// 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::Config::SidType sidType = _vm->_isC64PALSystem ? SID::Config::kSidPAL : SID::Config::kSidNTSC;
_sid = SID::Config::create(sidType);
if (!_sid || !_sid->init())
diff --git a/engines/scumm/scumm.cpp b/engines/scumm/scumm.cpp
index e3f1bff152c..d1baa70b008 100644
--- a/engines/scumm/scumm.cpp
+++ b/engines/scumm/scumm.cpp
@@ -208,6 +208,15 @@ ScummEngine::ScummEngine(OSystem *syst, const DetectorResult &dr)
}
}
+#ifdef USE_SID_AUDIO
+ if (_game.platform == Common::kPlatformC64) {
+ ConfMan.registerDefault("c64_sid_type", "ntsc");
+ if (ConfMan.hasKey("c64_sid_type", _targetName)) {
+ _isC64PALSystem = SID::Config::parseSidType(ConfMan.get("c64_sid_type")) == SID::Config::kSidPAL;
+ }
+ }
+#endif
+
if (_game.platform == Common::kPlatformMacintosh) {
ConfMan.registerDefault("mac_graphics_smoothing", true);
ConfMan.registerDefault("gamma_correction", true);
@@ -3055,6 +3064,8 @@ void ScummEngine::setTimerAndShakeFrequency() {
}
} else if (_game.platform == Common::kPlatformAmiga && _game.id != GID_MONKEY_VGA) {
_shakeTimerRate = _timerFrequency = _isAmigaPALSystem ? AMIGA_PAL_VBLANK_RATE : AMIGA_NTSC_VBLANK_RATE;
+ } else if (_game.platform == Common::kPlatformC64) {
+ _shakeTimerRate = _timerFrequency = _isC64PALSystem ? C64_PAL_VBLANK_RATE : C64_NTSC_VBLANK_RATE;
}
} else {
if (_game.heversion < 70 && _game.platform == Common::kPlatformDOS) {
diff --git a/engines/scumm/scumm.h b/engines/scumm/scumm.h
index c817056da74..356a3602374 100644
--- a/engines/scumm/scumm.h
+++ b/engines/scumm/scumm.h
@@ -344,6 +344,18 @@ class ResourceManager;
#define AMIGA_NTSC_VBLANK_RATE 240.0
#define AMIGA_PAL_VBLANK_RATE 200.0
+/**
+ * C64 timing constants
+ *
+ * While we don't detect from the game if it's for PAL or NTSC, we
+ * do allow the user to specify by using an engine setting. The music
+ * plays slower on PAL systems, so we have to adjust the frame rate
+ * from 60Hz for NTSC to 50Hz for PAL.
+ */
+
+#define C64_NTSC_VBLANK_RATE 240.0
+#define C64_PAL_VBLANK_RATE 200.0
+
/**
* Game saving/loading outcome codes
*/
@@ -566,6 +578,7 @@ public:
bool _enableAudioOverride = false;
bool _enableCOMISong = false;
bool _isAmigaPALSystem = false;
+ bool _isC64PALSystem = false;
bool _quitFromScriptCmd = false;
bool _isHE995 = false;
bool _enableHECompetitiveOnlineMods = false;
diff --git a/engines/scumm/sound.cpp b/engines/scumm/sound.cpp
index bfb33823f53..9f57f1465c1 100644
--- a/engines/scumm/sound.cpp
+++ b/engines/scumm/sound.cpp
@@ -2216,7 +2216,14 @@ void Sound::updateMusicTimer() {
_vm->VAR(_vm->VAR_MUSIC_TIMER) = _soundCD->getMusicTimer();
} else if (_vm->_musicEngine) {
// The music engine generates the timer data for us.
- _vm->VAR(_vm->VAR_MUSIC_TIMER) = _vm->_musicEngine->getMusicTimer() * _vm->getTimerFrequency() / 240.0;
+ // Note that on the C64 we use the cue value, not the
+ // elapsed time, or the Zak intro will hang when
+ // playing the game in PAL mode.
+ if (_vm->_game.platform != Common::kPlatformC64) {
+ _vm->VAR(_vm->VAR_MUSIC_TIMER) = _vm->_musicEngine->getMusicTimer() * _vm->getTimerFrequency() / 240.0;
+ } else {
+ _vm->VAR(_vm->VAR_MUSIC_TIMER) = _vm->_musicEngine->getMusicTimer();
+ }
}
}
}
Commit: a0e30678ca9755ff6109b7575b1020071d6bc808
https://github.com/scummvm/scummvm/commit/a0e30678ca9755ff6109b7575b1020071d6bc808
Author: Torbjörn Andersson (eriktorbjorn at users.sourceforge.net)
Date: 2026-09-28T07:26:59+02:00
Commit Message:
NEWS: Add note about SCUMM C64 SID timing option
Changed paths:
NEWS.md
diff --git a/NEWS.md b/NEWS.md
index 724bdeb2843..b57e5e5f31b 100644
--- a/NEWS.md
+++ b/NEWS.md
@@ -106,6 +106,8 @@ For a more comprehensive changelog of the latest experimental code, see:
SCUMM:
- Improved cursor scale in early Windows HE games.
+ - Added option to use PAL timing for SID audio in C64 games. This slows
+ down the music, but that's how many non-US players would have heard it.
Sherlock:
- Vertical movement delta fix for Rose Tattoo.
More information about the Scummvm-git-logs
mailing list