English Amiga Board


Go Back   English Amiga Board > Coders > Coders. General

 
 
Thread Tools
Old 28 October 2019, 20:29   #161
hooverphonique
ex. demoscener "Bigmama"

 
Join Date: Jun 2012
Location: Fyn / Denmark
Posts: 1,001
Quote:
Originally Posted by phx View Post
BTW, backBuffer is a "Common" symbol, which is always global (except, see above). The linker will allocate space for the largest Common symbol with this name and merge all those symbols at this place. Which means, in C you don't need "extern APTR backBuffer", but another "APTR backBuffer" would work as well. Only uninitialised symbols may be Common.
That sounds strange - "normal" linkers would complain about multiply defined symbols if you put "APTR backBuffer" in multiple compilation units.
hooverphonique is offline  
Old 28 October 2019, 21:24   #162
phx
Natteravn

phx's Avatar
 
Join Date: Nov 2009
Location: Herford / Germany
Posts: 1,485
Quote:
Originally Posted by hooverphonique View Post
That sounds strange - "normal" linkers would complain about multiply defined symbols if you put "APTR backBuffer" in multiple compilation units.
Define "normal" linkers!

A typical Amiga linker (alink, blink, slink) might complain, because the Amiga hunk format doesn‘t support Common symbols (2.0 implements them partly, but no linker besides vlink ever supported them).

Here we are obviously talking about Unix compilers (gcc), linkers (ld) and object file formats (ELF), so Common symbols are the default for uninitialised, global variables.
phx is offline  
Old 28 October 2019, 22:09   #163
hooverphonique
ex. demoscener "Bigmama"

 
Join Date: Jun 2012
Location: Fyn / Denmark
Posts: 1,001
Quote:
Originally Posted by phx View Post
Here we are obviously talking about Unix compilers (gcc), linkers (ld) and object file formats (ELF), so Common symbols are the default for uninitialised, global variables.

You're right, of course! I was thinking of C++
hooverphonique is offline  
Old 29 October 2019, 09:14   #164
sandruzzo
Registered User
 
Join Date: Feb 2011
Location: Italy/Rome
Posts: 1,644
The oldest version was a lot faster. This one, on 040 is very slow
sandruzzo is offline  
Old 29 October 2019, 10:06   #165
deimos
Registered User

 
Join Date: Jul 2018
Location: Londonish / UK
Posts: 489
Quote:
Originally Posted by sandruzzo View Post
The oldest version was a lot faster. This one, on 040 is very slow
The oldest version? The interupt driven blitter queue? Was faster than a pure CPU based version on an 040? The CPU only version running on an 040 was very slow?

Can anyone verify this?

I'm only targeting original, proper Amigas, so I'm not concerned about how fast the code runs on an 040, but if something is making it run very slow on a fast CPU then it would be interesting to know what.
deimos is offline  
Old 29 October 2019, 10:08   #166
sandruzzo
Registered User
 
Join Date: Feb 2011
Location: Italy/Rome
Posts: 1,644
it-just-stops.zip, is the fastest on 040
sandruzzo is offline  
Old 29 October 2019, 10:15   #167
deimos
Registered User

 
Join Date: Jul 2018
Location: Londonish / UK
Posts: 489
Quote:
Originally Posted by sandruzzo View Post
it-just-stops.zip, is the fastest on 040
Could you please test the versions that work?
deimos is offline  
Old 29 October 2019, 10:16   #168
sandruzzo
Registered User
 
Join Date: Feb 2011
Location: Italy/Rome
Posts: 1,644
Quote:
Originally Posted by deimos View Post
Could you please test the versions that work?
Tested all, that one is the fastest. Last one, work very slow
sandruzzo is offline  
Old 29 October 2019, 10:23   #169
deimos
Registered User

 
Join Date: Jul 2018
Location: Londonish / UK
Posts: 489
Quote:
Originally Posted by sandruzzo View Post
Tested all, that one is the fastest. Last one, work very slow
Ok, fine. it-just-stops.zip doesn't work, please ignore that one.

Could you please tell me how long the latest, cpu-only, version takes to run on your 040?
deimos is offline  
Old 29 October 2019, 10:25   #170
sandruzzo
Registered User
 
Join Date: Feb 2011
Location: Italy/Rome
Posts: 1,644
more or less 13 seconds
sandruzzo is offline  
Old 29 October 2019, 10:27   #171
deimos
Registered User

 
Join Date: Jul 2018
Location: Londonish / UK
Posts: 489
Quote:
Originally Posted by sandruzzo View Post
more or less 13 seconds
Great.

I'm attaching to this post the fastest (copper based) blitter queue version. Could you please run the same test?
Attached Files
File Type: zip copper-queue.zip (13.4 KB, 9 views)
deimos is offline  
Old 29 October 2019, 10:28   #172
sandruzzo
Registered User
 
Join Date: Feb 2011
Location: Italy/Rome
Posts: 1,644
more or less 4!!!!! Maybe you're cpu bound!
sandruzzo is offline  
Old 29 October 2019, 10:30   #173
deimos
Registered User

 
Join Date: Jul 2018
Location: Londonish / UK
Posts: 489
Quote:
Originally Posted by sandruzzo View Post
more or less 4!!!!!
Can anyone explain this?
deimos is offline  
Old 29 October 2019, 10:32   #174
sandruzzo
Registered User
 
Join Date: Feb 2011
Location: Italy/Rome
Posts: 1,644
Quote:
Originally Posted by deimos View Post
Can anyone explain this?
4 seconds! 3 time faster!
sandruzzo is offline  
Old 29 October 2019, 10:54   #175
deimos
Registered User

 
Join Date: Jul 2018
Location: Londonish / UK
Posts: 489
Quote:
Originally Posted by sandruzzo View Post
Maybe you're cpu bound!
I am considering ways to test this. If I can remove all of the calculations and just run the same precalculated copper list for every frame, then if it is due to being CPU bound, then the time spent should drop to around 4s on a standard Amiga.
deimos is offline  
Old 29 October 2019, 11:07   #176
sandruzzo
Registered User
 
Join Date: Feb 2011
Location: Italy/Rome
Posts: 1,644
Interesting to see that on faster cpu all run very impressive!
sandruzzo is offline  
Old 29 October 2019, 14:40   #177
deimos
Registered User

 
Join Date: Jul 2018
Location: Londonish / UK
Posts: 489
Quote:
Originally Posted by deimos View Post
I am considering ways to test this. If I can remove all of the calculations and just run the same precalculated copper list for every frame, then if it is due to being CPU bound, then the time spent should drop to around 4s on a standard Amiga.
I've done this test and the time spend dropped to 6s, which I call "around" 4s.

It's now obvious that there's far more time spent traversing the BSP tree and generating the blitter queue copper list than I had thought.

The BSP tree code is old, from last year, and now I can immediately see where I can optimise it. The good news is that any improvements I make there will affect all the versions of my code.

The copper list building is something I've already had some ideas on, but it's not so straight forward.

I'll be back.
deimos is offline  
Old 29 October 2019, 14:53   #178
sandruzzo
Registered User
 
Join Date: Feb 2011
Location: Italy/Rome
Posts: 1,644
@deimos

In my opinion you should split your workload into 2-3 frames, which'll give you room for 25-17fps.

In this way you'll have less expensive copperlist, and very easy way to build it, better parallel work between cpu and blitter of course.
sandruzzo is offline  
Old 29 October 2019, 15:13   #179
deimos
Registered User

 
Join Date: Jul 2018
Location: Londonish / UK
Posts: 489
Quote:
Originally Posted by sandruzzo View Post
@deimos

In my opinion you should split your workload into 2-3 frames, which'll give you room for 25-17fps.

In this way you'll have less expensive copperlist, and very easy way to build it, better parallel work between cpu and blitter of course.
But how can I split the workload? I don't see any way to do that.
deimos is offline  
Old 29 October 2019, 15:30   #180
sandruzzo
Registered User
 
Join Date: Feb 2011
Location: Italy/Rome
Posts: 1,644
Quote:
Originally Posted by deimos View Post
But how can I split the workload? I don't see any way to do that.
Frame 1:

- Buffers erase via blitter driven by copper
- 3d stuff via cpu


Frame 2:

- Line drawing via blitter driven by copper
- cpus' stuffs
-and if you have time, some area filling

Frame 3:

- Area filling via blitter driven by copper
- cpus' stuffs

This could be an idea..
sandruzzo 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
So, I'd like to write a new Amiga game - what do you want to see? Graham Humphrey Amiga scene 88 26 February 2012 22:50
My sales over next couple of weeks emdxxxx MarketPlace 4 31 October 2007 11:17
AmigaSYS 1.7 Released ETA : 1-2 Weeks. Dary News 34 22 March 2005 20:51
HOL mentioned in this weeks Micro Mart fiath Amiga scene 8 07 June 2004 00:56

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 10:29.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2019, vBulletin Solutions Inc.
Page generated in 0.09955 seconds with 16 queries