5/17/2025 at 3:06:23 PM
It's very impressive to see "realistic" graphics on the N64. The demo reminds me of "ICO" for the PS2.I've always wondered if it would be possible to create an SDK to abstract the N64 graphics hardware and expose some modern primitives, lighting, shading, tools to bake lighting as this demo does, etc. The N64 has some pretty unique hardware for its generation, more details on the hardware are here on Copetti.org:
by accrual
5/17/2025 at 6:00:59 PM
Note that the N64 was designed by SGI, And seeing as how influential SGI was for 3d graphics, I sort of assume the reverse, that the n64 probably has the most standard hardware of it's generation. I would be vaguely surprised if there was not an opengl library for it.However there is a large caveat, 1. you have to think of the system as a graphics card with a cpu bolted on. and 2. the graphics system is directly exposed.
Graphics chip architecture ends up being a ugly hateful incompatible mess, and as such the vendors of said accelerators generally tend to avoid publishing reference documents for them, preferring to publish intermediate API's instead. things like OpenGL, DirectX, CUDA, Vulcan, mainly so that under the hood they can keep them an incompatible mess(if you never publish a reference, you never have to have hardware backwards compatibility, the up side is they can create novel designs, the down side is no one can use them directly) so when you do get direct access to them, as in that generation of game console, you sort of instinctively recoil in horror.
footnote on graphics influence: OpenGL came out of SGI and nvidia was founded by ex SGI engineers.
by somat
5/17/2025 at 11:32:36 PM
> that the n64 probably has the most standard hardware of it's generationThe Reality Coprocessor (or RCP) doesn't look like any graphics cards that previously came out of SGI. Despite the marketing, it is not a shrunk down SGI workstation.
It approaches the problem in very different ways is actually more advanced in many ways. SGI workstations had strict fixed function pixel pipelines, but RCP's pixel pipeline is semi-programmable. People often call describe it as "highly configurable" instead of programmable, but it was the start of what lead to modern Pixel Shaders. RCP could do many things in a single-pass which would require multiple passes of blending on a SGI workstation.
And later SGI graphics cards don't seem to have taken advantage of these innovations either. SGI hired a bunch of new engineers (with experience in embedded systems) to create the N64, and then once the project was finished they made them redundant. The new technology created by that team never had a chance to influence the rest of SGI. I get the impression that SGI was afraid such low-cost GPUs would cannibalise their high-end workstation market.
BTW, The console looks most like a shrunk down 90s SGI workstation is actually Sony's Playstation 2. Fixed function pixel pipeline with a huge amount of blending performance to facilitate complex multi-pass blending effects. Though, SGI wouldn't have let programmers have access to the Vector Units and DMAs like Sony did. SGI would have abstracted it all away with OpenGL
------------------
But in a way, you are kind of right. The N64 was the most forwards looking console of that era, and the one that ended up the closest to modern GPUs. Just not for the reason you suggest.
Instead, some of the ex-SGI employees that worked on the N64 created their own company called ArtX. They were originally planning to create a PC graphics card, but ended up with the contract to first create the GameCube for Nintendo (The GameCube design shows clear signs of engineers overcompensating for flaws in the N64 design). Before they could finish, ArtX were bought by ATI becoming ATI's west-coast design division, and the plans for a PC version of that GPU were scrapped.
After finishing the GameCube, that team went on to design the R3xx series of GPUs for ATI (Radeon 9700, etc).
The R3xx is more noteworthy for having a huge influence on Microsoft's DirectX 9.0 standard, which is basically the start of modern GPUs.
So in many ways, the N64 is a direct predecessor to DirectX 9.0.
by phire
5/18/2025 at 11:25:46 AM
> The GameCube design shows clear signs of engineers overcompensating for flaws in the N64 designI haven't programmed for either console. Which features show this in what sense?
by nyanpasu64
5/18/2025 at 11:43:11 PM
Both use a unified memory architecture, where the GPU and CPU share the same pool of memory.On the N64, the CPU always ends up bottlenecked by memory latency. The RAM latency is quite high to start with, your CPU is sitting idle for ~40 cycles if it ever misses the cache, assuming RCP is idle. If RCP is not idle, contention with can sometimes push that well over 150 cycles.
Kaze Emanuar has a bunch of videos (like this one https://www.youtube.com/watch?v=t_rzYnXEQlE) going into detail about this flaw.
The gamecube fixed this flaw in multiple ways. They picked a CPU with a much better cache subsystem. The PowerPC 750 had Multi-way caches instead of a direct mapped, and a quite large L2 cache. Their customisations added special instructions to stream graphics commands without polluting the caches, resulting in way less cache misses.
And when it did cache miss, the latency to main memory is under 20 cycles (despite the Gamecube's CPU running at 5x the clock speed). The engineers picked main memory that was super low latency.
To fix the issue of bus contention, they created a complex bus arbitration scheme and gave CPU reads the highest priority. The gamecube also has much less traffic on the bus to start with, because many components were moved out of the unified memory.
---------------------------
The N64 famously had only 4KB of TMEM (texture memory). Textures had to fit in just 4KB, and to enable mipmapping, they had to fit in half that. This lead to most games on the N64 using very small textures stretched over very large surfaces with bilinear filtering, and kind of gave N64 games a distinctive design language.
Once again, the engineers fixed this flaw in two ways. First, they made TMEM work as a cache, so textures didn't have to fit inside it. Second, they bumped the size of TMEM from 4KB all the way 1MB, which was massive overkill, way bigger than any other GPU of the era. Even today's GPUs only have ~64KB of cache for textures.
---------------------------
The fillrate of the N64 was quite low, especially when using the depth buffer and/or doing blending.
So the Gamecube got a dedicated 2MB of memory (embedded DRAM) for its framebuffer. Now rendering doesn't touch main memory at all. Depthbuffer is now free, no reason to not enable, and blending is more or less free too.
Rasterisation was one of the major causes of bus contention on the N64, so this embedded framebuffer has a side-effect of solving bus contention issues too problem too.
---------------------------
On the N64, the RSP was used for both vertex processing and sound processing. Not exactly a flaw, it saved on hardware. But it did mean any time spent processing sound was time that couldn't be spend rendering graphics.
The gamecube got a dedicated DSP for audio processing. The audio DSP also got its own pool of memory (once again reducing bus contention).
As for vertex processing, that was all moved into fixed function hardware. (There aren't that many GPUs that did transform and lighting in hardware. Earlier GPUs often implemented transform and lighting in DSPs (like the N64's RSP), and the industry were very quickly switching to vertex shaders)
by phire
5/18/2025 at 1:02:25 AM
The RCP was actually two hardware blocks, the RDP which as you say did the fixed function (but very flexible) pixel processing and the RSP which handled command processing and vertex transformation (and audio!).The standard api was pretty much OpenGL, generating in-memory command lists that could be sent to the RSP.
However the RSP was a completely programmable mips processor (with simd instructions in parallel).
One of my favorite tricks in the RDP hardware was it used the parity bits in the rambus memory to store coverage bits for msss
by midnightclubbed
5/18/2025 at 1:34:08 AM
> The standard api was pretty much OpenGLGood point. It is the software APIs are where you do see the strong SGI influence. It's not OpenGL, but it's clearly based on their experience with OpenGL. The resulting API is quite a bit better than other 5th gen consoles.
It's only the hardware (especially RDP) that has little direct connection to other SGI hardware.
by phire
5/18/2025 at 10:25:46 AM
The hardware folks came mostly from outside SGI and were picked especially because they had worked on cheaper systems before.by the-rc
5/18/2025 at 11:21:22 PM
Wasnt GameCube less programmable? I remember reading about most lighting tricks accomplished with texture tricks.by rasz
5/20/2025 at 12:31:51 AM
The gamecube had a completely fixed function vertex pipeline (though, only a few N64 games used custom μcode. For the rest, it might has well been fixed function, and was had less functionality than the gamecube)But per-vertex lighting was kind of old and boring by even 1995, it massively limited your art style. You really wanted per-pixel lighting.
The GameCube's vertex pipeline was very fixed function, but its Pixel pipeline was quite programmable. Far more programmable than the N64. It was basically equivalent to the Xbox's pixel shaders, more advanced in some ways. But because it wasn't exposed with the pixel shader programming model, many people don't consider it to be "programmable" at all.
*And in many ways, you shouldn't consider the xbox and other DirectX 8.0 shaders to be fully programmable. You were limited to 8-16 instructions, with no control flow at all. On the gamecube, instead of 8-16 instructions, you had 16 stages, each being equivalent to an instruction. The N64 had just two stages, which were less flexible. True Fixed function pixel pipelines (like on the PS1, PS2 or Dreamcast) have just a single stage, and very little configurability.
Those "texture tricks" are per-pixel lighting. Many of them aren't possible on fixed function GPUs like the PS2, they required both textures and a reasonably programmable pixel pipeline.
Even today, most per-pixel lighting is done with a mix of textures and shaders.
by phire
5/17/2025 at 7:03:38 PM
Super Mario 64 has been decompiled an ported to GL 1.3.by anthk
5/17/2025 at 5:01:07 PM
Shadow of the Colossus... https://www.youtube.com/watch?v=xMKtYM8AzC8by heraldgeezer
5/17/2025 at 7:18:46 PM
That is very impressive for a PS2 game.by rightbyte
5/17/2025 at 7:44:13 PM
And a sequel (prequel?) to ICO, from the same devsby HideousKojima