Live data from Hacker News

The DS GPU and its fun quirks

melonds.kuribo64.net

1–10 of 25 posts

Re: The DS GPU and its fun quirks

#4
post #2

Makes me wonder if compute kernels would be a better solution if you're trying to emulate all these rasterizer quirks while being fast enough to be playable.

You need to render a few thousand polygons to a 298x196 buffer. Desmume has a software renderer, and it's more than adequate. The trick is being compatible.

Re: The DS GPU and its fun quirks

#5
The DS "GPU" is indeed very bizarre and shares more in common with the GBA 2D rasterizer than a modern 3D GPU architecture. That it's a scanline renderer that can handle quads directly should be a pretty big tell :)

I implemented a cheap subset of it used in Super Mario 64 DS for my online model viewer ( https://noclip.website/#sm64ds/44;-517.89,899.85,1300.08,0.3... ), but implementing all of the quirks and the weird featuresets might be nearly impossible to do in a modern graphics API. 2D rasterizers don't have to be slow (as SwiftShader and ryg show), and you can get the bizarre conditions exactly correct. I'm not sure what a GPU-based implementation would even add.

EDIT: The math to be able to handle the bilinear quad interpolation on a GPU was worked out by reedbeta last year: http://reedbeta.com/blog/quadrilateral-interpolation-part-2/ . That's a big roadblock gone, but there's still a lot of other questionable things.

Re: The DS GPU and its fun quirks

#6
post #5

The DS "GPU" is indeed very bizarre and shares more in common with the GBA 2D rasterizer than a modern 3D GPU architecture. That it's a scanline renderer that can handle quads directly should be a pretty big tell :) I implemented a cheap subset of it used in Super Mario 64 DS for my online model viewer ( https://noclip.website/#sm64ds/44;-517.89,899.85,1300.08,0.3... ), but implementing all of the quirks and the weir…

Wow, that site is absolutely amazing. Fun seeing the great sea all at once! Do you write/blog about working on that?

Re: The DS GPU and its fun quirks

#7
I agree that Vulkan isn't necessary, but neither is OpenGL, or a GPU at all. A software rasterizer would be the way to go. Even a mobile CPU should be able to rasterize 2048 polygons per frame at 256x192 using fixed point math. That's almost Quake 1 levels of graphics, and Quake 1 was software rendered in 1996 on 75 Mhz Pentium 1s.

Edit: Reading other articles on the site, it seems like they started with a software renderer. I wonder why they decided to try OpenGL?

Re: The DS GPU and its fun quirks

#8
post #7

I agree that Vulkan isn't necessary, but neither is OpenGL, or a GPU at all. A software rasterizer would be the way to go. Even a mobile CPU should be able to rasterize 2048 polygons per frame at 256x192 using fixed point math. That's almost Quake 1 levels of graphics, and Quake 1 was software rendered in 1996 on 75 Mhz Pentium 1s. Edit: Reading other articles on the site, it seems like they started with a software r…

People like to add shaders to their emulation these days; crt filters, colour adjustment, samplers, etc.

Re: The DS GPU and its fun quirks

#9
post #5

The DS "GPU" is indeed very bizarre and shares more in common with the GBA 2D rasterizer than a modern 3D GPU architecture. That it's a scanline renderer that can handle quads directly should be a pretty big tell :) I implemented a cheap subset of it used in Super Mario 64 DS for my online model viewer ( https://noclip.website/#sm64ds/44;-517.89,899.85,1300.08,0.3... ), but implementing all of the quirks and the weir…

Wow, I really like your website, I was blown away when I realized how many different games are supported. And a lot of them look great. Some of the Splatoon stuff ain't looking quite right on Nouveau/Firefox, lotta z fighting and I don't know what's going on with Inkopolis. Still, super cool.

Re: The DS GPU and its fun quirks

#10
post #3

DS being the Nintendo DS console GPU. Took me awhile to actually verify that's what they were talking about, especially since it starts with paragraphs about Vulkan.

I was wondering if it was in reference to the Nintendo system too, but then I read the domain.
Post reply on HN