Login
Forum Help



Post Your Message
Username: (Login)

Topic:
Message:
 


Previous Messages
Posted By

bubis
on 2019-12-12
06:23:03
 Re: Cycle counting with the TED timers

If you turn the screen off and switch to single clock mode the timer is usable for that.
I would set timer 2 or 3 to some big value and compare when the routine is done.

Posted By

unclouded
on 2019-12-12
03:57:30
 Cycle counting with the TED timers

I saw in the 7360 datasheet that the TED timers count down at 884 kHz (for PAL systems). Is that the same frequency as the CPU in single-clock mode? Can the TED timers be used to count cycles in a routine to help figure out which routine is faster? I wrote some test code at https://github.com/un-clouded/Commodore-264/tree/master/examples/code-timing and it seems to work so far. The subroutine does:


clc
adc #$00


..and the .prg says $0004 consistently. I've yet to test larger routines but is this approach valid?


Copyright © Plus/4 World Team, 2001-2024. Support Plus/4 World on Patreon