Login
Back to forumSee the full topicGo to last reply

Posted By

TLC
on 2009-07-04
08:56:24
 Re: $ff00/$ff01

He might... winkwinkwink Well. I don't really remember details (the CIA timers are much more versatile than the TED timer 1 ie. $FF00/$FF01) but from this point of view, the real difference comes from the clock frequency.

The PAL C64 runs at 17.734470 / 18. The PAL Plus/4 at 17.734470 / 20 (single clock, I mean). The C64 timer runs faster by a factor of 10/9. Consequently, if you want similar rate for an interrupt routine on the Plus/4, you have to adjust the number of clock cycles (written into the timer) by 9/10.

There seems to be an other difference: the CIA expects T-1 to be written to the reload register (where T is the number of cycles to be counted down in each "full" periods), whereas the TED timer 1 expects T.

So...

In the example below, T is $2663 + 1 = $2664 = 9828.

The new T for the TED is T * 9/10 = 9828 * 9 / 10 = 8845 = $228D. This is what you have to load into $FF00/$FF01.

...Another (practical) hint, for this particular case: as you can see, 9828 = 156 * 63 , ie. the timing of half a frame on a C64 ( 156 rows of 63 cycles each). This should be a timing of a "2x player" interrupt, frequently seen (as technical solution) in HVSC multispeed tune rips. In this case, you can simply drop the CIA timing idea and write a routine which is executed by raster interrupts twice a frame. ...Or copy the original idea, and call the player by TED timer interrupts, by a timing of 156 * 57 = 8892 = $22BC cycles. (Yes, the frame rate of the C64 and the Plus/4 don't match exactly).



Back to top


Copyright © Plus/4 World Team, 2001-2024