go get github.com/retroenv/retrogolib
Requirements:
- Go 1.22 or later
- No CGO dependencies
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.
- 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
- 6502: Full instruction set with accurate timing
- Chip-8: Complete virtual machine implementation
- NES (Nintendo Entertainment System): Cartridge formats, memory mapping
- 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
- NES (Nintendo Entertainment System): Cartridge handling, memory mapping, and parameter conversion
├─ 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
For detailed API documentation, visit pkg.go.dev.
This project is licensed under the MIT License - see the LICENSE file for details.