Please test Spatterlight on Apple Silicon

Release 0.8.6 of Spatterlight is here.

It is supposedly a Universal app that runs natively on Apple Silicon, but as I am unable to test this, it might not work at all. Give it a try if you can!

The sound code is also completely rewritten, so it would be great if anyone could try it out with a couple of games using sound.

Full change log here.



Two games (briefly) tested.

  1. Andromeda Apocalypse, with title music: no problem detected.
  2. Wolfsmoon, with graphic window: no problems detected. // ETA: the graphical windows doesn’t resize correctly if we change the Theme used.

I’m don’t know about which interpreter to use; at the moment it’s the “Amiga” version.


Thanks for testing! Glad to hear that it is working. I assume you are using an M1 machine?

That interpreter setting only applies to Z-machine games, and even there it usually won’t have a lot of effect. I probably should make this clearer in the tool tip.

The resizing problem is interesting. The cause seems to be that Wolfsmoon, just like Andromeda 1983, expects a redraw event to tell it when to resize redraw the image, but only receives window arrangement events.

I actually investigated this behaviour back in 2018, but never got to the bottom of it. I’ll see what I can do.

EDIT: It seems that simply sending a redraw event after every arrangement event fixes this. This is not according to spec, but many Glulx games with graphics apparently expect it.

1 Like

Yes, the Apple Silicon you requested.

As per the resizing window… it doesn’t really matter: I don’t see many people changing themes during play. But in case you want to further investigate, I used the Simple Graphical Window and Location Images extensions by Emily Short.

In the next release, images will resize properly both when changing themes and resizing the window by dragging the edge. Thanks again for your feedback!

1 Like

Just a heads-up: After getting my hands on an M1 machine, I’ve found that TADS games won’t run on the Apple Silicon native version of Spatterlight. Hopefully I can work out why and find a fix.

Gargoyle has the same problem. QTads might have a patch? I’m not sure if it’s the same issue or not.

I’m not sure if it’s the same problem, but simply adding a line to os.h to make it think that __aarch64__ is the same architecture as __x86_64__ seems to have fixed it. Otherwise it will default to the definitions for 32-bit x86, which breaks everything.

So it seems TADS will be working in the next release.

1 Like

You should probably also take a look at the post after the one that was quoted above:

h_le_c11.h was primarily made to solve issues on ARM-based CPUs, but is also perfectly suitable for x86 and x86-64. There’s basically no reason to use h_ix86.h and h_ix86_64.h anymore.

1 Like

I’m no good at this, apparently. Simply replacing h_ix86_64.h with h_le_c11.h gives me lots of these two compiler errors:

terps/tads/tads2/h_le_c11.h:49:54: error: unexpected type name 'intmax_t': expected expression
    return (siz + alignof(intmax_t) - 1) & ~(alignof(intmax_t) - 1);
terps/tads/tads2/h_le_c11.h:55:48: error: expected '(' for function-style cast or type construction
    return (void*)(((uintptr_t)p + alignof(void*) - 1)

Explicitly setting the TADS projects to C11 and C++11 dialects instead of the Clang default, whatever that might be (EDIT: C17 and C++17, apparently), gets rid of those, but fails with:

spatterlight/terps/tads/tads3/tct3stm.cpp:318:21: error: comparison between pointer and integer ('CTcPrsNode *' and 'vm_prop_id_t' (aka 'unsigned short'))
    if (create_iter != VM_INVALID_PROP)


Yay, it worked! Thanks a lot!

Hmm, now I’m getting another weird TADS bug: At the end of “Till Death Makes a Monk-Fish Out of Me”, at what should be the very last move, I get this:

Zak hears this, and his frown deepens.  “I guess you’d know,” he replies 
[TADS-1003: numeric value required]

And the game doesn’t end but just keeps going. This does not happen with h_ix86_64.h + C17.

EDIT: Nevermind, this is sandbox-related. Apparently the game tries to create an external file.

I’m testing Andromeda in Spatterlight on Apple Silicon now, and I’m not sure how to trigger the title music. What do I have to do to get it to play?

You playing the right Andromeda? The games with music are APOCALYPSE and 1983.
There’s nothing to do to trigger the music, it just starts when the graphical screen is launched.

I was using this file from the IFDB page.

Ok it’s the right file.
To launch the screen and the music you have to get past the intro. It’s 5xTALK TO OREN.

1 Like

The latest version (0.8.9) pops up an open file dialog every time you start the app, is that intended?

Also, I installed the App Store version on my M1 Mac - works fine, but is at an older version (0.8.7).

This is intended. It was a requested feature, see issues #42 and #46.

There is an option to switch this off, but it is somewhat confusingly named “Show library window on click”.

A bigger issue is that something went very wrong with the build of 0.8.9 that I first uploaded to the Github releases page: it showed the preferences panel from the previous version, which does not have this option. I don’t understand how that happened. If your version has this problem, try downloading it again at the same place.

Thank you, works fine now with the new download.

1 Like