Last June, Gideon, the maker of the Ultimate 64 motherboard, released a firmware update with this little line item:
Turbo Mode... The 6510 CPU can now be run faster than 1 MHz.
So I immediately downloaded and installed the new firmware. It turns out that Gideon implemented a 48 MHz mode in the CPU. The way it works is that the CPU and memory work at 48MHz, but the rest of the system runs at the usual 1MHz. So I tested this by running some benchmarks, and BASIC programs do indeed run 48x faster than on a stock 64.
So how can we use turbo mode in our programs?
As it turns out, there are two legacy methods of turning up the CPU speed on CPU accelerators. The Super CPU by AMD and the Commodore 128 2MHz mode have different methods of speeding up the CPU: https://1541u-documentation.readthedocs.io/en/latest/config/turbo_mode.html#turbo-control-registers
In "Turbo Enable Bit" mode, you can write to 53296 (decimal) or $D030 (hex) to enable the turbo mode, at whichever speed is set in the menu. Bit 0 turns turbo on and off.
in "Super CPU" mode, three registers are used:
Writing (any value) to 53370/$D07A sets 1Mhz.
Writing to 53371/$D07B sets 20MHz
53436/$D0BC is the read-only SuperCPU detect flag.
In "U64 Turbo Control" mode, you write to 53297 or $D031 with the values 0-15. 0 sets the CPU to 1Mhz, 15 sets 48MHz mode, and the other values set the speed based on a table with progressively larger intervals.
I'm not sure how the I/O is slowed down for things like disk and cartridge access. I assume the CPU is being slowed to 1MHz for disk access and interrupts, then goes back to high speed for internal processes. After having a long discussion about this on Lemon64, I have come to the conclusion that anyone writing accelerated code should explicitly switch back to 1MHz mode before accessing I/O, due to the way a lot of programs and processes handle I/O timing.