In an effort to better understand black NeXT hardware, I spent some time hacking on the weekend and created a little experiment to run bare-metal code on the 68k machines.
You can find the source code on github (
https://github.com/michaelengel/Baremetal-NeXT). Beware, it's a big hack at the moment 8) and tested in Previous 2.5 only (not on real hardware), but it demonstrates system startup in assembler and switching to C code, drawing to the (mono) bitmap screen as well as handling timer and keyboard/mouse interrupts.
I compiled the code using the Retro68 cross-compiler (
https://github.com/autc04/Retro68), since I couldn't get the NetBSD NeXT cross-compilers to work on my M1 Mac. Thus, booting is a bit convoluted - the linker generates an ELF file which is converted to a.out (which the NeXT ROM monitor can boot via tftp) using a terrible hack stolen from the NetBSD standalone boot code for next68k...
I finally managed to set up a real slab (regular non-Turbo mono). The bare metal example code also works on real hardware :). This is one of my Megapixel CRTs which need a bit of work, I'm afraid...