What has changed in Mini vMac 3.3.3, compared to Mini vMac 3.2.3. This only lists changes that affect behavior, and so doesn't include cleanups of the source code.
New features in default compile
* More operating systems are officially supported by Mini vMac:
FreeBSD on x86-32 (Using “-t fbsd” in the build system)
FreeBSD on x86-64 (“-t fb64”)
OpenBSD on x86-32 (“-t obsd”)
OpenBSD on x86-64 (“-t ob64”)
NetBSD on x86-32 (“-t nbsd”)
NetBSD on x86-64 (“-t nb64”)
Dragonfly BSD on x86-32 (“-t dbsd”)
Dragonfly BSD on x86-64 (“-t db64”)
OpenIndiana on x86-32 (“-t oind”)
OpenIndiana on x86-64 (“-t oi64”)
Linux on ARM (“-t larm”)
Linux on SPARC (“-t lspr”)
Minix 3.2 ("-t minx")
These ports adapt the same X Window code as the Linux port, and should have the same functionality, except currently not sound for some. The x86-64 versions are currently slower, for lack of assembly language tweaking, and should not be used if the x86-32 versions will work.
* The X versions can now play sound using the Open Sound System (OSS) API. (Usually using compatible implementations on each operating system, rather than the official OSS itself.) Sound is now enabled by default on FreeBSD and NetBSD. Sound compiles without problems (using “-sound 1”) on Dragonfly BSD and OpenIndiana, but I have not been able to test on these yet. Getting sound on Dragonfly BSD seems to require some manual setting up. OpenIndiana doesn't seem to produce any sound at all in VMware Fusion. Sound also compiles without problems on OpenBSD, but it doesn't work - setting the desired sample rate fails. Minix doesn't really seem to support sound yet. It is also possible to use the OSS API on Linux, using the new “-snd-api” build system option.
* The X versions now will try to look in the folder contain the application for the ROM image, like the Macintosh and Windows version do. (And also for disk1.dsk and so on files.) If the application directory can not be determined, the current directory is used as before. This is implemented for Linux, FreeBSD, NetBSD, Dragonfly BSD, and OpenIndiana, but not OpenBSD and Minix.
* The X versions now have a new command line option “-d [directory_path]”, in which [directory_path] is used instead of the application directory when looking for the ROM image, and disk1.dsk and so on files.
* The X versions now have a new command line option “-n [app_name]”, in which [app_name] is used instead of the application name for the title of the Mini vMac window.
* The X versions now supports a central ROM folder like the Macintosh and Windows versions have. If “~/.gryphel/mnvm_rom” exists, Mini vMac will look there for the ROM image. If it isn't there, it will look in the application directory. (And the -r command line option will override both.)
Changed behavior in default compile
* Drawing the emulated screen to the real screen is more efficient. When the color depth is 4 bits or less, rather than converting each pixel, there is a table with 256 entries for converting one byte at a time. It is also more careful about only converting pixels in the rectangle bounding the changed area, rather than the entire screen.
* The Linux version dynamically loads the ALSA library to play sound, so that Mini vMac will still run, without sound, even if ALSA is not installed. (This technique was seen in SDL.) So by default the Linux version is now compiled with sound, matching the Mac and Windows versions.
* In the Linux version, when playing sound with ALSA, snd_pcm_delay is no longer called. The delay until a sample is played is not really relevant. What Mini vMac needs to know is time to buffer underrun. So Mini vMac now looks at buffer size minus the available space in the buffer, which may be more useful, for the purpose of preventing buffer underrun while minimizing latency.
* The X versions now use advisory locking to refuse to open for writing a disk image that has been opened for writing by another copy of Mini vMac. Previously, the X versions of Mini vMac could open an already opened disk image, likely corrupting the image. If Mini vMac can only open a disk image read only, such as because the user has locked the file, then the advisory lock is not used, and multiple copies of Mini vMac can use it.
* The X versions now try to use the application name to set the title of its window, like the Macintosh and Windows versions have. (If the application name can not be determined, “Mini vMac” is used as before.) This is found at the same time as the application directory, and is implemented for the same operating systems.
* Command line arguments are now scanned before looking for disk1.dsk and so on files. This is necessary for the new “-d” option to work, and has the side effect that if disk images are specified on the command line, they will be opened first. If there are images on the command line, Mini vMac will now not bother to look for disk1.dsk at all.
* The “-l” (or “/l” on Windows) command line option is removed. The “-speed z” option to the build system should be used instead. The command line option was from before the build system existed, and the decision made to favor build time options over run time options.
Bug fixes in default compile
* The Windows version now maps the Enter key on the numeric keypad to the Macintosh Enter key. It can now distinguish that key from the Enter key on the main keyboard, which is mapped to the Macintosh Return Key. There was previously no way to type the Macintosh Enter key. Thanks to “Alex” for pointing out this issue.
* In the Windows version, in Full Screen Mode, the check for whether a key down event is an autorepeated key is incorrect. So potentially keys could have been ignored when they shouldn't have been. I've removed the check, since it isn't clear how to do so correctly (when using a "low level keyboard hook"). This doesn't affect Macintosh emulation, since there is an additional check for redundant events. It can affect the Control mode, such as when holding down Control-M.
* The Windows version now responds to the WM_QUERYENDSESSION message, so that if you try to shut down your computer with Mini vMac running (with mounted disk images), then Mini vMac will complain and stop the shut down.
* In the Linux version, using ALSA to play sound, snd_pcm_start was called before putting any sound samples in the ALSA buffer. This could cause stuttering at the beginning, or according to one report, prevent sound from working at all. Mini vMac now waits until its private buffer is full, then transfers as much as will fit into the ALSA buffer, and then starts sound playing.
* When the Linux version is compiled for ARM, it includes a check that the result of snd_pcm_avail_update looks reasonable, and if not calls snd_pcm_status_get_avail instead. This works around what appears to be a bug in Raspbian for the Raspberry Pi.
* The emulated clock was not properly initialized, and was only correct after the first “second” interrupt.
* If the emulated screen is too big to fit on the real screen (when autoscroll is available), if the area of the emulated screen that has changed doesn't intersect the visible area of the emulated screen, then an invalid rectangle was used for drawing. I discovered this when trying out Vector Linux 7, which seems to have some extra debugging checks.
* In unlikely circumstances, in Full Screen Mode, autoscroll may not scroll to show the last row of pixels at the bottom or the last column of pixels on the right.
* If the host computer is not fast enough for Mini vMac to run at 1x speeds, then Mini vMac would not run smoothly, pausing for a few seconds periodically. The test for this situation was incorrect, and a one byte counter would overflow. (Have such counters as small as possible makes it easier to detect bugs like this.)
* In X Window versions of Mini vMac, when using the Mini vMac extension to create a file on the host system, such as with ExportFl, a save dialog is not implemented. Previously the file would simply be created in the application directory with the asked for name. This was not safe, at worst it allows a program running in Mini vMac to replace the Mini vMac application. So now files will instead be created in a folder named "output" in the directory containing the application. This folder will be created if it does not exist.
* In the Microsoft Windows version, if a path to a disk image is passed to Mini vMac on the command line that is longer than is legal for a path, a buffer overflow results.
* The Windows CE version suffered bit rot. It now compiles and at least works on the Microsoft Device Emulator with Windows Mobile Version 5.0. I have no idea if it works on real hardware. Does anyone care? (Windows Mobile was discontinued and replaced by Windows Phone.) This port was starting to interfere with maintaining the main Windows version, and the choice was to remove it entirely or make it maintainable.
New features not in default compile
* The new build system option “-lt” enables Mike Fort's LocalTalk emulation. The are currently some limitations. It is only implemented for OS X. It requires running the command “sudo chmod ugo+rw /dev/bpf*” to allow Mini vMac (and everyone else) access to all network traffic. The “-lt” option also cause Mini vMac to run in the background by default, because Mini vMac can't be a proper LocalTalk node if it isn't running. And you need to manually turn on AppleTalk in the chooser - I can set the PRAM flags to boot with AppleTalk already on, but it doesn't work properly.
* A new build system option “-lang pol” selects a Polish translation of the user interface by Przemysław Buczkowski.
* The X versions have initial support for color (for Mac II emulation). The X Version so far only supports 24 bit “TrueColor”, and has a few other limitations on format. I doubt that anything besides TrueColor is used on modern machines, and so probably won't support the other options. Other depths such as 15, 16, and 32 bits may be used, and so probably should be supported, if I can find a way to test them.
* A new build system option “-mf” allows changing magnification from the default 2. For example, “-mf 3” sets the magnification to 3. The option “-mf 1” disables magnification (removing the Control-M command). The magnification factor must be an integer.
Changed behavior not in default compile
* The default color depth for Mac II emulation is “-depth 3” instead of “-depth 0”.
* For Macintosh II emulation, AutoSlow is now disabled by default “-as 0”. AutoSlow may need some further tuning to work well with Mac II emulation.
* In the X versions, the results of fwrite and fread on disk images are now checked for errors, which stops compiler warnings in recent Ubuntu.
Bug fixes not in default compile
* Fixed a bug in the DIVS.L instruction reported by “AP”. (A 68020 instruction used in Mac II emulation.)
* Fixed the BFFFO instruction, which was completely broken, as reported by “AP”. (Another 68020 instruction used in Mac II emulation.)
* Bit field operations on a register now use rotate rather than shift. The selected bits can be non contiguous, as pointed out by “AP”, and confirmed by the documentation. (Bit operations fields were added in the 68020.)
* Bit field operations on memory now try to only operate on as many bytes as needed. Previously it always operated on 5 bytes, which could have undesirable effects if operating on a memory mapped device, as pointed out by “AP”.
* The “MoveP.L <ea>, Dn” instruction mixed up the order of shifting and masking, and so was completely broken, as reported by “AP”.
* The hack that allows extra large amounts of Video RAM in the Macintosh II emulation wasn't working properly because an array used for address space translation in the CPU emulation wasn't allocated large enough. Now the build system chooses the allocation size. (This problem was observed for 1024x768 with millions of colors.) Further detail: Each NuBus card gets only 1M of address space when the computer is in 24 bit mode. And a Mac II seems to usually draw in 24 bit mode. When more Video RAM is needed for the requested compile time options, Mini vMac uses address space from adjacent NuBus slots.
* Fixed “-min-extn” build option in the Linux version.
* Added build system option “-api cco” to use Apple's Cocoa API for OS X rather than the deprecated Carbon API. But the Cocoa port of Mini vMac is not yet considered quite ready to be officially supported, and so the Carbon version is still used.
* Added build system option “-api sdl” to use the Simple DirectMedia Layer 1.2 API. This was added as a stepping stone to the Cocoa port - by combining the source code for SDL with the source code for an SDL port of Mini vMac, and then removing everything not needed, and then a lot of cleaning up until an initial native Cocoa port emerged. However the SDL port can be used as is to port to other platforms supported by SDL. But this is not (yet) officially supported.
* Added build system option “-t mx64” for Apple's X11 implementation on x86-64. (Previously x86-32 and PowerPC were supported.)
* Added build system option “-t cygw” for Cygwin/X for Microsoft Windows. Cygwin can also be used to compile the regular Microsoft Windows version with “-t wx86 -e cyg”.
* Added build system option “-t irix” for IRIX by Silicon Graphics, Inc., thanks to John Perkins.
* MinGW can be used to compile Mini vMac with build system option “-t wx86 -e mgw”. Since Bloodshed Dev-C++ is based on MinGW, “-t wx86 -e dvc -cl” would previously give similar results.
* Changed order of arguments to the link command when building the Linux version. It turns out there is a conventional order for how libraries should be specified, which I didn't know since I hadn't come a across a linker that cared until Ubuntu 11.10.
* The build system should now work properly in other emulators such as SheepShaver. It was anonymously reported that the build system would crash emulators. The test for whether the build system was running in Mini vMac (so that the resulting archive may be exported to the host) was not good enough.
* The build system now suppresses warning messages that were generated when compiling the Macintosh II emulation with Microsoft Visual C++, Thanks to a report from William Grana.