ORBIS BASIC 32X: BASIC compiler for creating real Sega 32X ROMs

Hi everyone,

I wanted to share a Sega 32X project I have been developing called ORBIS BASIC 32X.

ORBIS BASIC 32X is a retro futuristic BASIC compiler for creating real Sega 32X and Mega 32X software. You write programs in a BASIC style language, run the compiler, and get a bootable .32x ROM that can be tested in an emulator or on compatible hardware.

This is not a fantasy console or an emulator scripting layer. The output is an actual Sega 32X ROM containing native SH 2 machine code, compiled program data and baked in assets.

The compiler uses a compact SH 2 runtime, direct color framebuffer graphics and a lightweight workflow focused on building actual ROMs. The goal is to make 32X development more immediate and approachable while still respecting the hardware and its limitations.

Current features include classic BASIC style variables, strings, arrays, loops, fixed point math, drawing commands, image based presentation tools and integrated asset workflows.

One of the main workflow ideas is automatic asset baking. Images and audio can be integrated into the ROM during compilation. The compiler handles conversion and integration as part of the build process, so you do not need a large external toolchain for basic asset preparation.

The compiler is also designed to be dependency free. It is distributed as a standalone Cosmopolitan executable, allowing the same tool to run directly across major desktop platforms without installation, package managers or platform specific setup.

The 32X is a very specific and unusual target, so part of the fun of this project is exploring what a BASIC first workflow for it can look like, with direct ROM generation, native SH 2 code, automatic asset integration and a portable standalone compiler.

An initial demo version is available on Itch.io for anyone who wants to try it, inspect the workflow or follow the development progress.

The project is still in active development, but it already has working ROM output, documentation, examples and ongoing feature work.

I would be very interested to hear thoughts from the SegaXtreme community, especially from people familiar with 32X development, SH 2 behavior, ROM structure or homebrew tooling.
 
It is under my assumption that the 32x/Saturn compilation process were pretty much identical on the surface. Meaning you can use the same compiler because the raw output file of both ends up being Coff-Sh. But they're also pretty different, if you intend to squeeze all of the power out of both of those platforms. And that's where the similarities for both end. Both have dual SH2's in them, but the 32x's were clocked slightly slower at 23mhtz and the Saturn 28mhtz. The 32x seems like an all around Sega platform, and it totally underrated because it has dual Sh-2(clocked lower at 23mghtz) ,like the Saturn, and the full blown Genesis 7.6 mghtz M68k (the Saturn 's M68EC000 can only run the M68k entire feature set in Supervisor mode) and the Mega Drive's Z80. So you can run every Genesis game on the 32x with a simple change of compilation target....so instead of Coff-Sh, you aim it towards Coff-68k. There's no specific 3D hardware in the 32x, but it has a programmable Frame Buffer...which could be tricky...

...SNIP...

So in other words:
-The 32x's SH-2 behavior is pretty much identical to the Saturn's, except for a slightly lower clock speed
-Its essentially a suped up Mega Drive, with 2 32-bit SH-2 cpus stuck on it
-Programmable Frame Buffer..with some extra coding you can pretty much make it 3D
-2D in nature

....SNIP.,.

What you're doing sounds like a VERY FUN project, and I say go right ahead and finish it......but remember, BASIC is still slower than C.
 
Back
Top