greatkreator wrote:
256x172 20 fps is quite enough for a playable game. 4bpp right?
No, 8bpp.
Wait...
Aw nuts... I may have misled you. I should have remembered this; it's basic, and in fact I've done these calculations before and run into this exact issue...
...
The 256x188 8bpp frame takes 48128 bytes in VRAM. You can only transfer about 12247 bytes per frame with a picture that high, meaning that even if you don't change the palette, you still need to have loaded 35881 bytes of the next frame before you overwrite any of the current frame. Combined with a pair of tilemaps, this results in a total VRAM load of no less than 85 KB.
With 256x172 at 8bpp, you have 14895 bytes per frame of DMA, which means you need to have transferred 29137 bytes before the final update, and the VRAM load is at least 76 KB or so.
So I retract my claims above. You cannot do 8bpp graphics at 256x188 or even 256x172 at
any frame rate, unless you want to put up with visible tearing due to overwriting part of the visible framebuffer. It simply doesn't fit. (You can still do 256x146, 240x150, 208x159, etc. in 8bpp at 30 fps. They all fit.)
...
At 8bpp, 256x152 fits, and you can transfer it at 20 fps. But that's not much bigger than 256x146, which should work at 30 fps. Narrower, taller windows might be more optimal, because they're smaller and might still work at 20 fps despite the reduced DMA bandwidth: for example, 216x176 at 8bpp should barely work at 20 fps even with a palette update.
You get much larger framebuffers and higher rates at 4bpp (not least because VRAM is no longer an issue). Star Fox was 224x190 (presumably with a 224x192 framebuffer) and could have run at 30 fps with a fast enough chip. I once worked out what a Super FX TIE Fighter port might look like in 4bpp, and it turned out that I could do a 240x200 rendered window with a 240x208 active area, and still maintain 20 fps. Basically, the Mega Drive doesn't have an advantage over the SNES in this area unless you exploit the fact that DMA to VRAM still sort of works during active display.
greatkreator wrote:
I plan to make a game (first person shooter) using an additional GPU to produce graphics and I need to display it.
But I would like to display it a bit faster than the DOOM did.
Keep in mind that if you use a status bar below the main rendered area, it will eat directly into your DMA time. Doom had a 216x144 rendered window, which by itself would allow 30 fps, but the status bar extends it to 176 pixels of display height, reducing the available DMA bandwidth and limiting the achievable frame rate to 20 fps. Sprites in the display area would not cause an issue, and have an advantage over BG2 in that they don't require VRAM space for an extra tilemap (no SAT in VRAM on SNES; OAM is separate).
If you want to display the player's gun using sprites or BG2, instead of rendering it with the coprocessor, the display probably won't end up any bigger than the one in Doom unless you drop to 4bpp. Even status sprites might take up too much room to permit a fully fractional-buffered 216x176 rendered layer in 8bpp.