A testbed involving various techniques on the Sega 32X addon for the Genesis/MegaDrive.

A demo in which I showcase a little Sega 32X testbed I've been tinkering with. This demo shows off:
- Communicating with the base MegaDrive unit to load tilemaps into the MegaDrive's graphics chip using the MegaDrive's hardware DMA feature (the series of characters at the top left corner of the screen)
- Blitting sprites into the framebuffer using hand-optimized assembly.
- Writing custom code to arbitrarily scale sprites rendered to the framebuffer using fixed-point integer arithmetic.
The bulk of this involved hand-coded assembly, both in SH2 (for optimized sprite rendering code) and in 68K (for the tilemap loading and DMA code).
In this video I show off running the testbed in the Kega Fusion emulator. I have confirmed that it runs the same on a real physical 32X unit as well.

A song player made to run on the 32X's slave CPU and utilizing the 32X's PWM hardware, with up to 16 voice polyphony and built-in echo filter (0.2ms delay and 50% feedback). As it runs on the slave CPU, it leaves the main CPU completely free to do game logic and rendering - it's also set up to allow the main CPU to send commands using a sort of command buffer to the second CPU, so it can perform tasks on the slave CPU almost like traditional multi-threading.
This song playback engine uses a format heavily based on the MUS format used in the early DOOM titles with a few key differences - a format very similar in concept to MIDI files. A custom commandline utility converts input MIDI files into SONG files, which my content builder utility converts into an extremely compact binary format. This allows composers to work directly in any modern DAW as long as it can export a MIDI file (such as FL Studio).
In this example I converted a MIDI of the Storm Eagle theme from MegaMan X into a SONG and play it using my custom playback engine.