Mini vMac Changelog

What's new in Mini vMac 3.5.7

Aug 31, 2017
  • Changed behavior in default compile:
  • Mini vMac should be faster on machines that aren’t PowerPC or x86-32. (And also Macintosh II emulation should be faster.) The C version of the 680x0 CPU emulation was optimized to be about as fast as the previous assembly code (that was only implemented for 68000 emulation on PowerPC and x86-32), and then the assembly code was removed. So Mini vMac should be much faster for variations where the old assembly code could not be used. Also, the x86-64 version is now faster than the old x86-32 assembly, and so is now preferred on machines that can run both x86-64 and x86-32. (On OS X, various bug fixes should make the Cocoa port now work as well as Carbon port, which wasn’t available on x86-64.) The C code is tweaked for a specific version of the GCC compiler. While other compilers are still supported, they can result in significantly slower emulation.
  • If Mini vMac reports an “Abnormal Situation”, it now also displays a 4 digit hexadecimal number. The original idea was that if something unexpected happens, you should first figure out how to reproduce the problem. Then the same thing can be done on a copy of Mini vMac with debugging stuff enabled. But this idea doesn’t work out so well if the problem can’t be reproduced, and seems to happen randomly and rarely. So now the non debug version of Mini vMac will display a number, which doesn’t take much code, so at least something can be learned.
  • Bug fixes in default compile:
  • A badly behaved program could cause Mini vMac to crash, attempting to fetch an emulated instruction from random memory, which memory protection on a modern computer prevents. Since this is only a bad read, I don’t think any further harm was possible besides crashing Mini vMac. Most kinds of memory access emulated by Mini vMac have for a quite while been designed to always be accurate and safe. But for speed, fetching the next instruction would simply increment a pointer to where the instruction is in real memory, and relative branches would just offset this pointer. Only for certain long branches would Mini vMac work out from scratch where the instruction is in real memory. This is good enough for all known correctly working software. But it is in theory possible to write code so that the pointer to the next instruction gets set to arbitrary memory that the operating system may not allow Mini vMac to access, resulting in a crash. And not just in theory, I have seen this happen in programs running in Mini vMac that were malfunctioning. This bug is fixed by keeping low and high limits for the instruction pointer, and checking against them as the pointer is changed.
  • There is now some testing code that scrambles the mapping between emulated memory (for RAM and ROM) and real memory, splitting it into two sets of interleaved blocks (in effect toggling one bit of the address). Which exercises all the new boundary checking code. With a number of bug fixes it all worked.
  • In the Cocoa port, entering Full Screen should now work in recent versions of OS X, instead of immediately exiting. For safety Mini vMac automatically leaves full screen mode if it notices the screen size has changed, implemented in the Cocoa port by looking for the notification applicationDidChangeScreenParameters. But recent OS X gives this notification on entering Full Screen mode, when it didn’t used to. So the Cocoa now records the main screent Rect, and only exits full screen mode if it has changed. This problem was reported by Tim.
  • The Cocoa port would draw incorrectly in full screen mode if the emulated screen is larger than real screen.
  • There is a fix for drag and drop in the Cocoa port. When Mini vMac becomes the active application, all emulated key are usually considered to be up, even if the actual keys are still being held down. But there is an exception for modifier keys held down on drag and drop (after which Mini vMac makes itself the active application), so that holding down command and option can be used to rebuild the desktop files of emulated disks. This exception worked in Carbon, but not previously in Cocoa. I’ve now figured out how to get the modifier keys, by using [NSEvent modifierFlags]. This only work in OS X 10.6 and later, so Mini vMac checks that this method is available before using it.
  • In the Cocoa port, when Mini vMac is launched by dragging a disk onto the application icon, but there is also a disk1.dsk image, it now matches the behavior of other ports in mounting the dragged image after disk1.dsk instead of before.
  • In the Cocoa port, when importing and exporting the text clipboard, Mini vMac was not translating the end of line format.
  • In the Cocoa port, when importing the text clipboard, if there were any characters that could not be translated (because they are not in MacRoman), nothing would be translated. Now, such characters will translate to “?”.
  • In the Cocoa port, when dragging the Mini vMac window around by its title bar, the emulated cursor position was incorrect. (The emulation continues running during the drag in this port.)
  • In the Cocoa port, if the mouse is moved over the dock, the cursor is made visible by the operating system, but if the mouse was then moved directly back into the Mini vMac window (and there was nothing in between), the system cursor was not made invisible again, so the system cursor and the cursor of the emulated Macintosh were drawn on top of each other.
  • In the Windows version of Mini vMac 3.4, the Mini vMac window is resizable. This happened when fixing a call to CreateWindowEx to stop using an invalid window style. The fix is now fixed by not including WS_THICKFRAME in the style.
  • There have been reports of graphics problems in the Linux version, which is suspected to result from drawing images with one bit per pixel to the screen not being properly implemented in at least some versions of Linux, with at least some hardware. So Mini vMac will now always pass 32 bit per pixel images to the operating system (for Linux and other X versions), even for black and white images. This could potentially be much less efficient, so there is a new compile time option to behave as before, “-ci 0”.
  • A C compiler is allowed to assume that two pointers of different types don’t point to the same memory location. But this assumption could break Mini vMac. So now for GCC 4.7.4 the option "-fno-strict-aliasing" is used to prevent this assumption, which appears to make no significant difference in speed. But for other compilers, Mini vMac will now try to work correctly even with this assumption (basically by taking out optimizations for big/little endian), which will slow it down a bit.
  • The emulation of the CMPI instruction was considering pc relative addressing to be illegal, when it is actually fine (though odd). As reported by Adam, this broke Dynamix adventure games. This was in Macintosh II emulation, but the bug was also present in the default Macintosh Plus emulation.
  • The emulation of the Move to SR instruction now checks for Privilege Violation.
  • New features not in default compile:
  • A new build system option “-lang ptb” selects a Brazilian Portuguese translation of the user interface by Mauricio.
  • Normally, when in Full Screen Mode, Mini vMac will try to “grab” the keyboard, preventing the operating system from intercepting keys. So in the Windows version, the ‘windows’ key can be used as an ‘option’ key, instead of popping up the “Start” menu. And in the OS X version, Command-Tab won’t switch away from Mini vMac. This is also implemented in the X version. There is a new build option, -gkf 0”, that disables grabbing the keyboard, allowing the operating system to intercept keys when Mini vMac is in Full Screen Mode. This was requested by a maintainer for “Rocket Launcher”.
  • Can now use a “Twiggy” Macintosh prototype ROM, after merging in work by Matěj Hybler. (There are two known disk images that will work with it.) The build option is -m Twiggy”. (This is not an officially supported option, advanced users can compile this version if they want to try it.)
  • Can now also use an even earlier “Twiggy” Macintosh prototype ROM, merging in further work by Matěj Hybler. (The same two disk images will work with it.) The build option is -m Twig43”. (This is not an officially supported option, advanced users can compile this version if they want to try it.)
  • The new option “-ahm” patches the ROM to replace the “Happy Mac” icon displayed on boot when a disk is inserted, with one of the images designed by Steve Chamberlin for his Mac ROM-inator (used with permission).
  • The new option “-rsz” allows you to set the size that Mini vMac expects the ROM image to be. The build system will normally select the correct ROM Size for the Macintosh model you have chosen to emulate. But you can now override this, such as to use a ROM image for Steve Chamberlin’s Mac ROM-inator.
  • The new option “-chr 0” prevents Mini vMac from checking the ROM checksum. The first 4 bytes of a Macintosh ROM contain a checksum of the remaining bytes, and there is code in the ROM to check the checksum on boot. Mini vMac patches the ROM image, so it disables this checking code. Mini vMac does the check itself before patching the ROM. It also checks that the 4 byte checksum matches one of the known ROM images for the model you have chosen to emulate. This option disables these checks, which is useful if you want to use Mini vMac with a modified ROM image, such as for Steve Chamberlin’s Mac ROM-inator.
  • The new option “-drc 0” prevents Mini vMac from disabling code in ROM that checks the ROM checksum on boot. Since Mini vMac patches the ROM, it also patches out this check. If you are using a ROM image with Mini vMac that is already patched (such as for Steve Chamberlin’s Mac ROM-inator ), this check may already be patched out. In that case Mini vMac doesn’t need to, and probably shouldn’t, to avoid interference in case a different method of patching out is used.
  • The new option “-drt 0” prevents Mini vMac from disabling code in ROM that tests proper operation of RAM at boot. Mini vMac normally patches the ROM to disable this test, to speed up booting. For greater realism, you can leave this test in.
  • The port to SDL 2 now supports importing and exporting the host clipboard (like most other ports). It also supports the same “-d” and “-r” command line options as the X ports. And it now uses the function SDL_GetBasePath for the directory to look for the ROM image and the disk1.dsk, disk2.dsk, etc. images (and also the debug log file, when enabled). In the OS X version, in the "Info.plist" file it uses the key "SDL_FILESYSTEM_BASE_DIR_TYPE" with value "parent", so that Mini vMac will looking for these images in the folder containing Mini vMac, like in most other ports. It also now ignores command line arguments starting with “-psn”, which on OS X allows it to be launched by double clicking without getting an error message. (Previously it had to be launched with the command line.) Like other ports, there are now separate magnify states for when in full screen mode and when not. And when first entering full screen mode, the magnify state is set automatically depending on the screen size. A new feature only in the SDL port so far is that using the scroll wheel of the mouse acts as if arrow keys are pressed, giving roughly the expected behavior of a scroll wheel.
  • Changed behavior not in default compile:
  • In the Macintosh II emulation, when compiled with 256 colors or 16 colors or 4 colors, the initial value in the Parameter RAM is now set to boot in color. So the initial picture is in color. (Soon after, the color mode is changed to the value saved on disk.) This didn’t use to work, which is why it was previously set to boot in black and white. It seems to work now, for reasons not investigated yet (probably one of various fixes to video emulation). It still doesn’t work for thousands or millions of colors.
  • Bug fixes not in default compile:
  • The video driver in the Macintosh II emulation now implements indexed SetEntries. This is used by the game Crystal Quest (which by the way requires color depth to be 16 colors). Also for non-indexed SetEntries, the driver now returns the no error code. (Apparently this error code is not usually paid attention to.)
  • Tara Keeling reported a bug in the Macintosh II emulation, where if the emulation was running slow enough (such as 1x speed), and there is a “disk1.disk” and “disk2.disk”, then the second disk image won’t get mounted. There is code to delay mounting the second disk one second after the first disk, which is good enough for Macintosh Plus emulation, but apparently not for the Macintosh II. So the delay has been increased to four seconds, but also now when a kDriveStatus call is made to the replacement disk driver, the delay is reduced (to about a fifteenth second). The emulated computer appears to be ready for a new disk after this call. (Not reducing the delay to zero is just being conservative.) So even for the default Macintosh Plus emulation, when inserting multiple disks there is now usually much less delay.
  • In the built in disassembler ("-dis" option), the shift instructions L and R were reversed (such as for ASR and ASL).
  • A problem may be fixed in the Macintosh II emulation, reported by Stephen Barbieri, caused by the FPU emulation not coping with invalid inputs.
  • In the Macintosh II emulation, an “Abnormal Situation” report seen when using the Restart command of the Finder has been removed, since this actually seems to work fine now.
  • The emulation of the Move from SR instruction now checks for Privilege Violation on 68020 (it is not a Privilege Violation on 68000).
  • Build System:
  • The build system has a new Development Environment option, Mini vMac C (“-e mvc”), which is really just a particular version of GCC and supporting projects, compiled into a set of cross compilers, that is used for official binaries. The advantage of using a single compiler version is in getting consistent performance across different operating systems. Also it easier to tweak C code to get good performance for a single compiler, than to try to make code that is optimum for all C compilers.
  • The build system normally selects the source files needed to compile the requested variation. There is now an option to include all source files: -all-src 1”. To make this work, all source files now have unique names, rather than have multiple files with the same name in different folders in the source archive, for choices of API, sound API, language, icons.
  • Support for assembly language is removed, including the option “-no-asm”.
  • There is now an option to put generated configuration files into a separate directory from the source files: “-cfg 1”. This is only supported for “-e mvc”.
  • The Export command would not overwrite an existing file (after the Standard Put File dialog asks if you want to replace it).
  • The build system now supports Xcode 7.3.1 (with “-ev 7310”), and also 8.2.1 (“-ev 8210”). Though not tested, other versions of Xcode in between should also work, by constructing the “-ev” option in the same way.
  • The build system now supports Microsoft Visual Studio 2017 (with “-ev 15000”).

New in Mini vMac 3.4.1 (Oct 20, 2016)

  • Changed behavior in default compile:
  • Changed URL displayed in about screen to "http://www.gryphel.com/c/minivmac/".
  • To make Mini vMac simpler and more maintainable, the interaction between platform dependent code and platform independent code has been changed a bit. Instead of the platform dependent code calling a routine to emulate one tick (sixtieth of a second) whenever appropriate, the main loop of the program is now in platform independent code, which periodically calls platform dependent code to check for events. A visible consequence of this is that the emulation will now stop running in certain circumstances when it used to continue running, such as during the open disk image dialog. The exact situations this happens varies for each platform.
  • To minimize glitches in sound output when emulation starts, stops, or just isn't running fast enough, the sound call back functions in the various Macintosh versions and the SDL version will now try to play an appropriate transition in each of these circumstances.
  • In the Cocoa port, when the platform dependent code checks for events, rather than using a time out value, it turns out there is a bit less overhead to check for events, sleep, and then check for events again. This allows matching the performance of the Carbon version, making the Cocoa version more ready for prime time. (Apple has declared Carbon very, very deprecated.)
  • The same fix actually also applies to Carbon. Mini vMac used to use a standard Carbon event loop with a complicated system of timer events only because a manual event loop didn't get quite as good performance. With this change, all ports can use the same platform independent event loop, as described above.
  • Bug fixes in default compile:
  • The Virtual-Key Codes of Microsoft Windows, that are independent of differences in keyboard hardware, turn out not to be independent of the choice of Keyboard Layout. Changing the Keyboard Layout to something other than "US" may scramble the Virtual-Key Codes, strangely enough. Mini vMac will now check the current Keyboard Layout, and attempt to unscramble the codes, so that the Keyboard Layout chosen in Macintosh operating system running within Mini vMac will work properly. There is a new build option to disable this fix, -ikb 0”, because this is fairly large amount of code and US only users don't need it. But also because I'm not sure I really understand this. Why has no one complained about this issue in the last decade?
  • Mini vMac on Microsoft Windows will now recognize the Virtual-Key code of VK_OEM_102, and translate it to the Macintosh key code of 0x0A. This key is used for angle brackets in the German keyboard layout, for example.
  • Mini vMac on Microsoft Windows passed an invalid Window Style to CreateWindowEx (when not in full screen mode). When compiled with certain development tools this could result in the window being the wrong size, and other odd behavior. Before finding and fixing this, I also made Mini vMac more robust in adjusting for window border sizes by using AdjustWindowRectEx and MapWindowPoints, rather than various results from GetSystemMetrics. (Thanks to the anonymous user who reported this issue.)
  • The OS X version of Mini vMac was using the wrong syntax for the value of the LSRequiresCarbon key in the Info.plist file in the application bundle, as reported by Ryan Schmidt.
  • The Linux, and other X, versions of Mini vMac would crash when exporting a file, if the “out” folder in the application directory didn't exist, and Mini vMac lacked permission to create it, due to not properly handling errors in the routine “FindOrMakeChild” in the source file “MYOSGLUE.c”, as reported by Éric of Montréal.
  • The Linux, and other X, versions of Mini vMac can crash if the HOME environment variable is not set, due to missing error checking (which in turn was due to incorrectly disabling an alternate implementation), as reported by fzn.
  • The Linux, and other X, versions of Mini vMac will now look for the ROM image in the application directory before looking in the “~/.gryphel/mnvm_rom”, instead of after, to match the behavior of the other ports. This makes it easier to have a ROM image for general use, and still be able try out another ROM image.
  • The autoscroll feature (used in full screen mode when the emulated screen size is larger than the real screen) would not work when the emulation was stopped (using the “Stopped toggle” in the “S” command of the Control Mode).
  • In the Cocoa port, Mini vMac would fail to mount a disk image located on a file system that doesn't support locking. It now checks the result from the flock call, and only prevents mounting if the file is already locked, and doesn't prevent mounting for other errors.

New in Mini vMac 3.3.3 (Jan 18, 2014)

  • 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 , 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.
  • Build System:
  • 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.

New in Mini vMac 3.3.3 Beta (Dec 20, 2013)

  • NEW FEATURES:
  • 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:
  • 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:
  • 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 in Mini vMac 3.3.2 (Jul 2, 2012)

  • 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 desire 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:
  • 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.
  • 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.
  • 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:
  • 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.
  • Build System:
  • 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.

New in Mini vMac 3.3.1 (May 30, 2012)

  • Bug fixes in default compile:
  • 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.
  • 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 “-min-extn” build option in the Linux version.
  • Build System:
  • 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.
  • 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.

New in Mini vMac 3.2.0 Alpha (Dec 9, 2009)

  • The primary change from Mini vMac 3.1.3 is that the Mac II emulation is improved.

New in Mini vMac 3.1.3 (Dec 9, 2009)

  • New features in default compile:
  • If Mini vMac, on Mac OS X or Windows, doesn't find the ROM file in the folder containing the application, it will now also look in a specific central location. In OS X it checks in "/Users/[your_UserName]/Library/Preferences/Gryphel/mnvm_rom/". In Windows XP, "C:Documents and Settings[your_UserName]Application DataGryphelmnvm_rom". Windows 98, "C:WINDOWSApplication DataGryphelmnvm_rom". And in Vista, I think "C:Users[your_UserName]AppDataRoamingGryphelmnvm_rom". Usually "mnvm_rom" would be an alias (on OS X, on Windows this is called a short cut) to where ever you keep your ROM collection. This avoids having to create an alias to the ROM image for each emulated Mac you use.
  • Changed behavior in default compile:The alternate CPU emulation of Mini vMac 3.0.4 is now the main and only emulation. (The “-alt-cpu” build option is gone.) This makes Mini vMac slightly faster, and allows more accurate detection of illegal instructions without speed penalty. It also reduces the amount of code to be optimized in assembly language (Currently only done for PowerPC). The PowerPC assembly code version has been revised to match the new emulation, and is now used for the PowerPC Linux version.
  • More accurate mouse and keyboard event handling, by using an event queue to communicate between the platform dependent code and the platform independent code. Previously, the platform dependent code would tell the platform independent code every emulated sixtieth of a second the current mouse position and up/down state of the mouse button and keys. If the host computer was very busy, or just slow, then a down and up pair could end up being processed in the same emulated sixtieth, and they would cancel each other out and be lost entirely. Also a mouse button state change might not be processed until well after it happened, and the mouse position might be different by then. (Though if Mini vMac is not getting time every sixtieth of a second, so that these problems can be observed, then sound emulation isn't likely to work either, emitting horrible noises. But it is possible to compile Mini vMac without sound. And also if the host computer is a device without a keyboard, such as using handwriting recognition, then there might not be separate key down and key up.)
  • The Macintosh and Windows versions now match the X version in not initially filling the sound buffer with silence, but instead waiting to accumulate real sound samples before starting to play sound. This may reduce the tendency to stutter as the program starts, mostly by giving the emulation more time to get settled into a regular rhythm before attempting sound. I also changed the X version to match the Macintosh and Windows version in only skipping a single sound block on underrun, rather than stop playing sound until the buffer is refilled.
  • Includes code sent by Jesús A. Álvarez ("zydeco") from his iPhone/iPod Touch port that improves support for the Disk Copy 4.2 disk image format, using information found in the Lisa Emulator Project by Ray A. Arachelian. Mini vMac will now get the correct size of the data in a Disk Copy 4.2 disk image, and will identify such an image even if it is not in HFS or MFS format.
  • When Mini vMac is in full screen mode, it tries to send all key events to the emulated computer, instead of any normal meanings they would have in the host operating system. But I've decided that it went too far with this. So now in OS X, in full screen mode, it will no longer disable force quit (command-option-escape). This was just too dangerous, especially during development of Mini vMac. You can still send command-option-escape to the emulated computer, using the F1 and F2 keys, which are mapped to 'option' and 'command'.
  • The X version now uses mouse motion events when possible instead of XQueryPointer, which is alleged to be inefficient. (Especially if the program is using the display on another computer, so that XQueryPointer requires a round trip over the network. I've never tried this. I don't know if anyone has.)
  • Thanks to a tip from William Nolan, Mini vMac now has, when accessing the emulated computer's memory, a special case for little endian processors that allow unaligned access (such Intel), similar to the existing special case for big endian (such as PowerPC). This makes it a bit faster.
  • I've made a number of small changes to the replacement disk driver that I think make it act closer to original Apple versions. (But which don't make any known observable difference.)
  • New features not in default compile:
  • Support for the new Mini vMac Variations service.
  • You can choose the emulated screen size (“-hres and -vres”).
  • There is an initial port to GTK+. However, this port isn't complete yet. It will allow the Linux version to better match the other ports, with menus and an open file dialog. It also will make possible a port to Maemo, which is based on Gtk. The build option is “-t lx86 -api gtk”. (The build system now optionally allows you to choose what API to use, instead of automatically setting it from the selected target.)
  • Can now use a Macintosh Classic ROM, thanks to assistance from David Sibley and "Gord". The build option is -m Classic”. Though it runs, it is not necessarily an accurate emulation of a Mac Classic. A Mac Classic is supposed to be nearly identical to a Mac SE, but there are a few minor differences. There may be more differences that I don't know about. I can't really work on this much further until I own a Mac Classic. Getting the Mac Classic emulation to work to this extent involved fixing some issues in the emulation of the VIA chip.
  • One thing to be aware of is that the Mac Classic ROM should be 512K. Apparently some ROM acquisition programs only save the first 256K. The CopyRoms program should save the correct size.
  • Can now use a Macintosh SE FDHD ROM, thanks to assistance from Steve Secker and David Sibley. The build option is -m SEFDHD”. It is currently identical to the Macintosh SE emulation, except for expecting a different ROM (which should be named 'SEFDHD.ROM').
  • Have begun emulation of the Macintosh II. The build option is -m II”. It doesn't yet emulate the FPU or ASC, but some software will still run. Since a Macintosh II can be hard to find there is also a build option -m IIx” which accepts the ROM from a IIx, but otherwise currently is identical to the Mac II emulation. The Macintosh IIcx, the Macintosh II FDHD, and the Macintosh SE/30 all have the same ROM as the Macintosh IIx.
  • You can choose the emulated screen color depth (“-depth”) in the Macintosh II emulation.
  • With the build system option “-sony-sum 1”, Mini vMac will update the checksum in a Disk Copy 4.2 disk image when it is unmounted. This prevents other programs that deal with such images from complaining about an invalid checksum. (I didn't include this by default, because it makes Mini vMac slightly bigger and slower.)
  • With the build system option “-sony-tag 1”, Mini vMac tries to support file tags. There are an additional 12 bytes for each 512 byte block on a 400K or 800K floppy disk, containing some additional information that was supposed to aid in recovering damaged disks, but was never actually used much. The Disk Copy 4.2 disk image format can support these tags. (The more usual raw format, such as found in Blanks, does not.)
  • The build system option “-sony-dc42 0” completely disables support for disk images in disk copy 4.2 format. This could be useful when trying to compile the smallest and simplest version of Mini vMac possible for some specific purpose. It should not be used when compiling a version of Mini vMac for general distribution, because a primary goal of Mini vMac is that disk images that work with any past version of the program should also work with the current and any future version (at least when default compile options are used).
  • There is now a build system option “-vsync 1” for OS X only, which turns on OpenGL double buffering and sets AGL_SWAP_INTERVAL to 1. This eliminates the "tearing" issues noted Manuel Alfayate. Unfortunately it isn't yet a real solution. Beside using much more memory, it also reduces the maximum speed of emulation unpredictably and erratically, because it makes aglSwapBuffers block until the vertical retrace, when Mini vMac is expecting to give the emulation extra time, for above "1x" speed. Anyway it helps to illustrate the issue. Now that I've seen what it looks like with vsync, I can see the difference in certain games.
  • Changed behavior not in default compile:
  • There are some refinements to the “Alternate Keyboard Mode”. Typing ';' now locks the mode on, there is no temporary state. (I found holding ';' while typing other keys too much strain.) Typing 'm' now leaves the mode. (I find 'm' slightly easier to hit than 'u', and it is no longer needed for entering the mode.) The 'shift' and 'option' keys now override the mode like the 'command' key does. (So anything except lowercase letters can be typed without leaving the mode.) When compiled with the Alternate Keyboard Mode, Mini vMac now starts up with the mode on rather than off. (I think I've reinvented what I've read about the vi editor. You are normally in command mode, and only use insert mode temporarily.) A number of the mappings are changed: 'a' - semicolon, 'b' - backslash, 'e' - backspace, 'h' - equal, 'n' - minus, 'o' - ], 'r' - return, 't' - tab, 'u' - [, and 'p' and 'w' are now not used.
  • The “Alternate Keyboard Mode” option now gives a visual indication of the current keyboard mode, intended to be easy to see in peripheral vision, without covering up where text is normally typed.
  • The Macintosh SE emulation, in full screen mode, will now emulate the ADB protocol for mouse movement, instead of just poking the changes into emulated low memory. This turned up a bug where apparently emulated ADB devices were responding to commands too quickly, before the emulated Mac was ready. I increased the constant that specifies the delay.
  • Bug fixes not in default compile:
  • Two bug fixes in the 68020 emulation, in distinguishing between long DIV and MUL, and in bit field operations with width of 32.
  • Build System:
  • The build system now has a separate argument for the memory size of the emulated machine (“-mem”), instead of including this in the model (“-m”).
  • The build system now supports Xcode 3.1, using the option “-ev 3100”. Mini vMac compiles without warnings, which wasn't possible with the SDK that comes with Xcode 2.4.1.
  • The build system now supports Microsoft Visual Studio 2008 Express, using “-t wx86 -ev 9000”.
  • The build system supports compiling the Pocket PC version with Microsoft Embedded Visual C++ 4 for ARM and the emulator (“-t wcar” and “-t wc86”).
  • The build system supports using the command line tools of the LCC compiler (“-e lcc -cl”).
  • The build system supports the Sun c compiler (“-e snc”).
  • The build system now has an “-an” option, for changing the programs abbreviated name, from the default "minivmac". So the Mini vMac variations are compiled with say "-an mnvm0001", instead of "-n mnvm0001-3.1.0-umch". The abbreviated name must be 8 characters or less, and should only include lowercase letters, numbers, and underscores.
  • The build system will now check if the folder "System Folder:Preferences:Gryphel:Build:output" exists, and if so direct output there, instead of "minivmac:output:". This is useful if you keep the minivmac source disk image on a flash drive, avoiding excessive wear.
  • The build system can now resolve aliases of folders, such as the output preference folder. So the output can be directed anywhere, such as to another disk.
  • The build system can now handle multiple sets of options at once, separated by ";". I use this in the process of compiling the set of Mini vMac Variations. To allow this to work, the build system no longer replaces the entire output folder on each run, but just replaces folders within the output folder.
  • I've removed the "-pk" option of the build system to restrict the program to a more manageable scope. And anyway I find it more convenient to handle post processing in external scripts.

New in Mini vMac 3.1.3 Beta (Oct 8, 2009)

  • Thanks to an anonymous bug report and patch, 16 and 32 bit color will now work in Intel OS X (to the extent that the incomplete Mac II emulation works at all).
  • The new event queue code is supposed to ensure that mouse and key events are handled accurately, even if emulation is not getting time to run regularly.
  • fixed is a bug where if Mini vMac for OS X was in Stopped Mode, error messages such as for failing to open a disk image would not be displayed.
  • Fixed is a bug where the build system would fail silently if the argument to "-n" is too long. (The maximum allowed by the HFS file system is 31.)