[Scummvm-git-logs] scummvm branch-2-9 -> 8c678695c8795de8b98f5f7e1a42f43e86a80286

mikrosk noreply at scummvm.org
Sun May 4 21:12:43 UTC 2025


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

Summary:
a408f8b327 BACKENDS: ATARI: Fix for SCI32 games
711993558a BACKEND: ATARI: Fix cursor reset position
3cc41782c8 BACKENDS: ATARI: Workaround for dgds engine
d6cb8c46bd BACKENDS: ATARI: Small optimisation
8c678695c8 NEWS: Atari changes for 2.9.1


Commit: a408f8b3278ca913b685465c4f420e5026e45ff5
    https://github.com/scummvm/scummvm/commit/a408f8b3278ca913b685465c4f420e5026e45ff5
Author: Miro Kropacek (miro.kropacek at gmail.com)
Date: 2025-05-04T23:00:58+02:00

Commit Message:
BACKENDS: ATARI: Fix for SCI32 games

After all, the issue wasn't the engine but not handling its palette
updates fast enough. Now it looks much better and the cursor moves fine
as well.

Changed paths:
    backends/graphics/atari/atari-graphics.cpp
    backends/graphics/atari/atari-pendingscreenchanges.cpp
    backends/platform/atari/readme.txt
    backends/platform/atari/readme.txt.in


diff --git a/backends/graphics/atari/atari-graphics.cpp b/backends/graphics/atari/atari-graphics.cpp
index 097fb6a35d3..761f8952d54 100644
--- a/backends/graphics/atari/atari-graphics.cpp
+++ b/backends/graphics/atari/atari-graphics.cpp
@@ -694,7 +694,6 @@ void AtariGraphicsManager::updateScreen() {
 		s_screenSurf = _pendingScreenChanges.screenSurface();
 		_pendingScreenChanges.setScreenSurface(nullptr);
 	}
-
 	if (_pendingScreenChanges.aspectRatioCorrectionYOffset().second)
 		s_aspectRatioCorrectionYOffset = _pendingScreenChanges.aspectRatioCorrectionYOffset().first;
 	if (_pendingScreenChanges.screenOffsets().second)
diff --git a/backends/graphics/atari/atari-pendingscreenchanges.cpp b/backends/graphics/atari/atari-pendingscreenchanges.cpp
index 921e6d31188..732b4bece39 100644
--- a/backends/graphics/atari/atari-pendingscreenchanges.cpp
+++ b/backends/graphics/atari/atari-pendingscreenchanges.cpp
@@ -38,7 +38,7 @@ void PendingScreenChanges::queueAll() {
 }
 
 /*
- * VsetRGB() - stores the palette in a buffer and applyBeforeVblLock in nearest VBL
+ * VsetRGB() - stores the palette in a buffer and process it in the nearest non-locked VBL
  * EsetPalette() - immediatelly applies the palette
  * (V)SetScreen() - immediatelly sets physbase/logbase but explicitly calls Vsync() for resolution changes
  * VsetMode() - explicitly calls Vsync()
@@ -47,7 +47,6 @@ void PendingScreenChanges::queueAll() {
 void PendingScreenChanges::applyBeforeVblLock(const Screen &screen) {
 	_mode = screen.mode;	// avoid modifying 'Screen' content
 	_resetSuperVidel = false;
-	_switchToBlackPalette = (_changes & kVideoMode);
 
 	_aspectRatioCorrectionYOffset.second = false;
 	_setScreenOffsets.second = false;
@@ -58,7 +57,7 @@ void PendingScreenChanges::applyBeforeVblLock(const Screen &screen) {
 		_changes &= ~kAspectRatioCorrection;
 	}
 
-	_switchToBlackPalette |= _resetSuperVidel;
+	_switchToBlackPalette = (_changes & kVideoMode) || _resetSuperVidel;
 
 	if (_changes & kVideoMode) {
 		processVideoMode(screen);
@@ -68,6 +67,7 @@ void PendingScreenChanges::applyBeforeVblLock(const Screen &screen) {
 
 void PendingScreenChanges::applyAfterVblLock(const Screen &screen) {
 	// VBL doesn't process new palette nor screen address updates
+	// if _changes & kVideoMode then the Vsync handler has just returned
 
 	if (_changes & kShakeScreen) {
 		_setScreenOffsets = std::make_pair(true, true);
@@ -77,14 +77,14 @@ void PendingScreenChanges::applyAfterVblLock(const Screen &screen) {
 	// restore current (kVideoMode) or set new (kPalette) palette
 	if (_changes & (kVideoMode | kPalette)) {
 		if (_switchToBlackPalette || (_changes & kPalette)) {
+			// Set the palette as fast as possible. Vsync() is a big no-no, updateScreen() and
+			// therefore this function can be called multiple times per frame. In this case,
+			// EsetPalette() will set the colours immediately (oops) but VsetRGB() is fine:
+			// it will be set as soon as VBL is unlocked again.
 			if (_manager->_tt) {
-				if (_changes & kPalette)
-					Vsync();
 				EsetPalette(0, screen.palette->entries, screen.palette->tt);
 			} else {
 				VsetRGB(0, screen.palette->entries, screen.palette->falcon);
-				if (_changes & kPalette)
-					Vsync();
 			}
 		}
 
@@ -137,20 +137,17 @@ void PendingScreenChanges::processVideoMode(const Screen &screen) {
 	// changing video mode implies an additional Vsync(): there's no way to change resolution
 	// and set new screen address (and/or shake offsets etc) in one go
 	if (screen.rez != -1) {
-		if (_switchToBlackPalette) {
-			static uint16 black[256];
-			EsetPalette(0, screen.palette->entries, black);
-		}
+		static uint16 black[256];
+		EsetPalette(0, screen.palette->entries, black);
 
 		// unfortunately this reinitializes VDI, too
 		Setscreen(SCR_NOCHANGE, SCR_NOCHANGE, screen.rez);
 	} else if (_mode != -1) {
-		if (_switchToBlackPalette) {
-			static _RGB black[256];
-			VsetRGB(0, screen.palette->entries, black);
-		}
+		static _RGB black[256];
+		VsetRGB(0, screen.palette->entries, black);
 
-		  // VsetMode() must be called first: it resets all hz/v, scrolling and line width registers
+		// VsetMode() must be called before the VBL s_ stuff is set as
+		// it resets all hz/v, scrolling and line width registers
 		if (_resetSuperVidel)
 			VsetMode(SVEXT | SVEXT_BASERES(0) | COL80 | BPS8C);	// resync to proper 640x480
 
diff --git a/backends/platform/atari/readme.txt b/backends/platform/atari/readme.txt
index 63adeeefc33..5abc9e394b3 100644
--- a/backends/platform/atari/readme.txt
+++ b/backends/platform/atari/readme.txt
@@ -1,5 +1,5 @@
 ScummVM 2.9.0pre
-==============
+=============
 
 This is a port of ScummVM (https://www.scummvm.org), a program which allows you
 to run certain classic graphical adventure and role-playing games, provided you
@@ -479,10 +479,6 @@ Known issues
   - point the extra path to the folder with *.wav files (or copy its content
     where monkey.00? files are located)
 
-- Phantasmagoria, KQ7 (and other SCI32 games) require Single buffering (or
-  Direct rendering with SuperVidel) due to its unusual cursor rendering
-  approach.
-
 - following engines have been explicitly disabled:
   - Cine (2 games)
     - incompatible with other engines / prone to freezes
diff --git a/backends/platform/atari/readme.txt.in b/backends/platform/atari/readme.txt.in
index c3bd62c9270..0d19ac9ed72 100644
--- a/backends/platform/atari/readme.txt.in
+++ b/backends/platform/atari/readme.txt.in
@@ -1,5 +1,5 @@
 ScummVM @VERSION@
-==============
+=============
 
 This is a port of ScummVM (https://www.scummvm.org), a program which allows you
 to run certain classic graphical adventure and role-playing games, provided you
@@ -479,10 +479,6 @@ Known issues
   - point the extra path to the folder with *.wav files (or copy its content
     where monkey.00? files are located)
 
-- Phantasmagoria, KQ7 (and other SCI32 games) require Single buffering (or
-  Direct rendering with SuperVidel) due to its unusual cursor rendering
-  approach.
-
 - following engines have been explicitly disabled:
   - Cine (2 games)
     - incompatible with other engines / prone to freezes


Commit: 711993558a1072497f608e3e5db2616b341dcbb0
    https://github.com/scummvm/scummvm/commit/711993558a1072497f608e3e5db2616b341dcbb0
Author: Miro Kropacek (miro.kropacek at gmail.com)
Date: 2025-05-04T23:00:58+02:00

Commit Message:
BACKEND: ATARI: Fix cursor reset position

Changed paths:
    backends/graphics/atari/atari-graphics.cpp


diff --git a/backends/graphics/atari/atari-graphics.cpp b/backends/graphics/atari/atari-graphics.cpp
index 761f8952d54..ce26eda3d23 100644
--- a/backends/graphics/atari/atari-graphics.cpp
+++ b/backends/graphics/atari/atari-graphics.cpp
@@ -475,12 +475,22 @@ OSystem::TransactionError AtariGraphicsManager::endGFXTransaction() {
 		_chunkySurfaceOffsetted.init(_currentState.width, _currentState.height, c2pWidth,
 			_chunkySurface.getBasePtr(xOffset, 0), _currentState.format);
 
+		Common::Point oldCursorPosition = _screen[kFrontBuffer]->cursor.getPosition();
+
 		_screen[kFrontBuffer]->reset(c2pWidth, _currentState.height, 8, _chunkySurfaceOffsetted, xOffset, true);
 		if (_currentState.mode > kSingleBuffering) {
 			_screen[kBackBuffer1]->reset(c2pWidth, _currentState.height, 8, _chunkySurfaceOffsetted, xOffset, true);
 			_screen[kBackBuffer2]->reset(c2pWidth, _currentState.height, 8, _chunkySurfaceOffsetted, xOffset, true);
 		}
 
+		{
+			Common::Event event;
+			event.type = Common::EVENT_MOUSEMOVE;
+			event.mouse = _screen[kFrontBuffer]->cursor.getPosition();
+			event.relMouse = event.mouse - oldCursorPosition;
+			g_system->getEventManager()->pushEvent(event);
+		}
+
 		if (hasPendingSize)
 			_pendingScreenChanges.queueVideoMode();
 


Commit: 3cc41782c80395dc87d7c99f6743475142f85ea4
    https://github.com/scummvm/scummvm/commit/3cc41782c80395dc87d7c99f6743475142f85ea4
Author: Miro Kropacek (miro.kropacek at gmail.com)
Date: 2025-05-04T23:00:58+02:00

Commit Message:
BACKENDS: ATARI: Workaround for dgds engine

Changed paths:
    backends/platform/atari/osystem_atari.cpp


diff --git a/backends/platform/atari/osystem_atari.cpp b/backends/platform/atari/osystem_atari.cpp
index 62e9705d6a7..bfbfd00cb6b 100644
--- a/backends/platform/atari/osystem_atari.cpp
+++ b/backends/platform/atari/osystem_atari.cpp
@@ -367,6 +367,7 @@ void OSystem_Atari::engineInit() {
 	atari_debug("checking %s/%s", engineId.c_str(), gameId.c_str());
 
 	if (engineId == "composer"
+		|| engineId == "dgds"
 		|| engineId == "hypno"
 		|| engineId == "mohawk"
 		|| engineId == "parallaction"


Commit: d6cb8c46bd5a5d46bbf49702ff1b5b2e10215590
    https://github.com/scummvm/scummvm/commit/d6cb8c46bd5a5d46bbf49702ff1b5b2e10215590
Author: Miro Kropacek (miro.kropacek at gmail.com)
Date: 2025-05-04T23:00:58+02:00

Commit Message:
BACKENDS: ATARI: Small optimisation

Regression from f735ad65. Now the cursor surface is not recalculated if
it is clipped vertically.

Changed paths:
    backends/graphics/atari/atari-cursor.cpp


diff --git a/backends/graphics/atari/atari-cursor.cpp b/backends/graphics/atari/atari-cursor.cpp
index f621a50c106..5637c07d6d6 100644
--- a/backends/graphics/atari/atari-cursor.cpp
+++ b/backends/graphics/atari/atari-cursor.cpp
@@ -244,7 +244,7 @@ void Cursor::draw() {
 
 	//atari_debug("Cursor::draw: %d %d %d %d", _dstRect.left, _dstRect.top, _dstRect.width(), _dstRect.height());
 
-	if (_surfaceChanged || _srcRect != _previousSrcRect) {
+	if (_surfaceChanged || _srcRect.width() != _previousSrcRect.width()) {
 		_previousSrcRect = _srcRect;
 
 		// TODO: some sort of in-place C2P directly into convertSurfaceTo() ...


Commit: 8c678695c8795de8b98f5f7e1a42f43e86a80286
    https://github.com/scummvm/scummvm/commit/8c678695c8795de8b98f5f7e1a42f43e86a80286
Author: Miro Kropacek (miro.kropacek at gmail.com)
Date: 2025-05-04T23:09:50+02:00

Commit Message:
NEWS: Atari changes for 2.9.1

Changed paths:
    NEWS.md


diff --git a/NEWS.md b/NEWS.md
index a895abbfb07..32fe0297ce0 100644
--- a/NEWS.md
+++ b/NEWS.md
@@ -88,7 +88,11 @@ For a more comprehensive changelog of the latest experimental code, see:
      engines that heavily use the stack.
 
  Atari port:
-   - Fixed crash with certain audio settings.
+   - Fixed sending of SysEx MIDI messages.
+   - Fixed crash and distorted audio with certain audio settings.
+   - Fixed performance issues with SCI32 games like Phantasmagoria or
+     KQ7.
+   - Various GUI / backend fixes and optimizations.
 
  iOS/iPadOS port:
    - Fixed Fluidsynth soundfont existence check failing with sandboxed




More information about the Scummvm-git-logs mailing list