
Show HN: Bsnes, a Super Nintendo Emulator - byuu
https://github.com/byuu/bsnes
======
byuu
bsnes is an SNES emulator I've spent the last 15 years working on.

I'd love some help from anyone who's interested in working on improving the
project with me, so I'm submitting my GitHub project page link here for anyone
interested.

Back in 2004, computers were much slower and so performance was a much larger
concern with emulators. I was worried that many fan translations, ROM hacks,
and homebrew games were depending on bugs in the other emulators to function,
and feared this could lead to a loss of those games in the future, should
emulators one day improve. And so I started bsnes with the goal to writing an
emulator that was as accurate as possible. Needless to say, I underestimated
the complexity by a few orders of magnitude.

In 2010, I led a fundraiser to decap coprocessors inside of game cartridges to
extract their firmware. This allowed bsnes to be the first emulator to reach
100% game compatibility [1]

In arguably the most surreal moment of my life, it turned out that one of
these coprocessors (NEC uPD7720) was used in professor Stephen Hawking's voice
machine. Having written the only emulator for this processor, his assistants
reached out to me and I was able to donate a portion of code to their project,
which was ultimately successful in replacing the original failing voice
machine with a much more portable version. [2]

In 2012, to improve emulation of cartridge PCBs, I started a goal of
purchasing (and reselling after to break even) every SNES game cartridge. I
started with the USA collection (725 games), finished it, moved onto the
Japanese collection (1,450 games), finished that, and now I've been working on
the European collection (540 games.) I've spent around $30,000 and 1200+ hours
working on this goal.

Something I don't like to talk about, but it happened: once a person
graciously lended me 100 PAL games worth around $5,000 - $10,000. It was lost
in the mail. After a long, stressful five-month wait, I reached out to the
media and within a few weeks, the package was recovered, and the games were
analyzed and returned to their owner intact. [3]

A few years back, bsnes grew to emulate dozens of systems, and so I made the
decision to move the multi-system emulation platform to a new project called
higan. [4] This project is likely far too ambitious, but it keeps me occupied.

With bsnes once again a standalone SNES emulator, over the past year I've set
about trying to create an easier to use, friendly emulator that is more
performance oriented. One of the key insights was developing a method of
parallelizing the video rendering in such a way that does not add any input
latency.

This parallel renderer provided for another first: the ability to analyze the
entire screen before rendering the first pixel. A programmer by the name of
DerKoun came along and realized that by interpolating at higher precision the
affine transformation coordinates of the screen, that 256x240-resolution SNES
games could be upscaled to basically any resolution, even 3840x2160. The
results were something no one else believed possible, and it received a good
deal of press as a result.

DerKoun has continued with this project, adding new features to SNES emulation
such as widescreen support, true color gradients (to remove banding from the
system's 15-bit color palette), etc.

Recently, in an effort to try and preserve more history, I've gone back to
emulate the older emulators themselves, so that the oldest fan-made SNES
software can still be played.

It's never been bsnes' goal to be #1, and over the years I've contributed
code, notes, and explanations to basically every known SNES emulator. Both
free software and commercial, both open source and closed. My underlying goal
has always been to improve emulation quality for everyone.

Thanks for reading!

[1] [https://www.tested.com/tech/gaming/44376-16_bit-time-
capsule...](https://www.tested.com/tech/gaming/44376-16_bit-time-capsule-how-
emulator-bsnes-makes-a-case-for-software-preservation/)

[2] [https://www.sfchronicle.com/bayarea/article/The-Silicon-
Vall...](https://www.sfchronicle.com/bayarea/article/The-Silicon-Valley-quest-
to-preserve-Stephen-12759775.php)

[3]
[http://www.nintendolife.com/news/2017/02/usps_recovers_lost_...](http://www.nintendolife.com/news/2017/02/usps_recovers_lost_package_containing_usd10000_in_rare_snes_cartridges)

[4] [https://github.com/byuu/higan](https://github.com/byuu/higan)

[5] [https://arstechnica.com/gaming/2019/04/hd-emulation-mod-
make...](https://arstechnica.com/gaming/2019/04/hd-emulation-mod-makes-
mode-7-snes-games-look-like-new/)

~~~
Porthos9K
I've used this and donated anonymously when I could afford to do so, but I
don't have the coding chops to actually help you out.

