[Scummvm-git-logs] scummvm master -> c42b47273c509cbd323f5ee11cc2be8be1e08561
mikrosk
noreply at scummvm.org
Wed May 7 15:54:25 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:
6921062590 BACKENDS: ATARI: Fix for SCI32 games
a09a765580 BACKEND: ATARI: Fix cursor reset position
0136d2d2c9 BACKENDS: ATARI: Workaround for dgds engine
232c85bce3 BACKENDS: ATARI: Small optimisation
c42b47273c JANITORIAL: Correct indentation
Commit: 69210625908eb2f9ea4e249d018af05080db5fea
https://github.com/scummvm/scummvm/commit/69210625908eb2f9ea4e249d018af05080db5fea
Author: Miro Kropacek (miro.kropacek at gmail.com)
Date: 2025-05-07T17:53:54+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 45d14ee257f..ae7c38d854f 100644
--- a/backends/graphics/atari/atari-graphics.cpp
+++ b/backends/graphics/atari/atari-graphics.cpp
@@ -703,7 +703,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 103fc9a751a..0ba876d3767 100644
--- a/backends/platform/atari/readme.txt
+++ b/backends/platform/atari/readme.txt
@@ -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..30083a4a8e1 100644
--- a/backends/platform/atari/readme.txt.in
+++ b/backends/platform/atari/readme.txt.in
@@ -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: a09a7655807c3988ffbbb1347161dd949fc9fdb1
https://github.com/scummvm/scummvm/commit/a09a7655807c3988ffbbb1347161dd949fc9fdb1
Author: Miro Kropacek (miro.kropacek at gmail.com)
Date: 2025-05-07T17:53:54+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 ae7c38d854f..77f4e462d26 100644
--- a/backends/graphics/atari/atari-graphics.cpp
+++ b/backends/graphics/atari/atari-graphics.cpp
@@ -484,12 +484,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: 0136d2d2c94902f688ce675493ec0ec7aabb690c
https://github.com/scummvm/scummvm/commit/0136d2d2c94902f688ce675493ec0ec7aabb690c
Author: Miro Kropacek (miro.kropacek at gmail.com)
Date: 2025-05-07T17:53:54+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: 232c85bce320b8943178f291017415250eeec4e2
https://github.com/scummvm/scummvm/commit/232c85bce320b8943178f291017415250eeec4e2
Author: Miro Kropacek (miro.kropacek at gmail.com)
Date: 2025-05-07T17:53:54+02:00
Commit Message:
BACKENDS: ATARI: Small optimisation
Regression from 56805366. 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: c42b47273c509cbd323f5ee11cc2be8be1e08561
https://github.com/scummvm/scummvm/commit/c42b47273c509cbd323f5ee11cc2be8be1e08561
Author: Miro Kropacek (miro.kropacek at gmail.com)
Date: 2025-05-07T17:53:54+02:00
Commit Message:
JANITORIAL: Correct indentation
Changed paths:
backends/graphics/atari/atari-graphics-asm.S
backends/graphics/atari/atari-graphics-superblitter.h
backends/graphics/atari/atari-graphics-supervidel.h
backends/graphics/atari/atari-graphics.h
graphics/blit/blit-atari.cpp
diff --git a/backends/graphics/atari/atari-graphics-asm.S b/backends/graphics/atari/atari-graphics-asm.S
index 8534876d7ae..772a47d8683 100644
--- a/backends/graphics/atari/atari-graphics-asm.S
+++ b/backends/graphics/atari/atari-graphics-asm.S
@@ -33,15 +33,15 @@ SYM(asm_draw_4bpl_sprite):
movem.l d0-d7/a0-a2,-(sp) | 11 longs
#ifdef __FASTCALL__
- move.l a0,a2 | a2: dstBuffer
- | a1: srcBuffer
+ move.l a0,a2 | a2: dstBuffer
+ | a1: srcBuffer
move.l (4+11*4,sp),a0 | a0: srcMask
- | d0.w: destX
- | d1.w: destY
- move.l d2,d3 | d3.w: dstPitch
- ext.l d3 | d3.l: dstPitch
+ | d0.w: destX
+ | d1.w: destY
+ move.l d2,d3 | d3.w: dstPitch
+ ext.l d3 | d3.l: dstPitch
move.l (8+11*4,sp),d6 | d6.w: w
- lsr.w #4,d6 | d6.w: w/16
+ lsr.w #4,d6 | d6.w: w/16
move.l (12+11*4,sp),d7 | d7.w: h
#else
move.l (4+11*4,sp),a2 | a2: dstBuffer
@@ -144,15 +144,15 @@ SYM(asm_draw_8bpl_sprite):
movem.l d0-d7/a0-a2,-(sp) | 11 longs
#ifdef __FASTCALL__
- move.l a0,a2 | a2: dstBuffer
- | a1: srcBuffer
+ move.l a0,a2 | a2: dstBuffer
+ | a1: srcBuffer
move.l (4+11*4,sp),a0 | a0: srcMask
- | d0.w: destX
- | d1.w: destY
- move.l d2,d3 | d3.w: dstPitch
- ext.l d3 | d3.l: dstPitch
+ | d0.w: destX
+ | d1.w: destY
+ move.l d2,d3 | d3.w: dstPitch
+ ext.l d3 | d3.l: dstPitch
move.l (8+11*4,sp),d6 | d6.w: w
- lsr.w #4,d6 | d6.w: w/16
+ lsr.w #4,d6 | d6.w: w/16
move.l (12+11*4,sp),d7 | d7.w: h
#else
move.l (4+11*4,sp),a2 | a2: dstBuffer
diff --git a/backends/graphics/atari/atari-graphics-superblitter.h b/backends/graphics/atari/atari-graphics-superblitter.h
index c92559965e0..32be0380750 100644
--- a/backends/graphics/atari/atari-graphics-superblitter.h
+++ b/backends/graphics/atari/atari-graphics-superblitter.h
@@ -28,7 +28,7 @@
#include <mint/falcon.h>
// bits 9:0
-#define SV_VERSION ((volatile long*)0x8001007C)
+#define SV_VERSION ((volatile long *)0x8001007C)
inline static bool hasSuperVidel() {
// this works also on the TT
diff --git a/backends/graphics/atari/atari-graphics-supervidel.h b/backends/graphics/atari/atari-graphics-supervidel.h
index 28e34303331..9a34f3d24a8 100644
--- a/backends/graphics/atari/atari-graphics-supervidel.h
+++ b/backends/graphics/atari/atari-graphics-supervidel.h
@@ -94,7 +94,7 @@ private:
if (ptr != 0)
ptr |= 0xA0000000;
- return (void*)ptr;
+ return (void *)ptr;
};
}
AtariMemFree getStRamFreeFunc() const override {
diff --git a/backends/graphics/atari/atari-graphics.h b/backends/graphics/atari/atari-graphics.h
index 3672c5554f6..96ed4f0d06c 100644
--- a/backends/graphics/atari/atari-graphics.h
+++ b/backends/graphics/atari/atari-graphics.h
@@ -178,7 +178,7 @@ private:
}
virtual AtariMemAlloc getStRamAllocFunc() const {
- return [](size_t bytes) { return (void*)Mxalloc(bytes, MX_STRAM); };
+ return [](size_t bytes) { return (void *)Mxalloc(bytes, MX_STRAM); };
}
virtual AtariMemFree getStRamFreeFunc() const {
return [](void *ptr) { Mfree(ptr); };
diff --git a/graphics/blit/blit-atari.cpp b/graphics/blit/blit-atari.cpp
index 67ba3371b9e..62fd61cd0e7 100644
--- a/graphics/blit/blit-atari.cpp
+++ b/graphics/blit/blit-atari.cpp
@@ -31,24 +31,24 @@
#include "common/textconsole.h" // error
// bits 26:0
-#define SV_BLITTER_SRC1 ((volatile long*)0x80010058)
-#define SV_BLITTER_SRC2 ((volatile long*)0x8001005C)
-#define SV_BLITTER_DST ((volatile long*)0x80010060)
+#define SV_BLITTER_SRC1 ((volatile long *)0x80010058)
+#define SV_BLITTER_SRC2 ((volatile long *)0x8001005C)
+#define SV_BLITTER_DST ((volatile long *)0x80010060)
// The amount of bytes that are to be copied in a horizontal line, minus 1
-#define SV_BLITTER_COUNT ((volatile long*)0x80010064)
+#define SV_BLITTER_COUNT ((volatile long *)0x80010064)
// The amount of bytes that are to be added to the line start address after a line has been copied, in order to reach the next one
-#define SV_BLITTER_SRC1_OFFSET ((volatile long*)0x80010068)
-#define SV_BLITTER_SRC2_OFFSET ((volatile long*)0x8001006C)
-#define SV_BLITTER_DST_OFFSET ((volatile long*)0x80010070)
+#define SV_BLITTER_SRC1_OFFSET ((volatile long *)0x80010068)
+#define SV_BLITTER_SRC2_OFFSET ((volatile long *)0x8001006C)
+#define SV_BLITTER_DST_OFFSET ((volatile long *)0x80010070)
// bits 11:0 - The amount of horizontal lines to do
-#define SV_BLITTER_MASK_AND_LINES ((volatile long*)0x80010074)
+#define SV_BLITTER_MASK_AND_LINES ((volatile long *)0x80010074)
// bit 0 - busy / start
// bits 4:1 - blit mode
-#define SV_BLITTER_CONTROL ((volatile long*)0x80010078)
+#define SV_BLITTER_CONTROL ((volatile long *)0x80010078)
// bit 0 - empty (read only)
// bit 1 - full (read only)
// bits 31:0 - data (write only)
-#define SV_BLITTER_FIFO ((volatile long*)0x80010080)
+#define SV_BLITTER_FIFO ((volatile long *)0x80010080)
#ifdef USE_SV_BLITTER
static bool isSuperBlitterLocked;
More information about the Scummvm-git-logs
mailing list