18 July 2022, 11:49 | #1 |
Registered User
Join Date: May 2017
Location: AmigaLand
Posts: 459
|
Turn on/off blitter priority during blit
Hi folks,
I wonder as I meet the case, but is it safe to turn on or off the blitter priority over cpu while the blitter is running ? As it seems to work on unexpanded Amiga 500, what happens with A1200/A3000/A4000 etc... ? |
18 July 2022, 11:52 | #2 |
Registered User
Join Date: Jan 2019
Location: Germany
Posts: 3,216
|
Generally not advisable. The problem is that the CPU then gets no slot whatsoever, in particular neither for processing interrupts, which may - depending on the nature of the interrupt - cause quite some disturbance in the system.
|
18 July 2022, 12:13 | #3 |
Registered User
Join Date: Dec 2014
Location: germany
Posts: 439
|
OT: That's only true for blits without idle cycles. A simple D clear blit e.g. will leave free cycles for the CPU even with blit priority on.
|
18 July 2022, 12:42 | #4 |
Natteravn
Join Date: Nov 2009
Location: Herford / Germany
Posts: 2,496
|
Thomas and chb are right.
It is safe to change Blitter priority while the Blitter is running, but when the Blitter leaves no free cycles you have to know what you're doing. For example in my games setting the Blitter priority is part of the WAITBLIT macro, because the CPU definitely has nothing else to do when it reaches WAITBLIT. I have only VERTB and CIAB-timer interrupts enabled. The VERTB is no problem, because my game engine runs within the interrupt. The timer interrupt is for the music, and it usually doesn't matter when it is delayed until a blit finishes. It's a design decision you have to make. |
18 July 2022, 12:45 | #5 |
Registered User
Join Date: Jun 2016
Location: europe
Posts: 1,039
|
Depends on context...
OS-killer? Do whatever you want. OS friendly with multitasking disabled? Do whatever you want. OS friendly with multitasking enabled? Sure, if you know what you are doing. But as Thomas hinted, there might be unwated side effects, some of them are depending on hardware config (eg. yes/no fast ram?). |
18 July 2022, 15:51 | #6 |
Registered User
Join Date: May 2017
Location: AmigaLand
Posts: 459
|
Sorry I forgot to give context.
Amiga 500 KS1.3 (512/512). I tun off system and restablish it at exit. I use the blitter priority over cpu with only one Destination and zero source. As I can understand by reading your answers, it's safe to use it in this context, but is it the same with faster Amigas ? A1200,A4000... ? |
18 July 2022, 16:25 | #7 | |
Registered User
Join Date: Jul 2015
Location: The Netherlands
Posts: 3,410
|
Quote:
The only thing to keep in mind is that you should always include a Blitter wait routine/macro even if you run with the Blitter set to have priority, as faster systems might still have the CPU running (either from the cache or from Fast Memory) even if the Blitter is set up this way and this can potentially end up setting up Blitter registers for new blits while the old one is still running. |
|
18 July 2022, 20:22 | #8 | |
Registered User
Join Date: May 2017
Location: AmigaLand
Posts: 459
|
Quote:
|
|
18 July 2022, 20:48 | #9 |
Registered User
Join Date: Feb 2017
Location: Denmark
Posts: 1,099
|
Resist this temptation. If you're making some record breaking demo for A500 I'll give a pass, otherwise it's just not worth it. You will regret it.
Instead as mentioned upthread doing D=0 only uses half of blitter cycles, better to use them with the CPU |
19 July 2022, 22:51 | #10 | |
Registered User
Join Date: May 2017
Location: AmigaLand
Posts: 459
|
Quote:
|
|
20 July 2022, 01:00 | #11 | |
Natteravn
Join Date: Nov 2009
Location: Herford / Germany
Posts: 2,496
|
It's not so uncommon.
Yes. Everything. Quote:
Advantage of this approach (for me) is that the main program can still do some low priority tasks in parallel, like loading and decoding data from disk, while the rendering is done at high priority during the interrupt. |
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Immediate Blitter & Wait for Blitter... | volvo_0ne | support.WinUAE | 32 | 18 September 2022 09:52 |
Blitter flip with interleaved bitplanes (single blit) | alpine9000 | Coders. Asm / Hardware | 4 | 15 December 2018 04:49 |
Blitter Priority - Blthog | Asman | Coders. Asm / Hardware | 3 | 12 December 2016 21:26 |
Blitter busy flag with blitter DMA off? | NorthWay | Coders. Asm / Hardware | 9 | 23 February 2014 21:05 |
One "hole" in each scan line to turn off blitter nasty? | mc6809e | Coders. Asm / Hardware | 1 | 03 July 2012 12:12 |
|
|