English Amiga Board


Go Back   English Amiga Board > Coders > Coders. General > Coders. Releases

 
 
Thread Tools
Old 05 March 2023, 17:21   #1481
abu_the_monkey
Registered User
 
Join Date: Oct 2020
Location: Bicester
Posts: 2,022
Quote:
Originally Posted by Dunny View Post
Quick question: Any way to invert mouse vertical axis (or prevent the mouse from looking up/down entirely)? I just cannot get along with the way it's set up at present!
the new years edition from post #1278 has the option to invert the mouse so up is down and down is up
abu_the_monkey is offline  
Old 06 March 2023, 12:45   #1482
grond
Registered User
 
Join Date: Jun 2015
Location: Germany
Posts: 1,926
Quote:
Originally Posted by Karlos View Post
There could be faster ways to do the eclock timeval difference calculation with inlined sub/subx pair to perform the 64-bit difference without calling the library routine.
Well, it's a once per calculated frame penalty that is only there if the FPS are calculated and displayed (i.e. debugging version, not release version of the game).


Quote:
Other things I thought of were having an array buffer of the last 4 or 8 frames and incrementing a buffer position (modulo the buffer length) to record the next time into, and using the average of all values in the buffer for the FPS. This is like your averaging of the current and last, just spread over more samples.
The current algorithm averages between the current frame time and the previous averaged frame time. This means the current average value is determined by 0.5*current frame, 0.25 preceding frame, 0.125 the frame before that, 0.0625... You get the idea. Disregarding the limited precision of the calculation, one could say that all frame times influence the resulting value but the more current frames have a much higher influence on the result than older frames. Thus, you get averaging over more values for very little effort. On the other hand, there are some disadvantages inherent to the long memory of the "algorithm". E.g. he FPS stats may be too optimistic for a current complex scene because previously you had been looking at a very simple scene or vice versa.
grond is offline  
Old 06 March 2023, 13:13   #1483
Karlos
Alien Bleed
 
Karlos's Avatar
 
Join Date: Aug 2022
Location: UK
Posts: 4,478
@grond

As I said, these are not optimisations or changes I consider remotely worth the effort which is why I merged them anyway. It was more to answer the question "what might I have done differently".

The averaging of the last 8 frames is specifically to avoid the memory effect you described but to be fair, the influence of each previous frame is halved every time so it's not actually a big deal.

Last edited by Karlos; 06 March 2023 at 13:32.
Karlos is online now  
Old 06 March 2023, 14:13   #1484
utri007
mä vaan
 
Join Date: Nov 2001
Location: Finland
Posts: 1,686
Would it be OK to ask compiled new versions to first post?
utri007 is offline  
Old 06 March 2023, 18:55   #1485
Karlos
Alien Bleed
 
Karlos's Avatar
 
Join Date: Aug 2022
Location: UK
Posts: 4,478
I've updates the makefile to have a dev target and began conditionally assembling all the instrumentation. I've also moved it to it's own source file.

Once I've finished tidying I'll actually start implementing the stuff I intended in the dev build.
Karlos is online now  
Old 06 March 2023, 20:25   #1486
abu_the_monkey
Registered User
 
Join Date: Oct 2020
Location: Bicester
Posts: 2,022
Quote:
Originally Posted by Karlos View Post
I've updates the makefile to have a dev target and began conditionally assembling all the instrumentation. I've also moved it to it's own source file.

Once I've finished tidying I'll actually start implementing the stuff I intended in the dev build.
have you got your real amiga up and running now?
I don't think testing under emulation will be that representative as I believe the cpu emulation is not instruction timing correct for 68020 and above, I could be wrong however.
abu_the_monkey is offline  
Old 06 March 2023, 21:28   #1487
Karlos
Alien Bleed
 
Karlos's Avatar
 
Join Date: Aug 2022
Location: UK
Posts: 4,478
Quote:
Originally Posted by abu_the_monkey View Post
have you got your real amiga up and running now?
I don't think testing under emulation will be that representative as I believe the cpu emulation is not instruction timing correct for 68020 and above, I could be wrong however.
No, I'm afraid I haven't yet. However what I'm looking for are smaller code paths, less data duplication, etc.

I tried to add you as a reviewer to this PR but I think you may need to be a collaborator. Either way, it moves the code you've added and makes some renaming changes: https://github.com/mheyer32/alienbreed3d2/pull/56

It also leverages the fact that the frame render and c2p timing calls are adjacent and simplifies it a bit to get 2 fewer eclock calls per frame.

To build with instrumentation you now have to do "make dev". The default behaviour is to build the "release" version.
Karlos is online now  
Old 06 March 2023, 22:31   #1488
abu_the_monkey
Registered User
 
Join Date: Oct 2020
Location: Bicester
Posts: 2,022
looks good to me
abu_the_monkey is offline  
Old 07 March 2023, 08:39   #1489
Karlos
Alien Bleed
 
Karlos's Avatar
 
Join Date: Aug 2022
Location: UK
Posts: 4,478
Quote:
Originally Posted by abu_the_monkey View Post
looks good to me
I'm probably going to move the info into a horizontal line at the foot of the display where the in game messages used to render, assuming the full height is still 256 pixels. That way avoid overdrawing the play area. Can probably get away with a single text buffer and Text() call then too.
Karlos is online now  
Old 07 March 2023, 08:42   #1490
Karlos
Alien Bleed
 
Karlos's Avatar
 
Join Date: Aug 2022
Location: UK
Posts: 4,478
@grond & @abu

I noticed in the frame timing, d1 seems to contain the result of SubTime(), but according to the autodocs, this is supposed be a void return. Is this behaviour documented somewhere? Or did I just misread what was going on?
Karlos is online now  
Old 07 March 2023, 10:30   #1491
abu_the_monkey
Registered User
 
Join Date: Oct 2020
Location: Bicester
Posts: 2,022
This may well be a mistake? by me.
abu_the_monkey is offline  
Old 07 March 2023, 10:48   #1492
Karlos
Alien Bleed
 
Karlos's Avatar
 
Join Date: Aug 2022
Location: UK
Posts: 4,478
Quote:
Originally Posted by abu_the_monkey View Post
This may well be a mistake? by me.
Well, it works. If I had to guess it's the ABI saying d0 and d1 can't be trusted after a function call. If I had to guess how the SubTime() was implemented I'm going to guess at the aforementioned sub/subx pair. It may well be that d1 happens to contain the lower 32-bit difference afterwards.

Maybe the assembler includes say different than the C docs.
Karlos is online now  
Old 07 March 2023, 11:02   #1493
grond
Registered User
 
Join Date: Jun 2015
Location: Germany
Posts: 1,926
AddTime() and SubTime() store the result in the first of the two specified timeval structs. If the result is also available in d1, this is probably an undocumented and unreliable side effect of the implementation of the timer.device. Future versions or alternative implementations (AROS) could do it differently.
grond is offline  
Old 07 March 2023, 13:09   #1494
Karlos
Alien Bleed
 
Karlos's Avatar
 
Join Date: Aug 2022
Location: UK
Posts: 4,478
@grond & @abu

I may update the instrumentation code to just record a number of eclock values per frame at certain points in the code and then do all the analysis in one place at the end. At the moment we have discrete start/finish markers per thing measured, although I've consolidated a pair of them, there are still the same marker values due to the destructive nature of SubTime(). Not in a rush to do it but I think consolidating it makes sense.
Karlos is online now  
Old 07 March 2023, 16:04   #1495
abu_the_monkey
Registered User
 
Join Date: Oct 2020
Location: Bicester
Posts: 2,022
Modify away, your the guy who's going to be using it.
abu_the_monkey is offline  
Old 07 March 2023, 18:21   #1496
shelter
Registered User
 
Join Date: Nov 2022
Location: #Amigaland
Posts: 156
Does a 060 compiled version make any difference for such a system?
I can't really try myself as I don't have an 060.
shelter is offline  
Old 07 March 2023, 21:01   #1497
Karlos
Alien Bleed
 
Karlos's Avatar
 
Join Date: Aug 2022
Location: UK
Posts: 4,478
Quote:
Originally Posted by shelter View Post
Does a 060 compiled version make any difference for such a system?
I can't really try myself as I don't have an 060.
It's not compiled, it's assembled. It is set for 68060 but from an optimisation perspective assemblers are pretty restricted in what they can do.
Karlos is online now  
Old 07 March 2023, 22:40   #1498
Karlos
Alien Bleed
 
Karlos's Avatar
 
Join Date: Aug 2022
Location: UK
Posts: 4,478
Any word on what pipper is up to?
Karlos is online now  
Old 07 March 2023, 22:48   #1499
shelter
Registered User
 
Join Date: Nov 2022
Location: #Amigaland
Posts: 156
Quote:
Originally Posted by Karlos View Post
It's not compiled, it's assembled. It is set for 68060 but from an optimisation perspective assemblers are pretty restricted in what they can do.
Ok, good to know. Yeah I keep writing compiled because it's the thread title.
shelter is offline  
Old 07 March 2023, 22:50   #1500
abu_the_monkey
Registered User
 
Join Date: Oct 2020
Location: Bicester
Posts: 2,022
@Karlos
not heard anything for a while, I have seen him popup as being on line here on eab a couple of times recently.
abu_the_monkey 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
Alien Breed 3D II The Killing Grounds RTG patch Angus Retrogaming General Discussion 63 14 December 2022 15:20
Alien Breed & Alien Breed '92: SE - delay when picking up items / opening doors Ian support.WinUAE 16 23 December 2016 15:50
Alien Breed 3D II : The Killing Grounds code booklet alexh support.Games 19 10 October 2012 22:17
Alien Breed 3D 2 - The Killing Grounds Ironclaw support.Games 12 13 September 2005 13:07
HD Version of Alien Breed I ? Kintaro request.Old Rare Games 20 31 July 2003 10:48

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 12:26.

Top

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