Libgodc: Write Go Programs for Sega Dreamcast

https://news.ycombinator.com/rss Hits: 14
Summary

libgodc - Go runtime for Sega Dreamcast Replaces the standard Go runtime with one designed for the Dreamcast's constraints: memory 16MB RAM, CPU single-core SH-4, no operating system. Provides garbage collection, goroutines, channels, and the core runtime functions. Quick Start Prerequisites: Go 1.25.3+, make , and git must be installed. go install github.com/drpaneas/godc@latest godc setup godc doctor # to check (optional) Note: The godc CLI tool is a separate project that handles toolchain setup and builds. Create and run a project: mkdir myproject && cd myproject godc init # write you main.go and other *.go files godc build godc run See the Quick Start Guide for your first program. Documentation ๐Ÿ“š Full Documentation Performance Measured on real hardware (SH-4 @ 200MHz): Operation Time Gosched yield ~120 ns Allocation ~186 ns Buffered channel ~1.8 ฮผs Context switch ~6.4 ฮผs Unbuffered channel ~13 ฮผs Goroutine spawn ~31 ฮผs GC pause 72 ฮผs - 6 ms Examples The examples/ directory contains working programs: hello โ€” Minimal program (debug output) โ€” Minimal program (debug output) hello_screen โ€” Hello World on screen using BIOS font โ€” Hello World on screen using BIOS font blue_screen โ€” Minimal graphics โ€” Minimal graphics input โ€” Controller input โ€” Controller input goroutines โ€” Concurrent bouncing balls โ€” Concurrent bouncing balls channels โ€” Producer/consumer pattern โ€” Producer/consumer pattern timer โ€” Frame-rate independent animation โ€” Frame-rate independent animation bfont โ€” BIOS font rendering โ€” BIOS font rendering filesystem โ€” Directory browser โ€” Directory browser vmu โ€” VMU LCD and buzzer โ€” VMU LCD and buzzer brkout โ€” Breakout clone (GPL v2, port of Jim Ursetto's original) โ€” Breakout clone (GPL v2, port of Jim Ursetto's original) pong โ€” Pong clone with 1P/2P mode, particle effects, and AI License BSD 3-Clause License. See LICENSE for details.

First seen: 2025-12-29 15:00

Last seen: 2025-12-30 04:02