Changing the Color Computer clock rate

There are actually three speed settings on the CoCo. The default is to run at .895 MHz all the time. There is another setting that makes it run at twice that speed when accessing the ROM memory, but still at the slower speed when accessing RAM, called "address dependent" or "AD". Finally, there is a speed setting that uses the double speed all the time.

When the CPU chip runs faster, it generates more heat. From what I hear, most CoCo 6809's can take the heat of running double-speed, but some might burn out. With that chip fried, the entire machine is dead. So, there is some risk with doing this; if you treasure your CoCo, you might not want to try it. Personally, I've done this on a handful of CoCo's, and never had a problem with it. But your machine may be the "lucky" one, so be forewarned!

Also note that a lot of the timing-dependent things in the CoCo BASIC ROMs won't work right at any speed other than "slow", like reading or writing cassettes and disks, making sounds, and maybe some other things. So you may need to put on the brakes at some point after speeding up.

Also, you won't normally use the "double speed always" setting, because that disables the video and dynamic RAM refresh; it lets the processor use memory faster by letting it take the memory cycles that would normally be used for those things. So while running "fast", you won't get any picture, and you might lose the contents of RAM unless your access pattern is just right (making a program do that would be tricky, maybe impossible). The good news is that in BASIC programs, the "AD" speed works out to be nearly double, because it spends most of its time executing ROM code anyway.


If you only use the "AD" setting then things are easy:
        POKE &HFFD7,1 : REM GO FAST (A.D. SPEED)
        ...
        POKE &HFFD6,1 : REM BACK TO NORMAL (SLOW) SPEED

If you actually want the double speed, it gets trickier. There are two settings for "always fast": one that results from going through "A.D." mode on the way from "slow" to "fast", and another that results from jumping directly from "slow" mode into "fast" mode. And you are not allowed to slow down from the second of those two fast modes; you have to switch from that fast mode to the first fast mode, then down to "A.D.", and then, at last, back to slow:
        REM THESE 2 BITS SHOW THE SETTINGS
        REM THAT CONTROL THE SPEED ---------+-+
        REM                                 | |
        REM                                 v v
        ...
        REM FIRST CASE, GO THROUGH A.D. WHEN SPEEDING UP
        REM GOING SLOW AT FIRST             0 0
        ...
        REM STEP ON THE GAS
        POKE &HFFD7,1 : REM A.D.            0 1
        POKE &HFFD9,1 : REM FAST-1          1 1
        ...
        REM YEEHAA!
        ...
        REM BRAKE
        POKE &HFFD8,1 : REM A.D.            0 1
        POKE &HFFD6,1 : REM SLOW AGAIN      0 0
        ...
        ...
        ...
        REM GOING SLOW
        ...
        REM SECOND CASE, GO DIRECTLY FROM SLOW TO FAST
        REM STOMP ON THE GAS
        POKE &HFFD9,1 : REM FAST-2          1 0
        ...
        REM YEEHAA!
        ...
        REM BRAKE
        REM CANNOT GO FROM FAST-2 DIRECTLY TO SLOW OR A.D.
        REM MUST GO TO FAST-1 FIRST
        POKE &HFFD7,1 : REM FAST-1          1 1
        POKE &HFFD8,1 : REM A.D.            0 1
        POKE &HFFD6,1 : REM SLOW AGAIN      0 0
        ...
Back to my top-level CoCo page


21-Sep-97
yakowenk@csx.unxc.edu
(remove all "x"s to get a valid address)