[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 :) https://www.youtube.com/watch?v=J5axuebUT1Y 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. |
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.
|
OK, that was good idea :) and the background is less noisy now.
But still have patterns I don't know how to interpret |
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. |
Got it.
So I'll just implement some kind of timer instead those visuals... |
Quote:
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 :) |
All times are GMT +2. The time now is 06:38. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.