drpaneas/libgodc

Go runtime for Dreamcast using gccgo and KOS

C

225

36 commits

updated Jun 22, 2026

See the code

README

libgodc - Go runtime for Sega Dreamcast

libgodc

Pong Breakout Platformer

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 your main.go and other *.go files
godc build
godc run

See the Quick Start Guide for your first program.

Documentation

๐Ÿ“š Full Documentation

Performance

The repo includes tests/bench_architecture.go for measuring runtime behavior on Dreamcast hardware.

BenchmarkWhat it reports
goschedNanoseconds per yield
Buffered channelNanoseconds per buffered operation
Context switchNanoseconds per goroutine switch
Unbuffered channelNanoseconds per roundtrip
Goroutine spawnNanoseconds per spawn/run cycle
GC pauseMicroseconds per forced collection across retained sizes from 32 KB to 1 MB
Memory layoutStack size, context size, header size, and large-object threshold

Run tests/bench_architecture.elf on your hardware for current numbers.

Examples

The examples/ directory contains working programs:

  • hello โ€” Minimal program (debug output)
  • hello_screen โ€” Hello World on screen using BIOS font
  • blue_screen โ€” Minimal graphics
  • input โ€” Controller input
  • goroutines โ€” Concurrent bouncing balls
  • channels โ€” Producer/consumer pattern
  • timer โ€” Frame-rate independent animation
  • bfont โ€” BIOS font rendering
  • filesystem โ€” Directory browser
  • vmu โ€” VMU LCD and buzzer
  • brkout โ€” Breakout clone (GPL v2, port of Jim Ursetto's original)
  • platformer โ€” Side-scrolling platformer
  • pong โ€” Pong clone with 1P/2P mode, particle effects, and AI

License

BSD 3-Clause License. See LICENSE for details.

dreamcast
gamedev
game-development
golang
homebrew
retro-gaming

Contributors

drpaneas

34 commits

claude

1 commits

josegonzalez

1 commits

drpaneas/libgodc

Go runtime for Dreamcast using gccgo and KOS

C

225

36 commits

updated Jun 22, 2026

See the code

README

libgodc - Go runtime for Sega Dreamcast

libgodc

Pong Breakout Platformer

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 your main.go and other *.go files
godc build
godc run

See the Quick Start Guide for your first program.

Documentation

๐Ÿ“š Full Documentation

Performance

The repo includes tests/bench_architecture.go for measuring runtime behavior on Dreamcast hardware.

BenchmarkWhat it reports
goschedNanoseconds per yield
Buffered channelNanoseconds per buffered operation
Context switchNanoseconds per goroutine switch
Unbuffered channelNanoseconds per roundtrip
Goroutine spawnNanoseconds per spawn/run cycle
GC pauseMicroseconds per forced collection across retained sizes from 32 KB to 1 MB
Memory layoutStack size, context size, header size, and large-object threshold

Run tests/bench_architecture.elf on your hardware for current numbers.

Examples

The examples/ directory contains working programs:

  • hello โ€” Minimal program (debug output)
  • hello_screen โ€” Hello World on screen using BIOS font
  • blue_screen โ€” Minimal graphics
  • input โ€” Controller input
  • goroutines โ€” Concurrent bouncing balls
  • channels โ€” Producer/consumer pattern
  • timer โ€” Frame-rate independent animation
  • bfont โ€” BIOS font rendering
  • filesystem โ€” Directory browser
  • vmu โ€” VMU LCD and buzzer
  • brkout โ€” Breakout clone (GPL v2, port of Jim Ursetto's original)
  • platformer โ€” Side-scrolling platformer
  • pong โ€” Pong clone with 1P/2P mode, particle effects, and AI

License

BSD 3-Clause License. See LICENSE for details.

dreamcast
gamedev
game-development
golang
homebrew
retro-gaming

Contributors

drpaneas

34 commits

claude

1 commits

josegonzalez

1 commits

Languages

C

67.1%

Go

26.0%

Assembly

5.1%

Makefile

1.8%