As opposed to rendering sprites “on the fly”, which I have some experience with rendering on an #fpga, I’m having a hard time imaging how something like the #ps1 #gpu could push thousands of triangles, even tens of thousands, per frame, using a (presumably single-ported) framebuffer without massive contention.

Like, with a 50MHz clock and memory access, and a 320x240 active drawing area, I can’t figure being able to draw more than, say, 3000ish triangles per frame, assuming a moderate triangle area of about 20px.

Of course, that would be overkill for my little hobby projects, but was that the usual practical limit for textured triangles per frame on the PS1? Around 3000? 🤔

And I’m not even counting the contention during scanning out to the TV…

So my intuition was mostly right. I found this video which was very informative at the right level:

https://www.youtube.com/watch?v=wsEcgNcEObI

The one thing that I wasn't thinking of was the TMU's interfacing with a texture cache. I would hope to avoid such a thing by simply having fast enough SRAM, or just limit the speed of the thing to not require a cache. Maybe one day I'll summon the patience.

It's pretty clear that the TMU needs to potentially access VRAM every cycle, or at least every other cycle when there is no cache.

I also like the idea of a separate texture memory, something the N64 apparently did, which would allow simultaneous TMU access, but there is something to be said for the PS1's unified VRAM, which just makes a lot of intuitive sense to me.

And no, I will not be doing any blurry multi-sampling of textures if I decide to play around with this. Give me those crispy textures any day of the week!

GPU Memory, and Clogged Pipes (Part 1 - PS1 and N64) - #GPUJune2

YouTube

Here's an idea for a shared 1MB framebuffer. A 100MHz clock that multiplexes access to an SRAM by 4 25MHz channels:

- CPU main memory. Not always needed. For DMA of textures from main memory to VRAM. Mostly write-only.
- The display (25 MHz out to VGA). Read-only.
- The renderer. Write-only.
- The texture mapping unit. Read-only.

If the renderer draws to an inactive area and can have two channels, that's a theoretical maximum fill rate of 50M 16-bit pixels per second. That should be enough headroom to do most of what I want to do in a pretty naive way.