02 May 2020, 18:17 | #1 |
Registered User
Join Date: Jan 2012
Location: USA
Posts: 372
|
Question for the pros about blitter clear and triple buffering
I've noticed in serveral ST ports to the Amiga that often the blitter is used to help clear memory, though ironically this can actually make things slower than MOVEM.L when done naively, the problem being the idle cycles, which have to be taken even when other DMA is occuring. A clearing blit done during four bitplane display DMA fetch will cause the blitter to write on every fourth cycle during the clear, slower than MOVEM.L.
I can imagine a programmer thinking, "this one simple case is easy for the port -- I'll try it" and being disappointed that it's slower than just using the CPU. I think Starglider is an example of using a blitter clear naively. Obvious solution is to start with a displayed framebuffer, a buffer being cleared with the blitter, and a third buffer where the new image is begin built (by the CPU in the case of a simple ST port). Seems like a missed opportunity for an easy gain in speed. Too complicated for a port? Not enough spare memory? Not used because of a misunderstanding about how the blitter works? |
02 May 2020, 18:26 | #2 |
Total Chaos forever!
Join Date: Aug 2007
Location: Waterville, MN, USA
Age: 49
Posts: 2,187
|
It depends on whether you have real fast RAM or not. The blitter doesn't block the CPU if you have fast RAM. They operate in parallel.
Also, it depends on if you have AGA because 32 bit writes are allowed on AGA but not if you have ECS or OCS. The 16 bit chipsets have 16 bit chip RAM so a long write takes 2 bus cycles each. |
02 May 2020, 19:41 | #3 |
Registered User
Join Date: Dec 2014
Location: germany
Posts: 439
|
AFAIU the workings of blitter idle cycles were largely undocumented, they appear in some early errata to the HRM, but the later eiditons of the HRM seems to omit them completely:
http://amigadev.elowar.com/read/ADCD.../node0127.html The HRM, while being an excellent documentation, contains some false information that persisted quite a bit and may have mislead programmers to write non-optimal code, e.g. the statement that the 68000 can only use the even-numbered memory cycles. And then of course no one bothered when porting from the ST. |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Triple buffering, blitter queues and bugs | deimos | Coders. General | 0 | 03 October 2019 11:25 |
Triple Buffering Example | Master484 | Coders. Blitz Basic | 11 | 21 September 2019 13:51 |
Cons & Pros of buffering vs no buffering | vagrant | support.WinUAE | 9 | 27 February 2016 08:47 |
In need of blitter guidance from the pros | Fell | Coders. Asm / Hardware | 5 | 02 September 2015 20:42 |
Triple buffering | atchoo | support.WinUAE | 29 | 30 November 2011 11:58 |
|
|