Let $(T,X)$ be a discrete dynamical system. By this I mean that $X$ is a compact Hausdorff space and $T: X \to X$ a homeomorphism.

For example, take $X$ to be the sequence space $2^{\mathbb{Z}}$ and $T$ the Bernoulli shift. Then there is a dense set of periodic points, and there is another (disjoint) dense set of points whose orbits are dense (in view of topological transitivity). However, there are also points of $X$ that belong to neither of these sets---for instance, the sequence $(\dots, 1, 1, 1, 0, 0, 0, \dots )$.

This led to me the following:

Question:Is there a discrete dynamical system $(T,X)$ such that every point has either a finite or a dense orbit? (Cf. the below caveats.)

There are a few caveats to add. First, we want both periodicity and topological transitivity to occur; this rules out examples such as rotations of the circle (where every point is of the same type, either periodic or with a dense orbit). Second, let's assume there are no isolated points.

I've been thinking on and off about this question for a couple of days, and the basic examples of dynamical systems that I learned (shift spaces, toral endomorphisms, etc.) don't seem to satisfy this condition, and intuitively it feels like the compactness condition should imply that there are points which are "almost periodic," but not, kind of like the $(\dots, 1, 1, 1, 0, 0,0, \dots)$ example mentioned earlier. Nevertheless, I don't see how to prove this.