English Amiga Board


Go Back   English Amiga Board > Coders > Coders. Asm / Hardware

 
 
Thread Tools
Old 03 May 2019, 12:45   #1
mcgeezer
Registered User
 
Join Date: Oct 2017
Location: Sunderland, England
Posts: 2,702
Copper Interrupts and Blit Performance

On Rygar I'm trying to get away with not double buffering the background blits that I'm doing (as I need the ram), currently I am using double buffering because each blit of a bitplane might occur during bitplane dma and I would get tearing.

If I were to use a copper interrupt to wait for a vertical position below the display area, then turn off bitplane DMA, turn on Blitter Nasty and then proceed to do by three straight A-D Blit copy operations.... would this yield me the maximum performance for rendering the background - and I would't have to double buffer the backgrounds?

I think I already know the answer to this but before I change the code it would be really great to get some insight or tips on further performance improvement.

Geezer
mcgeezer is offline  
Old 03 May 2019, 12:53   #2
DanScott
Lemon. / Core Design
 
DanScott's Avatar
 
Join Date: Mar 2016
Location: Tier 5
Posts: 1,212
You'll definitely get your best blitter perfomance during time where the bitplane DMA is off

Do you have enough time to get these 3 blits done after the display area ?

Is it possible also to blit in "chunks", from the top down... for example, the first 32 pixels of bitplane 1, then the first 32 of bitplane 2, then bitplane 3.... then the next 32 pixels of bitplane 1 etc... perhaps you could be blitting ahead of the beam with this method
DanScott is offline  
Old 03 May 2019, 12:59   #3
mcgeezer
Registered User
 
Join Date: Oct 2017
Location: Sunderland, England
Posts: 2,702
Quote:
Originally Posted by DanScott View Post
You'll definitely get your best blitter perfomance during time where the bitplane DMA is off
Yeah I thought that was the case.

Quote:
Originally Posted by DanScott View Post
Do you have enough time to get these 3 blits done after the display area ?
At the moment I'm unsure... so I take it you mean can I get all three blits done between say line 224 (after display) and 313 start of Vertical Blank?

Quote:
Originally Posted by DanScott View Post
Is it possible also to blit in "chunks", from the top down... for example, the first 32 pixels of bitplane 1, then the first 32 of bitplane 2, then bitplane 3.... then the next 32 pixels of bitplane 1 etc... perhaps you could be blitting ahead of the beam with this method
I never thought of doing that, but it would be fairly easy for me to implement and I can see why I would do it too!
mcgeezer is offline  
Old 03 May 2019, 13:35   #4
mcgeezer
Registered User
 
Join Date: Oct 2017
Location: Sunderland, England
Posts: 2,702
The other thought that has occurred to me is that I'm wondering if I will gain performance by setting FMODE to x4 instead of the normal x2 in the display area.

Given no bitplane dma is off I take it this would be pointless?
mcgeezer is offline  
Old 03 May 2019, 14:19   #5
ross
Defendit numerus
 
ross's Avatar
 
Join Date: Mar 2017
Location: Crossing the Rubicon
Age: 53
Posts: 4,476
Quote:
Originally Posted by mcgeezer View Post
The other thought that has occurred to me is that I'm wondering if I will gain performance by setting FMODE to x4 instead of the normal x2 in the display area.
Yep, you would get more performance.
But you can't in your actual engine because sprites loss (due to bigger BPLCON1 shift region and early DDFSTRT).
There is somewhere a thread where i've calculated FMODE and related screen position/sprite loss about this.

If you speak about static region, no problem to setup a 4x mode.
ross is offline  
Old 03 May 2019, 14:30   #6
hooverphonique
ex. demoscener "Bigmama"
 
Join Date: Jun 2012
Location: Fyn / Denmark
Posts: 1,624
Quote:
Originally Posted by ross View Post
Yep, you would get more performance.

Really? I'm pretty sure it makes no difference while bitplane dma is idle..
hooverphonique is offline  
Old 03 May 2019, 14:31   #7
hooverphonique
ex. demoscener "Bigmama"
 
Join Date: Jun 2012
Location: Fyn / Denmark
Posts: 1,624
Quote:
Originally Posted by mcgeezer View Post
If I were to use a copper interrupt to wait for a vertical position below the display area, then turn off bitplane DMA...
If you are below the display area, no bitplane dma will be taking place anyway...
hooverphonique is offline  
Old 03 May 2019, 14:44   #8
ross
Defendit numerus
 
ross's Avatar
 
Join Date: Mar 2017
Location: Crossing the Rubicon
Age: 53
Posts: 4,476
Quote:
Originally Posted by hooverphonique View Post
Really? I'm pretty sure it makes no difference while bitplane dma is idle..
Not read all the previous messages, so can be i've miss something.. but in this there is a reference to display area.

Quote:
Originally Posted by mcgeezer View Post
The other thought that has occurred to me is that I'm wondering if I will gain performance by setting FMODE to x4 instead of the normal x2 in the display area.
ross is offline  
Old 03 May 2019, 14:51   #9
hooverphonique
ex. demoscener "Bigmama"
 
Join Date: Jun 2012
Location: Fyn / Denmark
Posts: 1,624
Quote:
Given no bitplane dma is off I take it this would be pointless?
We will have to wait for geezer to clarify, if he meant while bitplane is active, or not :-)
hooverphonique is offline  
Old 03 May 2019, 15:07   #10
ross
Defendit numerus
 
ross's Avatar
 
Join Date: Mar 2017
Location: Crossing the Rubicon
Age: 53
Posts: 4,476
Quote:
Originally Posted by hooverphonique View Post
We will have to wait for geezer to clarify, if he meant while bitplane is active, or not :-)
ross is offline  
Old 03 May 2019, 15:39   #11
mcgeezer
Registered User
 
Join Date: Oct 2017
Location: Sunderland, England
Posts: 2,702
I must apologise - I meant outside of the display area.



So bitplane dma is switched off and then I switch to x4 fetch mode from x2.
mcgeezer is offline  
Old 03 May 2019, 16:04   #12
roondar
Registered User
 
Join Date: Jul 2015
Location: The Netherlands
Posts: 3,415
Quote:
Originally Posted by mcgeezer View Post
I must apologise - I meant outside of the display area.



So bitplane dma is switched off and then I switch to x4 fetch mode from x2.
Fetch mode only effects bitplane fetching so this would not make a difference in Blitter speed.
roondar is offline  
Old 03 May 2019, 16:27   #13
mcgeezer
Registered User
 
Join Date: Oct 2017
Location: Sunderland, England
Posts: 2,702
Quote:
Originally Posted by roondar View Post
Fetch mode only effects bitplane fetching so this would not make a difference in Blitter speed.
Good stuff, so the blitter would just eat all the cycles it could undisturbed.

I’ll try it this weekend and provide some measurements.
mcgeezer is offline  
Old 03 May 2019, 17:33   #14
roondar
Registered User
 
Join Date: Jul 2015
Location: The Netherlands
Posts: 3,415
Ok. Reading the thread again I did get a bit confused, so just to be 100% clear: fetch mode only affects bitplane fetching, so Blitter speed won't change for blits executing during rasterlines below (or above) the ones that fetch bitplanes.

For blits during the rasterlines that bitplanes are fetched, the Blitter will get more slots when running a higher fetch mode.

Sorry for the doubled up info - I got a bit confused on where (or rather when during the frame) you want to blit.
roondar is offline  
Old 04 May 2019, 02:15   #15
mc6809e
Registered User
 
Join Date: Jan 2012
Location: USA
Posts: 372
If you time it correctly, you should be able to start blitting a little before display fetch ends. Just make sure display fetch wins the race for access to the playfield.

And if you use interleaved bitplanes, you can begin even earlier.
mc6809e is offline  
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
Combining copper scrolling with copper background phx Coders. Asm / Hardware 16 13 February 2021 12:41
Damn Interrupts mcgeezer Coders. Asm / Hardware 10 24 March 2019 16:50
Strange behavior when using blit queue in copper list losso Coders. Asm / Hardware 39 02 February 2018 08:24
CIA interrupts... bloodline Coders. System 6 18 January 2018 10:33
Best way to mix blitting with copper and copper effects roondar Coders. Asm / Hardware 3 12 September 2016 13:12

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 18:16.

Top

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Page generated in 0.09011 seconds with 15 queries