What has changed in Mini vMac 37.00, compared to Mini vMac 36.04. This only lists changes that affect behavior, and so doesn't include cleanups of the source code.
:
default compile:
not in default compile:
:
New features in default compile
* A new target is added:
-t mcar { Macintosh OS X - ARM (Apple Silicon) }
Changed behavior in default compile
* Mini vMac will now check if a disk image that is being mounted looks like a Macintosh disk image format (HFS or MFS), and if not decline to mount it, showing an error message. This helps prevent accidentally corrupting other files, especially when using ImportFl.
But there are some other disk image formats that you might want to mount, such as Fat16 and ISO (which can be used by the emulated Macintosh with additional software). Or, you may be trying to create your own new disk image and want the emulated Macintosh to initialize it. In these cases you can use a version of Mini vMac compiled with the new “-ndp 0” option to turn off this protection.
If a Branch option prior to 37 is chosen for compatibility with an earlier version, the default is “-ndp 0”, and you can use “-ndp 1” to turn on this protection.
* The emulation of VIA timer 2, used for playing sound, has been modified when running at greater than 1x speed. There is no correct behavior in this case, it is just a matter of picking what has the best compatibility with the greatest number of programs. This change fixes a reported issue with HyperCard, as well as playing alert sounds in the Sound control panel, and the "Try Scale With Sound" command of ResEdit. However it also no longer passes the Clock/Interrupt Test of MacCheck. Which seems a good trade off, unless further issues are found. (A program to test hardware *should* notice that something is strange when run at greater than 1x speed.) The specific change made is that timer 2 now continues to run during extra cycles only for the duration of a short timer interval, rather than continuing to run in this case until the end of the extra cycles. (Normally, the timer is paused for the extra cycles.)
* The program Winter Games by Epyx would not work in Mini vMac. Thanks to Jesus A. Alvarez (“zydeco”, author of the iOS port) for figuring out why, and providing a patch to Mini vMac to fix it. The game directly modifies the VBL queue data structure of the Macintosh operating system to add a VBL task, instead of calling the operating system routine VInstall, but doesn’t account for the possibility of the queue being empty. The fix is to have the Mini vMac replacement disk driver add a VBL task at boot, as the original disk driver does, so that the VBL queue is not empty.
* If the ROM image file that Mini vMac finds is not the desired ROM, but a different valid Macintish ROM that has been renamed, and the undesired ROM is larger than the desired ROM, Mini vMac would display a “ROM checksum failed” message instead of the “Unsupported ROM” message. This is because Mini vMac loads and computes the checksum of the expected number of bytes, rather than the actual ROM image size. (It is intended behavior that Mini vMac will work if the ROM image file has some extra junk at the end.) Mini vMac now checks that the checksum field at the start of the ROM is recognized, before verifying the actual checksum. Thanks to a bug report for pointing out this issue.
* In Linux (and other ports using X11), if two keys on the keyboard are configured to act the same way (such as if the caps lock key has been made to act as an additional control key), Mini vMac would only recognize one of the keys. Thanks to Adrian Carpenter for reporting this issue, and providing a patch to fix it.
New features not in default compile
* A consequence of the merge of SDL 1.2 and SDL 2.0 code is that the “-d” and “-n” command line arguments now work for SDL 1.2 too.
Changed behavior not in default compile
* The new “-lto” option provides alternative transport for LocalTalk emulation. In addition to Mike Fort’s original code for LocalTalk over BPF (Berkeley Packet Filter), there is new code from Rob Mitchelmore for LocalTalk over UPD (User Datagram Protocol), that does not require setup or administrative privileges. The new UPD option is now the default for branch 37. If a prior “-br” (Branch) option is chosen for compatibility with an earlier version, the default is BPF.
* In response to this report, AutoSlow is now enabled by default for Macintosh II emulation, matching the default for emulation other Macintosh models. To try to make this work properly, for Macintosh II emulation it now waits 60 ticks rather 34 ticks for AutoSlow to activate.
Bug fixes not in default compile
* The emulation of the BFINS instruction in the Macintosh II incorrectly handled condition codes, causing an issue with the game “Dungeon Master 2”. The N and Z flags should be set from the new value, instead of the old value, unlike the BFSET, BFCLR, and BFCHG bitfield instructions. Thanks to Christophe for this fix, adapted from the same fix in WinUAE. (Some of the CPU emulation code of Mini vMac descends from UAE.)
* When compiled with a recent version XCode, like 11.4.1, Mini vMac for OS X would not draw correctly on a retina display. It now calls “setWantsBestResolutionOpenGLSurface:NO” when available. A comment found in SDL 2.0.12 explains: “Note: as of the macOS 10.15 SDK, this defaults to YES instead of NO when the NSHighResolutionCapable boolean is set in Info.plist”. This problem occurred because the NSHighResolutionCapable key was added in July 2018 to make the window frame look better on retina screens.
* When compiled with a recent version XCode, like 11.4.1, Mini vMac for OS X would do a lot of excess drawing. Every time lockFocus/unlockFocus was called to draw to the window, a call to drawRect got triggered for the entire window. Research indicates that lockFocus/unlockFocus are deprecated, you are never supposed to draw outside of drawRect, and only notify the OS what needs to be drawn. So I tried that, using setNeedsDisplayInRect. No matter what rectangle is passed, drawRect still draws the entire window. It is hard to believe macOS is really that broken. Probably there is something else about what Mini vMac is doing to make the operating system unhappy. But I don’t know what. Before giving up for now, I tried simply removing the lockFocus/unlockFocus, and that seems to work fine. It doesn’t seem correct, but the main thing it is supposed to do is set the drawing context, and Mini vMac is already calling makeCurrentContext with the OpenGL context. So I’ve left it like that for now.
* The built in disassembler (enabled with “-dis 1”) incorrectly handled the BCHG/BCLR/BSET/BTST instructions. Thanks to Ryan for this fix.
* If Mini vMac for some reason is attempting to display a new message overlay on every tick (the kind that says “Type C to continue”), the message would never appear.
* Mini vMac would fail to compile with the options “-m II -em-cpu 0” (Macintosh II emulation with 68000 CPU). This is fixed. However, these options still do not work, because the Mac II ROM does not work on a 68000. So in addition, the Mini vMac compile setup code now gives an error message for these options.
* All of the options for the configuration tool that could be defined in “setup/CONFIGUR.i” have been removed and replaced with developer options to the configuration tool. This includes: Maintainer Name, Home Page, Development Environment, Development Environment Version, Use Command Line, Scripting Language, Print File List, Print Variation Name, and Print Variation Options.
* In response to suggestions by Tara Keeling for making it easier to port Mini vMac, the source code for the SDL 1.2 and SDL 2.0 ports are merged into one file. Then SDL has been made the "reference implementation", containing comments that apply to all the ports. From Mini vMac version 2.8.0 up to (but not including) version 3.2.0, there was a “gen” (generic) reference port intended to provide a skeleton for porting to new platforms. But since it wasn’t normally used, it tended to get out of date, and so was removed. Instead the comments were moved to the classic Macintosh port, chosen as being neutral between modern platforms. But these days, SDL is a much more practical starting point for porting. After you get it working with SDL, if you want a more native port, you can merge the source of SDL and Mini vMac, and then step by step clean it up, until almost nothing of SDL remains. The Cocoa port was made way, with no prior knowledge of Cocoa or Objective-C. This technique takes a while but is straightforward.
The SDL port has been further modified so that if it is compiled without including the SDL headers, it will not use SDL, only standard C libraries. Just as the “gen” port used to. This minimal port actually functions, even without screen, keyboard, or mouse emulation. If you prepare a disk with AutoQuit and CopyRoms, it will run and quit, saving a ROM image. Which tests that most of Mini vMac functions, and now you just need to implement the platform specific parts. Which is an alternative approach for target platforms where SDL is not available, or for people familiar with their target platform who don’t want to fuss with SDL.
* The build system has a new target option, “-t port”, in which configuration files are not generated for the platform and compiler. This allows for ports of Mini vMac not supported by the setup tool to still use the setup tool for user Variations, by providing these files.
* The build system has a new option, “-af”. The configuration tool normally arranges that only source files needed for the current user options are compiled. This option causes all files to be compiled, which works because the source files themselves contain preprocessor conditionals to skip the unwanted code. This option also causes inclusion of all API header files and link libraries that could be needed for any set of user options, rather than only what is needed for the current user options.
This option can be useful when creating an external port based off a supported configuration. The files of an external port need to work for any set of user options.
* The build system now supports Xcode 12.3 (with “-ev 12300”), and also 12.1 (“-ev 12100”).
* The build system now supports Microsoft Visual Studio 2019 (with “-ev 16000”).
* The build system option “-cpu” now accepts another cpu: “-cpu a64”, for ARM 64, such as Apple Silicon.
* The build system now rejects Target options (“-t”) that are not officially supported, for official builds.
:
If you find Mini vMac useful, please consider helping the Gryphel Project, of which it is a part.
Back up to - Changes in Mini vMac versions