The STM32F407 has 128K of SRAM (as well as an additional 64K of core coupled memory). 128K is just enough to implement a double frame buffer with 300 * 200 resolution. This does not quite cover the full screen (the grey strips at the right and left indicate the available area for graphics).
I could increase resolution by changing to a 4 bits per pixel colour space, giving a palette of 16 colours. Currently using 8bpp I have access to 64 simultaneous colours.
The other option would be to “race the beam” – generate raster scans in realtime without using a frame buffer. This is how the early game consoles did it. I did some experiments earlier and while it is possible, I found I was running out of clock cycles when doing anything other than very simple graphics. A single raster scan is equivalent to around 12,000 clock cycles on the STM32F407.