I am the author of the bsnes and higan emulators. These are solo projects that comprise over half a million lines of code.
bsnes started in 2004 as a Super Nintendo emulator with the goal of
being as perfect as humanly possible, and over time grew to emulate many
more systems. The name no longer fitting, it was renamed to higan in
higan currently emulates the NES, Famicom Disk System, SNES, Super
Game Boy, Game Boy + Color, Game Boy Advance + Player, SG-1000, SC-3000,
Master System, Game Gear, Genesis, Sega CD, Turbografx-16, Supergrafx,
MSX, MSX2, ColecoVision, Neo Geo Pocket + Color, and the WonderSwan +
Color. PC Engine CD support is currently underway.
The goal of higan is different from other emulators: rather than
focusing on playing games, it is meant to document the functionality and
edge cases of the original hardware, with code that is as clean and
easy-to-read as possible. I believe I've pioneered several methods for
this, including the use of cooperat…
If you've ever played through The Legend of Zelda: A Link to the
Past, or Pokemon Red and Blue, you may've come across the eponymous
I recall this didn't make a lot of sense to me, but I mostly just went with it.
experienced a summer in Japan, it has suddenly made sense to me. In
Japan, the telltale sign that summer has officially begun is hearing the
annual cries of cicadas. You can hear the sounds in just about any
anime series as well. It's extremely loud and constant for several weeks
into summer. To Japan, the sound is endearing.
once above ground, have a very short 1-2 week lifespan, and a favorite
passtime here is catching these bugs in nets to place inside jars.
this isn't nearly as much of a thing in in the west. But I suppose
there was no easy way to translate this concept, and so it was just kept
in the games as-is.
I wanted to comment a bit on this article by Raymond Chen, which states that fibers aren't useful for much anymore, with an example where I feel they still are.
I've found cooperative multi-(threading|tasking) (eg fibers) very useful in writing emulators. I wrote an article on this with code examples here.
One C++ thread on its own is inherently serial. When you have to do multiple discrete things at a time with very coarse synchronization, eg video encoding, then preemptive multi-threading makes sense (eg threads.) And when you have really simple functions to sync/wait or run/yield, then stackless coroutines are very elegant.
But when you want to model three CPU interpreters, a video renderer, and an audio generator, each of which needs to stay synchronized with the other when they communicate tens of millions of times a second, the overhead of using critical sections / semaphores / mutexes / atomic locks / etc grossly outweighs the cost of just doing everything on one thread…