Altirra 3.90 Beta IX 2/09/2019

Recorder: Added support for recording to WMV and H.264 through Media Foundation on Windows 7 and later.

bugs fixed

Audio: Fixed stereo mixing being twice as loud as mono mixing.

Author's Comment:

Rework of video recording engine. Now supports using Media Foundation for recording video directly into Windows Media Video and Audio (WMV7/WMV9) or H.264/AAC. This requires Windows 7 or later, Windows 10 recommended due to improved H.264 encoder. The video recorder also now has options for correcting aspect ratio and targeting standard frame sizes, so you can have the emulator rescale NTSC artifacted video to square pixels and then rescale to 480p or 720p with sharp bilinear. Note that encoding to H.264 can require a lot of CPU, especially since currently the software encoding is used due to a color conversion issue with hardware encoding (very slow NV12 converter in msvproc.dll). A quad-core is recommended for 720p. There may also be Rec. 601 vs. Rec. 709 color issues, so double-check videos uploaded to YouTube, etc. before going live. I may try doing the YUV conversion in the emulator to bypass the Media Foundation YUV handling problems but this is something for another day. WMV7/9 is there as a fallback in case H.264 isn't suitable for some reason but on all systems I've tried it is slower than H.264 encoding. ZMBV is still recommended if you're planning to do post-editing on the video.

POKEY audio rendering path has also been tweaked, thanks to this new toy:

Pokey Osciloscope

Recorded some waveforms from tap points in the audio circuit and recalibrated the emulator's non-linear output path. The raw output curve is now a bit more aggressive (1-exp(-2.9*i)) and the exponential decay curves have been made shallower (tau=2.6ms, 24.7ms). Amplifier saturation is now emulated at high dynamic volume levels. Also, fixed a bug where volume would double whenever the emulator switched from mono to stereo mixing due to a device needing stereo mixing.

Regarding aspect ratio of screenshots, you should be getting the correct aspect ratio when copying or saving a screenshot with the true aspect ratio option. This includes artifacting and (non-)interlacing. It will not match your screen, however, if you have the display stretching mode overridden to Fit to Window or Square Pixels, which causes the display to use a different (inaccurate) pixel aspect ratio. ﻿

Altirra 3.90 Beta XXXI 14/04/2020

Fixed a bug with script threads in custom devices where the scheduler would screw up with multiple ready threads.

6809 disassembler no longer prints branch targets >$10000.

rawdiskhs.atdevice is now one of the samples.

Fixed a bug in the FDC where the force immediate interrupt ($D8) command was not triggering an interrupt when interrupting another command, which was causing the Indus GT firmware to hang on a Read Address command with no disk in the drive.

Indus GT should have still worked if a disk was in the drive on cold reset; LMK if you're still seeing the hang. The drive should also still do the power-up seek regardless. I have seen cases where the Indus GT might not init quickly enough if you have an OS that boots too fast, so if it's just missing the boot then increase the power-up delay.

Altirra 3.90 Beta XXIX 19/03/2020

AltirraOS updated to 3.26 with a fix for end character corruption when drawing lines in GR.0 (which was fallout from another fix for drawing lines in GR.0)

Altirra 3.90 Beta XXVIII 11/03/2020

features added

nw.

bugs fixed

Disk: Fixed bogus FDC interrupts from Force Interrupt commands.

Author's Comment:

AltirraOS updated to 3.25 with a fix for screen memory corruption above RAMTOP.

Percom AT-88 emulation support. (This will not work for AT88-S1PD or AT88-SPD firmware... but if you have one of those I am keenly interested.)

6809 emulation fixes for TST direct and CWAI instructions and with interrupt nesting in history traces.

Fixed a bug with bogus FDC interrupts from Force Interrupt commands that was breaking the AT-88.

Custom device updates:

.atdevice format rewritten because I couldn't stand JSON anymore. It is now completely script format based, which means no more goofy workarounds for quoting and hex constants and being able to write inline scripts naturally. Any existing .atdevice scripts will have to be rewritten. Spec and samples have been updated.

Added support for conditional script compilation, which allows debug read and non debug read handlers to use the same script with annotations.

VFS: Fixed zip/gz paths with non-ASCII characters not being encoded properly and getting dropped on restart.

Author's Comment:

Fixes a bug with the emulator not persisting mounted disks across runs when they come from a .zip file with non-ASCII characters in the filename.

AltirraOS bumped to 3.14, fixes only in the 65C816 version. Sysdev device (@:) no longer returns bogus data, fixed a crashing issue in the screen editor, and added a workaround for slow boot with SpartaDOS X 4.48 (it expects to be able to read mainline A/X/Y registers from the stack from the VBI handler in native mode).

A few 65C816 fixes to both the main '816 emulator and to Veronica, mostly corner case direct page wrapping bugs but also a bug with WDM being a 1-byte instead of 2-byte instruction. To give you an idea of how bizarrely inconsistent the '816 is:

(dp) wraps within the direct page when reading the high address byte in emulation mode, except if DL > 0, except for PEI (dp) which always crosses pages.

(dp,X) in emulation mode wraps within the direct page when reading the low address byte, except when DL > 0, but always wraps in emulation mode when reading the high byte. Which means that if D=$0001 and X=$FF, LDA ($FF,X) reads the address from $01FF and $0100.

(dp),Y in emulation mode wraps within the direct page when DL = 0 and crosses pages for DL > 0, for both low and high address bytes. Which means that (dp,X) with X=0 and (dp),Y with Y=0 can read different addresses.

[dp] and [dp],Y always cross pages, period.

Fortunately, none of this crazy affects 6502/65C02 code executing with default D=0 or in native mode.

→ NOWSZY [ATARI] Altirra x86 i x64 3.90 test XXVI 13/02/2020

Altirra 3.90 Beta XXVI 13/02/2020

Disk: FD1771 FDC now properly times out in two revolutions instead of five in 810 full drive mode.

Author's Comment:

Secondary POKEY channels can now be muted.

Fixed a bug in the co6502 trace cache that caused some bogus execution histories for 810 full drive emulators.

Fixed 810 full drives improperly taking too long when attempting to boot with no disk in the drive, causing boot commands to time out. This started happening due to the fixes to RIOT emulation; the additional bug here was not emulating the FD1771's behavior of failing after only two revolutions instead of five like newer FDCs.

→ NOWSZY [ATARI] Altirra x86 i x64 3.90 test XXIV 21/01/2020

Altirra 3.90 Beta XXIII 21/01/2020

Rewrote JSON parsing code for tighter validation -- unexpected object members are now an error to catch typos.

Cart_mode for memory layers can now be "auto" based on address range.

Offset is now optional for SIO auto_transfers.

Added "vblank" script event.

Added controller port support.

Check circlepaddles.atdevice for a controller port example -- you can now drive the controller inputs rather than trying to fudge the memory accesses. Again, not really an intended use, but if you were crazy enough you could try to write a TASBot with this.

It's correct that you can't overlay hardware registers -- the memory layer priority is hardcoded at cartridge right now. I'll probably add support for relative priority between layers, but I haven't decided whether to allow the full freedom for changing layer priorities yet. Some of the priority stacks in the emulator can get pretty complex when you have a bunch of devices installed (130XE + Rapidus + U1MB + BlackBox + SDX + R-Time 8).

Debugger now recognizes the 6809 RTI instruction as a subroutine ender in the .dumpdsm command.

Percom RFD ROM revisions are now recognized by the firmware scan (with thanks to Nezgar for the endless disk drive research).

Support for switching to dark theme in the help file.

Now for what I've actually been working on for a while: initial support for custom devices. It is now possible to implement some types of devices, including cartridges and SIO devices, with just a text editor without having to modify the emulator. There's a built-in small scripting language for behavior like bank-switching, and the ability to connect to an external server to do more complex logic or external interactions.
The full specification is in the help file. There are also samples included for an R-Time 8, a RespeQt-compatible SIO clock, a 64K SpartaDOS X cartridge, a SuperCharger 3D cartridge, and an 820 printer which prints the output to a Python-based server. Fair warning, my Python is pretty bad, and the deviceserver could use some more refactoring (its API predates the scripting engine).
This is intended to help with prototyping or one-off devices where it doesn't make sense to integrate into the emulator yet. For instance, a while ago someone wanted help with implementing an SIO protocol for a device being made so that a flasher could be tested. I couldn't help out with this because it would have had to be written in C++ and it wasn't something I could ship. With this, the protocol could be implemented in a quick .atdevice file for a one-off. Similarly, if we end up with a mystery cartridge, this'll make it possible to quickly try a bunch of banking methods that may not be implemented yet.

Major work on compatibility database support. Custom checksums replaced with SHA256, added 50Hz/60Hz tags, tapes can now be matched, fixed a bug where some tags didn't apply properly if a profile switch was involved, fixed broken delete title and quick search in the compat editor, warn on invalid aliases, UI auto-loads the external database on open if source is present, and editor window is resizable.

Keyboard fixes: binding to non-ASCII cooked keys, such as those in Latin-1, now works; fixed an issue where changes to a custom keyboard layout didn't necessarily take effect immediately. The keyboard customization UI also warns you if you are assigning a key that conflicts with a keyboard shortcut.

Regarding the Swedish keyboard issue, it looks like there are a couple of bugs: cooked (character) mappings aren't working for extended characters, and changes to the custom keymap don't take effect immediately. Until those are fixed, bind Shift+4 as a virtual key and then toggle the current keymap to natural/direct and then back to custom to make it work.

Altirra 3.90 Beta XX 08/12/2019

CPU: Fixed extra instruction being run occasionally for a DLI delayed by WSYNC.

Author's Comment:

Fixed a bug with high-pass optimization at volume level 0 that was causing some PDM glitches.

Fixed an issue with denormals since the split filter changes that was using a bit of CPU time when everything went quiet. This was previously handled, but the mitigation code was bypassed in the new code.

Fixed an issue where sometimes UI wouldn't display in full-screen mode in DirectX 11 mode while the emulator was paused. (This doesn't apply to modal UI that forced an exit from full-screen mode.)

Started on HUD customization, available from View menu -- you can now move and resize HUD elements. Currently this is only supported for a few of the audio graphs. Note that there was some major UI system rework under the hood, so there may be some bugs with indicators.

Added audio scope that shows the waveform coming out of POKEY, with all four channels. This is tapped between the two amplifier stages, so it uses a 64KHz source and shows the short time constant high-pass effect.

Fixed a bug in the CPU emulation where an NMI was being improperly held off for one instruction if it had been delayed due to RDY cycles from WSYNC. Those RDY cycles now count against the timing check.

I had access to a number of 8-bit computers in my childhood, but my most favorite was the Atari 800, a 1.79MHz 6502-based computer with color graphics and a disk drive, and which as the predecessor to the Amiga, another favorite of mine. Over a decade later, I was struck by both nostalgia and ambition and started to write a new 8-bit Atari emulator from scratch. This is the result.
At this point, I've learned a lot more about the Atari and Altirra now emulates more than I ever had or did years ago, but I still work on it periodically. It also serves as a modularity test for the VirtualDub code base, from which Altirra shares some components. If you are struck by nostalgia too or have a desire to do some Atari development, perhaps it might be useful to you, too.