News for hackers. Stuff that matters.
Re:SuperRT – Realtime Raytracing on the SNES by MaxBarraclough on Tuesday December 15, 2020 @12:31PM (#25432537)
* on an expansion card.

This is not real-time raytracing on standard SNES hardware, as the title implies.

Still a very impressive project, of course.

Re:SuperRT – Realtime Raytracing on the SNES by nicetryguy on Tuesday December 15, 2020 @01:58PM (#25433648)
> standard SNES hardware

It was not uncommon to have expansion chips: even early games such as Super Mario Kart had a (DSP-1) chip to help with 3d calculations. Later chips such as Super FX 1/2 (Star Fox, Doom, Yoshi's Island), Cx4 (Megaman X2/X3), and SA-1 (Kirby's Super Star, Mario RPG) were used in a significant portion of the library.

The SA-1 was basically an additional 10Mhz SNES CPU (which was a 65c816 at about 4Mhz)

Re:SuperRT – Realtime Raytracing on the SNES by simias on Tuesday December 15, 2020 @07:20PM (#25437336)
You're right but I agree with the parent that it's still a bit misleading. When I saw the video at the top of the article showing a fluid, high framerate realtime video I knew there had to be a trick.

Of course many games shipped with mappers, but if you're willing to put no limit to the amount of hardware you put on said mapper you might as well interface a full high end PC and play Cyberpunk 2077 on "standard SNES hardware".

Basically once you've figured out how to best use the SNES hardware to output fullscreen, decent FPS video from the cartridge port to the TV you can do whatever you want.

It's still a very cool hack but I was hoping for some ultra-optimized software-only SNES raytracer when I read the title.

Re:SuperRT – Realtime Raytracing on the SNES by nicetryguy on Wednesday December 16, 2020 @12:48PM (#25445696)
> What I wanted to try and do was something akin to the Super FX chip used in titles such as Star Fox, where the SNES runs the game logic and hands off a scene description to a chip in the cartridge to generate the visuals.

Bruh. It's in the third paragraph.

> Of course many games shipped with mappers

No. You're thinking of the NES. The SNES handled memory mapping natively. The SNES chips had specific calculation functions, or ended up being co-processors, or both.

> It's still a very cool hack but I was hoping for some ultra-optimized software-only SNES raytracer when I read the title.

Not even the SNES games in the 90s did 3d without an expansion chip. You can't do any raytracing, or any 3d for that matter (without SEVERE compromises) with 3.5 Mhz.

If you read the article, the guy designed his own 3 core chip at 50Mhz... Yes it's more powerful than any chip that was in an SNES, but, it's not entirely period-incorrect.

Re:SuperRT – Realtime Raytracing on the SNES by ivanbakel on Tuesday December 15, 2020 @12:59PM (#25432896)
>This is not real-time raytracing on standard SNES hardware, as the title implies.

I'm not sure the title implies that. Performant raytracing on SNES hardware would be (to my understanding) pure magic - SNES modes may have been good, but none of them were that good. Just reimplementing raytracing in software on a SNES would also not really be that interesting technically. It can already do any kind of calculation, if slowly.

Expansion cards are established ways to improve the SNES's hardware capabilities, as many cartridges did, especially toward the end of the console's lifetime. It's not dishonest to describe using one as doing something "on the SNES" - especially when part of the writeup is about technical challenges interfacing the expansion chip with the actual console.

Re:SuperRT – Realtime Raytracing on the SNES by kbenson on Tuesday December 15, 2020 @01:24PM (#25433196)
It sort of is. The SNES was sold as a specific unit with specific licensed cartridges, and has a well known set of expansion chops shipped in cartridges. I think it's pretty well understood that because of this when someone says "on the SNES" they mean using the existing hardware, possibly plus existing chips shipped at the time. The idea conveyed is that this could have been done at the time if only the expertise and effort were put into it.

Sort of like the Commodore demo scene. What they can accomplish with the original hardware is amazing. If they were relying on additional hardware to do so, it's less interesting (but may still be interesting, and an accomplishment, as this is).

A more accurate title based on how people might think of this might be "SuperRT – Hacking SNES hardware to support realtime raytracing" (and even then you're going to get people assuming it's all original hardware).

Re:SuperRT – Realtime Raytracing on the SNES by gecko on Tuesday December 15, 2020 @02:16PM (#25433873)
The SNES, unlike e.g. the Genesis, had a really heavy history of using add-on chips on carts. In fact, its entire architecture was very specifically designed to permit and encourage this, which is why e.g. the Genesis 32X had to intercept the video out port on the Genesis, but Super Nintendo carts could just bolt-on a SuperFX/Cx3/SA-1/what-have-you and go about their merry way. (Even the the unreleased Nintendo PlayStation would have been able to directly interface with the existing hardware, not do the 32X route of video interception.)

Where you may be making a valid point is that I don't know how many people outside the dev scene know how common cart-based extra CPUs were. But doing this feels entirely in the spirit of how development on the SNES actually worked, even at the time--and as someone who's done some SNES development work, I knew from the headline alone roughly how it would necessarily be implemented. The closest analog I can think of would be like seeing a blog post, "calling native Win32 from pure JavaScript," and then being disappointed that ffi was involved. That's literally the only way it could possibly work in the first place, so of course that's what it is going to have to be about.

Re:SuperRT – Realtime Raytracing on the SNES by wk_end on Tuesday December 15, 2020 @05:26PM (#25436078)
I don't think the SNES actually had anything in its design that made extensibility easier on it than the Genesis.

This and the Super FX - not to mention the Sega CD or the Sega SVP used in Virtua Racing - etc. all just uploaded video data via the cartridge port and blitted it to the screen console-side.

The only reason the 32X needed to do the weird video interception kludge was to get around the Genesis' poor colour depth, and exactly the same thing would be needed if you wanted to do that on the SNES (the SNES had less of a need for that, but...)

Re:SuperRT – Realtime Raytracing on the SNES by frostburg on Tuesday December 15, 2020 @08:18PM (#25437834)
Somewhat strangely, a single shogi game used a 32bit 21mhz ARM cpu (significantly more powerful than the baseline SNES hardware) to run the AI on. A large enough number of those in parallel could possibly display a low res real time raytraced scene decently.
Re:SuperRT – Realtime Raytracing on the SNES by mrlala on Tuesday December 15, 2020 @02:38PM (#25434103)
>I'm not sure the title implies that

Sure it does.. it says "Realtime Raytracing on the SNES". To any normal person "SNES" means a super nintendo you would have at home.. not one that has expansion cards etc.

Anyway cool project but the title is indeed a bit misleading.

Re:SuperRT – Realtime Raytracing on the SNES by aeturnum on Tuesday December 15, 2020 @05:53PM (#25436440)
As I understand it, if the OP put their chips and wires into a SNES cartridge, you could take that cartridge, plug it in, and you would see their ray tracing demo on your stock SNES.

This is just like Nintendo adding their own co-processors over the lifetime of the system, albeit with more advanced technology. If Mario Kart is running on the SNES, so is this.

Re:SuperRT – Realtime Raytracing on the SNES by Jetrel on Tuesday December 15, 2020 @08:34PM (#25437957)
Perhaps one way to put it:

You couldn't download this demo into a ROM image and run it on an emulator. To make it run, you'd have to beg the author of the emulator to actually support your chip.

This is more than a silly, pedantic distinction; emulators are probably the way that >95% of the current SNES playerbase runs the software, and they're likely to remain that way … forever? I don't see the interest in running SNES games ever really going away, since they're fun in a timeless way (like classic books/film), so emulators that support it are likely to stick around for several centuries, barring civilizational collapse. Actual hardware's pretty close to dying out (the recent "SNES Classic" physical devices, afaik, are just neatly packaged emulators).

So I think it really does matter whether it runs in an emulator or not.

(Not to diminish the fairly awesome technical prowess of this hack)

Re:SuperRT – Realtime Raytracing on the SNES by Kranar on Tuesday December 15, 2020 @10:11PM (#25438610)
That's true of probably 90% of ROM images though. To get most SNES ROMs to work you need to not only emulate the SNES console itself but also emulate the individual game's chipset. Most SNES games use one of the following expansion chipsets:

https://en.wikipedia.org/wiki/List_of_Super_NES_enhancement_...

Many SNES games include one-off chipsets that common SNES emulators implement as well; for example just something simple like saving your game can't be done on an SNES and needs an expansion chip.

Re:SuperRT – Realtime Raytracing on the SNES by aeturnum on Wednesday December 16, 2020 @02:23PM (#25447213)
> So I think it really does matter whether it runs in an emulator or not.

If you were to write a SNES emulator that only emulated the console itself, it would not be able to run the many SNES games that use addon chips. SNES emulators include code that emulate the addon chips originally contained in the cartridges[1].

So, I think your test is a false one. Games run in the emulator because the emulator added emulation for the chips in the game. This game cartridge would also run on a SNES emulator if you emulated its chips.

[1] Code to emulate the behavior of the DSP chip in Super Mario Kart (among many others): https://github.com/bsnes-emu/bsnes/tree/master/bsnes/sfc/dsp

Re:SuperRT – Realtime Raytracing on the SNES by Kranar on Tuesday December 15, 2020 @05:24PM (#25436050)
The title is no more deceptive for using an expansion chip than a game like Mario Kart is deceptive for calling itself an SNES game even though it also used an expansion chip.

Almost any popular SNES game you can think of came with extra technology included in the cartridge and commercials often bragged about it, like the SuperFX chip used by Star Fox.

Heck if it weren't for expansion chips, you wouldn't even be able to play Super Mario World or Zelda, since the SNES had no persistent storage, all save games were stored physically on the cartridge itself.

Re:SuperRT – Realtime Raytracing on the SNES by Jarolis on Tuesday December 15, 2020 @08:35PM (#25437962)
I'm confused. Did you really think somebody found a way to do real-time raytracing on a stock SNES? I saw the title and the first thing I thought is "It's not possible, so clearly they did some black magic fuckery to subvert the system's limitations". I wasn't disappointed either, because it's impressive what he managed to do. Maybe try not to take every title completely literally? And maybe try a little bit harder to appreciate people's creativity and hard work?
Re:SuperRT – Realtime Raytracing on the SNES by yaseer on Tuesday December 15, 2020 @04:55PM (#25435719)
I don't think it's misleading, given the SNES history. For me the SNES was famous for its expansion chips - I immediately assumed one like the super fx chip that gave it 3d graphics.

The title may be skewed towards an audience that knows slightly obscure details of SNES history, rather than misleading the general audience.

Re:SuperRT – Realtime Raytracing on the SNES by Igelau on Tuesday December 15, 2020 @06:12PM (#25436675)
I'm guessing the division comes down to generational ignorance. Commenters on both the oldest fringe and the younger half of the age curve aren't going to remember the big deal Nintendo made about these chips.
Re:SuperRT – Realtime Raytracing on the SNES by wan23 on Tuesday December 15, 2020 @03:36PM (#25434906)
The expansion chips were in the game cartridges, though. This article is talking about how you could potentially make a game cart that you could plug into an SNES as normal and have it play with real time raytracing.
Re:SuperRT – Realtime Raytracing on the SNES by rzzzt on Tuesday December 15, 2020 @12:35PM (#25432577)
In mice!

Is Star Fox with the Super FX chip also considered cheating?

Re:SuperRT – Realtime Raytracing on the SNES by puppable on Tuesday December 15, 2020 @03:25PM (#25434764)
Well, if you're familiar with SNES stuff, you'll recognize "SuperRT" as a reference to the SuperFX chip, which pretty much did a similar thing for 3D rendering on the SNES in its day. That gave it away to me from the start.
Re:SuperRT – Realtime Raytracing on the SNES by r3nruturnEr on Tuesday December 15, 2020 @12:54PM (#25432823)
Where in the title does it say that it's a standard SNES?
Re:SuperRT – Realtime Raytracing on the SNES by dehrmann on Wednesday December 16, 2020 @01:10AM (#25439626)
I assume you can pipe in almost and video you want (with framerate, resolution, and color constraints) through whatever interface the Super FX uses?
Re:SuperRT – Realtime Raytracing on the SNES by rhacker on Tuesday December 15, 2020 @01:11PM (#25433051)
Yes I was thinking about that too, it's more like using the SNES itself as a video adapter.
Re:SuperRT – Realtime Raytracing on the SNES by bri3d on Tuesday December 15, 2020 @01:16PM (#25433117)
I find this kind of dismissiveness boring to start with.

But even beyond that, this isn't the case - the core logic for scene creation runs on the SNES and then the instruction opcodes are shipped to the expansion chip. So it's a GPU for the SNES, and a perfect analog to the SuperFX chip from which it takes its name.

A far cry from simply "using the SNES as a video adapter" as the full SNES hardware is still running the "game logic" to accept input and set up the scene.

Re:SuperRT – Realtime Raytracing on the SNES by mrlala on Tuesday December 15, 2020 @02:41PM (#25434140)
I mean ok but then it should be like "Building an external GPU for the SNES".. people are being "dismissive" because of the title's initial expectation- that it was done on a vanilla SNES that you may have laying around at home.

It's all about expectations...

Re:SuperRT – Realtime Raytracing on the SNES by smrq on Tuesday December 15, 2020 @03:04PM (#25434455)
The SNES is totally unmodified. Apart from the fact that what should be housed in a cartridge is instead exploded across breadboards, nothing here is anything but vanilla by SNES standards.
Re:SuperRT – Realtime Raytracing on the SNES by Kranar on Tuesday December 15, 2020 @05:28PM (#25436114)
There is no such thing as a game that runs on a vanilla SNES. Every SNES game comes in a cartridge that includes additional technology built into it. You can take the technology that the author created, package it up into a cartridge and plug it into a vanilla SNES as would be required by any other SNES game.

The inherent limitations of an SNES cartridge are the power consumption (although some cartridges actually included batteries) and the memory bandwidth (it's a 16 bit system so the cartridges have 16 pins).

Re:SuperRT – Realtime Raytracing on the SNES by rhacker on Tuesday December 15, 2020 @01:45PM (#25433483)
Ok that makes more sense, so in theory a GPU for the SNES.
Re:SuperRT – Realtime Raytracing on the SNES by lostgame on Tuesday December 15, 2020 @04:43PM (#25435608)
The title clearly does imply something like a SuperFX chip, given its name?