Commit graph

22 commits

Author SHA1 Message Date
Miro Kropacek
a4ed12b04d BACKENDS: ATARI: Cleanup overlay code
Pretending that the manager starts in the overlay mode was really
confusing.

Also, the concept of _workScreen seemed great in theory but lead to
various subtle errors which were very hard to debug (related to cursor
handling, resolution changing etc).
2024-12-30 18:37:55 +01:00
Miro Kropacek
b779b2038f JANITORIAL: ATARI: Unify enum names 2024-12-30 18:37:54 +01:00
Miro Kropacek
feef4e1bf1 BACKENDS: ATARI: Final screen resolution changes
- seamless resolution/palette switching (at least in theory, it still
  isn't artifact-free, no clue why)

- bugfixes (shake offset, some s_screenSurf corner cases)

- simplification the triple-buffering code
2024-11-21 11:31:25 +01:00
Miro Kropacek
8bbc31aa6d BACKENDS: ATARI: Bugfixes
- optimize fillScreen(): Eco Quest calls it way too often with 1x1 rects

- don't disable Cursor::isChanged() flags on !isVisible(), that leads to
  skipping of _surface creation in some cases

- handle properly any number of parameters between beginGFXTransaction
  and endGFXTransaction

- clear the work buffer when exiting a game to avoid showing it when
  next game shows an error upon startup
2024-11-13 21:41:01 +01:00
Miro Kropacek
dd49c9e3ce BACKENDS: ATARI: QoL improvements
- fixed aspect ratio correction (overlay destroyed
  its state, keyboard shortcut didn't always work),
  as well as significantly sped it up on VGA and
  SuperVidel

- smoother transitions between video modes

- reduce the number of video mode changes

- fixed a few extreme cases when triple buffering
  could lose an update

- lighter ST RAM usage in the lite build

- removed hardware accessing init/deinit routines
2024-07-15 19:42:51 +02:00
Miro Kropacek
0c77d67845 BACKENDS: ATARI: Make Cursor Screen's property
Instead of having one globally in AtariGraphicsManager. This simplifies
code and cleans up a lot of dark corners in AtariGraphicsManager.

A slight disadvantage is that now the cursor surface has be to converted
for each buffer.
2024-07-15 19:42:51 +02:00
Miro Kropacek
c7bc03d4f4 BACKENDS: ATARI: Move Screen outside AtariGraphicsManager 2024-07-15 19:42:51 +02:00
Miro Kropacek
957aa15e7e BACKENDS: ATARI: Move Cursor outside AtariGraphicsManager 2024-07-15 19:42:51 +02:00
Miro Kropacek
b510eff336 BACKENDS: ATARI: Implement aspect ratio correction 2023-09-24 17:48:54 +02:00
Miro Kropacek
7e3b9cceec BACKENDS: ATARI: Direct rendering support
Similar to SuperVidel's but requires an additional C2P pass.

Also, a few optimizations added like cursor is being assumed to be in
a persistent memory so we don't copy it over. And it's using a mask
instead of key.

This graphics mode is not perfect though and works reliably only with
source surfaces allocated via Surface::init() otherwise wrong memory
location is being read.

Still, can gain quite a few CPU cycles, especially on 640x480 screens.
2023-08-12 17:38:49 +02:00
Cameron Cawley
d8cca29783 BACKENDS: Allow filling part of the screen with OSystem::fillScreen 2023-08-06 23:03:46 +02:00
Miro Kropacek
d9a5de0fe6 BACKEND: ATARI: Screen shaking and some fixes
- surface setup for optimized 4-bit C2P routine wasn't properly detected

- STFA pretends to support Falcon sampling frequencies on TT leading to
  suboptimal sample mixing

- delayMillis() should check also for other events (fixes Future Wars)
  but avoid doing it for SCI as its MIDI timer would call itself in a
  recursive loop

- SuperVidel doesn't need to use VsetScreen() in VBL anymore

- Wetlands, Teen Agent, Shivers and Private Eye need non-aligned
  surface  widths

- However Wetlands and Private Eye use setCursorPalette, see
  https://bugs.scummvm.org/ticket/14524

- Added warning for Phantasmagoria's 630x450, nothing can be done there
  as the game also requires non-aligned surfaces and at the same time
  the buffer has to be aligned on 16 bytes.

- BDF scaling disabled by default
2023-07-19 22:22:11 +02:00
Miro Kropacek
d9eee7906a BACKENDS: ATARI: Use unordered_set for dirty rects
This allows efficient redraw of surfaces which don't change their
position too much.
2023-06-15 22:58:13 +02:00
Miro Kropacek
5537759c53 BACKENDS: ATARI: Rework
- Atari TT support
- all video and audio is now handled via XBIOS
- reworked IKBD handling using Kbdvbase vectors, esp. Kbdvec()
- video uses proper triple buffer
- arbitrary game screen size support
- many fixes and optimizations
2023-06-15 22:57:55 +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
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
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
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