See the video:
An oscillating cylinder steam engine is a simple arrangement which does not require valves to direct steam into and out of the cylinder. Instead of valves, the entire cylinder rocks, or oscillates, such that one or more ports in the cylinder line up with corresponding ports in a fixed port face or in the pivot mounting (trunnion).
See more here about this engine.