Well-behaved programs only accessed the screen via the OS, by calling the videodriver.

The OS was always in the address range &C000-&FFFF.

The hardwareswitched the shadow RAM in and out. When PC (the program counter) was in the OS range, shadow RAM was out; when it was in the application range, shadow RAM was in.

Of course, games and the like weren't well-behaved applications, so you'd need to switch off (in software, of course) the shadow RAM before running. But a surprising number of applications (and even sideways ROMs!) worked with shadow RAM.