Scott Hanselman

CoreBoy is a cross platform GameBoy Emulator written in C# that even does ASCII

April 24, 2020 Comment on this post [11] Posted in DotNetCore | Gaming | Open Source
Sponsored By

.NET and C# are great languages for programming emulators. Specifically retrogaming and retroarcade emulators. In fact, there's a long history of emulators written in C#. Here's just a few.

Today, David Whitney is deep into writing CoreBoy, a GameBoy Emulator written in C# and .NET Core, using WinForms, and I also spy the Avalonia cross-platform open source WPF-like framework. Head over to and give the gent a STAR. It even has a headless mode and you could use it as a Library in your own software. Who doesn't want a GameBoy library in their app?

I cloned and built it with Core in just a few minutes. Lovely. I enjoy a clean codebase. Assuming you have a backup of one of the many physical GameBoy games you own like me, you can load a binary dump in CoreBoy as a *.gb or *.gbc file and you'll get something this:

CoreBoy - Zelda Link's Awakening


Sweet! Sure it's a little buggy and slow but figuring these things out is the fun of it all! I love that David Whitney is taking us on this journey with him.

There's even already a MonoGame-based graphics surface using DesktopGL and "nilllzz" has it running on Ubuntu!

GameBoy Emulator in C# running on Ubuntu using MonoGame

Emulators are always fun projects to read and learn from. Here, David has a clear separation of concerns between the emulator (handling the CPU, loading instructions, etc.) and the graphics surface that is ultimately responsible for putting pixels on screen.

It looks like he hasn't got it working yet (some issues with command line parsing), but in a few minutes with a little hard-coding I was able to switch to ASCII mode with David's SillyAsciiArtCreator that takes a Pixel and RGB value and maps it to ASCII art that looks awesome in the Windows Terminal.

Zelda in a GameBoy Emulator as ASCII Art

Which is kind of awesome. Why would you do this? BECAUSE YOU CAN

Zelda in a GameBoy Emulator as ASCII Art

I look forward to seeing what comes of this cool new emulator and I'll be reading its code in more detail in the weeks to come! Great stuff, David!

Sponsor: Couchbase gives developers the power of SQL with the flexibility of JSON. Start using it today for free with technologies including Kubernetes, Java, .NET, JavaScript, Go, and Python.

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook twitter subscribe
About   Newsletter
Hosting By
Hosted in an Azure App Service
April 27, 2020 10:01
How good is its sound quality? Is it on par with No$GBA? Or does it get as good as VirtualBoyAdvance?
April 27, 2020 14:37
Good to know about this platform. I hope that it will help developers like us.
April 27, 2020 16:03
Good project! Will definitely take a look at it. Wondering if it is possible to compile this into WebAssembly and run it in the browser?
April 27, 2020 17:46
Amazing project! It would be really amazing to follow this more closely. I will definitely keep an eye out for it. Thank you for sharing Scott!
April 27, 2020 22:23
Thanks for sharing this. I love emulators and moreso emulators written in .NET :D
April 29, 2020 12:32
Amazing emulator Thanks so Much. I share That
April 29, 2020 17:37
Credit where credit is due, emulator code is nearly certainly from a C language based emulator from the 1990s.

April 30, 2020 19:27
Very cool project. I briefly looked into code. I expected much more code to accomplish this!
May 04, 2020 14:30
Thank you for your sharing.
May 04, 2020 20:37
I'd also include a@ - a really good spectrum emulator written in C#! Spectrums rock!
May 04, 2020 20:39
I'd also include Zero - a really good spectrum emulator written in C#! Spectrums rock!

Comments are closed.

Disclaimer: The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.