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).
- 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
This shaves off a good 800 KB from all the engines. However, do keep
local atari debug messages for diagnostic purposes.
Also, use natfeats for debug output when possible else the classic
stdout/stderr (not both as before).
- 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
- 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
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.
- every malloc is now aligned on 16 bytes
- no need for the hidden pointers
- ct60_vmalloc() is called only once, the rest is handled
by dlmalloc (SV XBIOS' vmalloc is pretty fragile)
_offsettedSurf must have the original screen dimensions, similar as done in
AtariGraphicsManager::Screen::reset().
Strangely, this bug was reproducible only in MagiC and not in FreeMiNT+MP.
- composer unaligned pitch fix
- error() doesn't work while in OSystem_Atari c-tor
- when a crash occurs, restore at least the cursor
- fix a crash when "data" doesn't exist
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.
- 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
- 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
- "fat" version uses repacked (zip -0) archives; also separate "data"
and "themes" folders
- "slim" version doesn't use any external themes (for speed reasons)
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.
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.
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.
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.
- 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