Running Linux on the Sega 32X Without Hardware Synchronization Primitives

Linux on the Sega 32X. Who needs hardware synchronization primitives anyway?

Running Linux on the Sega 32X Without Hardware Synchronization Primitives

I am porting Linux to the Sega 32X to sharpen my board bringup skills, overcoming severe memory constraints and the lack of hardware synchronization primitives. Building on my previous success with the Jaguar, I reverse-engineered documentation and utilized Krikkz flash carts to get the dual SH2 processors communicating with the Genesis 68000. This project proves that with enough creativity, you can run modern operating systems on legacy hardware that was never designed for it.

I know it doesn't sound too fascinating but for me, bringing up a piece of silicon and having it run something you made is super fun.
  1. cakehonolulu

    After testing the waters with a Linux for Jaguar port; I basically set myself to get similar results on the 32X add-on for the Sega Genesis. Turns out that, even without hardware synchronization primitives, you can get smp-ready Linux: https://github.com/cakehonolulu/linux_ports

  2. mikepavone

    Neat to see this on HN after discussing this a bit with you on the Emudev discord (I'm Mask of Destiny there). I'm curious if you tested this on hardware. I think I mentioned this previously, but my understanding is that the SH-2s are incapable of writing to the cartridge area [0]. This would seem to preclude using the cart as RAM even with the extended "SSF2" mapper. Did you find that to be not the case or was this only tested in an emulator?

    [0] - See this Spritesmind forum thread https://web.archive.org/web/20190209161834/http://gendev.spr... (Internet Archive link because the live site is mostly unusable due to the scraper deluge)

  3. Dwedit

    For those unfamiliar with the Hitachi SuperH architecture, imagine THUMB. ARM even had to license some of the patents from Hitchai when they developed THUMB. SuperH architecture is not the same thing as THUMB, but it has a lot in common, mainly use of 16-bit instructions, and instructions that only specify two registers rather than three.

    But it also has some RISC jank of the era, such as branch delay slots.

  4. pizzaiolo

    These recent posts remind me of an earlier time in the 2000s when people were trying to boot Linux from anything computer-like

  5. ajb

    Interesting, I hadn't heard of Petersen's algorithm before. There's a similar algorithm by Lamport (of course): https://lamport.azurewebsites.net/pubs/fast-mutex.pdf .

More from this day

2026-07-13