Skip to content

A standard library for Golang based retro console development.

License

Notifications You must be signed in to change notification settings

retroenv/retrogolib

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

97 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RetroGoLib - a Golang library for retro console tooling development

Build status go.dev reference Go Report Card codecov

Installation

go get github.com/retroenv/retrogolib

Requirements:

  • Go 1.22 or later
  • No CGO dependencies

Overview

RetroGoLib is a Golang library designed to simplify the development of tools for retro consoles. It provides a comprehensive set of functionalities for creating emulators, debugging tools, and other retro console utilities, all while maintaining minimal dependencies and focusing on clean, maintainable code.

Key Design Principles

  • Minimal Dependencies: Only one external dependency (ebitengine/purego)
  • CGO-Free: SDL support without CGO for easier cross-compilation
  • Type Safety: Extensive use of Go generics for type-safe APIs
  • Thread Safety: CPU implementations with proper synchronization patterns
  • Testing: Comprehensive test coverage with consistent assertion patterns

Supported Systems

CPUs

  • 6502: Full instruction set with accurate timing
  • Chip-8: Complete virtual machine implementation

Consoles

  • NES (Nintendo Entertainment System): Cartridge formats, memory mapping

Features

CPU Emulation

  • 6502 CPU: Full instruction set with memory management, stack operations, and interrupt support
  • Chip-8 Virtual CPU: Complete virtual machine with display, timers, and input handling

System Support

  • NES (Nintendo Entertainment System): Cartridge handling, memory mapping, and parameter conversion

Package Overview

├─ app              common application/service helpers
├─ arch/cpu/chip8   Chip-8 virtual CPU support
├─ arch/cpu/m6502   6502 CPU support
├─ arch/system/nes  NES common types and helpers
├─ assert           test assertion helpers
├─ buildinfo        show version info that is embedded in the binary
├─ gui              GUI support - SDL without need for CGO
├─ input            hardware controller/keyboard helpers
├─ log              fast and structured logging based on slog
├─ set              generic set data structure with comprehensive operations

API Documentation

For detailed API documentation, visit pkg.go.dev.

License

This project is licensed under the MIT License - see the LICENSE file for details.

About

A standard library for Golang based retro console development.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

Packages

No packages published