25 April 2021, 13:00 | #1 |
Registered User
Join Date: Dec 2017
Location: Poland
Age: 47
Posts: 282
|
[blitz] using MOVE #$f00,$dff180
Hi,
There is a procedure in the code executed every frame (actually: fr.0- procedure, fr.1-slightly altered procedure, fr.2-procedure, fr.3-slightly altered... and so on) This happens only when the player is moving. I added Code:
MOVE #$0f0,$dff180 and Code:
MOVE #$f00,$dff180 and I got nicely flashing background [ Show youtube player ] Can I tell which procedure takes longer to execute just by looking at these flashing patterns? ps. There may be additional artifacts involved since my monitor has a Flicker Fixer built in. |
25 April 2021, 13:28 | #2 |
AmigaMan
Join Date: Oct 2012
Location: Castro Urdiales/Spain
Posts: 760
|
Perhaps is better to use move #$0000,$dff180 at the end of each procedure to mark when it finish ans see clearly the time it waste.
|
25 April 2021, 14:18 | #3 |
Registered User
Join Date: Dec 2017
Location: Poland
Age: 47
Posts: 282
|
OK, that was good idea and the background is less noisy now.
But still have patterns I don't know how to interpret |
25 April 2021, 16:26 | #4 |
Registered User
Join Date: Jul 2015
Location: The Netherlands
Posts: 3,408
|
You can use such a method to time, but it works best if you synchronise it to a specific position on the raster so that the bars always start at the same point. Obviously, if you have to specifically wait for that position that can slow down your code (unless it already syncs to a frame). As such, it can be a good idea to only add such waiting code while trying to optimise things or figure out how long they take.
Anyway, the idea would be to do something like VWAIT 150, then call your procedures. Now, if your game is already synchronised to the screen refresh rate then the flashing simply means it runs slower than one full frame, which makes this way of reading performance a bit tricky. What you could then do is something like get the current time, call the procedure 1000x and get the time after that. Then divide the result by 1000 to get the time per call. |
25 April 2021, 19:27 | #5 |
Registered User
Join Date: Dec 2017
Location: Poland
Age: 47
Posts: 282
|
Got it.
So I'll just implement some kind of timer instead those visuals... |
25 April 2021, 23:03 | #6 |
Zone Friend
Join Date: Jan 2005
Location: italy
Age: 46
Posts: 244
|
from my experience, this flashings means your procedures lasts more than one frame , if the duration is < 1 frame , you get 2 bands of differnet colors ops , like roondar said Last edited by Raislin77it; 25 April 2021 at 23:04. Reason: roondar beat me :) |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[blitz basic] How much amiga-blitz friendly is this? | saimon69 | Coders. Blitz Basic | 105 | 21 April 2022 19:45 |
[blitz] amiga/blitz Mode speed question | peceha | Coders. Blitz Basic | 3 | 10 January 2021 18:52 |
Is move.l atomic | sparhawk | Coders. Asm / Hardware | 1 | 25 December 2019 20:43 |
Move it Move it... (68000) | Gilloo | Coders. Asm / Hardware | 19 | 04 December 2011 17:36 |
Move Em | amigapd | request.Old Rare Games | 1 | 13 March 2011 02:22 |
|
|