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).
- 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
This not only decreases the amount of XBIOS calls but also avoids
repeating the sample buffer in case of a heavier CPU load.
Also clean up the mixer code.
SDL audio init will fail on Windows if all audio output devices are disabled.
Only about 10 engines are checking for this case and numerous pieces of common code (EmulatedOPL, VideoDecoder) fail as well, so this acts as a fallback to prevent instability.
- 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
This was a relatively short-lived port. We have it broken and
disabled on the buildbot since 2016. Also, the last builds
were provided in 2011. Thus, it makes a little sense to continue
to keep the code in the repository, as it gets bitrot.
If it turns out that everything that had previously been fixed by
this manager is broken by this change, everything that had been
fixed probably could have been fixed by just increasing the audio
buffer size in SdlMixerManager. :\
The previous default buffer size of 4096 samples for 44kHz mixer
would add up to 93ms of audio latency, which is fine for early
adventure games, but this is significantly more latency than is
acceptable for games with full motion video. For these games,
the latency needs to be kept within roughly +15ms and -45ms of
video frame presentation to avoid lip sync problems. With this
change, the default audio buffer size is calculated to be 1024
samples at 44kHz (which happens to match what DOSBox uses).
There is a possibility that the reduced latency may cause issues
that did not previously exist with things like the MT-32 emulator,
where a larger buffer size allowed for a larger window where
high-complexity synthesis that could not be generated in realtime
could be balanced out by low-complexity synthesis that could be
generated faster than realtime. In this case, rather than
increasing the system mixer buffer size again, please move the
MT-32 emulator into its own thread and give it its own larger ring
buffer into which it can generate more sample data in advance,
independently from the rest of the audio system.
For other systems where this buffer size reduction might cause a
problem with audio drop-outs, a new audio_buffer_size
configuration option has been added to allow users to tweak the
audio buffer size to match their machine's ability to generate
audio samples.
Fixes Trac#10033. Also improves playback of samples in SCI that
were programmed to restart across several consecutive frames,
relying on lower audio latency in the original engine for this to
not sound bad, like the hopping sound at the start of chapter 1
of KQ7, and the sound of turning on the power in the digger train
in the Lighthouse volcano.
Removing this GUI control was suggested as far back as 2011 at
<http://lists.scummvm.org/pipermail/scummvm-devel/2011-November/010416.html>.
There were no objections, but it was never removed. When working
on audio latency bugs, I independently rediscovered that the GUI
option was broken: the per-game options would *never* work, and the
option would not take effect until ScummVM was restarted because
there is no API for interacting with the backend audio mixer. So
now, it is finally gone.
Primarily for the sake of future troubleshooting, configurability
of the audio sample frequency within SdlMixerManager is maintained
for the moment, but now users will need to edit their ScummVM
configuration file manually to change it.
When SDL returns an unsupported audio sample format, ask
SDL to do resampling to the one ScummVM expects.
This is needed for the PS3 which natively only supports
32 bits floating point as a sample format.