3 ms·
Cool stuff! On the read problem: I found host read timing to be significantly harder to get right, and it's still not perfect. Host reads can't be
by CamperBob2 11y ago
Cool stuff! On the read problem:
I found host read timing to be significantly harder to
get right, and it's still not perfect. Host reads can't
be put in a queue and have to be processed immediately.
This interrupts the fetching process; if the host needs
to read from a totally different memory location then
the display engine is fetching, the SDRAM has to close,
refresh and reopen rows, which is a time consuming
process. So far, reads from the host cause temporary
distortions (glitches) in the display output. I plan to
mitigate these problems using either burst mode reads
and fast switching and/or inserting CPU wait states via
the XRDY signal.
... why not just maintain two copies of the frame buffer, one onscreen and one off? Your hardware FSM then has a much simpler job: make the real VRAM contents match the shadow buffer.
In other words, instead of tackling the problem with 1988-era engineering, take advantage of the free parallelism and essentially infinite (from a 1988 perspective) memory that you get with an FPGA board today.
Hell, there's probably enough BRAM on that Spartan6 to implement an Amiga frame buffer.
- duskwuff 11y ago> Hell, there's probably enough BRAM on that Spartan6 to implement an Amiga frame buffer. Nowhere near enough. Spartan-6 LX25 has 936 kbit of block RAM; 800x600x16 requires a little under 8 Mbit without double-buffering.
- CamperBob2 11y agoGotcha. I've been spoiled by the bigger parts.
- rasz_pl 11y agoenough to read ahead whole line of pixels at a time
- deleted 11y ago[deleted]
- rasz_pl 11y agoYou are thinking write glitches - this is what double buffering solves. Read glitches happen when two reads collide, and without any delay mechanism you need to choose which one to drop on the floor. What you do to solve this is implementing busy wait on external bus (/DTACK on amiga), you can also read ahead video output data in chunks (think filling cache line using SDRAM Burst mode) giving you more memory controller time in between. This is why back in the day different graphic cards delivered different Doom1/2/quake1 fps, while intuitively there should be no difference games being software renderers. here is a sweet little article By Michael Abrash about vga isa bus hardware optimizations http://www.drdobbs.com/ramblings-in-real-time/184410037 http://www.drdobbs.com/ramblings-in-real-time/184410037
- CamperBob2 11y agoGenerally, if you ever find yourself having to read from video memory, you've already lost the ballgame, performance-wise.