Skip to content

v1.2.3b

Latest

Choose a tag to compare

@Mr-PauI Mr-PauI released this 18 Jan 14:18

The second official release version of Walnut-CGB. Walnut-CGB is a single file header Game Boy/Gameboy Color emulator library based off of the more portable Peanut-GB.

This release includes a full reimplementation of the CPU core to support native 16-bit and 32-bit operations, processing instructions using a dual-fetch chained architecture. This is a significant architectural departure from the original Peanut-GB opcode dispatch model and is designed to improve performance on 16 and 32-bit embedded targets.

See Migrating from Peanut-GB for porting details.

Features

  • Original DMG (4-color) operation supported (CGB is default)
  • RGB565 color output for CGB (little-endian default, big-endian optional)
  • Alignment-aware 32-bit reads/writes (default)
  • Alignment-aware 16-bit reads (used for dual instruction fetch) (default)
  • Arduino example
  • SDL2 example with Super Game Boy and Game Boy Color style color mapping
  • Super Game Boy palette approximation database (./extras/sgb.h, RGB888)
  • Game Boy Color palette approximation database (./extras/cgb.h, RGB888) ← (adjust filename if needed)
  • Windows binary included (Debug build)

Notable changes from 1.2.0

  • Fixed bug in sprite sorting, was cause of SDL2 demo crashes
  • Fixed bug in color conversion (thanks Joshua2580 for discovery)

Known issues / Work in progress

  • examples/benchmark still needs to be updated from the Peanut-GB example
  • Further DMA optimizations identified but not yet implemented
  • Alignment-aware 16-bit writes needed for 16-bit opcodes and optional 16-bit DMA modes
  • Experimental 16-bit opcode:
    • These provide measurable gains on ESP32-S3 hardware but currently reduce compatibility and need further refinement