🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
DemoInstallSign in
Socket

github.com/cbott/GoEmulate

Package Overview
Dependencies
Alerts
File Explorer
Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

github.com/cbott/GoEmulate

v0.0.0-20231222185746-dd0d066a6937
Source
Go
Version published
Created
Source

GoEmulate

Game Boy Emulator in Go

GoEmulate is an emulator for the original Game Boy (DMG) written entirely in Go, utilizing the pixel library for graphics and Oto for sound. The goal of the project is to reach basic emulator functionality with minimal code complexity, and very little focus on UI or useability.

Currently no support is planned for GBC/GBA emulation

Note: this is a learning project, and the first emulator I have written. The code was heavily influenced by all the projects listed below as development resources and I encourage you to use them directly.

Features

  • Run most ROM only, MBC1, MBC3, and MBC5 cartridge types that I have tried, though Donky Kong has issues
  • Save RAM to a ".ram" file
  • Optionally skip Boot ROM (default)
  • Save and recall CPU state
  • Speed Up / Fast-Forward

Sample Screenshots:

Pokemon Yellow Tetris

Emulator Controls

KeyAction
XGame Boy "A" button
ZGame Boy "B" button
SGame Boy "Select" button
EnterGame Boy "Start" button
Arrow keysGame Boy Joypad directions
PWrite contents of RAM to file
+Increase emulation speed (Up to 10x)
-Decrease emulation speed
1,2,3Save CPU state 1-3
Shift+1,2,3Recall CPU state 1-3

Setup

Per pixel requirements https://github.com/gopxl/pixel#requirements

sudo apt install libgl1-mesa-dev
sudo apt install xorg-dev

To Do List

  • other cartridge types
  • more unit tests
  • better error handling
  • allow loading files from GUI or similar
  • implement serial

Completed Tasks

  • CPU save states
  • longer compare with goboy
  • access registers by enum
  • window scaling
  • MBC3 cartridge type
  • code cleanup/resolve todos
  • implement sound
  • RAM saving
  • reorganize into packages
  • fix display bug with window over background
  • Speed up
  • allow loading files from cmd line argument

Development Resources

Other emulators used for comparison

Game Boy docs:

FAQs

Package last updated on 22 Dec 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts