4.10-test17 / 22-07-2022
Altirra is a full cycle-exact emulation of all documented hardware features for the Atari 400/800, 1200XL, 600/800XL, 130XE, XEGS, and 5200 systems and is particularly notable for having a very well equipped debugger tool.
Windows: XP SP3+ for x86/x64
Qualcomm Snapdragon 835+ for ARM64
In the future, launch with /advconfig to get directly to the advanced configuration dialog box before those settings are applied.
810/1050 full disk drive emulators now have tighter validation for disk geometry: they will now warn when attempting to use 80 track, double sided or 26 sector per track double density disks.
Fixed unintended change in GTIA speaker volume and added an advanced config var for overriding the volume (audio.speaker_vol_override).
Added option for downmixing stereo audio to mono.
Fixed some crashes related to the adaptive vsync profiler and calibration UIs at small window sizes.
Fixed bugs in the profiler's Copy as CSV option causing double context menus and incorrect data dumps.
View > Screen Effects now has pertinent links to Configure System or Windows Settings when HDR is supported but not enabled.
Added a calibration screen to tune white/black levels and check HDR rendering.
Fixed corrupted text rendering in HDR mode.
Fixed the "use system SDR intensity" HDR settings not saving.
Fixed the non-native (exclusive full screen) file browser corrupting UNC network paths.
Debugger: Fixed heat map triggering bogus traps in the OS with fast boot enabled, due to main memory not being marked as initialized when skipping the memory test.
Debugger: Randomize-on-EXE-load now uses the global seed, and prints a warning to the console when it activates.
Fixed a random crash that occurred when the emulator was forced out of D3D11 exclusive fullscreen by Windows due to being covered by another program.
High-precision timers are now used on Windows 10 1803+ for more stable emulator timing.
Fixed D3D9 code running unnecessary ticks in the background.
Major rework of D3D11 display code for improved latency tracking and reporting.
Added an adaptive vsync option (D3D11 only).
This version has some pretty major rework of the D3D11 rendering path to further reduce latency. For best results, you will need to have D3D11 enabled in Options (now default for new installs), and be running on Windows 8.1 or later. A change to the waitable latency object handling helps avoid 1 frame of latency after mode changes or accessing menus, and another change to leverage frame statistics to track vsync times helps schedule presentation times to drop ~0.5 frames of latency or so. There is also a new option in Configure System > Speed to adjust the emulation speed to match vsync, which in optimum conditions (full-screen with stable timing) can drive latency down to half a frame on average. This only works when the refresh rate is close to the ideal rate (60Hz for NTSC, or 50Hz for PAL).
There are also a bunch of related new config vars to debug this, if needed. The most pertinent one is an old one, display.show_debug_info, which displays some more statistics now:
"Present latency" now measures the latency from both Direct3D and the DWM, when frame statistics are available. In optimal conditions in exclusive full-screen mode or when the DWM is able to devote an overlay (Hardware: Independent Flip), Altirra will be able to drive this down below 1 frame (<16.7ms). When DWM compositing is involved, this will unfortunately always be at least ~1.5 frames and sometimes even 2.5 frames on average. I spent days fighting this with GPUView and various strategies and there is no way around this, the Windows 10 DWM has a bug where sometimes it will stack two frames into its flip queue and drive the latency up for everything one frame higher than necessary. Windows 7 in classic theme avoids this delay as there is no composition, but there are some pretty major problems in DXGI in that version such that windowed vsync is still less effective there than it is on Windows 8.1+.
On the other hand, after extensive testing, I've gotten better at River Raid and Kaboom!. Still suck at Alley Cat, where apparently my issues were not latency related.
There are also some changes to HDR rendering, although aside from the calibration screen there's no actually much different. I went down that particular rabbit hole while diagnosing rendering issues on a new LG27GN800B monitor, which turns out to have quite worse HDR rendering than my existing LG27GL83A due to a much more aggressive tone mapping curve which makes everything muddy. The new HDR calibration screen helps expose this. I also found out that it is possible to influence the tone mapping curve by setting the MaxCLL and MaxFALL values sent to the monitor, but it's not clear if this is helpful -- most of the time it just makes the monitor tone map more aggressively and try to lie even more about how bright it can actually display. But at least the calibration screen makes it easier to tell what's happening, and whether you can actually get better colors in HDR mode or not.
SIO acceleration routines now set/clear TIMFLG. This fixes the Boulder Dash tape above with accelerated C: enabled.
Fixed busted tape signal trace channels in Performance Analyzer after an accelerated load.
Improved load speed of large text files into debugger source windows.
Fixed a crash when opening source windows with deferred symbol loads.
Fixed Step Into and Step Out not using source mode when used in a source window that is undocked.
AltirraOS updated to 3.14: now uses correct values for TIMFLG, and improves compatibility of undocumented register state on tape boot to fix another variant of the above loader. (These seem to have been sold from some store in Poland? Or maybe a BBS....)
Load progress dialog is suppressed in exclusive full-screen mode to avoid popping out of full screen when loading tapes.
The default keyboard layouts now have Ctrl+Shift+Alt+0 aliased to Ctrl+Shift+0, to work around the bug with Windows 10 text services randomly eating it.
Fixed a bug in the debugger's .printf command with %d/%i and very large numbers.
Fixed performance analyzer not seeking to the correct instructions when the history pane has Collapse Loops disabled.
Added still image device to complement the video generator for ComputerEyes input.
Made a couple of experimental changes to reduce latency. The video output path tries harder to avoid buffering frames ahead of the display code, the display code uses double buffering instead of triple buffering, and the D3D11 path requests 1-frame latency on both the swap chain and device as appropriate.
Fixed a couple of issues with reinitializing linked timers that were causing glitches, including the above noted issue. The primary culprit was a 3-cycle skew adjustment to the ch1+2 path that hadn't been applied to the ch3+4 path.
You may encounter ghosting when using images to feed ComputerEyes. The reason for this is that, for some reason, the software uses a different horizontal offset that's about 9 pixels off for high thresholds than for low thresholds. No idea why, unless it's compensation for (very) slow response in the sample-and-hold circuit.
Adds initial support for the ComputerEyes Video Acquisition System.
Fixes H6-H9: not supporting append mode.
Fixes very long delays or garbled instruction readouts when toggling the collapse modes in the history pane.
Fixed incomplete banking setup for 5200 Super Cart in 128K and 256K sizes.
Improved Keyboard Shortcuts dialog to be more reliable at binding Alt+key combinations.
Shortened and adjusted timing offset light pen/gun trigger pulse to be more realistic.
Split light pen/gun controllers apart so they have different offsets and to get rid of the inversion on the pen switch. Existing input maps need to be remade to take advantage of this.
Removed extraneous secondary button from light pen/gun controllers.
Added light pen noise emulation.
Adds support for DXGI 1.3 seamless custom refresh rates, which can be enabled in Tools > Options > Display. There are narrow circumstances in which this works: you need Windows 8.1 or newer and both a video driver and internal LCD panel that supports appropriate custom refresh rates, with no external displays connected, and running borderless full screen. When this works, the emulator can switch the LCD panel to 50Hz for smooth PAL operation even if the display doesn't normally report 50Hz as a supported refresh rate. Unfortunately, Windows doesn't provide usable ways to determine when a custom refresh rate actually takes effect, so this can only be verified visually.
Fixed a possible crash when scaling up in the video recorder.
Added a bunch of advanced debug config vars for the display code.
The D3D11 driver now displays some vsync timing information and composition mode when debug info is enabled.
Fixed light pen/gun vertical position being way off in PAL. As a result of this fix, the light pen/gun offset has been reset in 4.10-test9 to be separate from previous versions. (0,0) is now an average-ish position for some XEGS light gun games.
Added a command to recalibrate the light pen/gun offset. Unlike the dialog settings, this is interactive where you can click on where the emulated program thinks the light pen/gun position is, and the emulator will auto-compute the offset adjustment based on that.
The immediate paddle option now also enables immediate light pen/gun updates, which can also remove 1 frame of latency for light pen/guns.
Some internal code reorganization to improve building of the RMT plugins, removing some more extraneous dependencies and formally relicensing the remaining ones. The RMT plugins and the libraries used in them are now GPLv2 with an explicit linking exception for noncommercial use. This additional exception is retroactive. See COPYING.RMT in the source archive for details. Note that there is no functional change in the RMT plugins in this version.
YASM has been removed as a build dependency.
A few misc notes:
This version contains some pre-work on trying to reduce latency, but the WIP was not stable enough to release yet. One thing I discovered is that some night light reduction programs, notably f.lux, can introduce an extra frame of latency in full-screen mode. This is because the default settings for that program force the DWM to composite. You can tell if this is happening if the D3D11 debug info says that the composition mode is [Composed: Flip] instead of [Hardware: Independent Flip].
Multiple monitors can also cause additional latency in windowed mode. With two monitors, the Windows 10 DWM will sometimes lose track of the flip queue and queue more than one frame, raising the minimum latency to 2+ frames. Also, in some cases it cannot promote a window to hardware overlay if two monitors are active.
The light pen calibration screen in the Atari Graphics cartridge is somewhat difficult to get past because it has a strict limit on the PENH values it will accept, and as a result it will not accept the calibration positioning unless you either aim left of it or set the offset negative. I suspect that this is because the Atari light pens have a different horizontal offset than light guns, but need to get data from an actual light pen to verify. If this is the case, I'll need to put in a separate offset for light pens.
Fixed an issue with cassette audio sometimes desyncing after an accelerated C: load.
Added support for CAR types 71-75. Special thanks to the Atari800 development team for confirming that it was OK to use info from their carts.txt file that hadn't been published in a release yet.
The Check For Updates dialog now has a link to the internal RSS update feed.
The Memory pane in the debugger now supports editing memory.
Warp now starts instantly when in slow motion, rather than only on next frame.
Added a config var for the slow motion speed ratio.
Fixed Unicode mappings in disk explorer text viewer.
Copy/paste now supports the international character set, and the default layout now maps international characters to their Ctrl+key equivalents.
Added XE Multicart support.
Additions: Fixed LOADEXE.XEX using old $FD device SIO code for the program loader instead of $7D.
AltirraOS: Fixed math pack compatibility issue with FDIV modifying FLPTR (fixes B-Graph pie chart routine).
AltirraOS: Fixed a cursor position checking bug with split screen Gr.0 (fixes the BASIC game House of Usher).
AltirraOS: Fixed compatibility issue with KEYDEL handling (fixes cursor movement in BrushupV40).
ATBasic: IOCB#7 is now automatically closed on I/O errors to avoid SAVE files being kept open for write.
Cassette: Fixed FLAC decoder crash with some block sizes.
Cassette: Fixed regression with FSK blocks in CAS files being read as turbo pulses instead of FSK pulses.
Disk: Retuned XF551 high-speed C/E to data frame delay.
Display: Workaround for D3D11 minimum precision crash on Intel Iris Xe 22.214.171.1249 driver.
Serial: Pad out 850 relocator to match length of original firmware relocator (fixes compatibility with loaders that hardcode the relocator length).
VFS: Fixed wrong file being accessed when using atfs:// paths to access files inside a DOS 2 disk image.
Compiler changed to Visual Studio 2022.
AltirraOS: Improved compatibility of KEYDEL handling.
Custom Devices: Script compiler now parses and blocks ++ and -- operators to prevent them from being parsed as pairs of unary operators.
Debugger: Fixed memory window horizontal scroll bar.
Devices: Lifted internal PIA limit which could cause devices to break in unusual cases with too many devices connecting to the PIA inputs.
Display: Retuned monochrome artifacting fix to high artifacting filter to restore comparable quality of color modes to 4.00.
Display: Fixed broken text after toggling HDR on the fly.
PCLink: Directory enumerations now report if the directory is root or a subdirectory.
PCLink: Improve compatibility of path parsing compared to base SDX filesystem.
Tape: C: SIO patch is now more flexible in handling of the transfer mode byte.
Tape: Improved quality of tape resampler.
Tape: Fixed incorrect rate handling of pwml chunks in CAS files.
Tape editor: Fixed store waveform option not actually doing anything.
Tape editor: Added Copy Decoded Data command.
Tape editor: Restored previous version of FSK decoding so that there are both now block-oriented and freeform decoders.
Fixed bugs with monochrome modes not working with VBXE or high artifacting modes. Unfortunately this fix also results in the return of some chroma artifacts in NTSC high artifacting mode that were previously being incorrectly canceled; I may try to retune the artifacting filters again at some point.
Tape editor: fixed broken CAS saves after some edits, highlight and scroll to changes on undo, add menu option and shortcut to re-run decoding analysis after doing an edit, redo FSK decoding in the tap editor to be closer to regular emulation decoding to increase reliability, shift+click now only moves the endpoint of the selection, warn when standard blocks will be converted to FSK on CAS save, and optimize FSK blocks on save.
C: SIO patch now supports disabling the timeout with DTIMOT=0, which fixes some tapes that had extremely long blocks (>4.5 minutes).
Added support for loading PWM-encoded chunks in CAS files.
Fixed crash with loading some FLAC files.
Accelerated C: loads now properly leave tape running after block load. This fixes some tape loaders that mix C: loads and custom tape routines.
Fixed regression with FSK pulse blocks in .CAS files being loaded as turbo data instead.
Improved frame rate stability with windowed vsync in D3D11 mode on Win8.1+.
/startuplog: now allows disabling log channels and blocks Ctrl+C.
C: patch can now load blocks longer than 30 seconds. (There are tapes with single blocks that are minutes long.)
Tape editor: fixed draw tool with waveform displayed, SIO capture option now shows enabled state, accelerated C: loads show sync bytes, and block checksum status displays more reliably during live captures.
VFS: Fixed off-by-one error when accessing files on a DOS 2 image using the atfs:// prefix.
ATBasic: IOCB#7 is now automatically closed on I/O errors to avoid SAVE files being kept open for write.
Disk: Retuned XF551 high speed C/E to data frame delay based on firmware timings.
Additions: Fixed incorrect device ID in loadexe.xex.
HLE: "Disk boot" program load mode now simulates an SDFS disk to trigger the EXE load under SDX.
The device tree now better preserves selection when adding or removing devices.
AltirraOS updated to 3.32 with fixes for a couple of compatibility issues with the math pack, so B-Graph and House of Usher now work.
Fixes to the docking UI to reduce glitching when switching layouts or toggling full screen mode, due to panes becoming visible too soon and drawing in weird places before being moved to their final location.
Fixed a few timing bugs in the standard disk emulator. 810s now produce the head bump sound, the timeout was too short for Record Not Found (RNF) errors, and with long retries the idle timeout was sometimes kicking in too soon. Happy 810 and 1050 now have retuned receive rates.
The standard disk emulator now attempts to emulate track buffering for the Happy 810, 1050, and Speedy 1050 profiles, where the drive will burst transmit sectors from memory after reading in new tracks. This makes timing closer to the default modes for those drives. The Happy 1050 commands for toggling track buffering are now also support.
Nothing Additional to add...