Obituary – Near

Hi there community,

last Sunday a tragedy befell the emulation community, when Near tragically took their own life. While we feel Near needs no introduction, we feel it is only right to let people know of the extent to which Near’s work laid the foundational framework of Libretro/RetroArch, and what other great projects they worked on, including of course bsnes (which needs no introduction at this point).

Among Near’s other great accomplishments: libsnes (which later turned into our fork, libretro), libco (a cooperative multi-threading library), Higan (a multi-system emulator), Ares, and various other auxiliary projects.

Out of respect for Near’s untimely passing, we have delayed the release of the next RetroArch by a full week. You won’t be seeing us doing any promotional material or coverage for it until then, and who knows, we might even skip going into it at all. We feel this right now is more important and should get front and center coverage.

We asked three people familiar with Near to provide their own eulogy. Recognize that we speak from the heart and that our purpose in doing this is to pay proper respect and tribute to a great programmer in the emulation scene, the likes of whom we might never get again.

Hunter Kaller

About 15 years ago, I was just getting into open-source software and the Super Nintendo was always my favorite console, so I was excited to find a relatively new open-source emulator that ran even the weird, unpopular games. The author of the emu had a forum where they posted their releases and all the cool stuff they were working on, and that forum was home to a tight community of other smart, creative folks.

That forum was the old bboard, and that emu author was, of course, Near. As we all know, Near was extremely prolific, driven in their pursuit of perfection, and generous enough to share their many accomplishments with the world at large. In addition to their work on bsnes, Near also documented their relentless reverse engineering escapades on the bboard, along with their efforts to understand the entirety of as many facets of software development as they could, top to bottom. The bboard was home to some pretty epic (in the classical sense) threads in which Near would dive head-first into topics–like the fundamentals of signal resampling–that most of us outside of graduate-level computer engineering programs consider black magic.

It is no exaggeration when I say: without Near and the community they cultivated on the bboard, there would be no libretro and no RetroArch.

Libsnes (which would serve as the basis for libretro) was Near’s design to decouple their backend code from the endless frustrations of frontend coding. The bboard is where Themaister first developed and released SSNES, which would become RetroArch. They met Twinaphex while attempting to port bsnes to the PS3 via libsnes+SSNES on Near’s behalf. To this day, many of our cores depend on Near’s libco cooperative threading library. I could go on.

With that said, we did not always agree or even get along. Near’s perfectionism frequently put them at loggerheads with individuals who felt some thing or other was already “good enough” (that is basically the tl;dr of how libsnes became libretro), and, on a personal level, I do not presume Near considered me a “friend” (or even thought of me much at all, for better or for worse). Like most of the people reading this, I suspect Near had a much larger effect on my life than I had on theirs.

Nevertheless, I hope Near understood the immense positive effect they had on my life and the lives of countless other individuals, not just through their numerous accomplishments but also as a compassionate and insightful human being. The world is a less-interesting place now, without Near.

Alcaro

We were never the closest friends; I was around for a while, but I was always more interested in bsnes than you, Near.

I now realize I was wrong. Too many open source maintainers are valued only for their contributions and otherwise taken for granted, leading to tragedies like this.
May you finally have the peace you were denied in life.

Daniel De Matteis

I have been a bsnes fan since the very beginning when it was first announced. I remember running Mega Man X2 on an Pentium 4 PC at the time in 2005 with a premature version of bsnes and feeling that finally there was an emulator that could get the sound exactly right, and it played exactly right. Those are memories and experiences that I will always cherish.

I was not even really involved in programming until around half a decade later. I had a chance meeting with Themaister around 2010 when Near was trying to see if bsnes could run acceptably well on a PlayStation3. This was my first introduction to Near back then as a non-user and to me this meant a lot. We pretty much got stuck at the 50fps mark, but what that chance occurrence did show me was the massive potential of libsnes as an emulation abstraction layer and how easily software could be ported across platforms so effortlessly without having to maintain multiple copies of a codebase per platform. I was sold there and then on the entire potential of libsnes and SSNES. And one thing lead to another.

Fast-forward to 2021 and it’s been well over a decade since the project started and I’ve been running it now for all this time. You now know of libsnes as libretro and SSNES as RetroArch but the core concept has remained fundamentally the same, right down to the same API. Where there was in 2010 only one emulator implemented as a core (bsnes), now there is nearly 200 implementations, and not all of them even emulators. The only credit I can take in this is that I have put an inhuman amount of time in building the road so that people will come with daily maintenance and coordinating of projects so that everything works well within Libretro/RetroArch as an ecosystem. But Near absolutely deserves the credit for coming up with the foundational pillar on which this all stands.

For what it’s worth, I regret that for a long time, we did not see eye to eye, and at one point there was a fair bit of animosity between us. Thankfully in 2017 we were able to shake hands and leave the past for what it was. There were hurt feelings, disgruntlement and disillusion on both sides about the emulation scene, the way it was becoming more commercialized and co-opted by commercial interests [from private correspondences I can confirm this bothered Near deeply too], the sides people took in that while it was happening, and people getting in the middle trying to amplify those grievances and wounds. I apologized then, but I will also apologize in the present for how things went before.

Like indicated earlier, I was a fan of Near’s work before I got involved myself in the scene, and going into this had nothing but the highest admiration and apprecation for Near’s work. Ultimately the last thing I wanted was for there to have been a falling out. I tried reaching out many times before trying to squash this situation since ultimately I regretted that it had come to this and felt it should not be like this. Ultimately without a mediator I was getting nowhere with this.

In 2017, thankfully all of this we were able to put aside forever thanks to the help of a mediator, and both sides assumed good faith from that point forward. I was hugely relieved by this and took this very seriously on my side. I was committed from this point on to show that not only was there always appreciation and respect, but even more importantly, I wanted to show this not in words, but by action. Since then, I worked together with Near on many occasions. This includes involving them in a Eurogamer article about emulation licensing and helping them with license abuses from third parties. Various email correspondences centered around emulation and the libretro project have been exchanged and we had been active supporters of Near’s Patreon. Additionally contributors upstreamed libretro support into bsnes in 2018 sparking various collaborations and friendly terms. Another example is the libretro-backed Parallel RDP project where we encouraged themaister to help integrate it into the N64 emulation in ares for accurate graphics emulation. I am grateful and thankful we were able to do all these things together. To date, my biggest regret is that we had that unfortunate initial falling out in late 2010. But, I am grateful to Near that there was the willingness to leave the past behind in 2017 and start over again. Ultimately, it could have all been so easily avoided and the things that divided us were ultimately so minuscule as to not even matter.

While I won’t profess to be a brilliant coder myself, I do recognize brilliance and potential where I see it. And projects like hiro, libco, and libsnes definitely show that raw genius that was in Near. Hiro for instance was a crossplatform GUI wrapper that would wrap complicated OS-dependent windowing APIs around one common abstract interface. There exist other examples like this but it was well designed and versatile, and used to full effect in Higan/bsnes. I would be remiss not to point out another great invention, libco. It’s a cooperative threading library, very small in size, that allows one to jump from one place to the next without resorting to actual real ‘threading’. Libco’s legacy (and thereby Near’s legacy) lives on in many libretro cores today. And libsnes needs no introduction, it morphed into libretro and has largely stayed fundamentally the same.

Near’s last few projects were equally as important. Ares was a multi-system emulator that covered all sorts of classic game computer and handheld computers from the ’80s to the early ’00s. One contribution that came from us was the aforementioned Parallel RDP Vulkan-powered plugin which would allow fullspeed accurate video emulation of the N64, as well as Parallel RSP. But Near also had spent nearly a decade or more on a translation of the videogame Bahamut Lagoon, which they considered their magnum opus. This was a painstaking work of passion with the kind of attention to detail few other localizations can boast. Near actually started this translation before even creating bsnes itself, as the Bahamut Lagoon translation was the catalyst for bsnes to emerge as a project. Current SNES emulators at the time had a lot of issues that were difficult to work around, with Near preferring a more clean approach without resorting to all the hacks.

I’m afraid it will be highly unlikely we will ever see a programmer as gifted involved in open-source emulation again, certainly not one with as much commitment and passion. Everyone with an appreciation for the Super Nintendo (yes, even Nintendo themselves) owes a huge amount of debt to Near for doing the near impossible in documenting and preserving this system and its back catalogue for all of posterity. It is very rare that you see someone with such selfless commitment dedicating themselves towards fully preserving a system.

Person who wishes to remain anonymous

Near was a very kind and sweet person, who cared for others. They were very talented and was amazing at what they did. I hope that they have found peace.

bsnes HD beta core – Pushing the limits of the SNES! Widescreen and Ultrawide support!

DerKoun shares with us a special new core called bsnes HD beta. This is a cutting edge version of bsnes that is jam packed with enhancement features! Note that many of these enhancement features, such as the widescreen features, might require specific tweaking and finetuning in order for specific games to display right, and some games might just not display right at all with these enabled, so experiment at your own risk.

With this emulator core, emulator developers are moving far beyond the limitations of original hardware and FPGA clones, putting the extra horsepower of modern PCs and cellphones to judicious use.

This core is already available on our buildbot for Windows, Linux and Android, and should be coming to Switch (libnx) soon as well! Note that all these enhancement features operate on the CPU, so the faster your CPU is, the better the results will be.

Changelog (beta 10)

  • Based on latest bsnes (114, 2020-01-09)
  • Experimental libretro core
  • Changed Show Overscan setting, replacing Soft Crop. Changed widescreen values accordingly
  • Corrected widescreen object wrap-around point to 352
  • Changed storage paths from “bsnes” to “bsnes-hd beta”
  • Automated Linux build is now CPU neutral
  • Various minor bsnes-hd specific modifications to GUI
  • Fixed setting Ignore Window Fallback X-Coordinate via settings dialog

Core Options

Let’s explain some of the core options this core provides:

HD Mode 7 Scale

Perform Mode 7 transformations (incl. HDMA) at up to x times the horizontal and vertical resolution.

TIP: HD Mode 7 can be set to 1x scaling aka original resolution, with any combination of perspective correction, widescreen and supersampling.

HD Mode 7 Perspective Correction

Optionally, for games with pseudo 3D perspectives, some limitations of the integer math used by the SNES can be avoided by more aggressive averaging.

This setting also allows you to set the width for the perspective correction.

Auto – Auto detection for perspective correction. Quite primitive implementation, but worked out surprisingly well. Covers “Super Castlevania IV” (tube), “Terranigma” (underworld) and “Final Fantasy III” (credits), but not the “Mohawk & Headphone Jack” title screen (levels are fine).

[On / Auto] Narrow – Fixes black flicker in “Tales of Phantasia” Mode 7

[On / Auto] Wide – Use “wide” when there is no issue.

HD Mode 7 Supersampling

Super sampling can be combined with higher scale factors as a sort of anti-aliasing. Please remember that the CPU load is the product of the two factors.

HD Widescreen

Mode 7 – Disables widescreen for non-Mode 7 scenes (default now), fixing menus and widescreen-incompatible 2D levels with no setting switching during gameplay. The widescreen areas in that case can either be black or adopt the background color.
All – Enables widescreen for both Mode 7 and non-Mode 7 scenes.
None – Disables widescreen for all modes.

HD Mode 7 HD -> SD Mosaic

1x scale : Mosaic mode for HD Mode 7, using 1x scale, providing a good compromise between SD Mode 7 and no Mosaic at all, and also allowing widescreen, e.g. for the “Terranigma” underworld.

Ignore: – This setting disables mosaic effects for mode 7 scan lines. See top part of screen in the Terranigma safe state. When not checked (i.e. mosaic enabled) lines that have mosaic enabled do not use the HD mode (as the intentional pixelation that is mosaic would negate it anyway), but others still do.

WideScreen Background 1 to 4

To avoid HUDs repeating and other unwanted effects, this setting allows you to disable widescreen for the separate background layers and even just the top or bottom of a layer.

The default for all 4 is “auto horz and vert”, which is a simple auto detection based on the sizes and positions of the backgrounds. This works e.g. for the HUD in “F-Zero” or “Super Mario Kart”. You can also force each one “on” or “off”.

Some games require more complex settings, e.g. “HyperZone”: BG2: “>80”
You can also “disable” any of the 4 background layers entirely.

WideScreen Sprites

Unsafe – This allow sprites to enter widescreen areas further if the game keeps updating them. This will however cause significant artifacts in many games. If ROM-hackers want to discuss optimizing games for this, feel free to contact DerKoun.

Disable entirely – option to sprites, e.g. for screenshots for wallpapers (also see “Ignore Window”)

WideScreen Aspect Ratio

Ability to set the widescreen aspect ratio to a variety of different ratios (16:10, 2:1, 21:9, 16:9, 4:3)

WideScreen Ignore Window

Setting to ignore outside window, allowing for widescreen in Terranigma and Final Fantasy III/VI. Please test any other games that had no widescreen for no obvious reason in the previous beta. This fixes Mode 7 widescreen specifically in the mentioned games and results may vary in other ones for Mode 7, other backgrounds and objects.

Some settings allow for more widescreen e.g. in “Final Fantasy III” (no good results) and ability to disable some shadows or similar effects (for use with layer disable feature below, e.g. for “F-Zero”).

WideScreen Marker

Line – optional markers for the widescreen areas, in the form of lines at configurable translucency. Also sprites can now be clipped at the edges of the widescreen areas.
Darkening – optional markers for the widescreen areas, in the form of darkening at configurable translucency. Also sprites can now be clipped at the edges of the widescreen areas.

HD Background Color Radius

Smooth (true color, high resolution) gradients for color math from fixed color, e.g. for pseudo perspectives. This combines the new true color support and high resolution smoothing of HDMA effects to turn approximations of gradients into real ones. This is noticeable in many games with Mode 7 perspectives, often in the top/distant part, which often fades to black or another color. Enabled by default, on medium setting “4”. (see image: left side before vs. right one with this improvement)

HD Windowing (Experimental)

Smooth (high resolution) Window effects, like shadows or spells. This is considered a preview, as the top and bottom edges of such effects still look SD and therefore stand out. It is disabled (“0”) by default. You can set “1” or higher values to give it a try.

Widescreen patches

No matter the amount of options available, some games will likely require manual patches for the best possible widescreen experience. Fortunately, already talented modders are hard at work at tackling some of the games out there that could really benefit from widescreen resolutions.

If you want to discuss widescreen ROM-hacking please join #widescreen-hacks at the bsnes-hd Discord.

What’s Next

DerKoun says:

Primarily I’m looking into optimizations.

There also some fixes and improvements I want to include, like better HD Window effects.

I’ll also work with the libretro team to improve the libretro core.

SIDENOTE: RetroArch 1.8.4 will be coming out soon. Unlike 1.8.3, it will resemble somewhat more of a maintenance release.