Most of the past couple weeks have again been a bit quiet due to busy time at the daytime job, but there are a couple improvements which are worthy of creating an update in this development diary:
Notarized macOS downloads
The set of (macOS) app bundles on the downloads page have finally been notarized, after Toni enrolled again in (& paid for) the Apple developer program for one year required to do it. So, there won’t be any longer any trouble with the scary warnings on the recent macOS versions.
The downside is, that the default notarized applications require macOS 10.9, but we’ve left the old, unsigned application bundles for Mac OS X 10.6+ compatibility, for now.
There are not much functional differences between the most recent notarized applications and the previous builds, as most of the recent progress has been on improving color compatibility, and other features in applications not currently part of the set of the downloadable app bundles.
Escape Velocity map “works” now
After a couple days of debugging, the code crashing Escape Velocity when opening the map was isolated. However, curiously it would appear there might be a bug in Escape Velocity causing the issue; in map, the game keeps track of four data structures of 10 bytes each (which I assume may contain coordinates for at least the nebula and asteroid field pictures), but in the map drawing code it accidentally accesses a fifth element in the array, which will contain random data at end of the allocated memory area. I briefly tested this part on a real Mac running Mac OS 9 – and it exhibited the same behaviour, but luckily SectRect intersected the offending corrupted coordinates, before running CopyBits, which would crash on negative source rectangle size; in M.A.C.E. as a workaround the StdBits (which CopyBits uses) was reinforced to ignore negative transfer sizes, which appears to be invalid operation on the QuickDraw on real Macs.

There were also a couple other minor fixes:
- MakeFSSpec did not populate the FSSpec fields correctly for non-existing file, which was required behaviour when using it to create FSSpecs for creating new files with FSpCreate
- The “search & replace” mode in _Munger trap did not work correctly; The mission list was using this to replace “<DST>” with destination name, but in the case the search string was not found, it would keep appending it in the end of string infinitely
- StandardGetFile selector in Std File Package was missing typeList pointer, causing the “Open pilot” dialog to not display any files
Thexder
We recently also tested Thexder on M.A.C.E., which seems to be working quite well in both “classic” monochrome mode (with audio), and in the color mode. The controls are also quite responsive, although having played previously the DOS version it took a short bit of learning to play with the numpad controls, where vertical and horizontal movement keys are combined, as holding down multiple arrow keys is disabled in the Mac version, perhaps to avoid conflicting with the use of space bar as fire button.
This game is quite rare in the sense that it is the only game which we know that uses 2-bit (four-color) mode in the color version; this however works as a perfect test case for the 2-bit display mode testing and debugging. Interestingly, the monochrome version of the game seems to have some bugs (such as enemies not following player horizontally in the same way as in color version, and also some walls destructible by lasers seem to not work correctly). But as these bugs appear also on real Macs and minivmac, it seems that at least the emulation is working as intended.
Palette fix for Loony Labyrinth
As mentioned in the previous post, Loony Labyrinth was having some color corruption problems, which seemed to only affect the playfield. After a quick evening of debugging, it appeared that as the game used custom palette for intro screens, it was trying to reset color table back to default using RestoreDeviceClut selector of PaletteDispatch, which contained some code which was left previously as unimplemented to-do task. With a quick implementation to release the palette links from the GDevice, and doing a reallocation of color entries to restore original palette, the playfield now appears and displays as it should:

Also, to celebrate this in combination with the physics fixes from earlier this month, here’s a video of how well the game’s own AI is able to play the game in the demo mode:
Although this does not fix Marathon’s color table issue, we luckily we have identified the problem with that game, and will be fixing it before next week. More about that in the next update!
Full list of changes since last post
2020-09-29 03:12:46 +0300 • Finalize (mostly) RestoreDeviceClut implementation
2020-09-29 02:13:02 +0300 • Fix PortList allocation & add PortList debug tool
2020-09-27 03:26:40 +0300 • Fix missing typeList in StandardGetFile
2020-09-27 02:56:59 +0300 • Fix "search&replace" mode in _Munger trap
2020-09-27 02:19:43 +0300 • Implement FSpSetFInfo for HighLevelFSDispatch
2020-09-27 02:17:32 +0300 • Add dummy empty NewAlias and NewAliasMinimal
2020-09-27 02:15:44 +0300 • Populate properly fnfErr result case in MakeFSSpec
2020-09-22 11:09:13 +0300 • Merge branch 'master' of
2020-09-22 11:09:08 +0300 • Minor tweak in colorQD detection in CDEF 63
2020-09-22 02:06:41 +0300 • Fix warnings causing errors on the new Xcode
2020-09-21 03:26:21 +0300 • Fix StretchBits crashing on negative srcRect width
2020-09-21 03:24:14 +0300 • Fix ADF filenames starting with % to map correctly
2020-09-21 03:23:00 +0300 • Add OrbQuest test application JSON config to cmake
2020-09-10 13:22:57 +0300 • Fix vfs file dependency command in cmake
2020-09-10 11:57:35 +0300 • Tweak Thexder JSON config
2020-09-10 11:57:03 +0300 • Pixel-doubling support for 4-bit (16-color) mode
2020-09-10 11:56:35 +0300 • Pixel-doubling support for 2-bit (4-color) mode
2020-09-10 04:13:30 +0300 • Fix cmake to allow again unsigned apps in OSX 10.6
2020-09-10 03:19:58 +0300 • Also return success code for decoding opOpColor…
2020-09-10 03:18:11 +0300 • Add Thexder test app to cmake json configs
2020-09-10 03:17:43 +0300 • Implement opOpColor in PICT playback