Commit graph

26 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
10665fb723 BACKENDS: ATARI: Use DISABLE_TEXT_CONSOLE for release builds
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).
2024-11-21 11:31:25 +01:00
Thorsten Otto
4c98561eec BACKENDS: ATARI: Move timer interrupt to ossystem_atari.cpp 2024-07-15 19:42:51 +02: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
08bd51f38a BACKENDS: ATARI: Fix a buffer overflow
Apparently 1024 characters is not enough for everyone.
2024-07-15 19:42:50 +02:00
Miro Kropacek
01a2d2edab BACKENDS: ATARI: Call original keyboard/mouse routines
This helps to solve the issue when one pushes 'Return' immediately after
Hatari's start. This issue appeared after introducing the
interrupt-driven audio mixer.

Not sure whether this was a real bug but it's much cleaner
implementation now anyway.
2024-02-24 03:54:54 +01:00
Miro Kropacek
4e285bdd0b BACKENDS: ATARI: Fix build 2024-01-01 17:26:22 +01:00
Le Philousophe
01ebece807 COMMON: Make getDefaultConfigFileName return a Path instead of a String 2023-12-24 13:19:25 +01:00
Miro Kropacek
969e82fce7 BACKENDS: ATARI: Last minute changes (cosmetic) 2023-12-19 14:56:04 +01:00
Miro Kropacek
43eb596d40 BACKENDS: ATARI: Set ST-MIDI driver for all audio
Also, MT-32 and MIDI are set to "auto" so no need to change those, too.
2023-11-09 18:20:06 +01:00
Miro Kropacek
f7d78ec70a BACKENDS: ATARI: Implement internal downsampling to 8-bit
So we don't rely on STFA's questionable algorithms and we can use
X-SOUND, too.
2023-11-09 18:20:06 +01:00
Miro Kropacek
fb8528ac77 BACKENDS: ATARI: Various fixes
- 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
2023-09-24 17:48:54 +02:00
Miro Kropacek
2ab9ba353a BACKENDS: ATARI: Remove the SCI hack
It was wrong (other engines are allowed to do infinite recursions?) and
Future Wars still isn't working properly at all times. I've decided to
remove it (i.e. Future Wars and Operation Stealth are not supported
anymore).

Small updates in readme.txt.
2023-08-12 17:38:49 +02:00
Miro Kropacek
87f1cd25be BACKENDS: ATARI: Don't initialize GEM before initBackend()
This caused unnecessary desktop redraw, clearing text output from the
console.
2023-08-12 17:38:49 +02:00
Miro Kropacek
f8f22c6e85 BACKENDS: ATARI: Fix a stuck key repeat
Sometimes the new IKBD handler would take over before TOS got a message
about key release event, leading to an infinite key stuck sound.
2023-08-12 17:38:49 +02:00
Miro Kropacek
c1354b8589 BACKENDS: ATARI: Fix crash when exit() is called
exit() can be handled at user level via atexit(), there's no need to use
the critical handler routine.

Removed GEM restore from the critical handler as this uncovered its
instability while being in the critical handler.
2023-08-12 17:38:49 +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
2ce02658ec BACKENDS: ATARI: DMA playback is not always active
E.g. in the overlay there's no need to steal cycles for playing empty
sample buffer.

Also make STMIDI default audio driver for the slim version.
2023-06-15 22:57:55 +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
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
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
64c864b5d3 BACKENDS: ATARI: Add "data" folder to search set
"make dist-generic" doesn't automatically look for files in "data"
folder. Commit be98f2a8 is somewhat related to this problem but only
for debugging purposes.

As relative "data" clashes with game's relative "data" (e.g. Full
Throttle demo), do the right thing and add it as absolute path.
2023-04-03 20:19:46 +02:00
Miro Kropacek
4e4aea1463 BACKENDS: ATARI: Don't call clock() and usleep()
Avoiding overhead when accessing system functions / variables.
2023-04-03 20:19:04 +02:00
Miro Kropacek
6c5e3dbfd5 BACKENDS: ATARI: Refactor 2023-03-25 21:45:50 +01:00
Miro Kropacek
896d7cf309 BACKENDS: ATARI: Use "saves" directory for savegames 2023-03-04 23:38:42 +01:00
Miro Kropacek
276cf354bf BACKENDS: ATARI: Separate AtariEventSource from OSystem_Atari 2023-03-04 23:38:42 +01:00