Hello, 68k!

A project log for Mackerel 68k Computer

A computer engineering journey through the Motorola 68k CPU family

Colin MaykishColin Maykish 02/02/2022 at 23:170 Comments

Mackerel is still a fairly new project, but I'm happy to say I'm making quick progress on getting a usable computer system running. Spending a few months building a 6502 system was a great foundation for moving up to a more advanced CPU. I've managed to avoid a lot of the pitfalls that derailed me at the beginning of that project.


I'm starting with the MC68008 CPU in DIP-48, so I'm currently limited to the 20-bit address space and 8-bit data bus. This is plenty to get up and running. I've assembled some boards by hand for the core components and made use of an early prototype 40-pin backplane from a previous project. Forty pins is really not going to be sufficient for this project for very long, but in the spirit of making the simplest thing first, it does just fine.

The CPU is running at its full rating of 10 MHz with (so far) good stability. I've paired it with a 512KB static RAM board and a 512KB ROM board. There's a MC68901 multi-function device to provide GPIO and timers. The MFP also gives me a serial port, but I've hard terrible luck getting it working reliably, so for the time being, I've bodged in a 65C51 ACIA which runs beautifully at 115200 baud.


On the software side, I'm using the GNU tools for C development and the Newlib C standard library. I started out using the m68k cross compiler that is available in the Debian repository, but I ended up building my own vesion of gcc from source. The nice thing about using standard tools is that software development looks pretty much the same as it would writing C code for any other system. objdump has, in particular, been extremely helpful for debugging.

I modified some of the bootloader code I wrote for Herring to work on Mackerel as well, so I've got a way to load new applications over the serial port, avoiding the need to constantly flash the ROM chip.

I'm also in the process of building a USB file storage interface using a CH376S breakout board. It is connected directly to the data bus of the system and provides an abstraction over the FAT file system on the USB drive. My immediate plan is to use this USB drive as a stage 2 boot device, i.e. boot from ROM, ROM code finds a kernel on the USB drive, copies it to RAM, and jumps to it. It might also prove useful as a filesystem for Linux in the future.

Next Steps

I've ignored a bunch of important things in this design: interrupts, /DTACK generation, proper address decoding, etc. It does run reliably though and I can write C code for it, so that's a great start.

I have some PLCC-52 adapter boards on order that will allow me to prototype with the PLCC version of the 68008. That will give me 2 more address lines for a total of 4MB of available address space and an additional interrupt line which should bring interrupt handling hardware more in line with the other 68k CPUs. I'd like to replace the current DIP 68008 with this PLCC version and add a bunch more static RAM to the system. I'll also need to build some interrupt handling and set up a system timer. With all of that in place, I can start to explore running something like uCLinux.