Back to Portfolio

GBee

2025KotlinAndroid StudioRoom DB

GBee is a Game Boy (DMG) and Game Boy Color (CGB) emulator built from scratch in Kotlin for Android devices. The project features a complete emulation core with an SM83 CPU, a FIFO-based PPU, memory management with MBC support, timers, interrupts, DMA, and input handling. The app lets users import .gb and .gbc ROMs, manage a game library, run games with on-screen controls, and configure per-game settings.

Systems Implemented

  • Full emulation core: SM83 CPU with hand-written opcode implementations, FIFO-based PPU, 64 KiB memory mapping, and support for MBC1 and no-MBC cartridges.
  • Modern Android UI: Built with Android Views and ViewBinding, featuring a ROM library, customizable on-screen controls, and a skin system.
  • Local persistence: Room SQLite database for ROM and skin metadata, with ROM files copied to the app's private storage.
  • Advanced configuration: Per-game and global settings for video, audio, control layout, and miscellaneous options.
  • Partial CGB support: Banked WRAM, CGB console detection, and extended palettes (primary emulation target is DMG).

Technical Highlights

  • Hand-written implementation of every SM83 CPU opcode without relying on external emulation libraries.
  • FIFO-based pixel rendering for accurate PPU behavior replication.
  • ROM import system using the Storage Access Framework (SAF), requiring no broad storage permissions.
  • Battery-backed RAM saving for cartridges with save support (.sav files).
  • Emulation core validation using Blargg test ROMs.