/shuboy





Shuboy is a Gameboy emulator for the Sega 32X. It's a port of an emulator I originally wrote for Windows but never released, although the 32X version has been completely rewritten in SH2 assembly language and highly optimized, so it no longer bears much resemblance with the original code.

For those unfamiliar with the 32X, it was an add-on for the Megadrive (Genesis in the U.S.) which ran in tandem with the Megadrive and contained two Hitachi SuperH-2 (SH2) processors in a master-slave configuration clocked at 23 MHz, 256 kB of RAM, a simple GPU providing a linear framebuffer, and a PWM sound circuit. The really basic "VGA-ish" GPU is a real bottleneck when emulating a tile-based system, since you can't take advantage of the hardware to draw the tiles for you, as could be done e.g. if one was writing an emulator to run on the Gameboy Advance or the Sega Saturn.

A number of things were done to try to squeeze more speed out of the emulator:

Despite all of these optimizations the speed barely reaches playable levels. Though it might be possible to achieve slightly better performance with the current design, better choices would probably be to write a dynarec GB-Z80 emulator instead of the current interpreting core, and/or targeting the Sega Saturn instead of the 32X since the Saturn has the same dual SH2 configuration, meaning that much of the code could be re-used while the PPU emulation could be hardware-accelerated by the Saturn's VDPs.


Files

The archive includes the full source code, which you will have to build yourself using the GNU binutils for SH targets.

Current version