[Coco] Instruction cycles per 60Hz frame.
wrcooke at wrcooke.net
wrcooke at wrcooke.net
Sun Nov 17 18:56:41 EST 2019
I'm no CoCo expert, but I believe, as with most similar systems, the
clock is derived from the NTSC colorburst frequency. That frequency is
3,579,545 Hz. The CPU clock is that frequency / 4 = 894,886.25 Hz. (
divided by 2 it is 1,787,752.5 Hz) The 60/59.94 Hz are also derived
from that by a simple divider(3,579,545*2 / (455*525) * 2 = about 59.94
Hz).
Crystals aren't perfect, even new, and drift with age. But, the beauty
is the ratios will always stay the same.
The simple math gives 894,886 / 59.94 = 14,929.7 -> 14,929
The exact math, that will ALWAYS be perfect, is:
cb = colorburst = 3,579,545
(cb /4) / (cb*4/ (455 * 525))
which simplified to 455 * 525 / 16 or 14,929.6875 -> 14,929 for normal
speed
For double speed it is 455 * 525/8 or 29,859.375 -> 29,859
Notice that the actual frequencies aren't in those forumulas. They
cancel out, since all the clocks are derived from the same crystal by
dividers.
[1]https://en.wikipedia.org/wiki/NTSC
[2]http://www.colorcomputerarchive.com/coco/Documents/Datasheets/MC6847
%20MOS%20Video%20Display%20Generator%20(Motorola).pdf
Sorry, I was bored on a Sunday evening :-)
Will
On November 17, 2019 at 3:52 PM Alex Evans < [3]varmfskii at gmail.com>
wrote:
Is it worth taking into consideration that the 60Hz should actually be
59.94Hz assuming NTSC (30/1.001 full frames or 60/1.001 half frames).
On Sun, Nov 17, 2019 at 2:39 PM Ed Snider < [4]zippster278 at gmail.com>
wrote:
>
Correct. Round down to the nearest whole cycle of course.
894886 cycles per second at single speed.
1789772 cycles per second at double speed.
- Ed
On Nov 17, 2019, at 12:41 PM, James Ross < [5]jrosslist at outlook.com>
wrote:
continued: actually the math can simplified to ...
cycles_per_60hz_frame = (1d / 60d) * 1000000 * coco_clk; // 0.8948...
MHz
double_cycles_per_60hz_frame = (1d / 60d) * 1000000 * double_speed; //
1.789... MHz
which gives the same results:
standard 60hz (vsync) frame = 14914.7727272727 cycles per frame
double speed 60hz (vsync) frame = 29829.5454545455 cycles per frame
so, unless I am really confused (which is quite possible!), then the
#'s above have to be correct ... ok moving on then :) :)
james
--
Coco mailing list
[6]Coco at maltedmedia.com
[7]https://pairlist5.pair.net/mailman/listinfo/coco
--
Coco mailing list
[8]Coco at maltedmedia.com
[9]https://pairlist5.pair.net/mailman/listinfo/coco
--
Coco mailing list
[10]Coco at maltedmedia.com
[11]https://pairlist5.pair.net/mailman/listinfo/coco
"A designer knows he has achieved perfection not when there is nothing
left to add, but when there is nothing left to take away." -- Antoine
de Saint-Exupery
"The names of global variables should start with // "
-- https://isocpp.org
References
1. https://en.wikipedia.org/wiki/NTSC
2. http://www.colorcomputerarchive.com/coco/Documents/Datasheets/MC6847 MOS Video Display Generator (Motorola).pdf
3. mailto:varmfskii at gmail.com
4. mailto:zippster278 at gmail.com
5. mailto:jrosslist at outlook.com
6. mailto:Coco at maltedmedia.com
7. https://pairlist5.pair.net/mailman/listinfo/coco
8. mailto:Coco at maltedmedia.com
9. https://pairlist5.pair.net/mailman/listinfo/coco
10. mailto:Coco at maltedmedia.com
11. https://pairlist5.pair.net/mailman/listinfo/coco
More information about the Coco
mailing list