| |
Flavioweb
Registered: Nov 2011 Posts: 463 |
Opcode Execution time != cpu cycles?
As writed at: http://www.atarimax.com/jindroush.atari.org/aopc.html#TIMES
"
Execution Times
Op code execution times are measured in machine cycles, one of which equals two clock cycles. Many instructions require one extra cycle for execution if a page boundary is crossed; ...
"
This mean that using a Cia timer setup to count system cycles and supposing to starting it just after an LDA #$00 instruction and reading it again (the timer value) after instruction execution, since LDA time is 2 machine cycles the timer value can be 4 (or better... to have a timer value of "0" we need to setup it for starting at 4)? |
|
... 10 posts hidden. Click here to view all posts.... |
| |
JackAsser
Registered: Jun 2002 Posts: 2014 |
Quote: also that is completely irrelevant unless you are trying to use the timer value right before it wraps. i cant tell any practical situation where this is true right now to be honest :o)
When using a timer to stabilize a raster it can be confusing if you assume the value 0 exists... :) But yeah... not really relevant in most cases indeed. |
| |
Copyfault
Registered: Dec 2001 Posts: 478 |
Mainly I wanted to point this out because I think it helps a lot - at least it would've helped me back then ;)
In practice it could help to do a smart dejitter routine. This "zero state = init value"-thingie forced me to use the illegal asr-opcode ;) |
| |
chatGPZ
Registered: Dec 2001 Posts: 11386 |
or just start the timer one cycle later perhaps? =P |
| |
JackAsser
Registered: Jun 2002 Posts: 2014 |
Quote: or just start the timer one cycle later perhaps? =P
Totally off-topic of course, but since I formulated a problem and you posted a solution (the one we all use), it's not completely irrelevant knowing that the timer actually doesn't reach 0. :) |
| |
chatGPZ
Registered: Dec 2001 Posts: 11386 |
i have used timers for stable raster long before i knew about the wraparound bug though :) |
Previous - 1 | 2 - Next |