HackerReposA FIELD GUIDE TO OPEN SOURCE
ProSponsor the shelf♧ 0
← Back to top all-time
shish
rosettaboy
C++2021–2023
shish / rosettaboy

rosettaboy

A gameboy emulator in several different languages

6Distinct people
11Mentions
0Explicit recommenders
485GitHub stars
REPOSITORY AT A GLANCE

What to know before exploring

What it is

A gameboy emulator in several different languages

GitHub

Where it is used

No documented product use has been verified yet.

What people are saying

No recommendation phrase was found in the indexed comments.

No classified warning is attached to this page. Read the discussions before treating silence as approval.

Also in these discussions

No other repository is repeatedly linked in the same discussions.

This week on Hacker News

Nov 7–Nov 14 UTC · Direct repository links and separately labeled related project stories. Indexed through 11/14/2026, 1:49:46 PM UTC.

No direct repository links were found in the indexed HN discussions over the past seven days. Older discussions are available below.

Mentions over time

HN mentions by month11 dated mentions

Observed mentions: 2021-10-08 15:57:29 UTC to 2023-09-18 18:56:28 UTC.

01232021-10-01 00:00:00 UTC to 2021-11-01 00:00:00 UTC (exclusive): 1 mentions; 1 submissions, 0 commentsOct 20212021-11-01 00:00:00 UTC to 2021-12-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2021-12-01 00:00:00 UTC to 2022-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2022-01-01 00:00:00 UTC to 2022-02-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2022-02-01 00:00:00 UTC to 2022-03-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2022-03-01 00:00:00 UTC to 2022-04-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2022-04-01 00:00:00 UTC to 2022-05-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2022-05-01 00:00:00 UTC to 2022-06-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2022-06-01 00:00:00 UTC to 2022-07-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2022-07-01 00:00:00 UTC to 2022-08-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2022-08-01 00:00:00 UTC to 2022-09-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2022-09-01 00:00:00 UTC to 2022-10-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 commentsSep 20222022-10-01 00:00:00 UTC to 2022-11-01 00:00:00 UTC (exclusive): 3 mentions; 0 submissions, 3 comments2022-11-01 00:00:00 UTC to 2022-12-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2022-12-01 00:00:00 UTC to 2023-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2023-01-01 00:00:00 UTC to 2023-02-01 00:00:00 UTC (exclusive): 2 mentions; 0 submissions, 2 comments2023-02-01 00:00:00 UTC to 2023-03-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2023-03-01 00:00:00 UTC to 2023-04-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2023-04-01 00:00:00 UTC to 2023-05-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2023-05-01 00:00:00 UTC to 2023-06-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2023-06-01 00:00:00 UTC to 2023-07-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2023-07-01 00:00:00 UTC to 2023-08-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2023-08-01 00:00:00 UTC to 2023-09-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2023-09-01 00:00:00 UTC to 2023-10-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 commentsSep 2023

Counts come from the repository’s dated source evidence. Index cutoff: 2026-11-02 08:16:59 UTC.

View mention counts and date ranges
UTC ranges include their start and exclude their end. Select a period to filter the source evidence.
PeriodStart (UTC)End (exclusive, UTC)MentionsSubmissionsComments
Oct 20212021-10-01 00:00:00 UTC2021-11-01 00:00:00 UTC110
Nov 20212021-11-01 00:00:00 UTC2021-12-01 00:00:00 UTC000
Dec 20212021-12-01 00:00:00 UTC2022-01-01 00:00:00 UTC101
Jan 20222022-01-01 00:00:00 UTC2022-02-01 00:00:00 UTC101
Feb 20222022-02-01 00:00:00 UTC2022-03-01 00:00:00 UTC000
Mar 20222022-03-01 00:00:00 UTC2022-04-01 00:00:00 UTC000
Apr 20222022-04-01 00:00:00 UTC2022-05-01 00:00:00 UTC000
May 20222022-05-01 00:00:00 UTC2022-06-01 00:00:00 UTC000
Jun 20222022-06-01 00:00:00 UTC2022-07-01 00:00:00 UTC000
Jul 20222022-07-01 00:00:00 UTC2022-08-01 00:00:00 UTC000
Aug 20222022-08-01 00:00:00 UTC2022-09-01 00:00:00 UTC000
Sep 20222022-09-01 00:00:00 UTC2022-10-01 00:00:00 UTC000
Oct 20222022-10-01 00:00:00 UTC2022-11-01 00:00:00 UTC303
Nov 20222022-11-01 00:00:00 UTC2022-12-01 00:00:00 UTC000
Dec 20222022-12-01 00:00:00 UTC2023-01-01 00:00:00 UTC101
Jan 20232023-01-01 00:00:00 UTC2023-02-01 00:00:00 UTC202
Feb 20232023-02-01 00:00:00 UTC2023-03-01 00:00:00 UTC000
Mar 20232023-03-01 00:00:00 UTC2023-04-01 00:00:00 UTC000
Apr 20232023-04-01 00:00:00 UTC2023-05-01 00:00:00 UTC000
May 20232023-05-01 00:00:00 UTC2023-06-01 00:00:00 UTC000
Jun 20232023-06-01 00:00:00 UTC2023-07-01 00:00:00 UTC101
Jul 20232023-07-01 00:00:00 UTC2023-08-01 00:00:00 UTC000
Aug 20232023-08-01 00:00:00 UTC2023-09-01 00:00:00 UTC000
Sep 20232023-09-01 00:00:00 UTC2023-10-01 00:00:00 UTC101

What Hacker News says

11 sources
As somebody who has written the same gameboy emulator in C++, Rust, and Zig (as well as C, Go, Nim, PHP, and Python) - I have yet to find a place where language affected emulation correctness. Gameboy audio is kind of a pain in the ass (at least compared to CPU, which is fairly easy, and GPU, which is easy to get "good enough” if you don’t care about things like palette colours being swapped mid-scanline) - and some languages take more or less code to do the same thing (eg languages which allow one block of memory to be interpreted in several different ways concurrently will make the “interpret audio RAM as a bunch of registers” code much shorter with less copying) - but in my case at least, each one of my implementations actually has the same audio distortions, presumably because I’m misreading some part of the hardware spec :P https://g
Read the rest
ithub.com/shish/rosettaboy/ (Also yes, the zig version is currently failing because every time I look at it the build system has had breaking changes...)
In Memory-efficient enum arrays in Zig
Niceness is subjective, but Nim is just as valid an addition to that group. Nim compiles to C and has had an --os=standalone mode for like 10 years from its git history, and as mentioned else-thread (https://news.ycombinator.com/item?id=36506087) can be used for Linux kernel modules. Multiple people have written "stub OSes" in it (https://github.com/dom96/nimkernel & further along https://github.com/khaledh/axiom). While it can use clang as a backend, Nim does not rely upon LLVM support like Zig or Rust (pre-gcc-rust working). Use on embedded devices is fairly popular: https://forum.nim-lang.org/search?q=embedded (or web search). Latency-wise, for a time, video game programming was a perceived "adoption niche" or maybe "hook" for Nim and games often have stringent frame rendering deadlines. If you are interested in video games, you mi
Read the rest
ght appreciate https://github.com/shish/rosettaboy which covers all but Ada in your list with Nim being fastest (on one CPU/version/compiler/etc). Note, however, that cross-PL comparisons are often done by those with much "porting energy" but limited familiarity with any but a few of the PLs. A better way to view it is that "Nim responds well to optimization effort" (like C/Ada/C++/Rust/Zig).
In Ask HN: Why did Nim not catch on like Rust did?
https://github.com/shish/rosettaboy The same gameboy emulator rewritten in C++, Go, Nim, PHP, Cython, Python, Rust, and Zig (and WIP typescript); mostly to teach myself the languages and to compare and contrast their idioms. Also, when taken with a very large grain of salt, usable as a language benchmark (As with all benchmarks, there are lots of caveats - but as far as I’m aware this is unique in being “the same code in multiple languages” and “several thousand lines of code”): $ ./utils/bench.py rs / lto : Emulated 15763 frames in 10.00s (1576fps) cpp / lto : Emulated 14737 frames in 10.00s (1474fps) rs / release: Emulated 13183 frames in 10.00s (1318fps) cpp / release: Emulated 12966 frames in 10.00s (1297fps) zig / release: Emulated 8792 frames in 10.00s (879fps) nim / speed : Emulated 8127 frames in 10.00s (8
Read the rest
12fps) nim / release: Emulated 6161 frames in 10.00s (616fps) cpp / debug : Emulated 5693 frames in 10.00s (569fps) go / release: Emulated 5040 frames in 10.00s (504fps) pxd / release: Emulated 3792 frames in 10.00s (379fps) nim / debug : Emulated 1968 frames in 10.00s (196fps) rs / debug : Emulated 1676 frames in 10.00s (168fps) py / mypyc : Emulated 887 frames in 10.01s (89fps) php / opcache: Emulated 613 frames in 10.01s (61fps) php / release: Emulated 255 frames in 10.01s (25fps) py / release: Emulated 101 frames in 10.06s (10fps) zig / safe : Emulated 40 frames in 10.00s (4fps)
In Ask HN: What have you created that deserves a second chance on HN?
I’ve personally implemented 7 gameboy emulators and I’m half way through my 8th… In my case it’s mostly a fun way to learn a new programming language - an emulator is enough of a “real program” to exercise a load of different aspects of a new language and its standard library to get a feel for how it works, but also small enough that a new implementation can be done in a weekend[0] [0] Assuming you already have the foundational knowledge - my first emulator took a week to get the CPU working and a month for the first game to be playable, only using one old and inaccurate PDF as a reference; now that I know what I’m doing, and now that I’ve found gbdev.io for more accurate docs, it’s much faster. Funnily enough I also ended up creating a tool like the one in this article, logging every action that happens in the CPU or RAM to make sure the
Read the rest
In Gameboy Doctor: debug and fix your gameboy emulator
Checking for my own “benchmark”, a gameboy emulator in several different languages[0]; it’s CPU-bound but across ~3k lines of code, so slightly more representative of real-world apps than a single-function tight-loop microbenchmark: zig: Emulated 600 frames in 0.24s (2521fps) rs: Emulated 600 frames in 0.37s (1626fps) cpp: Emulated 600 frames in 0.40s (1508fps) nim: Emulated 600 frames in 0.44s (1367fps) go: Emulated 600 frames in 1.75s (342fps) php: Emulated 600 frames in 23.74s (25fps) py: Emulated 600 frames in 26.16s (23fps) # PyPy py: Emulated 600 frames in 33.10s (18fps) # 3.11 py: Emulated 600 frames in 61.43s (9fps) # 3.10 Doubling the speed is pretty nice :D Still the slowest out of all implementations though :P [0] https://github.com/shish/rosettaboy EDIT> updated th
Read the rest
e nim compiler flags to build in release mode like most other languages, thanks @plainOldText!
In Python 3.11 is faster than 3.8

MAKE YOURSELF AT HOME

A few shortcuts

/
Search the collection
?
Open this guide
Esc
Close dialogs and navigation

Your saved repositories and interests stay in this browser.