What does HackerNews think of binjgb?

Gameboy emulator implemented in C, that also runs in the browser

Language: C

#8 in Emulator
Big fan of this author's work.

They have a Gameboy emulator written in C, which can be compiled to WASM and run in the browser.

https://github.com/binji/binjgb

I learned a lot from the code.

Also I love this project with a bunch of demos in hand-written WebAssembly Text (WAT) format, which is like low-level Lisp that works only with raw memory, numbers, and minimal syntax.

https://github.com/binji/raw-wasm

Then I discovered the same author is quite active in the WebAssembly ecosystem, including specs and tooling. Fascinating stuff!

https://github.com/WebAssembly/spec

https://github.com/WebAssembly/wabt

A few that come to mind..

Hand-written compiler for WebAssembly Text format to binary - https://raw.githubusercontent.com/stagas/wat-compiler/main/s...

Gameboy emulator implemented in C, that also runs in the browser - https://github.com/binji/binjgb

QuickJS Javascript Engine - https://github.com/bellard/quickjs

The TypeScript language and compiler - https://github.com/microsoft/TypeScript

Recently I fell into a wormhole, or rather time sink, playing with a Gameboy emulator that runs in the browser.

https://github.com/binji/binjgb

There's something so satisfying about a virtual machine that fits in a ~106K WASM file, that can play hundreds of classic games like Teris and Super Mario Bros (via ROM collections on Internet Archive). I don't usually play games, but this emulator is so cute and fun, I keep coming back to waste time on it.

Actually, PICO-8 was the last time I felt this kind of child-like joy about a computer.

I get a similar feeling from this Infinite Mac project.

https://github.com/mihaip/infinite-mac

It's so pleasing to see a running Macintosh in the browser. That interface feels like an old friend. The underlying VM, BasiliskII, is a little less than 1MB WASM file. Amazing!

From the entertaining article, I learned about "retrocomputing". Now I know, that's what I'm into, haha. I especially like it when it's virtualized - like a microcosmos.

You can play my favorite arcade game ever in a wasm gameboy emulator (credit goes to Ben Smith of Google: https://github.com/binji/binjgb) in a web-based OS I've been working on for 5 years. This is known to work in current Chrome and Firefox. Keyboard game controls: 'w'=up 'a'=left 's'=down 'd'=right '.'=A ','=B space=start enter=select. Also, standard (17 button, 4 axis) USB gamepads should "just work" via plug'n'play.

Go to this link to test it out:

https://linuxontheweb.org/desk?desk_init=bHMgL3B1YjtvcGVuIEF...

The argument in the URL is the base64 encoding of an initialization script that is being passed to the desktop environment. Going to the link in current Edge should just open the "Arcade" app, with nothing else happening.

You should be able to drag-n-drop ".gb" or ".nes" ROM game files from your native desktop right onto the Arcade app window, and it should just start playing. You can also just drop them onto the web desktop to save them there, then just double-click them when you want to play. That way, the file is kept in the site's local storage.

Learn more about how to use the web-based OS here: https://www.youtube.com/channel/UCZkhPP7327fXcSsjD_lt67w

If anybody has wasm-capable Edge or Safari, let me know if you can play the game.

As long as we're linking personal GB emulators... :-)

Here's mine, written as one file of less than 5000 lines of C: https://github.com/binji/binjgb. It's very accurate, based on few of the most commonly used GB emulator test suites (Blargg's and Gekkio's).

Interestingly, there are still many questions about the specific timings of the Gameboy PPU and APU. An interesting case pointed about by LIJI128 is that no accurate emulator can run Pinball Deluxe; they all crash in some way: https://www.reddit.com/r/EmuDev/comments/4n71ea/gb_pinball_d....