Initially it didn't work. (Just a white screen.)
Then it started working, but without me making any change I could identify.
Then I disconnected the screen from the Nano Every (to change the enclosure), reconnected it, and it stopped working - just a white screen again.
Then, after reading a couple of posts I didn't entirely understand (like this) about Every Nanos and SPI, I swapped the Nano Every it for a Nano Classic and the project seems to be working again.
So, the Nano Classic works, but the Nano Every doesn't work reliably.
I'm wondering whether it's something to do with the way SPI works on the Every vs Classic, but it's above my pay grade.
Can anyone offer advice?
Initially that was my thought, but I re-soldered every connection, replaced all the jumper wires (all of which I'd tested for resistance), bought a new display, and tested the Every with another project (which uses almost every pin, though not SPI).
If I swap between the Classic and the Every, it's only the Classic that's working reliably.
Getting Started with the Arduino Nano Every says if the sketch has assembly parts inside, you should turn on the "Register Emulation" mode to emulate ATmega328P registers in the 4809 while compiling.
With a Nano Every connected, the IDE defaults to Register Emulation enabled. So I've just tried it both enabled and disabled and it hasn't made a difference.
I know I said some of this is at the limit of my understanding but I'm not that bad.
Yes, I uploaded the sketch to the Every after switching emulation off. The display was still just white. So I switched emulation back on, uploaded the sketch, and still no improvement.
The Nano Every has a very different internal structure and things don't work the same.
There is a very good book from Tom Almy called "Far Inside The Arduino: Nano Every Supplement" He covers comprehensibly all the things you can do with it.
You can get the code from his examples here
Better still buy the book.
Also you talk about emulators, basically this are not to be trusted as they make assumptions about the hardware they are emulating. I don't know of any that will emulate the Nano Every.
When you select Tools > Board > Arduino megaAVR Boards > Arduino Nano Every, then Tools > Registers emulation > ATMEGA328 from the Arduino IDE menus, it simply defines some of low level names used by ATmega328 to their ATmega4809 equivalents:
The goal of this is to provide make the Nano Every compatible with low level code that was written for the ATmega328P (and other classic AVR chips). This would allow Nano Every users to benefit from the large corpus of such code without someone having to take on the task of porting it to ATmega4809.
So I don't think this is an emulator in the way you are thinking. However, it is true that this system is limited in how much it actually provides compatibility with classic AVR-specific low level code. Fortunately quite some time has now passed since the introduction of the Nano Every, so the Arduino ecosystem's explicit support for the new "megaAVR-0" chip family has improved significantly.