7 Commits

Author SHA1 Message Date
Miro Kropacek 9bd91b4131 BACKENDS: ATARI: Remove atari_debug 2026-04-20 01:47:37 +02:00
Miro Kropacek 9a438b6492 BACKENDS: ATARI: Remove harmful assert
Cursor's srcSurface is formally PIXELFORMAT_CLUT8 but this is not true,
it's 4-bit or 8-bit bitplanes. On the other hand, AtariSurface is
PIXELFORMAT_CLUT8, PIXELFORMAT_RGB332 or PIXELFORMAT_RGB121 so these
can't be asserted for equality.
2025-07-04 14:14:46 +02:00
Miro Kropacek eb64b14b81 BACKENDS: ATARI: Implement proper cursor clipping
Previous implementation had to create a new surface every time srcRect
has been changed and as a bonus, it would (harmlessly but still) do a
read-modify-write past the screen buffer.
2025-06-25 23:50:35 +02:00
Miro Kropacek 3f47c7a8ce BACKENDS: ATARI: Let Cursor access only AtariSurface instead of Screen 2025-06-25 23:50:35 +02:00
Miro Kropacek 0520570a7b BACKENDS: ATARI: Move getBitsPerPixel from AtariGraphicsManager to AtariSurface 2025-06-25 23:50:35 +02:00
Miro Kropacek 3dd96ec7c5 BACKENDS: ATARI: Use hardware-accelerated cursor blitting 2025-06-25 23:50:34 +02:00
Miro Kropacek b3074272da BACKENDS: ATARI: Separate SuperVidel code
- Introduce AtariSurface: a surface which represents either a
  bitplane-based or pixel-based surface (on SuperVidel, as an inherited
  SuperVidelSurface). Screen::surf / Screen::offsettedSurf are its
  instances.

- Graphics::Surface::create / free now handle all Atari-related surfaces
  via dlmalloc: ST RAM (TT/Falcon), VRAM (SuperVidel - 0xA0xxxxxx) and
  VRAM for generic surfaces (SuperBlitter - 0xA1xxxxxx or ST/TT RAM).
  This allowed me to remove all the hacky stuff from atari-graphics and
  atari-superblitter.h.

- blit-atari.cpp now contains only blitting code
  (SuperBlitter/move16/fallback), SV code is in
  atari-supervidel.{cpp,h}.

- Take advantage of Common::ScopedPtr and Graphics::ManagedSurface's
  dispose flag for Screen::surf as well Graphics::ManagedSurface's
  ownership for Screen::offsettedSurf.

- Improve recoverability if an error/assert happens in
  AtariGraphicsManager's c-tor/d-tor.
2025-06-25 23:50:34 +02:00