Submitted by Dan Dooré on Thursday, May 24, 2018 - 13:16.
The Sam's Zilog Z80B clock speed is always 6MHz, but RAM delays mean it can’t use all the cycles it gets.
Instructions running in external RAM always run at full CPU speed.
Instructions in internal RAM get roughly the full number of cycles, but all instruction lengths are rounded up to boundaries of 4 t-states (because this is the next time at which RAM is available for fetching the next instruction). Typical code will go about 10%-20% more slowly for this reason.
With the screen on in modes 2,3 or 4, you lose about 20% of available memory cycles
With the screen on in modes 1 you lose about 35 % of available memory cycles
Some instructions which don’t use memory cycles are not affected by some of these conditions, so they can appear to go faster than would otherwise be expected. The full detail is rather complicated and was the subject of a very good article in Based On An Idea...