1244 Commits

Author SHA1 Message Date
Miro Kropacek
a6a5b8ab42 BACKENDS: ATARI: Handle themes in installation script
- "fat" version uses repacked (zip -0) archives; also separate "data"
  and "themes" folders
- "slim" version doesn't use any external themes (for speed reasons)
2023-05-11 00:03:44 +02:00
Miro Kropacek
aa8935e447 BACKENDS: ATARI: grabOverlay() uses accelerated blitting 2023-05-10 22:59:56 +02:00
Miro Kropacek
76d3706492 BACKENDS: ATARI: Add build scripts
- consolidate public #define's (just ATARI)
- cpu compiler flags are specified in the script
- allow explicit move16, SV and SV Blitter features enabled/disabled

Provide two build scripts:

1. "Fat" one targeted at 040/060 machines (possibly with SuperVidel)

This one is optimized for 68020-60 (so it's still possible to try
highres engines on 68030 machines).

2. "Slim" one targeted at 030 machines (Falcon030+DFB/CT2 or TT030)

This one is optimized for 68030 and stripped from even more features:
"fancy" (highres) themes, move16 & SuperVidel routines and most
importantly the highres engines.
2023-05-10 22:58:26 +02:00
Miro Kropacek
1870433daf BACKENDS: ATARI: Refactor & optimize dirty rects
This was long overdue. From my observation dirty rects don't need much
care, usually game engines already prepare them in a good shape (no
overlapping).

Also the overhead of calling the rect version of C2P isn't as big as I
was fearing, 256 64x64 rectangles are blitted roughly as quickly
as blitting one 1 MB block.

Removal of the rects traversal significantly speeds up Eco Quest for
instance.
2023-04-08 20:27:44 +02:00
Miro Kropacek
a4e85dab01 BACKENDS: ATARI: Remove double buffering & vsync
ScummVM engines are not built for synchronous screen locking (i.e.
updateScreen() can't be really used for any sort of blocking updates
otherwise performance suffers).

Single buffering now means deliberate tearing as a speed optimization
and triple buffering provides a tearingless picture with slight overhead.
2023-04-08 20:27:43 +02:00
Miro Kropacek
b2103898a7 GRAPHICS: ATARI: Optionally avoid surface pitch align
Some engines are too bound to linear surfaces in 8bpp that it is very
hard to repair them. So instead of polluting the engine with
Surface::init() & delete[] Surface::getPixels() just use this
workaround.

It is also useful as an early fix for newly found engines which may be
fixable later.
2023-04-07 15:54:28 +02:00
Miro Kropacek
611752e55f BACKENDS: ATARI: Update mouse even if not visible
Toonstruck, Discworld and others manage their own cursor and are
interested only in *mouse* position, not in *cursor* drawing. And
indeed, atari backend doesn't go further than rectangle drawing.
2023-04-03 20:19:46 +02:00
Walter Agazzi
2c1741e5c6 GRAPHICS: Preventively remove alpha channel for screenshots
Preserving the alpha channel for screenshots
is not really needed and causes problems in
the AGS engine (and possibily other engines)
2023-04-02 11:38:18 +02:00
Miro Kropacek
cef14a7c6a BACKENDS: ATARI: Small fixes
- fix restoration of dirty rects from overlay
- fix vsync handling (don't try to be too smart; we can't store "vsync"
  from anywhere because that wouldn't play nicely if a game has its own
  "vsync" set) ... so keep the checkbox as is
- overlay restore for 640x400
- never wait for vbl in overlay
- readme.txt
2023-03-29 20:17:43 +02:00
Antoniou Athanasios
8ce6a32ac2 ANDROID: Clean up log code and use Backends::Log 2023-03-26 12:05:12 +03:00
Miro Kropacek
a98ce2c211 BACKENDS: ATARI: Double/triple buffering doesn't enforce fullscreen redraws
Also, massively refactored, single/double/triple/overlay rendering is
finally united.
2023-03-25 21:45:50 +01:00
Miro Kropacek
52f8bd45e2 BACKENDS: ATARI: Use RGB332 for the overlay 2023-03-25 21:45:50 +01:00
Miro Kropacek
6c5e3dbfd5 BACKENDS: ATARI: Refactor 2023-03-25 21:45:50 +01:00
Miro Kropacek
06af761337 GRAPHICS: ATARI: Align surface on a 16-byte boundary
Also implement a CPU-based optimization for the 68040 / 68060.
2023-03-20 22:17:25 +01:00
Le Philousophe
f7ca853d34 OPENGL: Make sure shader has been created before cloning it 2023-03-19 09:46:03 +01:00
Donovan Watteau
18ab6803d6 JANITORIAL: Fix various "an" typos in comments 2023-03-16 14:47:28 +01:00
Thierry Crozat
9f1528e32f SDL: Fix incorrect handling of dirty rect with negative shake offset in SDL1
Instead of shifting the destination to the left, if was moving the source to
the right, which had the effect of shifting the dirty rect. So part of the
surface that should have been copied to the screen was not, and instead it
was copying part of the surface that did not need to be copied.
2023-03-06 22:16:49 +00:00
Scott Percival
dd43a7d2c4 SURFACESDL: Re-add check for _cursorNeedsRedraw
Partially rolls back a change introduced in
2caa338dbddd9429c766a281231c8fb98701d968; Director relies on the notion
of updateScreen() being near-zero cost if there are no changes.
For example, starting director:henachoco05 went from taking a few
milliseconds to taking 11 seconds, and opening the top menu in
director:easternmind only works on 10% of the screens.
2023-03-06 21:26:28 +01:00
Vladimir Serbinenko
263a6bbb82 SDL: Fix shaking with SDL1 and negative offsets
Current code results in a crash
2023-03-06 01:17:16 +01:00
elasota
2841b9931d GRAPHICS: Fix Normal and AdvMame scalers not applying cursor mask to additive texture 2023-03-05 21:13:01 +01:00
elasota
18f947272a GRAPHICS: Properly handle cursor mask texture in GL context teardown/recreate.
Fixes cursor transparency breaking after toggling fullscreen mode on Windows.
2023-03-05 21:13:01 +01:00
Miro Kropacek
4d21a496d2 BACKENDS: ATARI: Add new backend (graphics, mixer, platform)
Compile as:

./configure --backend=atari --host=m68k-atari-mint --enable-release --disable-mt32emu --disable-lua --disable-nuked-opl --disable-16bit --disable-scalers --disable-translation --disable-eventrecorder --disable-tts --disable-bink --opengl-mode=none --enable-verbose-build --prefix=/usr --bindir=/ --datarootdir=share --datadir=data && make -j 16 && m68k-atari-mint-flags -S -r ./scummvm && make install DESTDIR=$PWD/_release/ && mv $PWD/_release/scummvm $PWD/_release/scummvm.ttp
2023-03-04 23:38:42 +01:00
Miro Kropacek
9285e5a66e COMMON: Fix null graphics backend without USE_RGB_COLOR 2023-03-04 23:38:42 +01:00
D G Turner
edf97f385c GRAPHICS: Fix Set-But-Unused-Variable GCC Compiler Warning 2023-02-20 00:43:42 +00:00
elasota
325674ace7 GRAPHICS: Add masked cursor support to SurfaceSdl, fix tests 2023-02-19 23:51:09 +01:00
elasota
3db67a33ac GRAPHICS: Add support for pixels with masks and inverted pixels 2023-02-19 23:51:09 +01:00
Cameron Cawley
8adcc29df9 RISCOS: Use double buffering in full screen mode when V-sync is enabled 2023-02-19 21:27:45 +00:00
Cameron Cawley
971148c9bd SURFACESDL: Allow vsync support to be implemented in subclasses with SDL 1.2 2023-02-19 21:27:45 +00:00
Le Philousophe
c6c73ea0ea OPENGL: Properly take extra pixels into account when using scalers
As in SurfaceSDL, the dirty rect must be grown.
2023-02-13 21:08:53 +01:00
Le Philousophe
dc4acb8745 SURFACESDL: Really fix mouse dirty rectangle
Hotspot was not correctly taken into account when it changed.
Calculations are simplified and only done in one place.
2023-02-12 18:28:04 +01:00
Le Philousophe
4a7d75595d OPENGLSDL: Make sure pipeline is destroyed when Manager is destroyed
When destroying the Manager its context is always destroyed.
Destroying OpenGLGraphicsManager must destroy the pipeline too.
2023-02-12 18:06:21 +01:00
Cameron Cawley
2caa338dbd SURFACESDL: Fix calculating the mouse dirty rectangle 2023-02-07 23:44:17 +01:00
Cameron Cawley
ce9d324a72 SURFACESDL: Fix crash when saving screenshots in paletted screen modes 2023-02-07 23:42:42 +01:00
Le Philousophe
97c8746d2e BACKENDS: OPENGL: Use a floating point cursor size
When scaler shaders are used, cursor size is adapted to scale on the
game screen texture and not on the back buffer so the size is scaled
twice and is imprecise.
Using a float gives more precision without any performance impact as the
OpenGL code already expects floats.
2023-02-05 20:48:51 +01:00
Eugene Sandulenko
e0736936e9
BACKENDS: OPENGL: Use isCLUT8() 2023-02-02 19:33:20 +01:00
Vladimir Serbinenko
a1fdd9df20 MIYOO: Use 640x480 GUI
it looks nice and crisp on this handheld
2023-01-29 10:41:10 +01:00
Le Philousophe
0416279980 OPENGL: Fix glitch when shaking screen
Everything was converted to unsigned instead of the opposite.
2023-01-24 19:40:48 +01:00
Christophe Branchereau
7fa860166e OPENDINGUX: use 320x200 videomode for the RG99 instead of 320x240
This allows the software upscaler to kick in, which looks
much better than IPU upscaling on the RG99

Signed-off-by: Christophe Branchereau <cbranchereau@gmail.com>
2023-01-23 12:04:25 +01:00
Vladimir Serbinenko
42a5aac407 SURFACESDL: Fix overlay background when using hardware palette 2023-01-20 05:45:37 +03:00
Vladimir Serbinenko
576b2be0cb SDL: Workaround for broken SDL on Miyoo Mini 2023-01-18 00:51:38 +03:00
Vladimir Serbinenko
a0cb2fb05e SURFACESDL: Don't pass private flags to SDL_CreateRGBSurface
sdl_video.h names all of SDL_RLEACCEL, SDL_SRCCOLORKEY and SDL_SRCALPHA
as private and read-only. Documentation mentions them in
SDL_CreateRGBSurface but also says they are automatically set on
either SDL_SetColorKey or on non-zero Amask.

Previously passing them created no problem but miyoo mini SDL gets confused,
so let's never pass the private flags.
2023-01-18 00:51:38 +03:00
Vladimir Serbinenko
1bc4fe5279 SDL: Move RS90-specific code to opendingux directory 2023-01-17 13:48:50 +03:00
Vladimir Serbinenko
5bdabeed7e SURFACESDL: Make getDefaultResolution overideable by custom backends 2023-01-17 13:48:50 +03:00
Vladimir Serbinenko
81fdd308cf SURFACESDL: Extract initing of graphics surface into a separate method. 2023-01-17 13:48:50 +03:00
Vladimir Serbinenko
4a0d9c2665 SDL: Add missing init of _prevCursorNeedsRedraw 2023-01-17 13:48:20 +03:00
Cameron Cawley
40f797fdef SDL: Support VSync with OpenGL in SDL1 builds 2023-01-16 18:09:53 +01:00
Cameron Cawley
138a983d80 COMMON: Refactor VSync handling to match the other options 2023-01-16 18:09:53 +01:00
Christophe Branchereau
2994ab025d OPENDINGUX: force 320x240 for the RG99
The device has a 320x480 screen and aspect of gui is wrong if we use
the full resolution

Signed-off-by: Christophe Branchereau <cbranchereau@gmail.com>
2023-01-16 10:31:14 +01:00
Vladimir Serbinenko
4e4c652433 SDL: Properly restore gfx mode if several parameters have changed
Currently we have bunch of else-if and only one of them triggered. When
e.g. aspect ratio correction and resolution changes only aspect ratio is
covered by restoration. If this fails the code retries the same mode endlessly
2023-01-12 16:39:38 +03:00
Vladimir Serbinenko
74336c5411 SDL: Fix potential buffer overflow
This causes a segmentation error on Miyoo Mini but is not specific to it
2023-01-12 14:01:45 +01:00