Bare metal NeXT 68k playground

NeXT Computer, Inc. -> NeXT Work Logs

Title: Bare metal NeXT 68k playground
Post by: cuby on July 17, 2022, 02:00:26 PM
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...
Title: Re: Bare metal NeXT 68k playground
Post by: cuby on January 08, 2023, 10:45:31 AM
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...

Title: Re: Bare metal NeXT 68k playground
Post by: barcher174 on January 08, 2023, 01:57:51 PM
Fantastic!

Go to top  Forum index